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 ===========================================================================
35 struct CommentedItem {
41 class CPreviewDlg : public CDialog
44 enum {MODELS, GUIS, SOUNDS, MATERIALS, SCRIPTS, SOUNDPARENT, WAVES, PARTICLES, MODELPARENT, GUIPARENT, COMMENTED, SKINS};
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 ) {
59 enum { IDD = IDD_DIALOG_PREVIEW };
61 DECLARE_DYNAMIC(CPreviewDlg)
65 HTREEITEM commentItem;
67 idGLDrawable m_testDrawable;
68 idGLDrawableMaterial m_drawMaterial;
69 idGLDrawableModel m_drawModel;
70 idGLWidget wndPreview;
71 idHashTable<HTREEITEM> quickTree;
72 idList<CommentedItem> items;
73 virtual BOOL OnInitDialog();
75 void AddCommentedItems();
80 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
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 );
91 afx_msg void OnTvnSelchangedTreeMedia(NMHDR *pNMHDR, LRESULT *pResult);
92 virtual BOOL Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
94 virtual void OnCancel();
96 virtual void OnShowWindow( BOOL bShow, UINT status );
98 afx_msg void OnBnClickedButtonReload();
99 afx_msg void OnBnClickedButtonAdd();
100 afx_msg void OnBnClickedButtonPlay();