[473] | 1 | Public
|
---|
[551] | 2 | Sub AddPaintDC(h As PaintDCHandler)
|
---|
[473] | 3 | If IsNothing(paintDC) Then
|
---|
[542] | 4 | paintDC = h
|
---|
| 5 | Else
|
---|
| 6 | paintDC += h
|
---|
[473] | 7 | End If
|
---|
| 8 | End Sub
|
---|
[551] | 9 | Sub RemovePaintDC(h As PaintDCHandler)
|
---|
[473] | 10 | If Not IsNothing(paintDC) Then
|
---|
| 11 | paintDC -= h
|
---|
| 12 | End If
|
---|
| 13 | End Sub
|
---|
[551] | 14 | Protected
|
---|
| 15 | Sub OnPaintDC(e As PaintDCArgs)
|
---|
[473] | 16 | If Not IsNothing(paintDC) Then
|
---|
| 17 | paintDC(This, e)
|
---|
| 18 | End If
|
---|
| 19 | End Sub
|
---|
| 20 | Private
|
---|
[551] | 21 | paintDC As PaintDCHandler
|
---|
[473] | 22 |
|
---|
| 23 | Public
|
---|
[551] | 24 | Sub AddClick(h As Handler)
|
---|
| 25 | If IsNothing(click) Then
|
---|
| 26 | click = h
|
---|
| 27 | Else
|
---|
| 28 | click += h
|
---|
| 29 | End If
|
---|
| 30 | End Sub
|
---|
| 31 | Sub RemoveClick(h As Handler)
|
---|
| 32 | If Not IsNothing(click) Then
|
---|
| 33 | click -= h
|
---|
| 34 | End If
|
---|
| 35 | End Sub
|
---|
| 36 | Protected
|
---|
| 37 | Sub OnClick(e As Args)
|
---|
| 38 | If Not IsNothing(click) Then
|
---|
| 39 | click(This, e)
|
---|
| 40 | End If
|
---|
| 41 | End Sub
|
---|
| 42 | Private
|
---|
| 43 | click As Handler
|
---|
| 44 |
|
---|
| 45 | Public
|
---|
| 46 | Sub AddDoubleClick(h As Handler)
|
---|
| 47 | If IsNothing(doubleClick) Then
|
---|
| 48 | doubleClick = h
|
---|
| 49 | Else
|
---|
| 50 | doubleClick += h
|
---|
| 51 | End If
|
---|
| 52 | End Sub
|
---|
| 53 | Sub RemoveDoubleClick(h As Handler)
|
---|
| 54 | If Not IsNothing(doubleClick) Then
|
---|
| 55 | doubleClick -= h
|
---|
| 56 | End If
|
---|
| 57 | End Sub
|
---|
| 58 | Protected
|
---|
| 59 | Sub OnDoubleClick(e As Args)
|
---|
| 60 | If Not IsNothing(doubleClick) Then
|
---|
| 61 | doubleClick(This, e)
|
---|
| 62 | End If
|
---|
| 63 | End Sub
|
---|
| 64 | Private
|
---|
| 65 | doubleClick As Handler
|
---|
| 66 |
|
---|
| 67 | Public
|
---|
| 68 | Sub AddMove(h As Handler)
|
---|
| 69 | If IsNothing(move) Then
|
---|
| 70 | move = h
|
---|
| 71 | Else
|
---|
| 72 | move += h
|
---|
| 73 | End If
|
---|
| 74 | End Sub
|
---|
| 75 | Sub RemoveMove(h As Handler)
|
---|
| 76 | If Not IsNothing(move) Then
|
---|
| 77 | move -= h
|
---|
| 78 | End If
|
---|
| 79 | End Sub
|
---|
| 80 | Protected
|
---|
| 81 | Sub OnMove(e As Args)
|
---|
| 82 | If Not IsNothing(move) Then
|
---|
| 83 | move(This, e)
|
---|
| 84 | End If
|
---|
| 85 | End Sub
|
---|
| 86 | Private
|
---|
| 87 | move As Handler
|
---|
| 88 |
|
---|
| 89 | Public
|
---|
[561] | 90 | Sub AddResize(h As ResizeHandler)
|
---|
| 91 | If IsNothing(resize) Then
|
---|
| 92 | resize = h
|
---|
| 93 | Else
|
---|
| 94 | resize += h
|
---|
| 95 | End If
|
---|
| 96 | End Sub
|
---|
| 97 | Sub RemoveResize(h As ResizeHandler)
|
---|
| 98 | If Not IsNothing(resize) Then
|
---|
| 99 | resize -= h
|
---|
| 100 | End If
|
---|
| 101 | End Sub
|
---|
| 102 | Protected
|
---|
| 103 | Sub OnResize(e As ResizeArgs)
|
---|
| 104 | If Not IsNothing(resize) Then
|
---|
| 105 | resize(This, e)
|
---|
| 106 | End If
|
---|
| 107 | End Sub
|
---|
| 108 | Private
|
---|
| 109 | resize As ResizeHandler
|
---|
| 110 |
|
---|
| 111 | Public
|
---|
[551] | 112 | Sub AddMouseEnter(h As MouseHandler)
|
---|
[542] | 113 | If IsNothing(mouseEnter) Then
|
---|
| 114 | mouseEnter = h
|
---|
| 115 | Else
|
---|
| 116 | mouseEnter += h
|
---|
| 117 | End If
|
---|
| 118 | End Sub
|
---|
[551] | 119 | Sub RemoveMouseEnter(h As MouseHandler)
|
---|
[542] | 120 | If Not IsNothing(mouseEnter) Then
|
---|
| 121 | mouseEnter -= h
|
---|
| 122 | End If
|
---|
| 123 | End Sub
|
---|
[551] | 124 | Protected
|
---|
| 125 | Sub OnMouseEnter(e As MouseArgs)
|
---|
[542] | 126 | If Not IsNothing(mouseEnter) Then
|
---|
| 127 | mouseEnter(This, e)
|
---|
| 128 | End If
|
---|
| 129 | End Sub
|
---|
| 130 | Private
|
---|
[551] | 131 | mouseEnter As MouseHandler
|
---|
[542] | 132 |
|
---|
| 133 | Public
|
---|
[551] | 134 | Sub AddMouseMove(h As MouseHandler)
|
---|
[542] | 135 | If IsNothing(mouseMove) Then
|
---|
| 136 | mouseMove = h
|
---|
| 137 | Else
|
---|
| 138 | mouseMove += h
|
---|
| 139 | End If
|
---|
| 140 | End Sub
|
---|
[551] | 141 | Sub RemoveMouseMove(h As MouseHandler)
|
---|
[542] | 142 | If Not IsNothing(mouseMove) Then
|
---|
| 143 | mouseMove -= h
|
---|
| 144 | End If
|
---|
| 145 | End Sub
|
---|
[551] | 146 | Protected
|
---|
| 147 | Sub OnMouseMove(e As MouseArgs)
|
---|
[542] | 148 | If Not IsNothing(mouseMove) Then
|
---|
| 149 | mouseMove(This, e)
|
---|
| 150 | End If
|
---|
| 151 | End Sub
|
---|
| 152 | Private
|
---|
[551] | 153 | mouseMove As MouseHandler
|
---|
[542] | 154 |
|
---|
| 155 | Public
|
---|
[551] | 156 | Sub AddMouseHover(h As MouseHandler)
|
---|
[542] | 157 | If IsNothing(mouseHover) Then
|
---|
| 158 | mouseHover = h
|
---|
| 159 | Else
|
---|
| 160 | mouseHover += h
|
---|
| 161 | End If
|
---|
| 162 | End Sub
|
---|
[551] | 163 | Sub RemoveMouseHover(h As MouseHandler)
|
---|
[542] | 164 | If Not IsNothing(mouseHover) Then
|
---|
| 165 | mouseHover -= h
|
---|
| 166 | End If
|
---|
| 167 | End Sub
|
---|
[551] | 168 | Protected
|
---|
| 169 | Sub OnMouseHover(e As MouseArgs)
|
---|
[542] | 170 | If Not IsNothing(mouseHover) Then
|
---|
| 171 | mouseHover(This, e)
|
---|
| 172 | End If
|
---|
| 173 | End Sub
|
---|
| 174 | Private
|
---|
[551] | 175 | mouseHover As MouseHandler
|
---|
[542] | 176 |
|
---|
| 177 | Public
|
---|
[564] | 178 | Sub AddMouseLeave(h As Handler)
|
---|
[542] | 179 | If IsNothing(mouseLeave) Then
|
---|
| 180 | mouseLeave = h
|
---|
| 181 | Else
|
---|
| 182 | mouseLeave += h
|
---|
| 183 | End If
|
---|
| 184 | End Sub
|
---|
[564] | 185 | Sub RemoveMouseLeave(h As Handler)
|
---|
[542] | 186 | If Not IsNothing(mouseLeave) Then
|
---|
| 187 | mouseLeave -= h
|
---|
| 188 | End If
|
---|
| 189 | End Sub
|
---|
[551] | 190 | Protected
|
---|
[564] | 191 | Sub OnMouseLeave(e As Args)
|
---|
[542] | 192 | If Not IsNothing(mouseLeave) Then
|
---|
| 193 | mouseLeave(This, e)
|
---|
| 194 | End If
|
---|
| 195 | End Sub
|
---|
| 196 | Private
|
---|
[564] | 197 | mouseLeave As Handler
|
---|
[542] | 198 |
|
---|
| 199 | Public
|
---|
[551] | 200 | Sub AddMouseDown(h As MouseHandler)
|
---|
[473] | 201 | If IsNothing(mouseDown) Then
|
---|
[542] | 202 | mouseDown = h
|
---|
| 203 | Else
|
---|
| 204 | mouseDown += h
|
---|
[473] | 205 | End If
|
---|
| 206 | End Sub
|
---|
[551] | 207 | Sub RemoveMouseDown(h As MouseHandler)
|
---|
[473] | 208 | If Not IsNothing(mouseDown) Then
|
---|
| 209 | mouseDown -= h
|
---|
| 210 | End If
|
---|
| 211 | End Sub
|
---|
[551] | 212 | Protected
|
---|
| 213 | Sub OnMouseDown(e As MouseArgs)
|
---|
[473] | 214 | If Not IsNothing(mouseDown) Then
|
---|
| 215 | mouseDown(This, e)
|
---|
| 216 | End If
|
---|
| 217 | End Sub
|
---|
| 218 | Private
|
---|
[551] | 219 | mouseDown As MouseHandler
|
---|
[473] | 220 |
|
---|
| 221 | Public
|
---|
[551] | 222 | Sub AddMouseClick(h As MouseHandler)
|
---|
[542] | 223 | If IsNothing(mouseClick) Then
|
---|
| 224 | mouseClick = h
|
---|
| 225 | Else
|
---|
| 226 | mouseClick += h
|
---|
| 227 | End If
|
---|
| 228 | End Sub
|
---|
[551] | 229 | Sub RemoveMouseClick(h As MouseHandler)
|
---|
[542] | 230 | If Not IsNothing(mouseClick) Then
|
---|
| 231 | mouseClick -= h
|
---|
| 232 | End If
|
---|
| 233 | End Sub
|
---|
[551] | 234 | Protected
|
---|
| 235 | Sub OnMouseClick(e As MouseArgs)
|
---|
[542] | 236 | If Not IsNothing(mouseClick) Then
|
---|
| 237 | mouseClick(This, e)
|
---|
| 238 | End If
|
---|
| 239 | End Sub
|
---|
| 240 | Private
|
---|
[551] | 241 | mouseClick As MouseHandler
|
---|
[542] | 242 |
|
---|
| 243 | Public
|
---|
[551] | 244 | Sub AddMouseDoubleClick(h As MouseHandler)
|
---|
[542] | 245 | If IsNothing(mouseDoubleClick) Then
|
---|
| 246 | mouseDoubleClick = h
|
---|
| 247 | Else
|
---|
| 248 | mouseDoubleClick += h
|
---|
| 249 | End If
|
---|
| 250 | End Sub
|
---|
[551] | 251 | Sub RemoveMouseDoubleClick(h As MouseHandler)
|
---|
[542] | 252 | If Not IsNothing(mouseDoubleClick) Then
|
---|
| 253 | mouseDoubleClick -= h
|
---|
| 254 | End If
|
---|
| 255 | End Sub
|
---|
[551] | 256 | Protected
|
---|
| 257 | Sub OnMouseDoubleClick(e As MouseArgs)
|
---|
[542] | 258 | If Not IsNothing(mouseDoubleClick) Then
|
---|
| 259 | mouseDoubleClick(This, e)
|
---|
| 260 | End If
|
---|
| 261 | End Sub
|
---|
| 262 | Private
|
---|
[551] | 263 | mouseDoubleClick As MouseHandler
|
---|
[542] | 264 |
|
---|
| 265 | Public
|
---|
[551] | 266 | Sub AddMouseUp(h As MouseHandler)
|
---|
[473] | 267 | If IsNothing(mouseUp) Then
|
---|
[542] | 268 | mouseUp = h
|
---|
| 269 | Else
|
---|
| 270 | mouseUp += h
|
---|
[473] | 271 | End If
|
---|
| 272 | End Sub
|
---|
[551] | 273 | Sub RemoveMouseUp(h As MouseHandler)
|
---|
[473] | 274 | If Not IsNothing(mouseUp) Then
|
---|
| 275 | mouseUp -= h
|
---|
| 276 | End If
|
---|
| 277 | End Sub
|
---|
[551] | 278 | Protected
|
---|
| 279 | Sub OnMouseUp(e As MouseArgs)
|
---|
[473] | 280 | If Not IsNothing(mouseUp) Then
|
---|
| 281 | mouseUp(This, e)
|
---|
| 282 | End If
|
---|
| 283 | End Sub
|
---|
| 284 | Private
|
---|
[551] | 285 | mouseUp As MouseHandler
|
---|
[473] | 286 |
|
---|
[542] | 287 | Public
|
---|
[551] | 288 | Sub AddKeyDown(h As KeyHandler)
|
---|
[542] | 289 | If IsNothing(keyDown) Then
|
---|
| 290 | keyDown = h
|
---|
| 291 | Else
|
---|
| 292 | keyDown += h
|
---|
| 293 | End If
|
---|
| 294 | End Sub
|
---|
[551] | 295 | Sub RemoveKeyDown(h As KeyHandler)
|
---|
[542] | 296 | If Not IsNothing(keyDown) Then
|
---|
| 297 | keyDown -= h
|
---|
| 298 | End If
|
---|
| 299 | End Sub
|
---|
[551] | 300 | Protected
|
---|
| 301 | Sub OnKeyDown(e As KeyArgs)
|
---|
[542] | 302 | If Not IsNothing(keyDown) Then
|
---|
| 303 | keyDown(This, e)
|
---|
| 304 | End If
|
---|
| 305 | End Sub
|
---|
| 306 | Private
|
---|
[551] | 307 | keyDown As KeyHandler
|
---|
[542] | 308 |
|
---|
| 309 | Public
|
---|
[551] | 310 | Sub AddKeyUp(h As KeyHandler)
|
---|
[542] | 311 | If IsNothing(keyUp) Then
|
---|
| 312 | keyUp = h
|
---|
| 313 | Else
|
---|
| 314 | keyUp += h
|
---|
| 315 | End If
|
---|
| 316 | End Sub
|
---|
[551] | 317 | Sub RemoveKeyUp(h As KeyHandler)
|
---|
[542] | 318 | If Not IsNothing(keyUp) Then
|
---|
| 319 | keyUp -= h
|
---|
| 320 | End If
|
---|
| 321 | End Sub
|
---|
[551] | 322 | Protected
|
---|
| 323 | Sub OnKeyUp(e As KeyArgs)
|
---|
[542] | 324 | If Not IsNothing(keyUp) Then
|
---|
| 325 | keyUp(This, e)
|
---|
| 326 | End If
|
---|
| 327 | End Sub
|
---|
| 328 | Private
|
---|
[551] | 329 | keyUp As KeyHandler
|
---|
[542] | 330 |
|
---|
| 331 | Public
|
---|
[551] | 332 | Sub AddKeyPress(h As KeyPressHandler)
|
---|
| 333 | If IsNothing(keyPress) Then
|
---|
| 334 | keyPress = h
|
---|
| 335 | Else
|
---|
| 336 | keyPress += h
|
---|
| 337 | End If
|
---|
| 338 | End Sub
|
---|
| 339 | Sub RemoveKeyPress(h As KeyPressHandler)
|
---|
| 340 | If Not IsNothing(keyPress) Then
|
---|
| 341 | keyPress -= h
|
---|
| 342 | End If
|
---|
| 343 | End Sub
|
---|
| 344 | Protected
|
---|
| 345 | Sub OnKeyPress(e As KeyPressArgs)
|
---|
| 346 | If Not IsNothing(keyPress) Then
|
---|
| 347 | keyPress(This, e)
|
---|
| 348 | End If
|
---|
| 349 | End Sub
|
---|
| 350 | Private
|
---|
| 351 | keyPress As KeyPressHandler
|
---|
[559] | 352 |
|
---|
[551] | 353 | Public
|
---|
| 354 | Sub AddCreate(h As CreateHandler)
|
---|
[542] | 355 | If IsNothing(create) Then
|
---|
| 356 | create = h
|
---|
| 357 | Else
|
---|
| 358 | create += h
|
---|
| 359 | End If
|
---|
| 360 | End Sub
|
---|
[551] | 361 | Sub RemoveCreate(h As CreateHandler)
|
---|
[542] | 362 | If Not IsNothing(create) Then
|
---|
| 363 | create -= h
|
---|
| 364 | End If
|
---|
| 365 | End Sub
|
---|
[551] | 366 | Protected
|
---|
| 367 | Sub OnCreate(e As CreateArgs)
|
---|
[542] | 368 | If Not IsNothing(create) Then
|
---|
| 369 | create(This, e)
|
---|
| 370 | End If
|
---|
| 371 | End Sub
|
---|
| 372 | Private
|
---|
[551] | 373 | create As CreateHandler
|
---|
[544] | 374 |
|
---|
[551] | 375 | Public
|
---|
| 376 | Sub AddDestroy(h As Handler)
|
---|
| 377 | If IsNothing(destroy) Then
|
---|
| 378 | destroy = h
|
---|
| 379 | Else
|
---|
| 380 | destroy += h
|
---|
| 381 | End If
|
---|
| 382 | End Sub
|
---|
| 383 | Sub RemoveDestroy(h As Handler)
|
---|
| 384 | If Not IsNothing(destroy) Then
|
---|
| 385 | destroy -= h
|
---|
| 386 | End If
|
---|
| 387 | End Sub
|
---|
| 388 | Protected
|
---|
| 389 | Sub OnDestroy(e As Args)
|
---|
| 390 | If Not IsNothing(destroy) Then
|
---|
| 391 | destroy(This, e)
|
---|
| 392 | End If
|
---|
| 393 | End Sub
|
---|
| 394 | Private
|
---|
| 395 | destroy As Handler
|
---|
[559] | 396 |
|
---|
[564] | 397 | Public
|
---|
| 398 | Sub AddPaintBackground(h As PaintBackgroundHandler)
|
---|
| 399 | If IsNothing(paintBackground) Then
|
---|
| 400 | paintBackground = h
|
---|
| 401 | Else
|
---|
| 402 | paintBackground += h
|
---|
| 403 | End If
|
---|
| 404 | End Sub
|
---|
| 405 | Sub RemovePaintBackground(h As PaintBackgroundHandler)
|
---|
| 406 | If Not IsNothing(paintBackground) Then
|
---|
| 407 | paintBackground -= h
|
---|
| 408 | End If
|
---|
| 409 | End Sub
|
---|
| 410 | Protected
|
---|
| 411 | Sub OnPaintBackground(e As PaintBackgroundArgs)
|
---|
| 412 | If Not IsNothing(paintBackground) Then
|
---|
| 413 | paintBackground(This, e)
|
---|
| 414 | End If
|
---|
| 415 | End Sub
|
---|
| 416 | Private
|
---|
| 417 | paintBackground As PaintBackgroundHandler
|
---|
| 418 |
|
---|