Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CCoolBarCtrl Class Reference

#include <CtrlCoolBar.h>

Inheritance diagram for CCoolBarCtrl:

CBrowseHeaderCtrl CCoolMenuBarCtrl CLibraryHeaderBar List of all members.

Public Member Functions

 CCoolBarCtrl ()
virtual ~CCoolBarCtrl ()
void SetSize (int nHeight, BOOL bStretch)
void SetGripper (BOOL bGripper)
void SetBold (BOOL bBold)
void SetDragForward (BOOL bForward)
void SetWatermark (HBITMAP hBitmap, BOOL bDetach=FALSE)
void SetSyncObject (CSyncObject *pSyncObject)
CCoolBarItemAdd (UINT nID, LPCTSTR pszText=NULL, int nPosition=-1)
CCoolBarItemAdd (UINT nCtrlID, int nWidth, int nHeight=0)
CCoolBarItemGetIndex (int nIndex) const
CCoolBarItemGetID (UINT nID) const
int GetIndexForID (UINT nID) const
int GetCount () const
BOOL LoadToolBar (UINT nIDToolBar)
void Clear ()
void Copy (CCoolBarCtrl *pOther)
BOOL GetItemRect (CCoolBarItem *pFind, CRect *pRect) const
UINT ThrowMenu (UINT nID, CMenu *pMenu, CWnd *pParent=NULL, BOOL bCommand=FALSE, BOOL bRight=FALSE)
void OnUpdated ()
virtual BOOL Create (CWnd *pParentWnd, DWORD dwStyle=WS_CHILD|WS_VISIBLE|CBRS_TOP, UINT nID=AFX_IDW_TOOLBAR)
virtual CSize CalcFixedLayout (BOOL bStretch, BOOL bHorz)
virtual int OnToolHitTest (CPoint point, TOOLINFO *pTI) const
virtual void DoPaint (CDC *pDC)
virtual void OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHndler)
virtual BOOL PreTranslateMessage (MSG *pMsg)

Protected Member Functions

virtual void PrepareRect (CRect *pRect) const
virtual void DoPaint (CDC *pDC, CRect &rc, BOOL bTransparent)
CCoolBarItemHitTest (const CPoint &point, CRect *pItemRect=NULL, BOOL bSeparators=FALSE) const
void SmartMove (CWnd *pCtrl, CRect *pRect)
virtual BOOL OnCommand (WPARAM wParam, LPARAM lParam)
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void OnTimer (UINT nIDEvent)
afx_msg void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg HBRUSH OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)

Protected Attributes

CPtrList m_pItems
int m_nHeight
BOOL m_bStretch
BOOL m_bGripper
BOOL m_bBold
BOOL m_bDragForward
CBitmap m_bmImage
BOOL m_bBuffered
BOOL m_bMenuGray
CSyncObject * m_pSyncObject
CCoolBarItemm_pDown
CCoolBarItemm_pHot
BOOL m_bTimer
CSize m_czLast
CBrush m_brBack
COLORREF m_crBack
BOOL m_bRecalc

Friends

class CCoolBarItem

Constructor & Destructor Documentation

CCoolBarCtrl::CCoolBarCtrl  ) 
 

Definition at line 65 of file CtrlCoolBar.cpp.

References DEFAULT_HEIGHT, and NULL.

CCoolBarCtrl::~CCoolBarCtrl  )  [virtual]
 

Definition at line 83 of file CtrlCoolBar.cpp.

References Clear().


Member Function Documentation

CCoolBarItem * CCoolBarCtrl::Add UINT  nCtrlID,
int  nWidth,
int  nHeight = 0
 

Definition at line 169 of file CtrlCoolBar.cpp.

References CCoolBarItem, CONTROL_HEIGHT, CCoolBarItem::m_nCtrlHeight, CCoolBarItem::m_nCtrlID, CCoolBarItem::m_nWidth, and m_pItems.

CCoolBarItem * CCoolBarCtrl::Add UINT  nID,
LPCTSTR  pszText = NULL,
int  nPosition = -1
 

Definition at line 148 of file CtrlCoolBar.cpp.

References CCoolBarItem, CoolInterface, CCoolInterface::ImageForID(), CCoolBarItem::m_nImage, m_pItems, and CCoolBarItem::SetText().

Referenced by CSkin::CreateToolBar(), and LoadToolBar().

CSize CCoolBarCtrl::CalcFixedLayout BOOL  bStretch,
BOOL  bHorz
[virtual]
 

