Using the new WB skin features

 

WindowBlinds 2 introduces some new features which may allow the skinner to produce much more advanced skins.

 

This document explains the new features.

 

Rebar Grips

 

A rebar grip is the little item to the left of toolbars in many apps.  Examples are the taskbar (on machines with the IE desktop update installed), Internet Explorer, Office 2000 applications.  A skinned example is shown below

 

 

language

 

[RebarGrip]

 

As usual you have the image line.  This informs WB what image to use.  This bitmap only contains ONE sub image.

 

Image = Colours\gripimg.bmp

 

The middle part of the rebar can be stretched or tiled.  By default it is tiled, so you need to add the following line to make the middle stretch instead

 

StretchMiddle =1

 

When tiling or stretching, you may want to have an area at the top and bottom of the bar which does not stretch or tile.  The following 2 lines define the number of pixels simply to copy at the top and bottom

 

TopHeight = 1

BotHeight = 1

 

Group Boxes

 

 A group box is a control which is used to surround other controls.  They are mainly used to group related buttons etc together.

 

 

language

 

Group boxes share many of the attributes of buttons, taskbar buttons and tabs.  As such I shall only explain those parts specific to group boxes.

Firstly a group box consists of 2 parts.  The first part are the borders around the control.  This is 3 pixels wide and comes in 2 forms.  Some group boxes have text labels and others do not.  To deal with this, the image for the edges contains 2 sub images.  The first is used when the group box does have a label, and the 2nd is used when it does not.

 

[GroupBoxEdge]

 

The attributes used in this section are identical to those used by taskbar buttons.  See the [taskbar] section in the normal UIS2 documentation for more details.

 

If the group box does have a label, then the label drawing is controlled by the following section

 

[GroupBox]

 

Some of the attributes used in this section are identical to those used by taskbar buttons.  See the [taskbar] section in the normal UIS2 documentation for more details.

 

The image file contains ONE image.

 

As well as the usual attributes it supports a number of additional attributes.

 

How the background for the label is drawn can be controlled by the following attribute.  Setting this to 0 will make the label background fill the whole width of the group box.  Setting it to 1 will make it size to the width of the label text.

 

BackgroundAlignment = 1

 

You may also want some additional control over the positioning of the label background.  As such you can make the background width smaller or larger than usual.  The names should make it obvious which does which!

 

BackgroundLeftShift = -2

BackgroundRightShift = -7

 

Combo Boxes

 

A combo box is used to allow the user to select from a list of options.  These have a border and a drop down button.

 

 

language

 

As there are 2 images involved in skinning a combo box, there are 2 sections required.

 

The first defines the border image

 

[SunkEdge]

 

As usual this section uses the same attributes as taskbar buttons.  The image file contains FOUR images.

 

The language is NORMAL, PRESSED, DISABLED, MOUSEOVER.  Only the first 3 are used at the moment, but this is likely to change in the future.

 

[ComboButton]

 

As usual this section uses the same attributes as taskbar buttons.  The image file contains FOUR images.

 

The language is NORMAL, PRESSED, DISABLED, MOUSEOVER.  Only the first 3 are used at the moment, but this is likely to change in the future.

 

MDI Menubar controls

 

In applications which use the MDI interface, a child window can be maximized in the parent.  This leads to the minimize, maximize and close buttons appearing at the top right hand edge of the parents menu bar.

 

 

There are some very special restrictions on the language of the image file so I shall explain those here.

 

The image contains 12 sub images.  Each sub image is 15x14 pixels.  The sub images are as follows

 

Minimize button enabled

Minimize button pressed

Minimize button disabled

Minimize button mouseover

Maximize button enabled

Maximize button pressed

Maximize button disabled

Maximize button mouseover

Close button enabled

Close button pressed

Close button disabled

Close button mouseover

 

[MdiControls]

Image = Colours\MDI.bmp

 

Statusbars

 

A status bar is the bar which some applications display inlanguageion in at the bottom of their main window. 

 

Some applications (mainly Microsoft ones – Office, Visual Studio etc) do not use standard statusbars, but instead invent their own.  These cannot be skinned by WindowBlinds as there is no documented way to obtain any inlanguageion on the ‘status bar’.

 

A few applications use the normal statusbar, but then stick it in ownerdrawn mode just to draw simple text.  These apps will probably be using an ocx supplied with Visual Basic 5 or 6 which has this strange behaviour.  Right now these are not skinned, but we are working on these.

 

 

 

language

 

[StatusBarEdges]

 

This section uses the standard attributes used by buttons, taskbar buttons and tabs

 

The image file contains 3 images.  These are used for the sunk state, raised state and flat state.

 

Image=LiteXIII\StatusBarEdges.bmp

 

 

Header Bars

 

A header bar is the bar displayed above the listview used by explorer when in details view.  These are actually more common than you would first think.

 

 

language

 

[HeaderBar]

 

As usual this section uses the standard attributes used by buttons, taskbar buttons and tabs.

 

The image contains 5 sub images.  These are used for NORMAL, PRESSED,  RESERVED, RESERVED, RESERVED.  However, please place the image you would use for NORMAL in the last 3 states.

 

Image=LiteXIII\Tabs.bmp

 

Colour Masks

 

One of the major new features in WindowBlinds 2 is the ability to allow the user to change the colour of parts of the skin.

 

There are 2 ways a skin can support this. 

 

·         For users of the enhanced registered build (WB registered users / Object desktop users) you could not worry about making any special masks and just let them use the force colouring feature.  This will work best if the skin is greyscale

·         For unregistered users or if you want more control over the colouring, you should use mask images.  Mask images are explained below

 

A mask image can be used to tell WB which bits to apply the colour to and which bits to avoid.  The mask also allows you to say how much colour should be applied to any pixel (even down to per channel if you wanted)

 

The mask images should be the same size as the image they are to be the mask for.  So if I have a button image which is 100x20, then the mask image needs to be 100x20 too. 

 

The colour depth of a mask image can be any supported colour depth (That is 8 bit colour or 24 bit colour – 15 and 16 bit colour languages may cause problems on certain Oses)

 

In the mask, 255 in a colour channel means use the selected colour 100% here and 0 means do not colour.  Values between 0 and 255 are varying levels of blending.  The user has a master slider which allows them to decide by how much the blending should occur.

 

How do I tell WB about the mask?

 

Anywhere an image is used, you can simply take the attribute name and add MASK to the end of it.

 

For example.

 

            [Personality]

            .

            .

            Top = myskin\topimage.bmp

 

            TopMask = myskin\topimgmask.bmp

 

 

What about system colours?

 

System colours can be set too.

 

A new section [ColoursMask] can be used.  The same attribute names are used as those in the Colours section.

 

Example.

 

Background = 128

 

The value can be from 0 – 255 in a similar way to the values in the mask image.

 

Additions to the standard object attributes

 

WindowBlinds allows the edges of objects to be tiled as well as stretched.

 

 

 

TO BE CONTINUED…