doom3-gpl
Doom 3 GPL source release
|
View that handles managing the material stages. More...
#include <StageView.h>
Public Types | |
enum | { STAGE_TYPE_MATERIAL, STAGE_TYPE_STAGE, STAGE_TYPE_SPECIAL_MAP_STAGE } |
Defines the type of stages. More... | |
Public Types inherited from ToggleListView | |
enum | { TOGGLE_STATE_DISABLED = 0, TOGGLE_STATE_ON, TOGGLE_STATE_OFF } |
Enumeration that defines the possible states of the toggle button. More... | |
Public Member Functions | |
virtual | ~StageView () |
Destructor for StageView. More... | |
void | SetMaterialPropertyView (MaterialPropTreeView *propView) |
virtual void | MV_OnMaterialSelectionChange (MaterialDoc *pMaterial) |
Called when the selected material has changed. 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_OnMaterialSaved (MaterialDoc *pMaterial) |
Called when the material changes have been saved. More... | |
bool | CanCopy () |
Returns true if the current state of the stage view will allow a copy operation. More... | |
bool | CanPaste () |
Returns true if the current state of the stage view will allow a paste operation. More... | |
bool | CanCut () |
Cut is not supported for stages. More... | |
bool | CanDelete () |
Returns true if the current state of the stage view will allow a delete operation. More... | |
bool | CanRename () |
Returns true if the current state of the stage view will allow a rename operation. More... | |
void | RefreshStageList () |
Rebuilds the list of stages based on the currently selected material. More... | |
Public Member Functions inherited from ToggleListView | |
void | SetToggleIcons (LPCSTR disabled=NULL, LPCSTR on=NULL, LPCSTR off=NULL) |
Sets the tree icons to dispay for each of the three states. More... | |
void | SetToggleState (int index, int toggleState, bool notify=false) |
Sets the state of an item in the list. More... | |
int | GetToggleState (int index) |
Gets the state of an item in the list. More... | |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
Called as the window is being created and initializes icons and window styles. More... | |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
Called when the window is being resized. More... | |
afx_msg void | MeasureItem (LPMEASUREITEMSTRUCT lpMeasureItemStruct) |
Returns the size of each item in the toggle list. More... | |
afx_msg void | OnNMClick (NMHDR *pNMHDR, LRESULT *pResult) |
Toggles the state of an item when the user clicks in the window. 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_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_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 | |
StageView () | |
Constructor for StageView. More... | |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
Called by the MFC framework when the view is being created. More... | |
afx_msg void | OnLvnItemchanged (NMHDR *pNMHDR, LRESULT *pResult) |
Called when the user changes the selection in the list box. More... | |
afx_msg void | OnLvnDeleteallitems (NMHDR *pNMHDR, LRESULT *pResult) |
Notifies the property view that all stages have been removed. More... | |
afx_msg void | OnLvnBegindrag (NMHDR *pNMHDR, LRESULT *pResult) |
Starts the stage drag operation. More... | |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
Finishes a stage drag operation of the user was dragging a stage. More... | |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
Handles drawing the drag image when a user is draging a stage. More... | |
afx_msg void | OnNMRclick (NMHDR *pNMHDR, LRESULT *pResult) |
Displays the popup menu when the user performs a right mouse click. More... | |
afx_msg void | OnRenameStage () |
Begins a label edit when the user selects the rename menu option. More... | |
afx_msg void | OnDeleteStage () |
Deletes the selected stage when the user selects the delete menu option. More... | |
afx_msg void | OnDeleteAllStages () |
Conforms the user wants to delete all stages and then performs the operation. More... | |
afx_msg void | OnAddStage () |
Adds a new stage when the user selects the menu option. More... | |
afx_msg void | OnAddBumpmapStage () |
Adds a new bumpmap stage when the user selects the menu option. More... | |
afx_msg void | OnAddDiffuseStage () |
Adds a new diffusemap stage when the user selects the menu option. More... | |
afx_msg void | OnAddSpecualarStage () |
Adds a new specularmap stage when the user selects the menu option. More... | |
afx_msg void | OnCopy () |
Performs a copy operation when the user selects the menu option. More... | |
afx_msg void | OnPaste () |
Performs a paste operation when the user selects the menu option. More... | |
afx_msg void | OnLvnBeginlabeledit (NMHDR *pNMHDR, LRESULT *pResult) |
Determines is a label edit can be performed on the selected stage. More... | |
afx_msg void | OnLvnEndlabeledit (NMHDR *pNMHDR, LRESULT *pResult) |
Performs the stage name change after the label edit is done. More... | |
afx_msg void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags) |
Handles keyboard shortcuts for copy and paste operations. More... | |
virtual BOOL | PreTranslateMessage (MSG *pMsg) |
Handles keyboard shortcut for the delete operations. More... | |
virtual BOOL | PreCreateWindow (CREATESTRUCT &cs) |
Sets window styles before the window is created. More... | |
virtual void | OnStateChanged (int index, int toggleState) |
Called by the ToggleListView when the toggle state has changed. More... | |
void | PopupMenu (CPoint *pt) |
Dispalys the popup menu with the appropriate menu items enabled. More... | |
void | DropItemOnList () |
Performs the stage move when the user has dragged and dropped a stage. More... | |
Protected Member Functions inherited from ToggleListView | |
ToggleListView () | |
Protected constructor used by dynamic creation. More... | |
virtual | ~ToggleListView () |
Destructor. More... | |
virtual void | DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct) |
Responsible for drawing each list item. More... | |
void | Draw3dRect (HDC hDC, RECT *rect, HBRUSH topLeft, HBRUSH bottomRight) |
Draws a 3d rectangle using the given brushes this code was taken from the gui editor. More... | |
Protected Attributes | |
MaterialPropTreeView * | m_propView |
MaterialDoc * | currentMaterial |
CImageList * | dragImage |
bool | bDragging |
int | dragIndex |
int | dropIndex |
CWnd * | dropWnd |
CPoint | dropPoint |
bool | internalChange |
Protected Attributes inherited from ToggleListView | |
HICON | onIcon |
HICON | offIcon |
HICON | disabledIcon |
Protected Attributes inherited from MaterialView | |
MaterialDocManager * | materialDocManager |
View that handles managing the material stages.
Definition at line 41 of file StageView.h.
anonymous enum |
Defines the type of stages.
Enumerator | |
---|---|
STAGE_TYPE_MATERIAL | |
STAGE_TYPE_STAGE | |
STAGE_TYPE_SPECIAL_MAP_STAGE |
Definition at line 50 of file StageView.h.
|
virtual |
Destructor for StageView.
Definition at line 72 of file StageView.cpp.
|
protected |
Constructor for StageView.
Definition at line 63 of file StageView.cpp.
bool StageView::CanCopy | ( | ) |
Returns true if the current state of the stage view will allow a copy operation.
Definition at line 195 of file StageView.cpp.
bool StageView::CanCut | ( | ) |
Cut is not supported for stages.
Definition at line 220 of file StageView.cpp.
bool StageView::CanDelete | ( | ) |
Returns true if the current state of the stage view will allow a delete operation.
Definition at line 228 of file StageView.cpp.
bool StageView::CanPaste | ( | ) |
Returns true if the current state of the stage view will allow a paste operation.
Definition at line 213 of file StageView.cpp.
bool StageView::CanRename | ( | ) |
Returns true if the current state of the stage view will allow a rename operation.
Definition at line 245 of file StageView.cpp.
|
protected |
Performs the stage move when the user has dragged and dropped a stage.
Definition at line 765 of file StageView.cpp.
|
virtual |
Called when an attribute is changed.
pMaterial | The material that was deleted. |
stage | The stage that contains the change. |
attribName | The attribute that has changed. |
Reimplemented from MaterialView.
Definition at line 183 of file StageView.cpp.
|
virtual |
Called when the material changes have been saved.
pMaterial | The saved material. |
Reimplemented from MaterialView.
Definition at line 90 of file StageView.cpp.
|
virtual |
Called when the selected material has changed.
pMaterial | The newly selected material. |
Reimplemented from MaterialView.
Definition at line 79 of file StageView.cpp.
|
virtual |
Called when a stage is added.
pMaterial | The material that was affected. |
stageNum | The index of the stage that was added |
Reimplemented from MaterialView.
Definition at line 107 of file StageView.cpp.
|
virtual |
Called when a stage is deleted.
pMaterial | The material that was affected. |
stageNum | The index of the stage that was deleted |
Reimplemented from MaterialView.
Definition at line 122 of file StageView.cpp.
|
virtual |
Called when a stage is moved.
pMaterial | The material that was deleted. |
from | The from index |
to | The to index |
Reimplemented from MaterialView.
Definition at line 133 of file StageView.cpp.
|
protected |
Adds a new bumpmap stage when the user selects the menu option.
Definition at line 540 of file StageView.cpp.
|
protected |
Adds a new diffusemap stage when the user selects the menu option.
Definition at line 548 of file StageView.cpp.
|
protected |
Adds a new specularmap stage when the user selects the menu option.
Definition at line 556 of file StageView.cpp.
|
protected |
Adds a new stage when the user selects the menu option.
Definition at line 530 of file StageView.cpp.
Handles keyboard shortcuts for copy and paste operations.
Definition at line 655 of file StageView.cpp.
|
protected |
Performs a copy operation when the user selects the menu option.
Definition at line 564 of file StageView.cpp.
|
protected |
Called by the MFC framework when the view is being created.
Definition at line 310 of file StageView.cpp.
|
protected |
Conforms the user wants to delete all stages and then performs the operation.
Definition at line 519 of file StageView.cpp.
|
protected |
Deletes the selected stage when the user selects the delete menu option.
Definition at line 498 of file StageView.cpp.
Finishes a stage drag operation of the user was dragging a stage.
Definition at line 419 of file StageView.cpp.
|
protected |
Starts the stage drag operation.
Definition at line 379 of file StageView.cpp.
|
protected |
Determines is a label edit can be performed on the selected stage.
Definition at line 609 of file StageView.cpp.
|
protected |
Notifies the property view that all stages have been removed.
Definition at line 367 of file StageView.cpp.
|
protected |
Performs the stage name change after the label edit is done.
Definition at line 638 of file StageView.cpp.
|
protected |
Called when the user changes the selection in the list box.
This method will notify the property view of the change so that it can display the appropriate properties.
Definition at line 323 of file StageView.cpp.
Handles drawing the drag image when a user is draging a stage.
Definition at line 445 of file StageView.cpp.
|
protected |
Displays the popup menu when the user performs a right mouse click.
Definition at line 465 of file StageView.cpp.
|
protected |
Performs a paste operation when the user selects the menu option.
Definition at line 583 of file StageView.cpp.
|
protected |
Begins a label edit when the user selects the rename menu option.
Definition at line 484 of file StageView.cpp.
Called by the ToggleListView when the toggle state has changed.
Reimplemented from ToggleListView.
Definition at line 697 of file StageView.cpp.
|
protected |
Dispalys the popup menu with the appropriate menu items enabled.
Definition at line 711 of file StageView.cpp.
|
protectedvirtual |
Sets window styles before the window is created.
Reimplemented from ToggleListView.
Definition at line 687 of file StageView.cpp.
|
protectedvirtual |
Handles keyboard shortcut for the delete operations.
Definition at line 671 of file StageView.cpp.
void StageView::RefreshStageList | ( | ) |
Rebuilds the list of stages based on the currently selected material.
Definition at line 267 of file StageView.cpp.
|
inline |
Definition at line 57 of file StageView.h.
|
protected |
Definition at line 123 of file StageView.h.
|
protected |
Definition at line 119 of file StageView.h.
|
protected |
Definition at line 122 of file StageView.h.
|
protected |
Definition at line 124 of file StageView.h.
|
protected |
Definition at line 125 of file StageView.h.
|
protected |
Definition at line 127 of file StageView.h.
|
protected |
Definition at line 126 of file StageView.h.
|
protected |
Definition at line 129 of file StageView.h.
|
protected |
Definition at line 118 of file StageView.h.