Version: 2.9.4
Public Member Functions
wxColourPickerCtrl Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/clrpicker.h>

Inheritance diagram for wxColourPickerCtrl:

Detailed Description

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).

Styles

This class supports the following styles:

Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxColourPickerEvent& event)

Event macros for events emitted by this class:

Library:  wxCore
Category:  Picker Controls

Appearance:
wxMSW appearancewxGTK appearancewxMac appearance
wxMSW appearancewxGTK appearancewxMac appearance
参照:
wxColourDialog, wxColourPickerEvent

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.

List of all members.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
parentParent window, must not be non-NULL.
idThe identifier for the control.
colourThe initial colour shown in the control.
posInitial position.
sizeInitial size.
styleThe window style, see wxCRLP_* flags.
validatorValidator which can be used for additional date checks.
nameControl name.
Returns:
true if the control was successfully created or false if creation failed.
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().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines