2 ===========================================================================
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
26 ===========================================================================
28 #ifndef __DIALOGTEXTURES_H
29 #define __DIALOGTEXTURES_H
31 // DialogTextures.h : header file
37 /////////////////////////////////////////////////////////////////////////////
38 // CDialogTextures dialog
40 class CDialogTextures : public CDialog
44 enum { NONE, TEXTURES, MATERIALS, MODELS, SCRIPTS, SOUNDS, SOUNDPARENT, GUIS, PARTICLES, FX,NUMIDS };
45 static const char *TypeNames[NUMIDS];
46 CDialogTextures(CWnd* pParent = NULL); // standard constructor
48 void CollapseEditor();
49 void SelectCurrentItem(bool collapse, const char *name, int id);
51 //{{AFX_DATA(CDialogTextures)
52 enum { IDD = IDD_DIALOG_TEXTURELIST };
53 CButton m_chkHideRoot;
56 idGLWidget m_wndPreview;
57 CTreeCtrl m_treeTextures;
61 idGLDrawable m_testDrawable;
62 idGLDrawableMaterial m_drawMaterial;
63 idGLDrawableModel m_drawModel;
64 const idMaterial *editMaterial;
73 // ClassWizard generated virtual function overrides
74 //{{AFX_VIRTUAL(CDialogTextures)
76 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
77 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
82 void addStrList(const char *root, const idStrList &list, int id);
83 void addScripts(bool rootItems);
84 void addModels(bool rootItems);
85 void addMaterials(bool rootItems);
86 void addSounds(bool rootItems);
87 void addGuis(bool rootItems);
88 void addParticles(bool rootItems);
90 void CollapseChildren(HTREEITEM parent);
91 const char *buildItemName(HTREEITEM item, const char *rootName);
92 bool loadTree( HTREEITEM item, const idStr &name, CWaitDlg *dlg );
93 HTREEITEM findItem(const char *name, HTREEITEM item, HTREEITEM *foundItem);
94 // Generated message map functions
95 //{{AFX_MSG(CDialogTextures)
97 virtual BOOL OnInitDialog();
98 afx_msg void OnLoad();
99 afx_msg void OnRefresh();
100 afx_msg void OnClickTreeTextures(NMHDR* pNMHDR, LRESULT* pResult);
101 afx_msg void OnSelchangedTreeTextures(NMHDR* pNMHDR, LRESULT* pResult);
102 afx_msg void OnDblclkTreeTextures(NMHDR* pNMHDR, LRESULT* pResult);
103 afx_msg void OnPreview();
104 afx_msg void OnMaterialEdit();
105 afx_msg void OnMaterialInfo();
106 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
107 afx_msg void OnSize(UINT nType, int cx, int cy);
108 afx_msg void OnCheckHideroot();
110 DECLARE_MESSAGE_MAP()
112 idHashTable<HTREEITEM> quickTree;
116 virtual BOOL PreTranslateMessage(MSG* pMsg);
117 afx_msg void OnSetFocus(CWnd* pOldWnd);
118 afx_msg void OnNMRclickTreeTextures(NMHDR *pNMHDR, LRESULT *pResult);
121 //{{AFX_INSERT_LOCATION}}
122 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
124 #endif // !defined(AFX_DIALOGTEXTURES_H__F3F3F984_E47E_11D1_B61B_00AA00A410FC__INCLUDED_)