doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DialogTextures.h
Go to the documentation of this file.
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 
38 // CDialogTextures dialog
39 
40 class CDialogTextures : public CDialog
41 {
42 // Construction
43 public:
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)
53  CButton m_chkHideRoot;
54  CButton m_btnRefresh;
55  CButton m_btnLoad;
57  CTreeCtrl m_treeTextures;
58  //}}AFX_DATA
59 
60  CImageList m_image;
68  bool setTexture;
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;
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_)
#define IDD_DIALOG_TEXTURELIST
afx_msg void OnMaterialEdit()
CButton m_btnRefresh
void SelectCurrentItem(bool collapse, const char *name, int id)
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
const char * buildItemName(HTREEITEM item, const char *rootName)
void addScripts(bool rootItems)
virtual void DoDataExchange(CDataExchange *pDX)
CImageList m_image
afx_msg void OnClickTreeTextures(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnSetFocus(CWnd *pOldWnd)
HTREEITEM findItem(const char *name, HTREEITEM item, HTREEITEM *foundItem)
#define BOOL
Definition: mprintf.c:71
idGLWidget m_wndPreview
idGLDrawableMaterial m_drawMaterial
afx_msg void OnPreview()
afx_msg void OnLoad()
afx_msg void OnMaterialInfo()
void addParticles(bool rootItems)
void addModels(bool rootItems)
#define NULL
Definition: Lib.h:88
afx_msg void OnSelchangedTreeTextures(NMHDR *pNMHDR, LRESULT *pResult)
static const char * TypeNames[NUMIDS]
idGLDrawableModel m_drawModel
afx_msg void OnNMRclickTreeTextures(NMHDR *pNMHDR, LRESULT *pResult)
idHashTable< HTREEITEM > quickTree
idGLDrawable m_testDrawable
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
afx_msg void OnCheckHideroot()
bool loadTree(HTREEITEM item, const idStr &name, CWaitDlg *dlg)
virtual void OnOK()
CButton m_chkHideRoot
const idMaterial * editMaterial
const GLcharARB * name
Definition: glext.h:3629
CDialogTextures(CWnd *pParent=NULL)
void CollapseChildren(HTREEITEM parent)
void addStrList(const char *root, const idStrList &list, int id)
virtual BOOL PreCreateWindow(CREATESTRUCT &cs)
Definition: Str.h:116
afx_msg void OnSize(UINT nType, int cx, int cy)
virtual BOOL OnInitDialog()
CTreeCtrl m_treeTextures
void addSounds(bool rootItems)
void addGuis(bool rootItems)
afx_msg void OnRefresh()
virtual BOOL PreTranslateMessage(MSG *pMsg)
afx_msg void OnDblclkTreeTextures(NMHDR *pNMHDR, LRESULT *pResult)
void addMaterials(bool rootItems)