summaryrefslogtreecommitdiff
path: root/win/Piecebar.h
diff options
context:
space:
mode:
authorleo2005-07-14 05:10:57 +0000
committerleo2005-07-14 05:10:57 +0000
commite3b7ec77734b8f415f9c756f0d7bf90ff202e71e (patch)
tree741fd8c82177a499308de47bd94453d9bdc5e229 /win/Piecebar.h
parent7c16eadee05cfe3115ac0a69a822c66f1b3e292f (diff)
Changed the pieces list to a tree sorted by categories.
git-svn-id: http://svn.leocad.org/trunk@414 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'win/Piecebar.h')
-rw-r--r--win/Piecebar.h89
1 files changed, 47 insertions, 42 deletions
diff --git a/win/Piecebar.h b/win/Piecebar.h
index 3da370d..c3a0b77 100644
--- a/win/Piecebar.h
+++ b/win/Piecebar.h
@@ -22,58 +22,59 @@
class CPiecesBar : public CControlBar
{
public:
- CPiecesBar();
+ CPiecesBar();
// Attributes
public:
- CSize m_sizeHorz;
- CSize m_sizeVert;
- CSize m_sizeFloat;
- BOOL IsHorzDocked() const;
- BOOL IsVertDocked() const;
+ CSize m_sizeHorz;
+ CSize m_sizeVert;
+ CSize m_sizeFloat;
+ BOOL IsHorzDocked() const;
+ BOOL IsVertDocked() const;
// Operations
public:
// Overrides
public:
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CPiecesBar)
- public:
- virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd, CSize sizeDefault, BOOL bHasGripper, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
- virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
- virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(CPiecesBar)
+public:
+ virtual BOOL Create(LPCTSTR lpszWindowName, CWnd* pParentWnd, CSize sizeDefault, BOOL bHasGripper, UINT nID, DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP);
+ virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
+ virtual CSize CalcDynamicLayout(int nLength, DWORD dwMode);
+ virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
//}}AFX_VIRTUAL
// Implementation
public:
- virtual ~CPiecesBar();
-
+ virtual ~CPiecesBar();
+
protected:
- // implementation helpers
- void StartTracking();
- void StopTracking(BOOL bAccept);
+ // implementation helpers
+ void StartTracking();
+ void StopTracking(BOOL bAccept);
void OnTrackUpdateSize(CPoint& point);
- void OnTrackInvertTracker();
+ void OnTrackInvertTracker();
virtual CSize CalcMaxSize();
virtual BOOL QueryDragFullWindows() const;
protected:
// used for resizing
- CSize m_sizeMin;
- CSize m_sizeMax;
+ CSize m_sizeMin;
+ CSize m_sizeMax;
CPoint m_ptOld;
- CRect m_rectBorder;
- BOOL m_bTracking;
+ CRect m_rectBorder;
+ BOOL m_bTracking;
BOOL m_bDragShowContent;
CSize m_sizeOld;
- BOOL m_bInRecalcNC;
- UINT m_nDockBarID;
- int m_cxEdge;
- BOOL m_bHasGripper;
- int m_cyGripper;
- CRect m_rectGripper;
+ BOOL m_bInRecalcNC;
+ UINT m_nDockBarID;
+ int m_cxEdge;
+ BOOL m_bHasGripper;
+ int m_cyGripper;
+ CRect m_rectGripper;
public:
void CreateGroupsBar();
@@ -89,9 +90,13 @@ public:
CTransToolBar m_wndGroupsBar;
CySplitterWnd m_wndSplitter;
+ CTreeCtrl m_PiecesTree;
+
char m_GroupNames[32][33];
int m_nCurGroup;
+ void UpdatePiecesTree(bool SearchOnly);
+
// Generated message map functions
protected:
BOOL m_bNoContext;
@@ -99,20 +104,20 @@ protected:
int m_nPreviewHeight;
void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
void OnSelChangeColor();
- //{{AFX_MSG(CPiecesBar)
- afx_msg void OnPaint();
- afx_msg void OnNcPaint();
- afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
- afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
+ //{{AFX_MSG(CPiecesBar)
+ afx_msg void OnPaint();
+ afx_msg void OnNcPaint();
+ afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
+ afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
+ afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
+ afx_msg void OnMouseMove(UINT nFlags, CPoint point);
+ afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
+ afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
+ afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnCaptureChanged(CWnd *pWnd);
- afx_msg UINT OnNcHitTest(CPoint point);
- afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
+ afx_msg void OnCaptureChanged(CWnd *pWnd);
+ afx_msg UINT OnNcHitTest(CPoint point);
+ afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
@@ -122,7 +127,7 @@ protected:
afx_msg LONG OnSplitterMoved(UINT lParam, LONG wParam);
void OnPieceGroupClicked(UINT nID);
- DECLARE_MESSAGE_MAP()
+ DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////