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

Side by Side Diff: views/controls/button/image_button.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « views/controls/button/checkbox.cc ('k') | views/controls/button/image_button.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
7 7
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "views/controls/button/custom_button.h" 9 #include "views/controls/button/custom_button.h"
10 10
(...skipping 15 matching lines...) Expand all
26 enum VerticalAlignment { ALIGN_TOP = 0, 26 enum VerticalAlignment { ALIGN_TOP = 0,
27 ALIGN_MIDDLE, 27 ALIGN_MIDDLE,
28 ALIGN_BOTTOM }; 28 ALIGN_BOTTOM };
29 29
30 // Sets how the image is laid out within the button's bounds. 30 // Sets how the image is laid out within the button's bounds.
31 void SetImageAlignment(HorizontalAlignment h_align, 31 void SetImageAlignment(HorizontalAlignment h_align,
32 VerticalAlignment v_align); 32 VerticalAlignment v_align);
33 33
34 // Overridden from View: 34 // Overridden from View:
35 virtual gfx::Size GetPreferredSize(); 35 virtual gfx::Size GetPreferredSize();
36 virtual void Paint(ChromeCanvas* canvas); 36 virtual void Paint(gfx::Canvas* canvas);
37 37
38 protected: 38 protected:
39 // Returns the image to paint. This is invoked from paint and returns a value 39 // Returns the image to paint. This is invoked from paint and returns a value
40 // from images. 40 // from images.
41 virtual SkBitmap GetImageToPaint(); 41 virtual SkBitmap GetImageToPaint();
42 42
43 // The images used to render the different states of this button. 43 // The images used to render the different states of this button.
44 SkBitmap images_[BS_COUNT]; 44 SkBitmap images_[BS_COUNT];
45 45
46 private: 46 private:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // The parent class's tooltip_text_ is displayed when not toggled, and 92 // The parent class's tooltip_text_ is displayed when not toggled, and
93 // this one is shown when toggled. 93 // this one is shown when toggled.
94 std::wstring toggled_tooltip_text_; 94 std::wstring toggled_tooltip_text_;
95 95
96 DISALLOW_EVIL_CONSTRUCTORS(ToggleImageButton); 96 DISALLOW_EVIL_CONSTRUCTORS(ToggleImageButton);
97 }; 97 };
98 98
99 } // namespace views 99 } // namespace views
100 100
101 #endif // VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ 101 #endif // VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_
OLDNEW
« no previous file with comments | « views/controls/button/checkbox.cc ('k') | views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698