1*353d8f4dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*353d8f4dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*353d8f4dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*353d8f4dSAndrew Rist * distributed with this work for additional information 6*353d8f4dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*353d8f4dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*353d8f4dSAndrew Rist * "License"); you may not use this file except in compliance 9*353d8f4dSAndrew Rist * with the License. You may obtain a copy of the License at 10*353d8f4dSAndrew Rist * 11*353d8f4dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*353d8f4dSAndrew Rist * 13*353d8f4dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*353d8f4dSAndrew Rist * software distributed under the License is distributed on an 15*353d8f4dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*353d8f4dSAndrew Rist * KIND, either express or implied. See the License for the 17*353d8f4dSAndrew Rist * specific language governing permissions and limitations 18*353d8f4dSAndrew Rist * under the License. 19*353d8f4dSAndrew Rist * 20*353d8f4dSAndrew Rist *************************************************************/ 21*353d8f4dSAndrew Rist 22*353d8f4dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SFX_CHILDWIN_HXX 24cdf0e10cSrcweir #define _SFX_CHILDWIN_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "sal/config.h" 27cdf0e10cSrcweir #include "sfx2/dllapi.h" 28cdf0e10cSrcweir #include "sal/types.h" 29cdf0e10cSrcweir #include <vcl/window.hxx> 30cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp> 31cdf0e10cSrcweir 32cdf0e10cSrcweir #ifdef ENABLE_INIMANAGER//MUSTINI 33cdf0e10cSrcweir #include "inimgr.hxx" 34cdf0e10cSrcweir #endif 35cdf0e10cSrcweir #include <sfx2/shell.hxx> 36cdf0e10cSrcweir #include <sfx2/chalign.hxx> 37cdf0e10cSrcweir 38cdf0e10cSrcweir class SfxWorkWindow; 39cdf0e10cSrcweir class SfxModule; 40cdf0e10cSrcweir class SfxBindings; 41cdf0e10cSrcweir class SfxShell; 42cdf0e10cSrcweir class SfxChildWindow; 43cdf0e10cSrcweir class SfxChildWindowContext; 44cdf0e10cSrcweir class SfxChildWinContextArr_Impl; 45cdf0e10cSrcweir 46cdf0e10cSrcweir //ASDBG #ifndef _XFRAME_REF 47cdf0e10cSrcweir //ASDBG #define _XFRAME_REF 48cdf0e10cSrcweir //ASDBG USR_DECLIMPL_REF( ::com::sun::star::frame::XFrame, ::com::sun::star::uno::XInterface ); 49cdf0e10cSrcweir //ASDBG #endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir #define SFX_CHILDWIN_ZOOMIN 0x01 // ganz eingeklapptes Float 52cdf0e10cSrcweir #define SFX_CHILDWIN_SMALL 0x02 // halb eingeklapptes Float 53cdf0e10cSrcweir #define SFX_CHILDWIN_FORCEDOCK 0x04 // Float verboten 54cdf0e10cSrcweir #define SFX_CHILDWIN_AUTOHIDE 0x08 // DockingWindow im AutoHide-Modus 55cdf0e10cSrcweir #define SFX_CHILDWIN_TASK 0x10 // ChildWindow innerhalb der Task 56cdf0e10cSrcweir #define SFX_CHILDWIN_CANTGETFOCUS 0x20 // ChildWindow kann keinen Focus bekommen 57cdf0e10cSrcweir #define SFX_CHILDWIN_ALWAYSAVAILABLE 0x40 // ChildWindow is never disabled 58cdf0e10cSrcweir #define SFX_CHILDWIN_NEVERHIDE 0x80 // ChildWindow is can always made visible/is visible 59cdf0e10cSrcweir #define CHILDWIN_NOPOS USHRT_MAX 60cdf0e10cSrcweir 61cdf0e10cSrcweir // Konfiguration eines ChildWindows 62cdf0e10cSrcweir struct SfxChildWinInfo 63cdf0e10cSrcweir { 64cdf0e10cSrcweir sal_Bool bVisible; 65cdf0e10cSrcweir Point aPos; 66cdf0e10cSrcweir Size aSize; 67cdf0e10cSrcweir sal_uInt16 nFlags; 68cdf0e10cSrcweir String aExtraString; 69cdf0e10cSrcweir ByteString aWinState; 70cdf0e10cSrcweir SfxChildWinInfoSfxChildWinInfo71cdf0e10cSrcweir SfxChildWinInfo() 72cdf0e10cSrcweir { 73cdf0e10cSrcweir bVisible = sal_False; 74cdf0e10cSrcweir nFlags = 0; 75cdf0e10cSrcweir } 76cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 77cdf0e10cSrcweir sal_Bool GetExtraData_Impl( SfxChildAlignment *pAlign, 78cdf0e10cSrcweir SfxChildAlignment *pLastAlign = 0, 79cdf0e10cSrcweir Size *pSize = 0, 80cdf0e10cSrcweir sal_uInt16 *pLine = 0, 81cdf0e10cSrcweir sal_uInt16 *pPos = 0 ) const; 82cdf0e10cSrcweir //#endif 83cdf0e10cSrcweir }; 84cdf0e10cSrcweir 85cdf0e10cSrcweir // Factory-Methode eines ChildWindows 86cdf0e10cSrcweir typedef SfxChildWindow* (*SfxChildWinCtor)( ::Window *pParentWindow, 87cdf0e10cSrcweir sal_uInt16 nId, 88cdf0e10cSrcweir SfxBindings *pBindings, 89cdf0e10cSrcweir SfxChildWinInfo *pInfo); 90cdf0e10cSrcweir 91cdf0e10cSrcweir // Factory-Methode eines ChildWindowsContexts 92cdf0e10cSrcweir typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( ::Window *pParentWindow, 93cdf0e10cSrcweir SfxBindings *pBindings, 94cdf0e10cSrcweir SfxChildWinInfo *pInfo); 95cdf0e10cSrcweir struct SfxChildWinContextFactory 96cdf0e10cSrcweir { 97cdf0e10cSrcweir SfxChildWinContextCtor pCtor; // Factory-Methode 98cdf0e10cSrcweir sal_uInt16 nContextId; // Identifier f"ur das SfxInterface 99cdf0e10cSrcweir SfxChildWinInfo aInfo; // Konfiguration 100cdf0e10cSrcweir SfxChildWinContextFactorySfxChildWinContextFactory101cdf0e10cSrcweir SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID ) 102cdf0e10cSrcweir : pCtor(pTheCtor) 103cdf0e10cSrcweir , nContextId(nID) 104cdf0e10cSrcweir {} 105cdf0e10cSrcweir }; 106cdf0e10cSrcweir 107cdf0e10cSrcweir SV_DECL_PTRARR_DEL( SfxChildWinContextArr_Impl, SfxChildWinContextFactory*, 2, 2 ) 108cdf0e10cSrcweir 109cdf0e10cSrcweir struct SfxChildWinFactory 110cdf0e10cSrcweir { 111cdf0e10cSrcweir SfxChildWinCtor pCtor; // Factory-Methode 112cdf0e10cSrcweir sal_uInt16 nId; // ChildWindow-Id ( SlotId ) 113cdf0e10cSrcweir SfxChildWinInfo aInfo; // Konfiguration 114cdf0e10cSrcweir sal_uInt16 nPos; // ggf. Position im UI 115cdf0e10cSrcweir SfxChildWinContextArr_Impl *pArr; // Array f"ur Contexte 116cdf0e10cSrcweir SfxChildWinFactorySfxChildWinFactory117cdf0e10cSrcweir SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, 118cdf0e10cSrcweir sal_uInt16 n ) 119cdf0e10cSrcweir : pCtor(pTheCtor) 120cdf0e10cSrcweir , nId( nID ) 121cdf0e10cSrcweir , nPos(n) 122cdf0e10cSrcweir , pArr( NULL ) 123cdf0e10cSrcweir {} 124cdf0e10cSrcweir 125cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE ~SfxChildWinFactorySfxChildWinFactory126cdf0e10cSrcweir ~SfxChildWinFactory() 127cdf0e10cSrcweir { 128cdf0e10cSrcweir delete pArr; 129cdf0e10cSrcweir } 130cdf0e10cSrcweir //#else 131cdf0e10cSrcweir // Der WIN16-Compiler versucht dort zu "ubersetzen, wo dieser Header 132cdf0e10cSrcweir // included wird, und kann dann nat"urlich nicht linken, wenn inline ... 133cdf0e10cSrcweir // ~SfxChildWinFactory(); 134cdf0e10cSrcweir //#endif 135cdf0e10cSrcweir }; 136cdf0e10cSrcweir 137cdf0e10cSrcweir class FloatingWindow; 138cdf0e10cSrcweir struct SfxChildWindow_Impl; 139cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxChildWindowContext 140cdf0e10cSrcweir { 141cdf0e10cSrcweir friend class SfxChildWindow; 142cdf0e10cSrcweir ::Window* pWindow; 143cdf0e10cSrcweir sal_uInt16 nContextId; 144cdf0e10cSrcweir 145cdf0e10cSrcweir protected: 146cdf0e10cSrcweir SfxChildWindowContext( sal_uInt16 nId ); 147cdf0e10cSrcweir 148cdf0e10cSrcweir public: 149cdf0e10cSrcweir virtual ~SfxChildWindowContext(); 150cdf0e10cSrcweir SetWindow(::Window * pWin)151cdf0e10cSrcweir void SetWindow( ::Window* pWin ) 152cdf0e10cSrcweir { pWindow=pWin; } GetWindow() const153cdf0e10cSrcweir ::Window* GetWindow() const 154cdf0e10cSrcweir { return pWindow; } GetContextId() const155cdf0e10cSrcweir sal_uInt16 GetContextId() const 156cdf0e10cSrcweir { return nContextId; } 157cdf0e10cSrcweir 158cdf0e10cSrcweir FloatingWindow* GetFloatingWindow() const; 159cdf0e10cSrcweir SfxChildAlignment GetAlignment() const; 160cdf0e10cSrcweir 161cdf0e10cSrcweir virtual void Resizing( Size& rSize ); 162cdf0e10cSrcweir virtual sal_Bool Close(); 163cdf0e10cSrcweir static void RegisterChildWindowContext(SfxModule*, sal_uInt16, SfxChildWinContextFactory*); 164cdf0e10cSrcweir }; 165cdf0e10cSrcweir 166cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxChildWindow 167cdf0e10cSrcweir { 168cdf0e10cSrcweir ::Window* pParent; // parent window ( Topwindow ) 169cdf0e10cSrcweir sal_uInt16 nType; // ChildWindow-Id 170cdf0e10cSrcweir 171cdf0e10cSrcweir protected: 172cdf0e10cSrcweir SfxChildAlignment eChildAlignment;// aktuelles ::com::sun::star::drawing::Alignment 173cdf0e10cSrcweir ::Window* pWindow; // eigentlicher Inhalt 174cdf0e10cSrcweir SfxChildWindow_Impl* pImp; // Imp-Daten 175cdf0e10cSrcweir 176cdf0e10cSrcweir private: 177cdf0e10cSrcweir SfxChildWindowContext* pContext; // bei kontextsensitiven ChildWindows: 178cdf0e10cSrcweir // weiteres window in pWindow 179cdf0e10cSrcweir SAL_DLLPRIVATE SfxChildWindowContext* GetContext() const180cdf0e10cSrcweir GetContext() const 181cdf0e10cSrcweir { return pContext; } 182cdf0e10cSrcweir 183cdf0e10cSrcweir protected: 184cdf0e10cSrcweir SfxChildWindow(::Window *pParentWindow, sal_uInt16 nId); 185cdf0e10cSrcweir 186cdf0e10cSrcweir public: 187cdf0e10cSrcweir virtual ~SfxChildWindow(); 188cdf0e10cSrcweir void Destroy(); GetWindow() const189cdf0e10cSrcweir ::Window* GetWindow() const 190cdf0e10cSrcweir { return pWindow; } GetParent() const191cdf0e10cSrcweir ::Window* GetParent() const 192cdf0e10cSrcweir { return pParent; } GetAlignment() const193cdf0e10cSrcweir SfxChildAlignment GetAlignment() const 194cdf0e10cSrcweir { return eChildAlignment; } 195cdf0e10cSrcweir void SetAlignment(SfxChildAlignment eAlign); GetSizePixel() const196cdf0e10cSrcweir Size GetSizePixel() const 197cdf0e10cSrcweir { return pWindow->GetSizePixel(); } 198cdf0e10cSrcweir void SetPosSizePixel(const Point& rPoint, Size& rSize); GetPosPixel()199cdf0e10cSrcweir Point GetPosPixel() 200cdf0e10cSrcweir { return pWindow->GetPosPixel(); } 201cdf0e10cSrcweir //<!--Modified by PengYunQuan for Validity Cell Range Picker 202cdf0e10cSrcweir virtual void Hide(); 203cdf0e10cSrcweir virtual void Show( sal_uInt16 nFlags ); 204cdf0e10cSrcweir //-->Modified by PengYunQuan for Validity Cell Range Picker GetFlags() const205cdf0e10cSrcweir sal_uInt16 GetFlags() const 206cdf0e10cSrcweir { return GetInfo().nFlags; } 207cdf0e10cSrcweir sal_Bool CanGetFocus() const; 208cdf0e10cSrcweir sal_uInt16 GetPosition(); GetType()209cdf0e10cSrcweir sal_uInt16 GetType() 210cdf0e10cSrcweir { return nType; } 211cdf0e10cSrcweir 212cdf0e10cSrcweir void CreateContext( sal_uInt16 nContextId, SfxBindings& ); GetContextId() const213cdf0e10cSrcweir sal_uInt16 GetContextId() const 214cdf0e10cSrcweir { return pContext ? pContext->GetContextId(): 0; } 215cdf0e10cSrcweir GetContextWindow() const216cdf0e10cSrcweir ::Window* GetContextWindow() const 217cdf0e10cSrcweir { return pContext ? pContext->GetWindow(): 0; } 218cdf0e10cSrcweir 219cdf0e10cSrcweir ::Window* GetContextWindow( SfxModule *pModule ) const; 220cdf0e10cSrcweir 221cdf0e10cSrcweir virtual SfxChildWinInfo GetInfo() const; 222cdf0e10cSrcweir void SaveStatus(const SfxChildWinInfo& rInfo); 223cdf0e10cSrcweir 224cdf0e10cSrcweir static void RegisterChildWindow(SfxModule*, SfxChildWinFactory*); 225cdf0e10cSrcweir 226cdf0e10cSrcweir static SfxChildWindow* CreateChildWindow( sal_uInt16, ::Window*, SfxBindings*, SfxChildWinInfo&); 227cdf0e10cSrcweir void SetHideNotDelete( sal_Bool bOn ); 228cdf0e10cSrcweir sal_Bool IsHideNotDelete() const; 229cdf0e10cSrcweir void SetHideAtToggle( sal_Bool bOn ); 230cdf0e10cSrcweir sal_Bool IsHideAtToggle() const; 231cdf0e10cSrcweir sal_Bool IsVisible() const; 232cdf0e10cSrcweir void SetWantsFocus( sal_Bool ); 233cdf0e10cSrcweir sal_Bool WantsFocus() const; 234cdf0e10cSrcweir 235cdf0e10cSrcweir virtual sal_Bool QueryClose(); 236cdf0e10cSrcweir virtual com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrame(); 237cdf0e10cSrcweir void SetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & ); 238cdf0e10cSrcweir 239cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE 240cdf0e10cSrcweir SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&); 241cdf0e10cSrcweir SAL_DLLPRIVATE void SetVisible_Impl( sal_Bool bVis ); 242cdf0e10cSrcweir SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* ); 243cdf0e10cSrcweir //SfxWorkWindow* GetWorkWindow_Impl() const; 244cdf0e10cSrcweir SAL_DLLPRIVATE void Activate_Impl(); 245cdf0e10cSrcweir SAL_DLLPRIVATE void Deactivate_Impl(); 246cdf0e10cSrcweir 247cdf0e10cSrcweir SAL_DLLPRIVATE SfxChildWindowContext* GetContext_Impl() const248cdf0e10cSrcweir GetContext_Impl() const 249cdf0e10cSrcweir { return pContext; } 250cdf0e10cSrcweir SAL_DLLPRIVATE void SetFactory_Impl( SfxChildWinFactory* ); 251cdf0e10cSrcweir //#endif 252cdf0e10cSrcweir }; 253cdf0e10cSrcweir 254cdf0e10cSrcweir //------------------------------------------------------------------ 255cdf0e10cSrcweir //! demn"achst hinf"allig ! 256cdf0e10cSrcweir #define SFX_DECL_CHILDWINDOW_CONTEXT(Class) \ 257cdf0e10cSrcweir static SfxChildWindowContext* CreateImpl(::Window *pParent, \ 258cdf0e10cSrcweir SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ 259cdf0e10cSrcweir static void RegisterChildWindowContext(SfxModule *pMod=0); \ 260cdf0e10cSrcweir 261cdf0e10cSrcweir //! Das Macro der Zukunft ... 262cdf0e10cSrcweir #define SFX_DECL_CHILDWINDOWCONTEXT(Class) \ 263cdf0e10cSrcweir static SfxChildWindowContext* CreateImpl(::Window *pParent, \ 264cdf0e10cSrcweir SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ 265cdf0e10cSrcweir static void RegisterChildWindowContext(sal_uInt16, SfxModule *pMod=0); \ 266cdf0e10cSrcweir 267cdf0e10cSrcweir //! demn"achst hinf"allig ! 268cdf0e10cSrcweir #define SFX_IMPL_CHILDWINDOW_CONTEXT(Class, MyID, ShellClass) \ 269cdf0e10cSrcweir SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \ 270cdf0e10cSrcweir SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ 271cdf0e10cSrcweir { \ 272cdf0e10cSrcweir SfxChildWindowContext *pContext = new Class(pParent, \ 273cdf0e10cSrcweir /* cast is safe here! */static_cast< sal_uInt16 >(ShellClass::GetInterfaceId()), \ 274cdf0e10cSrcweir pBindings,pInfo); \ 275cdf0e10cSrcweir return pContext; \ 276cdf0e10cSrcweir } \ 277cdf0e10cSrcweir void Class::RegisterChildWindowContext(SfxModule* pMod) \ 278cdf0e10cSrcweir { \ 279cdf0e10cSrcweir SfxChildWinContextFactory *pFact = new SfxChildWinContextFactory( \ 280cdf0e10cSrcweir Class::CreateImpl, \ 281cdf0e10cSrcweir /* cast is safe here! */static_cast< sal_uInt16 >(ShellClass::GetInterfaceId()) ); \ 282cdf0e10cSrcweir SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, pFact); \ 283cdf0e10cSrcweir } 284cdf0e10cSrcweir 285cdf0e10cSrcweir //! Das Macro der Zukunft ... 286cdf0e10cSrcweir // CreateImpl mu\s noch als Parameter die Factory mitbekommen wg. ContextId 287cdf0e10cSrcweir // Solange wird diese Id auf 0 gesetzt und in SfxChildWindow::CreateContext gepatched 288cdf0e10cSrcweir #define SFX_IMPL_CHILDWINDOWCONTEXT(Class, MyID) \ 289cdf0e10cSrcweir SfxChildWindowContext* __EXPORT Class::CreateImpl( ::Window *pParent, \ 290cdf0e10cSrcweir SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ 291cdf0e10cSrcweir { \ 292cdf0e10cSrcweir SfxChildWindowContext *pContext = new Class(pParent,0,pBindings,pInfo);\ 293cdf0e10cSrcweir return pContext; \ 294cdf0e10cSrcweir } \ 295cdf0e10cSrcweir void Class::RegisterChildWindowContext(sal_uInt16 nId, SfxModule* pMod) \ 296cdf0e10cSrcweir { \ 297cdf0e10cSrcweir SfxChildWinContextFactory *pFact = new SfxChildWinContextFactory( \ 298cdf0e10cSrcweir Class::CreateImpl, nId ); \ 299cdf0e10cSrcweir SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, pFact); \ 300cdf0e10cSrcweir } 301cdf0e10cSrcweir 302cdf0e10cSrcweir #define SFX_DECL_CHILDWINDOW(Class) \ 303cdf0e10cSrcweir public : \ 304cdf0e10cSrcweir static SfxChildWindow* CreateImpl(::Window *pParent, sal_uInt16 nId, \ 305cdf0e10cSrcweir SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \ 306cdf0e10cSrcweir static void RegisterChildWindow (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); \ 307cdf0e10cSrcweir static sal_uInt16 GetChildWindowId ();\ 308cdf0e10cSrcweir virtual SfxChildWinInfo GetInfo() const 309cdf0e10cSrcweir 310cdf0e10cSrcweir #define SFX_IMPL_CHILDWINDOW(Class, MyID) \ 311cdf0e10cSrcweir SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS) 312cdf0e10cSrcweir 313cdf0e10cSrcweir #define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \ 314cdf0e10cSrcweir SfxChildWindow* __EXPORT Class::CreateImpl( ::Window *pParent, \ 315cdf0e10cSrcweir sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ 316cdf0e10cSrcweir { \ 317cdf0e10cSrcweir SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\ 318cdf0e10cSrcweir return pWin; \ 319cdf0e10cSrcweir } \ 320cdf0e10cSrcweir sal_uInt16 __EXPORT Class::GetChildWindowId () \ 321cdf0e10cSrcweir { return MyID; } \ 322cdf0e10cSrcweir void Class::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal_uInt16 nFlags) \ 323cdf0e10cSrcweir { \ 324cdf0e10cSrcweir SfxChildWinFactory *pFact = new SfxChildWinFactory( \ 325cdf0e10cSrcweir Class::CreateImpl, MyID, Pos ); \ 326cdf0e10cSrcweir pFact->aInfo.nFlags |= nFlags; \ 327cdf0e10cSrcweir pFact->aInfo.bVisible = bVis; \ 328cdf0e10cSrcweir SfxChildWindow::RegisterChildWindow(pMod, pFact); \ 329cdf0e10cSrcweir } 330cdf0e10cSrcweir 331cdf0e10cSrcweir #define SFX_IMPL_FLOATINGWINDOW(Class, MyID) \ 332cdf0e10cSrcweir SFX_IMPL_CHILDWINDOW(Class, MyID) \ 333cdf0e10cSrcweir SfxChildWinInfo __EXPORT Class::GetInfo() const \ 334cdf0e10cSrcweir { \ 335cdf0e10cSrcweir SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \ 336cdf0e10cSrcweir ((SfxFloatingWindow*)GetWindow())->FillInfo( aInfo ); \ 337cdf0e10cSrcweir return aInfo; } 338cdf0e10cSrcweir 339cdf0e10cSrcweir #define SFX_IMPL_MODELESSDIALOG(Class, MyID) \ 340cdf0e10cSrcweir SFX_IMPL_CHILDWINDOW(Class, MyID) \ 341cdf0e10cSrcweir SfxChildWinInfo __EXPORT Class::GetInfo() const \ 342cdf0e10cSrcweir { \ 343cdf0e10cSrcweir SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \ 344cdf0e10cSrcweir ((SfxModelessDialog*)GetWindow())->FillInfo( aInfo ); \ 345cdf0e10cSrcweir return aInfo; } 346cdf0e10cSrcweir 347cdf0e10cSrcweir #define SFX_IMPL_DOCKINGWINDOW(Class, MyID) \ 348cdf0e10cSrcweir SFX_IMPL_CHILDWINDOW(Class, MyID) \ 349cdf0e10cSrcweir SfxChildWinInfo __EXPORT Class::GetInfo() const \ 350cdf0e10cSrcweir { \ 351cdf0e10cSrcweir SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \ 352cdf0e10cSrcweir ((SfxDockingWindow*)GetWindow())->FillInfo( aInfo ); \ 353cdf0e10cSrcweir return aInfo; } 354cdf0e10cSrcweir 355cdf0e10cSrcweir #define SFX_IMPL_TOOLBOX(Class, MyID) \ 356cdf0e10cSrcweir SFX_IMPL_CHILDWINDOW(Class, MyID) \ 357cdf0e10cSrcweir SfxChildWinInfo __EXPORT Class::GetInfo() const \ 358cdf0e10cSrcweir { \ 359cdf0e10cSrcweir SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \ 360cdf0e10cSrcweir ((SfxToolbox*)GetWindow())->FillInfo( aInfo ); \ 361cdf0e10cSrcweir return aInfo; } 362cdf0e10cSrcweir 363cdf0e10cSrcweir //------------------------------------------------------------------ 364cdf0e10cSrcweir 365cdf0e10cSrcweir #endif 366