OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 protected: | 41 protected: |
42 // Returns the image to paint. This is invoked from paint and returns a value | 42 // Returns the image to paint. This is invoked from paint and returns a value |
43 // from images. | 43 // from images. |
44 virtual SkBitmap GetImageToPaint(); | 44 virtual SkBitmap GetImageToPaint(); |
45 | 45 |
46 // The images used to render the different states of this button. | 46 // The images used to render the different states of this button. |
47 SkBitmap images_[BS_COUNT]; | 47 SkBitmap images_[BS_COUNT]; |
48 | 48 |
49 // The background image. | 49 // The background image. |
50 scoped_ptr<SkBitmap> background_image_; | 50 SkBitmap background_image_; |
51 | 51 |
52 private: | 52 private: |
53 // Image alignment. | 53 // Image alignment. |
54 HorizontalAlignment h_alignment_; | 54 HorizontalAlignment h_alignment_; |
55 VerticalAlignment v_alignment_; | 55 VerticalAlignment v_alignment_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(ImageButton); | 57 DISALLOW_COPY_AND_ASSIGN(ImageButton); |
58 }; | 58 }; |
59 | 59 |
60 //////////////////////////////////////////////////////////////////////////////// | 60 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // The parent class's tooltip_text_ is displayed when not toggled, and | 98 // The parent class's tooltip_text_ is displayed when not toggled, and |
99 // this one is shown when toggled. | 99 // this one is shown when toggled. |
100 std::wstring toggled_tooltip_text_; | 100 std::wstring toggled_tooltip_text_; |
101 | 101 |
102 DISALLOW_EVIL_CONSTRUCTORS(ToggleImageButton); | 102 DISALLOW_EVIL_CONSTRUCTORS(ToggleImageButton); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace views | 105 } // namespace views |
106 | 106 |
107 #endif // VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ | 107 #endif // VIEWS_CONTROLS_BUTTON_IMAGE_BUTTON_H_ |
OLD | NEW |