Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / tools / leveldesign / georges_dll / left_view.h
bloba4c8b0b13e085715fd438de5c5b27c4a7e401d07
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #if !defined(AFX_LEFTVIEW_H__5D7BB0E1_ADB3_42FF_AD3D_4ACDF282BA21__INCLUDED_)
18 #define AFX_LEFTVIEW_H__5D7BB0E1_ADB3_42FF_AD3D_4ACDF282BA21__INCLUDED_
20 #if _MSC_VER > 1000
21 #pragma once
22 #endif // _MSC_VER > 1000
24 class CGeorgesEditDoc;
25 class CGeorgesEditView;
26 class CGeorgesEditDocSub;
28 class CLeftView : public CView
30 protected: // create from serialization only
31 CLeftView ();
32 DECLARE_DYNCREATE(CLeftView)
34 // Attributes
35 public:
36 CGeorgesEditDoc* GetDocument();
38 // Update the tree structure
39 void getFromDocument ();
41 // Get the current selection Id. If no selection, return 0xffffffff.
42 uint getCurrentSelectionId (uint *count=NULL, HTREEITEM item = NULL);
44 // Set the current selection Id. Return true if the node has been found.
45 bool setCurrentSelectionId (uint id, HTREEITEM item = NULL);
47 // Return the seledcted sub object. Called by CGeorgesEditDoc::getSelectedObject ().
48 CGeorgesEditDocSub *getSelectedObject ();
50 // Change the sub seletion. Called by CGeorgesEditDoc::changeSubSelection ().
51 bool changeSubSelection (CGeorgesEditDocSub *sub, HTREEITEM item = NULL);
53 // Change the sub seletion. Called by CGeorgesEditDoc::changeSubSelection ().
54 bool changeSubSelection (uint &sub, HTREEITEM item = NULL);
56 // Expand // Collapse
57 void expand ();
58 void expand (HTREEITEM item);
59 void collapse (HTREEITEM item);
61 private:
63 // Recurse sub object tree called by getFromDocument
64 void getSubObject (CGeorgesEditDocSub *subObject, HTREEITEM parent, HTREEITEM item);
66 CTreeCtrl TreeCtrl;
68 // Operations
69 public:
71 // Overrides
72 // ClassWizard generated virtual function overrides
73 //{{AFX_VIRTUAL(CLeftView)
74 public:
75 virtual void OnDraw(CDC* pDC); // overridden to draw this view
76 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
77 virtual BOOL PreTranslateMessage(MSG* pMsg);
78 protected:
79 virtual void OnInitialUpdate(); // called first time after construct
80 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
81 virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
82 //}}AFX_VIRTUAL
84 // Implementation
85 public:
86 virtual ~CLeftView();
87 #ifdef _DEBUG
88 virtual void AssertValid() const;
89 virtual void Dump(CDumpContext& dc) const;
90 #endif
92 protected:
94 // Generated message map functions
95 protected:
96 //{{AFX_MSG(CLeftView)
97 afx_msg void OnSize(UINT nType, int cx, int cy);
98 afx_msg void OnSetFocus(CWnd* pOldWnd);
99 afx_msg void OnEditCopy();
100 afx_msg void OnEditPaste();
101 afx_msg void OnEditCut();
102 afx_msg void OnInsert();
103 afx_msg void OnDelete();
104 afx_msg void OnEditRedo();
105 afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
106 afx_msg void OnEditUndo();
107 afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
108 afx_msg void OnEditRename();
109 afx_msg void OnEditFetch1();
110 afx_msg void OnEditFetch2();
111 afx_msg void OnEditFetch3();
112 afx_msg void OnEditFetch4();
113 afx_msg void OnEditHold1();
114 afx_msg void OnEditHold2();
115 afx_msg void OnEditHold3();
116 afx_msg void OnEditHold4();
117 afx_msg void OnEditCollapseall();
118 afx_msg void OnEditExpandall();
119 //}}AFX_MSG
120 DECLARE_MESSAGE_MAP()
123 #ifndef _DEBUG // debug version in LeftView.cpp
124 inline CGeorgesEditDoc* CLeftView::GetDocument()
125 { return (CGeorgesEditDoc*)m_pDocument; }
126 #endif
128 /////////////////////////////////////////////////////////////////////////////
130 //{{AFX_INSERT_LOCATION}}
131 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
133 #endif // !defined(AFX_LEFTVIEW_H__5D7BB0E1_ADB3_42FF_AD3D_4ACDF282BA21__INCLUDED_)