wxDataViewCheckIconTextRenderer Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
wxDataViewCheckIconTextRenderer Class Reference
Class List by Category » wxDataViewCtrl Related Classes

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/dataview.h>`

Inheritance diagram for wxDataViewCheckIconTextRenderer:
[legend]

## Detailed Description

This renderer class shows a checkbox in addition to the icon and text shown by the base class and also allows the user to toggle this checkbox.

By default this class doesn't allow the user to put the checkbox into the third, i.e. indeterminate, state, even though it can display the state if the program returns the corresponding value from the associated model. Call Allow3rdStateForUser() explicitly if the user should be able to select the 3rd state interactively too.

This class is used internally by wxTreeListCtrl, and can be seen in action in the corresponding sample.

See also
  wxDataViewIconTextRenderer, wxDataViewToggleRenderer

  ##

Library: wxCore
Category: wxDataViewCtrl Related Classes

Since
  3.1.1

## Public Member Functions
| wxDataViewCheckIconTextRenderer (wxDataViewCellMode mode=wxDATAVIEW_CELL_ACTIVATABLE, int align=wxDVR_DEFAULT_ALIGNMENT)
| Create a new renderer.
void | Allow3rdStateForUser (bool allow=true)
| Allow the user to interactively select the 3rd state for the items rendered by this object.
Public Member Functions inherited from wxDataViewRenderer
| wxDataViewRenderer (const wxString &varianttype, wxDataViewCellMode mode=wxDATAVIEW_CELL_INERT, int align=wxDVR_DEFAULT_ALIGNMENT)
| Constructor.
void | EnableEllipsize (wxEllipsizeMode mode=wxELLIPSIZE_MIDDLE)
| Enable or disable replacing parts of the item text with ellipsis to make it fit the column width.
void | DisableEllipsize ()
| Disable replacing parts of the item text with ellipsis.
virtual wxString | GetAccessibleDescription () const =0
| This method returns a string describing the content of the renderer to the class implementing accessibility features in wxDataViewCtrl.
virtual int | GetAlignment () const
| Returns the alignment.
wxEllipsizeMode | GetEllipsizeMode () const
| Returns the ellipsize mode used by the renderer.
virtual wxDataViewCellMode | GetMode () const
| Returns the cell mode.
wxDataViewColumn * | GetOwner () const
| Returns pointer to the owning wxDataViewColumn.
virtual bool | GetValue (wxVariant &value) const =0
| This methods retrieves the value from the renderer in order to transfer the value back to the data model.
wxString | GetVariantType () const
| Returns a string with the type of the wxVariant supported by this renderer.
virtual bool | IsCompatibleVariantType (const wxString &variantType) const
| Check if the given variant type is compatible with the type expected by this renderer.
virtual void | SetAlignment (int align)
| Sets the alignment of the renderer's content.
void | SetOwner (wxDataViewColumn *owner)
| Sets the owning wxDataViewColumn.
virtual bool | SetValue (const wxVariant &value)=0
| Set the value of the renderer (and thus its cell) to value.
void | SetValueAdjuster (wxDataViewValueAdjuster *transformer)
| Set the transformer object to be used to customize values before they are rendered.
virtual bool | Validate (wxVariant &value)
| Before data is committed to the data model, it is passed to this method where it can be checked for validity.
virtual bool | HasEditorCtrl () const
virtual wxWindow * | CreateEditorCtrl (wxWindow *parent, wxRect labelRect, const wxVariant &value)
virtual bool | GetValueFromEditorCtrl (wxWindow *editor, wxVariant &value)
virtual bool | StartEditing (const wxDataViewItem &item, wxRect labelRect)
virtual void | CancelEditing ()
virtual bool | FinishEditing ()
wxWindow * | GetEditorCtrl ()
Public Member Functions inherited from wxObject
| wxObject ()
| Default ctor; initializes to NULL the internal reference data.
| wxObject (const wxObject &other)
| Copy ctor.
virtual | ~wxObject ()
| Destructor.
virtual wxClassInfo * | GetClassInfo () const
| This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).
wxObjectRefData * | GetRefData () const
| Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
bool | IsKindOf (const wxClassInfo *info) const
| Determines whether this class is a subclass of (or the same class as) the given class.
bool | IsSameAs (const wxObject &obj) const
| Returns true if this object has the same data pointer as obj.
void | Ref (const wxObject &clone)
| Makes this object refer to the data in clone.
void | SetRefData (wxObjectRefData *data)
| Sets the wxObject::m_refData pointer.
void | UnRef ()
| Decrements the reference count in the associated data, and if it is zero, deletes the data.
void | UnShare ()
| This is the same of AllocExclusive() but this method is public.
void | operator delete (void *buf)
| The delete operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined.
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0)
| The new operator is defined for debugging versions of the library only, when the identifier `__WXDEBUG__` is defined.

## Static Public Member Functions
static wxString | GetDefaultType ()

## Additional Inherited Members
Protected Member Functions inherited from wxDataViewRenderer
wxDataViewCtrl * | GetView () const
Protected Member Functions inherited from wxObject
void | AllocExclusive ()
| Ensure that this object's data is not shared with any other object.
virtual wxObjectRefData * | CreateRefData () const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it.
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const
| Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data.
Protected Attributes inherited from wxObject
wxObjectRefData * | m_refData
| Pointer to an object which is the object's reference-counted data.

## Constructor & Destructor Documentation

## ◆ wxDataViewCheckIconTextRenderer()

wxDataViewCheckIconTextRenderer::wxDataViewCheckIconTextRenderer | ( | wxDataViewCellMode | mode = wxDATAVIEW_CELL_ACTIVATABLE,
|  | int | align = wxDVR_DEFAULT_ALIGNMENT )
| explicit

Create a new renderer.

By default the renderer is activatable, i.e. allows the user to toggle the checkbox.

## Member Function Documentation

## ◆ Allow3rdStateForUser()

void wxDataViewCheckIconTextRenderer::Allow3rdStateForUser | ( | bool | allow = true | ) |

Allow the user to interactively select the 3rd state for the items rendered by this object.

As described in the class overview, this renderer can always display the 3rd ("indeterminate") checkbox state if the model contains cells with wxCHK_UNDETERMINED value, but it doesn't allow the user to set it by default. Call this method to allow this to happen.

Parameters

  allow | If true, interactively clicking a checked cell switches it to the indeterminate value and clicking it again unchecks it. If false, clicking a checked cell switches to the unchecked value, skipping the indeterminate one.

## ◆ GetDefaultType()

wxString wxDataViewCheckIconTextRenderer::GetDefaultType | ( |  | ) |
| static