]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/classic/colordlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxColourDialog class. NOTE: you can use the generic class
4 // if you wish, instead of implementing this.
5 // Author: Stefan Csomor
9 // Copyright: (c) Stefan Csomor
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
14 #pragma implementation "colordlg.h"
17 #include "wx/mac/colordlg.h"
19 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
21 #include "wx/mac/private.h"
23 #include <ColorPicker.h>
30 wxColourDialog::wxColourDialog()
32 m_dialogParent
= NULL
;
35 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
40 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
42 m_dialogParent
= parent
;
49 int wxColourDialog::ShowModal()
52 RGBColor currentColor
= *((RGBColor
*)m_colourData
.m_dataColour
.GetPixel()) , newColor
;
54 where
.h
= where
.v
= -1;
56 if (GetColor( where
, "\pSelect a new palette color.", ¤tColor
, &newColor
))
58 m_colourData
.m_dataColour
.Set( (WXCOLORREF
*) &newColor
) ;