KDecoration2

decorationdefines.h
1 /*
2  * SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5  */
6 #ifndef KDECORATION2_DECORATION_DEFINES_H
7 #define KDECORATION2_DECORATION_DEFINES_H
8 
9 namespace KDecoration2
10 {
11 /**
12  * The DecorationButtonType is a helper type for the DecorationButton.
13  * A Decoration should provide a DecorationButton for each of the types,
14  * if it wants to provide further buttons it should use the Custom type.
15  * The DecorationButton gets configured depending on the type. E.g. the
16  * Close button gets disabled if the DecoratedClient is not closeable.
17  **/
19  /**
20  * The Menu button requests showing the window menu on left or right click.
21  **/
22  Menu,
23  /**
24  * The ApplicationMenu button requests showing the application's menu on left or right click.
25  */
27  /**
28  * The OnAllDesktops button requests toggling the DecoratedClient's on all desktops state.
29  * The DecoratedButton is only visible if multiple virtual desktops are available.
30  **/
32  /**
33  * The Minimize button requests minimizing the DecoratedClient. The DecorationButton is only
34  * enabled if the DecoratedClient is minimizeable.
35  **/
36  Minimize,
37  /**
38  * The Maximize button requests maximizing the DecoratedClient. The DecorationButton is checkable
39  * and if the DecoratedClient is maximized the DecorationButton is checked. The DecorationButton
40  * supports multiple mouse buttons to change horizontal, vertical and overall maximized state.
41  *
42  * The DecorationButton is only enabled if the DecoratedClient is maximizeable.
43  **/
44  Maximize,
45  /**
46  * The Close button requests closing the DecoratedClient. The DecorationButton is only enabled
47  * if the DecoratedClient is closeable.
48  **/
49  Close,
50  /**
51  * The ContextHelp button requests entering the context help mode. The DecorationButton is only
52  * visible if the DecoratedClient provides context help.
53  **/
55  /**
56  * The Shade button requests toggling the DecoratedClient's shaded state. The DecoratedButton
57  * is only enabled if the DecoratedClient is shadeable.
58  **/
59  Shade,
60  /**
61  * The KeepBelow button requests toggling the DecoratedClient's keep below state.
62  **/
63  KeepBelow,
64  /**
65  * The KeepAbove button requests toggling the DecoratedClient's keep above state.
66  **/
67  KeepAbove,
68  /**
69  * The Custom type allows a Decoration to provide custom DecorationButtons.
70  **/
71  Custom,
72 };
73 
74 /**
75  * Border sizes are a combination of visual and accessibility features.
76  * Larger borders should be used to increase the non title bar borders to
77  * make it easier to resize the decoration
78  **/
79 enum class BorderSize {
80  /**
81  * Border sizes of all non title bar sides should be set to 0.
82  **/
83  None,
84  /**
85  * Border sizes of the sides should be set to 0. Title bar and
86  * the border on opposite side of the title bar should follow the
87  * Normal settings.
88  **/
89  NoSides,
90  /**
91  * Borders should be smaller than Normal, e.g. a factor of 0.5.
92  **/
93  Tiny,
94  /**
95  * The default border size with borders on each side. This should
96  * be the base for calculating other border sizes.
97  **/
98  Normal,
99  /**
100  * Increased border sizes, considered a factor of 1.5.
101  **/
102  Large,
103  /**
104  * Increased border sizes, considered a factor of 2.0.
105  **/
106  VeryLarge,
107  /**
108  * Increased border sizes, considered a factor of 2.5.
109  **/
110  Huge,
111  /**
112  * Increased border sizes, considered a factor of 3.0.
113  **/
114  VeryHuge,
115  /**
116  * Increased border sizes, considered a factor of 5.0.
117  **/
118  Oversized,
119 };
120 
121 /**
122  * Color groups are used for DecoratedClient::color().
123  * @since 5.3
124  **/
125 enum class ColorGroup {
126  /**
127  * Inactive color, used for unfocused windows.
128  **/
129  Inactive,
130  /**
131  * Active color, used for focused windows.
132  **/
133  Active,
134  /**
135  * Warning color, can only be used with ColorRole::Foreground. If used with other roles,
136  * a invalid QColor is returned. It can be used for close buttons and is typically red.
137  **/
138  Warning,
139 };
140 
141 /**
142  * Color roles are used for DecoratedClient::color().
143  * @since 5.3
144  **/
145 enum class ColorRole {
146  /**
147  * The decoration's frame background color.
148  **/
149  Frame,
150  /**
151  * The decoration's title bar background color
152  **/
153  TitleBar,
154  /**
155  * The decoration's title bar forground color
156  **/
157  Foreground,
158 };
159 
160 }
161 
162 #endif
Increased border sizes, considered a factor of 2.5.
The Maximize button requests maximizing the DecoratedClient.
Framework for creating window decorations.
Border sizes of the sides should be set to 0.
Warning color, can only be used with ColorRole::Foreground.
DecorationButtonType
The DecorationButtonType is a helper type for the DecorationButton.
The ContextHelp button requests entering the context help mode.
Increased border sizes, considered a factor of 2.0.
Increased border sizes, considered a factor of 3.0.
Border sizes of all non title bar sides should be set to 0.
Active color, used for focused windows.
The Menu button requests showing the window menu on left or right click.
The Custom type allows a Decoration to provide custom DecorationButtons.
Borders should be smaller than Normal, e.g.
Increased border sizes, considered a factor of 1.5.
The ApplicationMenu button requests showing the application&#39;s menu on left or right click...
ColorGroup
Color groups are used for DecoratedClient::color().
The KeepAbove button requests toggling the DecoratedClient&#39;s keep above state.
The KeepBelow button requests toggling the DecoratedClient&#39;s keep below state.
The decoration&#39;s title bar forground color.
The decoration&#39;s title bar background color.
Increased border sizes, considered a factor of 5.0.
The Minimize button requests minimizing the DecoratedClient.
BorderSize
Border sizes are a combination of visual and accessibility features.
ColorRole
Color roles are used for DecoratedClient::color().
The default border size with borders on each side.
The OnAllDesktops button requests toggling the DecoratedClient&#39;s on all desktops state.
Inactive color, used for unfocused windows.
The Shade button requests toggling the DecoratedClient&#39;s shaded state.
The Close button requests closing the DecoratedClient.
The decoration&#39;s frame background color.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 22 2021 23:08:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.