OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 static const int kMinEndOfLinePadding = 2; | 46 static const int kMinEndOfLinePadding = 2; |
47 static const int kTextToLabelPadding = 10; | 47 static const int kTextToLabelPadding = 10; |
48 static const TimeStamp kTypeAheadTimeoutMs = 1000; | 48 static const TimeStamp kTypeAheadTimeoutMs = 1000; |
49 | 49 |
50 class Font; | 50 class Font; |
51 class GraphicsContext; | 51 class GraphicsContext; |
52 class IntRect; | 52 class IntRect; |
53 class PlatformKeyboardEvent; | 53 class PlatformKeyboardEvent; |
54 class PlatformMouseEvent; | 54 class PlatformMouseEvent; |
55 class PlatformGestureEvent; | 55 class PlatformGestureEvent; |
| 56 #if ENABLE(TOUCH_EVENTS) |
56 class PlatformTouchEvent; | 57 class PlatformTouchEvent; |
| 58 #endif |
57 class PlatformWheelEvent; | 59 class PlatformWheelEvent; |
58 class PopupMenuClient; | 60 class PopupMenuClient; |
59 | 61 |
60 struct PopupContainerSettings { | 62 struct PopupContainerSettings { |
61 // Whether the PopupMenuClient should be told to change its text when a | 63 // Whether the PopupMenuClient should be told to change its text when a |
62 // new item is selected by using the arrow keys. | 64 // new item is selected by using the arrow keys. |
63 bool setTextOnIndexChange; | 65 bool setTextOnIndexChange; |
64 | 66 |
65 // Whether the selection should be accepted when the popup menu is | 67 // Whether the selection should be accepted when the popup menu is |
66 // closed (through ESC being pressed or the focus going away). | 68 // closed (through ESC being pressed or the focus going away). |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return adoptRef(new PopupListBox(client, settings)); | 125 return adoptRef(new PopupListBox(client, settings)); |
124 } | 126 } |
125 | 127 |
126 // FramelessScrollView | 128 // FramelessScrollView |
127 virtual void paint(GraphicsContext*, const IntRect&); | 129 virtual void paint(GraphicsContext*, const IntRect&); |
128 virtual bool handleMouseDownEvent(const PlatformMouseEvent&); | 130 virtual bool handleMouseDownEvent(const PlatformMouseEvent&); |
129 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&); | 131 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&); |
130 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 132 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
131 virtual bool handleWheelEvent(const PlatformWheelEvent&); | 133 virtual bool handleWheelEvent(const PlatformWheelEvent&); |
132 virtual bool handleKeyEvent(const PlatformKeyboardEvent&); | 134 virtual bool handleKeyEvent(const PlatformKeyboardEvent&); |
| 135 #if ENABLE(TOUCH_EVENTS) |
133 virtual bool handleTouchEvent(const PlatformTouchEvent&); | 136 virtual bool handleTouchEvent(const PlatformTouchEvent&); |
| 137 #endif |
134 virtual bool handleGestureEvent(const PlatformGestureEvent&); | 138 virtual bool handleGestureEvent(const PlatformGestureEvent&); |
135 | 139 |
136 // ScrollView | 140 // ScrollView |
137 virtual HostWindow* hostWindow() const; | 141 virtual HostWindow* hostWindow() const; |
138 | 142 |
139 // PopupListBox methods | 143 // PopupListBox methods |
140 | 144 |
141 // Hides the popup. | 145 // Hides the popup. |
142 void hidePopup(); | 146 void hidePopup(); |
143 | 147 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 int m_maxWindowWidth; | 303 int m_maxWindowWidth; |
300 | 304 |
301 // To forward last mouse release event. | 305 // To forward last mouse release event. |
302 RefPtr<Node> m_focusedNode; | 306 RefPtr<Node> m_focusedNode; |
303 | 307 |
304 }; | 308 }; |
305 | 309 |
306 } // namespace WebCore | 310 } // namespace WebCore |
307 | 311 |
308 #endif | 312 #endif |
OLD | NEW |