]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/radiant/DialogTextures.h
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / tools / radiant / DialogTextures.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
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.
13
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.
18
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/>.
21
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.
23
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.
25
26 ===========================================================================
27 */
28 #ifndef __DIALOGTEXTURES_H
29 #define __DIALOGTEXTURES_H
30
31 // DialogTextures.h : header file
32 //
33
34 #include <afxtempl.h>
35 #include "GLWidget.h"
36
37 /////////////////////////////////////////////////////////////////////////////
38 // CDialogTextures dialog
39
40 class CDialogTextures : public CDialog
41 {
42 // Construction
43 public:
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
47         void OnCancel();
48         void CollapseEditor();
49         void SelectCurrentItem(bool collapse, const char *name, int id);
50 // Dialog Data
51         //{{AFX_DATA(CDialogTextures)
52         enum { IDD = IDD_DIALOG_TEXTURELIST };
53         CButton m_chkHideRoot;
54         CButton m_btnRefresh;
55         CButton m_btnLoad;
56         idGLWidget m_wndPreview;
57         CTreeCtrl       m_treeTextures;
58         //}}AFX_DATA
59
60         CImageList m_image;
61         idGLDrawable m_testDrawable;
62         idGLDrawableMaterial m_drawMaterial;
63         idGLDrawableModel m_drawModel;
64         const idMaterial *editMaterial;
65         idStr editGui;
66         idStr currentFile;
67         idStr mediaName;
68         bool setTexture;
69         bool ignoreCollapse;
70         int mode;
71
72 // Overrides
73         // ClassWizard generated virtual function overrides
74         //{{AFX_VIRTUAL(CDialogTextures)
75         protected:
76         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
77         virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
78         //}}AFX_VIRTUAL
79
80 // Implementation
81 protected:
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);
89         void BuildTree();
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)
96         virtual void OnOK();
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();
109         //}}AFX_MSG
110         DECLARE_MESSAGE_MAP()
111
112         idHashTable<HTREEITEM>  quickTree;
113         idStr                                   itemName;
114
115 public:
116         virtual BOOL PreTranslateMessage(MSG* pMsg);
117         afx_msg void OnSetFocus(CWnd* pOldWnd);
118         afx_msg void OnNMRclickTreeTextures(NMHDR *pNMHDR, LRESULT *pResult);
119 };
120
121 //{{AFX_INSERT_LOCATION}}
122 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
123
124 #endif // !defined(AFX_DIALOGTEXTURES_H__F3F3F984_E47E_11D1_B61B_00AA00A410FC__INCLUDED_)