diff options
author | Alexander Neumann <an2048@gmail.com> | 2013-07-24 19:02:48 +0200 |
---|---|---|
committer | Alexander Neumann <an2048@gmail.com> | 2013-07-24 19:02:48 +0200 |
commit | 8681459fc4038788ccb0e65c1e43c8f8c3f3fcce (patch) | |
tree | 173f44ce826031d368b09d40cee7f0e2c7c9f0cc /groupbox.go | |
parent | Add stock icons, fixes #61 (diff) | |
download | wireguard-windows-8681459fc4038788ccb0e65c1e43c8f8c3f3fcce.tar.xz wireguard-windows-8681459fc4038788ccb0e65c1e43c8f8c3f3fcce.zip |
Introduce Window and WindowBase as base for all windows
Diffstat (limited to 'groupbox.go')
-rw-r--r-- | groupbox.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/groupbox.go b/groupbox.go index 37421a31..19193841 100644 --- a/groupbox.go +++ b/groupbox.go @@ -24,7 +24,7 @@ type GroupBox struct { func NewGroupBox(parent Container) (*GroupBox, error) { gb := &GroupBox{} - if err := InitChildWidget( + if err := InitWidget( gb, parent, groupBoxWindowClass, @@ -72,6 +72,10 @@ func NewGroupBox(parent Container) (*GroupBox, error) { return gb, nil } +func (gb *GroupBox) AsContainerBase() *ContainerBase { + return gb.composite.AsContainerBase() +} + func (gb *GroupBox) LayoutFlags() LayoutFlags { if gb.composite == nil { return 0 @@ -95,7 +99,7 @@ func (gb *GroupBox) SizeHint() Size { } func (gb *GroupBox) ClientBounds() Rectangle { - cb := widgetClientBounds(gb.hWndGroupBox) + cb := windowClientBounds(gb.hWndGroupBox) if gb.Layout() == nil { return cb @@ -107,7 +111,7 @@ func (gb *GroupBox) ClientBounds() Rectangle { func (gb *GroupBox) SetFont(value *Font) { if value != gb.font { - setWidgetFont(gb.hWndGroupBox, value) + setWindowFont(gb.hWndGroupBox, value) gb.font = value } @@ -128,11 +132,11 @@ func (gb *GroupBox) SetDataBinder(dataBinder *DataBinder) { } func (gb *GroupBox) Title() string { - return widgetText(gb.hWndGroupBox) + return windowText(gb.hWndGroupBox) } func (gb *GroupBox) SetTitle(value string) error { - return setWidgetText(gb.hWndGroupBox, value) + return setWindowText(gb.hWndGroupBox, value) } func (gb *GroupBox) Children() *WidgetList { |