]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/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"
18 #include "wx/fontdlg.h"
21 #if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
23 #if !USE_SHARED_LIBRARY
24 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
27 #include "wx/mac/private.h"
29 #include <ColorPicker.h>
36 wxColourDialog::wxColourDialog()
38 m_dialogParent
= NULL
;
41 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
46 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
48 m_dialogParent
= parent
;
55 int wxColourDialog::ShowModal()
58 RGBColor currentColor
= *((RGBColor
*)m_colourData
.m_dataColour
.GetPixel()) , newColor
;
60 where
.h
= where
.v
= -1;
62 if (GetColor( where
, "\pSelect a new palette color.", ¤tColor
, &newColor
))
64 m_colourData
.m_dataColour
.Set( (WXCOLORREF
*) &newColor
) ;