MCPcopy Create free account
hub / github.com/lxn/walk / Widget

Interface Widget

widget.go:40–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38)
39
40type Widget interface {
41 Window
42
43 // Alignment returns the alignment of the Widget.
44 Alignment() Alignment2D
45
46 // AlwaysConsumeSpace returns if the Widget should consume space even if it
47 // is not visible.
48 AlwaysConsumeSpace() bool
49
50 // AsWidgetBase returns a *WidgetBase that implements Widget.
51 AsWidgetBase() *WidgetBase
52
53 // CreateLayoutItem creates and returns a new LayoutItem specific to the
54 // concrete Widget type, that carries all data and logic required to layout
55 // the Widget.
56 CreateLayoutItem(ctx *LayoutContext) LayoutItem
57
58 // GraphicsEffects returns a list of WidgetGraphicsEffects that are applied to the Widget.
59 GraphicsEffects() *WidgetGraphicsEffectList
60
61 // LayoutFlags returns a combination of LayoutFlags that specify how the
62 // Widget wants to be treated by Layout implementations.
63 LayoutFlags() LayoutFlags
64
65 // MinSizeHint returns the minimum outer size in native pixels, including decorations, that
66 // makes sense for the respective type of Widget.
67 MinSizeHint() Size
68
69 // Parent returns the Container of the Widget.
70 Parent() Container
71
72 // SetAlignment sets the alignment of the widget.
73 SetAlignment(alignment Alignment2D) error
74
75 // SetAlwaysConsumeSpace sets if the Widget should consume space even if it
76 // is not visible.
77 SetAlwaysConsumeSpace(b bool) error
78
79 // SetParent sets the parent of the Widget and adds the Widget to the
80 // Children list of the Container.
81 SetParent(value Container) error
82
83 // SetToolTipText sets the tool tip text of the Widget.
84 SetToolTipText(s string) error
85
86 // SizeHint returns the preferred size in native pixels for the respective type of Widget.
87 SizeHint() Size
88
89 // ToolTipText returns the tool tip text of the Widget.
90 ToolTipText() string
91}
92
93type WidgetBase struct {
94 WindowBase

Callers 58

onInsertedWidgetMethod · 0.65
onRemovedWidgetMethod · 0.65
IndexMethod · 0.65
insertIntoSliceMethod · 0.65
initWindowWithCfgFunction · 0.65
SetEnabledMethod · 0.65
setWindowFontFunction · 0.65
SetVisibleMethod · 0.65
CreateLayoutItemMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…