AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AlphaFramework.Editor.World.TemplateEditor< T > Class Template Reference

Abstract base tab for editing Template{T}es More...

Inheritance diagram for AlphaFramework.Editor.World.TemplateEditor< T >:
AlphaFramework.Editor.UndoCloneTab< T > AlphaFramework.Editor.UndoTab< T > AlphaFramework.Editor.Tab

Public Member Functions

override void Undo ()
 Hook to undo the last change
 
override void Redo ()
 Hook to redo the last undone change
 
- Public Member Functions inherited from AlphaFramework.Editor.Tab
void Open (IToastProvider toastProvider)
 Opens the tab. More...
 
new void Hide ()
 Hides this tab (so that another can be brought to the foreground) More...
 
bool RequestClose ()
 Requests the tab to close, displaying warnings about unsaved data, etc. allowing the user to cancel. More...
 
bool SaveFile ()
 Saves the content of this tab to a file - error-handling included! More...
 
void Delete ()
 Delete the currently selected object in this tab More...
 

Protected Member Functions

 TemplateEditor ()
 
override void OnInitialize ()
 Called on startup to load the content for this tab from a file More...
 
override void OnSaveFile ()
 Called when the content of this tab is to be saved to a file - no error-handling! More...
 
override void OnDelete ()
 Called to delete the currently selected object in this tab More...
 
override void OnUpdate ()
 Called on startup, content updates and tab switch to refresh any on-screen displays More...
 
virtual void OnNewTemplate ()
 Hook to be called when the user wants a new Template{T} to be added. More...
 
override void Dispose (bool disposing)
 Clean up any resources being used. More...
 
- Protected Member Functions inherited from AlphaFramework.Editor.UndoCloneTab< T >
 UndoCloneTab ()
 
override void OnChange ()
 Mark the content of this tab as changed (needs to be saved) and create a new undo-backup More...
 
override void OnUndo ()
 Called to undo the last change More...
 
override void OnRedo ()
 Called to redo the last undone change More...
 
- Protected Member Functions inherited from AlphaFramework.Editor.UndoTab< T >
 UndoTab ()
 
override void OnChange ()
 Mark the content of this tab as changed (needs to be saved)
 
- Protected Member Functions inherited from AlphaFramework.Editor.Tab
 Tab ()
 
void FocusDefaultControl ()
 Set the focus back to the default control on the tab More...
 
virtual void OnClose ()
 Called when the tab needs to shutdown and close More...
 
void ForceClose ()
 Forces the tab to close, displaying warnings about unsaved data, etc. but not allowing the user to cancel. More...
 

Protected Attributes

readonly FilteredTreeView< T > TemplateList
 The filtered tree view listing all Template{T}s. More...
 
System.Windows.Forms.SplitContainer splitVertical
 The vertical splitter separating the template list from the template editor. More...
 
- Protected Attributes inherited from AlphaFramework.Editor.UndoCloneTab< T >
Content
 The content to be handled by the undo-system More...
 
- Protected Attributes inherited from AlphaFramework.Editor.UndoTab< T >
readonly Button buttonUndo
 The undo button. More...
 
readonly Button buttonRedo
 The redo button. More...
 
readonly Stack< T > UndoBackups = new Stack<T>()
 Entries used by the undo-system to undo changes More...
 
readonly Stack< T > RedoBackups = new Stack<T>()
 Entries used by the undo-system to redo changes previously undone More...
 
- Protected Attributes inherited from AlphaFramework.Editor.Tab
bool _overwrite
 true if an existing file supposed to be overwritten when SaveFile is called. More...
 
string _fullPath
 The complete (rooted) path to load and/or save the file from/to More...
 
bool Changed
 True when unsaved changes to the content exist More...
 
IToastProvider ToastProvider
 Provides a surface for displaying toast messages to the user. More...
 

Additional Inherited Members

- Properties inherited from AlphaFramework.Editor.Tab
string NameUI [get, set]
 The user-friendly name of this editor More...
 
string FilePath [get, set]
 The path to the file in this editor More...
 
- Events inherited from AlphaFramework.Editor.Tab
EventHandler TabClosed
 Occurs after the tab was closed More...
 

Detailed Description

Abstract base tab for editing Template{T}es

Template Parameters
TThe type of Template{T}es to edit
Type Constraints
T :Template<T> 

Member Function Documentation

override void AlphaFramework.Editor.World.TemplateEditor< T >.Dispose ( bool  disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
override void AlphaFramework.Editor.World.TemplateEditor< T >.OnDelete ( )
inlineprotectedvirtual

Called to delete the currently selected object in this tab

Reimplemented from AlphaFramework.Editor.Tab.

override void AlphaFramework.Editor.World.TemplateEditor< T >.OnInitialize ( )
inlineprotectedvirtual

Called on startup to load the content for this tab from a file

Reimplemented from AlphaFramework.Editor.UndoCloneTab< T >.

virtual void AlphaFramework.Editor.World.TemplateEditor< T >.OnNewTemplate ( )
inlineprotectedvirtual

Hook to be called when the user wants a new Template{T} to be added.

override void AlphaFramework.Editor.World.TemplateEditor< T >.OnSaveFile ( )
inlineprotectedvirtual

Called when the content of this tab is to be saved to a file - no error-handling!

Reimplemented from AlphaFramework.Editor.UndoTab< T >.

override void AlphaFramework.Editor.World.TemplateEditor< T >.OnUpdate ( )
inlineprotectedvirtual

Called on startup, content updates and tab switch to refresh any on-screen displays

Reimplemented from AlphaFramework.Editor.Tab.

Member Data Documentation

System.Windows.Forms.SplitContainer AlphaFramework.Editor.World.TemplateEditor< T >.splitVertical
protected

The vertical splitter separating the template list from the template editor.

readonly FilteredTreeView<T> AlphaFramework.Editor.World.TemplateEditor< T >.TemplateList
protected
Initial value:
= new FilteredTreeView<T>
{
CheckBoxes = true,
Location = new System.Drawing.Point(6, 44),
Size = new System.Drawing.Size(128, 306),
Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right,
TabIndex = 1
}

The filtered tree view listing all Template{T}s.


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