Quick links
 
 
 

Theme designer manual

Theme objects


Updated :

July 1, 2002


 

Introduction


The whole theme objects are included in a single picture file.
This picture file is in BMP format. It can be saved in RLE packing.
The picture file is located in the Theme folder. Its name can be chosen freely.
The file name to be used can be selected through the "Setup.txt" file, using the "THEMEBMP" command.

Remainder:
A location is made of a couple of numbers, for example (4,6). The first one is the horizontal position, the second one the vertical position
A pixel is a picture element. It is defined by its location and its color.  
 

Colors


The BMP file is drawn in millions of colors (24 bits). Three colors are reserved. The background color, the transparent color, and the positionning color.

To create a new theme or to understand description in this chapter, it is recommended to load a BMP file provided in the application default themes: XP.BMP

Background color fills all the space around objects. In the example, it is yellow, but you can use any other color.

Transparent color shows the pixels to be transparent within the object drawing. The very first pixel in the BMP file (0,0) specifies what will be the transparent color in the whole file. In the example file XP.BMP, it is pure green.

Positionning color defines where objects start and end. The pixel at location (0,1) specifies what will be the positionning color in the whole picture file. In XP.BMP it is pure red. Top-left corner of each object is marked by two pixels of positionning color.
   
Here is a magnified view of an object (inactive radio button of XP theme)

The red pixels (positionning color) sets the beginning of the object. Positionning pixels are always located outside the object area. Therefore, the first row and the first column do not belong to the object. They are filled with background color.

The green pixels (transparent color) show what pixels in the object will be transparent. When this object will be drawn, the background will remain visible for each pixel of this color.

The other pixels are the drawing of the object itself.


 

Objects


Because each object can be in several states (inactive, active, pressed, under mouse), each object is drawn several times in a row

An object is inactive when the user cannot click it.
An object is active when the user can click it.
An object is pressed when the user is clicking it.
An object is under mouse when the user moves the mouse pointer over it.

This order: inactive, active, pressed, under mouse remains the same for all objects in the picture file.

From top to bottom, you will see:

  • Check boxes. Two modes are available: checked or unchecked. A third mode can exist, but it is not used in the current version.
  • Radio buttons.
  • Menu bar backgrounds
  • Menu item background
  • Window close box
  • Window zoom box
  • Window iconize box
  • Window size changing box
  • Vertical scroll bar elements
  • Horizontal scroll bar elements
  • Vertical sliders
  • Horizontal sliders
  • Inactive and active document window frame. When windows are drawn, a smooth color transition is applied between left and right title edge.
  • Inactive and active dialog window
  • Inactive and active movable dialog window
  • Inactive and active alert window
  • Inactive and active movable alert window
  • Inactive and active plain window
  • Inactive and active shadowed plain window
  • Inactive and active menu pane
  • Inactive and active palette window
  • Inactive and active horizontal palette window
  • Inactive and active edit text box
  • Inactive and active list object
  • Focus box (not used, reserved for a future extension)
  • Object frame. It is the frame that is drawn around a group of radio buttons for example
  • Different states for all buttons, plus the default button, its shadow and reflection
  • Button for opening pop-up menus
  • Arrow for pop-up menus
  • Bevel buttons. Used for displaying items in palettes. Must always be drawn in light colors because the icon itself is drawn over. An additional state is available. Inactive, active, pressed, active under mouse and pressed under mouse.
  • Thumb indexes.
  • Background for all kind of windows: dialog, alert, palette, document, thumb index window
  • Progress bar
You can notice some objects (like buttons) must be split into 9 parts by positionning pixels.  

Shadow and reflection

Some objects can generate automatically a shadow over the background. A shadow is drawn black when object is opaque, and several levels of gray for several shadow intensity. 
 

Useful tips


If you wish to define your own theme, copy an existing theme, then rename its folder and modify the BMP file.
You can draw more or less wide and height objects, but if the object is too big, it can overlap other objects in its window.

 
 




Top of page
Last update:  (c) Myriad 2013