objectbase

package
v0.0.0-...-48d22b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package objectbase 对象基类.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectBase

type ObjectBase struct {
	Handle int // 句柄.
}

炫彩对象基类.

func (*ObjectBase) GetType

func (o *ObjectBase) GetType() xcc.XC_OBJECT_TYPE

炫彩对象_取类型, 获取对象最终类型, 返回对象类型: XC_.

func (*ObjectBase) GetTypeBase

func (o *ObjectBase) GetTypeBase() int

炫彩对象_取基础类型, 获取对象的基础类型, 返回对象类型, 以下类型之一: 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) SetHandle

func (o *ObjectBase) SetHandle(handle int)

给本类的Handle赋值.

func (*ObjectBase) SetTypeEx

func (o *ObjectBase) SetTypeEx(nType xcc.XC_OBJECT_TYPE_EX) int

炫彩对象_置类型扩展, 如果是按钮, 请使用按钮的增强接口 XBtn_SetTypeEx().

nType: 对象扩展类型: button_type_ , element_type_ , xc_ex_error.

type UI

type UI struct {
	ObjectBase
}

UI 可视对象.

func (*UI) EnableCSS

func (u *UI) EnableCSS(bEnable bool) int

EnableCSS 可视对象_启用CSS, 启用或禁用样式.

@param bEnable 是否启用.
@return int

func (*UI) GetCssName

func (u *UI) GetCssName() string

GetCssName 可视对象_取CSS名称, 获取CSS样式名称.

@return string

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_.

func (*UI) SetCssName

func (u *UI) SetCssName(pName string) int

SetCssName 可视对象_置CSS名称, 设置CSS[套用样式]名称.

@param pName 套用样式名称.
@return int

func (*UI) SetStyle

func (u *UI) SetStyle(nStyle xcc.XC_OBJECT_STYLE) int

SetStyle 可视对象_置样式, 设置UI对象样式.

@param nStyle xcc.XC_OBJECT_STYLE, 样式值: xcc.Button_Style_ , xcc.Element_Style_ , xcc.ListBox_Style_.
@return int

type Widget

type Widget struct {
	UI
}

窗口组件.

func (*Widget) EnableLayoutControl

func (w *Widget) EnableLayoutControl(bEnable bool) int

窗口组件_启用布局控制.

bEnable:.

func (*Widget) GetHWINDOW

func (w *Widget) GetHWINDOW() int

窗口组件_取HWINDOW.

func (*Widget) GetHWND

func (w *Widget) GetHWND() int

窗口组件_取HWND.

func (*Widget) GetID

func (w *Widget) GetID() int

窗口组件_取ID, 获取元素ID.

func (*Widget) GetName

func (w *Widget) GetName() string

窗口组件_取名称 获取元素name.

func (*Widget) GetParent

func (w *Widget) GetParent() int

窗口组件_取父对象, 获取父对象, 父可能是元素或窗口, 通过此函数可以检查是否有父.

func (*Widget) GetParentEle

func (w *Widget) GetParentEle() int

窗口组件_取父元素.

func (*Widget) GetUID

func (w *Widget) GetUID() int

窗口组件_取UID, 获取元素UID, 全局唯一标识符.

func (*Widget) IsLayoutControl

func (w *Widget) IsLayoutControl() bool

窗口组件_是否布局控制.

func (*Widget) IsShow

func (w *Widget) IsShow() bool

窗口组件_判断显示, 判断UI对象是否显示.

func (*Widget) LayoutItem_EnableFloat

func (w *Widget) LayoutItem_EnableFloat(bFloat bool) int

窗口组件_布局项_启用浮动, 向反方向对齐.

bFloat: 是否浮动.

func (*Widget) LayoutItem_EnableSwap

func (w *Widget) LayoutItem_EnableSwap(bEnable bool) int

窗口组件_布局项_启用交换, 根据水平垂直布局变换, 交换属性(宽度,高度,最小宽度,最小高度).

bEnable: 是否启用.

func (*Widget) LayoutItem_EnableWrap

func (w *Widget) LayoutItem_EnableWrap(bWrap bool) int

窗口组件_布局项_启用换行, 强制换行.

bWrap: 是否换行.

func (*Widget) LayoutItem_GetHeight

func (w *Widget) LayoutItem_GetHeight(pType, pHeight *int) int

窗口组件_布局项_取高度.

pType: 返回类型.

pHeight: 返回高度.

func (*Widget) LayoutItem_GetMargin

func (w *Widget) LayoutItem_GetMargin(pMargin *xc.RECT) int

窗口组件_布局项_置对齐.

pMargin: 接收返回.

func (*Widget) LayoutItem_GetWidth

func (w *Widget) LayoutItem_GetWidth(pType, pWidth *int) int

窗口组件_布局项_取宽度.

pType: 返回类型.

pWidth: 返回宽度.

func (*Widget) LayoutItem_SetAlign

func (w *Widget) LayoutItem_SetAlign(nAlign xcc.Layout_Align_Axis_) int

窗口组件_布局项_置对齐, 根据水平垂直轴变化对齐.

nAlign: 对齐方式: xcc.Layout_Align_Axis_.

func (*Widget) LayoutItem_SetHeight

func (w *Widget) LayoutItem_SetHeight(nType xcc.Layout_Size_, nHeight int) int

窗口组件_布局项_置高度.

nType: 类型: xcc.Layout_Size_.

nHeight: 高度.

func (*Widget) LayoutItem_SetMargin

func (w *Widget) LayoutItem_SetMargin(left, top, right, bottom int) int

窗口组件_布局项_置外间距.

func (*Widget) LayoutItem_SetMinSize

func (w *Widget) LayoutItem_SetMinSize(width, height int) int

窗口组件_布局项_置最小大小, 限制大小仅针对缩放有效(自动, 填充父, 比例, 百分比).

width: 最小宽度.

height: 最小高度.

func (*Widget) LayoutItem_SetPosition

func (w *Widget) LayoutItem_SetPosition(left, top, right, bottom int) int

窗口组件_布局项_置位置, 相对位置, 值大于等于0有效.

left: 左边距离.

top: 上边距离.

right: 右边距离.

bottom: 下边距离.

func (*Widget) LayoutItem_SetWidth

func (w *Widget) LayoutItem_SetWidth(nType xcc.Layout_Size_, nWidth int) int

窗口组件_布局项_置宽度.

nType: 类型: xcc.Layout_Size_.

nWidth: 宽度.

func (*Widget) SetID

func (w *Widget) SetID(nID int) int

窗口组件_置ID, 设置元素ID.

nID: ID值.

func (*Widget) SetName

func (w *Widget) SetName(pName string) int

窗口组件_置名称 设置元素name.

pName: name值.

func (*Widget) SetUID

func (w *Widget) SetUID(nUID int) int

窗口组件_置UID, 设置元素UID, 全局唯一标识符.

nUID: UID值.

func (*Widget) Show

func (w *Widget) Show(bShow bool) int

窗口组件_显示.

bShow: 是否显示.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL