doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MEMainFrame Class Reference

The main window for the material editor. More...

#include <MEMainFrame.h>

Inheritance diagram for MEMainFrame:
MaterialView

Public Member Functions

 MEMainFrame ()
 Constructor for MEMainFrame. More...
 
virtual ~MEMainFrame ()
 Destructor for MEMainFrame. More...
 
void PrintConsoleMessage (const char *msg)
 Called to add console text to the console view. More...
 
- Public Member Functions inherited from MaterialView
 MaterialView (void)
 Constructor. More...
 
virtual ~MaterialView (void)
 Destructor. More...
 
virtual void SetMaterialDocManager (MaterialDocManager *docManager)
 Sets the material document manager for this view instance. More...
 
virtual void MV_OnMaterialChange (MaterialDoc *pMaterial)
 Called when the material has changed but not applied. More...
 
virtual void MV_OnMaterialApply (MaterialDoc *pMaterial)
 Called when the material changes have been applied. More...
 
virtual void MV_OnMaterialSaved (MaterialDoc *pMaterial)
 Called when the material changes have been saved. More...
 
virtual void MV_OnMaterialSaveFile (const char *filename)
 Called when a material file has been saved. More...
 
virtual void MV_OnMaterialAdd (MaterialDoc *pMaterial)
 Called when a material is added. More...
 
virtual void MV_OnMaterialDelete (MaterialDoc *pMaterial)
 Called when a material is deleted. More...
 
virtual void MV_OnMaterialStageAdd (MaterialDoc *pMaterial, int stageNum)
 Called when a stage is added. More...
 
virtual void MV_OnMaterialStageDelete (MaterialDoc *pMaterial, int stageNum)
 Called when a stage is deleted. More...
 
virtual void MV_OnMaterialStageMove (MaterialDoc *pMaterial, int from, int to)
 Called when a stage is moved. More...
 
virtual void MV_OnMaterialAttributeChanged (MaterialDoc *pMaterial, int stage, const char *attribName)
 Called when an attribute is changed. More...
 
virtual void MV_OnMaterialNameChanged (MaterialDoc *pMaterial, const char *oldName)
 Called when the material name has changed. More...
 
virtual void MV_OnFileReload (const char *filename)
 Called when a file has been reloaded. More...
 

Protected Member Functions

virtual BOOL PreCreateWindow (CREATESTRUCT &cs)
 Sets a few window styles for the main window during the creation process. More...
 
virtual BOOL OnCreateClient (LPCREATESTRUCT lpcs, CCreateContext *pContext)
 Called by the MFC framework to allow the window to create any client windows. More...
 
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
 Called by the framework while the window is being created. More...
 
afx_msg void OnDestroy ()
 Called by the MFC framework while the window is being destroyed. More...
 
afx_msg void OnSize (UINT nType, int cx, int cy)
 Called by the MFC framework when the window size is changed. More...
 
afx_msg void OnTcnSelChange (NMHDR *pNMHDR, LRESULT *pResult)
 Called when the user changes the editor/console tab selection. More...
 
afx_msg void OnFileExit ()
 Shuts down the material editor. More...
 
afx_msg void OnFileSaveMaterial ()
 Saves the selected material. More...
 
afx_msg void OnFileSaveFile ()
 Saves the selected file. More...
 
afx_msg void OnFileSaveAll ()
 Saves all modified materials. More...
 
afx_msg void OnFileSaveMaterialUpdate (CCmdUI *pCmdUI)
 Enables the save material menu item if a material is selected and has been modified. More...
 
afx_msg void OnFileSaveFileUpdate (CCmdUI *pCmdUI)
 Enables the Save File menu item if the current file contains a modified material. More...
 
afx_msg void OnFileSaveAllUpdate (CCmdUI *pCmdUI)
 Enables the Save All menu item if there are any materials that have been modified. More...
 
afx_msg void OnApplyMaterial ()
 Apply the selected material. More...
 
afx_msg void OnApplyFile ()
 Applies all modified materials in the selected file. More...
 
afx_msg void OnApplyAll ()
 Applies all modified materials. More...
 
afx_msg void OnApplyMaterialUpdate (CCmdUI *pCmdUI)
 Enables the Apply Material menu item if the current material has an apply waiting. More...
 
afx_msg void OnApplyFileUpdate (CCmdUI *pCmdUI)
 Enables the apply file menu item if the current file contains any materials that need to be applied. More...
 
afx_msg void OnApplyAllUpdate (CCmdUI *pCmdUI)
 Enables the apply all menu item if there are any materials that need to be applied. More...
 
afx_msg void OnEditCut ()
 Performs a cut operation on the selected material. More...
 
