Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Presentation.Quantum.ObservableNode Class Reference
Inheritance diagram for SiliconStudio.Presentation.Quantum.ObservableNode:
SiliconStudio.Presentation.ViewModel.DispatcherViewModel SiliconStudio.Presentation.Quantum.IObservableNode IDynamicMetaObjectProvider SiliconStudio.Presentation.ViewModel.ViewModelBase INotifyPropertyChanging INotifyPropertyChanged SiliconStudio.Presentation.Quantum.CombinedObservableNode SiliconStudio.Presentation.Quantum.SingleObservableNode SiliconStudio.Presentation.Quantum.CombinedObservableNode< T > SiliconStudio.Presentation.Quantum.ObservableModelNode SiliconStudio.Presentation.Quantum.VirtualObservableNode SiliconStudio.Presentation.Quantum.ObservableModelNode< T > SiliconStudio.Presentation.Quantum.VirtualObservableNode< T >

Public Member Functions

bool CanMove (IObservableNode newParent)
 Indicates whether this node can be moved. More...
 
void Move (IObservableNode newParent, string newName=null)
 Moves the node by setting it a new parent. More...
 
ObservableNode GetChild (string name)
 Returns the child node with the matching name. More...
 
ICommand GetCommand (string name)
 Returns the command with the matching name. More...
 
object GetAssociatedData (string name)
 Returns the additionnal data with the matching name. More...
 
object GetDynamicObject (string name)
 Returns the child node, the command or the additional data with the matching name. More...
 
DynamicMetaObject GetMetaObject (Expression parameter)
 
void NotifyPropertyChanging (string propertyName)
 
void NotifyPropertyChanged (string propertyName)
 

Protected Member Functions

 ObservableNode (ObservableViewModel ownerViewModel, IObservableNode parentNode, object index=null)
 
void AddCommand (INodeCommandWrapper command)
 
void ClearCommands ()
 
void CheckDynamicMemberConsistency ()
 
- Protected Member Functions inherited from SiliconStudio.Presentation.ViewModel.DispatcherViewModel
 DispatcherViewModel (IViewModelServiceProvider serviceProvider)
 Initializes a new instance of the DispatcherViewModel class. More...
 
override void OnPropertyChanging (params string[] propertyNames)
 This method will raise the PropertyChanging for each of the property name passed as argument.
Parameters
propertyNamesThe names of the properties that is changing.
More...
 
override void OnPropertyChanged (params string[] propertyNames)
 This method will raise the PropertyChanged for each of the property name passed as argument.
Parameters
propertyNamesThe names of the properties that has changed.
More...
 
- Protected Member Functions inherited from SiliconStudio.Presentation.ViewModel.ViewModelBase
 ViewModelBase ()
 
 ViewModelBase (IViewModelServiceProvider serviceProvider)
 
bool SetValue< T > (ref T field, T value, [CallerMemberName]string propertyName=null)
 Sets the value of a field to the given value. Both values are compared with the default EqualityComparer{T}, and if they are equals, this method does nothing. If they are different, the PropertyChanging event will be raised first, then the field value will be modified, and finally the PropertyChanged event will be raised. More...
 
bool SetValue< T > (ref T field, T value, params string[] propertyNames)
 Sets the value of a field to the given value. Both values are compared with the default EqualityComparer{T}, and if they are equals, this method does nothing. If they are different, the PropertyChanging will be raised first, then the field value will be modified, and finally the PropertyChanged event will be raised. More...
 
bool SetValue< T > (ref T field, T value, Action updateAction, [CallerMemberName]string propertyName=null)
 Sets the value of a field to the given value. Both values are compared with the default EqualityComparer{T}, and if they are equals, this method does nothing. If they are different, the PropertyChanging event will be raised first, then the field value will be modified. The given update action will be executed and finally the PropertyChanged event will be raised. More...
 
virtual bool SetValue< T > (ref T field, T value, Action updateAction, params string[] propertyNames)
 Sets the value of a field to the given value. Both values are compared with the default EqualityComparer{T}, and if they are equals, this method does nothing. If they are different, the PropertyChanging event will be raised first, then the field value will be modified. The given update action will be executed and finally the PropertyChanged event will be raised. More...
 
bool SetValue (Action updateAction, [CallerMemberName]string propertyName=null)
 Manages a property modification and its notifications. This method will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 
bool SetValue (Action updateAction, params string[] propertyNames)
 Manages a property modification and its notifications. This method will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 
bool SetValue (Func< bool > hasChangedFunction, Action updateAction, [CallerMemberName]string propertyName=null)
 Manages a property modification and its notifications. A function is provided to check whether the new value is different from the current one. This function will be invoked by this method, and if it returns True, it will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 
