117 lines
4.8 KiB
Plaintext
117 lines
4.8 KiB
Plaintext
/*!
|
|
\class QskAspect QskAspect.h
|
|
\ingroup theming
|
|
|
|
\brief Lookup key for a QskSkinHintTable
|
|
|
|
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.
|
|
|
|
For example, the border colors of a QskPushButton while pressed is
|
|
defined by combining the State (QskAbstractButton::Pressed) with the
|
|
Subcontrol (QskPushButton::Panel), the Primitive (Border),
|
|
and the Type (Color) as so:
|
|
|
|
auto aspect = QskPushButton::Panel | QskAbstractButton::Pressed | QskAspect::Color | QskAspect::Border
|
|
|
|
\sa QskSkinnable::effectiveSkinHint(), QskSkin::skinHint()
|
|
*/
|
|
|
|
/*!
|
|
\enum QskAspect::Type
|
|
|
|
\brief Represents the type of the Aspect.
|
|
|
|
The type categorizes the aspect to be a metric, color or "something else".
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
\var QskAspect::Type QskAspect::Flag
|
|
|
|
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
|
|
|
|
\var QskAspect::Type QskAspect::Metric
|
|
|
|
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.
|
|
|
|
\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
|
|
*/
|
|
|
|
/*!
|
|
\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
|
|
*/
|
|
|
|
/*! 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.
|
|
};
|