Definition at line 339 of file CtrlCoolBar.cpp.

References GRIPPER_WIDTH, m_bGripper, m_bStretch, CCoolBarItem::m_bVisible, m_czLast, m_nHeight, CCoolBarItem::m_nWidth, m_pItems, and MARGIN_WIDTH.

Referenced by OnUpdated().

void CCoolBarCtrl::Clear  ) 
 

Definition at line 240 of file CtrlCoolBar.cpp.

References m_pItems.

Referenced by Copy(), CSkin::CreateToolBar(), CSearchWnd::OnSkinChange(), CMainWnd::OnSkinChanged(), CCoolMenuBarCtrl::SetMenu(), and ~CCoolBarCtrl().

void CCoolBarCtrl::Copy CCoolBarCtrl pOther  ) 
 

Definition at line 250 of file CtrlCoolBar.cpp.

References CCoolBarItem, Clear(), and m_pItems.

Referenced by CSkin::CreateToolBar().

BOOL CCoolBarCtrl::Create CWnd *  pParentWnd,
DWORD  dwStyle = WS_CHILD|WS_VISIBLE|CBRS_TOP,
UINT  nID = AFX_IDW_TOOLBAR
[virtual]
 

Definition at line 91 of file CtrlCoolBar.cpp.

References NULL.

Referenced by CUploadsWnd::OnCreate(), CNeighboursWnd::OnCreate(), CMainWnd::OnCreate(), CHostCacheWnd::OnCreate(), CHelpWnd::OnCreate(), CDownloadsWnd::OnCreate(), CBaseMatchWnd::OnCreate(), CMediaFrame::OnCreate(), CLibraryFrame::OnCreate(), CChatFrame::OnCreate(), and CBrowseFrameCtrl::OnCreate().

void CCoolBarCtrl::DoPaint CDC *  pDC  )  [virtual]
 

Definition at line 530 of file CtrlCoolBar.cpp.

References CoolInterface, DoPaint(), CCoolInterface::DrawWatermark(), CCoolInterface::GetBuffer(), m_bBuffered, m_bmImage, CCoolInterface::m_crMidtone, and NULL.

void CCoolBarCtrl::DoPaint CDC *  pDC,
CRect &  rc,
BOOL  bTransparent
[protected, virtual]
 

Reimplemented in CBrowseHeaderCtrl, and CLibraryHeaderBar.

Definition at line 569 of file CtrlCoolBar.cpp.

References CoolInterface, GRIPPER_WIDTH, ID_RIGHTALIGN, m_bBold, m_bGripper, m_bMenuGray, CCoolBarItem::m_bVisible, CCoolInterface::m_crDisabled, CCoolInterface::m_crMidtone, CCoolInterface::m_fntBold, CCoolInterface::m_fntNormal, CCoolBarItem::m_nCtrlID, CCoolBarItem::m_nWidth, m_pDown, m_pHot, m_pItems, MARGIN_WIDTH, NULL, CCoolBarItem::Paint(), and SmartMove().

Referenced by CLibraryHeaderBar::DoPaint(), DoPaint(), and CBrowseHeaderCtrl::DoPaint().

int CCoolBarCtrl::GetCount  )  const
 

Definition at line 216 of file CtrlCoolBar.cpp.

References m_pItems.

Referenced by CCoolMenuBarCtrl::ShiftMenu().

CCoolBarItem * CCoolBarCtrl::GetID UINT  nID  )  const
 

Definition at line 192 of file CtrlCoolBar.cpp.

References m_pItems, and NULL.

Referenced by CMediaFrame::OnSkinChange(), CLibraryTreeView::OnUpdateLibraryParent(), CSearchWnd::OnUpdateSearchPanel(), CMainWnd::OnUpdateTabConnect(), CMainWnd::OnUpdateTabMedia(), ThrowMenu(), and CLibraryHeaderBar::Update().

CCoolBarItem * CCoolBarCtrl::GetIndex int  nIndex  )  const
 

Definition at line 181 of file CtrlCoolBar.cpp.

References m_pItems, and NULL.

Referenced by CCoolMenuBarCtrl::OpenMenuBar(), CCoolMenuBarCtrl::OpenMenuChar(), and CCoolMenuBarCtrl::ShiftMenu().

int CCoolBarCtrl::GetIndexForID UINT  nID  )  const
 

Definition at line 203 of file CtrlCoolBar.cpp.

