1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
#ifndef INCLUDED_VCL_INC_WIDGETTHEME_HXX
#define INCLUDED_VCL_INC_WIDGETTHEME_HXX
/**
* This file expects cairo.h and the definition of
* the other types used here to be defined before
* including it.
*/
namespace vcl
{
struct WidgetDrawStyle
{
uint32_t nSize;
uint32_t maFaceColor;
uint32_t maCheckedColor;
uint32_t maLightColor;
uint32_t maLightBorderColor;
uint32_t maShadowColor;
uint32_t maDarkShadowColor;
uint32_t maButtonTextColor;
uint32_t maButtonRolloverTextColor;
uint32_t maRadioCheckTextColor;
uint32_t maGroupTextColor;
uint32_t maLabelTextColor;
uint32_t maWindowColor;
uint32_t maWindowTextColor;
uint32_t maDialogColor;
uint32_t maDialogTextColor;
uint32_t maWorkspaceColor;
uint32_t maMonoColor;
uint32_t maFieldColor;
uint32_t maFieldTextColor;
uint32_t maFieldRolloverTextColor;
uint32_t maActiveColor;
uint32_t maActiveTextColor;
uint32_t maActiveBorderColor;
uint32_t maDeactiveColor;
uint32_t maDeactiveTextColor;
uint32_t maDeactiveBorderColor;
uint32_t maMenuColor;
uint32_t maMenuBarColor;
uint32_t maMenuBarRolloverColor;
uint32_t maMenuBorderColor;
uint32_t maMenuTextColor;
uint32_t maMenuBarTextColor;
uint32_t maMenuBarRolloverTextColor;
uint32_t maMenuBarHighlightTextColor;
uint32_t maMenuHighlightColor;
uint32_t maMenuHighlightTextColor;
uint32_t maHighlightColor;
uint32_t maHighlightTextColor;
uint32_t maActiveTabColor;
uint32_t maInactiveTabColor;
uint32_t maTabTextColor;
uint32_t maTabRolloverTextColor;
uint32_t maTabHighlightTextColor;
uint32_t maDisableColor;
uint32_t maHelpColor;
uint32_t maHelpTextColor;
uint32_t maLinkColor;
uint32_t maVisitedLinkColor;
uint32_t maToolTextColor;
uint32_t maFontColor;
};
struct ControlDrawParameters
{
ControlDrawParameters(cairo_t* i_pCairo, ControlPart i_ePart, ControlState i_eState)
: nSize(sizeof(ControlDrawParameters))
, pCairo(i_pCairo)
, ePart(i_ePart)
, eState(i_eState)
, eButtonValue(ButtonValue::DontKnow)
, bIsStock(false)
, nValue(0)
{
}
uint32_t nSize;
cairo_t* pCairo;
ControlPart ePart;
ControlState eState;
ButtonValue eButtonValue;
bool bIsStock;
int64_t nValue;
};
typedef struct _WidgetThemeLibrary WidgetThemeLibrary;
struct _WidgetThemeLibrary
{
uint32_t nSize;
bool (*isNativeControlSupported)(ControlType eType, ControlPart ePart);
bool (*getRegion)(ControlType eType, ControlPart ePart, ControlState eState,
const tools::Rectangle& rBoundingControlRegion,
tools::Rectangle& rNativeBoundingRegion,
tools::Rectangle& rNativeContentRegion);
bool (*drawPushButton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawCheckbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawCombobox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawEditbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawScrollbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawSpinButtons)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawSpinbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawTabItem)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawTabPane)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawTabHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawTabBody)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawSlider)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawFixedline)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawToolbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawProgress)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawWindowsBackground)(ControlDrawParameters const& rParameters, long nWidth,
long nHeight);
bool (*drawListbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawFrame)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawListNode)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawListNet)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*drawListHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
bool (*updateSettings)(WidgetDrawStyle& rStyle);
};
extern "C" vcl::WidgetThemeLibrary* CreateWidgetThemeLibrary();
} // end vcl namespace
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|