]>
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 #if !USE_SHARED_LIBRARY
20 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
23 #include "wx/mac/private.h"
25 #include <ColorPicker.h>
32 wxColourDialog::wxColourDialog()
34 m_dialogParent
= NULL
;
37 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
42 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
44 m_dialogParent
= parent
;
51 int wxColourDialog::ShowModal()
54 RGBColor currentColor
= *((RGBColor
*)m_colourData
.m_dataColour
.GetPixel()) , newColor
;
56 where
.h
= where
.v
= -1;
58 if (GetColor( where
, "\pSelect a new palette color.", ¤tColor
, &newColor
))
60 m_colourData
.m_dataColour
.Set( (WXCOLORREF
*) &newColor
) ;