]>
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 ///////////////////////////////////////////////////////////////////////////// 
  13 #include "wx/mac/colordlg.h" 
  15 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
) 
  17 #include "wx/mac/private.h" 
  19 #include <ColorPicker.h> 
  26 wxColourDialog::wxColourDialog() 
  28     m_dialogParent 
= NULL
; 
  31 wxColourDialog::wxColourDialog(wxWindow 
*parent
, wxColourData 
*data
) 
  36 bool wxColourDialog::Create(wxWindow 
*parent
, wxColourData 
*data
) 
  38     m_dialogParent 
= parent
; 
  45 int wxColourDialog::ShowModal() 
  48     RGBColor currentColor 
= *((RGBColor
*)m_colourData
.m_dataColour
.GetPixel()) , newColor 
; 
  50     where
.h 
= where
.v 
= -1; 
  52     if (GetColor( where
, "\pSelect a new palette color.", ¤tColor
, &newColor 
)) 
  54         m_colourData
.m_dataColour
.Set( (WXCOLORREF
*) &newColor 
) ;