Base class for performing a Boolean query on the state of the scene.
Public Member Functions |
|
ContextQuery () | |
Constructor. |
|
virtual Object | Clone () |
Create a copy of this instance. |
|
virtual void | CopyFrom (Object source) |
Copy the given object's current property
values into this instance. |
|
virtual void | RefreshValue () |
Reevaluate this query for the current state
of the scene, setting the new result in Value. |
|
void | RefreshValueOnEvent (object sender, EventArgs e) |
Convenience event handler. |
|
void | RefreshValueOnEvent (object sender, DependencyPropertyChangedEventArgs e) |
Convenience event handler for
DependencyProperty change events. |
|
Static Public Attributes |
|
static readonly DependencyProperty | InternalNameProperty |
This query's internal name, used
programmatically as an identifier. |
|
static readonly DependencyProperty | ValueProperty |
This query's current value, as of the last
time it was refreshed. |
|
static readonly DependencyProperty | LabelProperty |
Localized Label representing this Context
Query's condition. |
|
Protected Member Functions |
|
virtual void | OnContextDefinitionChanged () |
Triggers a ContextDefinitionChanged event.
|
|
void | FireContextDefinitionChangedOnEvent (Object sender, EventArgs e) |
Convenience event handler definition.
|
|
void | FireContextDefinitionChangedOnEvent (Object sender, DependencyPropertyChangedEventArgs e) |
Convenience event handler definition.
|
|
Properties |
|
virtual bool |
SharedInstance [get] |
Indicates if this
ContextQuery uses a shared singleton instance. |
|
String |
InternalName [get, set] |
This query's internal name, used
programmatically as an identifier. |
|
bool |
Value [get, set] |
This query's current value, as of the last
time it was refreshed. |
|
String |
Label [get, set] |
Localized Label representing this Context
Query's condition. |
|
Events |
|
virtual EventHandler | ContextDefinitionChanged |
Occurs when this query changes in such a way
that the context it recognizes changes. |
WPFCustomControls::ContextQueries::ContextQuery::ContextQuery | ( | ) | [inline] |
Constructor.
virtual Object WPFCustomControls::ContextQueries::ContextQuery::Clone | ( | ) | [inline, virtual] |
Create a copy of this instance.
Reimplemented in WPFCustomControls::ContextQueries::SharedContextQuery, and WPFCustomControls::ContextQueries::SharedMaxscriptContextQuery.
virtual void WPFCustomControls::ContextQueries::ContextQuery::CopyFrom | ( | Object | source | ) | [inline, virtual] |
Copy the given object's current property values into this instance.
source | Object to copy. |
Reimplemented in WPFCustomControls::ContextQueries::ActionItemIsCheckedContextQuery, WPFCustomControls::ContextQueries::LayoutContextQuery, WPFCustomControls::ContextQueries::MaxscriptContextQuery, WPFCustomControls::ContextQueries::MultiContextQuery, and WPFCustomControls::ContextQueries::RibbonPanelContextQuery.
virtual void WPFCustomControls::ContextQueries::ContextQuery::OnContextDefinitionChanged | ( | ) | [inline, protected, virtual] |
Triggers a ContextDefinitionChanged event.
void WPFCustomControls::ContextQueries::ContextQuery::FireContextDefinitionChangedOnEvent | ( | Object | sender, |
EventArgs | e | ||
) | [inline, protected] |
Convenience event handler definition.
Fires a ContextDefinitionChanged event as a response to any incoming event.
sender | The source of the original event. |
e | Information about the original event. |
void WPFCustomControls::ContextQueries::ContextQuery::FireContextDefinitionChangedOnEvent | ( | Object | sender, |
DependencyPropertyChangedEventArgs | e | ||
) | [inline, protected] |
Convenience event handler definition.
Fires a ContextDefinitionChanged event as a response to any incoming event.
sender | The source of the original event. |
e | Information about the original event. |
virtual void WPFCustomControls::ContextQueries::ContextQuery::RefreshValue | ( | ) | [inline, virtual] |
Reevaluate this query for the current state of the scene, setting the new result in Value.
Reimplemented in WPFCustomControls::ContextQueries::ActionItemIsCheckedContextQuery, WPFCustomControls::ContextQueries::LayoutContextQuery, WPFCustomControls::ContextQueries::MaxscriptContextQuery, WPFCustomControls::ContextQueries::MultiContextQuery, WPFCustomControls::ContextQueries::SingleEditablePolyObjectSelectedContextQuery, WPFCustomControls::ContextQueries::SingleEditPolyModifierSelectedContextQuery, and WPFCustomControls::ContextQueries::SubObjectContextQuery.
void WPFCustomControls::ContextQueries::ContextQuery::RefreshValueOnEvent | ( | object | sender, |
EventArgs | e | ||
) | [inline] |
Convenience event handler.
Attach to any event to have this query refresh its current value whenever the event fires.
sender | Object sending the event. |
e | Information about the event. |
void WPFCustomControls::ContextQueries::ContextQuery::RefreshValueOnEvent | ( | object | sender, |
DependencyPropertyChangedEventArgs | e | ||
) | [inline] |
Convenience event handler for DependencyProperty change events.
Attach to any DependencyProperty change event to have this query refresh its current value whenever the event fires.
sender | Object sending the event. |
e | Information about the event. |
readonly DependencyProperty
WPFCustomControls::ContextQueries::ContextQuery::InternalNameProperty
[static] |
DependencyProperty.Register( "InternalName", typeof(String), typeof(ContextQuery))
This query's internal name, used programmatically as an identifier.
ContextQueries with the same name should perform the same test. For many queries, this allows us to update the query's result only once instead of running the same test repeatedly.
readonly DependencyProperty
WPFCustomControls::ContextQueries::ContextQuery::ValueProperty
[static] |
DependencyProperty.Register( "Value", typeof(bool), typeof(ContextQuery), new PropertyMetadata(true))
This query's current value, as of the last time it was refreshed.
readonly DependencyProperty
WPFCustomControls::ContextQueries::ContextQuery::LabelProperty
[static] |
DependencyProperty.Register( "Label", typeof(String), typeof(ContextQuery))
Localized Label representing this Context Query's condition.
virtual bool
WPFCustomControls::ContextQueries::ContextQuery::SharedInstance
[get] |
Indicates if this ContextQuery uses a shared singleton instance.
False by default.
Reimplemented in WPFCustomControls::ContextQueries::SharedContextQuery, and WPFCustomControls::ContextQueries::SharedMaxscriptContextQuery.
String
WPFCustomControls::ContextQueries::ContextQuery::InternalName
[get, set] |
This query's internal name, used programmatically as an identifier.
ContextQueries with the same name should perform the same test. For many queries, this allows us to update the query's result only once instead of running the same test repeatedly.
bool
WPFCustomControls::ContextQueries::ContextQuery::Value [get,
set] |
This query's current value, as of the last time it was refreshed.
String
WPFCustomControls::ContextQueries::ContextQuery::Label [get,
set] |
Localized Label representing this Context Query's condition.
virtual EventHandler WPFCustomControls::ContextQueries::ContextQuery::ContextDefinitionChanged |
Occurs when this query changes in such a way that the context it recognizes changes.
Reimplemented in WPFCustomControls::ContextQueries::SharedContextQuery, and WPFCustomControls::ContextQueries::SharedMaxscriptContextQuery.