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

Side by Side Diff: ui/views/controls/button/border_images.h

Issue 11262002: Merge TextButton and LabelButton border images util structs, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add friend tests, remove unused variable. Created 8 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_BORDER_IMAGES_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_BORDER_IMAGES_H_
7
8 #include "ui/gfx/image/image_skia.h"
9 #include "ui/views/views_export.h"
10
11 namespace gfx {
12 class Canvas;
13 class Rect;
14 }
15
16 namespace views {
17
18 // BorderImages stores and paints the nine images comprising a button border.
19 // TODO(msw): Merge common "nine-box" code with BubbleBorder, ImagePainter, etc.
20 // TODO(msw): Stitch border image assets together and use ImagePainter.
21 struct VIEWS_EXPORT BorderImages {
22 // The default hot and pushed button image IDs; normal has none by default.
23 static const int kHot[];
24 static const int kPushed[];
25
26 BorderImages();
27 // |image_ids| must contain 9 image IDs matching the member order below.
28 explicit BorderImages(const int image_ids[]);
29 ~BorderImages();
30
31 // Paint the images on |canvas| within |rect|'s dimensions.
32 void Paint(const gfx::Rect& rect, gfx::Canvas* canvas) const;
33
34 gfx::ImageSkia top_left;
35 gfx::ImageSkia top;
36 gfx::ImageSkia top_right;
37 gfx::ImageSkia left;
38 gfx::ImageSkia center;
39 gfx::ImageSkia right;
40 gfx::ImageSkia bottom_left;
41 gfx::ImageSkia bottom;
42 gfx::ImageSkia bottom_right;
43 };
44
45 } // namespace views
46
47 #endif // UI_VIEWS_CONTROLS_BUTTON_BORDER_IMAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_button_border.cc ('k') | ui/views/controls/button/border_images.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698