gb_var2file: remove now unused chunk-size parameter
[LibreOffice.git] / vcl / inc / WidgetThemeLibraryTypes.hxx
blobb3270bf23eb8fc8cc3afbb8ed76f211f3e1f2c1d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 */
11 #ifndef INCLUDED_VCL_INC_WIDGETTHEMETYPES_HXX
12 #define INCLUDED_VCL_INC_WIDGETTHEMETYPES_HXX
14 #include <o3tl/typed_flags_set.hxx>
16 /**
17 * These types are all based on the supported variants
18 * vcl/salnativewidgets.hxx and must be kept in-sync.
19 **/
21 /* Control Types:
23 * Specify the overall, whole control
24 * type (as opposed to parts of the
25 * control if it were composite).
28 enum class ControlType {
29 // for use in general purpose ImplControlValue
30 Generic = 0,
31 // Normal PushButton/Command Button
32 Pushbutton = 1,
33 // Normal single radio button
34 Radiobutton = 2,
35 // Normal single checkbox
36 Checkbox = 10,
37 // Combobox, i.e. a ListBox
38 // that allows data entry by user
39 Combobox = 20,
40 // Control that allows text entry
41 Editbox = 30,
42 // Control that allows text entry, but without the usual border
43 // Has to be handled separately, because this one cannot handle
44 // ControlPart::HasBackgroundTexture, which is drawn in the edit box'es
45 // border window.
46 EditboxNoBorder = 31,
47 // Control that allows text entry
48 // ( some systems distinguish between single and multi line edit boxes )
49 MultilineEditbox = 32,
50 // Control that pops up a menu,
51 // but does NOT allow data entry
52 Listbox = 35,
53 // An edit field together with two little
54 // buttons on the side (aka spin field)
55 Spinbox = 40,
56 // Two standalone spin buttons
57 // without an edit field
58 SpinButtons = 45,
59 // A single tab
60 TabItem = 50,
61 // The border around a tab area,
62 // but without the tabs themselves.
63 // May have a gap at the top for
64 // the active tab
65 TabPane = 55,
66 // The background to the tab area
67 TabHeader = 56,
68 // Background of a Tab Pane
69 TabBody = 57,
70 // Normal scrollbar, including
71 // all parts like slider, buttons
72 Scrollbar = 60,
73 Slider = 65,
74 // A separator line
75 Fixedline = 80,
76 // A toolbar control with buttons and a grip
77 Toolbar = 100,
78 // The menubar
79 Menubar = 120,
80 // popup menu
81 MenuPopup = 121,
82 Progress = 131,
83 // Progress bar for the intro window
84 // (aka splash screen), in case some
85 // wants native progress bar in the
86 // application but not for the splash
87 // screen (used in desktop/)
88 IntroProgress = 132,
89 // tool tips
90 Tooltip = 140,
91 // to draw the implemented theme
92 WindowBackground = 150,
93 //to draw border of frames natively
94 Frame = 160,
95 // for nodes in listviews
96 // used in svtools/source/contnr/svtreebx.cxx
97 ListNode = 170,
98 // nets between elements of listviews
99 // with nodes
100 ListNet = 171,
101 // for list headers
102 ListHeader = 172,
106 /* Control Parts:
108 * Uniquely identify a part of a control,
109 * for example the slider of a scroll bar.
112 enum class ControlPart
114 NONE = 0,
115 Entire = 1,
116 ListboxWindow = 5, // the static listbox window containing the list
117 Button = 100,
118 ButtonUp = 101,
119 ButtonDown = 102, // Also for ComboBoxes/ListBoxes
120 ButtonLeft = 103,
121 ButtonRight = 104,
122 AllButtons = 105,
123 SeparatorHorz = 106,
124 SeparatorVert = 107,
125 TrackHorzLeft = 200,
126 TrackVertUpper = 201,
127 TrackHorzRight = 202,
128 TrackVertLower = 203,
129 TrackHorzArea = 204,
130 TrackVertArea = 205,
131 Arrow = 220,
132 ThumbHorz = 210, // Also used as toolbar grip
133 ThumbVert = 211, // Also used as toolbar grip
134 MenuItem = 250,
135 MenuItemCheckMark = 251,
136 MenuItemRadioMark = 252,
137 Separator = 253,
138 SubmenuArrow = 254,
140 /* #i77549#
141 HACK: for scrollbars in case of thumb rect, page up and page down rect we
142 abuse the HitTestNativeScrollbar interface. All theming engines but aqua
143 are actually able to draw the thumb according to our internal representation.
144 However aqua draws a little outside. The canonical way would be to enhance the
145 HitTestNativeScrollbar passing a ScrollbarValue additionally so all necessary
146 information is available in the call.
148 However since there is only this one small exception we will deviate a little and
149 instead pass the respective rect as control region to allow for a small correction.
151 So all places using HitTestNativeScrollbar on ControlPart::ThumbHorz, ControlPart::ThumbVert,
152 ControlPart::TrackHorzLeft, ControlPart::TrackHorzRight, ControlPart::TrackVertUpper, ControlPart::TrackVertLower
153 do not use the control rectangle as region but the actual part rectangle, making
154 only small deviations feasible.
157 /** The edit field part of a control, e.g. of the combo box.
159 Currently used just for combo boxes and just for GetNativeControlRegion().
160 It is valid only if GetNativeControlRegion() supports ControlPart::ButtonDown as
161 well.
163 SubEdit = 300,
165 // For controls that require the entire background
166 // to be drawn first, and then other pieces over top.
167 // (GTK+ scrollbars for example). Control region passed
168 // in to draw this part is expected to be the entire
169 // area of the control.
170 // A control may respond to one or both.
171 DrawBackgroundHorz = 1000,
172 DrawBackgroundVert = 1001,
174 // GTK+ also draws tabs right->left since there is a
175 // hardcoded 2 pixel overlap between adjacent tabs
176 TabsDrawRtl = 3000,
178 // For themes that do not want to have the focus
179 // rectangle part drawn by VCL but take care of the
180 // whole inner control part by themselves
181 // eg, listboxes or comboboxes or spinbuttons
182 HasBackgroundTexture = 4000,
184 // For scrollbars that have 3 buttons (most KDE themes)
185 HasThreeButtons = 5000,
187 BackgroundWindow = 6000,
188 BackgroundDialog = 6001,
190 //to draw natively the border of frames
191 Border = 7000,
193 //to draw natively the focus rects
194 Focus = 8000
197 /* Control State:
199 * Specify how a particular part of the control
200 * is to be drawn. Constants are bitwise OR-ed
201 * together to compose a final drawing state.
202 * A _disabled_ state is assumed by the drawing
203 * functions until an ENABLED or HIDDEN is passed
204 * in the ControlState.
206 enum class ControlState {
207 NONE = 0,
208 ENABLED = 0x0001,
209 FOCUSED = 0x0002,
210 PRESSED = 0x0004,
211 ROLLOVER = 0x0008,
212 DEFAULT = 0x0020,
213 SELECTED = 0x0040,
214 DOUBLEBUFFERING = 0x4000, ///< Set when the control is painted using double-buffering via VirtualDevice.
215 CACHING_ALLOWED = 0x8000, ///< Set when the control is completely visible (i.e. not clipped).
218 template<> struct o3tl::typed_flags<ControlState>: o3tl::is_typed_flags<ControlState, 0xC06F> {};
220 /* ButtonValue:
222 * Identifies the tri-state value options
223 * that buttons allow
226 enum class ButtonValue {
227 DontKnow,
229 Off,
230 Mixed
233 #endif
235 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */