31 #include "../common/PropTree/PropTreeView.h"
99 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
104 afx_msg
void OnNMRclick(NMHDR *pNMHDR, LRESULT *pResult);
122 afx_msg
void OnCut();
130 DECLARE_MESSAGE_MAP()
140 void SetItemImage(HTREEITEM item,
bool mod,
bool apply,
bool children);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct)
Called by the MFC framework as the view is being created.
virtual BOOL PreTranslateMessage(MSG *pMsg)
Handles the keyboard shortcut for delete.
afx_msg LRESULT OnRenameMaterialComplete(WPARAM wParam, LPARAM lParam)
This message is sent after the label edit is complete to ensure that the sorting stays consistent...
MaterialTreeView()
Constructor for MaterialTreeView.
virtual void MV_OnFileReload(const char *filename)
Called when a file has been reloaded.
CONST PIXELFORMATDESCRIPTOR UINT
virtual void MV_OnMaterialDelete(MaterialDoc *pMaterial)
Called when a material is deleted.
afx_msg void OnAddMaterial()
Adds a new material.
virtual void MV_OnMaterialSaved(MaterialDoc *pMaterial)
Called when the material changes have been saved.
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
Handles keyboard shortcut for cut, copy and paste.
void AddStrList(const char *root, idStrList *list, bool includeFile)
Adds a string list of materials to the tree creating the proper hierarchy.
idHashTable< HTREEITEM > quickTree
afx_msg void OnNMRclick(NMHDR *pNMHDR, LRESULT *pResult)
Displays the popup menu.
idHashTable< HTREEITEM > fileToTree
void InitializeMaterialList(bool includeFile=true, const char *filename=NULL)
Clears the tree and rebuilds it.
afx_msg void OnLButtonUp(UINT nFlags, CPoint point)
Handles the end of a drag copy/move when the user releases the left mouse button. ...
virtual ~MaterialTreeView()
Destructor for MaterialTreeView.
afx_msg void OnSaveAll()
Save all materials that have been changed.
virtual void MV_OnMaterialChange(MaterialDoc *pMaterial)
Called when the material has changed but not applied.
void GetMaterialPaths(HTREEITEM item, idList< MaterialTreeItem_t > *list)
Creates a list of material paths for all materials under the provided item.
GLuint GLuint GLsizei GLenum type
void BuildLookupTrees(HTREEITEM item)
Build the lookup tree for a given item and all of its children.
HTREEITEM AddFolder(const char *name, HTREEITEM parent)
Adds a new material folder.
afx_msg void OnSaveFile()
Saves all materials in the selected file.
void BuildMaterialList(bool includeFile=true, const char *filename=NULL)
Builds the tree of materials.
afx_msg void OnTvnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
Determines if a tree item's label can be edited.
void SetItemImage(HTREEITEM item, bool mod, bool apply, bool children)
Sets the appropriate item image based on the state of the item.
afx_msg LRESULT OnRenameFolderComplete(WPARAM wParam, LPARAM lParam)
This message is sent after the label edit is complete to actually perform the rename operation...
Responsible for managing a single material that is being viewed and/or edited.
void DeleteFolder(HTREEITEM item, bool addUndo=true)
Deletes a given folder.
bool FindNextMaterial(MaterialSearchData_t *searchData)
Searches for a material given the supplied search parameters.
afx_msg void OnPaste()
Performs a paste operation.
virtual void MV_OnMaterialNameChanged(MaterialDoc *pMaterial, const char *oldName)
Called when the material name has changed.
bool CanPaste()
Returns true if the user can paste an item in the copy buffer.
afx_msg void OnCut()
Performs a cut operation.
void PopupMenu(CPoint *pt)
Displays the popup menu with all of the appropriate menu items enabled.
afx_msg void OnTvnBegindrag(NMHDR *pNMHDR, LRESULT *pResult)
Begins the process of a drag cut/copy.
bool CanSaveFile()
Returns true if the currently selected file needs to be saved.
afx_msg void OnAddFolder()
Adds a new folder.
bool CanCut()
Returns true if the user can cut the selected item.
HTREEITEM GetNextSeachItem(HTREEITEM item, bool stayInFile)
Returns the next item to search or NULL if there is nothing else to search.
virtual void MV_OnMaterialApply(MaterialDoc *pMaterial)
Called when the material changes have been applied.
idList< MaterialTreeItem_t > affectedMaterials
void RenameMaterial(HTREEITEM item, const char *originalName)
Handles all of the little problems associated with renaming a folder.
afx_msg void OnApplyAll()
Applies all materials that need to be applied.
idStr GetSaveFilename()
Returns the filename of currently selected file.
bool CanCopy()
Returns true if the user can copy the selected item.
Structure used to store the user defined search parameters.
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
Handles mouse movement as an item is being dragged.
afx_msg void OnDeleteMaterial()
Deletes a material or material folder.
A tree view of all the materials that have been defined.
bool GetFileName(HTREEITEM item, idStr &out)
Returns the filename of the provided item.
Structure used associate a material name with a tree item.
idHashTable< HTREEITEM > materialToTree
afx_msg void OnCopy()
Performs a copy operation.
afx_msg void OnTvnSelchanged(NMHDR *pNMHDR, LRESULT *pResult)
Changes the selected material when the select tree item changes.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
bool CanDelete()
Returns true if the user can delete the selected item.
void CleanLookupTrees(HTREEITEM item)
Cleans the lookup tables for the provided item and all children.
afx_msg void OnTvnEndlabeledit(NMHDR *pNMHDR, LRESULT *pResult)
Makes sure that a rename operation can be performed after a label edit is complete and performs the f...
idStr GetQuicktreePath(HTREEITEM item)
Returns the quicktree path for a given item.
afx_msg void OnContextMenu(CWnd *pWnd, CPoint point)
Displays the popup menu.
afx_msg void OnReloadFile()
Reloads the selected file.
void RenameFolder(HTREEITEM item, const char *name)
Renames a material folder.
afx_msg void OnApplyFile()
Applies all materials in the currently selected file.
afx_msg void OnSaveMaterial()
Saves the selected material.
virtual void MV_OnMaterialAdd(MaterialDoc *pMaterial)
Called when a material is added.
afx_msg void OnRenameMaterial()
Begins a label edit to rename a material or material folder.
afx_msg void OnApplyMaterial()
Applies the current material.
bool CanRename()
Returns true if the user can rename the selected item.
idStr GetMediaPath(HTREEITEM item, DWORD type)
Returns the Doom III name for the provided item.