JadeSkinWindow Class

The JadeSkinWindow class, a subclass of the JadeSkinArea class, is the abstract superclass of all Window class skins and it contains the defined image and category of the skin. Applying a region to a window enables it to be of any shape and include "holes" inside it. In addition, any part of any child outside the defined region is not displayed.

For details about the JadeSkinWindow class properties summarized in the following table, see Chapter 1 of the JADE Encyclopaedia of Classes.

Property Reference to …
myImageMask A JadeSkinWindowStateImage object used to construct a Windows region for the window
mySkinCategory The skin category that applies to the skin

To understand the way in which a region is constructed, consider that the image specified by the myImageMask property is drawn (stretched) over the top of the window, including any border area. Only black pixels are considered part of the window when it is painted or clicked on.

The result could be a window with rounded corners, a window with holes in it, and so on.

Because the mask image is built to the same size as the actual window, if border masks are defined, the only reasonable region that could be constructed is one where the corners are shaped. As all other areas are stretched to fit, it is likely that they would not provide a suitable result. You would achieve a better result by defining only an inner image for the mask that is stretched.

If the mySkinCategory property is set to "Company Logo", for example, the skin is applied only to a window of the appropriate type that has the Window::skinCategoryName property also set to "Company Logo".

In addition, you can define a skin category for a control subclass (for example, each BaseControl subclass) and associate a different category name with each of those skins. The constructor of each control subclass can then set the appropriate category name on the control so that the correct JadeSkinBaseControl class skin is then applied.

JadeSkinForm Class

The JadeSkinForm class, a subclass of the JadeSkinWindow class, describes the skin of a form. Use the JadeSkinArea class to define the image drawn for the active border and the inner (client area) of the form. If the form has a backdrop picture, this image is drawn.

When erasing the inner area of the form:

  1. If the form backBrush property is not null, the inner area is erased using that brush.

  2. If the form skin has a JadeSkinArea class imgInner property value that is a brush, the inner area is erased using that brush.

  3. If the form backColor property is not Color_3DFace, the inner area is erased using the background color of the form.

  4. If the backColor property of the skin area is not Default_Color, erase using the backColor property value of the skin.

  5. The Color_3DFace value is used when erasing.

  6. If the form was erased using a color and the skin of the form has a JadeSkinArea class imgInner property value that is not a brush, that image is drawn centered in the inner area of the form skin.

The JadeSkinForm class contains the JADE skins defined for forms in your applications and encapsulates the behavior required to define and maintain JADE skins using the JadeSkinMaintenance and JadeSkinSelection forms provided by the JADE RootSchema.

For details about using runtime skin facilities provided by JADE methods, see "Run Time Skin Facilities", later in this chapter.

The set of skin images used by JADE is provided with the product release so that you can use these skins in your applications, if required. (By default, skins are not used.)

The form border for a skin is made up of 11 images, as shown in the following image.

The following is a description f the form border areas.

The following areas are not affected by using a skin.

For details about maintaining and using JADE skins, see "Defining and Maintaining JADE Skins at Run Time" under "Maintaining Skins Using Extended Functionality", in Chapter 2 of the JADE Runtime Application Guide.

For details about the JadeSkinForm class properties summarized in the following table, see Chapter 1 of the JADE Encyclopaedia of Classes.

