diff options
Diffstat (limited to 'vcl/source/window/splitwin.cxx')
-rw-r--r-- | vcl/source/window/splitwin.cxx | 152 |
1 files changed, 0 insertions, 152 deletions
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 4c6d457595e4..122daaa1ce81 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -37,8 +37,6 @@ #include <svdata.hxx> #include <svids.hrc> -// ======================================================================= - // Attention: Must not contain non-PODs because array is enlarged/copied // with the use of memmove/memcpy. struct ImplSplitItem @@ -80,8 +78,6 @@ struct ImplSplitSet bool mbCalcPix; }; - - /** Check whether the given size is inside the valid range defined by [rItem.mnMinSize,rItem.mnMaxSize]. When it is not inside it then return the upper or lower bound, respectively. Otherwise return the given size @@ -113,8 +109,6 @@ namespace { #define SPLIT_WINDOW ((sal_uInt16)0x0004) #define SPLIT_NOSPLIT ((sal_uInt16)0x8000) -// ======================================================================= - static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, long& rLeft, long& rTop, long& rRight, long& rBottom ) @@ -158,8 +152,6 @@ static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -225,8 +217,6 @@ void SplitWindow::ImplDrawBorder( SplitWindow* pWin ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin ) { if ( pWin->mbFadeOut || pWin->mbAutoHide ) @@ -265,8 +255,6 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin ) } } -// ----------------------------------------------------------------------- - static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId ) { if ( pSet->mnId == nId ) @@ -295,8 +283,6 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId ) return NULL; } -// ----------------------------------------------------------------------- - static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt16& rPos ) { sal_uInt16 i; @@ -325,8 +311,6 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1 return NULL; } -// ----------------------------------------------------------------------- - static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) { sal_uInt16 i; @@ -351,8 +335,6 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) return 0; } -// ----------------------------------------------------------------------- - static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, sal_Bool bRows, sal_Bool bDown = sal_True ) { @@ -398,8 +380,6 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, return 0; } -// ----------------------------------------------------------------------- - static void ImplDeleteSet( ImplSplitSet* pSet ) { sal_uInt16 i; @@ -422,8 +402,6 @@ static void ImplDeleteSet( ImplSplitSet* pSet ) delete pSet; } -// ----------------------------------------------------------------------- - static void ImplCalcSet( ImplSplitSet* pSet, long nSetLeft, long nSetTop, long nSetWidth, long nSetHeight, @@ -801,8 +779,6 @@ static void ImplCalcSet( ImplSplitSet* pSet, } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide, sal_Bool bRows, sal_Bool /*bDown*/ ) { @@ -904,8 +880,6 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bo } } -// ----------------------------------------------------------------------- - static void ImplCalcLogSize( ImplSplitItem* pItems, sal_uInt16 nItems ) { // Original-Groessen updaten @@ -941,8 +915,6 @@ static void ImplCalcLogSize( ImplSplitItem* pItems, sal_uInt16 nItems ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect, const Wallpaper* pWall, const Bitmap* pBitmap ) { @@ -970,8 +942,6 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect, pWindow->DrawWallpaper( rRect, *pWall ); } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) { sal_uInt16 i; @@ -1013,8 +983,6 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) } } -// ----------------------------------------------------------------------- - static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bRows, sal_Bool bDown = sal_True ) { @@ -1108,8 +1076,6 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, } } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, sal_Bool bRows, sal_Bool /*bDown*/ ) @@ -1188,8 +1154,6 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, return 0; } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos ) { @@ -1252,8 +1216,6 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, pWindow->mbHorz, !pWindow->mbBottomRight ); } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos ) { Rectangle aRect; @@ -1291,8 +1253,6 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos ) pThis->ShowTracking( aRect, SHOWTRACK_SPLIT ); } -// ----------------------------------------------------------------------- - void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) { ImplSplitSet* pNewSet = new ImplSplitSet; @@ -1367,8 +1327,6 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings(); } -// ----------------------------------------------------------------------- - void SplitWindow::ImplInitSettings() { // Wenn fuer das MainSet eine Bitmap gesetzt wird, dann @@ -1394,16 +1352,12 @@ void SplitWindow::ImplInitSettings() } } -// ======================================================================= - SplitWindow::SplitWindow( Window* pParent, WinBits nStyle ) : DockingWindow( WINDOW_SPLITWINDOW ) { ImplInit( pParent, nStyle ); } -// ----------------------------------------------------------------------- - SplitWindow::~SplitWindow() { // Sets loeschen @@ -1411,8 +1365,6 @@ SplitWindow::~SplitWindow() mpMainSet = NULL; //NULL for base-class callbacks during dtoring } -// ----------------------------------------------------------------------- - void SplitWindow::ImplSetWindowSize( long nDelta ) { if ( !nDelta ) @@ -1453,8 +1405,6 @@ void SplitWindow::ImplSetWindowSize( long nDelta ) SplitResize(); } -// ----------------------------------------------------------------------- - Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize ) { Size aSize( aNewSize ); @@ -1520,8 +1470,6 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize ) return aSize; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplCalcLayout() { if ( !mbCalc || !mbRecalc || !mpMainSet->mpItems ) @@ -1604,8 +1552,6 @@ void SplitWindow::ImplCalcLayout() mbCalc = sal_False; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplUpdate() { mbCalc = sal_True; @@ -1619,8 +1565,6 @@ void SplitWindow::ImplUpdate() } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplSplitMousePos( Point& rMousePos ) { if ( mnSplitTest & SPLIT_HORZ ) @@ -1644,8 +1588,6 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-2; @@ -1716,8 +1658,6 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const { Rectangle aRect; @@ -1733,8 +1673,6 @@ void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const { Rectangle aRect; @@ -1745,8 +1683,6 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const { Rectangle aRect; @@ -1757,8 +1693,6 @@ void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const rRect = aRect; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1825,8 +1759,6 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) { if ( mbAutoHide ) @@ -1902,8 +1834,6 @@ void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -2046,8 +1976,6 @@ void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint ) { if ( mbFadeOut ) @@ -2076,7 +2004,6 @@ void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint ) } } -// ----------------------------------------------------------------------- void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) { Point aMousePosPixel = rMEvt.GetPosPixel(); @@ -2267,50 +2194,36 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt ) } -// ----------------------------------------------------------------------- - void SplitWindow::StartSplit() { maStartSplitHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::Split() { maSplitHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::SplitResize() { maSplitResizeHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::AutoHide() { maAutoHideHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::FadeIn() { maFadeInHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::FadeOut() { maFadeOutHdl.Call( this ); } -// ----------------------------------------------------------------------- - void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) { if ( !rMEvt.IsLeft() || rMEvt.IsMod2() ) @@ -2363,8 +2276,6 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) ImplStartSplit( rMEvt ); } -// ----------------------------------------------------------------------- - void SplitWindow::MouseMove( const MouseEvent& rMEvt ) { if ( !IsTracking() ) @@ -2400,8 +2311,6 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt ) } } -// ----------------------------------------------------------------------- - void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { Point aMousePosPixel = rTEvt.GetMouseEvent().GetPosPixel(); @@ -2583,8 +2492,6 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) } } -// ----------------------------------------------------------------------- - bool SplitWindow::PreNotify( NotifyEvent& rNEvt ) { const MouseEvent* pMouseEvt = NULL; @@ -2614,8 +2521,6 @@ bool SplitWindow::PreNotify( NotifyEvent& rNEvt ) return Window::PreNotify( rNEvt ); } -// ----------------------------------------------------------------------- - void SplitWindow::Paint( const Rectangle& ) { if ( mnWinStyle & WB_BORDER ) @@ -2634,15 +2539,11 @@ void SplitWindow::Paint( const Rectangle& ) ImplDrawSplit( this, mpMainSet, mbHorz, !mbBottomRight ); } -// ----------------------------------------------------------------------- - void SplitWindow::Move() { DockingWindow::Move(); } -// ----------------------------------------------------------------------- - void SplitWindow::Resize() { Size aSize = GetOutputSizePixel(); @@ -2653,8 +2554,6 @@ void SplitWindow::Resize() Invalidate(); } -// ----------------------------------------------------------------------- - void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) { // no keyboard help for splitwin @@ -2711,8 +2610,6 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) DockingWindow::RequestHelp( rHEvt ); } -// ----------------------------------------------------------------------- - void SplitWindow::StateChanged( StateChangedType nType ) { switch ( nType ) @@ -2734,8 +2631,6 @@ void SplitWindow::StateChanged( StateChangedType nType ) DockingWindow::StateChanged( nType ); } -// ----------------------------------------------------------------------- - void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -2748,8 +2643,6 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) DockingWindow::DataChanged( rDCEvt ); } -// ----------------------------------------------------------------------- - void SplitWindow::InsertItem( sal_uInt16 nId, Window* pWindow, long nSize, sal_uInt16 nPos, sal_uInt16 nSetId, SplitWindowItemBits nBits ) @@ -2817,8 +2710,6 @@ void SplitWindow::InsertItem( sal_uInt16 nId, Window* pWindow, long nSize, ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::InsertItem( sal_uInt16 nId, long nSize, sal_uInt16 nPos, sal_uInt16 nSetId, SplitWindowItemBits nBits ) @@ -2826,8 +2717,6 @@ void SplitWindow::InsertItem( sal_uInt16 nId, long nSize, InsertItem( nId, NULL, nSize, nPos, nSetId, nBits ); } -// ----------------------------------------------------------------------- - void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide ) { #ifdef DBG_UTIL @@ -2874,8 +2763,6 @@ void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide ) } } -// ----------------------------------------------------------------------- - void SplitWindow::Clear() { // Alle Sets loeschen @@ -2899,8 +2786,6 @@ void SplitWindow::Clear() ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, sal_Bool bPropSmall, sal_Bool bPropGreat ) { @@ -3134,8 +3019,6 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize ) { sal_uInt16 nPos; @@ -3156,8 +3039,6 @@ void SplitWindow::SetItemSize( sal_uInt16 nId, long nNewSize ) } } -// ----------------------------------------------------------------------- - long SplitWindow::GetItemSize( sal_uInt16 nId ) const { sal_uInt16 nPos; @@ -3169,8 +3050,6 @@ long SplitWindow::GetItemSize( sal_uInt16 nId ) const return 0; } -// ----------------------------------------------------------------------- - long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const { sal_uInt16 nPos; @@ -3226,9 +3105,6 @@ long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const return 0; } - - - void SplitWindow::SetItemSizeRange (sal_uInt16 nId, const Range aRange) { sal_uInt16 nPos; @@ -3241,8 +3117,6 @@ void SplitWindow::SetItemSizeRange (sal_uInt16 nId, const Range aRange) } } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const { sal_uInt16 nPos; @@ -3254,8 +3128,6 @@ sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const return 0; } -// ----------------------------------------------------------------------- - sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const { sal_uInt16 nPos; @@ -3267,22 +3139,16 @@ sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const return sal_False; } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const { return ImplFindItem( mpBaseSet, pWindow ); } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetItemId( const Point& rPos ) const { return ImplFindItem( mpBaseSet, rPos, mbHorz, !mbBottomRight ); } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); @@ -3303,8 +3169,6 @@ sal_uInt16 SplitWindow::GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId ) const return nPos; } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); @@ -3314,8 +3178,6 @@ sal_uInt16 SplitWindow::GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId ) const return 0; } -// ----------------------------------------------------------------------- - sal_uInt16 SplitWindow::GetItemCount( sal_uInt16 nSetId ) const { ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId ); @@ -3325,8 +3187,6 @@ sal_uInt16 SplitWindow::GetItemCount( sal_uInt16 nSetId ) const return 0; } -// ----------------------------------------------------------------------- - void SplitWindow::ImplNewAlign() { if ( mbNoAlign ) @@ -3368,8 +3228,6 @@ void SplitWindow::ImplNewAlign() ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::SetAlign( WindowAlign eNewAlign ) { if ( meAlign != eNewAlign ) @@ -3379,32 +3237,24 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign ) } } -// ----------------------------------------------------------------------- - void SplitWindow::ShowAutoHideButton( sal_Bool bShow ) { mbAutoHide = bShow; ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::ShowFadeInHideButton( sal_Bool bShow ) { mbFadeIn = bShow; ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::ShowFadeOutButton( sal_Bool bShow ) { mbFadeOut = bShow; ImplUpdate(); } -// ----------------------------------------------------------------------- - void SplitWindow::SetAutoHideState( sal_Bool bAutoHide ) { mbAutoHideIn = bAutoHide; @@ -3416,8 +3266,6 @@ void SplitWindow::SetAutoHideState( sal_Bool bAutoHide ) } } -// ----------------------------------------------------------------------- - long SplitWindow::GetFadeInSize() const { long n = 0; |