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) | |
57 class PlatformTouchEvent; | 56 class PlatformTouchEvent; |
58 #endif | |
59 class PlatformWheelEvent; | 57 class PlatformWheelEvent; |
60 class PopupMenuClient; | 58 class PopupMenuClient; |
61 | 59 |
62 struct PopupContainerSettings { | 60 struct PopupContainerSettings { |
63 // Whether the PopupMenuClient should be told to change its text when a | 61 // Whether the PopupMenuClient should be told to change its text when a |
64 // new item is selected by using the arrow keys. | 62 // new item is selected by using the arrow keys. |
65 bool setTextOnIndexChange; | 63 bool setTextOnIndexChange; |
66 | 64 |
67 // Whether the selection should be accepted when the popup menu is | 65 // Whether the selection should be accepted when the popup menu is |
68 // closed (through ESC being pressed or the focus going away). | 66 // closed (through ESC being pressed or the focus going away). |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 return adoptRef(new PopupListBox(client, settings)); | 123 return adoptRef(new PopupListBox(client, settings)); |
126 } | 124 } |
127 | 125 |
128 // FramelessScrollView | 126 // FramelessScrollView |
129 virtual void paint(GraphicsContext*, const IntRect&); | 127 virtual void paint(GraphicsContext*, const IntRect&); |
130 virtual bool handleMouseDownEvent(const PlatformMouseEvent&); | 128 virtual bool handleMouseDownEvent(const PlatformMouseEvent&); |
131 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&); | 129 virtual bool handleMouseMoveEvent(const PlatformMouseEvent&); |
132 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&); | 130 virtual bool handleMouseReleaseEvent(const PlatformMouseEvent&); |
133 virtual bool handleWheelEvent(const PlatformWheelEvent&); | 131 virtual bool handleWheelEvent(const PlatformWheelEvent&); |
134 virtual bool handleKeyEvent(const PlatformKeyboardEvent&); | 132 virtual bool handleKeyEvent(const PlatformKeyboardEvent&); |
135 #if ENABLE(TOUCH_EVENTS) | |
136 virtual bool handleTouchEvent(const PlatformTouchEvent&); | 133 virtual bool handleTouchEvent(const PlatformTouchEvent&); |
137 #endif | |
138 virtual bool handleGestureEvent(const PlatformGestureEvent&); | 134 virtual bool handleGestureEvent(const PlatformGestureEvent&); |
139 | 135 |
140 // ScrollView | 136 // ScrollView |
141 virtual HostWindow* hostWindow() const; | 137 virtual HostWindow* hostWindow() const; |
142 | 138 |
143 // PopupListBox methods | 139 // PopupListBox methods |
144 | 140 |
145 // Hides the popup. | 141 // Hides the popup. |
146 void hidePopup(); | 142 void hidePopup(); |
147 | 143 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 int m_maxWindowWidth; | 299 int m_maxWindowWidth; |
304 | 300 |
305 // To forward last mouse release event. | 301 // To forward last mouse release event. |
306 RefPtr<Node> m_focusedNode; | 302 RefPtr<Node> m_focusedNode; |
307 | 303 |
308 }; | 304 }; |
309 | 305 |
310 } // namespace WebCore | 306 } // namespace WebCore |
311 | 307 |
312 #endif | 308 #endif |
OLD | NEW |