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

Subversion Repositories openrisc

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

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 the tree (control) view class
31
// Requires:    
32
// Provides:    
33
// See also:    
34
// Known bugs:  
35
// Usage:       
36
//
37
//####DESCRIPTIONEND####
38
//
39
//===========================================================================
40
#if !defined(AFX_CONTROLVIEW_H__A4845250_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)
41
#define AFX_CONTROLVIEW_H__A4845250_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_
42
 
43
#if _MSC_VER >= 1000
44
#pragma once
45
#endif // _MSC_VER >= 1000
46
// ControlView.h : header file
47
//
48
/////////////////////////////////////////////////////////////////////////////
49
// CControlView view
50
class CConfigItem;
51
#include <afxcview.h>
52
 
53
class CCellView;
54
class CConfigToolDoc;
55
class CConfigViewOptionsDialog;
56
class CFindDialog;
57
 
58
class CControlView : public CTreeView
59
{
60
  friend class CConfigItem;
61
protected:
62
        CControlView();           // protected constructor used by dynamic creation
63
        DECLARE_DYNCREATE(CControlView)
64
 
65
// Attributes
66
public:
67
// Attributes
68
        // Let us use the View as a control:
69
        #include "TreeCtrlToView.inl"   
70
    friend class CCellView;
71
// Operations
72
public:
73
        int GetItemHeight() const { return m_nItemHeight; }
74
        CConfigItem &TI (HTREEITEM h) const {
75
                return *(CConfigItem *)GetItemData(h);
76
        }
77
 
78
        BOOL IsActive(HTREEITEM h) const;
79
 
80
// Overrides
81
        // ClassWizard generated virtual function overrides
82
        //{{AFX_VIRTUAL(CControlView)
83
        public:
84
        virtual void OnInitialUpdate();
85
        virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
86
        virtual BOOL PreTranslateMessage(MSG* pMsg);
87
        protected:
88
        virtual void OnDraw(CDC* pDC);      // overridden to draw this view
89
        virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
90
        //}}AFX_VIRTUAL
91
 
92
// Implementation
93
protected:
94
        void Refresh (HTREEITEM h);
95
  CPen m_GrayPen;
96
        int m_nMaxWidth;
97
        BOOL m_bHasHScroll;
98
        void SetHScrollPos();
99
        void SetHScrollRangePos();
100
        BOOL m_bHasVScroll;
101
        void SetScrollRangePos();
102
        void SetScrollPos();
103
        void KillScrollBars();
104
        virtual ~CControlView();
105
#ifdef _DEBUG
106
        virtual void AssertValid() const;
107
        virtual void Dump(CDumpContext& dc) const;
108
#endif
109
 
110
        // Generated message map functions
111
protected:
112
        void ShowPopupMenu (HTREEITEM h,CPoint point=CPoint(-1,-1));
113
        void RecalcWorkSpaceSize();
114
        int m_TreeXOffsetAdjustment;
115
        int m_nWorkspace; // Height of the virtual workspace
116
        int TotalDescendantHeight(HTREEITEM hItem)const; // Visible height of descendants (not including hItem itself)
117
        CSize m_Size;
118
        int m_nItemHeight; // Height of an item (can use GetItemHeight() in IE4)
119
        bool BumpItem (HTREEITEM h,int nInc=1); // Increment the item (do what clicking on the icon achieves)
120
        void AdjustItemImage (HTREEITEM h);
121
protected:
122
        bool m_bFindInProgress;
123
        static bool IsWordChar (TCHAR c);
124
    CConfigItem *DoFind(LPCTSTR pszWhat,DWORD dwFlags,WhereType where);
125
        HTREEITEM m_hExpandedForFind;
126
        CConfigToolDoc * GetDocument();
127
        void InvalidateItem (HTREEITEM h);
128
        BOOL IsChanged (HTREEITEM h, BOOL bRecurse);
129
        void RestoreDefault (HTREEITEM h, BOOL bRecurse = FALSE, BOOL bTopLevel = TRUE);
130
        HTREEITEM m_hContext; // Where the right-click occurred
131
        ItemIntegerType Value(HTREEITEM h) const; // Value (taking into account any in-cell activity)
132
        CImageList m_il; // Image list for the control
133
        //{{AFX_MSG(CControlView)
134
        afx_msg void OnPaint();
135
        afx_msg void OnItemexpanded(NMHDR* pNMHDR, LRESULT* pResult);
136
        afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
137
        afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
138
        afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
139
        afx_msg void OnSize(UINT nType, int cx, int cy);
140
        afx_msg void OnRestoreDefaults();
141
        afx_msg void OnPopupProperties();
142
        afx_msg void OnUnload();
143
  afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
144
        afx_msg void OnViewUrl();
145
        afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
146
        afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
147
        afx_msg void OnMouseMove(UINT nFlags, CPoint point);
148
        afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
149
        afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
150
        afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
151
        afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
152
        afx_msg void OnSysChar(UINT nChar, UINT nRepCnt, UINT nFlags);
153
        afx_msg void OnViewHeader();
154
  afx_msg LONG OnFind(WPARAM wParam, LPARAM lParam);
155
        afx_msg void OnEditFind();
156
        afx_msg void OnEditFindAgain();
157
        afx_msg void OnUpdateEditFindAgain(CCmdUI* pCmdUI);
158
        afx_msg void OnUpdateEditFind(CCmdUI* pCmdUI);
159
        afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
160
        afx_msg void OnDeleteitem(NMHDR* pNMHDR, LRESULT* pResult);
161
        afx_msg void OnWhatsThis();
162
        afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
163
        afx_msg LRESULT OnMenuChar(UINT nChar, UINT nFlags, CMenu* pMenu);
164
        //}}AFX_MSG
165
    afx_msg LRESULT OnSetFont(WPARAM, LPARAM lParam);
166
public:
167
        void Refresh (LPCTSTR pszMacroName);
168
        bool SelectItem (const CConfigItem *pItem);
169
        DECLARE_MESSAGE_MAP()
170
private:
171
};
172
 
173
/////////////////////////////////////////////////////////////////////////////
174
 
175
//{{AFX_INSERT_LOCATION}}
176
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
177
 
178
#endif // !defined(AFX_CONTROLVIEW_H__A4845250_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)

powered by: WebSVN 2.1.0

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