shape

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shape

type Shape struct {
	HXCGUI_ int
}

func NewShape

func NewShape(hShape int) *Shape

形状_创建, 获取所在元素句柄 hShape: 形状对象句柄.

func (*Shape) AdjustLayout

func (s *Shape) AdjustLayout() int

形状_调整布局

func (*Shape) Destroy

func (s *Shape) Destroy() int

形状_销毁, 销毁形状对象

func (*Shape) GetContentSize

func (s *Shape) GetContentSize(pSize *xc.SIZE) int

形状_取内容大小 ,仅计算有效内容, 填充父, 权重依赖父级所以无法计算 pSize: 接收返回内容大小值.

func (*Shape) GetHWINDOW

func (s *Shape) GetHWINDOW() int

形状_取窗口句柄, 获取窗口句柄

func (*Shape) GetHeight

func (s *Shape) GetHeight() int

形状_取高度, 获取内容高度

func (*Shape) GetID

func (s *Shape) GetID() int

形状_取ID

func (*Shape) GetName

func (s *Shape) GetName() string

形状_取名称, 获取形状对象name

func (*Shape) GetParent

func (s *Shape) GetParent() int

形状_取父对象, 获取父对象, 父可能是元素或窗口, 返回父对象

func (*Shape) GetRect

func (s *Shape) GetRect(pRect *xc.RECT) int

形状_取坐标 pRect: 接收返回坐标.

func (*Shape) GetRectLogic

func (s *Shape) GetRectLogic(pRect *xc.RECT) int

形状_取逻辑坐标, 获取元素坐标, 逻辑坐标, 包含滚动视图偏移 pRect: 坐标.

func (*Shape) GetUID

func (s *Shape) GetUID() int

形状_取UID

func (*Shape) GetWidth

func (s *Shape) GetWidth() int

形状_取宽度, 获取内容宽度

func (*Shape) GetWndClientRect

func (s *Shape) GetWndClientRect(pRect *xc.RECT) int

形状_取基于窗口客户区坐标, 基于窗口客户区坐标 pRect: 坐标.

func (*Shape) GetZOrder

func (s *Shape) GetZOrder() int

形状_取Z序, 获取形状对象Z序, 成功返回索引值, 否则返回 XC_ID_ERROR

func (*Shape) Move

func (s *Shape) Move(x int, y int) int

形状_移动位置 x: x坐标 y: y坐标

func (*Shape) Redraw

func (s *Shape) Redraw() int

形状_重绘, 重绘形状对象

func (*Shape) RemoveShape

func (s *Shape) RemoveShape() int

形状_移除, 从父UI元素或窗口,和父布局对象中移除

func (*Shape) SetID

func (s *Shape) SetID(nID int) int

形状_置ID nID: ID值.

func (*Shape) SetName

func (s *Shape) SetName(pName string) int

形状_置名称, 设置形状对象name pName: name值

func (*Shape) SetRect

func (s *Shape) SetRect(pRect *xc.RECT) int

形状_置坐标 pRect: 坐标.

func (*Shape) SetRectLogic

func (s *Shape) SetRectLogic(pRect *xc.RECT, bRedraw bool) bool

形状_置逻辑坐标, 设置元素坐标, 逻辑坐标, 包含滚动视图偏移 pRect: 坐标. bRedraw: 是否重绘.

func (*Shape) SetUID

func (s *Shape) SetUID(nUID int) int

形状_置UID nUID: UID值.

func (*Shape) ShowLayout

func (s *Shape) ShowLayout(bShow bool) int

形状_显示布局边界, 是否显示布局边界. bShow: 是否显示.

type ShapeEllipse

type ShapeEllipse struct {
	Shape

	HXCGUI int
}

func NewShapeEllipse

func NewShapeEllipse(x int, y int, cx int, cy int, hParent int) *ShapeEllipse

形状圆_创建, 创建圆形形状对象, 返回句柄 x: X坐标. y: Y坐标. cx: 宽度. cy: 高度. hParent: 父对象句柄.

func (*ShapeEllipse) EnableBorder

func (s *ShapeEllipse) EnableBorder(bEnable bool) int

形状圆_启用边框, 启用绘制圆边框 bEnable: 是否启用.

func (*ShapeEllipse) EnableFill