References m_pItems.

BOOL CCoolBarCtrl::GetItemRect CCoolBarItem pFind,
CRect *  pRect
const
 

Definition at line 436 of file CtrlCoolBar.cpp.

References ID_RIGHTALIGN, CCoolBarItem::m_bVisible, CCoolBarItem::m_nWidth, m_pItems, and PrepareRect().

Referenced by CCoolMenuBarCtrl::ShowMenu(), and ThrowMenu().

CCoolBarItem * CCoolBarCtrl::HitTest const CPoint &  point,
CRect *  pItemRect = NULL,
BOOL  bSeparators = FALSE
const [protected]
 

Definition at line 388 of file CtrlCoolBar.cpp.

References ID_RIGHTALIGN, ID_SEPARATOR, CCoolBarItem::m_bVisible, CCoolBarItem::m_nWidth, m_pItems, NULL, and PrepareRect().

Referenced by CCoolMenuBarCtrl::OnLButtonDown(), OnLButtonDown(), OnLButtonUp(), CCoolMenuBarCtrl::OnMenuMessage(), OnMouseMove(), OnTimer(), and OnToolHitTest().

BOOL CCoolBarCtrl::LoadToolBar UINT  nIDToolBar  ) 
 

Definition at line 221 of file CtrlCoolBar.cpp.

References Add().

BOOL CCoolBarCtrl::OnCommand WPARAM  wParam,
LPARAM  lParam
[protected, virtual]
 

Definition at line 867 of file CtrlCoolBar.cpp.

int CCoolBarCtrl::OnCreate LPCREATESTRUCT  lpCreateStruct  )  [protected]
 

Reimplemented in CBrowseHeaderCtrl.

Definition at line 332 of file CtrlCoolBar.cpp.

HBRUSH CCoolBarCtrl::OnCtlColor CDC *  pDC,
CWnd *  pWnd,
UINT  nCtlColor
[protected]
 

Definition at line 667 of file CtrlCoolBar.cpp.

References CoolInterface, m_brBack, m_crBack, and CCoolInterface::m_crMidtone.

void CCoolBarCtrl::OnHScroll UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar
[protected]
 

Definition at line 894 of file CtrlCoolBar.cpp.

void CCoolBarCtrl::OnLButtonDblClk UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 846 of file CtrlCoolBar.cpp.

References OnLButtonDown().

void CCoolBarCtrl::OnLButtonDown UINT  nFlags,
CPoint  point
[protected]
 

Reimplemented in CCoolMenuBarCtrl.

Definition at line 799 of file CtrlCoolBar.cpp.

References HitTest(), m_bDragForward, CCoolBarItem::m_bEnabled, m_pDown, and m_pHot.

Referenced by OnLButtonDblClk(), and CCoolMenuBarCtrl::OnLButtonDown().

void CCoolBarCtrl::OnLButtonUp UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 821 of file CtrlCoolBar.cpp.

References HitTest(), m_bDragForward, m_pDown, m_pHot, and NULL.

void CCoolBarCtrl::OnMouseMove UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 725 of file CtrlCoolBar.cpp.

References HitTest(), m_bTimer, m_pDown, m_pHot, and NULL.

void CCoolBarCtrl::OnRButtonDown UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 851 of file CtrlCoolBar.cpp.

References m_pDown, m_pHot, and NULL.

void CCoolBarCtrl::OnTimer UINT  nIDEvent  )  [protected]
 

Reimplemented in CCoolMenuBarCtrl.

Definition at line 746 of file CtrlCoolBar.cpp.

References HitTest(), m_bMenuGray, m_bRecalc, m_bTimer, m_pDown, m_pHot, and NULL.

Referenced by CCoolMenuBarCtrl::OnTimer().

int CCoolBarCtrl::OnToolHitTest CPoint  point,
TOOLINFO *  pTI
const [virtual]
 

Definition at line 484 of file CtrlCoolBar.cpp.

References CSkin::GetTextFlowChange(), HitTest(), LoadString(), CShareazaApp::m_bRTL, CCoolBarItem::m_sTip, NULL, Skin, and theApp.

void CCoolBarCtrl::OnUpdateCmdUI CFrameWnd *  pTarget,
BOOL  bDisableIfNoHndler
[virtual]
 

Reimplemented in CCoolMenuBarCtrl.

Definition at line 687 of file CtrlCoolBar.cpp.

