15#include <unordered_map>
25 return aIterator->second;
26 return std::shared_ptr<WidgetDefinitionPart>();
29std::vector<std::shared_ptr<WidgetDefinitionState>>
33 std::vector<std::shared_ptr<WidgetDefinitionState>> aStatesToAdd;
39 if (state->msEnabled !=
"any"
43 if (state->msFocused !=
"any"
47 if (state->msPressed !=
"any"
51 if (state->msRollover !=
"any"
55 if (state->msDefault !=
"any"
59 if (state->msSelected !=
"any"
66 if (state->msButtonValue !=
"any"
67 && !((state->msButtonValue ==
"true" && eButtonValue ==
ButtonValue::On)
73 OString sExtra =
"any";
79 auto const& rTabItemValue =
static_cast<TabitemValue const&
>(rValue);
81 if (rTabItemValue.isLeftAligned() && rTabItemValue.isRightAligned()
82 && rTabItemValue.isFirst() && rTabItemValue.isLast())
83 sExtra =
"first_last";
84 else if (rTabItemValue.isLeftAligned() || rTabItemValue.isFirst())
86 else if (rTabItemValue.isRightAligned() || rTabItemValue.isLast())
105 auto const& rPushButtonValue =
static_cast<PushButtonValue const&
>(rValue);
106 if (rPushButtonValue.mbIsAction)
114 if (state->msExtra !=
"any" && state->msExtra != sExtra)
120 aStatesToAdd.push_back(state);
127 OString sRollover, OString sDefault, OString sSelected,
128 OString sButtonValue, OString sExtra)
129 : msEnabled(
std::move(sEnabled))
130 , msFocused(
std::move(sFocused))
131 , msPressed(
std::move(sPressed))
132 , msRollover(
std::move(sRollover))
133 , msDefault(
std::move(sDefault))
134 , msSelected(
std::move(sSelected))
135 , msButtonValue(
std::move(sButtonValue))
136 , msExtra(
std::move(sExtra))
141 Color aFillColor,
float fX1,
float fY1,
float fX2,
142 float fY2, sal_Int32 nRx, sal_Int32 nRy)
144 auto pCommand(std::make_shared<WidgetDrawActionRectangle>());
145 pCommand->maStrokeColor = aStrokeColor;
146 pCommand->maFillColor = aFillColor;
147 pCommand->mnStrokeWidth = nStrokeWidth;
148 pCommand->mnRx = nRx;
149 pCommand->mnRy = nRy;
150 pCommand->mfX1 = fX1;
151 pCommand->mfY1 = fY1;
152 pCommand->mfX2 = fX2;
153 pCommand->mfY2 = fY2;
158 float fY1,
float fX2,
float fY2)
160 auto pCommand(std::make_shared<WidgetDrawActionLine>());
161 pCommand->maStrokeColor = aStrokeColor;
162 pCommand->mnStrokeWidth = nStrokeWidth;
163 pCommand->mfX1 = fX1;
164 pCommand->mfY1 = fY1;
165 pCommand->mfX2 = fX2;
166 pCommand->mfY2 = fY2;
172 auto pCommand(std::make_shared<WidgetDrawActionImage>());
173 pCommand->msSource = sSource;
179 auto pCommand(std::make_shared<WidgetDrawActionExternal>());
180 pCommand->msSource = sSource;
ButtonValue getTristateVal() const
tools::Long getNumericVal() const