#99748# #99750# #99752# #99753# Enabled high contrast mode for various BASIC IDE controls.
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: baside2.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -1388,7 +1388,8 @@ ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
|
|||||||
aStackWindow( this ),
|
aStackWindow( this ),
|
||||||
aVSplitter( this, WinBits( WB_VSCROLL ) ),
|
aVSplitter( this, WinBits( WB_VSCROLL ) ),
|
||||||
aHSplitter( this, WinBits( WB_HSCROLL ) ),
|
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;
|
pModulWindow = 0;
|
||||||
bVSplitted = FALSE;
|
bVSplitted = FALSE;
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: baside2.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -480,7 +480,8 @@ private:
|
|||||||
// BOOL bDoSyntaxHighlight;
|
// BOOL bDoSyntaxHighlight;
|
||||||
Color aSyntaxColors[10];
|
Color aSyntaxColors[10];
|
||||||
|
|
||||||
ImageList aImages;
|
ImageList m_aImagesNormal;
|
||||||
|
ImageList m_aImagesHighContrast;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Resize();
|
virtual void Resize();
|
||||||
@@ -501,7 +502,7 @@ public:
|
|||||||
|
|
||||||
Color* GetSyntaxColors() { return aSyntaxColors; }
|
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; }
|
// BOOL DoHighlight() const { return bDoSyntaxHighlight; }
|
||||||
// void SetHighlightMode( BOOL bHighlight )
|
// void SetHighlightMode( BOOL bHighlight )
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: baside2b.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -1327,6 +1327,8 @@ WatchWindow::WatchWindow( Window* pParent ) :
|
|||||||
aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) );
|
aXEdit.GetAccelerator().InsertItem( 2, KeyCode( KEY_ESCAPE ) );
|
||||||
aXEdit.Show();
|
aXEdit.Show();
|
||||||
|
|
||||||
|
aRemoveWatchButton.SetModeImage(Image(IDEResId(RID_IMG_REMOVEWATCH_HC)),
|
||||||
|
BMP_COLOR_HIGHCONTRAST);
|
||||||
aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) );
|
aRemoveWatchButton.SetClickHdl( LINK( this, WatchWindow, ButtonHdl ) );
|
||||||
aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) );
|
aRemoveWatchButton.SetPosPixel( Point( nTextLen + aXEdit.GetSizePixel().Width() + 4, 2 ) );
|
||||||
Size aSz( aRemoveWatchButton.GetImage().GetSizePixel() );
|
Size aSz( aRemoveWatchButton.GetImage().GetSizePixel() );
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: bastype2.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -59,6 +59,9 @@
|
|||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "vcl/bitmap.hxx"
|
||||||
|
|
||||||
#include <ide_pch.hxx>
|
#include <ide_pch.hxx>
|
||||||
|
|
||||||
@@ -88,7 +91,8 @@ using namespace ::com::sun::star;
|
|||||||
|
|
||||||
BasicTreeListBox::BasicTreeListBox( Window* pParent, const ResId& rRes ) :
|
BasicTreeListBox::BasicTreeListBox( Window* pParent, const ResId& rRes ) :
|
||||||
SvTreeListBox( pParent, IDEResId( rRes.GetId() ) ),
|
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 );
|
SetSelectionMode( SINGLE_SELECTION );
|
||||||
nMode = 0xFF; // Alles
|
nMode = 0xFF; // Alles
|
||||||
@@ -122,11 +126,12 @@ void BasicTreeListBox::ScanBasic( BasicManager* pBasMgr, const String& rName )
|
|||||||
// create tree list box entry
|
// create tree list box entry
|
||||||
SvLBoxEntry* pBasicManagerRootEntry = FindEntry( 0, rName, OBJTYPE_BASICMANAGER );
|
SvLBoxEntry* pBasicManagerRootEntry = FindEntry( 0, rName, OBJTYPE_BASICMANAGER );
|
||||||
if ( !pBasicManagerRootEntry )
|
if ( !pBasicManagerRootEntry )
|
||||||
{
|
pBasicManagerRootEntry = insertEntry(
|
||||||
Image aImage( aImages.GetImage( ( pBasMgr == SFX_APP()->GetBasicManager() ) ? IMGID_APPICON : IMGID_DOCUMENT ) );
|
rName,
|
||||||
pBasicManagerRootEntry = InsertEntry( rName, aImage, aImage, 0, FALSE, LIST_APPEND );
|
pBasMgr == SFX_APP()->GetBasicManager()
|
||||||
pBasicManagerRootEntry->SetUserData( new BasicManagerEntry( pBasMgr ) );
|
? IMGID_APPICON : IMGID_DOCUMENT,
|
||||||
}
|
0, false,
|
||||||
|
std::auto_ptr< BasicEntry >(new BasicManagerEntry(pBasMgr)));
|
||||||
|
|
||||||
// level 2: libraries (Standard, ...)
|
// level 2: libraries (Standard, ...)
|
||||||
|
|
||||||
@@ -167,12 +172,10 @@ void BasicTreeListBox::ScanBasic( BasicManager* pBasMgr, const String& rName )
|
|||||||
// create a tree list box entry
|
// create a tree list box entry
|
||||||
SvLBoxEntry* pLibRootEntry = FindEntry( pBasicManagerRootEntry, aLibName, OBJTYPE_LIB );
|
SvLBoxEntry* pLibRootEntry = FindEntry( pBasicManagerRootEntry, aLibName, OBJTYPE_LIB );
|
||||||
if ( !pLibRootEntry )
|
if ( !pLibRootEntry )
|
||||||
{
|
pLibRootEntry = insertEntry(
|
||||||
Image aImage( aImages.GetImage( bLoaded ? IMGID_LIB : IMGID_LIBNOTLOADED ) );
|
aLibName, bLoaded ? IMGID_LIB : IMGID_LIBNOTLOADED,
|
||||||
pLibRootEntry = InsertEntry( aLibName, aImage, aImage,
|
pBasicManagerRootEntry, !bLoaded,
|
||||||
pBasicManagerRootEntry, bLoaded ? FALSE : TRUE , LIST_APPEND );
|
std::auto_ptr< BasicEntry >(new BasicEntry(OBJTYPE_LIB)));
|
||||||
pLibRootEntry->SetUserData( new BasicEntry( OBJTYPE_LIB ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create the sub entries
|
// create the sub entries
|
||||||
if ( bLoaded )
|
if ( bLoaded )
|
||||||
@@ -195,8 +198,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Image aModImage( aImages.GetImage( IMGID_MODULE ) );
|
|
||||||
|
|
||||||
// get a sorted list of module names
|
// get a sorted list of module names
|
||||||
Sequence< ::rtl::OUString > aModNames = BasicIDE::GetModuleNames( pShell, rLibName );
|
Sequence< ::rtl::OUString > aModNames = BasicIDE::GetModuleNames( pShell, rLibName );
|
||||||
sal_Int32 nModCount = aModNames.getLength();
|
sal_Int32 nModCount = aModNames.getLength();
|
||||||
@@ -207,10 +208,10 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
|
|||||||
String aModName = pModNames[ i ];
|
String aModName = pModNames[ i ];
|
||||||
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJTYPE_MODULE );
|
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJTYPE_MODULE );
|
||||||
if ( !pModuleEntry )
|
if ( !pModuleEntry )
|
||||||
{
|
pModuleEntry = insertEntry(
|
||||||
pModuleEntry = InsertEntry( aModName, aModImage, aModImage, pLibRootEntry, FALSE, LIST_APPEND );
|
aModName, IMGID_MODULE, pLibRootEntry, false,
|
||||||
pModuleEntry->SetUserData( new BasicEntry( OBJTYPE_MODULE ) );
|
std::auto_ptr< BasicEntry >(
|
||||||
}
|
new BasicEntry(OBJTYPE_MODULE)));
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
if ( nMode & BROWSEMODE_SUBS )
|
if ( nMode & BROWSEMODE_SUBS )
|
||||||
@@ -219,16 +220,16 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
|
|||||||
sal_Int32 nCount = aNames.getLength();
|
sal_Int32 nCount = aNames.getLength();
|
||||||
const ::rtl::OUString* pNames = aNames.getConstArray();
|
const ::rtl::OUString* pNames = aNames.getConstArray();
|
||||||
|
|
||||||
Image aImage( aImages.GetImage( IMGID_MACRO ) );
|
|
||||||
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
|
||||||
{
|
{
|
||||||
String aName = pNames[ j ];
|
String aName = pNames[ j ];
|
||||||
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJTYPE_METHOD );
|
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJTYPE_METHOD );
|
||||||
if ( !pEntry )
|
if ( !pEntry )
|
||||||
{
|
pEntry = insertEntry(
|
||||||
pEntry = InsertEntry( aName, aImage, aImage, pModuleEntry, FALSE, LIST_APPEND );
|
aName, IMGID_MACRO, pModuleEntry,
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_METHOD ) );
|
false,
|
||||||
}
|
std::auto_ptr< BasicEntry >(
|
||||||
|
new BasicEntry(OBJTYPE_METHOD)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -250,8 +251,6 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Image aDlgImage( aImages.GetImage( IMGID_OBJECT ) );
|
|
||||||
|
|
||||||
// get a sorted list of dialog names
|
// get a sorted list of dialog names
|
||||||
Sequence< ::rtl::OUString > aDlgNames = BasicIDE::GetDialogNames( pShell, rLibName );
|
Sequence< ::rtl::OUString > aDlgNames = BasicIDE::GetDialogNames( pShell, rLibName );
|
||||||
sal_Int32 nDlgCount = aDlgNames.getLength();
|
sal_Int32 nDlgCount = aDlgNames.getLength();
|
||||||
@@ -262,10 +261,10 @@ void BasicTreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, SfxOb
|
|||||||
String aDlgName = pDlgNames[ i ];
|
String aDlgName = pDlgNames[ i ];
|
||||||
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJTYPE_OBJECT );
|
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJTYPE_OBJECT );
|
||||||
if ( !pDialogEntry )
|
if ( !pDialogEntry )
|
||||||
{
|
pDialogEntry = insertEntry(
|
||||||
pDialogEntry = InsertEntry( aDlgName, aDlgImage, aDlgImage, pLibRootEntry, TRUE, LIST_APPEND );
|
aDlgName, IMGID_OBJECT, pLibRootEntry, true,
|
||||||
pDialogEntry->SetUserData( new BasicEntry( OBJTYPE_OBJECT ) );
|
std::auto_ptr< BasicEntry >(
|
||||||
}
|
new BasicEntry(OBJTYPE_OBJECT)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( container::NoSuchElementException& e )
|
catch ( container::NoSuchElementException& e )
|
||||||
@@ -330,8 +329,9 @@ void BasicTreeListBox::ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry )
|
|||||||
{
|
{
|
||||||
SbMethod* pMethod= (SbMethod*) pObj->GetMethods()->Get( nMethod );
|
SbMethod* pMethod= (SbMethod*) pObj->GetMethods()->Get( nMethod );
|
||||||
DBG_ASSERT( pMethod , "Methode nicht gefunden! (NULL)" );
|
DBG_ASSERT( pMethod , "Methode nicht gefunden! (NULL)" );
|
||||||
SvLBoxEntry* pEntry = InsertEntry( pMethod->GetName(), aImages.GetImage( IMGID_MACRO ), aImages.GetImage( IMGID_MACRO ), pObjEntry, FALSE, LIST_APPEND );
|
insertEntry(pMethod->GetName(), IMGID_MACRO, pObjEntry, false,
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_METHODINOBJ ) );
|
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 );
|
SbxVariable* pVar = pObj->GetProperties()->Get( nProp );
|
||||||
DBG_ASSERT( pVar, "Property nicht gefunden! (NULL)" );
|
DBG_ASSERT( pVar, "Property nicht gefunden! (NULL)" );
|
||||||
SvLBoxEntry* pEntry = InsertEntry( pVar->GetName(), aImages.GetImage( IMGID_PROP ), aImages.GetImage( IMGID_PROP ), pObjEntry, FALSE, LIST_APPEND );
|
insertEntry(pVar->GetName(), IMGID_PROP, pObjEntry, false,
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_PROPERTY ) );
|
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 );
|
SbxVariable* pVar = pObj->GetObjects()->Get( nObject );
|
||||||
if ( pVar->GetClass() == SbxCLASS_OBJECT )
|
if ( pVar->GetClass() == SbxCLASS_OBJECT )
|
||||||
{
|
|
||||||
// SubObjecte erhalten ChildsOnDemand und koennen
|
// SubObjecte erhalten ChildsOnDemand und koennen
|
||||||
// jederzeit weiter aufgeklappt werden...
|
// jederzeit weiter aufgeklappt werden...
|
||||||
SvLBoxEntry* pEntry = InsertEntry( pVar->GetName(), aImages.GetImage( IMGID_SUBOBJ ), aImages.GetImage( IMGID_SUBOBJ ), pObjEntry, TRUE, LIST_APPEND );
|
insertEntry(pVar->GetName(), IMGID_SUBOBJ, pObjEntry, true,
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_SUBOBJ ) );
|
std::auto_ptr< BasicEntry >(
|
||||||
}
|
new BasicEntry(OBJTYPE_SUBOBJ)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,3 +447,26 @@ BOOL BasicTreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
|
|||||||
return bProtected;
|
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);
|
||||||
|
}
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: bastype2.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -61,6 +61,12 @@
|
|||||||
#ifndef _BASTYPE2_HXX
|
#ifndef _BASTYPE2_HXX
|
||||||
#define _BASTYPE2_HXX
|
#define _BASTYPE2_HXX
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#ifndef _SOLAR_H
|
||||||
|
#include "tools/solar.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _SVICNVW_HXX
|
#define _SVICNVW_HXX
|
||||||
#ifndef _SVTREEBOX_HXX //autogen
|
#ifndef _SVTREEBOX_HXX //autogen
|
||||||
#include <svtools/svtreebx.hxx>
|
#include <svtools/svtreebx.hxx>
|
||||||
@@ -87,22 +93,26 @@
|
|||||||
#define BROWSEMODE_PROPS 0x08
|
#define BROWSEMODE_PROPS 0x08
|
||||||
#define BROWSEMODE_SUBOBJS 0x10
|
#define BROWSEMODE_SUBOBJS 0x10
|
||||||
|
|
||||||
|
class BasicEntry;
|
||||||
class BasicManager;
|
class BasicManager;
|
||||||
class SbMethod;
|
class SbMethod;
|
||||||
class SbxObject;
|
class SbxObject;
|
||||||
class SbModule;
|
class SbModule;
|
||||||
class SvLBoxEntry;
|
class SvLBoxEntry;
|
||||||
class SbxVariable;
|
class SbxVariable;
|
||||||
|
class String;
|
||||||
|
|
||||||
class BasicTreeListBox : public SvTreeListBox
|
class BasicTreeListBox : public SvTreeListBox
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
USHORT nMode;
|
USHORT nMode;
|
||||||
ImageList aImages;
|
ImageList m_aImagesNormal;
|
||||||
|
ImageList m_aImagesHighContrast;
|
||||||
|
|
||||||
void ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry );
|
void ScanSbxObject( SbxObject* pObj, SvLBoxEntry* pObjEntry );
|
||||||
|
|
||||||
|
void setEntryBitmap(SvLBoxEntry * pEntry, USHORT nBitmap);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ExpandTree( SvLBoxEntry* pRootEntry );
|
void ExpandTree( SvLBoxEntry* pRootEntry );
|
||||||
virtual void RequestingChilds( SvLBoxEntry* pParent );
|
virtual void RequestingChilds( SvLBoxEntry* pParent );
|
||||||
@@ -132,8 +142,6 @@ public:
|
|||||||
void SetMode( USHORT nM ) { nMode = nM; }
|
void SetMode( USHORT nM ) { nMode = nM; }
|
||||||
USHORT GetMode() const { return nMode; }
|
USHORT GetMode() const { return nMode; }
|
||||||
|
|
||||||
Image GetImage( USHORT nId ) { return aImages.GetImage( nId ); }
|
|
||||||
|
|
||||||
SbMethod* FindMethod( SvLBoxEntry* pEntry );
|
SbMethod* FindMethod( SvLBoxEntry* pEntry );
|
||||||
SbxObject* FindObject( SvLBoxEntry* pEntry );
|
SbxObject* FindObject( SvLBoxEntry* pEntry );
|
||||||
SbModule* FindModule( SvLBoxEntry* pEntry );
|
SbModule* FindModule( SvLBoxEntry* pEntry );
|
||||||
@@ -142,6 +150,11 @@ public:
|
|||||||
|
|
||||||
// new dialogs
|
// new dialogs
|
||||||
SbxItem GetSbxItem( SvLBoxEntry* pEntry );
|
SbxItem GetSbxItem( SvLBoxEntry* pEntry );
|
||||||
|
|
||||||
|
SvLBoxEntry * insertEntry(String const & rText, USHORT nBitmap,
|
||||||
|
SvLBoxEntry * pParent,
|
||||||
|
bool bChildrenOnDemand,
|
||||||
|
std::auto_ptr< BasicEntry > aUserData);
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************
|
/****************************************
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: bastype3.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -161,9 +161,7 @@ void __EXPORT BasicTreeListBox::RequestingChilds( SvLBoxEntry* pEntry )
|
|||||||
ImpCreateLibSubEntries( pEntry, pShell, aLibName );
|
ImpCreateLibSubEntries( pEntry, pShell, aLibName );
|
||||||
|
|
||||||
// exchange image
|
// exchange image
|
||||||
Image aImage( aImages.GetImage( IMGID_LIB ) );
|
setEntryBitmap(pEntry, IMGID_LIB);
|
||||||
SetExpandedEntryBmp( pEntry, aImage );
|
|
||||||
SetCollapsedEntryBmp( pEntry, aImage );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: moduldlg.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -927,9 +927,11 @@ void ObjectPage::NewModule()
|
|||||||
}
|
}
|
||||||
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
|
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
|
||||||
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
|
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!" );
|
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_MODULE ) );
|
|
||||||
aBasicBox.SetCurEntry( pEntry );
|
aBasicBox.SetCurEntry( pEntry );
|
||||||
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
|
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
|
||||||
}
|
}
|
||||||
@@ -981,9 +983,11 @@ void ObjectPage::NewDialog()
|
|||||||
}
|
}
|
||||||
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
|
SvLBoxEntry* pLibEntry = aBasicBox.FindLibEntry( pLib );
|
||||||
DBG_ASSERT( pLibEntry, "Libeintrag nicht gefunden!" );
|
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!" );
|
DBG_ASSERT( pEntry, "InsertEntry fehlgeschlagen!" );
|
||||||
pEntry->SetUserData( new BasicEntry( OBJTYPE_OBJECT ) );
|
|
||||||
aBasicBox.SetCurEntry( pEntry );
|
aBasicBox.SetCurEntry( pEntry );
|
||||||
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
|
aBasicBox.Select( aBasicBox.GetCurEntry() ); // OV-Bug?!
|
||||||
}
|
}
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: moduldlg.hrc,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -94,13 +94,4 @@
|
|||||||
#define RID_ED_LIBNAME 41
|
#define RID_ED_LIBNAME 41
|
||||||
#define RID_CHKB_EXTRAFILE 42
|
#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
|
#endif // _MODULDLG_HRC
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: moduldlg.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -181,29 +181,6 @@ public:
|
|||||||
USHORT GetMode() const { return nMode; }
|
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
|
class LibDialog: public ModalDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: objdlg.cxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -160,7 +160,7 @@ ObjectCatalog::ObjectCatalog( Window * pParent )
|
|||||||
// aShowButton( this, IDEResId( RID_PB_SHOW ) ),
|
// aShowButton( this, IDEResId( RID_PB_SHOW ) ),
|
||||||
// aOptionButton( this, IDEResId( RID_PB_OPTIONS ) ),
|
// aOptionButton( this, IDEResId( RID_PB_OPTIONS ) ),
|
||||||
// aLittleHelp( this, IDEResId( RID_PB_LITTLEHELP ) ),
|
// 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 ) )
|
aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) )
|
||||||
{
|
{
|
||||||
FreeResource();
|
FreeResource();
|
||||||
@@ -424,3 +424,33 @@ void ObjectCatalog::UpdateEntries()
|
|||||||
aMacroTreeList.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: objdlg.hrc,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
|
|
||||||
#define RID_BASICIDE_OBJCAT ( RID_BASICIDE_START + 70 )
|
#define RID_BASICIDE_OBJCAT ( RID_BASICIDE_START + 70 )
|
||||||
#define RID_FT_MACRODESCR 8
|
#define RID_FT_MACRODESCR 8
|
||||||
|
#define RID_IMGLST_TB_HC 9
|
||||||
#define RID_TLB_MACROS 10
|
#define RID_TLB_MACROS 10
|
||||||
#define RID_TB_TOOLBOX 11
|
#define RID_TB_TOOLBOX 11
|
||||||
|
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: objdlg.hxx,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -78,6 +78,10 @@
|
|||||||
#include <vcl/fixed.hxx>
|
#include <vcl/fixed.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SV_IMAGE_HXX
|
||||||
|
#include "vcl/image.hxx"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <bastype2.hxx>
|
#include <bastype2.hxx>
|
||||||
|
|
||||||
class StarBASIC;
|
class StarBASIC;
|
||||||
@@ -94,11 +98,27 @@ public:
|
|||||||
~ObjectTreeListBox();
|
~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
|
class ObjectCatalog : public FloatingWindow
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ObjectTreeListBox aMacroTreeList;
|
ObjectTreeListBox aMacroTreeList;
|
||||||
ToolBox aToolBox;
|
ObjectCatalogToolBox_Impl aToolBox;
|
||||||
FixedText aMacroDescr;
|
FixedText aMacroDescr;
|
||||||
Link aCancelHdl;
|
Link aCancelHdl;
|
||||||
|
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: objdlg.src,v $
|
* $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
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* 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
|
FixedText RID_FT_MACRODESCR
|
||||||
{
|
{
|
||||||
WordBreak = TRUE ;
|
WordBreak = TRUE ;
|
||||||
@@ -265,11 +274,3 @@ FloatingWindow RID_BASICIDE_OBJCAT
|
|||||||
Text[ catalan ] = "Objectes";
|
Text[ catalan ] = "Objectes";
|
||||||
Text[ thai ] = "วัตถุ";
|
Text[ thai ] = "วัตถุ";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user