References ID_SEPARATOR, CCoolBarItem::m_bDirty, CCoolBarItem::m_bEnabled, CCoolBarItem::m_nCtrlID, m_pItems, m_pSyncObject, NULL, and OnUpdated().

Referenced by CMediaFrame::OnUpdateCmdUI().

void CCoolBarCtrl::OnUpdated  ) 
 

Definition at line 306 of file CtrlCoolBar.cpp.

References CalcFixedLayout(), m_bRecalc, m_bStretch, and m_czLast.

Referenced by CMainWnd::OnSkinChanged(), OnUpdateCmdUI(), SetBold(), and CLibraryHeaderBar::Update().

void CCoolBarCtrl::PrepareRect CRect *  pRect  )  const [protected, virtual]
 

Reimplemented in CBrowseHeaderCtrl, and CLibraryHeaderBar.

Definition at line 373 of file CtrlCoolBar.cpp.

References GRIPPER_WIDTH, m_bGripper, and MARGIN_WIDTH.

Referenced by GetItemRect(), HitTest(), CLibraryHeaderBar::PrepareRect(), and CBrowseHeaderCtrl::PrepareRect().

BOOL CCoolBarCtrl::PreTranslateMessage MSG *  pMsg  )  [virtual]
 

Definition at line 877 of file CtrlCoolBar.cpp.

void CCoolBarCtrl::SetBold BOOL  bBold  ) 
 

Definition at line 112 of file CtrlCoolBar.cpp.

References m_bBold, and OnUpdated().

void CCoolBarCtrl::SetDragForward BOOL  bForward  ) 
 

Definition at line 118 of file CtrlCoolBar.cpp.

References m_bDragForward.

void CCoolBarCtrl::SetGripper BOOL  bGripper  ) 
 

Definition at line 107 of file CtrlCoolBar.cpp.

References m_bGripper.

Referenced by CMainWnd::OnCreate().

void CCoolBarCtrl::SetSize int  nHeight,
BOOL  bStretch
 

Definition at line 98 of file CtrlCoolBar.cpp.

References DEFAULT_HEIGHT, m_bStretch, m_nHeight, and NULL.

void CCoolBarCtrl::SetSyncObject CSyncObject *  pSyncObject  ) 
 

Definition at line 140 of file CtrlCoolBar.cpp.

References m_pSyncObject.

Referenced by CUploadsWnd::OnCreate(), CHostCacheWnd::OnCreate(), and CDownloadsWnd::OnCreate().

void CCoolBarCtrl::SetWatermark HBITMAP  hBitmap,
BOOL  bDetach = FALSE
 

Definition at line 123 of file CtrlCoolBar.cpp.

References m_bmImage.

Referenced by CSkin::CreateToolBar(), and CMainWnd::OnSkinChanged().

void CCoolBarCtrl::SmartMove CWnd *  pCtrl,
CRect *  pRect
[protected]
 

Definition at line 650 of file CtrlCoolBar.cpp.

References NULL.

Referenced by DoPaint().

UINT CCoolBarCtrl::ThrowMenu UINT  nID,
CMenu *  pMenu,
CWnd *  pParent = NULL,
BOOL  bCommand = FALSE,
BOOL  bRight = FALSE
 

Definition at line 261 of file CtrlCoolBar.cpp.

References CoolMenu, GetID(), GetItemRect(), m_bMenuGray, CShareazaApp::m_bRTL, m_pDown, NULL, CCoolMenu::RegisterEdge(), and theApp.

Referenced by CChatFrame::OnChatEmoticons(), CDownloadsWnd::OnDownloadsFilterMenu(), CLibraryHeaderBar::OnLibraryView(), CMediaFrame::OnMediaZoom(), and CUploadsWnd::OnUploadsFilterMenu().


Friends And Related Function Documentation

friend class CCoolBarItem [friend]
 

Definition at line 118 of file CtrlCoolBar.h.

Referenced by Add(), Copy(), and CCoolMenuBarCtrl::SetMenu().


Member Data Documentation

BOOL CCoolBarCtrl::m_bBold [protected]
 

Definition at line 46 of file CtrlCoolBar.h.

Referenced by DoPaint(), SetBold(), and CCoolBarItem::SetText().

BOOL CCoolBarCtrl::m_bBuffered [protected]
 

Definition at line 49 of file CtrlCoolBar.h.

Referenced by DoPaint().

BOOL CCoolBarCtrl::m_bDragForward [protected]
 

