-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathcontroller.go
80 lines (64 loc) · 1.49 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Copyright (C) 2019 The Winc Authors. All Rights Reserved.
* Copyright (C) 2010-2013 Allen Dang. All Rights Reserved.
*/
package winc
import (
"github.com/tadvi/winc/w32"
)
type Controller interface {
Text() string
Enabled() bool
SetFocus()
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
SetText(s string)
SetEnabled(b bool)
SetPos(x, y int)
SetSize(w, h int)
EnableDragAcceptFiles(b bool)
Show()
Hide()
ContextMenu() *MenuItem
SetContextMenu(menu *MenuItem)
Font() *Font
SetFont(font *Font)
InvokeRequired() bool
PreTranslateMessage(msg *w32.MSG) bool
WndProc(msg uint32, wparam, lparam uintptr) uintptr
//General events
OnCreate() *EventManager
OnClose() *EventManager
// Focus events
OnKillFocus() *EventManager
OnSetFocus() *EventManager
//Drag and drop events
OnDropFiles() *EventManager
//Mouse events
OnLBDown() *EventManager
OnLBUp() *EventManager
OnLBDbl() *EventManager
OnMBDown() *EventManager
OnMBUp() *EventManager
OnRBDown() *EventManager
OnRBUp() *EventManager
OnRBDbl() *EventManager
OnMouseMove() *EventManager
// OnMouseLeave and OnMouseHover does not fire unless control called internalTrackMouseEvent.
// Use MouseControl for a how to example.
OnMouseHover() *EventManager
OnMouseLeave() *EventManager
//Keyboard events
OnKeyUp() *EventManager
//Paint events
OnPaint() *EventManager
OnSize() *EventManager
}