KDecoration2

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

KDE's Doxygen guidelines are available online.