Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: ui/views/controls/menu/menu_config.h

Issue 10837317: Setting the touch wrench menu as default menu for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed build problems Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
7 7
8 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/gfx/font.h" 9 #include "ui/gfx/font.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 // Layout type information for menu items. Use the instance() method to obtain 14 // Layout type information for menu items. Use the instance() method to obtain
15 // the MenuConfig for the current platform. 15 // the MenuConfig for the current platform.
16 struct VIEWS_EXPORT MenuConfig { 16 struct VIEWS_EXPORT MenuConfig {
17 MenuConfig(); 17 MenuConfig();
18 ~MenuConfig(); 18 ~MenuConfig();
19 19
20 // Resets the single shared MenuConfig instance. The next time instance() is 20 // Resets the single shared MenuConfig instance. The next time instance() is
21 // invoked a new MenuConfig is created and configured. 21 // invoked a new MenuConfig is created and configured.
22 static void Reset(); 22 static void Reset();
23 23
24 // Returns the single shared MenuConfig instance, creating if necessary. 24 // Returns the single shared MenuConfig instance, creating if necessary.
25 static const MenuConfig& instance(); 25 static const MenuConfig& instance();
26 26
27 // Returning true when the new menu style is used.
28 // TODO(skuhne): Once only the new menu style is used this function can get
29 // removed.
30 static const bool IsNewMenu();
31
27 // Font used by menus. 32 // Font used by menus.
28 gfx::Font font; 33 gfx::Font font;
29 34
30 // Normal text color. 35 // Normal text color.
31 SkColor text_color; 36 SkColor text_color;
32 37
33 // Submenu horizontal margin size. 38 // Submenu horizontal margin size.
34 int submenu_horizontal_margin_size; 39 int submenu_horizontal_margin_size;
35 40
36 // Submenu vertical margin size. 41 // Submenu vertical margin size.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 int radio_width; 79 int radio_width;
75 int radio_height; 80 int radio_height;
76 81
77 // Size of the submenu arrow. 82 // Size of the submenu arrow.
78 int arrow_height; 83 int arrow_height;
79 int arrow_width; 84 int arrow_width;
80 85
81 // Width of the gutter. Only used if render_gutter is true. 86 // Width of the gutter. Only used if render_gutter is true.
82 int gutter_width; 87 int gutter_width;
83 88
84 // Height of the separator. 89 // Height of a normal separator (ui::NORMAL_SEPARATOR).
85 int separator_height; 90 int separator_height;
86 91
92 // Height of a ui::UPPER_SEPARATOR.
93 int separator_upper_height;
94
95 // Height of a ui::LOWER_SEPARATOR.
96 int separator_lower_height;
97
98 // Height of a ui::SPACING_SEPARATOR.
99 int separator_spacing_height;
100
87 // Whether or not the gutter should be rendered. The gutter is specific to 101 // Whether or not the gutter should be rendered. The gutter is specific to
88 // Vista. 102 // Vista.
89 bool render_gutter; 103 bool render_gutter;
90 104
91 // Are mnemonics shown? 105 // Are mnemonics shown?
92 bool show_mnemonics; 106 bool show_mnemonics;
93 107
94 // Height of the scroll arrow. 108 // Height of the scroll arrow.
95 int scroll_arrow_height; 109 int scroll_arrow_height;
96 110
(...skipping 15 matching lines...) Expand all
112 126
113 private: 127 private:
114 // Creates and configures a new MenuConfig as appropriate for the current 128 // Creates and configures a new MenuConfig as appropriate for the current
115 // platform. 129 // platform.
116 static MenuConfig* Create(); 130 static MenuConfig* Create();
117 }; 131 };
118 132
119 } // namespace views 133 } // namespace views
120 134
121 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_ 135 #endif // UI_VIEWS_CONTROLS_MENU_MENU_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698