SECShortcutBar Class

class SECShortcutBar: public CWnd

SECShortcutBar offers the look and feel of the Microsoft Outlook Bar.

Defined in: olbar.h

Comments

The shortcut bar acts as a container class and can hold any embedded CWnd-derived objects. It can also be embedded anywhere.

When the shortcut bar is usedas an Outlook Bar type interface it maintains a list of bars. Each bar is the button that can be seen.

See the DEMO sample in the \SAMPLES\TOOLKIT\STANDARD\TABS\LISTBAR directory for a demonstration of the SECShortcutBar class.

See Also

SECBar SECListBar

Class Members

Public Members

Constructors/Destructors

SECShortcutBar()

Constructs the SECShortcutBar object

virtual ~SECShortcutBar()

Destructs the SECShortcutBar object

Initializations

virtual BOOL Create( CWnd* pParentWnd, DWORD dwStyle = SEC_DEFAULT_OUTLOOKBAR, UINT nID = AFX_IDW_PANE_FIRST )

Creates the SECShortcutBar window

Accessor Fuctions

void SetBarClass( CRuntimeClass* const pBarClass )

Set the CRuntimeClass used for SECBar's

CRuntimeClass* GetBarClass() const

Get the CRuntimeClass used for SECBar's

void SetListBarClass( CRuntimeClass* const pBarClass )

Set the CRuntimeClass used for SECListBar's

CRuntimeClass* GetListBarClass() const

Get the CRuntimeClass used for SECBar's

void SetListCtrlClass( CRuntimeClass* const pBarClass )

Set the CRuntimeClass used for SECShortcutListCtrl's

CRuntimeClass* GetListCtrlClass() const

Get the CRuntimeClass used for SECShortcutListCtrl's

void SetFontPointSize( const int& iFontPointSize )

Set the font point size to use for SECBar

int GetFontPointSize() const

Get the font point size to use for SECBar

void SetFontName( const CString& sFontName )

Set the font name to use for SECBar

const CString& GetFontName() const

Get the font name to use for SECBar

void SetAnimationSpeed( const int& iAnimationSpeed )

Set the Animation speed to use (in ms)

int GetAnimationSpeed() const

Get the Animation speed to use (in ms)

void SetAnimationStep( const int& iAnimationStep )

