Chromium Code Reviews| Index: ui/base/nine_image_painter_factory.h |
| diff --git a/ui/base/nine_image_painter_factory.h b/ui/base/nine_image_painter_factory.h |
| index 8a622839f4f3fd95b3c217fe24485e2bc6753136..9d8f4daede4e6a04c26d06d9f84c6d227ed25d53 100644 |
| --- a/ui/base/nine_image_painter_factory.h |
| +++ b/ui/base/nine_image_painter_factory.h |
| @@ -23,6 +23,17 @@ |
| x ## _LEFT, EMPTY_IMAGE, x ## _RIGHT, \ |
| x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, } |
| +// A macro to define arrays of IDR constants used with CreateImageGridPainter |
| +// where it can only be streched horizontally. |
| +#define IMAGE_GRID_HORIZONTAL(x) { x ## _LEFT, x ## _CENTER, x ## _RIGHT, \ |
| + EMPTY_IMAGE, EMPTY_IMAGE, EMPTY_IMAGE, \ |
| + EMPTY_IMAGE, EMPTY_IMAGE, EMPTY_IMAGE} |
| + |
| +// A macro to define arrays of IDR constants used with CreateImageGridPainter |
| +// where it can only be streched vertically. |
| +#define IMAGE_GRID_VERTICAL(x) { x ## _TOP, EMPTY_IMAGE, EMPTY_IMAGE, \ |
| + x ## _CENTER, EMPTY_IMAGE, EMPTY_IMAGE, \ |
| + x ## _BOTTOM, EMPTY_IMAGE, EMPTY_IMAGE} |
| namespace gfx { |
| class NineImagePainter; |
| @@ -30,6 +41,8 @@ class NineImagePainter; |
| namespace ui { |
| +const int kImageGridNum = 9; |
|
oshima
2014/12/15 19:25:25
I added this to be used to define array of the ima
oshima
2014/12/15 21:26:38
you didn't seem to like it, so removed. PTAL
|
| + |
| // Creates a NineImagePainter from an array of image ids. It's expected the |
| // array came from the IMAGE_GRID macro. |
| UI_BASE_EXPORT scoped_ptr<gfx::NineImagePainter> CreateNineImagePainter( |