]>
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"
29 #include "wx/colordlg.h"
36 #include <UIControls.h>
38 // ----------------------------------------------------------------------------
40 // ----------------------------------------------------------------------------
42 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
44 // ============================================================================
46 // ============================================================================
48 // ----------------------------------------------------------------------------
50 // ----------------------------------------------------------------------------
52 wxColourDialog::wxColourDialog()
56 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
61 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
71 int wxColourDialog::ShowModal()
73 wxString title
= _("Choose colour");
75 wxColour colour
= m_colourData
.GetColour();
78 rgb
.g
= colour
.Green();
79 rgb
.b
= colour
.Blue();
80 IndexedColorType i
= WinRGBToIndex ( &rgb
);
84 (m_colourData
.GetChooseFull()?UIPickColorStartRGB
:UIPickColorStartPalette
),
89 colour
.Set(rgb
.r
, rgb
.g
, rgb
.b
);
90 m_colourData
.SetColour(colour
);