LibreOffice Module vcl (master)  1
weld.hxx
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 #ifndef INCLUDED_VCL_WELD_HXX
11 #define INCLUDED_VCL_WELD_HXX
12 
14 #include <rtl/ustring.hxx>
15 #include <tools/color.hxx>
16 #include <tools/date.hxx>
17 #include <tools/fldunit.hxx>
18 #include <tools/gen.hxx>
19 #include <tools/link.hxx>
20 #include <tools/time.hxx>
21 #include <vcl/dllapi.h>
22 #include <vcl/vclenum.hxx>
23 #include <vcl/font.hxx>
24 #include <vcl/menu.hxx>
25 #include <vcl/uitest/factory.hxx>
26 
27 #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
28 #include <com/sun/star/accessibility/XAccessible.hpp>
29 
30 #include <boost/property_tree/ptree_fwd.hpp>
31 
32 #include <assert.h>
33 #include <memory>
34 #include <vector>
35 
36 namespace com
37 {
38 namespace sun
39 {
40 namespace star
41 {
42 namespace awt
43 {
44 class XWindow;
45 }
46 namespace datatransfer
47 {
48 namespace dnd
49 {
50 class XDropTarget;
51 }
52 }
53 namespace graphic
54 {
55 class XGraphic;
56 }
57 }
58 }
59 }
60 
61 typedef css::uno::Reference<css::accessibility::XAccessible> a11yref;
62 typedef css::uno::Reference<css::accessibility::XAccessibleRelationSet> a11yrelationset;
63 
64 enum class PointerStyle;
65 class SvNumberFormatter;
66 class KeyEvent;
67 class MouseEvent;
69 class OutputDevice;
70 class VirtualDevice;
71 struct SystemEnvData;
72 
73 namespace vcl
74 {
75 class ILibreOfficeKitNotifier;
76 }
77 
78 namespace weld
79 {
80 class Container;
81 class DialogController;
82 
84 {
85 protected:
95 
96 public:
97  virtual void set_sensitive(bool sensitive) = 0;
98  virtual bool get_sensitive() const = 0;
99  virtual void show() = 0;
100  virtual void hide() = 0;
101  // This function simply calls show() or hide() but is convenient when the
102  // visibility depends on some condition
103  virtual void set_visible(bool visible)
104  {
105  if (visible)
106  show();
107  else
108  hide();
109  }
110  virtual bool get_visible() const = 0; //if this widget visibility is true
111  virtual bool is_visible() const = 0; //if this widget visibility and all parents is true
112  virtual void set_can_focus(bool bCanFocus) = 0;
113  virtual void grab_focus() = 0;
114  virtual bool has_focus() const = 0;
115  virtual bool is_active() const = 0; //if this widget has the focus within the active window
116  virtual void set_has_default(bool has_default) = 0;
117  virtual bool get_has_default() const = 0;
118  virtual void set_size_request(int nWidth, int nHeight) = 0;
119  virtual Size get_size_request() const = 0;
120  virtual Size get_preferred_size() const = 0;
121  virtual float get_approximate_digit_width() const = 0;
122  virtual int get_text_height() const = 0;
123  virtual Size get_pixel_size(const OUString& rText) const = 0;
124  virtual OString get_buildable_name() const = 0;
125  virtual void set_help_id(const OString& rName) = 0;
126  virtual OString get_help_id() const = 0;
127 
128  virtual void set_grid_left_attach(int nAttach) = 0;
129  virtual int get_grid_left_attach() const = 0;
130  virtual void set_grid_width(int nCols) = 0;
131  virtual void set_grid_top_attach(int nAttach) = 0;
132  virtual int get_grid_top_attach() const = 0;
133 
134  virtual void set_hexpand(bool bExpand) = 0;
135  virtual bool get_hexpand() const = 0;
136  virtual void set_vexpand(bool bExpand) = 0;
137  virtual bool get_vexpand() const = 0;
138 
139  virtual void set_secondary(bool bSecondary) = 0;
140 
141  virtual void set_margin_top(int nMargin) = 0;
142  virtual void set_margin_bottom(int nMargin) = 0;
143  virtual void set_margin_left(int nMargin) = 0;
144  virtual void set_margin_right(int nMargin) = 0;
145 
146  virtual int get_margin_top() const = 0;
147  virtual int get_margin_bottom() const = 0;
148  virtual int get_margin_left() const = 0;
149  virtual int get_margin_right() const = 0;
150 
151  /*
152  * Report the extents of this widget relative to the rRelative target widget.
153  *
154  * To succeed, both widgets must be realized, and must share a common toplevel.
155  *
156  * returns false if the relative extents could not be determined, e.g. if
157  * either widget was not realized, or there was no common ancestor.
158  * Otherwise true.
159  */
160  virtual bool get_extents_relative_to(Widget& rRelative, int& x, int& y, int& width, int& height)
161  = 0;
162 
163  virtual void set_accessible_name(const OUString& rName) = 0;
164  virtual OUString get_accessible_name() const = 0;
165 
166  virtual OUString get_accessible_description() const = 0;
167 
168  virtual void set_accessible_relation_labeled_by(weld::Widget* pLabel) = 0;
169  virtual void set_accessible_relation_label_for(weld::Widget* pLabeled) = 0;
170 
171  virtual void
172  add_extra_accessible_relation(const css::accessibility::AccessibleRelation& rRelation)
173  = 0;
174  virtual void clear_extra_accessible_relations() = 0;
175 
176  virtual void set_tooltip_text(const OUString& rTip) = 0;
177  virtual OUString get_tooltip_text() const = 0;
178 
179  virtual void connect_focus_in(const Link<Widget&, void>& rLink)
180  {
181  assert(!m_aFocusInHdl.IsSet() || !rLink.IsSet());
182  m_aFocusInHdl = rLink;
183  }
184 
185  virtual void connect_focus_out(const Link<Widget&, void>& rLink)
186  {
187  assert(!m_aFocusOutHdl.IsSet() || !rLink.IsSet());
188  m_aFocusOutHdl = rLink;
189  }
190 
191  // rLink is called when the mnemonic for the Widget is called.
192  // If rLink returns true the Widget will not automatically gain
193  // focus as normally occurs
195  {
196  assert(!m_aMnemonicActivateHdl.IsSet() || !rLink.IsSet());
197  m_aMnemonicActivateHdl = rLink;
198  }
199 
201  {
202  assert(!m_aSizeAllocateHdl.IsSet() || !rLink.IsSet());
203  m_aSizeAllocateHdl = rLink;
204  }
205 
207  {
208  assert(!m_aKeyPressHdl.IsSet() || !rLink.IsSet());
209  m_aKeyPressHdl = rLink;
210  }
211 
213  {
214  assert(!m_aKeyReleaseHdl.IsSet() || !rLink.IsSet());
215  m_aKeyReleaseHdl = rLink;
216  }
217 
219  {
220  assert(!m_aMousePressHdl.IsSet() || !rLink.IsSet());
221  m_aMousePressHdl = rLink;
222  }
223 
225  {
226  assert(!m_aMouseMotionHdl.IsSet() || !rLink.IsSet());
227  m_aMouseMotionHdl = rLink;
228  }
229 
231  {
232  assert(!m_aMouseReleaseHdl.IsSet() || !rLink.IsSet());
233  m_aMouseReleaseHdl = rLink;
234  }
235 
236  virtual void grab_add() = 0;
237  virtual bool has_grab() const = 0;
238  virtual void grab_remove() = 0;
239 
240  // font size is in points, not pixels, e.g. see Window::[G]etPointFont
241  virtual vcl::Font get_font() = 0;
242 
243  //true for rtl, false otherwise
244  virtual bool get_direction() const = 0;
245  virtual void set_direction(bool bRTL) = 0;
246 
247  virtual void freeze() = 0;
248  virtual void thaw() = 0;
249 
250  virtual std::unique_ptr<Container> weld_parent() const = 0;
251 
252  //iterate upwards through the hierarchy starting at this widgets parent,
253  //calling func with their helpid until func returns true or we run out of
254  //parents
255  virtual void help_hierarchy_foreach(const std::function<bool(const OString&)>& func) = 0;
256 
257  virtual OUString strip_mnemonic(const OUString& rLabel) const = 0;
258 
259  virtual VclPtr<VirtualDevice> create_virtual_device() const = 0;
260 
261  //make this widget look like a page in a notebook
262  virtual void set_stack_background() = 0;
263  //make this widget look like it has a highlighted background
264  virtual void set_highlight_background() = 0;
265  //make this widget suitable for use in a toolbar
266  virtual void set_toolbar_background() = 0;
267 
268  virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> get_drop_target() = 0;
269 
270  virtual void connect_get_property_tree(const Link<boost::property_tree::ptree&, void>& rLink)
271  = 0;
272 
273  virtual ~Widget() {}
274 };
275 
276 class VCL_DLLPUBLIC Container : virtual public Widget
277 {
278 public:
279  // remove and add in one go
280  virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) = 0;
281  // recursively unset has-default on any buttons in the widget hierarchy
282  virtual void recursively_unset_default_buttons() = 0;
283  // create an XWindow as a child of this container. The XWindow is
284  // suitable to contain css::awt::XControl items
285  virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() = 0;
286 };
287 
288 class VCL_DLLPUBLIC Box : virtual public Container
289 {
290 public:
291  // Moves child to a new position in the list of children
292  virtual void reorder_child(weld::Widget* pWidget, int position) = 0;
293 };
294 
295 class VCL_DLLPUBLIC ScrolledWindow : virtual public Container
296 {
297 protected:
300 
301  void signal_vadjustment_changed() { m_aVChangeHdl.Call(*this); }
302  void signal_hadjustment_changed() { m_aHChangeHdl.Call(*this); }
303 
304 public:
305  virtual void set_user_managed_scrolling() = 0;
306 
307  virtual void hadjustment_configure(int value, int lower, int upper, int step_increment,
308  int page_increment, int page_size)
309  = 0;
310  virtual int hadjustment_get_value() const = 0;
311  virtual void hadjustment_set_value(int value) = 0;
312  virtual int hadjustment_get_upper() const = 0;
313  virtual void hadjustment_set_upper(int upper) = 0;
314  virtual int hadjustment_get_page_size() const = 0;
315  virtual void hadjustment_set_page_size(int size) = 0;
316  virtual void hadjustment_set_page_increment(int size) = 0;
317  virtual void hadjustment_set_step_increment(int size) = 0;
318  virtual void set_hpolicy(VclPolicyType eHPolicy) = 0;
319  virtual VclPolicyType get_hpolicy() const = 0;
321  {
322  m_aHChangeHdl = rLink;
323  }
324  virtual int get_hscroll_height() const = 0;
325 
326  virtual void vadjustment_configure(int value, int lower, int upper, int step_increment,
327  int page_increment, int page_size)
328  = 0;
329  virtual int vadjustment_get_value() const = 0;
330  virtual void vadjustment_set_value(int value) = 0;
331  virtual int vadjustment_get_upper() const = 0;
332  virtual void vadjustment_set_upper(int upper) = 0;
333  virtual int vadjustment_get_page_size() const = 0;
334  virtual void vadjustment_set_page_size(int size) = 0;
335  virtual void vadjustment_set_page_increment(int size) = 0;
336  virtual void vadjustment_set_step_increment(int size) = 0;
337  virtual int vadjustment_get_lower() const = 0;
338  virtual void vadjustment_set_lower(int upper) = 0;
339  virtual void set_vpolicy(VclPolicyType eVPolicy) = 0;
340  virtual VclPolicyType get_vpolicy() const = 0;
342  {
343  m_aVChangeHdl = rLink;
344  }
345  virtual int get_vscroll_width() const = 0;
346 };
347 
348 class Label;
349 
350 class VCL_DLLPUBLIC Frame : virtual public Container
351 {
352 public:
353  virtual void set_label(const OUString& rText) = 0;
354  virtual OUString get_label() const = 0;
355  virtual std::unique_ptr<Label> weld_label_widget() const = 0;
356 };
357 
358 class VCL_DLLPUBLIC Notebook : virtual public Container
359 {
360 protected:
363 
364 public:
365  virtual int get_current_page() const = 0;
366  virtual OString get_page_ident(int nPage) const = 0;
367  virtual OString get_current_page_ident() const = 0;
368  virtual void set_current_page(int nPage) = 0;
369  virtual void set_current_page(const OString& rIdent) = 0;
370  virtual void remove_page(const OString& rIdent) = 0;
371  virtual void insert_page(const OString& rIdent, const OUString& rLabel, int nPos) = 0;
372  void append_page(const OString& rIdent, const OUString& rLabel)
373  {
374  insert_page(rIdent, rLabel, -1);
375  }
376  virtual void set_tab_label_text(const OString& rIdent, const OUString& rLabel) = 0;
377  virtual OUString get_tab_label_text(const OString& rIdent) const = 0;
378  virtual int get_n_pages() const = 0;
379  virtual weld::Container* get_page(const OString& rIdent) const = 0;
380 
381  void connect_leave_page(const Link<const OString&, bool>& rLink) { m_aLeavePageHdl = rLink; }
382 
383  void connect_enter_page(const Link<const OString&, void>& rLink) { m_aEnterPageHdl = rLink; }
384 };
385 
387 {
388 public:
389  ScreenShotEntry(const OString& rHelpId, const basegfx::B2IRange& rB2IRange)
390  : msHelpId(rHelpId)
391  , maB2IRange(rB2IRange)
392  {
393  }
394 
395  const basegfx::B2IRange& getB2IRange() const { return maB2IRange; }
396 
397  const OString& GetHelpId() const { return msHelpId; }
398 
399 private:
400  OString msHelpId;
402 };
403 
404 typedef std::vector<ScreenShotEntry> ScreenShotCollection;
405 
406 class VCL_DLLPUBLIC Window : virtual public Container
407 {
408 protected:
411 
412  void signal_toplevel_focus_changed() { m_aTopLevelFocusChangedHdl.Call(*this); }
413 
414 public:
415  virtual void set_title(const OUString& rTitle) = 0;
416  virtual OUString get_title() const = 0;
417  virtual void set_busy_cursor(bool bBusy) = 0;
418  virtual void window_move(int x, int y) = 0;
419  virtual void set_modal(bool bModal) = 0;
420  virtual bool get_modal() const = 0;
421  virtual bool get_resizable() const = 0;
422  virtual Size get_size() const = 0;
423  virtual Point get_position() const = 0;
424  virtual tools::Rectangle get_monitor_workarea() const = 0;
425  // center window on is parent
426  //
427  // bTrackGeometryRequests set to true tries to ensure the window will end
428  // up still centered on its parent windows final size, taking into account
429  // that there may currently be pending geometry requests for the parent not
430  // yet processed by the underlying toolkit
431  //
432  // for e.g gtk this will means the window is always centered even when
433  // resized, calling set_centered_on_parent with false will turn this
434  // off again.
435  virtual void set_centered_on_parent(bool bTrackGeometryRequests) = 0;
436  virtual bool has_toplevel_focus() const = 0;
437  virtual void present() = 0;
438  virtual void set_window_state(const OString& rStr) = 0;
439  virtual OString get_window_state(WindowStateMask nMask) const = 0;
440 
441  virtual css::uno::Reference<css::awt::XWindow> GetXWindow() = 0;
442 
443  void connect_help(const Link<Widget&, bool>& rLink) { m_aHelpRequestHdl = rLink; }
445  {
446  m_aTopLevelFocusChangedHdl = rLink;
447  }
448 
449  virtual SystemEnvData get_system_data() const = 0;
450 
451  virtual void resize_to_request() = 0;
452 
453  // render the dialog for a screenshot
454  virtual void draw(VirtualDevice& rOutput) = 0;
455  // collect positions of widgets and their help ids for screenshot purposes
456  virtual ScreenShotCollection collect_screenshot_data() = 0;
457 };
458 
460 {
461 private:
463 
464 public:
466  : m_pWindow(pWindow)
467  {
468  if (m_pWindow)
469  m_pWindow->set_busy_cursor(true);
470  }
472  {
473  if (m_pWindow)
474  m_pWindow->set_busy_cursor(false);
475  }
476 };
477 
478 class Button;
479 
480 class VCL_DLLPUBLIC Dialog : virtual public Window
481 {
482 private:
484  virtual bool runAsync(std::shared_ptr<DialogController>,
485  const std::function<void(sal_Int32)>& func)
486  = 0;
487 
488 public:
489  virtual int run() = 0;
490  // Run async without a controller
491  // @param self - must point to this, to enforce that the dialog was created/held by a shared_ptr
492  virtual bool runAsync(std::shared_ptr<Dialog> const& rxSelf,
493  const std::function<void(sal_Int32)>& func)
494  = 0;
495  virtual void response(int response) = 0;
496  virtual void add_button(const OUString& rText, int response, const OString& rHelpId = OString())
497  = 0;
498  virtual void set_default_response(int response) = 0;
499  virtual Button* weld_widget_for_response(int response) = 0;
500  virtual Container* weld_content_area() = 0;
501 
502  // shrink the dialog down to shown just these widgets
503  virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) = 0;
504  // undo previous dialog collapse
505  virtual void undo_collapse() = 0;
506 
507  virtual void SetInstallLOKNotifierHdl(const Link<void*, vcl::ILibreOfficeKitNotifier*>& rLink)
508  = 0;
509 };
510 
511 class VCL_DLLPUBLIC MessageDialog : virtual public Dialog
512 {
513 public:
514  virtual void set_primary_text(const OUString& rText) = 0;
515  virtual OUString get_primary_text() const = 0;
516  virtual void set_secondary_text(const OUString& rText) = 0;
517  virtual OUString get_secondary_text() const = 0;
518  virtual Container* weld_message_area() = 0;
519 };
520 
521 class VCL_DLLPUBLIC AboutDialog : virtual public Dialog
522 {
523 public:
524  virtual void set_version(const OUString& rVersion) = 0;
525  virtual void set_copyright(const OUString& rCopyright) = 0;
526  virtual void set_website(const OUString& rURL) = 0;
527  virtual void set_website_label(const OUString& rLabel) = 0;
528  virtual OUString get_website_label() const = 0;
529  virtual void set_logo(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
530  virtual void set_background(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
531 };
532 
533 class VCL_DLLPUBLIC Assistant : virtual public Dialog
534 {
535 protected:
537 
538  bool signal_jump_page(const OString& rIdent) { return m_aJumpPageHdl.Call(rIdent); }
539 
540 public:
541  virtual int get_current_page() const = 0;
542  virtual int get_n_pages() const = 0;
543  virtual OString get_page_ident(int nPage) const = 0;
544  virtual OString get_current_page_ident() const = 0;
545  virtual void set_current_page(int nPage) = 0;
546  virtual void set_current_page(const OString& rIdent) = 0;
547  // move the page rIdent to position nIndex
548  virtual void set_page_index(const OString& rIdent, int nIndex) = 0;
549  virtual void set_page_title(const OString& rIdent, const OUString& rTitle) = 0;
550  virtual OUString get_page_title(const OString& rIdent) const = 0;
551  virtual void set_page_sensitive(const OString& rIdent, bool bSensitive) = 0;
552  virtual weld::Container* append_page(const OString& rIdent) = 0;
553 
554  virtual void set_page_side_help_id(const OString& rHelpId) = 0;
555 
556  void connect_jump_page(const Link<const OString&, bool>& rLink) { m_aJumpPageHdl = rLink; }
557 };
558 
560 {
561  OUString sString;
562  OUString sId;
563  OUString sImage;
564  ComboBoxEntry(const OUString& rString)
565  : sString(rString)
566  {
567  }
568  ComboBoxEntry(const OUString& rString, const OUString& rId)
569  : sString(rString)
570  , sId(rId)
571  {
572  }
573  ComboBoxEntry(const OUString& rString, const OUString& rId, const OUString& rImage)
574  : sString(rString)
575  , sId(rId)
576  , sImage(rImage)
577  {
578  }
579 };
580 
582 {
583  Normal,
584  Warning,
585  Error,
586 };
587 
589 class VCL_DLLPUBLIC ComboBox : virtual public Container
590 {
591 private:
592  OUString m_sSavedValue;
593 
594 protected:
599 
600  void signal_changed() { m_aChangeHdl.Call(*this); }
601  virtual void signal_popup_toggled() { m_aPopupToggledHdl.Call(*this); }
602 
603 public:
604  virtual void insert(int pos, const OUString& rStr, const OUString* pId,
605  const OUString* pIconName, VirtualDevice* pImageSurface)
606  = 0;
607  virtual void insert_vector(const std::vector<weld::ComboBoxEntry>& rItems, bool bKeepExisting)
608  = 0;
609  void insert_text(int pos, const OUString& rStr)
610  {
611  insert(pos, rStr, nullptr, nullptr, nullptr);
612  }
613  void append_text(const OUString& rStr) { insert(-1, rStr, nullptr, nullptr, nullptr); }
614  void append(const OUString& rId, const OUString& rStr)
615  {
616  insert(-1, rStr, &rId, nullptr, nullptr);
617  }
618  void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
619  {
620  insert(-1, rStr, &rId, &rImage, nullptr);
621  }
622  void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
623  {
624  insert(-1, rStr, &rId, nullptr, &rImage);
625  }
626  virtual void insert_separator(int pos, const OUString& rId) = 0;
627  void append_separator(const OUString& rId) { insert_separator(-1, rId); }
628 
629  virtual int get_count() const = 0;
630  virtual void make_sorted() = 0;
631  virtual void clear() = 0;
632 
633  //by index
634  virtual int get_active() const = 0;
635  virtual void set_active(int pos) = 0;
636  virtual void remove(int pos) = 0;
637 
638  //by text
639  virtual OUString get_active_text() const = 0;
640  void set_active_text(const OUString& rStr) { set_active(find_text(rStr)); }
641  virtual OUString get_text(int pos) const = 0;
642  virtual int find_text(const OUString& rStr) const = 0;
643  void remove_text(const OUString& rText) { remove(find_text(rText)); }
644 
645  //by id
646  virtual OUString get_active_id() const = 0;
647  virtual void set_active_id(const OUString& rStr) = 0;
648  virtual OUString get_id(int pos) const = 0;
649  virtual void set_id(int row, const OUString& rId) = 0;
650  virtual int find_id(const OUString& rId) const = 0;
651  void remove_id(const OUString& rId) { remove(find_id(rId)); }
652 
653  /* m_aChangeHdl is called when the active item is changed. The can be due
654  to the user selecting a different item from the list or while typing
655  into the entry of a combo box with an entry.
656 
657  Use changed_by_direct_pick() to discover whether an item was actually explicitly
658  selected, e.g. from the menu.
659  */
660  void connect_changed(const Link<ComboBox&, void>& rLink) { m_aChangeHdl = rLink; }
661 
662  virtual bool changed_by_direct_pick() const = 0;
663 
664  virtual void connect_popup_toggled(const Link<ComboBox&, void>& rLink)
665  {
666  m_aPopupToggledHdl = rLink;
667  }
668 
669  //entry related
670  virtual bool has_entry() const = 0;
671  virtual void set_entry_message_type(EntryMessageType eType) = 0;
672  virtual void set_entry_text(const OUString& rStr) = 0;
673  virtual void set_entry_width_chars(int nChars) = 0;
674  virtual void set_entry_max_length(int nChars) = 0;
675  virtual void select_entry_region(int nStartPos, int nEndPos) = 0;
676  virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) = 0;
677  virtual void set_entry_completion(bool bEnable, bool bCaseSensitive = false) = 0;
678  virtual void set_entry_placeholder_text(const OUString& rText) = 0;
679 
680  virtual bool get_popup_shown() const = 0;
681 
683  {
684  m_aEntryInsertTextHdl = rLink;
685  }
686 
687  // callback returns true to indicated no further processing of activate wanted
688  void connect_entry_activate(const Link<ComboBox&, bool>& rLink) { m_aEntryActivateHdl = rLink; }
689 
690  void save_value() { m_sSavedValue = get_active_text(); }
691  OUString const& get_saved_value() const { return m_sSavedValue; }
692  bool get_value_changed_from_saved() const { return m_sSavedValue != get_active_text(); }
693 };
694 
696 {
697 private:
698  TreeIter(const TreeIter&) = delete;
699  TreeIter& operator=(const TreeIter&) = delete;
700 
701 public:
702  TreeIter() {}
703  virtual bool equal(const TreeIter& rOther) const = 0;
704  virtual ~TreeIter() {}
705 };
706 
707 class VCL_DLLPUBLIC TreeView : virtual public Container
708 {
709 private:
710  OUString m_sSavedValue;
711 
712 protected:
719  // if handler returns false, the expansion of the row is refused
721  // if handler returns false, the collapse of the row is refused
725  // if handler returns true, then menu has been show and event is consumed
727  // if handler returns true, drag is disallowed, consumer can change bool
728  // arg to false to disable the treeview default dnd icon
730  std::function<int(const weld::TreeIter&, const weld::TreeIter&)> m_aCustomSort;
731 
732  std::vector<int> m_aRadioIndexes;
733 
734  void signal_changed() { m_aChangeHdl.Call(*this); }
735  bool signal_row_activated() { return m_aRowActivatedHdl.Call(*this); }
736  void signal_column_clicked(int nColumn) { m_aColumnClickedHdl.Call(nColumn); }
737  bool signal_expanding(const TreeIter& rIter)
738  {
739  return !m_aExpandingHdl.IsSet() || m_aExpandingHdl.Call(rIter);
740  }
741  bool signal_collapsing(const TreeIter& rIter)
742  {
743  return !m_aCollapsingHdl.IsSet() || m_aCollapsingHdl.Call(rIter);
744  }
745  void signal_visible_range_changed() { m_aVisibleRangeChangedHdl.Call(*this); }
746  void signal_model_changed() { m_aModelChangedHdl.Call(*this); }
747 
748  // arg is pair<row,col>
749  void signal_toggled(const std::pair<int, int>& rRowCol) { m_aRadioToggleHdl.Call(rRowCol); }
750 
751  bool signal_editing_started(const TreeIter& rIter) { return m_aEditingStartedHdl.Call(rIter); }
752 
753  bool signal_editing_done(const std::pair<const TreeIter&, OUString>& rIterText)
754  {
755  return m_aEditingDoneHdl.Call(rIterText);
756  }
757 
759  OUString signal_query_tooltip(const TreeIter& rIter) { return m_aQueryTooltipHdl.Call(rIter); }
760 
761 public:
763  {
764  assert(!m_aQueryTooltipHdl.IsSet() || !rLink.IsSet());
765  m_aQueryTooltipHdl = rLink;
766  }
767 
768  virtual void insert(const TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId,
769  const OUString* pIconName, VirtualDevice* pImageSurface,
770  const OUString* pExpanderName, bool bChildrenOnDemand, TreeIter* pRet)
771  = 0;
772 
773  void insert(int nRow, TreeIter* pRet = nullptr)
774  {
775  insert(nullptr, nRow, nullptr, nullptr, nullptr, nullptr, nullptr, false, pRet);
776  }
777 
778  void append(TreeIter* pRet = nullptr) { insert(-1, pRet); }
779 
780  void insert(int pos, const OUString& rStr, const OUString* pId, const OUString* pIconName,
781  VirtualDevice* pImageSurface)
782  {
783  insert(nullptr, pos, &rStr, pId, pIconName, pImageSurface, nullptr, false, nullptr);
784  }
785  void insert_text(int pos, const OUString& rStr)
786  {
787  insert(nullptr, pos, &rStr, nullptr, nullptr, nullptr, nullptr, false, nullptr);
788  }
789  void append_text(const OUString& rStr)
790  {
791  insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, nullptr, false, nullptr);
792  }
793  void append(const OUString& rId, const OUString& rStr)
794  {
795  insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, nullptr, false, nullptr);
796  }
797  void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
798  {
799  insert(nullptr, -1, &rStr, &rId, &rImage, nullptr, nullptr, false, nullptr);
800  }
801  void append(const TreeIter* pParent, const OUString& rId, const OUString& rStr,
802  const OUString& rImage)
803  {
804  insert(pParent, -1, &rStr, &rId, &rImage, nullptr, nullptr, false, nullptr);
805  }
806  void append(const TreeIter* pParent, const OUString& rStr)
807  {
808  insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, nullptr, false, nullptr);
809  }
810  void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
811  {
812  insert(nullptr, -1, &rStr, &rId, nullptr, &rImage, nullptr, false, nullptr);
813  }
814 
815  void connect_changed(const Link<TreeView&, void>& rLink) { m_aChangeHdl = rLink; }
816 
817  /* A row is "activated" when the user double clicks a treeview row. It may
818  also be emitted when a row is selected and Space or Enter is pressed.
819 
820  a return of "true" means the activation has been handled, a "false" propagates
821  the activation to the default handler which expands/collapses the row, if possible.
822  */
823  void connect_row_activated(const Link<TreeView&, bool>& rLink) { m_aRowActivatedHdl = rLink; }
824 
825  // Argument is a pair of row, col describing the node in non-tree mode.
826  // If in tree mode, then retrieve the toggled node with get_cursor
827  void connect_toggled(const Link<const std::pair<int, int>&, void>& rLink)
828  {
829  m_aRadioToggleHdl = rLink;
830  }
831 
832  void connect_column_clicked(const Link<int, void>& rLink) { m_aColumnClickedHdl = rLink; }
833  void connect_model_changed(const Link<TreeView&, void>& rLink) { m_aModelChangedHdl = rLink; }
834 
835  virtual OUString get_selected_text() const = 0;
836  virtual OUString get_selected_id() const = 0;
837 
838  //by index
839  virtual int get_selected_index() const = 0;
840  //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
841  virtual void select(int pos) = 0;
842  virtual void unselect(int pos) = 0;
843  virtual void remove(int pos) = 0;
844  virtual OUString get_text(int row, int col = -1) const = 0;
845  virtual void set_text(int row, const OUString& rText, int col = -1) = 0;
846  virtual void set_sensitive(int row, bool bSensitive, int col = -1) = 0;
847  virtual void set_id(int row, const OUString& rId) = 0;
848  virtual void set_toggle(int row, TriState eState, int col) = 0;
849  virtual TriState get_toggle(int row, int col) const = 0;
850  virtual void set_image(int row, const OUString& rImage, int col = -1) = 0;
851  virtual void set_image(int row, VirtualDevice& rImage, int col = -1) = 0;
852  virtual void set_image(int row, const css::uno::Reference<css::graphic::XGraphic>& rImage,
853  int col = -1)
854  = 0;
855  virtual void set_text_emphasis(int row, bool bOn, int col) = 0;
856  virtual bool get_text_emphasis(int row, int col) const = 0;
857  virtual void swap(int pos1, int pos2) = 0;
858  virtual std::vector<int> get_selected_rows() const = 0;
859  virtual void set_font_color(int pos, const Color& rColor) = 0;
860  virtual void scroll_to_row(int pos) = 0;
861  virtual bool is_selected(int pos) const = 0;
862  virtual int get_cursor_index() const = 0;
863  virtual void set_cursor(int pos) = 0;
864 
865  //by text
866  virtual int find_text(const OUString& rText) const = 0;
867  //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
868  void select_text(const OUString& rText) { select(find_text(rText)); }
869  void remove_text(const OUString& rText) { remove(find_text(rText)); }
870  std::vector<OUString> get_selected_rows_text() const
871  {
872  std::vector<int> aRows(get_selected_rows());
873  std::vector<OUString> aRet;
874  aRet.reserve(aRows.size());
875  for (auto a : aRows)
876  aRet.push_back(get_text(a));
877  return aRet;
878  }
879 
880  //by id
881  virtual OUString get_id(int pos) const = 0;
882  virtual int find_id(const OUString& rId) const = 0;
883  //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
884  void select_id(const OUString& rId) { select(find_id(rId)); }
885  void remove_id(const OUString& rText) { remove(find_id(rText)); }
886 
887  //via iter
888  virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = nullptr) const = 0;
889  virtual void copy_iterator(const TreeIter& rSource, TreeIter& rDest) const = 0;
890  virtual bool get_selected(TreeIter* pIter) const = 0;
891  virtual bool get_cursor(TreeIter* pIter) const = 0;
892  virtual void set_cursor(const TreeIter& rIter) = 0;
893  virtual bool get_iter_first(TreeIter& rIter) const = 0;
894  // set iter to point to next node at the current level
895  virtual bool iter_next_sibling(TreeIter& rIter) const = 0;
896  // set iter to point to previous node at the current level
897  virtual bool iter_previous_sibling(TreeIter& rIter) const = 0;
898  // set iter to point to next node, depth first, then sibling
899  virtual bool iter_next(TreeIter& rIter) const = 0;
900  // set iter to point to previous node, sibling first then depth
901  virtual bool iter_previous(TreeIter& rIter) const = 0;
902  virtual bool iter_children(TreeIter& rIter) const = 0;
903  bool iter_nth_sibling(TreeIter& rIter, int nChild) const
904  {
905  bool bRet = true;
906  for (int i = 0; i < nChild && bRet; ++i)
907  bRet = iter_next_sibling(rIter);
908  return bRet;
909  }
910  bool iter_nth_child(TreeIter& rIter, int nChild) const
911  {
912  if (!iter_children(rIter))
913  return false;
914  return iter_nth_sibling(rIter, nChild);
915  }
916  virtual bool iter_parent(TreeIter& rIter) const = 0;
917  virtual int get_iter_depth(const TreeIter& rIter) const = 0;
918  virtual int get_iter_index_in_parent(const TreeIter& rIter) const = 0;
919  /* Compares two paths. If a appears before b in a tree, then -1 is returned.
920  If b appears before a , then 1 is returned. If the two nodes are equal,
921  then 0 is returned.
922  */
923  virtual int iter_compare(const TreeIter& a, const TreeIter& b) const = 0;
924  virtual bool iter_has_child(const TreeIter& rIter) const = 0;
925  // returns the number of direct children rIter has
926  virtual int iter_n_children(const TreeIter& rIter) const = 0;
927  virtual void remove(const TreeIter& rIter) = 0;
928  //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
929  virtual void select(const TreeIter& rIter) = 0;
930  virtual void unselect(const TreeIter& rIter) = 0;
931  virtual bool get_row_expanded(const TreeIter& rIter) const = 0;
932  virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
933  virtual void set_children_on_demand(const TreeIter& rIter, bool bChildrenOnDemand) = 0;
934  //visually indent this row as if it was at get_iter_depth() + nIndentLevel
935  virtual void set_extra_row_indent(const TreeIter& rIter, int nIndentLevel) = 0;
936  virtual void expand_row(const TreeIter& rIter) = 0;
937  virtual void collapse_row(const TreeIter& rIter) = 0;
938  virtual void set_text(const TreeIter& rIter, const OUString& rStr, int col = -1) = 0;
939  virtual void set_sensitive(const TreeIter& rIter, bool bSensitive, int col = -1) = 0;
940  virtual void set_text_emphasis(const TreeIter& rIter, bool bOn, int col) = 0;
941  virtual bool get_text_emphasis(const TreeIter& rIter, int col) const = 0;
942  virtual void set_toggle(const TreeIter& rIter, TriState bOn, int col) = 0;
943  virtual TriState get_toggle(const TreeIter& rIter, int col) const = 0;
944  virtual OUString get_text(const TreeIter& rIter, int col = -1) const = 0;
945  virtual void set_id(const TreeIter& rIter, const OUString& rId) = 0;
946  virtual OUString get_id(const TreeIter& rIter) const = 0;
947  virtual void set_image(const TreeIter& rIter, const OUString& rImage, int col = -1) = 0;
948  virtual void set_image(const TreeIter& rIter, VirtualDevice& rImage, int col = -1) = 0;
949  virtual void set_image(const TreeIter& rIter,
950  const css::uno::Reference<css::graphic::XGraphic>& rImage, int col = -1)
951  = 0;
952  virtual void set_font_color(const TreeIter& rIter, const Color& rColor) = 0;
953  virtual void scroll_to_row(const TreeIter& rIter) = 0;
954  virtual bool is_selected(const TreeIter& rIter) const = 0;
955 
956  virtual void move_subtree(TreeIter& rNode, const TreeIter* pNewParent, int nIndexInNewParent)
957  = 0;
958 
959  // call func on each element until func returns true or we run out of elements
960  virtual void all_foreach(const std::function<bool(TreeIter&)>& func) = 0;
961  // call func on each selected element until func returns true or we run out of elements
962  virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) = 0;
963  // call func on each visible element until func returns true or we run out of elements
964  virtual void visible_foreach(const std::function<bool(TreeIter&)>& func) = 0;
965  // clear the tree, then add nSourceCount rows, call func on each row
966  // inserted with an arg of the index that this row will be when bulk insert
967  // ends.
968  //
969  // this enables inserting the entries backwards in models where that is faster,
970  //
971  // pFixedWidths is optional, when present each matching entry col text
972  // width will not be measured, and the fixed width used instead. Use
973  // sparingly because wider text than the fixed width is clipped and cannot
974  // be scrolled into view horizontally.
975  virtual void bulk_insert_for_each(int nSourceCount,
976  const std::function<void(TreeIter&, int nSourceIndex)>& func,
977  const std::vector<int>* pFixedWidths = nullptr)
978  = 0;
979 
980  void connect_expanding(const Link<const TreeIter&, bool>& rLink) { m_aExpandingHdl = rLink; }
981  void connect_collapsing(const Link<const TreeIter&, bool>& rLink) { m_aCollapsingHdl = rLink; }
982 
983  // rStartLink returns true to allow editing, false to disallow
984  // rEndLink returns true to accept the edit, false to reject
985  virtual void
987  const Link<const std::pair<const TreeIter&, OUString>&, bool>& rEndLink)
988  {
989  assert(rStartLink.IsSet() == rEndLink.IsSet() && "should be both on or both off");
990  m_aEditingStartedHdl = rStartLink;
991  m_aEditingDoneHdl = rEndLink;
992  }
993 
994  virtual void start_editing(const weld::TreeIter& rEntry) = 0;
995  virtual void end_editing() = 0;
996 
998  {
999  assert(!m_aVisibleRangeChangedHdl.IsSet() || !rLink.IsSet());
1000  m_aVisibleRangeChangedHdl = rLink;
1001  }
1002 
1004  {
1005  m_aPopupMenuHdl = rLink;
1006  }
1007 
1008  virtual void enable_drag_source(rtl::Reference<TransferDataContainer>& rTransferrable,
1009  sal_uInt8 eDNDConstants)
1010  = 0;
1011 
1012  void connect_drag_begin(const Link<bool&, bool>& rLink) { m_aDragBeginHdl = rLink; }
1013 
1014  //all of them. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1015  void select_all() { unselect(-1); }
1016  void unselect_all() { select(-1); }
1017 
1018  // return the number of toplevel nodes
1019  virtual int n_children() const = 0;
1020 
1021  // afterwards, entries will be in default ascending sort order
1022  virtual void make_sorted() = 0;
1023  virtual void make_unsorted() = 0;
1024  virtual bool get_sort_order() const = 0;
1025  virtual void set_sort_order(bool bAscending) = 0;
1026 
1027  // TRUE ascending, FALSE, descending, INDET, neither (off)
1028  virtual void set_sort_indicator(TriState eState, int nColumn = -1) = 0;
1029  virtual TriState get_sort_indicator(int nColumn = -1) const = 0;
1030 
1031  virtual int get_sort_column() const = 0;
1032  virtual void set_sort_column(int nColumn) = 0;
1033 
1034  virtual void
1035  set_sort_func(const std::function<int(const weld::TreeIter&, const weld::TreeIter&)>& func)
1036  {
1037  m_aCustomSort = func;
1038  }
1039 
1040  virtual void clear() = 0;
1041  virtual int get_height_rows(int nRows) const = 0;
1042 
1043  virtual void columns_autosize() = 0;
1044  virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0;
1045  virtual void set_column_editables(const std::vector<bool>& rEditables) = 0;
1046  virtual int get_column_width(int nCol) const = 0;
1047  virtual void set_centered_column(int nCol) = 0;
1048  virtual OUString get_column_title(int nColumn) const = 0;
1049  virtual void set_column_title(int nColumn, const OUString& rTitle) = 0;
1050 
1051  int get_checkbox_column_width() const { return get_approximate_digit_width() * 3 + 6; }
1052 
1053  virtual void set_selection_mode(SelectionMode eMode) = 0;
1054  virtual int count_selected_rows() const = 0;
1055  // remove the selected nodes
1056  virtual void remove_selection() = 0;
1057 
1058  void set_toggle_columns_as_radio(const std::vector<int>& rCols) { m_aRadioIndexes = rCols; }
1059 
1060  virtual void vadjustment_set_value(int value) = 0;
1061  virtual int vadjustment_get_value() const = 0;
1062 
1063  void save_value() { m_sSavedValue = get_selected_text(); }
1064  OUString const& get_saved_value() const { return m_sSavedValue; }
1065  bool get_value_changed_from_saved() const { return m_sSavedValue != get_selected_text(); }
1066 
1067  // for dnd
1068  virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult) = 0;
1069  virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const = 0;
1070  // for dragging and dropping between TreeViews, return the active source
1071  virtual TreeView* get_drag_source() const = 0;
1072 
1073  using Widget::set_sensitive;
1074 };
1075 
1076 class VCL_DLLPUBLIC IconView : virtual public Container
1077 {
1078 private:
1079  OUString m_sSavedValue;
1080 
1081 protected:
1084 
1085  void signal_selection_changed() { m_aSelectionChangeHdl.Call(*this); }
1086  bool signal_item_activated() { return m_aItemActivatedHdl.Call(*this); }
1087 
1088 public:
1089  virtual void insert(int pos, const OUString* pStr, const OUString* pId,
1090  const OUString* pIconName, TreeIter* pRet)
1091  = 0;
1092 
1093  void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
1094  {
1095  insert(-1, &rStr, &rId, &rImage, nullptr);
1096  }
1097 
1099  {
1100  m_aSelectionChangeHdl = rLink;
1101  }
1102 
1103  /* A row is "activated" when the user double clicks a treeview row. It may
1104  also be emitted when a row is selected and Space or Enter is pressed.
1105 
1106  a return of "true" means the activation has been handled, a "false" propagates
1107  the activation to the default handler which expands/collapses the row, if possible.
1108  */
1109  void connect_item_activated(const Link<IconView&, bool>& rLink) { m_aItemActivatedHdl = rLink; }
1110 
1111  virtual OUString get_selected_id() const = 0;
1112 
1113  virtual void clear() = 0;
1114 
1115  virtual int count_selected_items() const = 0;
1116 
1117  virtual OUString get_selected_text() const = 0;
1118 
1119  //by index. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1120  virtual void select(int pos) = 0;
1121  virtual void unselect(int pos) = 0;
1122 
1123  //via iter
1124  virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = nullptr) const = 0;
1125  virtual bool get_selected(TreeIter* pIter) const = 0;
1126  virtual bool get_cursor(TreeIter* pIter) const = 0;
1127  virtual void set_cursor(const TreeIter& rIter) = 0;
1128  virtual bool get_iter_first(TreeIter& rIter) const = 0;
1129  virtual OUString get_id(const TreeIter& rIter) const = 0;
1130  virtual void scroll_to_item(const TreeIter& rIter) = 0;
1131 
1132  // call func on each selected element until func returns true or we run out of elements
1133  virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) = 0;
1134 
1135  //all of them. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1136  void select_all() { unselect(-1); }
1137  void unselect_all() { select(-1); }
1138 
1139  // return the number of toplevel nodes
1140  virtual int n_children() const = 0;
1141 
1142  void save_value() { m_sSavedValue = get_selected_text(); }
1143  OUString const& get_saved_value() const { return m_sSavedValue; }
1144  bool get_value_changed_from_saved() const { return m_sSavedValue != get_selected_text(); }
1145 };
1146 
1147 class VCL_DLLPUBLIC Button : virtual public Container
1148 {
1149 protected:
1151 
1152  void signal_clicked() { m_aClickHdl.Call(*this); }
1153 
1154 public:
1155  virtual void set_label(const OUString& rText) = 0;
1156  // pDevice, the image for the button, or nullptr to unset
1157  virtual void set_image(VirtualDevice* pDevice) = 0;
1158  virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
1159  virtual void set_from_icon_name(const OUString& rIconName) = 0;
1160  virtual OUString get_label() const = 0;
1161  virtual void set_label_line_wrap(bool wrap) = 0;
1162  void clicked() { signal_clicked(); }
1163 
1164  void connect_clicked(const Link<Button&, void>& rLink) { m_aClickHdl = rLink; }
1165 };
1166 
1167 class VCL_DLLPUBLIC ToggleButton : virtual public Button
1168 {
1169 protected:
1171  TriState m_eSavedValue = TRISTATE_FALSE;
1172 
1173  void signal_toggled() { m_aToggleHdl.Call(*this); }
1174 
1175 public:
1176  virtual void set_active(bool active) = 0;
1177  virtual bool get_active() const = 0;
1178 
1179  virtual void set_inconsistent(bool inconsistent) = 0;
1180  virtual bool get_inconsistent() const = 0;
1181 
1183  {
1184  if (get_inconsistent())
1185  return TRISTATE_INDET;
1186  else if (get_active())
1187  return TRISTATE_TRUE;
1188  return TRISTATE_FALSE;
1189  }
1190 
1191  void set_state(TriState eState)
1192  {
1193  switch (eState)
1194  {
1195  case TRISTATE_INDET:
1196  set_inconsistent(true);
1197  break;
1198  case TRISTATE_TRUE:
1199  set_inconsistent(false);
1200  set_active(true);
1201  break;
1202  case TRISTATE_FALSE:
1203  set_inconsistent(false);
1204  set_active(false);
1205  break;
1206  }
1207  }
1208 
1209  void save_state() { m_eSavedValue = get_state(); }
1210  TriState get_saved_state() const { return m_eSavedValue; }
1211  bool get_state_changed_from_saved() const { return m_eSavedValue != get_state(); }
1212 
1213  virtual void connect_toggled(const Link<ToggleButton&, void>& rLink) { m_aToggleHdl = rLink; }
1214 };
1215 
1217 {
1221  : eState(TRISTATE_INDET)
1222  , bTriStateEnabled(true)
1223  {
1224  }
1225  void ButtonToggled(ToggleButton& rToggle);
1226 };
1227 
1228 class VCL_DLLPUBLIC MenuButton : virtual public ToggleButton
1229 {
1230 protected:
1232 
1233  void signal_selected(const OString& rIdent) { m_aSelectHdl.Call(rIdent); }
1234 
1235 public:
1236  void connect_selected(const Link<const OString&, void>& rLink) { m_aSelectHdl = rLink; }
1237 
1238  virtual void insert_item(int pos, const OUString& rId, const OUString& rStr,
1239  const OUString* pIconName, VirtualDevice* pImageSurface,
1240  TriState eCheckRadioFalse)
1241  = 0;
1242  void append_item(const OUString& rId, const OUString& rStr)
1243  {
1244  insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_INDET);
1245  }
1246  void append_item_check(const OUString& rId, const OUString& rStr)
1247  {
1248  insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_TRUE);
1249  }
1250  void append_item_radio(const OUString& rId, const OUString& rStr)
1251  {
1252  insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_FALSE);
1253  }
1254  void append_item(const OUString& rId, const OUString& rStr, const OUString& rImage)
1255  {
1256  insert_item(-1, rId, rStr, &rImage, nullptr, TRISTATE_INDET);
1257  }
1258  void append_item(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
1259  {
1260  insert_item(-1, rId, rStr, nullptr, &rImage, TRISTATE_INDET);
1261  }
1262  virtual void insert_separator(int pos, const OUString& rId) = 0;
1263  void append_separator(const OUString& rId) { insert_separator(-1, rId); }
1264  virtual void remove_item(const OString& rId) = 0;
1265  virtual void clear() = 0;
1266  virtual void set_item_sensitive(const OString& rIdent, bool bSensitive) = 0;
1267  virtual void set_item_active(const OString& rIdent, bool bActive) = 0;
1268  virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0;
1269  virtual OUString get_item_label(const OString& rIdent) const = 0;
1270  virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) = 0;
1271  virtual void set_item_visible(const OString& rIdent, bool bVisible) = 0;
1272  virtual OString get_item_help_id(const OString& rIdent) const = 0;
1273 
1274  virtual void set_popover(weld::Widget* pPopover) = 0;
1275 };
1276 
1278 {
1279 };
1280 
1282 {
1283 };
1284 
1285 class VCL_DLLPUBLIC LinkButton : virtual public Container
1286 {
1287 protected:
1289 
1290  bool signal_activate_link() { return m_aActivateLinkHdl.Call(*this); }
1291 
1292 public:
1293  virtual void set_label(const OUString& rText) = 0;
1294  virtual OUString get_label() const = 0;
1295  virtual void set_uri(const OUString& rUri) = 0;
1296  virtual OUString get_uri() const = 0;
1297 
1298  void connect_activate_link(const Link<LinkButton&, bool>& rLink) { m_aActivateLinkHdl = rLink; }
1299 };
1300 
1301 class VCL_DLLPUBLIC Scale : virtual public Widget
1302 {
1303 protected:
1305 
1306  void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1307 
1308 public:
1309  virtual void set_value(int value) = 0;
1310  virtual int get_value() const = 0;
1311  virtual void set_range(int min, int max) = 0;
1312 
1313  virtual void set_increments(int step, int page) = 0;
1314  virtual void get_increments(int& step, int& page) const = 0;
1315 
1316  void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
1317 };
1318 
1319 class VCL_DLLPUBLIC Spinner : virtual public Widget
1320 {
1321 public:
1322  virtual void start() = 0;
1323  virtual void stop() = 0;
1324 };
1325 
1326 class VCL_DLLPUBLIC ProgressBar : virtual public Widget
1327 {
1328 public:
1329  //0-100
1330  virtual void set_percentage(int value) = 0;
1331  virtual OUString get_text() const = 0;
1332  virtual void set_text(const OUString& rText) = 0;
1333 };
1334 
1335 class VCL_DLLPUBLIC Entry : virtual public Widget
1336 {
1337 private:
1338  OUString m_sSavedValue;
1339 
1340 protected:
1345 
1346  void signal_changed() { m_aChangeHdl.Call(*this); }
1347  void signal_cursor_position() { m_aCursorPositionHdl.Call(*this); }
1348  void signal_insert_text(OUString& rString);
1349 
1350 public:
1351  virtual void set_text(const OUString& rText) = 0;
1352  virtual OUString get_text() const = 0;
1353  virtual void set_width_chars(int nChars) = 0;
1354  virtual int get_width_chars() const = 0;
1355  // The maximum length of the entry. Use 0 for no maximum
1356  virtual void set_max_length(int nChars) = 0;
1357  // nEndPos can be -1 in order to select all text
1358  virtual void select_region(int nStartPos, int nEndPos) = 0;
1359  // returns true if the selection has nonzero length
1360  virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
1361  virtual void replace_selection(const OUString& rText) = 0;
1362  // nCursorPos can be -1 to set to the end
1363  virtual void set_position(int nCursorPos) = 0;
1364  virtual int get_position() const = 0;
1365  virtual void set_editable(bool bEditable) = 0;
1366  virtual bool get_editable() const = 0;
1367  virtual void set_message_type(EntryMessageType eType) = 0;
1368  virtual void set_placeholder_text(const OUString& rText) = 0;
1369 
1370  // font size is in points, not pixels, e.g. see Window::[G]etPointFont
1371  virtual void set_font(const vcl::Font& rFont) = 0;
1372 
1373  void connect_changed(const Link<Entry&, void>& rLink) { m_aChangeHdl = rLink; }
1374  void connect_insert_text(const Link<OUString&, bool>& rLink) { m_aInsertTextHdl = rLink; }
1375  // callback returns true to indicated no further processing of activate wanted
1376  void connect_activate(const Link<Entry&, bool>& rLink) { m_aActivateHdl = rLink; }
1377  virtual void connect_cursor_position(const Link<Entry&, void>& rLink)
1378  {
1379  m_aCursorPositionHdl = rLink;
1380  }
1381 
1382  virtual void cut_clipboard() = 0;
1383  virtual void copy_clipboard() = 0;
1384  virtual void paste_clipboard() = 0;
1385 
1386  void save_value() { m_sSavedValue = get_text(); }
1387  OUString const& get_saved_value() const { return m_sSavedValue; }
1388  bool get_value_changed_from_saved() const { return m_sSavedValue != get_text(); }
1389 };
1390 
1391 class VCL_DLLPUBLIC SpinButton : virtual public Entry
1392 {
1393 protected:
1397 
1398  void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1399 
1401  {
1402  if (!m_aOutputHdl.IsSet())
1403  return false;
1404  m_aOutputHdl.Call(*this);
1405  return true;
1406  }
1407 
1408  TriState signal_input(int* result)
1409  {
1410  if (!m_aInputHdl.IsSet())
1411  return TRISTATE_INDET;
1412  return m_aInputHdl.Call(result) ? TRISTATE_TRUE : TRISTATE_FALSE;
1413  }
1414 
1415 public:
1416  virtual void set_value(int value) = 0;
1417  virtual int get_value() const = 0;
1418  virtual void set_range(int min, int max) = 0;
1419  virtual void get_range(int& min, int& max) const = 0;
1420  void set_min(int min)
1421  {
1422  int dummy, max;
1423  get_range(dummy, max);
1424  set_range(min, max);
1425  }
1426  void set_max(int max)
1427  {
1428  int min, dummy;
1429  get_range(min, dummy);
1430  set_range(min, max);
1431  }
1432  int get_min() const
1433  {
1434  int min, dummy;
1435  get_range(min, dummy);
1436  return min;
1437  }
1438  int get_max() const
1439  {
1440  int dummy, max;
1441  get_range(dummy, max);
1442  return max;
1443  }
1444  virtual void set_increments(int step, int page) = 0;
1445  virtual void get_increments(int& step, int& page) const = 0;
1446  virtual void set_digits(unsigned int digits) = 0;
1447  virtual unsigned int get_digits() const = 0;
1448 
1449  void connect_value_changed(const Link<SpinButton&, void>& rLink) { m_aValueChangedHdl = rLink; }
1450 
1451  void connect_output(const Link<SpinButton&, void>& rLink) { m_aOutputHdl = rLink; }
1452  void connect_input(const Link<int*, bool>& rLink) { m_aInputHdl = rLink; }
1453 
1454  int normalize(int nValue) const { return (nValue * Power10(get_digits())); }
1455 
1456  int denormalize(int nValue) const;
1457 
1458  static unsigned int Power10(unsigned int n);
1459 };
1460 
1462 {
1463 protected:
1465 
1466  void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1467 
1468 public:
1469  virtual void set_value(double value) = 0;
1470  virtual double get_value() const = 0;
1471  virtual void set_range(double min, double max) = 0;
1472  virtual void get_range(double& min, double& max) const = 0;
1473 
1474  void set_max(double max)
1475  {
1476  double min, dummy;
1477  get_range(min, dummy);
1478  set_range(min, max);
1479  }
1480 
1481  virtual void set_formatter(SvNumberFormatter* pFormatter) = 0;
1482  virtual SvNumberFormatter* get_formatter() = 0;
1483  virtual sal_Int32 get_format_key() const = 0;
1484  virtual void set_format_key(sal_Int32 nFormatKey) = 0;
1485 
1486  virtual void set_digits(unsigned int digits) = 0;
1487 
1488  virtual void treat_as_number(bool bSet) = 0;
1489 
1491  {
1492  m_aValueChangedHdl = rLink;
1493  }
1494 };
1495 
1496 class VCL_DLLPUBLIC Image : virtual public Widget
1497 {
1498 public:
1499  virtual void set_from_icon_name(const OUString& rIconName) = 0;
1500  virtual void set_image(VirtualDevice* pDevice) = 0;
1501  virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
1502 };
1503 
1504 class VCL_DLLPUBLIC Calendar : virtual public Widget
1505 {
1506 protected:
1509 
1510  void signal_selected() { m_aSelectedHdl.Call(*this); }
1511  void signal_activated() { m_aActivatedHdl.Call(*this); }
1512 
1513 public:
1514  void connect_selected(const Link<Calendar&, void>& rLink) { m_aSelectedHdl = rLink; }
1515  void connect_activated(const Link<Calendar&, void>& rLink) { m_aActivatedHdl = rLink; }
1516 
1517  virtual void set_date(const Date& rDate) = 0;
1518  virtual Date get_date() const = 0;
1519 };
1520 
1521 // an entry + treeview pair, where the entry autocompletes from the
1522 // treeview list, and selecting something in the list sets the
1523 // entry to that text, i.e. a visually exploded ComboBox
1524 class VCL_DLLPUBLIC EntryTreeView : virtual public ComboBox
1525 {
1526 private:
1527  DECL_DLLPRIVATE_LINK(ClickHdl, weld::TreeView&, void);
1528  DECL_DLLPRIVATE_LINK(ModifyHdl, weld::Entry&, void);
1529  void EntryModifyHdl(const weld::Entry& rEntry);
1530 
1531 protected:
1532  std::unique_ptr<Entry> m_xEntry;
1533  std::unique_ptr<TreeView> m_xTreeView;
1534 
1535 public:
1536  EntryTreeView(std::unique_ptr<Entry> xEntry, std::unique_ptr<TreeView> xTreeView);
1537 
1538  virtual void insert_vector(const std::vector<weld::ComboBoxEntry>& rItems,
1539  bool bKeepExisting) override
1540  {
1541  m_xTreeView->freeze();
1542  if (!bKeepExisting)
1543  m_xTreeView->clear();
1544  for (const auto& rItem : rItems)
1545  {
1546  m_xTreeView->insert(-1, rItem.sString, rItem.sId.isEmpty() ? nullptr : &rItem.sId,
1547  rItem.sImage.isEmpty() ? nullptr : &rItem.sImage, nullptr);
1548  }
1549  m_xTreeView->thaw();
1550  }
1551 
1552  virtual void insert(int pos, const OUString& rStr, const OUString* pId,
1553  const OUString* pIconName, VirtualDevice* pImageSurface) override
1554  {
1555  m_xTreeView->insert(pos, rStr, pId, pIconName, pImageSurface);
1556  }
1557 
1558  virtual int get_count() const override { return m_xTreeView->n_children(); }
1559  virtual void clear() override { m_xTreeView->clear(); }
1560 
1561  //by index
1562  virtual int get_active() const override { return m_xTreeView->get_selected_index(); }
1563  virtual void set_active(int pos) override
1564  {
1565  m_xTreeView->set_cursor(pos);
1566  m_xTreeView->select(pos);
1567  m_xEntry->set_text(m_xTreeView->get_selected_text());
1568  }
1569  virtual void remove(int pos) override { m_xTreeView->remove(pos); }
1570 
1571  //by text
1572  virtual OUString get_active_text() const override { return m_xEntry->get_text(); }
1573  virtual OUString get_text(int pos) const override { return m_xTreeView->get_text(pos); }
1574  virtual int find_text(const OUString& rStr) const override
1575  {
1576  return m_xTreeView->find_text(rStr);
1577  }
1578 
1579  //by id
1580  virtual OUString get_active_id() const override { return m_xTreeView->get_selected_id(); }
1581  virtual void set_active_id(const OUString& rStr) override
1582  {
1583  m_xTreeView->select_id(rStr);
1584  m_xEntry->set_text(m_xTreeView->get_selected_text());
1585  }
1586  virtual OUString get_id(int pos) const override { return m_xTreeView->get_id(pos); }
1587  virtual void set_id(int pos, const OUString& rId) override { m_xTreeView->set_id(pos, rId); }
1588  virtual int find_id(const OUString& rId) const override { return m_xTreeView->find_id(rId); }
1589 
1590  //entry related
1591  virtual bool has_entry() const override { return true; }
1592  virtual void set_entry_message_type(EntryMessageType eType) override
1593  {
1594  m_xEntry->set_message_type(eType);
1595  }
1596  virtual void set_entry_text(const OUString& rStr) override { m_xEntry->set_text(rStr); }
1597  virtual void set_entry_width_chars(int nChars) override { m_xEntry->set_width_chars(nChars); }
1598  virtual void set_entry_max_length(int nChars) override { m_xEntry->set_max_length(nChars); }
1599  virtual void select_entry_region(int nStartPos, int nEndPos) override
1600  {
1601  m_xEntry->select_region(nStartPos, nEndPos);
1602  }
1603  //if not text was selected, both rStartPos and rEndPos will be identical
1604  //and false will be returned
1605  virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) override
1606  {
1607  return m_xEntry->get_selection_bounds(rStartPos, rEndPos);
1608  }
1610  {
1611  m_xTreeView->connect_row_activated(rLink);
1612  }
1613 
1614  virtual bool get_popup_shown() const override { return false; }
1615 
1616  void set_height_request_by_rows(int nRows);
1617 };
1618 
1620 {
1622  std::unique_ptr<weld::SpinButton> m_xSpinButton;
1624 
1625  DECL_LINK(spin_button_value_changed, weld::SpinButton&, void);
1626  DECL_LINK(spin_button_output, weld::SpinButton&, void);
1627  DECL_LINK(spin_button_input, int* result, bool);
1628 
1629  void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1630 
1631  int ConvertValue(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const;
1632  OUString format_number(int nValue) const;
1633  void update_width_chars();
1634 
1635 public:
1636  MetricSpinButton(std::unique_ptr<SpinButton> pSpinButton, FieldUnit eSrcUnit)
1637  : m_eSrcUnit(eSrcUnit)
1638  , m_xSpinButton(std::move(pSpinButton))
1639  {
1640  update_width_chars();
1641  m_xSpinButton->connect_output(LINK(this, MetricSpinButton, spin_button_output));
1642  m_xSpinButton->connect_input(LINK(this, MetricSpinButton, spin_button_input));
1643  m_xSpinButton->connect_value_changed(
1644  LINK(this, MetricSpinButton, spin_button_value_changed));
1645  spin_button_output(*m_xSpinButton);
1646  }
1647 
1648  static OUString MetricToString(FieldUnit rUnit);
1649 
1650  FieldUnit get_unit() const { return m_eSrcUnit; }
1651 
1652  void set_unit(FieldUnit eUnit);
1653 
1654  int convert_value_to(int nValue, FieldUnit eValueUnit) const
1655  {
1656  return ConvertValue(nValue, m_eSrcUnit, eValueUnit);
1657  }
1658 
1659  int convert_value_from(int nValue, FieldUnit eValueUnit) const
1660  {
1661  return ConvertValue(nValue, eValueUnit, m_eSrcUnit);
1662  }
1663 
1664  void set_value(int nValue, FieldUnit eValueUnit)
1665  {
1666  m_xSpinButton->set_value(convert_value_from(nValue, eValueUnit));
1667  }
1668 
1669  int get_value(FieldUnit eDestUnit) const
1670  {
1671  return convert_value_to(m_xSpinButton->get_value(), eDestUnit);
1672  }
1673 
1674  // typically you only need to call this if set_text (e.g. with "") was
1675  // previously called to display some arbitrary text instead of the
1676  // formatted value and now you want to show it as formatted again
1677  void reformat() { spin_button_output(*m_xSpinButton); }
1678 
1679  void set_range(int min, int max, FieldUnit eValueUnit)
1680  {
1681  min = convert_value_from(min, eValueUnit);
1682  max = convert_value_from(max, eValueUnit);
1683  m_xSpinButton->set_range(min, max);
1684  update_width_chars();
1685  }
1686 
1687  void get_range(int& min, int& max, FieldUnit eDestUnit) const
1688  {
1689  m_xSpinButton->get_range(min, max);
1690  min = convert_value_to(min, eDestUnit);
1691  max = convert_value_to(max, eDestUnit);
1692  }
1693 
1694  void set_min(int min, FieldUnit eValueUnit)
1695  {
1696  int dummy, max;
1697  get_range(dummy, max, eValueUnit);
1698  set_range(min, max, eValueUnit);
1699  }
1700 
1701  void set_max(int max, FieldUnit eValueUnit)
1702  {
1703  int min, dummy;
1704  get_range(min, dummy, eValueUnit);
1705  set_range(min, max, eValueUnit);
1706  }
1707 
1708  int get_min(FieldUnit eValueUnit) const
1709  {
1710  int min, dummy;
1711  get_range(min, dummy, eValueUnit);
1712  return min;
1713  }
1714 
1715  int get_max(FieldUnit eValueUnit) const
1716  {
1717  int dummy, max;
1718  get_range(dummy, max, eValueUnit);
1719  return max;
1720  }
1721 
1722  void set_increments(int step, int page, FieldUnit eValueUnit)
1723  {
1724  step = convert_value_from(step, eValueUnit);
1725  page = convert_value_from(page, eValueUnit);
1726  m_xSpinButton->set_increments(step, page);
1727  }
1728 
1729  void get_increments(int& step, int& page, FieldUnit eDestUnit) const
1730  {
1731  m_xSpinButton->get_increments(step, page);
1732  step = convert_value_to(step, eDestUnit);
1733  page = convert_value_to(page, eDestUnit);
1734  }
1735 
1737  {
1738  m_aValueChangedHdl = rLink;
1739  }
1740 
1741  int normalize(int nValue) const { return m_xSpinButton->normalize(nValue); }
1742  int denormalize(int nValue) const { return m_xSpinButton->denormalize(nValue); }
1743  void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); }
1744  bool get_sensitive() const { return m_xSpinButton->get_sensitive(); }
1745  bool get_visible() const { return m_xSpinButton->get_visible(); }
1746  void grab_focus() { m_xSpinButton->grab_focus(); }
1747  bool has_focus() const { return m_xSpinButton->has_focus(); }
1748  void show() { m_xSpinButton->show(); }
1749  void set_visible(bool bShow) { m_xSpinButton->set_visible(bShow); }
1750  void hide() { m_xSpinButton->hide(); }
1751  void set_digits(unsigned int digits);
1752  void set_accessible_name(const OUString& rName) { m_xSpinButton->set_accessible_name(rName); }
1753  unsigned int get_digits() const { return m_xSpinButton->get_digits(); }
1754  void save_value() { m_xSpinButton->save_value(); }
1756  {
1757  return m_xSpinButton->get_value_changed_from_saved();
1758  }
1759  void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
1760  OUString get_text() const { return m_xSpinButton->get_text(); }
1761  void set_size_request(int nWidth, int nHeight)
1762  {
1763  m_xSpinButton->set_size_request(nWidth, nHeight);
1764  }
1765  Size get_size_request() const { return m_xSpinButton->get_size_request(); }
1766  Size get_preferred_size() const { return m_xSpinButton->get_preferred_size(); }
1768  {
1769  m_xSpinButton->connect_focus_in(rLink);
1770  }
1772  {
1773  m_xSpinButton->connect_focus_out(rLink);
1774  }
1775  void set_help_id(const OString& rName) { m_xSpinButton->set_help_id(rName); }
1776  void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); }
1777  // set the width of the underlying widget in characters, this setting is
1778  // invalidated when changing the units, range or digits, so to have effect
1779  // must come after changing those values
1780  void set_width_chars(int nChars) { m_xSpinButton->set_width_chars(nChars); }
1781  weld::SpinButton& get_widget() { return *m_xSpinButton; }
1782 };
1783 
1785 {
1787  std::unique_ptr<weld::SpinButton> m_xSpinButton;
1789 
1790  DECL_LINK(spin_button_value_changed, weld::SpinButton&, void);
1791  DECL_LINK(spin_button_output, weld::SpinButton&, void);
1792  DECL_LINK(spin_button_input, int* result, bool);
1793  DECL_LINK(spin_button_cursor_position, weld::Entry&, void);
1794 
1795  void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1796 
1797  static tools::Time ConvertValue(int nValue);
1798  static int ConvertValue(const tools::Time& rTime);
1799  OUString format_number(int nValue) const;
1800  void update_width_chars();
1801 
1802 public:
1803  TimeSpinButton(std::unique_ptr<SpinButton> pSpinButton, TimeFieldFormat eFormat)
1804  : m_eFormat(eFormat)
1805  , m_xSpinButton(std::move(pSpinButton))
1806  {
1807  update_width_chars();
1808  m_xSpinButton->connect_output(LINK(this, TimeSpinButton, spin_button_output));
1809  m_xSpinButton->connect_input(LINK(this, TimeSpinButton, spin_button_input));
1810  m_xSpinButton->connect_value_changed(LINK(this, TimeSpinButton, spin_button_value_changed));
1811  m_xSpinButton->connect_cursor_position(
1812  LINK(this, TimeSpinButton, spin_button_cursor_position));
1813  spin_button_output(*m_xSpinButton);
1814  }
1815 
1816  void set_value(const tools::Time& rTime) { m_xSpinButton->set_value(ConvertValue(rTime)); }
1817 
1818  tools::Time get_value() const { return ConvertValue(m_xSpinButton->get_value()); }
1819 
1821  {
1822  m_aValueChangedHdl = rLink;
1823  }
1824 
1825  void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); }
1826  bool get_sensitive() const { return m_xSpinButton->get_sensitive(); }
1827  void set_visible(bool bShow) { m_xSpinButton->set_visible(bShow); }
1828  bool get_visible() const { return m_xSpinButton->get_visible(); }
1829  void grab_focus() { m_xSpinButton->grab_focus(); }
1830  bool has_focus() const { return m_xSpinButton->has_focus(); }
1831  void show() { m_xSpinButton->show(); }
1832  void hide() { m_xSpinButton->hide(); }
1833  void save_value() { m_xSpinButton->save_value(); }
1835  {
1836  return m_xSpinButton->get_value_changed_from_saved();
1837  }
1838  void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); }
1839  void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
1840  OUString get_text() const { return m_xSpinButton->get_text(); }
1842  {
1843  m_xSpinButton->connect_focus_in(rLink);
1844  }
1846  {
1847  m_xSpinButton->connect_focus_out(rLink);
1848  }
1849  weld::SpinButton& get_widget() { return *m_xSpinButton; }
1850 };
1851 
1852 class VCL_DLLPUBLIC Label : virtual public Widget
1853 {
1854 public:
1855  virtual void set_label(const OUString& rText) = 0;
1856  virtual OUString get_label() const = 0;
1857  virtual void set_mnemonic_widget(Widget* pTarget) = 0;
1858  virtual void set_message_type(EntryMessageType eType) = 0;
1859  // font size is in points, not pixels, e.g. see Window::[G]etPointFont
1860  virtual void set_font(const vcl::Font& rFont) = 0;
1861 };
1862 
1863 class VCL_DLLPUBLIC TextView : virtual public Container
1864 {
1865 private:
1866  OUString m_sSavedValue;
1867 
1868 protected:
1872 
1873  void signal_changed() { m_aChangeHdl.Call(*this); }
1874  void signal_cursor_position() { m_aCursorPositionHdl.Call(*this); }
1875  void signal_vadjustment_changed() { m_aVChangeHdl.Call(*this); }
1876 
1877 public:
1878  virtual void set_text(const OUString& rText) = 0;
1879  virtual OUString get_text() const = 0;
1880  virtual void select_region(int nStartPos, int nEndPos) = 0;
1881  virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
1882  virtual void replace_selection(const OUString& rText) = 0;
1883  virtual void set_editable(bool bEditable) = 0;
1884  virtual void set_monospace(bool bMonospace) = 0;
1885  int get_height_rows(int nRows) const
1886  {
1887  //can improve this if needed
1888  return get_text_height() * nRows;
1889  }
1890 
1891  void save_value() { m_sSavedValue = get_text(); }
1892  bool get_value_changed_from_saved() const { return m_sSavedValue != get_text(); }
1893 
1894  void connect_changed(const Link<TextView&, void>& rLink) { m_aChangeHdl = rLink; }
1896  {
1897  m_aCursorPositionHdl = rLink;
1898  }
1899 
1900  virtual int vadjustment_get_value() const = 0;
1901  virtual int vadjustment_get_upper() const = 0;
1902  virtual int vadjustment_get_lower() const = 0;
1903  virtual int vadjustment_get_page_size() const = 0;
1904  virtual void vadjustment_set_value(int value) = 0;
1905  void connect_vadjustment_changed(const Link<TextView&, void>& rLink) { m_aVChangeHdl = rLink; }
1906 };
1907 
1908 class VCL_DLLPUBLIC Expander : virtual public Container
1909 {
1910 protected:
1912 
1913  void signal_expanded() { m_aExpandedHdl.Call(*this); }
1914 
1915 public:
1916  virtual bool get_expanded() const = 0;
1917  virtual void set_expanded(bool bExpand) = 0;
1918 
1919  void connect_expanded(const Link<Expander&, void>& rLink) { m_aExpandedHdl = rLink; }
1920 };
1921 
1922 class VCL_DLLPUBLIC DrawingArea : virtual public Widget
1923 {
1924 public:
1925  typedef std::pair<vcl::RenderContext&, const tools::Rectangle&> draw_args;
1926 
1927 protected:
1933  // if handler returns true, drag is disallowed
1935 
1937  {
1938  return m_aQueryTooltipHdl.Call(rHelpArea);
1939  }
1940 
1941 public:
1942  void connect_draw(const Link<draw_args, void>& rLink) { m_aDrawHdl = rLink; }
1943  void connect_style_updated(const Link<Widget&, void>& rLink) { m_aStyleUpdatedHdl = rLink; }
1944  void connect_command(const Link<const CommandEvent&, bool>& rLink) { m_aCommandHdl = rLink; }
1946  {
1947  m_aGetFocusRectHdl = rLink;
1948  }
1950  {
1951  m_aQueryTooltipHdl = rLink;
1952  }
1953  void connect_drag_begin(const Link<DrawingArea&, bool>& rLink) { m_aDragBeginHdl = rLink; }
1954  virtual void queue_draw() = 0;
1955  virtual void queue_draw_area(int x, int y, int width, int height) = 0;
1956  virtual void queue_resize() = 0;
1957 
1958  virtual void enable_drag_source(rtl::Reference<TransferDataContainer>& rTransferrable,
1959  sal_uInt8 eDNDConstants)
1960  = 0;
1961 
1962  virtual void set_cursor(PointerStyle ePointerStyle) = 0;
1963 
1964  // use return here just to generate matching VirtualDevices
1965  virtual OutputDevice& get_ref_device() = 0;
1966 
1967  virtual a11yref get_accessible_parent() = 0;
1968  virtual a11yrelationset get_accessible_relation_set() = 0;
1969  virtual Point get_accessible_location() = 0;
1970 };
1971 
1973 {
1974 protected:
1976 
1977  void signal_activate(const OString& rIdent) { m_aActivateHdl.Call(rIdent); }
1978 
1979 public:
1980  virtual OString popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect) = 0;
1981 
1982  void connect_activate(const Link<const OString&, void>& rLink) { m_aActivateHdl = rLink; }
1983 
1984  virtual void set_sensitive(const OString& rIdent, bool bSensitive) = 0;
1985  virtual void set_label(const OString& rIdent, const OUString& rLabel) = 0;
1986  virtual OUString get_label(const OString& rIdent) const = 0;
1987  virtual void set_active(const OString& rIdent, bool bActive) = 0;
1988  virtual bool get_active(const OString& rIdent) const = 0;
1989  virtual void set_visible(const OString& rIdent, bool bVisible) = 0;
1990 
1991  virtual void insert(int pos, const OUString& rId, const OUString& rStr,
1992  const OUString* pIconName, VirtualDevice* pImageSurface,
1993  TriState eCheckRadioFalse)
1994  = 0;
1995 
1996  virtual void remove(const OString& rId) = 0;
1997 
1998  virtual void clear() = 0;
1999 
2000  virtual void insert_separator(int pos, const OUString& rId) = 0;
2001  void append_separator(const OUString& rId) { insert_separator(-1, rId); }
2002 
2003  void append(const OUString& rId, const OUString& rStr)
2004  {
2005  insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_INDET);
2006  }
2007  void append_check(const OUString& rId, const OUString& rStr)
2008  {
2009  insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_TRUE);
2010  }
2011  void append_radio(const OUString& rId, const OUString& rStr)
2012  {
2013  insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_FALSE);
2014  }
2015  void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
2016  {
2017  insert(-1, rId, rStr, &rImage, nullptr, TRISTATE_FALSE);
2018  }
2019  void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
2020  {
2021  insert(-1, rId, rStr, nullptr, &rImage, TRISTATE_FALSE);
2022  }
2023 
2024  // return the number of toplevel nodes
2025  virtual int n_children() const = 0;
2026 
2027  virtual ~Menu() {}
2028 };
2029 
2030 class VCL_DLLPUBLIC Toolbar : virtual public Widget
2031 {
2032 protected:
2035 
2036  void signal_clicked(const OString& rIdent) { m_aClickHdl.Call(rIdent); }
2037  void signal_toggle_menu(const OString& rIdent) { m_aToggleMenuHdl.Call(rIdent); }
2038 
2039 public:
2040  virtual void set_item_sensitive(const OString& rIdent, bool bSensitive) = 0;
2041  virtual bool get_item_sensitive(const OString& rIdent) const = 0;
2042  virtual void set_item_active(const OString& rIdent, bool bActive) = 0;
2043  virtual bool get_item_active(const OString& rIdent) const = 0;
2044  virtual void set_menu_item_active(const OString& rIdent, bool bActive) = 0;
2045  virtual bool get_menu_item_active(const OString& rIdent) const = 0;
2046  virtual void set_item_menu(const OString& rIdent, weld::Menu* pMenu) = 0;
2047  virtual void set_item_popover(const OString& rIdent, weld::Widget* pPopover) = 0;
2048  virtual void set_item_visible(const OString& rIdent, bool bVisible) = 0;
2049  virtual void set_item_help_id(const OString& rIdent, const OString& rHelpId) = 0;
2050  virtual bool get_item_visible(const OString& rIdent) const = 0;
2051  virtual void set_item_label(const OString& rIdent, const OUString& rLabel) = 0;
2052  virtual OUString get_item_label(const OString& rIdent) const = 0;
2053  virtual void set_item_tooltip_text(const OString& rIdent, const OUString& rTip) = 0;
2054  virtual OUString get_item_tooltip_text(const OString& rIdent) const = 0;
2055  virtual void set_item_icon_name(const OString& rIdent, const OUString& rIconName) = 0;
2056  virtual void set_item_image(const OString& rIdent,
2057  const css::uno::Reference<css::graphic::XGraphic>& rIcon)
2058  = 0;
2059  virtual void set_item_image(const OString& rIdent, VirtualDevice* pDevice) = 0;
2060 
2061  virtual void insert_separator(int pos, const OUString& rId) = 0;
2062  void append_separator(const OUString& rId) { insert_separator(-1, rId); }
2063 
2064  virtual int get_n_items() const = 0;
2065  virtual OString get_item_ident(int nIndex) const = 0;
2066  virtual void set_item_ident(int nIndex, const OString& rIdent) = 0;
2067  virtual void set_item_label(int nIndex, const OUString& rLabel) = 0;
2068  virtual void set_item_image(int nIndex,
2069  const css::uno::Reference<css::graphic::XGraphic>& rIcon)
2070  = 0;
2071  virtual void set_item_tooltip_text(int nIndex, const OUString& rTip) = 0;
2072 
2073  virtual vcl::ImageType get_icon_size() const = 0;
2074  virtual void set_icon_size(vcl::ImageType eType) = 0;
2075 
2076  // return what modifiers are held
2077  virtual sal_uInt16 get_modifier_state() const = 0;
2078 
2079  void connect_clicked(const Link<const OString&, void>& rLink) { m_aClickHdl = rLink; }
2080  void connect_menu_toggled(const Link<const OString&, void>& rLink) { m_aToggleMenuHdl = rLink; }
2081 };
2082 
2084 {
2085 public:
2086  virtual void add_widget(weld::Widget* pWidget) = 0;
2087  // the default mode is VclSizeGroupMode::Horizontal
2088  virtual void set_mode(VclSizeGroupMode eMode) = 0;
2089  virtual ~SizeGroup() {}
2090 };
2091 
2093 {
2094 public:
2095  virtual std::unique_ptr<MessageDialog> weld_message_dialog(const OString& id,
2096  bool bTakeOwnership = true)
2097  = 0;
2098  virtual std::unique_ptr<Dialog> weld_dialog(const OString& id, bool bTakeOwnership = true) = 0;
2099  virtual std::unique_ptr<AboutDialog> weld_about_dialog(const OString& id,
2100  bool bTakeOwnership = true)
2101  = 0;
2102  virtual std::unique_ptr<Assistant> weld_assistant(const OString& id, bool bTakeOwnership = true)
2103  = 0;
2104  virtual std::unique_ptr<Window> weld_window(const OString& id, bool bTakeOwnership = true) = 0;
2105  virtual std::unique_ptr<Widget> weld_widget(const OString& id, bool bTakeOwnership = false) = 0;
2106  virtual std::unique_ptr<Container> weld_container(const OString& id,
2107  bool bTakeOwnership = false)
2108  = 0;
2109  virtual std::unique_ptr<Box> weld_box(const OString& id, bool bTakeOwnership = false) = 0;
2110  virtual std::unique_ptr<Button> weld_button(const OString& id, bool bTakeOwnership = false) = 0;
2111  virtual std::unique_ptr<MenuButton> weld_menu_button(const OString& id,
2112  bool bTakeOwnership = false)
2113  = 0;
2114  virtual std::unique_ptr<Frame> weld_frame(const OString& id, bool bTakeOwnership = false) = 0;
2115  virtual std::unique_ptr<ScrolledWindow> weld_scrolled_window(const OString& id,
2116  bool bTakeOwnership = false)
2117  = 0;
2118  virtual std::unique_ptr<Notebook> weld_notebook(const OString& id, bool bTakeOwnership = false)
2119  = 0;
2120  virtual std::unique_ptr<ToggleButton> weld_toggle_button(const OString& id,
2121  bool bTakeOwnership = false)
2122  = 0;
2123  virtual std::unique_ptr<RadioButton> weld_radio_button(const OString& id,
2124  bool bTakeOwnership = false)
2125  = 0;
2126  virtual std::unique_ptr<CheckButton> weld_check_button(const OString& id,
2127  bool bTakeOwnership = false)
2128  = 0;
2129  virtual std::unique_ptr<LinkButton> weld_link_button(const OString& id,
2130  bool bTakeOwnership = false)
2131  = 0;
2132  virtual std::unique_ptr<SpinButton> weld_spin_button(const OString& id,
2133  bool bTakeOwnership = false)
2134  = 0;
2135  virtual std::unique_ptr<MetricSpinButton>
2136  weld_metric_spin_button(const OString& id, FieldUnit eUnit, bool bTakeOwnership = false) = 0;
2137  virtual std::unique_ptr<FormattedSpinButton>
2138  weld_formatted_spin_button(const OString& id, bool bTakeOwnership = false) = 0;
2139  virtual std::unique_ptr<TimeSpinButton>
2140  weld_time_spin_button(const OString& id, TimeFieldFormat eFormat, bool bTakeOwnership = false)
2141  = 0;
2142  virtual std::unique_ptr<ComboBox> weld_combo_box(const OString& id, bool bTakeOwnership = false)
2143  = 0;
2144  virtual std::unique_ptr<TreeView> weld_tree_view(const OString& id, bool bTakeOwnership = false)
2145  = 0;
2146  virtual std::unique_ptr<IconView> weld_icon_view(const OString& id, bool bTakeOwnership = false)
2147  = 0;
2148  virtual std::unique_ptr<Label> weld_label(const OString& id, bool bTakeOwnership = false) = 0;
2149  virtual std::unique_ptr<TextView> weld_text_view(const OString& id, bool bTakeOwnership = false)
2150  = 0;
2151  virtual std::unique_ptr<Expander> weld_expander(const OString& id, bool bTakeOwnership = false)
2152  = 0;
2153  virtual std::unique_ptr<Entry> weld_entry(const OString& id, bool bTakeOwnership = false) = 0;
2154  virtual std::unique_ptr<Scale> weld_scale(const OString& id, bool bTakeOwnership = false) = 0;
2155  virtual std::unique_ptr<ProgressBar> weld_progress_bar(const OString& id,
2156  bool bTakeOwnership = false)
2157  = 0;
2158  virtual std::unique_ptr<Spinner> weld_spinner(const OString& id, bool bTakeOwnership = false)
2159  = 0;
2160  virtual std::unique_ptr<Image> weld_image(const OString& id, bool bTakeOwnership = false) = 0;
2161  virtual std::unique_ptr<Calendar> weld_calendar(const OString& id, bool bTakeOwnership = false)
2162  = 0;
2163  virtual std::unique_ptr<DrawingArea>
2164  weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
2165  FactoryFunction pUITestFactoryFunction = nullptr, void* pUserData = nullptr,
2166  bool bTakeOwnership = false)
2167  = 0;
2168  virtual std::unique_ptr<EntryTreeView>
2169  weld_entry_tree_view(const OString& containerid, const OString& entryid,
2170  const OString& treeviewid, bool bTakeOwnership = false)
2171  = 0;
2172  virtual std::unique_ptr<Menu> weld_menu(const OString& id, bool bTakeOwnership = true) = 0;
2173  virtual std::unique_ptr<Toolbar> weld_toolbar(const OString& id, bool bTakeOwnership = false)
2174  = 0;
2175  virtual std::unique_ptr<SizeGroup> create_size_group() = 0;
2176  /* return a Dialog suitable to take a screenshot of containing the contents of the .ui file.
2177 
2178  If the toplevel element is a dialog, that will be returned
2179  If the toplevel is not a dialog, a dialog will be created and the contents of the .ui
2180  inserted into it
2181  */
2182  virtual std::unique_ptr<Window> create_screenshot_window() = 0;
2183  virtual ~Builder() {}
2184 };
2185 
2186 class VCL_DLLPUBLIC DialogController : public std::enable_shared_from_this<DialogController>
2187 {
2188 public:
2189  virtual Dialog* getDialog() = 0;
2190  const Dialog* getConstDialog() const
2191  {
2192  return const_cast<DialogController*>(this)->getDialog();
2193  }
2194  virtual short run() { return getDialog()->run(); }
2195  static bool runAsync(const std::shared_ptr<DialogController>& rController,
2196  const std::function<void(sal_Int32)>&);
2197  void set_title(const OUString& rTitle) { getDialog()->set_title(rTitle); }
2198  OUString get_title() const { return getConstDialog()->get_title(); }
2199  void set_help_id(const OString& rHelpId) { getDialog()->set_help_id(rHelpId); }
2200  OString get_help_id() const { return getConstDialog()->get_help_id(); }
2201  void response(int nResponse) { getDialog()->response(nResponse); }
2202  virtual ~DialogController() COVERITY_NOEXCEPT_FALSE;
2203 };
2204 
2206 {
2207 protected:
2208  std::unique_ptr<weld::Builder> m_xBuilder;
2209  std::shared_ptr<weld::Dialog> m_xDialog;
2210 
2211 public:
2212  GenericDialogController(weld::Widget* pParent, const OUString& rUIFile,
2213  const OString& rDialogId);
2214  virtual Dialog* getDialog() override;
2215  virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override;
2216 };
2217 
2218 class VCL_DLLPUBLIC MessageDialogController : public DialogController
2219 {
2220 protected:
2221  std::unique_ptr<weld::Builder> m_xBuilder;
2222  std::unique_ptr<weld::MessageDialog> m_xDialog;
2223  std::unique_ptr<weld::Container> m_xContentArea;
2224  std::unique_ptr<weld::Widget> m_xRelocate;
2225  std::unique_ptr<weld::Container> m_xOrigParent;
2226 
2227 public:
2228  /* @param rRelocateId - optional argument of the name of a widget in the .ui file
2229  which should be relocated into the content area of the dialog.
2230 
2231  e.g. a checkbox for a "Never show this again" option.
2232 
2233  This results in the named widget relocating to the same container
2234  as the messages. This enables aligning the extra widget with the
2235  message labels in the content area container which doesn't
2236  explicitly exist in the ui description, but is only implied.
2237  */
2238  MessageDialogController(weld::Widget* pParent, const OUString& rUIFile,
2239  const OString& rDialogId, const OString& rRelocateId = OString());
2240  virtual Dialog* getDialog() override;
2241  virtual ~MessageDialogController() override;
2242  void set_primary_text(const OUString& rText) { m_xDialog->set_primary_text(rText); }
2243  OUString get_primary_text() const { return m_xDialog->get_primary_text(); }
2244  void set_default_response(int nResponse) { m_xDialog->set_default_response(nResponse); }
2245 };
2246 
2247 class VCL_DLLPUBLIC AssistantController : public DialogController
2248 {
2249 protected:
2250  std::unique_ptr<weld::Builder> m_xBuilder;
2251  std::unique_ptr<weld::Assistant> m_xAssistant;
2252 
2253 public:
2254  AssistantController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId);
2255  virtual Dialog* getDialog() override;
2256  virtual ~AssistantController() override;
2257 };
2258 }
2259 #endif
2260 
2261 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void append_item_check(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1246
void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:1841
OUString const & get_saved_value() const
Definition: weld.hxx:1143
void connect_value_changed(const Link< TimeSpinButton &, void > &rLink)
Definition: weld.hxx:1820
Link< const Size &, void > m_aSizeAllocateHdl
Definition: weld.hxx:89
std::shared_ptr< weld::Dialog > m_xDialog
Definition: weld.hxx:2209
void remove_text(const OUString &rText)
Definition: weld.hxx:869
void append(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:2019
void connect_activate_link(const Link< LinkButton &, bool > &rLink)
Definition: weld.hxx:1298
void set_size_request(int nWidth, int nHeight)
Definition: weld.hxx:1761
void connect_row_activated(const Link< TreeView &, bool > &rLink)
Definition: weld.hxx:1609
int get_min() const
Definition: weld.hxx:1432
FieldUnit
rEdit set_text(aStr)
virtual void set_sort_func(const std::function< int(const weld::TreeIter &, const weld::TreeIter &)> &func)
Definition: weld.hxx:1035
Link< const OString &, void > m_aClickHdl
Definition: weld.hxx:2033
Link< ComboBox &, bool > m_aEntryActivateHdl
Definition: weld.hxx:597
OUString get_primary_text() const
Definition: weld.hxx:2243
virtual OUString get_text(int pos) const override
Definition: weld.hxx:1573
virtual void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:185
void set_title(const OUString &rTitle)
Definition: weld.hxx:2197
OUString const & get_saved_value() const
Definition: weld.hxx:691
std::vector< OUString > get_selected_rows_text() const
Definition: weld.hxx:870
Link< Button &, void > m_aClickHdl
Definition: weld.hxx:1150
int convert_value_to(int nValue, FieldUnit eValueUnit) const
Definition: weld.hxx:1654
const OString & GetHelpId() const
Definition: weld.hxx:397
void connect_column_clicked(const Link< int, void > &rLink)
Definition: weld.hxx:832
Link< Widget &, void > m_aFocusOutHdl
Definition: weld.hxx:87
TimeFieldFormat
Definition: vclenum.hxx:28
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2208
void connect_entry_activate(const Link< ComboBox &, bool > &rLink)
Definition: weld.hxx:688
css::uno::Reference< css::accessibility::XAccessibleRelationSet > a11yrelationset
Definition: weld.hxx:62
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:797
OUString sId
Definition: weld.hxx:562
void insert_text(int pos, const OUString &rStr)
Definition: weld.hxx:609
void connect_style_updated(const Link< Widget &, void > &rLink)
Definition: weld.hxx:1943
void remove_id(const OUString &rText)
Definition: weld.hxx:885
void unselect_all()
Definition: weld.hxx:1016
void append_page(const OString &rIdent, const OUString &rLabel)
Definition: weld.hxx:372
void signal_cursor_position()
Definition: weld.hxx:1874
void append_separator(const OUString &rId)
Definition: weld.hxx:627
tools::Time get_value() const
Definition: weld.hxx:1818
bool has_focus() const
Definition: weld.hxx:1830
Link< const CommandEvent &, bool > m_aPopupMenuHdl
Definition: weld.hxx:726
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
bool get_visible() const
Definition: weld.hxx:1745
void insert_text(int pos, const OUString &rStr)
Definition: weld.hxx:785
std::vector< ScreenShotEntry > ScreenShotCollection
Definition: weld.hxx:404
css::uno::Reference< css::accessibility::XAccessible > a11yref
Definition: weld.hxx:61
OUString m_sSavedValue
Definition: weld.hxx:1866
bool get_value_changed_from_saved() const
Definition: weld.hxx:692
bool get_state_changed_from_saved() const
Definition: weld.hxx:1211
OUString m_sSavedValue
Definition: weld.hxx:710
Link< Calendar &, void > m_aSelectedHdl
Definition: weld.hxx:1507
virtual OUString get_id(int pos) const override
Definition: weld.hxx:1586
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:793
virtual OUString get_active_text() const override
Definition: weld.hxx:1572
Link< Widget &, void > m_aStyleUpdatedHdl
Definition: weld.hxx:1929
void set_text(const OUString &rText)
Definition: weld.hxx:1839
std::function< std::unique_ptr< UIObject >vcl::Window *)> FactoryFunction
virtual void connect_popup_toggled(const Link< ComboBox &, void > &rLink)
Definition: weld.hxx:664
void connect_help(const Link< Widget &, bool > &rLink)
Definition: weld.hxx:443
#define max(a, b)
virtual ~Builder()
Definition: weld.hxx:2183
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2221
void select_all()
Definition: weld.hxx:1136
std::unique_ptr< weld::Widget > m_xRelocate
Definition: weld.hxx:2224
virtual void set_active_id(const OUString &rStr) override
Definition: weld.hxx:1581
OUString get_text() const
Definition: weld.hxx:1760
SelectionMode
Definition: vclenum.hxx:26
virtual void clear() override
Definition: weld.hxx:1559
void connect_model_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:833
void connect_focus_rect(const Link< Widget &, tools::Rectangle > &rLink)
Definition: weld.hxx:1945
virtual void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface) override
Definition: weld.hxx:1552
Link< SpinButton &, void > m_aOutputHdl
Definition: weld.hxx:1395
Link< TimeSpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1788
virtual void connect_visible_range_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:997
int normalize(int nValue) const
Definition: weld.hxx:1454
void signal_vadjustment_changed()
Definition: weld.hxx:301
void connect_insert_text(const Link< OUString &, bool > &rLink)
Definition: weld.hxx:1374
virtual void signal_popup_toggled()
Definition: weld.hxx:601
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:614
Link< OUString &, bool > m_aInsertTextHdl
Definition: weld.hxx:1342
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2003
ComboBoxEntry(const OUString &rString, const OUString &rId, const OUString &rImage)
Definition: weld.hxx:573
std::pair< vcl::RenderContext &, const tools::Rectangle & > draw_args
Definition: weld.hxx:1925
void set_max(int max, FieldUnit eValueUnit)
Definition: weld.hxx:1701
weld::SpinButton & get_widget()
Definition: weld.hxx:1781
void signal_changed()
Definition: weld.hxx:1873
Link< const TreeIter &, bool > m_aCollapsingHdl
Definition: weld.hxx:722
Link< TextView &, void > m_aChangeHdl
Definition: weld.hxx:1869
void set_width_chars(int nChars)
Definition: weld.hxx:1780
virtual void connect_query_tooltip(const Link< const TreeIter &, OUString > &rLink)
Definition: weld.hxx:762
Link< const std::pair< int, int > &, void > m_aRadioToggleHdl
Definition: weld.hxx:716
TRISTATE_TRUE
void get_range(int &min, int &max, FieldUnit eDestUnit) const
Definition: weld.hxx:1687
void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:1771
Link< TextView &, void > m_aCursorPositionHdl
Definition: weld.hxx:1871
bool get_visible() const
Definition: weld.hxx:1828
virtual void connect_toggled(const Link< ToggleButton &, void > &rLink)
Definition: weld.hxx:1213
void connect_changed(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1373
void insert(int nRow, TreeIter *pRet=nullptr)
Definition: weld.hxx:773
MetricSpinButton(std::unique_ptr< SpinButton > pSpinButton, FieldUnit eSrcUnit)
Definition: weld.hxx:1636
Link< const CommandEvent &, bool > m_aCommandHdl
Definition: weld.hxx:1930
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2250
int normalize(int nValue) const
Definition: weld.hxx:1741
std::unique_ptr< weld::Container > m_xOrigParent
Definition: weld.hxx:2225
Link< IconView &, bool > m_aItemActivatedHdl
Definition: weld.hxx:1083
def position
void connect_selected(const Link< const OString &, void > &rLink)
Definition: weld.hxx:1236
Link< const OString &, void > m_aSelectHdl
Definition: weld.hxx:1231
void connect_value_changed(const Link< MetricSpinButton &, void > &rLink)
Definition: weld.hxx:1736
void connect_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:815
bool signal_jump_page(const OString &rIdent)
Definition: weld.hxx:538
void append_item(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1242
void set_sensitive(bool sensitive)
Definition: weld.hxx:1825
int get_max(FieldUnit eValueUnit) const
Definition: weld.hxx:1715
#define min(a, b)
Link< IconView &, void > m_aSelectionChangeHdl
Definition: weld.hxx:1082
void append_text(const OUString &rStr)
Definition: weld.hxx:789
EntryMessageType
Definition: weld.hxx:581
void get_increments(int &step, int &page, FieldUnit eDestUnit) const
Definition: weld.hxx:1729
void signal_clicked(const OString &rIdent)
Definition: weld.hxx:2036
void signal_vadjustment_changed()
Definition: weld.hxx:1875
size_t pos
Link< const MouseEvent &, bool > m_aMousePressHdl
Definition: weld.hxx:92
ComboBoxEntry(const OUString &rString)
Definition: weld.hxx:564
Link< OUString &, bool > m_aEntryInsertTextHdl
Definition: weld.hxx:598
std::unique_ptr< weld::SpinButton > m_xSpinButton
Definition: weld.hxx:1622
virtual void connect_mouse_release(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:230
Link< TreeView &, void > m_aVisibleRangeChangedHdl
Definition: weld.hxx:723
VclSizeGroupMode
Definition: vclenum.hxx:264
OUString sImage
Definition: weld.hxx:563
void set_accessible_name(const OUString &rName)
Definition: weld.hxx:1752
void connect_selection_changed(const Link< IconView &, void > &rLink)
Definition: weld.hxx:1098
WindowStateMask
Definition: vclenum.hxx:123
void connect_entry_insert_text(const Link< OUString &, bool > &rLink)
Definition: weld.hxx:682
OUString sString
Definition: weld.hxx:561
Mode eMode
void signal_selected(const OString &rIdent)
Definition: weld.hxx:1233
void set_toggle_columns_as_radio(const std::vector< int > &rCols)
Definition: weld.hxx:1058
OUString signal_query_tooltip(const TreeIter &rIter)
Definition: weld.hxx:759
std::unique_ptr< TreeView > m_xTreeView
Definition: weld.hxx:1533
void save_value()
Definition: weld.hxx:1063
virtual ~Widget()
Definition: weld.hxx:273
def run
VclPolicyType
Definition: vclenum.hxx:272
Link< const MouseEvent &, bool > m_aMouseMotionHdl
Definition: weld.hxx:93
virtual void connect_mouse_move(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:224
Link< TextView &, void > m_aVChangeHdl
Definition: weld.hxx:1870
TimeSpinButton(std::unique_ptr< SpinButton > pSpinButton, TimeFieldFormat eFormat)
Definition: weld.hxx:1803
virtual void set_active(int pos) override
Definition: weld.hxx:1563
bool signal_collapsing(const TreeIter &rIter)
Definition: weld.hxx:741
TRISTATE_INDET
void set_position(int nCursorPos)
Definition: weld.hxx:1776
void signal_clicked()
Definition: weld.hxx:1152
void save_value()
Definition: weld.hxx:1891
basegfx::B2IRange maB2IRange
Definition: weld.hxx:401
void save_value()
Definition: weld.hxx:690
void connect_row_activated(const Link< TreeView &, bool > &rLink)
Definition: weld.hxx:823
Link< const TreeIter &, bool > m_aEditingStartedHdl
Definition: weld.hxx:717
void connect_enter_page(const Link< const OString &, void > &rLink)
Definition: weld.hxx:383
void connect_drag_begin(const Link< DrawingArea &, bool > &rLink)
Definition: weld.hxx:1953
void set_text(const OUString &rText)
Definition: weld.hxx:1759
DocumentType eType
Link< draw_args, void > m_aDrawHdl
Definition: weld.hxx:1928
void signal_toggled()
Definition: weld.hxx:1173
void connect_vadjustment_changed(const Link< TextView &, void > &rLink)
Definition: weld.hxx:1905
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
void append(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:622
void set_range(int min, int max, FieldUnit eValueUnit)
Definition: weld.hxx:1679
Size get_preferred_size() const
Definition: weld.hxx:1766
void connect_clicked(const Link< Button &, void > &rLink)
Definition: weld.hxx:1164
void set_active_text(const OUString &rStr)
Definition: weld.hxx:640
Link< MetricSpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1623
std::unique_ptr< weld::SpinButton > m_xSpinButton
Definition: weld.hxx:1787
void signal_expanded()
Definition: weld.hxx:1913
Link< const std::pair< const TreeIter &, OUString > &, bool > m_aEditingDoneHdl
Definition: weld.hxx:718
Link< TreeView &, void > m_aChangeHdl
Definition: weld.hxx:713
virtual int find_id(const OUString &rId) const override
Definition: weld.hxx:1588
virtual void insert_vector(const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting) override
Definition: weld.hxx:1538
Link< SpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1394
void set_min(int min)
Definition: weld.hxx:1420
int i
bool get_value_changed_from_saved() const
Definition: weld.hxx:1892
void signal_activate(const OString &rIdent)
Definition: weld.hxx:1977
uno_Any a
virtual int get_count() const override
Definition: weld.hxx:1558
ImageType
Definition: vclenum.hxx:322
void connect_changed(const Link< ComboBox &, void > &rLink)
Definition: weld.hxx:660
bool signal_output()
Definition: weld.hxx:1400
void signal_changed()
Definition: weld.hxx:1346
Link< Widget &, void > m_aTopLevelFocusChangedHdl
Definition: weld.hxx:410
void append_item(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:1258
void append(const TreeIter *pParent, const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:801
void unselect_all()
Definition: weld.hxx:1137
TriState get_saved_state() const
Definition: weld.hxx:1210
OUString const & get_saved_value() const
Definition: weld.hxx:1064
Link< Entry &, void > m_aCursorPositionHdl
Definition: weld.hxx:1343
virtual void connect_cursor_position(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1377
void connect_expanding(const Link< const TreeIter &, bool > &rLink)
Definition: weld.hxx:980
void append_item(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:1254
void signal_cursor_position()
Definition: weld.hxx:1347
TRISTATE_FALSE
void remove_text(const OUString &rText)
Definition: weld.hxx:643
Link< ScrolledWindow &, void > m_aVChangeHdl
Definition: weld.hxx:298
virtual ~TreeIter()
Definition: weld.hxx:704
void connect_selected(const Link< Calendar &, void > &rLink)
Definition: weld.hxx:1514
void connect_item_activated(const Link< IconView &, bool > &rLink)
Definition: weld.hxx:1109
std::unique_ptr< weld::Container > m_xContentArea
Definition: weld.hxx:2223
void append_radio(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2011
void set_visible(bool bShow)
Definition: weld.hxx:1827
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:1093
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
void connect_leave_page(const Link< const OString &, bool > &rLink)
Definition: weld.hxx:381
void set_position(int nCursorPos)
Definition: weld.hxx:1838
void signal_toplevel_focus_changed()
Definition: weld.hxx:412
void signal_model_changed()
Definition: weld.hxx:746
virtual void select_entry_region(int nStartPos, int nEndPos) override
Definition: weld.hxx:1599
Link< Entry &, void > m_aChangeHdl
Definition: weld.hxx:1341
virtual bool get_popup_shown() const override
Definition: weld.hxx:1614
Link< const OString &, void > m_aEnterPageHdl
Definition: weld.hxx:362
bool get_value_changed_from_saved() const
Definition: weld.hxx:1144
void signal_toggle_menu(const OString &rIdent)
Definition: weld.hxx:2037
Size get_size_request() const
Definition: weld.hxx:1765
void connect_jump_page(const Link< const OString &, bool > &rLink)
Definition: weld.hxx:556
Link< int, void > m_aColumnClickedHdl
Definition: weld.hxx:715
const basegfx::B2IRange & getB2IRange() const
Definition: weld.hxx:395
void connect_collapsing(const Link< const TreeIter &, bool > &rLink)
Definition: weld.hxx:981
Link< bool &, bool > m_aDragBeginHdl
Definition: weld.hxx:729
void signal_changed()
Definition: weld.hxx:734
Link< ComboBox &, void > m_aChangeHdl
Definition: weld.hxx:595
ScreenShotEntry(const OString &rHelpId, const basegfx::B2IRange &rB2IRange)
Definition: weld.hxx:389
virtual ~Menu()
Definition: weld.hxx:2027
void set_value(int nValue, FieldUnit eValueUnit)
Definition: weld.hxx:1664
Link< ToggleButton &, void > m_aToggleHdl
Definition: weld.hxx:1170
void connect_value_changed(const Link< Scale &, void > &rLink)
Definition: weld.hxx:1316
void signal_selected()
Definition: weld.hxx:1510
def stop
weld::Window * m_pWindow
Definition: weld.hxx:462
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:179
void set_help_id(const OString &rHelpId)
Definition: weld.hxx:2199
Link< ScrolledWindow &, void > m_aHChangeHdl
Definition: weld.hxx:299
OUString m_sSavedValue
Definition: weld.hxx:1079
Link< const KeyEvent &, bool > m_aKeyPressHdl
Definition: weld.hxx:90
void set_default_response(int nResponse)
Definition: weld.hxx:2244
void append_separator(const OUString &rId)
Definition: weld.hxx:1263
void signal_value_changed()
Definition: weld.hxx:1795
OUString get_text() const
Definition: weld.hxx:1840
virtual int get_active() const override
Definition: weld.hxx:1562
virtual void connect_cursor_position(const Link< TextView &, void > &rLink)
Definition: weld.hxx:1895
bool get_sensitive() const
Definition: weld.hxx:1744
OUString m_sSavedValue
Definition: weld.hxx:592
Link< const MouseEvent &, bool > m_aMouseReleaseHdl
Definition: weld.hxx:94
Link< Widget &, tools::Rectangle > m_aGetFocusRectHdl
Definition: weld.hxx:1931
void signal_hadjustment_changed()
Definition: weld.hxx:302
void save_value()
Definition: weld.hxx:1142
Link< TreeView &, bool > m_aRowActivatedHdl
Definition: weld.hxx:714
bool get_value_changed_from_saved() const
Definition: weld.hxx:1755
bool signal_expanding(const TreeIter &rIter)
Definition: weld.hxx:737
Link< Widget &, bool > m_aHelpRequestHdl
Definition: weld.hxx:409
void save_state()
Definition: weld.hxx:1209
bool has_focus() const
Definition: weld.hxx:1747
void connect_drag_begin(const Link< bool &, bool > &rLink)
Definition: weld.hxx:1012
virtual void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:206
void set_visible(bool bShow)
Definition: weld.hxx:1749
void connect_activate(const Link< const OString &, void > &rLink)
Definition: weld.hxx:1982
Link< Entry &, bool > m_aActivateHdl
Definition: weld.hxx:1344
Link< TreeView &, void > m_aModelChangedHdl
Definition: weld.hxx:724
void response(int nResponse)
Definition: weld.hxx:2201
void set_increments(int step, int page, FieldUnit eValueUnit)
Definition: weld.hxx:1722
bool signal_activate_link()
Definition: weld.hxx:1290
void set_primary_text(const OUString &rText)
Definition: weld.hxx:2242
int get_min(FieldUnit eValueUnit) const
Definition: weld.hxx:1708
void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)
Definition: weld.hxx:780
void set_max(double max)
Definition: weld.hxx:1474
Link< FormattedSpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1464
OUString signal_query_tooltip(tools::Rectangle &rHelpArea)
Definition: weld.hxx:1936
void set_help_id(const OString &rName)
Definition: weld.hxx:1775
void select_all()
Definition: weld.hxx:1015
void connect_query_tooltip(const Link< tools::Rectangle &, OUString > &rLink)
Definition: weld.hxx:1949
void signal_changed()
Definition: weld.hxx:600
int convert_value_from(int nValue, FieldUnit eValueUnit) const
Definition: weld.hxx:1659
int get_checkbox_column_width() const
Definition: weld.hxx:1051
void append_separator(const OUString &rId)
Definition: weld.hxx:2062
bool equal(Pair const &p1, Pair const &p2)
void signal_value_changed()
Definition: weld.hxx:1629
Link< const KeyEvent &, bool > m_aKeyReleaseHdl
Definition: weld.hxx:91
bool get_value_changed_from_saved() const
Definition: weld.hxx:1065
void signal_visible_range_changed()
Definition: weld.hxx:745
WaitObject(weld::Window *pWindow)
Definition: weld.hxx:465
OString get_help_id() const
Definition: weld.hxx:2200
Link< const OString &, bool > m_aJumpPageHdl
Definition: weld.hxx:536
void connect_changed(const Link< TextView &, void > &rLink)
Definition: weld.hxx:1894
Link< DrawingArea &, bool > m_aDragBeginHdl
Definition: weld.hxx:1934
virtual void connect_editing(const Link< const TreeIter &, bool > &rStartLink, const Link< const std::pair< const TreeIter &, OUString > &, bool > &rEndLink)
Definition: weld.hxx:986
void signal_toggled(const std::pair< int, int > &rRowCol)
Definition: weld.hxx:749
virtual void connect_key_release(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:212
A widget used to choose from a list of items.
Definition: weld.hxx:589
TimeFieldFormat m_eFormat
Definition: weld.hxx:1786
void remove_id(const OUString &rId)
Definition: weld.hxx:651
void set_value(const tools::Time &rTime)
Definition: weld.hxx:1816
ComboBoxEntry(const OUString &rString, const OUString &rId)
Definition: weld.hxx:568
void append_check(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2007
virtual void set_busy_cursor(bool bBusy)=0
void select_text(const OUString &rText)
Definition: weld.hxx:868
std::vector< int > m_aRadioIndexes
Definition: weld.hxx:732
bool iter_nth_child(TreeIter &rIter, int nChild) const
Definition: weld.hxx:910
void signal_activated()
Definition: weld.hxx:1511
virtual bool get_entry_selection_bounds(int &rStartPos, int &rEndPos) override
Definition: weld.hxx:1605
void connect_input(const Link< int *, bool > &rLink)
Definition: weld.hxx:1452
unsigned char sal_uInt8
OUString const & get_saved_value() const
Definition: weld.hxx:1387
virtual void connect_size_allocate(const Link< const Size &, void > &rLink)
Definition: weld.hxx:200
void connect_vadjustment_changed(const Link< ScrolledWindow &, void > &rLink)
Definition: weld.hxx:341
virtual void set_entry_width_chars(int nChars) override
Definition: weld.hxx:1597
void clicked()
Definition: weld.hxx:1162
virtual void set_entry_message_type(EntryMessageType eType) override
Definition: weld.hxx:1592
TriState get_state() const
Definition: weld.hxx:1182
bool signal_editing_started(const TreeIter &rIter)
Definition: weld.hxx:751
virtual void connect_mouse_press(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:218
bool signal_row_activated()
Definition: weld.hxx:735
bool get_value_changed_from_saved() const
Definition: weld.hxx:1388
virtual void set_entry_max_length(int nChars) override
Definition: weld.hxx:1598
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:2015
void connect_menu_toggled(const Link< const OString &, void > &rLink)
Definition: weld.hxx:2080
void connect_command(const Link< const CommandEvent &, bool > &rLink)
Definition: weld.hxx:1944
std::function< int(const weld::TreeIter &, const weld::TreeIter &)> m_aCustomSort
Definition: weld.hxx:730
friend DialogController
Definition: weld.hxx:483
void connect_toggled(const Link< const std::pair< int, int > &, void > &rLink)
Definition: weld.hxx:827
virtual ~SizeGroup()
Definition: weld.hxx:2089
void set_min(int min, FieldUnit eValueUnit)
Definition: weld.hxx:1694
void signal_value_changed()
Definition: weld.hxx:1306
void connect_value_changed(const Link< FormattedSpinButton &, void > &rLink)
Definition: weld.hxx:1490
void set_sensitive(bool sensitive)
Definition: weld.hxx:1743
void save_value()
Definition: weld.hxx:1386
virtual short run()
Definition: weld.hxx:2194
bool signal_item_activated()
Definition: weld.hxx:1086
void append(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:810
Link< Scale &, void > m_aValueChangedHdl
Definition: weld.hxx:1304
Any value
virtual void connect_toplevel_focus_changed(const Link< Widget &, void > &rLink)
Definition: weld.hxx:444
PointerStyle
Definition: ptrstyle.hxx:25
bool iter_nth_sibling(TreeIter &rIter, int nChild) const
Definition: weld.hxx:903
void connect_activate(const Link< Entry &, bool > &rLink)
Definition: weld.hxx:1376
void append_separator(const OUString &rId)
Definition: weld.hxx:2001
virtual void set_id(int pos, const OUString &rId) override
Definition: weld.hxx:1587
Link< const TreeIter &, bool > m_aExpandingHdl
Definition: weld.hxx:720
OUString get_title() const
Definition: weld.hxx:2198
bool get_value_changed_from_saved() const
Definition: weld.hxx:1834
void append(TreeIter *pRet=nullptr)
Definition: weld.hxx:778
void select_id(const OUString &rId)
Definition: weld.hxx:884
void connect_draw(const Link< draw_args, void > &rLink)
Definition: weld.hxx:1942
sal_Int64 ConvertValue(sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits, FieldUnit eInUnit, FieldUnit eOutUnit)
Definition: field.cxx:1133
void connect_activated(const Link< Calendar &, void > &rLink)
Definition: weld.hxx:1515
void signal_selection_changed()
Definition: weld.hxx:1085
virtual void set_entry_text(const OUString &rStr) override
Definition: weld.hxx:1596
void connect_clicked(const Link< const OString &, void > &rLink)
Definition: weld.hxx:2079
int get_value(FieldUnit eDestUnit) const
Definition: weld.hxx:1669
Link< const OString &, void > m_aToggleMenuHdl
Definition: weld.hxx:2034
Link< const OString &, bool > m_aLeavePageHdl
Definition: weld.hxx:361
void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:1845
int get_max() const
Definition: weld.hxx:1438
void append_text(const OUString &rStr)
Definition: weld.hxx:613
FieldUnit m_eSrcUnit
Definition: weld.hxx:1621
weld::SpinButton & get_widget()
Definition: weld.hxx:1849
void set_state(TriState eState)
Definition: weld.hxx:1191
Link< int *, bool > m_aInputHdl
Definition: weld.hxx:1396
TriState signal_input(int *result)
Definition: weld.hxx:1408
Link< const TreeIter &, OUString > m_aQueryTooltipHdl
Definition: weld.hxx:758
unsigned int get_digits() const
Definition: weld.hxx:1753
Link< Expander &, void > m_aExpandedHdl
Definition: weld.hxx:1911
Link< Widget &, void > m_aFocusInHdl
Definition: weld.hxx:86
void append_item_radio(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1250
void set_max(int max)
Definition: weld.hxx:1426
OUString m_sSavedValue
Definition: weld.hxx:1338
FieldUnit get_unit() const
Definition: weld.hxx:1650
void connect_expanded(const Link< Expander &, void > &rLink)
Definition: weld.hxx:1919
Link< ComboBox &, void > m_aPopupToggledHdl
Definition: weld.hxx:596
virtual OUString get_active_id() const override
Definition: weld.hxx:1580
TriState
int get_height_rows(int nRows) const
Definition: weld.hxx:1885
void signal_value_changed()
Definition: weld.hxx:1398
bool signal_editing_done(const std::pair< const TreeIter &, OUString > &rIterText)
Definition: weld.hxx:753
void connect_output(const Link< SpinButton &, void > &rLink)
Definition: weld.hxx:1451
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:618
void connect_hadjustment_changed(const Link< ScrolledWindow &, void > &rLink)
Definition: weld.hxx:320
virtual void connect_popup_menu(const Link< const CommandEvent &, bool > &rLink)
Definition: weld.hxx:1003
std::unique_ptr< weld::Assistant > m_xAssistant
Definition: weld.hxx:2251
Link< const OString &, void > m_aActivateHdl
Definition: weld.hxx:1975
Link< Calendar &, void > m_aActivatedHdl
Definition: weld.hxx:1508
std::unique_ptr< Entry > m_xEntry
Definition: weld.hxx:1532
std::unique_ptr< weld::MessageDialog > m_xDialog
Definition: weld.hxx:2222
void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:1767
const Dialog * getConstDialog() const
Definition: weld.hxx:2190
int denormalize(int nValue) const
Definition: weld.hxx:1742
void signal_column_clicked(int nColumn)
Definition: weld.hxx:736
Link< LinkButton &, bool > m_aActivateLinkHdl
Definition: weld.hxx:1288
Link< Widget &, bool > m_aMnemonicActivateHdl
Definition: weld.hxx:88
virtual void set_visible(bool visible)
Definition: weld.hxx:103
void append(const TreeIter *pParent, const OUString &rStr)
Definition: weld.hxx:806
virtual int find_text(const OUString &rStr) const override
Definition: weld.hxx:1574
void connect_value_changed(const Link< SpinButton &, void > &rLink)
Definition: weld.hxx:1449
virtual void set_sensitive(bool sensitive)=0
virtual void connect_mnemonic_activate(const Link< Widget &, bool > &rLink)
Definition: weld.hxx:194
bool get_sensitive() const
Definition: weld.hxx:1826
Link< tools::Rectangle &, OUString > m_aQueryTooltipHdl
Definition: weld.hxx:1932
virtual bool has_entry() const override
Definition: weld.hxx:1591