]>
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 ///////////////////////////////////////////////////////////////////////////// 
  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 #if !USE_SHARED_LIBRARY 
  26 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
) 
  29 #include "wx/mac/private.h" 
  31 #include <ColorPicker.h> 
  38 wxColourDialog::wxColourDialog() 
  40     m_dialogParent 
= NULL
; 
  43 wxColourDialog::wxColourDialog(wxWindow 
*parent
, wxColourData 
*data
) 
  48 bool wxColourDialog::Create(wxWindow 
*parent
, wxColourData 
*data
) 
  50     m_dialogParent 
= parent
; 
  57 int wxColourDialog::ShowModal() 
  60     RGBColor currentColor 
= *((RGBColor
*)m_colourData
.m_dataColour
.GetPixel()) , newColor 
; 
  62     where
.h 
= where
.v 
= -1; 
  64     if (GetColor( where
, "\pSelect a new palette color.", ¤tColor
, &newColor 
)) 
  66         m_colourData
.m_dataColour
.Set( (WXCOLORREF
*) &newColor 
) ;