summaryrefslogtreecommitdiff
path: root/svtools/inc/svtools/svlbitm.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/inc/svtools/svlbitm.hxx')
-rw-r--r--svtools/inc/svtools/svlbitm.hxx182
1 files changed, 91 insertions, 91 deletions
diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx
index f84c457abc4d..bdc2e2e78d01 100644
--- a/svtools/inc/svtools/svlbitm.hxx
+++ b/svtools/inc/svtools/svlbitm.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,19 +39,19 @@
class SvLBoxEntry;
-#define SV_ITEM_ID_LBOXSTRING 1
-#define SV_ITEM_ID_LBOXBMP 2
-#define SV_ITEM_ID_LBOXBUTTON 3
-#define SV_ITEM_ID_LBOXCONTEXTBMP 4
+#define SV_ITEM_ID_LBOXSTRING 1
+#define SV_ITEM_ID_LBOXBMP 2
+#define SV_ITEM_ID_LBOXBUTTON 3
+#define SV_ITEM_ID_LBOXCONTEXTBMP 4
enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE };
-#define SV_BMP_UNCHECKED 0
-#define SV_BMP_CHECKED 1
-#define SV_BMP_TRISTATE 2
-#define SV_BMP_HIUNCHECKED 3
-#define SV_BMP_HICHECKED 4
-#define SV_BMP_HITRISTATE 5
+#define SV_BMP_UNCHECKED 0
+#define SV_BMP_CHECKED 1
+#define SV_BMP_TRISTATE 2
+#define SV_BMP_HIUNCHECKED 3
+#define SV_BMP_HICHECKED 4
+#define SV_BMP_HITRISTATE 5
#define SV_BMP_STATICIMAGE 6
struct SvLBoxButtonData_Impl;
@@ -59,15 +59,15 @@ struct SvLBoxButtonData_Impl;
class SVT_DLLPUBLIC SvLBoxButtonData
{
private:
- Link aLink;
- long nWidth;
- long nHeight;
- SvLBoxButtonData_Impl* pImpl;
- BOOL bDataOk;
- SvButtonState eState;
-
- SVT_DLLPRIVATE void SetWidthAndHeight();
- SVT_DLLPRIVATE void InitData( BOOL bImagesFromDefault,
+ Link aLink;
+ long nWidth;
+ long nHeight;
+ SvLBoxButtonData_Impl* pImpl;
+ BOOL bDataOk;
+ SvButtonState eState;
+
+ SVT_DLLPRIVATE void SetWidthAndHeight();
+ SVT_DLLPRIVATE void InitData( BOOL bImagesFromDefault,
bool _bRadioBtn, const Control* pControlForSettings = NULL );
public:
// include creating default images (CheckBox or RadioButton)
@@ -77,27 +77,27 @@ public:
SvLBoxButtonData();
~SvLBoxButtonData();
- USHORT GetIndex( USHORT nItemState );
- inline long Width();
- inline long Height();
- void SetLink( const Link& rLink) { aLink=rLink; }
- const Link& GetLink() const { return aLink; }
- BOOL IsRadio();
+ USHORT GetIndex( USHORT nItemState );
+ inline long Width();
+ inline long Height();
+ void SetLink( const Link& rLink) { aLink=rLink; }
+ const Link& GetLink() const { return aLink; }
+ BOOL IsRadio();
// weil Buttons nicht von LinkHdl abgeleitet sind
- void CallLink();
+ void CallLink();
- void StoreButtonState( SvLBoxEntry* pEntry, USHORT nItemFlags );
- SvButtonState ConvertToButtonState( USHORT nItemFlags ) const;
+ void StoreButtonState( SvLBoxEntry* pEntry, USHORT nItemFlags );
+ SvButtonState ConvertToButtonState( USHORT nItemFlags ) const;
- inline SvButtonState GetActButtonState() const;
- SvLBoxEntry* GetActEntry() const;
+ inline SvButtonState GetActButtonState() const;
+ SvLBoxEntry* GetActEntry() const;
Image aBmps[24]; // Indizes siehe Konstanten BMP_ ....
- void SetDefaultImages( const Control* pControlForSettings = NULL );
+ void SetDefaultImages( const Control* pControlForSettings = NULL );
// set images acording to the color scheeme of the Control
// pControlForSettings == NULL: settings are taken from Application
- BOOL HasDefaultImages( void ) const;
+ BOOL HasDefaultImages( void ) const;
};
inline long SvLBoxButtonData::Width()
@@ -127,14 +127,14 @@ class SVT_DLLPUBLIC SvLBoxString : public SvLBoxItem
public:
SvLBoxString( SvLBoxEntry*,USHORT nFlags,const XubString& rStr);
SvLBoxString();
- virtual ~SvLBoxString();
- virtual USHORT IsA();
- void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- XubString GetText() const { return aStr; }
- void SetText( SvLBoxEntry*, const XubString& rStr );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
- SvLBoxItem* Create() const;
- void Clone( SvLBoxItem* pSource );
+ virtual ~SvLBoxString();
+ virtual USHORT IsA();
+ void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
+ XubString GetText() const { return aStr; }
+ void SetText( SvLBoxEntry*, const XubString& rStr );
+ void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ SvLBoxItem* Create() const;
+ void Clone( SvLBoxItem* pSource );
};
class SvLBoxBmp : public SvLBoxItem
@@ -143,20 +143,20 @@ class SvLBoxBmp : public SvLBoxItem
public:
SvLBoxBmp( SvLBoxEntry*, USHORT nFlags, Image );
SvLBoxBmp();
- virtual ~SvLBoxBmp();
- virtual USHORT IsA();
- void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void SetBitmap( SvLBoxEntry*, Image );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
- SvLBoxItem* Create() const;
- void Clone( SvLBoxItem* pSource );
+ virtual ~SvLBoxBmp();
+ virtual USHORT IsA();
+ void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
+ void SetBitmap( SvLBoxEntry*, Image );
+ void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ SvLBoxItem* Create() const;
+ void Clone( SvLBoxItem* pSource );
};
-#define SV_ITEMSTATE_UNCHECKED 0x0001
-#define SV_ITEMSTATE_CHECKED 0x0002
-#define SV_ITEMSTATE_TRISTATE 0x0004
-#define SV_ITEMSTATE_HILIGHTED 0x0008
+#define SV_ITEMSTATE_UNCHECKED 0x0001
+#define SV_ITEMSTATE_CHECKED 0x0002
+#define SV_ITEMSTATE_TRISTATE 0x0004
+#define SV_ITEMSTATE_HILIGHTED 0x0008
#define SV_STATE_MASK 0xFFF8 // zum Loeschen von UNCHECKED,CHECKED,TRISTATE
enum SvLBoxButtonKind
@@ -168,7 +168,7 @@ enum SvLBoxButtonKind
class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem
{
- SvLBoxButtonData* pData;
+ SvLBoxButtonData* pData;
SvLBoxButtonKind eKind;
USHORT nItemFlags;
USHORT nImgArrOffs;
@@ -183,45 +183,45 @@ public:
SvLBoxButtonKind eTheKind, USHORT nFlags,
SvLBoxButtonData* pBData );
SvLBoxButton();
- virtual ~SvLBoxButton();
- void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- virtual USHORT IsA();
- void Check( SvLBox* pView, SvLBoxEntry*, BOOL bCheck );
- virtual BOOL ClickHdl(SvLBox* pView, SvLBoxEntry* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
- SvLBoxItem* Create() const;
- void Clone( SvLBoxItem* pSource );
- USHORT GetButtonFlags() const { return nItemFlags; }
- BOOL IsStateChecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
- BOOL IsStateUnchecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
- BOOL IsStateTristate() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
- BOOL IsStateHilighted() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
- void SetStateChecked();
- void SetStateUnchecked();
- void SetStateTristate();
- void SetStateHilighted( BOOL bHilight );
+ virtual ~SvLBoxButton();
+ void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
+ virtual USHORT IsA();
+ void Check( SvLBox* pView, SvLBoxEntry*, BOOL bCheck );
+ virtual BOOL ClickHdl(SvLBox* pView, SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ SvLBoxItem* Create() const;
+ void Clone( SvLBoxItem* pSource );
+ USHORT GetButtonFlags() const { return nItemFlags; }
+ BOOL IsStateChecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
+ BOOL IsStateUnchecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
+ BOOL IsStateTristate() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
+ BOOL IsStateHilighted() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
+ void SetStateChecked();
+ void SetStateUnchecked();
+ void SetStateTristate();
+ void SetStateHilighted( BOOL bHilight );
SvLBoxButtonKind GetKind() const { return eKind; }
- void SetBaseOffs( USHORT nOffs ) { nBaseOffs = nOffs; }
- USHORT GetBaseOffs() const { return nBaseOffs; }
+ void SetBaseOffs( USHORT nOffs ) { nBaseOffs = nOffs; }
+ USHORT GetBaseOffs() const { return nBaseOffs; }
// Check whether this button can be modified via UI, sounding a beep if it
// cannot be modified:
bool CheckModification() const;
};
-inline void SvLBoxButton::SetStateChecked()
+inline void SvLBoxButton::SetStateChecked()
{
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_CHECKED;
}
-inline void SvLBoxButton::SetStateUnchecked()
+inline void SvLBoxButton::SetStateUnchecked()
{
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_UNCHECKED;
}
-inline void SvLBoxButton::SetStateTristate()
+inline void SvLBoxButton::SetStateTristate()
{
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_TRISTATE;
@@ -238,26 +238,26 @@ inline void SvLBoxButton::SetStateHilighted( BOOL bHilight )
struct SvLBoxContextBmp_Impl;
class SVT_DLLPUBLIC SvLBoxContextBmp : public SvLBoxItem
{
- SvLBoxContextBmp_Impl* m_pImpl;
+ SvLBoxContextBmp_Impl* m_pImpl;
public:
SvLBoxContextBmp( SvLBoxEntry*,USHORT nFlags,Image,Image,
USHORT nEntryFlagsBmp1);
SvLBoxContextBmp();
- virtual ~SvLBoxContextBmp();
- virtual USHORT IsA();
- void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
- SvLBoxItem* Create() const;
- void Clone( SvLBoxItem* pSource );
+ virtual ~SvLBoxContextBmp();
+ virtual USHORT IsA();
+ void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
+ void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ SvLBoxItem* Create() const;
+ void Clone( SvLBoxItem* pSource );
- BOOL SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
- void GetModeImages( Image& _rBitmap1, Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+ void GetModeImages( Image& _rBitmap1, Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
- inline void SetBitmap1( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
- inline void SetBitmap2( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
- inline const Image& GetBitmap1( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
- inline const Image& GetBitmap2( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+ inline void SetBitmap1( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+ inline void SetBitmap2( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+ inline const Image& GetBitmap1( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
+ inline const Image& GetBitmap2( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
private:
Image& implGetImageStore( sal_Bool _bFirst, BmpColorMode _eMode );
@@ -268,12 +268,12 @@ inline void SvLBoxContextBmp::SetBitmap1( const Image& _rImage, BmpColorMode _eM
implGetImageStore( sal_True, _eMode ) = _rImage;
}
-inline void SvLBoxContextBmp::SetBitmap2( const Image& _rImage, BmpColorMode _eMode )
+inline void SvLBoxContextBmp::SetBitmap2( const Image& _rImage, BmpColorMode _eMode )
{
implGetImageStore( sal_False, _eMode ) = _rImage;
}
-inline const Image& SvLBoxContextBmp::GetBitmap1( BmpColorMode _eMode ) const
+inline const Image& SvLBoxContextBmp::GetBitmap1( BmpColorMode _eMode ) const
{
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( sal_True, _eMode );
if ( !rImage )
@@ -282,7 +282,7 @@ inline const Image& SvLBoxContextBmp::GetBitmap1( BmpColorMode _eMode ) const
return rImage;
}
-inline const Image& SvLBoxContextBmp::GetBitmap2( BmpColorMode _eMode ) const
+inline const Image& SvLBoxContextBmp::GetBitmap2( BmpColorMode _eMode ) const
{
Image& rImage = const_cast< SvLBoxContextBmp* >( this )->implGetImageStore( sal_False, _eMode );
if ( !rImage )