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

Side by Side Diff: ui/native_theme/native_theme_win.h

Issue 2813703003: Use NativeTheme to draw vertical menu separators. (Closed)
Patch Set: use rectf Created 3 years, 8 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
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_NATIVE_THEME_NATIVE_THEME_WIN_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
7 7
8 // A wrapper class for working with custom XP/Vista themes provided in 8 // A wrapper class for working with custom XP/Vista themes provided in
9 // uxtheme.dll. This is a singleton class that can be grabbed using 9 // uxtheme.dll. This is a singleton class that can be grabbed using
10 // NativeThemeWin::instance(). 10 // NativeThemeWin::instance().
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool IsUsingHighContrastThemeInternal(); 125 bool IsUsingHighContrastThemeInternal();
126 void CloseHandlesInternal(); 126 void CloseHandlesInternal();
127 127
128 // gfx::SysColorChangeListener implementation: 128 // gfx::SysColorChangeListener implementation:
129 void OnSysColorChange() override; 129 void OnSysColorChange() override;
130 130
131 // Update the locally cached set of system colors. 131 // Update the locally cached set of system colors.
132 void UpdateSystemColors(); 132 void UpdateSystemColors();
133 133
134 // Painting functions that paint to PaintCanvas. 134 // Painting functions that paint to PaintCanvas.
135 void PaintMenuSeparator(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; 135 void PaintMenuSeparator(cc::PaintCanvas* canvas,
136 const MenuSeparatorExtraParams& params) const;
136 void PaintMenuGutter(cc::PaintCanvas* canvas, const gfx::Rect& rect) const; 137 void PaintMenuGutter(cc::PaintCanvas* canvas, const gfx::Rect& rect) const;
137 void PaintMenuBackground(cc::PaintCanvas* canvas, 138 void PaintMenuBackground(cc::PaintCanvas* canvas,
138 const gfx::Rect& rect) const; 139 const gfx::Rect& rect) const;
139 140
140 // Paint directly to canvas' HDC. 141 // Paint directly to canvas' HDC.
141 void PaintDirect(SkCanvas* destination_canvas, 142 void PaintDirect(SkCanvas* destination_canvas,
142 HDC hdc, 143 HDC hdc,
143 Part part, 144 Part part,
144 State state, 145 State state,
145 const gfx::Rect& rect, 146 const gfx::Rect& rect,
(...skipping 16 matching lines...) Expand all
162 int ts, 163 int ts,
163 SIZE* size) const; 164 SIZE* size) const;
164 165
165 HRESULT PaintButton(HDC hdc, 166 HRESULT PaintButton(HDC hdc,
166 State state, 167 State state,
167 const ButtonExtraParams& extra, 168 const ButtonExtraParams& extra,
168 int part_id, 169 int part_id,
169 int state_id, 170 int state_id,
170 RECT* rect) const; 171 RECT* rect) const;
171 172
172 HRESULT PaintMenuSeparator(HDC hdc, const gfx::Rect& rect) const;
173
174 HRESULT PaintMenuGutter(HDC hdc, const gfx::Rect& rect) const;
175
176 // |arrow_direction| determines whether the arrow is pointing to the left or 173 // |arrow_direction| determines whether the arrow is pointing to the left or
177 // to the right. In RTL locales, sub-menus open from right to left and 174 // to the right. In RTL locales, sub-menus open from right to left and
178 // therefore the menu arrow should point to the left and not to the right. 175 // therefore the menu arrow should point to the left and not to the right.
179 HRESULT PaintMenuArrow(HDC hdc, 176 HRESULT PaintMenuArrow(HDC hdc,
180 State state, 177 State state,
181 const gfx::Rect& rect, 178 const gfx::Rect& rect,
182 const MenuArrowExtraParams& extra) const; 179 const MenuArrowExtraParams& extra) const;
183 180
184 HRESULT PaintMenuBackground(HDC hdc, const gfx::Rect& rect) const;
185
186 HRESULT PaintMenuCheck(HDC hdc, 181 HRESULT PaintMenuCheck(HDC hdc,
187 State state, 182 State state,
188 const gfx::Rect& rect, 183 const gfx::Rect& rect,
189 const MenuCheckExtraParams& extra) const; 184 const MenuCheckExtraParams& extra) const;
190 185
191 HRESULT PaintMenuCheckBackground(HDC hdc, 186 HRESULT PaintMenuCheckBackground(HDC hdc,
192 State state, 187 State state,
193 const gfx::Rect& rect) const; 188 const gfx::Rect& rect) const;
194 189
195 HRESULT PaintMenuItemBackground(HDC hdc,
196 State state,
197 const gfx::Rect& rect,
198 const MenuItemExtraParams& extra) const;
199
200 HRESULT PaintPushButton(HDC hdc, 190 HRESULT PaintPushButton(HDC hdc,
201 Part part, 191 Part part,
202 State state, 192 State state,
203 const gfx::Rect& rect, 193 const gfx::Rect& rect,
204 const ButtonExtraParams& extra) const; 194 const ButtonExtraParams& extra) const;
205 195
206 HRESULT PaintRadioButton(HDC hdc, 196 HRESULT PaintRadioButton(HDC hdc,
207 Part part, 197 Part part,
208 State state, 198 State state,
209 const gfx::Rect& rect, 199 const gfx::Rect& rect,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 365
376 // Is |is_using_high_contrast_| valid? 366 // Is |is_using_high_contrast_| valid?
377 mutable bool is_using_high_contrast_valid_; 367 mutable bool is_using_high_contrast_valid_;
378 368
379 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin); 369 DISALLOW_COPY_AND_ASSIGN(NativeThemeWin);
380 }; 370 };
381 371
382 } // namespace ui 372 } // namespace ui
383 373
384 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_ 374 #endif // UI_NATIVE_THEME_NATIVE_THEME_WIN_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698