|
CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
列表控件 更多...
Public 成员函数 | |
| CListBoxUI () | |
| ~CListBoxUI () | |
| int | AddItem (const std::shared_ptr< CNodeData > &rawdata, const BeString &text_id) |
| int | InsertItem (int index, const std::shared_ptr< CNodeData > &rawdata, const BeString &text_id) |
| int | DeleteItem (int index) |
| void | SwapXY (bool is_horz, bool is_refresh=true) |
| 翻转XY。is_horz=TRUE,表示水平排列。默认垂直排列 | |
| void | TriggerActionItem (int index) |
| 触发第index选项的动作 | |
| void | Clear (BOOL is_refresh=TRUE) |
| 清除所有数据项。若bRefresh = TRUE,需要重绘。 | |
| void | DoRollBack () |
| 回滚到上一次选中项 | |
| CNodeData * | GetNodeData (int index) const |
| 获得数据值 | |
| BOOL | IsExist (LPCTSTR text, BOOL ignore_case=FALSE) |
| 是否已经存在 | |
| BOOL | IsInVisibleView (int index) const |
| 是否在可视区域内 | |
| bool | IsCheckedState (int index) |
| 检查子项是否被选中 | |
| BOOL | SetCheckedState (int index, SelectState state) |
| 让某一项勾选状态 | |
| int | GetClikedItemSel () const |
| 获得点击热点项 | |
| int | GetSelectedSel () const |
| 获得选中索引 | |
| void | SelectedItem (int index, BOOL no_trigger=FALSE) |
| 设置选择项 index<0 时会清空选择项 | |
| BOOL | SelectedItemByName (LPCTSTR name, BOOL no_trigger=FALSE) |
| 设置选择项,通过名字匹配 | |
| void | ShowMultiCheckBox (bool is_miltiple=false) |
| 是否可以多选 | |
| void | SetShowColCount (int col_count) |
| 设置列显示数目 | |
| int | GetShowColCount () const |
| 获得列显示总数 | |
| int | GetCounts () const |
| 获得项目总数 | |
| int | GetRowCounts () const |
| 获得数据行总数 | |
| void | SetItemFillColors (const GBrushArray &fill_item) |
| 设置背景填充颜色 | |
| CCheckBoxCell * | GetListBoxItem (int index) const |
| 获得项指针,通过索引 | |
| CCheckBoxCell * | GetListBoxItemByName (LPCTSTR name) const |
| 获得项指针,通过名称 | |
| void | SetCheckBoxImage (SelectState state, GImageIconInfo *img) |
| 设置复选框图案 | |
| void | SetEditCtrlUI (CControlUI *editor) |
| 设置编辑委托 | |
| void | SetItemInterval (int space_size) |
| 设置间隔和边距尺寸 | |
| int | GetItemInterval (BOOL display=TRUE) const |
| 获得间隔和边距尺寸 | |
| int | GetItemWidth (BOOL display=TRUE) const |
| 获得列宽和行高 | |
| void | SetItemWidth (int col_width) |
| 设置列宽度 | |
| int | GetItemHeight (BOOL display=TRUE) const |
| 获得行高 | |
| void | SetItemHeight (int row_height) |
| 设置行高 | |
| void | SetItemRoundRadius (RoundRectRadius &radius) |
| 设置单元格圆角信息 | |
| void | SetItemRoundSize (int rx, int ry) |
| 设置单元格圆角信息 | |
| void | SetItemAlign (UINT align) |
| 设置单元格在控件下水平的对齐方式 | |
| void | SetItemTextAlign (UINT align) |
| 设置单元格自身文本和图标的对齐方式 | |
| BeString | GetControlText () override |
| void | GetControlValueText (BasicStringBuffer &buffer) override |
| 获得控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作 | |
| void | SetControlValueText (const BeString &str) override |
| 设置控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作 | |
| void | OnCreate () override |
| 产生时间是窗口创建之后显示之前 | |
| void | OnControlSize () override |
| 控件尺寸改变时触发 | |
| void | OnSaveConfigSetting (XMLItem *node) override |
| 保存控件属性到全局配置文件 | |
| void | OnLoadConfigSetting (XMLItem *node) override |
| 加载控件属性 | |
| void | OnParseItemData (XMLItem *node) override |
| 解析xml文件对应的数据 | |
| BOOL | OnLButtonDown (WPARAM wp, LPARAM lp) override |
| BOOL | OnLButtonUp (WPARAM wp, LPARAM lp) override |
| BOOL | OnRButtonCliked (WPARAM wp, LPARAM lp) override |
| BOOL | OnMouseMove (WPARAM wp, LPARAM lp) override |
| BOOL | OnMouseLeave (WPARAM wp, LPARAM lp) override |
| BOOL | OnVSCrollBar (WPARAM wp, LPARAM lp) override |
| BOOL | OnKeyDown (WPARAM wp, LPARAM lp) override |
| 键盘消息 | |
| BOOL | OnMessageHandler (UINT message, WPARAM wp, LPARAM lp) override |
| 虚拟控件最终消息处理过程 | |
| BOOL | DoPaint (ISurface *surface, RECT *rect_update) override |
| 绘制前景 | |
| void | ShellAttribute (const BeString &str_name, const BeString &str_value) override |
| 命令控制和属性设置接口 | |
| void | GetRelationship (std::vector< BeString > &list) override |
| 获得类的继承关系 | |
| CControlUI * | HitTestControl (POINT pt) override |
| 根据位置得到最终的定位控件 | |
| int | LayoutAdaptWidth (int exp_height) override |
| 自适应宽度计算 | |
| int | LayoutAdaptHeight (int exp_width) override |
| 自适应高度计算 | |
| void | PrintToFile (FILE *fp, LPCSTR space_prefix=" ", int col_count=1) |
| Public 成员函数 继承自 BUI::CScrollAreaUI | |
| CScrollAreaUI () | |
| virtual | ~CScrollAreaUI () |
| void | SetWheelSpeed (UINT speed) |
| 设置滑动速度 | |
| void | SetBackIntervalColor (const std::vector< GColor > &color) |
| 设置背景网格间隔颜色表 | |
| void | ResetScrollBarRange () |
| 重置内置滚动条范围 | |
| void | ScrollJumpToView (RECT &rc) |
| 让rc处于可见范围内 | |
| void | ScrollJumpToControlUI (UINT bar_type, CControlUI *child) |
| 让child处于可见范围内 | |
| void | RefreshClientRect (RECT rc) |
| 刷新矩形区域 | |
| void | ScreenToClientPoint (POINT &pt) const |
| 屏幕坐标转换为客户坐标 | |
| void | SetScrollBarUISize (int size) |
| 设置内置滚动条尺寸大小 | |
| void | SetEmptyTipImage (GImageIconInfo *img) |
| 设置提示图标(内容为空时显示) | |
| void | SetEmptyTipText (const BeString &text) |
| 设置提示文本(内容为空时显示) | |
| CScrollBarUI * | GetScrollbarUI (UINT bar_type=SBF_HORZ) const |
| 获得内置滚动条控件对象 | |
| int | GetScrollbarPos (UINT bar_type=SBF_HORZ) const |
| 获得滚动条(bar_type)的位置 | |
| void | SetScrollbarPos (UINT bar_type, int pos) |
| 设置滚动条(bar_type)的位置 | |
| void | SetScrollbarRange (UINT bar_type, int pos_min, int pos_max) |
| 获得滚动条(bar_type)的范围 | |
| int | GetScrollbarRange (UINT bar_type=SBF_HORZ) const |
| 获得滚动条(bar_type)的范围最大值 | |
| int | GetScrollDistance (UINT bar_type=SBF_HORZ) const |
| 获得滚动条(bar_type)的距离=max-page. | |
| int | GetScrollbarPage (UINT bar_type=SBF_HORZ) const |
| 获得滚动条(bar_type)的页大小 | |
| void | GetScrollViewRect (RECT *rc) const |
| BOOL | IsScrollVaild (UINT bar_type=SBF_HORZ) const |
| 判断滚动条是否有效 | |
| void | SetScrollbarPosWithPercentage (UINT bar_type, int percent) |
| 根据百分比设置滚动条的位置 | |
| int | GetScrollbarPercentage (UINT bar_type=SBF_HORZ) const |
| 获得百分比位置 | |
| void | SetScrollbarPosEnd (UINT bar_type=SBF_HORZ) |
| 设置滚动条位置到最后 | |
| void | EnableScrollBarAutoHide (BOOL enable) |
| 开启(或禁用)内置滚动条在失去焦点时,自动隐藏。默认禁用状态 | |
| void | ForbidScrollBar (UINT bar_type, BOOL is_forbid) |
| 强制禁用(或开启)滚动条。默认开启状态 | |
| void | SetScrollbarAlign (UINT bar_type, AlignType align_type) |
| 设置内置滚动条的对齐方式 | |
| void | UpdateScrollBarPostion (RECT *rc) |
| 根据对齐方式在指定矩形区域内,重新计算内置滚动条的显示坐标 | |
| void | DoPaintEmptyTips (ISurface *surface, RECT &rc_paint, RECT *rect_update) |
| 绘制空内容时的提示信息 | |
| void | OnCreate () override |
| void | OnControlSize () override |
| 控件尺寸改变时触发 | |
| void | GetLayoutViewRect (RECT *rc) override |
| void | OnParseItemData (XMLItem *node) override |
| 解析xml文件对应的数据 | |
| BOOL | OnMessageHandler (UINT message, WPARAM wp, LPARAM lp) override |
| 虚拟控件最终消息处理过程 | |
| BOOL | OnMouseWheel (WPARAM wp, LPARAM lp) override |
| 鼠标滑轮消息 | |
| BOOL | OnMouseEnter (WPARAM wp, LPARAM lp) override |
| 在鼠标进入控件时触发 | |
| BOOL | OnMouseLeave (WPARAM wp, LPARAM lp) override |
| BOOL | OnHSCrollBar (WPARAM wp, LPARAM lp) override |
| BOOL | OnVSCrollBar (WPARAM wp, LPARAM lp) override |
| void | CloneAttribute (CControlUI *clone) override |
| 克隆属性 | |
| void | ShellAttribute (const BeString &str_name, const BeString &str_value) override |
| 命令控制和属性设置接口 | |
| void | GetAttributeNames (std::vector< BeString > &out_vec) override |
| void | GetRelationship (std::vector< BeString > &list) override |
| 获得类的继承关系 | |
| Public 成员函数 继承自 BUI::CControlUI | |
| CControlUI () | |
| virtual | ~CControlUI () |
| BOOL | Create (IManageHandler *manager, LPCTSTR name, LPCTSTR text, DWORD style, RECT rc, CControlUI *parent=NULL, UINT id=0) |
| 创建虚拟控件:创建过程中,会将控件加入到全局的垃圾管理机制中。用于在程序退出时,释放内存 | |
| BOOL | Create (IManageHandler *manager, LPCTSTR name, LPCTSTR text, DWORD style, int x, int y, int cx, int cy, CControlUI *parent=NULL, UINT num_id=0) |
| void | InsertChild (CControlUI *current, CControlUI *prev) |
| 插入子控件 | |
| BOOL | RemoveChild (CControlUI *child) |
| 删除子控件 | |
| IManageHandler * | GetManagerUI () const |
| 返回管理器对象 | |
| BOOL | SendParentMessage (UINT message, WPARAM wp, LPARAM lp) const |
| BOOL | SendToManager (UINT message, WPARAM wp=0, LPARAM lp=0) |
| void | SendToAllChilds (UINT message, WPARAM wp, LPARAM lp) |
| 将消息传递给每一个子控件响应 | |
| void | SetEventHandler (IEventHandler *hander) |
| 设置事件处理对象 | |
| IEventHandler * | EventHandler () const |
| 获得事件处理对象 | |
| void | SetParent (CControlUI *parent) |
| 设置父控件 | |
| CControlUI * | Parent () const |
| 父控件 | |
| CControlUI * | FirstChild () const |
| 第一个孩子节点 | |
| CControlUI * | LastChild () const |
| 最后的孩子节点 | |
| CControlUI * | NextSibling () const |
| 下一个兄弟节点 | |
| CControlUI * | PrevSibling () const |
| 上一个兄弟节点 | |
| void | AddAnimate (const BeString &id, std::shared_ptr< GAnimateProperty > animate) |
| 添加动画 | |
| void | PauseAnimate (BOOL is_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 |
| POINT | GetViewPoint (float xp, float yp, BOOL is_client=FALSE) const |
| 获得控件内的绝对位置坐标 | |
| RECT | GetViewParentRect (float cx, float cy, float w, float h) const |
| 获得父控件内的位置坐标 | |
| POINT | GetParentViewPoint (float xp, float yp, BOOL is_client=FALSE) const |
| 获得父控件内的绝对位置坐标 | |
| void | SetControlNotes (const BeString &str) |
| 设置控件注释信息 | |
| BeString | GetControlNotes () const |
| 获得控件的注释信息 | |
| LPCTSTR | Text () const |
| 获得文本 | |
| void | SetControlText (BeString str, BOOL is_refresh=FALSE) |
| 设置文本 | |
| void | SetAdaptMinText (const BeString &str) |
| 布局最小适应文本 | |
| void | SetControlTextByNumber (double value, int precision, BOOL remoe_last_zero) |
| 以数值设置文本 | |
| double | GetControlTextNumber () const |
| 获得文本表示的数值 | |
| void | SetVarName (const BeString &str) |
| 设置控件唯一标识符 | |
| void | SetVarNameA (const char *var_name) |
| 设置控件唯一标识符 | |
| 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 | SetShadowText (int dx, int dy, int blur_x, int blur_y, const GColor &color) |
| 设置文本阴影 | |
| void | SetRoundRadiusValues (const CNumberValue radius[8]) |
| 设置矩形圆角 | |
| 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 height) |
| 设置字体大小 | |
| 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 out_png) |
| 保存控件图像为png | |
| int | SaveAsLongImage (LPCTSTR out_png) |
| 保存为长图 | |
| void | BindAction (const std::shared_ptr< IActionNotify > ¬ify) |
| 绑定事件 | |
| void | ClearAction () |
| 清空事件 | |
| void | TriggerAction () |
| 触发事件 | |
| ActionTable & | GetActionTable () |
| 获得鼠标事件映射表 | |
| void | TriggerScript () |
| 执行脚本事件 | |
| ActionKeyboardMap * | GetActionKeyboard (BOOL is_create=TRUE) |
| 获得键盘事件表 | |
| void | SetCaptureCtl () |
| 捕获鼠标 | |
| void | ReleaseCaptureCtl () |
| 释放焦点捕获 | |
| void | ChangeUIToNodeLink () |
| 将控件控制权,交给Node节点控制 | |
| 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 text=NULL) |
| 提示框显示位置 x, y 是相对窗口 | |
| void | TipHide () |
| 隐藏提示框 | |
| void | ShowControl (bool is_show, bool notify_layout=true) |
| 显示虚拟窗口 | |
| void | SetVisibleWhenMouseHover (BOOL open) |
| 设置只在鼠标悬停时,显示控件 | |
| BOOL | IsVisible () const |
| 控件在父控件中的显示状态 | |
| BOOL | IsFocused () const |
| 焦点状态 | |
| void | EnableControl (bool is_enable, bool is_refresh=true) |
| TRUE:启用控件. FALSE:禁用控件 | |
| void | EnableNodeFlagControl (bool is_enable, bool is_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 is_enable) |
| 开启(或禁用)快捷键 | |
| void | SetShortCut (int virtual_key) |
| void | SetShortCutCtrlCode (UBYTE virtual_key) |
| BOOL | DoShortCut (UBYTE ctrl, UBYTE virtual_key) |
| void | EnableBorderAdjustFlag (UINT align_border=ALIGN_LEFT, bool is_enable=true) |
| 设置边框调整使能 | |
| void | SetToolTipText (LPCTSTR tip_text) |
| 设置提示文本 | |
| void | SetToolTipText (const BeString &tip_str) |
| 设置提示文本 | |
| void | SetPopTipUI (const std::shared_ptr< PopControlInfo > &pop_info) |
| 设置弹出pop显示ui | |
| void | AutoAdaptSize () |
| 自动计算自适应大小 | |
| void | PopupPosition (int x, int y, int dx, int dy, UINT align) |
| void | PopTipUI (BOOL is_show) |
| 展示pop状态 | |
| BOOL | HitTestPopUI (POINT pt) |
| 是否命中弹出控件 | |
| void | GetRectInScreen (LPRECT rc) |
| 获得在HWND中的绝对位置 | |
| void | SetControlMouseCursor (CursorMouse id) |
| 设置控件的鼠标光标 | |
| void | SetFocus () |
| 取得焦点 和HWND焦点不要混淆 ,这是不一样的东西,只是函数名称我为了好记住 | |
| void | Scroll (int x, int y) |
| 视区的坐标原点偏移 | |
| void | Refresh (BOOL is_sync=FALSE) |
| 窗口失效重绘 | |
| void | RefreshThreadSafe () |
| 在gui线程之外时调安全的刷新函数 | |
| void | RefreshRect (RECT *rc_update) |
| 窗口失效重绘 | |
| void | GetDragPos (RECT *rc) const |
| 窗口拖拽的原始位置 | |
| void | OnDestory () |
| 控件销毁 | |
| void | UpdateAdaptLayout () const |
| 更新adapt布局 | |
| BOOL | MoveControl (RECT rect, BOOL is_refresh=TRUE) |
| 移动控件到目标矩形区域 | |
| BOOL | MoveControl (int x, int y, int w, int h, BOOL is_refresh=TRUE) |
| 移动控件位置。(x,y)代表父控件坐标空间值 | |
| void | MoveDragControl (int dx, int dy, BOOL is_refresh=TRUE) |
| 拖拽移动。(dx,dy)移动距离向量 | |
| void | MoveCenterByPercent (RECT *rc_view, float scale_x=0.5, float scale_y=0.5, int w=0, int h=0, BOOL adapt_dpi=FALSE, BOOL is_refresh=TRUE) |
| 将控件移动到以(scale_x, scale_y)百分比的中心点 | |
| void | MoveControlAnimate (RECT rc_start, RECT rc_end, BOOL is_show, int animate_duration=300) |
| 以动画模式移动 | |
| void | PopupAtMousePosition (int dx, int dy, int w, int h, BOOL adapt_dpi=FALSE, BOOL is_refresh=TRUE) |
| 在鼠标位置出弹出控件 | |
| void | ResetLayoutChilds (UINT flags=0) |
| 重置子布局 | |
| void | SetSkinModule (const BeString &skin_group) |
| 设置皮肤id | |
| void | SetSkinStyle (const BeString &skin_name) |
| 设置皮肤id | |
| void | SetDrawStyleWithFourCode (LPCTSTR draw_style) |
| 设置控件绘制的风格样式,同一种控件的表现样式可以有多种。 输入值只有前四位字符有效。一个控件表现形式在实际中不会很多。不用整形的目的是增强可读性 | |
| BOOL | IsDrawStyleWithFourCode (TCHAR a='\0', TCHAR b='\0', TCHAR c='\0', TCHAR d='\0') const |
| 判断是否匹配四字符数 | |
| void | GetSkinModule (BeStringShort64 &module_name) |
| void | GetSkinStyle (BeStringShort64 &style_name) |
| RECT | GetMarginAreaRect (BOOL contain_shadow=FALSE) const |
| 获得外边距下的相对于窗口的矩形区域 | |
| RECT | GetControlRect () const |
| 获得控件在窗口坐标下的矩形区域 | |
| RECT | GetControlClientRect () const |
| 返回基于客户区的坐标 | |
| RECT | GetControlScreenRect () const |
| 返回基于屏幕的坐标 | |
| RECT | GetOppositePosition (RECT rc_contain, RECT rc_child, BOOL is_intersect=TRUE) const |
| 返回rc_child相对rc_contain坐标系的位置 | |
| SIZE | GetStringSize (LPCTSTR str) const |
| 获得字符串尺寸 | |
| ILayout * | GetAttchLayout () const |
| 获得管理控件自身的布局对象 | |
| ShowStatus | GetPaintStatus (bool ignore_left_button=true) const |
| 获得控件状态 | |
| POINT | GetClientPoint (double percent_width, double percent_height) |
| 获得控件坐标系下百分比的绝对位置 | |
| CControlUI * | FindTabFocusControl (BOOL is_next) const |
| 获得接下来的焦点控件 | |
| void | NotifyMangerIsDestory () |
| 告知管理者已销毁 | |
| ST_Policy * | GetSignalPolicy () |
| 信号和槽机制的回收器 | |
| BOOL | TranslateSyncMsg (UINT message, WPARAM wp, LPARAM lp) |
| 向上层转发同步消息 | |
| int | FindChildControlByHandler (std::vector< CControlUI * > &vec, IEventHandler *handler) |
| 查找(通过控件的SetEventHandler()指定的事件处理对象来寻找) | |
| int | FindAllControlByName (std::vector< CControlUI * > &vec, LPCTSTR str_name, BOOL is_recursion=TRUE) const |
| 在当前控件之下查找所有同名控件 | |
| int | FindAllControl (std::vector< CControlUI * > &vec, BOOL is_recursion=TRUE) const |
| 获得所有子控件 | |
| CControlUI * | FindControlByName (LPCTSTR str_name, BOOL is_recursion=TRUE) const |
| 在当前控件之下查找控件 | |
| CControlUI * | GetParent () const |
| 获得父窗口 | |
| CControlUI * | GetParentOnTopMost () const |
| 获得最顶层父窗口 | |
| CControlUI * | HitTestChildControl (POINT pt, BOOL is_recursive=TRUE) const |
| 定位到子控件对象 | |
| CControlUI * | NextFocusControl (BOOL is_prev=FALSE) const |
| 下一个焦点控件 | |
| void | SaveSettingConfig () |
| 保存配置 | |
| BOOL | OnPaintControl (ISurface *surface, LPRECT rc_update=NULL, LPRECT rc_parent_view=NULL) |
| 控件渲染 | |
| float | BackOpacity () const |
| 背景透明度 | |
| float | BorderOpacity () const |
| 轮廓边框透明度 | |
| virtual POINT | ViewOrigin () const |
| 坐标原点偏移量 | |
| virtual BOOL | HitTest (POINT pt) |
| 点击测试 | |
| virtual ILayout * | BoxLayoutMgr () |
| 容器布局对象 | |
| virtual void | Activate () |
| 激活 | |
| virtual CControlUI * | Clone () |
| 克隆对象 | |
| virtual void | ChangeThemeColors () |
| 切换主题色 | |
| BOOL | ShellAttributeToChildControl (const BeString &child_name, const BeString &str_name, const BeString &str_value) |
| virtual void | OnParseAnimate (XMLItem *node) |
| 解析控件动画对象 | |
| virtual void | OnFontChange () |
| 字体更改 | |
| virtual void | OnShow (bool is_show) |
| 控件可见性发生变化时触发 | |
| virtual void | OnCtrlKillFocus () |
| ui控件失去焦点 | |
| virtual void | OnCtrlSetFocus () |
| ui控件获得焦点 | |
| virtual BOOL | OnKillFocus (WPARAM wp, LPARAM lp) |
| 当管理的句柄HWND失去焦点时 进入此函数,也就是此函数实际上是窗口 MSG_WND_KILLFOCUS的响应 | |
| virtual BOOL | OnSetCursor (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnNcHitTest (POINT pt) |
| virtual BOOL | OnLButtonCliked (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnRButtonDown (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnRButtonUp (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnKeyUp (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnChar (WPARAM wp, LPARAM lp) |
| virtual BOOL | OnTimerEvent (unsigned int timer_id, UINT msec) |
| 定时器事件响应 | |
| virtual BOOL | DoPaintShadow (ISurface *surface, bool is_inset, RECT *rect_update) |
| virtual BOOL | OnPaintControl3D (ISurface *surface, LPRECT rc_update) |
| virtual BOOL | DoPaintBackGround (ISurface *surface, RECT *rect_update) |
| 绘制背景 | |
| virtual BOOL | DoPaintBorder (ISurface *surface, RECT *rect_update) |
| 绘制边框 | |
| virtual BOOL | DoPaintFinished (ISurface *surface, RECT *rect_update) |
| 绘制结束事件,极少场景需要用到 | |
| virtual BOOL | DoPaintGL (ISurface *surface, RECT *rect_update) |
| 绘制GL | |
| virtual BOOL | OnDropBegin () |
| 鼠标拖拽开始 | |
| virtual BOOL | OnDropEnd () |
| 鼠标拖拽结束 | |
| 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, LayoutMode mw, LayoutMode mh) |
| void | ChangeManager (IManageHandler *manager) |
| 改变控件的管理对象(将抽象控件改变实际窗口的作用域)。 | |
| void | DoChangeThemeColors (const BeString &name) |
| 主题应用 | |
| Public 成员函数 继承自 BUI::ICommitTarget | |
| ICommitTarget () | |
| virtual | ~ICommitTarget () |
| virtual void | OnSummitTarget (FourCode four_code, LPCTSTR data) |
| 对象之间传递数据的提交操作 | |
| Public 成员函数 继承自 BUI::IControlUI | |
| IControlUI () | |
| virtual | ~IControlUI () |
| Public 成员函数 继承自 BUI::IEventHandler | |
| IEventHandler () | |
| virtual | ~IEventHandler () |
Protected 成员函数 | |
| void | DrawRowBackIntervalFill (ISurface *surface, int begin_row, int end_row, RECT *rect_update) |
| void | MoveItem (int step) |
| void | OnReLayout () |
| int | HitTestRowItem (POINT pt) |
| void | RefillListItem (CCheckBoxCell *item) |
| bool | GetShowIndexRange (int *pItem, int *piCount) const |
| void | RefreshChangeItem (int before, int cur) |
| int | GetPaddingLeftOrTop () const |
| int | GetNodeIndexWithName (LPCTSTR name) const |
| void | DoCommitText () |
| Protected 成员函数 继承自 BUI::CScrollAreaUI | |
| void | ShowChildScrollBar (BOOL show) |
| UINT | GetScrollStateCode () const |
| Protected 成员函数 继承自 BUI::CControlUI | |
| void | UpdateMarginStateFlag () |
| 更新margin状态标志位 | |
| BOOL | SetMouseCursor (CursorMouse id) |
| 设置系统光标 | |
| void | ClientToHWNDScreen () |
| 将控件坐标转换为窗口下的坐标 | |
| void | RePlotChildPos () |
| void | AdjustLayoutControlSize (POINT pt) |
| 用户调整控件大小 | |
| void | NotifyChildControlEnableChange (bool is_enable) |
| 父控件被禁用时,同步更新子控件禁用状态 | |
| void | NotifyChildControlVisableChange (bool is_show) |
| 父控件被隐藏时,同步更新子控件隐藏状态 | |
列表控件
| BUI::CListBoxUI::CListBoxUI | ( | ) |
| BUI::CListBoxUI::~CListBoxUI | ( | ) |
| int BUI::CListBoxUI::AddItem | ( | const std::shared_ptr< CNodeData > & | rawdata, |
| const BeString & | text_id ) |
| int BUI::CListBoxUI::DeleteItem | ( | int | index | ) |
|
protected |
绘制前景
重载 BUI::CControlUI .
| void BUI::CListBoxUI::DoRollBack | ( | ) |
回滚到上一次选中项
|
protected |
| int BUI::CListBoxUI::GetClikedItemSel | ( | ) | const |
获得点击热点项
|
overridevirtual |
重载 BUI::CControlUI .
|
overridevirtual |
获得控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作
重载 BUI::CControlUI .
| int BUI::CListBoxUI::GetCounts | ( | ) | const |
获得项目总数
| CCheckBoxCell * BUI::CListBoxUI::GetListBoxItem | ( | int | index | ) | const |
获得项指针,通过索引
| CCheckBoxCell * BUI::CListBoxUI::GetListBoxItemByName | ( | LPCTSTR | name | ) | const |
获得项指针,通过名称
| CNodeData * BUI::CListBoxUI::GetNodeData | ( | int | index | ) | const |
获得数据值
|
protected |
|
protected |
|
overridevirtual |
获得类的继承关系
重载 BUI::CControlUI .
| int BUI::CListBoxUI::GetRowCounts | ( | ) | const |
获得数据行总数
| int BUI::CListBoxUI::GetSelectedSel | ( | ) | const |
获得选中索引
| int BUI::CListBoxUI::GetShowColCount | ( | ) | const |
获得列显示总数
|
protected |
|
overridevirtual |
根据位置得到最终的定位控件
重载 BUI::CControlUI .
|
protected |
| int BUI::CListBoxUI::InsertItem | ( | int | index, |
| const std::shared_ptr< CNodeData > & | rawdata, | ||
| const BeString & | text_id ) |
| bool BUI::CListBoxUI::IsCheckedState | ( | int | index | ) |
检查子项是否被选中
| BOOL BUI::CListBoxUI::IsInVisibleView | ( | int | index | ) | const |
是否在可视区域内
|
overridevirtual |
自适应高度计算
重载 BUI::CControlUI .
|
overridevirtual |
自适应宽度计算
重载 BUI::CControlUI .
|
protected |
|
overridevirtual |
控件尺寸改变时触发
重载 BUI::CControlUI .
|
overridevirtual |
产生时间是窗口创建之后显示之前
重载 BUI::CControlUI .
键盘消息
重载 BUI::CControlUI .
重载 BUI::CControlUI .
重载 BUI::CControlUI .
|
overridevirtual |
加载控件属性
重载 BUI::CControlUI .
虚拟控件最终消息处理过程
重载 BUI::CControlUI .
重载 BUI::CControlUI .
重载 BUI::CControlUI .
|
overridevirtual |
解析xml文件对应的数据
重载 BUI::CControlUI .
重载 BUI::CControlUI .
|
protected |
|
overridevirtual |
保存控件属性到全局配置文件
重载 BUI::CControlUI .
重载 BUI::CControlUI .
| void BUI::CListBoxUI::PrintToFile | ( | FILE * | fp, |
| LPCSTR | space_prefix = " ", | ||
| int | col_count = 1 ) |
|
protected |
|
protected |
| void BUI::CListBoxUI::SetCheckBoxImage | ( | SelectState | state, |
| GImageIconInfo * | img ) |
设置复选框图案
| BOOL BUI::CListBoxUI::SetCheckedState | ( | int | index, |
| SelectState | state ) |
让某一项勾选状态
|
overridevirtual |
设置控件所表达的数据的文本,比如复选框的状态("0"/"1"),方便上层统一操作
重载 BUI::CControlUI .
| void BUI::CListBoxUI::SetEditCtrlUI | ( | CControlUI * | editor | ) |
设置编辑委托
| void BUI::CListBoxUI::SetItemAlign | ( | UINT | align | ) |
设置单元格在控件下水平的对齐方式
| void BUI::CListBoxUI::SetItemFillColors | ( | const GBrushArray & | fill_item | ) |
设置背景填充颜色
| void BUI::CListBoxUI::SetItemHeight | ( | int | row_height | ) |
设置行高
| void BUI::CListBoxUI::SetItemInterval | ( | int | space_size | ) |
设置间隔和边距尺寸
| void BUI::CListBoxUI::SetItemRoundRadius | ( | RoundRectRadius & | radius | ) |
设置单元格圆角信息
| void BUI::CListBoxUI::SetItemRoundSize | ( | int | rx, |
| int | ry ) |
设置单元格圆角信息
| void BUI::CListBoxUI::SetItemTextAlign | ( | UINT | align | ) |
设置单元格自身文本和图标的对齐方式
| void BUI::CListBoxUI::SetItemWidth | ( | int | col_width | ) |
设置列宽度
| void BUI::CListBoxUI::SetShowColCount | ( | int | col_count | ) |
设置列显示数目
| col_count:若col_count<=0,表示自动以宽度自适应 |
|
overridevirtual |
命令控制和属性设置接口
| szName属性 | szText语法格式 |
|---|---|
| text 设置控件文本 | text="按钮" |
| note 设置控件注释信息 | note="这是一个用于控制XXX的按钮" |
| fill 背景颜色 | fill="normal:0x343434;light:rgb(20,20,20,255);selected:hsv(25,100,100,255);disable:#343434" |
| fill-text 文本颜色 | fill-text="normal:0x343434;light:rgb(20,20,20,255);selected:hsv(25,100,100,255);disable:#343434" |
| stroke 边框颜色 | stroke="normal:0x343434;light:rgb(20,20,20,255);selected:hsv(25,100,100,255);disable:#343434" |
| stroke-size 边框画笔大小 | stroke-size="2" |
| border-radius 控件圆角(和CSS格式一致) | border-radius="10" |
| border-radius="rx:10;ry:10" | |
| font 设置字体 | font="name" |
| blur-size 高斯模糊尺寸 | blur-size="30" |
| border-show 边框显示属性 | 取值 never:不显示, always:显示, highlight:鼠标悬停时显示, focus:控件获得焦点时显示 |
| back-show 背景显示属性 | 取值 never:不显示, always:显示, highlight:鼠标悬停时显示, focus:控件获得焦点时显示 |
| shadow 阴影特效 | shadow="dx,dy,blur_x,blur_y,spread_x,spread_y,colo,inset" shadow="3,3, 2,2, 0,0, rgb(0,0,0,100),inset;3,3, 2,2, 0,0,rgb(0,0,0,100),inset" |
| visible 可见性 | 取值 true/false |
| enable 可用性/禁用状态 | 取值 true/false |
| tooltip 提示文本 | tooltip="这是一段鼠标悬停时的提示文本内容" |
| num_id 控件整数ID | num_id="101" |
| skin-id 皮肤唯一标识符,查找皮肤时的关键key | skin-id="skin_white" |
| cursor 光标 | 取值:arrow,ibeam,hand,wait,cross,uparrow,size,icon,sizenwse,sizenesw,sizewe,sizens,sizeall,no |
| accesskey 响应快捷键 | accesskey="ctrl+B" |
| refresh 刷新控件 | true/false |
| margin-hot 热点时的边缘膨胀尺寸 | margin="2,2,2,2" 左上右下的顺序 |
| control-flags 功能标志位 | "-"前缀代表删除属性 如 control-flags="AllowFocusWhenClick,-SupportTabKey" |
| StaticState :静态控件,不响应键盘和鼠标 | |
| AllowFocusWhenClick :用户单击时可控件获取焦点 | |
| AllowCaptureMouseWhenClick :用户左键时,捕获鼠标 | |
| SupportTabKey :支持tab获得焦点 | |
| AutoSeatLayout :自动占位布局 | |
| ShowMarginOnCaptureMouse :鼠标悬停时,显示边缘膨胀特效 | |
| ShowMarginOnFocus :获得焦点时,显示边缘膨胀特效 | |
| RoundRadiusDrawLine :控件圆角 | |
| RoundRadiusParl: 控件Parl四边形 | |
| HideWndWhenClick :单击时隐藏窗口 | |
| forcelayout:控件尺寸变化时,强制重新计算布局位置 | |
| use-par-color-fg : 控件前景颜色,使用父控件的 | |
| use-par-color-border : 控件边框颜色,使用父控件的 | |
| use-par-color-text : 控件文本颜色,使用父控件的 | |
| DisableTheme :禁用主题颜色 | |
| ZOverSpeedup :控件多到影响性能时启用 启用后会用算法计算控件的遮盖信息,快速定位 | |
| StorageUserSetting :自动存储控件内容到全局配置文件 | |
| FixedOnView : 控件坐标原点改变时,此控件固定不变 | |
| OnlyMoveInParent : 仅在父控件视窗下移动 | |
| TopMostWhenClick : 点击容器或者容器内的子控件时,将自己置顶。 | |
| datafile 数据文件 | datafile="文件路径" |
重载 BUI::CControlUI .
| void BUI::CListBoxUI::ShowMultiCheckBox | ( | bool | is_miltiple = false | ) |
是否可以多选
| void BUI::CListBoxUI::SwapXY | ( | bool | is_horz, |
| bool | is_refresh = true ) |
翻转XY。is_horz=TRUE,表示水平排列。默认垂直排列
| void BUI::CListBoxUI::TriggerActionItem | ( | int | index | ) |
触发第index选项的动作