LibreOffice Module vcl (master)  1
uitest/uiobject.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #include <vcl/uitest/uiobject.hxx>
13 
14 #include <vcl/svapp.hxx>
15 #include <vcl/toolkit/combobox.hxx>
16 #include <vcl/event.hxx>
17 #include <vcl/floatwin.hxx>
18 #include <vcl/tabpage.hxx>
19 #include <vcl/tabctrl.hxx>
20 #include <vcl/toolkit/lstbox.hxx>
21 #include <vcl/toolkit/spin.hxx>
22 #include <vcl/toolkit/fmtfield.hxx>
23 #include <vcl/toolkit/spinfld.hxx>
24 #include <vcl/toolkit/ivctrl.hxx>
25 #include <vcl/toolkit/button.hxx>
26 #include <vcl/toolkit/dialog.hxx>
27 #include <vcl/toolkit/edit.hxx>
28 #include <vcl/toolkit/field.hxx>
29 #include <vcl/menubtn.hxx>
30 #include <vcl/toolkit/vclmedit.hxx>
31 #include <vcl/uitest/logger.hxx>
32 #include <uiobject-internal.hxx>
33 #include <verticaltabctrl.hxx>
34 #include <vcl/toolbox.hxx>
35 
36 #include <comphelper/string.hxx>
37 #include <comphelper/lok.hxx>
38 
39 #include <rtl/ustrbuf.hxx>
40 #include <sal/log.hxx>
41 
42 #include <iostream>
43 #include <memory>
44 #include <vector>
45 
47 {
48 }
49 
51 {
53  aMap["NotImplemented"] = "NotImplemented";
54  return aMap;
55 }
56 
57 void UIObject::execute(const OUString& /*rAction*/,
58  const StringMap& /*rParameters*/)
59 {
60  // should never be called
61  throw std::exception();
62 }
63 
64 OUString UIObject::get_type() const
65 {
66  return "Generic UIObject";
67 }
68 
69 std::unique_ptr<UIObject> UIObject::get_child(const OUString&)
70 {
71  return std::unique_ptr<UIObject>();
72 }
73 
74 std::set<OUString> UIObject::get_children() const
75 {
76  return std::set<OUString>();
77 }
78 
79 OUString UIObject::dumpState() const
80 {
81  return OUString();
82 }
83 
84 OUString UIObject::dumpHierarchy() const
85 {
86  return OUString();
87 }
88 
89 OUString UIObject::get_action(VclEventId /*nEvent*/) const
90 {
91  return OUString();
92 }
93 
94 namespace {
95 
96 bool isDialogWindow(vcl::Window const * pWindow)
97 {
98  WindowType nType = pWindow->GetType();
99  if (nType == WindowType::DIALOG || nType == WindowType::MODELESSDIALOG)
100  return true;
101 
102  // MESSBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX
103  if (nType >= WindowType::MESSBOX && nType <= WindowType::QUERYBOX)
104  return true;
105 
106  if (nType == WindowType::TABDIALOG)
107  return true;
108 
109  return false;
110 }
111 
112 bool isTopWindow(vcl::Window const * pWindow)
113 {
114  WindowType eType = pWindow->GetType();
115  if (eType == WindowType::FLOATINGWINDOW)
116  {
117  return pWindow->GetStyle() & WB_SYSTEMFLOATWIN;
118  }
119  return false;
120 }
121 
122 vcl::Window* get_top_parent(vcl::Window* pWindow)
123 {
124  if (isDialogWindow(pWindow) || isTopWindow(pWindow))
125  return pWindow;
126 
127  vcl::Window* pParent = pWindow->GetParent();
128  if (!pParent)
129  return pWindow;
130 
131  return get_top_parent(pParent);
132 }
133 
134 std::vector<KeyEvent> generate_key_events_from_text(const OUString& rStr)
135 {
136  std::vector<KeyEvent> aEvents;
137  vcl::KeyCode aCode;
138  for (sal_Int32 i = 0, n = rStr.getLength();
139  i != n; ++i)
140  {
141  aEvents.emplace_back(rStr[i], aCode);
142  }
143  return aEvents;
144 }
145 
146 sal_uInt16 get_key(sal_Unicode cChar, bool& bShift)
147 {
148  bShift = false;
149  if (cChar >= 'a' && cChar <= 'z')
150  return KEY_A + (cChar - 'a');
151  else if (cChar >= 'A' && cChar <= 'Z')
152  {
153  bShift = true;
154  return KEY_A + (cChar - 'A');
155  }
156  else if (cChar >= '0' && cChar <= '9')
157  return KEY_0 + (cChar - 'A');
158 
159  return cChar;
160 }
161 
162 bool isFunctionKey(const OUString& rStr, sal_uInt16& rKeyCode)
163 {
164  std::map<OUString, sal_uInt16> aFunctionKeyMap = {
165  {"F1", KEY_F1},
166  {"F2", KEY_F2},
167  {"F3", KEY_F3},
168  {"F4", KEY_F4},
169  {"F5", KEY_F5},
170  {"F6", KEY_F6},
171  {"F7", KEY_F7},
172  {"F8", KEY_F8},
173  {"F9", KEY_F9},
174  {"F10", KEY_F10},
175  {"F11", KEY_F11},
176  {"F12", KEY_F12}
177  };
178 
179  rKeyCode = 0;
180  auto itr = aFunctionKeyMap.find(rStr);
181  if (itr == aFunctionKeyMap.end())
182  return false;
183 
184  rKeyCode = itr->second;
185  return true;
186 }
187 
188 std::vector<KeyEvent> generate_key_events_from_keycode(const OUString& rStr)
189 {
190  std::vector<KeyEvent> aEvents;
191 
192  std::map<OUString, sal_uInt16> aKeyMap = {
193  {"ESC", KEY_ESCAPE},
194  {"TAB", KEY_TAB},
195  {"DOWN", KEY_DOWN},
196  {"UP", KEY_UP},
197  {"LEFT", KEY_LEFT},
198  {"RIGHT", KEY_RIGHT},
199  {"DELETE", KEY_DELETE},
200  {"INSERT", KEY_INSERT},
201  {"SPACE", KEY_SPACE},
202  {"BACKSPACE", KEY_BACKSPACE},
203  {"RETURN", KEY_RETURN},
204  {"HOME", KEY_HOME},
205  {"END", KEY_END},
206  {"PAGEUP", KEY_PAGEUP},
207  {"PAGEDOWN", KEY_PAGEDOWN}
208  };
209 
210  // split string along '+'
211  // then translate to keycodes
212  bool bShift = false;
213  bool bMod1 = false;
214  bool bMod2 = false;
215  OUString aRemainingText;
216 
217  std::vector<OUString> aTokens = comphelper::string::split(rStr, '+');
218  for (auto const& token : aTokens)
219  {
220  OUString aToken = token.trim();
221  if (aToken == "CTRL")
222  {
223  bMod1 = true;
224  }
225  else if (aToken == "SHIFT")
226  {
227  bShift = true;
228  }
229  else if (aToken == "ALT")
230  {
231  bMod2 = true;
232  }
233  else
234  aRemainingText = aToken;
235  }
236 
237  sal_uInt16 nFunctionKey = 0;
238  if (isFunctionKey(aRemainingText, nFunctionKey))
239  {
240  vcl::KeyCode aCode(nFunctionKey, bShift, bMod1, bMod2, false);
241  aEvents.emplace_back(0, aCode);
242  }
243  else if (aKeyMap.find(aRemainingText) != aKeyMap.end())
244  {
245  sal_uInt16 nKey = aKeyMap[aRemainingText];
246  vcl::KeyCode aCode(nKey, bShift, bMod1, bMod2, false);
247  aEvents.emplace_back( 'a', aCode);
248  }
249  else
250  {
251  for (sal_Int32 i = 0; i < aRemainingText.getLength(); ++i)
252  {
253  bool bShiftThroughKey = false;
254  sal_uInt16 nKey = get_key(aRemainingText[i], bShiftThroughKey);
255  vcl::KeyCode aCode(nKey, bShift || bShiftThroughKey, bMod1, bMod2, false);
256  aEvents.emplace_back(aRemainingText[i], aCode);
257  }
258  }
259 
260  return aEvents;
261 }
262 
263 OUString to_string(const Point& rPos)
264 {
265  OUString sStr = OUString::number(rPos.X())
266  + "x"
267  + OUString::number(rPos.Y());
268 
269  return sStr;
270 }
271 
272 OUString to_string(const Size& rSize)
273 {
274  OUString sStr = OUString::number(rSize.Width())
275  + "x"
276  + OUString::number(rSize.Height());
277 
278  return sStr;
279 }
280 
281 }
282 
284  mxWindow(xWindow)
285 {
286 }
287 
289 {
290  // Double-buffering is not interesting for uitesting, but can result in direct paint for a
291  // double-buffered widget, which is incorrect.
294 
295  StringMap aMap;
296  aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
297  aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible());
298  aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
299  aMap["WindowType"] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16);
300 
301  Point aPos = mxWindow->GetPosPixel();
302  aMap["RelPosition"] = to_string(aPos);
303  aMap["Size"] = to_string(mxWindow->GetSizePixel());
304  aMap["ID"] = mxWindow->get_id();
305  vcl::Window* pParent = mxWindow->GetParent();
306  if (pParent)
307  aMap["Parent"] = mxWindow->GetParent()->get_id();
308 
309  bool bIgnoreAllExceptTop = isDialogWindow(mxWindow.get());
310  while(pParent)
311  {
312  Point aParentPos = pParent->GetPosPixel();
313  if (!bIgnoreAllExceptTop)
314  aPos += aParentPos;
315 
316  if (isDialogWindow(pParent))
317  {
318  bIgnoreAllExceptTop = true;
319  }
320 
321  pParent = pParent->GetParent();
322 
323  if (!pParent && bIgnoreAllExceptTop)
324  aPos += aParentPos;
325  }
326  aMap["AbsPosition"] = to_string(aPos);
327  aMap["Text"] = mxWindow->GetText();
328  aMap["DisplayText"] = mxWindow->GetDisplayText();
329 
330  return aMap;
331 }
332 
333 void WindowUIObject::execute(const OUString& rAction,
334  const StringMap& rParameters)
335 {
336  bool bHandled = true;
337  if (rAction == "SET")
338  {
339  for (auto const& parameter : rParameters)
340  {
341  std::cout << parameter.first;
342  }
343  }
344  else if (rAction == "TYPE")
345  {
346  auto it = rParameters.find("TEXT");
347  if (it != rParameters.end())
348  {
349  const OUString& rText = it->second;
350  auto aKeyEvents = generate_key_events_from_text(rText);
351  for (auto const& keyEvent : aKeyEvents)
352  {
353  mxWindow->KeyInput(keyEvent);
354  }
355  }
356  else if (rParameters.find("KEYCODE") != rParameters.end())
357  {
358  auto itr = rParameters.find("KEYCODE");
359  const OUString rText = itr->second;
360  auto aKeyEvents = generate_key_events_from_keycode(rText);
361  for (auto const& keyEvent : aKeyEvents)
362  {
363  mxWindow->KeyInput(keyEvent);
364  }
365  }
366  else
367  {
368  SAL_WARN("vcl.uitest", "missing parameter TEXT to action TYPE");
369  return;
370  }
371  }
372  else if (rAction == "FOCUS")
373  {
374  mxWindow->GrabFocus();
375  }
376  else
377  {
378  bHandled = false;
379  }
380 
381  if (!bHandled)
382  {
383  SAL_WARN("vcl.uitest", "unknown action or parameter for " << get_name() << ". Action: " << rAction);
384  }
385 }
386 
387 OUString WindowUIObject::get_type() const
388 {
389  return get_name();
390 }
391 
392 namespace {
393 
394 vcl::Window* findChild(vcl::Window* pParent, const OUString& rID, bool bRequireVisible = false)
395 {
396  if (!pParent || pParent->IsDisposed())
397  return nullptr;
398 
399  if (pParent->get_id() == rID)
400  return pParent;
401 
402  size_t nCount = pParent->GetChildCount();
403  for (size_t i = 0; i < nCount; ++i)
404  {
405  vcl::Window* pChild = pParent->GetChild(i);
406  if (pChild && pChild->get_id() == rID
407  && (!bRequireVisible || pChild->IsVisible()))
408  return pChild;
409 
410  if (!bRequireVisible || pChild->IsVisible())
411  {
412  vcl::Window* pResult = findChild(pChild, rID);
413  if (pResult)
414  return pResult;
415  }
416  }
417 
418  return nullptr;
419 }
420 
421 void addChildren(vcl::Window const * pParent, std::set<OUString>& rChildren)
422 {
423  if (!pParent)
424  return;
425 
426  size_t nCount = pParent->GetChildCount();
427  for (size_t i = 0; i < nCount; ++i)
428  {
429  vcl::Window* pChild = pParent->GetChild(i);
430  if (pChild)
431  {
432  OUString aId = pChild->get_id();
433  if (!aId.isEmpty())
434  {
435  auto ret = rChildren.insert(aId);
436  SAL_WARN_IF(!ret.second, "vcl.uitest", "duplicate ids for ui elements. violates locally unique requirement");
437  }
438 
439  addChildren(pChild, rChildren);
440  }
441  }
442 }
443 
444 }
445 
446 std::unique_ptr<UIObject> WindowUIObject::get_child(const OUString& rID)
447 {
448  // in a first step try the real children before moving to the top level parent
449  // This makes it easier to handle cases with the same ID as there is a way
450  // to resolve conflicts
451  vcl::Window* pWindow = findChild(mxWindow.get(), rID);
452  if (!pWindow)
453  {
454  vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
455  pWindow = findChild(pDialogParent, rID);
456  }
457 
458  if (!pWindow)
459  throw css::uno::RuntimeException("Could not find child with id: " + rID);
460 
461  FactoryFunction aFunction = pWindow->GetUITestFactory();
462  return aFunction(pWindow);
463 }
464 
465 std::unique_ptr<UIObject> WindowUIObject::get_visible_child(const OUString& rID)
466 {
467  // in a first step try the real children before moving to the top level parent
468  // This makes it easier to handle cases with the same ID as there is a way
469  // to resolve conflicts
470  vcl::Window* pWindow = findChild(mxWindow.get(), rID, true);
471  if (!pWindow)
472  {
473  vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
474  pWindow = findChild(pDialogParent, rID, true);
475  }
476 
477  if (!pWindow)
478  throw css::uno::RuntimeException("Could not find child with id: " + rID);
479 
480  FactoryFunction aFunction = pWindow->GetUITestFactory();
481  return aFunction(pWindow);
482 }
483 
484 std::set<OUString> WindowUIObject::get_children() const
485 {
486  vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
487  std::set<OUString> aChildren;
488  aChildren.insert(pDialogParent->get_id());
489  addChildren(pDialogParent, aChildren);
490  return aChildren;
491 }
492 
493 OUString WindowUIObject::get_name() const
494 {
495  return "WindowUIObject";
496 }
497 
498 namespace {
499 
500 OUString escape(const OUString& rStr)
501 {
502  return rStr.replaceAll("\"", "\\\"");
503 }
504 
505 }
506 
508 {
509  OUStringBuffer aStateString = "{\"name\":\"" + mxWindow->get_id() + "\"";
510  aStateString.append(", \"ImplementationName\":\"").appendAscii(typeid(*mxWindow).name()).append("\"");
511  StringMap aState = const_cast<WindowUIObject*>(this)->get_state();
512  for (auto const& elem : aState)
513  {
514  OUString property = ",\"" + elem.first + "\":\"" + escape(elem.second) + "\"";
515  aStateString.append(property);
516  }
517 
518  size_t nCount = mxWindow->GetChildCount();
519 
520  if (nCount)
521  aStateString.append(",\"children\":[");
522 
523  for (size_t i = 0; i < nCount; ++i)
524  {
525  if (i != 0)
526  {
527  aStateString.append(",");
528  }
529  vcl::Window* pChild = mxWindow->GetChild(i);
530  std::unique_ptr<UIObject> pChildWrapper =
531  pChild->GetUITestFactory()(pChild);
532  OUString children = pChildWrapper->dumpState();
533  aStateString.append(children);
534  }
535 
536  if (nCount)
537  aStateString.append("]");
538 
539  aStateString.append("}");
540 
541  OUString aString = aStateString.makeStringAndClear();
542  return aString.replaceAll("\n", "\\n");
543 }
544 
546 {
547  vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
548  std::unique_ptr<UIObject> pParentWrapper =
549  pDialogParent->GetUITestFactory()(pDialogParent);
550  return pParentWrapper->dumpState();
551 }
552 
554 {
555 
556  OUString aActionName;
557  switch (nEvent)
558  {
561  return OUString();
562 
565  aActionName = "CLICK";
566  break;
567 
569  aActionName = "TYPE";
570  break;
571  default:
572  aActionName = OUString::number(static_cast<int>(nEvent));
573  }
574  return "";
575  //return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName;
576 }
577 
578 std::unique_ptr<UIObject> WindowUIObject::create(vcl::Window* pWindow)
579 {
580  return std::unique_ptr<UIObject>(new WindowUIObject(pWindow));
581 }
582 
584  WindowUIObject(xButton),
585  mxButton(xButton)
586 {
587 }
588 
590 {
591 }
592 
594 {
596  // Move that to a Control base class
597  aMap["Label"] = mxButton->GetDisplayText();
598 
599  return aMap;
600 }
601 
602 void ButtonUIObject::execute(const OUString& rAction,
603  const StringMap& rParameters)
604 {
605  if (rAction == "CLICK")
606  {
607  //Click doesn't call toggle when it's a pushbutton tweaked to be a toggle-button
608  if (PushButton *pPushButton = (mxButton->GetStyle() & WB_TOGGLE) ? dynamic_cast<PushButton*>(mxButton.get()) : nullptr)
609  {
610  pPushButton->Check(!pPushButton->IsChecked());
611  pPushButton->Toggle();
612  return;
613  }
614  mxButton->Click();
615  }
616  else
617  WindowUIObject::execute(rAction, rParameters);
618 }
619 
620 OUString ButtonUIObject::get_name() const
621 {
622  return "ButtonUIObject";
623 }
624 
626 {
627  if (nEvent == VclEventId::ButtonClick)
628  {
629  if(mxButton->get_id()=="writer_all")
630  {
632  return "Start writer" ;
633  }
634  else if(mxButton->get_id()=="calc_all")
635  {
637  return "Start calc" ;
638  }
639  else if(mxButton->get_id()=="impress_all")
640  {
642  return "Start impress" ;
643  }
644  else if(mxButton->get_id()=="draw_all")
645  {
647  return "Start draw" ;
648  }
649  else if(mxButton->get_id()=="math_all")
650  {
652  return "Start math" ;
653  }
654  else if(mxButton->get_id()=="database_all")
655  {
657  return "Start database" ;
658  }
659  else{
660  if (get_top_parent(mxButton)->get_id().isEmpty()){
661  //This part because if we don't have parent
662  return "Click on '" + mxButton->get_id() ;
663  }
664  return "Click on '" + mxButton->get_id() + "' from "+
665  get_top_parent(mxButton)->get_id();
666  }
667  }
668  else
669  return WindowUIObject::get_action(nEvent);
670 }
671 
672 std::unique_ptr<UIObject> ButtonUIObject::create(vcl::Window* pWindow)
673 {
674  Button* pButton = dynamic_cast<Button*>(pWindow);
675  assert(pButton);
676  return std::unique_ptr<UIObject>(new ButtonUIObject(pButton));
677 }
678 
680  WindowUIObject(xDialog),
681  mxDialog(xDialog)
682 {
683 }
684 
686 {
687 }
688 
690 {
692  aMap["Modal"] = OUString::boolean(mxDialog->IsModalInputMode());
693 
694  return aMap;
695 }
696 
697 OUString DialogUIObject::get_name() const
698 {
699  return "DialogUIObject";
700 }
701 
702 std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow)
703 {
704  Dialog* pDialog = dynamic_cast<Dialog*>(pWindow);
705  assert(pDialog);
706  return std::unique_ptr<UIObject>(new DialogUIObject(pDialog));
707 }
708 
710  WindowUIObject(xEdit),
711  mxEdit(xEdit)
712 {
713 }
714 
716 {
717 }
718 
719 void EditUIObject::execute(const OUString& rAction,
720  const StringMap& rParameters)
721 {
722  bool bHandled = true;
723  if (rAction == "TYPE")
724  {
725  if (rParameters.find("TEXT") != rParameters.end())
726  {
727  auto it = rParameters.find("TEXT");
728  if (it == rParameters.end())
729  {
730  SAL_WARN("vcl.uitest", "missing parameter TEXT to action SET");
731  return;
732  }
733 
734  const OUString& rText = it->second;
735  auto aKeyEvents = generate_key_events_from_text(rText);
736  for (auto const& keyEvent : aKeyEvents)
737  {
738  mxEdit->KeyInput(keyEvent);
739  }
740  }
741  else
742  {
743  bHandled = false;
744  }
745  }
746  else if (rAction == "SET")
747  {
748  auto it = rParameters.find("TEXT");
749  if (it != rParameters.end())
750  {
751  mxEdit->SetText(it->second);
752  mxEdit->Modify();
753  }
754  else
755  bHandled = false;
756  }
757  else if (rAction == "SELECT")
758  {
759  if (rParameters.find("FROM") != rParameters.end() &&
760  rParameters.find("TO") != rParameters.end())
761  {
762  tools::Long nMin = rParameters.find("FROM")->second.toInt32();
763  tools::Long nMax = rParameters.find("TO")->second.toInt32();
764  Selection aSelection(nMin, nMax);
765  mxEdit->SetSelection(aSelection);
766  }
767  }
768  else if (rAction == "CLEAR")
769  {
770  mxEdit->SetText("");
771  mxEdit->Modify();
772  bHandled = true;
773  }
774  else
775  {
776  bHandled = false;
777  }
778 
779  if (!bHandled)
780  WindowUIObject::execute(rAction, rParameters);
781 }
782 
784 {
786  aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
787  aMap["SelectedText"] = mxEdit->GetSelected();
788  aMap["Text"] = mxEdit->GetText();
789 
790  return aMap;
791 }
792 
793 OUString EditUIObject::get_action(VclEventId nEvent) const
794 {
795  if (nEvent == VclEventId::EditSelectionChanged)
796  {
797  const Selection& rSelection = mxEdit->GetSelection();
798  tools::Long nMin = rSelection.Min();
799  tools::Long nMax = rSelection.Max();
800  if(get_top_parent(mxEdit)->get_id().isEmpty()){
801  //This part because if we don't have parent
802  return "Select in '" +
803  mxEdit->get_id() +
804  "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
805  OUString::number(nMax) + "\"}"
806  ;
807  }
808  return "Select in '" +
809  mxEdit->get_id() +
810  "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
811  OUString::number(nMax) + "\"} from "
812  + get_top_parent(mxEdit)->get_id()
813  ;
814  }
815  else
816  return WindowUIObject::get_action(nEvent);
817 }
818 
819 OUString EditUIObject::get_name() const
820 {
821  return "EditUIObject";
822 }
823 
824 std::unique_ptr<UIObject> EditUIObject::create(vcl::Window* pWindow)
825 {
826  Edit* pEdit = dynamic_cast<Edit*>(pWindow);
827  assert(pEdit);
828  return std::unique_ptr<UIObject>(new EditUIObject(pEdit));
829 }
830 
832  WindowUIObject(xEdit),
833  mxEdit(xEdit)
834 {
835 }
836 
838 {
839 }
840 
841 void MultiLineEditUIObject::execute(const OUString& rAction,
842  const StringMap& rParameters)
843 {
844  bool bHandled = true;
845  if (rAction == "TYPE")
846  {
847  WindowUIObject aChildObj(mxEdit->GetTextWindow());
848  aChildObj.execute(rAction, rParameters);
849  }
850  else if (rAction == "SELECT")
851  {
852  if (rParameters.find("FROM") != rParameters.end() &&
853  rParameters.find("TO") != rParameters.end())
854  {
855  tools::Long nMin = rParameters.find("FROM")->second.toInt32();
856  tools::Long nMax = rParameters.find("TO")->second.toInt32();
857  Selection aSelection(nMin, nMax);
858  mxEdit->SetSelection(aSelection);
859  }
860  }
861  else
862  {
863  bHandled = false;
864  }
865 
866  if (!bHandled)
867  WindowUIObject::execute(rAction, rParameters);
868 }
869 
871 {
873  aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
874  aMap["SelectedText"] = mxEdit->GetSelected();
875  aMap["Text"] = mxEdit->GetText();
876 
877  return aMap;
878 }
879 
881 {
882  return "MultiLineEditUIObject";
883 }
884 
885 std::unique_ptr<UIObject> MultiLineEditUIObject::create(vcl::Window* pWindow)
886 {
887  VclMultiLineEdit* pEdit = dynamic_cast<VclMultiLineEdit*>(pWindow);
888  assert(pEdit);
889  return std::unique_ptr<UIObject>(new MultiLineEditUIObject(pEdit));
890 }
891 
893  WindowUIObject(xCheckbox),
894  mxCheckBox(xCheckbox)
895 {
896 }
897 
899 {
900 }
901 
902 void CheckBoxUIObject::execute(const OUString& rAction,
903  const StringMap& /*rParameters*/)
904 {
905  if (rAction == "CLICK")
906  {
907  // don't use toggle directly, it does not set the value
909  }
910 }
911 
913 {
915  aMap["Selected"] = OUString::boolean(mxCheckBox->IsChecked());
916  aMap["TriStateEnabled"] = OUString::boolean(mxCheckBox->IsTriStateEnabled());
917  return aMap;
918 }
919 
921 {
922  return "CheckBoxUIObject";
923 }
924 
926 {
927  if (nEvent == VclEventId::CheckboxToggle)
928  {
929  if(get_top_parent(mxCheckBox)->get_id().isEmpty()){
930  //This part because if we don't have parent
931  return "Toggle '" + mxCheckBox->get_id() + "' CheckBox";
932  }
933  return "Toggle '" + mxCheckBox->get_id() + "' CheckBox from " +
934  get_top_parent(mxCheckBox)->get_id();
935  }
936  else
937  return WindowUIObject::get_action(nEvent);
938 }
939 
940 std::unique_ptr<UIObject> CheckBoxUIObject::create(vcl::Window* pWindow)
941 {
942  CheckBox* pCheckBox = dynamic_cast<CheckBox*>(pWindow);
943  assert(pCheckBox);
944  return std::unique_ptr<UIObject>(new CheckBoxUIObject(pCheckBox));
945 }
946 
948  WindowUIObject(xRadioButton),
949  mxRadioButton(xRadioButton)
950 {
951 }
952 
954 {
955 }
956 
957 void RadioButtonUIObject::execute(const OUString& rAction,
958  const StringMap& /*rParameters*/)
959 {
960  if (rAction == "CLICK")
961  {
963  }
964 }
965 
967 {
969  aMap["Checked"] = OUString::boolean(mxRadioButton->IsChecked());
970 
971  return aMap;
972 }
973 
975 {
976  return "RadioButtonUIObject";
977 }
978 
980 {
981  if (nEvent == VclEventId::RadiobuttonToggle)
982  {
983  if(get_top_parent(mxRadioButton)->get_id().isEmpty()){
984  //This part because if we don't have parent
985  return "Select '" + mxRadioButton->get_id() + "' RadioButton";
986  }
987  return "Select '" + mxRadioButton->get_id() + "' RadioButton from " +
988  get_top_parent(mxRadioButton)->get_id();
989  }
990  else
991  return WindowUIObject::get_action(nEvent);
992 }
993 
994 std::unique_ptr<UIObject> RadioButtonUIObject::create(vcl::Window* pWindow)
995 {
996  RadioButton* pRadioButton = dynamic_cast<RadioButton*>(pWindow);
997  assert(pRadioButton);
998  return std::unique_ptr<UIObject>(new RadioButtonUIObject(pRadioButton));
999 }
1000 
1002  WindowUIObject(xTabPage),
1003  mxTabPage(xTabPage)
1004 {
1005 }
1006 
1008 {
1009 }
1010 
1011 void TabPageUIObject::execute(const OUString& rAction,
1012  const StringMap& /*rParameters*/)
1013 {
1014  if (rAction == "SELECT")
1015  {
1016  /* code */
1017  }
1018 }
1019 
1021 {
1023 
1024  return aMap;
1025 }
1026 
1028 {
1029  return "TabPageUIObject";
1030 }
1031 
1033  WindowUIObject(xListBox),
1034  mxListBox(xListBox)
1035 {
1036 }
1037 
1039 {
1040 }
1041 
1042 void ListBoxUIObject::execute(const OUString& rAction,
1043  const StringMap& rParameters)
1044 {
1045  if (!mxListBox->IsEnabled())
1046  return;
1047 
1048  bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
1049  if (!isTiledRendering && !mxListBox->IsReallyVisible())
1050  return;
1051 
1052  if (rAction == "SELECT")
1053  {
1054  bool bSelect = true;
1055  if (rParameters.find("POS") != rParameters.end())
1056  {
1057  auto itr = rParameters.find("POS");
1058  OUString aVal = itr->second;
1059  sal_Int32 nPos = aVal.toInt32();
1060  mxListBox->SelectEntryPos(nPos, bSelect);
1061  }
1062  else if (rParameters.find("TEXT") != rParameters.end())
1063  {
1064  auto itr = rParameters.find("TEXT");
1065  OUString aText = itr->second;
1066  mxListBox->SelectEntry(aText, bSelect);
1067  }
1068  mxListBox->Select();
1069  }
1070  else
1071  WindowUIObject::execute(rAction, rParameters);
1072 }
1073 
1075 {
1077  aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly());
1078  aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
1079  aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount());
1080  aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount());
1081  aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos());
1082  aMap["SelectEntryText"] = mxListBox->GetSelectedEntry();
1083 
1084  return aMap;
1085 }
1086 
1088 {
1089  return "ListBoxUIObject";
1090 }
1091 
1093 {
1094  if (nEvent == VclEventId::ListboxSelect)
1095  {
1096  sal_Int32 nPos = mxListBox->GetSelectedEntryPos();
1097  if(get_top_parent(mxListBox)->get_id().isEmpty()){
1098  //This part because if we don't have parent
1099  return "Select element with position " + OUString::number(nPos) +
1100  " in '" + mxListBox->get_id();
1101  }
1102  return "Select element with position " + OUString::number(nPos) +
1103  " in '" + mxListBox->get_id() +"' from" + get_top_parent(mxListBox)->get_id() ;
1104  }
1105  else if (nEvent == VclEventId::ListboxFocus)
1106  {
1107  if(get_top_parent(mxListBox)->get_id().isEmpty())
1108  {
1109  //This part because if we don't have parent
1110  return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id();
1111  }
1112  return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id() +
1113  " Parent:" + get_top_parent(mxListBox)->get_id();
1114  }
1115  else
1116  return WindowUIObject::get_action(nEvent);
1117 }
1118 
1119 std::unique_ptr<UIObject> ListBoxUIObject::create(vcl::Window* pWindow)
1120 {
1121  ListBox* pListBox = dynamic_cast<ListBox*>(pWindow);
1122  assert(pListBox);
1123  return std::unique_ptr<UIObject>(new ListBoxUIObject(pListBox));
1124 }
1125 
1127  WindowUIObject(xComboBox),
1128  mxComboBox(xComboBox)
1129 {
1130 }
1131 
1133 {
1134 }
1135 
1136 void ComboBoxUIObject::execute(const OUString& rAction,
1137  const StringMap& rParameters)
1138 {
1139  if (rAction == "SELECT")
1140  {
1141  if (rParameters.find("POS") != rParameters.end())
1142  {
1143  auto itr = rParameters.find("POS");
1144  OUString aVal = itr->second;
1145  sal_Int32 nPos = aVal.toInt32();
1146  mxComboBox->SelectEntryPos(nPos);
1147  }
1148  else if(rParameters.find("TEXT") != rParameters.end()){
1149  auto itr = rParameters.find("TEXT");
1150  OUString aVal = itr->second;
1151  sal_Int32 nPos = mxComboBox->GetEntryPos(aVal);
1152  mxComboBox->SelectEntryPos(nPos);
1153  }
1154  mxComboBox->Select();
1155  }
1156  else if ( rAction == "TYPE" || rAction == "SET" || rAction == "CLEAR" ){
1157  if (mxComboBox->GetSubEdit())
1158  {
1159  Edit* pEdit = mxComboBox->GetSubEdit();
1160  std::unique_ptr<UIObject> pObj = EditUIObject::create(pEdit);
1161  pObj->execute(rAction, rParameters);
1162  }
1163  else
1164  WindowUIObject::execute(rAction, rParameters);
1165  }
1166  else
1167  WindowUIObject::execute(rAction, rParameters);
1168 }
1169 
1171 {
1173  return aMap;
1174 }
1175 
1177 {
1178  return "ComboBoxUIObject";
1179 }
1180 
1182 {
1183  if (nEvent == VclEventId::ComboboxSelect)
1184  {
1185  sal_Int32 nPos = mxComboBox->GetSelectedEntryPos();
1186  if (get_top_parent(mxComboBox)->get_id().isEmpty()){
1187  //This part because if we don't have parent
1188  return "Select in '" + mxComboBox->get_id() +
1189  "' ComboBox item number " + OUString::number(nPos);
1190  }
1191  return "Select in '" + mxComboBox->get_id() +
1192  "' ComboBox item number " + OUString::number(nPos) +
1193  " from " + get_top_parent(mxComboBox)->get_id();
1194  }
1195  else
1196  return WindowUIObject::get_action(nEvent);
1197 }
1198 
1199 std::unique_ptr<UIObject> ComboBoxUIObject::create(vcl::Window* pWindow)
1200 {
1201  ComboBox* pComboBox = dynamic_cast<ComboBox*>(pWindow);
1202  assert(pComboBox);
1203  return std::unique_ptr<UIObject>(new ComboBoxUIObject(pComboBox));
1204 }
1205 
1207  WindowUIObject(xSpinButton),
1208  mxSpinButton(xSpinButton)
1209 {
1210 }
1211 
1213 {
1214 }
1215 
1216 void SpinUIObject::execute(const OUString& rAction,
1217  const StringMap& /*rParameters*/)
1218 {
1219  if (rAction == "UP")
1220  {
1221  mxSpinButton->Up();
1222  }
1223  else if (rAction == "DOWN")
1224  {
1225  mxSpinButton->Down();
1226  }
1227 }
1228 
1230 {
1232  aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
1233  aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
1234  aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
1235  aMap["Value"] = OUString::number(mxSpinButton->GetValue());
1236 
1237  return aMap;
1238 }
1239 
1240 OUString SpinUIObject::get_action(VclEventId nEvent) const
1241 {
1242  if (nEvent == VclEventId::SpinbuttonUp)
1243  {
1244  return this->get_type() + " Action:UP Id:" + mxSpinButton->get_id() +
1245  " Parent:" + get_top_parent(mxSpinButton)->get_id();
1246  }
1247  else if (nEvent == VclEventId::SpinbuttonDown)
1248  {
1249  return this->get_type() + " Action:DOWN Id:" + mxSpinButton->get_id() +
1250  " Parent:" + get_top_parent(mxSpinButton)->get_id();
1251  }
1252  else
1253  return WindowUIObject::get_action(nEvent);
1254 }
1255 
1256 OUString SpinUIObject::get_name() const
1257 {
1258  return "SpinUIObject";
1259 }
1260 
1262  EditUIObject(xSpinField),
1263  mxSpinField(xSpinField)
1264 {
1265 }
1266 
1268 {
1269 }
1270 
1271 void SpinFieldUIObject::execute(const OUString& rAction,
1272  const StringMap& rParameters)
1273 {
1274  if (rAction == "UP")
1275  {
1276  mxSpinField->Up();
1277  }
1278  else if (rAction == "DOWN")
1279  {
1280  mxSpinField->Down();
1281  }
1282  else if (rAction == "TYPE")
1283  {
1284  if (mxSpinField->GetSubEdit())
1285  {
1286  Edit* pSubEdit = mxSpinField->GetSubEdit();
1287  EditUIObject aSubObject(pSubEdit);
1288  aSubObject.execute(rAction, rParameters);
1289  }
1290  }
1291  else
1292  EditUIObject::execute(rAction, rParameters);
1293 }
1294 
1296 {
1298 
1299  return aMap;
1300 }
1301 
1303 {
1304  if (nEvent == VclEventId::SpinfieldUp)
1305  {
1306  if(get_top_parent(mxSpinField)->get_id().isEmpty())
1307  {
1308  //This part because if we don't have parent
1309  return "Increase '" + mxSpinField->get_id();
1310  }
1311  return "Increase '" + mxSpinField->get_id() +
1312  "' from " + get_top_parent(mxSpinField)->get_id();
1313  }
1314  else if (nEvent == VclEventId::SpinfieldDown)
1315  {
1316  if(get_top_parent(mxSpinField)->get_id().isEmpty())
1317  {
1318  //This part because if we don't have parent
1319  return "Decrease '" + mxSpinField->get_id();
1320  }
1321  return "Decrease '" + mxSpinField->get_id() +
1322  "' from " + get_top_parent(mxSpinField)->get_id();
1323  }
1324  else
1325  return WindowUIObject::get_action(nEvent);
1326 }
1327 
1329 {
1330  return "SpinFieldUIObject";
1331 }
1332 
1333 std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow)
1334 {
1335  SpinField* pSpinField = dynamic_cast<SpinField*>(pWindow);
1336  assert(pSpinField);
1337  return std::unique_ptr<UIObject>(new SpinFieldUIObject(pSpinField));
1338 }
1339 
1340 
1342  SpinFieldUIObject(xMetricField),
1343  mxMetricField(xMetricField)
1344 {
1345 }
1346 
1348 {
1349 }
1350 
1351 void MetricFieldUIObject::execute(const OUString& rAction,
1352  const StringMap& rParameters)
1353 {
1354  if (rAction == "VALUE")
1355  {
1356  auto itPos = rParameters.find("VALUE");
1357  if (itPos != rParameters.end())
1358  {
1359  mxMetricField->SetValueFromString(itPos->second);
1360  }
1361  }
1362  else
1363  SpinFieldUIObject::execute(rAction, rParameters);
1364 }
1365 
1367 {
1369  aMap["Value"] = mxMetricField->GetValueString();
1370 
1371  return aMap;
1372 }
1373 
1375 {
1376  return "MetricFieldUIObject";
1377 }
1378 
1379 std::unique_ptr<UIObject> MetricFieldUIObject::create(vcl::Window* pWindow)
1380 {
1381  MetricField* pMetricField = dynamic_cast<MetricField*>(pWindow);
1382  assert(pMetricField);
1383  return std::unique_ptr<UIObject>(new MetricFieldUIObject(pMetricField));
1384 }
1385 
1387  SpinFieldUIObject(xFormattedField),
1388  mxFormattedField(xFormattedField)
1389 {
1390 }
1391 
1393 {
1394 }
1395 
1396 void FormattedFieldUIObject::execute(const OUString& rAction,
1397  const StringMap& rParameters)
1398 {
1399  if (rAction == "VALUE")
1400  {
1401  auto itPos = rParameters.find("VALUE");
1402  if (itPos != rParameters.end())
1403  {
1404  mxFormattedField->SetValueFromString(itPos->second);
1405  }
1406  }
1407  else
1408  SpinFieldUIObject::execute(rAction, rParameters);
1409 }
1410 
1412 {
1414  aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue());
1415 
1416  return aMap;
1417 }
1418 
1420 {
1421  return "FormattedFieldUIObject";
1422 }
1423 
1424 std::unique_ptr<UIObject> FormattedFieldUIObject::create(vcl::Window* pWindow)
1425 {
1426  FormattedField* pFormattedField = dynamic_cast<FormattedField*>(pWindow);
1427  assert(pFormattedField);
1428  return std::unique_ptr<UIObject>(new FormattedFieldUIObject(pFormattedField));
1429 }
1430 
1432  WindowUIObject(xTabControl),
1433  mxTabControl(xTabControl)
1434 {
1435 }
1436 
1438 {
1439 }
1440 
1441 void TabControlUIObject::execute(const OUString& rAction,
1442  const StringMap& rParameters)
1443 {
1444  if (rAction == "SELECT")
1445  {
1446  if (rParameters.find("POS") != rParameters.end())
1447  {
1448  auto itr = rParameters.find("POS");
1449  sal_uInt32 nPos = itr->second.toUInt32();
1450  std::vector<sal_uInt16> aIds = mxTabControl->GetPageIDs();
1451  mxTabControl->SelectTabPage(aIds[nPos]);
1452  }
1453  }
1454  else
1455  WindowUIObject::execute(rAction, rParameters);
1456 }
1457 
1459 {
1461  aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1462 
1463  sal_uInt16 nPageId = mxTabControl->GetCurPageId();
1464  aMap["CurrPageId"] = OUString::number(nPageId);
1465  aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1466 
1467  return aMap;
1468 }
1469 
1471 {
1472  if (nEvent == VclEventId::TabpageActivate)
1473  {
1474  sal_Int32 nPageId = mxTabControl->GetCurPageId();
1475 
1476  if(get_top_parent(mxTabControl)->get_id().isEmpty()){
1477  //This part because if we don't have parent
1478  return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1479  " in '" + mxTabControl->get_id();
1480  }
1481  return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1482  " in '" + mxTabControl->get_id()+
1483  "' from " + get_top_parent(mxTabControl)->get_id() ;
1484  }
1485  else
1486  return WindowUIObject::get_action(nEvent);
1487 }
1488 
1490 {
1491  return "TabControlUIObject";
1492 }
1493 
1494 std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
1495 {
1496  TabControl* pTabControl = dynamic_cast<TabControl*>(pWindow);
1497  assert(pTabControl);
1498  return std::unique_ptr<UIObject>(new TabControlUIObject(pTabControl));
1499 }
1500 
1502  WindowUIObject(xRoadmapWizard),
1503  mxRoadmapWizard(xRoadmapWizard)
1504 {
1505 }
1506 
1508 {
1509 }
1510 
1511 void RoadmapWizardUIObject::execute(const OUString& rAction,
1512  const StringMap& rParameters)
1513 {
1514  if (rAction == "SELECT")
1515  {
1516  if (rParameters.find("POS") != rParameters.end())
1517  {
1518  auto itr = rParameters.find("POS");
1519  sal_uInt32 nPos = itr->second.toUInt32();
1521  }
1522  }
1523  else
1524  WindowUIObject::execute(rAction, rParameters);
1525 }
1526 
1528 {
1530 
1531  aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
1532 
1533  return aMap;
1534 }
1535 
1537 {
1538  return "RoadmapWizardUIObject";
1539 }
1540 
1541 std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
1542 {
1543  vcl::RoadmapWizard* pRoadmapWizard = dynamic_cast<vcl::RoadmapWizard*>(pWindow);
1544  assert(pRoadmapWizard);
1545  return std::unique_ptr<UIObject>(new RoadmapWizardUIObject(pRoadmapWizard));
1546 }
1547 
1549  WindowUIObject(xTabControl),
1550  mxTabControl(xTabControl)
1551 {
1552 }
1553 
1555 {
1556 }
1557 
1558 void VerticalTabControlUIObject::execute(const OUString& rAction,
1559  const StringMap& rParameters)
1560 {
1561  if (rAction == "SELECT")
1562  {
1563  if (rParameters.find("POS") != rParameters.end())
1564  {
1565  auto itr = rParameters.find("POS");
1566  sal_uInt32 nPos = itr->second.toUInt32();
1567  OString xid = mxTabControl->GetPageId(nPos);
1568  mxTabControl->SetCurPageId(xid);
1569  }
1570  }
1571  else
1572  WindowUIObject::execute(rAction, rParameters);
1573 }
1574 
1576 {
1578  aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1579 
1580  OString nPageId = mxTabControl->GetCurPageId();
1581  aMap["CurrPageTitel"] = mxTabControl->GetPageText(nPageId);
1582  aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1583 
1584  return aMap;
1585 }
1586 
1588 {
1589  return "VerticalTabControlUIObject";
1590 }
1591 
1592 std::unique_ptr<UIObject> VerticalTabControlUIObject::create(vcl::Window* pWindow)
1593 {
1594  VerticalTabControl* pTabControl = dynamic_cast<VerticalTabControl*>(pWindow);
1595  assert(pTabControl);
1596  return std::unique_ptr<UIObject>(new VerticalTabControlUIObject(pTabControl));
1597 }
1598 
1599 
1601  WindowUIObject(xToolBox),
1602  mxToolBox(xToolBox)
1603 {
1604 }
1605 
1607 {
1608 }
1609 
1610 void ToolBoxUIObject::execute(const OUString& rAction,
1611  const StringMap& rParameters)
1612 {
1613  if (rAction == "CLICK")
1614  {
1615  if (rParameters.find("POS") != rParameters.end())
1616  {
1617  auto itr = rParameters.find("POS");
1618  sal_uInt16 nPos = itr->second.toUInt32();
1619  mxToolBox->SetCurItemId(nPos);
1620  mxToolBox->Click();
1621  mxToolBox->Select();
1622  }
1623  }
1624  else
1625  WindowUIObject::execute(rAction, rParameters);
1626 }
1627 
1629 {
1630  if (nEvent == VclEventId::ToolboxClick)
1631  {
1632  return "Click on item number " + OUString::number(mxToolBox->GetCurItemId()) +
1633  " in " + mxToolBox->get_id();
1634  }
1635  else
1636  return WindowUIObject::get_action(nEvent);
1637 }
1638 
1640 {
1642  aMap["CurrSelectedItemID"] = OUString::number(mxToolBox->GetCurItemId());
1643  aMap["CurrSelectedItemText"] = mxToolBox->GetItemText(mxToolBox->GetCurItemId());
1644  aMap["CurrSelectedItemCommand"] = mxToolBox->GetItemCommand(mxToolBox->GetCurItemId());
1645  aMap["ItemCount"] = OUString::number(mxToolBox->GetItemCount());
1646  return aMap;
1647 }
1648 
1650 {
1651  return "ToolBoxUIObject";
1652 }
1653 
1654 std::unique_ptr<UIObject> ToolBoxUIObject::create(vcl::Window* pWindow)
1655 {
1656  ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
1657  assert(pToolBox);
1658  return std::unique_ptr<UIObject>(new ToolBoxUIObject(pToolBox));
1659 }
1660 
1662  WindowUIObject(xMenuButton),
1663  mxMenuButton(xMenuButton)
1664 {
1665 }
1666 
1668 {
1669 }
1670 
1672 {
1674  aMap["Label"] = mxMenuButton->GetDisplayText();
1675  return aMap;
1676 }
1677 
1678 void MenuButtonUIObject::execute(const OUString& rAction,
1679  const StringMap& rParameters)
1680 {
1681  if (rAction == "CLICK")
1682  {
1684  mxMenuButton->Toggle();
1685  }
1686  else if (rAction == "OPENLIST")
1687  {
1689  }
1690  else if (rAction == "OPENFROMLIST")
1691  {
1692  auto itr = rParameters.find("POS");
1693  sal_uInt32 nPos = itr->second.toUInt32();
1694 
1695  sal_uInt32 nId = mxMenuButton->GetPopupMenu()->GetItemId(nPos);
1698  mxMenuButton->Select();
1699  }
1700  else if (rAction == "CLOSELIST")
1701  {
1703  }
1704  else
1705  WindowUIObject::execute(rAction, rParameters);
1706 }
1707 
1709 {
1710  return "MenuButtonUIObject";
1711 }
1712 
1713 std::unique_ptr<UIObject> MenuButtonUIObject::create(vcl::Window* pWindow)
1714 {
1715  MenuButton* pMenuButton = dynamic_cast<MenuButton*>(pWindow);
1716  assert(pMenuButton);
1717  return std::unique_ptr<UIObject>(new MenuButtonUIObject(pMenuButton));
1718 }
1719 
1721  : WindowUIObject(rDrawingArea)
1722  , mxDrawingArea(dynamic_cast<VclDrawingArea*>(rDrawingArea.get()))
1723 {
1726 }
1727 
1729 {
1730 }
1731 
1732 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long Max() const
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
virtual OUString GetDisplayText() const override
Definition: ctrl.cxx:218
virtual Point GetPosPixel() const
Definition: window.cxx:2789
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
Definition: uiobject.hxx:214
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.
wizard for a roadmap
Definition: wizdlg.hxx:65
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:990
RadioButtonUIObject(const VclPtr< RadioButton > &xCheckbox)
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
WinBits const WB_TOGGLE
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)
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3949
virtual ~ToolBoxUIObject() override
MetricFieldUIObject(const VclPtr< MetricField > &xEdit)
virtual OUString get_name() const override
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:1002
virtual OUString GetSelected() const
Definition: edit.cxx:2506
ButtonUIObject(const VclPtr< Button > &xButton)
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.
VclPtr< ToolBox > mxToolBox
Definition: uiobject.hxx:492
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
VclPtr< SpinButton > mxSpinButton
Definition: uiobject.hxx:352
Edit * GetSubEdit() const
Definition: edit.hxx:217
void SetValueFromString(const OUString &rStr)
Definition: fmtfield.cxx:1331
void Check(bool bCheck=true)
Definition: button.hxx:212
weld::CustomWidgetController * mpController
Definition: uiobject.hxx:539
OString GetCurPageId() const
A widget used to choose from a list of items and which has no entry.
Definition: lstbox.hxx:83
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.
const OUString & GetItemText(sal_uInt16 nItemId) const
Definition: toolbox2.cxx:1067
void SelectTabPage(sal_uInt16 nPageId)
Definition: tabctrl.cxx:1846
constexpr sal_uInt16 KEY_F3
Definition: keycodes.hxx:85
Formatter & GetFormatter()
Definition: fmtfield.cxx:1314
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
Definition: combobox.cxx:944
long Long
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
virtual OUString get_name() const override
constexpr sal_uInt16 KEY_A
Definition: keycodes.hxx:56
constexpr sal_uInt16 KEY_0
Definition: keycodes.hxx:45
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
void Select()
Definition: listbox.cxx:898
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
constexpr sal_uInt16 KEY_F5
Definition: keycodes.hxx:87
constexpr sal_uInt16 KEY_F7
Definition: keycodes.hxx:89
virtual std::set< OUString > get_children() const override
Returns a set containing all descendants of the object.
sal_Int64 n
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual Size GetSizePixel() const
Definition: window.cxx:2400
void * GetUserData() const
Definition: layout.hxx:745
VclPtr< FormattedField > mxFormattedField
constexpr sal_uInt16 KEY_F4
Definition: keycodes.hxx:86
VclPtr< VclDrawingArea > mxDrawingArea
Definition: uiobject.hxx:537
sal_Int16 nId
SAL_DLLPRIVATE void ImplCallClick(bool bGrabFocus=false, GetFocusFlags nFocusFlags=GetFocusFlags::NONE)
Definition: button.cxx:2231
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 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_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
void SetSelectedEntry(sal_uInt16 nId)
Definition: menu.cxx:2789
OUString aId
FormattedFieldUIObject(const VclPtr< FormattedField > &xEdit)
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_F6
Definition: keycodes.hxx:88
virtual void Up()
Definition: spinfld.cxx:358
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_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.
constexpr sal_uInt16 KEY_SPACE
Definition: keycodes.hxx:123
void Select()
Definition: combobox.cxx:502
virtual ~DialogUIObject() override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
void ExecuteMenu()
Definition: menubtn.cxx:55
sal_uInt16 GetCurItemId() const
Definition: toolbox.hxx:353
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
Definition: ivctrl.cxx:598
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
Definition: keycodes.hxx:111
std::vector< OUString > split(const OUString &rStr, sal_Unicode cSeparator)
constexpr sal_uInt16 KEY_F1
Definition: keycodes.hxx:83
constexpr sal_uInt16 KEY_F9
Definition: keycodes.hxx:91
constexpr sal_uInt16 KEY_END
Definition: keycodes.hxx:115
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.
HashMap_OWString_Interface aMap
static UITestLogger & getInstance()
Definition: logger.cxx:616
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.
virtual ~RadioButtonUIObject() override
sal_uInt16 sal_Unicode
VclPtr< vcl::RoadmapWizard > mxRoadmapWizard
const OUString & get_id() const
Get the ID of the window.
Definition: window.cxx:3944
sal_uInt16 nPageId
void setAppName(OUString name)
Definition: logger.hxx:61
sal_Int32 GetEntryCount() const
Definition: listbox.cxx:983
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
void SetCurPageId(const OString &rId)
Definition: ivctrl.cxx:522
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()
Definition: vclmedit.cxx:1481
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
double GetValue()
Definition: fmtfield.cxx:859
virtual ~FormattedFieldUIObject() override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
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
Definition: edit.hxx:181
int nCount
bool IsChecked() const
constexpr sal_uInt16 KEY_PAGEUP
Definition: keycodes.hxx:116
constexpr sal_uInt16 KEY_F2
Definition: keycodes.hxx:84
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
virtual void Click()
Definition: button.cxx:124
VclEventId
Definition: vclevent.hxx:37
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.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
bool IsModalInputMode() const
Definition: dialog.hxx:146
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual const Selection & GetSelection() const
Definition: edit.cxx:2479
WindowUIObject(const VclPtr< vcl::Window > &xWindow)
virtual OUString get_name() const override
virtual OUString GetText() const
Definition: window.cxx:3057
WinBits const WB_SYSTEMFLOATWIN
virtual OUString get_name() const override
virtual OUString get_name() const override
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
Definition: edit.hxx:55
virtual OUString get_name() const override
SpinFieldUIObject(const VclPtr< SpinField > &xEdit)
virtual void Down()
Definition: spinfld.cxx:363
bool IsReadOnly() const
Definition: listbox.cxx:1324
virtual OUString GetDisplayText() const
Definition: window.cxx:3063
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 SetSelection(const Selection &rSelection)
Definition: edit.cxx:2405
sal_uInt16 GetPageCount() const
Definition: tabctrl.cxx:1763
SAL_DLLPRIVATE void ImplCheck()
Definition: button.cxx:3093
VclPtr< Edit > mxEdit
Definition: uiobject.hxx:191
MultiLineEditUIObject(const VclPtr< VclMultiLineEdit > &xEdit)
DialogUIObject(const VclPtr< Dialog > &xDialog)
DocumentType eType
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
Definition: listbox.cxx:1022
constexpr sal_uInt16 KEY_DOWN
Definition: keycodes.hxx:110
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.
virtual ~ButtonUIObject() override
void SelectRoadmapItemByID(int nId)
std::unique_ptr< UIObject > get_visible_child(const OUString &rID)
int i
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
bool IsChecked() const
Definition: button.hxx:217
void SetCurItemId()
Definition: menubtn.cxx:262
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
PopupMenu * GetPopupMenu() const
Definition: menubtn.hxx:79
bool IsTriStateEnabled() const
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
constexpr sal_uInt16 KEY_HOME
Definition: keycodes.hxx:114
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: listbox.cxx:1027
virtual OUString get_type() const
Returns the type of the UIObject.
sal_uInt16 GetItemId(sal_uInt16 nPos) const
Definition: menu.cxx:634
ListBoxUIObject(const VclPtr< ListBox > &xListBox)
TabPageUIObject(const VclPtr< TabPage > &xTabPage)
VclPtr< Button > mxButton
Definition: uiobject.hxx:151
RoadmapWizardUIObject(const VclPtr< vcl::RoadmapWizard > &xRoadmapWizard)
virtual OUString GetText() const override
Definition: edit.cxx:2575
tools::Long Width() const
ToolBoxUIObject(const VclPtr< ToolBox > &mxToolBox)
virtual void Modify()
Definition: edit.cxx:2325
sal_Int32 GetSelectedEntryCount() const
Definition: listbox.cxx:995
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: combobox.cxx:1358
bool IsChecked() const
CheckBoxUIObject(const VclPtr< CheckBox > &xCheckbox)
constexpr sal_uInt16 KEY_PAGEDOWN
Definition: keycodes.hxx:117
virtual OUString get_name() const override
virtual void Click()
Definition: toolbox2.cxx:324
virtual sal_Int32 GetMaxTextLen() const override
Definition: vclmedit.cxx:1063
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
Definition: vclmedit.cxx:1078
virtual ~ComboBoxUIObject() override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
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.
Definition: window.cxx:3874
virtual OUString get_name() const override
void GrabFocus()
Definition: window.cxx:2978
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
static void append(std::bitset< N > &rSet, size_t const nOffset, sal_uInt32 const nValue)
Definition: sft.cxx:2233
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: edit.cxx:1711
vcl::Window * GetParent() const
Definition: window2.cxx:1097
void Toggle()
Definition: button.cxx:1508
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.
virtual ~SpinUIObject() override
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
Definition: tabctrl.cxx:1775
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
Definition: keycodes.hxx:119
constexpr sal_uInt16 KEY_RIGHT
Definition: keycodes.hxx:113
void SetCurItemId(sal_uInt16 CurID)
Definition: toolbox.hxx:82
std::vector< sal_uInt16 > GetPageIDs() const
Definition: tabctrl.cxx:2165
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)
Definition: window.cxx:1804
VerticalTabControlUIObject(const VclPtr< VerticalTabControl > &mxTabControl)
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1005
VclPtr< ComboBox > mxComboBox
Definition: uiobject.hxx:328
OUString GetItemCommand(sal_uInt16 nItemId) const
Definition: toolbox2.cxx:1330
virtual OUString get_name() const override
VclPtr< VerticalTabControl > mxTabControl
Definition: uiobject.hxx:423
void EndExecute()
Definition: menu.cxx:2752
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
WindowType
VclPtr< Dialog > mxDialog
Definition: uiobject.hxx:173
#define SAL_WARN_IF(condition, area, stream)
VclPtr< CheckBox > mxCheckBox
Definition: uiobject.hxx:237
constexpr sal_uInt16 KEY_ESCAPE
Definition: keycodes.hxx:120
virtual OUString get_name() const override
void SetValueFromString(const OUString &rStr)
Definition: field.cxx:636
tools::Long Min() const
VclPtr< TabControl > mxTabControl
Definition: uiobject.hxx:399
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
bool IsVisible() const
Definition: window2.cxx:1102
VclPtr< RadioButton > mxRadioButton
Definition: uiobject.hxx:260
MenuButtonUIObject(const VclPtr< MenuButton > &xMenuButton)
constexpr sal_uInt16 KEY_F11
Definition: keycodes.hxx:93
OUString GetValueString() const
Definition: field.cxx:629
constexpr sal_uInt16 KEY_F12
Definition: keycodes.hxx:94
ComboBoxUIObject(const VclPtr< ComboBox > &xListBox)
std::map< OUString, OUString > StringMap
virtual void Select()
Definition: menubtn.cxx:232
virtual ~VerticalTabControlUIObject() override
VclPtr< ListBox > mxListBox
Definition: uiobject.hxx:303
virtual ~CheckBoxUIObject() override
virtual OUString get_type() const override
Returns the type of the UIObject.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
tools::Long Height() const
QPRO_FUNC_TYPE nType
SpinUIObject(const VclPtr< SpinButton > &xSpinButton)
VclPtr< MenuButton > mxMenuButton
Definition: uiobject.hxx:515
VclPtr< vcl::Window > mxWindow
Definition: uiobject.hxx:115
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_BACKSPACE
Definition: keycodes.hxx:122
bool IsDisposed() const
Definition: window.cxx:142
TabControlUIObject(const VclPtr< TabControl > &mxTabControl)
bool IsMultiSelectionEnabled() const
Definition: listbox.cxx:1139
int GetCurrentRoadmapItemID() const
VclPtr< SpinField > mxSpinField
Definition: uiobject.hxx:375
virtual ~MenuButtonUIObject() override
A widget used to choose from a list of items and which has an entry.
Definition: combobox.hxx:38
WindowType GetType() const
Definition: window2.cxx:974
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
OUString GetText() const override
Definition: vclmedit.cxx:1108
bool IsEnabled() const
Definition: window2.cxx:1122
#define SAL_WARN(area, stream)
WinBits GetStyle() const
Definition: window2.cxx:953
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 Select()
Definition: toolbox2.cxx:361
virtual ~UIObject()
constexpr sal_uInt16 KEY_DELETE
Definition: keycodes.hxx:125
constexpr sal_uInt16 KEY_LEFT
Definition: keycodes.hxx:112
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)
Definition: combobox.cxx:1376
OString GetPageId(sal_uInt16 nIndex) const
Definition: ivctrl.cxx:550
virtual void SetText(const OUString &rStr) override
Definition: edit.cxx:2556
constexpr sal_uInt16 KEY_INSERT
Definition: keycodes.hxx:124
bool IsReallyVisible() const
Definition: window2.cxx:1107
virtual ~RoadmapWizardUIObject() override
virtual ~TabPageUIObject() override
virtual ~MetricFieldUIObject() override
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
Definition: ivctrl.cxx:614
virtual OUString get_name() const override
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly...
Definition: window.cxx:3869
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
ImplToolItems::size_type GetItemCount() const
Definition: toolbox2.cxx:704
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
Definition: vclmedit.cxx:1136
sal_uInt16 nPos
sal_uInt16 GetCurPageId() const
Definition: tabctrl.cxx:1838
constexpr sal_uInt16 KEY_TAB
Definition: keycodes.hxx:121
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
Definition: stacking.cxx:1021
constexpr sal_uInt16 KEY_F8
Definition: keycodes.hxx:90
virtual ~ListBoxUIObject() override