afx_msg void OnEditCopy ()
 Performs a copy operation on the selected material or stage. More...
 
afx_msg void OnEditPaste ()
 Performs a paste operation on the selected material or stage. More...
 
afx_msg void OnEditDelete ()
 Performs a delete operation on the selected material or stage. More...
 
afx_msg void OnEditRename ()
 Performs a rename operation on the selected material or stage. More...
 
afx_msg void OnEditCutUpdate (CCmdUI *pCmdUI)
 Enable the cut menu item if a material is selected. More...
 
afx_msg void OnEditCopyUpdate (CCmdUI *pCmdUI)
 Enables the copy menu item if a material or stage is selected. More...
 
afx_msg void OnEditPasteUpdate (CCmdUI *pCmdUI)
 Enables a paste operation when a material or stage has been copied. More...
 
afx_msg void OnEditDeleteUpdate (CCmdUI *pCmdUI)
 Enables a delete operation when a material or stage is selected. More...
 
afx_msg void OnEditRenameUpdate (CCmdUI *pCmdUI)
 Enables a rename operation when a material, folder or stage is selected. More...
 
afx_msg void OnEditFind ()
 Opens the find dialog. More...
 
afx_msg void OnEditFindNext ()
 Performs a search with the previously selected search parameters. More...
 
afx_msg void OnEditUndo ()
 Performs an undo operation. More...
 
afx_msg void OnEditRedo ()
 Performs a redo operation. More...
 
afx_msg void OnEditUndoUpdate (CCmdUI *pCmdUI)
 Enables the undo menu item if an undo is available. More...
 
afx_msg void OnEditRedoUpdate (CCmdUI *pCmdUI)
 Enables the redo menu item if a redo is available. More...
 
afx_msg void OnViewIncludeFile ()
 Toggles between including the file into the material list and not. More...
 
afx_msg void OnReloadArbPrograms ()
 Executes the reloadARBPrograms console command for convinience. More...
 
afx_msg void OnReloadImages ()
 Executes the reloadImages command to reload images that have been changed outside of the editor. More...
 
void CloseFind ()
 Called by the find dialog when it is closing. More...
 
void FindNext (MaterialSearchData_t *search)
 Begins a search based on the provided parameters or the previously used parameters. More...
 
virtual void MV_OnMaterialSelectionChange (MaterialDoc *pMaterial)
 Called when the selected material has changed. More...
 

Protected Attributes

friend FindDialog
 
CStatusBar m_wndStatusBar
 
CToolBar m_wndToolBar
 
CTabCtrl m_tabs
 
CSplitterWnd m_splitterWnd
 
CSplitterWnd m_editSplitter
 
CSplitterWnd m_previewSplitter
 
CSplitterWnd * m_materialEditSplitter
 
MaterialTreeViewm_materialTreeView
 
StageViewm_stageView
 
MaterialPropTreeViewm_materialPropertyView
 
MaterialPreviewViewm_materialPreviewView
 
MaterialPreviewPropViewm_previewPropertyView
 
ConsoleViewm_consoleView
 
MaterialEditViewm_materialEditView
 
FindDialogm_find
 
MaterialSearchData_t searchData
 
MaterialDocManager materialDocManager
 
MaterialDoccurrentDoc
 
MEOptions options
 
- Protected Attributes inherited from MaterialView
MaterialDocManagermaterialDocManager
 

Detailed Description

The main window for the material editor.

Definition at line 47 of file MEMainFrame.h.

Constructor & Destructor Documentation

MEMainFrame::MEMainFrame ( )

Constructor for MEMainFrame.

Initialize some member data and load the options.

Definition at line 101 of file MEMainFrame.cpp.

MEMainFrame::~MEMainFrame ( )
virtual

Destructor for MEMainFrame.

Definition at line 114 of file MEMainFrame.cpp.

Member Function Documentation

void MEMainFrame::CloseFind ( )
protected

Called by the find dialog when it is closing.

Definition at line 906 of file MEMainFrame.cpp.

void MEMainFrame::FindNext ( MaterialSearchData_t search)
protected

Begins a search based on the provided parameters or the previously used parameters.

Definition at line 914 of file MEMainFrame.cpp.

void MEMainFrame::MV_OnMaterialSelectionChange ( MaterialDoc pMaterial)
protectedvirtual

Called when the selected material has changed.

Parameters
pMaterialThe newly selected material.

Reimplemented from MaterialView.

Definition at line 935 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyAll ( )
protected

Applies all modified materials.

Definition at line 493 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyAllUpdate ( CCmdUI *  pCmdUI)
protected

