OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [configtool/] [common/] [win32/] [cellview.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
//===========================================================================
23
//#####DESCRIPTIONBEGIN####
24
//
25
// Author(s):   sdf
26
// Contact(s):  sdf
27
// Date:                1998/08/11
28
// Version:             0.01
29
// Purpose:     
30
// Description: Interface of a the cell window view class
31
// Requires:    
32
// Provides:    
33
// See also:    
34
// Known bugs:  
35
// Usage:       
36
//
37
//####DESCRIPTIONEND####
38
//
39
//===========================================================================
40
#if !defined(AFX_CELLVIEW_H__71506369_375A_11D2_80C1_00A0C949ADAC__INCLUDED_)
41
#define AFX_CELLVIEW_H__71506369_375A_11D2_80C1_00A0C949ADAC__INCLUDED_
42
 
43
#if _MSC_VER >= 1000
44
#pragma once
45
#endif // _MSC_VER >= 1000
46
// CellView.h : header file
47
//
48
 
49
/////////////////////////////////////////////////////////////////////////////
50
// CCellView view
51
class CConfigItem;
52
class CCell;
53
#include "ControlView.h"
54
#include "ConfigTool.h"
55
 
56
class CCellView : public CView
57
{
58
protected:
59
        // Convert an HTREEITEM to a CConfigItem:
60
        CConfigItem &TI (HTREEITEM h) const {
61
        return *(CConfigItem *)(CConfigTool::GetControlView()->GetItemData(h));
62
    }
63
 
64
        CCellView();           // protected constructor used by dynamic creation
65
        DECLARE_DYNCREATE(CCellView)
66
 
67
        // Create a control for in-cell editing:
68
        BOOL InCell(HTREEITEM h);
69
 
70
        // Get the value from the cell control
71
        ItemIntegerType GetCellValue() const;
72
 
73
        // retrieve the bounding rectangle for hItem
74
        void GetItemRect(HTREEITEM hItem,CRect & rect) const;
75
 
76
        // bounding rectangle for cells (this is a little smaller than the item rectangle
77
        // in the case of editboxes).  bDropped tells us what we want to know about comboboxes
78
        void GetInCellRect(HTREEITEM h, CRect & rect,BOOL bDropped=TRUE) const;
79
 
80
        int m_nFirstVisibleItem;
81
 
82
    CPen m_GrayPen;
83
 
84
// Attributes
85
public:
86
 
87
        // return the handle of the item with an in-cell edit control, or NULL if none
88
        HTREEITEM ActiveCell() const { return m_hInCell; }
89
 
90
// Operations
91
public:
92
 
93
        // Scroll to match our buddy
94
        void Sync();
95
 
96
        // Destroy any in-cell editing
97
        void CancelCellEdit(bool bApplyChanges=true);
98
 
99
// Overrides
100
        // ClassWizard generated virtual function overrides
101
        //{{AFX_VIRTUAL(CCellView)
102
        public:
103
        virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
104
        virtual BOOL PreTranslateMessage(MSG* pMsg);
105
        protected:
106
        virtual void OnDraw(CDC* pDC);      // overridden to draw this view
107
        virtual void OnInitialUpdate();     // first time after construct
108
        virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
109
        //}}AFX_VIRTUAL
110
 
111
// Implementation
112
protected:
113
        CString m_strInitialCell;
114
        HTREEITEM HitTest();
115
        bool m_bComboSellPending;
116
        CCell * m_pwndCell;   // Window for the in-cell editing
117
        HTREEITEM m_hInCell; // hItem being in-cell edited
118
        virtual ~CCellView();
119
#ifdef _DEBUG
120
        virtual void AssertValid() const;
121
        virtual void Dump(CDumpContext& dc) const;
122
#endif
123
 
124
        // Generated message map functions
125
        //{{AFX_MSG(CCellView)
126
        afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
127
        afx_msg void OnSize(UINT nType, int cx, int cy);
128
        afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
129
        afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
130
        afx_msg void OnMouseMove(UINT nFlags, CPoint point);
131
        afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
132
    afx_msg void OnEditFind();
133
    afx_msg void OnEditFindAgain();
134
        afx_msg void OnUpdateEditFindAgain(CCmdUI* pCmdUI);
135
        afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
136
        afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
137
        afx_msg BOOL OnEraseBkgnd(CDC* pDC);
138
        afx_msg void OnEditCopy();
139
        afx_msg void OnEditCut();
140
        afx_msg void OnEditPaste();
141
        afx_msg void OnEditDelete();
142
        afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
143
        afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
144
        afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
145
        afx_msg void OnUpdateEditDelete(CCmdUI* pCmdUI);
146
        afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
147
  afx_msg LRESULT OnCancelEdit(WPARAM wParam, LPARAM);
148
        //}}AFX_MSG
149
        DECLARE_MESSAGE_MAP()
150
};
151
 
152
/////////////////////////////////////////////////////////////////////////////
153
 
154
//{{AFX_INSERT_LOCATION}}
155
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
156
 
157
#endif // !defined(AFX_CELLVIEW_H__71506369_375A_11D2_80C1_00A0C949ADAC__INCLUDED_)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.