Common Parameters

The XML tag parameters below are valid for every tag in an OBO-Edit layout.

Name Description Legal Values
name A name for this component. This name is not currently used, but in the future it may be used to identify components in expressions, or to link together interacting components. any text value
font

The default font to use for this component, specified in the form:

FontFamilyName-StyleIdentifiers-Size

The StyleIdentifiers section may contain the values:

  • PLAIN
  • ITALIC
  • BOLD
  • BOLDITALIC

Note that complex components often provide their own font defaults and may ignore this tag.

A string of the form Font-Style-Size
foreground The default foreground color for this component. See specifying colors below for the format of this value. Note that complex components often provide their own color defaults and may ignore this tag. A correctly formatted color value
background The default background color for this component. See specifying colors below for the format of this value. Note that complex components often provide their own color defaults and may ignore this tag. Further, some components (like labels) are transparent, so the background attribute has no effect for these components. A correctly formatted color value
margins

Defines a margin around all sides of a component. The value is an integer that defines the width of the margin in pixels. The leftmargin, rightmargin, topmargin and bottommargin tags will override the value specified by the margins tag on the appropriate side.

Note that if the margins argument is used in conjunction with the bordertitle argument, the margins will be applied outside of the titled border.

An integer specifying the margin width
leftmargin Defines a margin on the left side of a component. The value is an integer that defines the width of the margin in pixels. An integer specifying the margin width
rightmargin Defines a margin on the right side of a component. The value is an integer that defines the width of the margin in pixels. An integer specifying the margin width
topmargin Defines a margin on the top of a component. The value is an integer that defines the width of the margin in pixels. An integer specifying the margin height

bottommargin

Defines a margin on the bottom of a component. The value is an integer that defines the width of the margin in pixels. An integer specifying the margin height
height

Specifies a preferred height for this component. When laying out the screen, OBO-Edit will do its best to keep the component at its preferred size. This is not always possible (for example, the component may be larger than the current window size).

This attribute can cause layout problems, like dividers that cannot be resized. A well designed layout should not need this attribute.

An integer specifying the preferred component height
width

Specifies a preferred width for this component. When laying out the screen, OBO-Edit will do its best to keep the component at its preferred size. This is not always possible (for example, the component may be larger than the current window size).

This attribute can cause layout problems, like dividers that cannot be resized. A well designed layout should not need this attribute.

preferred component width
borderTitle

If this parameter is present, a titled border is created. The titled component is displayed with a thin border on all sides, and the label text above.

This attribute may contain backtick expressions.

Any text

Specifying Colors

There are a number of ways to specify a color:

Examples

font

<box orientation="vert">
  <label text="The font parameter doesn't work with every component" font="Courier-ITALIC-12"/>
  <label text="but it works on labels!" font="Arial-BOLD-24"/>
</box>

foreground

<box orientation="vert">
  <label text="There are 3 different ways to say &quot;red&quot;"/>
  <label text="red" foreground="red"/>
  <label text="255,0,0" foreground="255,0,0" />
  <label text="#FF0000" foreground="#FF0000"/>
</box>

background

<box orientation="vert">
  <label text="The background parameter has no effect on transparent components." background="yellow"/>
  <box orientation="vert" background="yellow">
    <label text="To show a colored background for a transparent component,"/>
    <label text="set the background of its container."/>
  </box>
</box>

margins

<box orientation="vert">
  <box orientation="horz">
    <label text="1"/>
    <label text="2"/>
    <label text="3"/>
  </box>
  <box orientation="horz">
    <label text="4"/>
    <label text="5" margins="10" leftmargin="0"/>
    <label text="6"/>
  </box>
  <box orientation="horz">
    <label text="7"/>
    <label text="8"/>
    <label text="9"/>
  </box>
</box>

height

<box orientation="vert">
  <label text="This label has no constraints."/>
<box orientation="vert" height="100" background="yellow">
  <label text="This label is in a box with a height constraint."/>
</box>
  <label text="This label has no constraints."/>
<glue/>
</box>

bordertitle

<box orientation="horz">
   <box orientation="vert">
     <label text="This short sad haiku"/>
     <label text="sits exposed, alone, helpless"/>
     <label text="with no title box."/>
   </box>
   <box orientation="vert" bordertitle="The Cruel Haiku" margins="10">
     <label text="This titled haiku"/>
     <label text="has little sympathy for"/>
     <label text="its joyless neighbor."/>
   </box>
</box>