Tag: cws_src680_hsqlcsv User: fs Date: 2006/09/18 13:19:02 Modified: dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx
Log: #i69526# moved all tree icons into the ImageProvider - no hhard-coded versions anymore File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppDetailPageHelper.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.15.12.4&r2=1.15.12.5 Delta lines: +19 -22 --------------------- --- AppDetailPageHelper.cxx 18 Sep 2006 13:54:13 -0000 1.15.12.4 +++ AppDetailPageHelper.cxx 18 Sep 2006 20:19:00 -0000 1.15.12.5 @@ -4,9 +4,9 @@ * * $RCSfile: AppDetailPageHelper.cxx,v $ * - * $Revision: 1.15.12.4 $ + * $Revision: 1.15.12.5 $ * - * last change: $Author: fs $ $Date: 2006/09/18 13:54:13 $ + * last change: $Author: fs $ $Date: 2006/09/18 20:19:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -627,23 +627,25 @@ { OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); - USHORT nHelpId = 0, nIcon = 0, nIconH = 0, nImageId = 0, nImageIdH = 0; + USHORT nHelpId = 0, nImageId = 0, nImageIdH = 0; + ImageProvider aImageProvider; + Image aFolderImage, aFolderImageHC; switch( _eType ) { case E_FORM: nHelpId = HID_APP_FORM_TREE; - nIcon = IMG_FORMFOLDER_TREE_S; - nIconH = IMG_FORMFOLDER_TREE_SCH; + aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false ); + aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::FORM, true ); break; case E_REPORT: nHelpId = HID_APP_REPORT_TREE; - nIcon = IMG_REPORTFOLDER_TREE_S; - nIconH = IMG_REPORTFOLDER_TREE_SCH; + aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT, false ); + aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::REPORT, true ); break; case E_QUERY: nHelpId = HID_APP_QUERY_TREE; - nIcon = QUERYFOLDER_TREE_ICON; - nIconH = QUERYFOLDER_TREE_ICON_SCH; + aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, false ); + aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::QUERY, true ); break; default: OSL_ENSURE(0,"Illegal call!"); @@ -652,7 +654,7 @@ if ( !m_pLists[_eType] ) { - m_pLists[_eType] = createSimpleTree(nHelpId,nIcon,nIconH); + m_pLists[_eType] = createSimpleTree( nHelpId, aFolderImage, aFolderImageHC ); } if ( m_pLists[_eType] ) @@ -690,20 +692,15 @@ fillTreeListNames( _xContainer, _rList, _nImageId, _nHighContrastImageId, _pParent, m_rBorderWin.getView()->getContainerListener() ); } // ----------------------------------------------------------------------------- -DBTreeListBox* OAppDetailPageHelper::createSimpleTree(ULONG _nHelpId, USHORT _nCollapsedBitmap,USHORT _nCollapsedBitmap_HI) +DBTreeListBox* OAppDetailPageHelper::createSimpleTree( ULONG _nHelpId, const Image& _rImage, const Image& _rImageHC ) { DBTreeListBox* pTreeView = new DBTreeListBox(this,getBorderWin().getView()->getORB(),WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); pTreeView->SetHelpId(_nHelpId); - return createTree(pTreeView,_nCollapsedBitmap,_nCollapsedBitmap_HI); -} -// ----------------------------------------------------------------------------- -DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, USHORT _nDefaultIconID, USHORT _nDefaultIconID_HC ) -{ - return createTree( _pTreeView, Image( ModuleRes( _nDefaultIconID ) ), Image( ModuleRes( _nDefaultIconID_HC ) ) ); + return createTree( pTreeView, _rImage, _rImageHC ); } // ----------------------------------------------------------------------------- -DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rDefaultIcon, const Image& _rDefaultIcon_HC ) +DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage, const Image& _rImageHC ) { WaitObject aWaitCursor(this); @@ -712,10 +709,10 @@ _pTreeView->EnableCheckButton( NULL ); // do not show any buttons _pTreeView->SetSelectionMode(MULTIPLE_SELECTION); - _pTreeView->SetDefaultCollapsedEntryBmp( _rDefaultIcon ); - _pTreeView->SetDefaultCollapsedEntryBmp( _rDefaultIcon_HC, BMP_COLOR_HIGHCONTRAST ); - _pTreeView->SetDefaultExpandedEntryBmp( _rDefaultIcon ); - _pTreeView->SetDefaultExpandedEntryBmp( _rDefaultIcon_HC, BMP_COLOR_HIGHCONTRAST ); + _pTreeView->SetDefaultCollapsedEntryBmp( _rImage ); + _pTreeView->SetDefaultCollapsedEntryBmp( _rImageHC, BMP_COLOR_HIGHCONTRAST ); + _pTreeView->SetDefaultExpandedEntryBmp( _rImage ); + _pTreeView->SetDefaultExpandedEntryBmp( _rImageHC, BMP_COLOR_HIGHCONTRAST ); _pTreeView->SetDoubleClickHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick)); _pTreeView->SetEnterKeyHdl(LINK(this, OAppDetailPageHelper, OnEntryDoubleClick)); File [changed]: AppDetailPageHelper.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx?r1=1.10.12.3&r2=1.10.12.4 Delta lines: +9 -11 -------------------- --- AppDetailPageHelper.hxx 18 Sep 2006 13:54:13 -0000 1.10.12.3 +++ AppDetailPageHelper.hxx 18 Sep 2006 20:19:00 -0000 1.10.12.4 @@ -4,9 +4,9 @@ * * $RCSfile: AppDetailPageHelper.hxx,v $ * - * $Revision: 1.10.12.3 $ + * $Revision: 1.10.12.4 $ * - * last change: $Author: fs $ $Date: 2006/09/18 13:54:13 $ + * last change: $Author: fs $ $Date: 2006/09/18 20:19:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -174,28 +174,26 @@ /** sets all HandleCallbacks @param _pTreeView The newly created DBTreeListBox - @param _nDefaultIconID + @param _rImage the resource id of the default icon - @param _nDefaultIconID_HC + @param _rImageHC the resource id of the default icon (HC version) @return The new tree. */ - DBTreeListBox* createTree( DBTreeListBox* _pTreeView, USHORT _nDefaultIconID, USHORT _nDefaultIconID_HC ); - - DBTreeListBox* createTree( DBTreeListBox* _pTreeView, const Image& _rDefaultIcon, const Image& _rDefaultIcon_HC ); + DBTreeListBox* createTree( DBTreeListBox* _pTreeView, const Image& _rImage, const Image& _rImageHC ); /** creates the tree and sets all HandleCallbacks @param _nHelpId The help id of the control @param _nCollapsedBitmap - The collapsed bitmap resource id - @param _nCollapsedBitmap_HI - The collapsed bitmap resource id for high contrast. + The image to use for tree entries. + @param _rImageHC + The image to use in high contrast mode. @return The new tree. */ - DBTreeListBox* createSimpleTree(ULONG _nHelpId, USHORT _nCollapsedBitmap,USHORT _nCollapsedBitmap_HI); + DBTreeListBox* createSimpleTree( ULONG _nHelpId, const Image& _rImage, const Image& _rImageHC ); DECL_LINK( OnEntryDoubleClick, SvTreeListBox* ); DECL_LINK( OnDeSelectHdl, SvTreeListBox* ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