Set the Animation Step (# of frames in animation)

int GetAnimationStep() const

Get the Animation Step (# of frames in animation)

void SetBarMenu( HMENU hMenu, int iIndex = -1 )

Set menu for SECBar to use

void SetBarMenu( CMenu* pSubMenu, int iIndex = -1, int iLevel = -1 )

Set menu for SECBar to use

void SetBarFont( CFont* pFont, int iIndex = -1 )

Set font for SECBar to use

void SetBarFont( HFONT hFont, int iIndex = -1 )

Set font for SECBar to use

void SetBackFillColor( COLORREF color )

Set color to use as filler in animated scrolls

void SetBackFillColor( CBrush* pBackFillBrush )

Set brush to use as filler in animated scrolls

void SetFocusRectColor( COLORREF color, int iIndex = -1 )

Set color of the focus rect for SECBar's

COLORREF GetFocusRectColor( int iIndex = -1 ) const

Get color of the focus rect for SECBar's

void SetTextColor( COLORREF color, int iIndex = -1 )

Set color of the bar text for SECBar's

COLORREF GetTextColor(int iIndex = -1) const

Get color of the bar text for SECBar's

void SetBkColor( COLORREF color, int iIndex = -1 )

Set background color of the bar

COLORREF GetBkColor(int iIndex = -1) const

Get background color of the bar

void SetPaneBkColor( COLORREF color, int iIndex = -1 )

Set background color of the bar

COLORREF GetPaneBkColor(int iIndex = -1) const

Get background color of the bar

Queries

int GetBarCount() const

Queries the number of bars in SECShortcutBar

CWnd* GetBarWnd( int iIndex ) const

Returns the CWnd associated with the Bar

void SetAlignStyle( DWORD dwAlign )

Sets the alignment style

DWORD GetAlignStyle() const

Gets the alignment style

void ModifyBarStyle( DWORD dwRemove, DWORD dwAdd, BOOL bRecalcRedraw = TRUE )

Modifies the bar style

DWORD GetBarStyle() const

Queries the bar style

SECBar& GetActiveBar() const

Get SECBar associated with active bar

BOOL HasActiveBar() const

Queries wether or not we have an active bar

int GetActiveIndex() const

Returns the index of the active bar

BOOL IsVertAlign() const

Queries for the style SEC_OBS_VERT

BOOL IsHorzAlign() const

Queries for the style SEC_OBS_HORZ

BOOL IsStyleSet( DWORD dwStyle ) const

Queries for a particular style

SECIterator<SECBar*>* CreateBarIterator() const

Creates an iterator to use for traversal

SECBar& GetBar( int iIndex ) const

Returns a SECBar at specified index

SECBar* GetBarPtr( int iIndex ) const

Returns a SECBar* at specified index

int HitBar( const CPoint& pt )

Returns index of the bar at specified point.

void SetFlatStyleMode( BOOL bEnabled = TRUE )

Specifies whether to use flat style or not.

Public Overrideables

virtual SECBar* AddBar(CWnd* pWnd,LPCTSTR lpszLabel,BOOL bRecalc=FALSE)

Adds a new bar at the end

virtual SECBar* AddBar(CRuntimeClass* pViewClass,LPCTSTR lpszLabel, CCreateContext* pContext = NULL,BOOL bRecalc = FALSE, UINT nID = SEC_DEFAULT_ID)

Adds a new bar at the end

virtual SECListBar* AddBar( LPCTSTR lpszLabel, BOOL bRecalc=FALSE)

Adds a new SECListBar at the end

virtual SECBar* InsertBar( int iIndex, CWnd* pWnd, LPCTSTR lpszLabel, BOOL bRecalc=FALSE)

Inserts a new bar

virtual SECBar* InsertBar( int iIndex, CRuntimeClass* pViewClass, LPCTSTR lpszLabel, CCreateContext* pContext = NULL, BOOL bRecalc = FALSE, UINT uID = SEC_DEFAULT_ID )

Inserts a new bar

virtual SECListBar* InsertBar( int iIndex, LPCTSTR lpszLabel, BOOL bRecalc=FALSE)

Inserts a new SECListBar

virtual void RemoveBar( int iIndex )

Removes a bar at specified index

virtual void RenameBar( int iIndex, LPCTSTR lpszLabel )

Renames a bar at specified index

virtual void ActivateBar(int nIndex)

Activates bar at specified index

virtual void DisableBar( int iIndex )

Disables bar at specified index

virtual void EnableBar( int iIndex )

Enables bar at specified index

Protected Overrideables

virtual void OnStyleChange( DWORD dwRemovedStyles, DWORD dwAddedStyles )

Called when styles changing

virtual BOOL OnChangeBar( int iIndex )

Called when trying to change bar

virtual BOOL OnRemoveBar( int iIndex )

Called when trying to remove a bar

virtual BOOL OnDisableBar( int iIndex )

Called when trying to disable a bar

virtual BOOL OnEnableBar( int iIndex )

Called when trying to enable a bar

virtual BOOL OnCreatePaneWnd( CWnd* pwnd )

Called after creating CWnd for bar object

virtual BOOL OnCreateBar( SECBar* pbar )

Called after creating SECBar object

virtual void ConstructGDIObjects()

Called to create GDI Objects

virtual void DestructGDIObjects()

Called to destroy GDI Objects

virtual SECBar* CreateNewBar() const

Called to create SECBar object

virtual SECListBar* CreateNewListBar() const

Called to create SECListBar objects