代码拉取完成,页面将自动刷新
finalizerOn
is not turned on by default. After turning …
//----------------------------------------
// The code is automatically generated by the GenlibLcl tool.
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Apache License 2.0
//
//----------------------------------------
package vcl
import (
. "github.com/ying32/govcl/vcl/api"
. "github.com/ying32/govcl/vcl/types"
"unsafe"
)
type TMainMenu struct {
IComponent
instance uintptr
// 特殊情况下使用,主要应对Go的GC问题,与LCL没有太多关系。
ptr unsafe.Pointer
}
// 创建一个新的对象。
//
// Create a new object.
func NewMainMenu(owner IComponent) *TMainMenu {
m := new(TMainMenu)
m.instance = MainMenu_Create(CheckPtr(owner))
m.ptr = unsafe.Pointer(m.instance)
return m
}
// 动态转换一个已存在的对象实例。
//
// Dynamically convert an existing object instance.
func AsMainMenu(obj interface{}) *TMainMenu {
instance, ptr := getInstance(obj)
if instance == 0 { return nil }
return &TMainMenu{instance: instance, ptr: ptr}
}
// -------------------------- Deprecated begin --------------------------
// 新建一个对象来自已经存在的对象实例指针。
//
// Create a new object from an existing object instance pointer.
// Deprecated: use AsMainMenu.
func MainMenuFromInst(inst uintptr) *TMainMenu {
return AsMainMenu(inst)
}
// 新建一个对象来自已经存在的对象实例。
//
// Create a new object from an existing object instance.
// Deprecated: use AsMainMenu.
func MainMenuFromObj(obj IObject) *TMainMenu {
return AsMainMenu(obj)
}
// 新建一个对象来自不安全的地址。注意:使用此函数可能造成一些不明情况,慎用。
//
// Create a new object from an unsecured address. Note: Using this function may cause some unclear situations and be used with caution..
// Deprecated: use AsMainMenu.
func MainMenuFromUnsafePointer(ptr unsafe.Pointer) *TMainMenu {
return AsMainMenu(ptr)
}
// -------------------------- Deprecated end --------------------------
// 释放对象。
//
// Free object.
func (m *TMainMenu) Free() {
if m.instance != 0 {
MainMenu_Free(m.instance)
m.instance, m.ptr = 0, nullptr
}
}
// 返回对象实例指针。
//
// Return object instance pointer.
func (m *TMainMenu) Instance() uintptr {
return m.instance
}
// 获取一个不安全的地址。
//
// Get an unsafe address.
func (m *TMainMenu) UnsafeAddr() unsafe.Pointer {
return m.ptr
}
// 检测地址是否为空。
//
// Check if the address is empty.
func (m *TMainMenu) IsValid() bool {
return m.instance != 0
}
// 检测当前对象是否继承自目标对象。
//
// Checks whether the current object is inherited from the target object.
func (m *TMainMenu) Is() TIs {
return TIs(m.instance)
}
// 动态转换当前对象为目标对象。
//
// Dynamically convert the current object to the target object.
//func (m *TMainMenu) As() TAs {
// return TAs(m.instance)
//}
// 获取类信息指针。
//
// Get class information pointer.
func TMainMenuClass() TClass {
return MainMenu_StaticClassType()
}
// 查找指定名称的组件。
//
// Find the component with the specified name.
func (m *TMainMenu) FindComponent(AName string) *TComponent {
return AsComponent(MainMenu_FindComponent(m.instance, AName))
}
// 获取类名路径。
//
// Get the class name path.
func (m *TMainMenu) GetNamePath() string {
return MainMenu_GetNamePath(m.instance)
}
// 是否有父容器。
//
// Is there a parent container.
func (m *TMainMenu) HasParent() bool {
return MainMenu_HasParent(m.instance)
}
// 复制一个对象,如果对象实现了此方法的话。
//
// Copy an object, if the object implements this method.
func (m *TMainMenu) Assign(Source IObject) {
MainMenu_Assign(m.instance, CheckPtr(Source))
}
// 获取类的类型信息。
//
// Get class type information.
func (m *TMainMenu) ClassType() TClass {
return MainMenu_ClassType(m.instance)
}
// 获取当前对象类名称。
//
// Get the current object class name.
func (m *TMainMenu) ClassName() string {
return MainMenu_ClassName(m.instance)
}
// 获取当前对象实例大小。
//
// Get the current object instance size.
func (m *TMainMenu) InstanceSize() int32 {
return MainMenu_InstanceSize(m.instance)
}
// 判断当前类是否继承自指定类。
//
// Determine whether the current class inherits from the specified class.
func (m *TMainMenu) InheritsFrom(AClass TClass) bool {
return MainMenu_InheritsFrom(m.instance, AClass)
}
// 与一个对象进行比较。
//
// Compare with an object.
func (m *TMainMenu) Equals(Obj IObject) bool {
return MainMenu_Equals(m.instance, CheckPtr(Obj))
}
// 获取类的哈希值。
//
// Get the hash value of the class.
func (m *TMainMenu) GetHashCode() int32 {
return MainMenu_GetHashCode(m.instance)
}
// 文本类信息。
//
// Text information.
func (m *TMainMenu) ToString() string {
return MainMenu_ToString(m.instance)
}
func (m *TMainMenu) ImagesWidth() int32 {
return MainMenu_GetImagesWidth(m.instance)
}
func (m *TMainMenu) SetImagesWidth(value int32) {
MainMenu_SetImagesWidth(m.instance, value)
}
func (m *TMainMenu) BiDiMode() TBiDiMode {
return MainMenu_GetBiDiMode(m.instance)
}
func (m *TMainMenu) SetBiDiMode(value TBiDiMode) {
MainMenu_SetBiDiMode(m.instance, value)
}
// 获取图标索引列表对象。
func (m *TMainMenu) Images() *TImageList {
return AsImageList(MainMenu_GetImages(m.instance))
}
// 设置图标索引列表对象。
func (m *TMainMenu) SetImages(value IComponent) {
MainMenu_SetImages(m.instance, CheckPtr(value))
}
func (m *TMainMenu) OwnerDraw() bool {
return MainMenu_GetOwnerDraw(m.instance)
}
func (m *TMainMenu) SetOwnerDraw(value bool) {
MainMenu_SetOwnerDraw(m.instance, value)
}
// 设置改变事件。
//
// Set changed event.
func (m *TMainMenu) SetOnChange(fn TMenuChangeEvent) {
MainMenu_SetOnChange(m.instance, fn)
}
// 获取控件句柄。
//
// Get Control handle.
func (m *TMainMenu) Handle() HMENU {
return MainMenu_GetHandle(m.instance)
}
func (m *TMainMenu) Items() *TMenuItem {
return AsMenuItem(MainMenu_GetItems(m.instance))
}
// 获取组件总数。
//
// Get the total number of components.
func (m *TMainMenu) ComponentCount() int32 {
return MainMenu_GetComponentCount(m.instance)
}
// 获取组件索引。
//
// Get component index.
func (m *TMainMenu) ComponentIndex() int32 {
return MainMenu_GetComponentIndex(m.instance)
}
// 设置组件索引。
//
// Set component index.
func (m *TMainMenu) SetComponentIndex(value int32) {
MainMenu_SetComponentIndex(m.instance, value)
}
// 获取组件所有者。
//
// Get component owner.
func (m *TMainMenu) Owner() *TComponent {
return AsComponent(MainMenu_GetOwner(m.instance))
}
// 获取组件名称。
//
// Get the component name.
func (m *TMainMenu) Name() string {
return MainMenu_GetName(m.instance)
}
// 设置组件名称。
//
// Set the component name.
func (m *TMainMenu) SetName(value string) {
MainMenu_SetName(m.instance, value)
}
// 获取对象标记。
//
// Get the control tag.
func (m *TMainMenu) Tag() int {
return MainMenu_GetTag(m.instance)
}
// 设置对象标记。
//
// Set the control tag.
func (m *TMainMenu) SetTag(value int) {
MainMenu_SetTag(m.instance, value)
}
// 获取指定索引组件。
//
// Get the specified index component.
func (m *TMainMenu) Components(AIndex int32) *TComponent {
return AsComponent(MainMenu_GetComponents(m.instance, AIndex))
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。