source: trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/UI/ControlEvent.sbp@ 545

Last change on this file since 545 was 545, checked in by イグトランス (egtra), 16 years ago

ActiveBasic.Windows.UI.FormsをUIへ移動。UI以下にForms以外置くものが思い浮かばないので。

File size: 5.1 KB
Line 
1Public
2 Sub AddPaintDC(h As PaintDCEventHandler)
3 If IsNothing(paintDC) Then
4 paintDC = h
5 Else
6 paintDC += h
7 End If
8 End Sub
9 Sub RemovePaintDC(h As PaintDCEventHandler)
10 If Not IsNothing(paintDC) Then
11 paintDC -= h
12 End If
13 End Sub
14Private
15 Sub OnPaintDC(e As PaintDCEventArgs)
16 If Not IsNothing(paintDC) Then
17 paintDC(This, e)
18 End If
19 End Sub
20Private
21 paintDC As PaintDCEventHandler
22
23Public
24 Sub AddMouseEnter(h As MouseEventHandler)
25 If IsNothing(mouseEnter) Then
26 mouseEnter = h
27 Else
28 mouseEnter += h
29 End If
30 End Sub
31 Sub RemoveMouseEnter(h As MouseEventHandler)
32 If Not IsNothing(mouseEnter) Then
33 mouseEnter -= h
34 End If
35 End Sub
36Private
37 Sub OnMouseEnter(e As MouseEventArgs)
38 If Not IsNothing(mouseEnter) Then
39 mouseEnter(This, e)
40 End If
41 End Sub
42Private
43 mouseEnter As MouseEventHandler
44
45Public
46 Sub AddMouseMove(h As MouseEventHandler)
47 If IsNothing(mouseMove) Then
48 mouseMove = h
49 Else
50 mouseMove += h
51 End If
52 End Sub
53 Sub RemoveMouseMove(h As MouseEventHandler)
54 If Not IsNothing(mouseMove) Then
55 mouseMove -= h
56 End If
57 End Sub
58Private
59 Sub OnMouseMove(e As MouseEventArgs)
60 If Not IsNothing(mouseMove) Then
61 mouseMove(This, e)
62 End If
63 End Sub
64Private
65 mouseMove As MouseEventHandler
66
67Public
68 Sub AddMouseHover(h As MouseEventHandler)
69 If IsNothing(mouseHover) Then
70 mouseHover = h
71 Else
72 mouseHover += h
73 End If
74 End Sub
75 Sub RemoveMouseHover(h As MouseEventHandler)
76 If Not IsNothing(mouseHover) Then
77 mouseHover -= h
78 End If
79 End Sub
80Private
81 Sub OnMouseHover(e As MouseEventArgs)
82 If Not IsNothing(mouseHover) Then
83 mouseHover(This, e)
84 End If
85 End Sub
86Private
87 mouseHover As MouseEventHandler
88
89Public
90 Sub AddMouseLeave(h As MouseEventHandler)
91 If IsNothing(mouseLeave) Then
92 mouseLeave = h
93 Else
94 mouseLeave += h
95 End If
96 End Sub
97 Sub RemoveMouseLeave(h As MouseEventHandler)
98 If Not IsNothing(mouseLeave) Then
99 mouseLeave -= h
100 End If
101 End Sub
102Private
103 Sub OnMouseLeave(e As MouseEventArgs)
104 If Not IsNothing(mouseLeave) Then
105 mouseLeave(This, e)
106 End If
107 End Sub
108Private
109 mouseLeave As MouseEventHandler
110
111Public
112 Sub AddMouseDown(h As MouseEventHandler)
113 If IsNothing(mouseDown) Then
114 mouseDown = h
115 Else
116 mouseDown += h
117 End If
118 End Sub
119 Sub RemoveMouseDown(h As MouseEventHandler)
120 If Not IsNothing(mouseDown) Then
121 mouseDown -= h
122 End If
123 End Sub
124Private
125 Sub OnMouseDown(e As MouseEventArgs)
126 If Not IsNothing(mouseDown) Then
127 mouseDown(This, e)
128 End If
129 End Sub
130Private
131 mouseDown As MouseEventHandler
132
133Public
134 Sub AddMouseClick(h As MouseEventHandler)
135 If IsNothing(mouseClick) Then
136 mouseClick = h
137 Else
138 mouseClick += h
139 End If
140 End Sub
141 Sub RemoveMouseClick(h As MouseEventHandler)
142 If Not IsNothing(mouseClick) Then
143 mouseClick -= h
144 End If
145 End Sub
146Private
147 Sub OnMouseClick(e As MouseEventArgs)
148 If Not IsNothing(mouseClick) Then
149 mouseClick(This, e)
150 End If
151 End Sub
152Private
153 mouseClick As MouseEventHandler
154
155Public
156 Sub AddMouseDoubleClick(h As MouseEventHandler)
157 If IsNothing(mouseDoubleClick) Then
158 mouseDoubleClick = h
159 Else
160 mouseDoubleClick += h
161 End If
162 End Sub
163 Sub RemoveMouseDoubleClick(h As MouseEventHandler)
164 If Not IsNothing(mouseDoubleClick) Then
165 mouseDoubleClick -= h
166 End If
167 End Sub
168Private
169 Sub OnMouseDoubleClick(e As MouseEventArgs)
170 If Not IsNothing(mouseDoubleClick) Then
171 mouseDoubleClick(This, e)
172 End If
173 End Sub
174Private
175 mouseDoubleClick As MouseEventHandler
176
177Public
178 Sub AddMouseUp(h As MouseEventHandler)
179 If IsNothing(mouseUp) Then
180 mouseUp = h
181 Else
182 mouseUp += h
183 End If
184 End Sub
185 Sub RemoveMouseUp(h As MouseEventHandler)
186 If Not IsNothing(mouseUp) Then
187 mouseUp -= h
188 End If
189 End Sub
190Private
191 Sub OnMouseUp(e As MouseEventArgs)
192 If Not IsNothing(mouseUp) Then
193 mouseUp(This, e)
194 End If
195 End Sub
196Private
197 mouseUp As MouseEventHandler
198
199Public
200 Sub AddKeyDown(h As KeyEventHandler)
201 If IsNothing(keyDown) Then
202 keyDown = h
203 Else
204 keyDown += h
205 End If
206 End Sub
207 Sub RemoveKeyDown(h As KeyEventHandler)
208 If Not IsNothing(keyDown) Then
209 keyDown -= h
210 End If
211 End Sub
212Private
213 Sub OnKeyDown(e As KeyEventArgs)
214 If Not IsNothing(keyDown) Then
215 keyDown(This, e)
216 End If
217 End Sub
218Private
219 keyDown As KeyEventHandler
220
221Public
222 Sub AddKeyUp(h As KeyEventHandler)
223 If IsNothing(keyUp) Then
224 keyUp = h
225 Else
226 keyUp += h
227 End If
228 End Sub
229 Sub RemoveKeyUp(h As KeyEventHandler)
230 If Not IsNothing(keyUp) Then
231 keyUp -= h
232 End If
233 End Sub
234Private
235 Sub OnKeyUp(e As KeyEventArgs)
236 If Not IsNothing(keyUp) Then
237 keyUp(This, e)
238 End If
239 End Sub
240Private
241 keyUp As KeyEventHandler
242
243Public
244 Sub AddCreate(h As CreateEventHandler)
245 If IsNothing(create) Then
246 create = h
247 Else
248 create += h
249 End If
250 End Sub
251 Sub RemoveCreate(h As CreateEventHandler)
252 If Not IsNothing(create) Then
253 create -= h
254 End If
255 End Sub
256Private
257 Sub OnCreate(e As CreateEventArgs)
258 If Not IsNothing(create) Then
259 create(This, e)
260 End If
261 End Sub
262Private
263 create As CreateEventHandler
264
Note: See TracBrowser for help on using the repository browser.