#include </home/zeitlin/src/wx/github/interface/wx/clrpicker.h>
Inheritance diagram for wxColourPickerCtrl:This control allows the user to select a colour.
The generic implementation is a button which brings up a wxColourDialog when clicked. Native implementation may differ but this is usually a (small) widget which give access to the colour-chooser dialog. It is only available if wxUSE_COLOURPICKERCTRL is set to 1 (the default).
This class supports the following styles:
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros for events emitted by this class:
wxCLRP_USE_TEXTCTRL; note that in this case the event is fired only if the user’s input is valid, i.e. recognizable). ![]() | ![]() | ![]() |
| wxMSW appearance | wxGTK appearance | wxMac appearance |
Public Member Functions | |
| wxColourPickerCtrl () | |
| wxColourPickerCtrl (wxWindow *parent, wxWindowID id, const wxColour &colour=*wxBLACK, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCLRP_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxColourPickerCtrlNameStr) | |
| Initializes the object and calls Create() with all the parameters. | |
| bool | Create (wxWindow *parent, wxWindowID id, const wxColour &colour=*wxBLACK, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCLRP_DEFAULT_STYLE, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxColourPickerCtrlNameStr) |
| Creates a colour picker with the given arguments. | |
| wxColour | GetColour () const |
| Returns the currently selected colour. | |
| void | SetColour (const wxColour &col) |
| Sets the currently selected colour. | |
| void | SetColour (const wxString &colname) |
| Sets the currently selected colour. | |
| wxColourPickerCtrl::wxColourPickerCtrl | ( | ) |
| wxColourPickerCtrl::wxColourPickerCtrl | ( | wxWindow * | parent, |
| wxWindowID | id, | ||
| const wxColour & | colour = *wxBLACK, |
||
| const wxPoint & | pos = wxDefaultPosition, |
||
| const wxSize & | size = wxDefaultSize, |
||
| long | style = wxCLRP_DEFAULT_STYLE, |
||
| const wxValidator & | validator = wxDefaultValidator, |
||
| const wxString & | name = wxColourPickerCtrlNameStr |
||
| ) |
Initializes the object and calls Create() with all the parameters.
| bool wxColourPickerCtrl::Create | ( | wxWindow * | parent, |
| wxWindowID | id, | ||
| const wxColour & | colour = *wxBLACK, |
||
| const wxPoint & | pos = wxDefaultPosition, |
||
| const wxSize & | size = wxDefaultSize, |
||
| long | style = wxCLRP_DEFAULT_STYLE, |
||
| const wxValidator & | validator = wxDefaultValidator, |
||
| const wxString & | name = wxColourPickerCtrlNameStr |
||
| ) |
Creates a colour picker with the given arguments.
| parent | Parent window, must not be non-NULL. |
| id | The identifier for the control. |
| colour | The initial colour shown in the control. |
| pos | Initial position. |
| size | Initial size. |
| style | The window style, see wxCRLP_* flags. |
| validator | Validator which can be used for additional date checks. |
| name | Control name. |
| wxColour wxColourPickerCtrl::GetColour | ( | ) | const |
Returns the currently selected colour.
| void wxColourPickerCtrl::SetColour | ( | const wxColour & | col | ) |
Sets the currently selected colour.
See wxColour::Set().
| void wxColourPickerCtrl::SetColour | ( | const wxString & | colname | ) |
Sets the currently selected colour.
See wxColour::Set().