#include "wx/statline.h"
#endif
+#include "wx/colourdata.h"
#include "wx/generic/colrdlgg.h"
IMPLEMENT_DYNAMIC_CLASS(wxGenericColourDialog, wxDialog)
// don't change the number of elements (48) in this array, the code below is
// hardcoded to use it
-static const wxChar *wxColourDialogNames[] =
+static const wxChar *const wxColourDialogNames[] =
{
wxT("ORANGE"),
wxT("GOLDENROD"),
bool wxGenericColourDialog::Create(wxWindow *parent, wxColourData *data)
{
- if ( !wxDialog::Create(GetParentForModalDialog(parent), wxID_ANY,
+ if ( !wxDialog::Create(GetParentForModalDialog(parent, 0), wxID_ANY,
_("Choose colour"),
wxPoint(0, 0), wxSize(900, 900)) )
return false;
void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
{
-#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__)
+#if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__) && !defined(__WXOSX__)
wxDialog::OnPaint(event);
#else
wxUnusedVar(event);
for (i = 0; i < WXSIZEOF(wxColourDialogNames); i++)
{
wxColour col = wxTheColourDatabase->Find(wxColourDialogNames[i]);
- if (col.Ok())
+ if (col.IsOk())
m_standardColours[i].Set(col.Red(), col.Green(), col.Blue());
else
m_standardColours[i].Set(0, 0, 0);
for (i = 0; i < WXSIZEOF(m_customColours); i++)
{
wxColour c = m_colourData.GetCustomColour(i);
- if (c.Ok())
+ if (c.IsOk())
m_customColours[i] = m_colourData.GetCustomColour(i);
else
m_customColours[i] = wxColour(255, 255, 255);
}
wxColour curr = m_colourData.GetColour();
- if ( curr.Ok() )
+ if ( curr.IsOk() )
{
bool m_initColourFound = false;
int y = (i*(m_smallRectangleSize.y+m_gridSpacing) + m_standardColoursRect.y);
dc.SetPen(*wxBLACK_PEN);
- wxBrush brush(m_standardColours[ptr], wxSOLID);
+ wxBrush brush(m_standardColours[ptr]);
dc.SetBrush(brush);
dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
dc.SetPen(*wxBLACK_PEN);
- wxBrush brush(m_customColours[ptr], wxSOLID);
+ wxBrush brush(m_customColours[ptr]);
dc.SetBrush(brush);
dc.DrawRectangle( x, y, m_smallRectangleSize.x, m_smallRectangleSize.y);
{
dc.SetPen(*wxBLACK_PEN);
- wxBrush *brush = new wxBrush(m_colourData.m_dataColour, wxSOLID);
+ wxBrush *brush = new wxBrush(m_colourData.m_dataColour);
dc.SetBrush(*brush);
dc.DrawRectangle( m_singleCustomColourRect.x, m_singleCustomColourRect.y,