Property Default Value Description
captionActiveForeColor Default_Color Color used to draw caption text when the form is active.
captionFontBold False Specifies whether the caption of the form is bold.
captionFontItalic False Specifies whether the caption of the form is italics.
captionFontName Tahoma Font with which the form caption is displayed.
captionFontSize 8.25 Size of the font with which the form caption is displayed.
captionInactiveForeColor Default_Color Color used to draw the form’s caption text when the form is inactive.
captionLeft 0 Starting left position of the form’s caption text.
captionTop 0 Starting right position of the form’s caption text.
centerCaption False Specifies whether the caption is centered within the top strip area of the form’s skin.
imgInactiveBorderBottomLeft Null Border area image to be drawn for the bottom left of the inactive form.
imgInactiveBorderBottomRight Null Border area image to be drawn for the bottom right of the inactive form.
imgInactiveBorderBottomStrip Null Border area image to be drawn for the bottom strip of the inactive form.
imgInactiveBorderLeftStrip Null Border area image to be drawn for the left strip of the inactive form.
imgInactiveBorderRightStrip Null Border area image to be drawn for the right strip of the inactive form.
imgInactiveBorderTopLeft Null Border area image to be drawn for the top left of the inactive form.
imgInactiveBorderTopRight Null Border area image to be drawn for the top right of the inactive form.
imgInactiveBorderTopStrip Null Border area image to be drawn for the top strip of the inactive form.
imgMenuLeft Null Image drawn for the left of the form’s menu line.
imgMenuRight Null Image drawn for the right of the form’s menu line.
imgMenuStrip Null Image drawn for the strip of the form’s menu line.
menuBackColor Default_Color Background color for the menu line if the skin has no defined imgMenuStrip property value.
menuBackColorSelected Default_Color Background color of the selected menu items for drop‑down or popup menus.
menuFontBold False Specifies whether menu line item, drop-down menu, and popup menu captions are bold.
menuFontItalic False Specifies whether menu line item, drop-down menu, and popup menu captions are italics.
menuFontName Null ("") Font with which menu line items, drop-down menus, and popup menus are displayed.
menuFontSize 0 Size of the font with which menu line items, drop-down menus, and popup menus are displayed.
menuForeColor Default_Color Color to draw the text for non-selected and enabled menu line items.
menuForeColorDisabled Default_Color Color to draw the text for disabled menu line items and the default disabled text color for drop-down and popup menus.
menuForeColorSelected Default_Color Color to draw text for selected text for drop-down and popup menus.
menuLeftPosition 0 Starting left position of the form’s menus.
menuTopPosition 0 Offset of the top position of the form’s menu drawn on the skin.
myChildMinimizeBtn   Reference to the simple button images drawn for an MDI child minimize button in its four states (up, down, rollover, and disabled).
myChildRestoreBtn   Reference to the simple button images drawn for an MDI child restore button in its four states.
myChildTerminateBtn   Reference to the simple button images drawn for an MDI child terminate button in its four states.
myMaximizeBtn   Reference to the simple button images drawn for an MDI child maximize button in its four states.
myMaximizedBtn   Reference to the simple button images drawn for an MDI child maximized button in its four states.
myMenuSkin   Reference to the menu definition of the form.
myMinimizeBtn   Reference to the simple button images to be drawn for the form minimize button in its four states.
myTerminateBtn   Reference to the simple button images to be drawn for the form terminate button in its four states.
showMenuLineAlways False Specifies whether the menu line of the skin is always drawn, regardless of whether the form has a menu.
transparentColorForButtons Default_Color Transparent color to be applied to maximize, minimize, and terminate buttons drawn for the form’s skin.
JadeSkinControl Class

The JadeSkinControl class, a subclass of the JadeSkinWindow class, is the abstract superclass that provides the definition of elements common for each control that can be skinned. For details, see Chapter 1 of the JADE Encyclopaedia of Classes.

Use the properties of the JadeSkinArea class to define the image drawn for the active border and the inner (client area) of each control. When erasing the inner area of a control:

  1. If the control backBrush property of the form is not null, the inner area is erased using that brush.

  2. If the control skin has a JadeSkinArea class imgInner property value that is a brush, the inner area is erased using that brush.

  3. If the backColor property of the skin area is not Default_Color and the backColor property of the control is the default or the skin was set by using the Control class setSkin method, erase using the backColor property value of the skin.

  4. If the value of the backColor property of the control is Color_3DFace and the form of the control has a skin whose backColor property is not set to Default_Color, the inner area is erased using the backColor property value of the form’s skin.

  5. Erase using the backColor property value of the control.

  6. If the control was erased using a color and the skin of the control has an inner image defined in the JadeSkinArea class imgInner property that is not a brush (that is, the JadeSkinArea class innerIsBrush property is set to false), that image is drawn centered in the inner area.

The constants provided by the JadeSkinControl class are listed in the following table.

Constant Integer Value Constant Integer Value
ApplyCondition_3D 2 ApplyCondition_All 0
ApplyCondition_Border 1    

