CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
表格控件 更多...
Public 成员函数 | |
CTableViewUI () | |
~CTableViewUI () | |
TableRow * | InsertRow (int nRow, LPCTSTR szRowData=NULL) |
插入文本数据 | |
TableRow * | InsertRow (int nRow, BeString szRowData) |
同上 | |
TableRow * | AppendRow (LPCTSTR szRowData=NULL) |
末尾插入文本数据 | |
TableRow * | AppendRow (BeString szRowData) |
末尾插入文本数据 | |
TableRow * | GetRow (int nRow) const |
获得表格行对象 | |
TableRow * | FindRowPositionByUserData (LPCTSTR szdata) const |
根据行用户数据,得到行的位置 | |
BOOL | RemoveRows (int nRows, int count=1) |
删除表格行 | |
BOOL | RemoveSelectRows (BOOL bRefresh=TRUE) |
删除选中行 | |
void | Clear (BOOL bErase=TRUE) |
清空所有行数据 | |
CNodeSpanCell * | GetCellItem (int nRow, int nCol) const |
获得单元格容器节点 | |
CNodeData * | GetCellNodeData (int nRow, int nCol, BOOL create=FALSE) |
获得单元格数据对象 | |
void | SetCellNumber (int nRow, int nCol, double value, int precision=3, bool remove_float_zero=true) |
设置单元格数值 | |
void | SetCellString (int nRow, int nCol, const BeString &str) |
设置单元格文本 | |
double | GetCellNumber (int nRow, int nCol) |
获得单元格数值 | |
BeString | GetCellString (int nRow, int nCol) |
获得单元格文本 | |
void | MoveColValueByCircle (int col, int dx) |
void | SetTransposition (bool transposition) |
设置行列转置 | |
void | SetItemRoundRadius (RoundRectRadius &radius) |
设置高亮背景圆角矩形尺寸 | |
void | SetItemRoundSize (int rx, int ry) |
设置高亮背景圆角矩形尺寸 | |
void | SetStartingOfSerialNumber (int begin) |
void | SetPageSize (unsigned size) |
设置分页尺寸 | |
void | SetPageCurSel (int sel) |
设置当前页 | |
void | EnableMultPage (bool bSup) |
设置分页功能可用性 | |
BOOL | IsSupportMultPage () const |
分页功能是否可用 | |
int | GetPageCounts () const |
分页数量 | |
int | HitTestCol (int x, int y) |
命中测试列序号 | |
int | RowCounts () const |
行总数 | |
int | VisableRowCount () const |
可见行总数 | |
int | GetRowsIndexWithName (LPCTSTR name) const |
通过名称id查找行,并返回行序号 | |
void | SetCurSel (int row, int count, BOOL bRefresh=TRUE) |
设置当前选中行 | |
int | GetSelectRowIndex (int row_begin=0) const |
从row_begin开始检索,并返回第一个选中行索引 | |
void | ShowNumText (bool bShow) |
显示行号 | |
void | ShowMultiCheckBox (bool bShow) |
显示多选框 | |
void | CheckBox (int nRow, SelectState state) |
设置行选择状态 | |
void | CheckBoxAll (bool bCheck, BOOL bErase=TRUE) |
设置所有行的选择框状态为bCheck | |
void | SelectAll (bool bSlted, BOOL bErase=TRUE) |
设置所有行的选中状态为bSlted | |
void | VisableAll (bool bShow, BOOL bErase=TRUE) |
设置所有行的显示状态为bShow | |
void | SetVisibleResultList (std::vector< int > &rs) |
设定可现实行的索引列表 | |
void | ClearVisibleResultList () |
恢复原状 | |
BOOL | JumpViewRow (int index, BOOL bTop) |
滚动到指定索引行 | |
int | GetRowHeight (BOOL display=TRUE) const |
数据行高度 | |
void | SetRowHeight (int h) |
设置行高度 | |
BOOL | IsInVisibleView (int pos) const |
是否在可视区域内 | |
UINT | GridLineStyle () const |
获得网格线风格PenType | |
void | SetGridLineStyle (UINT nStyle) |
设置网格线风格PenType | |
void | ShowEditor (int nRow, int nCol, BOOL bRefresh=FALSE) |
显示单元格(nRow,nCol)的内容编辑器 | |
void | HideEditor (int nCol) |
隐藏内容编辑器 | |
void | PrintToFile (FILE *fp, LPCSTR space_prefix=" ") |
打印数据信息 | |
void | SaveDataToStringWithXml (XMLItem *node) |
保存表格数据到xml格式的node节点,该格式和ui文件中的数据初始化格式相同 | |
void | OnClickHeader (POINT pt) |
表头点击事件回调虚函数 | |
void | SortColumn () |
void | DrawAllCheckBox (ISurface *pSurface, RECT *lpUpdate, const GColor &color) |
BOOL | DoPaintNumCtrl (ISurface *pSurface, RECT *lpUpdate) |
void | GetCheckedRows (BOOL bChecked, std::vector< TableRow * > &outlist) const |
void | GetSelectedRows (BOOL bSelected, std::vector< TableRow * > &outlist) const |
void | ChangeThemeColors () override |
切换主题色 | |
void | OnControlSize () override |
控件尺寸改变时触发 | |
void | OnChangeHeaderColWidth () override |
void | OnDbClickCell (int nRow, int nCol) |
void | OnInsertColumn (int ncol, int sum) override |
void | OnDeleteColumn (int ncol, int sum) override |
void | OnSortColum (int ncol, OrderByType ordertype, DataType sortType, BOOL bNoCase) override |
void | OnPaintMovingColum (int ncol, int dx, ISurface *pSurface, RECT *lpUpdate) override |
void | OnParseItemData (XMLItem *pNode) override |
解析xml文件对应的数据 | |
void | ShellAttribute (const BeString &szName, const BeString &szText) override |
命令控制和属性设置接口 | |
BOOL | OnMessageHandler (UINT message, WPARAM wParam, LPARAM lParam) override |
BOOL | OnMouseMove (WPARAM wParam, LPARAM lParam) override |
BOOL | OnMouseLeave (WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonDown (WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonUp (WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonCliked (WPARAM wParam, LPARAM lParam) override |
BOOL | OnKeyDown (WPARAM wParam, LPARAM lParam) override |
键盘消息 | |
BOOL | OnKeyUp (WPARAM wParam, LPARAM lParam) override |
BOOL | OnChar (WPARAM wParam, LPARAM lParam) override |
BOOL | DoPaint (ISurface *pSurface, RECT *lpUpdate) override |
绘制前景 | |
CControlUI * | HitTestControl (POINT pt) override |
根据位置得到最终的定位控件 | |
int | LayoutAdaptWidth (int expH) override |
自适应宽度计算 | |
int | LayoutAdaptHeight (int expW) override |
自适应高度计算 | |
void | OnReLayout () override |
![]() | |
CContainTitleUI () | |
~CContainTitleUI () | |
GColor | GridLineColor () const |
BOOL | IsFixColum (int col) const |
int | SetColumFilterList (std::vector< int > &rs) |
设定可现实行的索引列表 | |
void | ClearColumFilterList () |
恢复原状 | |
PenType | GetGridLineStyle () const |
获得网格线风格 PenType | |
void | SetGridLineStyle (PenType penStyle) |
设置网格线风格 PenType | |
void | SetMovingColor (GColor cr) |
设置移动列的背景色 | |
void | SetGridFillMode (GridFillMode fillmode) |
设置网格填充风格,行填充,列填充,单元格填充. GridFillMode | |
void | SetLeadWidth (int nWidth) |
设置容器左侧边宽度 | |
int | GetLeadWidth (BOOL display=TRUE) const |
获得序号显示区域的前导宽度 | |
int | GetColumWidthSum () const |
获得标题栏的总宽度 | |
int | TitleHeight (BOOL display=TRUE) const |
标题高度 | |
void | SetTitleHeight (int h) |
设置标题高度 | |
void | SetFixColCount (int c) |
设置前缀固定行数量 | |
UINT | TextAlign (UINT nCol) const |
获得列文本对齐方式 | |
int | GetColWidth (UINT nCol) const |
获得列宽 | |
UINT | GetRowScrollBarTypeID () const |
获得行增长方向的滚动条类别。当表格行列转置时,用来分别滚动条行为 | |
UINT | GetColScrollBarTypeID () const |
获得列增长方向的滚动条类别。当表格行列转置时,用来分别滚动条行为 | |
int | GetColumPos (int col) const |
获得数据排序后的真实索引 | |
TableHeaderNodeCell * | GetColumn (int ncol) const |
获得标题栏单元格对象 | |
void | SwapTitleColum (int c1, int c2) |
交换列 | |
void | MoveColumPos (int col, int ins_col) |
移动列到ins_col位置 | |
void | SetTitleFont (GFont *font) |
设置标题栏字体 | |
BOOL | GetColumCellXBound (int col, int &x1, int &x2) const |
获得指定列的左右边界 | |
int | ColumnCount () const |
获得实际标题栏列总数 | |
int | VisableColumnCount () const |
获得可见标题栏列总数 | |
void | ClearColumn (BOOL bErase=TRUE) |
清空所有列 | |
void | RemoveColum (UINT nCol) |
删除指定列, nCol表示一级表头 | |
int | SetColumns (std::vector< std::shared_ptr< TableHeaderNodeCell > > &titlelist) |
int | InsertColumn (int nCol, std::shared_ptr< TableHeaderNodeCell > titleCell) |
int | AppendColumn (std::shared_ptr< TableHeaderNodeCell > titleCell) |
int | FindColumnIndexByName (BeString &name) const |
根据名称id查询列号 | |
int | GetColumnIndexByName (LPCTSTR szID) const |
根据名称获得索引 | |
void | SetColumnName (int nCol, LPCTSTR szID) |
设置列字符ID | |
void | SetColWidth (UINT nCol, SizeValue value) |
设置列宽 | |
void | SetEditorUI (std::shared_ptr< CControlUI > pEditor) |
设置全局的输入编辑控件 | |
void | SetColumEditorUI (int nCol, std::shared_ptr< CControlUI > pEditor) |
设置列编辑ui | |
BOOL | JumpViewCol (int index, BOOL bLeft) |
移动滚动条到指定列。 | |
virtual void | OnReLayout () |
virtual void | OnChangeHeaderColWidth () |
virtual void | OnInsertColumn (int ncol, int sum) |
virtual void | OnDeleteColumn (int ncol, int sum) |
virtual void | OnSortColum (int ncol, OrderByType ordertype, DataType sortType, BOOL bNoCase) |
virtual void | OnPaintMovingColum (int ncol, int dx, ISurface *pSurface, RECT *lpUpdate) |
void | ChangeThemeColors () override |
切换主题色 | |
void | ShellAttribute (const BeString &szName, const BeString &szText) override |
命令控制和属性设置接口 | |
void | OnParseItemData (XMLItem *pNode) override |
解析xml文件对应的数据 | |
void | OnControlSize () override |
控件尺寸改变时触发 | |
BOOL | OnNcHitTest (POINT pt) override |
BOOL | OnMessageHandler (UINT message, WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonDown (WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonUp (WPARAM wParam, LPARAM lParam) override |
BOOL | OnLButtonCliked (WPARAM wParam, LPARAM lParam) override |
BOOL | OnMouseMove (WPARAM wParam, LPARAM lParam) override |
BOOL | OnMouseLeave (WPARAM wParam, LPARAM lParam) override |
BOOL | DoPaint (ISurface *pSurface, RECT *lpUpdate) override |
绘制前景 | |
int | LayoutAdaptWidth (int expH) override |
自适应宽度计算 | |
CControlUI * | HitTestControl (POINT pt) override |
根据位置得到最终的定位控件 | |
![]() | |
CScrollAreaUI () | |
virtual | ~CScrollAreaUI () |
void | SetWheelSpeed (UINT speed) |
设置滑动速度 | |
void | SetBackIntervalColor (std::vector< GColor > &colors) |
设置背景网格间隔颜色表 | |
void | ResetScrollBarRange () |
重置内置滚动条范围 | |
void | ScrollJumpToView (RECT &rc) |
让rc处于可见范围内 | |
void | ScrollJumpToControlUI (UINT nBar, CControlUI *child) |
让child处于可见范围内 | |
void | RefreshClientRect (RECT rc) |
刷新矩形区域 | |
void | ScreenToClientPoint (POINT &pt) const |
屏幕坐标转换为客户坐标 | |
void | SetScrollBarUISize (int size) |
设置内置滚动条尺寸大小 | |
void | SetEmptyTipImage (GImageIconInfo *img) |
设置提示图标(内容为空时显示) | |
void | SetEmptyTipText (BeString text) |
设置提示文本(内容为空时显示) | |
CScrollBarUI * | GetScrollbarUI (UINT nBar=SBF_HORZ) const |
获得内置滚动条控件对象 | |
int | GetScrollbarPos (UINT nBar=SBF_HORZ) const |
获得滚动条(nBar)的位置 | |
void | SetScrollbarPos (UINT nBar, int pos) |
设置滚动条(nBar)的位置 | |
void | SetScrollbarRange (UINT nBar, int nMin, int nMax) |
获得滚动条(nBar)的范围 | |
int | GetScrollbarRange (UINT nBar=SBF_HORZ) const |
获得滚动条(nBar)的范围最大值 | |
int | GetScrollDistance (UINT nBar=SBF_HORZ) const |
获得滚动条(nBar)的距离=max-page. | |
int | GetScrollbarPage (UINT nBar=SBF_HORZ) const |
获得滚动条(nBar)的页大小 | |
BOOL | IsScrollVaild (UINT nBar=SBF_HORZ) const |
判断滚动条是否有效 | |
void | SetScrollbarPosWithPercentage (UINT nBar, int percent) |
根据百分比设置滚动条的位置 | |
int | GetScrollbarPercentage (UINT nBar=SBF_HORZ) const |
获得百分比位置 | |
void | SetScrollbarPosEnd (UINT nBar=SBF_HORZ) |
设置滚动条位置到最后 | |
void | EnableScrollBarAutoHide (BOOL enable) |
开启(或禁用)内置滚动条在失去焦点时,自动隐藏。默认禁用状态 | |
void | ForbidScrollBar (UINT nBar, BOOL bBan) |
强制禁用(或开启)滚动条。默认开启状态 | |
void | SetScrollbarAlign (UINT nBar, AlignmentStyle uAlign) |
设置内置滚动条的对齐方式 | |
void | UpdateScrollBarPostion (RECT *lpRect) |
根据对齐方式在指定矩形区域内,重新计算内置滚动条的显示坐标 | |
void | DoPaintEmptyTips (ISurface *pSurface, RECT &rcPaint, RECT *lpUpdate) |
绘制空内容时的提示信息 | |
void | OnCreate () override |
void | OnControlSize () override |
控件尺寸改变时触发 | |
void | GetLayoutViewRect (RECT *rc) override |
void | ChangeThemeColors () override |
切换主题色 | |
void | OnParseItemData (XMLItem *pNode) override |
解析xml文件对应的数据 | |
BOOL | OnMessageHandler (UINT message, WPARAM wParam, LPARAM lParam) override |
虚拟控件最终消息处理过程 | |
BOOL | OnMouseWheel (WPARAM wParam, LPARAM lParam) override |
鼠标滑轮消息 | |
BOOL | OnMouseEnter (WPARAM wParam, LPARAM lParam) override |
在鼠标进入控件时触发 | |
BOOL | OnMouseLeave (WPARAM wParam, LPARAM lParam) override |
BOOL | OnHSCrollBar (WPARAM wParam, LPARAM lParam) override |
BOOL | OnVSCrollBar (WPARAM wParam, LPARAM lParam) override |
void | CloneAttribute (CControlUI *clone) override |
克隆属性 | |
void | ShellAttribute (const BeString &szName, const BeString &szText) override |
命令控制和属性设置接口 | |
![]() | |
CControlUI () | |
virtual | ~CControlUI () |
BOOL | Create (IManageHandler *pManger, LPCTSTR strObjName, LPCTSTR strText, DWORD style, RECT rc, CControlUI *parent=NULL, UINT nID=0) |
创建虚拟控件:创建过程中,会将控件加入到全局的垃圾管理机制中。用于在程序退出时,释放内存 | |
BOOL | Create (IManageHandler *pManger, LPCTSTR strObjName, LPCTSTR strText, DWORD style, int x, int y, int cx, int cy, CControlUI *pPar=NULL, UINT nID=0) |
void | InsertChild (CControlUI *pNewChild, CControlUI *pPrev) |
插入子控件 | |
BOOL | RemoveChild (CControlUI *pChild) |
删除子控件 | |
IManageHandler * | GetManagerUI () const |
返回管理器对象 | |
BOOL | SendParentMessage (UINT message, WPARAM wParam, LPARAM lParam) const |
BOOL | SendToManager (UINT message, WPARAM wParam=0, LPARAM lParam=0) |
void | SendToAllChilds (UINT message, WPARAM wParam, LPARAM lParam) |
将消息传递给每一个子控件响应 | |
void | SetEventHandler (IEventHandler *hander) |
设置消息托管 | |
void | SetParent (CControlUI *pParent) |
设置父控件 | |
CControlUI * | Parent () const |
父控件 | |
CControlUI * | FirstChild () const |
第一个孩子节点 | |
CControlUI * | LastChild () const |
最后的孩子节点 | |
CControlUI * | NextSibling () const |
下一个兄弟节点 | |
CControlUI * | PrevSibling () const |
上一个兄弟节点 | |
CControlUI * | DelegaterPrev () const |
托管链表前向指针 | |
CControlUI * | DelegaterNext () const |
托管链表后向指针 | |
void | AddAnimate (const BeString &id, std::shared_ptr< GAnimateProperty > animate) |
添加动画 | |
void | PauseAnimate (BOOL pause) |
动画使能:暂停(TRUE)或开启(FALSE) | |
GAnimateTransformVector & | AnimateTransform () |
获得动画数组 | |
void | ModifyControlFlags (uint64_t style, UINT op=ADD_FLAGS) |
设置控件风格 | |
uint64_t | IsHasControlFlags (uint64_t flags) const |
uint64_t | GetControlFlags () const |
void | SetControlNotes (BeString str) |
设置控件注释信息 | |
BeString | GetControlNotes () const |
获得控件的注释信息 | |
LPCTSTR | Text () const |
获得文本 | |
void | SetControlText (BeString str, BOOL bRefresh=FALSE) |
设置文本 | |
void | SetAdaptMinText (BeString str) |
布局最小适应文本 | |
void | SetControlTextByNumber (double value, int nPrecision, BOOL remoe_last_zero) |
以数值设置文本 | |
double | GetControlTextNumber () const |
获得文本表示的数值 | |
void | SetVarName (const BeString &str) |
设置控件唯一标识符 | |
void | SetVarNameA (const char *varname) |
设置控件唯一标识符 | |
void | SetVarNameW (const WCHAR *varname) |
设置控件唯一标识符 | |
void | SetCommitTarget (ICommitTarget *obj) |
设置数据提交对象 | |
void | AddAbsordLayout (std::shared_ptr< ILayout > layout) |
添加悬浮布局 | |
void | DelAbsordLayout (std::shared_ptr< ILayout > layout) |
删除悬浮布局 | |
void | SetBlurSize (UINT size) |
设置高斯模糊尺寸 | |
UINT | BlurSize () const |
返回高斯模糊尺寸 | |
GBrushArray | GetControlColorsStyle (ColorSceneType type) |
获取颜色外观 | |
void | SetControlColorsStyle (ColorSceneType type, GBrushArray colors) |
设置颜色外观 | |
void | SetAttributeSaveNode (XMLItem *node) |
设置属性保存节点 | |
XMLItem * | GetAttributeSaveNode () const |
获得属性保存节点 | |
void | DoSaveAttributeToNode () |
保存控件属性到(SetSaveNode(node))注册的节点 | |
void | SetShadowText (int dx, int dy, int blur_x, int blur_y, GColor color) |
设置文本阴影 | |
void | SetBorderRoundFlags (int pos, int flags) |
void | SetBorderRoundSize (RoundRectRadius &radius) |
void | GetRoundRadius (RoundRectRadius &ra) const |
void | GetRoundRadiusWithRect (const RECT &rc, RoundRectRadius &ra) const |
GShadowContain & | GetShadowContain () |
获得阴影容器对象 | |
GFont * | GetFont () const |
获得字体 | |
void | SetFont (GFont *font) |
设置字体 | |
void | SetFontSize (int nHeight) |
设置字体大小 | |
void | SetStrokeSize (UINT size) |
设置轮廓线宽 | |
void | SetPositionX (int x) |
设置控件x坐标 | |
void | SetPositionY (int y) |
设置控件y坐标 | |
void | SetPositionXY (int x, int y) |
设置控件(x,y)坐标 | |
int | Width () const |
获得控件宽度 | |
void | SetWidth (int w) |
设置控件宽度 | |
int | Height () const |
获得控件高度 | |
void | SetHeight (int h) |
设置控件高度 | |
int | SaveAsImage (LPCTSTR outpng) |
保存控件图像为png | |
int | SaveAsLongImage (LPCTSTR outpng) |
保存为长图 | |
void | BindAction (std::shared_ptr< IActionNotify > notify) |
绑定事件 | |
void | ClearAction () |
清空事件 | |
void | TriggerAction () |
触发事件 | |
ActionKeyboardMap * | GetActionKeyboard (BOOL is_create=TRUE) |
获得键盘事件表 | |
void | SetCaptureCtl () |
捕获鼠标 | |
void | ReleaseCaptureCtl () |
释放焦点捕获 | |
void | BreakAwayUITree () |
脱离父控件树 | |
void | SetClipZoom (int x, int y, int w, int h) |
设置控件可视裁剪区域。约束控件的显示区域 | |
BOOL | BringBottomMost () |
将控件移动到所有兄弟控件中的第一个 | |
BOOL | BringTopMost () |
将控件移动到所有兄弟控件中的最后一个 | |
BOOL | TestOrder () const |
判断是否被其他控件遮盖 TRUE 代表遮盖 | |
void | TipTrack (int x, int y, LPCTSTR lpSz=NULL) |
提示框显示位置 x, y 是相对窗口 | |
void | TipHide () |
隐藏提示框 | |
void | ShowControl (bool bShow, bool notify_layout=true) |
显示虚拟窗口 | |
void | SetVisibleWhenMouseHover (BOOL open) |
设置只在鼠标悬停时,显示控件 | |
BOOL | IsVisible () const |
控件在父控件中的显示状态 | |
BOOL | IsFocused () const |
焦点状态 | |
void | EnableControl (bool bEnable, bool refresh=true) |
TRUE:启用控件. FALSE:禁用控件 | |
void | EnableNodeFlagControl (bool bEnable, bool refresh=true) |
nodedata包含的控件。表示node是否被禁用 | |
BOOL | IsEnabled () const |
判断是否可用。TRUE:代表可用 | |
BOOL | IsBkShowTiming () const |
void | SetBkShowTiming (ShowModel mode) |
背景绘制时机 | |
void | SetBorderShowTiming (ShowModel mode) |
边框绘制时机 | |
BOOL | IsCreateSucceed () const |
判断是否是有效控件 | |
BOOL | IsShortCutVaild () |
判断是否存在快捷键 | |
void | EnableShortCut (bool benable) |
开启(或禁用)快捷键 | |
void | SetShortCut (int vKey) |
void | SetShortCutCtrlCode (UBYTE vKey) |
BOOL | DoShortCut (UBYTE ctrl, UBYTE vKey) |
void | EnableBorderAdjustFlag (UINT alignborder=ALIGN_LEFT, bool bEnable=true) |
设置边框调整使能 | |
void | SetToolTipText (LPCTSTR lpszTip) |
设置提示文本 | |
void | SetToolTipText (BeString strTip) |
设置提示文本 | |
void | SetPopTipUI (std::shared_ptr< CControlUI > popui, std::shared_ptr< PopControlInfo > popinfo) |
设置弹出pop显示ui | |
void | PopTipUI (BOOL bShow) |
展示pop状态 | |
BOOL | HitTestPopUI (POINT pt) |
是否命中弹出控件 | |
void | GetRectInScreen (LPRECT lpRect) |
获得在HWND中的绝对位置 | |
void | SetControlMouseCursor (CursorMouse id) |
设置控件的鼠标光标 | |
void | SetFocus () |
取得焦点 和HWND焦点不要混淆 ,这是不一样的东西,只是函数名称我为了好记住 | |
void | Scroll (int x, int y) |
视区的坐标原点偏移 | |
void | Refresh (BOOL bSynch=FALSE) |
窗口失效重绘 | |
void | RefreshThreadSafe () |
在gui线程之外时调安全的刷新函数 | |
void | RefreshRect (RECT *lprcUpdate) |
窗口失效重绘 | |
void | GetDragPos (RECT *lprect) const |
窗口拖拽的原始位置 | |
void | OnDestory () |
控件销毁 | |
void | UpdateAdaptLayout () const |
更新adapt布局 | |
BOOL | MoveControl (RECT rect, BOOL bRepaint=TRUE) |
移动控件到目标矩形区域 | |
BOOL | MoveControl (int x, int y, int w, int h, BOOL bRepaint=TRUE) |
移动控件位置。(x,y)代表父控件坐标空间值 | |
void | MoveDragControl (int dx, int dy, BOOL bRepaint=TRUE) |
拖拽移动。(dx,dy)移动距离向量 | |
void | MoveCenterByPercent (RECT *rcView, float xScale=0.5, float yScale=0.5, int w=0, int h=0, BOOL adapt_dpi=FALSE, BOOL bRepaint=TRUE) |
将控件移动到以(xScale, yScale)百分比的中心点 | |
void | ResetLayoutChilds (UINT flags=0) |
重置子布局 | |
void | SetSkinModule (BeString &skinGroup) |
设置皮肤id | |
void | SetSkinStyle (BeString &skinName) |
设置皮肤id | |
void | SetDrawStyleWithFourCode (LPCTSTR draw_style) |
设置控件绘制的风格样式,同一种控件的表现样式可以有多种。 输入值只有前四位字符有效。一个控件表现形式在实际中不会很多。不用整形的目的是增强可读性 | |
BOOL | IsDrawStyleWithFourCode (TCHAR a='\0', TCHAR b='\0', TCHAR c='\0', TCHAR d='\0') const |
判断是否匹配四字符数 | |
void | GetSkinModule (BeStringShort64 &moduleName) |
void | GetSkinStyle (BeStringShort64 &styleName) |
RECT | GetMarginAreaRect (BOOL contain_shadow=FALSE) const |
获得外边距下的相对于窗口的矩形区域 | |
RECT | GetControlRect () const |
获得控件在窗口坐标下的矩形区域 | |
RECT | GetControlClientRect () const |
返回基于客户区的坐标 | |
RECT | GetControlScreenRect () const |
返回基于屏幕的坐标 | |
RECT | GetOppositePosition (RECT rcContainer, RECT rcChild) const |
返回rcChild相对rcrcContainer坐标系的位置 | |
SIZE | GetStringSize (LPCTSTR str) const |
获得字符串尺寸 | |
POINT | ViewOrigin () const |
坐标原点偏移量 | |
ILayout * | GetAttchLayout () const |
获得管理控件自身的布局对象 | |
ShowStatus | GetPaintStatus (bool ignoreLButton=true) const |
获得控件状态 | |
POINT | GetClientPoint (double w_percent, double h_percent) |
获得控件坐标系下百分比的绝对位置 | |
void | InsertGCChain (CControlUI *prev, CControlUI *next) |
void | DeleteGCChain (CControlUI *prev, CControlUI *next) |
CControlUI * | FindTabFocusControl (BOOL isNext) const |
获得接下来的焦点控件 | |
void | NotifyMangerIsDestory () |
告知管理者已销毁 | |
ST_Policy * | GetSignalPolicy () |
信号和槽机制的回收器 | |
BOOL | TranslateSyncMsg (UINT message, WPARAM wParam, LPARAM lParam) |
向上层转发同步消息 | |
BOOL | OnMessageHandler (UINT message, WPARAM wParam, LPARAM lParam) override |
虚拟控件最终消息处理过程 | |
int | FindChildControlByHandler (std::vector< CControlUI * > &vec, IEventHandler *handler) |
查找(通过控件的SetEventHandler()指定的事件处理对象来寻找) | |
int | FindAllControlByName (std::vector< CControlUI * > &vec, LPCTSTR szName, BOOL isRecursiveCall=TRUE) const |
在当前控件之下查找所有同名控件 | |
int | FindAllControl (std::vector< CControlUI * > &vec, BOOL isRecursiveCall=TRUE) const |
获得所有子控件 | |
CControlUI * | FindControlByName (LPCTSTR szName, BOOL isRecursiveCall=TRUE) const |
在当前控件之下查找控件 | |
CControlUI * | GetParent () const |
获得父窗口 | |
CControlUI * | GetParentOnTopMost () const |
获得最顶层父窗口 | |
CControlUI * | HitTestChildControl (POINT pt) const |
定位到子控件对象 | |
CControlUI * | NextFocusControl (BOOL isPrev=FALSE) const |
下一个焦点控件 | |
void | SaveSettingConfig () |
保存配置 | |
BOOL | OnPaintControl (ISurface *pSurface, LPRECT lprcUpdate=NULL, LPRECT lprcParentViewPort=NULL) |
控件渲染 | |
float | BackOpacity () const |
背景透明度 | |
float | BorderOpacity () const |
轮廓边框透明度 | |
virtual CControlUI * | HitTestControl (POINT pt) |
根据位置得到最终的定位控件 | |
virtual BOOL | HitTest (POINT pt) |
点击测试 | |
virtual void | GetLayoutViewRect (RECT *rc) |
virtual BeString | GetControlText () |
virtual void | GetControlValueText (BasicStringBuffer &buffer) |
获得控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作 | |
virtual void | SetControlValueText (const BeString &str) |
设置控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作 | |
virtual ILayout * | BoxLayoutMgr () |
容器布局对象 | |
virtual void | Activate () |
激活 | |
virtual CControlUI * | Clone () |
克隆对象 | |
virtual void | ChangeThemeColors () |
切换主题色 | |
virtual void | ShellAttribute (const BeString &szName, const BeString &szText) |
命令控制和属性设置接口 | |
BOOL | ShellAttributeToChildControl (const BeString &childname, const BeString &szName, const BeString &szText) |
virtual void | OnParseItemData (XMLItem *pNode) |
解析xml文件对应的数据 | |
virtual void | OnParseAnimate (XMLItem *pNode) |
解析控件动画对象 | |
virtual void | OnSaveConfigSetting (XMLItem *node) |
保存控件属性到全局配置文件 | |
virtual void | OnLoadConfigSetting (XMLItem *node) |
加载控件属性 | |
virtual void | OnCreate () |
产生时间是窗口创建之后显示之前 | |
virtual void | OnFontChange () |
字体更改 | |
virtual void | OnControlSize () |
控件尺寸改变时触发 | |
virtual void | OnShow (bool bShow) |
控件可见性发生变化时触发 | |
virtual void | OnCtrlKillFocus () |
ui控件失去焦点 | |
virtual void | OnCtrlSetFocus () |
ui控件获得焦点 | |
virtual BOOL | OnKillFocus (WPARAM wParam, LPARAM lParam) |
当管理的句柄HWND失去焦点时 进入此函数,也就是此函数实际上是窗口 MSG_WND_KILLFOCUS的响应 | |
virtual BOOL | OnHSCrollBar (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnVSCrollBar (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnSetCursor (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnNcHitTest (POINT pt) |
virtual BOOL | OnMouseMove (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnMouseEnter (WPARAM wParam, LPARAM lParam) |
在鼠标进入控件时触发 | |
virtual BOOL | OnMouseLeave (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnMouseWheel (WPARAM wParam, LPARAM lParam) |
鼠标滑轮消息 | |
virtual BOOL | OnLButtonDown (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnLButtonUp (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnLButtonCliked (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnRButtonDown (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnRButtonUp (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnRButtonCliked (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnKeyDown (WPARAM wParam, LPARAM lParam) |
键盘消息 | |
virtual BOOL | OnKeyUp (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnChar (WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnTimerEvent (unsigned int timerid, UINT umsec) |
定时器事件响应 | |
virtual BOOL | DoPaintShadow (ISurface *pSurface, bool inset, RECT *lpUpdate) |
virtual BOOL | OnPaintControl3D (ISurface *pSurface, LPRECT lprcUpdate) |
virtual BOOL | DoPaintBackGround (ISurface *pSurface, RECT *lpUpdate) |
绘制背景 | |
virtual BOOL | DoPaint (ISurface *pSurface, RECT *lpUpdate) |
绘制前景 | |
virtual BOOL | DoPaintBorder (ISurface *pSurface, RECT *lpUpdate) |
绘制边框 | |
virtual BOOL | DoPaintFinished (ISurface *pSurface, RECT *lpUpdate) |
绘制结束事件,极少场景需要用到 | |
virtual BOOL | DoPaintGL (ISurface *pSurface, RECT *lpUpdate) |
绘制GL | |
virtual BOOL | OnDropBegin () |
鼠标拖拽开始 | |
virtual BOOL | OnDropEnd () |
鼠标拖拽结束 | |
virtual void | CloneAttribute (CControlUI *clone) |
克隆属性 | |
int | LayoutAdaptWidth (int expH) override |
自适应宽度计算 | |
int | LayoutAdaptHeight (int expW) override |
自适应高度计算 | |
int | GetSplitControlOffsetW () override |
获得拆分宽度偏移 | |
int | GetSplitControlOffsetH () override |
获得拆分高度偏移 | |
void | Layout (int x, int y, int w, int h, UINT flags) override |
bool | IsVisibleLayout () override |
布局可见性判断 | |
RECT | GetPosition () override |
获得布局矩形区域位置 | |
void | SetLauoutInfo (ILayout *parent, int w, int h, SizeMode stw, SizeMode sth) |
void | ChangeManager (IManageHandler *pMagr) |
改变控件的管理对象(将抽象控件改变实际窗口的作用域)。 | |
void | DoChangeThemeColors (const BeString &name) |
主题应用 | |
![]() | |
ICommitTarget () | |
virtual | ~ICommitTarget () |
virtual void | OnSummitTarget (FourCode four_code, LPCTSTR data) |
对象之间传递数据的提交操作 | |
![]() | |
IControlUI () | |
virtual | ~IControlUI () |
virtual int | LayoutAdaptWidth (int expH) |
自适应宽度计算 | |
virtual int | LayoutAdaptHeight (int expW) |
自适应高度计算 | |
virtual int | GetSplitControlOffsetW () |
获得拆分宽度偏移 | |
virtual int | GetSplitControlOffsetH () |
获得拆分高度偏移 | |
virtual void | Layout (int x, int y, int w, int h, UINT flags=0) |
virtual RECT | GetPosition () |
获得布局矩形区域位置 | |
virtual bool | IsVisibleLayout () |
布局可见性判断 | |
![]() | |
IEventHandler () | |
virtual | ~IEventHandler () |
virtual BOOL | OnMessageHandler (UINT message, WPARAM wp, LPARAM lp) |
![]() | |
CSortContainer () | |
~CSortContainer () | |
void | AppendSortData (SortData &data) |
void | DeleteSortData (int sort_i) |
void | ClearSortData () |
const SortData & | At (UINT i) const |
void | SetOrderType (OrderByType order) |
void | SetSortType (DataType dtype, BOOL nocase=FALSE) |
void | SetPauseStatus (BOOL bPause) |
DataType | GetSortDataType () const |
void | DoSort () |
表格控件
BUI::CTableViewUI::CTableViewUI | ( | ) |
BUI::CTableViewUI::~CTableViewUI | ( | ) |
|
overridevirtual |
切换主题色
重载 BUI::CContainTitleUI .
void BUI::CTableViewUI::CheckBox | ( | int | nRow, |
SelectState | state | ||
) |
设置行选择状态
void BUI::CTableViewUI::ClearVisibleResultList | ( | ) |
恢复原状
绘制前景
重载 BUI::CContainTitleUI .
void BUI::CTableViewUI::DrawAllCheckBox | ( | ISurface * | pSurface, |
RECT * | lpUpdate, | ||
const GColor & | color | ||
) |
void BUI::CTableViewUI::EnableMultPage | ( | bool | bSup | ) |
设置分页功能可用性
CNodeSpanCell * BUI::CTableViewUI::GetCellItem | ( | int | nRow, |
int | nCol | ||
) | const |
获得单元格容器节点
获得单元格数据对象
double BUI::CTableViewUI::GetCellNumber | ( | int | nRow, |
int | nCol | ||
) |
获得单元格数值
BeString BUI::CTableViewUI::GetCellString | ( | int | nRow, |
int | nCol | ||
) |
获得单元格文本
int BUI::CTableViewUI::GetPageCounts | ( | ) | const |
分页数量
TableRow * BUI::CTableViewUI::GetRow | ( | int | nRow | ) | const |
获得表格行对象
int BUI::CTableViewUI::GetRowsIndexWithName | ( | LPCTSTR | name | ) | const |
通过名称id查找行,并返回行序号
void BUI::CTableViewUI::GetSelectedRows | ( | BOOL | bSelected, |
std::vector< TableRow * > & | outlist | ||
) | const |
int BUI::CTableViewUI::GetSelectRowIndex | ( | int | row_begin = 0 | ) | const |
从row_begin开始检索,并返回第一个选中行索引
void BUI::CTableViewUI::HideEditor | ( | int | nCol | ) |
隐藏内容编辑器
int BUI::CTableViewUI::HitTestCol | ( | int | x, |
int | y | ||
) |
命中测试列序号
|
overridevirtual |
根据位置得到最终的定位控件
重载 BUI::CContainTitleUI .
插入文本数据
nRow | : 行序号 |
szRowData | : 文本数据 |
BOOL BUI::CTableViewUI::IsInVisibleView | ( | int | pos | ) | const |
是否在可视区域内
BOOL BUI::CTableViewUI::IsSupportMultPage | ( | ) | const |
分页功能是否可用
|
overridevirtual |
自适应高度计算
重载 BUI::CControlUI .
|
overridevirtual |
自适应宽度计算
重载 BUI::CContainTitleUI .
void BUI::CTableViewUI::MoveColValueByCircle | ( | int | col, |
int | dx | ||
) |
|
overridevirtual |
重载 BUI::CContainTitleUI .
重载 BUI::CControlUI .
void BUI::CTableViewUI::OnClickHeader | ( | POINT | pt | ) |
表头点击事件回调虚函数
|
overridevirtual |
控件尺寸改变时触发
重载 BUI::CContainTitleUI .
void BUI::CTableViewUI::OnDbClickCell | ( | int | nRow, |
int | nCol | ||
) |
|
overridevirtual |
重载 BUI::CContainTitleUI .
|
overridevirtual |
重载 BUI::CContainTitleUI .
键盘消息
重载 BUI::CControlUI .
重载 BUI::CControlUI .
重载 BUI::CContainTitleUI .
重载 BUI::CContainTitleUI .
重载 BUI::CContainTitleUI .
|
overridevirtual |
重载 BUI::CContainTitleUI .
重载 BUI::CContainTitleUI .
重载 BUI::CContainTitleUI .
|
overridevirtual |
重载 BUI::CContainTitleUI .
|
overridevirtual |
解析xml文件对应的数据
重载 BUI::CContainTitleUI .
|
overridevirtual |
重载 BUI::CContainTitleUI .
|
overridevirtual |
重载 BUI::CContainTitleUI .
void BUI::CTableViewUI::PrintToFile | ( | FILE * | fp, |
LPCSTR | space_prefix = " " |
||
) |
打印数据信息
BOOL BUI::CTableViewUI::RemoveRows | ( | int | nRows, |
int | count = 1 |
||
) |
删除表格行
nRows | 开始行序号 |
count | 数量 |
int BUI::CTableViewUI::RowCounts | ( | ) | const |
行总数
void BUI::CTableViewUI::SaveDataToStringWithXml | ( | XMLItem * | node | ) |
保存表格数据到xml格式的node节点,该格式和ui文件中的数据初始化格式相同
void BUI::CTableViewUI::SetCellNumber | ( | int | nRow, |
int | nCol, | ||
double | value, | ||
int | precision = 3 , |
||
bool | remove_float_zero = true |
||
) |
设置单元格数值
void BUI::CTableViewUI::SetCellString | ( | int | nRow, |
int | nCol, | ||
const BeString & | str | ||
) |
设置单元格文本
void BUI::CTableViewUI::SetItemRoundRadius | ( | RoundRectRadius & | radius | ) |
设置高亮背景圆角矩形尺寸
void BUI::CTableViewUI::SetItemRoundSize | ( | int | rx, |
int | ry | ||
) |
设置高亮背景圆角矩形尺寸
void BUI::CTableViewUI::SetPageCurSel | ( | int | sel | ) |
设置当前页
void BUI::CTableViewUI::SetPageSize | ( | unsigned | size | ) |
设置分页尺寸
void BUI::CTableViewUI::SetRowHeight | ( | int | h | ) |
设置行高度
void BUI::CTableViewUI::SetStartingOfSerialNumber | ( | int | begin | ) |
void BUI::CTableViewUI::SetTransposition | ( | bool | transposition | ) |
设置行列转置
void BUI::CTableViewUI::SetVisibleResultList | ( | std::vector< int > & | rs | ) |
设定可现实行的索引列表
|
overridevirtual |
命令控制和属性设置接口
szName属性 | szText语法格式 |
---|---|
limit-rows 可加载的最大行数,用于调试大文件 | |
rowHeight 行高 | rowHeight="25" |
clear-row 清空数据 | clear-row="" |
line-type-level 层级画笔风格 | solid, dot, dash, dash-dot, dash-dot-dot |
cursel 设置当前选中项 | cursel="行号" |
start-num 序号文本的开始编号 | start-num="5" 代表首行会显示为5 |
重载 BUI::CContainTitleUI .
显示单元格(nRow,nCol)的内容编辑器
void BUI::CTableViewUI::ShowMultiCheckBox | ( | bool | bShow | ) |
显示多选框
void BUI::CTableViewUI::ShowNumText | ( | bool | bShow | ) |
显示行号
void BUI::CTableViewUI::SortColumn | ( | ) |
int BUI::CTableViewUI::VisableRowCount | ( | ) | const |
可见行总数