#include "wx/generic/colrdlgg.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
BEGIN_EVENT_TABLE(wxGenericColourDialog, wxDialog)
EVT_CLOSE(wxGenericColourDialog::OnCloseWindow)
END_EVENT_TABLE()
-#endif
/*
* Generic wxColourDialog
colourSelection = 0;
}
-wxGenericColourDialog::wxGenericColourDialog(wxWindow *parent, wxColourData *data):
- wxDialog(parent, -1, "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;
+
+ dialogParent = parent;
- if (data)
- colourData = *data;
+ if (data)
+ colourData = *data;
- InitializeColours();
- CalculateMeasurements();
- CreateWidgets();
+ InitializeColours();
+ CalculateMeasurements();
+ CreateWidgets();
- return TRUE;
+ return TRUE;
}
int wxGenericColourDialog::ShowModal()
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
{
-#ifndef __WXMOTIF__
+#if !defined(__WXMOTIF__) && !defined(__WXMAC__)
wxDialog::OnPaint(event);
#endif