For details about the JadeSkinControl class properties summarized in the following table, see Chapter 1 of the JADE Encyclopaedia of Classes.

Property Default Value Description
applyCondition Dependent on the control type Determines whether the border area of a control uses the skin
borderStyle BorderStyle_Images Type of border to be drawn
fontBold False Specifies whether the control font is bold when the control uses the default application font
fontItalic False Specifies whether the control font is italicized when the control uses the default application font
fontName Null ("") Font with which the control is drawn (the default value indicates the control uses its own default font)
fontSize 0 Specifies the size of the control font when the control uses the default application font
fontStrikethru False Specifies whether the control font is strikethrough when the control uses the default application font
fontUnderline False Specifies whether the control font is underlined when the control uses the default application font
foreColor Default_Color Color to be used for drawing the text of the control
foreColorDisabled Default_Color Color to be used for drawing the text of the control when it is disabled

The subclasses of the JadeSkinControl class are summarized in the following table. For details about these subclasses and their properties, see Chapter 1 of the JADE Encyclopaedia of Classes.

Subclass Holds the …
JadeSkinBaseControl Definition of a skin for BaseControl subclassed controls
JadeSkinBrowseButtons Definition of a skin for BrowseButtons controls
JadeSkinButton Definition of a skin for Button controls
JadeSkinCheckBox Definition of a skin for CheckBox controls
JadeSkinComboBox Definition of a skin for ComboBox controls
JadeSkinFolder Definition of a skin for Folder controls
JadeSkinFrame Definition of a skin for Frame controls
JadeSkinGroupBox Definition of a skin for GroupBox controls
JadeSkinJadeDockBase Elements of a docking control skin and provides the JadeSkinJadeDockBar and JadeSkinJadeDockContainer subclasses that hold definitions of skins for the JadeDockBar and JadeDockContainer classes
JadeSkinJadeEditMask Definition of a skin for JadeEditMask controls
JadeSkinJadeMask Definition of a skin for JadeMask controls
JadeSkinJadeRichText Definition of a skin for JadeRichText controls
JadeSkinLabel Definition of a skin for Label controls
JadeSkinListBox Definition of a skin for ListBox controls
JadeSkinOleControl Definition of a skin for OleControl controls
JadeSkinOptionButton Definition of a skin for OptionButton controls
JadeSkinPicture Definition of a skin for Picture controls
JadeSkinProgressBar Definition of a skin for ProgressBar controls
JadeSkinScrollBar Information common to a vertical and horizontal scroll bar, and provides the JadeSkinHScroll and JadeSkinVScroll subclasses that hold definitions of skins for the HScroll and VScroll classes
JadeSkinHScroll Definition of a skin for HScroll horizontal ScrollBar controls
JadeSkinVScroll Definition of a skin for VScroll vertical ScrollBar controls
JadeSkinSheet Definition of a skin for Sheet controls
JadeSkinStatusLine Definition of a skin for StatusLine controls
JadeSkinTable Definition of a skin for Table controls
JadeSkinTextBox Definition of a skin for TextBox controls

Skins do not apply to the ActiveXControl, MultiMedia, and Ocx control classes, as these are totally drawn by the controls themselves.

JadeSkinBaseControl Class

The JadeSkinBaseControl class, a subclass of the JadeSkinControl class, holds the definition of a skin for subclasses of the BaseControl class.

JadeSkinBrowseButtons Class

The JadeSkinBrowseButtons class, a subclass of the JadeSkinControl class, holds the definition of a skin for BrowseButtons controls.

If a button image is not supplied for a non-up state, the up image is used. For painting to be successful, the skin requires all of the up images to be supplied.

JadeSkinButton Class

The JadeSkinButton class, a subclass of the JadeSkinControl class, holds the definition of a skin for Button controls.

If the createRegionFromMask property is set to true, the JadeSkinWindow::myImageMask property is used to create a window region. If it is set to false (the default), the full rectangular button area is drawn using the skin. The region defined by the myImageMask property then applies only to mouse actions. For example, if the button is an unusual-shaped image on a background, the button displays only the rollover and click images when the mouse is positioned over that special area.