Enables the apply all menu item if there are any materials that need to be applied.

Definition at line 539 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyFile ( )
protected

Applies all modified materials in the selected file.

Definition at line 482 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyFileUpdate ( CCmdUI *  pCmdUI)
protected

Enables the apply file menu item if the current file contains any materials that need to be applied.

Definition at line 519 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyMaterial ( )
protected

Apply the selected material.

Definition at line 472 of file MEMainFrame.cpp.

void MEMainFrame::OnApplyMaterialUpdate ( CCmdUI *  pCmdUI)
protected

Enables the Apply Material menu item if the current material has an apply waiting.

Definition at line 500 of file MEMainFrame.cpp.

int MEMainFrame::OnCreate ( LPCREATESTRUCT  lpCreateStruct)
protected

Called by the framework while the window is being created.

This methods creates the tool bars and status bars /todo Bmatt Nerve: Need to get the toolbars to work correctly.

Definition at line 260 of file MEMainFrame.cpp.

BOOL MEMainFrame::OnCreateClient ( LPCREATESTRUCT  lpcs,
CCreateContext *  pContext 
)
protectedvirtual

Called by the MFC framework to allow the window to create any client windows.

This method creates all of the spliter windows and registers all of the views with the document manager.

Definition at line 142 of file MEMainFrame.cpp.

void MEMainFrame::OnDestroy ( )
protected

Called by the MFC framework while the window is being destroyed.

This method saves the splitter and window positions.

Definition at line 292 of file MEMainFrame.cpp.

void MEMainFrame::OnEditCopy ( )
protected

Performs a copy operation on the selected material or stage.

Definition at line 568 of file MEMainFrame.cpp.

void MEMainFrame::OnEditCopyUpdate ( CCmdUI *  pCmdUI)
protected

Enables the copy menu item if a material or stage is selected.

Definition at line 656 of file MEMainFrame.cpp.

void MEMainFrame::OnEditCut ( )
protected

Performs a cut operation on the selected material.

Definition at line 556 of file MEMainFrame.cpp.

void MEMainFrame::OnEditCutUpdate ( CCmdUI *  pCmdUI)
protected

Enable the cut menu item if a material is selected.

Definition at line 626 of file MEMainFrame.cpp.

void MEMainFrame::OnEditDelete ( )
protected

Performs a delete operation on the selected material or stage.

Definition at line 597 of file MEMainFrame.cpp.

void MEMainFrame::OnEditDeleteUpdate ( CCmdUI *  pCmdUI)
protected

Enables a delete operation when a material or stage is selected.

Definition at line 716 of file MEMainFrame.cpp.

void MEMainFrame::OnEditFind ( )
protected

Opens the find dialog.

Definition at line 774 of file MEMainFrame.cpp.

void MEMainFrame::OnEditFindNext ( )
protected

Performs a search with the previously selected search parameters.

Definition at line 789 of file MEMainFrame.cpp.

void MEMainFrame::OnEditPaste ( )
protected

Performs a paste operation on the selected material or stage.

Definition at line 582 of file MEMainFrame.cpp.

void MEMainFrame::OnEditPasteUpdate ( CCmdUI *  pCmdUI)
protected

Enables a paste operation when a material or stage has been copied.

Definition at line 686 of file MEMainFrame.cpp.

void MEMainFrame::OnEditRedo ( )
protected

Performs a redo operation.

Definition at line 813 of file MEMainFrame.cpp.

void MEMainFrame::OnEditRedoUpdate ( CCmdUI *  pCmdUI)
protected

Enables the redo menu item if a redo is available.

Definition at line 851 of file MEMainFrame.cpp.

void MEMainFrame::OnEditRename ( )
protected

Performs a rename operation on the selected material or stage.

Definition at line 611 of file MEMainFrame.cpp.

void MEMainFrame::OnEditRenameUpdate ( CCmdUI *  pCmdUI)
protected

Enables a rename operation when a material, folder or stage is selected.

Definition at line 747 of file MEMainFrame.cpp.

void MEMainFrame::OnEditUndo ( )
protected

Performs an undo operation.

Definition at line 796 of file MEMainFrame.cpp.

void MEMainFrame::OnEditUndoUpdate ( CCmdUI *  pCmdUI)
protected

Enables the undo menu item if an undo is available.

Definition at line 830 of file MEMainFrame.cpp.

void MEMainFrame::OnFileExit ( )
protected

Shuts down the material editor.

/todo BMatt Nerve: Need to warn the user if a file is modified.

Definition at line 383 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveAll ( )
protected

Saves all modified materials.

Definition at line 411 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveAllUpdate ( CCmdUI *  pCmdUI)
protected

