1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef _FWL_THEME_UTILS_H 8 #define _FWL_THEME_UTILS_H 9 #define THEME_XPSimilar 10 enum FWLTHEME_EDGE { 11 FWLTHEME_EDGE_Flat = 0, 12 FWLTHEME_EDGE_Raised, 13 FWLTHEME_EDGE_Sunken 14 }; 15 enum FWLTHEME_STATE { 16 FWLTHEME_STATE_Normal = 1, 17 FWLTHEME_STATE_Hover, 18 FWLTHEME_STATE_Pressed, 19 FWLTHEME_STATE_Disabale 20 }; 21 enum FWLTHEME_DIRECTION { 22 FWLTHEME_DIRECTION_Up = 0, 23 FWLTHEME_DIRECTION_Down, 24 FWLTHEME_DIRECTION_Left, 25 FWLTHEME_DIRECTION_Right 26 }; 27 typedef struct _FWLCOLOR { 28 union { 29 FX_DWORD color; 30 struct { 31 uint8_t b; 32 uint8_t g; 33 uint8_t r; 34 uint8_t a; 35 }; 36 }; 37 _FWLCOLOR_FWLCOLOR38 _FWLCOLOR() { color = 0; } _FWLCOLOR_FWLCOLOR39 _FWLCOLOR(FX_DWORD c) { color = c; } _FWLCOLOR_FWLCOLOR40 _FWLCOLOR(const _FWLCOLOR& c) { color = c.color; } 41 42 bool operator==(const _FWLCOLOR& frColor) { return color == frColor.color; } 43 FX_DWORD_FWLCOLOR44 operator FX_DWORD() { return color; } 45 } FWLCOLOR; 46 #define FWLTHEME_BEZIER 0.5522847498308f 47 #define FWLTHEME_PI 3.141592f 48 #define FWLTHEME_PI_2_1 1.570796f 49 #define FWLTHEME_PI_2_3 4.712388f 50 #define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153)) 51 #define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100)) 52 #define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226)) 53 #define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255)) 54 #define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216)) 55 #define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218)) 56 #define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112)) 57 #ifdef THEME_XPSimilar 58 #define FWLTHEME_CAPACITY_EdgeFlat 2.0f 59 #else 60 #define FWLTHEME_CAPACITY_EdgeFlat 0.0f 61 #endif 62 #define FWLTHEME_CAPACITY_EdgeRaised 2.0f 63 #define FWLTHEME_CAPACITY_EdgeSunken 2.0f 64 #define FWLTHEME_CAPACITY_FontSize 12.0f 65 #define FWLTHEME_CAPACITY_LineHeight 12.0f 66 #define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0)) 67 #define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218)) 68 #define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153)) 69 #define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f 70 #define FWLTHEME_CAPACITY_CXBorder 1.0f 71 #define FWLTHEME_CAPACITY_CYBorder 1.0f 72 #endif 73