qskinny/doc/classes/QskAspect.dox

117 lines
4.8 KiB
Plaintext
Raw Normal View History

2017-07-21 18:21:34 +02:00
/*!
2021-01-25 11:06:01 +01:00
\class QskAspect QskAspect.h
\ingroup theming
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\brief Lookup key for a QskSkinHintTable
2017-07-21 18:21:34 +02:00
Used by the \ref qskskinning "skin engine" to determine how a given aspect
of a control is drawn. While Aspect is simply a 64-bit unsigned integer, it
is composed of smaller enum bitfields which can be ORed together to
describe a more specific part of the user interface.
2021-01-25 11:06:01 +01:00
For example, the border colors of a QskPushButton while pressed is
2017-07-21 18:21:34 +02:00
defined by combining the State (QskAbstractButton::Pressed) with the
Subcontrol (QskPushButton::Panel), the Primitive (Border),
2021-01-25 11:06:01 +01:00
and the Type (Color) as so:
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
auto aspect = QskPushButton::Panel | QskAbstractButton::Pressed | QskAspect::Color | QskAspect::Border
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\sa QskSkinnable::effectiveSkinHint(), QskSkin::skinHint()
*/
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
/*!
\enum QskAspect::Type
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\brief Represents the type of the Aspect.
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
The type categorizes the aspect to be a metric, color or "something else".
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
Often primitives are related to a specific category. F.e QskAspect::Alignment will
probably always be a QskAspect::Flag, while QskAspect::Border will usually
be combined with QskAspect::Color and QskAspect::Metric.
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
Smooth transitions can be set up depending on these categories. F.e when
changing from daylight to darkness color schemem only values of QskAspect::Color
aspects need to be considered. But when changing the Look&Feel of the
application all type of aspects need to be considered.
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\var QskAspect::Type QskAspect::Flag
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
Flags are all sort of attributes that are no metrics or colors - f.e
an alignment. A reasonable subset of possible flags is offered as
QskAspect::FlagPrimitive
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\var QskAspect::Type QskAspect::Metric
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
Metrics are related to geometries in most cases corresponding to pixel distances.
Examples are the margin/padding. A reasonable subset of possible metrics
is offered as QskAspect::MetricPrimitive.
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
\var QskAspect::Type QskAspect::Color
Colors are all sort of color values, like fill gradients, border colors.
*/
/*!
\enum QskAspect::FlagPrimitive
\var QskAspect::FlagPrimitive QskAspect::NoFlagPrimitive
\var QskAspect::FlagPrimitive QskAspect::Alignment
\var QskAspect::FlagPrimitive QskAspect::Direction
\var QskAspect::FlagPrimitive QskAspect::Style
\var QskAspect::FlagPrimitive QskAspect::Decoration
\var QskAspect::FlagPrimitive QskAspect::GraphicRole
\var QskAspect::FlagPrimitive QskAspect::FontRole
*/
2017-07-21 18:21:34 +02:00
2021-01-25 11:06:01 +01:00
/*!
\enum QskAspect::MetricPrimitive
\var QskAspect::MetricPrimitive QskAspect::NoMetricPrimitive
\var QskAspect::MetricPrimitive QskAspect::StrutSize
\var QskAspect::MetricPrimitive QskAspect::Size
\var QskAspect::MetricPrimitive QskAspect::Position
\var QskAspect::MetricPrimitive QskAspect::Margin
\var QskAspect::MetricPrimitive QskAspect::Padding
\var QskAspect::MetricPrimitive QskAspect::Shadow
\var QskAspect::MetricPrimitive QskAspect::Spacing
\var QskAspect::MetricPrimitive QskAspect::Shape
\var QskAspect::MetricPrimitive QskAspect::Border
*/
/*!
\enum QskAspect::ColorPrimitive
\var QskAspect::ColorPrimitive QskAspect::NoColorPrimitive
\var QskAspect::ColorPrimitive QskAspect::TextColor
\var QskAspect::ColorPrimitive QskAspect::StyleColor
\var QskAspect::ColorPrimitive QskAspect::LinkColor
*/
2017-07-21 18:21:34 +02:00
/*! For use within the rendering of a specific QskSkinnable. While the Default
value applies to any control (and can be used as a fallback), specifying a
Subcontrol limits the aspect's scope to that sub-component (or \em subcontrol)
of the control. For example, the Subcontrol type QskPushButton::Panel refers
to the background panel of a push button. */
enum Subcontrol : std::uint32_t
{
Default = 0x00000000,
FirstSubcontrol = 0x00100000,
LastSubcontrol = 0xFFF00000
};
/*! Applies to a given aspect when the control is in a given state.
QskSkinnable subclasses (typically QskControl subclasses) can define UI
states, as denoted by any OR combination of State flags. For example, a
checked QskPushButton has the QskPushButton::Checked state flag set when
it is checked. */
enum State : std::uint64_t
{
FirstSystemState = 0x0000000100000000, ///< The first state bit reserved for framework use
FirstUserState = 0x0000001000000000, ///< The first state bit reserved for application use
LastUserState = 0x0000080000000000, ///< The last state bit reserved for applicaiton use
LastSystemState = 0x0000800000000000, ///< The last state bit reserved for framework use
Automatic = 0x0000000000000000, ///< No specified state (the default)
NoState = 0x0000FFFF00000000 ///< Empty state, explicitly specified. Useful in some types of animators.
};