colourSelection = 0;
}
-wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, wxColourData *data):
- wxDialog(parent, -1, wxT("Colour"), wxPoint(0, 0), wxSize(900, 900), wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent,
+ wxColourData *data)
{
whichKind = 1;
colourSelection = 0;
bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
{
- dialogParent = parent;
+ if ( !wxDialog::Create(parent, -1, wxT("Colour"),
+ wxPoint(0, 0), wxSize(900, 900),
+ wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL) )
+ return FALSE;
- if (data)
- colourData = *data;
+ dialogParent = parent;
- InitializeColours();
- CalculateMeasurements();
- CreateWidgets();
+ if (data)
+ colourData = *data;
- return TRUE;
+ InitializeColours();
+ CalculateMeasurements();
+ CreateWidgets();
+
+ return TRUE;
}
int wxGenericColourDialog::ShowModal()
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
{
-#ifndef __WXMOTIF__
+#if !defined(__WXMOTIF__) && !defined(__WXMAC__)
wxDialog::OnPaint(event);
#endif
for (i = 0; i < 16; i++)
customColours[i] =
-/*
-#ifndef __VMS__
- (wxColour&)
-#endif
-*/
colourData.GetCustomColour(i);
singleCustomColour.Set(0, 0, 0);