wxGridCellEditor
#include <wx/grid.h>
Inheritance diagram for wxGridCellEditor:
[legend]
Detailed Description
This class is responsible for providing and manipulating the in-place edit controls for the grid.
Instances of wxGridCellEditor (actually, instances of derived classes since it is an abstract class) can be associated with the cell attributes for individual cells, rows, columns, or even for the entire grid.
Public Member Functions |
|
| 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 wxString | GetValue () const =0 |
| Returns the value currently in the editor control. More... | |
| wxControl * | GetControl () const |
| 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... | |
Public Member Functions inherited from wxClientDataContainer |
|
Public Member Functions inherited from wxRefCounter |
|
Protected Member Functions |
|
| virtual | ~wxGridCellEditor () |
| The destructor is private because only DecRef() can delete us. More... | |
Protected Member Functions inherited from wxRefCounter |
|
Constructor & Destructor Documentation
| wxGridCellEditor::wxGridCellEditor | ( | ) |
Default constructor.
|
protectedvirtual |
The destructor is private because only DecRef() can delete us.
Member Function Documentation
|
pure virtual |
Effectively save the changes in the grid.
This function should save the value of the control in the grid. It is called only after EndEdit() returns true.
|
pure virtual |
Fetch the value from the table and prepare the edit control to begin editing.
This function should save the original value of the grid cell at the given row and col and show the control allowing the user to change it.
- See also
- EndEdit()
|
pure virtual |
Create a new object which is the copy of this one.
|
pure virtual |
Creates the actual edit control.
|
virtual |
Final cleanup.
|
pure virtual |
End editing the cell.
This function must check if the current value of the editing control is valid and different from the original value (available as oldval in its string form and possibly saved internally using its real type by BeginEdit()). If it isn't, it just returnsfalse, otherwise it must do the following:
- Save the new value internally so that ApplyEdit() could apply it.
- Fill newval (which is never NULL) with the string representation of the new value.
- Return true
Notice that it must not modify the grid as the change could still be vetoed.
If the user-defined wxEVT_GRID_CELL_CHANGING event handler doesn't veto this change, ApplyEdit() will be called next.
|
pure virtual |
Returns the value currently in the editor control.
|
virtual |
Some types of controls on some platforms may need some help with the Return key.
| bool wxGridCellEditor::IsCreated | ( | ) |
Returns true if the edit control has been created.
|
virtual |
Draws the part of the cell not occupied by the control: the base class version just fills it with background colour from the attribute.
|
pure virtual |
Reset the value in the control back to its starting value.
| void wxGridCellEditor::SetControl | ( | wxControl * | control | ) |
Set the wxControl that will be used by this cell editor for editing the value.
|
virtual |
Size and position the edit control.
|
virtual |
Show or hide the edit control, use the specified attributes to set colours/fonts for it.
|
virtual |
If the editor is enabled by clicking on the cell, this method will be called.
|
virtual |
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.
wxGridCellEditor的更多相关文章
随机推荐
- paraview plot over line
- ssm框架的搭建流程
1.新建一个Maven project (1)选中create a simple project,自动配置必要的文件 (2)Packaging选择war类型.jar和war的区别就是一个是普通的jav ...
- hdu4513吉哥系列故事——完美队形II 马拉车
题目传送门 题意:求最长回文串长度,要求回文串左边是非下降. 思路一: 先把连续的回文串,满足先上升再下降的序列处理出来,再对这部分序列做马拉车模板就可以了. 需要注意的是,由于他要的是非下降的序列, ...
- Dear friends:
To realize the value of ONE YEAR想知道一整年的价值ask the student who has failed a class就去问被当过的学生To realize ...
- ACM 计算几何向量
向量 简介注意事项基本计算 加减法 ~ 示例代码 长度 ~ 示例代码 数乘 ~ 示例代码 点积 应用 ~ 示例代码 叉积 ~ 示例代码 性质与应用 经典题目 向量旋转 操作目的 模板代码 简介 向量, ...
- 有用的 Angular CLI 命令参数
这是一些有用的 Angular 5 CLI 命令参数,注意参数前面的-和--的不同... 1. 指定build的输出为production version,合并优化css and js files. ...
- [转] 从零开始学Spring Boot
[From] http://412887952-qq-com.iteye.com/blog/2291496 一个博主写的spring boot系列文章,很赞!
- Sqlite CodeFirst的初级实现
示例实体: using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnn ...
- element-ui Form表单验证
element-ui Form表单验证规则全解 element的form表单非常好用,自带了验证规则,用起来很方便,官网给的案例对于一些普通场景完全没问题,不过一些复杂场景的验证还得自己多看文档摸索, ...
- QWebView使用
问题: 开始编译的时候在pro文件中要加上 QT += core gui webkitwidgets 文件使用部分加上 #include<QtWebKitWidgets/QWebView&g ...
Public Member Functions inherited from