OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_IMAGE_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_IMAGE_VIEW_H_ |
6 #define VIEWS_CONTROLS_IMAGE_VIEW_H_ | 6 #define VIEWS_CONTROLS_IMAGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "views/view.h" | 10 #include "views/view.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Canvas; | 13 class Canvas; |
14 } | 14 } |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 | 17 |
18 ///////////////////////////////////////////////////////////////////////////// | 18 ///////////////////////////////////////////////////////////////////////////// |
19 // | 19 // |
20 // ImageView class. | 20 // ImageView class. |
21 // | 21 // |
22 // An ImageView can display an image from an SkBitmap. If a size is provided, | 22 // An ImageView can display an image from an SkBitmap. If a size is provided, |
23 // the ImageView will resize the provided image to fit if it is too big or will | 23 // the ImageView will resize the provided image to fit if it is too big or will |
24 // center the image if smaller. Otherwise, the preferred size matches the | 24 // center the image if smaller. Otherwise, the preferred size matches the |
25 // provided image size. | 25 // provided image size. |
26 // | 26 // |
27 ///////////////////////////////////////////////////////////////////////////// | 27 ///////////////////////////////////////////////////////////////////////////// |
28 class VIEWS_API ImageView : public View { | 28 class VIEWS_EXPORT ImageView : public View { |
29 public: | 29 public: |
30 enum Alignment { | 30 enum Alignment { |
31 LEADING = 0, | 31 LEADING = 0, |
32 CENTER, | 32 CENTER, |
33 TRAILING | 33 TRAILING |
34 }; | 34 }; |
35 | 35 |
36 ImageView(); | 36 ImageView(); |
37 virtual ~ImageView(); | 37 virtual ~ImageView(); |
38 | 38 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 // The current tooltip text. | 104 // The current tooltip text. |
105 string16 tooltip_text_; | 105 string16 tooltip_text_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(ImageView); | 107 DISALLOW_COPY_AND_ASSIGN(ImageView); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace views | 110 } // namespace views |
111 | 111 |
112 #endif // VIEWS_CONTROLS_IMAGE_VIEW_H_ | 112 #endif // VIEWS_CONTROLS_IMAGE_VIEW_H_ |
OLD | NEW |