Architecture:Gui Module: Difference between revisions

From Adonthell
Jump to navigation Jump to search
No edit summary
m Reverted edits by Asipicabad (talk) to last revision by Ksterker
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://imygijesusy.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
----
=[http://imygijesusy.co.cc CLICK HERE]=
----
</div>
This module contains everything required to create a user interface and is derived from this initial [[Widget_Set|widget implementation]].
This module contains everything required to create a user interface and is derived from this initial [[Widget_Set|widget implementation]].


Line 15: Line 7:
== Decoration ==
== Decoration ==


The &lt;tt>decoration&lt;/tt> class defines the look of every individual widget. For consistency, widgets of the same type should use the same decoration, but in theory, each widget can have it's own special look. A widgets decoration is described through an XML file that consists of multiple sections:
The <tt>decoration</tt> class defines the look of every individual widget. For consistency, widgets of the same type should use the same decoration, but in theory, each widget can have it's own special look. A widgets decoration is described through an XML file that consists of multiple sections:


   &lt;Data>
   <Data>
     &lt;list id="Default" />
     <list id="Default" />
     &lt;list id="Activated" />
     <list id="Activated" />
     &lt;list id="Focused" />
     <list id="Focused" />
   &lt;/Data>
   </Data>


These currently supported sections are:
These currently supported sections are:
Line 31: Line 23:
Each section can contain the following elements, of which '''bg''' and '''has_border''' are mandatory:
Each section can contain the following elements, of which '''bg''' and '''has_border''' are mandatory:


   &lt;string id="bg">&lt;/string>
   <string id="bg"></string>
   &lt;u_int8 id="bg_alpha">&lt;/u_int8>
   <u_int8 id="bg_alpha"></u_int8>
   &lt;s_int8 id="highlight">&lt;/s_int8>
   <s_int8 id="highlight"></s_int8>
   &lt;bool id="has_border">&lt;/bool>
   <bool id="has_border"></bool>
   &lt;string id="border_tl">&lt;/string>
   <string id="border_tl"></string>
   &lt;string id="border_tr">&lt;/string>
   <string id="border_tr"></string>
   &lt;string id="border_bl">&lt;/string>
   <string id="border_bl"></string>
   &lt;string id="border_br">&lt;/string>
   <string id="border_br"></string>
   &lt;string id="border_top">&lt;/string>
   <string id="border_top"></string>
   &lt;string id="border_bot">&lt;/string>
   <string id="border_bot"></string>
   &lt;string id="border_lft">&lt;/string>
   <string id="border_lft"></string>
   &lt;string id="border_rgt">&lt;/string>
   <string id="border_rgt"></string>


Their meaning is as follows:
Their meaning is as follows:
Line 48: Line 40:
* '''bg''' The background image. Will be tiled to fill the widget size. If no size is given for the widget, it will assume the size of its background image.
* '''bg''' The background image. Will be tiled to fill the widget size. If no size is given for the widget, it will assume the size of its background image.
* '''bg_alpha''' Background translucency from 0 (totally opaque) to 255 (completely transparent).
* '''bg_alpha''' Background translucency from 0 (totally opaque) to 255 (completely transparent).
* '''highlight''' Brightness adjustment from -127 (very dark) to 127 (very bright). Only valid for section &lt;tt>Focused&lt;/tt>.
* '''highlight''' Brightness adjustment from -127 (very dark) to 127 (very bright). Only valid for section <tt>Focused</tt>.
* '''has_border''' Whether the widget has a border (1) or not (0). The border is considered part of the widget and will not add to its size. If set to (1), then eight border images must be given: four corner pieces, (t)op(l)eft, (t)op(r)ight, (b)ottom(l)eft and (b)ottom(r)ight as well as 4 edge pieces, (top), (bot)tom, (l)e(ft) and (r)i(g)h(t). The corner pieces are painted as is, whereas the edge pieces are tiled to fill the space between the individual corners.
* '''has_border''' Whether the widget has a border (1) or not (0). The border is considered part of the widget and will not add to its size. If set to (1), then eight border images must be given: four corner pieces, (t)op(l)eft, (t)op(r)ight, (b)ottom(l)eft and (b)ottom(r)ight as well as 4 edge pieces, (top), (bot)tom, (l)e(ft) and (r)i(g)h(t). The corner pieces are painted as is, whereas the edge pieces are tiled to fill the space between the individual corners.


== Window Manager ==
== Window Manager ==


The &lt;tt>window_manager&lt;/tt> class keeps track of open windows and dialogs and handles focus, which is usually given to the topmost window. It also allows fading in and out of windows/dialogs as they are opened or closed.
The <tt>window_manager</tt> class keeps track of open windows and dialogs and handles focus, which is usually given to the topmost window. It also allows fading in and out of windows/dialogs as they are opened or closed.


[[Category:Architecture]]
[[Category:Architecture]]
[[Category:Development]]
[[Category:Development]]

Revision as of 18:10, 27 November 2010

This module contains everything required to create a user interface and is derived from this initial widget implementation.

Widgets and Layouts

The classes of the GUI module are split into widgets and layouts. Widgets are single user interface elements like a label, button or text entry field, whereas layouts are containers that can be used to group multiple widgets and define their position on the screen. Toplevel windows or dialogs have to inherit from one of the layout implementations.

Decoration

The decoration class defines the look of every individual widget. For consistency, widgets of the same type should use the same decoration, but in theory, each widget can have it's own special look. A widgets decoration is described through an XML file that consists of multiple sections:

 
   <list id="Default" />
   <list id="Activated" />
   <list id="Focused" />
 

These currently supported sections are:

  • Default The standard look of a widget.
  • Activated A widget that has been activated, like a button that is pressed or a checkbox that has been checked.
  • Focused An overlay to indicate that the widget has the input focus. Applied over the default or activated look of the widget.

Each section can contain the following elements, of which bg and has_border are mandatory:

  <string id="bg"></string>
  <u_int8 id="bg_alpha"></u_int8>
  <s_int8 id="highlight"></s_int8>
  <bool id="has_border"></bool>
  <string id="border_tl"></string>
  <string id="border_tr"></string>
  <string id="border_bl"></string>
  <string id="border_br"></string>
  <string id="border_top"></string>
  <string id="border_bot"></string>
  <string id="border_lft"></string>
  <string id="border_rgt"></string>

Their meaning is as follows:

  • bg The background image. Will be tiled to fill the widget size. If no size is given for the widget, it will assume the size of its background image.
  • bg_alpha Background translucency from 0 (totally opaque) to 255 (completely transparent).
  • highlight Brightness adjustment from -127 (very dark) to 127 (very bright). Only valid for section Focused.
  • has_border Whether the widget has a border (1) or not (0). The border is considered part of the widget and will not add to its size. If set to (1), then eight border images must be given: four corner pieces, (t)op(l)eft, (t)op(r)ight, (b)ottom(l)eft and (b)ottom(r)ight as well as 4 edge pieces, (top), (bot)tom, (l)e(ft) and (r)i(g)h(t). The corner pieces are painted as is, whereas the edge pieces are tiled to fill the space between the individual corners.

Window Manager

The window_manager class keeps track of open windows and dialogs and handles focus, which is usually given to the topmost window. It also allows fading in and out of windows/dialogs as they are opened or closed.