]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "colordlg.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
38 #include "wx/cmndata.h"
39 #include "wx/colordlg.h"
42 #include <UIControls.h>
44 // ----------------------------------------------------------------------------
46 // ----------------------------------------------------------------------------
48 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
50 // ============================================================================
52 // ============================================================================
54 // ----------------------------------------------------------------------------
56 // ----------------------------------------------------------------------------
58 wxColourDialog::wxColourDialog()
62 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
67 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
77 int wxColourDialog::ShowModal()
79 wxString title
= _("Choose colour");
81 wxColour colour
= m_colourData
.GetColour();
84 rgb
.g
= colour
.Green();
85 rgb
.b
= colour
.Blue();
86 IndexedColorType i
= WinRGBToIndex ( &rgb
);
90 (m_colourData
.GetChooseFull()?UIPickColorStartRGB
:UIPickColorStartPalette
),
95 colour
.Set(rgb
.r
, rgb
.g
, rgb
.b
);
96 m_colourData
.SetColour(colour
);