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

View that contains the material edit controls. More...

#include <MaterialEditView.h>

Inheritance diagram for MaterialEditView:
MaterialView SourceModifyOwner

Public Types

enum  { IDD = IDD_MATERIALEDIT_FORM }
 

Public Member Functions

virtual ~MaterialEditView ()
 Destructor for MaterialEditView. More...
 
virtual void MV_OnMaterialSelectionChange (MaterialDoc *pMaterial)
 Called when the selected material has changed. More...
 
virtual void MV_OnMaterialNameChanged (MaterialDoc *pMaterial, const char *oldName)
 Called when the material name has changed. More...
 
virtual idStr GetSourceText ()
 Returns the current source text in the source edit control. 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_OnFileReload (const char *filename)
 Called when a file has been reloaded. More...
 

Public Attributes

CEdit m_nameEdit
 
CSplitterWnd m_editSplitter
 
StageViewm_stageView
 
MaterialPropTreeViewm_materialPropertyView
 
CTabCtrl m_tabs
 
CSyntaxRichEditCtrl m_textView
 

Protected Member Functions

 MaterialEditView ()
 Constructor for MaterialEditView. More...
 
void GetMaterialSource ()
 Gets the source of the current document and populates the source edit control. More...
 
void ApplyMaterialSource ()
 Takes the source out of the edit control and applies it to the material. More...
 
virtual void DoDataExchange (CDataExchange *pDX)
 Transfers data to and from the controls in the console. More...
 
virtual void OnInitialUpdate ()
 Called by the MFC framework when the view is being created. More...
 
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
 Called by the MFC framework when the view is being created. More...
 
afx_msg void OnSize (UINT nType, int cx, int cy)
 Windows message called when the window is resized. More...
 
afx_msg void OnTcnSelChange (NMHDR *pNMHDR, LRESULT *pResult)
 Called when the user changes the properties/text tab selection. More...
 
afx_msg void OnEnChangeEdit (NMHDR *pNMHDR, LRESULT *pResult)
 Called when the user changes text in the edit control. More...
 

Protected Attributes

bool initHack
 
bool sourceInit
 
bool sourceChanged
 
idStr currentMaterialName
 
- Protected Attributes inherited from MaterialView
MaterialDocManagermaterialDocManager
 

Additional Inherited Members

- Private Member Functions inherited from SourceModifyOwner
 SourceModifyOwner ()
 
virtual ~SourceModifyOwner ()
 

Detailed Description

View that contains the material edit controls.

These controls include the stage view, the properties view and the source view.

Definition at line 40 of file MaterialEditView.h.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 

Definition at line 43 of file MaterialEditView.h.

Constructor & Destructor Documentation

MaterialEditView::~MaterialEditView ( )
virtual

Destructor for MaterialEditView.

Definition at line 65 of file MaterialEditView.cpp.

MaterialEditView::MaterialEditView ( )
protected

Constructor for MaterialEditView.

Definition at line 54 of file MaterialEditView.cpp.

Member Function Documentation

void MaterialEditView::ApplyMaterialSource ( )
protected

Takes the source out of the edit control and applies it to the material.

Definition at line 155 of file MaterialEditView.cpp.

void MaterialEditView::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual

Transfers data to and from the controls in the console.

Definition at line 173 of file MaterialEditView.cpp.

void MaterialEditView::GetMaterialSource ( )
protected

Gets the source of the current document and populates the source edit control.

Definition at line 125 of file MaterialEditView.cpp.

idStr MaterialEditView::GetSourceText ( )
virtual

Returns the current source text in the source edit control.

Reimplemented from SourceModifyOwner.

Definition at line 107 of file MaterialEditView.cpp.

void MaterialEditView::MV_OnMaterialNameChanged ( MaterialDoc pMaterial,
const char *  oldName 
)
virtual

Called when the material name has changed.

Parameters
pMaterialThe material that was deleted.
oldNameThe old name of the material.

Reimplemented from MaterialView.

Definition at line 98 of file MaterialEditView.cpp.

void MaterialEditView::MV_OnMaterialSelectionChange ( MaterialDoc pMaterial)
virtual

Called when the selected material has changed.

Parameters
pMaterialThe newly selected material.

Reimplemented from MaterialView.

Definition at line 72 of file MaterialEditView.cpp.

int MaterialEditView::OnCreate ( LPCREATESTRUCT  lpCreateStruct)
protected

Called by the MFC framework when the view is being created.

Definition at line 201 of file MaterialEditView.cpp.

void MaterialEditView::OnEnChangeEdit ( NMHDR *  pNMHDR,
LRESULT *  pResult 
)
protected

Called when the user changes text in the edit control.

Definition at line 293 of file MaterialEditView.cpp.

void MaterialEditView::OnInitialUpdate ( )
protectedvirtual

Called by the MFC framework when the view is being created.

Definition at line 183 of file MaterialEditView.cpp.

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

Windows message called when the window is resized.

Definition at line 237 of file MaterialEditView.cpp.

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

Called when the user changes the properties/text tab selection.

This methods shows and hides the appropriate windows.

Definition at line 267 of file MaterialEditView.cpp.

Member Data Documentation

idStr MaterialEditView::currentMaterialName
protected

Definition at line 86 of file MaterialEditView.h.

bool MaterialEditView::initHack
protected

Definition at line 82 of file MaterialEditView.h.

CSplitterWnd MaterialEditView::m_editSplitter

Definition at line 46 of file MaterialEditView.h.

MaterialPropTreeView* MaterialEditView::m_materialPropertyView

Definition at line 49 of file MaterialEditView.h.

CEdit MaterialEditView::m_nameEdit

Definition at line 45 of file MaterialEditView.h.

StageView* MaterialEditView::m_stageView

Definition at line 48 of file MaterialEditView.h.

CTabCtrl MaterialEditView::m_tabs

Definition at line 50 of file MaterialEditView.h.

CSyntaxRichEditCtrl MaterialEditView::m_textView

Definition at line 51 of file MaterialEditView.h.

bool MaterialEditView::sourceChanged
protected

Definition at line 85 of file MaterialEditView.h.

bool MaterialEditView::sourceInit
protected

Definition at line 83 of file MaterialEditView.h.


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