summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-14 04:21:18 +0000
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-14 04:21:18 +0000
commit71c1852d3b23f145d3f0cd1333f33260b66ad309 (patch)
tree5a9b4e8edc9b5753fa45fdcd47677a22c8b87d86 /ui/base
parent4a95f859a4abafb2d429d25f070216e506763315 (diff)
downloadchromium_src-71c1852d3b23f145d3f0cd1333f33260b66ad309.zip
chromium_src-71c1852d3b23f145d3f0cd1333f33260b66ad309.tar.gz
chromium_src-71c1852d3b23f145d3f0cd1333f33260b66ad309.tar.bz2
[OSX] IMAGE_GRID macro for NinePartImage.
Mirrors Views' IMAGE_GRID macro, reducing boilerplate code. BUG=none R=rsesek@chromium.org Review URL: https://codereview.chromium.org/160253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/cocoa/appkit_utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/base/cocoa/appkit_utils.h b/ui/base/cocoa/appkit_utils.h
index eca3a7e..18f1fdf 100644
--- a/ui/base/cocoa/appkit_utils.h
+++ b/ui/base/cocoa/appkit_utils.h
@@ -23,6 +23,11 @@ struct NinePartImageIds {
int bottom_right;
};
+// A macro to define arrays of IDR constants used with DrawNinePartImage.
+#define IMAGE_GRID(x) { x ## _TOP_LEFT, x ## _TOP, x ## _TOP_RIGHT, \
+ x ## _LEFT, x ## _CENTER, x ## _RIGHT, \
+ x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## _BOTTOM_RIGHT, }
+
// Utility method to draw a nine part image using image ids.
UI_BASE_EXPORT void DrawNinePartImage(NSRect frame,
const NinePartImageIds& image_ids,