home *** CD-ROM | disk | FTP | other *** search
- // gridsvw5.h : interface of the CGridSample5View class
- //
-
- // This is a part of the Objective Grid C++ Library.
- // Copyright (C) 1995,1996 ClassWorks, Stefan Hoenig.
- // All rights reserved.
- //
- // This source code is only intended as a supplement to
- // the Objective Grid Classes Reference and related
- // electronic documentation provided with the library.
- // See these sources for detailed information regarding
- // the Objective Grid product.
- //
-
-
- #ifndef _MYGRIDVW_H_
- #include "mygridvw.h"
- #endif
-
- #ifndef _GXCTRL_H_
- #include "gxctrl.h"
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CSimpleButton control
-
- class CSimpleButton: public CGXStatic
- {
- DECLARE_CONTROL(CSimpleButton)
-
- public:
- // Member functions
-
- CSimpleButton(CGXGridCore* pGrid);
- virtual ~CSimpleButton();
-
- virtual void InvertBorders(CDC* pDC, const CRect& r);
- virtual void Draw(CDC* pDC, CRect rect, ROWCOL nRow, ROWCOL nCol, const CGXStyle& style, const CGXStyle* pStandardStyle);
- virtual BOOL MouseMove(UINT nFlags, CPoint pt, UINT nHitState);
- virtual BOOL LButtonDown(UINT nFlags, CPoint pt, UINT nHitState);
- virtual BOOL RButtonDown(UINT nFlags, CPoint pt, UINT nHitState);
- virtual BOOL LButtonUp(UINT nFlags, CPoint pt, UINT nHitState);
- virtual BOOL RButtonUp(UINT nFlags, CPoint pt, UINT nHitState);
- virtual BOOL KeyPressed(UINT nMessage, UINT nChar, UINT nRepCnt = 1, UINT flags = 0);
- virtual void OnClickedButton(CGXChild* pChild);
-
- // Attributes:
- protected:
- BOOL m_bPressed;
- BOOL m_bMouseDown;
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // CBitmapBtnEdit control
-
- class CBitmapBtnEdit: public CGXEditControl
- {
- DECLARE_CONTROL(CBitmapBtnEdit)
-
- public:
- // Constructor & Destructor
- CBitmapBtnEdit(CGXGridCore* pGrid, UINT nID);
- virtual CRect GetCellRect(ROWCOL nRow, ROWCOL nCol, LPRECT rectItem = NULL, const CGXStyle* pStyle = NULL);
-
- protected:
- virtual void OnInitChilds(ROWCOL nRow, ROWCOL nCol, const CRect& rect);
- virtual void OnClickedButton(CGXChild* pChild);
- virtual BOOL OnValidate();
-
- // Attributes:
- // Use CGXDIBitmapButton instead of CGXBitmapButton
- CGXDIBitmapButtonChild* m_pButton;
- CSize m_sizeBtn;
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CBitmapBtnEdit)
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // CArrowRowHeader control
-
- class CArrowRowHeader : public CGXControl
- {
- // Runtime Type Information
- DECLARE_CONTROL(CArrowRowHeader)
-
- public:
- CArrowRowHeader(CGXGridCore* pGrid);
-
- // event handler
- virtual void Draw(CDC* pDC, CRect rect, ROWCOL nRow, ROWCOL nCol, const CGXStyle& style, const CGXStyle* pStandardStyle);
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyComboBox control
-
- class CMyComboBox : public CGXComboBox
- {
- DECLARE_CONTROL(CMyComboBox)
- public:
- CMyComboBox(CGXGridCore* pGrid, UINT nEditID, UINT nListBoxID, UINT nFlags);
- void Init(ROWCOL nRow, ROWCOL nCol);
- BOOL OnCommand(WPARAM wParam, LPARAM lParam);
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // COwnerDrawnComboBox window
-
- class COwnerDrawnComboBox : public CGXComboBoxWnd
- {
- DECLARE_CONTROL(COwnerDrawnComboBox)
-
- // Construction
- public:
- COwnerDrawnComboBox(CGXGridCore* pGrid);
-
- // Attributes
- public:
-
- // Operations
- public:
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(COwnerDrawnComboBox)
- public:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- //}}AFX_VIRTUAL
-
- // Implementation
- public:
- virtual ~COwnerDrawnComboBox();
- virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(COwnerDrawnComboBox)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_MSG
-
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // CGridSample5View view
-
- class CGridSample5View : public CMyGridView
- {
- protected: // create from serialization only
- CGridSample5View();
- DECLARE_DYNCREATE(CGridSample5View)
-
- // Attributes
- public:
- CGridSampleDoc* GetDocument();
-
- // Operations
- BOOL ConnectParam();
- void SetupControls();
-
- // Implementation
- public:
- virtual ~CGridSample5View();
- virtual void OnInitialUpdate();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CGridSample5View)
- afx_msg void OnViewUseractions();
- afx_msg void OnViewSplitterview();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- #ifndef _DEBUG // debug version in gridsvw.cpp
- inline CGridSampleDoc* CGridSample5View::GetDocument()
- { return (CGridSampleDoc*) m_pDocument; }
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
-