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的更多相关文章
随机推荐
- vue 在路由中复用组件
首先需要在app.vue中引入: <template> <div id="app"> <!--<app-header></app-h ...
- prcharm 注册码
JetBrains全系列在线激活中心 使用方法: 1. 点击Help,选择Register.打开注册页面. 2. 选择License server, 在License server address 中 ...
- C++_类入门1-对象和类的介绍
面向对象是(OOP)是特殊的.设计程序的概念性方法:包含以下特性: 抽象: 封装和数据隐藏: 多态: 继承: 代码的可重用性: 为了实现这些特性并且将这些特性组合在一起,C++所做的最重要的改进是提供 ...
- [微信小程序] -- wxss引用外部css文件及iconfont
小程序引入外部文件的方式是: 只需要在其css文件写上: @import "外部css地址.wxss"; 因为项目需要, 小程序中需要使用iconfont , 很容易就想到了H5的 ...
- [转] JAVA从本机获取IP地址
[From] https://www.cnblogs.com/xiaoBlog2016/p/7076230.html 论述: 此篇博客是在工作的时候,需要获得当前网络下面正确的ip地址,在网上查阅很多 ...
- h5列表页的性能优化
//0.还原状态 caoke.loading=false $(".loadbtn").text("点击加载更多") //1 还没有任何数据的情况 if(data ...
- 多个模块使用python logging
链接:https://docs.python.org/2/howto/logging-cookbook.html#logging-cookbook 具体的使用方法,请参考如下代码: import lo ...
- jackson工具类有动态属性过虑功能
在业务应用中经常会有指定属性序列化json的需求,C#中这个功能很容易就可以解决:使用lambda重新构造一下匿名对象就可以了.一行代码搞定.java是这样解决的. public JsonMapper ...
- DP Intro - Tree DP
二叉苹果树 题目 有一棵苹果树,如果树枝有分叉,一定是分2叉(就是说没有只有1个儿子的结点) 这棵树共有N个结点(叶子点或者树枝分叉点),编号为1-N,树根编号一定是1. 我们用一根树枝两端连接的结点 ...
- 牛客网Java刷题知识点之内存溢出和内存泄漏的概念、区别、内存泄露产生原因、内存溢出产生原因、内存泄露解决方案、内存溢出解决方案
不多说,直接上干货! 福利 => 每天都推送 欢迎大家,关注微信扫码并加入我的4个微信公众号: 大数据躺过的坑 Java从入门到架构师 人工智能躺过的坑 ...
Public Member Functions inherited from