-
Notifications
You must be signed in to change notification settings - Fork 45
/
controller.go
66 lines (56 loc) · 1.37 KB
/
controller.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package gform
import (
"github.com/AllenDang/w32"
)
type Controller interface {
Caption() string
Enabled() bool
Focus()
Handle() w32.HWND
Invalidate(erase bool)
Parent() Controller
Pos() (x, y int)
Size() (w, h int)
Height() int
Width() int
Visible() bool
Bounds() *Rect
ClientRect() *Rect
SetCaption(s string)
SetEnabled(b bool)
SetPos(x, y int)
SetSize(w, h int)
EnableDragAcceptFiles(b bool)
Show()
Hide()
Font() *Font
SetFont(font *Font)
InvokeRequired() bool
PreTranslateMessage(msg *w32.MSG) bool
WndProc(msg uint, wparam, lparam uintptr) uintptr
//Bind w32 message to handler function
Bind(msg uint, handler EventHandler)
BindedHandler(msg uint) (EventHandler, bool)
//General events
OnCreate() *EventManager
OnClose() *EventManager
// Focus events
OnKillFocus() *EventManager
OnSetFocus() *EventManager
//Drag and drop events
OnDropFiles() *EventManager
//Mouse events
OnLBDown() *EventManager
OnLBUp() *EventManager
OnMBDown() *EventManager
OnMBUp() *EventManager
OnRBDown() *EventManager
OnRBUp() *EventManager
OnMouseHover() *EventManager
OnMouseLeave() *EventManager
//Keyboard events
OnKeyUp() *EventManager
//Paint events
OnPaint() *EventManager
OnSize() *EventManager
}