OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <map> | 11 #include <map> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 // parameter in order to determine whether or not to take into account the | 130 // parameter in order to determine whether or not to take into account the |
131 // mirroring setting of the View when returning bounds positions. | 131 // mirroring setting of the View when returning bounds positions. |
132 enum PositionMirroringSettings { | 132 enum PositionMirroringSettings { |
133 IGNORE_MIRRORING_TRANSFORMATION = 0, | 133 IGNORE_MIRRORING_TRANSFORMATION = 0, |
134 APPLY_MIRRORING_TRANSFORMATION | 134 APPLY_MIRRORING_TRANSFORMATION |
135 }; | 135 }; |
136 | 136 |
137 // The view class name. | 137 // The view class name. |
138 static char kViewClassName[]; | 138 static char kViewClassName[]; |
139 | 139 |
140 // The default value for how long to wait (in ms) before showing a menu | |
141 // button on hover. This value is used if the OS doesn't supply one. | |
142 static const int kShowFolderDropMenuDelay; | |
sky
2010/02/04 20:58:49
Does this really need to be public? Also, it shoul
| |
143 | |
140 View(); | 144 View(); |
141 virtual ~View(); | 145 virtual ~View(); |
142 | 146 |
143 // Returns the amount of time between double clicks, in milliseconds. | 147 // Returns the amount of time between double clicks, in milliseconds. |
144 static int GetDoubleClickTimeMS(); | 148 static int GetDoubleClickTimeMS(); |
145 | 149 |
150 // Returns the amount of time to wait from hovering over a menu button until | |
151 // showing the menu. | |
152 static int GetMenuShowDelay(); | |
153 | |
146 // Sizing functions | 154 // Sizing functions |
147 | 155 |
148 // Get the bounds of the View, relative to the parent. Essentially, this | 156 // Get the bounds of the View, relative to the parent. Essentially, this |
149 // function returns the bounds_ rectangle. | 157 // function returns the bounds_ rectangle. |
150 // | 158 // |
151 // This is the function subclasses should use whenever they need to obtain | 159 // This is the function subclasses should use whenever they need to obtain |
152 // the bounds of one of their child views (for example, when implementing | 160 // the bounds of one of their child views (for example, when implementing |
153 // View::Layout()). | 161 // View::Layout()). |
154 const gfx::Rect& bounds() const { return bounds_; } | 162 const gfx::Rect& bounds() const { return bounds_; } |
155 | 163 |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1280 // is going to be flipped horizontally (using the appropriate transform) on | 1288 // is going to be flipped horizontally (using the appropriate transform) on |
1281 // right-to-left locales for this View. | 1289 // right-to-left locales for this View. |
1282 bool flip_canvas_on_paint_for_rtl_ui_; | 1290 bool flip_canvas_on_paint_for_rtl_ui_; |
1283 | 1291 |
1284 DISALLOW_COPY_AND_ASSIGN(View); | 1292 DISALLOW_COPY_AND_ASSIGN(View); |
1285 }; | 1293 }; |
1286 | 1294 |
1287 } // namespace views | 1295 } // namespace views |
1288 | 1296 |
1289 #endif // VIEWS_VIEW_H_ | 1297 #endif // VIEWS_VIEW_H_ |
OLD | NEW |