fix build errors deriving from making wxColourData members private
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||||
|
|
||||||
|
enum wxStockCursor;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxCursor
|
// wxCursor
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -126,8 +126,8 @@ int wxColourDialog::ShowModal()
|
|||||||
COLORREF custColours[16];
|
COLORREF custColours[16];
|
||||||
for ( i = 0; i < WXSIZEOF(custColours); i++ )
|
for ( i = 0; i < WXSIZEOF(custColours); i++ )
|
||||||
{
|
{
|
||||||
if ( m_colourData.m_custColours[i].IsOk() )
|
if ( m_colourData.GetCustomColour(i).IsOk() )
|
||||||
custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]);
|
custColours[i] = wxColourToRGB(m_colourData.GetCustomColour(i));
|
||||||
else
|
else
|
||||||
custColours[i] = RGB(255,255,255);
|
custColours[i] = RGB(255,255,255);
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ int wxColourDialog::ShowModal()
|
|||||||
chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR);
|
chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR);
|
||||||
if ( m_parent )
|
if ( m_parent )
|
||||||
chooseColorStruct.hwndOwner = GetHwndOf(m_parent);
|
chooseColorStruct.hwndOwner = GetHwndOf(m_parent);
|
||||||
chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.m_dataColour);
|
chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.GetColour());
|
||||||
chooseColorStruct.lpCustColors = custColours;
|
chooseColorStruct.lpCustColors = custColours;
|
||||||
|
|
||||||
chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK;
|
chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK;
|
||||||
@@ -161,10 +161,10 @@ int wxColourDialog::ShowModal()
|
|||||||
// transfer the values chosen by user back into m_colourData
|
// transfer the values chosen by user back into m_colourData
|
||||||
for ( i = 0; i < WXSIZEOF(custColours); i++ )
|
for ( i = 0; i < WXSIZEOF(custColours); i++ )
|
||||||
{
|
{
|
||||||
wxRGBToColour(m_colourData.m_custColours[i], custColours[i]);
|
wxRGBToColour(m_colourData.GetCustomColour(i), custColours[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxRGBToColour(m_colourData.m_dataColour, chooseColorStruct.rgbResult);
|
wxRGBToColour(m_colourData.GetColour(), chooseColorStruct.rgbResult);
|
||||||
|
|
||||||
// this doesn't seem to work (contrary to what MSDN implies) on current
|
// this doesn't seem to work (contrary to what MSDN implies) on current
|
||||||
// Windows versions: CC_FULLOPEN is never set on return if it wasn't
|
// Windows versions: CC_FULLOPEN is never set on return if it wasn't
|
||||||
|
@@ -122,11 +122,11 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
|
|||||||
NSAutoreleasePool *thePool;
|
NSAutoreleasePool *thePool;
|
||||||
thePool = [[NSAutoreleasePool alloc] init];
|
thePool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
if(m_colourData.m_dataColour.Ok())
|
if(m_colourData.GetColour().IsOk())
|
||||||
[[NSColorPanel sharedColorPanel] setColor:
|
[[NSColorPanel sharedColorPanel] setColor:
|
||||||
[NSColor colorWithCalibratedRed:m_colourData.m_dataColour.Red() / 255.0
|
[NSColor colorWithCalibratedRed:m_colourData.GetColour().Red() / 255.0
|
||||||
green:m_colourData.m_dataColour.Green() / 255.0
|
green:m_colourData.GetColour().Green() / 255.0
|
||||||
blue:m_colourData.m_dataColour.Blue() / 255.0
|
blue:m_colourData.GetColour().Blue() / 255.0
|
||||||
alpha:1.0]
|
alpha:1.0]
|
||||||
];
|
];
|
||||||
else
|
else
|
||||||
@@ -175,7 +175,7 @@ int wxColourDialog::ShowModal()
|
|||||||
//Get the shared color panel along with the chosen color and set the chosen color
|
//Get the shared color panel along with the chosen color and set the chosen color
|
||||||
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||||
|
|
||||||
m_colourData.m_dataColour.Set(
|
m_colourData.GetColour().Set(
|
||||||
(unsigned char) ([theColor redComponent] * 255.0),
|
(unsigned char) ([theColor redComponent] * 255.0),
|
||||||
(unsigned char) ([theColor greenComponent] * 255.0),
|
(unsigned char) ([theColor greenComponent] * 255.0),
|
||||||
(unsigned char) ([theColor blueComponent] * 255.0)
|
(unsigned char) ([theColor blueComponent] * 255.0)
|
||||||
|
Reference in New Issue
Block a user