Each state can consist of up to eight border segments and an inner image, an inner image only, or no images (in which case the background color is used to fill the non-border area). These images are drawn inside any defined border area. If you do not define a specific state, the myButtonUp image is used.

The following image on the left is an example of a button with a raised three-dimensional effect and the image on the right is an example of a button with a sunken three-dimensional effect.

JadeSkinCheckBox Class

The JadeSkinCheckBox class, a subclass of the JadeSkinControl class, holds the definition of a skin for CheckBox controls. If the check box button image of the skin is higher than the check box control using that skin, the check box control is enlarged in height to display the entire button image.

If you do not supply a specific state, the appropriate up image is used. If you do not supply the appropriate up image, the default check box image is drawn. For example, the following image is an example of a CheckBox control with the Control class borderStyle property set to BorderStyle_3DSunken and the Control class backBrush property set.

JadeSkinComboBox Class

The JadeSkinComboBox class, a subclass of the JadeSkinControl class, holds the definition of a skin for ComboBox controls.

When defining the skin for a ComboBox control, note the following points.

JadeSkinFolder Class

The JadeSkinFolder class, a subclass of the JadeSkinControl class, holds the definition of a skin for Folder controls.

JadeSkinFrame Class

The JadeSkinFrame class, a subclass of the JadeSkinControl class, holds the definition of a skin for Frame controls.

JadeSkinGroupBox Class

The JadeSkinGroupBox class, a subclass of the JadeSkinControl class, holds the definition of a skin for GroupBox controls. As a group box control has no non-client area (border area) and the entire skin image is drawn in the client area, children may be positioned anywhere within that control and cover the drawn images.

The group box skin images are drawn over the entire control area. The drawing of the caption depends on whether the skin definition includes a skin label reference (myLabelSkin). If there is no skin label reference, the caption is drawn transparently over the skin image. If the skin references a label definition, that label skin is drawn on top of the group box skin image.

The label is sized so that there is a three-pixel gap from the border area of the label to the left, right, top, and bottom of the caption. The caption or the label is drawn at the position indicated by the captionPosition, captionPositionLeftOffset, and captionPositionTopOffset properties.

The constants provided by the JadeSkinGroupBox class are listed in the following table.

Constant Integer Value Description
CaptionPosition_Left_Top 0 Left-justified at the top
CaptionPosition_Left_Middle 1 Left-justified and centered vertically
CaptionPosition_Left_Bottom 2 Left-justified at the bottom
CaptionPosition_Right_Top 3 Right-justified at the top
CaptionPosition_Right_Middle 4 Right-justified and centered vertically
CaptionPosition_Right_Bottom 5 Right-justified at the bottom
CaptionPosition_Center_Top 6 Centered horizontally at the top
CaptionPosition_Center_Middle 7 Centered horizontally and vertically
CaptionPosition_Center_Bottom 8 Centered horizontally at the bottom

The following image is an example of two group boxes. The example at the left has only the top and right border strips set.

JadeSkinJadeDockBase Class

The JadeSkinJadeDockBase class, a subclass of the JadeSkinControl class, is the abstract class that defines elements of a docking control skin.

The first example at the left of the following image shows an image drawn horizontally (by using the myHorizontalGripBar property) for the grip bar of a vertically aligned docking control, in which the grip bar is the two horizontal lines at the top of the image. The second example at the right of the following image shows an image drawn vertically (by using the myVerticalGripBar property) for the grip bar for a horizontally aligned docking control, in which the grip bar is the two vertical lines at the left of the image.

The JadeSkinJadeDockBase class provides the JadeSkinJadeDockBar control subclass and JadeSkinJadeDockContainer control subclass.

JadeSkinJadeDockBar Class

The JadeSkinJadeDockBar class, a subclass of the JadeSkinJadeDockBase class, holds the definition of a skin for JadeDockBar controls.

JadeSkinJadeDockContainer Class

The JadeSkinJadeDockContainer class, a subclass of the JadeSkinJadeDockBase class, holds the definition of a skin for JadeDockContainer controls.

JadeSkinJadeEditMask Class

