LibreOffice Module vcl (master)  1
weldutils.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #include <com/sun/star/util/URLTransformer.hpp>
11 #include <com/sun/star/frame/Desktop.hpp>
13 #include <svl/zforlist.hxx>
14 #include <svl/zformat.hxx>
15 #include <vcl/builderpage.hxx>
16 #include <vcl/commandevent.hxx>
18 #include <vcl/event.hxx>
19 #include <vcl/toolkit/floatwin.hxx>
20 #include <vcl/settings.hxx>
21 #include <vcl/svapp.hxx>
22 #include <vcl/weldutils.hxx>
23 
25  const OUString& rUIXMLDescription, const OString& rID, bool bIsMobile)
26  : m_pDialogController(pController)
27  , m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription, bIsMobile))
28  , m_xContainer(m_xBuilder->weld_container(rID))
29 {
30 }
31 
33 
35 
36 BuilderPage::~BuilderPage() COVERITY_NOEXCEPT_FALSE {}
37 
38 namespace weld
39 {
40 bool DialogController::runAsync(const std::shared_ptr<DialogController>& rController,
41  const std::function<void(sal_Int32)>& func)
42 {
43  return rController->getDialog()->runAsync(rController, func);
44 }
45 
46 DialogController::~DialogController() COVERITY_NOEXCEPT_FALSE {}
47 
49 
51  const OString& rDialogId, bool bMobile)
52  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile, bMobile))
53  , m_xDialog(m_xBuilder->weld_dialog(rDialogId))
54 {
55 }
56 
58 
60 
62  const OString& rDialogId,
63  const OString& rRelocateId)
64  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile))
65  , m_xDialog(m_xBuilder->weld_message_dialog(rDialogId))
66  , m_xContentArea(m_xDialog->weld_message_area())
67 {
68  if (!rRelocateId.isEmpty())
69  {
70  m_xRelocate = m_xBuilder->weld_container(rRelocateId);
71  m_xOrigParent = m_xRelocate->weld_parent();
72  //fdo#75121, a bit tricky because the widgets we want to align with
73  //don't actually exist in the ui description, they're implied
74  m_xOrigParent->move(m_xRelocate.get(), m_xContentArea.get());
75  }
76 }
77 
79 {
80  if (m_xRelocate)
81  {
82  m_xContentArea->move(m_xRelocate.get(), m_xOrigParent.get());
83  }
84 }
85 
86 AssistantController::AssistantController(weld::Widget* pParent, const OUString& rUIFile,
87  const OString& rDialogId)
88  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile))
89  , m_xAssistant(m_xBuilder->weld_assistant(rDialogId))
90 {
91 }
92 
94 
96 
98 {
99  if (bTriStateEnabled)
100  {
101  switch (eState)
102  {
103  case TRISTATE_INDET:
104  rToggle.set_state(TRISTATE_FALSE);
105  break;
106  case TRISTATE_TRUE:
107  rToggle.set_state(TRISTATE_INDET);
108  break;
109  case TRISTATE_FALSE:
110  rToggle.set_state(TRISTATE_TRUE);
111  break;
112  }
113  }
114  eState = rToggle.get_state();
115 }
116 
118 {
119  if (rTreeView.iter_has_child(rParent))
120  {
121  std::unique_ptr<weld::TreeIter> xNewParent(rTreeView.make_iterator(&rParent));
122  if (!rTreeView.iter_parent(*xNewParent))
123  xNewParent.reset();
124 
125  while (true)
126  {
127  std::unique_ptr<weld::TreeIter> xChild(rTreeView.make_iterator(&rParent));
128  if (!rTreeView.iter_children(*xChild))
129  break;
130  rTreeView.move_subtree(*xChild, xNewParent.get(), -1);
131  }
132  }
133  rTreeView.remove(rParent);
134 }
135 
137  : m_rEntry(rSpinButton)
138  , m_pSpinButton(&rSpinButton)
139  , m_eOptions(Application::GetSettings().GetStyleSettings().GetSelectionOptions())
140 {
141  Init();
142 }
143 
145  : m_rEntry(rEntry)
146  , m_pSpinButton(nullptr)
147  , m_eOptions(Application::GetSettings().GetStyleSettings().GetSelectionOptions())
148 {
149  Init();
150 }
151 
153 {
156  if (m_pSpinButton)
157  m_pSpinButton->SetFormatter(nullptr);
158 }
159 
161 {
162  m_rEntry.connect_changed(LINK(this, EntryFormatter, ModifyHdl));
163  m_rEntry.connect_focus_out(LINK(this, EntryFormatter, FocusOutHdl));
164  if (m_pSpinButton)
166 }
167 
169 {
170  int nStartPos, nEndPos;
171  m_rEntry.get_selection_bounds(nStartPos, nEndPos);
172  return Selection(nStartPos, nEndPos);
173 }
174 
175 OUString EntryFormatter::GetEntryText() const { return m_rEntry.get_text(); }
176 
177 void EntryFormatter::SetEntryText(const OUString& rText, const Selection& rSel)
178 {
179  m_rEntry.set_text(rText);
180  auto nMin = rSel.Min();
181  auto nMax = rSel.Max();
182  m_rEntry.select_region(nMin < 0 ? 0 : nMin, nMax == SELECTION_MAX ? -1 : nMax);
183 }
184 
186 {
187  m_rEntry.set_font_color(pColor ? *pColor : COL_AUTO);
188 }
189 
190 void EntryFormatter::UpdateCurrentValue(double dCurrentValue)
191 {
192  Formatter::UpdateCurrentValue(dCurrentValue);
193  if (m_pSpinButton)
195 }
196 
198 {
200  if (m_pSpinButton)
202 }
203 
205 {
207  if (m_pSpinButton)
209 }
210 
212 {
214  if (m_pSpinButton)
216 }
217 
219 {
221  if (m_pSpinButton)
223 }
224 
225 void EntryFormatter::SetSpinSize(double dStep)
226 {
227  Formatter::SetSpinSize(dStep);
228  if (m_pSpinButton)
230 }
231 
233 
235 
237 {
238  // This leads to FieldModified getting called at the end of Modify() and
239  // FieldModified then calls any modification callback
240  Modify();
241 }
242 
244 {
245  EntryLostFocus();
246  m_aFocusOutHdl.Call(m_rEntry);
247 }
248 
250  : EntryFormatter(rEntry)
251 {
253 }
254 
256  : EntryFormatter(rSpinButton)
257 {
259 }
260 
262 
264 {
267 }
268 
269 bool DoubleNumericFormatter::CheckText(const OUString& sText) const
270 {
271  // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
272  // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
273  // Thus, the roundabout way via a regular expression
274  return m_pNumberValidator->isValidNumericFragment(sText);
275 }
276 
278 {
279  // the thousands and the decimal separator are language dependent
280  const SvNumberformat* pFormatEntry = GetOrCreateFormatter()->GetEntry(m_nFormatKey);
281 
282  sal_Unicode cSeparatorThousand = ',';
283  sal_Unicode cSeparatorDecimal = '.';
284  if (pFormatEntry)
285  {
286  LocaleDataWrapper aLocaleInfo(LanguageTag(pFormatEntry->GetLanguage()));
287 
288  OUString sSeparator = aLocaleInfo.getNumThousandSep();
289  if (!sSeparator.isEmpty())
290  cSeparatorThousand = sSeparator[0];
291 
292  sSeparator = aLocaleInfo.getNumDecimalSep();
293  if (!sSeparator.isEmpty())
294  cSeparatorDecimal = sSeparator[0];
295  }
296 
297  m_pNumberValidator.reset(
298  new validation::NumberValidator(cSeparatorThousand, cSeparatorDecimal));
299 }
300 
302  : EntryFormatter(rEntry)
303  , m_bThousandSep(true)
304 {
305  Init();
306 }
307 
309  : EntryFormatter(rSpinButton)
310  , m_bThousandSep(true)
311 {
312  Init();
313 }
314 
316 {
317  SetOutputHdl(LINK(this, LongCurrencyFormatter, FormatOutputHdl));
318  SetInputHdl(LINK(this, LongCurrencyFormatter, ParseInputHdl));
319 }
320 
322 {
323  m_bThousandSep = b;
324  ReFormat();
325 }
326 
328 {
329  m_aCurrencySymbol = rStr;
330  ReFormat();
331 }
332 
334 
336  : EntryFormatter(rEntry)
337  , m_eFormat(TimeFieldFormat::F_NONE)
338  , m_eTimeFormat(TimeFormat::Hour24)
339  , m_bDuration(false)
340 {
341  Init();
342 }
343 
345  : EntryFormatter(rSpinButton)
346  , m_eFormat(TimeFieldFormat::F_NONE)
347  , m_eTimeFormat(TimeFormat::Hour24)
348  , m_bDuration(false)
349 {
350  Init();
351 }
352 
354 {
355  DisableRemainderFactor(); //so with hh::mm::ss, incrementing mm will not reset ss
356 
357  SetOutputHdl(LINK(this, TimeFormatter, FormatOutputHdl));
358  SetInputHdl(LINK(this, TimeFormatter, ParseInputHdl));
359 
360  SetMin(tools::Time(0, 0));
361  SetMax(tools::Time(23, 59, 59, 999999999));
362 
363  // so the spin size can depend on which zone the cursor is in
364  get_widget().connect_cursor_position(LINK(this, TimeFormatter, CursorChangedHdl));
365  // and set the initial spin size
366  CursorChangedHdl(get_widget());
367 }
368 
370 {
371  switch (eFormat)
372  {
374  {
376  m_bDuration = false;
378  }
379  break;
381  {
383  m_bDuration = false;
385  }
386  break;
388  {
390  m_bDuration = false;
392  }
393  break;
395  {
397  m_bDuration = false;
399  }
400  break;
402  {
403  m_bDuration = true;
405  }
406  break;
408  {
409  m_bDuration = true;
411  }
412  break;
413  }
414 
415  ReFormat();
416 }
417 
418 void TimeFormatter::SetDuration(bool bDuration)
419 {
420  m_bDuration = bDuration;
421  ReFormat();
422 }
423 
425 {
426  m_eFormat = eTimeFormat;
427  ReFormat();
428 }
429 
431 
433  : EntryFormatter(rEntry)
434  , m_eFormat(ExtDateFieldFormat::SystemShort)
435 {
436  Init();
437 }
438 
440 {
441  SetOutputHdl(LINK(this, DateFormatter, FormatOutputHdl));
442  SetInputHdl(LINK(this, DateFormatter, ParseInputHdl));
443 
444  SetMin(Date(1, 1, 1900));
445  SetMax(Date(31, 12, 2200));
446 }
447 
449 {
450  m_eFormat = eFormat;
451  ReFormat();
452 }
453 
455 
457  : m_rEntry(rEntry)
458  , m_bStrictFormat(false)
459  , m_bSameMask(true)
460  , m_bReformat(false)
461  , m_bInPattKeyInput(false)
462 {
463  m_rEntry.connect_changed(LINK(this, PatternFormatter, ModifyHdl));
464  m_rEntry.connect_focus_in(LINK(this, PatternFormatter, FocusInHdl));
465  m_rEntry.connect_focus_out(LINK(this, PatternFormatter, FocusOutHdl));
466  m_rEntry.connect_key_press(LINK(this, PatternFormatter, KeyInputHdl));
467 }
468 
470 
472 {
473  EntryLostFocus();
474  m_aFocusOutHdl.Call(m_rEntry);
475 }
476 
478 {
479  EntryGainFocus();
480  m_aFocusInHdl.Call(m_rEntry);
481 }
482 
484 {
487 }
488 
490 {
491  // load this little .ui just to measure the height of an Entry
492  std::unique_ptr<weld::Builder> xBuilder(
493  Application::CreateBuilder(nullptr, "cui/ui/namedialog.ui"));
494  std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry("name_entry"));
495  return xEntry->get_preferred_size().Height();
496 }
497 
499  : mWidget(widget)
500 {
501  css::uno::Reference<css::uno::XComponentContext> xContext
502  = ::comphelper::getProcessComponentContext();
503  css::uno::Reference<css::frame::XDesktop2> xDesktop = css::frame::Desktop::create(xContext);
504 
505  css::uno::Reference<css::frame::XFrame> xFrame(xDesktop->getActiveFrame());
506  if (!xFrame.is())
507  xFrame = xDesktop;
508 
509  mxFrame = xFrame;
510 
511  maCommandURL.Complete = aCommand;
512  css::uno::Reference<css::util::XURLTransformer> xParser
513  = css::util::URLTransformer::create(xContext);
514  xParser->parseStrict(maCommandURL);
515 }
516 
518 {
519  if (mxDispatch.is())
520  mxDispatch->removeStatusListener(this, maCommandURL);
521 
522  css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(mxFrame,
523  css::uno::UNO_QUERY);
524  if (!xDispatchProvider.is())
525  return;
526 
527  mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, "", 0);
528  if (mxDispatch.is())
529  mxDispatch->addStatusListener(this, maCommandURL);
530 }
531 
532 void WidgetStatusListener::statusChanged(const css::frame::FeatureStateEvent& rEvent)
533 {
534  mWidget->set_sensitive(rEvent.IsEnabled);
535 }
536 
537 void WidgetStatusListener::disposing(const css::lang::EventObject& /*Source*/)
538 {
539  mxDispatch.clear();
540 }
541 
543 {
544  if (mxDispatch.is())
545  {
546  mxDispatch->removeStatusListener(this, maCommandURL);
547  mxDispatch.clear();
548  }
549  mxFrame.clear();
550  mWidget = nullptr;
551 }
552 
554  const Link<const CommandEvent&, void>& rContextLink)
555  : m_rButton(rButton)
556  , m_aLink(rLink)
557  , m_aContextLink(rContextLink)
558  , m_bModKey(false)
559 {
560  // instead of connect_clicked because we want a button held down to
561  // repeat the next/prev
562  m_rButton.connect_mouse_press(LINK(this, ButtonPressRepeater, MousePressHdl));
563  m_rButton.connect_mouse_release(LINK(this, ButtonPressRepeater, MouseReleaseHdl));
564 
565  m_aRepeat.SetInvokeHandler(LINK(this, ButtonPressRepeater, RepeatTimerHdl));
566 }
567 
568 IMPL_LINK(ButtonPressRepeater, MousePressHdl, const MouseEvent&, rMouseEvent, bool)
569 {
570  if (rMouseEvent.IsRight())
571  {
572  m_aContextLink.Call(
573  CommandEvent(rMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true));
574  return false;
575  }
576  m_bModKey = rMouseEvent.IsMod1();
577  if (!m_rButton.get_sensitive())
578  return false;
579  auto self = weak_from_this();
580  RepeatTimerHdl(nullptr);
581  if (!self.lock())
582  return false;
583  if (!m_rButton.get_sensitive())
584  return false;
586  m_aRepeat.Start();
587  return false;
588 }
589 
590 IMPL_LINK_NOARG(ButtonPressRepeater, MouseReleaseHdl, const MouseEvent&, bool)
591 {
592  m_bModKey = false;
593  m_aRepeat.Stop();
594  return false;
595 }
596 
597 IMPL_LINK_NOARG(ButtonPressRepeater, RepeatTimerHdl, Timer*, void)
598 {
599  m_aRepeat.SetTimeout(Application::GetSettings().GetMouseSettings().GetButtonRepeat());
600  m_aLink.Call(m_rButton);
601 }
602 
604 {
605  rRect.SetPos(rOutWin.OutputToScreenPixel(rRect.TopLeft()));
606  rRect = FloatingWindow::ImplConvertToAbsPos(&rOutWin, rRect);
607 
608  vcl::Window* pWin = rOutWin.GetFrameWindow();
609 
610  rRect = FloatingWindow::ImplConvertToRelPos(pWin, rRect);
611  rRect.SetPos(pWin->ScreenToOutputPixel(rRect.TopLeft()));
612 
613  return rOutWin.GetFrameWeld();
614 }
615 
616 void SetPointFont(OutputDevice& rDevice, const vcl::Font& rFont)
617 {
618  auto pDefaultDevice = Application::GetDefaultDevice();
619  if (pDefaultDevice)
620  if (vcl::Window* pDefaultWindow = pDefaultDevice->GetOwnerWindow())
621  pDefaultWindow->SetPointFont(rDevice, rFont);
622 }
623 }
624 
625 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long Max() const
PatternFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:456
std::shared_ptr< weld::Dialog > m_xDialog
Definition: weld.hxx:2509
void SetPos(const Point &rPoint)
TimeFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:335
virtual void connect_changed(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1664
virtual void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:227
virtual void SetMinValue(double dMin) override
Definition: weldutils.cxx:204
LongCurrencyFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:301
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
Definition: builder.cxx:181
void set_state(TriState eState)
Definition: weld.hxx:1455
void SetDuration(bool bDuration)
Definition: weldutils.cxx:418
ExtTimeFieldFormat
Definition: vclenum.hxx:146
void SetCurrencySymbol(const OUString &rStr)
Definition: weldutils.cxx:327
AutoTimer m_aRepeat
TimeFieldFormat
Definition: vclenum.hxx:28
virtual bool iter_parent(TreeIter &rIter) const =0
void SetInputHdl(const Link< sal_Int64 *, TriState > &rLink)
Definition: formatter.hxx:238
virtual Dialog * getDialog() override
Definition: weldutils.cxx:93
virtual void SetEntryText(const OUString &rText, const Selection &rSel) override
Definition: weldutils.cxx:177
virtual SelectionOptions GetEntrySelectionOptions() const override
Definition: weldutils.cxx:232
SelectionOptions
Definition: settings.hxx:178
virtual void ClearMaxValue()
Definition: formatter.hxx:168
Reference< XFrame > xFrame
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:733
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
FORMAT_CHANGE_TYPE
Definition: formatter.hxx:76
void SetTimeFormat(TimeFieldFormat eTimeFormat)
Definition: weldutils.cxx:424
Link< weld::Entry &, void > m_aModifyHdl
Definition: weldutils.hxx:241
virtual ~TimeFormatter() override
Definition: field2.cxx:2686
the first 4 of these are only used by base/dbaccess
void SAL_CALL disposing(const css::lang::EventObject &) override
Definition: weldutils.cxx:537
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2521
std::unique_ptr< weld::Widget > m_xRelocate
Definition: weld.hxx:2524
void RemoveParentKeepChildren(weld::TreeView &rTreeView, weld::TreeIter &rParent)
Definition: weldutils.cxx:117
virtual ~MessageDialogController() override
Definition: weldutils.cxx:78
void SetExtFormat(ExtTimeFieldFormat eFormat)
Definition: weldutils.cxx:369
void DisableRemainderFactor()
Definition: fmtfield.cxx:869
TimeFormat m_eTimeFormat
Definition: weldutils.hxx:321
virtual Dialog * getDialog() override
Definition: weldutils.cxx:48
virtual void set_text(const OUString &rText)=0
TRISTATE_TRUE
virtual void SetMinValue(double dMin)
Definition: fmtfield.cxx:702
void ReFormat()
Definition: fmtfield.cxx:686
virtual ~BuilderPage() COVERITY_NOEXCEPT_FALSE
Definition: weldutils.cxx:36
virtual void sync_increments_from_formatter()=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
virtual void ClearMinValue() override
Definition: weldutils.cxx:197
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1069
std::unique_ptr< weld::Container > m_xOrigParent
Definition: weld.hxx:2525
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
Definition: weldutils.cxx:40
weld::Window * GetFrameWeld() const
Definition: window2.cxx:847
sal_uInt16 sal_Unicode
Reference< XNameAccess > m_xContainer
ButtonPressRepeater(weld::Button &rButton, const Link< Button &, void > &rLink, const Link< const CommandEvent &, void > &rContextLink=Link< const CommandEvent &, void >())
Definition: weldutils.cxx:553
virtual ~DateFormatter() override
Definition: field2.cxx:1726
static tools::Rectangle ImplConvertToRelPos(vcl::Window *pReference, const tools::Rectangle &rRect)
Definition: floatwin.cxx:526
virtual void ClearMaxValue() override
Definition: weldutils.cxx:211
TimeFormat
Definition: vclenum.hxx:141
vcl::Window * GetFrameWindow() const
Definition: window2.cxx:853
virtual void SetMaxValue(double dMin) override
Definition: weldutils.cxx:218
IMPL_LINK(CustomWeld, DoResize, const Size &, rSize, void)
Definition: customweld.cxx:46
virtual void UpdateCurrentValue(double dCurrentValue)
Definition: formatter.hxx:313
css::uno::Reference< css::frame::XDispatch > mxDispatch
The widget on which actions are performed.
Definition: weldutils.hxx:183
virtual void connect_mouse_release(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:272
virtual bool CheckText(const OUString &sText) const override
Definition: weldutils.cxx:269
void ButtonToggled(Toggleable &rToggle)
Definition: weldutils.cxx:97
void SetOutputHdl(const Link< LinkParamNone *, bool > &rLink)
Definition: formatter.hxx:239
css::util::URL maCommandURL
Definition: weldutils.hxx:184
virtual void Deactivate()
Definition: weldutils.cxx:34
ExtDateFieldFormat m_eFormat
Definition: weldutils.hxx:351
TRISTATE_INDET
weld::Entry & m_rEntry
Definition: weldutils.hxx:239
AssistantController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId)
Definition: weldutils.cxx:86
const OUString & getNumDecimalSep() const
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual ~DialogController() COVERITY_NOEXCEPT_FALSE
Definition: weldutils.cxx:46
virtual void ClearMinValue()
Definition: formatter.hxx:163
virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override
Definition: weldutils.cxx:57
virtual OUString GetEntryText() const override
Definition: weldutils.cxx:175
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override
Definition: weldutils.cxx:263
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
Definition: weldutils.cxx:603
virtual void connect_cursor_position(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1668
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat)
Definition: fmtfield.cxx:627
TRISTATE_FALSE
virtual bool iter_has_child(const TreeIter &rIter) const =0
static Point ImplConvertToAbsPos(vcl::Window *pReference, const Point &rPos)
Definition: floatwin.cxx:481
std::unique_ptr< weld::Container > m_xContentArea
Definition: weld.hxx:2523
virtual void select_region(int nStartPos, int nEndPos)=0
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:162
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
Definition: timer.cxx:83
virtual ~DoubleNumericFormatter() override
TimeFieldFormat m_eFormat
Definition: weldutils.hxx:320
weld::Entry & get_widget()
Definition: weldutils.hxx:205
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:221
virtual Selection GetEntrySelection() const override
Definition: weldutils.cxx:168
Base class used mainly for the LibreOffice Desktop class.
Definition: svapp.hxx:233
virtual void SetMaxValue(double dMax)
Definition: fmtfield.cxx:712
void SetTimeout(sal_uInt64 nTimeoutMs)
Definition: timer.cxx:90
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2798
void SetUseThousandSep(bool b)
Definition: weldutils.cxx:321
virtual void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:248
virtual OUString get_text() const =0
WidgetStatusListener(weld::Widget *widget, const OUString &rCommand)
Definition: weldutils.cxx:498
constexpr Point TopLeft() const
void SetMax(const Date &rNewMax)
Definition: field2.cxx:1769
virtual void Activate()
Definition: weldutils.cxx:32
void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &rEvent) override
Definition: weldutils.cxx:532
virtual bool iter_children(TreeIter &rIter) const =0
virtual void remove(int pos)=0
virtual void UpdateCurrentValue(double dCurrentValue) override
Definition: weldutils.cxx:190
ExtDateFieldFormat
Definition: vclenum.hxx:154
EntryFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:144
void SetMin(const Date &rNewMin)
Definition: field2.cxx:1762
virtual Dialog * getDialog() override
Definition: weldutils.cxx:59
IMPL_LINK_NOARG(HexColorControl, OnAsyncModifyHdl, void *, void)
void Stop()
Definition: scheduler.cxx:590
TriState get_state() const
Definition: weld.hxx:1446
virtual ~EntryFormatter() override
Definition: weldutils.cxx:152
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
void SetExtDateFormat(ExtDateFieldFormat eFormat)
Definition: weldutils.cxx:448
std::unique_ptr< validation::NumberValidator > m_pNumberValidator
Definition: weldutils.hxx:266
tools::Long Min() const
virtual void connect_mouse_press(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:260
virtual ~AssistantController() override
Definition: weldutils.cxx:95
virtual void FieldModified() override
Definition: weldutils.cxx:234
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)
Definition: weldutils.cxx:616
Reference< XExecutableDialog > m_xDialog
virtual void sync_value_from_formatter()=0
weld::Button & m_rButton
Definition: weldutils.hxx:403
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: weldutils.hxx:185
void SetInvokeHandler(const Link< Timer *, void > &rLink)
Definition: timer.hxx:56
DateFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:432
virtual void SetEntryTextColor(const Color *pColor) override
Definition: weldutils.cxx:185
const OUString & getNumThousandSep() const
virtual ~LongCurrencyFormatter() override
Definition: longcurr.cxx:287
SvNumberFormatter * GetOrCreateFormatter() const
Definition: formatter.hxx:194
#define SELECTION_MAX
virtual void sync_range_from_formatter()=0
weld::Entry & m_rEntry
Definition: weldutils.hxx:379
Definition: timer.hxx:26
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2792
SelectionOptions m_eOptions
Definition: weldutils.hxx:243
virtual void SetFormatter(weld::EntryFormatter *pFormatter)=0
void SetMax(const tools::Time &rNewMax)
Definition: field2.cxx:2702
std::unique_ptr< weld::Assistant > m_xAssistant
Definition: weld.hxx:2551
std::shared_ptr< osl::Mutex > const & lock()
std::unique_ptr< weld::MessageDialog > m_xDialog
Definition: weld.hxx:2522
int GetMinimumEditHeight()
Definition: weldutils.cxx:489
sal_uLong m_nFormatKey
Definition: formatter.hxx:125
LanguageType GetLanguage() const
virtual void move_subtree(TreeIter &rNode, const TreeIter *pNewParent, int nIndexInNewParent)=0
virtual void set_sensitive(bool sensitive)=0
virtual void set_font_color(const Color &rColor)=0
virtual void SetSpinSize(double dStep)
Definition: formatter.hxx:226
DoubleNumericFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:249
static sal_Int32 GetButtonStartRepeat()
GenericDialogController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, bool bMobile=false)
Definition: weldutils.cxx:50
MessageDialogController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, const OString &rRelocateId=OString())
Definition: weldutils.cxx:61
BuilderPage(weld::Widget *pParent, weld::DialogController *pController, const OUString &rUIXMLDescription, const OString &rID, bool bIsMobile=false)
Definition: weldutils.cxx:24
void SetMin(const tools::Time &rNewMin)
Definition: field2.cxx:2695
virtual void SetSpinSize(double dStep) override
Definition: weldutils.cxx:225
weld::FormattedSpinButton * m_pSpinButton
Definition: weldutils.hxx:240