7 protected ref ScriptInvoker m_OnHandlerAttached;
8 protected ref ScriptInvoker m_OnHandlerDetached;
9 protected ref ScriptInvoker m_OnChange;
10 protected ref ScriptInvoker m_OnChangeFinal;
11 protected ref ScriptInvoker m_OnFocus;
12 protected ref ScriptInvoker m_OnFocusLost;
13 protected ref ScriptInvoker m_OnMouseEnter;
14 protected ref ScriptInvoker m_OnMouseLeave;
15 protected ref ScriptInvoker m_OnClick;
16 protected ref ScriptInvoker m_OnDoubleClick;
17 protected ref ScriptInvoker m_OnMouseButtonDown;
18 protected ref ScriptInvoker m_OnMouseButtonUp;
21 override void HandlerAttached(Widget w)
23 if (m_OnHandlerAttached)
24 m_OnHandlerAttached.Invoke();
28 override void HandlerDeattached(Widget w)
30 if (m_OnHandlerDetached)
31 m_OnHandlerDetached.Invoke(w);
35 override bool OnClick(Widget w,
int x,
int y,
int button)
43 override bool OnChange(Widget w,
int x,
int y,
bool finished)
48 if (finished && m_OnChangeFinal)
49 m_OnChangeFinal.Invoke(w);
55 override bool OnMouseEnter(Widget w,
int x,
int y)
63 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
71 override bool OnFocus(Widget w,
int x,
int y)
79 override bool OnFocusLost(Widget w,
int x,
int y)
87 override bool OnMouseButtonDown(Widget w,
int x,
int y,
int button)
89 if (m_OnMouseButtonDown)
90 m_OnMouseButtonDown.Invoke(w);
95 override bool OnMouseButtonUp(Widget w,
int x,
int y,
int button)
97 if (m_OnMouseButtonUp)
98 m_OnMouseButtonUp.Invoke(w, button);
103 override bool OnDoubleClick(Widget w,
int x,
int y,
int button)
106 m_OnDoubleClick.Invoke(w);
111 ScriptInvoker GetOnHandlerAttached()
113 if (!m_OnHandlerAttached)
114 m_OnHandlerAttached =
new ScriptInvoker();
115 return m_OnHandlerAttached;
119 ScriptInvoker m_OnHandlerDetached()
121 if (!m_OnHandlerDetached)
122 m_OnHandlerDetached =
new ScriptInvoker();
123 return m_OnHandlerDetached;
127 ScriptInvoker GetOnChange()
135 ScriptInvoker GetOnChangeFinal()
137 if (!m_OnChangeFinal)
138 m_OnChangeFinal =
new ScriptInvoker();
139 return m_OnChangeFinal;
143 ScriptInvoker GetOnFocus()
151 ScriptInvoker GetOnFocusLost()
159 ScriptInvoker GetOnMouseEnter()
167 ScriptInvoker GetOnMouseLeave()
175 ScriptInvoker GetOnClick()
183 ScriptInvoker GetOnMouseButtonDown()
185 if (!m_OnMouseButtonDown)
186 m_OnMouseButtonDown =
new ScriptInvoker();
187 return m_OnMouseButtonDown;
191 ScriptInvoker GetOnMouseButtonUp()
193 if (!m_OnMouseButtonUp)
194 m_OnMouseButtonUp =
new ScriptInvoker();
195 return m_OnMouseButtonUp;
199 ScriptInvoker GetOnDoubleClick()
201 if (!m_OnDoubleClick)
202 m_OnDoubleClick =
new ScriptInvoker();
203 return m_OnDoubleClick;