The JadeSkinJadeEditMask class, a subclass of the JadeSkinControl class, holds the definition of a skin for JadeEditMask controls.

The background area of a JadeEditMask control outside of the text box children is always drawn using the value of the backColor property of its parent and is unaffected by the skin.

JadeSkinJadeMask Class

The JadeSkinJadeMask class, a subclass of the JadeSkinControl class, holds the definition of a skin for JadeMask controls.

JadeSkinJadeRichText Class

The JadeSkinJadeRichText class, a subclass of the JadeSkinControl class, holds the definition of a skin for JadeRichText controls.

JadeSkinLabel Class

The JadeSkinLabel class, a subclass of the JadeSkinControl class, holds the definition of a skin for Label controls.

JadeSkinListBox Class

The JadeSkinListBox class, a subclass of the JadeSkinControl class, holds the definition of a skin for ListBox controls.

The images defined in these properties replace the equivalent image only if the standard JADE image has not been replaced in the list box.

The following image shows an example of a ListBox class with a defined skin.

JadeSkinOleControl Class

The JadeSkinOleControl class, a subclass of the JadeSkinControl class, holds the definition of a skin for OleControl controls.

JadeSkinOptionButton Class

The JadeSkinOptionButton class, a subclass of the JadeSkinControl class, holds the definition of a skin for OptionButton controls. If the option button image of the skin is higher than the option button control using that skin, the option button control is enlarged in height to display the entire image.

If you do not supply a specific state, the appropriate up image is used. If you do not supply the appropriate up image, the default option button image is drawn.

JadeSkinPicture Class

The JadeSkinPicture class, a subclass of the JadeSkinControl class, holds the definition of a skin for Picture controls.

JadeSkinProgressBar Class

The JadeSkinProgressBar class, a subclass of the JadeSkinControl class, holds the definition of a skin for ProgressBar controls.

JadeSkinScrollBar Class

The JadeSkinScrollBar class, a subclass of the JadeSkinControl class, is the abstract class that contains information common to vertical and horizontal scroll bars.

The JadeSkinScrollBar class provides the JadeSkinHScroll and JadeSkinVScroll control subclasses.

JadeSkinHScroll Class

The JadeSkinHScroll class, a subclass of the JadeSkinScrollBar class, holds the definition of a skin for HScroll subclasses of ScrollBar controls.

This skin is also used for drawing the horizontal scroll bar for any control or form in the application.

The height of the border area and the height of the myLeftButton.imgUp image determine the height of the scroll bar. For a scroll bar control, the image is stretched vertically to fit the area inside the borders, as shown in the example in the following image.

If you do not supply the image for a specific state, the appropriate up image is used. The default scroll button image is drawn if you do not supply the up image.

JadeSkinVScroll Class

The JadeSkinVScroll class, a subclass of the JadeSkinScrollBar class, holds the definition of a skin for VScroll subclasses of ScrollBar controls.

This skin is also used for drawing the vertical scroll bar for any control or form in the application.

The width of the border area and the width of the myTopButton.imgUp image determine the width of the scroll bar. For a scroll bar control, the image is stretched horizontally to fit the area inside the borders.

If you do not supply the image for a specific state, the appropriate up image is used. The default scroll button image is drawn if you do not supply the up image.

JadeSkinSheet Class

The JadeSkinSheet class, a subclass of the JadeSkinControl class, holds the definition of a skin for Sheet controls.

The following image shows an example of a sheet with a sunken three-dimensional effect.

JadeSkinStatusLine Class

The JadeSkinStatusLine class, a subclass of the JadeSkinControl class, holds the definition of a skin for StatusLine controls.

The following image shows an example of a skinned status line.

JadeSkinTable Class

The JadeSkinTable class, a subclass of the JadeSkinControl class, holds the definition of a skin for Table controls.

The default value of Default_Color for these properties indicates that the table uses its normal color. The following image shows an example of the Table class with an applied skin.

JadeSkinTextBox Class

The JadeSkinTextBox class, a subclass of the JadeSkinControl class, holds the definition of a skin for TextBox controls.

Text box controls do not successfully handle back brushes and non-solid colors for the backColor property.