func (s *ShapeEllipse) EnableFill(bEnable bool) int

形状圆_启用填充, 启用填充圆 bEnable: 是否启用.

func (*ShapeEllipse) SetBorderColor

func (s *ShapeEllipse) SetBorderColor(color int, alpha uint8) int

形状圆_置边框色 color: RGB颜色值. alpha: 透明度.

func (*ShapeEllipse) SetFillColor

func (s *ShapeEllipse) SetFillColor(color int, alpha uint8) int

形状圆_置填充色 color: RGB颜色值. alpha: 透明度.

type ShapeGif

type ShapeGif struct {
	Shape

	HXCGUI int
}

func NewShapeGif

func NewShapeGif(x int, y int, cx int, cy int, hParent int) *ShapeGif

形状GIF_创建, 创建形状对象GIF, 成功返回形状对象GIF句柄, 否则返回NULL x: X坐标. y: Y坐标. cx: 宽度. cy: 高度. hParent: 父对象句柄.

func (*ShapeGif) GetImage

func (s *ShapeGif) GetImage() int

形状GIF_取图片, 获取图片句柄

func (*ShapeGif) SetImage

func (s *ShapeGif) SetImage(hImage int) int

形状GIF_置图片, 设置GIF图片 hImage: 图片句柄.

type ShapeGroupBox

type ShapeGroupBox struct {
	Shape

	HXCGUI int
}

func NewShapeGroupBox

func NewShapeGroupBox(x int, y int, cx int, cy int, pName string, hParent int) *ShapeGroupBox

形状组框_创建, 创建组框形状对象, 返回句柄 x: X坐标. y: Y坐标. cx: 宽度. cy: 高度. pName: 名称. hParent: 父对象句柄.

func (*ShapeGroupBox) EnableRoundAngle

func (s *ShapeGroupBox) EnableRoundAngle(bEnable bool) int

形状组框_启用圆角 bEnable: 是否启用.

func (*ShapeGroupBox) GetRoundAngle

func (s *ShapeGroupBox) GetRoundAngle(pWidth *int, pHeight *int) int

形状组框_取圆角大小 pWidth: 返回圆角宽度. pHeight: 返回圆角高度.

func (*ShapeGroupBox) GetTextOffset

func (s *ShapeGroupBox) GetTextOffset(pOffsetX *int, pOffsetY *int) int

形状组框_取文本偏移, 获取文本偏移量 pOffsetX: X坐标偏移量. pOffsetY: Y坐标偏移量.

func (*ShapeGroupBox) SetBorderColor

func (s *ShapeGroupBox) SetBorderColor(color int, alpha uint8) int

形状组框_置边框颜色 color: RGB颜色值. alpha: 透明度.

func (*ShapeGroupBox) SetFontX

func (s *ShapeGroupBox) SetFontX(hFontX int) int

形状组框_置字体 hFontX: 炫彩字体.

func (*ShapeGroupBox) SetRoundAngle

func (s *ShapeGroupBox) SetRoundAngle(nWidth int, nHeight int) int

形状组框_置圆角大小 nWidth: 圆角宽度. nHeight: 圆角高度.

func (*ShapeGroupBox) SetText

func (s *ShapeGroupBox) SetText(pText string) int

形状组框_置文本 pText: 文本内容.

func (*ShapeGroupBox) SetTextColor

func (s *ShapeGroupBox) SetTextColor(color int, alpha uint8) int

形状组框_置文本颜色 color: RGB颜色值. alpha: 透明度.

func (*ShapeGroupBox) SetTextOffset

func (s *ShapeGroupBox) SetTextOffset(offsetX int, offsetY int) int

形状组框_置文本偏移, 设置文本偏移量 offsetX: 水平偏移. offsetY: 垂直偏移.

type ShapeLine

type ShapeLine struct {
	Shape

	HXCGUI int
}

func NewShapeLine

func NewShapeLine(x1 int, y1 int, x2 int, y2 int, hParent int) *ShapeLine

形状线_创建 x1: 坐标. y1: 坐标. x2: 坐标. y2: 坐标. hParent: 父对象句柄.

func (*ShapeLine) SetColor

func (s *ShapeLine) SetColor(color int, alpha uint8) int

形状线_置颜色, 设置直线颜色 color: RGB颜色值. alpha: 透明度.

