]>
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"
33 #include "wx/cmndata.h"
34 #include "wx/colordlg.h"
37 #include <UIControls.h>
39 // ----------------------------------------------------------------------------
41 // ----------------------------------------------------------------------------
43 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
45 // ============================================================================
47 // ============================================================================
49 // ----------------------------------------------------------------------------
51 // ----------------------------------------------------------------------------
53 wxColourDialog::wxColourDialog()
57 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
62 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
72 int wxColourDialog::ShowModal()
74 wxString title
= _("Choose colour");
76 wxColour colour
= m_colourData
.GetColour();
79 rgb
.g
= colour
.Green();
80 rgb
.b
= colour
.Blue();
81 IndexedColorType i
= WinRGBToIndex ( &rgb
);
85 (m_colourData
.GetChooseFull()?UIPickColorStartRGB
:UIPickColorStartPalette
),
90 colour
.Set(rgb
.r
, rgb
.g
, rgb
.b
);
91 m_colourData
.SetColour(colour
);