General window attributes

Description

A window is the base class of all specific window classes. The attributes defined in here are shared among all inherited widows.

General Attributes

Attribute Domain Default Value Description
name string "" Unique name of the window.
class string "" Specifies the name of a defined theme class (see <mmstheme>).
alignment alignment "center" Specifies the alignment of the window.
dx pixel "0" Delta x position in pixels dependent on alignment.
dy pixel "0" Delta y position in pixels dependent on alignment.
w size "100%" Width of the window.
h size "100%" Height of the window.
bgcolor color "#00000000" Specifies the background color.
bgimage image "" Specifies a image file for the background.
opacity unsigned char "255" Specifies the opacity of the window.
fadein boolean "false" Specifies if the window should fade during the show action.
fadeout boolean "false" Specifies if the window should fade during the hide action.
movein "left"|"right"|"top"|"bottom" "" Specifies if and which direction the window should move in during the show action.
moveout "left"|"right"|"top"|"bottom" "" Specifies if and which direction the window should move in during the hide action.
debug boolean "false" Specifies if debug frames should be drawed.
margin pixel "0" Specifies the outer margin between the border and everything outside the window.
own_surface boolean "true" If set to true, the window should manage its surface memory. If not subsurface memory from the parent window is used.
modal boolean "false" The window will get any input event and thus will block all other window until hide() was called.
static_zorder boolean "true" If set to false, the z-order of child windows is can be changed by pointer events.

Border Attributes

Attribute Domain Default Value Description
border.image.path string "" Sets the path of the border images.
border.image.top-left string "" Specifies the border image at the top-left corner.
border.image.top string "" Specifies the border image at the top.
border.image.top-right string "" Specifies the border image at the top-right corner.
border.image.right string "" Specifies the border image on the right side.
border.image.bottom-right string "" Specifies the border image at the bottom-right corner.
border.image.bottom string "" Specifies the border image at the bottom.
border.image.bottom-left string "" Specifies the border image at the bottom-left corner.
border.image.left string "" Specifies the border image on the left side.
border.selimage.path string "" Here you can set the path of the border images for selected items.
border.selimage.top-left string "" Specifies the border image for selected items at the top-left corner.
border.selimage.top string "" Specifies the border image for selected items at the top.
border.selimage.top-right string "" Specifies the border image for selected items at the top-right corner.
border.selimage.right string "" Specifies the border image for selected items on the right side.
border.selimage.bottom-right string "" Specifies the border image for selected items at the bottom-right corner.
border.selimage.bottom string "" Specifies the border image for selected items at the bottom.
border.selimage.bottom-left string "" Specifies the border image for selected items at the bottom-left corner.
border.selimage.left string "" Specifies the border image for selected items on the left side.
border.color color "#00000000" Specifies the border color.
border.selcolor color "#00000000" Specifies the border color for selected items.
border.thickness pixel "0" Specifies the thickness of the border.
border.margin pixel "0" Specifies the inner margin between the border and the background of the element.
border.rcorners boolean "false" If you specify "true" round corners will be drawn.

Alignment values

Value Description
center Horizontally and vertically centered.
left Left-aligned and vertically centered.
right Right-aligned and vertically centered.
top-center Top-aligned and horizontally centered.
top-left Top- and left-aligned.
top-right Top- and right-aligned.
bottom-center Bottom-aligned and horizontally centered.
bottom-left Bottom- and left-aligned.
bottom-right Bottom- and right-aligned.

Size values

Value Description
<X>px Size in pixel. Example: "100px"
<X>% Size in percent. Example: "50%"

Setting colors

There are two ways to set a color. For example the color attribute is named color.

First way is: color="#rrggbbaa". There is a hash followed by hexadecimal byte values for red, green, blue and alpha.
If you set color="#ff0000ff" you use red which is not transparent.
If you set color="#00000000" the color is marked as not set.

Second way is to set the four color values separately: color.r=<red> color.g=<green> color.b=<blue> color.a=<alpha>. Each value has range from 0 to 255 decimal.
If you set color.r="0" color.g="0" color.b="255" color.a="255" you use blue which is not transparent.
If you set color.a="0" the color is marked as not set.

Note on alpha value:
The value 0 (00) means that the whole color is not set. The value 255 (ff) means that the color is set with full opacity. The values 1..254 (01..fe) sets a transparent color.

Setting images

There are two ways to set a image. For example the image attribute is named image.

First way is: image="path/filename". You know the complete path and the filename (inclusive the extension) to the image and put it directly to the image attribute. If you set image="" the image is marked as not set.

Second way is to set the path and the filename separately: image.path="path" image.name="filename". If you set image.path="" the image path is marked as not set. If you set image.name="" the image name is marked as not set.

Note on transparency of images:
You should only use images without alpha channel. Because currently we cannot handle image-based transparency. But if you want to have a transparent image you can use the alpha value of the correspondent color. For example you can load the bgimage="<filename>" of a window or a widget and set the bgcolor="#00000080". The alpha value 80 hex sets the half opacity of the bgimage.