![]() |
Paradox Game Engine
v1.0.0 beta06
|
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 () | ||
![]() | |||
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.
| |||
override void | OnPropertyChanged (params string[] propertyNames) | ||
This method will raise the PropertyChanged for each of the property name passed as argument.
| |||
![]() | |||
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< INodeCommandWrapper > | Commands [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... | |
![]() | |
IDispatcherService | Dispatcher [get, set] |
Gets a dispatcher that is capable of executing code in the UI thread. More... | |
![]() | |
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< INodeCommandWrapper > | Commands [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 | |
![]() | |
IViewModelServiceProvider | ServiceProvider = ViewModelServiceProvider.NullServiceProvider |
An IViewModelServiceProvider that allows to retrieve various service objects. More... | |
![]() | |
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... | |
![]() | |
PropertyChangingEventHandler | PropertyChanging |
PropertyChangedEventHandler | PropertyChanged |
Definition at line 19 of file ObservableNode.cs.
|
protected |
Definition at line 28 of file ObservableNode.cs.
|
protected |
Definition at line 281 of file ObservableNode.cs.
References SiliconStudio.Presentation.Quantum.ObservableViewModel.HasCommandPrefix, and SiliconStudio.Presentation.Quantum.INodeCommandWrapper.Name.
bool SiliconStudio.Presentation.Quantum.ObservableNode.CanMove | ( | IObservableNode | newParent | ) |
Indicates whether this node can be moved.
newParent | The new parent of the node once moved. |
true
if the node can be moved, fals
otherwise.Implements SiliconStudio.Presentation.Quantum.IObservableNode.
Definition at line 154 of file ObservableNode.cs.
|
protected |
Definition at line 307 of file ObservableNode.cs.
|
protected |
Definition at line 291 of file ObservableNode.cs.
References SiliconStudio.Presentation.Quantum.ObservableViewModel.HasCommandPrefix.
object SiliconStudio.Presentation.Quantum.ObservableNode.GetAssociatedData | ( | string | name | ) |
Returns the additionnal data with the matching name.
name | The name of the additionnal data to look for. |
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.
name | The name of the ObservableNode to look for. |
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.
name | The name of the command to look for. |
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.
name | The name of the object to look for. |
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.
newParent | The new parent of the node once moved. |
newName | The 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 | ) |
Definition at line 258 of file ObservableNode.cs.
References SiliconStudio.Presentation.Quantum.ObservableViewModel.HasChildPrefix.
void SiliconStudio.Presentation.Quantum.ObservableNode.NotifyPropertyChanging | ( | string | propertyName | ) |
Definition at line 253 of file ObservableNode.cs.
References SiliconStudio.Presentation.Quantum.ObservableViewModel.HasChildPrefix.
|
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.
|
get |
Gets the list of children nodes.
Definition at line 107 of file ObservableNode.cs.
|
get |
Gets the list of commands available in this node.
Definition at line 112 of file ObservableNode.cs.
|
getset |
Gets or sets the name used to display the node to the user.
Definition at line 52 of file ObservableNode.cs.
|
getset |
Gets or sets the flags associated to this node.
Definition at line 137 of file ObservableNode.cs.
|
getset |
Gets a unique identifier for this observable node.
Definition at line 102 of file ObservableNode.cs.
|
get |
Gets whether this node contains a dictionary
Definition at line 132 of file ObservableNode.cs.
|
get |
Gets whether this node contains a list
Definition at line 127 of file ObservableNode.cs.
|
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.
|
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.
|
getset |
Gets or sets whether this node can be modified in the view.
Definition at line 87 of file ObservableNode.cs.
|
getset |
Gets or sets whether this node should be displayed in the view.
Definition at line 82 of file ObservableNode.cs.
|
getset |
Gets or sets the state flags associated to this node.
Definition at line 147 of file ObservableNode.cs.
|
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.
|
get |
Gets the order number of this node in its parent.
Definition at line 122 of file ObservableNode.cs.
|
getset |
Gets the ObservableViewModel that owns this node.
Definition at line 42 of file ObservableNode.cs.
|
getset |
Gets the parent of this node.
Definition at line 62 of file ObservableNode.cs.
|
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.
|
get |
Gets the root of this node.
Definition at line 67 of file ObservableNode.cs.
|
getset |
Gets or sets the serialization flags associated to this node.
Definition at line 142 of file ObservableNode.cs.
|
get |
Gets the expected type of Value.
Definition at line 72 of file ObservableNode.cs.
|
getset |
Gets or sets the value.
Definition at line 92 of file ObservableNode.cs.