#include <SizableReBar.h>
Public Member Functions | |
CSizableReBar () | |
~CSizableReBar () | |
bool | Create (CWnd *pParentWnd, UINT nID, DWORD dwStyle) |
bool | AddBar (CWnd *pBar, LPCTSTR pszText=0, CBitmap *pbmp=0, DWORD dwStyle=RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP, LPCTSTR lpszTitle=0, bool bAlwaysVisible=true) |
bool | AddBar (CWnd *pBar, COLORREF clrFore, COLORREF clrBack, LPCTSTR pszText=0, DWORD dwStyle=RBBS_GRIPPERALWAYS, LPCTSTR lpszTitle=0, bool bAlwaysVisible=true) |
bool | SetBkImage (CBitmap *pbmp) |
void | EnableContextMenu (bool bCommonPart=true, bool bCustomPart=true) |
void | LoadState (LPCTSTR lpszProfileName) |
void | SaveState (LPCTSTR lpszProfileName) |
CReBarCtrl & | GetReBarCtrl () const |
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz) |
virtual CSize | CalcDynamicLayout (int nLength, DWORD dwMode) |
CSizableReBar () | |
~CSizableReBar () | |
bool | Create (CWnd *pParentWnd, UINT nID, DWORD dwStyle) |
bool | AddBar (CWnd *pBar, LPCTSTR pszText=0, CBitmap *pbmp=0, DWORD dwStyle=RBBS_FIXEDBMP, LPCTSTR lpszTitle=0, bool bAlwaysVisible=true, bool bHasGripper=true) |
bool | AddBar (CWnd *pBar, COLORREF clrFore, COLORREF clrBack, LPCTSTR pszText=0, DWORD dwStyle=0, LPCTSTR lpszTitle=0, bool bAlwaysVisible=true, bool bHasGripper=true) |
bool | SetBkImage (CBitmap *pbmp) |
void | EnableContextMenu (bool bCommonPart=true, bool bCustomPart=true) |
bool | Lock (bool bLock=true) |
bool | IsLocked () |
void | LoadState (LPCTSTR lpszProfileName) |
void | SaveState (LPCTSTR lpszProfileName) |
CReBarCtrl & | GetReBarCtrl () |
virtual CSize | CalcFixedLayout (BOOL bStretch, BOOL bHorz) |
virtual CSize | CalcDynamicLayout (int nLength, DWORD dwMode) |
Protected Member Functions | |
virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHandler) |
bool | PostAddBar (CWnd *pBar, LPCTSTR lpszTitle, bool bAlwaysVisible) |
UINT | GetSizingEdgeHitCode () const |
bool | GetSizingEdgeRect (const CRect &rcBar, CRect &rcEdge, UINT nHitTest) const |
void | StartTracking (UINT nHitTest, CPoint pt) |
void | StopTracking () |
void | OnTrackUpdateSize (CPoint pt) |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
afx_msg void | OnNcPaint () |
afx_msg void | OnNcCalcSize (BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR *lpncsp) |
afx_msg UINT | OnNcHitTest (CPoint point) |
afx_msg void | OnCaptureChanged (CWnd *pWnd) |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
afx_msg void | OnNcLButtonDown (UINT nHitTest, CPoint point) |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point) |
DECLARE_MESSAGE_MAP () | |
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
virtual void | OnUpdateCmdUI (CFrameWnd *pTarget, BOOL bDisableIfNoHandler) |
bool | DoAddBar (CWnd *pBar, REBARBANDINFO *prbbi, LPCTSTR lpszTitle, bool bAlwaysVisiblem, bool bHasGripper) |
UINT | GetSizingEdgeHitCode () const |
bool | GetSizingEdgeRect (const CRect &rcBar, CRect &rcEdge, UINT nHitTest) const |
void | StartTracking (UINT nHitTest, CPoint pt) |
void | StopTracking () |
void | OnTrackUpdateSize (CPoint pt) |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
afx_msg void | OnNcPaint () |
afx_msg void | OnNcCalcSize (BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR *lpncsp) |
afx_msg UINT | OnNcHitTest (CPoint point) |
afx_msg void | OnCaptureChanged (CWnd *pWnd) |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
afx_msg void | OnNcLButtonDown (UINT nHitTest, CPoint point) |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
afx_msg void | OnContextMenu (CWnd *pWnd, CPoint point) |
afx_msg void | OnRecalcParent () |
DECLARE_MESSAGE_MAP () | |
Protected Attributes | |
CReBar | m_wndReBar |
UINT | m_htEdge |
CSize | m_szCurrent |
CSize | m_szOld |
CPoint | m_ptOld |
bool | m_bTracking |
int | m_cxEdge |
int | m_cyEdge |
HBITMAP | m_hbmBack |
bool | m_bCommonPart |
bool | m_bCustomPart |
CArray< BARINFO, BARINFO & > | m_aBars |
CReBarCtrl | m_rbCtrl |
bool | m_bLocked |
CArray< BARINFO, BARINFO & > | m_aBars |
Static Protected Attributes | |
static LPCTSTR | m_lpszStateInfoFormat = _T("wID=%04X,cx=%d,fStyle=%08X") |
static LPCTSTR | m_lpszStateInfoEntry = _T("RebarStateInfo (v1.01)") |
static int | m_nStateInfoVersion = 1 |
static LPCTSTR | m_lpszStateInfoVersion = _T("Version") |
static LPCTSTR | m_lpszStateInfoLocked = _T("Locked") |
static LPCTSTR | m_lpszStateInfoBand = _T("BandStateInfo") |
Private Member Functions | |
DECLARE_DYNAMIC (CSizableReBar) | |
DECLARE_DYNAMIC (CSizableReBar) | |
Classes | |
struct | BARINFO |
struct | BARINFO |
class | CFrameWndFriend |
Definition at line 30 of file SizableReBar.h.
CSizableReBar::CSizableReBar | ( | ) |
Definition at line 37 of file SizableReBar.cpp.
CSizableReBar::~CSizableReBar | ( | ) |
Definition at line 48 of file SizableReBar.cpp.
CSizableReBar::CSizableReBar | ( | ) |
CSizableReBar::~CSizableReBar | ( | ) |
bool CSizableReBar::AddBar | ( | CWnd * | pBar, | |
COLORREF | clrFore, | |||
COLORREF | clrBack, | |||
LPCTSTR | pszText = 0 , |
|||
DWORD | dwStyle = 0 , |
|||
LPCTSTR | lpszTitle = 0 , |
|||
bool | bAlwaysVisible = true , |
|||
bool | bHasGripper = true | |||
) |
bool CSizableReBar::AddBar | ( | CWnd * | pBar, | |
LPCTSTR | pszText = 0 , |
|||
CBitmap * | pbmp = 0 , |
|||
DWORD | dwStyle = RBBS_FIXEDBMP , |
|||
LPCTSTR | lpszTitle = 0 , |
|||
bool | bAlwaysVisible = true , |
|||
bool | bHasGripper = true | |||
) |
bool CSizableReBar::AddBar | ( | CWnd * | pBar, | |
COLORREF | clrFore, | |||
COLORREF | clrBack, | |||
LPCTSTR | pszText = 0 , |
|||
DWORD | dwStyle = RBBS_GRIPPERALWAYS , |
|||
LPCTSTR | lpszTitle = 0 , |
|||
bool | bAlwaysVisible = true | |||
) |
bool CSizableReBar::AddBar | ( | CWnd * | pBar, | |
LPCTSTR | pszText = 0 , |
|||
CBitmap * | pbmp = 0 , |
|||
DWORD | dwStyle = RBBS_GRIPPERALWAYS|RBBS_FIXEDBMP , |
|||
LPCTSTR | lpszTitle = 0 , |
|||
bool | bAlwaysVisible = true | |||
) |
Definition at line 77 of file SizableReBar.cpp.
References m_wndReBar, and PostAddBar().
Referenced by CPreviewableView< TBase >::DoPrintPreview(), CFrame::OnCreate(), and CFrameWndBase< TBase >::OnCreate().
virtual CSize CSizableReBar::CalcDynamicLayout | ( | int | nLength, | |
DWORD | dwMode | |||
) | [virtual] |
CSize CSizableReBar::CalcDynamicLayout | ( | int | nLength, | |
DWORD | dwMode | |||
) | [virtual] |
virtual CSize CSizableReBar::CalcFixedLayout | ( | BOOL | bStretch, | |
BOOL | bHorz | |||
) | [virtual] |
CSize CSizableReBar::CalcFixedLayout | ( | BOOL | bStretch, | |
BOOL | bHorz | |||
) | [virtual] |
Definition at line 240 of file SizableReBar.cpp.
References ASSERT, GetSizingEdgeHitCode(), m_cxEdge, m_cyEdge, m_szCurrent, and m_wndReBar.
Referenced by CalcDynamicLayout().
bool CSizableReBar::Create | ( | CWnd * | pParentWnd, | |
UINT | nID, | |||
DWORD | dwStyle | |||
) |
bool CSizableReBar::Create | ( | CWnd * | pParentWnd, | |
UINT | nID, | |||
DWORD | dwStyle | |||
) |
Definition at line 55 of file SizableReBar.cpp.
References ASSERT.
Referenced by CPreviewableView< TBase >::DoPrintPreview(), and CFrameWndBase< TBase >::OnCreate().
CSizableReBar::DECLARE_DYNAMIC | ( | CSizableReBar | ) | [private] |
CSizableReBar::DECLARE_DYNAMIC | ( | CSizableReBar | ) | [private] |
CSizableReBar::DECLARE_MESSAGE_MAP | ( | ) | [protected] |
CSizableReBar::DECLARE_MESSAGE_MAP | ( | ) | [protected] |
bool CSizableReBar::DoAddBar | ( | CWnd * | pBar, | |
REBARBANDINFO * | prbbi, | |||
LPCTSTR | lpszTitle, | |||
bool | bAlwaysVisiblem, | |||
bool | bHasGripper | |||
) | [protected] |
void CSizableReBar::EnableContextMenu | ( | bool | bCommonPart = true , |
|
bool | bCustomPart = true | |||
) |
void CSizableReBar::EnableContextMenu | ( | bool | bCommonPart = true , |
|
bool | bCustomPart = true | |||
) |
Definition at line 117 of file SizableReBar.cpp.
References m_bCommonPart, and m_bCustomPart.
Referenced by CPreviewableView< TBase >::DoPrintPreview().
CReBarCtrl & CSizableReBar::GetReBarCtrl | ( | ) |
CReBarCtrl & CSizableReBar::GetReBarCtrl | ( | ) | const |
UINT CSizableReBar::GetSizingEdgeHitCode | ( | ) | const [protected] |
UINT CSizableReBar::GetSizingEdgeHitCode | ( | ) | const [protected] |
Definition at line 547 of file SizableReBar.cpp.
Referenced by CalcFixedLayout(), OnNcCalcSize(), and OnNcHitTest().
bool CSizableReBar::GetSizingEdgeRect | ( | const CRect & | rcBar, | |
CRect & | rcEdge, | |||
UINT | nHitTest | |||
) | const [protected] |
bool CSizableReBar::GetSizingEdgeRect | ( | const CRect & | rcBar, | |
CRect & | rcEdge, | |||
UINT | nHitTest | |||
) | const [protected] |
Definition at line 569 of file SizableReBar.cpp.
References m_cxEdge, and m_cyEdge.
Referenced by OnNcCalcSize(), and OnNcHitTest().
bool CSizableReBar::IsLocked | ( | ) |
void CSizableReBar::LoadState | ( | LPCTSTR | lpszProfileName | ) |
void CSizableReBar::LoadState | ( | LPCTSTR | lpszProfileName | ) |
Definition at line 123 of file SizableReBar.cpp.
References ASSERT, m_lpszStateInfoEntry, m_lpszStateInfoFormat, m_wndReBar, and VERIFY.
Referenced by CRobotControlConfigurationManager::loadConfiguration(), and CFrame::RestoreLayout().
bool CSizableReBar::Lock | ( | bool | bLock = true |
) |
Definition at line 157 of file SizableReBar.cpp.
References m_aBars, m_bLocked, m_rbCtrl, and VERIFY.
Referenced by CPreviewableView< TBase >::DoPrintPreview().
afx_msg void CSizableReBar::OnCaptureChanged | ( | CWnd * | pWnd | ) | [protected] |
void CSizableReBar::OnCaptureChanged | ( | CWnd * | pWnd | ) | [protected] |
afx_msg void CSizableReBar::OnContextMenu | ( | CWnd * | pWnd, | |
CPoint | point | |||
) | [protected] |
void CSizableReBar::OnContextMenu | ( | CWnd * | pWnd, | |
CPoint | point | |||
) | [protected] |
Definition at line 454 of file SizableReBar.cpp.
References CWinAppEx::GetInstance(), m_aBars, m_bCommonPart, m_bCustomPart, m_wndReBar, CWinAppEx::SetMenuIcons(), VERIFY, and WM_REBAR_CONTEXTMENU.
afx_msg int CSizableReBar::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) | [protected] |
int CSizableReBar::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) | [protected] |
Definition at line 349 of file SizableReBar.cpp.
afx_msg void CSizableReBar::OnLButtonUp | ( | UINT | nFlags, | |
CPoint | point | |||
) | [protected] |
void CSizableReBar::OnLButtonUp | ( | UINT | nFlags, | |
CPoint | point | |||
) | [protected] |
afx_msg void CSizableReBar::OnMouseMove | ( | UINT | nFlags, | |
CPoint | point | |||
) | [protected] |
void CSizableReBar::OnMouseMove | ( | UINT | nFlags, | |
CPoint | point | |||
) | [protected] |
afx_msg void CSizableReBar::OnNcCalcSize | ( | BOOL | bCalcValidRects, | |
NCCALCSIZE_PARAMS FAR * | lpncsp | |||
) | [protected] |
void CSizableReBar::OnNcCalcSize | ( | BOOL | bCalcValidRects, | |
NCCALCSIZE_PARAMS FAR * | lpncsp | |||
) | [protected] |
Definition at line 409 of file SizableReBar.cpp.
References GetSizingEdgeHitCode(), and GetSizingEdgeRect().
afx_msg UINT CSizableReBar::OnNcHitTest | ( | CPoint | point | ) | [protected] |
UINT CSizableReBar::OnNcHitTest | ( | CPoint | point | ) | [protected] |
Definition at line 430 of file SizableReBar.cpp.
References GetSizingEdgeHitCode(), and GetSizingEdgeRect().
afx_msg void CSizableReBar::OnNcLButtonDown | ( | UINT | nHitTest, | |
CPoint | point | |||
) | [protected] |
void CSizableReBar::OnNcLButtonDown | ( | UINT | nHitTest, | |
CPoint | point | |||
) | [protected] |
afx_msg void CSizableReBar::OnNcPaint | ( | ) | [protected] |
void CSizableReBar::OnNcPaint | ( | ) | [protected] |
Definition at line 425 of file SizableReBar.cpp.
virtual BOOL CSizableReBar::OnNotify | ( | WPARAM | wParam, | |
LPARAM | lParam, | |||
LRESULT * | pResult | |||
) | [protected, virtual] |
BOOL CSizableReBar::OnNotify | ( | WPARAM | wParam, | |
LPARAM | lParam, | |||
LRESULT * | pResult | |||
) | [protected, virtual] |
Definition at line 275 of file SizableReBar.cpp.
References FALSE, tagNMREBARCHEVRON::lParamNM, m_wndReBar, RBN_CHEVRONPUSHED, tagNMREBARCHEVRON::rc, TRUE, tagNMREBARCHEVRON::uBand, VERIFY, WM_REBAR_CHEVRONPUSHED, and WM_REBAR_CHILDSIZE.
void CSizableReBar::OnRecalcParent | ( | ) | [protected] |
afx_msg void CSizableReBar::OnSize | ( | UINT | nType, | |
int | cx, | |||
int | cy | |||
) | [protected] |
void CSizableReBar::OnSize | ( | UINT | nType, | |
int | cx, | |||
int | cy | |||
) | [protected] |
void CSizableReBar::OnTrackUpdateSize | ( | CPoint | pt | ) | [protected] |
void CSizableReBar::OnTrackUpdateSize | ( | CPoint | pt | ) | [protected] |
Definition at line 614 of file SizableReBar.cpp.
References m_htEdge, m_ptOld, m_szOld, and m_wndReBar.
Referenced by OnMouseMove().
virtual void CSizableReBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget, | |
BOOL | bDisableIfNoHandler | |||
) | [protected, virtual] |
void CSizableReBar::OnUpdateCmdUI | ( | CFrameWnd * | pTarget, | |
BOOL | bDisableIfNoHandler | |||
) | [protected, virtual] |
Definition at line 320 of file SizableReBar.cpp.
bool CSizableReBar::PostAddBar | ( | CWnd * | pBar, | |
LPCTSTR | lpszTitle, | |||
bool | bAlwaysVisible | |||
) | [protected] |
Definition at line 193 of file SizableReBar.cpp.
References ASSERT, m_aBars, m_hbmBack, m_wndReBar, RBBS_USECHEVRON, and VERIFY.
Referenced by AddBar().
void CSizableReBar::SaveState | ( | LPCTSTR | lpszProfileName | ) |
void CSizableReBar::SaveState | ( | LPCTSTR | lpszProfileName | ) |
Definition at line 159 of file SizableReBar.cpp.
References m_lpszStateInfoEntry, m_lpszStateInfoFormat, m_wndReBar, and VERIFY.
Referenced by CRobotControlConfigurationManager::saveConfiguration(), and CFrame::WriteLayout().
bool CSizableReBar::SetBkImage | ( | CBitmap * | pbmp | ) |
bool CSizableReBar::SetBkImage | ( | CBitmap * | pbmp | ) |
void CSizableReBar::StartTracking | ( | UINT | nHitTest, | |
CPoint | pt | |||
) | [protected] |
void CSizableReBar::StartTracking | ( | UINT | nHitTest, | |
CPoint | pt | |||
) | [protected] |
Definition at line 594 of file SizableReBar.cpp.
References m_bTracking, m_cxEdge, m_cyEdge, m_htEdge, m_ptOld, m_szCurrent, m_szOld, and VERIFY.
Referenced by OnNcLButtonDown().
void CSizableReBar::StopTracking | ( | ) | [protected] |
void CSizableReBar::StopTracking | ( | ) | [protected] |
Definition at line 607 of file SizableReBar.cpp.
References m_bTracking.
Referenced by OnCaptureChanged(), and OnLButtonUp().
LRESULT CSizableReBar::WindowProc | ( | UINT | message, | |
WPARAM | wParam, | |||
LPARAM | lParam | |||
) | [protected, virtual] |
Definition at line 397 of file SizableReBar.cpp.
CArray< BARINFO, BARINFO& > CSizableReBar::m_aBars [protected] |
Definition at line 111 of file SizableReBar.h.
CArray< BARINFO, BARINFO& > CSizableReBar::m_aBars [protected] |
Definition at line 99 of file SizableReBar.h.
Referenced by DoAddBar(), Lock(), OnContextMenu(), and PostAddBar().
bool CSizableReBar::m_bCommonPart [protected] |
Definition at line 89 of file SizableReBar.h.
Referenced by EnableContextMenu(), and OnContextMenu().
bool CSizableReBar::m_bCustomPart [protected] |
Definition at line 90 of file SizableReBar.h.
Referenced by EnableContextMenu(), and OnContextMenu().
bool CSizableReBar::m_bLocked [protected] |
bool CSizableReBar::m_bTracking [protected] |
Definition at line 85 of file SizableReBar.h.
Referenced by OnCaptureChanged(), OnLButtonUp(), OnMouseMove(), OnNcLButtonDown(), StartTracking(), and StopTracking().
int CSizableReBar::m_cxEdge [protected] |
Definition at line 86 of file SizableReBar.h.
Referenced by CalcFixedLayout(), GetSizingEdgeRect(), and StartTracking().
int CSizableReBar::m_cyEdge [protected] |
Definition at line 87 of file SizableReBar.h.
Referenced by CalcFixedLayout(), GetSizingEdgeRect(), and StartTracking().
HBITMAP CSizableReBar::m_hbmBack [protected] |
Definition at line 88 of file SizableReBar.h.
Referenced by DoAddBar(), PostAddBar(), and SetBkImage().
UINT CSizableReBar::m_htEdge [protected] |
Definition at line 81 of file SizableReBar.h.
Referenced by OnTrackUpdateSize(), and StartTracking().
LPCTSTR CSizableReBar::m_lpszStateInfoBand = _T("BandStateInfo") [static, protected] |
Definition at line 122 of file SizableReBar.h.
LPCTSTR CSizableReBar::m_lpszStateInfoEntry = _T("RebarStateInfo (v1.01)") [static, protected] |
static LPCTSTR CSizableReBar::m_lpszStateInfoFormat = _T("wID=%04X,cx=%d,fStyle=%08X") [static, protected] |
LPCTSTR CSizableReBar::m_lpszStateInfoLocked = _T("Locked") [static, protected] |
Definition at line 121 of file SizableReBar.h.
LPCTSTR CSizableReBar::m_lpszStateInfoVersion = _T("Version") [static, protected] |
Definition at line 120 of file SizableReBar.h.
int CSizableReBar::m_nStateInfoVersion = 1 [static, protected] |
Definition at line 118 of file SizableReBar.h.
CPoint CSizableReBar::m_ptOld [protected] |
Definition at line 84 of file SizableReBar.h.
Referenced by OnTrackUpdateSize(), and StartTracking().
CReBarCtrl CSizableReBar::m_rbCtrl [protected] |
CSize CSizableReBar::m_szCurrent [protected] |
CSize CSizableReBar::m_szOld [protected] |
Definition at line 83 of file SizableReBar.h.
Referenced by OnTrackUpdateSize(), and StartTracking().
CReBar CSizableReBar::m_wndReBar [protected] |
Definition at line 80 of file SizableReBar.h.
Referenced by AddBar(), CalcFixedLayout(), GetReBarCtrl(), LoadState(), OnContextMenu(), OnNotify(), OnSize(), OnTrackUpdateSize(), PostAddBar(), SaveState(), and SetBkImage().