func (*ShapeLine) SetPosition

func (s *ShapeLine) SetPosition(x1 int, y1 int, x2 int, y2 int) int

形状线_置位置 x1: 坐标. y1: 坐标. x2: 坐标. y2: 坐标.

type ShapePicture

type ShapePicture struct {
	Shape

	HXCGUI int
}

func NewShapePicture

func NewShapePicture(x int, y int, cx int, cy int, hParent int) *ShapePicture

形状图片_创建, 创建形状对象-图片, 成功返回图片对象句柄, 否则返回NULL x: x坐标. y: y坐标. cx: 宽度. cy: 高度. hParent: 父对象句柄.

func (*ShapePicture) GetImage

func (s *ShapePicture) GetImage() int

形状图片_取图片, 获取图片句柄

func (*ShapePicture) SetImage

func (s *ShapePicture) SetImage(hImage int) int

形状图片_置图片, 设置图片 hImage: 图片句柄.

type ShapeRect

type ShapeRect struct {
	Shape

	HXCGUI int
}

func NewShapeRect

func NewShapeRect(x int, y int, cx int, cy int, hParent int) *ShapeRect

形状矩形_创建, 创建矩形形状对象, 返回句柄 x: X坐标. y: Y坐标. cx: 宽度. cy: 高度. hParent: 父对象句柄.

func (*ShapeRect) EnableBorder

func (s *ShapeRect) EnableBorder(bEnable bool) int

形状矩形_启用边框, 启用绘制矩形边框 bEnable: 是否启用.

func (*ShapeRect) EnableFill

func (s *ShapeRect) EnableFill(bEnable bool) int

形状矩形_启用填充, 启用填充矩形 bEnable: 是否启用.

func (*ShapeRect) EnableRoundAngle

func (s *ShapeRect) EnableRoundAngle(bEnable bool) int

形状矩形_启用圆角 bEnable: 是否启用.

func (*ShapeRect) GetRoundAngle

func (s *ShapeRect) GetRoundAngle(pWidth *int, pHeight *int) int

形状矩形_取圆角大小, 获取圆角大小 pWidth: 圆角宽度. pHeight: 圆角高度.

func (*ShapeRect) SetBorderColor

func (s *ShapeRect) SetBorderColor(color int, alpha uint8) int

形状矩形_置边框色, 设置边框颜色 color: RGB颜色值. alpha: 透明度.

func (*ShapeRect) SetFillColor

func (s *ShapeRect) SetFillColor(color int, alpha uint8) int

形状矩形_置填充色, 设置填充颜色 color: RGB颜色值. alpha: 透明度.

func (*ShapeRect) SetRoundAngle

func (s *ShapeRect) SetRoundAngle(nWidth int, nHeight int) int

形状矩形_置圆角大小, 设置圆角大小 nWidth: 圆角宽度. nHeight: 圆角高度.

type ShapeText

type ShapeText struct {
	Shape

	HXCGUI int
}

func NewShapeText

func NewShapeText(x int, y int, cx int, cy int, pName string, hParent int) *ShapeText

形状文本_创建, 创建形状对象文本 x: X坐标. y: Y坐标. cx: 宽度. cy: 高度. pName: 文本内容. hParent: 父对象句柄.

func (*ShapeText) GetFont

func (s *ShapeText) GetFont() int

形状文本_取字体, 返回字体句柄

func (*ShapeText) GetText

func (s *ShapeText) GetText() string

形状文本_取文本, 获取文本内容

func (*ShapeText) GetTextColor

func (s *ShapeText) GetTextColor() int

形状文本_取文本颜色

func (*ShapeText) GetTextLength

func (s *ShapeText) GetTextLength() int

形状文本_取文本长度, 获取文本长度

func (*ShapeText) SetFont

func (s *ShapeText) SetFont(hFontx int) int

形状文本_置字体 hFontx: 字体句柄.

func (*ShapeText) SetOffset

func (s *ShapeText) SetOffset(x int, y int) int

形状文本_置偏移, 设置内容偏移 x: X坐标. y: Y坐标.

func (*ShapeText) SetText

func (s *ShapeText) SetText(pName string) int

形状文本_置文本, 设置文本内容 pName: 文本内容.

func (*ShapeText) SetTextAlign

