diff options
Diffstat (limited to 'vcl/inc/vcl/splitwin.hxx')
-rw-r--r-- | vcl/inc/vcl/splitwin.hxx | 266 |
1 files changed, 133 insertions, 133 deletions
diff --git a/vcl/inc/vcl/splitwin.hxx b/vcl/inc/vcl/splitwin.hxx index c6671f2799c0..cdc6d0e9928e 100644 --- a/vcl/inc/vcl/splitwin.hxx +++ b/vcl/inc/vcl/splitwin.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,18 +46,18 @@ typedef USHORT SplitWindowItemBits; // - Bits fuer SplitWindow-Items - // ------------------------------- -#define SWIB_FIXED ((SplitWindowItemBits)0x0001) -#define SWIB_RELATIVESIZE ((SplitWindowItemBits)0x0002) -#define SWIB_PERCENTSIZE ((SplitWindowItemBits)0x0004) -#define SWIB_COLSET ((SplitWindowItemBits)0x0008) -#define SWIB_INVISIBLE ((SplitWindowItemBits)0x0010) +#define SWIB_FIXED ((SplitWindowItemBits)0x0001) +#define SWIB_RELATIVESIZE ((SplitWindowItemBits)0x0002) +#define SWIB_PERCENTSIZE ((SplitWindowItemBits)0x0004) +#define SWIB_COLSET ((SplitWindowItemBits)0x0008) +#define SWIB_INVISIBLE ((SplitWindowItemBits)0x0010) // --------------------- // - SplitWindow-Types - // --------------------- -#define SPLITWINDOW_APPEND ((USHORT)0xFFFF) -#define SPLITWINDOW_ITEM_NOTFOUND ((USHORT)0xFFFF) +#define SPLITWINDOW_APPEND ((USHORT)0xFFFF) +#define SPLITWINDOW_ITEM_NOTFOUND ((USHORT)0xFFFF) // --------------- // - SplitWindow - @@ -66,27 +66,27 @@ typedef USHORT SplitWindowItemBits; class VCL_DLLPUBLIC SplitWindow : public DockingWindow { private: - ImplSplitSet* mpMainSet; - ImplSplitSet* mpBaseSet; - ImplSplitSet* mpSplitSet; - long* mpLastSizes; - Rectangle maDragRect; - long mnDX; - long mnDY; - long mnLeftBorder; - long mnTopBorder; - long mnRightBorder; - long mnBottomBorder; - long mnMaxSize; - long mnMouseOff; - long mnMStartPos; - long mnMSplitPos; - WinBits mnWinStyle; - WindowAlign meAlign; - USHORT mnSplitTest; - USHORT mnSplitPos; - USHORT mnMouseModifier; - BOOL mbDragFull:1, + ImplSplitSet* mpMainSet; + ImplSplitSet* mpBaseSet; + ImplSplitSet* mpSplitSet; + long* mpLastSizes; + Rectangle maDragRect; + long mnDX; + long mnDY; + long mnLeftBorder; + long mnTopBorder; + long mnRightBorder; + long mnBottomBorder; + long mnMaxSize; + long mnMouseOff; + long mnMStartPos; + long mnMSplitPos; + WinBits mnWinStyle; + WindowAlign meAlign; + USHORT mnSplitTest; + USHORT mnSplitPos; + USHORT mnMouseModifier; + BOOL mbDragFull:1, mbHorz:1, mbBottomRight:1, mbCalc:1, @@ -106,30 +106,30 @@ private: mbFadeOutPressed:1, mbFadeNoButtonMode:1, mbNoAlign:1; - Link maStartSplitHdl; - Link maSplitHdl; - Link maSplitResizeHdl; - Link maAutoHideHdl; - Link maFadeInHdl; - Link maFadeOutHdl; + Link maStartSplitHdl; + Link maSplitHdl; + Link maSplitResizeHdl; + Link maAutoHideHdl; + Link maFadeInHdl; + Link maFadeOutHdl; using Window::ImplInit; - SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings(); - SAL_DLLPRIVATE void ImplCalcLayout(); - SAL_DLLPRIVATE void ImplUpdate(); - SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet ); - SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); - SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); - SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const; - SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest = FALSE ) const; - SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, BOOL bTest = FALSE ) const; - SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, BOOL bTest = FALSE ) const; - SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize ); - SAL_DLLPRIVATE void ImplDrawAutoHide( BOOL bInPaint ); - SAL_DLLPRIVATE void ImplDrawFadeIn( BOOL bInPaint ); - SAL_DLLPRIVATE void ImplDrawFadeOut( BOOL bInPaint ); - SAL_DLLPRIVATE void ImplNewAlign(); + SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); + SAL_DLLPRIVATE void ImplInitSettings(); + SAL_DLLPRIVATE void ImplCalcLayout(); + SAL_DLLPRIVATE void ImplUpdate(); + SAL_DLLPRIVATE void ImplUpdateSet( ImplSplitSet* pSet ); + SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); + SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); + SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) const; + SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, BOOL bTest = FALSE ) const; + SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, BOOL bTest = FALSE ) const; + SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, BOOL bTest = FALSE ) const; + SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize ); + SAL_DLLPRIVATE void ImplDrawAutoHide( BOOL bInPaint ); + SAL_DLLPRIVATE void ImplDrawFadeIn( BOOL bInPaint ); + SAL_DLLPRIVATE void ImplDrawFadeOut( BOOL bInPaint ); + SAL_DLLPRIVATE void ImplNewAlign(); SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, BOOL bHorz, BOOL bLeft ); SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, BOOL bHorz, BOOL bLeft ); SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt ); @@ -156,116 +156,116 @@ public: SplitWindow( Window* pParent, const ResId& rResId ); ~SplitWindow(); - virtual void StartSplit(); - virtual void Split(); - virtual void SplitResize(); - virtual void AutoHide(); - virtual void FadeIn(); - virtual void FadeOut(); + virtual void StartSplit(); + virtual void Split(); + virtual void SplitResize(); + virtual void AutoHide(); + virtual void FadeIn(); + virtual void FadeOut(); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Move(); - virtual void Resize(); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); + virtual void MouseButtonDown( const MouseEvent& rMEvt ); + virtual void MouseMove( const MouseEvent& rMEvt ); + virtual void Tracking( const TrackingEvent& rTEvt ); + virtual void Paint( const Rectangle& rRect ); + virtual void Move(); + virtual void Resize(); + virtual void RequestHelp( const HelpEvent& rHEvt ); + virtual void StateChanged( StateChangedType nType ); + virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual long PreNotify( NotifyEvent& rNEvt ); - void InsertItem( USHORT nId, Window* pWindow, long nSize, + void InsertItem( USHORT nId, Window* pWindow, long nSize, USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0, SplitWindowItemBits nBits = 0 ); - void InsertItem( USHORT nId, long nSize, + void InsertItem( USHORT nId, long nSize, USHORT nPos = SPLITWINDOW_APPEND, USHORT nSetId = 0, SplitWindowItemBits nBits = 0 ); - void MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId = 0 ); - void RemoveItem( USHORT nId, BOOL bHide = TRUE ); - void Clear(); + void MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId = 0 ); + void RemoveItem( USHORT nId, BOOL bHide = TRUE ); + void Clear(); - void SetBaseSet( USHORT nSetId = 0 ); - USHORT GetBaseSet() const; + void SetBaseSet( USHORT nSetId = 0 ); + USHORT GetBaseSet() const; - void SetSplitSize( USHORT nSetId, long nSplitSize, + void SetSplitSize( USHORT nSetId, long nSplitSize, BOOL bWithChilds = FALSE ); - long GetSplitSize( USHORT nSetId ) const; - void SetItemBackground( USHORT nSetId ); - void SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper ); - Wallpaper GetItemBackground( USHORT nSetId ) const; - BOOL IsItemBackground( USHORT nSetId ) const; - void SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap ); - Bitmap GetItemBitmap( USHORT nSetId ) const; + long GetSplitSize( USHORT nSetId ) const; + void SetItemBackground( USHORT nSetId ); + void SetItemBackground( USHORT nSetId, const Wallpaper& rWallpaper ); + Wallpaper GetItemBackground( USHORT nSetId ) const; + BOOL IsItemBackground( USHORT nSetId ) const; + void SetItemBitmap( USHORT nSetId, const Bitmap& rBitmap ); + Bitmap GetItemBitmap( USHORT nSetId ) const; - void SplitItem( USHORT nId, long nNewSize, + void SplitItem( USHORT nId, long nNewSize, BOOL bPropSmall = FALSE, BOOL bPropGreat = FALSE ); - void SetItemSize( USHORT nId, long nNewSize ); - long GetItemSize( USHORT nId ) const; - long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const; - void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits ); + void SetItemSize( USHORT nId, long nNewSize ); + long GetItemSize( USHORT nId ) const; + long GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const; + void SetItemBits( USHORT nId, SplitWindowItemBits nNewBits ); SplitWindowItemBits GetItemBits( USHORT nId ) const; - Window* GetItemWindow( USHORT nId ) const; - USHORT GetSet( USHORT nId ) const; - BOOL GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const; - USHORT GetItemId( Window* pWindow ) const; - USHORT GetItemId( const Point& rPos ) const; - USHORT GetItemPos( USHORT nId, USHORT nSetId = 0 ) const; - USHORT GetItemId( USHORT nPos, USHORT nSetId = 0 ) const; - USHORT GetItemCount( USHORT nSetId = 0 ) const; - BOOL IsItemValid( USHORT nId ) const; + Window* GetItemWindow( USHORT nId ) const; + USHORT GetSet( USHORT nId ) const; + BOOL GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const; + USHORT GetItemId( Window* pWindow ) const; + USHORT GetItemId( const Point& rPos ) const; + USHORT GetItemPos( USHORT nId, USHORT nSetId = 0 ) const; + USHORT GetItemId( USHORT nPos, USHORT nSetId = 0 ) const; + USHORT GetItemCount( USHORT nSetId = 0 ) const; + BOOL IsItemValid( USHORT nId ) const; - void SetNoAlign( BOOL bNoAlign ); - BOOL IsNoAlign() const { return mbNoAlign; } - void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP ); - WindowAlign GetAlign() const { return meAlign; } - BOOL IsHorizontal() const { return mbHorz; } + void SetNoAlign( BOOL bNoAlign ); + BOOL IsNoAlign() const { return mbNoAlign; } + void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP ); + WindowAlign GetAlign() const { return meAlign; } + BOOL IsHorizontal() const { return mbHorz; } - BOOL IsSplitting() const { return IsTracking(); } + BOOL IsSplitting() const { return IsTracking(); } - void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; } - long GetMaxSizePixel() const { return mnMaxSize; } + void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; } + long GetMaxSizePixel() const { return mnMaxSize; } - static Size CalcWindowSizePixel( const Size& rSize, + static Size CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign, WinBits nWinStyle, BOOL bExtra = FALSE ); - Size CalcWindowSizePixel( const Size& rSize ) + Size CalcWindowSizePixel( const Size& rSize ) { return CalcWindowSizePixel( rSize, meAlign, mnWinStyle, (mbAutoHide || mbFadeOut) ); } - Size CalcLayoutSizePixel( const Size& aNewSize ); + Size CalcLayoutSizePixel( const Size& aNewSize ); - void ShowAutoHideButton( BOOL bShow = TRUE ); - BOOL IsAutoHideButtonVisible() const { return mbAutoHide; } - void ShowFadeInHideButton( BOOL bShow = TRUE ); - void ShowFadeInButton( BOOL bShow = TRUE ) { ShowFadeInHideButton( bShow ); } - BOOL IsFadeInButtonVisible() const { return mbFadeIn; } - void ShowFadeOutButton( BOOL bShow = TRUE ); - BOOL IsFadeOutButtonVisible() const { return mbFadeOut; } - long GetFadeInSize() const; - BOOL IsFadeNoButtonMode() const { return mbFadeNoButtonMode; } + void ShowAutoHideButton( BOOL bShow = TRUE ); + BOOL IsAutoHideButtonVisible() const { return mbAutoHide; } + void ShowFadeInHideButton( BOOL bShow = TRUE ); + void ShowFadeInButton( BOOL bShow = TRUE ) { ShowFadeInHideButton( bShow ); } + BOOL IsFadeInButtonVisible() const { return mbFadeIn; } + void ShowFadeOutButton( BOOL bShow = TRUE ); + BOOL IsFadeOutButtonVisible() const { return mbFadeOut; } + long GetFadeInSize() const; + BOOL IsFadeNoButtonMode() const { return mbFadeNoButtonMode; } - void SetAutoHideState( BOOL bAutoHide ); - BOOL GetAutoHideState() const { return mbAutoHideIn; } + void SetAutoHideState( BOOL bAutoHide ); + BOOL GetAutoHideState() const { return mbAutoHideIn; } - Rectangle GetAutoHideRect() const; - Rectangle GetFadeInRect() const; - Rectangle GetFadeOutRect() const; + Rectangle GetAutoHideRect() const; + Rectangle GetFadeInRect() const; + Rectangle GetFadeOutRect() const; - void SetStartSplitHdl( const Link& rLink ) { maStartSplitHdl = rLink; } - const Link& GetStartSplitHdl() const { return maStartSplitHdl; } - void SetSplitHdl( const Link& rLink ) { maSplitHdl = rLink; } - const Link& GetSplitHdl() const { return maSplitHdl; } - void SetSplitResizeHdl( const Link& rLink ) { maSplitResizeHdl = rLink; } - const Link& GetSplitResizeHdl() const { return maSplitResizeHdl; } - void SetAutoHideHdl( const Link& rLink ) { maAutoHideHdl = rLink; } - const Link& GetAutoHideHdl() const { return maAutoHideHdl; } - void SetFadeInHdl( const Link& rLink ) { maFadeInHdl = rLink; } - const Link& GetFadeInHdl() const { return maFadeInHdl; } - void SetFadeOutHdl( const Link& rLink ) { maFadeOutHdl = rLink; } - const Link& GetFadeOutHdl() const { return maFadeOutHdl; } + void SetStartSplitHdl( const Link& rLink ) { maStartSplitHdl = rLink; } + const Link& GetStartSplitHdl() const { return maStartSplitHdl; } + void SetSplitHdl( const Link& rLink ) { maSplitHdl = rLink; } + const Link& GetSplitHdl() const { return maSplitHdl; } + void SetSplitResizeHdl( const Link& rLink ) { maSplitResizeHdl = rLink; } + const Link& GetSplitResizeHdl() const { return maSplitResizeHdl; } + void SetAutoHideHdl( const Link& rLink ) { maAutoHideHdl = rLink; } + const Link& GetAutoHideHdl() const { return maAutoHideHdl; } + void SetFadeInHdl( const Link& rLink ) { maFadeInHdl = rLink; } + const Link& GetFadeInHdl() const { return maFadeInHdl; } + void SetFadeOutHdl( const Link& rLink ) { maFadeOutHdl = rLink; } + const Link& GetFadeOutHdl() const { return maFadeOutHdl; } }; -#endif // _SV_SPLITWIN_HXX +#endif // _SV_SPLITWIN_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |