summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-02 18:21:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-11-04 17:33:06 +0100
commit4d83c24cdd433d5c63800290e2da6317ae12111c (patch)
treebfd4c863f0f79d40ac1671812fef1976ca4a9c85 /include
parent628e96ce1fce194b30a5c2912feb8b7ec0328db0 (diff)
reweld SwWordCountFloatDlg
fixing up the bit that failed the last time Change-Id: I235f8f92cbc0c3e31837e01a9b094580c6f5aecf Reviewed-on: https://gerrit.libreoffice.org/62786 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/basedlgs.hxx43
-rw-r--r--include/sfx2/childwin.hxx8
-rw-r--r--include/vcl/dialog.hxx7
-rw-r--r--include/vcl/weld.hxx7
4 files changed, 52 insertions, 13 deletions
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 79092bb744c5..703998b3644a 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -107,6 +107,41 @@ public:
DECL_LINK(TimerHdl, Timer *, void);
};
+class SFX2_DLLPUBLIC SfxDialogController : public weld::GenericDialogController
+{
+private:
+ DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
+public:
+ SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId);
+};
+
+class SfxModelessDialog_Impl;
+class SFX2_DLLPUBLIC SfxModelessDialogController : public SfxDialogController
+{
+ SfxBindings* m_pBindings;
+ std::unique_ptr<SfxModelessDialog_Impl> m_xImpl;
+
+ SfxModelessDialogController(SfxModelessDialogController&) = delete;
+ void operator =(SfxModelessDialogController&) = delete;
+
+ void Init(SfxBindings *pBindinx, SfxChildWindow *pCW);
+
+ DECL_DLLPRIVATE_LINK(FocusInHdl, weld::Widget&, void);
+ DECL_DLLPRIVATE_LINK(FocusOutHdl, weld::Widget&, void);
+protected:
+ SfxModelessDialogController(SfxBindings*, SfxChildWindow* pChildWin,
+ weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID);
+ virtual ~SfxModelessDialogController() override;
+
+public:
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ void Initialize (SfxChildWinInfo const * pInfo);
+ void Close();
+ void DeInit();
+ void EndDialog();
+ SfxBindings& GetBindings() { return *m_pBindings; }
+};
+
// class SfxFloatingWindow --------------------------------------------------
class SfxFloatingWindow_Impl;
class SFX2_DLLPUBLIC SfxFloatingWindow: public FloatingWindow
@@ -188,14 +223,6 @@ private:
std::unique_ptr<SingleTabDlgImpl> pImpl;
};
-class SFX2_DLLPUBLIC SfxDialogController : public weld::GenericDialogController
-{
-private:
- DECL_DLLPRIVATE_LINK(InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
-public:
- SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId);
-};
-
class SFX2_DLLPUBLIC SfxSingleTabDialogController : public SfxDialogController
{
private:
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 8c46889e533f..9a12bf896071 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -143,9 +143,10 @@ public:
class SFX2_DLLPUBLIC SfxChildWindow
{
- VclPtr<vcl::Window> pParent; // parent window ( Topwindow )
- sal_uInt16 const nType; // ChildWindow-Id
+ VclPtr<vcl::Window> pParent; // parent window ( Topwindow )
+ sal_uInt16 const nType; // ChildWindow-Id
VclPtr<vcl::Window> pWindow; // actual contents
+ std::shared_ptr<SfxModelessDialogController> xController; // actual contents
SfxChildAlignment eChildAlignment; // Current css::drawing::Alignment
std::unique_ptr< SfxChildWindow_Impl> pImpl; // Implementation data
std::unique_ptr<SfxChildWindowContext> pContext; // With context-sensitive ChildWindows:
@@ -161,6 +162,9 @@ public:
void Destroy();
vcl::Window* GetWindow() const
{ return pWindow; }
+ void SetController(std::shared_ptr<SfxModelessDialogController> controller) { xController = controller; }
+ void ClearController() { xController.reset(); }
+ std::shared_ptr<SfxModelessDialogController>& GetController() { return xController; }
vcl::Window* GetParent() const
{ return pParent; }
SfxChildAlignment GetAlignment() const
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index c5a3997566ff..b6d7bbdb110e 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -139,7 +139,7 @@ public:
virtual FactoryFunction GetUITestFactory() const override;
private:
- bool ImplStartExecuteModal();
+ bool ImplStartExecute();
static void ImplEndExecuteModal();
void ImplSetModalInputMode(bool bModal);
public:
@@ -174,6 +174,9 @@ public:
void GrabFocusToFirstControl();
virtual void Resize() override;
+ void Activate() override;
+
+
void SetInstallLOKNotifierHdl(const Link<void*, vcl::ILibreOfficeKitNotifier*>& rLink);
void add_button(PushButton* pButton, int nResponse, bool bTransferOwnership);
@@ -188,8 +191,6 @@ class VCL_DLLPUBLIC ModelessDialog : public Dialog
public:
explicit ModelessDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, Dialog::InitFlag eFlag = Dialog::InitFlag::Default );
-
- void Activate() override;
};
class VCL_DLLPUBLIC ModalDialog : public Dialog
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 7fcd7b884a52..7ec022e13c39 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -196,8 +196,15 @@ public:
virtual void set_busy_cursor(bool bBusy) = 0;
virtual void window_move(int x, int y) = 0;
virtual void set_modal(bool bModal) = 0;
+ virtual bool get_modal() const = 0;
virtual bool get_extents_relative_to(Window& rRelative, int& x, int& y, int& width, int& height)
= 0;
+ virtual bool get_resizable() const = 0;
+ virtual Size get_size() const = 0;
+ virtual Point get_position() const = 0;
+ virtual bool has_toplevel_focus() const = 0;
+ virtual void set_window_state(const OString& rStr) = 0;
+ virtual OString get_window_state(WindowStateMask nMask) const = 0;
virtual css::uno::Reference<css::awt::XWindow> GetXWindow() = 0;