* TabControl.cs: Show the tooltip depending on the value
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / HtmlElementEventArgs.cs
1 // Permission is hereby granted, free of charge, to any person obtaining\r
2 // a copy of this software and associated documentation files (the\r
3 // "Software"), to deal in the Software without restriction, including\r
4 // without limitation the rights to use, copy, modify, merge, publish,\r
5 // distribute, sublicense, and/or sell copies of the Software, and to\r
6 // permit persons to whom the Software is furnished to do so, subject to\r
7 // the following conditions:\r
8 // \r
9 // The above copyright notice and this permission notice shall be\r
10 // included in all copies or substantial portions of the Software.\r
11 // \r
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
19 //\r
20 // Copyright (c) 2007 Novell, Inc.\r
21 //\r
22 // Authors:\r
23 //      Andreia Gaita   avidigal@novell.com\r
24 //\r
25 \r
26 #if NET_2_0\r
27 using System.Drawing;\r
28 using System.ComponentModel;\r
29 namespace System.Windows.Forms\r
30 {\r
31         public sealed class HtmlElementEventArgs : EventArgs\r
32         {\r
33                 #region Fields\r
34                 private bool alt_key_pressed;\r
35                 private bool bubble_event;\r
36                 private Point client_mouse_position;\r
37                 private bool ctrl_key_pressed;\r
38                 private string event_type;\r
39                 private HtmlElement from_element;\r
40                 private int key_pressed_code;\r
41                 private MouseButtons mouse_buttons_pressed;\r
42                 private Point mouse_position;\r
43                 private Point offset_mouse_position;\r
44                 private bool return_value;\r
45                 private bool shift_key_pressed;\r
46                 private HtmlElement to_element;\r
47                 #endregion\r
48 \r
49                 #region Constructor\r
50                 internal HtmlElementEventArgs ()\r
51                 {\r
52                         alt_key_pressed = false;\r
53                         bubble_event = false;\r
54                         client_mouse_position = Point.Empty;\r
55                         ctrl_key_pressed = false;;\r
56                         event_type = null;\r
57                         from_element = null;\r
58                         key_pressed_code = 0;\r
59                         mouse_buttons_pressed = MouseButtons.None;\r
60                         mouse_position = Point.Empty;\r
61                         offset_mouse_position = Point.Empty;\r
62                         return_value = false;\r
63                         shift_key_pressed = false;\r
64                         to_element = null;\r
65                 }\r
66                 #endregion\r
67 \r
68                 #region Public Properties\r
69                 public bool AltKeyPressed {\r
70                         get { return alt_key_pressed; }\r
71                 }\r
72                 \r
73                 public bool BubbleEvent {\r
74                         get { return bubble_event; }\r
75                         set { bubble_event = value; }\r
76                 }\r
77                 \r
78                 public Point ClientMousePosition {\r
79                         get { return client_mouse_position; }\r
80                 }\r
81                 \r
82                 public bool CtrlKeyPressed {\r
83                         get { return ctrl_key_pressed; }\r
84                 }\r
85                 \r
86                 public string EventType {\r
87                         get { return event_type; }\r
88                 }\r
89 \r
90                 [Browsable (false)]\r
91                 [EditorBrowsable (EditorBrowsableState.Advanced)]\r
92                 public HtmlElement FromElement {\r
93                         get { return from_element; }\r
94                 }\r
95                 \r
96                 public int KeyPressedCode {\r
97                         get { return key_pressed_code; }\r
98                 }\r
99                 \r
100                 public MouseButtons MouseButtonsPressed {\r
101                         get { return mouse_buttons_pressed; }\r
102                 }\r
103                 \r
104                 public Point MousePosition {\r
105                         get { return mouse_position; }\r
106                 }\r
107                 \r
108                 public Point OffsetMousePosition {\r
109                         get { return offset_mouse_position; }\r
110                 }\r
111                 \r
112                 public bool ReturnValue {\r
113                         get { return return_value; }\r
114                         set { return_value = value; }\r
115                 }\r
116                 \r
117                 public bool ShiftKeyPressed {\r
118                         get { return shift_key_pressed; }\r
119                 }\r
120                 \r
121                 [Browsable (false)]\r
122                 [EditorBrowsable (EditorBrowsableState.Advanced)]\r
123                 public HtmlElement ToElement {\r
124                         get { return to_element; }\r
125                 }\r
126                 #endregion\r
127         }\r
128 }\r
129 #endif\r