]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/colordlg.cpp
6c542fdcfb86924911d8141fc02344c146acc043
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 /////////////////////////////////////////////////////////////////////////////
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14 #pragma implementation "colordlg.h"
17 #include "wx/wxprec.h"
19 #include "wx/mac/colordlg.h"
20 #include "wx/fontdlg.h"
23 #if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
25 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
) ;