OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_RESOURCE_MACROS_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_RESOURCE_MACROS_H_ |
| 7 |
| 8 #include "ios/chrome/grit/ios_theme_resources.h" |
| 9 |
| 10 // These macros are used to populate the 3-dimensional array used to map from |
| 11 // a button's name/style/state combination to resource ID pointing to the image |
| 12 // to be used for the button. |
| 13 // Each macro should "produce" a 2x3 entry for a button specified by |name| |
| 14 // where style ∈ [light, dark] and state ∈ [normal, pressed, disabled]. |
| 15 // 0 is used when the resource for a given combination does not exist. |
| 16 |
| 17 // clang-format off |
| 18 #define TOOLBAR_IDR_THREE_STATE(name) \ |
| 19 { { IDR_IOS_TOOLBAR_LIGHT_ ## name, \ |
| 20 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _PRESSED, \ |
| 21 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _DISABLED }, \ |
| 22 { IDR_IOS_TOOLBAR_DARK_ ## name, \ |
| 23 IDR_IOS_TOOLBAR_DARK_ ## name ## _PRESSED, \ |
| 24 IDR_IOS_TOOLBAR_DARK_ ## name ## _DISABLED } } |
| 25 |
| 26 #define TOOLBAR_IDR_TWO_STATE(name) \ |
| 27 { { IDR_IOS_TOOLBAR_LIGHT_ ## name, \ |
| 28 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _PRESSED, 0 }, \ |
| 29 { IDR_IOS_TOOLBAR_DARK_ ## name, \ |
| 30 IDR_IOS_TOOLBAR_DARK_ ## name ## _PRESSED, 0 } } |
| 31 |
| 32 #define TOOLBAR_IDR_ONE_STATE(name) \ |
| 33 { { IDR_IOS_TOOLBAR_LIGHT_ ## name, 0, 0 }, \ |
| 34 { IDR_IOS_TOOLBAR_LIGHT_ ## name, 0, 0 } } |
| 35 |
| 36 #define TOOLBAR_IDR_LIGHT_ONLY_THREE_STATE(name) \ |
| 37 { { IDR_IOS_TOOLBAR_LIGHT_ ## name, \ |
| 38 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _PRESSED, \ |
| 39 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _DISABLED }, \ |
| 40 { 0, 0, 0 } } |
| 41 |
| 42 #define TOOLBAR_IDR_LIGHT_ONLY_TWO_STATE(name) \ |
| 43 { { IDR_IOS_TOOLBAR_LIGHT_ ## name, \ |
| 44 IDR_IOS_TOOLBAR_LIGHT_ ## name ## _PRESSED, 0 }, \ |
| 45 { 0, 0, 0 } } |
| 46 // clang-format on |
| 47 |
| 48 #endif // IOS_CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_RESOURCE_MACROS_H_ |
OLD | NEW |