Panel Element (Data)

From HLKitWiki
Revision as of 11:29, 3 December 2008 by Rob (talk | contribs) (New page: {{context|Kit Reference|Data File Reference}} ==The "panel" Element== Panels contain one or more layouts and orchestrate the presentation of material for a specific ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Context: HL Kit … Kit Reference … Data File Reference 

The "panel" Element

Panels contain one or more layouts and orchestrate the presentation of material for a specific region within HL. Panels are used to define the contents of the various tabs shown across the top for editing character data, as well as for summary panels shown on the right. Each panel is specified through the use of a "panel" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the layout. This id is used in all references to the layout.
name Text – Public name associated with the panel. Maximum length of 50 characters.
order (Optional) Integer – Specifies the sequence in which this panel is displayed to the user. For a tab-based panel, this value controls the order in which the tabs are shown across the top. For a summary panel, this value controls the default order in which the summary panels are shown. Default: "0".
issummary (Optional) Boolean – Indicates whether this panel is intended for use as a summary panel or a tab-based panel. Default: "no".
marginhorz (Optional) Integer – Specifies the margin gap included at both ends along the horizontal axis. The usable width of the panel is the actual width minus double the horizontal margin. Default: "0".
marginvert (Optional) Integer – Specifies the margin gap included at both ends along the vertical axis. The usable height of the panel is the actual height minus double the vertical margin. Default: "0".

The "layout" element also possesses child elements that define various facets of the layout. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

live An optional "live" element may appear as defined by the given link. This element defines a Live Tag Expression that determines whether the template is shown to the user.
portalref Zero or more "portalref" elements may appear as defined by the given link. This element specifies the individual portals which are utilized within the layout.
templateref Zero or more "templateref" elements may appear as defined by the given link. This element specifies the individual templates which are utilized within the layout.
position An optional "position" element may appear as defined by the given link. This element defines a Position Script through which the portals are sized and positioned within the template.

The "live" Element

The "live" element defines a Live Tag Expression for the layout, which determines whether the layout is shown. The tag expression is compared against the tags assigned to the container associated with the layout (e.g. the actor). If the tag expression is satisfied, the layout is visible, else it is hidden. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Live tag expression.

The "portalref" Element

The "portalref" element identifies a portal used within the layout and assigns it a logical name for use within the Position script. The complete list of attributes for this element is below.

portal Id – Unique id of the portal to be utilized within the layout.
reference (Optional) Id – Specifies the alternate unique id to be used when referencing this portal within the Position script. This makes it possible to re-use the same portal more than once within the same layout, giving each instance a different logical id. If empty, the reference id is simply the portal id. Default: Empty.
taborder (Optional) Integer – Specifies the relative tab order position of the portal and its contents within the overall layout. As long as the tab orders are different for all portals and templates within the layout, HL can properly sequence the flow of control. Default: "0".

The "templateref" Element

The "templateref" element identifies a template used within the layout and assigns it a logical name for use within the Position script. The complete list of attributes for this element is below.

template Id – Unique id of the template to be utilized within the layout.
reference (Optional) Id – Specifies the alternate unique id to be used when referencing this template within the Position script. This makes it possible to re-use the same template more than once within the same layout, giving each instance a different logical id. If empty, the reference id is simply the template id. Default: Empty.
thing (Optional) Id – Specifies the unique id of the thing or pick that is associated with this template. The given object is used with the template when determining the contents of fields and such. If empty, no thing/pick is associated with the template, which means that the template cannot contain any portals that utilize a field reference. Default: Empty.
ispick (Optional) Boolean – Indicates whether the template is associated with a pick or a thing. If a pick, the first pick within the container that based on the specified thing is used. Default: "yes".
taborder (Optional) Integer – Specifies the relative tab order position of the template and its contents within the overall layout. As long as the tab orders are different for all portals and templates within the layout, HL can properly sequence the flow of control. Default: "0".

The "position" Element

The "position" element defines a Position Script for the layout, which performs all the appropriate sizing and positioning of the contained portals and templates within the region of the layout. The complete list of attributes for this element is below.

PCDATA Script – Specifies the code comprising the Position script.

Example

The following example demonstrates what a "layout" element might look like. All default values are assumed for optional attributes.

<layout id="journal">
  <portalref portal="jrTitle"/>
  <portalref portal="journal" taborder="10"/>
  <templateref template="jrHeader" thing="actor"/>
  <position>
    ~configure whether our header is visible or not
    ~Note: If the header is non-visible, no space is allotted for it below.
    template[jrHeader].visible = 1

    ~position the title at the top, followed by the template, and then the table
    perform portal[jrTitle].autoplace
    perform template[jrHeader].autoplace[6]
    perform portal[journal].autoplace[9]
    </position>
  </layout>