Definition at line 47 of file CtrlCoolBar.h.

Referenced by OnLButtonDown(), OnLButtonUp(), and SetDragForward().

BOOL CCoolBarCtrl::m_bGripper [protected]
 

Definition at line 45 of file CtrlCoolBar.h.

Referenced by CalcFixedLayout(), CCoolMenuBarCtrl::CCoolMenuBarCtrl(), DoPaint(), PrepareRect(), and SetGripper().

BOOL CCoolBarCtrl::m_bMenuGray [protected]
 

Definition at line 50 of file CtrlCoolBar.h.

Referenced by CCoolMenuBarCtrl::CCoolMenuBarCtrl(), DoPaint(), OnTimer(), and ThrowMenu().

CBitmap CCoolBarCtrl::m_bmImage [protected]
 

Definition at line 48 of file CtrlCoolBar.h.

Referenced by DoPaint(), CBrowseHeaderCtrl::DoPaint(), CBrowseHeaderCtrl::OnSkinChange(), and SetWatermark().

CBrush CCoolBarCtrl::m_brBack [protected]
 

Definition at line 57 of file CtrlCoolBar.h.

Referenced by OnCtlColor().

BOOL CCoolBarCtrl::m_bRecalc [protected]
 

Definition at line 59 of file CtrlCoolBar.h.

Referenced by OnTimer(), and OnUpdated().

BOOL CCoolBarCtrl::m_bStretch [protected]
 

Definition at line 44 of file CtrlCoolBar.h.

Referenced by CalcFixedLayout(), CCoolMenuBarCtrl::CCoolMenuBarCtrl(), OnUpdated(), and SetSize().

BOOL CCoolBarCtrl::m_bTimer [protected]
 

Definition at line 55 of file CtrlCoolBar.h.

Referenced by OnMouseMove(), OnTimer(), and CCoolMenuBarCtrl::ShowMenu().

COLORREF CCoolBarCtrl::m_crBack [protected]
 

Definition at line 58 of file CtrlCoolBar.h.

Referenced by OnCtlColor().

CSize CCoolBarCtrl::m_czLast [protected]
 

Definition at line 56 of file CtrlCoolBar.h.

Referenced by CalcFixedLayout(), CLibraryHeaderBar::DoPaint(), CBrowseHeaderCtrl::DoPaint(), OnUpdated(), CLibraryHeaderBar::PrepareRect(), and CBrowseHeaderCtrl::PrepareRect().

int CCoolBarCtrl::m_nHeight [protected]
 

Definition at line 43 of file CtrlCoolBar.h.

Referenced by CalcFixedLayout(), CCoolMenuBarCtrl::CCoolMenuBarCtrl(), and SetSize().

CCoolBarItem* CCoolBarCtrl::m_pDown [protected]
 

Definition at line 53 of file CtrlCoolBar.h.

Referenced by DoPaint(), OnLButtonDown(), OnLButtonUp(), CCoolMenuBarCtrl::OnMenuMessage(), OnMouseMove(), OnRButtonDown(), OnTimer(), CCoolMenuBarCtrl::OpenMenuBar(), CCoolMenuBarCtrl::ShiftMenu(), CCoolMenuBarCtrl::ShowMenu(), and ThrowMenu().

CCoolBarItem* CCoolBarCtrl::m_pHot [protected]
 

Definition at line 54 of file CtrlCoolBar.h.

Referenced by DoPaint(), CCoolMenuBarCtrl::OnLButtonDown(), OnLButtonDown(), OnLButtonUp(), CCoolMenuBarCtrl::OnMenuMessage(), OnMouseMove(), OnRButtonDown(), CCoolMenuBarCtrl::OnTimer(), OnTimer(), CCoolMenuBarCtrl::ShiftMenu(), and CCoolMenuBarCtrl::ShowMenu().

CPtrList CCoolBarCtrl::m_pItems [protected]
 

Definition at line 41 of file CtrlCoolBar.h.

Referenced by Add(), CalcFixedLayout(), Clear(), Copy(), DoPaint(), GetCount(), GetID(), GetIndex(), GetIndexForID(), GetItemRect(), HitTest(), OnUpdateCmdUI(), and CCoolMenuBarCtrl::SetMenu().

CSyncObject* CCoolBarCtrl::m_pSyncObject [protected]
 

Definition at line 51 of file CtrlCoolBar.h.

Referenced by OnUpdateCmdUI(), and SetSyncObject().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:05 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2