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

Side by Side Diff: xfa/include/fwl/theme/utils.h

Issue 1722873002: Remove many _CAPS structure names. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 10 months 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
« no previous file with comments | « xfa/include/fwl/core/fwl_widget.h ('k') | xfa/include/fxfa/fxfa_basic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_ 7 #ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_
8 #define XFA_INCLUDE_FWL_THEME_UTILS_H_ 8 #define XFA_INCLUDE_FWL_THEME_UTILS_H_
9 9
10 #include "core/include/fxcrt/fx_system.h" 10 #include "core/include/fxcrt/fx_system.h"
11 11
12 #define THEME_XPSimilar 12 #define THEME_XPSimilar
13 enum FWLTHEME_EDGE { 13 enum FWLTHEME_EDGE {
14 FWLTHEME_EDGE_Flat = 0, 14 FWLTHEME_EDGE_Flat = 0,
15 FWLTHEME_EDGE_Raised, 15 FWLTHEME_EDGE_Raised,
16 FWLTHEME_EDGE_Sunken 16 FWLTHEME_EDGE_Sunken
17 }; 17 };
18 enum FWLTHEME_STATE { 18 enum FWLTHEME_STATE {
19 FWLTHEME_STATE_Normal = 1, 19 FWLTHEME_STATE_Normal = 1,
20 FWLTHEME_STATE_Hover, 20 FWLTHEME_STATE_Hover,
21 FWLTHEME_STATE_Pressed, 21 FWLTHEME_STATE_Pressed,
22 FWLTHEME_STATE_Disabale 22 FWLTHEME_STATE_Disabale
23 }; 23 };
24 enum FWLTHEME_DIRECTION { 24 enum FWLTHEME_DIRECTION {
25 FWLTHEME_DIRECTION_Up = 0, 25 FWLTHEME_DIRECTION_Up = 0,
26 FWLTHEME_DIRECTION_Down, 26 FWLTHEME_DIRECTION_Down,
27 FWLTHEME_DIRECTION_Left, 27 FWLTHEME_DIRECTION_Left,
28 FWLTHEME_DIRECTION_Right 28 FWLTHEME_DIRECTION_Right
29 }; 29 };
30 typedef struct _FWLCOLOR { 30 struct FWLCOLOR {
31 union { 31 union {
32 FX_DWORD color; 32 FX_DWORD color;
33 struct { 33 struct {
34 uint8_t b; 34 uint8_t b;
35 uint8_t g; 35 uint8_t g;
36 uint8_t r; 36 uint8_t r;
37 uint8_t a; 37 uint8_t a;
38 }; 38 };
39 }; 39 };
40 40
41 _FWLCOLOR() { color = 0; } 41 FWLCOLOR() : color(0) {}
42 _FWLCOLOR(FX_DWORD c) { color = c; } 42 FWLCOLOR(FX_DWORD c) : color(c) {}
43 _FWLCOLOR(const _FWLCOLOR& c) { color = c.color; } 43 FWLCOLOR(const FWLCOLOR& c) : color(c.color) {}
44 44
45 bool operator==(const _FWLCOLOR& frColor) { return color == frColor.color; } 45 bool operator==(const FWLCOLOR& frColor) { return color == frColor.color; }
46
47 operator FX_DWORD() { return color; } 46 operator FX_DWORD() { return color; }
48 } FWLCOLOR; 47 };
49 #define FWLTHEME_BEZIER FX_BEZIER 48 #define FWLTHEME_BEZIER FX_BEZIER
50 #define FWLTHEME_PI FX_PI 49 #define FWLTHEME_PI FX_PI
51 #define FWLTHEME_PI_2_1 (FX_PI / 2.0f) 50 #define FWLTHEME_PI_2_1 (FX_PI / 2.0f)
52 #define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f) 51 #define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f)
53 #define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153)) 52 #define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153))
54 #define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100)) 53 #define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100))
55 #define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226)) 54 #define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226))
56 #define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255)) 55 #define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255))
57 #define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216)) 56 #define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216))
58 #define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218)) 57 #define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218))
59 #define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112)) 58 #define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112))
60 #ifdef THEME_XPSimilar 59 #ifdef THEME_XPSimilar
61 #define FWLTHEME_CAPACITY_EdgeFlat 2.0f 60 #define FWLTHEME_CAPACITY_EdgeFlat 2.0f
62 #else 61 #else
63 #define FWLTHEME_CAPACITY_EdgeFlat 0.0f 62 #define FWLTHEME_CAPACITY_EdgeFlat 0.0f
64 #endif 63 #endif
65 #define FWLTHEME_CAPACITY_EdgeRaised 2.0f 64 #define FWLTHEME_CAPACITY_EdgeRaised 2.0f
66 #define FWLTHEME_CAPACITY_EdgeSunken 2.0f 65 #define FWLTHEME_CAPACITY_EdgeSunken 2.0f
67 #define FWLTHEME_CAPACITY_FontSize 12.0f 66 #define FWLTHEME_CAPACITY_FontSize 12.0f
68 #define FWLTHEME_CAPACITY_LineHeight 12.0f 67 #define FWLTHEME_CAPACITY_LineHeight 12.0f
69 #define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0)) 68 #define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0))
70 #define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218)) 69 #define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218))
71 #define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153)) 70 #define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153))
72 #define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f 71 #define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f
73 #define FWLTHEME_CAPACITY_CXBorder 1.0f 72 #define FWLTHEME_CAPACITY_CXBorder 1.0f
74 #define FWLTHEME_CAPACITY_CYBorder 1.0f 73 #define FWLTHEME_CAPACITY_CYBorder 1.0f
75 74
76 #endif // XFA_INCLUDE_FWL_THEME_UTILS_H_ 75 #endif // XFA_INCLUDE_FWL_THEME_UTILS_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/core/fwl_widget.h ('k') | xfa/include/fxfa/fxfa_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698