]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/colordlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/colordlg.cpp
3 // Purpose: wxColourDialog class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
34 #include "wx/cmndata.h"
35 #include "wx/colordlg.h"
38 #include <UIControls.h>
40 // ----------------------------------------------------------------------------
42 // ----------------------------------------------------------------------------
44 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
46 // ============================================================================
48 // ============================================================================
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
54 wxColourDialog::wxColourDialog()
58 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
63 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
73 int wxColourDialog::ShowModal()
75 wxString title
= _("Choose colour");
77 wxColour colour
= m_colourData
.GetColour();
80 rgb
.g
= colour
.Green();
81 rgb
.b
= colour
.Blue();
82 IndexedColorType i
= WinRGBToIndex ( &rgb
);
86 (m_colourData
.GetChooseFull()?UIPickColorStartRGB
:UIPickColorStartPalette
),
91 colour
.Set(rgb
.r
, rgb
.g
, rgb
.b
);
92 m_colourData
.SetColour(colour
);