]>
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"
41 // ----------------------------------------------------------------------------
43 // ----------------------------------------------------------------------------
45 IMPLEMENT_DYNAMIC_CLASS(wxColourDialog
, wxDialog
)
47 // ============================================================================
49 // ============================================================================
51 // ----------------------------------------------------------------------------
53 // ----------------------------------------------------------------------------
55 wxColourDialog::wxColourDialog()
59 wxColourDialog::wxColourDialog(wxWindow
*parent
, wxColourData
*data
)
64 bool wxColourDialog::Create(wxWindow
*parent
, wxColourData
*data
)
74 int wxColourDialog::ShowModal()
76 wxString title
= _("Choose colour");
78 wxColour colour
= m_colourData
.GetColour();
81 rgb
.g
= colour
.Green();
82 rgb
.b
= colour
.Blue();
83 IndexedColorType i
= WinRGBToIndex ( &rgb
);
87 (m_colourData
.GetChooseFull()?UIPickColorStartRGB
:UIPickColorStartPalette
),
92 colour
.Set(rgb
.r
, rgb
.g
, rgb
.b
);
93 m_colourData
.SetColour(colour
);