19#ifndef INCLUDED_SFX2_CHILDWIN_HXX
20#define INCLUDED_SFX2_CHILDWIN_HXX
58#define CHILDWIN_NOPOS USHRT_MAX
103 std::unique_ptr< SfxChildWindow_Impl>
pImpl;
108 SAL_DLLPRIVATE
void ClearWorkwin();
126 {
return eChildAlignment; }
130 sal_uInt16 GetPosition()
const;
140 void SetHideNotDelete(
bool bOn );
141 bool IsHideNotDelete()
const;
142 bool IsVisible()
const;
143 void SetWantsFocus(
bool );
144 bool WantsFocus()
const;
147 const css::uno::Reference< css::frame::XFrame >& GetFrame()
const;
148 void SetFrame(
const css::uno::Reference< css::frame::XFrame > & );
150 SAL_DLLPRIVATE
static void InitializeChildWinFactory_Impl(sal_uInt16,
SfxChildWinInfo&);
151 void SetVisible_Impl(
bool bVis );
153 SAL_DLLPRIVATE
void Activate_Impl();
160#define SFX_DECL_CHILDWINDOW(Class) \
162 static std::unique_ptr<SfxChildWindow> CreateImpl(vcl::Window *pParent, sal_uInt16 nId, \
163 SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
164 static void RegisterChildWindow (bool bVisible=false, SfxModule *pMod=nullptr, SfxChildWindowFlags nFlags=SfxChildWindowFlags::NONE); \
165 virtual SfxChildWinInfo GetInfo() const override
167#define SFX_DECL_CHILDWINDOW_WITHID(Class) \
168 SFX_DECL_CHILDWINDOW(Class); \
169 static sal_uInt16 GetChildWindowId ()\
171#define SFX_IMPL_CHILDWINDOW(Class, MyID) \
172 SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS)
174#define SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
175 SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, CHILDWIN_NOPOS)
177#define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
178 std::unique_ptr<SfxChildWindow> Class::CreateImpl( vcl::Window *pParent, \
179 sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
181 return std::make_unique<Class>(pParent, nId, pBindings, pInfo);\
183 void Class::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) \
185 SfxChildWinFactory aFact( \
186 Class::CreateImpl, MyID, Pos ); \
187 aFact.aInfo.nFlags |= nFlags; \
188 aFact.aInfo.bVisible = bVis; \
189 SfxChildWindow::RegisterChildWindow(pMod, aFact); \
192#define SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, Pos) \
193 SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
194 sal_uInt16 Class::GetChildWindowId () \
197#define SFX_IMPL_MODELESSDIALOGCONTOLLER(Class, MyID) \
198 SFX_IMPL_CHILDWINDOW(Class, MyID) \
199 SfxChildWinInfo Class::GetInfo() const \
201 SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
202 static_cast<const SfxModelessDialogController*>(GetController().get())->FillInfo( aInfo ); \
205#define SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(Class, MyID) \
206 SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
207 SfxChildWinInfo Class::GetInfo() const \
209 SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
210 static_cast<const SfxModelessDialogController*>(GetController().get())->FillInfo( aInfo ); \
213#define SFX_IMPL_DOCKINGWINDOW(Class, MyID) \
214 SFX_IMPL_CHILDWINDOW(Class, MyID) \
215 SfxChildWinInfo Class::GetInfo() const \
217 SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
218 static_cast<SfxDockingWindow*>(GetWindow())->FillInfo( aInfo ); \
221#define SFX_IMPL_DOCKINGWINDOW_WITHID(Class, MyID) \
222 SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
223 SfxChildWinInfo Class::GetInfo() const \
225 SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
226 static_cast<SfxDockingWindow*>(GetWindow())->FillInfo( aInfo ); \
bool GetSplitSizeFromString(std::u16string_view rStr, Size &rSize)
std::unique_ptr< SfxChildWindow >(* SfxChildWinCtor)(vcl::Window *pParentWindow, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
bool GetPosSizeFromString(std::u16string_view rStr, Point &rPos, Size &rSize)
const int nCloseResponseToJustHide
SFX2_DLLPUBLIC bool ParentIsFloatingWindow(const vcl::Window *pParent)
sal_uInt16 GetType() const
void SetController(std::shared_ptr< SfxDialogController > controller)
SfxChildAlignment eChildAlignment
vcl::Window * GetWindow() const
SfxChildAlignment GetAlignment() const
const std::shared_ptr< SfxDialogController > & GetController() const
vcl::Window * GetParent() const
VclPtr< vcl::Window > pParent
std::shared_ptr< SfxDialogController > & GetController()
std::unique_ptr< SfxChildWindow_Impl > pImpl
VclPtr< vcl::Window > pWindow
void SetWindow(const VclPtr< vcl::Window > &p)
std::shared_ptr< SfxDialogController > xController
virtual bool QueryClose() override
SfxChildWindowFlags nFlags
Reference< XController > xController