WPFCustomControls::ContextQueries::ContextQuery Class Reference


Detailed Description

Base class for performing a Boolean query on the state of the scene.

Inheritance diagram for WPFCustomControls::ContextQueries::ContextQuery:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

WPFCustomControls::ContextQueries::ContextQuery::ContextQuery ( ) [inline]

Constructor.


Member Function Documentation

virtual Object WPFCustomControls::ContextQueries::ContextQuery::Clone ( ) [inline, virtual]

Create a copy of this instance.

Returns:
A new object, copied from this instance.

Reimplemented in WPFCustomControls::ContextQueries::SharedContextQuery, and WPFCustomControls::ContextQueries::SharedMaxscriptContextQuery.

virtual void WPFCustomControls::ContextQueries::ContextQuery::CopyFrom ( Object  source ) [inline, virtual]
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.

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

Parameters:
sender The source of the original event.
e Information about the original event.
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.

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

Parameters:
sender Object sending the event.
e Information about the event.

Member Data Documentation

Initial value:
        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.

Initial value:
        DependencyProperty.Register(
            "Value",
            typeof(bool),
            typeof(ContextQuery),
            new PropertyMetadata(true))

This query's current value, as of the last time it was refreshed.

Initial value:
 
        DependencyProperty.Register(
            "Label",
            typeof(String),
            typeof(ContextQuery))

Localized Label representing this Context Query's condition.


Property Documentation

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.


Event Documentation

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.


WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery
WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery WPFCustomControls::ContextQueries::ContextQuery