diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-05-17 07:31:59 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-05-17 07:31:59 +0000 |
commit | 0400001ffe7a98c7bee0179e3fb003f0462a552d (patch) | |
tree | c4a975d4925e6023a6052458bde06c6885686a37 /svtools/source | |
parent | e41be41bea897073b7e70a5d54ef060b3b829272 (diff) |
#99375# generic high contrast support
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 19 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 103 | ||||
-rw-r--r-- | svtools/source/contnr/svtreebx.cxx | 132 |
3 files changed, 177 insertions, 77 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 9e2143833ece..f02ae4810ac6 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svimpbox.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: gt $ $Date: 2002-04-10 05:56:21 $ + * last change: $Author: fs $ $Date: 2002-05-17 08:31:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -972,6 +972,9 @@ void SvImpLBox::DrawNet() Point aPos1, aPos2; USHORT nDistance; ULONG nMax = nVisibleCount + nOffs + 1; + + const Image& rExpandedNodeBitmap = GetExpandedNodeBmp(); + for( ULONG n=0; n< nMax && pEntry; n++ ) { if( pView->IsExpanded(pEntry) ) @@ -980,7 +983,7 @@ void SvImpLBox::DrawNet() // wenn keine ContextBitmap, dann etwas nach rechts // unter den ersten Text (Node.Bmp ebenfalls if( !pView->nContextBmpWidthMax ) - aPos1.X() += aExpNodeBmp.GetSizePixel().Width() / 2; + aPos1.X() += rExpandedNodeBitmap.GetSizePixel().Width() / 2; aPos1.Y() = nY; aPos1.Y() += nEntryHeightDIV2; @@ -1005,7 +1008,7 @@ void SvImpLBox::DrawNet() // wenn keine ContextBitmap, dann etwas nach rechts // unter den ersten Text (Node.Bmp ebenfalls if( !pView->nContextBmpWidthMax ) - aPos1.X() += aExpNodeBmp.GetSizePixel().Width() / 2; + aPos1.X() += rExpandedNodeBitmap.GetSizePixel().Width() / 2; aPos1.Y() = nY; aPos1.Y() += nEntryHeightDIV2; aPos2.X() = aPos1.X(); @@ -1024,7 +1027,7 @@ void SvImpLBox::DrawNet() // wenn keine ContextBitmap, dann etwas nach rechts // unter den ersten Text (Node.Bmp ebenfalls if( !pView->nContextBmpWidthMax ) - aPos1.X() += aExpNodeBmp.GetSizePixel().Width() / 2; + aPos1.X() += rExpandedNodeBitmap.GetSizePixel().Width() / 2; aPos1.X() -= pView->GetIndent(); aPos1.Y() = GetEntryLine( pEntry ); aPos1.Y() += nEntryHeightDIV2; @@ -1416,8 +1419,8 @@ long SvImpLBox::GetEntryLine( SvLBoxEntry* pEntry ) const void SvImpLBox::SetEntryHeight( short /* nHeight */ ) { - SetNodeBmpYOffset( aExpNodeBmp ); - SetNodeBmpYOffset( aCollNodeBmp ); + SetNodeBmpYOffset( GetExpandedNodeBmp() ); + SetNodeBmpYOffset( GetCollapsedNodeBmp() ); if(!pView->HasViewData()) // stehen wir im Clear? { Size aSize = pView->Control::GetOutputSizePixel(); @@ -1542,7 +1545,7 @@ void SvImpLBox::SetNodeBmpTabDistance() { // nur, wenn der erste dynamische Tab zentriert ist // (setze ich momentan voraus) - Size aSize = aExpNodeBmp.GetSizePixel(); + Size aSize = GetExpandedNodeBmp().GetSizePixel(); nNodeBmpTabDistance -= aSize.Width() / 2; } } diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index fc6cd0c85cf8..96dde914563f 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svlbitm.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:58:57 $ + * last change: $Author: fs $ $Date: 2002-05-17 08:31:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -373,25 +373,42 @@ void SvLBoxButton::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, // class SvLBoxContextBmp // *************************************************************** +struct SvLBoxContextBmp_Impl +{ + Image m_aImage1; + Image m_aImage2; + + Image m_aImage1_hc; + Image m_aImage2_hc; + + USHORT m_nB2IndicatorFlags; +}; + +// *************************************************************** DBG_NAME(SvLBoxContextBmp); SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, USHORT nItemFlags, Image aBmp1, Image aBmp2, USHORT nEntryFlags ) - : SvLBoxItem( pEntry, nItemFlags ) + :SvLBoxItem( pEntry, nItemFlags ) + ,m_pImpl( new SvLBoxContextBmp_Impl ) { DBG_CTOR(SvLBoxContextBmp,0); - nEntryFlagsBmp1 = nEntryFlags; - SetBitmap1( pEntry, aBmp1 ); - SetBitmap2( pEntry, aBmp2 ); + + m_pImpl->m_nB2IndicatorFlags = nEntryFlags; + SetModeImages( aBmp1, aBmp2 ); } SvLBoxContextBmp::SvLBoxContextBmp() + :SvLBoxItem( ) + ,m_pImpl( new SvLBoxContextBmp_Impl ) { + m_pImpl->m_nB2IndicatorFlags = 0; DBG_CTOR(SvLBoxContextBmp,0); } SvLBoxContextBmp::~SvLBoxContextBmp() { + delete m_pImpl; DBG_DTOR(SvLBoxContextBmp,0); } @@ -401,16 +418,51 @@ USHORT SvLBoxContextBmp::IsA() return SV_ITEM_ID_LBOXCONTEXTBMP; } -void SvLBoxContextBmp::SetBitmap1( SvLBoxEntry*, Image aBmp ) +BOOL SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode ) { DBG_CHKTHIS(SvLBoxContextBmp,0); - aBmp1 = aBmp; + + sal_Bool bSuccess = sal_True; + switch ( _eMode ) + { + case BMP_COLOR_NORMAL: + m_pImpl->m_aImage1 = _rBitmap1; + m_pImpl->m_aImage2 = _rBitmap2; + break; + + case BMP_COLOR_HIGHCONTRAST: + m_pImpl->m_aImage1_hc = _rBitmap1; + m_pImpl->m_aImage2_hc = _rBitmap2; + break; + + default: + DBG_ERROR( "SvLBoxContextBmp::SetModeImages: unexpected mode!"); + bSuccess = sal_False; + break; + } + return bSuccess; } -void SvLBoxContextBmp::SetBitmap2( SvLBoxEntry*, Image aBmp) +Image& SvLBoxContextBmp::implGetImageStore( sal_Bool _bFirst, BmpColorMode _eMode ) { DBG_CHKTHIS(SvLBoxContextBmp,0); - aBmp2 = aBmp; + + switch ( _eMode ) + { + case BMP_COLOR_NORMAL: + return _bFirst ? m_pImpl->m_aImage1 : m_pImpl->m_aImage2; + break; + + case BMP_COLOR_HIGHCONTRAST: + return _bFirst ? m_pImpl->m_aImage1_hc : m_pImpl->m_aImage2_hc; + break; + + default: + DBG_ERROR( "SvLBoxContextBmp::implGetImageStore: unexpected mode!"); + } + + static Image aDummy; + return aDummy; } void SvLBoxContextBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, @@ -419,17 +471,28 @@ void SvLBoxContextBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, DBG_CHKTHIS(SvLBoxContextBmp,0); if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); - pViewData->aSize = aBmp1.GetSizePixel(); + pViewData->aSize = m_pImpl->m_aImage1.GetSizePixel(); } -void SvLBoxContextBmp::Paint( const Point& rPos, SvLBox& rDev, - USHORT nViewDataEntryFlags, SvLBoxEntry* pEntry ) +void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev, + USHORT _nViewDataEntryFlags, SvLBoxEntry* /* pEntry */ ) { DBG_CHKTHIS(SvLBoxContextBmp,0); - Image* pBmp = &aBmp1; - if( nViewDataEntryFlags & nEntryFlagsBmp1 ) - pBmp = &aBmp2; - rDev.DrawImage( rPos, *pBmp); + + // determine the image set + BmpColorMode eMode( BMP_COLOR_NORMAL ); + if ( !!m_pImpl->m_aImage1_hc ) + { // we really have HC images + const Wallpaper& rDeviceBackground = _rDev.GetDisplayBackground(); + if ( rDeviceBackground.GetColor().IsDark() ) + eMode = BMP_COLOR_HIGHCONTRAST; + } + + // get the image + const Image& rImage = implGetImageStore( 0 == ( _nViewDataEntryFlags & m_pImpl->m_nB2IndicatorFlags ), eMode ); + + // draw + _rDev.DrawImage( _rPos, rImage ); } SvLBoxItem* SvLBoxContextBmp::Create() const @@ -441,9 +504,9 @@ SvLBoxItem* SvLBoxContextBmp::Create() const void SvLBoxContextBmp::Clone( SvLBoxItem* pSource ) { DBG_CHKTHIS(SvLBoxContextBmp,0); - aBmp1 = ((SvLBoxContextBmp*)pSource)->aBmp1; - aBmp2 = ((SvLBoxContextBmp*)pSource)->aBmp2; - nEntryFlagsBmp1 = ((SvLBoxContextBmp*)pSource)->nEntryFlagsBmp1; + m_pImpl->m_aImage1 = static_cast< SvLBoxContextBmp* >( pSource )->m_pImpl->m_aImage1; + m_pImpl->m_aImage2 = static_cast< SvLBoxContextBmp* >( pSource )->m_pImpl->m_aImage2; + m_pImpl->m_nB2IndicatorFlags = static_cast< SvLBoxContextBmp* >( pSource )->m_pImpl->m_nB2IndicatorFlags; } diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index bd42776ab3bd..13589cf5511a 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svtreebx.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: pb $ $Date: 2002-04-25 06:51:08 $ + * last change: $Author: fs $ $Date: 2002-05-17 08:31:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -396,22 +396,22 @@ XubString SvTreeListBox::GetEntryText(SvLBoxEntry* pEntry) const return pItem->GetText(); } -const Image& SvTreeListBox::GetExpandedEntryBmp(SvLBoxEntry* pEntry) const +const Image& SvTreeListBox::GetExpandedEntryBmp(SvLBoxEntry* pEntry, BmpColorMode _eMode) const { DBG_CHKTHIS(SvTreeListBox,0); DBG_ASSERT(pEntry,"Entry?") SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); DBG_ASSERT(pItem,"GetContextBmp:Item not found") - return pItem->GetBitmap2(); + return pItem->GetBitmap2( _eMode ); } -const Image& SvTreeListBox::GetCollapsedEntryBmp(SvLBoxEntry* pEntry ) const +const Image& SvTreeListBox::GetCollapsedEntryBmp( SvLBoxEntry* pEntry, BmpColorMode _eMode ) const { DBG_CHKTHIS(SvTreeListBox,0); DBG_ASSERT(pEntry,"Entry?") SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); DBG_ASSERT(pItem,"GetContextBmp:Item not found") - return pItem->GetBitmap1(); + return pItem->GetBitmap1( _eMode ); } IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData ) @@ -429,12 +429,15 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa DBG_CHKTHIS(SvTreeListBox,0); nTreeFlags |= TREEFLAG_MANINS; - aCurInsertedExpBmp = aExpandedEntryBmp; - aCurInsertedColBmp = aCollapsedEntryBmp; + const Image& rDefExpBmp = pImp->GetDefaultEntryExpBmp( ); + const Image& rDefColBmp = pImp->GetDefaultEntryColBmp( ); + + aCurInsertedExpBmp = rDefExpBmp; + aCurInsertedColBmp = rDefColBmp; SvLBoxEntry* pEntry = CreateEntry(); pEntry->SetUserData( pUser ); - InitEntry( pEntry, aText, aCollapsedEntryBmp, aExpandedEntryBmp ); + InitEntry( pEntry, aText, rDefColBmp, rDefExpBmp ); pEntry->EnableChildsOnDemand( bChildsOnDemand ); if( !pParent ) @@ -442,8 +445,8 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa else SvLBox::Insert( pEntry, pParent, nPos ); - aPrevInsertedExpBmp = aExpandedEntryBmp; - aPrevInsertedColBmp = aCollapsedEntryBmp; + aPrevInsertedExpBmp = rDefExpBmp; + aPrevInsertedColBmp = rDefColBmp; nTreeFlags &= (~TREEFLAG_MANINS); @@ -498,12 +501,14 @@ void SvTreeListBox::SetEntryText( SvLBoxEntry* pEntry, const XubString& aStr) GetModel()->InvalidateEntry( pEntry ); } -void SvTreeListBox::SetExpandedEntryBmp(SvLBoxEntry* pEntry, const Image& aBmp) +void SvTreeListBox::SetExpandedEntryBmp( SvLBoxEntry* pEntry, const Image& aBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); - DBG_ASSERT(pItem,"SetExpBmp:Item not found") - pItem->SetBitmap2( pEntry, aBmp ); + + DBG_ASSERT(pItem,"SetExpBmp:Item not found"); + pItem->SetBitmap2( pEntry, aBmp, _eMode ); + GetModel()->InvalidateEntry( pEntry ); SetEntryHeight( pEntry ); Size aSize = aBmp.GetSizePixel(); @@ -514,12 +519,14 @@ void SvTreeListBox::SetExpandedEntryBmp(SvLBoxEntry* pEntry, const Image& aBmp) } } -void SvTreeListBox::SetCollapsedEntryBmp(SvLBoxEntry* pEntry,const Image& aBmp ) +void SvTreeListBox::SetCollapsedEntryBmp(SvLBoxEntry* pEntry,const Image& aBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); SvLBoxContextBmp* pItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); - DBG_ASSERT(pItem,"SetExpBmp:Item not found") - pItem->SetBitmap1( pEntry, aBmp ); + + DBG_ASSERT(pItem,"SetExpBmp:Item not found"); + pItem->SetBitmap1( pEntry, aBmp, _eMode ); + GetModel()->InvalidateEntry( pEntry ); SetEntryHeight( pEntry ); Size aSize = aBmp.GetSizePixel(); @@ -637,15 +644,26 @@ SvLBoxEntry* __EXPORT SvTreeListBox::CloneEntry( SvLBoxEntry* pSource ) SvLBoxContextBmp* pBmpItem = (SvLBoxContextBmp*)(pSource->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); if( pBmpItem ) { - aCollEntryBmp = pBmpItem->GetBitmap1(); - aExpEntryBmp = pBmpItem->GetBitmap2(); + aCollEntryBmp = pBmpItem->GetBitmap1( BMP_COLOR_NORMAL ); + aExpEntryBmp = pBmpItem->GetBitmap2( BMP_COLOR_NORMAL ); } - SvLBoxEntry* pEntry = CreateEntry(); - InitEntry( pEntry, aStr, aCollEntryBmp, aExpEntryBmp ); - pEntry->SvListEntry::Clone( pSource ); - pEntry->EnableChildsOnDemand( pSource->HasChildsOnDemand() ); - pEntry->SetUserData( pSource->GetUserData() ); - return pEntry; + SvLBoxEntry* pClone = CreateEntry(); + InitEntry( pClone, aStr, aCollEntryBmp, aExpEntryBmp ); + pClone->SvListEntry::Clone( pSource ); + pClone->EnableChildsOnDemand( pSource->HasChildsOnDemand() ); + pClone->SetUserData( pSource->GetUserData() ); + + if ( pBmpItem ) + { + SvLBoxContextBmp* pCloneBitmap = static_cast< SvLBoxContextBmp* >( pClone->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) ); + if ( pCloneBitmap ) + { + pCloneBitmap->SetBitmap1( pClone, pBmpItem->GetBitmap1( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST ); + pCloneBitmap->SetBitmap2( pClone, pBmpItem->GetBitmap2( BMP_COLOR_HIGHCONTRAST ), BMP_COLOR_HIGHCONTRAST ); + } + } + + return pClone; } // ********************************************************************* @@ -670,24 +688,36 @@ void SvTreeListBox::SetIndent( short nNewIndent ) Invalidate(); } -void SvTreeListBox::SetDefaultExpandedEntryBmp( const Image& aBmp) +const Image& SvTreeListBox::GetDefaultExpandedEntryBmp( BmpColorMode _eMode ) const +{ + return pImp->GetDefaultEntryExpBmp( _eMode ); +} + +const Image& SvTreeListBox::GetDefaultCollapsedEntryBmp( BmpColorMode _eMode ) const +{ + return pImp->GetDefaultEntryColBmp( _eMode ); +} + +void SvTreeListBox::SetDefaultExpandedEntryBmp( const Image& aBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); Size aSize = aBmp.GetSizePixel(); if( aSize.Width() > nContextBmpWidthMax ) nContextBmpWidthMax = (short)aSize.Width(); SetTabs(); - aExpandedEntryBmp = aBmp; + + pImp->SetDefaultEntryExpBmp( aBmp, _eMode ); } -void SvTreeListBox::SetDefaultCollapsedEntryBmp( const Image& aBmp) +void SvTreeListBox::SetDefaultCollapsedEntryBmp( const Image& aBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); Size aSize = aBmp.GetSizePixel(); if( aSize.Width() > nContextBmpWidthMax ) nContextBmpWidthMax = (short)aSize.Width(); SetTabs(); - aCollapsedEntryBmp = aBmp; + + pImp->SetDefaultEntryColBmp( aBmp, _eMode ); } void SvTreeListBox::EnableCheckButton( SvLBoxButtonData* pData ) @@ -708,15 +738,19 @@ void SvTreeListBox::EnableCheckButton( SvLBoxButtonData* pData ) Invalidate(); } -void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, - const Image& rExpandedNodeBmp) +void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image& rExpandedNodeBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); - SetExpandedNodeBmp( rExpandedNodeBmp ); - SetCollapsedNodeBmp( rCollapsedNodeBmp ); + SetExpandedNodeBmp( rExpandedNodeBmp, _eMode ); + SetCollapsedNodeBmp( rCollapsedNodeBmp, _eMode ); SetTabs(); } +void SvTreeListBox::SetDontKnowNodeBitmap( const Image& rDontKnowBmp, BmpColorMode _eMode ) +{ + pImp->SetDontKnowNodeBmp( rDontKnowBmp, _eMode ); +} + BOOL SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -1109,18 +1143,18 @@ void __EXPORT SvTreeListBox::ModelHasRemoved( SvListEntry* /* pEntry */ ) pImp->EntryRemoved(); } -void SvTreeListBox::SetCollapsedNodeBmp( const Image& rBmp) +void SvTreeListBox::SetCollapsedNodeBmp( const Image& rBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); AdjustEntryHeight( rBmp ); - pImp->SetCollapsedNodeBmp( rBmp ); + pImp->SetCollapsedNodeBmp( rBmp, _eMode ); } -void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp) +void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp, BmpColorMode _eMode ) { DBG_CHKTHIS(SvTreeListBox,0); AdjustEntryHeight( rBmp ); - pImp->SetExpandedNodeBmp( rBmp ); + pImp->SetExpandedNodeBmp( rBmp, _eMode ); } @@ -1203,14 +1237,14 @@ void SvTreeListBox::SetCurEntry( SvLBoxEntry* pEntry ) pImp->SetCurEntry( pEntry ); } -Image SvTreeListBox::GetCollapsedNodeBmp() const +Image SvTreeListBox::GetCollapsedNodeBmp( BmpColorMode _eMode ) const { - return pImp->GetCollapsedNodeBmp(); + return pImp->GetCollapsedNodeBmp( _eMode ); } -Image SvTreeListBox::GetExpandedNodeBmp() const +Image SvTreeListBox::GetExpandedNodeBmp( BmpColorMode _eMode ) const { - return pImp->GetExpandedNodeBmp(); + return pImp->GetExpandedNodeBmp( _eMode ); } Point SvTreeListBox::GetEntryPos( SvLBoxEntry* pEntry ) const @@ -1686,17 +1720,22 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, { Point aPos( GetTabPos(pEntry,pFirstDynamicTab), nLine ); aPos.X() += pImp->nNodeBmpTabDistance; + const Image* pImg = 0; + BmpColorMode eBitmapMode = BMP_COLOR_NORMAL; + if ( GetDisplayBackground().GetColor().IsDark() ) + eBitmapMode = BMP_COLOR_HIGHCONTRAST; + if( IsExpanded(pEntry) ) - pImg = &pImp->GetExpandedNodeBmp(); + pImg = &pImp->GetExpandedNodeBmp( eBitmapMode ); else { if( (!pEntry->HasChilds()) && pEntry->HasChildsOnDemand() && (!(pEntry->GetFlags() & SV_ENTRYFLAG_HAD_CHILDREN)) && pImp->GetDontKnowNodeBmp().GetSizePixel().Width() ) - pImg = &pImp->GetDontKnowNodeBmp(); + pImg = &pImp->GetDontKnowNodeBmp( eBitmapMode ); else - pImg = &pImp->GetCollapsedNodeBmp(); + pImg = &pImp->GetCollapsedNodeBmp( eBitmapMode ); } aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2; DrawImage( aPos, *pImg ); @@ -2314,11 +2353,6 @@ void SvTreeListBox::EnableAsyncDrag( BOOL b ) pImp->EnableAsyncDrag( b ); } -void SvTreeListBox::SetDontKnowNodeBitmap( const Image& rCollapsedNodeBmp ) -{ - pImp->SetDontKnowNodeBmp( rCollapsedNodeBmp ); -} - SvLBoxEntry* SvTreeListBox::GetFirstEntryInView() const { Point aPos; |