Documentation
¶
Index ¶
- Constants
- Variables
- func Alert(text string)
- func Confirm(text string) bool
- func ConfirmYesNoCancel(text string) win32.MESSAGEBOX_RESULT
- func ContainsWindow(hWndAncestor win32.HWND, hWndTest win32.HWND) bool
- func DeflateRect(rect *win32.RECT, x int32, y int32)
- func DoEvents()
- func DpiScale(value int) int
- func DpiUnscale(value int) int
- func FillSolidRect(hdc win32.HDC, lpRect *win32.RECT, clr win32.COLORREF)
- func GetComboBoxMetrics(hWndParent HWND) *comboBoxMetrics
- func GetDefaultFont() win32.HFONT
- func GetMessageClientPos(hWnd win32.HWND) win32.POINT
- func GetMessagePos() win32.POINT
- func GetWindowText(hwnd HWND) (string, win32.WIN32_ERROR)
- func HandleTabFocus(hWnd HWND)
- func INDEXTOSTATEIMAGEMASK(index int) win32.TREE_VIEW_ITEM_STATE_FLAGS
- func Info(text string)
- func IsChildWindow(hWnd win32.HWND) bool
- func IsFocusable(hWnd HWND) bool
- func IsRectEmpty(rect *win32.RECT) bool
- func LoadIcon(filePath string, big bool) win32.HICON
- func LoadIconFromImageData(data []byte) win32.HICON
- func MeasureDcText(hdc win32.HDC, text string) (int, int)
- func MeasureDcText2(hdc win32.HDC, text string, text2 string) (int, int)
- func MeasureText(hWnd HWND, text string) (int, int)
- func MeasureText2(hWnd HWND, text string, text2 string) (int, int)
- func MessageBox(text string, title string)
- func MessageBoxEx(hWnd HWND, text, caption string, uType win32.MESSAGEBOX_STYLE) (win32.MESSAGEBOX_RESULT, win32.WIN32_ERROR)
- func MessageLoop()
- func MustRegisterClass(className string, wndProc WndProcFunc, options ClassOptions)
- func NewScope() *scope.Scope
- func ParseMouseMsgParams(wParam WPARAM, lParam LPARAM) (int32, int32, byte)
- func PtInRect(rect *win32.RECT, pt win32.POINT) bool
- func RegisterClass(className string, wndProc WndProcFunc, options ClassOptions) (win32.ATOM, error)
- func RequestGC()
- func STATEIMAGEMASKTOINDEX(state uint32) int
- func SetDpiAware()
- func SetWindowText(hWnd HWND, text string) (bool, win32.WIN32_ERROR)
- func StrToWsz(str string) []uint16
- func ToSysColorBrush(color byte) win32.HBRUSH
- func Warn(text string)
- func WithScope(scopedFunc scope.ScopedFunc)
- func WndProc(hWnd HWND, uMsg uint32, wParam WPARAM, lParam LPARAM) win32.LRESULT
- type Accelerator
- type AcceleratorTable
- func (this *AcceleratorTable) AddItemsFromCommand(commands []*Command)
- func (this *AcceleratorTable) AddTabPageKeys(tabCtrl TabControl)
- func (this *AcceleratorTable) ClearItems()
- func (this *AcceleratorTable) Create() error
- func (this *AcceleratorTable) Dispose()
- func (this *AcceleratorTable) FindByCommand(command *Command) *Accelerator
- func (this *AcceleratorTable) FindById(id uint16) *Accelerator
- func (this *AcceleratorTable) ReCreate() error
- type Action
- type ActionAware
- type ActionAwareSupport
- type BackColorAware
- type BoundsAware
- type Button
- type ButtonInterface
- type ButtonObject
- func (this *ButtonObject) ButtonObj() *ButtonObject
- func (this *ButtonObject) Click()
- func (this *ButtonObject) GetCommand() *Command
- func (this *ButtonObject) GetPreferredSize(int, int) (cx, cy int)
- func (this *ButtonObject) GetText() string
- func (this *ButtonObject) GetWindowClass() string
- func (this *ButtonObject) Init()
- func (this *ButtonObject) OnClick()
- func (this *ButtonObject) OnReflectCommand(msg *CommandMessage)
- func (this *ButtonObject) OnReflectMessage(msg *Message)
- func (this *ButtonObject) OnReflectNotify(info *NotifyMessage)
- func (this *ButtonObject) SetCommand(command *Command)
- func (this *ButtonObject) SetDefault()
- func (this *ButtonObject) SetIcon(icon win32.HICON)
- func (this *ButtonObject) SetText(text string)
- type ButtonSpi
- type CharMessage
- type CheckBox
- type CheckBoxInterface
- type CheckBoxObject
- func (this *CheckBoxObject) CheckBoxObj() *CheckBoxObject
- func (this *CheckBoxObject) GetChecked() bool
- func (this *CheckBoxObject) GetControlSpecStyle() (include WINDOW_STYLE, exclude WINDOW_STYLE)
- func (this *CheckBoxObject) GetOnValueChange() *SimpleEvent
- func (this *CheckBoxObject) GetPreferredSize(int, int) (cx, cy int)
- func (this *CheckBoxObject) GetText() string
- func (this *CheckBoxObject) GetValue() any
- func (this *CheckBoxObject) GetWindowClass() string
- func (this *CheckBoxObject) Init()
- func (this *CheckBoxObject) OnReflectCommand(msg *CommandMessage)
- func (this *CheckBoxObject) SetChecked(checked bool)
- func (this *CheckBoxObject) SetText(text string)
- func (this *CheckBoxObject) SetValue(value any)
- type CheckBoxSpi
- type ClassOptions
- type ColorDialog
- type ComboBox
- type ComboBoxInterface
- type ComboBoxObject
- func (this *ComboBoxObject) AddItem(item types.ValueText)
- func (this *ComboBoxObject) AddItems(items []types.ValueText)
- func (this *ComboBoxObject) AddStringItem(item string)
- func (this *ComboBoxObject) AddStringItems(items []string)
- func (this *ComboBoxObject) ClearItems()
- func (this *ComboBoxObject) ComboBoxObj() *ComboBoxObject
- func (this *ComboBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *ComboBoxObject) GetItem(index int) *types.ValueText
- func (this *ComboBoxObject) GetItemCount() int
- func (this *ComboBoxObject) GetOnValueChange() *SimpleEvent
- func (this *ComboBoxObject) GetPreferredSize(int, int) (int, int)
- func (this *ComboBoxObject) GetSelectedIndex() int
- func (this *ComboBoxObject) GetSelectedItem() *types.ValueText
- func (this *ComboBoxObject) GetText() string
- func (this *ComboBoxObject) GetValue() any
- func (this *ComboBoxObject) GetWindowClass() string
- func (this *ComboBoxObject) OnReflectCommand(msg *CommandMessage)
- func (this *ComboBoxObject) SetPlaceholder(placeholder string)
- func (this *ComboBoxObject) SetSelectedIndex(index int)
- func (this *ComboBoxObject) SetText(text string)
- func (this *ComboBoxObject) SetValue(value any)
- type ComboBoxSpi
- type Command
- type CommandAware
- type CommandManager
- type CommandMessage
- type Container
- type ContainerControl
- type ContainerControlObject
- func (this *ContainerControlObject) CreateIn(parent Window, extraOpts ...*WindowOptions) Control
- func (this *ContainerControlObject) GetContainer() Container
- func (this *ContainerControlObject) GetControlId() uint16
- func (this *ContainerControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *ContainerControlObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *ContainerControlObject) GetDefaultStyle() WINDOW_STYLE
- type ContainerInterface
- type ContainerObject
- func (this *ContainerObject) Add(controls ...Control)
- func (this *ContainerObject) Dispose()
- func (this *ContainerObject) EnsureClassRegistered()
- func (this *ContainerObject) EnsureCustomWndProc()
- func (this *ContainerObject) GetChildControls() []Control
- func (this *ContainerObject) GetChildWindows() []Window
- func (this *ContainerObject) GetControlById(id int) Control
- func (this *ContainerObject) GetControlByName(name string) Control
- func (this *ContainerObject) GetDescendantWindows() []Window
- func (this *ContainerObject) GetLayout() Layout
- func (this *ContainerObject) GetRootContainer() Container
- func (this *ContainerObject) GetWindowClass() string
- func (this *ContainerObject) Init()
- func (this *ContainerObject) OnCtlColorStatic(msg *Message)
- func (this *ContainerObject) PreCreate(opts *WindowOptions)
- func (this *ContainerObject) PreDispose()
- func (this *ContainerObject) Remove(ctrl Control)
- func (this *ContainerObject) SetBounds(left, top, width, height int)
- func (this *ContainerObject) SetLayout(layout Layout)
- func (this *ContainerObject) UpdateLayout()
- func (this *ContainerObject) UseDialogFont()
- type ContainerSpi
- type ContextContainerRestorer
- type ContextMenuAware
- type ContextMenuMessage
- type Control
- type ControlInterface
- type ControlObject
- func (this *ControlObject) Create(options WindowOptions) error
- func (this *ControlObject) CreateIn(parent Window, extraOpts ...*WindowOptions) Control
- func (this *ControlObject) GetContainer() Container
- func (this *ControlObject) GetControlId() uint16
- func (this *ControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *ControlObject) GetDefaultStyle() WINDOW_STYLE
- func (this *ControlObject) GetRootContainer() Container
- func (this *ControlObject) Init()
- func (this *ControlObject) PostCreate(opts *WindowOptions)
- func (this *ControlObject) PreDispose()
- type ControlSpi
- type Cursor
- type CustomControl
- type CustomControlObject
- func (this *CustomControlObject) Create(options WindowOptions) error
- func (this *CustomControlObject) CreateIn(parent Window, extraOpts ...*WindowOptions) Control
- func (this *CustomControlObject) EnsureClassRegistered()
- func (this *CustomControlObject) EnsureCustomWndProc()
- func (this *CustomControlObject) GetBackgroundColor() win32.COLORREF
- func (this *CustomControlObject) GetContainer() Container
- func (this *CustomControlObject) GetControlId() uint16
- func (this *CustomControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *CustomControlObject) GetDefaultStyle() WINDOW_STYLE
- func (this *CustomControlObject) GetRootContainer() Container
- func (this *CustomControlObject) GetWindowClass() string
- func (this *CustomControlObject) Init()
- func (this *CustomControlObject) SetDluBounds(left, top, width, height int)
- func (this *CustomControlObject) WinProc(win *WindowObject, m *Message) error
- type CustomControlSpi
- type CustomWindow
- type CustomWindowInterface
- type CustomWindowObject
- func (this *CustomWindowObject) EnsureCustomWndProc()
- func (this *CustomWindowObject) Init()
- func (this *CustomWindowObject) IsMouseHovering() bool
- func (this *CustomWindowObject) OnBubbleMessage(msg *Message)
- func (this *CustomWindowObject) OnCommand(info *CommandMessage)
- func (this *CustomWindowObject) OnContextMenu(sourceWin Window, pt Point) bool
- func (this *CustomWindowObject) OnCtlColorStatic(msg *Message)
- func (this *CustomWindowObject) OnDestroy()
- func (this *CustomWindowObject) OnEraseBkgnd(hdc win32.HDC) bool
- func (this *CustomWindowObject) OnKeyDown(args KeyEventArgs)
- func (this *CustomWindowObject) OnKeyUp(args KeyEventArgs)
- func (this *CustomWindowObject) OnKillFocus()
- func (this *CustomWindowObject) OnMouseDown(x int32, y int32, button byte)
- func (this *CustomWindowObject) OnMouseEnter()
- func (this *CustomWindowObject) OnMouseLeave()
- func (this *CustomWindowObject) OnMouseMove(x int32, y int32, button byte)
- func (this *CustomWindowObject) OnMouseUp(x int32, y int32, button byte)
- func (this *CustomWindowObject) OnNotify(msg *NotifyMessage)
- func (this *CustomWindowObject) OnPaint(hdc win32.HDC, clipRect *win32.RECT)
- func (this *CustomWindowObject) OnSetFocus()
- func (this *CustomWindowObject) WinProc(winObj *WindowObject, m *Message) error
- type CustomWindowSpi
- type DateTimePicker
- type DateTimePickerObject
- func (this *DateTimePickerObject) Create(options WindowOptions) error
- func (this *DateTimePickerObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *DateTimePickerObject) GetOnValueChange() *SimpleEvent
- func (this *DateTimePickerObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *DateTimePickerObject) GetValue() any
- func (this *DateTimePickerObject) GetWindowClass() string
- func (this *DateTimePickerObject) Init()
- func (this *DateTimePickerObject) OnReflectNotify(msg *NotifyMessage)
- func (this *DateTimePickerObject) SetValue(value any)
- type Dialog
- type DialogObject
- type Disposable
- type DpiPosAware
- type DpiSizeAware
- type Edit
- type EditInterface
- type EditObject
- func (this *EditObject) Dispose()
- func (this *EditObject) EditObj() *EditObject
- func (this *EditObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *EditObject) GetOnValueChange() *SimpleEvent
- func (this *EditObject) GetPlaceholder() string
- func (this *EditObject) GetPreferredSize(int, int) (int, int)
- func (this *EditObject) GetText() string
- func (this *EditObject) GetTextByteLength() int
- func (this *EditObject) GetTextLength() int
- func (this *EditObject) GetValue() any
- func (this *EditObject) GetWindowClass() string
- func (this *EditObject) Init()
- func (this *EditObject) IsEmpty() bool
- func (this *EditObject) OnReflectCommand(info *CommandMessage)
- func (this *EditObject) OnReflectMessage(msg *Message)
- func (this *EditObject) SelectAll()
- func (this *EditObject) SelectEnd()
- func (this *EditObject) SetPlaceholder(placeholder string)
- func (this *EditObject) SetReadonly(readonly bool)
- func (this *EditObject) SetText(text string)
- func (this *EditObject) SetValue(value any)
- type EditSpi
- type EnabledAware
- type Event
- type ExtraEvent
- type ExtraEventInfo
- type FileDialog
- type FileTypeFilter
- type FocusAware
- type FontAware
- type ForeColorAware
- type ForeColorAwareSupport
- type Form
- type FormInterface
- type FormObject
- func (this *FormObject) AsFormObject() *FormObject
- func (this *FormObject) EnsureClassRegistered()
- func (this *FormObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *FormObject) GetDefaultStyle() WINDOW_STYLE
- func (this *FormObject) GetWindowClass() string
- func (this *FormObject) Init()
- func (this *FormObject) OnEraseBkgnd(hdc win32.HDC) bool
- func (this *FormObject) OnHandleCreated()
- func (this *FormObject) PreCreate(opts *WindowOptions)
- type FormSpi
- type GetToolTipTextFunc
- type GroupBox
- type GroupBoxInterface
- type GroupBoxObject
- func (this *GroupBoxObject) Create(options WindowOptions) error
- func (this *GroupBoxObject) GetPreferredSize(maxWidth int, maxHeight int) (cx, cy int)
- func (this *GroupBoxObject) GetText() string
- func (this *GroupBoxObject) GetWindowClass() string
- func (this *GroupBoxObject) GroupBoxObj() *GroupBoxObject
- func (this *GroupBoxObject) Init()
- func (this *GroupBoxObject) OnReflectMessage(msg *Message)
- func (this *GroupBoxObject) PreCreate(opts *WindowOptions)
- func (this *GroupBoxObject) SetBounds(left, top, width, height int)
- func (this *GroupBoxObject) SetText(text string)
- type GroupBoxSpi
- type HWND
- type HeaderControl
- type HeaderControlObject
- func (this *HeaderControlObject) AddItem(text string, width int)
- func (this *HeaderControlObject) AddItemAligned(text string, width int, align int)
- func (this *HeaderControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *HeaderControlObject) GetItemCount() int
- func (this *HeaderControlObject) GetItemText(index int) string
- func (this *HeaderControlObject) GetItemWidth(index int) int
- func (this *HeaderControlObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *HeaderControlObject) GetWindowClass() string
- func (this *HeaderControlObject) Init()
- func (this *HeaderControlObject) SetItemWidth(index int, width int)
- type IdTextNode
- type ImageBox
- type ImageBoxInterface
- type ImageBoxObject
- func (this *ImageBoxObject) GetBitmap() win32.HBITMAP
- func (this *ImageBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *ImageBoxObject) GetIcon() win32.HICON
- func (this *ImageBoxObject) GetPreferredSize(int, int) (cx, cy int)
- func (this *ImageBoxObject) GetText() string
- func (this *ImageBoxObject) GetWindowClass() string
- func (this *ImageBoxObject) ImageBoxObj() *ImageBoxObject
- func (this *ImageBoxObject) Init()
- func (this *ImageBoxObject) OnHandleCreated()
- func (this *ImageBoxObject) OnReflectMessage(msg *Message)
- func (this *ImageBoxObject) PreCreate(opts *WindowOptions)
- func (this *ImageBoxObject) SetBitmap(hBitmap win32.HBITMAP)
- func (this *ImageBoxObject) SetIcon(hIcon win32.HICON)
- func (this *ImageBoxObject) UpdateImage()
- type ImageBoxSpi
- type ImageList
- func CreateImageListFromIcons(size int, hIcons ...win32.HICON) (*ImageList, error)
- func CreateImageListFromImage(imageData []byte) (*ImageList, error)
- func GetSysImageList(small bool) *ImageList
- func NewImageList(size int, create bool) *ImageList
- func NewImageListEx(size int, bpp int, masked bool) *ImageList
- func NewImageListFromHandle(hIml win32.HIMAGELIST, owned bool) *ImageList
- func (this *ImageList) Add(hBitmap win32.HBITMAP) (int, error)
- func (this *ImageList) AddIcon(hIcon win32.HICON) (int, error)
- func (this *ImageList) AddImageData(imageData []byte) (int, error)
- func (this *ImageList) AddImageDatas(imageData ...[]byte) (int, error)
- func (this *ImageList) AddImageFile(filePath string) (int, error)
- func (this *ImageList) CopyUnowned() *ImageList
- func (this *ImageList) Create() error
- func (this *ImageList) Detach() win32.HIMAGELIST
- func (this *ImageList) Dispose()
- func (this *ImageList) Draw(index int, hdc win32.HDC, x int32, y int32)
- func (this *ImageList) GetCount() int
- func (this *ImageList) GetHBitmap(index int) win32.HBITMAP
- func (this *ImageList) GetHIcon(index int) win32.HICON
- func (this *ImageList) GetHandle() win32.HIMAGELIST
- func (this *ImageList) Init()
- func (this *ImageList) Resize(cx int) *ImageList
- type Input
- type KeyEventArgs
- type KeyMessage
- type KeyStroke
- type LPARAM
- type Label
- type LabelInterface
- type LabelObject
- func (this *LabelObject) GetPreferredSize(int, int) (cx, cy int)
- func (this *LabelObject) GetText() string
- func (this *LabelObject) GetWindowClass() string
- func (this *LabelObject) LabelObject() *LabelObject
- func (this *LabelObject) OnReflectMessage(msg *Message)
- func (this *LabelObject) SetText(text string)
- type LabelSpi
- type Layout
- type LayoutContainer
- type LinkLabel
- type LinkLabelObject
- func (this *LinkLabelObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *LinkLabelObject) GetOnClick() *Event[*LinkLabelOnClickInfo]
- func (this *LinkLabelObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *LinkLabelObject) GetText() string
- func (this *LinkLabelObject) GetWindowClass() string
- func (this *LinkLabelObject) Init()
- func (this *LinkLabelObject) OnReflectNotify(msg *NotifyMessage)
- func (this *LinkLabelObject) SetText(text string)
- type LinkLabelOnClickInfo
- type ListBox
- type ListBoxObject
- func (this *ListBoxObject) AddItem(item types.ValueText)
- func (this *ListBoxObject) AddItems(items []types.ValueText)
- func (this *ListBoxObject) AddStringItem(item string)
- func (this *ListBoxObject) AddStringItems(items []string)
- func (this *ListBoxObject) ClearItems()
- func (this *ListBoxObject) DeleteItem(index int)
- func (this *ListBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *ListBoxObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *ListBoxObject) GetItem(index int) *types.ValueText
- func (this *ListBoxObject) GetItemCount() int
- func (this *ListBoxObject) GetItemText(index int) string
- func (this *ListBoxObject) GetOnValueChange() *SimpleEvent
- func (this *ListBoxObject) GetPreferredSize(int, int) (int, int)
- func (this *ListBoxObject) GetSelectedIndex() int
- func (this *ListBoxObject) GetSelectedItem() *types.ValueText
- func (this *ListBoxObject) GetText() string
- func (this *ListBoxObject) GetValue() any
- func (this *ListBoxObject) GetWindowClass() string
- func (this *ListBoxObject) IndexFromPoint(x, y int) int
- func (this *ListBoxObject) ListBoxObj() *ListBoxObject
- func (this *ListBoxObject) OnReflectCommand(msg *CommandMessage)
- func (this *ListBoxObject) SelectByText(text string) bool
- func (this *ListBoxObject) SetSelectedIndex(index int)
- func (this *ListBoxObject) SetValue(value any)
- type ListRowInfo
- type ListView
- type ListViewColumn
- type ListViewItemEventInfo
- type ListViewObject
- func (this *ListViewObject) AddColumn(column ListViewColumn)
- func (this *ListViewObject) AddRow(info *ListRowInfo) (int, int)
- func (this *ListViewObject) AddRowInfos(rows []*ListRowInfo)
- func (this *ListViewObject) AddRows(rows [][]any, rowAsData bool)
- func (this *ListViewObject) AddRowsWithData(dataRows [][]any)
- func (this *ListViewObject) AddRowsWithId(rows [][]any, rowAsData bool)
- func (this *ListViewObject) AddRowsWithIdAndData(dataRows [][]any)
- func (this *ListViewObject) AddRowsWithInfo(dataRows [][]any)
- func (this *ListViewObject) ClearColumns()
- func (this *ListViewObject) ClearRows()
- func (this *ListViewObject) Create(options WindowOptions) error
- func (this *ListViewObject) DeleteColumn(index int)
- func (this *ListViewObject) DeleteRow(index int)
- func (this *ListViewObject) Dispose()
- func (this *ListViewObject) GetColumnCount() int
- func (this *ListViewObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *ListViewObject) GetRowCount() int
- func (this *ListViewObject) GetRowData(id int) any
- func (this *ListViewObject) GetSelectedData() any
- func (this *ListViewObject) GetSelectedId() int
- func (this *ListViewObject) GetSelectedIndex() int
- func (this *ListViewObject) GetSelectedIndexes() []int
- func (this *ListViewObject) GetWindowClass() string
- func (this *ListViewObject) IndexToId(index int) int
- func (this *ListViewObject) Init()
- func (this *ListViewObject) ListViewObj() *ListViewObject
- func (this *ListViewObject) OnReflectNotify(msg *NotifyMessage)
- func (this *ListViewObject) SetColumns(columns []ListViewColumn)
- func (this *ListViewObject) SetImageList(iml *ImageList)
- func (this *ListViewObject) SetRowData(id int, data any)
- func (this *ListViewObject) SetSelectedIndex(index int)
- type Menu
- func (this *Menu) AddItem(item MenuItem)
- func (this *Menu) AddItems(items []MenuItem)
- func (this *Menu) AddSeparator()
- func (this *Menu) Dispose()
- func (this *Menu) GetItem(id uint16) *MenuItem
- func (this *Menu) GetItemCount() int
- func (this *Menu) GetSubMenuItem(hSubMenu win32.HMENU) *MenuItem
- func (this *Menu) Init()
- func (this *Menu) SetItemText(id int, text string)
- type MenuBar
- type MenuHelpUI
- type MenuItem
- type Message
- func (this *Message) GetHandled() bool
- func (this *Message) GetResult() uintptr
- func (this *Message) GetSender() any
- func (this *Message) SetHandled(handle bool)
- func (this *Message) SetHandledWithResult(result uintptr) error
- func (this *Message) SetResult(result uintptr)
- func (this *Message) SetSender(sender any)
- type MessageProcessFunc
- type MessageProcessFuncHolder
- type MessageProcessor
- type MessageProcessors
- type MsgEvent
- type MsgEventListener
- type MsgEventSource
- type MsgPreprocessor
- type NameAware
- type NameAwareSupport
- type NewButton
- type NewCheckBox
- type NewComboBox
- type NewEdit
- type NewForm
- type NewGroupBox
- type NewImageBox
- type NewLabel
- type NewLinkLabel
- type NewListBox
- type NewListView
- type NewNumberEdit
- type NewPanel
- type NewProgressBar
- type NewRadioButton
- type NewSlider
- type NewSplitter
- type NewStatusBar
- type NewTabControl
- type NewTabSheet
- type NewTextArea
- type NewToolBar
- type NewTreeView
- type NotifyMessage
- type NumberEdit
- type NumberEditObject
- func (this *NumberEditObject) Create(options WindowOptions) error
- func (this *NumberEditObject) GetValue() any
- func (this *NumberEditObject) GetWindowClass() string
- func (this *NumberEditObject) Init()
- func (this *NumberEditObject) SetBounds(left, top, width, height int)
- func (this *NumberEditObject) SetValue(value any)
- type OpenFileDialog
- type Panel
- type PanelInterface
- type PanelObject
- func (this *PanelObject) EnsureClassRegistered()
- func (this *PanelObject) GetDefaultStyle() WINDOW_STYLE
- func (this *PanelObject) GetWindowClass() string
- func (this *PanelObject) Init()
- func (this *PanelObject) OnCtlColorStatic(msg *Message)
- func (this *PanelObject) PanelObj() *PanelObject
- func (this *PanelObject) WinProc(winObj *WindowObject, m *Message) error
- type PanelSpi
- type Point
- type PopupMenu
- type PosAware
- type ProgressBar
- type ProgressBarObject
- func (this *ProgressBarObject) Create(options WindowOptions) error
- func (this *ProgressBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *ProgressBarObject) GetWindowClass() string
- func (this *ProgressBarObject) Init()
- func (this *ProgressBarObject) ProgressBarObj() *ProgressBarObject
- func (this *ProgressBarObject) SetMax(max int)
- func (this *ProgressBarObject) SetMin(min int)
- func (this *ProgressBarObject) SetPos_(pos int)
- func (this *ProgressBarObject) SetProgress(progress int)
- func (this *ProgressBarObject) SetRange(min, max int)
- func (this *ProgressBarObject) ShowMarquee(marquee bool)
- type RadioButton
- type RadioButtonInterface
- type RadioButtonObject
- func (this *RadioButtonObject) GetChecked() bool
- func (this *RadioButtonObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *RadioButtonObject) GetOnClick() *SimpleEvent
- func (this *RadioButtonObject) GetOnValueChangeEvent() *SimpleEvent
- func (this *RadioButtonObject) GetPreferredSize(int, int) (cx, cy int)
- func (this *RadioButtonObject) GetText() string
- func (this *RadioButtonObject) GetValue() any
- func (this *RadioButtonObject) GetWindowClass() string
- func (this *RadioButtonObject) OnReflectCommand(msg *CommandMessage)
- func (this *RadioButtonObject) RadioButtonObj() *RadioButtonObject
- func (this *RadioButtonObject) SetChecked(checked bool)
- func (this *RadioButtonObject) SetText(text string)
- func (this *RadioButtonObject) SetValue(value any)
- type RadioButtonSpi
- type ReadOnlyAware
- type Rect
- type SaveFileDialog
- type SimpleEvent
- type SimpleEventInfo
- type SimpleEventListener
- type SimpleWindowObject
- type Size
- type SizeAware
- type Slider
- type SliderObject
- func (this *SliderObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *SliderObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *SliderObject) GetRange() (int, int)
- func (this *SliderObject) GetValue() int
- func (this *SliderObject) GetWindowClass() string
- func (this *SliderObject) Init()
- func (this *SliderObject) OnHandleCreated()
- func (this *SliderObject) SetRange(min int, max int)
- func (this *SliderObject) SetValue(value int)
- type Splitter
- type SplitterObject
- type StatusBar
- type StatusBarInterface
- type StatusBarMenuHelpUI
- type StatusBarObject
- func (this *StatusBarObject) Create(options WindowOptions) error
- func (this *StatusBarObject) GetPartText(index int) string
- func (this *StatusBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *StatusBarObject) GetSimpleText() string
- func (this *StatusBarObject) GetText() string
- func (this *StatusBarObject) GetWindowClass() string
- func (this *StatusBarObject) Init()
- func (this *StatusBarObject) IsSimpleMode() bool
- func (this *StatusBarObject) OnParentResized()
- func (this *StatusBarObject) SetPartText(index int, text string)
- func (this *StatusBarObject) SetParts(parts []StatusPart)
- func (this *StatusBarObject) SetSimpleMode(simple bool)
- func (this *StatusBarObject) SetSimpleText(text string)
- func (this *StatusBarObject) SetText(text string)
- type StatusBarSpi
- type StatusPart
- type TabControl
- type TabControlObject
- func (this *TabControlObject) GetPreferredSize(maxWidth int, maxHeight int) (int, int)
- func (this *TabControlObject) GetSelectedIndex() int
- func (this *TabControlObject) GetWindowClass() string
- func (this *TabControlObject) Init()
- func (this *TabControlObject) MeasureControlRect(sheetRect Rect) Rect
- func (this *TabControlObject) MeasureSheetRect(controlRect Rect) Rect
- func (this *TabControlObject) OnReflectNotify(msg *NotifyMessage)
- func (this *TabControlObject) SelectFirst()
- func (this *TabControlObject) SelectLast()
- func (this *TabControlObject) SelectNext()
- func (this *TabControlObject) SelectPrev()
- func (this *TabControlObject) SetBounds(left, top, width, height int)
- func (this *TabControlObject) SetItems(items []TabItem)
- func (this *TabControlObject) SetSelectedIndex(index int)
- func (this *TabControlObject) TabControlObj() *TabControlObject
- type TabItem
- type TabSheet
- type TabSheetInterface
- type TabSheetObject
- type TabSheetSpi
- type TbLabelStyle
- type TextArea
- type TextAreaObject
- func (this *TextAreaObject) Create(options WindowOptions) error
- func (this *TextAreaObject) Dispose()
- func (this *TextAreaObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
- func (this *TextAreaObject) GetPreferredSize(maxCx int, maxCy int) (int, int)
- func (this *TextAreaObject) GetWindowClass() string
- func (this *TextAreaObject) Init()
- func (this *TextAreaObject) OnReflectCommand(msg *CommandMessage)
- func (this *TextAreaObject) SetBounds(left, top, width, height int)
- func (this *TextAreaObject) TextAreaObj() *TextAreaObject
- type TextAware
- type TextNode
- type Timer
- type TitleAware
- type ToolBar
- type ToolBarInterface
- type ToolBarItem
- type ToolBarObject
- func (this *ToolBarObject) AddItems(items []*ToolBarItem)
- func (this *ToolBarObject) BuildOverflowMenu() *PopupMenu
- func (this *ToolBarObject) Clear()
- func (this *ToolBarObject) Create(options WindowOptions) error
- func (this *ToolBarObject) Customize()
- func (this *ToolBarObject) Dispose()
- func (this *ToolBarObject) EnableItem(id int, enabled bool)
- func (this *ToolBarObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *ToolBarObject) GetItemIds() []int
- func (this *ToolBarObject) GetItems() []*ToolBarItem
- func (this *ToolBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *ToolBarObject) GetWindowClass() string
- func (this *ToolBarObject) Init()
- func (this *ToolBarObject) IsLarge() bool
- func (this *ToolBarObject) LoadImages(typeId uint32) int
- func (this *ToolBarObject) LoadSystemImages(idbId uint32) int
- func (this *ToolBarObject) OnParentResized()
- func (this *ToolBarObject) OnReflectCommand(msg *CommandMessage)
- func (this *ToolBarObject) OnReflectNotify(msg *NotifyMessage)
- func (this *ToolBarObject) PreProcessMsg(msg *win32.MSG) bool
- func (this *ToolBarObject) SetBitmapSize(cx, cy int)
- func (this *ToolBarObject) SetButtonSize(cx, cy int)
- func (this *ToolBarObject) SetButtonWidth(minWdith, maxWidth int)
- func (this *ToolBarObject) SetDefaultItemIds(ids []int)
- func (this *ToolBarObject) SetImageList(imageList *ImageList, imageListLarge *ImageList)
- func (this *ToolBarObject) SetItemIds(ids []int)
- func (this *ToolBarObject) SetItems(items []*ToolBarItem)
- func (this *ToolBarObject) SetLabelStyle(labelStyle TbLabelStyle)
- func (this *ToolBarObject) SetLarge(large bool)
- func (this *ToolBarObject) SetPadding(cx, cy int)
- func (this *ToolBarObject) UpdateCommandItems()
- type ToolBarSpi
- type Tooltip
- type TooltipObject
- func (this *TooltipObject) AddTool(control Control, textProvider TooltipTextProvider)
- func (this *TooltipObject) CreateIn(parent Window, extraOpts ...*WindowOptions)
- func (this *TooltipObject) Dispose()
- func (this *TooltipObject) GetDefaultStyle() WINDOW_STYLE
- func (this *TooltipObject) GetWindowClass() string
- func (this *TooltipObject) Hide()
- func (this *TooltipObject) Init()
- func (this *TooltipObject) OnReflectNotify(msg *NotifyMessage)
- func (this *TooltipObject) SetText(text string)
- func (this *TooltipObject) Show()
- func (this *TooltipObject) ShowAt(x, y int)
- func (this *TooltipObject) ShowInplace(x int, y int)
- type TooltipTextProvider
- type TopWindow
- type TopWindowInterface
- type TopWindowObject
- func (this *TopWindowObject) AsTopWindowObject() *TopWindowObject
- func (this *TopWindowObject) CenterOnScreen()
- func (this *TopWindowObject) CenterToWindow(hWnd HWND)
- func (this *TopWindowObject) Close()
- func (this *TopWindowObject) Create(options WindowOptions) error
- func (this *TopWindowObject) Dispose()
- func (this *TopWindowObject) EnsureClassRegistered()
- func (this *TopWindowObject) GetAccelHandle() win32.HACCEL
- func (this *TopWindowObject) GetContainer() Container
- func (this *TopWindowObject) GetModalResult() int
- func (this *TopWindowObject) GetRootContainer() Container
- func (this *TopWindowObject) GetTitle() string
- func (this *TopWindowObject) GetWindowClass() string
- func (this *TopWindowObject) Init()
- func (this *TopWindowObject) IsChild() bool
- func (this *TopWindowObject) OnCommand(msg *CommandMessage)
- func (this *TopWindowObject) OnMenuCommand(wParam WPARAM, lParam LPARAM)
- func (this *TopWindowObject) OnSize(width, height int)
- func (this *TopWindowObject) PostCreate(opts *WindowOptions)
- func (this *TopWindowObject) PostShow()
- func (this *TopWindowObject) PreCreate(opts *WindowOptions)
- func (this *TopWindowObject) SetAccelerators(accelTable *AcceleratorTable)
- func (this *TopWindowObject) SetClientSize(width, height int)
- func (this *TopWindowObject) SetDluClientSize(width, height int)
- func (this *TopWindowObject) SetMenuBar(menuBar *MenuBar)
- func (this *TopWindowObject) SetMenuHelpUI(menuHelpUI MenuHelpUI)
- func (this *TopWindowObject) SetModalResult(result int)
- func (this *TopWindowObject) SetTitle(title string)
- func (this *TopWindowObject) ShowModal()
- func (this *TopWindowObject) WinProc(winObj *WindowObject, m *Message) error
- type TopWindowSpi
- type TrayIcon
- type TreeItem
- type TreeNode
- type TreeView
- type TreeViewObject
- func (this *TreeViewObject) AddChildIdTextNode(parentId int, node IdTextNode)
- func (this *TreeViewObject) AddChildNode(parentId int, node TreeNode) int
- func (this *TreeViewObject) AddChildTextNode(parentId int, node TextNode)
- func (this *TreeViewObject) AddIdTextNode(node IdTextNode)
- func (this *TreeViewObject) AddIdTextNodes(nodes []IdTextNode)
- func (this *TreeViewObject) AddItem(item TreeItem) int
- func (this *TreeViewObject) AddItems(items []TreeItem)
- func (this *TreeViewObject) AddNode(node TreeNode) int
- func (this *TreeViewObject) AddNodes(nodes ...TreeNode) []int
- func (this *TreeViewObject) AddTextNode(node TextNode)
- func (this *TreeViewObject) AddTextNodes(nodes []TextNode)
- func (this *TreeViewObject) ClearItems()
- func (this *TreeViewObject) Create(options WindowOptions) error
- func (this *TreeViewObject) Dispose()
- func (this *TreeViewObject) ExpandAll()
- func (this *TreeViewObject) ExpandItem(hItem win32.HTREEITEM)
- func (this *TreeViewObject) GenId() int
- func (this *TreeViewObject) GetChildItems(hParentItem win32.HTREEITEM) []win32.HTREEITEM
- func (this *TreeViewObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
- func (this *TreeViewObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *TreeViewObject) GetItem(id int) win32.HTREEITEM
- func (this *TreeViewObject) GetItemCheckState(hItem win32.HTREEITEM) int
- func (this *TreeViewObject) GetItemId(hItem win32.HTREEITEM) int
- func (this *TreeViewObject) GetItemIdAtCursor() int
- func (this *TreeViewObject) GetItemText(hItem win32.HTREEITEM) string
- func (this *TreeViewObject) GetItemsCheckState(hItems []win32.HTREEITEM) int
- func (this *TreeViewObject) GetNextItem(hItem win32.HTREEITEM) win32.HTREEITEM
- func (this *TreeViewObject) GetNoScrollSize() (int, int)
- func (this *TreeViewObject) GetOnNodeDblClick() *SimpleEvent
- func (this *TreeViewObject) GetOnSelectionChange() *ExtraEvent
- func (this *TreeViewObject) GetParentId(id int) int
- func (this *TreeViewObject) GetParentItem(id int) win32.HTREEITEM
- func (this *TreeViewObject) GetPathIds(id int) []int
- func (this *TreeViewObject) GetPrevItem(hItem win32.HTREEITEM) win32.HTREEITEM
- func (this *TreeViewObject) GetSelectedId() int
- func (this *TreeViewObject) GetSelectedItem() win32.HTREEITEM
- func (this *TreeViewObject) GetSelectedText() string
- func (this *TreeViewObject) GetText(id int) string
- func (this *TreeViewObject) GetWindowClass() string
- func (this *TreeViewObject) Init()
- func (this *TreeViewObject) IsLeaf(hItem win32.HTREEITEM) bool
- func (this *TreeViewObject) IsParent(id int) bool
- func (this *TreeViewObject) LoadLazyChildItems(parentId int) []TreeItem
- func (this *TreeViewObject) OnReflectNotify(msg *NotifyMessage)
- func (this *TreeViewObject) SetImageList(iml *ImageList)
- func (this *TreeViewObject) SetItemCheckState(hItem win32.HTREEITEM, state int)
- func (this *TreeViewObject) SetItemNoChildren(hItem win32.HTREEITEM)
- func (this *TreeViewObject) SetSelectedId(id int)
- func (this *TreeViewObject) SetSelectedItem(hItem win32.HTREEITEM)
- func (this *TreeViewObject) TreeViewObj() *TreeViewObject
- func (this *TreeViewObject) UseDefaultNodeImages()
- type TreeViewSpi
- type UidGen
- type VisibleAware
- type WIN32_ERROR
- type WINDOW_EX_STYLE
- type WINDOW_STYLE
- type WPARAM
- type WaitCursor
- type WinProcFunc
- type WinProcProvider
- type Window
- type WindowCenter
- type WindowFlag
- type WindowInterface
- type WindowObject
- func (this *WindowObject) AddDisposeAction(action Action)
- func (this *WindowObject) AddMessageProcessor(processor MessageProcessor)
- func (this *WindowObject) AsWindowObject() *WindowObject
- func (this *WindowObject) Attach(hWnd HWND) error
- func (this *WindowObject) AutoSize(optMaxSize ...Size)
- func (this *WindowObject) CallDefaultWndProc(msg *Message) error
- func (this *WindowObject) CallOriWndProc(msg *Message) error
- func (this *WindowObject) Contains(hWnd win32.HWND) bool
- func (this *WindowObject) ContainsFocus() bool
- func (this *WindowObject) Create(options WindowOptions) error
- func (this *WindowObject) CreateHandle(className string, options WindowOptions) (HWND, error)
- func (this *WindowObject) Destroy()
- func (this *WindowObject) Detach() error
- func (this *WindowObject) Dispose()
- func (this *WindowObject) DluToPx(x, y int) (int, int)
- func (this *WindowObject) EnsureClassRegistered()
- func (this *WindowObject) EnsureCustomWndProc()
- func (this *WindowObject) FireMsgEvent(msg *Message) bool
- func (this *WindowObject) Focus()
- func (this *WindowObject) GetBackColor() drawing.Color
- func (this *WindowObject) GetBounds() Rect
- func (this *WindowObject) GetClientSize() (cx, cy int)
- func (this *WindowObject) GetClientSize32() (cx, cy int32)
- func (this *WindowObject) GetContextMenu() *PopupMenu
- func (this *WindowObject) GetData(key string) any
- func (this *WindowObject) GetDefaultExStyle() WINDOW_EX_STYLE
- func (this *WindowObject) GetDefaultStyle() WINDOW_STYLE
- func (this *WindowObject) GetDpiClientSize() (cx, cy int)
- func (this *WindowObject) GetDpiPos() (x, y int)
- func (this *WindowObject) GetDpiSize() (cx, cy int)
- func (this *WindowObject) GetEnabled() bool
- func (this *WindowObject) GetEvent(uMsg uint32) *MsgEvent
- func (this *WindowObject) GetExStyle() WINDOW_EX_STYLE
- func (this *WindowObject) GetFont() *gdi.Font
- func (this *WindowObject) GetHandle() HWND
- func (this *WindowObject) GetOnCreate() *SimpleEvent
- func (this *WindowObject) GetParent() Window
- func (this *WindowObject) GetParentHandle() HWND
- func (this *WindowObject) GetPos() (x, y int)
- func (this *WindowObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
- func (this *WindowObject) GetRootHandle() HWND
- func (this *WindowObject) GetRootWindow() Window
- func (this *WindowObject) GetSize() (cx, cy int)
- func (this *WindowObject) GetStyle() WINDOW_STYLE
- func (this *WindowObject) GetVisible() bool
- func (this *WindowObject) GetWindowClass() string
- func (this *WindowObject) HasFlag(flag WindowFlag) bool
- func (this *WindowObject) HasFocus() bool
- func (this *WindowObject) Hide()
- func (this *WindowObject) Init()
- func (this *WindowObject) Invalidate()
- func (this *WindowObject) IsChild() bool
- func (this *WindowObject) IsVisible() bool
- func (this *WindowObject) ModifyStyle(style, styleInclude, styleExclude win32.WINDOW_STYLE)
- func (this *WindowObject) OnHandleCreated()
- func (this *WindowObject) OnParentResized()
- func (this *WindowObject) OnReflectCommand(info *CommandMessage)
- func (this *WindowObject) OnReflectMessage(msg *Message)
- func (this *WindowObject) OnReflectNotify(info *NotifyMessage)
- func (this *WindowObject) OnSize(width, height int)
- func (this *WindowObject) PostCreate(opts *WindowOptions)
- func (this *WindowObject) PostShow()
- func (this *WindowObject) PreCreate(opts *WindowOptions)
- func (this *WindowObject) PreDispose()
- func (this *WindowObject) PreProcessMsg(msg *win32.MSG) bool
- func (this *WindowObject) PreShow()
- func (this *WindowObject) PxToDlu(x, y int) (int, int)
- func (this *WindowObject) Refresh()
- func (this *WindowObject) RemoveMessageProcessor(processor MessageProcessor)
- func (this *WindowObject) SetBackColor(color drawing.Color)
- func (this *WindowObject) SetBounds(left, top, width, height int)
- func (this *WindowObject) SetContextMenu(menu *PopupMenu)
- func (this *WindowObject) SetData(key string, value any)
- func (this *WindowObject) SetDluBounds(left, top, width, height int)
- func (this *WindowObject) SetDpiPos(x int, y int)
- func (this *WindowObject) SetDpiSize(cx int, cy int)
- func (this *WindowObject) SetEnabled(enabled bool)
- func (this *WindowObject) SetFlag(flag WindowFlag, set bool)
- func (this *WindowObject) SetFont(font *gdi.Font)
- func (this *WindowObject) SetPos(x int, y int)
- func (this *WindowObject) SetSize(cx int, cy int)
- func (this *WindowObject) SetVisible(visible bool)
- func (this *WindowObject) Show()
- func (this *WindowObject) TryGetEvent(uMsg uint32) (*MsgEvent, bool)
- func (this *WindowObject) Update()
- type WindowOptions
- type WindowSpi
- type WindowState
- type WndProcFunc
Constants ¶
const ( Data_ContextMenu = "__ContextMenu" Data_Font = "__Font" Data_FontHandle = "__FontHandle" Data_Disposables = "__Disposables" Data_ModalResult = "__ModalResult" Data_BackColor = "__BackColor" Data_BackColorBrush = "__BackColorBrush" Data_Collapsed = "__Collapsed" )
const ( MenuGenIdStart = -10000 AccelGenIdStart = -20000 ToolbarGenIdStart = -30000 )
const CONTROL_TIMER_TRACK_LEAVE = 101
const DefaultSplitterWidth = 4
const ID_SEPARATOR = 65534
const LazyNodeId int = math.MinInt32 + 'L' + 'A' + 'Z' + 'Y'
const NegativeOne = consts.NegativeOne
const NegativeOne32 = consts.NegativeOne32
const NullColor win32.COLORREF = math.MaxUint32 - 2
const TransparentColor win32.COLORREF = math.MaxUint32 - 1
const WM_APP_DISPATCH = win32.WM_APP + 88
const WM_CHILD_KILLFOCUS = win32.WM_APP + 101
const WM_CHILD_SETFOCUS = win32.WM_APP + 100
const WM_REFLECT_COMMAND = win32.WM_APP + 64
const WM_REFLECT_DRAWITEM = win32.WM_APP + 67
const WM_REFLECT_MEASUREITEM = win32.WM_APP + 66
const WM_REFLECT_NOTIFY = win32.WM_APP + 65
Variables ¶
var CancelError error = errors.New("Canceled")
var Dispatcher = newDispatcherImpl()
Dispatcher is used to dispatch actions to be executed on the UI thread
var Dpi int32 = 96
var DpiAware bool
var HInstance win32.HINSTANCE
HInstance is the handle to the current instance of the application.
var ImagesFilter = FileTypeFilter{
Name: "Image files(*.gif;*.jpg;*.jpeg;*.bmp;*.png)",
Pattern: "*.gif;*.jpg;*.jpeg;*.bmp;*.png"}
var ImagesFilters = []FileTypeFilter{ImagesFilter}
var LazyIdTextNode = IdTextNode{Id: LazyNodeId}
var LazyIdTextNodes = []IdTextNode{LazyIdTextNode}
var MsgPreprocessors msgPreprocessorsImpl
MsgPreprocessors is a global registry to add or remove MsgPreprocessor implementations
Functions ¶
func ConfirmYesNoCancel ¶
func ConfirmYesNoCancel(text string) win32.MESSAGEBOX_RESULT
func DoEvents ¶
func DoEvents()
DoEvents processes all Windows messages currently in the message queue.
func DpiUnscale ¶
func GetComboBoxMetrics ¶
func GetComboBoxMetrics(hWndParent HWND) *comboBoxMetrics
func GetDefaultFont ¶
func GetMessagePos ¶
func GetWindowText ¶
func GetWindowText(hwnd HWND) (string, win32.WIN32_ERROR)
func HandleTabFocus ¶
func HandleTabFocus(hWnd HWND)
func INDEXTOSTATEIMAGEMASK ¶
func INDEXTOSTATEIMAGEMASK(index int) win32.TREE_VIEW_ITEM_STATE_FLAGS
func IsChildWindow ¶
func IsFocusable ¶
func IsRectEmpty ¶
func LoadIconFromImageData ¶
func MessageBox ¶
func MessageBoxEx ¶
func MessageBoxEx(hWnd HWND, text, caption string, uType win32.MESSAGEBOX_STYLE) (win32.MESSAGEBOX_RESULT, win32.WIN32_ERROR)
func MessageLoop ¶
func MessageLoop()
MessageLoop is the function that's typically called at the end of the main function to pump windows messages to their desired target and bring the UI to life.
func MustRegisterClass ¶
func MustRegisterClass(className string, wndProc WndProcFunc, options ClassOptions)
func ParseMouseMsgParams ¶
func RegisterClass ¶
func RegisterClass(className string, wndProc WndProcFunc, options ClassOptions) (win32.ATOM, error)
func STATEIMAGEMASKTOINDEX ¶
func SetDpiAware ¶
func SetDpiAware()
func SetWindowText ¶
func SetWindowText(hWnd HWND, text string) (bool, win32.WIN32_ERROR)
func ToSysColorBrush ¶
func WithScope ¶
func WithScope(scopedFunc scope.ScopedFunc)
Types ¶
type Accelerator ¶
type AcceleratorTable ¶
type AcceleratorTable struct { Handle win32.HACCEL Items []*Accelerator OnHandleChange SimpleEvent // contains filtered or unexported fields }
func NewAcceleratorTable ¶
func NewAcceleratorTable() *AcceleratorTable
func (*AcceleratorTable) AddItemsFromCommand ¶
func (this *AcceleratorTable) AddItemsFromCommand(commands []*Command)
func (*AcceleratorTable) AddTabPageKeys ¶
func (this *AcceleratorTable) AddTabPageKeys(tabCtrl TabControl)
func (*AcceleratorTable) ClearItems ¶
func (this *AcceleratorTable) ClearItems()
func (*AcceleratorTable) Create ¶
func (this *AcceleratorTable) Create() error
func (*AcceleratorTable) Dispose ¶
func (this *AcceleratorTable) Dispose()
func (*AcceleratorTable) FindByCommand ¶
func (this *AcceleratorTable) FindByCommand(command *Command) *Accelerator
func (*AcceleratorTable) FindById ¶
func (this *AcceleratorTable) FindById(id uint16) *Accelerator
func (*AcceleratorTable) ReCreate ¶
func (this *AcceleratorTable) ReCreate() error
type ActionAware ¶
type ActionAwareSupport ¶
type ActionAwareSupport struct {
// contains filtered or unexported fields
}
func (*ActionAwareSupport) GetAction ¶
func (this *ActionAwareSupport) GetAction() Action
func (*ActionAwareSupport) SetAction ¶
func (this *ActionAwareSupport) SetAction(action Action)
type BackColorAware ¶
type BoundsAware ¶
type BoundsAware = types.BoundsAware
type Button ¶
type Button interface { Control // the parent interface ActionAware // action aware CommandAware // command aware TextAware // text aware ForeColorAware // forecolor aware SetDefault() //sets the button as the default button SetIcon(icon win32.HICON) // sets the icon for the button Click() // simulates a button click ButtonObj() *ButtonObject // returns the underlying ButtonObject }
Button is an interface that represents a button control. It extends the Control interfaces.
type ButtonInterface ¶
ButtonInterface is a composition of Button and ButtonSpi
type ButtonObject ¶
type ButtonObject struct { // ControlObject is the parent struct. ControlObject // ActionAwareSupport is the ActionAware implementation ActionAwareSupport // ForeColorAwareSupport is the ForeColorAware implementation ForeColorAwareSupport // contains filtered or unexported fields }
ButtonObject implements the ButtonInterface It extends ControlObject.
func NewButtonObject ¶
func NewButtonObject() *ButtonObject
NewButtonObject creates a new ButtonObject.
func (*ButtonObject) ButtonObj ¶
func (this *ButtonObject) ButtonObj() *ButtonObject
ButtonObj implements Button.ButtonObj
func (*ButtonObject) GetCommand ¶
func (this *ButtonObject) GetCommand() *Command
GetCommand implements Button.GetCommand
func (*ButtonObject) GetPreferredSize ¶
func (this *ButtonObject) GetPreferredSize(int, int) (cx, cy int)
GetPreferredSize implements Window.GetPreferredSize
func (*ButtonObject) GetText ¶
func (this *ButtonObject) GetText() string
GetText implements Button.GetText
func (*ButtonObject) GetWindowClass ¶
func (this *ButtonObject) GetWindowClass() string
GetWindowClass implements WindowSpi.GetWindowClass
func (*ButtonObject) OnClick ¶
func (this *ButtonObject) OnClick()
OnClick implements ButtonSpi.OnClick
func (*ButtonObject) OnReflectCommand ¶
func (this *ButtonObject) OnReflectCommand(msg *CommandMessage)
OnReflectCommand implements WindowSpi.OnReflectCommand
func (*ButtonObject) OnReflectMessage ¶
func (this *ButtonObject) OnReflectMessage(msg *Message)
OnReflectMessage implements WindowSpi.OnReflectMessage
func (*ButtonObject) OnReflectNotify ¶
func (this *ButtonObject) OnReflectNotify(info *NotifyMessage)
OnReflectNotify implements WindowSpi.OnReflectNotify
func (*ButtonObject) SetCommand ¶
func (this *ButtonObject) SetCommand(command *Command)
SetCommand implements Button.SetCommand
func (*ButtonObject) SetDefault ¶
func (this *ButtonObject) SetDefault()
SetDefault implements Button.SetDefault
func (*ButtonObject) SetIcon ¶
func (this *ButtonObject) SetIcon(icon win32.HICON)
SetIcon implements Button.SetIcon
func (*ButtonObject) SetText ¶
func (this *ButtonObject) SetText(text string)
SetText implements Button.SetText
type ButtonSpi ¶
type ButtonSpi interface { ControlSpi OnClick() // todo: }
ButtonSpi is an interface that provides additional methods specific to implementing a ButtonS.
type CharMessage ¶
type CharMessage Message
func (*CharMessage) GetChar ¶
func (this *CharMessage) GetChar() int
type CheckBoxInterface ¶
type CheckBoxInterface interface { CheckBox CheckBoxSpi }
type CheckBoxObject ¶
type CheckBoxObject struct { ControlObject ForeColorAwareSupport AutoCheck bool OnValueChange SimpleEvent // contains filtered or unexported fields }
func NewCheckBoxObject ¶
func NewCheckBoxObject() *CheckBoxObject
func (*CheckBoxObject) CheckBoxObj ¶
func (this *CheckBoxObject) CheckBoxObj() *CheckBoxObject
func (*CheckBoxObject) GetChecked ¶
func (this *CheckBoxObject) GetChecked() bool
func (*CheckBoxObject) GetControlSpecStyle ¶
func (this *CheckBoxObject) GetControlSpecStyle() (include WINDOW_STYLE, exclude WINDOW_STYLE)
func (*CheckBoxObject) GetOnValueChange ¶
func (this *CheckBoxObject) GetOnValueChange() *SimpleEvent
func (*CheckBoxObject) GetPreferredSize ¶
func (this *CheckBoxObject) GetPreferredSize(int, int) (cx, cy int)
func (*CheckBoxObject) GetText ¶
func (this *CheckBoxObject) GetText() string
func (*CheckBoxObject) GetValue ¶
func (this *CheckBoxObject) GetValue() any
func (*CheckBoxObject) GetWindowClass ¶
func (this *CheckBoxObject) GetWindowClass() string
func (*CheckBoxObject) Init ¶
func (this *CheckBoxObject) Init()
func (*CheckBoxObject) OnReflectCommand ¶
func (this *CheckBoxObject) OnReflectCommand(msg *CommandMessage)
func (*CheckBoxObject) SetChecked ¶
func (this *CheckBoxObject) SetChecked(checked bool)
func (*CheckBoxObject) SetText ¶
func (this *CheckBoxObject) SetText(text string)
func (*CheckBoxObject) SetValue ¶
func (this *CheckBoxObject) SetValue(value any)
type CheckBoxSpi ¶
type CheckBoxSpi interface { ControlSpi }
type ClassOptions ¶
type ClassOptions struct { Style win32.WNDCLASS_STYLES BackgroundBrush win32.HBRUSH CursorResId int }
type ColorDialog ¶
func NewColorDialog ¶
func NewColorDialog() *ColorDialog
type ComboBox ¶
type ComboBox interface { Control Input TextAware ClearItems() AddItem(item types.ValueText) AddItems(items []types.ValueText) AddStringItem(item string) AddStringItems(items []string) GetItemCount() int GetItem(index int) *types.ValueText GetSelectedItem() *types.ValueText GetSelectedIndex() int SetSelectedIndex(index int) ComboBoxObj() *ComboBoxObject }
type ComboBoxInterface ¶
type ComboBoxInterface interface { ComboBox ComboBoxSpi }
type ComboBoxObject ¶
type ComboBoxObject struct { ControlObject ForeColorAwareSupport Editable bool Height int OnValueChange SimpleEvent // contains filtered or unexported fields }
func NewComboBoxObject ¶
func NewComboBoxObject() *ComboBoxObject
func (*ComboBoxObject) AddItem ¶
func (this *ComboBoxObject) AddItem(item types.ValueText)
func (*ComboBoxObject) AddItems ¶
func (this *ComboBoxObject) AddItems(items []types.ValueText)
func (*ComboBoxObject) AddStringItem ¶
func (this *ComboBoxObject) AddStringItem(item string)
func (*ComboBoxObject) AddStringItems ¶
func (this *ComboBoxObject) AddStringItems(items []string)
func (*ComboBoxObject) ClearItems ¶
func (this *ComboBoxObject) ClearItems()
func (*ComboBoxObject) ComboBoxObj ¶
func (this *ComboBoxObject) ComboBoxObj() *ComboBoxObject
func (*ComboBoxObject) GetControlSpecStyle ¶
func (this *ComboBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*ComboBoxObject) GetItemCount ¶
func (this *ComboBoxObject) GetItemCount() int
func (*ComboBoxObject) GetOnValueChange ¶
func (this *ComboBoxObject) GetOnValueChange() *SimpleEvent
func (*ComboBoxObject) GetPreferredSize ¶
func (this *ComboBoxObject) GetPreferredSize(int, int) (int, int)
func (*ComboBoxObject) GetSelectedIndex ¶
func (this *ComboBoxObject) GetSelectedIndex() int
func (*ComboBoxObject) GetSelectedItem ¶
func (this *ComboBoxObject) GetSelectedItem() *types.ValueText
func (*ComboBoxObject) GetText ¶
func (this *ComboBoxObject) GetText() string
func (*ComboBoxObject) GetValue ¶
func (this *ComboBoxObject) GetValue() any
func (*ComboBoxObject) GetWindowClass ¶
func (this *ComboBoxObject) GetWindowClass() string
func (*ComboBoxObject) OnReflectCommand ¶
func (this *ComboBoxObject) OnReflectCommand(msg *CommandMessage)
func (*ComboBoxObject) SetPlaceholder ¶
func (this *ComboBoxObject) SetPlaceholder(placeholder string)
func (*ComboBoxObject) SetSelectedIndex ¶
func (this *ComboBoxObject) SetSelectedIndex(index int)
func (*ComboBoxObject) SetText ¶
func (this *ComboBoxObject) SetText(text string)
func (*ComboBoxObject) SetValue ¶
func (this *ComboBoxObject) SetValue(value any)
type ComboBoxSpi ¶
type ComboBoxSpi interface { ControlSpi }
type Command ¶
type Command struct { Id int Name string Text string //u Image int //u //default 0 means null. use zero to specify 0. Tooltip string Desc string Action Action Category string Disabled bool RadioGroup string Checked bool //u ShortcutKeys []KeyStroke OnChange SimpleEvent OnExecute SimpleEvent }
func NewCommand ¶
func (*Command) GetNoPrefixText ¶
func (*Command) NotifyChange ¶
func (this *Command) NotifyChange()
func (*Command) NotifyExecute ¶
func (this *Command) NotifyExecute()
type CommandAware ¶
type CommandManager ¶
type CommandManager struct { Items []*Command // contains filtered or unexported fields }
func NewCommandManager ¶
func NewCommandManager() *CommandManager
func (*CommandManager) AddItems ¶
func (this *CommandManager) AddItems(items []*Command)
func (*CommandManager) Init ¶
func (this *CommandManager) Init()
func (*CommandManager) Item ¶
func (this *CommandManager) Item(id int) *Command
func (*CommandManager) SetShortcuts ¶
func (this *CommandManager) SetShortcuts(shortcuts map[int][]KeyStroke)
type CommandMessage ¶
type CommandMessage Message
func (*CommandMessage) FromAccelerator ¶
func (this *CommandMessage) FromAccelerator() bool
func (*CommandMessage) FromMenu ¶
func (this *CommandMessage) FromMenu() bool
func (*CommandMessage) GetCmdId ¶
func (this *CommandMessage) GetCmdId() uint16
func (*CommandMessage) GetHwndCtrl ¶
func (this *CommandMessage) GetHwndCtrl() HWND
func (*CommandMessage) GetNotifyCode ¶
func (this *CommandMessage) GetNotifyCode() uint16
type Container ¶
type Container interface { CustomWindow // the parent interface // Add adds one or more controls to the container. Add(control ...Control) // Remove removes the specified control from the container. Remove(ctrl Control) // SetLayout sets the layout for the container. SetLayout(layout Layout) // GetLayout returns the current layout of the container. GetLayout() Layout // UpdateLayout updates the layout of the container. UpdateLayout() // GetChildWindows returns direct child windows. GetChildWindows() []Window // GetDescendantWindows returns all descendant windows. GetDescendantWindows() []Window // GetChildControls returns the child controls of the container. GetChildControls() []Control // GetControlByName returns the control with the specified name. GetControlByName(name string) Control // GetControlById returns the control with the specified ID. GetControlById(id int) Control // GetRootContainer returns the root container of the hierarchy. GetRootContainer() Container // UseDialogFont sets the container to use the dialog font. UseDialogFont() }
Container is an interface that represents a container window, which can hold other controls and manage their layout.
todo: scrollable?
var ContextContainer Container
ContextContainer is the default parent window for newly created controls if no explicit parent is specified.
type ContainerControl ¶
type ContainerControlObject ¶
type ContainerControlObject struct { ContainerObject NameAwareSupport }
func (*ContainerControlObject) CreateIn ¶
func (this *ContainerControlObject) CreateIn( parent Window, extraOpts ...*WindowOptions) Control
func (*ContainerControlObject) GetContainer ¶
func (this *ContainerControlObject) GetContainer() Container
func (*ContainerControlObject) GetControlId ¶
func (this *ContainerControlObject) GetControlId() uint16
func (*ContainerControlObject) GetControlSpecStyle ¶
func (this *ContainerControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*ContainerControlObject) GetDefaultExStyle ¶
func (this *ContainerControlObject) GetDefaultExStyle() WINDOW_EX_STYLE
func (*ContainerControlObject) GetDefaultStyle ¶
func (this *ContainerControlObject) GetDefaultStyle() WINDOW_STYLE
type ContainerInterface ¶
type ContainerInterface interface { Container ContainerSpi }
ContainerInterface is a composition of ContainerWindow and ContainerSpi
type ContainerObject ¶
type ContainerObject struct { // CustomWindowObject is the parent struct. CustomWindowObject Layout Layout // The layout of the container. // contains filtered or unexported fields }
ContainerObject implements the ContainerInterface It extends CustomWindowObject.
func (*ContainerObject) Add ¶
func (this *ContainerObject) Add(controls ...Control)
Add implements Control.Add.
func (*ContainerObject) Dispose ¶
func (this *ContainerObject) Dispose()
Dispose implements Window.Dispose.
func (*ContainerObject) EnsureClassRegistered ¶
func (this *ContainerObject) EnsureClassRegistered()
EnsureClassRegistered implements WindowSpi.EnsureClassRegistered.
func (*ContainerObject) EnsureCustomWndProc ¶
func (this *ContainerObject) EnsureCustomWndProc()
EnsureCustomWndProc implements WindowSpi.EnsureCustomWndProc.
func (*ContainerObject) GetChildControls ¶
func (this *ContainerObject) GetChildControls() []Control
GetChildControls implements Container.GetChildControls
func (*ContainerObject) GetChildWindows ¶
func (this *ContainerObject) GetChildWindows() []Window
GetChildWindows implements Container.GetChildWindows.
func (*ContainerObject) GetControlById ¶
func (this *ContainerObject) GetControlById(id int) Control
GetControlById implements Container.GetControlById.
func (*ContainerObject) GetControlByName ¶
func (this *ContainerObject) GetControlByName(name string) Control
GetControlByName implements Container.GetControlByName.
func (*ContainerObject) GetDescendantWindows ¶
func (this *ContainerObject) GetDescendantWindows() []Window
GetDescendantWindows implements Container.GetDescendantWindows.
func (*ContainerObject) GetLayout ¶
func (this *ContainerObject) GetLayout() Layout
GetLayout implements Container.GetLayout.
func (*ContainerObject) GetRootContainer ¶
func (this *ContainerObject) GetRootContainer() Container
GetRootContainer implements Container.GetRootContainer.
func (*ContainerObject) GetWindowClass ¶
func (this *ContainerObject) GetWindowClass() string
GetWindowClass implements WindowSpi.GetWindowClass.
func (*ContainerObject) OnCtlColorStatic ¶
func (this *ContainerObject) OnCtlColorStatic(msg *Message)
OnCtlColorStatic implements CustomWindowSpi.OnCtlColorStatic.
func (*ContainerObject) PreCreate ¶
func (this *ContainerObject) PreCreate(opts *WindowOptions)
PreCreate implements WindowSpi.PreCreate.
func (*ContainerObject) PreDispose ¶
func (this *ContainerObject) PreDispose()
PreDispose implements WindowSpi.PreDispose.
func (*ContainerObject) Remove ¶
func (this *ContainerObject) Remove(ctrl Control)
Remove implements Control.Remove.
func (*ContainerObject) SetBounds ¶
func (this *ContainerObject) SetBounds(left, top, width, height int)
SetBounds implements Window.SetBounds.
func (*ContainerObject) SetLayout ¶
func (this *ContainerObject) SetLayout(layout Layout)
SetLayout implements Container.SetLayout.
func (*ContainerObject) UpdateLayout ¶
func (this *ContainerObject) UpdateLayout()
UpdateLayout implements Container.UpdateLayout.
func (*ContainerObject) UseDialogFont ¶
func (this *ContainerObject) UseDialogFont()
UseDialogFont implements Container.UseDialogFont.
type ContainerSpi ¶
type ContainerSpi interface { CustomWindowSpi }
ContainerSpi is an interface that provides additional methods specific to implementing a Container.
type ContextContainerRestorer ¶
type ContextContainerRestorer struct {
// contains filtered or unexported fields
}
ContextContainerRestorer is the holder of the original ContextContainer
func SetContextContainer ¶
func SetContextContainer(container Container) ContextContainerRestorer
SetContextContainer sets the specified container as current ContextContainer and returns ContextContainerRestorer that can be used to Restore the old one.
func (ContextContainerRestorer) Restore ¶
func (me ContextContainerRestorer) Restore()
Restore sets ContextContainer to the saved original one.
type ContextMenuAware ¶
type ContextMenuMessage ¶
type ContextMenuMessage Message
func (*ContextMenuMessage) GetClickedHwnd ¶
func (this *ContextMenuMessage) GetClickedHwnd() HWND
func (*ContextMenuMessage) GetScreenPos ¶
func (this *ContextMenuMessage) GetScreenPos() (int, int)
type Control ¶
type Control interface { Window //Control is a Window NameAware //Control is name aware // GetContainer returns the parent container of the control. GetContainer() Container // GetRootContainer returns the root container of the control. GetRootContainer() Container // CreateIn creates the control within a parent window. CreateIn(parent Window, extraOpts ...*WindowOptions) Control // GetControlSpecStyle returns the specific window styles for the control. GetControlSpecStyle() (include, exclude WINDOW_STYLE) // GetControlId returns the Win32 control identifier. GetControlId() uint16 }
Control is an interface that represents a graphical control window. It extends the Window and NameAware interfaces.
type ControlInterface ¶
type ControlInterface interface { Control ControlSpi }
ControlInterface is a composition of Control and ControlSpi
type ControlObject ¶
type ControlObject struct { // WindowObject is the parent struct. WindowObject // NameAwareSupport is a NameAware implementation NameAwareSupport // contains filtered or unexported fields }
ControlObject implements the ControlInterface It extends WindowObject.
func (*ControlObject) Create ¶
func (this *ControlObject) Create(options WindowOptions) error
Create implements Window.Create.
func (*ControlObject) CreateIn ¶
func (this *ControlObject) CreateIn(parent Window, extraOpts ...*WindowOptions) Control
CreateIn implements Control.CreateIn.
func (*ControlObject) GetContainer ¶
func (this *ControlObject) GetContainer() Container
GetContainer implements Control.GetContainer.
func (*ControlObject) GetControlId ¶
func (this *ControlObject) GetControlId() uint16
GetControlId implements Control.GetControlId.
func (*ControlObject) GetControlSpecStyle ¶
func (this *ControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
GetControlSpecStyle implements Control.GetControlSpecStyle.
func (*ControlObject) GetDefaultStyle ¶
func (this *ControlObject) GetDefaultStyle() WINDOW_STYLE
GetDefaultStyle implements WindowSpi.GetDefaultStyle.
func (*ControlObject) GetRootContainer ¶
func (this *ControlObject) GetRootContainer() Container
GetRootContainer implements Control.GetRootContainer.
func (*ControlObject) PostCreate ¶
func (this *ControlObject) PostCreate(opts *WindowOptions)
PostCreate implements WindowSpi.PostCreate.
func (*ControlObject) PreDispose ¶
func (this *ControlObject) PreDispose()
PreDispose implements Window.PreDispose.
type ControlSpi ¶
type ControlSpi interface { WindowSpi }
ControlSpi is an interface that provides additional methods specific to implementing a Control.
type Cursor ¶
func NewCursorFromData ¶
type CustomControl ¶
type CustomControl interface { Control }
type CustomControlObject ¶
type CustomControlObject struct { CustomWindowObject NameAwareSupport // contains filtered or unexported fields }
func (*CustomControlObject) Create ¶
func (this *CustomControlObject) Create(options WindowOptions) error
func (*CustomControlObject) CreateIn ¶
func (this *CustomControlObject) CreateIn(parent Window, extraOpts ...*WindowOptions) Control
func (*CustomControlObject) EnsureClassRegistered ¶
func (this *CustomControlObject) EnsureClassRegistered()
func (*CustomControlObject) EnsureCustomWndProc ¶
func (this *CustomControlObject) EnsureCustomWndProc()
func (*CustomControlObject) GetBackgroundColor ¶
func (this *CustomControlObject) GetBackgroundColor() win32.COLORREF
func (*CustomControlObject) GetContainer ¶
func (this *CustomControlObject) GetContainer() Container
func (*CustomControlObject) GetControlId ¶
func (this *CustomControlObject) GetControlId() uint16
func (*CustomControlObject) GetControlSpecStyle ¶
func (this *CustomControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*CustomControlObject) GetDefaultStyle ¶
func (this *CustomControlObject) GetDefaultStyle() WINDOW_STYLE
func (*CustomControlObject) GetRootContainer ¶
func (this *CustomControlObject) GetRootContainer() Container
dup..
func (*CustomControlObject) GetWindowClass ¶
func (this *CustomControlObject) GetWindowClass() string
func (*CustomControlObject) Init ¶
func (this *CustomControlObject) Init()
func (*CustomControlObject) SetDluBounds ¶
func (this *CustomControlObject) SetDluBounds(left, top, width, height int)
func (*CustomControlObject) WinProc ¶
func (this *CustomControlObject) WinProc(win *WindowObject, m *Message) error
type CustomControlSpi ¶
type CustomControlSpi interface { }
type CustomWindow ¶
type CustomWindow interface { Window // the parent interface IsMouseHovering() bool // checks if the mouse is inside the window's boundary }
CustomWindow is an interface for custom windows. Custom windows are user defined, not system provided windows.
type CustomWindowInterface ¶
type CustomWindowInterface interface { CustomWindow CustomWindowSpi }
CustomWindowInterface is a composition of CustomWindow and CustomWindowSpi
type CustomWindowObject ¶
type CustomWindowObject struct { // WindowObject is the parent struct. WindowObject // contains filtered or unexported fields }
CustomWindowObject implements the CustomWindowInterface It extends WindowObject.
func (*CustomWindowObject) EnsureCustomWndProc ¶
func (this *CustomWindowObject) EnsureCustomWndProc()
EnsureCustomWndProc implements WindowSpi.EnsureCustomWndProc
func (*CustomWindowObject) Init ¶
func (this *CustomWindowObject) Init()
Init implements Window.Init
func (*CustomWindowObject) IsMouseHovering ¶
func (this *CustomWindowObject) IsMouseHovering() bool
IsMouseHovering implements CustomWindow.IsMouseHovering
func (*CustomWindowObject) OnBubbleMessage ¶
func (this *CustomWindowObject) OnBubbleMessage(msg *Message)
OnBubbleMessage implements CustomWindowSpi.OnBubbleMessage
func (*CustomWindowObject) OnCommand ¶
func (this *CustomWindowObject) OnCommand(info *CommandMessage)
OnCommand implements CustomWindowSpi.OnCommand
func (*CustomWindowObject) OnContextMenu ¶
func (this *CustomWindowObject) OnContextMenu(sourceWin Window, pt Point) bool
OnContextMenu implements CustomWindowSpi.OnContextMenu
func (*CustomWindowObject) OnCtlColorStatic ¶
func (this *CustomWindowObject) OnCtlColorStatic(msg *Message)
OnCtlColorStatic implements CustomWindowSpi.OnCtlColorStatic
func (*CustomWindowObject) OnDestroy ¶
func (this *CustomWindowObject) OnDestroy()
OnDestroy implements CustomWindowSpi.OnDestroy
func (*CustomWindowObject) OnEraseBkgnd ¶
func (this *CustomWindowObject) OnEraseBkgnd(hdc win32.HDC) bool
OnEraseBkgnd implements CustomWindowSpi.OnEraseBkgnd
func (*CustomWindowObject) OnKeyDown ¶
func (this *CustomWindowObject) OnKeyDown(args KeyEventArgs)
OnKeyDown implements CustomWindowSpi.OnKeyDown
func (*CustomWindowObject) OnKeyUp ¶
func (this *CustomWindowObject) OnKeyUp(args KeyEventArgs)
OnKeyUp implements CustomWindowSpi.OnKeyUp
func (*CustomWindowObject) OnKillFocus ¶
func (this *CustomWindowObject) OnKillFocus()
OnKillFocus implements CustomWindowSpi.OnKillFocus
func (*CustomWindowObject) OnMouseDown ¶
func (this *CustomWindowObject) OnMouseDown(x int32, y int32, button byte)
OnMouseDown implements CustomWindowSpi.OnMouseDown
func (*CustomWindowObject) OnMouseEnter ¶
func (this *CustomWindowObject) OnMouseEnter()
OnMouseEnter implements CustomWindowSpi.OnMouseEnter
func (*CustomWindowObject) OnMouseLeave ¶
func (this *CustomWindowObject) OnMouseLeave()
OnMouseLeave implements CustomWindowSpi.OnMouseLeave
func (*CustomWindowObject) OnMouseMove ¶
func (this *CustomWindowObject) OnMouseMove(x int32, y int32, button byte)
OnMouseMove implements CustomWindowSpi.OnMouseMove
func (*CustomWindowObject) OnMouseUp ¶
func (this *CustomWindowObject) OnMouseUp(x int32, y int32, button byte)
OnMouseUp implements CustomWindowSpi.OnMouseUp
func (*CustomWindowObject) OnNotify ¶
func (this *CustomWindowObject) OnNotify(msg *NotifyMessage)
OnNotify implements CustomWindowSpi.OnNotify
func (*CustomWindowObject) OnPaint ¶
func (this *CustomWindowObject) OnPaint(hdc win32.HDC, clipRect *win32.RECT)
OnPaint implements CustomWindowSpi.OnPaint
func (*CustomWindowObject) OnSetFocus ¶
func (this *CustomWindowObject) OnSetFocus()
OnSetFocus implements CustomWindowSpi.OnSetFocus
func (*CustomWindowObject) WinProc ¶
func (this *CustomWindowObject) WinProc(winObj *WindowObject, m *Message) error
WinProc implements CustomWindowSpi.WinProc
type CustomWindowSpi ¶
type CustomWindowSpi interface { WindowSpi // the parent interface WinProcProvider // provides a custom WinProc OnCommand(msg *CommandMessage) // processes WM_COMMAND OnNotify(msg *NotifyMessage) // processes WM_NOTIFY OnContextMenu(sourceWin Window, pt Point) bool // processes WM_CONTEXT_MENU OnEraseBkgnd(hdc win32.HDC) bool // processes WM_ERASEBKGND OnCtlColorStatic(msg *Message) // processes WM_CTLCOLORSTATIC OnDestroy() // on WM_DESTROY OnSetFocus() // on WM_SETFOCUS OnKillFocus() // on WM_KILLFOCUS OnMouseDown(x int32, y int32, button byte) // on WM_LBUTTONDOWN/WM_RBUTTONDOWN OnMouseUp(x int32, y int32, button byte) // on WM_LBUTTONUP/WM_RBUTTONUP OnMouseMove(x int32, y int32, button byte) // on WM_MOUSEMOVE OnMouseEnter() // called when the mouse enters the window's boundary OnMouseLeave() // called when the mouse leaves the window's boundary OnKeyDown(args KeyEventArgs) // on WM_KEYDOWN OnKeyUp(args KeyEventArgs) // on WM_KEYUP OnPaint(hdc win32.HDC, clipRect *win32.RECT) // on WM_PAINT // OnBubbleMessage processes reflection messages bubbled up from a child container. OnBubbleMessage(msg *Message) }
CustomWindowSpi is an interface that provides additional methods specific to implementing a CustomWindow.
type DateTimePicker ¶
type DateTimePickerObject ¶
type DateTimePickerObject struct { ControlObject Nullable bool Format string TimeOnly bool UseUpDown bool // contains filtered or unexported fields }
func NewDateTimePickerObject ¶
func NewDateTimePickerObject() *DateTimePickerObject
func (*DateTimePickerObject) Create ¶
func (this *DateTimePickerObject) Create(options WindowOptions) error
func (*DateTimePickerObject) GetControlSpecStyle ¶
func (this *DateTimePickerObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*DateTimePickerObject) GetOnValueChange ¶
func (this *DateTimePickerObject) GetOnValueChange() *SimpleEvent
func (*DateTimePickerObject) GetPreferredSize ¶
func (this *DateTimePickerObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*DateTimePickerObject) GetValue ¶
func (this *DateTimePickerObject) GetValue() any
func (*DateTimePickerObject) GetWindowClass ¶
func (this *DateTimePickerObject) GetWindowClass() string
func (*DateTimePickerObject) Init ¶
func (this *DateTimePickerObject) Init()
func (*DateTimePickerObject) OnReflectNotify ¶
func (this *DateTimePickerObject) OnReflectNotify(msg *NotifyMessage)
func (*DateTimePickerObject) SetValue ¶
func (this *DateTimePickerObject) SetValue(value any)
type DialogObject ¶
type DialogObject struct {
ContainerObject
}
func NewDialogObject ¶
func NewDialogObject() *DialogObject
func (*DialogObject) Show ¶
func (this *DialogObject) Show()
func (*DialogObject) ShowModal ¶
func (this *DialogObject) ShowModal()
type Disposable ¶
type Disposable = types.Disposable
type DpiPosAware ¶
type DpiSizeAware ¶
type EditInterface ¶
type EditObject ¶
type EditObject struct { ControlObject ForeColorAwareSupport OnValueChange SimpleEvent // contains filtered or unexported fields }
func NewEditObject ¶
func NewEditObject() *EditObject
func (*EditObject) Dispose ¶
func (this *EditObject) Dispose()
func (*EditObject) EditObj ¶
func (this *EditObject) EditObj() *EditObject
func (*EditObject) GetDefaultExStyle ¶
func (this *EditObject) GetDefaultExStyle() WINDOW_EX_STYLE
func (*EditObject) GetOnValueChange ¶
func (this *EditObject) GetOnValueChange() *SimpleEvent
func (*EditObject) GetPlaceholder ¶
func (this *EditObject) GetPlaceholder() string
func (*EditObject) GetPreferredSize ¶
func (this *EditObject) GetPreferredSize(int, int) (int, int)
func (*EditObject) GetText ¶
func (this *EditObject) GetText() string
func (*EditObject) GetTextByteLength ¶
func (this *EditObject) GetTextByteLength() int
func (*EditObject) GetTextLength ¶
func (this *EditObject) GetTextLength() int
func (*EditObject) GetValue ¶
func (this *EditObject) GetValue() any
func (*EditObject) GetWindowClass ¶
func (this *EditObject) GetWindowClass() string
func (*EditObject) Init ¶
func (this *EditObject) Init()
func (*EditObject) IsEmpty ¶
func (this *EditObject) IsEmpty() bool
func (*EditObject) OnReflectCommand ¶
func (this *EditObject) OnReflectCommand(info *CommandMessage)
func (*EditObject) OnReflectMessage ¶
func (this *EditObject) OnReflectMessage(msg *Message)
func (*EditObject) SelectAll ¶
func (this *EditObject) SelectAll()
func (*EditObject) SelectEnd ¶
func (this *EditObject) SelectEnd()
func (*EditObject) SetPlaceholder ¶
func (this *EditObject) SetPlaceholder(placeholder string)
func (*EditObject) SetReadonly ¶
func (this *EditObject) SetReadonly(readonly bool)
func (*EditObject) SetText ¶
func (this *EditObject) SetText(text string)
func (*EditObject) SetValue ¶
func (this *EditObject) SetValue(value any)
type EditSpi ¶
type EditSpi interface { ControlSpi }
type EnabledAware ¶
type ExtraEvent ¶
type ExtraEvent = events.ExtraEvent
type ExtraEventInfo ¶
type ExtraEventInfo = events.ExtraEventInfo
type FileDialog ¶
type FileTypeFilter ¶
type FocusAware ¶
type FocusAware interface { Focus() HasFocus() bool }
type ForeColorAware ¶
type ForeColorAwareSupport ¶
type ForeColorAwareSupport struct {
// contains filtered or unexported fields
}
func (*ForeColorAwareSupport) GetForeColor ¶
func (this *ForeColorAwareSupport) GetForeColor() drawing.Color
func (*ForeColorAwareSupport) SetForeColor ¶
func (this *ForeColorAwareSupport) SetForeColor(color drawing.Color)
type Form ¶
type Form interface { TopWindow // the parent interface AsFormObject() *FormObject // returns the underlying FormObject }
Form is an interface that represents a form window, which are designed specifically for creating application windows.
type FormInterface ¶
FormInterface is a composition of Form and FormSpi
type FormObject ¶
type FormObject struct { // TopWindowObject is the parent struct. TopWindowObject // contains filtered or unexported fields }
FormObject implements the FormInterface It extends TopWindowObject.
func NewFormObject ¶
func NewFormObject() *FormObject
func (*FormObject) AsFormObject ¶
func (this *FormObject) AsFormObject() *FormObject
func (*FormObject) EnsureClassRegistered ¶
func (this *FormObject) EnsureClassRegistered()
func (*FormObject) GetDefaultExStyle ¶
func (this *FormObject) GetDefaultExStyle() WINDOW_EX_STYLE
func (*FormObject) GetDefaultStyle ¶
func (this *FormObject) GetDefaultStyle() WINDOW_STYLE
func (*FormObject) GetWindowClass ¶
func (this *FormObject) GetWindowClass() string
func (*FormObject) Init ¶
func (this *FormObject) Init()
func (*FormObject) OnEraseBkgnd ¶
func (this *FormObject) OnEraseBkgnd(hdc win32.HDC) bool
func (*FormObject) OnHandleCreated ¶
func (this *FormObject) OnHandleCreated()
func (*FormObject) PreCreate ¶
func (this *FormObject) PreCreate(opts *WindowOptions)
type FormSpi ¶
type FormSpi interface { TopWindowSpi }
FormSpi is an interface that provides additional methods specific to implementing a Form.
type GetToolTipTextFunc ¶
type GetToolTipTextFunc func() string
func (GetToolTipTextFunc) GetTooltipText ¶
func (me GetToolTipTextFunc) GetTooltipText() string
type GroupBox ¶
type GroupBox interface { Control TextAware GroupBoxObj() *GroupBoxObject }
type GroupBoxInterface ¶
type GroupBoxInterface interface { GroupBox GroupBoxSpi }
type GroupBoxObject ¶
type GroupBoxObject struct { ControlObject Caption string Layout Layout // contains filtered or unexported fields }
func NewGroupBoxObject ¶
func NewGroupBoxObject() *GroupBoxObject
func (*GroupBoxObject) Create ¶
func (this *GroupBoxObject) Create(options WindowOptions) error
func (*GroupBoxObject) GetPreferredSize ¶
func (this *GroupBoxObject) GetPreferredSize(maxWidth int, maxHeight int) (cx, cy int)
func (*GroupBoxObject) GetText ¶
func (this *GroupBoxObject) GetText() string
func (*GroupBoxObject) GetWindowClass ¶
func (this *GroupBoxObject) GetWindowClass() string
func (*GroupBoxObject) GroupBoxObj ¶
func (this *GroupBoxObject) GroupBoxObj() *GroupBoxObject
func (*GroupBoxObject) Init ¶
func (this *GroupBoxObject) Init()
func (*GroupBoxObject) OnReflectMessage ¶
func (this *GroupBoxObject) OnReflectMessage(msg *Message)
func (*GroupBoxObject) PreCreate ¶
func (this *GroupBoxObject) PreCreate(opts *WindowOptions)
func (*GroupBoxObject) SetBounds ¶
func (this *GroupBoxObject) SetBounds(left, top, width, height int)
func (*GroupBoxObject) SetText ¶
func (this *GroupBoxObject) SetText(text string)
type GroupBoxSpi ¶
type GroupBoxSpi interface { ControlSpi }
type HWND ¶
var HWndActive HWND
HWndActive is the handle of the last activated window
func CreateWindow ¶
func FindFirstFocusable ¶
func GetChildHandles ¶
func GetDescendantHandles ¶
type HeaderControl ¶
type HeaderControl interface { Control }
type HeaderControlObject ¶
type HeaderControlObject struct { ControlObject // contains filtered or unexported fields }
func NewHeaderControlObject ¶
func NewHeaderControlObject() *HeaderControlObject
func (*HeaderControlObject) AddItem ¶
func (this *HeaderControlObject) AddItem(text string, width int)
func (*HeaderControlObject) AddItemAligned ¶
func (this *HeaderControlObject) AddItemAligned(text string, width int, align int)
func (*HeaderControlObject) GetControlSpecStyle ¶
func (this *HeaderControlObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*HeaderControlObject) GetItemCount ¶
func (this *HeaderControlObject) GetItemCount() int
func (*HeaderControlObject) GetItemText ¶
func (this *HeaderControlObject) GetItemText(index int) string
func (*HeaderControlObject) GetItemWidth ¶
func (this *HeaderControlObject) GetItemWidth(index int) int
func (*HeaderControlObject) GetPreferredSize ¶
func (this *HeaderControlObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*HeaderControlObject) GetWindowClass ¶
func (this *HeaderControlObject) GetWindowClass() string
func (*HeaderControlObject) Init ¶
func (this *HeaderControlObject) Init()
func (*HeaderControlObject) SetItemWidth ¶
func (this *HeaderControlObject) SetItemWidth(index int, width int)
type IdTextNode ¶
type IdTextNode struct { Id int Text string Children []IdTextNode }
type ImageBoxInterface ¶
type ImageBoxInterface interface { ImageBox ImageBoxSpi }
type ImageBoxObject ¶
type ImageBoxObject struct { ControlObject // contains filtered or unexported fields }
func NewImageBoxObject ¶
func NewImageBoxObject() *ImageBoxObject
func (*ImageBoxObject) GetBitmap ¶
func (this *ImageBoxObject) GetBitmap() win32.HBITMAP
func (*ImageBoxObject) GetControlSpecStyle ¶
func (this *ImageBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*ImageBoxObject) GetIcon ¶
func (this *ImageBoxObject) GetIcon() win32.HICON
func (*ImageBoxObject) GetPreferredSize ¶
func (this *ImageBoxObject) GetPreferredSize(int, int) (cx, cy int)
func (*ImageBoxObject) GetText ¶
func (this *ImageBoxObject) GetText() string
func (*ImageBoxObject) GetWindowClass ¶
func (this *ImageBoxObject) GetWindowClass() string
func (*ImageBoxObject) ImageBoxObj ¶
func (this *ImageBoxObject) ImageBoxObj() *ImageBoxObject
func (*ImageBoxObject) Init ¶
func (this *ImageBoxObject) Init()
func (*ImageBoxObject) OnHandleCreated ¶
func (this *ImageBoxObject) OnHandleCreated()
func (*ImageBoxObject) OnReflectMessage ¶
func (this *ImageBoxObject) OnReflectMessage(msg *Message)
func (*ImageBoxObject) PreCreate ¶
func (this *ImageBoxObject) PreCreate(opts *WindowOptions)
func (*ImageBoxObject) SetBitmap ¶
func (this *ImageBoxObject) SetBitmap(hBitmap win32.HBITMAP)
func (*ImageBoxObject) SetIcon ¶
func (this *ImageBoxObject) SetIcon(hIcon win32.HICON)
func (*ImageBoxObject) UpdateImage ¶
func (this *ImageBoxObject) UpdateImage()
type ImageBoxSpi ¶
type ImageBoxSpi interface { ControlSpi }
type ImageList ¶
type ImageList struct { Cx int Cy int Bpp byte Masked bool // contains filtered or unexported fields }
func GetSysImageList ¶
func NewImageList ¶
func NewImageListFromHandle ¶
func NewImageListFromHandle(hIml win32.HIMAGELIST, owned bool) *ImageList
func (*ImageList) AddImageDatas ¶
func (*ImageList) CopyUnowned ¶
func (*ImageList) Detach ¶
func (this *ImageList) Detach() win32.HIMAGELIST
func (*ImageList) GetHandle ¶
func (this *ImageList) GetHandle() win32.HIMAGELIST
type Input ¶
type Input interface { GetValue() any SetValue(any) Focus() GetOnValueChange() *SimpleEvent //todo:clearify only fire on user action? }
type KeyEventArgs ¶
type KeyEventArgs struct { Key win32.VIRTUAL_KEY Ctrl bool Alt bool Shift bool }
func NewKeyEventArgs ¶
func NewKeyEventArgs(wParam WPARAM, lParam LPARAM) KeyEventArgs
type KeyMessage ¶
type KeyMessage Message
func (*KeyMessage) GetKey ¶
func (this *KeyMessage) GetKey() int
type KeyStroke ¶
func (KeyStroke) IsExtended ¶
type Label ¶
type Label interface { Control TextAware BackColorAware LabelObject() *LabelObject }
type LabelInterface ¶
type LabelObject ¶
type LabelObject struct { ControlObject ForeColorAwareSupport // contains filtered or unexported fields }
func NewLabelObject ¶
func NewLabelObject() *LabelObject
func (*LabelObject) GetPreferredSize ¶
func (this *LabelObject) GetPreferredSize(int, int) (cx, cy int)
func (*LabelObject) GetText ¶
func (this *LabelObject) GetText() string
func (*LabelObject) GetWindowClass ¶
func (this *LabelObject) GetWindowClass() string
func (*LabelObject) LabelObject ¶
func (this *LabelObject) LabelObject() *LabelObject
func (*LabelObject) OnReflectMessage ¶
func (this *LabelObject) OnReflectMessage(msg *Message)
func (*LabelObject) SetText ¶
func (this *LabelObject) SetText(text string)
type LabelSpi ¶
type LabelSpi interface { ControlSpi }
type LayoutContainer ¶
type LayoutContainer struct {
// contains filtered or unexported fields
}
LayoutContainer is an layouts.Container implementation.
func (LayoutContainer) GetClientSize ¶
func (me LayoutContainer) GetClientSize() (cx, cy int)
GetClientSize implements layouts.Container.GetClientSize.
func (LayoutContainer) GetControlByName ¶
func (me LayoutContainer) GetControlByName(name string) layouts.Control
GetControlByName implements layouts.Container.GetControlByName.
func (LayoutContainer) GetControls ¶
func (me LayoutContainer) GetControls() []layouts.Control
GetControls implements layouts.Container.GetControls.
type LinkLabel ¶
type LinkLabel interface { Control TextAware GetOnClick() *Event[*LinkLabelOnClickInfo] }
type LinkLabelObject ¶
type LinkLabelObject struct { ControlObject OnClick Event[*LinkLabelOnClickInfo] Action Action // contains filtered or unexported fields }
func NewLinkLabelObject ¶
func NewLinkLabelObject() *LinkLabelObject
func (*LinkLabelObject) GetControlSpecStyle ¶
func (this *LinkLabelObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*LinkLabelObject) GetOnClick ¶
func (this *LinkLabelObject) GetOnClick() *Event[*LinkLabelOnClickInfo]
func (*LinkLabelObject) GetPreferredSize ¶
func (this *LinkLabelObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*LinkLabelObject) GetText ¶
func (this *LinkLabelObject) GetText() string
func (*LinkLabelObject) GetWindowClass ¶
func (this *LinkLabelObject) GetWindowClass() string
func (*LinkLabelObject) Init ¶
func (this *LinkLabelObject) Init()
func (*LinkLabelObject) OnReflectNotify ¶
func (this *LinkLabelObject) OnReflectNotify(msg *NotifyMessage)
func (*LinkLabelObject) SetText ¶
func (this *LinkLabelObject) SetText(text string)
type LinkLabelOnClickInfo ¶
type LinkLabelOnClickInfo struct { SimpleEventInfo Index int Id string Url string }
type ListBox ¶
type ListBox interface { Control Input ClearItems() AddItem(item types.ValueText) AddItems(items []types.ValueText) AddStringItem(item string) AddStringItems(items []string) GetItemCount() int GetItem(index int) *types.ValueText GetSelectedItem() *types.ValueText GetSelectedIndex() int SetSelectedIndex(index int) GetText() string DeleteItem(index int) IndexFromPoint(x, y int) int ListBoxObj() *ListBoxObject }
type ListBoxObject ¶
type ListBoxObject struct { ControlObject IntegralHeight bool ForeColorAwareSupport OnValueChange SimpleEvent // contains filtered or unexported fields }
func NewListBoxObject ¶
func NewListBoxObject() *ListBoxObject
func (*ListBoxObject) AddItem ¶
func (this *ListBoxObject) AddItem(item types.ValueText)
func (*ListBoxObject) AddItems ¶
func (this *ListBoxObject) AddItems(items []types.ValueText)
func (*ListBoxObject) AddStringItem ¶
func (this *ListBoxObject) AddStringItem(item string)
func (*ListBoxObject) AddStringItems ¶
func (this *ListBoxObject) AddStringItems(items []string)
func (*ListBoxObject) ClearItems ¶
func (this *ListBoxObject) ClearItems()
func (*ListBoxObject) DeleteItem ¶
func (this *ListBoxObject) DeleteItem(index int)
func (*ListBoxObject) GetControlSpecStyle ¶
func (this *ListBoxObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*ListBoxObject) GetDefaultExStyle ¶
func (this *ListBoxObject) GetDefaultExStyle() WINDOW_EX_STYLE
func (*ListBoxObject) GetItemCount ¶
func (this *ListBoxObject) GetItemCount() int
func (*ListBoxObject) GetItemText ¶
func (this *ListBoxObject) GetItemText(index int) string
func (*ListBoxObject) GetOnValueChange ¶
func (this *ListBoxObject) GetOnValueChange() *SimpleEvent
func (*ListBoxObject) GetPreferredSize ¶
func (this *ListBoxObject) GetPreferredSize(int, int) (int, int)
func (*ListBoxObject) GetSelectedIndex ¶
func (this *ListBoxObject) GetSelectedIndex() int
func (*ListBoxObject) GetSelectedItem ¶
func (this *ListBoxObject) GetSelectedItem() *types.ValueText
func (*ListBoxObject) GetText ¶
func (this *ListBoxObject) GetText() string
func (*ListBoxObject) GetValue ¶
func (this *ListBoxObject) GetValue() any
func (*ListBoxObject) GetWindowClass ¶
func (this *ListBoxObject) GetWindowClass() string
func (*ListBoxObject) IndexFromPoint ¶
func (this *ListBoxObject) IndexFromPoint(x, y int) int
func (*ListBoxObject) ListBoxObj ¶
func (this *ListBoxObject) ListBoxObj() *ListBoxObject
func (*ListBoxObject) OnReflectCommand ¶
func (this *ListBoxObject) OnReflectCommand(msg *CommandMessage)
func (*ListBoxObject) SelectByText ¶
func (this *ListBoxObject) SelectByText(text string) bool
func (*ListBoxObject) SetSelectedIndex ¶
func (this *ListBoxObject) SetSelectedIndex(index int)
func (*ListBoxObject) SetValue ¶
func (this *ListBoxObject) SetValue(value any)
type ListView ¶
type ListView interface { Control GetRowCount() int ListViewObj() *ListViewObject }
type ListViewColumn ¶
type ListViewItemEventInfo ¶
type ListViewItemEventInfo struct { SimpleEventInfo Index int }
type ListViewObject ¶
type ListViewObject struct { ControlObject SingleRowSelect bool SortCompareFunc func(row1Id int, row2Id, colIndex int) int OnSelectionChange Event[*ListViewItemEventInfo] OnItemDblClick Event[*ListViewItemEventInfo] Columns []*ListViewColumn // contains filtered or unexported fields }
func NewListViewObject ¶
func NewListViewObject() *ListViewObject
func (*ListViewObject) AddColumn ¶
func (this *ListViewObject) AddColumn(column ListViewColumn)
func (*ListViewObject) AddRow ¶
func (this *ListViewObject) AddRow(info *ListRowInfo) (int, int)
return index,rowid
func (*ListViewObject) AddRowInfos ¶
func (this *ListViewObject) AddRowInfos(rows []*ListRowInfo)
rename?
func (*ListViewObject) AddRows ¶
func (this *ListViewObject) AddRows(rows [][]any, rowAsData bool)
func (*ListViewObject) AddRowsWithData ¶
func (this *ListViewObject) AddRowsWithData(dataRows [][]any)
func (*ListViewObject) AddRowsWithId ¶
func (this *ListViewObject) AddRowsWithId(rows [][]any, rowAsData bool)
func (*ListViewObject) AddRowsWithIdAndData ¶
func (this *ListViewObject) AddRowsWithIdAndData(dataRows [][]any)
func (*ListViewObject) AddRowsWithInfo ¶
func (this *ListViewObject) AddRowsWithInfo(dataRows [][]any)
?
func (*ListViewObject) ClearColumns ¶
func (this *ListViewObject) ClearColumns()
func (*ListViewObject) ClearRows ¶
func (this *ListViewObject) ClearRows()
func (*ListViewObject) Create ¶
func (this *ListViewObject) Create(options WindowOptions) error
func (*ListViewObject) DeleteColumn ¶
func (this *ListViewObject) DeleteColumn(index int)
func (*ListViewObject) DeleteRow ¶
func (this *ListViewObject) DeleteRow(index int)
func (*ListViewObject) Dispose ¶
func (this *ListViewObject) Dispose()
func (*ListViewObject) GetColumnCount ¶
func (this *ListViewObject) GetColumnCount() int
func (*ListViewObject) GetControlSpecStyle ¶
func (this *ListViewObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*ListViewObject) GetRowCount ¶
func (this *ListViewObject) GetRowCount() int
func (*ListViewObject) GetRowData ¶
func (this *ListViewObject) GetRowData(id int) any
func (*ListViewObject) GetSelectedData ¶
func (this *ListViewObject) GetSelectedData() any
func (*ListViewObject) GetSelectedId ¶
func (this *ListViewObject) GetSelectedId() int
func (*ListViewObject) GetSelectedIndex ¶
func (this *ListViewObject) GetSelectedIndex() int
func (*ListViewObject) GetSelectedIndexes ¶
func (this *ListViewObject) GetSelectedIndexes() []int
func (*ListViewObject) GetWindowClass ¶
func (this *ListViewObject) GetWindowClass() string
func (*ListViewObject) IndexToId ¶
func (this *ListViewObject) IndexToId(index int) int
func (*ListViewObject) Init ¶
func (this *ListViewObject) Init()
func (*ListViewObject) ListViewObj ¶
func (this *ListViewObject) ListViewObj() *ListViewObject
func (*ListViewObject) OnReflectNotify ¶
func (this *ListViewObject) OnReflectNotify(msg *NotifyMessage)
func (*ListViewObject) SetColumns ¶
func (this *ListViewObject) SetColumns(columns []ListViewColumn)
func (*ListViewObject) SetImageList ¶
func (this *ListViewObject) SetImageList(iml *ImageList)
func (*ListViewObject) SetRowData ¶
func (this *ListViewObject) SetRowData(id int, data any)
func (*ListViewObject) SetSelectedIndex ¶
func (this *ListViewObject) SetSelectedIndex(index int)
type Menu ¶
type Menu struct { Handle win32.HMENU OnSelected func(item *MenuItem) ImageList *ImageList OwnerDraw bool // contains filtered or unexported fields }
func GetMenuObject ¶
func (*Menu) AddSeparator ¶
func (this *Menu) AddSeparator()
func (*Menu) GetItemCount ¶
func (*Menu) SetItemText ¶
type MenuBar ¶
type MenuBar struct { Menu // contains filtered or unexported fields }
action not working?
func NewMenuBar ¶
func (*MenuBar) CheckItemByName ¶
func (*MenuBar) GetItemByName ¶
type MenuHelpUI ¶
type MenuHelpUI interface { EnterMenuHelp() ShowMenuHelp(text string) ExitMenuHelp() }
type Message ¶
type Message struct { HWnd HWND UMsg uint32 WParam WPARAM LParam LPARAM Handled bool Result win32.LRESULT }
func NewMessageFromMSG ¶
func (*Message) GetHandled ¶
func (*Message) SetHandled ¶
func (*Message) SetHandledWithResult ¶
type MessageProcessFunc ¶
type MessageProcessFunc func(message *Message)
type MessageProcessFuncHolder ¶
type MessageProcessFuncHolder struct {
MessageProcessFunc
}
func (*MessageProcessFuncHolder) ProcessMessage ¶
func (this *MessageProcessFuncHolder) ProcessMessage(message *Message)
type MessageProcessor ¶
type MessageProcessor interface {
ProcessMessage(message *Message)
}
--
func MessageProcessorByFunc ¶
func MessageProcessorByFunc(processFunc MessageProcessFunc) MessageProcessor
type MessageProcessors ¶
type MessageProcessors struct {
// contains filtered or unexported fields
}
func (*MessageProcessors) Add ¶
func (this *MessageProcessors) Add(processor MessageProcessor)
func (*MessageProcessors) ProcessMsg ¶
func (this *MessageProcessors) ProcessMsg(message *Message) bool
func (*MessageProcessors) Remove ¶
func (this *MessageProcessors) Remove(processor MessageProcessor)
type MsgEventListener ¶
type MsgEventListener func(ei *Message)
?type EventListener = events.EventListener[*Message]
type MsgEventSource ¶
type MsgPreprocessor ¶
type MsgPreprocessor interface { // PreprocessMsg is called to preprocess win32 messages in the message loop PreprocessMsg(msg *win32.MSG) bool }
MsgPreprocessor is an interface that wraps the PreprocessMsg method.
type NameAware ¶
type TextAwareSupport struct { text string }
func (this *TextAwareSupport) SetText(text string) { this.text = text }
func (this *TextAwareSupport) GetText() string { return this.text }
type NameAwareSupport ¶
type NameAwareSupport struct {
// contains filtered or unexported fields
}
func (*NameAwareSupport) GetName ¶
func (this *NameAwareSupport) GetName() string
func (*NameAwareSupport) SetName ¶
func (this *NameAwareSupport) SetName(name string)
type NewButton ¶
type NewButton struct { Parent Container // Parent container Id uint16 // Control identifier Name string // Control Name Text string // Text for the button Icon win32.HICON // Icon of the button Pos Point // Control position Size Size // Control Size Disabled bool // Whether the button is disabled Action Action // Action to execute on click }
NewButton is a struct representing the configuration for creating a new button
func (NewButton) Create ¶
func (me NewButton) Create(extraOpts ...*WindowOptions) Button
Create creates a new button with the specified configuration
type NewCheckBox ¶
type NewCheckBox struct { Parent Container Name string Text string Pos Point Size Size Checked bool Disabled bool }
func (NewCheckBox) Create ¶
func (me NewCheckBox) Create(extraOpts ...*WindowOptions) CheckBox
type NewComboBox ¶
type NewComboBox struct { Parent Container Name string Text string Pos Point Size Size Disabled bool Editable bool //? Items []string }
func (NewComboBox) Create ¶
func (me NewComboBox) Create(extraOpts ...*WindowOptions) ComboBox
type NewEdit ¶
type NewEdit struct { Parent Container Name string Text string Pos Point Size Size OnChange SimpleEventListener }
func (NewEdit) Create ¶
func (me NewEdit) Create(extraOpts ...*WindowOptions) Edit
type NewForm ¶
type NewForm struct { Title string Pos Point Size Size ClientSize Size BackColor drawing.Color Icon win32.HICON IconBig win32.HICON NoResize bool NoMinimizeBox bool NoMaximizeBox bool NoIcon bool HelpButton bool Owner TopWindow Center WindowCenter State WindowState TopMost bool SizeGrip bool }
func (NewForm) Create ¶
func (me NewForm) Create(extraOpts ...*WindowOptions) Form
type NewGroupBox ¶
func (NewGroupBox) Create ¶
func (me NewGroupBox) Create(extraOpts ...*WindowOptions) GroupBox
type NewImageBox ¶
type NewImageBox struct { Parent Container Name string Pos Point Size Size Icon win32.HICON Bitmap win32.HBITMAP }
func (NewImageBox) Create ¶
func (me NewImageBox) Create(extraOpts ...*WindowOptions) ImageBox
type NewLabel ¶
func (NewLabel) Create ¶
func (me NewLabel) Create(extraOpts ...*WindowOptions) Label
type NewLinkLabel ¶
type NewLinkLabel struct { Parent Container Name string Text string Pos Point Size Size Action Action }
func (NewLinkLabel) Create ¶
func (me NewLinkLabel) Create(extraOpts ...*WindowOptions) LinkLabel
type NewListBox ¶
type NewListBox struct { Parent Container Name string Pos Point Size Size IntegralHeight bool Items []types.ValueText StringItems []string }
func (NewListBox) Create ¶
func (me NewListBox) Create(extraOpts ...*WindowOptions) ListBox
type NewListView ¶
type NewListView struct { Parent Container Name string Pos Point Size Size Columns []*ListViewColumn Rows []*ListRowInfo }
func (NewListView) Create ¶
func (me NewListView) Create(extraOpts ...*WindowOptions) ListView
type NewNumberEdit ¶
type NewNumberEdit struct { Parent Container Name string Pos Point Size Size Min int Max int Value int }
func (NewNumberEdit) Create ¶
func (me NewNumberEdit) Create(extraOpts ...*WindowOptions) NumberEdit
type NewPanel ¶
func (NewPanel) Create ¶
func (me NewPanel) Create(extraOpts ...*WindowOptions) Panel
type NewProgressBar ¶
type NewProgressBar struct { Parent Container Name string Pos Point Size Size Min int Max int Value int }
func (NewProgressBar) Create ¶
func (me NewProgressBar) Create(extraOpts ...*WindowOptions) ProgressBar
type NewRadioButton ¶
type NewRadioButton struct { Parent Container Name string Text string Pos Point Size Size Checked bool Disabled bool BeginGroup bool }
func (NewRadioButton) Create ¶
func (me NewRadioButton) Create(extraOpts ...*WindowOptions) RadioButton
type NewSlider ¶
func (NewSlider) Create ¶
func (me NewSlider) Create(extraOpts ...*WindowOptions) Slider
type NewSplitter ¶
func (NewSplitter) Create ¶
func (me NewSplitter) Create(extraOpts ...*WindowOptions) Splitter
type NewStatusBar ¶
type NewStatusBar struct { Parent Container Name string Simple bool Parts []*StatusPart }
func (NewStatusBar) Create ¶
func (me NewStatusBar) Create(extraOpts ...*WindowOptions) StatusBar
type NewTabControl ¶
func (NewTabControl) Create ¶
func (me NewTabControl) Create(extraOpts ...*WindowOptions) TabControl
type NewTabSheet ¶
func (NewTabSheet) Create ¶
func (me NewTabSheet) Create(extraOpts ...*WindowOptions) TabSheet
type NewTextArea ¶
func (NewTextArea) Create ¶
func (me NewTextArea) Create(extraOpts ...*WindowOptions) TextArea
type NewToolBar ¶
type NewToolBar struct { Parent Container Name string LabelStyle TbLabelStyle }
func (NewToolBar) Create ¶
func (me NewToolBar) Create(extraOpts ...*WindowOptions) ToolBar
type NewTreeView ¶
type NewTreeView struct { Parent Container Name string Pos Point Size Size Checkable bool NoLines bool NoLinesAtRoot bool NoButtons bool ImageList *ImageList Items []TreeItem Nodes []TreeNode }
func (NewTreeView) Create ¶
func (me NewTreeView) Create(extraOpts ...*WindowOptions) TreeView
type NotifyMessage ¶
type NotifyMessage struct {
*Message
}
func (*NotifyMessage) GetNMHDR ¶
func (this *NotifyMessage) GetNMHDR() *win32.NMHDR
type NumberEdit ¶
type NumberEdit interface { Edit }
type NumberEditObject ¶
type NumberEditObject struct { EditObject // Min int Max int // contains filtered or unexported fields }
func NewNumberEditObject ¶
func NewNumberEditObject() *NumberEditObject
func (*NumberEditObject) Create ¶
func (this *NumberEditObject) Create(options WindowOptions) error
func (*NumberEditObject) GetValue ¶
func (this *NumberEditObject) GetValue() any
func (*NumberEditObject) GetWindowClass ¶
func (this *NumberEditObject) GetWindowClass() string
func (*NumberEditObject) Init ¶
func (this *NumberEditObject) Init()
func (*NumberEditObject) SetBounds ¶
func (this *NumberEditObject) SetBounds(left, top, width, height int)
func (*NumberEditObject) SetValue ¶
func (this *NumberEditObject) SetValue(value any)
type OpenFileDialog ¶
type OpenFileDialog struct { FileDialog FileMustExists bool }
func NewOpenFileDialog ¶
func NewOpenFileDialog() *OpenFileDialog
type Panel ¶
type Panel interface { ContainerControl PanelObj() *PanelObject }
type PanelInterface ¶
type PanelObject ¶
type PanelObject struct { ContainerControlObject WindowBg bool Border bool // contains filtered or unexported fields }
func NewPanelObject ¶
func NewPanelObject() *PanelObject
func (*PanelObject) EnsureClassRegistered ¶
func (this *PanelObject) EnsureClassRegistered()
func (*PanelObject) GetDefaultStyle ¶
func (this *PanelObject) GetDefaultStyle() WINDOW_STYLE
func (*PanelObject) GetWindowClass ¶
func (this *PanelObject) GetWindowClass() string
func (*PanelObject) Init ¶
func (this *PanelObject) Init()
func (*PanelObject) OnCtlColorStatic ¶
func (this *PanelObject) OnCtlColorStatic(msg *Message)
func (*PanelObject) PanelObj ¶
func (this *PanelObject) PanelObj() *PanelObject
func (*PanelObject) WinProc ¶
func (this *PanelObject) WinProc(winObj *WindowObject, m *Message) error
type PanelSpi ¶
type PanelSpi interface { ControlSpi }
type Point ¶
func PointFromDWORD ¶
type ProgressBar ¶
type ProgressBar interface { Control ProgressBarObj() *ProgressBarObject }
type ProgressBarObject ¶
type ProgressBarObject struct { ControlObject // contains filtered or unexported fields }
func NewProgressBarObject ¶
func NewProgressBarObject() *ProgressBarObject
func (*ProgressBarObject) Create ¶
func (this *ProgressBarObject) Create(options WindowOptions) error
func (*ProgressBarObject) GetPreferredSize ¶
func (this *ProgressBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*ProgressBarObject) GetWindowClass ¶
func (this *ProgressBarObject) GetWindowClass() string
func (*ProgressBarObject) Init ¶
func (this *ProgressBarObject) Init()
func (*ProgressBarObject) ProgressBarObj ¶
func (this *ProgressBarObject) ProgressBarObj() *ProgressBarObject
func (*ProgressBarObject) SetMax ¶
func (this *ProgressBarObject) SetMax(max int)
func (*ProgressBarObject) SetMin ¶
func (this *ProgressBarObject) SetMin(min int)
func (*ProgressBarObject) SetPos_ ¶
func (this *ProgressBarObject) SetPos_(pos int)
func (*ProgressBarObject) SetProgress ¶
func (this *ProgressBarObject) SetProgress(progress int)
func (*ProgressBarObject) SetRange ¶
func (this *ProgressBarObject) SetRange(min, max int)
func (*ProgressBarObject) ShowMarquee ¶
func (this *ProgressBarObject) ShowMarquee(marquee bool)
type RadioButton ¶
type RadioButton interface { Control TextAware GetChecked() bool SetChecked(checked bool) GetOnClick() *SimpleEvent RadioButtonObj() *RadioButtonObject }
type RadioButtonInterface ¶
type RadioButtonInterface interface { RadioButton RadioButtonSpi }
type RadioButtonObject ¶
type RadioButtonObject struct { ControlObject ForeColorAwareSupport AutoCheck bool BeginGroup bool OnValueChange SimpleEvent OnClick SimpleEvent }
func NewRadioButtonObject ¶
func NewRadioButtonObject() *RadioButtonObject
func (*RadioButtonObject) GetChecked ¶
func (this *RadioButtonObject) GetChecked() bool
func (*RadioButtonObject) GetControlSpecStyle ¶
func (this *RadioButtonObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*RadioButtonObject) GetOnClick ¶
func (this *RadioButtonObject) GetOnClick() *SimpleEvent
func (*RadioButtonObject) GetOnValueChangeEvent ¶
func (this *RadioButtonObject) GetOnValueChangeEvent() *SimpleEvent
func (*RadioButtonObject) GetPreferredSize ¶
func (this *RadioButtonObject) GetPreferredSize(int, int) (cx, cy int)
func (*RadioButtonObject) GetText ¶
func (this *RadioButtonObject) GetText() string
func (*RadioButtonObject) GetValue ¶
func (this *RadioButtonObject) GetValue() any
func (*RadioButtonObject) GetWindowClass ¶
func (this *RadioButtonObject) GetWindowClass() string
func (*RadioButtonObject) OnReflectCommand ¶
func (this *RadioButtonObject) OnReflectCommand(msg *CommandMessage)
func (*RadioButtonObject) RadioButtonObj ¶
func (this *RadioButtonObject) RadioButtonObj() *RadioButtonObject
func (*RadioButtonObject) SetChecked ¶
func (this *RadioButtonObject) SetChecked(checked bool)
func (*RadioButtonObject) SetText ¶
func (this *RadioButtonObject) SetText(text string)
func (*RadioButtonObject) SetValue ¶
func (this *RadioButtonObject) SetValue(value any)
type RadioButtonSpi ¶
type RadioButtonSpi interface { ControlSpi }
type ReadOnlyAware ¶
type Rect ¶
func RectFromRECT ¶
type SaveFileDialog ¶
type SaveFileDialog struct {
FileDialog
}
func NewSaveFileDialog ¶
func NewSaveFileDialog() *SaveFileDialog
func (*SaveFileDialog) Show ¶
func (this *SaveFileDialog) Show() bool
type SimpleEvent ¶
type SimpleEvent = events.SimpleEvent
type SimpleEventInfo ¶
type SimpleEventInfo = events.SimpleEventInfo
type SimpleEventListener ¶
type SimpleEventListener = events.SimpleEventListener
type SimpleWindowObject ¶
type SimpleWindowObject struct { WindowObject // contains filtered or unexported fields }
func (*SimpleWindowObject) EnsureClassRegistered ¶
func (this *SimpleWindowObject) EnsureClassRegistered()
func (*SimpleWindowObject) EnsureCustomWndProc ¶
func (this *SimpleWindowObject) EnsureCustomWndProc()
func (*SimpleWindowObject) GetWindowClass ¶
func (this *SimpleWindowObject) GetWindowClass() string
type SliderObject ¶
type SliderObject struct { ControlObject Vertical bool // contains filtered or unexported fields }
func NewSliderObject ¶
func NewSliderObject() *SliderObject
func (*SliderObject) GetControlSpecStyle ¶
func (this *SliderObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*SliderObject) GetPreferredSize ¶
func (this *SliderObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*SliderObject) GetRange ¶
func (this *SliderObject) GetRange() (int, int)
func (*SliderObject) GetValue ¶
func (this *SliderObject) GetValue() int
func (*SliderObject) GetWindowClass ¶
func (this *SliderObject) GetWindowClass() string
func (*SliderObject) Init ¶
func (this *SliderObject) Init()
func (*SliderObject) OnHandleCreated ¶
func (this *SliderObject) OnHandleCreated()
func (*SliderObject) SetRange ¶
func (this *SliderObject) SetRange(min int, max int)
func (*SliderObject) SetValue ¶
func (this *SliderObject) SetValue(value int)
type SplitterObject ¶
type SplitterObject struct { ControlObject Width int // contains filtered or unexported fields }
func NewSplitterObject ¶
func NewSplitterObject() *SplitterObject
func (*SplitterObject) Create ¶
func (this *SplitterObject) Create(options WindowOptions) error
func (*SplitterObject) EnsureClassRegistered ¶
func (this *SplitterObject) EnsureClassRegistered()
func (*SplitterObject) GetPreferredSize ¶
func (this *SplitterObject) GetPreferredSize(maxWidth int, maxHeight int) (int, int)
func (*SplitterObject) GetWindowClass ¶
func (this *SplitterObject) GetWindowClass() string
func (*SplitterObject) Init ¶
func (this *SplitterObject) Init()
type StatusBarInterface ¶
type StatusBarInterface interface { StatusBar StatusBarSpi }
type StatusBarMenuHelpUI ¶
type StatusBarMenuHelpUI struct {
// contains filtered or unexported fields
}
func NewStatusBarMenuHelpUI ¶
func NewStatusBarMenuHelpUI(statusBar StatusBar, simpleMode bool) *StatusBarMenuHelpUI
func (*StatusBarMenuHelpUI) EnterMenuHelp ¶
func (this *StatusBarMenuHelpUI) EnterMenuHelp()
func (*StatusBarMenuHelpUI) ExitMenuHelp ¶
func (this *StatusBarMenuHelpUI) ExitMenuHelp()
func (*StatusBarMenuHelpUI) ShowMenuHelp ¶
func (this *StatusBarMenuHelpUI) ShowMenuHelp(text string)
type StatusBarObject ¶
type StatusBarObject struct { ControlObject // contains filtered or unexported fields }
func NewStatusBarObject ¶
func NewStatusBarObject() *StatusBarObject
func (*StatusBarObject) Create ¶
func (this *StatusBarObject) Create(options WindowOptions) error
func (*StatusBarObject) GetPartText ¶
func (this *StatusBarObject) GetPartText(index int) string
func (*StatusBarObject) GetPreferredSize ¶
func (this *StatusBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*StatusBarObject) GetSimpleText ¶
func (this *StatusBarObject) GetSimpleText() string
func (*StatusBarObject) GetText ¶
func (this *StatusBarObject) GetText() string
func (*StatusBarObject) GetWindowClass ¶
func (this *StatusBarObject) GetWindowClass() string
func (*StatusBarObject) Init ¶
func (this *StatusBarObject) Init()
func (*StatusBarObject) IsSimpleMode ¶
func (this *StatusBarObject) IsSimpleMode() bool
func (*StatusBarObject) OnParentResized ¶
func (this *StatusBarObject) OnParentResized()
func (*StatusBarObject) SetPartText ¶
func (this *StatusBarObject) SetPartText(index int, text string)
func (*StatusBarObject) SetParts ¶
func (this *StatusBarObject) SetParts(parts []StatusPart)
func (*StatusBarObject) SetSimpleMode ¶
func (this *StatusBarObject) SetSimpleMode(simple bool)
func (*StatusBarObject) SetSimpleText ¶
func (this *StatusBarObject) SetSimpleText(text string)
func (*StatusBarObject) SetText ¶
func (this *StatusBarObject) SetText(text string)
type StatusBarSpi ¶
type StatusBarSpi interface { ControlSpi }
type StatusPart ¶
type TabControl ¶
type TabControl interface { Control SetItems(items []TabItem) SetSelectedIndex(index int) GetSelectedIndex() int SelectFirst() SelectPrev() SelectNext() SelectLast() TabControlObj() *TabControlObject }
type TabControlObject ¶
type TabControlObject struct { ControlObject // contains filtered or unexported fields }
func NewTabControlObject ¶
func NewTabControlObject() *TabControlObject
func (*TabControlObject) GetPreferredSize ¶
func (this *TabControlObject) GetPreferredSize(maxWidth int, maxHeight int) (int, int)
func (*TabControlObject) GetSelectedIndex ¶
func (this *TabControlObject) GetSelectedIndex() int
func (*TabControlObject) GetWindowClass ¶
func (this *TabControlObject) GetWindowClass() string
func (*TabControlObject) Init ¶
func (this *TabControlObject) Init()
func (*TabControlObject) MeasureControlRect ¶
func (this *TabControlObject) MeasureControlRect(sheetRect Rect) Rect
func (*TabControlObject) MeasureSheetRect ¶
func (this *TabControlObject) MeasureSheetRect(controlRect Rect) Rect
func (*TabControlObject) OnReflectNotify ¶
func (this *TabControlObject) OnReflectNotify(msg *NotifyMessage)
func (*TabControlObject) SelectFirst ¶
func (this *TabControlObject) SelectFirst()
func (*TabControlObject) SelectLast ¶
func (this *TabControlObject) SelectLast()
func (*TabControlObject) SelectNext ¶
func (this *TabControlObject) SelectNext()
func (*TabControlObject) SelectPrev ¶
func (this *TabControlObject) SelectPrev()
func (*TabControlObject) SetBounds ¶
func (this *TabControlObject) SetBounds(left, top, width, height int)
func (*TabControlObject) SetItems ¶
func (this *TabControlObject) SetItems(items []TabItem)
func (*TabControlObject) SetSelectedIndex ¶
func (this *TabControlObject) SetSelectedIndex(index int)
func (*TabControlObject) TabControlObj ¶
func (this *TabControlObject) TabControlObj() *TabControlObject
type TabSheet ¶
type TabSheet interface { ContainerControl //TextAware TitleAware }
type TabSheetInterface ¶
type TabSheetInterface interface { TabSheet TabSheetSpi }
type TabSheetObject ¶
type TabSheetObject struct { ContainerControlObject // contains filtered or unexported fields }
func NewTabSheetObject ¶
func NewTabSheetObject() *TabSheetObject
func (*TabSheetObject) CreateHandle ¶
func (this *TabSheetObject) CreateHandle( className string, options WindowOptions) (HWND, error)
func (*TabSheetObject) GetControlSpecStyle ¶
func (this *TabSheetObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*TabSheetObject) GetTitle ¶
func (this *TabSheetObject) GetTitle() string
func (*TabSheetObject) SetTitle ¶
func (this *TabSheetObject) SetTitle(title string)
type TabSheetSpi ¶
type TabSheetSpi interface { ControlSpi }
type TbLabelStyle ¶
type TbLabelStyle byte
const ( TbLabelDefault TbLabelStyle = 0 //default below TbLabelBelow TbLabelStyle = 1 TbLabelOnRight TbLabelStyle = 2 TbLabelInvisible TbLabelStyle = 3 )
type TextArea ¶
type TextArea interface { Edit TextAreaObj() *TextAreaObject }
type TextAreaObject ¶
type TextAreaObject struct { EditObject NoAutoWrap bool //horz scrollbar? AlwaysShowScrollBar bool ForeColorAwareSupport // contains filtered or unexported fields }
func NewTextAreaObject ¶
func NewTextAreaObject() *TextAreaObject
func (*TextAreaObject) Create ¶
func (this *TextAreaObject) Create(options WindowOptions) error
func (*TextAreaObject) Dispose ¶
func (this *TextAreaObject) Dispose()
func (*TextAreaObject) GetControlSpecStyle ¶
func (this *TextAreaObject) GetControlSpecStyle() (include, exclude WINDOW_STYLE)
func (*TextAreaObject) GetPreferredSize ¶
func (this *TextAreaObject) GetPreferredSize(maxCx int, maxCy int) (int, int)
func (*TextAreaObject) GetWindowClass ¶
func (this *TextAreaObject) GetWindowClass() string
func (*TextAreaObject) Init ¶
func (this *TextAreaObject) Init()
func (*TextAreaObject) OnReflectCommand ¶
func (this *TextAreaObject) OnReflectCommand(msg *CommandMessage)
func (*TextAreaObject) SetBounds ¶
func (this *TextAreaObject) SetBounds(left, top, width, height int)
func (*TextAreaObject) TextAreaObj ¶
func (this *TextAreaObject) TextAreaObj() *TextAreaObject
type Timer ¶
type Timer struct { IntervalMillis int OnTick SimpleEvent // contains filtered or unexported fields }
func CreateTimer ¶
func CreateTimer(intervalMillis int, onTick events.SimpleEventListener) *Timer
type TitleAware ¶
type ToolBar ¶
type ToolBar interface { Control SetImageList(imageList *ImageList, imageListLarge *ImageList) SetLarge(large bool) IsLarge() bool AddItems(items []*ToolBarItem) BuildOverflowMenu() *PopupMenu GetItems() []*ToolBarItem GetItemIds() []int SetItemIds(ids []int) SetDefaultItemIds(ids []int) LoadSystemImages(idbId uint32) int EnableItem(id int, enabled bool) }
type ToolBarInterface ¶
type ToolBarInterface interface { ToolBar ToolBarSpi }
type ToolBarItem ¶
type ToolBarObject ¶
type ToolBarObject struct { ControlObject Flat bool ButtonSize Size LabelStyle TbLabelStyle OnContextMenu SimpleEvent OnDblClick SimpleEvent AllItems []*ToolBarItem // contains filtered or unexported fields }
func NewToolBarObject ¶
func NewToolBarObject() *ToolBarObject
func (*ToolBarObject) AddItems ¶
func (this *ToolBarObject) AddItems(items []*ToolBarItem)
func (*ToolBarObject) BuildOverflowMenu ¶
func (this *ToolBarObject) BuildOverflowMenu() *PopupMenu
func (*ToolBarObject) Clear ¶
func (this *ToolBarObject) Clear()
func (*ToolBarObject) Create ¶
func (this *ToolBarObject) Create(options WindowOptions) error
func (*ToolBarObject) Customize ¶
func (this *ToolBarObject) Customize()
func (*ToolBarObject) Dispose ¶
func (this *ToolBarObject) Dispose()
func (*ToolBarObject) EnableItem ¶
func (this *ToolBarObject) EnableItem(id int, enabled bool)
func (*ToolBarObject) GetControlSpecStyle ¶
func (this *ToolBarObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*ToolBarObject) GetItemIds ¶
func (this *ToolBarObject) GetItemIds() []int
func (*ToolBarObject) GetItems ¶
func (this *ToolBarObject) GetItems() []*ToolBarItem
func (*ToolBarObject) GetPreferredSize ¶
func (this *ToolBarObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
func (*ToolBarObject) GetWindowClass ¶
func (this *ToolBarObject) GetWindowClass() string
func (*ToolBarObject) Init ¶
func (this *ToolBarObject) Init()
func (*ToolBarObject) IsLarge ¶
func (this *ToolBarObject) IsLarge() bool
func (*ToolBarObject) LoadImages ¶
func (this *ToolBarObject) LoadImages(typeId uint32) int
func (*ToolBarObject) LoadSystemImages ¶
func (this *ToolBarObject) LoadSystemImages(idbId uint32) int
func (*ToolBarObject) OnParentResized ¶
func (this *ToolBarObject) OnParentResized()
func (*ToolBarObject) OnReflectCommand ¶
func (this *ToolBarObject) OnReflectCommand(msg *CommandMessage)
func (*ToolBarObject) OnReflectNotify ¶
func (this *ToolBarObject) OnReflectNotify(msg *NotifyMessage)
func (*ToolBarObject) PreProcessMsg ¶
func (this *ToolBarObject) PreProcessMsg(msg *win32.MSG) bool
func (*ToolBarObject) SetBitmapSize ¶
func (this *ToolBarObject) SetBitmapSize(cx, cy int)
func (*ToolBarObject) SetButtonSize ¶
func (this *ToolBarObject) SetButtonSize(cx, cy int)
func (*ToolBarObject) SetButtonWidth ¶
func (this *ToolBarObject) SetButtonWidth(minWdith, maxWidth int)
func (*ToolBarObject) SetDefaultItemIds ¶
func (this *ToolBarObject) SetDefaultItemIds(ids []int)
func (*ToolBarObject) SetImageList ¶
func (this *ToolBarObject) SetImageList(imageList *ImageList, imageListLarge *ImageList)
func (*ToolBarObject) SetItemIds ¶
func (this *ToolBarObject) SetItemIds(ids []int)
func (*ToolBarObject) SetItems ¶
func (this *ToolBarObject) SetItems(items []*ToolBarItem)
func (*ToolBarObject) SetLabelStyle ¶
func (this *ToolBarObject) SetLabelStyle(labelStyle TbLabelStyle)
func (*ToolBarObject) SetLarge ¶
func (this *ToolBarObject) SetLarge(large bool)
func (*ToolBarObject) SetPadding ¶
func (this *ToolBarObject) SetPadding(cx, cy int)
func (*ToolBarObject) UpdateCommandItems ¶
func (this *ToolBarObject) UpdateCommandItems()
type ToolBarSpi ¶
type ToolBarSpi interface { ControlSpi }
type Tooltip ¶
type Tooltip interface { Window AddTool(control Control, textProvider TooltipTextProvider) }
type TooltipObject ¶
type TooltipObject struct { WindowObject // contains filtered or unexported fields }
func NewTooltipObject ¶
func NewTooltipObject() *TooltipObject
func (*TooltipObject) AddTool ¶
func (this *TooltipObject) AddTool(control Control, textProvider TooltipTextProvider)
func (*TooltipObject) CreateIn ¶
func (this *TooltipObject) CreateIn(parent Window, extraOpts ...*WindowOptions)
func (*TooltipObject) Dispose ¶
func (this *TooltipObject) Dispose()
func (*TooltipObject) GetDefaultStyle ¶
func (this *TooltipObject) GetDefaultStyle() WINDOW_STYLE
func (*TooltipObject) GetWindowClass ¶
func (this *TooltipObject) GetWindowClass() string
func (*TooltipObject) Hide ¶
func (this *TooltipObject) Hide()
func (*TooltipObject) Init ¶
func (this *TooltipObject) Init()
func (*TooltipObject) OnReflectNotify ¶
func (this *TooltipObject) OnReflectNotify(msg *NotifyMessage)
func (*TooltipObject) SetText ¶
func (this *TooltipObject) SetText(text string)
func (*TooltipObject) Show ¶
func (this *TooltipObject) Show()
func (*TooltipObject) ShowAt ¶
func (this *TooltipObject) ShowAt(x, y int)
func (*TooltipObject) ShowInplace ¶
func (this *TooltipObject) ShowInplace(x int, y int)
type TooltipTextProvider ¶
type TooltipTextProvider interface {
GetTooltipText() string
}
type TopWindow ¶
type TopWindow interface { Container // the parent interface NameAware // name aware TitleAware // title aware Close() // closes the window CenterOnScreen() // centers the window on the screen CenterToWindow(hWnd HWND) // centers the window relative to the specified window SetClientSize(width, height int) // sets the client area size SetDluClientSize(width, height int) // sets the client area size using Dialog Units. ShowModal() // shows the top window as a modal dialog SetModalResult(result int) // sets the modal result GetModalResult() int // returns the modal result GetAccelHandle() win32.HACCEL // returns the handle to the accelerator table SetMenuBar(menuBar *MenuBar) // sets the menu bar SetMenuHelpUI(menuHelpUI MenuHelpUI) // sets the menu help UI SetAccelerators(accelTable *AcceleratorTable) // sets the accelerator table AsTopWindowObject() *TopWindowObject // returns the underlying TopWindowObject // contains filtered or unexported methods }
TopWindow is an interface that represents a top level window, which can hold other controls and manage their layout.
type TopWindowInterface ¶
type TopWindowInterface interface { TopWindow TopWindowSpi }
TopWindowInterface is a composition of TopWindow and TopWindowSpi
type TopWindowObject ¶
type TopWindowObject struct { // ContainerObject is the parent struct. ContainerObject // NameAwareSupport is the NameAware implementation NameAwareSupport // contains filtered or unexported fields }
TopWindowObject implements the TopWindowInterface It extends ContainerObject.
func (*TopWindowObject) AsTopWindowObject ¶
func (this *TopWindowObject) AsTopWindowObject() *TopWindowObject
func (*TopWindowObject) CenterOnScreen ¶
func (this *TopWindowObject) CenterOnScreen()
func (*TopWindowObject) CenterToWindow ¶
func (this *TopWindowObject) CenterToWindow(hWnd HWND)
func (*TopWindowObject) Close ¶
func (this *TopWindowObject) Close()
func (*TopWindowObject) Create ¶
func (this *TopWindowObject) Create(options WindowOptions) error
func (*TopWindowObject) Dispose ¶
func (this *TopWindowObject) Dispose()
func (*TopWindowObject) EnsureClassRegistered ¶
func (this *TopWindowObject) EnsureClassRegistered()
func (*TopWindowObject) GetAccelHandle ¶
func (this *TopWindowObject) GetAccelHandle() win32.HACCEL
func (*TopWindowObject) GetContainer ¶
func (this *TopWindowObject) GetContainer() Container
func (*TopWindowObject) GetModalResult ¶
func (this *TopWindowObject) GetModalResult() int
func (*TopWindowObject) GetRootContainer ¶
func (this *TopWindowObject) GetRootContainer() Container
func (*TopWindowObject) GetTitle ¶
func (this *TopWindowObject) GetTitle() string
func (*TopWindowObject) GetWindowClass ¶
func (this *TopWindowObject) GetWindowClass() string
func (*TopWindowObject) Init ¶
func (this *TopWindowObject) Init()
func (*TopWindowObject) IsChild ¶
func (this *TopWindowObject) IsChild() bool
func (*TopWindowObject) OnCommand ¶
func (this *TopWindowObject) OnCommand(msg *CommandMessage)
func (*TopWindowObject) OnMenuCommand ¶
func (this *TopWindowObject) OnMenuCommand(wParam WPARAM, lParam LPARAM)
func (*TopWindowObject) OnSize ¶
func (this *TopWindowObject) OnSize(width, height int)
func (*TopWindowObject) PostCreate ¶
func (this *TopWindowObject) PostCreate(opts *WindowOptions)
func (*TopWindowObject) PostShow ¶
func (this *TopWindowObject) PostShow()
func (*TopWindowObject) PreCreate ¶
func (this *TopWindowObject) PreCreate(opts *WindowOptions)
func (*TopWindowObject) SetAccelerators ¶
func (this *TopWindowObject) SetAccelerators(accelTable *AcceleratorTable)
func (*TopWindowObject) SetClientSize ¶
func (this *TopWindowObject) SetClientSize(width, height int)
func (*TopWindowObject) SetDluClientSize ¶
func (this *TopWindowObject) SetDluClientSize(width, height int)
func (*TopWindowObject) SetMenuBar ¶
func (this *TopWindowObject) SetMenuBar(menuBar *MenuBar)
func (*TopWindowObject) SetMenuHelpUI ¶
func (this *TopWindowObject) SetMenuHelpUI(menuHelpUI MenuHelpUI)
func (*TopWindowObject) SetModalResult ¶
func (this *TopWindowObject) SetModalResult(result int)
func (*TopWindowObject) SetTitle ¶
func (this *TopWindowObject) SetTitle(title string)
func (*TopWindowObject) ShowModal ¶
func (this *TopWindowObject) ShowModal()
func (*TopWindowObject) WinProc ¶
func (this *TopWindowObject) WinProc(winObj *WindowObject, m *Message) error
type TopWindowSpi ¶
TopWindowSpi is an interface that provides additional methods specific to implementing a TopWindow.
type TrayIcon ¶
type TreeView ¶
type TreeView interface { Control UseDefaultNodeImages() AddIdTextNodes(nodes []IdTextNode) GetNoScrollSize() (int, int) GetSelectedItem() win32.HTREEITEM GetSelectedId() int GetSelectedText() string SetSelectedId(id int) GetItemIdAtCursor() int IsLeaf(hItem win32.HTREEITEM) bool GetOnNodeDblClick() *SimpleEvent GetOnSelectionChange() *ExtraEvent ExpandAll() TreeViewObj() *TreeViewObject AddNode(node TreeNode) int AddNodes(nodes ...TreeNode) []int AddChildNode(parentId int, node TreeNode) int AddItem(item TreeItem) int AddItems(items []TreeItem) ClearItems() }
type TreeViewObject ¶
type TreeViewObject struct { ControlObject Checkable bool DefaultNodeImage int DefaultNodeSelectedImage int NoLines bool NoLinesAtRoot bool NoButtons bool LazyChildrenLoadCallback func(parentId int) []TreeItem OnNodeDblClick SimpleEvent OnRightClick SimpleEvent OnSelectionChange ExtraEvent //LoadingLazyChildren bool LazyExpandingItems map[win32.HTREEITEM]bool // contains filtered or unexported fields }
func NewTreeViewObject ¶
func NewTreeViewObject() *TreeViewObject
func (*TreeViewObject) AddChildIdTextNode ¶
func (this *TreeViewObject) AddChildIdTextNode(parentId int, node IdTextNode)
func (*TreeViewObject) AddChildNode ¶
func (this *TreeViewObject) AddChildNode(parentId int, node TreeNode) int
func (*TreeViewObject) AddChildTextNode ¶
func (this *TreeViewObject) AddChildTextNode(parentId int, node TextNode)
func (*TreeViewObject) AddIdTextNode ¶
func (this *TreeViewObject) AddIdTextNode(node IdTextNode)
func (*TreeViewObject) AddIdTextNodes ¶
func (this *TreeViewObject) AddIdTextNodes(nodes []IdTextNode)
func (*TreeViewObject) AddItems ¶
func (this *TreeViewObject) AddItems(items []TreeItem)
func (*TreeViewObject) AddNode ¶
func (this *TreeViewObject) AddNode(node TreeNode) int
func (*TreeViewObject) AddNodes ¶
func (this *TreeViewObject) AddNodes(nodes ...TreeNode) []int
func (*TreeViewObject) AddTextNode ¶
func (this *TreeViewObject) AddTextNode(node TextNode)
func (*TreeViewObject) AddTextNodes ¶
func (this *TreeViewObject) AddTextNodes(nodes []TextNode)
func (*TreeViewObject) ClearItems ¶
func (this *TreeViewObject) ClearItems()
func (*TreeViewObject) Create ¶
func (this *TreeViewObject) Create(options WindowOptions) error
func (*TreeViewObject) Dispose ¶
func (this *TreeViewObject) Dispose()
func (*TreeViewObject) ExpandAll ¶
func (this *TreeViewObject) ExpandAll()
func (*TreeViewObject) ExpandItem ¶
func (this *TreeViewObject) ExpandItem(hItem win32.HTREEITEM)
func (*TreeViewObject) GenId ¶
func (this *TreeViewObject) GenId() int
func (*TreeViewObject) GetChildItems ¶
func (this *TreeViewObject) GetChildItems( hParentItem win32.HTREEITEM) []win32.HTREEITEM
func (*TreeViewObject) GetControlSpecStyle ¶
func (this *TreeViewObject) GetControlSpecStyle() (WINDOW_STYLE, WINDOW_STYLE)
func (*TreeViewObject) GetDefaultExStyle ¶
func (this *TreeViewObject) GetDefaultExStyle() WINDOW_EX_STYLE
func (*TreeViewObject) GetItemCheckState ¶
func (this *TreeViewObject) GetItemCheckState(hItem win32.HTREEITEM) int
func (*TreeViewObject) GetItemIdAtCursor ¶
func (this *TreeViewObject) GetItemIdAtCursor() int
func (*TreeViewObject) GetItemText ¶
func (this *TreeViewObject) GetItemText(hItem win32.HTREEITEM) string
func (*TreeViewObject) GetItemsCheckState ¶
func (this *TreeViewObject) GetItemsCheckState(hItems []win32.HTREEITEM) int
func (*TreeViewObject) GetNextItem ¶
func (this *TreeViewObject) GetNextItem(hItem win32.HTREEITEM) win32.HTREEITEM
func (*TreeViewObject) GetNoScrollSize ¶
func (this *TreeViewObject) GetNoScrollSize() (int, int)
func (*TreeViewObject) GetOnNodeDblClick ¶
func (this *TreeViewObject) GetOnNodeDblClick() *SimpleEvent
func (*TreeViewObject) GetOnSelectionChange ¶
func (this *TreeViewObject) GetOnSelectionChange() *ExtraEvent
func (*TreeViewObject) GetParentId ¶
func (this *TreeViewObject) GetParentId(id int) int
func (*TreeViewObject) GetParentItem ¶
func (this *TreeViewObject) GetParentItem(id int) win32.HTREEITEM
?
func (*TreeViewObject) GetPathIds ¶
func (this *TreeViewObject) GetPathIds(id int) []int
func (*TreeViewObject) GetPrevItem ¶
func (this *TreeViewObject) GetPrevItem(hItem win32.HTREEITEM) win32.HTREEITEM
func (*TreeViewObject) GetSelectedId ¶
func (this *TreeViewObject) GetSelectedId() int
func (*TreeViewObject) GetSelectedItem ¶
func (this *TreeViewObject) GetSelectedItem() win32.HTREEITEM
func (*TreeViewObject) GetSelectedText ¶
func (this *TreeViewObject) GetSelectedText() string
func (*TreeViewObject) GetText ¶
func (this *TreeViewObject) GetText(id int) string
func (*TreeViewObject) GetWindowClass ¶
func (this *TreeViewObject) GetWindowClass() string
func (*TreeViewObject) Init ¶
func (this *TreeViewObject) Init()
func (*TreeViewObject) IsParent ¶
func (this *TreeViewObject) IsParent(id int) bool
func (*TreeViewObject) LoadLazyChildItems ¶
func (this *TreeViewObject) LoadLazyChildItems(parentId int) []TreeItem
func (*TreeViewObject) OnReflectNotify ¶
func (this *TreeViewObject) OnReflectNotify(msg *NotifyMessage)
func (*TreeViewObject) SetImageList ¶
func (this *TreeViewObject) SetImageList(iml *ImageList)
func (*TreeViewObject) SetItemCheckState ¶
func (this *TreeViewObject) SetItemCheckState(hItem win32.HTREEITEM, state int)
func (*TreeViewObject) SetItemNoChildren ¶
func (this *TreeViewObject) SetItemNoChildren(hItem win32.HTREEITEM)
func (*TreeViewObject) SetSelectedId ¶
func (this *TreeViewObject) SetSelectedId(id int)
func (*TreeViewObject) SetSelectedItem ¶
func (this *TreeViewObject) SetSelectedItem(hItem win32.HTREEITEM)
func (*TreeViewObject) TreeViewObj ¶
func (this *TreeViewObject) TreeViewObj() *TreeViewObject
func (*TreeViewObject) UseDefaultNodeImages ¶
func (this *TreeViewObject) UseDefaultNodeImages()
type TreeViewSpi ¶
type TreeViewSpi interface { ControlSpi LoadLazyChildItems(parentId int) []TreeItem }
type UidGen ¶
type UidGen struct {
// contains filtered or unexported fields
}
func (*UidGen) IsGenerated ¶
type VisibleAware ¶
type WIN32_ERROR ¶
type WIN32_ERROR = win32.WIN32_ERROR
func SendMessage ¶
func SendMessage[T_WPARAM, T_LPARAM types.PtrCompatible]( hWnd HWND, Msg uint32, wParam T_WPARAM, lParam T_LPARAM) (uintptr, WIN32_ERROR)
type WINDOW_EX_STYLE ¶
type WINDOW_EX_STYLE = win32.WINDOW_EX_STYLE
type WINDOW_STYLE ¶
type WINDOW_STYLE = win32.WINDOW_STYLE
var DefaultControlStyle WINDOW_STYLE = win32.WS_CHILD | win32.WS_VISIBLE | win32.WS_TABSTOP
DefaultControlStyle is the default window style for controls.
type WaitCursor ¶
type WaitCursor struct {
// contains filtered or unexported fields
}
func NewWaitCursor ¶
func NewWaitCursor() WaitCursor
func (WaitCursor) Restore ¶
func (me WaitCursor) Restore()
func (WaitCursor) Update ¶
func (me WaitCursor) Update()
type WinProcFunc ¶
type WinProcFunc func(win *WindowObject, msg *Message) error
type WinProcProvider ¶
type WinProcProvider interface { // WinProc processes messages targeting the window object WinProc(win *WindowObject, m *Message) error }
WinProcProvider wraps the WinProc method
type Window ¶
type Window interface { virtual.Virtual types.LifecycleAware types.DataAware EnabledAware VisibleAware FocusAware FontAware BackColorAware ContextMenuAware BoundsAware PosAware SizeAware MsgEventSource // GetHandle returns the win32 handle of the window. GetHandle() HWND // Show displays the window. Show() // Hide hides the window. Hide() // IsVisible checks whether the window is visible IsVisible() bool // Invalidate adds all the window's client area to the update region Invalidate() // Update causes an immediate redraw on the update region Update() // GetPreferredSize returns the preferred size of the window // given the maximum width and height. GetPreferredSize(maxWidth int, maxHeight int) (int, int) // AutoSize adjusts the size of the window to fit its contents, // using the maximum size provided if available. AutoSize(maxSize ...Size) // GetClientSize returns the width and height of the client area of the window. GetClientSize() (cx, cy int) // GetDpiClientSize returns the width and height of // the client area of the window, adjusted for DPI scaling. GetDpiClientSize() (cx, cy int) // SetDluBounds sets the size and position of the control using dialog units. SetDluBounds(left, top, width, height int) // GetParentHandle returns the handle of the parent window. GetParentHandle() HWND // Contains checks if the hWnd is the handle of a window contained in this window. // The contained window is either a direct child or a deeper descendant window. Contains(hWnd win32.HWND) bool // GetParent returns the parent window of this window. GetParent() Window // GetRootWindow returns the root window that contains the current window. GetRootWindow() Window // GetStyle returns the window style. GetStyle() WINDOW_STYLE // GetExStyle returns the extended window style. GetExStyle() WINDOW_EX_STYLE // ModifyStyle modifies the window style using the provided style flags. // A style with value 0 is equivalent to the current style. ModifyStyle(style, styleInclude, styleExclude win32.WINDOW_STYLE) // IsChild returns true if the window is a child window. IsChild() bool // Create creates the window with the specified options. Create(options WindowOptions) error // GetOnCreate returns the event that is triggered when the window is created. GetOnCreate() *SimpleEvent // Refresh redraws the window. Refresh() // AddDisposeAction adds an action to be executed when the window is disposed. AddDisposeAction(action Action) // AsWindowObject returns the underlying WindowObject. AsWindowObject() *WindowObject // AddMessageProcessor adds a message processor to handle incoming messages. AddMessageProcessor(processor MessageProcessor) // RemoveMessageProcessor removes a message processor. RemoveMessageProcessor(processor MessageProcessor) }
Window is an interface that represents a graphical window, it exposes the common functionalities for Win32 windows.
func GetActiveWin ¶
func GetActiveWin() Window
func GetTopWindows ¶
func GetTopWindows() []Window
type WindowCenter ¶
type WindowCenter int
const ( CenterNone WindowCenter = 0 CenterScreen WindowCenter = 1 CenterParent WindowCenter = 2 )
type WindowFlag ¶
type WindowFlag uint32
const ( FlagPreDisposed WindowFlag = 0x02 // PreDispose has been called FlagDisposed WindowFlag = 0x04 // Dispose has been called FlagCollapsed WindowFlag = 0x08 // collapsed in layout FlagDesignMode WindowFlag = 0x10 // in design mode )
Window flags
type WindowInterface ¶
WindowInterface is the interface that combines Window and WindowSpi
func GetWindow ¶
func GetWindow(hWnd HWND) WindowInterface
type WindowObject ¶
type WindowObject struct { // VirtualObject is the parent struct. virtual.VirtualObject[WindowInterface] // Handle is the underlying win32 window handle. Handle HWND // OnCreateEvent is fired after win32 window handle is created. OnCreateEvent SimpleEvent // WinProcFunc optionally specifies a function that // provide a custom WinProc implementation. WinProcFunc WinProcFunc // contains filtered or unexported fields }
WindowObject implements the WindowInterface. It extends VirtualObject.
func NewWindowObject ¶
func NewWindowObject() *WindowObject
NewWindowObject creates a new WindowObject.
func (*WindowObject) AddDisposeAction ¶
func (this *WindowObject) AddDisposeAction(action Action)
AddDisposeAction implements Window.AddDisposeAction
func (*WindowObject) AddMessageProcessor ¶
func (this *WindowObject) AddMessageProcessor(processor MessageProcessor)
AddMessageProcessor implements Window.AddMessageProcessor
func (*WindowObject) AsWindowObject ¶
func (this *WindowObject) AsWindowObject() *WindowObject
WindowObject implements Window.WindowObject
func (*WindowObject) Attach ¶
func (this *WindowObject) Attach(hWnd HWND) error
Attach attaches this WindowObject to an existing window handle
func (*WindowObject) AutoSize ¶
func (this *WindowObject) AutoSize(optMaxSize ...Size)
AutoSize implements Window.AutoSize
func (*WindowObject) CallDefaultWndProc ¶
func (this *WindowObject) CallDefaultWndProc(msg *Message) error
CallDefaultWndProc implements WindowSpi.CallDefaultWndProc
func (*WindowObject) CallOriWndProc ¶
func (this *WindowObject) CallOriWndProc(msg *Message) error
CallOriWndProc calls the original or default window procedure
func (*WindowObject) Contains ¶
func (this *WindowObject) Contains(hWnd win32.HWND) bool
Contains implements Window.Contains
func (*WindowObject) ContainsFocus ¶
func (this *WindowObject) ContainsFocus() bool
ContainsFocus checks whether this window has focus or contains the focused window handle
func (*WindowObject) Create ¶
func (this *WindowObject) Create(options WindowOptions) error
Create implements Window.Create
func (*WindowObject) CreateHandle ¶
func (this *WindowObject) CreateHandle( className string, options WindowOptions) (HWND, error)
CreateHandle implements WindowSpi.CreateHandle
func (*WindowObject) Destroy ¶
func (this *WindowObject) Destroy()
Destroy destroys the Win32 window and disposes this WindowObject
func (*WindowObject) Detach ¶
func (this *WindowObject) Detach() error
Detach detaches this WindowObject from its window handle
func (*WindowObject) Dispose ¶
func (this *WindowObject) Dispose()
Dispose implements Window.Dispose
func (*WindowObject) DluToPx ¶
func (this *WindowObject) DluToPx(x, y int) (int, int)
DluToPx converts x, y in dialog units to pixel values
func (*WindowObject) EnsureClassRegistered ¶
func (this *WindowObject) EnsureClassRegistered()
EnsureClassRegistered implements WindowSpi.EnsureClassRegistered
func (*WindowObject) EnsureCustomWndProc ¶
func (this *WindowObject) EnsureCustomWndProc()
EnsureCustomWndProc implements WindowSpi.EnsureCustomWndProc
func (*WindowObject) FireMsgEvent ¶
func (this *WindowObject) FireMsgEvent(msg *Message) bool
FireMsgEvent fires the event for the specified window message and returns whether it's been handled
func (*WindowObject) GetBackColor ¶
func (this *WindowObject) GetBackColor() drawing.Color
GetBackColor implements Window.GetBackColor
func (*WindowObject) GetBounds ¶
func (this *WindowObject) GetBounds() Rect
GetBounds implements Window.GetBounds
func (*WindowObject) GetClientSize ¶
func (this *WindowObject) GetClientSize() (cx, cy int)
GetClientSize implements Window.GetClientSize
func (*WindowObject) GetClientSize32 ¶
func (this *WindowObject) GetClientSize32() (cx, cy int32)
func (*WindowObject) GetContextMenu ¶
func (this *WindowObject) GetContextMenu() *PopupMenu
GetContextMenu implements Window.GetContextMenu
func (*WindowObject) GetData ¶
func (this *WindowObject) GetData(key string) any
GetData implements Window.GetData
func (*WindowObject) GetDefaultExStyle ¶
func (this *WindowObject) GetDefaultExStyle() WINDOW_EX_STYLE
GetDefaultExStyle implements WindowSpi.GetDefaultExStyle
func (*WindowObject) GetDefaultStyle ¶
func (this *WindowObject) GetDefaultStyle() WINDOW_STYLE
GetDefaultStyle implements WindowSpi.GetDefaultStyle
func (*WindowObject) GetDpiClientSize ¶
func (this *WindowObject) GetDpiClientSize() (cx, cy int)
GetDpiClientSize implements Window.GetDpiClientSize
func (*WindowObject) GetDpiPos ¶
func (this *WindowObject) GetDpiPos() (x, y int)
GetDpiPos implements Window.GetDpiPos
func (*WindowObject) GetDpiSize ¶
func (this *WindowObject) GetDpiSize() (cx, cy int)
GetDpiSize implements Window.GetDpiSize
func (*WindowObject) GetEnabled ¶
func (this *WindowObject) GetEnabled() bool
GetEnabled implements Window.GetEnabled
func (*WindowObject) GetEvent ¶
func (this *WindowObject) GetEvent(uMsg uint32) *MsgEvent
GetEvent implements Window.GetEvent
func (*WindowObject) GetExStyle ¶
func (this *WindowObject) GetExStyle() WINDOW_EX_STYLE
GetExStyle implements Window.GetExStyle
func (*WindowObject) GetFont ¶
func (this *WindowObject) GetFont() *gdi.Font
GetFont implements Window.GetFont
func (*WindowObject) GetHandle ¶
func (this *WindowObject) GetHandle() HWND
GetHandle implements Window.GetHandle
func (*WindowObject) GetOnCreate ¶
func (this *WindowObject) GetOnCreate() *SimpleEvent
GetOnCreate implements Window.GetOnCreate
func (*WindowObject) GetParent ¶
func (this *WindowObject) GetParent() Window
GetParent implements Window.GetParent
func (*WindowObject) GetParentHandle ¶
func (this *WindowObject) GetParentHandle() HWND
GetParentHandle implements Window.GetParentHandle
func (*WindowObject) GetPos ¶
func (this *WindowObject) GetPos() (x, y int)
GetPos implements Window.GetPos
func (*WindowObject) GetPreferredSize ¶
func (this *WindowObject) GetPreferredSize(cxMax int, cyMax int) (int, int)
GetPreferredSize implements Window.GetPreferredSize
func (*WindowObject) GetRootHandle ¶
func (this *WindowObject) GetRootHandle() HWND
GetRootHandle returns the handle of the root ancestor windows of this window
func (*WindowObject) GetRootWindow ¶
func (this *WindowObject) GetRootWindow() Window
GetRootWindow implements Window.GetRootWindow
func (*WindowObject) GetSize ¶
func (this *WindowObject) GetSize() (cx, cy int)
GetSize implements Window.GetSize
func (*WindowObject) GetStyle ¶
func (this *WindowObject) GetStyle() WINDOW_STYLE
GetStyle implements Window.GetStyle
func (*WindowObject) GetVisible ¶
func (this *WindowObject) GetVisible() bool
GetVisible implements Window.GetVisible
func (*WindowObject) GetWindowClass ¶
func (this *WindowObject) GetWindowClass() string
GetWindowClass implements WindowSpi.GetWindowClass
func (*WindowObject) HasFlag ¶
func (this *WindowObject) HasFlag(flag WindowFlag) bool
HasFlag checks if the window has the specified flag
func (*WindowObject) HasFocus ¶
func (this *WindowObject) HasFocus() bool
HasFocus implements Window.HasFocus
func (*WindowObject) Invalidate ¶
func (this *WindowObject) Invalidate()
Invalidate implements Window.Invalidate
func (*WindowObject) IsChild ¶
func (this *WindowObject) IsChild() bool
IsChild implements Window.IsChild
func (*WindowObject) IsVisible ¶
func (this *WindowObject) IsVisible() bool
IsVisible implements Window.IsVisible
func (*WindowObject) ModifyStyle ¶
func (this *WindowObject) ModifyStyle(style, styleInclude, styleExclude win32.WINDOW_STYLE)
ModifyStyle implements Window.ModifyStyle
func (*WindowObject) OnHandleCreated ¶
func (this *WindowObject) OnHandleCreated()
OnHandleCreated implements WindowSpi.OnHandleCreated
func (*WindowObject) OnParentResized ¶
func (this *WindowObject) OnParentResized()
OnParentResized implements WindowSpi.OnParentResized
func (*WindowObject) OnReflectCommand ¶
func (this *WindowObject) OnReflectCommand(info *CommandMessage)
OnReflectCommand implements WindowSpi.OnReflectCommand
func (*WindowObject) OnReflectMessage ¶
func (this *WindowObject) OnReflectMessage(msg *Message)
OnReflectMessage implements WindowSpi.OnReflectMessage
func (*WindowObject) OnReflectNotify ¶
func (this *WindowObject) OnReflectNotify(info *NotifyMessage)
OnReflectNotify implements WindowSpi.OnReflectNotify
func (*WindowObject) OnSize ¶
func (this *WindowObject) OnSize(width, height int)
OnSize implements WindowSpi.OnSize
func (*WindowObject) PostCreate ¶
func (this *WindowObject) PostCreate(opts *WindowOptions)
PostCreate implements WindowSpi.PostCreate
func (*WindowObject) PostShow ¶
func (this *WindowObject) PostShow()
PostShow implements WindowSpi.PostShow
func (*WindowObject) PreCreate ¶
func (this *WindowObject) PreCreate(opts *WindowOptions)
PreCreate implements WindowSpi.PreCreate
func (*WindowObject) PreDispose ¶
func (this *WindowObject) PreDispose()
PreDispose implements WindowSpi.PreDispose
func (*WindowObject) PreProcessMsg ¶
func (this *WindowObject) PreProcessMsg(msg *win32.MSG) bool
PreProcessMsg implements WindowSpi.PreProcessMsg
func (*WindowObject) PreShow ¶
func (this *WindowObject) PreShow()
PreShow implements WindowSpi.PreShow
func (*WindowObject) PxToDlu ¶
func (this *WindowObject) PxToDlu(x, y int) (int, int)
PxToDlu converts x, y in pixels to dialog units
func (*WindowObject) Refresh ¶
func (this *WindowObject) Refresh()
Refresh implements Window.Refresh
func (*WindowObject) RemoveMessageProcessor ¶
func (this *WindowObject) RemoveMessageProcessor(processor MessageProcessor)
RemoveMessageProcessor implements Window.RemoveMessageProcessor
func (*WindowObject) SetBackColor ¶
func (this *WindowObject) SetBackColor(color drawing.Color)
SetBackColor implements Window.SetBackColor
func (*WindowObject) SetBounds ¶
func (this *WindowObject) SetBounds(left, top, width, height int)
SetBounds implements Window.SetBounds
func (*WindowObject) SetContextMenu ¶
func (this *WindowObject) SetContextMenu(menu *PopupMenu)
SetContextMenu implements Window.SetContextMenu
func (*WindowObject) SetData ¶
func (this *WindowObject) SetData(key string, value any)
SetData implements Window.SetData
func (*WindowObject) SetDluBounds ¶
func (this *WindowObject) SetDluBounds(left, top, width, height int)
SetDluBounds implements Window.SetDluBounds.
func (*WindowObject) SetDpiPos ¶
func (this *WindowObject) SetDpiPos(x int, y int)
SetDpiPos implements Window.SetDpiPos
func (*WindowObject) SetDpiSize ¶
func (this *WindowObject) SetDpiSize(cx int, cy int)
SetDpiSize implements Window.SetDpiSize
func (*WindowObject) SetEnabled ¶
func (this *WindowObject) SetEnabled(enabled bool)
SetEnabled implements Window.SetEnabled
func (*WindowObject) SetFlag ¶
func (this *WindowObject) SetFlag(flag WindowFlag, set bool)
SetFlag sets or unsets the specified WindowFlag of the window.
func (*WindowObject) SetFont ¶
func (this *WindowObject) SetFont(font *gdi.Font)
SetFont implements Window.SetFont
func (*WindowObject) SetPos ¶
func (this *WindowObject) SetPos(x int, y int)
SetPos implements Window.SetPos
func (*WindowObject) SetSize ¶
func (this *WindowObject) SetSize(cx int, cy int)
SetSize implements Window.SetSize
func (*WindowObject) SetVisible ¶
func (this *WindowObject) SetVisible(visible bool)
SetVisible implements Window.SetVisible
func (*WindowObject) TryGetEvent ¶
func (this *WindowObject) TryGetEvent(uMsg uint32) (*MsgEvent, bool)
TryGetEvent implements Window.TryGetEvent
type WindowOptions ¶
type WindowOptions struct { //WinProcFunc WndProcFunc ClassName string WindowName string ParentHandle HWND HMENU win32.HMENU Style WINDOW_STYLE StyleInclude WINDOW_STYLE StyleExclude WINDOW_STYLE ExStyle WINDOW_EX_STYLE ExStyleExclude WINDOW_EX_STYLE ExStyleInclude WINDOW_EX_STYLE Width int Height int Left int Top int ControlId uint16 }
type WindowSpi ¶
type WindowSpi interface { // GetWindowClass returns the class name of the window. GetWindowClass() string // GetDefaultStyle returns the default window style. GetDefaultStyle() WINDOW_STYLE // GetDefaultExStyle returns the default extended window style. GetDefaultExStyle() WINDOW_EX_STYLE // EnsureClassRegistered ensures that the window class is registered. EnsureClassRegistered() // EnsureCustomWndProc ensures that the custom window procedure is set up. EnsureCustomWndProc() // OnHandleCreated is called when the window handle is created. OnHandleCreated() // CreateHandle creates a win32 window with the specified class name and options. CreateHandle(className string, options WindowOptions) (HWND, error) // OnReflectMessage processes notification messages of this window // that are sent to its parent window, OnReflectMessage(msg *Message) // OnReflectCommand processes the WM_COMMAND reflection message. OnReflectCommand(msg *CommandMessage) // OnReflectNotify processes the WM_NOTIFY reflection message. OnReflectNotify(msg *NotifyMessage) // PreCreate is called before the win32 window is created. PreCreate(opts *WindowOptions) // PreDispose is called before the win32 window is destroyed. PreDispose() // PostCreate is called after the win32 window is created. PostCreate(opts *WindowOptions) // PreShow is called before showing the window. PreShow() //?first // PostShow is called after the window is shown. PostShow() // OnSize is called after calling SetSize or SetBounds OnSize(width, height int) // PreProcessMsg is called before processing a window message. // Return true to mark the message as handled. PreProcessMsg(msg *win32.MSG) bool // CallDefaultWndProc calls the default window procedure for processing a message. CallDefaultWndProc(msg *Message) error }
WindowSpi is an interface that provides additional methods specific to implementing a window.
type WindowState ¶
type WindowState int
const ( StateNormal WindowState = 0 StateMaximized WindowState = 1 StateMinimized WindowState = 2 )
Source Files
¶
- 0_package.go
- 1_messageloop.go
- 2_wndproc.go
- accelerator.go
- button.go
- checkbox.go
- colordialog.go
- combobox.go
- command.go
- consts.go
- container.go
- containercontrol.go
- control.go
- cursor.go
- customcontrol.go
- customwindow.go
- datetimepicker.go
- dialog.go
- dpi.go
- edit.go
- event.go
- filedialog.go
- form.go
- groupbox.go
- headercontrol.go
- icon.go
- imagebox.go
- imagelist.go
- input.go
- label.go
- linklabel.go
- listbox.go
- listview.go
- menu.go
- menuhelp.go
- metrics.go
- numberedit.go
- panel.go
- progressbar.go
- radiobutton.go
- simplewindow.go
- slider.go
- splitter.go
- statusbar.go
- tabcontrol.go
- tabsheet.go
- textarea.go
- timer.go
- toolbar.go
- tooltip.go
- topwindow.go
- trayicon.go
- treeview.go
- types.go
- uidgen.go
- utils.go
- waitcursor.go
- window.go