1 | Public
|
---|
2 | /*!
|
---|
3 | @brief PaintDCイベントハンドラを追加する
|
---|
4 | */
|
---|
5 | Sub AddPaintDC(h As PaintDCEventHandler)
|
---|
6 | If IsNothing(paintDC) Then
|
---|
7 | paintDC = New PaintDCEventHandler
|
---|
8 | End If
|
---|
9 | paintDC += h
|
---|
10 | End Sub
|
---|
11 | /*!
|
---|
12 | @brief PaintDCイベントハンドラを削除する
|
---|
13 | */
|
---|
14 | Sub RemovePaintDC(h As PaintDCEventHandler)
|
---|
15 | If Not IsNothing(paintDC) Then
|
---|
16 | paintDC -= h
|
---|
17 | End If
|
---|
18 | End Sub
|
---|
19 | Protected
|
---|
20 | /*!
|
---|
21 | @brief ウィンドウの描画が必要なときに呼び出されます。
|
---|
22 | */
|
---|
23 | Virtual Sub OnPaintDC(e As PaintDCEventArgs)
|
---|
24 | If Not IsNothing(paintDC) Then
|
---|
25 | paintDC(This, e)
|
---|
26 | End If
|
---|
27 | End Sub
|
---|
28 | Private
|
---|
29 | paintDC As PaintDCEventHandler
|
---|
30 |
|
---|
31 | Public
|
---|
32 | /*!
|
---|
33 | @brief Clickイベントハンドラを追加する
|
---|
34 | */
|
---|
35 | Sub AddClick(h As EventHandler)
|
---|
36 | If IsNothing(click) Then
|
---|
37 | click = New EventHandler
|
---|
38 | End If
|
---|
39 | click += h
|
---|
40 | End Sub
|
---|
41 | /*!
|
---|
42 | @brief Clickイベントハンドラを削除する
|
---|
43 | */
|
---|
44 | Sub RemoveClick(h As EventHandler)
|
---|
45 | If Not IsNothing(click) Then
|
---|
46 | click -= h
|
---|
47 | End If
|
---|
48 | End Sub
|
---|
49 | Protected
|
---|
50 | /*!
|
---|
51 | @brief クリックされたときに呼び出されます。
|
---|
52 | */
|
---|
53 | Virtual Sub OnClick(e As EventArgs)
|
---|
54 | If Not IsNothing(click) Then
|
---|
55 | click(This, e)
|
---|
56 | End If
|
---|
57 | End Sub
|
---|
58 | Private
|
---|
59 | click As EventHandler
|
---|
60 |
|
---|
61 | Public
|
---|
62 | /*!
|
---|
63 | @brief DoubleClickイベントハンドラを追加する
|
---|
64 | */
|
---|
65 | Sub AddDoubleClick(h As EventHandler)
|
---|
66 | If IsNothing(doubleClick) Then
|
---|
67 | doubleClick = New EventHandler
|
---|
68 | End If
|
---|
69 | doubleClick += h
|
---|
70 | End Sub
|
---|
71 | /*!
|
---|
72 | @brief DoubleClickイベントハンドラを削除する
|
---|
73 | */
|
---|
74 | Sub RemoveDoubleClick(h As EventHandler)
|
---|
75 | If Not IsNothing(doubleClick) Then
|
---|
76 | doubleClick -= h
|
---|
77 | End If
|
---|
78 | End Sub
|
---|
79 | Protected
|
---|
80 | /*!
|
---|
81 | @brief ダブルクリックされたときに呼び出されます。
|
---|
82 | */
|
---|
83 | Virtual Sub OnDoubleClick(e As EventArgs)
|
---|
84 | If Not IsNothing(doubleClick) Then
|
---|
85 | doubleClick(This, e)
|
---|
86 | End If
|
---|
87 | End Sub
|
---|
88 | Private
|
---|
89 | doubleClick As EventHandler
|
---|
90 |
|
---|
91 | Public
|
---|
92 | /*!
|
---|
93 | @brief MouseDownイベントハンドラを追加する
|
---|
94 | */
|
---|
95 | Sub AddMouseDown(h As MouseEventHandler)
|
---|
96 | If IsNothing(mouseDown) Then
|
---|
97 | mouseDown = New MouseEventHandler
|
---|
98 | End If
|
---|
99 | mouseDown += h
|
---|
100 | End Sub
|
---|
101 | /*!
|
---|
102 | @brief MouseDownイベントハンドラを削除する
|
---|
103 | */
|
---|
104 | Sub RemoveMouseDown(h As MouseEventHandler)
|
---|
105 | If Not IsNothing(mouseDown) Then
|
---|
106 | mouseDown -= h
|
---|
107 | End If
|
---|
108 | End Sub
|
---|
109 | Protected
|
---|
110 | /*!
|
---|
111 | @brief マウスボタンが押されたときに呼び出されます。
|
---|
112 | */
|
---|
113 | Virtual Sub OnMouseDown(e As MouseEventArgs)
|
---|
114 | If Not IsNothing(mouseDown) Then
|
---|
115 | mouseDown(This, e)
|
---|
116 | End If
|
---|
117 | End Sub
|
---|
118 | Private
|
---|
119 | mouseDown As MouseEventHandler
|
---|
120 |
|
---|
121 | Public
|
---|
122 | /*!
|
---|
123 | @brief MouseUpイベントハンドラを追加する
|
---|
124 | */
|
---|
125 | Sub AddMouseUp(h As MouseEventHandler)
|
---|
126 | If IsNothing(mouseUp) Then
|
---|
127 | mouseUp = New MouseEventHandler
|
---|
128 | End If
|
---|
129 | mouseUp += h
|
---|
130 | End Sub
|
---|
131 | /*!
|
---|
132 | @brief MouseUpイベントハンドラを削除する
|
---|
133 | */
|
---|
134 | Sub RemoveMouseUp(h As MouseEventHandler)
|
---|
135 | If Not IsNothing(mouseUp) Then
|
---|
136 | mouseUp -= h
|
---|
137 | End If
|
---|
138 | End Sub
|
---|
139 | Protected
|
---|
140 | /*!
|
---|
141 | @brief マウスボタンが離されたときに呼び出されます。
|
---|
142 | */
|
---|
143 | Virtual Sub OnMouseUp(e As MouseEventArgs)
|
---|
144 | If Not IsNothing(mouseUp) Then
|
---|
145 | mouseUp(This, e)
|
---|
146 | End If
|
---|
147 | End Sub
|
---|
148 | Private
|
---|
149 | mouseUp As MouseEventHandler
|
---|
150 |
|
---|