10#include <com/sun/star/util/URLTransformer.hpp>
11#include <com/sun/star/frame/Desktop.hpp>
26 const OUString& rUIXMLDescription,
const OUString& rID,
bool bIsMobile)
27 : m_pDialogController(pController)
28 , m_xBuilder(
Application::CreateBuilder(pParent, rUIXMLDescription, bIsMobile))
42 const std::function<
void(sal_Int32)>& func)
44 return rController->getDialog()->runAsync(rController, func);
52 const OUString& rDialogId,
bool bMobile)
53 : m_xBuilder(
Application::CreateBuilder(pParent, rUIFile, bMobile))
54 ,
m_xDialog(m_xBuilder->weld_dialog(rDialogId))
63 const OUString& rDialogId,
64 const OUString& rRelocateId)
65 : m_xBuilder(
Application::CreateBuilder(pParent, rUIFile))
66 ,
m_xDialog(m_xBuilder->weld_message_dialog(rDialogId))
67 , m_xContentArea(
m_xDialog->weld_message_area())
69 if (!rRelocateId.isEmpty())
88 const OUString& rDialogId)
89 : m_xBuilder(
Application::CreateBuilder(pParent, rUIFile))
90 , m_xAssistant(m_xBuilder->weld_assistant(rDialogId))
122 std::unique_ptr<weld::TreeIter> xNewParent(rTreeView.
make_iterator(&rParent));
128 std::unique_ptr<weld::TreeIter> xChild(rTreeView.
make_iterator(&rParent));
134 rTreeView.
remove(rParent);
138 : m_rEntry(rSpinButton)
139 , m_pSpinButton(&rSpinButton)
140 , m_eOptions(
Application::GetSettings().GetStyleSettings().GetSelectionOptions())
147 , m_pSpinButton(nullptr)
148 , m_eOptions(
Application::GetSettings().GetStyleSettings().GetSelectionOptions())
171 int nStartPos, nEndPos;
181 auto nMin = rSel.
Min();
182 auto nMax = rSel.
Max();
248 m_pSpinButton->signal_value_changed();
249 m_aFocusOutHdl.Call(m_rEntry);
292 if (!sSeparator.isEmpty())
293 cSeparatorThousand = sSeparator[0];
296 if (!sSeparator.isEmpty())
297 cSeparatorDecimal = sSeparator[0];
306 , m_bThousandSep(true)
313 , m_bThousandSep(true)
461 , m_bStrictFormat(false)
464 , m_bInPattKeyInput(false)
477 m_aFocusOutHdl.Call(m_rEntry);
483 m_aFocusInHdl.Call(m_rEntry);
495 std::unique_ptr<weld::Builder> xBuilder(
497 std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry(
"name_entry"));
498 return xEntry->get_preferred_size().Height();
504 css::uno::Reference<css::uno::XComponentContext> xContext
505 = ::comphelper::getProcessComponentContext();
506 css::uno::Reference<css::frame::XDesktop2> xDesktop = css::frame::Desktop::create(xContext);
508 css::uno::Reference<css::frame::XFrame>
xFrame(xDesktop->getActiveFrame());
515 css::uno::Reference<css::util::XURLTransformer> xParser
516 = css::util::URLTransformer::create(xContext);
525 css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(
mxFrame,
526 css::uno::UNO_QUERY);
527 if (!xDispatchProvider.is())
559 ,
m_aRepeat(
"vcl ButtonPressRepeater m_aRepeat")
561 , m_aContextLink(rContextLink)
574 if (rMouseEvent.IsRight())
580 m_bModKey = rMouseEvent.IsMod1();
581 if (!m_rButton.get_sensitive())
583 auto self = weak_from_this();
584 RepeatTimerHdl(
nullptr);
587 if (!m_rButton.get_sensitive())
604 m_aLink.Call(m_rButton);
624 if (
vcl::Window* pDefaultWindow = pDefaultDevice->GetOwnerWindow())
625 pDefaultWindow->SetPointFont(rDevice, rFont);
629 : DropTargetHelper(rTreeView.get_drop_target())
630 , m_rTreeView(rTreeView)
Reference< XExecutableDialog > m_xDialog
Base class used mainly for the LibreOffice Desktop class.
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
static const AllSettings & GetSettings()
Gets the application's settings.
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
BuilderPage(weld::Widget *pParent, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rID, bool bIsMobile=false)
virtual ~BuilderPage() COVERITY_NOEXCEPT_FALSE
virtual void Deactivate()
static tools::Rectangle ImplConvertToRelPos(vcl::Window *pReference, const tools::Rectangle &rRect)
static Point ImplConvertToAbsPos(vcl::Window *pReference, const Point &rPos)
const OUString & getNumThousandSep() const
const OUString & getNumDecimalSep() const
static sal_Int32 GetButtonStartRepeat()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
Point OutputToScreenPixel(const Point &rPos) const
weld::Window * GetFrameWeld() const
vcl::Window * GetFrameWindow() const
Point ScreenToOutputPixel(const Point &rPos) const
AssistantController(weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId)
virtual Dialog * getDialog() override
std::unique_ptr< weld::Assistant > m_xAssistant
virtual ~AssistantController() override
virtual ~DialogController() COVERITY_NOEXCEPT_FALSE
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
virtual SAL_DLLPRIVATE void SetSpinSize(double dStep) override
virtual SAL_DLLPRIVATE void SetMinValue(double dMin) override
virtual SAL_DLLPRIVATE void SetMaxValue(double dMin) override
Link< weld::Entry &, void > m_aModifyHdl
virtual SAL_DLLPRIVATE ~EntryFormatter() override
EntryFormatter(weld::Entry &rEntry)
virtual SAL_DLLPRIVATE void ClearMaxValue() override
weld::Entry & get_widget()
virtual SAL_DLLPRIVATE void FieldModified() override
virtual SAL_DLLPRIVATE Selection GetEntrySelection() const override
SAL_DLLPRIVATE void Init()
virtual SAL_DLLPRIVATE OUString GetEntryText() const override
virtual SAL_DLLPRIVATE void UpdateCurrentValue(double dCurrentValue) override
virtual SAL_DLLPRIVATE void ClearMinValue() override
SelectionOptions m_eOptions
virtual SAL_DLLPRIVATE void SetEntryText(const OUString &rText, const Selection &rSel) override
weld::FormattedSpinButton * m_pSpinButton
virtual SAL_DLLPRIVATE SelectionOptions GetEntrySelectionOptions() const override
virtual SAL_DLLPRIVATE void SetEntryTextColor(const Color *pColor) override
virtual void select_region(int nStartPos, int nEndPos)=0
virtual void connect_cursor_position(const Link< Entry &, void > &rLink)
virtual void set_text(const OUString &rText)=0
virtual void set_font_color(const Color &rColor)=0
virtual void connect_changed(const Link< Entry &, void > &rLink)
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual OUString get_text() const =0
virtual Dialog * getDialog() override
std::shared_ptr< weld::Dialog > m_xDialog
virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override
GenericDialogController(weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId, bool bMobile=false)
virtual Dialog * getDialog() override
std::unique_ptr< weld::Container > m_xContentArea
MessageDialogController(weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId, const OUString &rRelocateId={})
virtual ~MessageDialogController() override
std::unique_ptr< weld::Widget > m_xRelocate
std::unique_ptr< weld::Builder > m_xBuilder
std::unique_ptr< weld::MessageDialog > m_xDialog
std::unique_ptr< weld::Container > m_xOrigParent
weld::TreeView & m_rTreeView
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
ReorderingDropTarget(weld::TreeView &rTreeView)
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
TriState get_state() const
void set_state(TriState eState)
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
virtual bool get_selected(TreeIter *pIter) const =0
virtual int get_iter_index_in_parent(const TreeIter &rIter) const =0
virtual TreeView * get_drag_source() const =0
virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter *pResult, bool bDnDMode, bool bAutoScroll=true)=0
virtual void remove(int pos)=0
virtual bool iter_parent(TreeIter &rIter) const =0
virtual bool iter_children(TreeIter &rIter) const =0
virtual bool iter_has_child(const TreeIter &rIter) const =0
virtual void move_subtree(TreeIter &rNode, const TreeIter *pNewParent, int nIndexInNewParent)=0
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Reference< XInterface > xTarget
#define LINK(Instance, Class, Member)
void RemoveParentKeepChildren(weld::TreeView &rTreeView, const weld::TreeIter &rParent)
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)
IMPL_LINK_NOARG(HexColorControl, OnAsyncModifyHdl, void *, void)
int GetMinimumEditHeight()
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
IMPL_LINK(CustomWeld, DoResize, const Size &, rSize, void)
Reference< XNameAccess > m_xContainer
void ButtonToggled(Toggleable &rToggle)
Reference< XFrame > xFrame
@ Short24H
the first 4 of these are only used by base/dbaccess