Enables the Save All menu item if there are any materials that have been modified.

Definition at line 455 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveFile ( )
protected

Saves the selected file.

Definition at line 400 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveFileUpdate ( CCmdUI *  pCmdUI)
protected

Enables the Save File menu item if the current file contains a modified material.

Definition at line 438 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveMaterial ( )
protected

Saves the selected material.

Definition at line 390 of file MEMainFrame.cpp.

void MEMainFrame::OnFileSaveMaterialUpdate ( CCmdUI *  pCmdUI)
protected

Enables the save material menu item if a material is selected and has been modified.

Definition at line 418 of file MEMainFrame.cpp.

void MEMainFrame::OnReloadArbPrograms ( )
protected

Executes the reloadARBPrograms console command for convinience.

Definition at line 891 of file MEMainFrame.cpp.

void MEMainFrame::OnReloadImages ( )
protected

Executes the reloadImages command to reload images that have been changed outside of the editor.

Definition at line 899 of file MEMainFrame.cpp.

void MEMainFrame::OnSize ( UINT  nType,
int  cx,
int  cy 
)
protected

Called by the MFC framework when the window size is changed.

This method adjusts the console view so that it is always at the bottom of the window and resizes the splitter window to fit the remaining space.

Definition at line 332 of file MEMainFrame.cpp.

void MEMainFrame::OnTcnSelChange ( NMHDR *  pNMHDR,
LRESULT *  pResult 
)
protected

Called when the user changes the editor/console tab selection.

This methods shows and hides the appropriate windows.

Definition at line 358 of file MEMainFrame.cpp.

void MEMainFrame::OnViewIncludeFile ( )
protected

Toggles between including the file into the material list and not.

Definition at line 872 of file MEMainFrame.cpp.

BOOL MEMainFrame::PreCreateWindow ( CREATESTRUCT &  cs)
protectedvirtual

Sets a few window styles for the main window during the creation process.

Definition at line 128 of file MEMainFrame.cpp.

void MEMainFrame::PrintConsoleMessage ( const char *  msg)

Called to add console text to the console view.

Parameters
msgThe text that is to be added to the console.

Definition at line 121 of file MEMainFrame.cpp.

Member Data Documentation

MaterialDoc* MEMainFrame::currentDoc
protected

Definition at line 147 of file MEMainFrame.h.

friend MEMainFrame::FindDialog
protected

Definition at line 112 of file MEMainFrame.h.

ConsoleView* MEMainFrame::m_consoleView
protected

Definition at line 137 of file MEMainFrame.h.

CSplitterWnd MEMainFrame::m_editSplitter
protected

Definition at line 127 of file MEMainFrame.h.

FindDialog* MEMainFrame::m_find
protected

Definition at line 142 of file MEMainFrame.h.

CSplitterWnd* MEMainFrame::m_materialEditSplitter
protected

Definition at line 129 of file MEMainFrame.h.

MaterialEditView* MEMainFrame::m_materialEditView
protected

Definition at line 139 of file MEMainFrame.h.

MaterialPreviewView* MEMainFrame::m_materialPreviewView
protected

Definition at line 135 of file MEMainFrame.h.

MaterialPropTreeView* MEMainFrame::m_materialPropertyView
protected

Definition at line 134 of file MEMainFrame.h.

MaterialTreeView* MEMainFrame::m_materialTreeView
protected

Definition at line 132 of file MEMainFrame.h.

MaterialPreviewPropView* MEMainFrame::m_previewPropertyView
protected

Definition at line 136 of file MEMainFrame.h.

CSplitterWnd MEMainFrame::m_previewSplitter
protected

Definition at line 128 of file MEMainFrame.h.

CSplitterWnd MEMainFrame::m_splitterWnd
protected

Definition at line 126 of file MEMainFrame.h.

StageView* MEMainFrame::m_stageView
protected

Definition at line 133 of file MEMainFrame.h.

CTabCtrl MEMainFrame::m_tabs
protected

Definition at line 125 of file MEMainFrame.h.

CStatusBar MEMainFrame::m_wndStatusBar
protected

Definition at line 121 of file MEMainFrame.h.

CToolBar MEMainFrame::m_wndToolBar
protected

Definition at line 122 of file MEMainFrame.h.

MaterialDocManager MEMainFrame::materialDocManager
protected

Definition at line 146 of file MEMainFrame.h.

MEOptions MEMainFrame::options
protected

Definition at line 150 of file MEMainFrame.h.

MaterialSearchData_t MEMainFrame::searchData
protected

Definition at line 143 of file MEMainFrame.h.


The documentation for this class was generated from the following files: