Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ios/chrome/browser/ui/toolbar/toolbar_resource_macros.h

Issue 2588733002: Upstream Chrome on iOS source code [9/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/toolbar/toolbar_owner.h ('k') | ios/chrome/browser/ui/toolbar/toolbar_tools_menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698