43 #include <rtl/ustrbuf.hxx>
57 aMap[
"NotImplemented"] =
"NotImplemented";
65 throw std::exception();
70 return "Generic UIObject";
75 return std::unique_ptr<UIObject>();
80 return std::set<OUString>();
103 if (nType == WindowType::DIALOG || nType == WindowType::MODELESSDIALOG)
107 if (nType >= WindowType::MESSBOX && nType <= WindowType::QUERYBOX)
110 if (nType == WindowType::TABDIALOG)
119 if (eType == WindowType::FLOATINGWINDOW)
128 if (isDialogWindow(pWindow) || isTopWindow(pWindow))
135 return get_top_parent(pParent);
138 std::vector<KeyEvent> generate_key_events_from_text(
const OUString& rStr)
140 std::vector<KeyEvent> aEvents;
142 for (sal_Int32 i = 0, n = rStr.getLength();
145 aEvents.emplace_back(rStr[i], aCode);
150 sal_uInt16 get_key(
sal_Unicode cChar,
bool& bShift)
153 if (cChar >=
'a' && cChar <=
'z')
154 return KEY_A + (cChar -
'a');
155 else if (cChar >=
'A' && cChar <=
'Z')
158 return KEY_A + (cChar -
'A');
160 else if (cChar >=
'0' && cChar <=
'9')
161 return KEY_0 + (cChar -
'A');
166 bool isFunctionKey(
const OUString& rStr, sal_uInt16& rKeyCode)
168 std::map<OUString, sal_uInt16> aFunctionKeyMap = {
184 auto itr = aFunctionKeyMap.find(rStr);
185 if (itr == aFunctionKeyMap.end())
188 rKeyCode = itr->second;
192 std::vector<KeyEvent> generate_key_events_from_keycode(std::u16string_view rStr)
194 std::vector<KeyEvent> aEvents;
196 std::map<OUString, sal_uInt16> aKeyMap = {
219 OUString aRemainingText;
222 for (
auto const& token : aTokens)
224 OUString aToken = token.trim();
225 if (aToken ==
"CTRL")
229 else if (aToken ==
"SHIFT")
233 else if (aToken ==
"ALT")
238 aRemainingText = aToken;
241 sal_uInt16 nFunctionKey = 0;
242 if (isFunctionKey(aRemainingText, nFunctionKey))
244 vcl::KeyCode aCode(nFunctionKey, bShift, bMod1, bMod2,
false);
245 aEvents.emplace_back(0, aCode);
247 else if (aKeyMap.find(aRemainingText) != aKeyMap.end())
249 sal_uInt16 nKey = aKeyMap[aRemainingText];
251 aEvents.emplace_back(
'a', aCode);
255 for (sal_Int32 i = 0;
i < aRemainingText.getLength(); ++
i)
257 bool bShiftThroughKey =
false;
258 sal_uInt16 nKey = get_key(aRemainingText[i], bShiftThroughKey);
259 vcl::KeyCode aCode(nKey, bShift || bShiftThroughKey, bMod1, bMod2,
false);
260 aEvents.emplace_back(aRemainingText[i], aCode);
267 OUString to_string(
const Point& rPos)
269 OUString sStr = OUString::number(rPos.X())
271 + OUString::number(rPos.Y());
276 OUString to_string(
const Size& rSize)
278 OUString sStr = OUString::number(rSize.
Width())
280 + OUString::number(rSize.
Height());
304 aMap[
"WindowType"] = OUString::number(static_cast<sal_uInt16>(
mxWindow->
GetType()), 16);
307 aMap[
"RelPosition"] = to_string(aPos);
314 bool bIgnoreAllExceptTop = isDialogWindow(
mxWindow.
get());
318 if (!bIgnoreAllExceptTop)
321 if (isDialogWindow(pParent))
323 bIgnoreAllExceptTop =
true;
328 if (!pParent && bIgnoreAllExceptTop)
331 aMap[
"AbsPosition"] = to_string(aPos);
341 if (rAction ==
"SET")
343 for (
auto const& parameter : rParameters)
345 std::cout << parameter.first;
348 else if (rAction ==
"TYPE")
350 auto it = rParameters.find(
"TEXT");
351 if (it != rParameters.end())
353 const OUString& rText = it->second;
354 auto aKeyEvents = generate_key_events_from_text(rText);
355 for (
auto const& keyEvent : aKeyEvents)
360 else if (rParameters.find(
"KEYCODE") != rParameters.end())
362 auto itr = rParameters.find(
"KEYCODE");
363 const OUString rText = itr->second;
364 auto aKeyEvents = generate_key_events_from_keycode(rText);
365 for (
auto const& keyEvent : aKeyEvents)
373 for (
auto const & rPair : rParameters)
374 buf.append(
"," + rPair.first.toUtf8() +
"=" + rPair.second.toUtf8());
375 SAL_WARN(
"vcl.uitest",
"missing parameter TEXT to action TYPE "
376 << buf.makeStringAndClear());
377 throw std::logic_error(
"missing parameter TEXT to action TYPE");
380 else if (rAction ==
"FOCUS")
387 for (
auto const & rPair : rParameters)
388 buf.append(
"," + rPair.first.toUtf8() +
"=" + rPair.second.toUtf8());
390 <<
". Action: " << rAction << buf.makeStringAndClear());
391 throw std::logic_error(
"unknown action");
407 if (pParent->
get_id() == rID)
411 for (
size_t i = 0;
i < nCount; ++
i)
414 bool bCandidate = !bRequireVisible || pChild->
IsVisible();
418 if (pChild->
get_id() == rID)
429 void addChildren(
vcl::Window const * pParent, std::set<OUString>& rChildren)
435 for (
size_t i = 0;
i < nCount; ++
i)
443 auto ret = rChildren.insert(aId);
444 SAL_WARN_IF(!ret.second,
"vcl.uitest",
"duplicate ids '" << aId <<
"' for ui elements. violates locally unique requirement");
447 addChildren(pChild, rChildren);
463 pWindow = findChild(pDialogParent, rID);
467 throw css::uno::RuntimeException(
"Could not find child with id: " + rID);
470 return aFunction(pWindow);
482 pWindow = findChild(pDialogParent, rID,
true);
486 throw css::uno::RuntimeException(
"Could not find child with id: " + rID);
489 return aFunction(pWindow);
494 std::set<OUString> aChildren;
498 aChildren.insert(pDialogParent->
get_id());
499 addChildren(pDialogParent, aChildren);
506 return "WindowUIObject";
511 OUString escape(
const OUString& rStr)
513 return rStr.replaceAll(
"\"",
"\\\"");
520 OUStringBuffer aStateString =
"{\"name\":\"" +
mxWindow->
get_id() +
"\"";
521 aStateString.append(
", \"ImplementationName\":\"").appendAscii(
typeid(*mxWindow).name()).
append(
"\"");
523 for (
auto const& elem : aState)
525 OUString
property =
",\"" + elem.first +
"\":\"" + escape(elem.second) +
"\"";
532 aStateString.append(
",\"children\":[");
534 for (
size_t i = 0;
i < nCount; ++
i)
538 aStateString.append(
",");
541 std::unique_ptr<UIObject> pChildWrapper =
543 OUString children = pChildWrapper->dumpState();
544 aStateString.append(children);
548 aStateString.append(
"]");
550 aStateString.append(
"}");
552 OUString aString = aStateString.makeStringAndClear();
553 return aString.replaceAll(
"\n",
"\\n");
559 std::unique_ptr<UIObject> pParentWrapper =
561 return pParentWrapper->dumpState();
567 OUString aActionName;
576 aActionName =
"CLICK";
580 aActionName =
"TYPE";
583 aActionName = OUString::number(static_cast<int>(nEvent));
585 return "Action on element: " +
mxWindow->
get_id() +
" with action : " + aActionName;
615 if (rAction ==
"CLICK")
620 pPushButton->Check(!pPushButton->IsChecked());
621 pPushButton->Toggle();
632 return "ButtonUIObject";
642 return "Start writer" ;
647 return "Start calc" ;
652 return "Start impress" ;
657 return "Start draw" ;
662 return "Start math" ;
667 return "Start database" ;
670 if (get_top_parent(
mxButton)->get_id().isEmpty()){
709 return "DialogUIObject";
732 bool bHandled =
true;
733 if (rAction ==
"TYPE")
735 auto it = rParameters.find(
"TEXT");
736 if (it != rParameters.end())
738 const OUString& rText = it->second;
739 auto aKeyEvents = generate_key_events_from_text(rText);
740 for (
auto const& keyEvent : aKeyEvents)
750 else if (rAction ==
"SET")
752 auto it = rParameters.find(
"TEXT");
753 if (it != rParameters.end())
761 else if (rAction ==
"SELECT")
763 if (rParameters.find(
"FROM") != rParameters.end() &&
764 rParameters.find(
"TO") != rParameters.end())
766 tools::Long nMin = rParameters.find(
"FROM")->second.toInt32();
767 tools::Long nMax = rParameters.find(
"TO")->second.toInt32();
772 else if (rAction ==
"CLEAR")
805 if(get_top_parent(
mxEdit)->get_id().isEmpty()){
807 return "Select in '" +
809 "' {\"FROM\": \"" + OUString::number(nMin) +
"\", \"TO\": \"" +
810 OUString::number(nMax) +
"\"}"
813 return "Select in '" +
815 "' {\"FROM\": \"" + OUString::number(nMin) +
"\", \"TO\": \"" +
816 OUString::number(nMax) +
"\"} from "
817 + get_top_parent(
mxEdit)->get_id()
826 return "EditUIObject";
831 Edit* pEdit =
dynamic_cast<Edit*
>(pWindow);
833 return std::unique_ptr<UIObject>(
new EditUIObject(pEdit));
849 bool bHandled =
true;
850 if (rAction ==
"TYPE")
853 aChildObj.
execute(rAction, rParameters);
855 else if (rAction ==
"SELECT")
857 if (rParameters.find(
"FROM") != rParameters.end() &&
858 rParameters.find(
"TO") != rParameters.end())
860 tools::Long nMin = rParameters.find(
"FROM")->second.toInt32();
861 tools::Long nMax = rParameters.find(
"TO")->second.toInt32();
887 return "MultiLineEditUIObject";
899 , mxExpander(xExpander)
909 if (rAction ==
"EXPAND")
913 else if (rAction ==
"COLLAPSE")
930 return "ExpanderUIObject";
936 assert(pVclExpander);
942 mxCheckBox(xCheckbox)
953 if (rAction ==
"CLICK")
972 return "CheckBoxUIObject";
979 if(get_top_parent(
mxCheckBox)->get_id().isEmpty()){
999 mxRadioButton(xRadioButton)
1010 if (rAction ==
"CLICK")
1028 return "RadioButtonUIObject";
1049 assert(pRadioButton);
1078 return "TabPageUIObject";
1101 if (rAction ==
"SELECT")
1103 bool bSelect =
true;
1104 if (rParameters.find(
"POS") != rParameters.end())
1106 auto itr = rParameters.find(
"POS");
1107 OUString aVal = itr->second;
1108 sal_Int32
nPos = aVal.toInt32();
1111 else if (rParameters.find(
"TEXT") != rParameters.end())
1113 auto itr = rParameters.find(
"TEXT");
1114 OUString aText = itr->second;
1138 return "ListBoxUIObject";
1146 if(get_top_parent(
mxListBox)->get_id().isEmpty()){
1148 return "Select element with position " + OUString::number(nPos) +
1151 return "Select element with position " + OUString::number(nPos) +
1156 if(get_top_parent(
mxListBox)->get_id().isEmpty())
1162 " Parent:" + get_top_parent(
mxListBox)->get_id();
1177 mxComboBox(xComboBox)
1188 if (rAction ==
"SELECT")
1190 if (rParameters.find(
"POS") != rParameters.end())
1192 auto itr = rParameters.find(
"POS");
1193 OUString aVal = itr->second;
1194 sal_Int32
nPos = aVal.toInt32();
1197 else if(rParameters.find(
"TEXT") != rParameters.end()){
1198 auto itr = rParameters.find(
"TEXT");
1199 OUString aVal = itr->second;
1205 else if ( rAction ==
"TYPE" || rAction ==
"SET" || rAction ==
"CLEAR" ){
1210 pObj->execute(rAction, rParameters);
1228 return "ComboBoxUIObject";
1236 if (get_top_parent(
mxComboBox)->get_id().isEmpty()){
1239 "' ComboBox item number " + OUString::number(nPos);
1242 "' ComboBox item number " + OUString::number(nPos) +
1243 " from " + get_top_parent(
mxComboBox)->get_id();
1258 mxSpinButton(xSpinButton)
1269 if (rAction ==
"UP")
1273 else if (rAction ==
"DOWN")
1284 aMap[
"Min"] = OUString::number(
mxSpinButton->GetRangeMin());
1285 aMap[
"Max"] = OUString::number(
mxSpinButton->GetRangeMax());
1286 aMap[
"Step"] = OUString::number(
mxSpinButton->GetValueStep());
1287 aMap[
"Value"] = OUString::number(
mxSpinButton->GetValue());
1310 return "SpinUIObject";
1315 mxSpinField(xSpinField)
1326 if (rAction ==
"UP")
1330 else if (rAction ==
"DOWN")
1334 else if (rAction ==
"TYPE")
1340 aSubObject.
execute(rAction, rParameters);
1358 if(get_top_parent(
mxSpinField)->get_id().isEmpty())
1364 "' from " + get_top_parent(
mxSpinField)->get_id();
1368 if(get_top_parent(
mxSpinField)->get_id().isEmpty())
1374 "' from " + get_top_parent(
mxSpinField)->get_id();
1382 return "SpinFieldUIObject";
1395 mxMetricField(xMetricField)
1406 if (rAction ==
"VALUE")
1408 auto itPos = rParameters.find(
"VALUE");
1409 if (itPos != rParameters.end())
1428 return "MetricFieldUIObject";
1434 assert(pMetricField);
1440 mxFormattedField(xFormattedField)
1451 if (rAction ==
"VALUE")
1453 auto itPos = rParameters.find(
"VALUE");
1454 if (itPos != rParameters.end())
1473 return "FormattedFieldUIObject";
1479 assert(pFormattedField);
1485 mxTabControl(xTabControl)
1496 if (rAction ==
"SELECT")
1498 if (rParameters.find(
"POS") != rParameters.end())
1500 auto itr = rParameters.find(
"POS");
1501 sal_uInt32
nPos = itr->second.toUInt32();
1516 aMap[
"CurrPageId"] = OUString::number(nPageId);
1543 return "TabControlUIObject";
1549 assert(pTabControl);
1555 mxRoadmapWizard(xRoadmapWizard)
1566 if (rAction ==
"SELECT")
1568 if (rParameters.find(
"POS") != rParameters.end())
1570 auto itr = rParameters.find(
"POS");
1571 sal_uInt32
nPos = itr->second.toUInt32();
1590 return "RoadmapWizardUIObject";
1596 assert(pRoadmapWizard);
1602 mxTabControl(xTabControl)
1613 if (rAction ==
"SELECT")
1615 if (rParameters.find(
"POS") != rParameters.end())
1617 auto itr = rParameters.find(
"POS");
1618 sal_uInt32
nPos = itr->second.toUInt32();
1641 return "VerticalTabControlUIObject";
1647 assert(pTabControl);
1665 if (rAction ==
"CLICK")
1667 if (rParameters.find(
"POS") != rParameters.end())
1669 auto itr = rParameters.find(
"POS");
1670 sal_uInt16
nPos = itr->second.toUInt32();
1703 return "ToolBoxUIObject";
1715 mxMenuButton(xMenuButton)
1734 if (rAction ==
"CLICK")
1739 else if (rAction ==
"OPENLIST")
1743 else if (rAction ==
"OPENFROMLIST")
1745 auto itr = rParameters.find(
"POS");
1746 sal_uInt32
nPos = itr->second.toUInt32();
1753 else if (rAction ==
"CLOSELIST")
1763 return "MenuButtonUIObject";
1769 assert(pMenuButton);
1787 if (rAction ==
"CLICK")
1790 if (rParameters.find(
"POSX") != rParameters.end() &&
1791 rParameters.find(
"POSY") != rParameters.end())
1793 auto aPosX = rParameters.find(
"POSX");
1794 auto aPosY = rParameters.find(
"POSY");
1799 if (!sPosX2.isEmpty() && !sPoxY2.isEmpty())
1801 double fPosX = std::atof(sPosX2.getStr());
1802 double fPosY = std::atof(sPoxY2.getStr());
1820 assert(pVclDrawingArea);
1835 OUString* pId =
static_cast<OUString*
>(pEntry->
GetUserData());
1837 aMap[
"SelectedItemId"] = *pId;
1841 aMap[
"SelectedItemPos"] = OUString::number(pModel->
GetAbsPos(pEntry));
1848 return "IconViewUIObject";
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
virtual OUString GetDisplayText() const override
virtual Point GetPosPixel() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~MultiLineEditUIObject() override
VclPtr< VclMultiLineEdit > mxEdit
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
const OString & GetCurPageId() const
virtual FactoryFunction GetUITestFactory() const
MetricFieldUIObject(const VclPtr< MetricField > &xEdit)
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
virtual OUString GetSelected() const
virtual std::unique_ptr< UIObject > get_child(const OUString &rID)
Returns the child of the current UIObject with the corresponding id.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
std::vector< OUString > split(std::u16string_view rStr, sal_Unicode cSeparator)
VclPtr< SpinButton > mxSpinButton
Edit * GetSubEdit() const
weld::CustomWidgetController * mpController
SvTreeList * GetModel() const
A widget used to choose from a list of items and which has no entry.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
void SelectTabPage(sal_uInt16 nPageId)
constexpr sal_uInt16 KEY_F3
virtual OUString get_action(VclEventId nEvent) const
Gets the corresponding Action string for the event.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
sal_Int32 GetEntryPos(std::u16string_view rStr) const
virtual OUString get_name() const override
constexpr sal_uInt16 KEY_A
constexpr sal_uInt16 KEY_0
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
constexpr sal_uInt16 KEY_F5
constexpr sal_uInt16 KEY_F7
virtual std::set< OUString > get_children() const override
Returns a set containing all descendants of the object.
const OUString & GetQuickHelpText() const
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
void * GetUserData() const
constexpr sal_uInt16 KEY_F4
VclPtr< VclDrawingArea > mxDrawingArea
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
sal_uInt32 GetAbsPos(const SvTreeListEntry *pEntry) const
constexpr sal_uInt16 KEY_F6
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
constexpr sal_uInt16 KEY_SPACE
virtual ~DialogUIObject() override
virtual OUString get_name() const override
bool HasChildPathFocus(bool bSystemWindow=false) const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const
sal_uInt16 GetPagePos(std::string_view rPageId) const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_F1
constexpr sal_uInt16 KEY_F9
constexpr sal_uInt16 KEY_END
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
constexpr tools::Long Width() const
HashMap_OWString_Interface aMap
static UITestLogger & getInstance()
virtual OUString dumpHierarchy() const override
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
VclPtr< vcl::RoadmapWizard > mxRoadmapWizard
const OUString & get_id() const
Get the ID of the window.
void setAppName(OUString name)
sal_Int32 GetEntryCount() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
void SetCurPageId(const OString &rId)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
TextWindow * GetTextWindow()
SvTreeListEntry * FirstSelected() const
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual ~TabControlUIObject() override
virtual OUString dumpState() const override
Currently an internal method to dump the state of the current UIObject as represented by get_state()...
virtual sal_Int32 GetMaxTextLen() const
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_F2
virtual OUString get_name() const override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
bool IsModalInputMode() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual const Selection & GetSelection() const
WindowUIObject(const VclPtr< vcl::Window > &xWindow)
virtual OUString get_name() const override
virtual OUString GetText() const
WinBits const WB_SYSTEMFLOATWIN
virtual OUString get_name() const override
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
virtual std::set< OUString > get_children() const
Returns a set containing all descendants of the object.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual OUString get_name() const override
SpinFieldUIObject(const VclPtr< SpinField > &xEdit)
virtual OUString GetDisplayText() const
virtual void SetSelection(const Selection &rSelection)
sal_uInt16 GetPageCount() const
SAL_DLLPRIVATE void ImplCheck()
MultiLineEditUIObject(const VclPtr< VclMultiLineEdit > &xEdit)
DialogUIObject(const VclPtr< Dialog > &xDialog)
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
constexpr sal_uInt16 KEY_DOWN
DrawingAreaUIObject(const VclPtr< vcl::Window > &rDrawingArea)
virtual OUString dumpHierarchy() const
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
std::unique_ptr< UIObject > get_visible_child(const OUString &rID)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
bool IsTriStateEnabled() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
bool get_expanded() const
constexpr sal_uInt16 KEY_HOME
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
virtual OUString get_type() const
Returns the type of the UIObject.
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
ListBoxUIObject(const VclPtr< ListBox > &xListBox)
TabPageUIObject(const VclPtr< TabPage > &xTabPage)
RoadmapWizardUIObject(const VclPtr< vcl::RoadmapWizard > &xRoadmapWizard)
virtual OUString GetText() const override
void * GetUserData() const
sal_Int32 GetSelectedEntryCount() const
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
ExpanderUIObject(const VclPtr< VclExpander > &xExpander)
CheckBoxUIObject(const VclPtr< CheckBox > &xCheckbox)
constexpr sal_uInt16 KEY_PAGEDOWN
virtual OUString get_name() const override
virtual sal_Int32 GetMaxTextLen() const override
virtual void execute(const OUString &rAction, const StringMap &rParameters)
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString GetSelected() const override
virtual ~ComboBoxUIObject() override
virtual std::unique_ptr< UIObject > get_child(const OUString &rID) override
Returns the child of the current UIObject with the corresponding id.
VclPtr< MetricField > mxMetricField
void RequestDoubleBuffering(bool bRequest)
Enable/disable double-buffering of the frame window and all its children.
virtual OUString get_name() const override
VclPtr< SvTreeListBox > mxTreeList
constexpr sal_uInt16 KEY_F10
IconViewUIObject(const VclPtr< SvTreeListBox > &xIconView)
static void append(std::bitset< N > &rSet, size_t const nOffset, sal_uInt32 const nValue)
virtual void KeyInput(const KeyEvent &rKEvt) override
vcl::Window * GetParent() const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~SpinUIObject() override
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
virtual OUString dumpState() const
Currently an internal method to dump the state of the current UIObject as represented by get_state()...
virtual ~SpinFieldUIObject() override
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_RIGHT
std::vector< sal_uInt16 > GetPageIDs() const
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void KeyInput(const KeyEvent &rKEvt)
VerticalTabControlUIObject(const VclPtr< VerticalTabControl > &mxTabControl)
VclPtr< VclExpander > mxExpander
sal_uInt16 GetChildCount() const
VclPtr< ComboBox > mxComboBox
virtual OUString get_name() const override
const OString & GetPageId(sal_uInt16 nIndex) const
VclPtr< VerticalTabControl > mxTabControl
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
VclPtr< Dialog > mxDialog
#define SAL_WARN_IF(condition, area, stream)
constexpr tools::Long Height() const
void set_expanded(bool bExpanded)
VclPtr< CheckBox > mxCheckBox
constexpr sal_uInt16 KEY_ESCAPE
virtual OUString get_name() const override
VclPtr< TabControl > mxTabControl
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
constexpr sal_uInt16 KEY_F11
constexpr sal_uInt16 KEY_F12
ComboBoxUIObject(const VclPtr< ComboBox > &xListBox)
std::map< OUString, OUString > StringMap
virtual ~VerticalTabControlUIObject() override
VclPtr< ListBox > mxListBox
virtual ~ExpanderUIObject() override
virtual ~CheckBoxUIObject() override
virtual OUString get_type() const override
Returns the type of the UIObject.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
SpinUIObject(const VclPtr< SpinButton > &xSpinButton)
void SelectRoadmapItemByID(int nId, bool bGrabFocus=true)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
VclPtr< vcl::Window > mxWindow
constexpr sal_uInt16 KEY_BACKSPACE
Size GetOutputSizePixel() const
TabControlUIObject(const VclPtr< TabControl > &mxTabControl)
bool IsMultiSelectionEnabled() const
int GetCurrentRoadmapItemID() const
VclPtr< SpinField > mxSpinField
A widget used to choose from a list of items and which has an entry.
WindowType GetType() const
reference_type * get() const
Get the body.
OUString GetText() const override
#define SAL_WARN(area, stream)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_LEFT
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~DrawingAreaUIObject() override
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
virtual void SetText(const OUString &rStr) override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
constexpr sal_uInt16 KEY_INSERT
bool IsReallyVisible() const
virtual ~RoadmapWizardUIObject() override
virtual ~TabPageUIObject() override
virtual ~MetricFieldUIObject() override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
EditUIObject(const VclPtr< Edit > &xEdit)
OUString GetPageText(std::string_view rPageId) const
virtual OUString get_name() const override
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly...
virtual StringMap get_state()
Returns the state of the wrapped UI object as a string key value map.
virtual ~EditUIObject() override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
sal_uInt16 GetPageCount() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual void SetSelection(const Selection &rSelection) override
sal_uInt16 GetCurPageId() const
constexpr sal_uInt16 KEY_TAB
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
vcl::Window * GetChild(sal_uInt16 nChild) const
constexpr sal_uInt16 KEY_F8
virtual ~ListBoxUIObject() override