bool SetValue (bool hasChanged, Action updateAction, [CallerMemberName]string propertyName=null)
 Manages a property modification and its notifications. The first parameter hasChanged should indicate whether the property should actuallybe updated. If this parameter is True, it will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 
bool SetValue (bool hasChanged, Action updateAction, params string[] propertyNames)
 Manages a property modification and its notifications. The first parameter hasChanged should indicate whether the property should actuallybe updated. If this parameter is True, it will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 
virtual bool SetValue (Func< bool > hasChangedFunction, Action updateAction, params string[] propertyNames)
 Manages a property modification and its notifications. A function is provided to check whether the new value is different from the current one. This function will be invoked by this method, and if it returns True, it will invoke the provided update action. The PropertyChanging event will be raised prior to the update action, and the PropertyChanged event will be raised after. More...
 

Properties

ObservableViewModel Owner [get, set]
 Gets the ObservableViewModel that owns this node. More...
 
string Name [get, set]
 Gets or sets the name of this node. Note that the name can be used to access this node from its parent using a dynamic object. More...
 
string DisplayName [get, set]
 Gets or sets the name used to display the node to the user. More...
 
string Path [get]
 Gets the path of this node. The path is constructed from the name of all node from the root to this one, separated by periods. More...
 
IObservableNode Parent [get, set]
 Gets the parent of this node. More...
 
IObservableNode Root [get]
 Gets the root of this node. More...
 
abstract Type Type [get]
 Gets the expected type of Value. More...
 
abstract bool IsPrimitive [get]
 Gets whether this node contains a primitive value. A primitive value has no children node and does not need to refresh its hierarchy when its value is modified. More...
 
bool IsVisible [get, set]
 Gets or sets whether this node should be displayed in the view. More...
 
bool IsReadOnly [get, set]
 Gets or sets whether this node can be modified in the view. More...
 
abstract object Value [get, set]
 Gets or sets the value. More...
 
object Index [get, set]
 Gets or sets the index of this node, relative to its parent node when its contains a collection. Can be null of this node is not in a collection. More...
 
Guid Guid [get, set]
 Gets a unique identifier for this observable node. More...
 
IReadOnlyCollection
< IObservableNode
Children [get]
 Gets the list of children nodes. More...
 
IEnumerable< INodeCommandWrapperCommands [get]
 Gets the list of commands available in this node. More...
 
abstract IDictionary< string,
object > 
AssociatedData [get]
 Gets additional data associated to this content. This can be used when the content itself does not contain enough information to be used as a view model. More...
 
abstract int Order [get]
 Gets the order number of this node in its parent. More...
 
abstract bool HasList [get]
 Gets whether this node contains a list More...
 
abstract bool HasDictionary [get]
 Gets whether this node contains a dictionary More...
 
ViewModelContentFlags Flags [get, set]
 Gets or sets the flags associated to this node. More...
 
ViewModelContentSerializeFlags SerializeFlags [get, set]
 Gets or sets the serialization flags associated to this node. More...
 
ViewModelContentState LoadState [get, set]
 Gets or sets the state flags associated to this node. More...
 
- Properties inherited from SiliconStudio.Presentation.ViewModel.DispatcherViewModel
IDispatcherService Dispatcher [get, set]
 Gets a dispatcher that is capable of executing code in the UI thread. More...
 
- Properties inherited from SiliconStudio.Presentation.Quantum.IObservableNode
ObservableViewModel Owner [get]
 Gets the ObservableViewModel that owns this node. More...
 
string Name [get]
 Gets or sets the name of this node. Note that the name can be used to access this node from its parent using a dynamic object. More...
 
string DisplayName [get, set]
 Gets or sets the name used to display the node to the user. More...
 
string Path [get]
 Gets the path of this node. The path is constructed from the name of all node from the root to this one, separated by periods. More...
 
IObservableNode Parent [get]
 Gets or the parent of this node. More...
 
IObservableNode Root [get]
 Gets the root of this node. More...
 
Type Type [get]
 Gets the expected type of Value. More...
 
bool IsVisible [get, set]
 Gets or sets whether this node should be displayed in the view. More...
 
bool IsReadOnly [get, set]
 Gets or sets whether this node can be modified in the view. More...
 
bool IsPrimitive [get]
 Gets whether this node contains a primitive value. A primitive value has no children node and does not need to refresh its hierarchy when its value is modified. More...
 
object Value [get, set]
 Gets or sets the value. More...
 
object Index [get]
 Gets or sets the index of this node, relative to its parent node when its contains a collection. Can be null of this node is not in a collection. More...
 
Guid Guid [get]
 Gets a unique identifier associated to this node. More...
 