func (s *ShapeText) SetTextAlign(align int) int

形状文本_置文本对齐 align: 文本对齐方式, TextFormatFlag_, TextAlignFlag_, TextTrimming_

func (*ShapeText) SetTextColor

func (s *ShapeText) SetTextColor(color int, alpha uint8) int

形状文本_置文本颜色, 设置文本颜色 color: RGB颜色值. alpha: 透明度

type Table

type Table struct {
	Shape

	HXCGUI int
}

func NewTable

func NewTable(x int, y int, cx int, cy int, hParent int) *Table

表格_创建, 返回句柄 x: 按钮x坐标 y: 按钮y坐标 cx: 宽度 cy: 高度 hParent: 父为窗口句柄或元素句柄.

func (*Table) ComboCol

func (t *Table) ComboCol(iRow int, iCol int, count int) int

表格_组合列 iRow: 行索引 iCol: 列索引 count: 数量

func (*Table) ComboRow

func (t *Table) ComboRow(iRow int, iCol int, count int) int

表格_组合行 iRow: 行索引 iCol: 列索引 count: 数量

func (*Table) GetItemRect

func (t *Table) GetItemRect(iRow int, iCol int, pRect *xc.RECT) bool

表格_取项坐标 iRow: 行索引 iCol: 列索引 pRect: 接收返回坐标

func (*Table) Reset

func (t *Table) Reset(nRow int, nCol int) int

表格_重置 nRow: 行数量 nCol: 列数量

func (*Table) SetBorderColor

func (t *Table) SetBorderColor(color int) int

表格_置边颜色 color: 颜色

func (*Table) SetColWidth

func (t *Table) SetColWidth(iCol int, width int) int

表格_置列宽 iCol: 列索引 width: 宽度

func (*Table) SetFont

func (t *Table) SetFont(hFont int) int

表格_置字体 hFont: 字体句柄

func (*Table) SetItemBkColor

func (t *Table) SetItemBkColor(iRow int, iCol int, color int, bColor bool) int

表格_置项背景色 iRow: 行索引 iCol: 列索引 color: 颜色 bColor: 是否使用

func (*Table) SetItemFlag

func (t *Table) SetItemFlag(iRow int, iCol int, flag int) int

表格_置项标识 iRow: 行索引 iCol: 列索引 flag: 标识, Table_Flag_

func (*Table) SetItemFont

func (t *Table) SetItemFont(iRow int, iCol int, hFont int) int

表格_置项字体 iRow: 行索引 iCol: 列索引 hFont: 字体句柄

func (*Table) SetItemLine

func (t *Table) SetItemLine(iRow1 int, iCol1 int, iRow2 int, iCol2 int, nFlag int, color int) int

表格_置项线 iRow1: 行索引1 iCol1: 列索引1 iRow2: 行索引2 iCol2: 列索引2 nFlag: 标识, Table_Line_Flag_, 暂时没有, 填0 color: 颜色

func (*Table) SetItemPadding

func (t *Table) SetItemPadding(leftSize int, topSize int, rightSize int, bottomSize int) int

表格_置项内填充 leftSize: 内填充大小 topSize: 内填充大小 rightSize: 内填充大小 bottomSize: 内填充大小

func (*Table) SetItemText

func (t *Table) SetItemText(iRow int, iCol int, pText string) int

表格_置项文本 iRow: 行索引 iCol: 列索引 pText: 文本

func (*Table) SetItemTextAlign

func (t *Table) SetItemTextAlign(iRow int, iCol int, nAlign int) int

表格_置项文本对齐 iRow: 行索引 iCol: 列索引 nAlign: 对齐方式, TextFormatFlag_, TextAlignFlag_, TextTrimming_

func (*Table) SetItemTextColor

func (t *Table) SetItemTextColor(iRow int, iCol int, color int, bColor bool) int

表格_置项文本色 iRow: 行索引 iCol: 列索引 color: 颜色 bColor: 是否使用

func (*Table) SetRowHeight

func (t *Table) SetRowHeight(iRow int, height int) int

表格_置行高 iRow: 行索引 height: 高度

func (*Table) SetTextColor

func (t *Table) SetTextColor(color int) int

表格_置文本颜色 color: 颜色

Jump to

Keyboard shortcuts

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