Documentation ¶
Overview ¶
Package objectbase 对象基类.
Index ¶
- type ObjectBase
- func (o *ObjectBase) GetProperty(pName string) string
- func (o *ObjectBase) GetType() xcc.XC_OBJECT_TYPE
- func (o *ObjectBase) GetTypeBase() xcc.XC_OBJECT_TYPE
- func (o *ObjectBase) GetTypeEx() xcc.XC_OBJECT_TYPE_EX
- func (o *ObjectBase) SetHandle(handle int) *ObjectBase
- func (o *ObjectBase) SetProperty(pName string, pValue string) bool
- func (o *ObjectBase) SetTypeEx(nType xcc.XC_OBJECT_TYPE_EX) *ObjectBase
- type UI
- type Widget
- func (w *Widget) EnableLayoutControl(bEnable bool) *Widget
- func (w *Widget) GetHWINDOW() int
- func (w *Widget) GetHWND() uintptr
- func (w *Widget) GetID() int32
- func (w *Widget) GetName() string
- func (w *Widget) GetParent() int
- func (w *Widget) GetParentEle() int
- func (w *Widget) GetUID() int32
- func (w *Widget) IsLayoutControl() bool
- func (w *Widget) IsShow() bool
- func (w *Widget) LayoutItem_EnableFloat(bFloat bool) *Widget
- func (w *Widget) LayoutItem_EnableSwap(bEnable bool) *Widget
- func (w *Widget) LayoutItem_EnableWrap(bWrap bool) *Widget
- func (w *Widget) LayoutItem_GetHeight(pType *xcc.Layout_Size_, pHeight *int32) *Widget
- func (w *Widget) LayoutItem_GetMargin(pMargin *xc.RECT) *Widget
- func (w *Widget) LayoutItem_GetWidth(pType *xcc.Layout_Size_, pWidth *int32) *Widget
- func (w *Widget) LayoutItem_SetAlign(nAlign xcc.Layout_Align_Axis_) *Widget
- func (w *Widget) LayoutItem_SetHeight(nType xcc.Layout_Size_, nHeight int32) *Widget
- func (w *Widget) LayoutItem_SetMargin(left, top, right, bottom int) *Widget
- func (w *Widget) LayoutItem_SetMinSize(width, height int) *Widget
- func (w *Widget) LayoutItem_SetPosition(left, top, right, bottom int) *Widget
- func (w *Widget) LayoutItem_SetWidth(nType xcc.Layout_Size_, nWidth int32) *Widget
- func (w *Widget) SetID(nID int32) *Widget
- func (w *Widget) SetName(pName string) *Widget
- func (w *Widget) SetUID(nUID int32) *Widget
- func (w *Widget) Show(bShow bool) *Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectBase ¶
type ObjectBase struct {
Handle int // 句柄.
}
ObjectBase 炫彩对象基类.
func (*ObjectBase) GetProperty ¶ added in v1.3.380
func (o *ObjectBase) GetProperty(pName string) string
炫彩_取属性, 获取对象属性, 返回属性值.
pName: 属性名.
func (*ObjectBase) GetType ¶
func (o *ObjectBase) GetType() xcc.XC_OBJECT_TYPE
炫彩对象_取类型, 获取对象最终类型, 返回对象类型: XC_.
func (*ObjectBase) GetTypeBase ¶
func (o *ObjectBase) GetTypeBase() xcc.XC_OBJECT_TYPE
炫彩对象_取基础类型, 获取对象的基础类型, 返回对象类型, 以下类型之一: XC_ERROR, XC_WINDOW, XC_ELE, XC_SHAPE, XC_ADAPTER.
func (*ObjectBase) GetTypeEx ¶
func (o *ObjectBase) GetTypeEx() xcc.XC_OBJECT_TYPE_EX
炫彩对象_取类型扩展, 获取对象扩展类型, 返回对象扩展类型: button_type_ , element_type_ , xc_ex_error.
func (*ObjectBase) SetProperty ¶ added in v1.3.380
func (o *ObjectBase) SetProperty(pName string, pValue string) bool
炫彩_置属性, 设置对象属性.
pName: 属性名.
pValue: 属性值.
func (*ObjectBase) SetTypeEx ¶ added in v1.3.12
func (o *ObjectBase) SetTypeEx(nType xcc.XC_OBJECT_TYPE_EX) *ObjectBase
炫彩对象_置类型扩展, 如果是按钮, 请使用按钮的增强接口 XBtn_SetTypeEx().
nType: 对象扩展类型: button_type_ , element_type_ , xc_ex_error.
type UI ¶
type UI struct {
ObjectBase
}
UI 可视对象.
func (*UI) EnableCSS ¶
EnableCSS 可视对象_启用CSS. 启用或禁用样式, 并且覆盖内嵌子元素属性, 例如: 滚动视图上的滚动条, 滚动条上的按钮.
@param bEnable 是否启用.
func (*UI) EnableCssEx ¶ added in v1.3.390
EnableCssEx 可视对象_启用CSS. 启用或禁用样式, 仅设置自身属性, 不包含内嵌子元素属性, 例如:滚动视图上的滚动条, 滚动条上的按钮
@param bEnable 是否启用.
func (*UI) GetStyle ¶
func (u *UI) GetStyle() xcc.XC_OBJECT_STYLE
GetStyle 可视对象_取样式, 获取UI对象样式.
@return xcc.XC_OBJECT_STYLE 返回: xcc.Button_Style_ , xcc.Element_Style_ , xcc.ListBox_Style_.
type Widget ¶
type Widget struct {
UI
}
窗口组件.
func (*Widget) LayoutItem_EnableSwap ¶
窗口组件_布局项_启用交换, 根据水平垂直布局变换, 交换属性(宽度,高度,最小宽度,最小高度).
bEnable: 是否启用.
func (*Widget) LayoutItem_GetHeight ¶
func (w *Widget) LayoutItem_GetHeight(pType *xcc.Layout_Size_, pHeight *int32) *Widget
窗口组件_布局项_取高度.
pType: 返回类型.
pHeight: 返回高度.
func (*Widget) LayoutItem_GetWidth ¶
func (w *Widget) LayoutItem_GetWidth(pType *xcc.Layout_Size_, pWidth *int32) *Widget
窗口组件_布局项_取宽度.
pType: 返回类型.
pWidth: 返回宽度.
func (*Widget) LayoutItem_SetAlign ¶
func (w *Widget) LayoutItem_SetAlign(nAlign xcc.Layout_Align_Axis_) *Widget
窗口组件_布局项_置对齐, 根据水平垂直轴变化对齐.
nAlign: 对齐方式: xcc.Layout_Align_Axis_.
func (*Widget) LayoutItem_SetHeight ¶
func (w *Widget) LayoutItem_SetHeight(nType xcc.Layout_Size_, nHeight int32) *Widget
窗口组件_布局项_置高度.
nType: 类型: xcc.Layout_Size_.
nHeight: 高度.
func (*Widget) LayoutItem_SetMargin ¶
窗口组件_布局项_置外间距.
func (*Widget) LayoutItem_SetMinSize ¶
窗口组件_布局项_置最小大小, 限制大小仅针对缩放有效(自动, 填充父, 比例, 百分比).
width: 最小宽度.
height: 最小高度.
func (*Widget) LayoutItem_SetPosition ¶
窗口组件_布局项_置位置, 相对位置, 值大于等于0有效.
left: 左边距离.
top: 上边距离.
right: 右边距离.
bottom: 下边距离.
func (*Widget) LayoutItem_SetWidth ¶
func (w *Widget) LayoutItem_SetWidth(nType xcc.Layout_Size_, nWidth int32) *Widget
窗口组件_布局项_置宽度.
nType: 类型: xcc.Layout_Size_.
nWidth: 宽度.