| Version: 3.2.8

Public Member Functions | Static Public Member Functions | List of all members
wxGridCellBoolEditor Class Reference
Class List by Category » Grid Related Classes

`#include <wx/grid.h>`

Inheritance diagram for wxGridCellBoolEditor:
[legend]

## Detailed Description

Grid cell editor for boolean data.

##

Library: wxCore
Category: Grid Related Classes

See also
  wxGridCellEditor, wxGridCellAutoWrapStringEditor, wxGridCellChoiceEditor, wxGridCellEnumEditor, wxGridCellFloatEditor, wxGridCellNumberEditor, wxGridCellTextEditor, wxGridCellDateEditor

## Public Member Functions

| wxGridCellBoolEditor ()
| Default constructor. More...
Public Member Functions inherited from wxGridCellEditor
| wxGridCellEditor ()
| Default constructor. More...
virtual void | BeginEdit (int row, int col, wxGrid *grid)=0
| Fetch the value from the table and prepare the edit control to begin editing. More...
virtual wxGridCellEditor * | Clone () const =0
| Create a new object which is the copy of this one. More...
virtual void | Create (wxWindow *parent, wxWindowID id, wxEvtHandler *evtHandler)=0
| Creates the actual edit control. More...
virtual void | Destroy ()
| Final cleanup. More...
virtual bool | EndEdit (int row, int col, const wxGrid *grid, const wxString &oldval, wxString *newval)=0
| End editing the cell. More...
virtual void | ApplyEdit (int row, int col, wxGrid *grid)=0
| Effectively save the changes in the grid. More...
virtual void | HandleReturn (wxKeyEvent &event)
| Some types of controls on some platforms may need some help with the Return key. More...
bool | IsCreated ()
| Returns true if the edit control has been created. More...
virtual void | PaintBackground (wxDC &dc, const wxRect &rectCell, const wxGridCellAttr &attr)
| Draws the part of the cell not occupied by the control: the base class version just fills it with background colour from the attribute. More...
virtual void | Reset ()=0
| Reset the value in the control back to its starting value. More...
virtual void | SetSize (const wxRect &rect)
| Size and position the edit control. More...
virtual void | Show (bool show, wxGridCellAttr *attr=NULL)
| Show or hide the edit control, use the specified attributes to set colours/fonts for it. More...
virtual void | StartingClick ()
| If the editor is enabled by clicking on the cell, this method will be called. More...
virtual void | StartingKey (wxKeyEvent &event)
| If the editor is enabled by pressing keys on the grid, this will be called to let the editor do something about that first key if desired. More...
virtual bool | IsAcceptedKey (wxKeyEvent &event)
| Return true to allow the given key to start editing: the base class version only checks that the event has no modifiers. More...
virtual wxString | GetValue () const =0
| Returns the value currently in the editor control. More...
wxWindow * | GetWindow () const
| Get the edit window used by this editor. More...
void | SetWindow (wxWindow *window)
| Set the wxWindow that will be used by this cell editor for editing the value. More...
wxControl * | GetControl ()
| Get the wxControl used by this editor. More...
void | SetControl (wxControl *control)
| Set the wxControl that will be used by this cell editor for editing the value. More...
virtual wxGridActivationResult | TryActivate (int row, int col, wxGrid *grid, const wxGridActivationSource &actSource)
| Function allowing to create an "activatable" editor. More...
virtual void | DoActivate (int row, int col, wxGrid *grid)
| Function which must be overridden for "activatable" editors. More...
Public Member Functions inherited from wxSharedClientDataContainer
void * | GetClientData () const
| Get the untyped client data. More...
wxClientData * | GetClientObject () const
| Get a pointer to the client data object. More...
void | SetClientData (void *data)
| Set the untyped client data. More...
void | SetClientObject (wxClientData *data)
| Set the client data object. More...
Public Member Functions inherited from wxRefCounter
| wxRefCounter ()
| Default constructor. More...
void | DecRef ()
| Decrements the reference count associated with this shared data and, if it reaches zero, destroys this instance of wxRefCounter releasing its memory. More...
int | GetRefCount () const
| Returns the reference count associated with this shared data. More...
void | IncRef ()
| Increments the reference count associated with this shared data. More...

## Static Public Member Functions

static bool | IsTrueValue (const wxString &value)
| Returns true if the given value is equal to the string representation of the truth value we currently use (see UseStringValues()). More...
static void | UseStringValues (const wxString &valueTrue="1", const wxString &valueFalse=wxEmptyString)
| This method allows you to customize the values returned by GetValue() for the cell using this editor. More...

## Additional Inherited Members

Protected Member Functions inherited from wxGridCellEditor
virtual | ~wxGridCellEditor ()
| The destructor is private because only DecRef() can delete us. More...
Protected Member Functions inherited from wxRefCounter
virtual | ~wxRefCounter ()
| Destructor. More...

## Constructor & Destructor Documentation

## ◆ wxGridCellBoolEditor()

wxGridCellBoolEditor::wxGridCellBoolEditor | ( |  | ) |

Default constructor.

## Member Function Documentation

## ◆ IsTrueValue()

static bool wxGridCellBoolEditor::IsTrueValue | ( | const wxString & | value | ) |

static

Returns true if the given value is equal to the string representation of the truth value we currently use (see UseStringValues()).

## ◆ UseStringValues()

static void wxGridCellBoolEditor::UseStringValues | ( | const wxString & | valueTrue = `"1"`,
|  | const wxString & | valueFalse = `wxEmptyString`
| ) |  |

static

This method allows you to customize the values returned by GetValue() for the cell using this editor.

By default, the default values of the arguments are used, i.e. `"1"` is returned if the cell is checked and an empty string otherwise.