AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
AlphaFramework.Editor.Tab Class Reference

A base class for all editor windows that can be displayed as tabs More...

Inheritance diagram for AlphaFramework.Editor.Tab:
AlphaFramework.Editor.UndoTab< T > AlphaFramework.Editor.UndoCloneTab< T > AlphaFramework.Editor.UndoCommandTab AlphaFramework.Editor.Gui.GuiEditor AlphaFramework.Editor.Gui.LanguageEditor AlphaFramework.Editor.World.TemplateEditor< T > AlphaFramework.Editor.Graphics.ParticleSystemEditor AlphaFramework.Editor.Gui.CutsceneEditor AlphaFramework.Editor.Graphics.CpuParticleSystemEditor AlphaFramework.Editor.Graphics.GpuParticleSystemEditor

Public Member Functions

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...
 
virtual void Undo ()
 Hook to undo the last change More...
 
virtual void Redo ()
 Hook to redo the last undone change More...
 

Protected Member Functions

 Tab ()
 
void FocusDefaultControl ()
 Set the focus back to the default control on the tab More...
 
virtual void OnInitialize ()
 Called on startup to load the content for this tab. More...
 
virtual void OnSaveFile ()
 Called when the content of this tab is to be saved to a file. More...
 
virtual void OnDelete ()
 Hook to delete the currently selected object in this tab More...
 
virtual void OnUpdate ()
 Called on startup, content updates and tab switch to refresh any on-screen displays More...
 
virtual void OnChange ()
 Mark the content of this tab as changed (needs to be saved) 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

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...
 

Properties

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

EventHandler TabClosed
 Occurs after the tab was closed More...
 

Detailed Description

A base class for all editor windows that can be displayed as tabs

Call OnChange after each change to make sure the save and undo buttons are enabled

Member Function Documentation

void AlphaFramework.Editor.Tab.Delete ( )
inline

Delete the currently selected object in this tab

void AlphaFramework.Editor.Tab.FocusDefaultControl ( )
inlineprotected

Set the focus back to the default control on the tab

void AlphaFramework.Editor.Tab.ForceClose ( )
inlineprotected

Forces the tab to close, displaying warnings about unsaved data, etc. but not allowing the user to cancel.

new void AlphaFramework.Editor.Tab.Hide ( )
inline

Hides this tab (so that another can be brought to the foreground)

virtual void AlphaFramework.Editor.Tab.OnChange ( )
inlineprotectedvirtual

Mark the content of this tab as changed (needs to be saved)

Reimplemented in AlphaFramework.Editor.UndoTab< T >, and AlphaFramework.Editor.UndoCloneTab< T >.

virtual void AlphaFramework.Editor.Tab.OnClose ( )
inlineprotectedvirtual

Called when the tab needs to shutdown and close

Reimplemented in AlphaFramework.Editor.Gui.GuiEditor.

virtual void AlphaFramework.Editor.Tab.OnDelete ( )
inlineprotectedvirtual

Hook to delete the currently selected object in this tab

Reimplemented in AlphaFramework.Editor.Gui.GuiEditor, AlphaFramework.Editor.World.TemplateEditor< T >, and AlphaFramework.Editor.Gui.LanguageEditor.

virtual void AlphaFramework.Editor.Tab.OnInitialize ( )
inlineprotectedvirtual

Called on startup to load the content for this tab.

Exceptions
NotSupportedExceptionAn unsupported graphics card feature is used.
FileNotFoundExceptionA file could not be located.
IOExceptionThere was a problem reading a file.
UnauthorizedAccessExceptionRead access to a file was denied.
InvalidOperationExceptionThere was a problem inside the engine.
InvalidDataExceptionA file contained invalid data.

Reimplemented in AlphaFramework.Editor.Gui.GuiEditor, AlphaFramework.Editor.World.TemplateEditor< T >, AlphaFramework.Editor.Graphics.CpuParticleSystemEditor, AlphaFramework.Editor.Graphics.GpuParticleSystemEditor, AlphaFramework.Editor.Graphics.ParticleSystemEditor, AlphaFramework.Editor.UndoCloneTab< T >, AlphaFramework.Editor.Gui.LanguageEditor, and AlphaFramework.Editor.Gui.CutsceneEditor.

virtual void AlphaFramework.Editor.Tab.OnSaveFile ( )
inlineprotectedvirtual

Called when the content of this tab is to be saved to a file.

Exceptions
ArgumentExceptionThe file path is invalid.
NotSupportedExceptionThe file path is invalid.
IOExceptionThere was a problem writing a file.
UnauthorizedAccessExceptionWrite access to a file was denied.

Reimplemented in AlphaFramework.Editor.Gui.GuiEditor, AlphaFramework.Editor.World.TemplateEditor< T >, AlphaFramework.Editor.UndoTab< T >, AlphaFramework.Editor.Graphics.CpuParticleSystemEditor, AlphaFramework.Editor.Graphics.GpuParticleSystemEditor, AlphaFramework.Editor.Gui.LanguageEditor, and AlphaFramework.Editor.Gui.CutsceneEditor.

virtual void AlphaFramework.Editor.Tab.OnUpdate ( )
inlineprotectedvirtual
void AlphaFramework.Editor.Tab.Open ( IToastProvider  toastProvider)
inline

Opens the tab.

Parameters
toastProviderProvides a surface for displaying toast messages to the user.
Exceptions
OperationCanceledExceptionThe user has been informed of an error and has confirmed the resulting cancellation.
virtual void AlphaFramework.Editor.Tab.Redo ( )
inlinevirtual

Hook to redo the last undone change

Reimplemented in AlphaFramework.Editor.World.TemplateEditor< T >, and AlphaFramework.Editor.UndoTab< T >.

bool AlphaFramework.Editor.Tab.RequestClose ( )
inline

Requests the tab to close, displaying warnings about unsaved data, etc. allowing the user to cancel.

Returns
true if the tab was closed, false if the user canceled the process
bool AlphaFramework.Editor.Tab.SaveFile ( )
inline

Saves the content of this tab to a file - error-handling included!

Returns
true if file was saved, false if an error occurred
virtual void AlphaFramework.Editor.Tab.Undo ( )
inlinevirtual

Hook to undo the last change

Reimplemented in AlphaFramework.Editor.World.TemplateEditor< T >, and AlphaFramework.Editor.UndoTab< T >.

Member Data Documentation

string AlphaFramework.Editor.Tab._fullPath
protected

The complete (rooted) path to load and/or save the file from/to

bool AlphaFramework.Editor.Tab._overwrite
protected

true if an existing file supposed to be overwritten when SaveFile is called.

bool AlphaFramework.Editor.Tab.Changed
protected

True when unsaved changes to the content exist

IToastProvider AlphaFramework.Editor.Tab.ToastProvider
protected

Provides a surface for displaying toast messages to the user.

Property Documentation

string AlphaFramework.Editor.Tab.FilePath
getset

The path to the file in this editor

string AlphaFramework.Editor.Tab.NameUI
getset

The user-friendly name of this editor

Event Documentation

EventHandler AlphaFramework.Editor.Tab.TabClosed

Occurs after the tab was closed


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