1 | /* |
---|
2 | ----------------------------------------------------------------------------- |
---|
3 | This source file is part of LEXIExporter |
---|
4 | |
---|
5 | Copyright 2006 NDS Limited |
---|
6 | |
---|
7 | Author(s): |
---|
8 | Mark Folkenberg, |
---|
9 | Bo Krohn |
---|
10 | |
---|
11 | This program is free software; you can redistribute it and/or modify it under |
---|
12 | the terms of the GNU Lesser General Public License as published by the Free Software |
---|
13 | Foundation; either version 2 of the License, or (at your option) any later |
---|
14 | version. |
---|
15 | |
---|
16 | This program is distributed in the hope that it will be useful, but WITHOUT |
---|
17 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
18 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
---|
19 | |
---|
20 | You should have received a copy of the GNU Lesser General Public License along with |
---|
21 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
22 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to |
---|
23 | http://www.gnu.org/copyleft/lesser.txt. |
---|
24 | ----------------------------------------------------------------------------- |
---|
25 | */ |
---|
26 | |
---|
27 | #ifndef __NDS_LexiExporter_Dialog_ExporterProperties__ |
---|
28 | #define __NDS_LexiExporter_Dialog_ExporterProperties__ |
---|
29 | |
---|
30 | // |
---|
31 | |
---|
32 | class CExporterPropertiesDlg : public GDI::Dialog |
---|
33 | { |
---|
34 | public: |
---|
35 | CExporterPropertiesDlg(Window* pParent, Interface* pMax, IUtil* pMaxUtil, CExportObjectRoot *pRoot); |
---|
36 | ~CExporterPropertiesDlg(); |
---|
37 | |
---|
38 | public: |
---|
39 | |
---|
40 | bool m_bChanges; |
---|
41 | |
---|
42 | void PopulateExportTree(); |
---|
43 | // void AddToExportTree(unsigned int iConfigIndex); |
---|
44 | // void UpdateItemInList(int iIndex); |
---|
45 | |
---|
46 | // Accessible for AddMultiple Dialog |
---|
47 | Interface* m_pMax; |
---|
48 | IUtil* m_pMaxUtil; |
---|
49 | std::vector<CExportObject*> m_lTypeCache; |
---|
50 | |
---|
51 | protected: |
---|
52 | void OnInitDialog(); |
---|
53 | bool OnValidate(); |
---|
54 | void OnSize(); |
---|
55 | void OnConfigButtonAdd(); |
---|
56 | void OnConfigButtonAddSelected(); |
---|
57 | void OnConfigButtonRemove(); |
---|
58 | void OnLoadSelection(); |
---|
59 | void OnConfigButtonSettings(); |
---|
60 | void OnConfigButtonExport(); |
---|
61 | void OnConfigButtonExportSelected(); |
---|
62 | void OnViewLog(); |
---|
63 | void OnSelChange(); |
---|
64 | void OnCheckChange(HTREEITEM hItem); |
---|
65 | void OnRClickTree(); |
---|
66 | void OnDataChange(); |
---|
67 | void OnButtonAdd(GDI::Button* pButton, unsigned int iSelectedID); |
---|
68 | |
---|
69 | void AddObjectToTree(CExportObject *pObject, HTREEITEM hParent); |
---|
70 | void InternalCreate(int iTypeIndex, HTREEITEM hParent, unsigned int iSelectedID); |
---|
71 | void InternalRemove(HTREEITEM hItem); |
---|
72 | void UpdateEditWindow(); |
---|
73 | void GetSubItems(HTREEITEM hParent, std::vector<HTREEITEM> &lList); |
---|
74 | |
---|
75 | private: |
---|
76 | // Image list for icons in the treectrl |
---|
77 | HIMAGELIST m_hImageList; |
---|
78 | std::map<std::string, unsigned int> m_ImageListMap; |
---|
79 | |
---|
80 | // UI controls |
---|
81 | GDI::Button m_ButtonAdd; |
---|
82 | GDI::Button m_ButtonAddSelected; |
---|
83 | GDI::Button m_ButtonRemove; |
---|
84 | GDI::Button m_ButtonSettings; |
---|
85 | GDI::Button m_ButtonExport; |
---|
86 | GDI::Button m_ButtonLoadSelection; |
---|
87 | GDI::Button m_ButtonExportSelected; |
---|
88 | GDI::TreeCtrl m_ExportTree; |
---|
89 | GDI::Window *m_pCurrentEditWindow; |
---|
90 | |
---|
91 | CExportObjectRoot *m_pRoot; |
---|
92 | HTREEITEM m_hRootItem; |
---|
93 | |
---|
94 | // Currently selected ExportObject |
---|
95 | CExportObject* m_pCurrent; |
---|
96 | |
---|
97 | // Last object to have edit control displayed |
---|
98 | CExportObject* m_pLastEditObject; |
---|
99 | |
---|
100 | // Original Client Rectangle (initialize in OnInitDialog()) |
---|
101 | RECT m_OrgClientRect; |
---|
102 | |
---|
103 | // |
---|
104 | static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); |
---|
105 | |
---|
106 | }; |
---|
107 | |
---|
108 | // |
---|
109 | |
---|
110 | #endif // __NDS_LexiExporter_Dialog_ExporterProperties__ |
---|