IReadOnlyCollection
< IObservableNode
Children [get]
 Gets the list of children nodes. More...
 
IEnumerable< INodeCommandWrapperCommands [get]
 Gets the list of commands available in this node. More...
 
IDictionary< string, object > AssociatedData [get]
 Gets additional data associated to this content. This can be used when the content itself does not contain enough information to be used as a view model. More...
 
int Order [get]
 Gets the order number of this node in its parent. More...
 
bool HasList [get]
 Gets whether this node contains a list More...
 
bool HasDictionary [get]
 Gets whether this node contains a dictionary More...
 

Additional Inherited Members

- Public Attributes inherited from SiliconStudio.Presentation.ViewModel.ViewModelBase
IViewModelServiceProvider ServiceProvider = ViewModelServiceProvider.NullServiceProvider
 An IViewModelServiceProvider that allows to retrieve various service objects. More...
 
- Protected Attributes inherited from SiliconStudio.Presentation.ViewModel.ViewModelBase
List< Tuple< string, string > > DependentProperties = new List<Tuple<string, string>>()
 A list of couple of property names that are dependent. For each couple of this list, if the first property name is notified as being changed, then the second property name will also be notified has being changed. More...
 
- Events inherited from SiliconStudio.Presentation.ViewModel.ViewModelBase
PropertyChangingEventHandler PropertyChanging
 
PropertyChangedEventHandler PropertyChanged
 

Detailed Description

Definition at line 19 of file ObservableNode.cs.

Constructor & Destructor Documentation

SiliconStudio.Presentation.Quantum.ObservableNode.ObservableNode ( ObservableViewModel  ownerViewModel,
IObservableNode  parentNode,
object  index = null 
)
protected

Definition at line 28 of file ObservableNode.cs.

Member Function Documentation

void SiliconStudio.Presentation.Quantum.ObservableNode.AddCommand ( INodeCommandWrapper  command)
protected
bool SiliconStudio.Presentation.Quantum.ObservableNode.CanMove ( IObservableNode  newParent)

Indicates whether this node can be moved.

Parameters
newParentThe new parent of the node once moved.
Returns
true if the node can be moved, fals otherwise.

Implements SiliconStudio.Presentation.Quantum.IObservableNode.

Definition at line 154 of file ObservableNode.cs.

void SiliconStudio.Presentation.Quantum.ObservableNode.CheckDynamicMemberConsistency ( )
protected

Definition at line 307 of file ObservableNode.cs.

void SiliconStudio.Presentation.Quantum.ObservableNode.ClearCommands ( )
protected
object SiliconStudio.Presentation.Quantum.ObservableNode.GetAssociatedData ( string  name)

Returns the additionnal data with the matching name.

Parameters
nameThe name of the additionnal data to look for.
Returns
The corresponding additionnal data, or null if no data with the given name exists.

Definition at line 232 of file ObservableNode.cs.

ObservableNode SiliconStudio.Presentation.Quantum.ObservableNode.GetChild ( string  name)

Returns the child node with the matching name.

Parameters
nameThe name of the ObservableNode to look for.
Returns
The corresponding child node, or null if no child with the given name exists.

Implements SiliconStudio.Presentation.Quantum.IObservableNode.

Definition at line 212 of file ObservableNode.cs.

ICommand SiliconStudio.Presentation.Quantum.ObservableNode.GetCommand ( string  name)

Returns the command with the matching name.

Parameters
nameThe name of the command to look for.
Returns
The corresponding command, or null if no command with the given name exists.

Implements SiliconStudio.Presentation.Quantum.IObservableNode.

Definition at line 222 of file ObservableNode.cs.

object SiliconStudio.Presentation.Quantum.ObservableNode.GetDynamicObject ( string  name)

Returns the child node, the command or the additional data with the matching name.

Parameters
nameThe name of the object to look for.
Returns
The corresponding object, or null if no object with the given name exists.

Definition at line 242 of file ObservableNode.cs.

DynamicMetaObject SiliconStudio.Presentation.Quantum.ObservableNode.GetMetaObject ( Expression  parameter)

Definition at line 248 of file ObservableNode.cs.

void SiliconStudio.Presentation.Quantum.ObservableNode.Move ( IObservableNode  newParent,
string  newName = null 
)

Moves the node by setting it a new parent.

Parameters
newParentThe new parent of the node once moved.
newNameThe new name to give to the node once moved. This will modify its path. If null, it does not modify the name.

Implements SiliconStudio.Presentation.Quantum.IObservableNode.

Definition at line 174 of file ObservableNode.cs.

References SiliconStudio.Presentation.Quantum.IObservableNode.Children.

