LibreOffice Module vcl (master)  1
WidgetThemeLibrary.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  */
10 
11 #ifndef INCLUDED_VCL_INC_WIDGETTHEME_HXX
12 #define INCLUDED_VCL_INC_WIDGETTHEME_HXX
13 
14 #include <cstdint>
15 
16 namespace vcl
17 {
19 {
20  uint32_t nSize;
21  uint32_t maFaceColor;
22  uint32_t maCheckedColor;
23  uint32_t maLightColor;
25  uint32_t maShadowColor;
43  uint32_t maGroupTextColor;
44  uint32_t maLabelTextColor;
45  uint32_t maWindowColor;
47  uint32_t maDialogColor;
49  uint32_t maWorkspaceColor;
50  uint32_t maMonoColor;
51  uint32_t maFieldColor;
52  uint32_t maFieldTextColor;
54  uint32_t maActiveColor;
57  uint32_t maDeactiveColor;
60  uint32_t maMenuColor;
61  uint32_t maMenuBarColor;
64  uint32_t maMenuTextColor;
70  uint32_t maHighlightColor;
72  uint32_t maActiveTabColor;
74  uint32_t maTabTextColor;
77  uint32_t maDisableColor;
78  uint32_t maHelpColor;
79  uint32_t maHelpTextColor;
80  uint32_t maLinkColor;
82  uint32_t maToolTextColor;
83  uint32_t maFontColor;
84 };
85 
87 {
88  typedef struct _cairo cairo_t;
89  ControlDrawParameters(cairo_t* i_pCairo, ControlPart i_ePart, ControlState i_eState)
90  : nSize(sizeof(ControlDrawParameters))
91  , pCairo(i_pCairo)
92  , ePart(i_ePart)
93  , eState(i_eState)
95  , bIsAction(false)
96  , nValue(0)
97  {
98  }
99 
100  uint32_t nSize;
105  bool bIsAction;
106  int64_t nValue;
107 };
108 
110 
111 typedef struct _rectangle
112 {
113  long x, y;
114  long width, height;
115 } rectangle_t;
116 
118 {
119  uint32_t nSize;
120 
122  bool (*getRegion)(ControlType eType, ControlPart ePart, ControlState eState,
123  const rectangle_t& rBoundingControlRegion, rectangle_t& rNativeBoundingRegion,
124  rectangle_t& rNativeContentRegion);
125 
126  bool (*drawPushButton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
127  bool (*drawRadiobutton)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
128  bool (*drawCheckbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
129  bool (*drawCombobox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
130  bool (*drawEditbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
131  bool (*drawScrollbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
132  bool (*drawSpinButtons)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
133  bool (*drawSpinbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
134  bool (*drawTabItem)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
135  bool (*drawTabPane)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
136  bool (*drawTabHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
137  bool (*drawTabBody)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
138  bool (*drawSlider)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
139  bool (*drawFixedline)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
140  bool (*drawToolbar)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
141  bool (*drawProgress)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
142  bool (*drawWindowsBackground)(ControlDrawParameters const& rParameters, long nWidth,
143  long nHeight);
144  bool (*drawListbox)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
145  bool (*drawFrame)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
146  bool (*drawListNode)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
147  bool (*drawListNet)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
148  bool (*drawListHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight);
149 
150  bool (*updateSettings)(WidgetDrawStyle& rStyle);
151 };
152 
154 
155 } // end vcl namespace
156 
157 #endif
158 
159 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool(* updateSettings)(WidgetDrawStyle &rStyle)
uint32_t maActionButtonRolloverTextColor
bool(* drawSpinButtons)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
vcl::WidgetThemeLibrary * CreateWidgetThemeLibrary()
ControlDrawParameters(cairo_t *i_pCairo, ControlPart i_ePart, ControlState i_eState)
bool(* drawScrollbar)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawEditbox)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maDefaultButtonPressedRolloverTextColor
bool(* drawSpinbox)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maDefaultButtonRolloverTextColor
bool(* drawTabBody)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawWindowsBackground)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawSlider)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawFrame)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* isNativeControlSupported)(ControlType eType, ControlPart ePart)
bool(* drawTabHeader)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
DocumentType eType
bool(* drawListNode)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawListHeader)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* getRegion)(ControlType eType, ControlPart ePart, ControlState eState, const rectangle_t &rBoundingControlRegion, rectangle_t &rNativeBoundingRegion, rectangle_t &rNativeContentRegion)
bool(* drawListNet)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawToolbar)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maActionButtonPressedRolloverTextColor
bool(* drawCombobox)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maDefaultActionButtonRolloverTextColor
bool(* drawPushButton)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawListbox)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawFixedline)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maFlatButtonPressedRolloverTextColor
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
bool(* drawTabItem)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
uint32_t maDefaultActionButtonPressedRolloverTextColor
bool(* drawTabPane)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawCheckbox)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawRadiobutton)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
bool(* drawProgress)(ControlDrawParameters const &rParameters, long nWidth, long nHeight)
struct vcl::_rectangle rectangle_t
uint32_t maButtonPressedRolloverTextColor