summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorStephan Bergmann <sb@openoffice.org>2002-07-03 14:53:24 +0000
committerStephan Bergmann <sb@openoffice.org>2002-07-03 14:53:24 +0000
commit8f3bc6cb9c61b6e51488a0535b2d0065697ea62b (patch)
treed348a55911d0428d879f073a3a862adaf73e8073 /basctl
parent3206ec46bab1604995b8e83c12d3395f3a6e8866 (diff)
#99748# #99750# #99752# #99753# Enabled high contrast mode for various BASIC IDE controls.
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx7
-rw-r--r--basctl/source/basicide/baside2.hxx9
-rw-r--r--basctl/source/basicide/baside2b.cxx6
-rw-r--r--basctl/source/basicide/bastype2.cxx101
-rw-r--r--basctl/source/basicide/bastype2.hxx25
-rw-r--r--basctl/source/basicide/bastype3.cxx8
-rw-r--r--basctl/source/basicide/moduldlg.cxx16
-rw-r--r--basctl/source/basicide/moduldlg.hrc13
-rw-r--r--basctl/source/basicide/moduldlg.hxx27
-rw-r--r--basctl/source/basicide/objdlg.cxx36
-rw-r--r--basctl/source/basicide/objdlg.hrc5
-rw-r--r--basctl/source/basicide/objdlg.hxx26
-rw-r--r--basctl/source/basicide/objdlg.src21
13 files changed, 181 insertions, 119 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 2677f04d141f..d150a73785f8 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside2.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: tbe $ $Date: 2001-11-12 22:33:30 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:45:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1388,7 +1388,8 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
aStackWindow( this ),
aVSplitter( this, WinBits( WB_VSCROLL ) ),
aHSplitter( this, WinBits( WB_HSCROLL ) ),
- aImages( IDEResId( RID_IMGLST_LAYOUT ) )
+ m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT)),
+ m_aImagesHighContrast(IDEResId(RID_IMGLST_LAYOUT_HC))
{
pModulWindow = 0;
bVSplitted = FALSE;
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 8c38e0b54f21..ee2254abad8b 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside2.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: tbe $ $Date: 2002-04-17 08:46:46 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:45:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -480,7 +480,8 @@ private:
// BOOL bDoSyntaxHighlight;
Color aSyntaxColors[10];
- ImageList aImages;
+ ImageList m_aImagesNormal;
+ ImageList m_aImagesHighContrast;
protected:
virtual void Resize();
@@ -501,7 +502,7 @@ public:
Color* GetSyntaxColors() { return aSyntaxColors; }
- Image GetImage( USHORT nId ) { return aImages.GetImage( nId ); }
+ Image GetImage(USHORT nId) { return m_aImagesNormal.GetImage(nId); }
// BOOL DoHighlight() const { return bDoSyntaxHighlight; }
// void SetHighlightMode( BOOL bHighlight )
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b922f8705ca9..99103fe45298 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside2b.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: tbe $ $Date: 2002-05-02 13:36:21 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:45:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1327,6 +1327,8 @@ WatchWindow::WatchWindow( Window* pParent ) :
aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) );
aXEdit.Show();
+ aRemoveWatchButton.SetModeImage(Image(IDEResId(RID_IMG_REMOVEWATCH_HC)),
+ BMP_COLOR_HIGHCONTRAST);
aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) );
aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) );
Size aSz( aRemoveWatchButton.GetImage().GetSizePixel() );
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index d2d376e9d546..319756d5d882 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastype2.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: tbe $ $Date: 2001-12-18 11:26:25 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:48:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,6 +59,9 @@
*
************************************************************************/
+#include <memory>
+
+#include "vcl/bitmap.hxx"
#include <ide_pch.hxx>
@@ -88,7 +91,8 @@ using namespace ::com::sun::star;
BasicTreeListBox::BasicTreeListBox( Window* pParent, const ResId& rRes ) :
SvTreeListBox( pParent, IDEResId( rRes.GetId() ) ),
- aImages( IDEResId( RID_IMGLST_OBJECTS ) )
+ m_aImagesNormal(IDEResId(RID_IMGLST_OBJECTS)),
+ m_aImagesHighContrast(IDEResId(RID_IMGLST_OBJECTS_HC))
{
SetSelectionMode( SINGLE_SELECTION );
nMode = 0xFF; // Alles
@@ -122,11 +126,12 @@ void BasicTreeListBox::ScanBasic( BasicManager* pBasMgr, const String& rName )
// create tree list box entry
SvLBoxEntry* pBasicManagerRootEntry = FindEntry( 0, rName, OBJTYPE_BASICMANAGER );
if ( !pBasicManagerRootEntry )
- {
- Image aImage( aImages.GetImage( ( pBasMgr == SFX_APP()->GetBasicManager() ) ? IMGID_APPICON : IMGID_DOCUMENT ) );
- pBasicManagerRootEntry = InsertEntry( rName, aImage, aImage, 0, FALSE, LIST_APPEND );
- pBasicManagerRootEntry->SetUserData( new BasicManagerEntry( pBasMgr ) );
- }
+ pBasicManagerRootEntry = insertEntry(
+ rName,
+ pBasMgr == SFX_APP()->GetBasicManager()
+ ? IMGID_APPICON : IMGID_DOCUMENT,
+ 0, false,
+ std::auto_ptr< BasicEntry >(new BasicManagerEntry(pBasMgr)));
// level 2: libraries (Standard, ...)
@@ -167,12 +172,10 @@ void BasicTreeListBox::ScanBasic( BasicManager* pBasMgr, const String& rName )
// create a tree list box entry
SvLBoxEntry* pLibRootEntry = FindEntry( pBasicManagerRootEntry, aLibName, OBJTYPE_LIB );
if ( !pLibRootEntry )
- {
- Image aImage( aImages.GetImage( bLoaded ? IMGID_LIB : IMGID_LIBNOTLOADED ) );
- pLibRootEntry = InsertEntry( aLibName, aImage, aImage,
- pBasicManagerRootEntry, bLoaded ? FALSE : TRUE , LIST_APPEND );
- pLibRootEntry->SetUserData( new BasicEntry( OBJTYPE_LIB ) );
- }
+ pLibRootEntry = insertEntry(
+ aLibName, bLoaded ? IMGID_LIB : IMGID_LIBNOTLOADED,
+ pBasicManagerRootEntry, !bLoaded,
+ std::auto_ptr< BasicEntry >(new BasicEntry(OBJTYPE_LIB)));
// create the sub entries
if ( bLoaded )
@@ -195,8 +198,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
{
try
{
- Image aModImage( aImages.GetImage( IMGID_MODULE ) );
-
// get a sorted list of module names
Sequence< ::rtl::OUString > aModNames = BasicIDE::GetModuleNames( pShell, rLibName );
sal_Int32 nModCount = aModNames.getLength();
@@ -207,10 +208,10 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
String aModName = pModNames[ i ];
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJTYPE_MODULE );
if ( !pModuleEntry )
- {
- pModuleEntry = InsertEntry( aModName, aModImage, aModImage, pLibRootEntry, FALSE, LIST_APPEND );
- pModuleEntry->SetUserData( new BasicEntry( OBJTYPE_MODULE ) );
- }
+ pModuleEntry = insertEntry(
+ aModName, IMGID_MODULE, pLibRootEntry, false,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_MODULE)));
// methods
if ( nMode & BROWSEMODE_SUBS )
@@ -219,16 +220,16 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
sal_Int32 nCount = aNames.getLength();
const ::rtl::OUString* pNames = aNames.getConstArray();
- Image aImage( aImages.GetImage( IMGID_MACRO ) );
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
{
String aName = pNames[ j ];
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJTYPE_METHOD );
if ( !pEntry )
- {
- pEntry = InsertEntry( aName, aImage, aImage, pModuleEntry, FALSE, LIST_APPEND );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_METHOD ) );
- }
+ pEntry = insertEntry(
+ aName, IMGID_MACRO, pModuleEntry,
+ false,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_METHOD)));
}
}
}
@@ -250,8 +251,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
{
try
{
- Image aDlgImage( aImages.GetImage( IMGID_OBJECT ) );
-
// get a sorted list of dialog names
Sequence< ::rtl::OUString > aDlgNames = BasicIDE::GetDialogNames( pShell, rLibName );
sal_Int32 nDlgCount = aDlgNames.getLength();
@@ -262,10 +261,10 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
String aDlgName = pDlgNames[ i ];
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJTYPE_OBJECT );
if ( !pDialogEntry )
- {
- pDialogEntry = InsertEntry( aDlgName, aDlgImage, aDlgImage, pLibRootEntry, TRUE, LIST_APPEND );
- pDialogEntry->SetUserData( new BasicEntry( OBJTYPE_OBJECT ) );
- }
+ pDialogEntry = insertEntry(
+ aDlgName, IMGID_OBJECT, pLibRootEntry, true,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_OBJECT)));
}
}
catch ( container::NoSuchElementException& e )
@@ -330,8 +329,9 @@ void BasicTreeListBox::ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry )
{
SbMethod* pMethod= (SbMethod*) pObj->GetMethods()->Get( nMethod );
DBG_ASSERT( pMethod , "Methode nicht gefunden! (NULL)" );
- SvLBoxEntry* pEntry = InsertEntry( pMethod->GetName(), aImages.GetImage( IMGID_MACRO ), aImages.GetImage( IMGID_MACRO ), pObjEntry, FALSE, LIST_APPEND );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_METHODINOBJ ) );
+ insertEntry(pMethod->GetName(), IMGID_MACRO, pObjEntry, false,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_METHODINOBJ)));
}
}
@@ -343,8 +343,9 @@ void BasicTreeListBox::ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry )
{
SbxVariable* pVar = pObj->GetProperties()->Get( nProp );
DBG_ASSERT( pVar, "Property nicht gefunden! (NULL)" );
- SvLBoxEntry* pEntry = InsertEntry( pVar->GetName(), aImages.GetImage( IMGID_PROP ), aImages.GetImage( IMGID_PROP ), pObjEntry, FALSE, LIST_APPEND );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_PROPERTY ) );
+ insertEntry(pVar->GetName(), IMGID_PROP, pObjEntry, false,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_PROPERTY)));
}
}
@@ -356,12 +357,11 @@ void BasicTreeListBox::ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry )
{
SbxVariable* pVar = pObj->GetObjects()->Get( nObject );
if ( pVar->GetClass() == SbxCLASS_OBJECT )
- {
// SubObjecte erhalten ChildsOnDemand und koennen
// jederzeit weiter aufgeklappt werden...
- SvLBoxEntry* pEntry = InsertEntry( pVar->GetName(), aImages.GetImage( IMGID_SUBOBJ ), aImages.GetImage( IMGID_SUBOBJ ), pObjEntry, TRUE, LIST_APPEND );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_SUBOBJ ) );
- }
+ insertEntry(pVar->GetName(), IMGID_SUBOBJ, pObjEntry, true,
+ std::auto_ptr< BasicEntry >(
+ new BasicEntry(OBJTYPE_SUBOBJ)));
}
}
}
@@ -447,3 +447,26 @@ BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
return bProtected;
}
+SvLBoxEntry * BasicTreeListBox::insertEntry(
+ String const & rText, USHORT nBitmap, SvLBoxEntry * pParent,
+ bool bChildrenOnDemand, std::auto_ptr< BasicEntry > aUserData)
+{
+ Image aImage(m_aImagesNormal.GetImage(nBitmap));
+ SvLBoxEntry * p = InsertEntry(
+ rText, aImage, aImage, pParent, bChildrenOnDemand, LIST_APPEND,
+ aUserData.release()); // XXX possible leak
+ aImage = m_aImagesHighContrast.GetImage(nBitmap);
+ SetExpandedEntryBmp(p, aImage, BMP_COLOR_HIGHCONTRAST);
+ SetCollapsedEntryBmp(p, aImage, BMP_COLOR_HIGHCONTRAST);
+ return p;
+}
+
+void BasicTreeListBox::setEntryBitmap(SvLBoxEntry * pEntry, USHORT nBitmap)
+{
+ Image aImage(m_aImagesNormal.GetImage(nBitmap));
+ SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
+ SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_NORMAL);
+ aImage = m_aImagesHighContrast.GetImage(nBitmap);
+ SetExpandedEntryBmp(pEntry, aImage, BMP_COLOR_HIGHCONTRAST);
+ SetCollapsedEntryBmp(pEntry, aImage, BMP_COLOR_HIGHCONTRAST);
+}
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 028cf5217729..fa3204ec87e3 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastype2.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: tbe $ $Date: 2001-09-03 11:49:48 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:48:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,12 @@
#ifndef _BASTYPE2_HXX
#define _BASTYPE2_HXX
+#include <memory>
+
+#ifndef _SOLAR_H
+#include "tools/solar.h"
+#endif
+
#define _SVICNVW_HXX
#ifndef _SVTREEBOX_HXX //autogen
#include <svtools/svtreebx.hxx>
@@ -87,22 +93,26 @@
#define BROWSEMODE_PROPS 0x08
#define BROWSEMODE_SUBOBJS 0x10
+class BasicEntry;
class BasicManager;
class SbMethod;
class SbxObject;
class SbModule;
class SvLBoxEntry;
class SbxVariable;
-
+class String;
class BasicTreeListBox : public SvTreeListBox
{
private:
USHORT nMode;
- ImageList aImages;
+ ImageList m_aImagesNormal;
+ ImageList m_aImagesHighContrast;
void ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry );
+ void setEntryBitmap(SvLBoxEntry * pEntry, USHORT nBitmap);
+
protected:
void ExpandTree( SvLBoxEntry* pRootEntry );
virtual void RequestingChilds( SvLBoxEntry* pParent );
@@ -132,8 +142,6 @@ public:
void SetMode( USHORT nM ) { nMode = nM; }
USHORT GetMode() const { return nMode; }
- Image GetImage( USHORT nId ) { return aImages.GetImage( nId ); }
-
SbMethod* FindMethod( SvLBoxEntry* pEntry );
SbxObject* FindObject( SvLBoxEntry* pEntry );
SbModule* FindModule( SvLBoxEntry* pEntry );
@@ -142,6 +150,11 @@ public:
// new dialogs
SbxItem GetSbxItem( SvLBoxEntry* pEntry );
+
+ SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap,
+ SvLBoxEntry * pParent,
+ bool bChildrenOnDemand,
+ std::auto_ptr< BasicEntry > aUserData);
};
/****************************************
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index fa5b99ec4801..025e7b411aed 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastype3.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: tbe $ $Date: 2001-12-18 11:26:25 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:48:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -161,9 +161,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
ImpCreateLibSubEntries( pEntry, pShell, aLibName );
// exchange image
- Image aImage( aImages.GetImage( IMGID_LIB ) );
- SetExpandedEntryBmp( pEntry, aImage );
- SetCollapsedEntryBmp( pEntry, aImage );
+ setEntryBitmap(pEntry, IMGID_LIB);
}
else
{
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 495c52c98a26..7489e2c5edc6 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: moduldlg.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: tbe $ $Date: 2001-12-18 11:26:25 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:50:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -927,9 +927,11 @@ void ObjectPage::NewModule()
}
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
- SvLBoxEntry* pEntry = aBasicBox.InsertEntry( aModName, aBasicBox.GetImage( IMGID_MODULE ), aBasicBox.GetImage( IMGID_MODULE ), pLibEntry, FALSE, LIST_APPEND );
+ SvLBoxEntry * pEntry = aBasicBox.insertEntry(
+ aModName, IMGID_MODULE, pLibEntry, false,
+ std::auto_ptr< BasicEntry >(new BasicEntry(
+ OBJTYPE_MODULE)));
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_MODULE ) );
aBasicBox.SetCurEntry( pEntry );
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
}
@@ -981,9 +983,11 @@ void ObjectPage::NewDialog()
}
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
- SvLBoxEntry* pEntry = aBasicBox.InsertEntry( aDlgName, aBasicBox.GetImage( IMGID_OBJECT ), aBasicBox.GetImage( IMGID_OBJECT ), pLibEntry, FALSE, LIST_APPEND );
+ SvLBoxEntry * pEntry = aBasicBox.insertEntry(
+ aDlgName, IMGID_OBJECT, pLibEntry, false,
+ std::auto_ptr< BasicEntry >(new BasicEntry(
+ OBJTYPE_OBJECT)));
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
- pEntry->SetUserData( new BasicEntry( OBJTYPE_OBJECT ) );
aBasicBox.SetCurEntry( pEntry );
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
}
diff --git a/basctl/source/basicide/moduldlg.hrc b/basctl/source/basicide/moduldlg.hrc
index 03fb5beae56d..2566c5909d4f 100644
--- a/basctl/source/basicide/moduldlg.hrc
+++ b/basctl/source/basicide/moduldlg.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: moduldlg.hrc,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: tbe $ $Date: 2001-11-14 22:45:02 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:50:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,13 +94,4 @@
#define RID_ED_LIBNAME 41
#define RID_CHKB_EXTRAFILE 42
-
-// Bitmaps fuer CheckBox
-#define CHKBTN_UNCHECKED 1
-#define CHKBTN_CHECKED 2
-#define CHKBTN_HICHECKED 3
-#define CHKBTN_HIUNCHECKED 4
-#define CHKBTN_TRISTATE 5
-#define CHKBTN_HITRISTATE 6
-
#endif // _MODULDLG_HRC
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 9fc3998b0c43..b7e96a1b7b7a 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: moduldlg.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: tbe $ $Date: 2001-12-11 17:32:03 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:50:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -181,29 +181,6 @@ public:
USHORT GetMode() const { return nMode; }
};
-
-class BasicCheckBoxBitmaps : public Resource
-{
-private:
- const Bitmap aUncheckedBmp;
- const Bitmap aCheckedBmp;
- const Bitmap aHiCheckedBmp;
- const Bitmap aHiUncheckedBmp;
- const Bitmap aTriStateBmp;
- const Bitmap aHiTriStateBmp;
-
-public:
- BasicCheckBoxBitmaps();
-
- const Bitmap& GetUncheckedBmp () const { return aUncheckedBmp; }
- const Bitmap& GetCheckedBmp () const { return aCheckedBmp; }
- const Bitmap& GetHiCheckedBmp () const { return aHiCheckedBmp; }
- const Bitmap& GetHiUncheckedBmp () const { return aHiUncheckedBmp; }
- const Bitmap& GetTriStateBmp () const { return aTriStateBmp; }
- const Bitmap& GetHiTriStateBmp () const { return aHiTriStateBmp; }
-};
-
-
class LibDialog: public ModalDialog
{
private:
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 3fbc5f8a70f1..309adb10aa90 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objdlg.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: tbe $ $Date: 2002-04-25 09:34:09 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:53:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -160,7 +160,7 @@ ObjectCatalog::ObjectCatalog( Window * pParent )
// aShowButton( this, IDEResId( RID_PB_SHOW ) ),
// aOptionButton( this, IDEResId( RID_PB_OPTIONS ) ),
// aLittleHelp( this, IDEResId( RID_PB_LITTLEHELP ) ),
- aToolBox( this, IDEResId( RID_TB_TOOLBOX ) ),
+ aToolBox(this, IDEResId(RID_TB_TOOLBOX), IDEResId(RID_IMGLST_TB_HC)),
aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) )
{
FreeResource();
@@ -424,3 +424,33 @@ void ObjectCatalog::UpdateEntries()
aMacroTreeList.UpdateEntries();
}
+ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl(
+ Window * pParent, ResId const & rResId,
+ ResId const & rImagesHighContrastId):
+ ToolBox(pParent, rResId),
+ m_aImagesNormal(GetImageList()),
+ m_aImagesHighContrast(rImagesHighContrastId),
+ m_bHighContrast(false)
+{
+ setImages();
+}
+
+// virtual
+void ObjectCatalogToolBox_Impl::DataChanged(DataChangedEvent const & rDCEvt)
+{
+ ToolBox::DataChanged(rDCEvt);
+ if (rDCEvt.GetType() == DATACHANGED_SETTINGS
+ || (rDCEvt.GetType() == DATACHANGED_DISPLAY
+ && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0))
+ setImages();
+}
+
+void ObjectCatalogToolBox_Impl::setImages()
+{
+ bool bHC = GetDisplayBackground().GetColor().IsDark();
+ if (bHC != m_bHighContrast)
+ {
+ SetImageList(bHC ? m_aImagesHighContrast : m_aImagesNormal);
+ m_bHighContrast = bHC;
+ }
+}
diff --git a/basctl/source/basicide/objdlg.hrc b/basctl/source/basicide/objdlg.hrc
index a50f4cda7d23..f5d8b5d0bb5d 100644
--- a/basctl/source/basicide/objdlg.hrc
+++ b/basctl/source/basicide/objdlg.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: objdlg.hrc,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mh $ $Date: 2000-09-29 11:02:37 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:53:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,6 +65,7 @@
#define RID_BASICIDE_OBJCAT ( RID_BASICIDE_START + 70 )
#define RID_FT_MACRODESCR 8
+#define RID_IMGLST_TB_HC 9
#define RID_TLB_MACROS 10
#define RID_TB_TOOLBOX 11
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index a7eb68fc3c75..cb53f947a702 100644
--- a/basctl/source/basicide/objdlg.hxx
+++ b/basctl/source/basicide/objdlg.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objdlg.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: tbe $ $Date: 2002-04-25 09:32:57 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:53:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,10 @@
#include <vcl/fixed.hxx>
#endif
+#ifndef _SV_IMAGE_HXX
+#include "vcl/image.hxx"
+#endif
+
#include <bastype2.hxx>
class StarBASIC;
@@ -94,11 +98,27 @@ public:
~ObjectTreeListBox();
};
+class ObjectCatalogToolBox_Impl: public ToolBox
+{
+public:
+ ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId,
+ ResId const & rImagesHighContrastId);
+
+private:
+ virtual void DataChanged(DataChangedEvent const & rDCEvt);
+
+ void setImages();
+
+ ImageList m_aImagesNormal;
+ ImageList m_aImagesHighContrast;
+ bool m_bHighContrast;
+};
+
class ObjectCatalog : public FloatingWindow
{
private:
ObjectTreeListBox aMacroTreeList;
- ToolBox aToolBox;
+ ObjectCatalogToolBox_Impl aToolBox;
FixedText aMacroDescr;
Link aCancelHdl;
diff --git a/basctl/source/basicide/objdlg.src b/basctl/source/basicide/objdlg.src
index 12aa344bb0e8..c20ad4ace822 100644
--- a/basctl/source/basicide/objdlg.src
+++ b/basctl/source/basicide/objdlg.src
@@ -2,9 +2,9 @@
*
* $RCSfile: objdlg.src,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: kz $ $Date: 2002-04-29 20:26:55 $
+ * last change: $Author: sb $ $Date: 2002-07-03 15:53:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -247,6 +247,15 @@ FloatingWindow RID_BASICIDE_OBJCAT
*/
};
};
+ ImageList RID_IMGLST_TB_HC
+ {
+ ImageBitmap = Bitmap { FILE = "imh_ges3.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
+ IdList =
+ {
+ TBITEM_SHOW ;
+ };
+ };
FixedText RID_FT_MACRODESCR
{
WordBreak = TRUE ;
@@ -265,11 +274,3 @@ FloatingWindow RID_BASICIDE_OBJCAT
Text[ catalan ] = "Objectes";
Text[ thai ] = "วัตถุ";
};
-
-
-
-
-
-
-
-