doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PreviewDlg.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 #pragma once
29 #include "afxcmn.h"
30 #include "afxwin.h"
31 
32 
33 // CPreviewDlg dialog
34 
35 struct CommentedItem {
39 };
40 
41 class CPreviewDlg : public CDialog
42 {
43 public:
45  CPreviewDlg(CWnd* pParent = NULL); // standard constructor
46  virtual ~CPreviewDlg();
47  void SetMode( int mode, const char *preSelect = NULL );
48  void RebuildTree( const char *data );
49  void SetDisablePreview( bool b ) {
50  disablePreview = b;
51  }
52 
55 
56  bool Waiting();
57  void SetModal();
58 // Dialog Data
59  enum { IDD = IDD_DIALOG_PREVIEW };
60 private:
61  DECLARE_DYNAMIC(CPreviewDlg)
62 
63  CTreeCtrl treeMedia;
64  CEdit editInfo;
65  HTREEITEM commentItem;
66  CImageList m_image;
71  idHashTable<HTREEITEM> quickTree;
73  virtual BOOL OnInitDialog();
75  void AddCommentedItems();
78 
79 protected:
80  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
81  void BuildTree();
82  void AddStrList(const char *root, const idStrList &list, int type);
83  void AddSounds(bool rootItems);
84  void AddMaterials(bool rootItems);
85  void AddParticles(bool rootItems);
86  void AddSkins( bool rootItems );
87 
88  DECLARE_MESSAGE_MAP()
89 
90 public:
91  afx_msg void OnTvnSelchangedTreeMedia(NMHDR *pNMHDR, LRESULT *pResult);
92  virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
93 protected:
94  virtual void OnCancel();
95  virtual void OnOK();
96  virtual void OnShowWindow( BOOL bShow, UINT status );
97 public:
98  afx_msg void OnBnClickedButtonReload();
99  afx_msg void OnBnClickedButtonAdd();
100  afx_msg void OnBnClickedButtonPlay();
101 };
CTreeCtrl treeMedia
Definition: PreviewDlg.h:63
int returnCode
Definition: PreviewDlg.h:54
void BuildTree()
Definition: PreviewDlg.cpp:102
void AddMaterials(bool rootItems)
Definition: PreviewDlg.cpp:596
void AddParticles(bool rootItems)
Definition: PreviewDlg.cpp:616
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
int currentMode
Definition: PreviewDlg.h:74
HTREEITEM commentItem
Definition: PreviewDlg.h:65
#define const
Definition: getdate.c:251
virtual void DoDataExchange(CDataExchange *pDX)
Definition: PreviewDlg.cpp:56
CImageList m_image
Definition: PreviewDlg.h:66
idGLDrawableModel m_drawModel
Definition: PreviewDlg.h:69
idStr mediaName
Definition: PreviewDlg.h:53
GLuint GLuint GLsizei GLenum type
Definition: glext.h:2845
void SetMode(int mode, const char *preSelect=NULL)
Definition: PreviewDlg.cpp:527
virtual BOOL OnInitDialog()
Definition: PreviewDlg.cpp:75
#define BOOL
Definition: mprintf.c:71
void AddSounds(bool rootItems)
Definition: PreviewDlg.cpp:490
void RebuildTree(const char *data)
Definition: PreviewDlg.cpp:135
void SetModal()
Definition: PreviewDlg.cpp:445
void AddCommentedItems()
Definition: PreviewDlg.cpp:141
bool Waiting()
Definition: PreviewDlg.cpp:440
#define NULL
Definition: Lib.h:88
void AddStrList(const char *root, const idStrList &list, int type)
Definition: PreviewDlg.cpp:179
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:2853
virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd *pParentWnd=NULL)
Definition: PreviewDlg.cpp:409
GLint mode
Definition: glext.h:4165
void AddSkins(bool rootItems)
Definition: PreviewDlg.cpp:634
idGLWidget wndPreview
Definition: PreviewDlg.h:70
GLubyte GLubyte b
Definition: glext.h:4662
afx_msg void OnBnClickedButtonAdd()
Definition: PreviewDlg.cpp:454
idGLDrawable m_testDrawable
Definition: PreviewDlg.h:67
void SetDisablePreview(bool b)
Definition: PreviewDlg.h:49
CPreviewDlg(CWnd *pParent=NULL)
Definition: PreviewDlg.cpp:45
Definition: Str.h:116
afx_msg void OnBnClickedButtonPlay()
Definition: PreviewDlg.cpp:592
virtual ~CPreviewDlg()
Definition: PreviewDlg.cpp:52
CEdit editInfo
Definition: PreviewDlg.h:64
idHashTable< HTREEITEM > quickTree
Definition: PreviewDlg.h:71
#define protected
Definition: TypeInfo.cpp:31
afx_msg void OnTvnSelchangedTreeMedia(NMHDR *pNMHDR, LRESULT *pResult)
Definition: PreviewDlg.cpp:279
idStr Comments
Definition: PreviewDlg.h:38
Definition: List.h:84
idList< CommentedItem > items
Definition: PreviewDlg.h:72
idGLDrawableMaterial m_drawMaterial
Definition: PreviewDlg.h:68
virtual void OnCancel()
Definition: PreviewDlg.cpp:416
bool disablePreview
Definition: PreviewDlg.h:77
virtual void OnOK()
Definition: PreviewDlg.cpp:428
#define IDD_DIALOG_PREVIEW
afx_msg void OnBnClickedButtonReload()
Definition: PreviewDlg.cpp:448
virtual void OnShowWindow(BOOL bShow, UINT status)
Definition: PreviewDlg.cpp:665