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的更多相关文章
随机推荐
- 单选框radio总结(获取值、设置默认选中值、样式)
单选框 radio <div class="radio-inline"> <input type="radio" name="kil ...
- JavaWeb学习笔记(四)—— response
一.response概述 response是Servlet.service方法的一个参数,类型为javax.servlet.http.HttpServletResponse.在客户端发出每个请求时,服 ...
- cmd命令窗口相关操作指南
cmd命令窗口打开方式:win+R cmd 1.盘符切换 d: 回车 (d为磁盘名) 2.查看当前目录下的文件和文件夹 输入dir 3.进入指定目录(若需跨盘符操作,应先切换盘符) cd(空格)+绝对 ...
- windows使用putty工具 进行【复制】,【粘贴】操作
#复制# 按住鼠标左键,执行选择,放开左键时完成复制 #粘贴# 点击鼠标右键,执行粘贴
- 关于cin 与 cout 的加速
在用cin 与 cout 的时候 可以使用 ios::sync_with_stdio(); cin.tie(); cout.tie(); 这样在输入大数据的时候可以加快许多
- HDU - 1300 简单DP
题意:买珠子的方案有两种,要么单独买,价钱为该种类数量+10乘上相应价格,要么多个种类的数量相加再+10乘上相应最高贵的价格买 坑点:排序会WA,喵喵喵? 为什么连续取就是dp的可行方案?我猜的.. ...
- 剑指offer——面试题5:替换空格
利用STL: #include"iostream" #include"stdio.h" #include"algorithm" using ...
- pandas 多列排序
import pandas as pd df = pd.DataFrame({'AAA' : [1,2,1,3], 'BBB' : [1,1,2,2], 'CCC' : [2,1,3,1]}) sou ...
- 4~20mA转0~5V
RCV420是一种精密的I/V转换电路,也是目前最佳的4-20mA转换0-5V的电路方案,有商用级(0℃-70℃)和工业级(-25℃-+85℃)供你选购 301欧姆为精度1%. RCV420运行40m ...
- bind-named
main-book: http://www.zytrax.com/books/dns resolv.conf: http://dns-learning.twnic.net.tw/bind/intro4 ...
Public Member Functions inherited from