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 <vcl/dllapi.h>
21#include <utility>
22#include <vcl/vclenum.hxx>
23#include <vcl/font.hxx>
24#include <vcl/vclptr.hxx>
26#include <vcl/windowstate.hxx>
27
28#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
29#include <com/sun/star/accessibility/XAccessible.hpp>
30
31#include <assert.h>
32#include <memory>
33#include <vector>
34
35namespace com::sun::star::awt
36{
37class XWindow;
38}
40{
41class XClipboard;
42}
44{
45class XDropTarget;
46}
48{
49class XGraphic;
50}
51typedef css::uno::Reference<css::accessibility::XAccessible> a11yref;
52typedef css::uno::Reference<css::accessibility::XAccessibleRelationSet> a11yrelationset;
53enum class PointerStyle;
54class CommandEvent;
55class Formatter;
56class InputContext;
57class KeyEvent;
58class MouseEvent;
61class OutputDevice;
62class VirtualDevice;
63struct SystemEnvData;
64
65namespace vcl
66{
67class ILibreOfficeKitNotifier;
69}
70namespace tools
71{
72class JsonWriter;
73}
74
75class LOKTrigger;
76
77namespace weld
78{
79class Container;
80class DialogController;
81
83{
84 friend class ::LOKTrigger;
85
86protected:
97
98public:
99 virtual void set_sensitive(bool sensitive) = 0;
100 virtual bool get_sensitive() const = 0;
101
102 /* visibility */
103
104 virtual void show() = 0;
105 virtual void hide() = 0;
106
107 // This function simply calls show() or hide() but is convenient when the
108 // visibility depends on some condition
109 virtual void set_visible(bool visible)
110 {
111 if (visible)
112 show();
113 else
114 hide();
115 }
116
117 // return if this widget's visibility is true
118 virtual bool get_visible() const = 0;
119
120 // return if this widget's visibility and that of all its parents is true
121 virtual bool is_visible() const = 0;
122
123 /* focus */
124
125 // sets if this widget can own the keyboard focus
126 virtual void set_can_focus(bool bCanFocus) = 0;
127
128 // causes this widget to have the keyboard focus
129 virtual void grab_focus() = 0;
130
131 // returns if this widget has the keyboard focus
132 virtual bool has_focus() const = 0;
133
134 // if the widget that has focus is a child, which includes toplevel popup
135 // children, of this widget. So an Entry with an active popup (or dialog)
136 // has has_child_focus of true, but has_focus of false, while its popup is
137 // shown
138 virtual bool has_child_focus() const = 0;
139
140 // return if this widget has the keyboard focus within the active window
141 // TODO: review if this has any practical difference from has_focus()
142 virtual bool is_active() const = 0;
143
144 /* size */
145 virtual void set_size_request(int nWidth, int nHeight) = 0;
146 virtual Size get_size_request() const = 0;
147 virtual Size get_preferred_size() const = 0;
148
149 /* measure */
150 virtual float get_approximate_digit_width() const = 0;
151 virtual int get_text_height() const = 0;
152 virtual Size get_pixel_size(const OUString& rText) const = 0;
153
154 // The name of the widget in the GtkBuilder UI definition used to construct it.
155 virtual OUString get_buildable_name() const = 0;
156 /*
157 Typically there is no need to change the buildable name at runtime, changing
158 the id in .ui file itself is preferred.
159
160 But for ui-testing purposes it can sometimes be useful to rename
161 different widgets, that were loaded from the same .ui, to unique names
162 in order to distinguish between them
163 */
164 virtual void set_buildable_name(const OUString& rName) = 0;
165
166 /*
167 The help id of the widget used to identify help for this widget.
168
169 By default the help id of a widget is a path-like sequence of (load-time)
170 buildable-names from the widgets UI definition ancestor to this widget,
171 e.g. grandparent/parent/widget.
172
173 The default can be overwritten with set_help_id
174 */
175 virtual OUString get_help_id() const = 0;
176 virtual void set_help_id(const OUString& rName) = 0;
177
178 virtual void set_grid_left_attach(int nAttach) = 0;
179 virtual int get_grid_left_attach() const = 0;
180 virtual void set_grid_width(int nCols) = 0;
181 virtual void set_grid_top_attach(int nAttach) = 0;
182 virtual int get_grid_top_attach() const = 0;
183
184 virtual void set_hexpand(bool bExpand) = 0;
185 virtual bool get_hexpand() const = 0;
186 virtual void set_vexpand(bool bExpand) = 0;
187 virtual bool get_vexpand() const = 0;
188
189 virtual void set_margin_top(int nMargin) = 0;
190 virtual void set_margin_bottom(int nMargin) = 0;
191 virtual void set_margin_start(int nMargin) = 0;
192 virtual void set_margin_end(int nMargin) = 0;
193
194 virtual int get_margin_top() const = 0;
195 virtual int get_margin_bottom() const = 0;
196 virtual int get_margin_start() const = 0;
197 virtual int get_margin_end() const = 0;
198
199 /*
200 * Report the extents of this widget relative to the rRelative target widget.
201 *
202 * To succeed, both widgets must be realized, and must share a common toplevel.
203 *
204 * returns false if the relative extents could not be determined, e.g. if
205 * either widget was not realized, or there was no common ancestor.
206 * Otherwise true.
207 */
208 virtual bool get_extents_relative_to(const Widget& rRelative, int& x, int& y, int& width,
209 int& height) const = 0;
210
211 virtual void set_accessible_name(const OUString& rName) = 0;
212 virtual void set_accessible_description(const OUString& rDescription) = 0;
213 virtual OUString get_accessible_name() const = 0;
214
215 virtual OUString get_accessible_description() const = 0;
216
217 // After this call this widget is only accessibility labelled by pLabel and
218 // pLabel only accessibility labels this widget
220
221 virtual void set_tooltip_text(const OUString& rTip) = 0;
222 virtual OUString get_tooltip_text() const = 0;
223
224 virtual void set_cursor_data(void* pData) = 0;
225
226 virtual void connect_focus_in(const Link<Widget&, void>& rLink)
227 {
228 assert(!m_aFocusInHdl.IsSet() || !rLink.IsSet());
229 m_aFocusInHdl = rLink;
230 }
231
232 virtual void connect_focus_out(const Link<Widget&, void>& rLink)
233 {
234 assert(!m_aFocusOutHdl.IsSet() || !rLink.IsSet());
235 m_aFocusOutHdl = rLink;
236 }
237
238 // rLink is called when the mnemonic for the Widget is called.
239 // If rLink returns true the Widget will not automatically gain
240 // focus as normally occurs
242 {
243 assert(!m_aMnemonicActivateHdl.IsSet() || !rLink.IsSet());
244 m_aMnemonicActivateHdl = rLink;
245 }
246
248 {
249 assert(!m_aSizeAllocateHdl.IsSet() || !rLink.IsSet());
250 m_aSizeAllocateHdl = rLink;
251 }
252
254 {
255 assert(!m_aKeyPressHdl.IsSet() || !rLink.IsSet());
256 m_aKeyPressHdl = rLink;
257 }
258
260 {
261 assert(!m_aKeyReleaseHdl.IsSet() || !rLink.IsSet());
262 m_aKeyReleaseHdl = rLink;
263 }
264
266 {
267 assert(!m_aMousePressHdl.IsSet() || !rLink.IsSet());
268 m_aMousePressHdl = rLink;
269 }
270
272 {
273 assert(!m_aMouseMotionHdl.IsSet() || !rLink.IsSet());
274 m_aMouseMotionHdl = rLink;
275 }
276
278 {
279 assert(!m_aMouseReleaseHdl.IsSet() || !rLink.IsSet());
280 m_aMouseReleaseHdl = rLink;
281 }
282
284 {
285 assert(!m_aStyleUpdatedHdl.IsSet() || !rLink.IsSet());
286 m_aStyleUpdatedHdl = rLink;
287 }
288
289 virtual void grab_add() = 0;
290 virtual bool has_grab() const = 0;
291 virtual void grab_remove() = 0;
292
293 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
294 virtual vcl::Font get_font() = 0;
295
296 //true for rtl, false otherwise
297 virtual bool get_direction() const = 0;
298 virtual void set_direction(bool bRTL) = 0;
299
300 /* Increases the freeze count on widget.
301
302 If the freeze count is non-zero, emission of the widget's notifications
303 is stopped. The notifications are queued until the freeze count is
304 decreased to zero. Duplicate notifications may be squashed together.
305 */
306 virtual void freeze() = 0;
307
308 /* Reverts the effect of a previous call to freeze.
309
310 The freeze count is decreased on the widget and when it reaches zero,
311 queued notifications are emitted.
312 */
313 virtual void thaw() = 0;
314
315 /* push/pop busy mouse cursor state
316
317 bBusy of true to push a busy state onto the stack and false
318 to pop it off, calls to this should balance.
319
320 see weld::WaitObject */
321 virtual void set_busy_cursor(bool bBusy) = 0;
322
323 virtual void queue_resize() = 0;
324
325 virtual std::unique_ptr<Container> weld_parent() const = 0;
326
327 //iterate upwards through the hierarchy starting at this widgets parent,
328 //calling func with their helpid until func returns true or we run out of
329 //parents
330 virtual void help_hierarchy_foreach(const std::function<bool(const OUString&)>& func) = 0;
331
332 virtual OUString strip_mnemonic(const OUString& rLabel) const = 0;
333
335
336 //do something transient to attract the attention of the user to the widget
337 virtual void call_attention_to() = 0;
338
339 //make this widget look like a page in a notebook
340 virtual void set_stack_background() = 0;
341 //make this widget look like it has a highlighted background
342 virtual void set_highlight_background() = 0;
343 //make this widget suitable as parent for a title
344 virtual void set_title_background() = 0;
345 //make this widget suitable for use in a toolbar
346 virtual void set_toolbar_background() = 0;
347 //trying to use a custom color for a background is generally a bad idea. If your need
348 //fits one of the above categories then that's a somewhat better choice
349 virtual void set_background(const Color& rBackColor) = 0;
350
351 virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> get_drop_target() = 0;
352 virtual css::uno::Reference<css::datatransfer::clipboard::XClipboard> get_clipboard() const = 0;
353
355 virtual void get_property_tree(tools::JsonWriter& rJsonWriter) = 0;
356
357 // render the widget to an output device
358 virtual void draw(OutputDevice& rOutput, const Point& rPos, const Size& rSizePixel) = 0;
359
360 virtual ~Widget() {}
361};
362
363class VCL_DLLPUBLIC Container : virtual public Widget
364{
366
367protected:
368 void signal_container_focus_changed() { m_aContainerFocusChangedHdl.Call(*this); }
369
370public:
371 // remove from old container and add to new container in one go
372 // new container can be null to just remove from old container
373 virtual void move(weld::Widget* pWidget, weld::Container* pNewParent) = 0;
374 // create an XWindow as a child of this container. The XWindow is
375 // suitable to contain css::awt::XControl items
376 virtual css::uno::Reference<css::awt::XWindow> CreateChildFrame() = 0;
377 // rLink is called when the focus transitions from a widget outside the container
378 // to a widget inside the container or vice versa
380 {
381 m_aContainerFocusChangedHdl = rLink;
382 }
383 // causes a child of the container to have the keyboard focus
384 virtual void child_grab_focus() = 0;
385};
386
387class VCL_DLLPUBLIC Box : virtual public Container
388{
389public:
390 // Moves child to a new position in the list of children
391 virtual void reorder_child(weld::Widget* pWidget, int position) = 0;
392 // Sort ok/cancel etc buttons in platform order
393 virtual void sort_native_button_order() = 0;
394};
395
396class VCL_DLLPUBLIC Paned : virtual public Container
397{
398public:
399 // set pixel position of divider
400 virtual void set_position(int nPos) = 0;
401 // get pixel position of divider
402 virtual int get_position() const = 0;
403};
404
406{
407 friend class ::LOKTrigger;
408
411
412protected:
413 void signal_vadjustment_changed() { m_aVChangeHdl.Call(*this); }
414 void signal_hadjustment_changed() { m_aHChangeHdl.Call(*this); }
415
416public:
417 virtual void hadjustment_configure(int value, int lower, int upper, int step_increment,
418 int page_increment, int page_size)
419 = 0;
420 virtual int hadjustment_get_value() const = 0;
421 virtual void hadjustment_set_value(int value) = 0;
422 virtual int hadjustment_get_upper() const = 0;
423 virtual void hadjustment_set_upper(int upper) = 0;
424 virtual int hadjustment_get_page_size() const = 0;
425 virtual void hadjustment_set_page_size(int size) = 0;
426 virtual void hadjustment_set_page_increment(int size) = 0;
427 virtual void hadjustment_set_step_increment(int size) = 0;
428 virtual void set_hpolicy(VclPolicyType eHPolicy) = 0;
429 virtual VclPolicyType get_hpolicy() const = 0;
431 {
432 m_aHChangeHdl = rLink;
433 }
434
435 virtual void vadjustment_configure(int value, int lower, int upper, int step_increment,
436 int page_increment, int page_size)
437 = 0;
438 virtual int vadjustment_get_value() const = 0;
439 virtual void vadjustment_set_value(int value) = 0;
440 virtual int vadjustment_get_upper() const = 0;
441 virtual void vadjustment_set_upper(int upper) = 0;
442 virtual int vadjustment_get_page_size() const = 0;
443 virtual void vadjustment_set_page_size(int size) = 0;
444 virtual void vadjustment_set_page_increment(int size) = 0;
445 virtual void vadjustment_set_step_increment(int size) = 0;
446 virtual int vadjustment_get_lower() const = 0;
447 virtual void vadjustment_set_lower(int upper) = 0;
448 virtual void set_vpolicy(VclPolicyType eVPolicy) = 0;
449 virtual VclPolicyType get_vpolicy() const = 0;
451 {
452 m_aVChangeHdl = rLink;
453 }
454 virtual int get_scroll_thickness() const = 0;
455 virtual void set_scroll_thickness(int nThickness) = 0;
456
457 //trying to use custom color for a scrollbar is generally a bad idea.
458 virtual void customize_scrollbars(const Color& rBackgroundColor, const Color& rShadowColor,
459 const Color& rFaceColor)
460 = 0;
461};
462
463class Label;
464
465class VCL_DLLPUBLIC Frame : virtual public Container
466{
467public:
468 virtual void set_label(const OUString& rText) = 0;
469 virtual OUString get_label() const = 0;
470 virtual std::unique_ptr<Label> weld_label_widget() const = 0;
471};
472
473class VCL_DLLPUBLIC Notebook : virtual public Widget
474{
475 friend class ::LOKTrigger;
476
477protected:
480
481public:
482 virtual int get_current_page() const = 0;
483 virtual int get_page_index(const OUString& rIdent) const = 0;
484 virtual OUString get_page_ident(int nPage) const = 0;
485 virtual OUString get_current_page_ident() const = 0;
486 virtual void set_current_page(int nPage) = 0;
487 virtual void set_current_page(const OUString& rIdent) = 0;
488 virtual void remove_page(const OUString& rIdent) = 0;
489 virtual void insert_page(const OUString& rIdent, const OUString& rLabel, int nPos) = 0;
490 void append_page(const OUString& rIdent, const OUString& rLabel)
491 {
492 insert_page(rIdent, rLabel, -1);
493 }
494 virtual void set_tab_label_text(const OUString& rIdent, const OUString& rLabel) = 0;
495 virtual OUString get_tab_label_text(const OUString& rIdent) const = 0;
496 virtual void set_show_tabs(bool bShow) = 0;
497 virtual int get_n_pages() const = 0;
498 virtual weld::Container* get_page(const OUString& rIdent) const = 0;
499
500 void connect_leave_page(const Link<const OUString&, bool>& rLink) { m_aLeavePageHdl = rLink; }
501 void connect_enter_page(const Link<const OUString&, void>& rLink) { m_aEnterPageHdl = rLink; }
502};
503
505{
506public:
507 ScreenShotEntry(OUString aHelpId, const basegfx::B2IRange& rB2IRange)
508 : msHelpId(std::move(aHelpId))
509 , maB2IRange(rB2IRange)
510 {
511 }
512
513 const basegfx::B2IRange& getB2IRange() const { return maB2IRange; }
514
515 const OUString& GetHelpId() const { return msHelpId; }
516
517private:
518 OUString msHelpId;
520};
521
522typedef std::vector<ScreenShotEntry> ScreenShotCollection;
523
524class VCL_DLLPUBLIC Window : virtual public Container
525{
526protected:
528
529public:
530 virtual void set_title(const OUString& rTitle) = 0;
531 virtual OUString get_title() const = 0;
532 virtual void window_move(int x, int y) = 0;
533 virtual void set_modal(bool bModal) = 0;
534 virtual bool get_modal() const = 0;
535 virtual bool get_resizable() const = 0;
536 virtual Size get_size() const = 0;
537 virtual Point get_position() const = 0;
539 // center window on is parent
540 //
541 // bTrackGeometryRequests set to true tries to ensure the window will end
542 // up still centered on its parent windows final size, taking into account
543 // that there may currently be pending geometry requests for the parent not
544 // yet processed by the underlying toolkit
545 //
546 // for e.g gtk this will means the window is always centered even when
547 // resized, calling set_centered_on_parent with false will turn this
548 // off again.
549 virtual void set_centered_on_parent(bool bTrackGeometryRequests) = 0;
550 // returns whether the widget that has focus is within this Window
551 // (its very possible to move this to weld::Container if that becomes
552 // desirable)
553 virtual bool has_toplevel_focus() const = 0;
554 virtual void present() = 0;
555
556 // with pOld of null, automatically find the old default widget and unset
557 // it, otherwise use as hint to the old default
558 virtual void change_default_widget(weld::Widget* pOld, weld::Widget* pNew) = 0;
559 virtual bool is_default_widget(const weld::Widget* pCandidate) const = 0;
560
561 virtual void set_window_state(const OUString& rStr) = 0;
562 virtual OUString get_window_state(vcl::WindowDataMask nMask) const = 0;
563
564 virtual css::uno::Reference<css::awt::XWindow> GetXWindow() = 0;
565
566 void connect_help(const Link<Widget&, bool>& rLink) { m_aHelpRequestHdl = rLink; }
567
568 virtual SystemEnvData get_system_data() const = 0;
569
570 virtual void resize_to_request() = 0;
571
572 // collect positions of widgets and their help ids for screenshot purposes
574
575 // render the widget to an output device
577
579};
580
582{
583private:
585
586public:
588 : m_pWindow(pWindow)
589 {
590 if (m_pWindow)
591 m_pWindow->set_busy_cursor(true);
592 }
594 {
595 if (m_pWindow)
596 m_pWindow->set_busy_cursor(false);
597 }
598};
599
600class Button;
601
602class VCL_DLLPUBLIC Dialog : virtual public Window
603{
604private:
606 virtual bool runAsync(std::shared_ptr<DialogController>,
607 const std::function<void(sal_Int32)>& func)
608 = 0;
609
610public:
611 virtual int run() = 0;
612 // Run async without a controller
613 // @param self - must point to this, to enforce that the dialog was created/held by a shared_ptr
614 virtual bool runAsync(std::shared_ptr<Dialog> const& rxSelf,
615 const std::function<void(sal_Int32)>& func)
616 = 0;
617 virtual void response(int response) = 0;
618 virtual void add_button(const OUString& rText, int response, const OUString& rHelpId = {}) = 0;
619 virtual void set_default_response(int response) = 0;
620 virtual Button* weld_widget_for_response(int response) = 0;
622
623 // shrink the dialog down to shown just these widgets
624 virtual void collapse(weld::Widget* pEdit, weld::Widget* pButton) = 0;
625 // undo previous dialog collapse
626 virtual void undo_collapse() = 0;
627
629 = 0;
630};
631
632class VCL_DLLPUBLIC MessageDialog : virtual public Dialog
633{
634public:
635 virtual void set_primary_text(const OUString& rText) = 0;
636 virtual OUString get_primary_text() const = 0;
637 virtual void set_secondary_text(const OUString& rText) = 0;
638 virtual OUString get_secondary_text() const = 0;
640};
641
642class VCL_DLLPUBLIC Assistant : virtual public Dialog
643{
645
646protected:
647 bool signal_jump_page(const OUString& rIdent) { return m_aJumpPageHdl.Call(rIdent); }
648
649public:
650 virtual int get_current_page() const = 0;
651 virtual int get_n_pages() const = 0;
652 virtual OUString get_page_ident(int nPage) const = 0;
653 virtual OUString get_current_page_ident() const = 0;
654 virtual void set_current_page(int nPage) = 0;
655 virtual void set_current_page(const OUString& rIdent) = 0;
656 // move the page rIdent to position nIndex
657 virtual void set_page_index(const OUString& rIdent, int nIndex) = 0;
658 virtual void set_page_title(const OUString& rIdent, const OUString& rTitle) = 0;
659 virtual OUString get_page_title(const OUString& rIdent) const = 0;
660 virtual void set_page_sensitive(const OUString& rIdent, bool bSensitive) = 0;
661 virtual weld::Container* append_page(const OUString& rIdent) = 0;
662
663 virtual void set_page_side_help_id(const OUString& rHelpId) = 0;
664
665 virtual void set_page_side_image(const OUString& rImage) = 0;
666
667 void connect_jump_page(const Link<const OUString&, bool>& rLink) { m_aJumpPageHdl = rLink; }
668};
669
670inline OUString toId(const void* pValue)
671{
672 return OUString::number(reinterpret_cast<sal_uIntPtr>(pValue));
673}
674
675template <typename T> T fromId(const OUString& rValue)
676{
677 return reinterpret_cast<T>(rValue.toUInt64());
678}
679
681{
682 OUString sString;
683 OUString sId;
684 OUString sImage;
685 ComboBoxEntry(OUString _aString)
686 : sString(std::move(_aString))
687 {
688 }
689 ComboBoxEntry(OUString _aString, OUString _aId)
690 : sString(std::move(_aString))
691 , sId(std::move(_aId))
692 {
693 }
694 ComboBoxEntry(OUString _aString, OUString _aId, OUString _aImage)
695 : sString(std::move(_aString))
696 , sId(std::move(_aId))
697 , sImage(std::move(_aImage))
698 {
699 }
700};
701
703{
704 Normal,
705 Warning,
706 Error,
707};
708
709class Menu;
710
712class VCL_DLLPUBLIC ComboBox : virtual public Widget
713{
714private:
716 std::vector<OUString> m_aSavedValues;
717
718public:
719 // OUString is the id of the row, it may be null to measure the height of a generic line
720 typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, bool, const OUString&>
722
723protected:
728
729 friend class ::LOKTrigger;
730
731 void signal_changed() { m_aChangeHdl.Call(*this); }
732
733 virtual void signal_popup_toggled() { m_aPopupToggledHdl.Call(*this); }
734
737 bool bSelected, const OUString& rId)
738 {
739 m_aRenderHdl.Call(render_args(rDevice, rRect, bSelected, rId));
740 }
741
743 Size signal_custom_get_size(vcl::RenderContext& rDevice) { return m_aGetSizeHdl.Call(rDevice); }
744
745public:
746 virtual void insert(int pos, const OUString& rStr, const OUString* pId,
747 const OUString* pIconName, VirtualDevice* pImageSurface)
748 = 0;
749 virtual void insert_vector(const std::vector<weld::ComboBoxEntry>& rItems, bool bKeepExisting)
750 = 0;
751 void insert(int pos, const weld::ComboBoxEntry& rItem)
752 {
753 insert(pos, rItem.sString, rItem.sId.isEmpty() ? nullptr : &rItem.sId,
754 rItem.sImage.isEmpty() ? nullptr : &rItem.sImage, nullptr);
755 }
756 void insert_text(int pos, const OUString& rStr)
757 {
758 insert(pos, rStr, nullptr, nullptr, nullptr);
759 }
760 void append(const weld::ComboBoxEntry& rItem) { insert(-1, rItem); }
761 void append_text(const OUString& rStr) { insert(-1, rStr, nullptr, nullptr, nullptr); }
762 void append(const OUString& rId, const OUString& rStr)
763 {
764 insert(-1, rStr, &rId, nullptr, nullptr);
765 }
766 void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
767 {
768 insert(-1, rStr, &rId, &rImage, nullptr);
769 }
770 void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
771 {
772 insert(-1, rStr, &rId, nullptr, &rImage);
773 }
774 void append(int pos, const OUString& rId, const OUString& rStr)
775 {
776 insert(pos, rStr, &rId, nullptr, nullptr);
777 }
778 virtual void insert_separator(int pos, const OUString& rId) = 0;
779 void append_separator(const OUString& rId) { insert_separator(-1, rId); }
780
781 virtual int get_count() const = 0;
782 virtual void make_sorted() = 0;
783 virtual void clear() = 0;
784
785 //by index
786 virtual int get_active() const = 0;
787 virtual void set_active(int pos) = 0;
788 virtual void remove(int pos) = 0;
789
790 //by text
791 virtual OUString get_active_text() const = 0;
792 void set_active_text(const OUString& rStr) { set_active(find_text(rStr)); }
793 virtual OUString get_text(int pos) const = 0;
794 virtual int find_text(const OUString& rStr) const = 0;
795 void remove_text(const OUString& rText) { remove(find_text(rText)); }
796
797 //by id
798 virtual OUString get_active_id() const = 0;
799 virtual void set_active_id(const OUString& rStr) = 0;
800 virtual OUString get_id(int pos) const = 0;
801 virtual void set_id(int row, const OUString& rId) = 0;
802 virtual int find_id(const OUString& rId) const = 0;
803 void remove_id(const OUString& rId) { remove(find_id(rId)); }
804
805 /* m_aChangeHdl is called when the active item is changed. The can be due
806 to the user selecting a different item from the list or while typing
807 into the entry of a combo box with an entry.
808
809 Use changed_by_direct_pick() to discover whether an item was actually explicitly
810 selected, e.g. from the menu.
811 */
812 void connect_changed(const Link<ComboBox&, void>& rLink) { m_aChangeHdl = rLink; }
813
814 virtual bool changed_by_direct_pick() const = 0;
815
817 {
818 m_aPopupToggledHdl = rLink;
819 }
820
821 //entry related
822 virtual bool has_entry() const = 0;
824 virtual void set_entry_text(const OUString& rStr) = 0;
825 virtual void set_entry_width_chars(int nChars) = 0;
826 virtual void set_entry_max_length(int nChars) = 0;
827 virtual void select_entry_region(int nStartPos, int nEndPos) = 0;
828 virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) = 0;
829 virtual void set_entry_completion(bool bEnable, bool bCaseSensitive = false) = 0;
830 virtual void set_entry_placeholder_text(const OUString& rText) = 0;
831 virtual void set_entry_editable(bool bEditable) = 0;
832 virtual void cut_entry_clipboard() = 0;
833 virtual void copy_entry_clipboard() = 0;
834 virtual void paste_entry_clipboard() = 0;
835
836 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
837 virtual void set_font(const vcl::Font& rFont) = 0;
838
839 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
840 virtual void set_entry_font(const vcl::Font& rFont) = 0;
842
843 virtual bool get_popup_shown() const = 0;
844
846 {
847 m_aEntryInsertTextHdl = rLink;
848 }
849
850 // callback returns true to indicated no further processing of activate wanted
851 void connect_entry_activate(const Link<ComboBox&, bool>& rLink) { m_aEntryActivateHdl = rLink; }
852
853 void save_value() { m_sSavedValue = get_active_text(); }
854
855 void save_values_by_id(const OUString& rId)
856 {
857 m_aSavedValues.push_back(get_text(find_id(rId)));
858 }
859
860 OUString const& get_saved_value() const { return m_sSavedValue; }
861 OUString const& get_saved_values(int pos) const { return m_aSavedValues[pos]; }
862 bool get_value_changed_from_saved() const { return m_sSavedValue != get_active_text(); }
864 {
865 return !m_aSavedValues.empty()
866 && std::find(m_aSavedValues.begin(), m_aSavedValues.end(), get_active_text())
867 == m_aSavedValues.end();
868 }
869
870 void removeSavedValues() { m_aSavedValues.clear(); }
871
872 // for custom rendering a row
874 {
875 m_aGetSizeHdl = rLink;
876 }
877 void connect_custom_render(const Link<render_args, void>& rLink) { m_aRenderHdl = rLink; }
878 // call set_custom_renderer after setting custom callbacks
879 virtual void set_custom_renderer(bool bOn) = 0;
880 // create a virtual device compatible with the device passed in render_args wrt alpha
882 // set a sub menu for a entry, only works with custom rendering
883 virtual void set_item_menu(const OUString& rIdent, weld::Menu* pMenu) = 0;
884 // get the width needed to show the menu launcher in a custom row
885 virtual int get_menu_button_width() const = 0;
886
887 // for mru support
888 virtual int get_max_mru_count() const = 0;
889 virtual void set_max_mru_count(int nCount) = 0;
890 virtual OUString get_mru_entries() const = 0;
891 virtual void set_mru_entries(const OUString& rEntries) = 0;
892};
893
895{
896 Check,
897 Radio
898};
899
901{
902private:
903 TreeIter(const TreeIter&) = delete;
904 TreeIter& operator=(const TreeIter&) = delete;
905
906public:
908 virtual bool equal(const TreeIter& rOther) const = 0;
909 virtual ~TreeIter() {}
910};
911
912/* Model column indexes are considered to begin at 0, but with special columns
913 before index 0. A expander image column (and an additional optional toggle
914 button column when enable_toggle_buttons is used). Column index -1 is
915 reserved to access those columns.
916*/
917class VCL_DLLPUBLIC TreeView : virtual public Widget
918{
919 friend class ::LOKTrigger;
920
921public:
922 typedef std::pair<const TreeIter&, int> iter_col;
923 typedef std::pair<const TreeIter&, OUString> iter_string;
924 // OUString is the id of the row, it may be null to measure the height of a generic line
925 typedef std::pair<vcl::RenderContext&, const OUString&> get_size_args;
926 typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, bool, const OUString&>
928
929private:
931
932protected:
939 // if handler returns false, the expansion of the row is refused
941 // if handler returns false, the collapse of the row is refused
945 // if handler returns true, then menu has been show and event is consumed
947 // if handler returns true, drag is disallowed, consumer can change bool
948 // arg to false to disable the treeview default dnd icon
950 std::function<int(const weld::TreeIter&, const weld::TreeIter&)> m_aCustomSort;
951
952protected:
953 void signal_changed() { m_aChangeHdl.Call(*this); }
954 bool signal_row_activated() { return m_aRowActivatedHdl.Call(*this); }
955 void signal_column_clicked(int nColumn) { m_aColumnClickedHdl.Call(nColumn); }
956 bool signal_expanding(const TreeIter& rIter)
957 {
958 return !m_aExpandingHdl.IsSet() || m_aExpandingHdl.Call(rIter);
959 }
960 bool signal_collapsing(const TreeIter& rIter)
961 {
962 return !m_aCollapsingHdl.IsSet() || m_aCollapsingHdl.Call(rIter);
963 }
964 void signal_visible_range_changed() { m_aVisibleRangeChangedHdl.Call(*this); }
965 void signal_model_changed() { m_aModelChangedHdl.Call(*this); }
966
967 void signal_toggled(const iter_col& rIterCol) { m_aRadioToggleHdl.Call(rIterCol); }
968
969 bool signal_editing_started(const TreeIter& rIter) { return m_aEditingStartedHdl.Call(rIter); }
970
971 bool signal_editing_done(const iter_string& rIterText)
972 {
973 return m_aEditingDoneHdl.Call(rIterText);
974 }
975
977 OUString signal_query_tooltip(const TreeIter& rIter) { return m_aQueryTooltipHdl.Call(rIter); }
978
981 bool bSelected, const OUString& rId)
982 {
983 m_aRenderHdl.Call(render_args(rDevice, rRect, bSelected, rId));
984 }
985
987 Size signal_custom_get_size(vcl::RenderContext& rDevice, const OUString& rId)
988 {
989 return m_aGetSizeHdl.Call(get_size_args(rDevice, rId));
990 }
991
992public:
994 {
995 assert(!m_aQueryTooltipHdl.IsSet() || !rLink.IsSet());
996 m_aQueryTooltipHdl = rLink;
997 }
998
999 // see 'expanding on-demand node details' for bChildrenOnDemand of true
1000 virtual void insert(const TreeIter* pParent, int pos, const OUString* pStr, const OUString* pId,
1001 const OUString* pIconName, VirtualDevice* pImageSurface,
1002 bool bChildrenOnDemand, TreeIter* pRet)
1003 = 0;
1004
1005 void insert(int nRow, TreeIter* pRet = nullptr)
1006 {
1007 insert(nullptr, nRow, nullptr, nullptr, nullptr, nullptr, false, pRet);
1008 }
1009
1010 void append(TreeIter* pRet = nullptr) { insert(-1, pRet); }
1011
1012 void insert(int pos, const OUString& rStr, const OUString* pId, const OUString* pIconName,
1013 VirtualDevice* pImageSurface)
1014 {
1015 insert(nullptr, pos, &rStr, pId, pIconName, pImageSurface, false, nullptr);
1016 }
1017 void insert_text(int pos, const OUString& rStr)
1018 {
1019 insert(nullptr, pos, &rStr, nullptr, nullptr, nullptr, false, nullptr);
1020 }
1021 void append_text(const OUString& rStr)
1022 {
1023 insert(nullptr, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
1024 }
1025 void append(const OUString& rId, const OUString& rStr)
1026 {
1027 insert(nullptr, -1, &rStr, &rId, nullptr, nullptr, false, nullptr);
1028 }
1029 void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
1030 {
1031 insert(nullptr, -1, &rStr, &rId, &rImage, nullptr, false, nullptr);
1032 }
1033 void append(const TreeIter* pParent, const OUString& rStr)
1034 {
1035 insert(pParent, -1, &rStr, nullptr, nullptr, nullptr, false, nullptr);
1036 }
1037
1038 virtual void insert_separator(int pos, const OUString& rId) = 0;
1039 void append_separator(const OUString& rId) { insert_separator(-1, rId); }
1040
1041 void connect_changed(const Link<TreeView&, void>& rLink) { m_aChangeHdl = rLink; }
1042
1043 /* A row is "activated" when the user double clicks a treeview row. It may
1044 also be emitted when a row is selected and Space or Enter is pressed.
1045
1046 a return of "true" means the activation has been handled, a "false" propagates
1047 the activation to the default handler which expands/collapses the row, if possible.
1048 */
1049 void connect_row_activated(const Link<TreeView&, bool>& rLink) { m_aRowActivatedHdl = rLink; }
1050
1051 // Argument is a pair of iter, col describing the toggled node
1052 void connect_toggled(const Link<const iter_col&, void>& rLink) { m_aRadioToggleHdl = rLink; }
1053
1054 void connect_column_clicked(const Link<int, void>& rLink) { m_aColumnClickedHdl = rLink; }
1055 void connect_model_changed(const Link<TreeView&, void>& rLink) { m_aModelChangedHdl = rLink; }
1056
1057 virtual OUString get_selected_text() const = 0;
1058 virtual OUString get_selected_id() const = 0;
1059
1060 // call before inserting any content and connecting to toggle signals,
1061 // an pre-inserted checkbutton column will exist at the start of every row
1062 // inserted after this call which can be accessed with col index -1
1064
1065 virtual void set_clicks_to_toggle(int nToggleBehavior) = 0;
1066
1067 //by index
1068 virtual int get_selected_index() const = 0;
1069 //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1070 virtual void select(int pos) = 0;
1071 virtual void unselect(int pos) = 0;
1072 virtual void remove(int pos) = 0;
1073 // col index -1 gets the first text column
1074 virtual OUString get_text(int row, int col = -1) const = 0;
1075 // col index -1 sets the first text column
1076 virtual void set_text(int row, const OUString& rText, int col = -1) = 0;
1077 // col index -1 sets all columns
1078 virtual void set_sensitive(int row, bool bSensitive, int col = -1) = 0;
1079 virtual bool get_sensitive(int row, int col) const = 0;
1080 virtual void set_id(int row, const OUString& rId) = 0;
1081 // col index -1 sets the expander toggle, enable_toggle_buttons must have been called to create that column
1082 virtual void set_toggle(int row, TriState eState, int col = -1) = 0;
1083 // col index -1 gets the expander toggle, enable_toggle_buttons must have been called to create that column
1084 virtual TriState get_toggle(int row, int col = -1) const = 0;
1085 // col index -1 sets the expander image
1086 virtual void set_image(int row, const OUString& rImage, int col = -1) = 0;
1087 // col index -1 sets the expander image
1088 virtual void set_image(int row, VirtualDevice& rImage, int col = -1) = 0;
1089 // col index -1 sets the expander image
1090 virtual void set_image(int row, const css::uno::Reference<css::graphic::XGraphic>& rImage,
1091 int col = -1)
1092 = 0;
1093 virtual void set_text_emphasis(int row, bool bOn, int col) = 0;
1094 virtual bool get_text_emphasis(int row, int col) const = 0;
1095 virtual void set_text_align(int row, double fAlign, int col) = 0;
1096 virtual void swap(int pos1, int pos2) = 0;
1097 virtual std::vector<int> get_selected_rows() const = 0;
1098 virtual void set_font_color(int pos, const Color& rColor) = 0;
1099 // scroll to make 'row' visible, this will also expand all parent rows of 'row' as necessary to
1100 // make 'row' visible
1101 virtual void scroll_to_row(int row) = 0;
1102 virtual bool is_selected(int pos) const = 0;
1103 virtual int get_cursor_index() const = 0;
1104 virtual void set_cursor(int pos) = 0;
1105
1106 //by text
1107 virtual int find_text(const OUString& rText) const = 0;
1108 //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1109 void select_text(const OUString& rText) { select(find_text(rText)); }
1110 void remove_text(const OUString& rText) { remove(find_text(rText)); }
1111 std::vector<OUString> get_selected_rows_text() const
1112 {
1113 std::vector<int> aRows(get_selected_rows());
1114 std::vector<OUString> aRet;
1115 aRet.reserve(aRows.size());
1116 for (auto a : aRows)
1117 aRet.push_back(get_text(a));
1118 return aRet;
1119 }
1120
1121 //by id
1122 virtual OUString get_id(int pos) const = 0;
1123 virtual int find_id(const OUString& rId) const = 0;
1124 //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1125 void select_id(const OUString& rId) { select(find_id(rId)); }
1126 void remove_id(const OUString& rText) { remove(find_id(rText)); }
1127
1128 //via iter
1129 virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = nullptr) const = 0;
1130 virtual void copy_iterator(const TreeIter& rSource, TreeIter& rDest) const = 0;
1131 virtual bool get_selected(TreeIter* pIter) const = 0;
1132 virtual bool get_cursor(TreeIter* pIter) const = 0;
1133 virtual void set_cursor(const TreeIter& rIter) = 0;
1134 virtual bool get_iter_first(TreeIter& rIter) const = 0;
1135 // set iter to point to next node at the current level
1136 virtual bool iter_next_sibling(TreeIter& rIter) const = 0;
1137 // set iter to point to previous node at the current level
1138 virtual bool iter_previous_sibling(TreeIter& rIter) const = 0;
1139 // set iter to point to next node, depth first, then sibling
1140 virtual bool iter_next(TreeIter& rIter) const = 0;
1141 // set iter to point to previous node, sibling first then depth
1142 virtual bool iter_previous(TreeIter& rIter) const = 0;
1143 // set iter to point to first child node
1144 virtual bool iter_children(TreeIter& rIter) const = 0;
1145 bool iter_nth_sibling(TreeIter& rIter, int nChild) const
1146 {
1147 bool bRet = true;
1148 for (int i = 0; i < nChild && bRet; ++i)
1149 bRet = iter_next_sibling(rIter);
1150 return bRet;
1151 }
1152 bool iter_nth_child(TreeIter& rIter, int nChild) const
1153 {
1154 if (!iter_children(rIter))
1155 return false;
1156 return iter_nth_sibling(rIter, nChild);
1157 }
1158 virtual bool iter_parent(TreeIter& rIter) const = 0;
1159 virtual int get_iter_depth(const TreeIter& rIter) const = 0;
1160 virtual int get_iter_index_in_parent(const TreeIter& rIter) const = 0;
1161 /* Compares two paths. If a appears before b in a tree, then -1 is returned.
1162 If b appears before a , then 1 is returned. If the two nodes are equal,
1163 then 0 is returned.
1164 */
1165 virtual int iter_compare(const TreeIter& a, const TreeIter& b) const = 0;
1166 virtual bool iter_has_child(const TreeIter& rIter) const = 0;
1167 // returns the number of direct children rIter has
1168 virtual int iter_n_children(const TreeIter& rIter) const = 0;
1169 virtual void remove(const TreeIter& rIter) = 0;
1170 //Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1171 virtual void select(const TreeIter& rIter) = 0;
1172 virtual void unselect(const TreeIter& rIter) = 0;
1173 //visually indent this row as if it was at get_iter_depth() + nIndentLevel
1174 virtual void set_extra_row_indent(const TreeIter& rIter, int nIndentLevel) = 0;
1175 // col index -1 sets the first text column
1176 virtual void set_text(const TreeIter& rIter, const OUString& rStr, int col = -1) = 0;
1177 // col index -1 sets all columns
1178 virtual void set_sensitive(const TreeIter& rIter, bool bSensitive, int col = -1) = 0;
1179 virtual bool get_sensitive(const TreeIter& rIter, int col) const = 0;
1180 virtual void set_text_emphasis(const TreeIter& rIter, bool bOn, int col) = 0;
1181 virtual bool get_text_emphasis(const TreeIter& rIter, int col) const = 0;
1182 virtual void set_text_align(const TreeIter& rIter, double fAlign, int col) = 0;
1183 // col index -1 sets the expander toggle, enable_toggle_buttons must have been called to create that column
1184 virtual void set_toggle(const TreeIter& rIter, TriState bOn, int col = -1) = 0;
1185 // col index -1 gets the expander toggle, enable_toggle_buttons must have been called to create that column
1186 virtual TriState get_toggle(const TreeIter& rIter, int col = -1) const = 0;
1187 // col index -1 gets the first text column
1188 virtual OUString get_text(const TreeIter& rIter, int col = -1) const = 0;
1189 virtual void set_id(const TreeIter& rIter, const OUString& rId) = 0;
1190 virtual OUString get_id(const TreeIter& rIter) const = 0;
1191 // col index -1 sets the expander image
1192 virtual void set_image(const TreeIter& rIter, const OUString& rImage, int col = -1) = 0;
1193 // col index -1 sets the expander image
1194 virtual void set_image(const TreeIter& rIter, VirtualDevice& rImage, int col = -1) = 0;
1195 // col index -1 sets the expander image
1196 virtual void set_image(const TreeIter& rIter,
1197 const css::uno::Reference<css::graphic::XGraphic>& rImage, int col = -1)
1198 = 0;
1199 virtual void set_font_color(const TreeIter& rIter, const Color& rColor) = 0;
1200 // scroll to make rIter visible, this will also expand all parent rows of rIter as necessary to
1201 // make rIter visible
1202 virtual void scroll_to_row(const TreeIter& rIter) = 0;
1203 virtual bool is_selected(const TreeIter& rIter) const = 0;
1204
1205 virtual void move_subtree(TreeIter& rNode, const TreeIter* pNewParent, int nIndexInNewParent)
1206 = 0;
1207
1208 // call func on each element until func returns true or we run out of elements
1209 virtual void all_foreach(const std::function<bool(TreeIter&)>& func) = 0;
1210 // call func on each selected element until func returns true or we run out of elements
1211 virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) = 0;
1212 // call func on each visible element until func returns true or we run out of elements
1213 virtual void visible_foreach(const std::function<bool(TreeIter&)>& func) = 0;
1214 // clear the children of pParent (whole tree if nullptr),
1215 // then add nSourceCount rows under pParent, call func on each row
1216 // inserted with an arg of the index that this row will be when bulk insert
1217 // ends.
1218 //
1219 // this enables inserting the entries backwards in models where that is faster,
1220 //
1221 // pFixedWidths is optional, when present each matching entry col text
1222 // width will not be measured, and the fixed width used instead. Use
1223 // sparingly because wider text than the fixed width is clipped and cannot
1224 // be scrolled into view horizontally.
1225 virtual void bulk_insert_for_each(int nSourceCount,
1226 const std::function<void(TreeIter&, int nSourceIndex)>& func,
1227 const weld::TreeIter* pParent = nullptr,
1228 const std::vector<int>* pFixedWidths = nullptr)
1229 = 0;
1230
1231 /* expanding on-demand node details
1232
1233 When a node is added with children-on-demand (typically via 'insert' with
1234 bChildrenOnDemand of true), then initially in reality the
1235 children-on-demand node is given a 'placeholder' child entry to indicate
1236 the load-on-demand state.
1237
1238 The 'placeholder' needs to be there for the expander indicator to be
1239 drawn/shown even when there are no "real" entries yet. This child doesn't
1240 exist for the purposes of any of the iterator methods, e.g. iter_has_child
1241 on an on-demand node which hasn't been expanded yet is false. Likewise the
1242 rest of the iterator methods skip over or otherwise ignore that node.
1243
1244 Normal usage is the user clicks on the expander, the expansion mechanism
1245 removes the 'placeholder' entry (set_children_on_demand(false)) and calls
1246 any installed expanding-callback (installable via connect_expanding) which
1247 has the opportunity to populate the node with children.
1248
1249 If you decide to directly populate the children of an on-demand node
1250 outside of the expanding-callback then you also need to explicitly remove
1251 the 'placeholder' with set_children_on_demand(false) otherwise the treeview
1252 is in an inconsistent state. */
1253
1254 virtual bool get_row_expanded(const TreeIter& rIter) const = 0;
1255 // expand row will first trigger the callback set via connect_expanding before expanding
1256 virtual void expand_row(const TreeIter& rIter) = 0;
1257 // collapse row will first trigger the callback set via connect_collapsing before collapsing
1258 virtual void collapse_row(const TreeIter& rIter) = 0;
1259 // set the empty node to appear as if it has children, true is equivalent
1260 // to 'insert' with a bChildrenOnDemand of true. See notes above.
1261 virtual void set_children_on_demand(const TreeIter& rIter, bool bChildrenOnDemand) = 0;
1262 // return if the node is configured to be populated on-demand
1263 virtual bool get_children_on_demand(const TreeIter& rIter) const = 0;
1264 // set if the expanders are shown or not
1265 virtual void set_show_expanders(bool bShow) = 0;
1266
1267 void connect_expanding(const Link<const TreeIter&, bool>& rLink) { m_aExpandingHdl = rLink; }
1268 void connect_collapsing(const Link<const TreeIter&, bool>& rLink) { m_aCollapsingHdl = rLink; }
1269
1270 // rStartLink returns true to allow editing, false to disallow
1271 // rEndLink returns true to accept the edit, false to reject
1272 virtual void connect_editing(const Link<const TreeIter&, bool>& rStartLink,
1273 const Link<const iter_string&, bool>& rEndLink)
1274 {
1275 assert(rStartLink.IsSet() == rEndLink.IsSet() && "should be both on or both off");
1276 m_aEditingStartedHdl = rStartLink;
1277 m_aEditingDoneHdl = rEndLink;
1278 }
1279
1280 virtual void start_editing(const weld::TreeIter& rEntry) = 0;
1281 virtual void end_editing() = 0;
1282
1284 {
1285 assert(!m_aVisibleRangeChangedHdl.IsSet() || !rLink.IsSet());
1286 m_aVisibleRangeChangedHdl = rLink;
1287 }
1288
1290 {
1291 m_aPopupMenuHdl = rLink;
1292 }
1293
1295 sal_uInt8 eDNDConstants)
1296 = 0;
1297
1298 void connect_drag_begin(const Link<bool&, bool>& rLink) { m_aDragBeginHdl = rLink; }
1299
1300 //all of them. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1301 void select_all() { unselect(-1); }
1302 void unselect_all() { select(-1); }
1303
1304 // return the number of toplevel nodes
1305 virtual int n_children() const = 0;
1306
1307 // afterwards, entries will be in default ascending sort order
1308 virtual void make_sorted() = 0;
1309 virtual void make_unsorted() = 0;
1310 virtual bool get_sort_order() const = 0;
1311 virtual void set_sort_order(bool bAscending) = 0;
1312
1313 // TRUE ascending, FALSE, descending, INDET, neither (off)
1314 virtual void set_sort_indicator(TriState eState, int nColumn) = 0;
1315 virtual TriState get_sort_indicator(int nColumn) const = 0;
1316
1317 virtual int get_sort_column() const = 0;
1318 virtual void set_sort_column(int nColumn) = 0;
1319
1320 virtual void
1321 set_sort_func(const std::function<int(const weld::TreeIter&, const weld::TreeIter&)>& func)
1322 {
1323 m_aCustomSort = func;
1324 }
1325
1326 virtual void clear() = 0;
1327 virtual int get_height_rows(int nRows) const = 0;
1328
1329 virtual void columns_autosize() = 0;
1330 virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0;
1331 virtual void set_column_editables(const std::vector<bool>& rEditables) = 0;
1332 virtual int get_column_width(int nCol) const = 0;
1333 virtual void set_centered_column(int nCol) = 0;
1334 virtual OUString get_column_title(int nColumn) const = 0;
1335 virtual void set_column_title(int nColumn, const OUString& rTitle) = 0;
1336
1337 int get_checkbox_column_width() const { return get_approximate_digit_width() * 3 + 6; }
1338
1339 virtual void set_selection_mode(SelectionMode eMode) = 0;
1340 virtual int count_selected_rows() const = 0;
1341 // remove the selected nodes
1342 virtual void remove_selection() = 0;
1343
1344 // only meaningful is call this from a "changed" callback, true if the change
1345 // was due to mouse hovering over the entry
1346 virtual bool changed_by_hover() const = 0;
1347
1348 virtual void vadjustment_set_value(int value) = 0;
1349 virtual int vadjustment_get_value() const = 0;
1350
1351 void save_value() { m_sSavedValue = get_selected_text(); }
1352 OUString const& get_saved_value() const { return m_sSavedValue; }
1353 bool get_value_changed_from_saved() const { return m_sSavedValue != get_selected_text(); }
1354
1355 // for custom rendering a cell
1356 void connect_custom_get_size(const Link<get_size_args, Size>& rLink) { m_aGetSizeHdl = rLink; }
1357 void connect_custom_render(const Link<render_args, void>& rLink) { m_aRenderHdl = rLink; }
1358 // call set_column_custom_renderer after setting custom callbacks
1359 virtual void set_column_custom_renderer(int nColumn, bool bEnable) = 0;
1360 // redraw all rows, typically only useful with custom rendering to redraw due to external
1361 // state change
1362 virtual void queue_draw() = 0;
1363
1364 /* with bDnDMode false simply return the row under the point
1365 *
1366 * with bDnDMode true:
1367 * a) return the row which should be dropped on, which may
1368 * be different from the row the mouse is over in some backends where
1369 * positioning the mouse on the bottom half of a row indicates to drop
1370 * after the row
1371 * b) dnd highlight the dest row
1372 */
1373 virtual bool get_dest_row_at_pos(const Point& rPos, weld::TreeIter* pResult, bool bDnDMode,
1374 bool bAutoScroll = true)
1375 = 0;
1376 virtual void unset_drag_dest_row() = 0;
1377 virtual tools::Rectangle get_row_area(const weld::TreeIter& rIter) const = 0;
1378 // for dragging and dropping between TreeViews, return the active source
1379 virtual TreeView* get_drag_source() const = 0;
1380
1383};
1384
1385typedef std::tuple<tools::JsonWriter&, const TreeIter&, std::string_view> json_prop_query;
1386
1387class VCL_DLLPUBLIC IconView : virtual public Widget
1388{
1389 friend class ::LOKTrigger;
1390
1391private:
1393
1394protected:
1400
1401 void signal_selection_changed() { m_aSelectionChangeHdl.Call(*this); }
1402 bool signal_item_activated() { return m_aItemActivatedHdl.Call(*this); }
1403 OUString signal_query_tooltip(const TreeIter& rIter) const
1404 {
1405 return m_aQueryTooltipHdl.Call(rIter);
1406 }
1407
1408public:
1409 virtual int get_item_width() const = 0;
1410 virtual void set_item_width(int width) = 0;
1411
1412 virtual void insert(int pos, const OUString* pStr, const OUString* pId,
1413 const OUString* pIconName, TreeIter* pRet)
1414 = 0;
1415
1416 virtual void insert(int pos, const OUString* pStr, const OUString* pId,
1417 const VirtualDevice* pIcon, TreeIter* pRet)
1418 = 0;
1419
1420 virtual void insert_separator(int pos, const OUString* pId) = 0;
1421
1422 void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
1423 {
1424 insert(-1, &rStr, &rId, &rImage, nullptr);
1425 }
1426
1427 void append(const OUString& rId, const OUString& rStr, const VirtualDevice* pImage)
1428 {
1429 insert(-1, &rStr, &rId, pImage, nullptr);
1430 }
1431
1432 void append_separator(const OUString& rId) { insert_separator(-1, &rId); }
1433
1435 {
1436 m_aSelectionChangeHdl = rLink;
1437 }
1438
1439 /* A row is "activated" when the user double clicks a treeview row. It may
1440 also be emitted when a row is selected and Space or Enter is pressed.
1441
1442 a return of "true" means the activation has been handled, a "false" propagates
1443 the activation to the default handler which expands/collapses the row, if possible.
1444 */
1445 void connect_item_activated(const Link<IconView&, bool>& rLink) { m_aItemActivatedHdl = rLink; }
1446
1447 void connect_command(const Link<const CommandEvent&, bool>& rLink) { m_aCommandHdl = rLink; }
1448
1450 {
1451 m_aQueryTooltipHdl = rLink;
1452 }
1453
1454 // 0: json writer, 1: TreeIter, 2: property. returns true if supported
1456 {
1457 m_aGetPropertyTreeElemHdl = rLink;
1458 }
1459
1460 virtual OUString get_selected_id() const = 0;
1461
1462 virtual void clear() = 0;
1463
1464 virtual int count_selected_items() const = 0;
1465
1466 virtual OUString get_selected_text() const = 0;
1467
1468 //by index. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1469 virtual void select(int pos) = 0;
1470 virtual void unselect(int pos) = 0;
1471
1472 //via iter
1473 virtual std::unique_ptr<TreeIter> make_iterator(const TreeIter* pOrig = nullptr) const = 0;
1474 virtual bool get_selected(TreeIter* pIter) const = 0;
1475 virtual bool get_cursor(TreeIter* pIter) const = 0;
1476 virtual void set_cursor(const TreeIter& rIter) = 0;
1477 virtual bool get_iter_first(TreeIter& rIter) const = 0;
1478 virtual OUString get_id(const TreeIter& rIter) const = 0;
1479 virtual OUString get_text(const TreeIter& rIter) const = 0;
1480 virtual void scroll_to_item(const TreeIter& rIter) = 0;
1481
1482 // call func on each selected element until func returns true or we run out of elements
1483 virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) = 0;
1484
1485 //all of them. Don't select when frozen, select after thaw. Note selection doesn't survive a freeze.
1486 void select_all() { unselect(-1); }
1487 void unselect_all() { select(-1); }
1488
1489 // return the number of toplevel nodes
1490 virtual int n_children() const = 0;
1491
1492 void save_value() { m_sSavedValue = get_selected_text(); }
1493 OUString const& get_saved_value() const { return m_sSavedValue; }
1494 bool get_value_changed_from_saved() const { return m_sSavedValue != get_selected_text(); }
1495};
1496
1497class VCL_DLLPUBLIC Button : virtual public Widget
1498{
1499 friend class ::LOKTrigger;
1500
1501protected:
1503
1504 void signal_clicked() { m_aClickHdl.Call(*this); }
1505
1506public:
1507 virtual void set_label(const OUString& rText) = 0;
1508 // pDevice, the image for the button, or nullptr to unset
1509 virtual void set_image(VirtualDevice* pDevice) = 0;
1510 virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
1511 virtual void set_from_icon_name(const OUString& rIconName) = 0;
1512 virtual OUString get_label() const = 0;
1513 void clicked() { signal_clicked(); }
1514 bool is_custom_handler_set() { return m_aClickHdl.IsSet(); }
1515
1516 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
1517 virtual void set_font(const vcl::Font& rFont) = 0;
1518
1519 /* Sometimes, a widget should behave like a button (activate on click,
1520 accept keyboard focus, etc), but look entirely different.
1521
1522 pDevice, the custom look to use, or nullptr to unset.
1523
1524 Typically doing this is ill advised. Consider using
1525 set_accessible_name if you do. */
1526 virtual void set_custom_button(VirtualDevice* pDevice) = 0;
1527
1528 void connect_clicked(const Link<Button&, void>& rLink) { m_aClickHdl = rLink; }
1529};
1530
1531class VCL_DLLPUBLIC Toggleable : virtual public Widget
1532{
1533 friend class ::LOKTrigger;
1534
1535protected:
1537 TriState m_eSavedValue = TRISTATE_FALSE;
1538
1539 void signal_toggled() { m_aToggleHdl.Call(*this); }
1540
1541public:
1542 virtual void set_active(bool active) = 0;
1543 virtual bool get_active() const = 0;
1544
1545 virtual void set_inconsistent(bool inconsistent) = 0;
1546 virtual bool get_inconsistent() const = 0;
1547
1549 {
1550 if (get_inconsistent())
1551 return TRISTATE_INDET;
1552 else if (get_active())
1553 return TRISTATE_TRUE;
1554 return TRISTATE_FALSE;
1555 }
1556
1557 void set_state(TriState eState)
1558 {
1559 switch (eState)
1560 {
1561 case TRISTATE_INDET:
1562 set_inconsistent(true);
1563 break;
1564 case TRISTATE_TRUE:
1565 set_inconsistent(false);
1566 set_active(true);
1567 break;
1568 case TRISTATE_FALSE:
1569 set_inconsistent(false);
1570 set_active(false);
1571 break;
1572 }
1573 }
1574
1575 void save_state() { m_eSavedValue = get_state(); }
1576 TriState get_saved_state() const { return m_eSavedValue; }
1577 bool get_state_changed_from_saved() const { return m_eSavedValue != get_state(); }
1578
1579 virtual void connect_toggled(const Link<Toggleable&, void>& rLink) { m_aToggleHdl = rLink; }
1580};
1581
1582class VCL_DLLPUBLIC ToggleButton : virtual public Button, virtual public Toggleable
1583{
1584 friend class ::LOKTrigger;
1585};
1586
1588{
1592 : eState(TRISTATE_INDET)
1593 , bTriStateEnabled(true)
1594 {
1595 }
1596 void ButtonToggled(Toggleable& rToggle);
1597};
1598
1600{
1601 friend class ::LOKTrigger;
1602
1604
1605protected:
1606 void signal_selected(const OUString& rIdent) { m_aSelectHdl.Call(rIdent); }
1607
1608public:
1609 void connect_selected(const Link<const OUString&, void>& rLink) { m_aSelectHdl = rLink; }
1610
1611 virtual void insert_item(int pos, const OUString& rId, const OUString& rStr,
1612 const OUString* pIconName, VirtualDevice* pImageSurface,
1613 TriState eCheckRadioFalse)
1614 = 0;
1615 void append_item(const OUString& rId, const OUString& rStr)
1616 {
1617 insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_INDET);
1618 }
1619 void append_item_check(const OUString& rId, const OUString& rStr)
1620 {
1621 insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_TRUE);
1622 }
1623 void append_item_radio(const OUString& rId, const OUString& rStr)
1624 {
1625 insert_item(-1, rId, rStr, nullptr, nullptr, TRISTATE_FALSE);
1626 }
1627 void append_item(const OUString& rId, const OUString& rStr, const OUString& rImage)
1628 {
1629 insert_item(-1, rId, rStr, &rImage, nullptr, TRISTATE_INDET);
1630 }
1631 void append_item(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
1632 {
1633 insert_item(-1, rId, rStr, nullptr, &rImage, TRISTATE_INDET);
1634 }
1635 virtual void insert_separator(int pos, const OUString& rId) = 0;
1636 void append_separator(const OUString& rId) { insert_separator(-1, rId); }
1637 virtual void remove_item(const OUString& rId) = 0;
1638 virtual void clear() = 0;
1639 virtual void set_item_sensitive(const OUString& rIdent, bool bSensitive) = 0;
1640 virtual void set_item_active(const OUString& rIdent, bool bActive) = 0;
1641 virtual void set_item_label(const OUString& rIdent, const OUString& rLabel) = 0;
1642 virtual OUString get_item_label(const OUString& rIdent) const = 0;
1643 virtual void set_item_visible(const OUString& rIdent, bool bVisible) = 0;
1644
1645 virtual void set_popover(weld::Widget* pPopover) = 0;
1646};
1647
1648// Similar to a MenuButton except it is split into two parts, a toggle
1649// button at the start and a menubutton at the end
1651{
1652};
1653
1655{
1656public:
1657 virtual void set_label(const OUString& rText) = 0;
1658 virtual OUString get_label() const = 0;
1659 virtual void set_label_wrap(bool wrap) = 0;
1660};
1661
1663{
1664};
1665
1666class VCL_DLLPUBLIC LinkButton : virtual public Widget
1667{
1669
1670protected:
1671 bool signal_activate_link() { return m_aActivateLinkHdl.Call(*this); }
1672
1673public:
1674 virtual void set_label(const OUString& rText) = 0;
1675 virtual OUString get_label() const = 0;
1676 virtual void set_label_wrap(bool wrap) = 0;
1677 virtual void set_uri(const OUString& rUri) = 0;
1678 virtual OUString get_uri() const = 0;
1679
1680 void connect_activate_link(const Link<LinkButton&, bool>& rLink) { m_aActivateLinkHdl = rLink; }
1681};
1682
1683class VCL_DLLPUBLIC Scale : virtual public Widget
1684{
1686
1687protected:
1688 void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1689
1690public:
1691 virtual void set_value(int value) = 0;
1692 virtual int get_value() const = 0;
1693 virtual void set_range(int min, int max) = 0;
1694
1695 virtual void set_increments(int step, int page) = 0;
1696 virtual void get_increments(int& step, int& page) const = 0;
1697
1698 void connect_value_changed(const Link<Scale&, void>& rLink) { m_aValueChangedHdl = rLink; }
1699};
1700
1701class VCL_DLLPUBLIC Spinner : virtual public Widget
1702{
1703public:
1704 virtual void start() = 0;
1705 virtual void stop() = 0;
1706};
1707
1708class VCL_DLLPUBLIC ProgressBar : virtual public Widget
1709{
1710public:
1711 //0-100
1712 virtual void set_percentage(int value) = 0;
1713 virtual OUString get_text() const = 0;
1714 virtual void set_text(const OUString& rText) = 0;
1715};
1716
1717class VCL_DLLPUBLIC Entry : virtual public Widget
1718{
1719private:
1721
1722protected:
1727
1728 friend class ::LOKTrigger;
1729
1730 void signal_changed() { m_aChangeHdl.Call(*this); }
1731 void signal_cursor_position() { m_aCursorPositionHdl.Call(*this); }
1732
1733public:
1734 virtual void set_text(const OUString& rText) = 0;
1735 virtual OUString get_text() const = 0;
1736 virtual void set_width_chars(int nChars) = 0;
1737 virtual int get_width_chars() const = 0;
1738 // The maximum length of the entry. Use 0 for no maximum
1739 virtual void set_max_length(int nChars) = 0;
1740 // nEndPos can be -1 in order to select all text
1741 virtual void select_region(int nStartPos, int nEndPos) = 0;
1742 // returns true if the selection has nonzero length
1743 virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
1744 virtual void replace_selection(const OUString& rText) = 0;
1745 // nCursorPos can be -1 to set to the end
1746 virtual void set_position(int nCursorPos) = 0;
1747 virtual int get_position() const = 0;
1748 virtual void set_editable(bool bEditable) = 0;
1749 virtual bool get_editable() const = 0;
1750 virtual void set_message_type(EntryMessageType eType) = 0;
1751 virtual void set_placeholder_text(const OUString& rText) = 0;
1752
1753 virtual void set_overwrite_mode(bool bOn) = 0;
1754 virtual bool get_overwrite_mode() const = 0;
1755
1756 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
1757 virtual void set_font(const vcl::Font& rFont) = 0;
1758
1759 /*
1760 If you want to set a warning or error state, see set_message_type
1761 instead where, if the toolkit supports it, a specific warning/error
1762 indicator is shown.
1763
1764 This explicit text color method exists to support rendering the
1765 SvNumberformat color feature.
1766 */
1767 virtual void set_font_color(const Color& rColor) = 0;
1768
1769 virtual void connect_changed(const Link<Entry&, void>& rLink) { m_aChangeHdl = rLink; }
1770 void connect_insert_text(const Link<OUString&, bool>& rLink) { m_aInsertTextHdl = rLink; }
1771 // callback returns true to indicated no further processing of activate wanted
1772 void connect_activate(const Link<Entry&, bool>& rLink) { m_aActivateHdl = rLink; }
1774 {
1775 m_aCursorPositionHdl = rLink;
1776 }
1777
1778 virtual void cut_clipboard() = 0;
1779 virtual void copy_clipboard() = 0;
1780 virtual void paste_clipboard() = 0;
1781
1782 virtual void set_alignment(TxtAlign eXAlign) = 0;
1783
1784 void save_value() { m_sSavedValue = get_text(); }
1785 OUString const& get_saved_value() const { return m_sSavedValue; }
1786 bool get_value_changed_from_saved() const { return m_sSavedValue != get_text(); }
1787};
1788
1789class VCL_DLLPUBLIC SpinButton : virtual public Entry
1790{
1791 friend class ::LOKTrigger;
1792
1796
1797protected:
1798 void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1799
1801 {
1802 if (!m_aOutputHdl.IsSet())
1803 return false;
1804 m_aOutputHdl.Call(*this);
1805 return true;
1806 }
1807
1809 {
1810 if (!m_aInputHdl.IsSet())
1811 return TRISTATE_INDET;
1812 return m_aInputHdl.Call(result) ? TRISTATE_TRUE : TRISTATE_FALSE;
1813 }
1814
1815public:
1816 virtual void set_value(sal_Int64 value) = 0;
1817 virtual sal_Int64 get_value() const = 0;
1818 virtual void set_range(sal_Int64 min, sal_Int64 max) = 0;
1819 virtual void get_range(sal_Int64& min, sal_Int64& max) const = 0;
1820 void set_min(sal_Int64 min)
1821 {
1822 sal_Int64 dummy, max;
1823 get_range(dummy, max);
1824 set_range(min, max);
1825 }
1826 void set_max(sal_Int64 max)
1827 {
1828 sal_Int64 min, dummy;
1829 get_range(min, dummy);
1830 set_range(min, max);
1831 }
1832 sal_Int64 get_min() const
1833 {
1834 sal_Int64 min, dummy;
1835 get_range(min, dummy);
1836 return min;
1837 }
1838 sal_Int64 get_max() const
1839 {
1840 sal_Int64 dummy, max;
1841 get_range(dummy, max);
1842 return max;
1843 }
1844 virtual void set_increments(int step, int page) = 0;
1845 virtual void get_increments(int& step, int& page) const = 0;
1846 virtual void set_digits(unsigned int digits) = 0;
1847 virtual unsigned int get_digits() const = 0;
1848
1849 void connect_value_changed(const Link<SpinButton&, void>& rLink) { m_aValueChangedHdl = rLink; }
1850
1851 void connect_output(const Link<SpinButton&, void>& rLink) { m_aOutputHdl = rLink; }
1852 void connect_input(const Link<int*, bool>& rLink) { m_aInputHdl = rLink; }
1853
1854 sal_Int64 normalize(sal_Int64 nValue) const { return (nValue * Power10(get_digits())); }
1855
1856 sal_Int64 denormalize(sal_Int64 nValue) const;
1857
1858 static unsigned int Power10(unsigned int n);
1859};
1860
1861class EntryFormatter;
1862
1863// Similar to a SpinButton, but input and output formatting and range/value
1864// are managed by a more complex Formatter which can support doubles.
1866{
1867 friend class ::LOKTrigger;
1868
1870
1871protected:
1872 void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
1873
1874public:
1875 virtual Formatter& GetFormatter() = 0;
1876 // does not take ownership, and so must be deregistered if pFormatter
1877 // is destroyed
1878 virtual void SetFormatter(weld::EntryFormatter* pFormatter) = 0;
1879
1881 {
1882 m_aValueChangedHdl = rLink;
1883 }
1884
1885private:
1886 friend class EntryFormatter;
1887 virtual void sync_range_from_formatter() = 0;
1888 virtual void sync_value_from_formatter() = 0;
1890};
1891
1892class VCL_DLLPUBLIC Image : virtual public Widget
1893{
1894public:
1895 virtual void set_from_icon_name(const OUString& rIconName) = 0;
1896 virtual void set_image(VirtualDevice* pDevice) = 0;
1897 virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) = 0;
1898};
1899
1900class VCL_DLLPUBLIC Calendar : virtual public Widget
1901{
1902 friend class ::LOKTrigger;
1903
1906
1907protected:
1908 void signal_selected() { m_aSelectedHdl.Call(*this); }
1909 void signal_activated() { m_aActivatedHdl.Call(*this); }
1910
1911public:
1912 void connect_selected(const Link<Calendar&, void>& rLink) { m_aSelectedHdl = rLink; }
1913 void connect_activated(const Link<Calendar&, void>& rLink) { m_aActivatedHdl = rLink; }
1914
1915 virtual void set_date(const Date& rDate) = 0;
1916 virtual Date get_date() const = 0;
1917};
1918
1919// an entry + treeview pair, where the entry autocompletes from the
1920// treeview list, and selecting something in the list sets the
1921// entry to that text, i.e. a visually exploded ComboBox
1923{
1924private:
1927 void EntryModifyHdl(const weld::Entry& rEntry);
1928
1929protected:
1930 std::unique_ptr<Entry> m_xEntry;
1931 std::unique_ptr<TreeView> m_xTreeView;
1932
1933public:
1934 EntryTreeView(std::unique_ptr<Entry> xEntry, std::unique_ptr<TreeView> xTreeView);
1935
1936 virtual void insert_vector(const std::vector<weld::ComboBoxEntry>& rItems,
1937 bool bKeepExisting) override
1938 {
1939 m_xTreeView->freeze();
1940 if (!bKeepExisting)
1941 m_xTreeView->clear();
1942 for (const auto& rItem : rItems)
1943 append(rItem);
1944 m_xTreeView->thaw();
1945 }
1946
1947 virtual void insert(int pos, const OUString& rStr, const OUString* pId,
1948 const OUString* pIconName, VirtualDevice* pImageSurface) override
1949 {
1950 m_xTreeView->insert(pos, rStr, pId, pIconName, pImageSurface);
1951 }
1952
1953 virtual int get_count() const override { return m_xTreeView->n_children(); }
1954 virtual void clear() override { m_xTreeView->clear(); }
1955
1956 //by index
1957 virtual int get_active() const override { return m_xTreeView->get_selected_index(); }
1958 virtual void set_active(int pos) override
1959 {
1960 m_xTreeView->set_cursor(pos);
1961 m_xTreeView->select(pos);
1962 m_xEntry->set_text(m_xTreeView->get_selected_text());
1963 }
1964 virtual void remove(int pos) override { m_xTreeView->remove(pos); }
1965
1966 //by text
1967 virtual OUString get_active_text() const override { return m_xEntry->get_text(); }
1968 virtual OUString get_text(int pos) const override { return m_xTreeView->get_text(pos); }
1969 virtual int find_text(const OUString& rStr) const override
1970 {
1971 return m_xTreeView->find_text(rStr);
1972 }
1973
1974 //by id
1975 virtual OUString get_active_id() const override { return m_xTreeView->get_selected_id(); }
1976 virtual void set_active_id(const OUString& rStr) override
1977 {
1978 m_xTreeView->select_id(rStr);
1979 m_xEntry->set_text(m_xTreeView->get_selected_text());
1980 }
1981 virtual OUString get_id(int pos) const override { return m_xTreeView->get_id(pos); }
1982 virtual void set_id(int pos, const OUString& rId) override { m_xTreeView->set_id(pos, rId); }
1983 virtual int find_id(const OUString& rId) const override { return m_xTreeView->find_id(rId); }
1984
1985 //entry related
1986 virtual bool has_entry() const override { return true; }
1987 virtual void set_entry_message_type(EntryMessageType eType) override
1988 {
1989 m_xEntry->set_message_type(eType);
1990 }
1991 virtual void set_entry_text(const OUString& rStr) override { m_xEntry->set_text(rStr); }
1992 virtual void set_entry_width_chars(int nChars) override { m_xEntry->set_width_chars(nChars); }
1993 virtual void set_entry_max_length(int nChars) override { m_xEntry->set_max_length(nChars); }
1994 virtual void select_entry_region(int nStartPos, int nEndPos) override
1995 {
1996 m_xEntry->select_region(nStartPos, nEndPos);
1997 }
1998 //if no text was selected, both rStartPos and rEndPos will be identical
1999 //and false will be returned
2000 virtual bool get_entry_selection_bounds(int& rStartPos, int& rEndPos) override
2001 {
2002 return m_xEntry->get_selection_bounds(rStartPos, rEndPos);
2003 }
2005 {
2006 m_xTreeView->connect_row_activated(rLink);
2007 }
2008
2009 virtual bool get_popup_shown() const override { return false; }
2010
2011 void set_height_request_by_rows(int nRows);
2012};
2013
2015{
2017 std::unique_ptr<weld::SpinButton> m_xSpinButton;
2019
2020 DECL_LINK(spin_button_value_changed, weld::SpinButton&, void);
2021 DECL_LINK(spin_button_output, weld::SpinButton&, void);
2022 DECL_LINK(spin_button_input, int* result, bool);
2023
2024 void signal_value_changed() { m_aValueChangedHdl.Call(*this); }
2025
2026 sal_Int64 ConvertValue(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const;
2027 OUString format_number(sal_Int64 nValue) const;
2028 void update_width_chars();
2029
2030public:
2031 MetricSpinButton(std::unique_ptr<SpinButton> pSpinButton, FieldUnit eSrcUnit)
2032 : m_eSrcUnit(eSrcUnit)
2033 , m_xSpinButton(std::move(pSpinButton))
2034 {
2035 update_width_chars();
2036 m_xSpinButton->connect_output(LINK(this, MetricSpinButton, spin_button_output));
2037 m_xSpinButton->connect_input(LINK(this, MetricSpinButton, spin_button_input));
2038 m_xSpinButton->connect_value_changed(
2039 LINK(this, MetricSpinButton, spin_button_value_changed));
2040 spin_button_output(*m_xSpinButton);
2041 }
2042
2043 static OUString MetricToString(FieldUnit rUnit);
2044
2045 FieldUnit get_unit() const { return m_eSrcUnit; }
2046
2047 void set_unit(FieldUnit eUnit);
2048
2049 sal_Int64 convert_value_to(sal_Int64 nValue, FieldUnit eValueUnit) const
2050 {
2051 return ConvertValue(nValue, m_eSrcUnit, eValueUnit);
2052 }
2053
2054 sal_Int64 convert_value_from(sal_Int64 nValue, FieldUnit eValueUnit) const
2055 {
2056 return ConvertValue(nValue, eValueUnit, m_eSrcUnit);
2057 }
2058
2059 void set_value(sal_Int64 nValue, FieldUnit eValueUnit)
2060 {
2061 m_xSpinButton->set_value(convert_value_from(nValue, eValueUnit));
2062 }
2063
2064 sal_Int64 get_value(FieldUnit eDestUnit) const
2065 {
2066 return convert_value_to(m_xSpinButton->get_value(), eDestUnit);
2067 }
2068
2069 // typically you only need to call this if set_text (e.g. with "") was
2070 // previously called to display some arbitrary text instead of the
2071 // formatted value and now you want to show it as formatted again
2072 void reformat() { spin_button_output(*m_xSpinButton); }
2073
2074 void set_range(sal_Int64 min, sal_Int64 max, FieldUnit eValueUnit)
2075 {
2076 min = convert_value_from(min, eValueUnit);
2077 max = convert_value_from(max, eValueUnit);
2078 m_xSpinButton->set_range(min, max);
2079 update_width_chars();
2080 }
2081
2082 void get_range(sal_Int64& min, sal_Int64& max, FieldUnit eDestUnit) const
2083 {
2084 m_xSpinButton->get_range(min, max);
2085 min = convert_value_to(min, eDestUnit);
2086 max = convert_value_to(max, eDestUnit);
2087 }
2088
2089 void set_min(sal_Int64 min, FieldUnit eValueUnit)
2090 {
2091 sal_Int64 dummy, max;
2092 get_range(dummy, max, eValueUnit);
2093 set_range(min, max, eValueUnit);
2094 }
2095
2096 void set_max(sal_Int64 max, FieldUnit eValueUnit)
2097 {
2098 sal_Int64 min, dummy;
2099 get_range(min, dummy, eValueUnit);
2100 set_range(min, max, eValueUnit);
2101 }
2102
2103 sal_Int64 get_min(FieldUnit eValueUnit) const
2104 {
2105 sal_Int64 min, dummy;
2106 get_range(min, dummy, eValueUnit);
2107 return min;
2108 }
2109
2110 sal_Int64 get_max(FieldUnit eValueUnit) const
2111 {
2112 sal_Int64 dummy, max;
2113 get_range(dummy, max, eValueUnit);
2114 return max;
2115 }
2116
2117 void set_increments(int step, int page, FieldUnit eValueUnit)
2118 {
2119 step = convert_value_from(step, eValueUnit);
2120 page = convert_value_from(page, eValueUnit);
2121 m_xSpinButton->set_increments(step, page);
2122 }
2123
2124 void get_increments(int& step, int& page, FieldUnit eDestUnit) const
2125 {
2126 m_xSpinButton->get_increments(step, page);
2127 step = convert_value_to(step, eDestUnit);
2128 page = convert_value_to(page, eDestUnit);
2129 }
2130
2132 {
2133 m_aValueChangedHdl = rLink;
2134 }
2135
2136 sal_Int64 normalize(sal_Int64 nValue) const { return m_xSpinButton->normalize(nValue); }
2137 sal_Int64 denormalize(sal_Int64 nValue) const { return m_xSpinButton->denormalize(nValue); }
2138 void set_sensitive(bool sensitive) { m_xSpinButton->set_sensitive(sensitive); }
2139 bool get_sensitive() const { return m_xSpinButton->get_sensitive(); }
2140 bool get_visible() const { return m_xSpinButton->get_visible(); }
2141 void grab_focus() { m_xSpinButton->grab_focus(); }
2142 bool has_focus() const { return m_xSpinButton->has_focus(); }
2143 void show() { m_xSpinButton->show(); }
2144 void set_visible(bool bShow) { m_xSpinButton->set_visible(bShow); }
2145 void hide() { m_xSpinButton->hide(); }
2146 void set_digits(unsigned int digits);
2147 void set_accessible_name(const OUString& rName) { m_xSpinButton->set_accessible_name(rName); }
2148 unsigned int get_digits() const { return m_xSpinButton->get_digits(); }
2149 void save_value() { m_xSpinButton->save_value(); }
2151 {
2152 return m_xSpinButton->get_value_changed_from_saved();
2153 }
2154 void set_text(const OUString& rText) { m_xSpinButton->set_text(rText); }
2155 OUString get_text() const { return m_xSpinButton->get_text(); }
2156 void set_size_request(int nWidth, int nHeight)
2157 {
2158 m_xSpinButton->set_size_request(nWidth, nHeight);
2159 }
2160 Size get_size_request() const { return m_xSpinButton->get_size_request(); }
2161 Size get_preferred_size() const { return m_xSpinButton->get_preferred_size(); }
2163 {
2164 m_xSpinButton->connect_focus_in(rLink);
2165 }
2167 {
2168 m_xSpinButton->connect_focus_out(rLink);
2169 }
2170 OUString get_buildable_name() const { return m_xSpinButton->get_buildable_name(); }
2171 void set_help_id(const OUString& rName) { m_xSpinButton->set_help_id(rName); }
2172 void set_position(int nCursorPos) { m_xSpinButton->set_position(nCursorPos); }
2173 // set the width of the underlying widget in characters, this setting is
2174 // invalidated when changing the units, range or digits, so to have effect
2175 // must come after changing those values
2176 void set_width_chars(int nChars) { m_xSpinButton->set_width_chars(nChars); }
2177 int get_width_chars() const { return m_xSpinButton->get_width_chars(); }
2178 weld::SpinButton& get_widget() { return *m_xSpinButton; }
2179};
2180
2181enum class LabelType
2182{
2183 Normal,
2184 Warning,
2185 Error,
2186 Title, // this is intended to be used against the background set by set_title_background
2187};
2188
2189class VCL_DLLPUBLIC Label : virtual public Widget
2190{
2191public:
2192 virtual void set_label(const OUString& rText) = 0;
2193 virtual OUString get_label() const = 0;
2194 virtual void set_mnemonic_widget(Widget* pTarget) = 0;
2195 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
2196 virtual void set_font(const vcl::Font& rFont) = 0;
2197 virtual void set_label_type(LabelType eType) = 0;
2198 /*
2199 If you want to set a warning or error state, see set_label_type
2200 instead.
2201 */
2202 virtual void set_font_color(const Color& rColor) = 0;
2203};
2204
2205class VCL_DLLPUBLIC TextView : virtual public Widget
2206{
2207 friend class ::LOKTrigger;
2208
2209private:
2211
2212protected:
2216
2217 void signal_changed() { m_aChangeHdl.Call(*this); }
2218 void signal_cursor_position() { m_aCursorPositionHdl.Call(*this); }
2219 void signal_vadjustment_changed() { m_aVChangeHdl.Call(*this); }
2220
2221public:
2222 virtual void set_text(const OUString& rText) = 0;
2223 virtual OUString get_text() const = 0;
2224 // if nStartPos or nEndPos is -1 the max available text pos will be used
2225 virtual void select_region(int nStartPos, int nEndPos) = 0;
2226 // returns true if the selection has nonzero length
2227 virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0;
2228 virtual void replace_selection(const OUString& rText) = 0;
2229 virtual void set_editable(bool bEditable) = 0;
2230 virtual bool get_editable() const = 0;
2231 virtual void set_monospace(bool bMonospace) = 0;
2232 // The maximum length of the entry. Use 0 for no maximum
2233 virtual void set_max_length(int nChars) = 0;
2234 int get_height_rows(int nRows) const
2235 {
2236 //can improve this if needed
2237 return get_text_height() * nRows;
2238 }
2239
2240 // font size is in points, not pixels, e.g. see Window::[G]etPointFont
2241 virtual void set_font(const vcl::Font& rFont) = 0;
2242
2243 /*
2244 Typically you want to avoid the temptation of customizing
2245 font colors
2246 */
2247 virtual void set_font_color(const Color& rColor) = 0;
2248
2249 void save_value() { m_sSavedValue = get_text(); }
2250 bool get_value_changed_from_saved() const { return m_sSavedValue != get_text(); }
2251
2252 void connect_changed(const Link<TextView&, void>& rLink) { m_aChangeHdl = rLink; }
2254 {
2255 m_aCursorPositionHdl = rLink;
2256 }
2257
2258 // returns true if pressing up would move the cursor
2259 // doesn't matter if that move is to a previous line or to the start of the
2260 // current line just so long as the cursor would move
2261 virtual bool can_move_cursor_with_up() const = 0;
2262
2263 // returns true if pressing down would move the cursor
2264 // doesn't matter if that move is to a next line or to the end of the
2265 // current line just so long as the cursor would move
2266 virtual bool can_move_cursor_with_down() const = 0;
2267
2268 virtual void cut_clipboard() = 0;
2269 virtual void copy_clipboard() = 0;
2270 virtual void paste_clipboard() = 0;
2271
2272 virtual void set_alignment(TxtAlign eXAlign) = 0;
2273
2274 virtual int vadjustment_get_value() const = 0;
2275 virtual int vadjustment_get_upper() const = 0;
2276 virtual int vadjustment_get_lower() const = 0;
2277 virtual int vadjustment_get_page_size() const = 0;
2278 virtual void vadjustment_set_value(int value) = 0;
2279 void connect_vadjustment_changed(const Link<TextView&, void>& rLink) { m_aVChangeHdl = rLink; }
2280};
2281
2282class VCL_DLLPUBLIC Expander : virtual public Widget
2283{
2285
2286protected:
2287 void signal_expanded() { m_aExpandedHdl.Call(*this); }
2288
2289public:
2290 virtual void set_label(const OUString& rText) = 0;
2291 virtual OUString get_label() const = 0;
2292 virtual bool get_expanded() const = 0;
2293 virtual void set_expanded(bool bExpand) = 0;
2294
2295 void connect_expanded(const Link<Expander&, void>& rLink) { m_aExpandedHdl = rLink; }
2296};
2297
2298class VCL_DLLPUBLIC DrawingArea : virtual public Widget
2299{
2300public:
2301 typedef std::pair<vcl::RenderContext&, const tools::Rectangle&> draw_args;
2302
2303protected:
2308 // if handler returns true, drag is disallowed
2310 // return position of cursor, fill OUString& with surrounding text
2312 // attempt to delete the range, return true if successful
2314
2316 {
2317 return m_aQueryTooltipHdl.Call(rHelpArea);
2318 }
2319
2320 int signal_im_context_get_surrounding(OUString& rSurroundingText)
2321 {
2322 if (!m_aGetSurroundingHdl.IsSet())
2323 return -1;
2324 return m_aGetSurroundingHdl.Call(rSurroundingText);
2325 }
2326
2328 {
2329 return m_aDeleteSurroundingHdl.Call(rRange);
2330 }
2331
2332public:
2333 void connect_draw(const Link<draw_args, void>& rLink) { m_aDrawHdl = rLink; }
2334 void connect_command(const Link<const CommandEvent&, bool>& rLink) { m_aCommandHdl = rLink; }
2336 {
2337 m_aGetFocusRectHdl = rLink;
2338 }
2340 {
2341 m_aQueryTooltipHdl = rLink;
2342 }
2343 void connect_drag_begin(const Link<DrawingArea&, bool>& rLink) { m_aDragBeginHdl = rLink; }
2345 {
2346 m_aGetSurroundingHdl = rLink;
2347 }
2349 {
2350 m_aDeleteSurroundingHdl = rLink;
2351 }
2352 virtual void queue_draw() = 0;
2353 virtual void queue_draw_area(int x, int y, int width, int height) = 0;
2354
2356 sal_uInt8 eDNDConstants)
2357 = 0;
2358
2359 virtual void set_cursor(PointerStyle ePointerStyle) = 0;
2360
2361 virtual Point get_pointer_position() const = 0;
2362
2363 virtual void set_input_context(const InputContext& rInputContext) = 0;
2364 virtual void im_context_set_cursor_location(const tools::Rectangle& rCursorRect,
2365 int nExtTextInputWidth)
2366 = 0;
2367
2368 // use return here just to generate matching VirtualDevices
2370
2374
2375private:
2376 friend class ::LOKTrigger;
2377
2378 virtual void click(const Point&) = 0;
2379
2380 virtual void dblclick(const Point&){};
2381
2382 virtual void mouse_up(const Point&){};
2383
2384 virtual void mouse_down(const Point&){};
2385
2386 virtual void mouse_move(const Point&){};
2387};
2388
2389enum class Placement
2390{
2391 Under,
2392 End
2393};
2394
2396{
2398
2399protected:
2400 void signal_activate(const OUString& rIdent) { m_aActivateHdl.Call(rIdent); }
2401
2402public:
2403 virtual OUString popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect,
2404 Placement ePlace = Placement::Under)
2405 = 0;
2406
2407 void connect_activate(const Link<const OUString&, void>& rLink) { m_aActivateHdl = rLink; }
2408
2409 virtual void set_sensitive(const OUString& rIdent, bool bSensitive) = 0;
2410 virtual bool get_sensitive(const OUString& rIdent) const = 0;
2411 virtual void set_label(const OUString& rIdent, const OUString& rLabel) = 0;
2412 virtual OUString get_label(const OUString& rIdent) const = 0;
2413 virtual void set_active(const OUString& rIdent, bool bActive) = 0;
2414 virtual bool get_active(const OUString& rIdent) const = 0;
2415 virtual void set_visible(const OUString& rIdent, bool bVisible) = 0;
2416
2417 virtual void insert(int pos, const OUString& rId, const OUString& rStr,
2418 const OUString* pIconName, VirtualDevice* pImageSurface,
2419 const css::uno::Reference<css::graphic::XGraphic>& rImage,
2420 TriState eCheckRadioFalse)
2421 = 0;
2422
2423 virtual void set_item_help_id(const OUString& rIdent, const OUString& rHelpId) = 0;
2424 virtual void remove(const OUString& rId) = 0;
2425
2426 virtual void clear() = 0;
2427
2428 virtual void insert_separator(int pos, const OUString& rId) = 0;
2429 void append_separator(const OUString& rId) { insert_separator(-1, rId); }
2430
2431 void append(const OUString& rId, const OUString& rStr)
2432 {
2433 insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_INDET);
2434 }
2435 void append_check(const OUString& rId, const OUString& rStr)
2436 {
2437 insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_TRUE);
2438 }
2439 void append_radio(const OUString& rId, const OUString& rStr)
2440 {
2441 insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_FALSE);
2442 }
2443 void append(const OUString& rId, const OUString& rStr, const OUString& rImage)
2444 {
2445 insert(-1, rId, rStr, &rImage, nullptr, nullptr, TRISTATE_INDET);
2446 }
2447 void append(const OUString& rId, const OUString& rStr, VirtualDevice& rImage)
2448 {
2449 insert(-1, rId, rStr, nullptr, &rImage, nullptr, TRISTATE_INDET);
2450 }
2451
2452 // return the number of toplevel nodes
2453 virtual int n_children() const = 0;
2454
2455 virtual OUString get_id(int pos) const = 0;
2456
2457 virtual ~Menu() {}
2458};
2459
2460class VCL_DLLPUBLIC Popover : virtual public Container
2461{
2462 friend class ::LOKTrigger;
2463
2464private:
2466
2467protected:
2468 void signal_closed() { m_aCloseHdl.Call(*this); }
2469
2470public:
2471 virtual void popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect,
2472 Placement ePlace = Placement::Under)
2473 = 0;
2474 virtual void popdown() = 0;
2475
2476 virtual void resize_to_request() = 0;
2477
2478 void connect_closed(const Link<weld::Popover&, void>& rLink) { m_aCloseHdl = rLink; }
2479};
2480
2481class VCL_DLLPUBLIC Toolbar : virtual public Widget
2482{
2485
2486protected:
2487 friend class ::LOKTrigger;
2488
2489 void signal_clicked(const OUString& rIdent) { m_aClickHdl.Call(rIdent); }
2490 void signal_toggle_menu(const OUString& rIdent) { m_aToggleMenuHdl.Call(rIdent); }
2491
2492public:
2493 virtual void set_item_sensitive(const OUString& rIdent, bool bSensitive) = 0;
2494 virtual bool get_item_sensitive(const OUString& rIdent) const = 0;
2495 virtual void set_item_active(const OUString& rIdent, bool bActive) = 0;
2496 virtual bool get_item_active(const OUString& rIdent) const = 0;
2497 virtual void set_menu_item_active(const OUString& rIdent, bool bActive) = 0;
2498 virtual bool get_menu_item_active(const OUString& rIdent) const = 0;
2499 virtual void set_item_menu(const OUString& rIdent, weld::Menu* pMenu) = 0;
2500 virtual void set_item_popover(const OUString& rIdent, weld::Widget* pPopover) = 0;
2501 virtual void set_item_visible(const OUString& rIdent, bool bVisible) = 0;
2502 virtual void set_item_help_id(const OUString& rIdent, const OUString& rHelpId) = 0;
2503 virtual bool get_item_visible(const OUString& rIdent) const = 0;
2504 virtual void set_item_label(const OUString& rIdent, const OUString& rLabel) = 0;
2505 virtual OUString get_item_label(const OUString& rIdent) const = 0;
2506 virtual void set_item_tooltip_text(const OUString& rIdent, const OUString& rTip) = 0;
2507 virtual OUString get_item_tooltip_text(const OUString& rIdent) const = 0;
2508 virtual void set_item_icon_name(const OUString& rIdent, const OUString& rIconName) = 0;
2509 virtual void set_item_image_mirrored(const OUString& rIdent, bool bMirrored) = 0;
2510 virtual void set_item_image(const OUString& rIdent,
2511 const css::uno::Reference<css::graphic::XGraphic>& rIcon)
2512 = 0;
2513 virtual void set_item_image(const OUString& rIdent, VirtualDevice* pDevice) = 0;
2514
2515 virtual void insert_item(int pos, const OUString& rId) = 0;
2516 virtual void insert_separator(int pos, const OUString& rId) = 0;
2517 void append_separator(const OUString& rId) { insert_separator(-1, rId); }
2518
2519 virtual int get_n_items() const = 0;
2520 virtual OUString get_item_ident(int nIndex) const = 0;
2521 virtual void set_item_ident(int nIndex, const OUString& rIdent) = 0;
2522 virtual void set_item_label(int nIndex, const OUString& rLabel) = 0;
2523 virtual void set_item_image(int nIndex,
2524 const css::uno::Reference<css::graphic::XGraphic>& rIcon)
2525 = 0;
2526 virtual void set_item_tooltip_text(int nIndex, const OUString& rTip) = 0;
2527
2528 virtual vcl::ImageType get_icon_size() const = 0;
2529 virtual void set_icon_size(vcl::ImageType eType) = 0;
2530
2531 // return what modifiers are held
2532 virtual sal_uInt16 get_modifier_state() const = 0;
2533
2534 // This function returns the position a new item should be inserted if dnd
2535 // is dropped at rPoint
2536 virtual int get_drop_index(const Point& rPoint) const = 0;
2537
2538 void connect_clicked(const Link<const OUString&, void>& rLink) { m_aClickHdl = rLink; }
2540 {
2541 m_aToggleMenuHdl = rLink;
2542 }
2543};
2544
2545class VCL_DLLPUBLIC Scrollbar : virtual public Widget
2546{
2548
2549protected:
2550 void signal_adjustment_changed() { m_aChangeHdl.Call(*this); }
2551
2552public:
2553 virtual void adjustment_configure(int value, int lower, int upper, int step_increment,
2554 int page_increment, int page_size)
2555 = 0;
2556 virtual int adjustment_get_value() const = 0;
2557 virtual void adjustment_set_value(int value) = 0;
2558 virtual int adjustment_get_upper() const = 0;
2559 virtual void adjustment_set_upper(int upper) = 0;
2560 virtual int adjustment_get_page_size() const = 0;
2561 virtual void adjustment_set_page_size(int size) = 0;
2562 virtual int adjustment_get_page_increment() const = 0;
2563 virtual void adjustment_set_page_increment(int size) = 0;
2564 virtual int adjustment_get_step_increment() const = 0;
2565 virtual void adjustment_set_step_increment(int size) = 0;
2566 virtual int adjustment_get_lower() const = 0;
2567 virtual void adjustment_set_lower(int upper) = 0;
2568
2569 virtual int get_scroll_thickness() const = 0;
2570 virtual void set_scroll_thickness(int nThickness) = 0;
2571
2572 virtual ScrollType get_scroll_type() const = 0;
2573
2574 void connect_adjustment_changed(const Link<Scrollbar&, void>& rLink) { m_aChangeHdl = rLink; }
2575};
2576
2578{
2579public:
2580 virtual void add_widget(weld::Widget* pWidget) = 0;
2581 // the default mode is VclSizeGroupMode::Horizontal
2582 virtual void set_mode(VclSizeGroupMode eMode) = 0;
2583 virtual ~SizeGroup() {}
2584};
2585
2587{
2588public:
2589 virtual std::unique_ptr<MessageDialog> weld_message_dialog(const OUString& id) = 0;
2590 virtual std::unique_ptr<Dialog> weld_dialog(const OUString& id) = 0;
2591 virtual std::unique_ptr<Assistant> weld_assistant(const OUString& id) = 0;
2592 virtual std::unique_ptr<Widget> weld_widget(const OUString& id) = 0;
2593 virtual std::unique_ptr<Container> weld_container(const OUString& id) = 0;
2594 virtual std::unique_ptr<Box> weld_box(const OUString& id) = 0;
2595 virtual std::unique_ptr<Paned> weld_paned(const OUString& id) = 0;
2596 virtual std::unique_ptr<Button> weld_button(const OUString& id) = 0;
2597 virtual std::unique_ptr<MenuButton> weld_menu_button(const OUString& id) = 0;
2598 virtual std::unique_ptr<MenuToggleButton> weld_menu_toggle_button(const OUString& id) = 0;
2599 virtual std::unique_ptr<Frame> weld_frame(const OUString& id) = 0;
2600 /* bUserManagedScrolling of true means that the automatic scrolling of the window is disabled
2601 and the owner must specifically listen to adjustment changes and react appropriately to them.
2602 */
2603 virtual std::unique_ptr<ScrolledWindow> weld_scrolled_window(const OUString& id,
2604 bool bUserManagedScrolling = false)
2605 = 0;
2606 virtual std::unique_ptr<Notebook> weld_notebook(const OUString& id) = 0;
2607 virtual std::unique_ptr<ToggleButton> weld_toggle_button(const OUString& id) = 0;
2608 virtual std::unique_ptr<RadioButton> weld_radio_button(const OUString& id) = 0;
2609 virtual std::unique_ptr<CheckButton> weld_check_button(const OUString& id) = 0;
2610 virtual std::unique_ptr<LinkButton> weld_link_button(const OUString& id) = 0;
2611 virtual std::unique_ptr<SpinButton> weld_spin_button(const OUString& id) = 0;
2612 virtual std::unique_ptr<MetricSpinButton> weld_metric_spin_button(const OUString& id,
2613 FieldUnit eUnit)
2614 = 0;
2615 virtual std::unique_ptr<FormattedSpinButton> weld_formatted_spin_button(const OUString& id) = 0;
2616 virtual std::unique_ptr<ComboBox> weld_combo_box(const OUString& id) = 0;
2617 virtual std::unique_ptr<TreeView> weld_tree_view(const OUString& id) = 0;
2618 virtual std::unique_ptr<IconView> weld_icon_view(const OUString& id) = 0;
2619 virtual std::unique_ptr<Label> weld_label(const OUString& id) = 0;
2620 virtual std::unique_ptr<TextView> weld_text_view(const OUString& id) = 0;
2621 virtual std::unique_ptr<Expander> weld_expander(const OUString& id) = 0;
2622 virtual std::unique_ptr<Entry> weld_entry(const OUString& id) = 0;
2623 virtual std::unique_ptr<Scale> weld_scale(const OUString& id) = 0;
2624 virtual std::unique_ptr<ProgressBar> weld_progress_bar(const OUString& id) = 0;
2625 virtual std::unique_ptr<Spinner> weld_spinner(const OUString& id) = 0;
2626 virtual std::unique_ptr<Image> weld_image(const OUString& id) = 0;
2627 virtual std::unique_ptr<Calendar> weld_calendar(const OUString& id) = 0;
2628 virtual std::unique_ptr<DrawingArea>
2629 weld_drawing_area(const OUString& id, const a11yref& rA11yImpl = nullptr,
2630 FactoryFunction pUITestFactoryFunction = nullptr, void* pUserData = nullptr)
2631 = 0;
2632 virtual std::unique_ptr<EntryTreeView> weld_entry_tree_view(const OUString& containerid,
2633 const OUString& entryid,
2634 const OUString& treeviewid)
2635 = 0;
2636 virtual std::unique_ptr<Menu> weld_menu(const OUString& id) = 0;
2637 virtual std::unique_ptr<Popover> weld_popover(const OUString& id) = 0;
2638 virtual std::unique_ptr<Toolbar> weld_toolbar(const OUString& id) = 0;
2639 virtual std::unique_ptr<Scrollbar> weld_scrollbar(const OUString& id) = 0;
2640 virtual std::unique_ptr<SizeGroup> create_size_group() = 0;
2641 /* return a Dialog suitable to take a screenshot of containing the contents of the .ui file.
2642
2643 If the toplevel element is a dialog, that will be returned
2644 If the toplevel is not a dialog, a dialog will be created and the contents of the .ui
2645 inserted into it
2646 */
2647 virtual std::unique_ptr<Window> create_screenshot_window() = 0;
2648 virtual ~Builder() {}
2649};
2650
2651class VCL_DLLPUBLIC DialogController : public std::enable_shared_from_this<DialogController>
2652{
2653public:
2654 virtual Dialog* getDialog() = 0;
2655 const Dialog* getConstDialog() const
2656 {
2657 return const_cast<DialogController*>(this)->getDialog();
2658 }
2659 virtual short run() { return getDialog()->run(); }
2660 static bool runAsync(const std::shared_ptr<DialogController>& rController,
2661 const std::function<void(sal_Int32)>&);
2662 void set_title(const OUString& rTitle) { getDialog()->set_title(rTitle); }
2663 OUString get_title() const { return getConstDialog()->get_title(); }
2664 void set_help_id(const OUString& rHelpId) { getDialog()->set_help_id(rHelpId); }
2665 OUString get_help_id() const { return getConstDialog()->get_help_id(); }
2666 void response(int nResponse) { getDialog()->response(nResponse); }
2667 virtual ~DialogController() COVERITY_NOEXCEPT_FALSE;
2668};
2669
2671{
2672protected:
2673 std::unique_ptr<weld::Builder> m_xBuilder;
2674 std::shared_ptr<weld::Dialog> m_xDialog;
2675
2676public:
2677 GenericDialogController(weld::Widget* pParent, const OUString& rUIFile,
2678 const OUString& rDialogId, bool bMobile = false);
2679 virtual Dialog* getDialog() override;
2680 virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override;
2681};
2682
2684{
2685protected:
2686 std::unique_ptr<weld::Builder> m_xBuilder;
2687 std::unique_ptr<weld::MessageDialog> m_xDialog;
2688 std::unique_ptr<weld::Container> m_xContentArea;
2689 std::unique_ptr<weld::Widget> m_xRelocate;
2690 std::unique_ptr<weld::Container> m_xOrigParent;
2691
2692public:
2693 /* @param rRelocateId - optional argument of the name of a widget in the .ui file
2694 which should be relocated into the content area of the dialog.
2695
2696 e.g. a checkbox for a "Never show this again" option.
2697
2698 This results in the named widget relocating to the same container
2699 as the messages. This enables aligning the extra widget with the
2700 message labels in the content area container which doesn't
2701 explicitly exist in the ui description, but is only implied.
2702 */
2703 MessageDialogController(weld::Widget* pParent, const OUString& rUIFile,
2704 const OUString& rDialogId, const OUString& rRelocateId = {});
2705 virtual Dialog* getDialog() override;
2706 virtual ~MessageDialogController() override;
2707 void set_primary_text(const OUString& rText) { m_xDialog->set_primary_text(rText); }
2708 OUString get_primary_text() const { return m_xDialog->get_primary_text(); }
2709 void set_secondary_text(const OUString& rText) { m_xDialog->set_secondary_text(rText); }
2710 OUString get_secondary_text() const { return m_xDialog->get_secondary_text(); }
2711 void set_default_response(int nResponse) { m_xDialog->set_default_response(nResponse); }
2712};
2713
2715{
2716protected:
2717 std::unique_ptr<weld::Builder> m_xBuilder;
2718 std::unique_ptr<weld::Assistant> m_xAssistant;
2719
2720public:
2721 AssistantController(weld::Widget* pParent, const OUString& rUIFile, const OUString& rDialogId);
2722 virtual Dialog* getDialog() override;
2723 virtual ~AssistantController() override;
2724};
2725}
2726#endif
2727
2728/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
Definition: menu.hxx:116
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
std::unique_ptr< weld::Assistant > m_xAssistant
Definition: weld.hxx:2718
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2717
virtual void set_current_page(const OUString &rIdent)=0
virtual weld::Container * append_page(const OUString &rIdent)=0
virtual int get_current_page() const =0
virtual OUString get_page_ident(int nPage) const =0
virtual void set_current_page(int nPage)=0
virtual int get_n_pages() const =0
virtual OUString get_page_title(const OUString &rIdent) const =0
Link< const OUString &, bool > m_aJumpPageHdl
Definition: weld.hxx:644
virtual void set_page_side_image(const OUString &rImage)=0
virtual void set_page_index(const OUString &rIdent, int nIndex)=0
void connect_jump_page(const Link< const OUString &, bool > &rLink)
Definition: weld.hxx:667
bool signal_jump_page(const OUString &rIdent)
Definition: weld.hxx:647
virtual OUString get_current_page_ident() const =0
virtual void set_page_side_help_id(const OUString &rHelpId)=0
virtual void set_page_title(const OUString &rIdent, const OUString &rTitle)=0
virtual void set_page_sensitive(const OUString &rIdent, bool bSensitive)=0
virtual void reorder_child(weld::Widget *pWidget, int position)=0
virtual void sort_native_button_order()=0
virtual std::unique_ptr< Assistant > weld_assistant(const OUString &id)=0
virtual std::unique_ptr< ScrolledWindow > weld_scrolled_window(const OUString &id, bool bUserManagedScrolling=false)=0
virtual std::unique_ptr< Image > weld_image(const OUString &id)=0
virtual std::unique_ptr< Box > weld_box(const OUString &id)=0
virtual std::unique_ptr< MessageDialog > weld_message_dialog(const OUString &id)=0
virtual std::unique_ptr< Container > weld_container(const OUString &id)=0
virtual std::unique_ptr< MetricSpinButton > weld_metric_spin_button(const OUString &id, FieldUnit eUnit)=0
virtual std::unique_ptr< DrawingArea > weld_drawing_area(const OUString &id, const a11yref &rA11yImpl=nullptr, FactoryFunction pUITestFactoryFunction=nullptr, void *pUserData=nullptr)=0
virtual std::unique_ptr< Label > weld_label(const OUString &id)=0
virtual std::unique_ptr< ToggleButton > weld_toggle_button(const OUString &id)=0
virtual std::unique_ptr< IconView > weld_icon_view(const OUString &id)=0
virtual std::unique_ptr< SizeGroup > create_size_group()=0
virtual std::unique_ptr< Scale > weld_scale(const OUString &id)=0
virtual std::unique_ptr< Entry > weld_entry(const OUString &id)=0
virtual std::unique_ptr< RadioButton > weld_radio_button(const OUString &id)=0
virtual std::unique_ptr< SpinButton > weld_spin_button(const OUString &id)=0
virtual std::unique_ptr< Paned > weld_paned(const OUString &id)=0
virtual std::unique_ptr< Expander > weld_expander(const OUString &id)=0
virtual std::unique_ptr< CheckButton > weld_check_button(const OUString &id)=0
virtual std::unique_ptr< Notebook > weld_notebook(const OUString &id)=0
virtual std::unique_ptr< ProgressBar > weld_progress_bar(const OUString &id)=0
virtual std::unique_ptr< Widget > weld_widget(const OUString &id)=0
virtual std::unique_ptr< Calendar > weld_calendar(const OUString &id)=0
virtual std::unique_ptr< Toolbar > weld_toolbar(const OUString &id)=0
virtual std::unique_ptr< TreeView > weld_tree_view(const OUString &id)=0
virtual std::unique_ptr< Frame > weld_frame(const OUString &id)=0
virtual ~Builder()
Definition: weld.hxx:2648
virtual std::unique_ptr< MenuToggleButton > weld_menu_toggle_button(const OUString &id)=0
virtual std::unique_ptr< LinkButton > weld_link_button(const OUString &id)=0
virtual std::unique_ptr< FormattedSpinButton > weld_formatted_spin_button(const OUString &id)=0
virtual std::unique_ptr< TextView > weld_text_view(const OUString &id)=0
virtual std::unique_ptr< EntryTreeView > weld_entry_tree_view(const OUString &containerid, const OUString &entryid, const OUString &treeviewid)=0
virtual std::unique_ptr< MenuButton > weld_menu_button(const OUString &id)=0
virtual std::unique_ptr< Dialog > weld_dialog(const OUString &id)=0
virtual std::unique_ptr< Popover > weld_popover(const OUString &id)=0
virtual std::unique_ptr< ComboBox > weld_combo_box(const OUString &id)=0
virtual std::unique_ptr< Menu > weld_menu(const OUString &id)=0
virtual std::unique_ptr< Window > create_screenshot_window()=0
virtual std::unique_ptr< Button > weld_button(const OUString &id)=0
virtual std::unique_ptr< Spinner > weld_spinner(const OUString &id)=0
virtual std::unique_ptr< Scrollbar > weld_scrollbar(const OUString &id)=0
virtual void set_image(const css::uno::Reference< css::graphic::XGraphic > &rImage)=0
virtual OUString get_label() const =0
virtual void set_label(const OUString &rText)=0
void connect_clicked(const Link< Button &, void > &rLink)
Definition: weld.hxx:1528
virtual void set_custom_button(VirtualDevice *pDevice)=0
bool is_custom_handler_set()
Definition: weld.hxx:1514
virtual void set_image(VirtualDevice *pDevice)=0
Link< Button &, void > m_aClickHdl
Definition: weld.hxx:1502
virtual void set_font(const vcl::Font &rFont)=0
void clicked()
Definition: weld.hxx:1513
virtual void set_from_icon_name(const OUString &rIconName)=0
void signal_clicked()
Definition: weld.hxx:1504
virtual Date get_date() const =0
Link< Calendar &, void > m_aActivatedHdl
Definition: weld.hxx:1905
Link< Calendar &, void > m_aSelectedHdl
Definition: weld.hxx:1904
void connect_selected(const Link< Calendar &, void > &rLink)
Definition: weld.hxx:1912
void signal_activated()
Definition: weld.hxx:1909
void connect_activated(const Link< Calendar &, void > &rLink)
Definition: weld.hxx:1913
virtual void set_date(const Date &rDate)=0
void signal_selected()
Definition: weld.hxx:1908
virtual OUString get_label() const =0
virtual void set_label_wrap(bool wrap)=0
virtual void set_label(const OUString &rText)=0
A widget used to choose from a list of items.
Definition: weld.hxx:713
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:762
void connect_custom_render(const Link< render_args, void > &rLink)
Definition: weld.hxx:877
virtual bool has_entry() const =0
bool get_value_changed_from_saved() const
Definition: weld.hxx:862
void save_values_by_id(const OUString &rId)
Definition: weld.hxx:855
Link< vcl::RenderContext &, Size > m_aGetSizeHdl
Definition: weld.hxx:742
virtual VclPtr< VirtualDevice > create_render_virtual_device() const =0
Link< ComboBox &, void > m_aChangeHdl
Definition: weld.hxx:724
Link< ComboBox &, bool > m_aEntryActivateHdl
Definition: weld.hxx:726
virtual void set_custom_renderer(bool bOn)=0
virtual vcl::Font get_entry_font()=0
virtual int find_text(const OUString &rStr) const =0
virtual OUString get_active_id() const =0
virtual void copy_entry_clipboard()=0
virtual OUString get_active_text() const =0
void append(int pos, const OUString &rId, const OUString &rStr)
Definition: weld.hxx:774
virtual void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)=0
virtual void select_entry_region(int nStartPos, int nEndPos)=0
Link< ComboBox &, void > m_aPopupToggledHdl
Definition: weld.hxx:725
virtual void insert_separator(int pos, const OUString &rId)=0
virtual void set_entry_message_type(EntryMessageType eType)=0
virtual void set_entry_editable(bool bEditable)=0
Link< OUString &, bool > m_aEntryInsertTextHdl
Definition: weld.hxx:727
virtual OUString get_id(int pos) const =0
void connect_custom_get_size(const Link< vcl::RenderContext &, Size > &rLink)
Definition: weld.hxx:873
virtual int find_id(const OUString &rId) const =0
OUString m_sSavedValue
Definition: weld.hxx:715
virtual void clear()=0
virtual void set_font(const vcl::Font &rFont)=0
virtual void set_id(int row, const OUString &rId)=0
void connect_entry_insert_text(const Link< OUString &, bool > &rLink)
Definition: weld.hxx:845
void save_value()
Definition: weld.hxx:853
void append(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:770
virtual void insert_vector(const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting)=0
void connect_entry_activate(const Link< ComboBox &, bool > &rLink)
Definition: weld.hxx:851
Link< render_args, void > m_aRenderHdl
Definition: weld.hxx:735
void remove_text(const OUString &rText)
Definition: weld.hxx:795
virtual void set_max_mru_count(int nCount)=0
virtual void set_entry_placeholder_text(const OUString &rText)=0
virtual void set_entry_font(const vcl::Font &rFont)=0
OUString const & get_saved_value() const
Definition: weld.hxx:860
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:766
virtual void set_active_id(const OUString &rStr)=0
void signal_custom_render(vcl::RenderContext &rDevice, const tools::Rectangle &rRect, bool bSelected, const OUString &rId)
Definition: weld.hxx:736
virtual void connect_popup_toggled(const Link< ComboBox &, void > &rLink)
Definition: weld.hxx:816
virtual void set_entry_max_length(int nChars)=0
virtual void set_entry_text(const OUString &rStr)=0
virtual void set_entry_completion(bool bEnable, bool bCaseSensitive=false)=0
void append(const weld::ComboBoxEntry &rItem)
Definition: weld.hxx:760
virtual void set_item_menu(const OUString &rIdent, weld::Menu *pMenu)=0
virtual bool get_popup_shown() const =0
virtual void set_active(int pos)=0
void append_separator(const OUString &rId)
Definition: weld.hxx:779
virtual void set_entry_width_chars(int nChars)=0
std::vector< OUString > m_aSavedValues
Definition: weld.hxx:716
virtual void signal_popup_toggled()
Definition: weld.hxx:733
virtual OUString get_mru_entries() const =0
virtual OUString get_text(int pos) const =0
virtual void cut_entry_clipboard()=0
void append_text(const OUString &rStr)
Definition: weld.hxx:761
virtual int get_max_mru_count() const =0
virtual bool changed_by_direct_pick() const =0
void insert_text(int pos, const OUString &rStr)
Definition: weld.hxx:756
virtual void remove(int pos)=0
std::tuple< vcl::RenderContext &, const tools::Rectangle &, bool, const OUString & > render_args
Definition: weld.hxx:721
virtual void set_mru_entries(const OUString &rEntries)=0
void removeSavedValues()
Definition: weld.hxx:870
virtual int get_menu_button_width() const =0
virtual int get_active() const =0
virtual int get_count() const =0
Size signal_custom_get_size(vcl::RenderContext &rDevice)
Definition: weld.hxx:743
void remove_id(const OUString &rId)
Definition: weld.hxx:803
void insert(int pos, const weld::ComboBoxEntry &rItem)
Definition: weld.hxx:751
virtual void paste_entry_clipboard()=0
void set_active_text(const OUString &rStr)
Definition: weld.hxx:792
virtual void make_sorted()=0
void signal_changed()
Definition: weld.hxx:731
void connect_changed(const Link< ComboBox &, void > &rLink)
Definition: weld.hxx:812
bool get_values_changed_from_saved() const
Definition: weld.hxx:863
OUString const & get_saved_values(int pos) const
Definition: weld.hxx:861
virtual bool get_entry_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual css::uno::Reference< css::awt::XWindow > CreateChildFrame()=0
virtual void connect_container_focus_changed(const Link< Container &, void > &rLink)
Definition: weld.hxx:379
Link< Container &, void > m_aContainerFocusChangedHdl
Definition: weld.hxx:365
virtual void move(weld::Widget *pWidget, weld::Container *pNewParent)=0
void signal_container_focus_changed()
Definition: weld.hxx:368
virtual void child_grab_focus()=0
virtual short run()
Definition: weld.hxx:2659
void response(int nResponse)
Definition: weld.hxx:2666
virtual Dialog * getDialog()=0
const Dialog * getConstDialog() const
Definition: weld.hxx:2655
void set_title(const OUString &rTitle)
Definition: weld.hxx:2662
OUString get_title() const
Definition: weld.hxx:2663
void set_help_id(const OUString &rHelpId)
Definition: weld.hxx:2664
OUString get_help_id() const
Definition: weld.hxx:2665
virtual Button * weld_widget_for_response(int response)=0
virtual void response(int response)=0
virtual void SetInstallLOKNotifierHdl(const Link< void *, vcl::ILibreOfficeKitNotifier * > &rLink)=0
friend DialogController
Definition: weld.hxx:605
virtual bool runAsync(std::shared_ptr< DialogController >, const std::function< void(sal_Int32)> &func)=0
virtual void collapse(weld::Widget *pEdit, weld::Widget *pButton)=0
virtual void set_default_response(int response)=0
virtual void undo_collapse()=0
virtual int run()=0
virtual bool runAsync(std::shared_ptr< Dialog > const &rxSelf, const std::function< void(sal_Int32)> &func)=0
virtual Container * weld_content_area()=0
virtual void add_button(const OUString &rText, int response, const OUString &rHelpId={})=0
void connect_command(const Link< const CommandEvent &, bool > &rLink)
Definition: weld.hxx:2334
Link< OUString &, int > m_aGetSurroundingHdl
Definition: weld.hxx:2311
int signal_im_context_get_surrounding(OUString &rSurroundingText)
Definition: weld.hxx:2320
Link< const Selection &, bool > m_aDeleteSurroundingHdl
Definition: weld.hxx:2313
virtual OutputDevice & get_ref_device()=0
void connect_im_context_get_surrounding(const Link< OUString &, int > &rLink)
Definition: weld.hxx:2344
Link< const CommandEvent &, bool > m_aCommandHdl
Definition: weld.hxx:2305
virtual void click(const Point &)=0
virtual void im_context_set_cursor_location(const tools::Rectangle &rCursorRect, int nExtTextInputWidth)=0
bool signal_im_context_delete_surrounding(const Selection &rRange)
Definition: weld.hxx:2327
virtual a11yrelationset get_accessible_relation_set()=0
virtual Point get_pointer_position() const =0
void connect_focus_rect(const Link< Widget &, tools::Rectangle > &rLink)
Definition: weld.hxx:2335
Link< tools::Rectangle &, OUString > m_aQueryTooltipHdl
Definition: weld.hxx:2307
std::pair< vcl::RenderContext &, const tools::Rectangle & > draw_args
Definition: weld.hxx:2301
virtual a11yref get_accessible_parent()=0
void connect_query_tooltip(const Link< tools::Rectangle &, OUString > &rLink)
Definition: weld.hxx:2339
void connect_draw(const Link< draw_args, void > &rLink)
Definition: weld.hxx:2333
virtual void mouse_down(const Point &)
Definition: weld.hxx:2384
virtual void queue_draw_area(int x, int y, int width, int height)=0
void connect_im_context_delete_surrounding(const Link< const Selection &, bool > &rLink)
Definition: weld.hxx:2348
Link< Widget &, tools::Rectangle > m_aGetFocusRectHdl
Definition: weld.hxx:2306
virtual void mouse_move(const Point &)
Definition: weld.hxx:2386
Link< draw_args, void > m_aDrawHdl
Definition: weld.hxx:2304
virtual Point get_accessible_location_on_screen()=0
virtual void set_cursor(PointerStyle ePointerStyle)=0
OUString signal_query_tooltip(tools::Rectangle &rHelpArea)
Definition: weld.hxx:2315
virtual void dblclick(const Point &)
Definition: weld.hxx:2380
Link< DrawingArea &, bool > m_aDragBeginHdl
Definition: weld.hxx:2309
virtual void enable_drag_source(rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants)=0
virtual void mouse_up(const Point &)
Definition: weld.hxx:2382
void connect_drag_begin(const Link< DrawingArea &, bool > &rLink)
Definition: weld.hxx:2343
virtual void set_input_context(const InputContext &rInputContext)=0
virtual void queue_draw()=0
DECL_DLLPRIVATE_LINK(ClickHdl, weld::TreeView &, void)
std::unique_ptr< Entry > m_xEntry
Definition: weld.hxx:1930
virtual bool get_popup_shown() const override
Definition: weld.hxx:2009
virtual void select_entry_region(int nStartPos, int nEndPos) override
Definition: weld.hxx:1994
virtual void remove(int pos) override
Definition: weld.hxx:1964
virtual void set_active_id(const OUString &rStr) override
Definition: weld.hxx:1976
DECL_DLLPRIVATE_LINK(ModifyHdl, weld::Entry &, void)
virtual OUString get_active_id() const override
Definition: weld.hxx:1975
virtual void set_entry_max_length(int nChars) override
Definition: weld.hxx:1993
virtual OUString get_id(int pos) const override
Definition: weld.hxx:1981
virtual void set_entry_width_chars(int nChars) override
Definition: weld.hxx:1992
virtual void clear() override
Definition: weld.hxx:1954
virtual void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface) override
Definition: weld.hxx:1947
void EntryModifyHdl(const weld::Entry &rEntry)
virtual void set_id(int pos, const OUString &rId) override
Definition: weld.hxx:1982
virtual void set_entry_text(const OUString &rStr) override
Definition: weld.hxx:1991
virtual int get_active() const override
Definition: weld.hxx:1957
virtual void set_active(int pos) override
Definition: weld.hxx:1958
virtual void set_entry_message_type(EntryMessageType eType) override
Definition: weld.hxx:1987
virtual int find_id(const OUString &rId) const override
Definition: weld.hxx:1983
virtual OUString get_active_text() const override
Definition: weld.hxx:1967
std::unique_ptr< TreeView > m_xTreeView
Definition: weld.hxx:1931
virtual void insert_vector(const std::vector< weld::ComboBoxEntry > &rItems, bool bKeepExisting) override
Definition: weld.hxx:1936
virtual bool get_entry_selection_bounds(int &rStartPos, int &rEndPos) override
Definition: weld.hxx:2000
void connect_row_activated(const Link< TreeView &, bool > &rLink)
Definition: weld.hxx:2004
virtual OUString get_text(int pos) const override
Definition: weld.hxx:1968
virtual bool has_entry() const override
Definition: weld.hxx:1986
virtual int get_count() const override
Definition: weld.hxx:1953
virtual int find_text(const OUString &rStr) const override
Definition: weld.hxx:1969
virtual void set_font(const vcl::Font &rFont)=0
Link< Entry &, void > m_aCursorPositionHdl
Definition: weld.hxx:1725
virtual bool get_editable() const =0
virtual void set_placeholder_text(const OUString &rText)=0
void connect_insert_text(const Link< OUString &, bool > &rLink)
Definition: weld.hxx:1770
virtual void cut_clipboard()=0
OUString m_sSavedValue
Definition: weld.hxx:1720
virtual void set_max_length(int nChars)=0
void connect_activate(const Link< Entry &, bool > &rLink)
Definition: weld.hxx:1772
virtual void select_region(int nStartPos, int nEndPos)=0
virtual void connect_cursor_position(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1773
virtual void set_text(const OUString &rText)=0
virtual void set_font_color(const Color &rColor)=0
virtual void set_position(int nCursorPos)=0
virtual void set_message_type(EntryMessageType eType)=0
virtual void connect_changed(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1769
virtual int get_position() const =0
void save_value()
Definition: weld.hxx:1784
virtual void set_alignment(TxtAlign eXAlign)=0
OUString const & get_saved_value() const
Definition: weld.hxx:1785
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
Link< OUString &, bool > m_aInsertTextHdl
Definition: weld.hxx:1724
virtual bool get_overwrite_mode() const =0
virtual void copy_clipboard()=0
virtual void set_editable(bool bEditable)=0
virtual void replace_selection(const OUString &rText)=0
virtual void set_overwrite_mode(bool bOn)=0
Link< Entry &, void > m_aChangeHdl
Definition: weld.hxx:1723
virtual void paste_clipboard()=0
Link< Entry &, bool > m_aActivateHdl
Definition: weld.hxx:1726
virtual OUString get_text() const =0
virtual int get_width_chars() const =0
void signal_cursor_position()
Definition: weld.hxx:1731
void signal_changed()
Definition: weld.hxx:1730
virtual void set_width_chars(int nChars)=0
bool get_value_changed_from_saved() const
Definition: weld.hxx:1786
Link< Expander &, void > m_aExpandedHdl
Definition: weld.hxx:2284
virtual OUString get_label() const =0
void signal_expanded()
Definition: weld.hxx:2287
void connect_expanded(const Link< Expander &, void > &rLink)
Definition: weld.hxx:2295
virtual bool get_expanded() const =0
virtual void set_expanded(bool bExpand)=0
virtual void set_label(const OUString &rText)=0
virtual void SetFormatter(weld::EntryFormatter *pFormatter)=0
void connect_value_changed(const Link< FormattedSpinButton &, void > &rLink)
Definition: weld.hxx:1880
virtual Formatter & GetFormatter()=0
virtual void sync_range_from_formatter()=0
virtual void sync_increments_from_formatter()=0
virtual void sync_value_from_formatter()=0
Link< FormattedSpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1869
virtual void set_label(const OUString &rText)=0
virtual std::unique_ptr< Label > weld_label_widget() const =0
virtual OUString get_label() const =0
std::shared_ptr< weld::Dialog > m_xDialog
Definition: weld.hxx:2674
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2673
virtual void insert(int pos, const OUString *pStr, const OUString *pId, const OUString *pIconName, TreeIter *pRet)=0
virtual void insert(int pos, const OUString *pStr, const OUString *pId, const VirtualDevice *pIcon, TreeIter *pRet)=0
virtual int count_selected_items() const =0
Link< IconView &, void > m_aSelectionChangeHdl
Definition: weld.hxx:1395
void connect_selection_changed(const Link< IconView &, void > &rLink)
Definition: weld.hxx:1434
Link< const TreeIter &, OUString > m_aQueryTooltipHdl
Definition: weld.hxx:1398
virtual int n_children() const =0
virtual void insert_separator(int pos, const OUString *pId)=0
virtual OUString get_text(const TreeIter &rIter) const =0
virtual bool get_iter_first(TreeIter &rIter) const =0
OUString const & get_saved_value() const
Definition: weld.hxx:1493
virtual OUString get_selected_text() const =0
virtual void clear()=0
Link< const json_prop_query &, bool > m_aGetPropertyTreeElemHdl
Definition: weld.hxx:1399
virtual void selected_foreach(const std::function< bool(TreeIter &)> &func)=0
void unselect_all()
Definition: weld.hxx:1487
void append(const OUString &rId, const OUString &rStr, const VirtualDevice *pImage)
Definition: weld.hxx:1427
bool get_value_changed_from_saved() const
Definition: weld.hxx:1494
Link< const CommandEvent &, bool > m_aCommandHdl
Definition: weld.hxx:1397
virtual OUString get_selected_id() const =0
void append_separator(const OUString &rId)
Definition: weld.hxx:1432
virtual bool get_selected(TreeIter *pIter) const =0
virtual void set_item_width(int width)=0
virtual int get_item_width() const =0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
Link< IconView &, bool > m_aItemActivatedHdl
Definition: weld.hxx:1396
virtual OUString get_id(const TreeIter &rIter) const =0
virtual void unselect(int pos)=0
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:1422
virtual void select(int pos)=0
virtual void set_cursor(const TreeIter &rIter)=0
void signal_selection_changed()
Definition: weld.hxx:1401
virtual void connect_query_tooltip(const Link< const TreeIter &, OUString > &rLink)
Definition: weld.hxx:1449
bool signal_item_activated()
Definition: weld.hxx:1402
void connect_item_activated(const Link< IconView &, bool > &rLink)
Definition: weld.hxx:1445
OUString signal_query_tooltip(const TreeIter &rIter) const
Definition: weld.hxx:1403
OUString m_sSavedValue
Definition: weld.hxx:1392
virtual void scroll_to_item(const TreeIter &rIter)=0
virtual bool get_cursor(TreeIter *pIter) const =0
void save_value()
Definition: weld.hxx:1492
virtual void connect_get_property_tree_elem(const Link< const json_prop_query &, bool > &rLink)
Definition: weld.hxx:1455
void select_all()
Definition: weld.hxx:1486
void connect_command(const Link< const CommandEvent &, bool > &rLink)
Definition: weld.hxx:1447
virtual void set_image(const css::uno::Reference< css::graphic::XGraphic > &rImage)=0
virtual void set_image(VirtualDevice *pDevice)=0
virtual void set_from_icon_name(const OUString &rIconName)=0
virtual void set_mnemonic_widget(Widget *pTarget)=0
virtual void set_font(const vcl::Font &rFont)=0
virtual void set_label(const OUString &rText)=0
virtual void set_label_type(LabelType eType)=0
virtual OUString get_label() const =0
virtual void set_font_color(const Color &rColor)=0
virtual void set_label(const OUString &rText)=0
virtual OUString get_uri() const =0
virtual void set_uri(const OUString &rUri)=0
bool signal_activate_link()
Definition: weld.hxx:1671
virtual void set_label_wrap(bool wrap)=0
void connect_activate_link(const Link< LinkButton &, bool > &rLink)
Definition: weld.hxx:1680
virtual OUString get_label() const =0
Link< LinkButton &, bool > m_aActivateLinkHdl
Definition: weld.hxx:1668
virtual void set_item_label(const OUString &rIdent, const OUString &rLabel)=0
virtual void set_popover(weld::Widget *pPopover)=0
void append_item_radio(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1623
void append_separator(const OUString &rId)
Definition: weld.hxx:1636
void signal_selected(const OUString &rIdent)
Definition: weld.hxx:1606
virtual void set_item_sensitive(const OUString &rIdent, bool bSensitive)=0
void append_item(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:1627
virtual void clear()=0
void connect_selected(const Link< const OUString &, void > &rLink)
Definition: weld.hxx:1609
void append_item_check(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1619
virtual OUString get_item_label(const OUString &rIdent) const =0
virtual void remove_item(const OUString &rId)=0
void append_item(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:1631
virtual void set_item_active(const OUString &rIdent, bool bActive)=0
void append_item(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1615
virtual void insert_separator(int pos, const OUString &rId)=0
Link< const OUString &, void > m_aSelectHdl
Definition: weld.hxx:1603
virtual void insert_item(int pos, const OUString &rId, const OUString &rStr, const OUString *pIconName, VirtualDevice *pImageSurface, TriState eCheckRadioFalse)=0
virtual void set_item_visible(const OUString &rIdent, bool bVisible)=0
void append(const OUString &rId, const OUString &rStr, VirtualDevice &rImage)
Definition: weld.hxx:2447
virtual void remove(const OUString &rId)=0
virtual OUString get_label(const OUString &rIdent) const =0
void connect_activate(const Link< const OUString &, void > &rLink)
Definition: weld.hxx:2407
virtual void set_visible(const OUString &rIdent, bool bVisible)=0
Link< const OUString &, void > m_aActivateHdl
Definition: weld.hxx:2397
virtual void clear()=0
void append_separator(const OUString &rId)
Definition: weld.hxx:2429
virtual void set_label(const OUString &rIdent, const OUString &rLabel)=0
virtual int n_children() const =0
virtual OUString popup_at_rect(weld::Widget *pParent, const tools::Rectangle &rRect, Placement ePlace=Placement::Under)=0
virtual void insert(int pos, const OUString &rId, const OUString &rStr, const OUString *pIconName, VirtualDevice *pImageSurface, const css::uno::Reference< css::graphic::XGraphic > &rImage, TriState eCheckRadioFalse)=0
virtual bool get_sensitive(const OUString &rIdent) const =0
virtual void set_sensitive(const OUString &rIdent, bool bSensitive)=0
virtual void insert_separator(int pos, const OUString &rId)=0
void append_radio(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2439
virtual OUString get_id(int pos) const =0
virtual void set_item_help_id(const OUString &rIdent, const OUString &rHelpId)=0
virtual ~Menu()
Definition: weld.hxx:2457
virtual bool get_active(const OUString &rIdent) const =0
void signal_activate(const OUString &rIdent)
Definition: weld.hxx:2400
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:2443
void append_check(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2435
virtual void set_active(const OUString &rIdent, bool bActive)=0
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:2431
OUString get_secondary_text() const
Definition: weld.hxx:2710
std::unique_ptr< weld::Container > m_xContentArea
Definition: weld.hxx:2688
OUString get_primary_text() const
Definition: weld.hxx:2708
std::unique_ptr< weld::Widget > m_xRelocate
Definition: weld.hxx:2689
void set_default_response(int nResponse)
Definition: weld.hxx:2711
void set_primary_text(const OUString &rText)
Definition: weld.hxx:2707
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2686
void set_secondary_text(const OUString &rText)
Definition: weld.hxx:2709
std::unique_ptr< weld::MessageDialog > m_xDialog
Definition: weld.hxx:2687
std::unique_ptr< weld::Container > m_xOrigParent
Definition: weld.hxx:2690
virtual void set_primary_text(const OUString &rText)=0
virtual OUString get_primary_text() const =0
virtual void set_secondary_text(const OUString &rText)=0
virtual OUString get_secondary_text() const =0
virtual Container * weld_message_area()=0
weld::SpinButton & get_widget()
Definition: weld.hxx:2178
sal_Int64 normalize(sal_Int64 nValue) const
Definition: weld.hxx:2136
FieldUnit get_unit() const
Definition: weld.hxx:2045
void set_help_id(const OUString &rName)
Definition: weld.hxx:2171
MetricSpinButton(std::unique_ptr< SpinButton > pSpinButton, FieldUnit eSrcUnit)
Definition: weld.hxx:2031
bool get_visible() const
Definition: weld.hxx:2140
bool has_focus() const
Definition: weld.hxx:2142
DECL_LINK(spin_button_value_changed, weld::SpinButton &, void)
sal_Int64 get_max(FieldUnit eValueUnit) const
Definition: weld.hxx:2110
OUString get_text() const
Definition: weld.hxx:2155
void set_range(sal_Int64 min, sal_Int64 max, FieldUnit eValueUnit)
Definition: weld.hxx:2074
void set_size_request(int nWidth, int nHeight)
Definition: weld.hxx:2156
OUString get_buildable_name() const
Definition: weld.hxx:2170
void set_text(const OUString &rText)
Definition: weld.hxx:2154
bool get_sensitive() const
Definition: weld.hxx:2139
void set_visible(bool bShow)
Definition: weld.hxx:2144
void get_increments(int &step, int &page, FieldUnit eDestUnit) const
Definition: weld.hxx:2124
Link< MetricSpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:2018
DECL_LINK(spin_button_input, int *result, bool)
FieldUnit m_eSrcUnit
Definition: weld.hxx:2016
void signal_value_changed()
Definition: weld.hxx:2024
void set_increments(int step, int page, FieldUnit eValueUnit)
Definition: weld.hxx:2117
void set_sensitive(bool sensitive)
Definition: weld.hxx:2138
void connect_value_changed(const Link< MetricSpinButton &, void > &rLink)
Definition: weld.hxx:2131
sal_Int64 denormalize(sal_Int64 nValue) const
Definition: weld.hxx:2137
sal_Int64 convert_value_from(sal_Int64 nValue, FieldUnit eValueUnit) const
Definition: weld.hxx:2054
void get_range(sal_Int64 &min, sal_Int64 &max, FieldUnit eDestUnit) const
Definition: weld.hxx:2082
Size get_size_request() const
Definition: weld.hxx:2160
sal_Int64 get_min(FieldUnit eValueUnit) const
Definition: weld.hxx:2103
void set_position(int nCursorPos)
Definition: weld.hxx:2172
void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:2166
void set_value(sal_Int64 nValue, FieldUnit eValueUnit)
Definition: weld.hxx:2059
Size get_preferred_size() const
Definition: weld.hxx:2161
sal_Int64 convert_value_to(sal_Int64 nValue, FieldUnit eValueUnit) const
Definition: weld.hxx:2049
bool get_value_changed_from_saved() const
Definition: weld.hxx:2150
DECL_LINK(spin_button_output, weld::SpinButton &, void)
void set_max(sal_Int64 max, FieldUnit eValueUnit)
Definition: weld.hxx:2096
void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:2162
void set_width_chars(int nChars)
Definition: weld.hxx:2176
unsigned int get_digits() const
Definition: weld.hxx:2148
std::unique_ptr< weld::SpinButton > m_xSpinButton
Definition: weld.hxx:2017
int get_width_chars() const
Definition: weld.hxx:2177
void set_accessible_name(const OUString &rName)
Definition: weld.hxx:2147
void set_min(sal_Int64 min, FieldUnit eValueUnit)
Definition: weld.hxx:2089
sal_Int64 get_value(FieldUnit eDestUnit) const
Definition: weld.hxx:2064
void connect_leave_page(const Link< const OUString &, bool > &rLink)
Definition: weld.hxx:500
virtual void insert_page(const OUString &rIdent, const OUString &rLabel, int nPos)=0
void append_page(const OUString &rIdent, const OUString &rLabel)
Definition: weld.hxx:490
virtual void set_tab_label_text(const OUString &rIdent, const OUString &rLabel)=0
virtual OUString get_current_page_ident() const =0
void connect_enter_page(const Link< const OUString &, void > &rLink)
Definition: weld.hxx:501
virtual int get_n_pages() const =0
virtual OUString get_page_ident(int nPage) const =0
virtual int get_page_index(const OUString &rIdent) const =0
Link< const OUString &, bool > m_aLeavePageHdl
Definition: weld.hxx:478
virtual weld::Container * get_page(const OUString &rIdent) const =0
virtual void set_current_page(int nPage)=0
virtual void set_current_page(const OUString &rIdent)=0
virtual void set_show_tabs(bool bShow)=0
virtual OUString get_tab_label_text(const OUString &rIdent) const =0
virtual void remove_page(const OUString &rIdent)=0
virtual int get_current_page() const =0
Link< const OUString &, void > m_aEnterPageHdl
Definition: weld.hxx:479
virtual void set_position(int nPos)=0
virtual int get_position() const =0
Link< weld::Popover &, void > m_aCloseHdl
Definition: weld.hxx:2465
virtual void popdown()=0
void signal_closed()
Definition: weld.hxx:2468
virtual void resize_to_request()=0
void connect_closed(const Link< weld::Popover &, void > &rLink)
Definition: weld.hxx:2478
virtual void popup_at_rect(weld::Widget *pParent, const tools::Rectangle &rRect, Placement ePlace=Placement::Under)=0
virtual void set_text(const OUString &rText)=0
virtual void set_percentage(int value)=0
virtual OUString get_text() const =0
virtual void set_range(int min, int max)=0
void connect_value_changed(const Link< Scale &, void > &rLink)
Definition: weld.hxx:1698
virtual void set_increments(int step, int page)=0
virtual int get_value() const =0
virtual void get_increments(int &step, int &page) const =0
Link< Scale &, void > m_aValueChangedHdl
Definition: weld.hxx:1685
virtual void set_value(int value)=0
void signal_value_changed()
Definition: weld.hxx:1688
OUString msHelpId
Definition: weld.hxx:518
const OUString & GetHelpId() const
Definition: weld.hxx:515
const basegfx::B2IRange & getB2IRange() const
Definition: weld.hxx:513
basegfx::B2IRange maB2IRange
Definition: weld.hxx:519
ScreenShotEntry(OUString aHelpId, const basegfx::B2IRange &rB2IRange)
Definition: weld.hxx:507
void signal_adjustment_changed()
Definition: weld.hxx:2550
virtual int adjustment_get_page_increment() const =0
virtual void set_scroll_thickness(int nThickness)=0
Link< Scrollbar &, void > m_aChangeHdl
Definition: weld.hxx:2547
virtual int get_scroll_thickness() const =0
virtual void adjustment_set_page_increment(int size)=0
virtual void adjustment_set_page_size(int size)=0
virtual void adjustment_set_upper(int upper)=0
virtual void adjustment_set_step_increment(int size)=0
virtual ScrollType get_scroll_type() const =0
virtual void adjustment_configure(int value, int lower, int upper, int step_increment, int page_increment, int page_size)=0
virtual int adjustment_get_step_increment() const =0
virtual void adjustment_set_value(int value)=0
virtual void adjustment_set_lower(int upper)=0
virtual int adjustment_get_lower() const =0
void connect_adjustment_changed(const Link< Scrollbar &, void > &rLink)
Definition: weld.hxx:2574
virtual int adjustment_get_upper() const =0
virtual int adjustment_get_page_size() const =0
virtual int adjustment_get_value() const =0
void connect_hadjustment_changed(const Link< ScrolledWindow &, void > &rLink)
Definition: weld.hxx:430
void connect_vadjustment_changed(const Link< ScrolledWindow &, void > &rLink)
Definition: weld.hxx:450
virtual int vadjustment_get_page_size() const =0
virtual void vadjustment_set_page_size(int size)=0
virtual void hadjustment_set_page_increment(int size)=0
virtual void vadjustment_configure(int value, int lower, int upper, int step_increment, int page_increment, int page_size)=0
virtual void hadjustment_set_step_increment(int size)=0
Link< ScrolledWindow &, void > m_aVChangeHdl
Definition: weld.hxx:409
virtual VclPolicyType get_hpolicy() const =0
virtual void set_hpolicy(VclPolicyType eHPolicy)=0
virtual void vadjustment_set_lower(int upper)=0
virtual int get_scroll_thickness() const =0
virtual int hadjustment_get_upper() const =0
virtual void hadjustment_set_page_size(int size)=0
virtual void set_scroll_thickness(int nThickness)=0
void signal_vadjustment_changed()
Definition: weld.hxx:413
virtual void hadjustment_set_upper(int upper)=0
virtual int vadjustment_get_lower() const =0
virtual void hadjustment_configure(int value, int lower, int upper, int step_increment, int page_increment, int page_size)=0
virtual void set_vpolicy(VclPolicyType eVPolicy)=0
virtual void vadjustment_set_upper(int upper)=0
Link< ScrolledWindow &, void > m_aHChangeHdl
Definition: weld.hxx:410
virtual void vadjustment_set_value(int value)=0
virtual void vadjustment_set_page_increment(int size)=0
virtual int hadjustment_get_value() const =0
virtual void hadjustment_set_value(int value)=0
void signal_hadjustment_changed()
Definition: weld.hxx:414
virtual int vadjustment_get_upper() const =0
virtual VclPolicyType get_vpolicy() const =0
virtual void customize_scrollbars(const Color &rBackgroundColor, const Color &rShadowColor, const Color &rFaceColor)=0
virtual int hadjustment_get_page_size() const =0
virtual void vadjustment_set_step_increment(int size)=0
virtual int vadjustment_get_value() const =0
virtual void set_mode(VclSizeGroupMode eMode)=0
virtual void add_widget(weld::Widget *pWidget)=0
virtual ~SizeGroup()
Definition: weld.hxx:2583
virtual void set_value(sal_Int64 value)=0
TriState signal_input(int *result)
Definition: weld.hxx:1808
virtual sal_Int64 get_value() const =0
sal_Int64 get_min() const
Definition: weld.hxx:1832
virtual void set_digits(unsigned int digits)=0
virtual unsigned int get_digits() const =0
Link< SpinButton &, void > m_aOutputHdl
Definition: weld.hxx:1794
virtual void set_range(sal_Int64 min, sal_Int64 max)=0
void set_max(sal_Int64 max)
Definition: weld.hxx:1826
sal_Int64 get_max() const
Definition: weld.hxx:1838
sal_Int64 normalize(sal_Int64 nValue) const
Definition: weld.hxx:1854
virtual void set_increments(int step, int page)=0
void connect_output(const Link< SpinButton &, void > &rLink)
Definition: weld.hxx:1851
void signal_value_changed()
Definition: weld.hxx:1798
virtual void get_range(sal_Int64 &min, sal_Int64 &max) const =0
Link< SpinButton &, void > m_aValueChangedHdl
Definition: weld.hxx:1793
Link< int *, bool > m_aInputHdl
Definition: weld.hxx:1795
void connect_input(const Link< int *, bool > &rLink)
Definition: weld.hxx:1852
bool signal_output()
Definition: weld.hxx:1800
void set_min(sal_Int64 min)
Definition: weld.hxx:1820
virtual void get_increments(int &step, int &page) const =0
void connect_value_changed(const Link< SpinButton &, void > &rLink)
Definition: weld.hxx:1849
virtual void stop()=0
virtual void start()=0
virtual void set_editable(bool bEditable)=0
virtual void set_text(const OUString &rText)=0
void signal_changed()
Definition: weld.hxx:2217
Link< TextView &, void > m_aVChangeHdl
Definition: weld.hxx:2214
void save_value()
Definition: weld.hxx:2249
virtual void set_font(const vcl::Font &rFont)=0
virtual void copy_clipboard()=0
virtual int vadjustment_get_lower() const =0
virtual void paste_clipboard()=0
void signal_vadjustment_changed()
Definition: weld.hxx:2219
virtual bool can_move_cursor_with_up() const =0
virtual int vadjustment_get_value() const =0
virtual void connect_cursor_position(const Link< TextView &, void > &rLink)
Definition: weld.hxx:2253
virtual bool get_editable() const =0
virtual void set_monospace(bool bMonospace)=0
virtual void set_max_length(int nChars)=0
int get_height_rows(int nRows) const
Definition: weld.hxx:2234
virtual int vadjustment_get_page_size() const =0
virtual void replace_selection(const OUString &rText)=0
virtual int vadjustment_get_upper() const =0
void signal_cursor_position()
Definition: weld.hxx:2218
void connect_vadjustment_changed(const Link< TextView &, void > &rLink)
Definition: weld.hxx:2279
bool get_value_changed_from_saved() const
Definition: weld.hxx:2250
Link< TextView &, void > m_aCursorPositionHdl
Definition: weld.hxx:2215
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual void cut_clipboard()=0
virtual void set_alignment(TxtAlign eXAlign)=0
virtual void vadjustment_set_value(int value)=0
virtual void set_font_color(const Color &rColor)=0
OUString m_sSavedValue
Definition: weld.hxx:2210
Link< TextView &, void > m_aChangeHdl
Definition: weld.hxx:2213
virtual void select_region(int nStartPos, int nEndPos)=0
virtual OUString get_text() const =0
virtual bool can_move_cursor_with_down() const =0
void connect_changed(const Link< TextView &, void > &rLink)
Definition: weld.hxx:2252
void save_state()
Definition: weld.hxx:1575
virtual void connect_toggled(const Link< Toggleable &, void > &rLink)
Definition: weld.hxx:1579
virtual bool get_active() const =0
TriState get_saved_state() const
Definition: weld.hxx:1576
virtual bool get_inconsistent() const =0
virtual void set_inconsistent(bool inconsistent)=0
bool get_state_changed_from_saved() const
Definition: weld.hxx:1577
virtual void set_active(bool active)=0
Link< Toggleable &, void > m_aToggleHdl
Definition: weld.hxx:1536
TriState get_state() const
Definition: weld.hxx:1548
void signal_toggled()
Definition: weld.hxx:1539
void set_state(TriState eState)
Definition: weld.hxx:1557
virtual void set_item_popover(const OUString &rIdent, weld::Widget *pPopover)=0
virtual void set_item_tooltip_text(int nIndex, const OUString &rTip)=0
void connect_clicked(const Link< const OUString &, void > &rLink)
Definition: weld.hxx:2538
virtual void set_item_active(const OUString &rIdent, bool bActive)=0
Link< const OUString &, void > m_aClickHdl
Definition: weld.hxx:2483
virtual void set_item_label(int nIndex, const OUString &rLabel)=0
virtual void set_item_ident(int nIndex, const OUString &rIdent)=0
virtual OUString get_item_tooltip_text(const OUString &rIdent) const =0
void signal_toggle_menu(const OUString &rIdent)
Definition: weld.hxx:2490
virtual void set_item_menu(const OUString &rIdent, weld::Menu *pMenu)=0
virtual vcl::ImageType get_icon_size() const =0
virtual sal_uInt16 get_modifier_state() const =0
Link< const OUString &, void > m_aToggleMenuHdl
Definition: weld.hxx:2484
virtual OUString get_item_label(const OUString &rIdent) const =0
virtual int get_n_items() const =0
virtual void set_item_help_id(const OUString &rIdent, const OUString &rHelpId)=0
virtual void set_item_image_mirrored(const OUString &rIdent, bool bMirrored)=0
void append_separator(const OUString &rId)
Definition: weld.hxx:2517
virtual void set_item_image(const OUString &rIdent, VirtualDevice *pDevice)=0
virtual void set_item_icon_name(const OUString &rIdent, const OUString &rIconName)=0
virtual void set_item_label(const OUString &rIdent, const OUString &rLabel)=0
virtual bool get_item_active(const OUString &rIdent) const =0
virtual void set_item_tooltip_text(const OUString &rIdent, const OUString &rTip)=0
virtual void insert_item(int pos, const OUString &rId)=0
virtual bool get_menu_item_active(const OUString &rIdent) const =0
virtual OUString get_item_ident(int nIndex) const =0
void connect_menu_toggled(const Link< const OUString &, void > &rLink)
Definition: weld.hxx:2539
virtual void set_item_image(const OUString &rIdent, const css::uno::Reference< css::graphic::XGraphic > &rIcon)=0
virtual void set_menu_item_active(const OUString &rIdent, bool bActive)=0
void signal_clicked(const OUString &rIdent)
Definition: weld.hxx:2489
virtual bool get_item_sensitive(const OUString &rIdent) const =0
virtual void set_item_visible(const OUString &rIdent, bool bVisible)=0
virtual bool get_item_visible(const OUString &rIdent) const =0
virtual void set_item_image(int nIndex, const css::uno::Reference< css::graphic::XGraphic > &rIcon)=0
virtual int get_drop_index(const Point &rPoint) const =0
virtual void set_icon_size(vcl::ImageType eType)=0
virtual void set_item_sensitive(const OUString &rIdent, bool bSensitive)=0
virtual void insert_separator(int pos, const OUString &rId)=0
virtual ~TreeIter()
Definition: weld.hxx:909
TreeIter(const TreeIter &)=delete
TreeIter & operator=(const TreeIter &)=delete
virtual bool equal(const TreeIter &rOther) const =0
virtual void scroll_to_row(int row)=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
Link< bool &, bool > m_aDragBeginHdl
Definition: weld.hxx:949
virtual OUString get_text(const TreeIter &rIter, int col=-1) const =0
virtual bool get_selected(TreeIter *pIter) const =0
virtual void connect_popup_menu(const Link< const CommandEvent &, bool > &rLink)
Definition: weld.hxx:1289
virtual void set_text_align(int row, double fAlign, int col)=0
virtual void set_text_align(const TreeIter &rIter, double fAlign, int col)=0
virtual bool get_text_emphasis(int row, int col) const =0
virtual void make_sorted()=0
virtual bool changed_by_hover() const =0
virtual void set_toggle(const TreeIter &rIter, TriState bOn, int col=-1)=0
virtual void set_font_color(int pos, const Color &rColor)=0
void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)
Definition: weld.hxx:1012
void append(const TreeIter *pParent, const OUString &rStr)
Definition: weld.hxx:1033
virtual bool is_selected(const TreeIter &rIter) const =0
virtual TriState get_sort_indicator(int nColumn) const =0
virtual void set_children_on_demand(const TreeIter &rIter, bool bChildrenOnDemand)=0
virtual void expand_row(const TreeIter &rIter)=0
Link< TreeView &, bool > m_aRowActivatedHdl
Definition: weld.hxx:934
virtual int get_iter_index_in_parent(const TreeIter &rIter) const =0
Link< const iter_string &, bool > m_aEditingDoneHdl
Definition: weld.hxx:938
virtual void set_show_expanders(bool bShow)=0
void connect_row_activated(const Link< TreeView &, bool > &rLink)
Definition: weld.hxx:1049
void connect_collapsing(const Link< const TreeIter &, bool > &rLink)
Definition: weld.hxx:1268
virtual void swap(int pos1, int pos2)=0
virtual void set_cursor(const TreeIter &rIter)=0
virtual int vadjustment_get_value() const =0
Link< const CommandEvent &, bool > m_aPopupMenuHdl
Definition: weld.hxx:946
virtual void end_editing()=0
OUString const & get_saved_value() const
Definition: weld.hxx:1352
void insert(int nRow, TreeIter *pRet=nullptr)
Definition: weld.hxx:1005
virtual void set_text(int row, const OUString &rText, int col=-1)=0
virtual bool get_row_expanded(const TreeIter &rIter) const =0
void append(const OUString &rId, const OUString &rStr, const OUString &rImage)
Definition: weld.hxx:1029
void save_value()
Definition: weld.hxx:1351
virtual void set_sort_indicator(TriState eState, int nColumn)=0
void connect_toggled(const Link< const iter_col &, void > &rLink)
Definition: weld.hxx:1052
virtual int find_text(const OUString &rText) const =0
bool get_value_changed_from_saved() const
Definition: weld.hxx:1353
virtual OUString get_text(int row, int col=-1) const =0
void append_text(const OUString &rStr)
Definition: weld.hxx:1021
std::tuple< vcl::RenderContext &, const tools::Rectangle &, bool, const OUString & > render_args
Definition: weld.hxx:927
void remove_id(const OUString &rText)
Definition: weld.hxx:1126
Link< int, void > m_aColumnClickedHdl
Definition: weld.hxx:935
virtual void visible_foreach(const std::function< bool(TreeIter &)> &func)=0
virtual void set_toggle(int row, TriState eState, int col=-1)=0
virtual void queue_draw()=0
Link< const TreeIter &, bool > m_aExpandingHdl
Definition: weld.hxx:940
OUString m_sSavedValue
Definition: weld.hxx:930
Link< const TreeIter &, bool > m_aEditingStartedHdl
Definition: weld.hxx:937
void append(const OUString &rId, const OUString &rStr)
Definition: weld.hxx:1025
virtual bool iter_previous(TreeIter &rIter) const =0
virtual OUString get_selected_text() const =0
virtual void unselect(const TreeIter &rIter)=0
int get_checkbox_column_width() const
Definition: weld.hxx:1337
OUString signal_query_tooltip(const TreeIter &rIter)
Definition: weld.hxx:977
bool signal_collapsing(const TreeIter &rIter)
Definition: weld.hxx:960
virtual void set_clicks_to_toggle(int nToggleBehavior)=0
virtual int n_children() const =0
void unselect_all()
Definition: weld.hxx:1302
Link< TreeView &, void > m_aModelChangedHdl
Definition: weld.hxx:944
virtual void select(const TreeIter &rIter)=0
virtual void set_selection_mode(SelectionMode eMode)=0
virtual void set_text_emphasis(int row, bool bOn, int col)=0
virtual void set_image(const TreeIter &rIter, const OUString &rImage, int col=-1)=0
virtual void set_image(int row, VirtualDevice &rImage, int col=-1)=0
virtual int get_sort_column() const =0
virtual void set_font_color(const TreeIter &rIter, const Color &rColor)=0
virtual void set_extra_row_indent(const TreeIter &rIter, int nIndentLevel)=0
virtual void insert(const TreeIter *pParent, int pos, const OUString *pStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface, bool bChildrenOnDemand, TreeIter *pRet)=0
bool signal_row_activated()
Definition: weld.hxx:954
virtual bool get_text_emphasis(const TreeIter &rIter, int col) const =0
virtual void clear()=0
virtual void set_text_emphasis(const TreeIter &rIter, bool bOn, int col)=0
Link< const iter_col &, void > m_aRadioToggleHdl
Definition: weld.hxx:936
virtual TreeView * get_drag_source() const =0
virtual void vadjustment_set_value(int value)=0
virtual int iter_n_children(const TreeIter &rIter) const =0
virtual void insert_separator(int pos, const OUString &rId)=0
virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter *pResult, bool bDnDMode, bool bAutoScroll=true)=0
virtual OUString get_column_title(int nColumn) const =0
virtual void selected_foreach(const std::function< bool(TreeIter &)> &func)=0
std::pair< const TreeIter &, int > iter_col
Definition: weld.hxx:922
void select_all()
Definition: weld.hxx:1301
void connect_model_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:1055
void connect_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:1041
void signal_changed()
Definition: weld.hxx:953
void connect_expanding(const Link< const TreeIter &, bool > &rLink)
Definition: weld.hxx:1267
std::function< int(const weld::TreeIter &, const weld::TreeIter &)> m_aCustomSort
Definition: weld.hxx:950
bool signal_editing_done(const iter_string &rIterText)
Definition: weld.hxx:971
virtual void set_column_title(int nColumn, const OUString &rTitle)=0
bool iter_nth_child(TreeIter &rIter, int nChild) const
Definition: weld.hxx:1152
void remove_text(const OUString &rText)
Definition: weld.hxx:1110
virtual void set_image(int row, const OUString &rImage, int col=-1)=0
virtual void connect_editing(const Link< const TreeIter &, bool > &rStartLink, const Link< const iter_string &, bool > &rEndLink)
Definition: weld.hxx:1272
Link< TreeView &, void > m_aChangeHdl
Definition: weld.hxx:933
virtual void connect_visible_range_changed(const Link< TreeView &, void > &rLink)
Definition: weld.hxx:1283
void signal_model_changed()
Definition: weld.hxx:965
virtual TriState get_toggle(const TreeIter &rIter, int col=-1) const =0
virtual bool get_iter_first(TreeIter &rIter) const =0
void append(TreeIter *pRet=nullptr)
Definition: weld.hxx:1010
virtual void remove(const TreeIter &rIter)=0
virtual bool is_selected(int pos) const =0
void insert_text(int pos, const OUString &rStr)
Definition: weld.hxx:1017
virtual void unset_drag_dest_row()=0
virtual void set_centered_column(int nCol)=0
virtual int get_height_rows(int nRows) const =0
virtual void copy_iterator(const TreeIter &rSource, TreeIter &rDest) const =0
virtual void start_editing(const weld::TreeIter &rEntry)=0
virtual void set_text(const TreeIter &rIter, const OUString &rStr, int col=-1)=0
std::pair< const TreeIter &, OUString > iter_string
Definition: weld.hxx:923
virtual void remove(int pos)=0
virtual bool iter_next_sibling(TreeIter &rIter) const =0
bool iter_nth_sibling(TreeIter &rIter, int nChild) const
Definition: weld.hxx:1145
virtual bool get_sensitive(int row, int col) const =0
virtual void enable_toggle_buttons(ColumnToggleType eType)=0
virtual void select(int pos)=0
virtual int find_id(const OUString &rId) const =0
Link< get_size_args, Size > m_aGetSizeHdl
Definition: weld.hxx:986
virtual bool iter_parent(TreeIter &rIter) const =0
virtual void set_sort_func(const std::function< int(const weld::TreeIter &, const weld::TreeIter &)> &func)
Definition: weld.hxx:1321
virtual void set_column_fixed_widths(const std::vector< int > &rWidths)=0
virtual void set_image(const TreeIter &rIter, const css::uno::Reference< css::graphic::XGraphic > &rImage, int col=-1)=0
virtual bool iter_next(TreeIter &rIter) const =0
virtual void set_image(const TreeIter &rIter, VirtualDevice &rImage, int col=-1)=0
virtual int iter_compare(const TreeIter &a, const TreeIter &b) const =0
virtual bool iter_previous_sibling(TreeIter &rIter) const =0
bool signal_editing_started(const TreeIter &rIter)
Definition: weld.hxx:969
virtual void collapse_row(const TreeIter &rIter)=0
virtual bool iter_children(TreeIter &rIter) const =0
virtual tools::Rectangle get_row_area(const weld::TreeIter &rIter) const =0
void signal_toggled(const iter_col &rIterCol)
Definition: weld.hxx:967
virtual void set_id(int row, const OUString &rId)=0
virtual bool get_children_on_demand(const TreeIter &rIter) const =0
Link< render_args, void > m_aRenderHdl
Definition: weld.hxx:979
virtual void unselect(int pos)=0
virtual void set_column_custom_renderer(int nColumn, bool bEnable)=0
virtual OUString get_id(const TreeIter &rIter) const =0
virtual TriState get_toggle(int row, int col=-1) const =0
std::pair< vcl::RenderContext &, const OUString & > get_size_args
Definition: weld.hxx:925
virtual bool iter_has_child(const TreeIter &rIter) const =0
Link< const TreeIter &, bool > m_aCollapsingHdl
Definition: weld.hxx:942
virtual void bulk_insert_for_each(int nSourceCount, const std::function< void(TreeIter &, int nSourceIndex)> &func, const weld::TreeIter *pParent=nullptr, const std::vector< int > *pFixedWidths=nullptr)=0
virtual bool get_cursor(TreeIter *pIter) const =0
virtual bool get_sort_order() const =0
std::vector< OUString > get_selected_rows_text() const
Definition: weld.hxx:1111
virtual int get_column_width(int nCol) const =0
virtual void set_sort_column(int nColumn)=0
Link< TreeView &, void > m_aVisibleRangeChangedHdl
Definition: weld.hxx:943
virtual void set_cursor(int pos)=0
bool signal_expanding(const TreeIter &rIter)
Definition: weld.hxx:956
void connect_column_clicked(const Link< int, void > &rLink)
Definition: weld.hxx:1054
virtual void set_sort_order(bool bAscending)=0
void connect_drag_begin(const Link< bool &, bool > &rLink)
Definition: weld.hxx:1298
void signal_visible_range_changed()
Definition: weld.hxx:964
Link< const TreeIter &, OUString > m_aQueryTooltipHdl
Definition: weld.hxx:976
virtual int get_iter_depth(const TreeIter &rIter) const =0
virtual std::vector< int > get_selected_rows() const =0
virtual void set_column_editables(const std::vector< bool > &rEditables)=0
void select_id(const OUString &rId)
Definition: weld.hxx:1125
virtual void connect_query_tooltip(const Link< const TreeIter &, OUString > &rLink)
Definition: weld.hxx:993
virtual void set_image(int row, const css::uno::Reference< css::graphic::XGraphic > &rImage, int col=-1)=0
virtual void scroll_to_row(const TreeIter &rIter)=0
virtual void set_sensitive(const TreeIter &rIter, bool bSensitive, int col=-1)=0
virtual void enable_drag_source(rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants)=0
void connect_custom_render(const Link< render_args, void > &rLink)
Definition: weld.hxx:1357
virtual void all_foreach(const std::function< bool(TreeIter &)> &func)=0
virtual void set_sensitive(int row, bool bSensitive, int col=-1)=0
virtual int get_cursor_index() const =0
virtual void make_unsorted()=0
void append_separator(const OUString &rId)
Definition: weld.hxx:1039
void signal_custom_render(vcl::RenderContext &rDevice, const tools::Rectangle &rRect, bool bSelected, const OUString &rId)
Definition: weld.hxx:980
virtual void remove_selection()=0
virtual int get_selected_index() const =0
virtual void move_subtree(TreeIter &rNode, const TreeIter *pNewParent, int nIndexInNewParent)=0
void select_text(const OUString &rText)
Definition: weld.hxx:1109
virtual void set_id(const TreeIter &rIter, const OUString &rId)=0
virtual int count_selected_rows() const =0
void connect_custom_get_size(const Link< get_size_args, Size > &rLink)
Definition: weld.hxx:1356
virtual void columns_autosize()=0
Size signal_custom_get_size(vcl::RenderContext &rDevice, const OUString &rId)
Definition: weld.hxx:987
virtual OUString get_selected_id() const =0
virtual OUString get_id(int pos) const =0
void signal_column_clicked(int nColumn)
Definition: weld.hxx:955
virtual bool get_sensitive(const TreeIter &rIter, int col) const =0
WaitObject(weld::Widget *pWindow)
Definition: weld.hxx:587
weld::Widget * m_pWindow
Definition: weld.hxx:584
Link< const MouseEvent &, bool > m_aMouseReleaseHdl
Definition: weld.hxx:96
Link< const KeyEvent &, bool > m_aKeyPressHdl
Definition: weld.hxx:92
virtual int get_text_height() const =0
virtual void set_margin_bottom(int nMargin)=0
virtual void show()=0
virtual void grab_focus()=0
virtual void set_help_id(const OUString &rName)=0
virtual ~Widget()
Definition: weld.hxx:360
virtual void hide()=0
virtual void set_accessible_name(const OUString &rName)=0
virtual void set_stack_background()=0
virtual int get_margin_start() const =0
virtual OUString get_accessible_name() const =0
virtual void set_vexpand(bool bExpand)=0
virtual int get_grid_left_attach() const =0
Link< const MouseEvent &, bool > m_aMousePressHdl
Definition: weld.hxx:94
virtual void set_tooltip_text(const OUString &rTip)=0
virtual void set_toolbar_background()=0
virtual bool get_extents_relative_to(const Widget &rRelative, int &x, int &y, int &width, int &height) const =0
virtual void set_accessible_relation_labeled_by(weld::Widget *pLabel)=0
virtual void set_sensitive(bool sensitive)=0
virtual int get_margin_top() const =0
virtual void set_title_background()=0
virtual void connect_mouse_release(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:277
virtual void connect_mnemonic_activate(const Link< Widget &, bool > &rLink)
Definition: weld.hxx:241
Link< const Size &, void > m_aSizeAllocateHdl
Definition: weld.hxx:91
virtual css::uno::Reference< css::datatransfer::dnd::XDropTarget > get_drop_target()=0
Link< const KeyEvent &, bool > m_aKeyReleaseHdl
Definition: weld.hxx:93
virtual bool is_visible() const =0
virtual int get_grid_top_attach() const =0
virtual Size get_pixel_size(const OUString &rText) const =0
virtual void set_margin_top(int nMargin)=0
virtual Size get_size_request() const =0
virtual void set_size_request(int nWidth, int nHeight)=0
virtual void draw(OutputDevice &rOutput, const Point &rPos, const Size &rSizePixel)=0
virtual OUString get_accessible_description() const =0
virtual void set_grid_left_attach(int nAttach)=0
virtual void set_highlight_background()=0
virtual void connect_size_allocate(const Link< const Size &, void > &rLink)
Definition: weld.hxx:247
virtual void connect_style_updated(const Link< Widget &, void > &rLink)
Definition: weld.hxx:283
virtual void connect_key_release(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:259
virtual vcl::Font get_font()=0
virtual void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:232
virtual void freeze()=0
virtual void set_margin_end(int nMargin)=0
virtual void call_attention_to()=0
virtual void connect_get_property_tree(const Link< tools::JsonWriter &, void > &rLink)=0
virtual void set_busy_cursor(bool bBusy)=0
virtual bool has_grab() const =0
virtual int get_margin_bottom() const =0
virtual OUString get_buildable_name() const =0
virtual bool is_active() const =0
virtual void thaw()=0
virtual void connect_mouse_move(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:271
Link< Widget &, void > m_aFocusOutHdl
Definition: weld.hxx:88
Link< Widget &, void > m_aStyleUpdatedHdl
Definition: weld.hxx:90
virtual std::unique_ptr< Container > weld_parent() const =0
virtual bool get_vexpand() const =0
virtual void grab_remove()=0
virtual void set_visible(bool visible)
Definition: weld.hxx:109
virtual void set_margin_start(int nMargin)=0
virtual void queue_resize()=0
virtual float get_approximate_digit_width() const =0
virtual OUString get_tooltip_text() const =0
virtual void grab_add()=0
virtual void set_accessible_description(const OUString &rDescription)=0
virtual css::uno::Reference< css::datatransfer::clipboard::XClipboard > get_clipboard() const =0
virtual void set_background(const Color &rBackColor)=0
virtual OUString strip_mnemonic(const OUString &rLabel) const =0
virtual void connect_mouse_press(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:265
virtual Size get_preferred_size() const =0
virtual bool has_focus() const =0
virtual bool get_hexpand() const =0
virtual VclPtr< VirtualDevice > create_virtual_device() const =0
virtual int get_margin_end() const =0
Link< Widget &, void > m_aFocusInHdl
Definition: weld.hxx:87
Link< const MouseEvent &, bool > m_aMouseMotionHdl
Definition: weld.hxx:95
virtual void set_grid_width(int nCols)=0
virtual void set_grid_top_attach(int nAttach)=0
virtual void get_property_tree(tools::JsonWriter &rJsonWriter)=0
virtual bool get_visible() const =0
virtual void help_hierarchy_foreach(const std::function< bool(const OUString &)> &func)=0
virtual OUString get_help_id() const =0
virtual bool get_sensitive() const =0
virtual void set_hexpand(bool bExpand)=0
virtual bool get_direction() const =0
virtual void set_buildable_name(const OUString &rName)=0
virtual void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:253
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:226
Link< Widget &, bool > m_aMnemonicActivateHdl
Definition: weld.hxx:89
virtual void set_can_focus(bool bCanFocus)=0
virtual bool has_child_focus() const =0
virtual void set_cursor_data(void *pData)=0
virtual void set_direction(bool bRTL)=0
virtual bool has_toplevel_focus() const =0
virtual bool is_default_widget(const weld::Widget *pCandidate) const =0
virtual css::uno::Reference< css::awt::XWindow > GetXWindow()=0
virtual void set_centered_on_parent(bool bTrackGeometryRequests)=0
virtual Point get_position() const =0
virtual void present()=0
virtual OUString get_window_state(vcl::WindowDataMask nMask) const =0
virtual tools::Rectangle get_monitor_workarea() const =0
virtual void set_title(const OUString &rTitle)=0
virtual bool get_resizable() const =0
virtual Size get_size() const =0
virtual bool get_modal() const =0
virtual void set_window_state(const OUString &rStr)=0
virtual ScreenShotCollection collect_screenshot_data()=0
virtual OUString get_title() const =0
virtual VclPtr< VirtualDevice > screenshot()=0
virtual void resize_to_request()=0
void connect_help(const Link< Widget &, bool > &rLink)
Definition: weld.hxx:566
virtual const vcl::ILibreOfficeKitNotifier * GetLOKNotifier()=0
virtual SystemEnvData get_system_data() const =0
virtual void change_default_widget(weld::Widget *pOld, weld::Widget *pNew)=0
virtual void window_move(int x, int y)=0
virtual void set_modal(bool bModal)=0
Link< Widget &, bool > m_aHelpRequestHdl
Definition: weld.hxx:527
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
#define max(a, b)
FieldUnit
DocumentType eType
sal_Int16 nValue
TriState
TRISTATE_FALSE
TRISTATE_INDET
TRISTATE_TRUE
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
uno_Any a
OUStringBuffer & remove(OUStringBuffer &rIn, sal_Unicode c)
Warning
Error
int i
Title
ImageType
Definition: vclenum.hxx:280
WindowDataMask
Definition: windowstate.hxx:43
static void append(std::bitset< N > &rSet, size_t const nOffset, sal_uInt32 const nValue)
Definition: sft.cxx:2491
OutputDevice RenderContext
Definition: outdev.hxx:159
sal_Int64 ConvertValue(sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits, FieldUnit eInUnit, FieldUnit eOutUnit)
Definition: field.cxx:1027
ColumnToggleType
Definition: weld.hxx:895
T fromId(const OUString &rValue)
Definition: weld.hxx:675
Placement
Definition: weld.hxx:2390
std::tuple< tools::JsonWriter &, const TreeIter &, std::string_view > json_prop_query
Definition: weld.hxx:1385
EntryMessageType
Definition: weld.hxx:703
LabelType
Definition: weld.hxx:2182
OUString toId(const void *pValue)
Definition: weld.hxx:670
std::vector< ScreenShotEntry > ScreenShotCollection
Definition: weld.hxx:522
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
PointerStyle
Definition: ptrstyle.hxx:26
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
OUString sImage
Definition: weld.hxx:684
ComboBoxEntry(OUString _aString, OUString _aId)
Definition: weld.hxx:689
ComboBoxEntry(OUString _aString, OUString _aId, OUString _aImage)
Definition: weld.hxx:694
OUString sString
Definition: weld.hxx:682
ComboBoxEntry(OUString _aString)
Definition: weld.hxx:685
OUString sId
Definition: weld.hxx:683
unsigned char sal_uInt8
Any result
OUString sId
SelectionMode
Definition: vclenum.hxx:26
VclPolicyType
Definition: vclenum.hxx:243
ScrollType
Definition: vclenum.hxx:372
TxtAlign
Definition: vclenum.hxx:316
VclSizeGroupMode
Definition: vclenum.hxx:235
css::uno::Reference< css::accessibility::XAccessibleRelationSet > a11yrelationset
Definition: weld.hxx:52
css::uno::Reference< css::accessibility::XAccessible > a11yref
Definition: weld.hxx:51
size_t pos