Difference between revisions of "Script Contexts"

From HLKitWiki
Jump to: navigation, search
(Contexts Within Structural Hierarchy)
Line 11: Line 11:
 
:{| class="infotable"
 
:{| class="infotable"
 
|class="leftnormal"|portfolio
 
|class="leftnormal"|portfolio
|The "portfolio" context represents the topmost level within the structural hierarchy, encapsulating all of the different leads that have been created.
+
|The "portfolio" context represents the topmost level within the structural hierarchy, encapsulating all of the different leads that have been created. This context is generally '''not''' accessible via scripts, as each lead is considered to be an atomic object.
 
|-
 
|-
 
|hero
 
|hero
Line 37: Line 37:
 
:{| class="infotable"
 
:{| class="infotable"
 
|class="leftnormal"|parent
 
|class="leftnormal"|parent
|The "parent" context is wholly dependent on the current context.  
+
|The "parent" context is wholly dependent on the current context. If the current context is a pick, then the parent is the container that the pick resides within. If the current context is a container, then the parent is the pick that attaches the gizmo, unless the container is an actor, in which case there is no parent.
 
|-
 
|-
 
|linkage
 
|linkage
|x
+
|The "linkage" context proceeds from one pick to another pick that has been associated with the first pick via a named linkage. If no linkage has been established, then there is no linkage context.
 
|-
 
|-
 
|root
 
|root
|x
+
|The "root" context identifies the pick that bootstrapped the current pick. If the pick was not bootstrapped by another pick, then there is no root context.
 
|-
 
|-
 
|dynamiclink
 
|dynamiclink
Line 89: Line 89:
 
|-
 
|-
 
|portal
 
|portal
|x
 
|-
 
|value
 
 
|x
 
|x
 
|-
 
|-
 
|table
 
|table
 
|x
 
|x
 +
|-
 +
|}
 +
 +
There are also a few logical contexts within the visual hierarchy. Each of these contexts actually maps to a basic context, but it is identified below due to important considerations, such as added restrictions or limitations on what can be done within the context.
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|parent
 +
|The "parent" context is wholly dependent on the current context.
 
|-
 
|-
 
|chosen
 
|chosen
Line 104: Line 109:
 
|-
 
|-
 
|container
 
|container
 +
|x
 +
|-
 +
|value
 
|x
 
|x
 
|-
 
|-

Revision as of 23:33, 3 December 2008

Context: HL KitKit Reference 

Overview

This first step in accessing data via scripts is in identifying where that data resides within the overall data hierarchy. A separate hierarchy is maintained for both structural information (e.g. actors, picks, gizmos, minions, etc.) and visual information (e.g. panels, layouts, templates, etc.). Each different layer within the hierarchy is considered a distinct "context".

Contexts Within Structural Hierarchy

Within the structural hierarchy, there are a variety of contexts managed by the Kit. The following table identifies these contexts and provides a brief description of what each represents.

portfolio The "portfolio" context represents the topmost level within the structural hierarchy, encapsulating all of the different leads that have been created. This context is generally not accessible via scripts, as each lead is considered to be an atomic object.
hero The "hero" context represents an individual actor within the portfolio. This actor could be a lead or a minion.
container The "container" context represents any container within the portfolio. The container could be an actor or a gizmo.
pick The "pick" context represents any pick throughout the portfolio, located within any container.
thing The "thing" context represents a thing that has not been added to the portfolio. The thing context is very similar to the pick context in behavior, with the only real difference being that the dynamic facets of picks don't exist for things, resulting in many valid actions for picks being inaccessible from things.
field The "field" context represents any field within any pick or thing. If within a thing, all aspects of the field are read-only.
pool The "pool" context represents any usage pool associated with either the actor or a specific pick.

There are also quite a few logical contexts within the structural hierarchy. Each of these contexts actually maps to one of the basic contexts above, but it is identified below due to important considerations, such as added restrictions or limitations on what can be done within the context.

parent The "parent" context is wholly dependent on the current context. If the current context is a pick, then the parent is the container that the pick resides within. If the current context is a container, then the parent is the pick that attaches the gizmo, unless the container is an actor, in which case there is no parent.
linkage The "linkage" context proceeds from one pick to another pick that has been associated with the first pick via a named linkage. If no linkage has been established, then there is no linkage context.
root The "root" context identifies the pick that bootstrapped the current pick. If the pick was not bootstrapped by another pick, then there is no root context.
dynamiclink x
gearholder x
shadow x
origin x
master x
minion x
anchor x
child x
gizmo x

Contexts Within Visual Hierarchy

The visual hierarchy has a separate set of contexts that are managed by the Kit. The following table describes each of these contexts.

scene x
layout x
template x
portal x
table x

There are also a few logical contexts within the visual hierarchy. Each of these contexts actually maps to a basic context, but it is identified below due to important considerations, such as added restrictions or limitations on what can be done within the context.

parent The "parent" context is wholly dependent on the current context.
chosen x
hero x
container x
value x

General Contexts

In addition to the structural and visual contexts, the Kit supports contexts that are outside of the the normal hierarchy. These general contexts are described in the table below.

state x
transaction x
focus x
eachpick x
altpick x
altthing x
x x
x x
x x