wxSystemColourProperty Class Reference

Has dropdown list of wxWidgets system colours. Value used is of wxColourPropertyValue type. More...

#include <advprops.h>

Inheritance diagram for wxSystemColourProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual wxString ColourToString (const wxColour &col, int index) const
virtual wxColour GetColour (int index) const
virtual int GetCustomColourIndex () const
wxColourPropertyValue GetVal (const wxVariant *pVariant=NULL) const
virtual bool IntToValue (wxVariant &variant, int number, int argFlags=0) const
virtual void OnSetValue ()
bool QueryColourFromUser (wxVariant &variant) const
 wxSystemColourProperty (const wxString &label=wxPG_LABEL, const wxString &name=wxPG_LABEL, const wxColourPropertyValue &value=wxColourPropertyValue())
 ~wxSystemColourProperty ()

Protected Member Functions

int ColToInd (const wxColour &colour) const
virtual wxVariant DoTranslateVal (wxColourPropertyValue &v) const
void Init (int type, const wxColour &colour)
wxVariant TranslateVal (int type, const wxColour &colour) const
wxVariant TranslateVal (wxColourPropertyValue &v) const
 wxSystemColourProperty (const wxString &label, const wxString &name, const wxChar **labels, const long *values, wxPGChoices *choicesCache, const wxColour &value)
 wxSystemColourProperty (const wxString &label, const wxString &name, const wxChar **labels, const long *values, wxPGChoices *choicesCache, const wxColourPropertyValue &value)

Detailed Description

Has dropdown list of wxWidgets system colours. Value used is of wxColourPropertyValue type.

Definition at line 207 of file advprops.h.


Constructor & Destructor Documentation

wxSystemColourProperty::wxSystemColourProperty ( const wxString &  label = wxPG_LABEL,
const wxString &  name = wxPG_LABEL,
const wxColourPropertyValue value = wxColourPropertyValue() 
)
wxSystemColourProperty::~wxSystemColourProperty (  ) 
wxSystemColourProperty::wxSystemColourProperty ( const wxString &  label,
const wxString &  name,
const wxChar **  labels,
const long *  values,
wxPGChoices choicesCache,
const wxColourPropertyValue value 
) [protected]
wxSystemColourProperty::wxSystemColourProperty ( const wxString &  label,
const wxString &  name,
const wxChar **  labels,
const long *  values,
wxPGChoices choicesCache,
const wxColour &  value 
) [protected]

Member Function Documentation

virtual wxString wxSystemColourProperty::ColourToString ( const wxColour &  col,
int  index 
) const [virtual]

Override in derived class to customize how colours are printed as strings.

int wxSystemColourProperty::ColToInd ( const wxColour &  colour  )  const [protected]
virtual wxVariant wxSystemColourProperty::DoTranslateVal ( wxColourPropertyValue v  )  const [protected, virtual]
virtual wxColour wxSystemColourProperty::GetColour ( int  index  )  const [virtual]

Default is to use wxSystemSettings::GetColour(index). Override to use custom colour tables etc.

virtual int wxSystemColourProperty::GetCustomColourIndex (  )  const [virtual]

Returns index of entry that triggers colour picker dialog (default is last).

wxColourPropertyValue wxSystemColourProperty::GetVal ( const wxVariant *  pVariant = NULL  )  const
void wxSystemColourProperty::Init ( int  type,
const wxColour &  colour 
) [protected]
virtual bool wxSystemColourProperty::IntToValue ( wxVariant &  value,
int  number,
int  argFlags = 0 
) const [virtual]

Converts 'number' (including choice selection) into proper value 'variant'. Returns true if new (different than m_value) value could be interpreted from the integer.

Parameters:
argFlags If wxPG_FULL_VALUE is set, returns complete, storable value instead of displayable
Remarks:
  • Default implementation may work correctly if used value type is int.
  • If property is not supposed to use choice or spinctrl or other editor with int-based value, it is not necessary to implement this method.
  • If property uses choice control, and displays a dialog on some choice items, then it is preferred to display that dialog in IntToValue instead of OnEvent.
  • You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behavior).

Reimplemented from wxBaseEnumProperty.

virtual void wxSystemColourProperty::OnSetValue (  )  [virtual]

This virtual function is called after m_value has been set.

Remarks:
  • If m_value was set to Null variant (ie. unspecified value), OnSetValue() will not be called.
  • m_value may be of any variant type. Typically properties internally support only one variant type, and as such OnSetValue() provides a good opportunity to convert supported values into internal type.
  • Default implementation does nothing.

Reimplemented from wxBaseEnumProperty.

bool wxSystemColourProperty::QueryColourFromUser ( wxVariant &  variant  )  const
wxVariant wxSystemColourProperty::TranslateVal ( int  type,
const wxColour &  colour 
) const [inline, protected]

Definition at line 265 of file advprops.h.

wxVariant wxSystemColourProperty::TranslateVal ( wxColourPropertyValue v  )  const [inline, protected]

Definition at line 261 of file advprops.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


wxpropgrid
Author(s): Jaakko Salli
autogenerated on Fri Jan 11 09:34:08 2013