void SiliconStudio.Presentation.Quantum.ObservableNode.NotifyPropertyChanged ( string  propertyName)
void SiliconStudio.Presentation.Quantum.ObservableNode.NotifyPropertyChanging ( string  propertyName)

Property Documentation

abstract IDictionary<string, object> SiliconStudio.Presentation.Quantum.ObservableNode.AssociatedData
get

Gets additional data associated to this content. This can be used when the content itself does not contain enough information to be used as a view model.

Definition at line 117 of file ObservableNode.cs.

IReadOnlyCollection<IObservableNode> SiliconStudio.Presentation.Quantum.ObservableNode.Children
get

Gets the list of children nodes.

Definition at line 107 of file ObservableNode.cs.

IEnumerable<INodeCommandWrapper> SiliconStudio.Presentation.Quantum.ObservableNode.Commands
get

Gets the list of commands available in this node.

Definition at line 112 of file ObservableNode.cs.

string SiliconStudio.Presentation.Quantum.ObservableNode.DisplayName
getset

Gets or sets the name used to display the node to the user.

Definition at line 52 of file ObservableNode.cs.

ViewModelContentFlags SiliconStudio.Presentation.Quantum.ObservableNode.Flags
getset

Gets or sets the flags associated to this node.

Definition at line 137 of file ObservableNode.cs.

Guid SiliconStudio.Presentation.Quantum.ObservableNode.Guid
getset

Gets a unique identifier for this observable node.

Definition at line 102 of file ObservableNode.cs.

abstract bool SiliconStudio.Presentation.Quantum.ObservableNode.HasDictionary
get

Gets whether this node contains a dictionary

Definition at line 132 of file ObservableNode.cs.

abstract bool SiliconStudio.Presentation.Quantum.ObservableNode.HasList
get

Gets whether this node contains a list

Definition at line 127 of file ObservableNode.cs.

object SiliconStudio.Presentation.Quantum.ObservableNode.Index
getset

Gets or sets the index of this node, relative to its parent node when its contains a collection. Can be null of this node is not in a collection.

Definition at line 97 of file ObservableNode.cs.

abstract bool SiliconStudio.Presentation.Quantum.ObservableNode.IsPrimitive
get

Gets whether this node contains a primitive value. A primitive value has no children node and does not need to refresh its hierarchy when its value is modified.

Definition at line 77 of file ObservableNode.cs.

bool SiliconStudio.Presentation.Quantum.ObservableNode.IsReadOnly
getset

Gets or sets whether this node can be modified in the view.

Definition at line 87 of file ObservableNode.cs.

bool SiliconStudio.Presentation.Quantum.ObservableNode.IsVisible
getset

Gets or sets whether this node should be displayed in the view.

Definition at line 82 of file ObservableNode.cs.

ViewModelContentState SiliconStudio.Presentation.Quantum.ObservableNode.LoadState
getset

Gets or sets the state flags associated to this node.

Definition at line 147 of file ObservableNode.cs.

string SiliconStudio.Presentation.Quantum.ObservableNode.Name
getset

Gets or sets the name of this node. Note that the name can be used to access this node from its parent using a dynamic object.

Definition at line 47 of file ObservableNode.cs.

abstract int SiliconStudio.Presentation.Quantum.ObservableNode.Order
get

Gets the order number of this node in its parent.

Definition at line 122 of file ObservableNode.cs.

ObservableViewModel SiliconStudio.Presentation.Quantum.ObservableNode.Owner
getset

Gets the ObservableViewModel that owns this node.

Definition at line 42 of file ObservableNode.cs.

IObservableNode SiliconStudio.Presentation.Quantum.ObservableNode.Parent
getset

Gets the parent of this node.

Definition at line 62 of file ObservableNode.cs.

string SiliconStudio.Presentation.Quantum.ObservableNode.Path
get

Gets the path of this node. The path is constructed from the name of all node from the root to this one, separated by periods.

Definition at line 57 of file ObservableNode.cs.

IObservableNode SiliconStudio.Presentation.Quantum.ObservableNode.Root
get

Gets the root of this node.

Definition at line 67 of file ObservableNode.cs.

ViewModelContentSerializeFlags SiliconStudio.Presentation.Quantum.ObservableNode.SerializeFlags
getset

Gets or sets the serialization flags associated to this node.

Definition at line 142 of file ObservableNode.cs.

abstract Type SiliconStudio.Presentation.Quantum.ObservableNode.Type
get

Gets the expected type of Value.

Definition at line 72 of file ObservableNode.cs.

abstract object SiliconStudio.Presentation.Quantum.ObservableNode.Value
getset

Gets or sets the value.

Definition at line 92 of file ObservableNode.cs.


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