docs Component

bncs_style2 - button drawing functions

Description

This is fundamentally the same as the original drawing DLL - bncs_style.dll but this version is configurable.

Configuration

Configuration is to be found in:

<CC_ROOT>\<CC_SYSTEM>\config\stylesheet\bncs_style2.ini

This file can have as many sections as you like - each section name is the name of the style that you tell panelman/visual editor to use. It cannot be the same as any other existing style e.g.

  • Windows
  • Motif
  • Platinum
  • CDE
  • MotifPlus
  • SGI
  • bncs_style
  • bncs_style2
  • bncs_style3
  • bncs_style4
  • bncs_style5

The colour palette entries below are used for various purposes by various controls and I've tried to indicate here where I know that they are used...but I might not have managed to list absolutely everything but it's entirely up to the controls which palette entries they use.

[basic] | Section name - this can be any value and is the same name as the style name selected for panelman/visual editor to display. It cannot be the same as an existing style name
font=SYSTEM | Font face
fontSize=10 | Font Size
fontWeight=88 Font weight range 0 - 99

Values nominally map to:
Light - 25
Normal - 50
DemiBold - 63
Bold - 75
Black - 87
fontItalic=false
backgroundImage=bordlg.xpm Any valid Qt bitmap file (e.g. jpg, png, bmp, xpm)
This bitmap is located in the following path
%CC_ROOT%\%CC_SYSTEM%\config\stylesheet\
roundedCorners=0 | Whether button corners should be rounded - this cuts a rounded hole for the button as well as drawing a few extra pixels in the corner of the control
sliderControlThickness=40
scrollBarExtent=40 | How big the slider is on a scroll bar
scrollBarSliderMin=40 | How small the slider on a scroll bar can become - usually it will shrink to a size proportional to the size of the thing it's scrolling.
buttonShading=NONE Whether buttons (not labels) are drawn with shading. Values are:
none - buttons are painted flat
in - buttons have shading which shades from dark at the top to light at the bottom (looks like a concave surface)
out - buttons have shading which shades from light at the top to dark at the bottom (looks like convex surface)
colouredButtonBorders=0 | borders can be drawn with the default colours (usually white/grey) or coloured according to the dynamic colour of the buttom
buttonBorderWidth=1
<role>.Background=#4d4d4d | Dialog background colour - may be completely obscured by backgroundImage
<role>.Foreground=#ffffff
<role>.Base=#ffffff | Base colour of things like listboxes
<role>.Text=#000000 | Default button text colour
<role>.Button=#bfbfbf | Default button background colour
<role>.ButtonText=#ffffff | Listview uses this for row/column header text colour
<role>.Light=#ffffff | Button edge (when colouredButtonBorders=0)
<role>.Midlight=#f0f0f0 Button edge (when colouredButtonBorders=0)
Label edge (always - for raised/lowered label style)
<role>.Dark=#5f5f5f | Button edge (when colouredButtonBorders=0)
<role>.Mid=cyan
<role>.Shadow=#8f8f8f Button edge (when colouredButtonBorders=0)
Label edge (always - for raised/lowered label style)
<role>.Highlight=#000080 | Used by list controls
<role>.HighlightedText=#ffffff | Used by list controls
<role>.BrightText=#ffffff
<role>.Link=#0000ff
<role>.LinkVisited=#ff00ff

Colour role

Colours have different roles - whether a button is active, inactive or disabled.

BNCS only uses active and disabled roles - inactive is available internally but the way that BNCS glues UIs together inactive has no meaningful use so active and inactive are the same thing.

Sample INI file

[basic]
font=SYSTEM
fontSize=10
fontWeight=88
fontItalic=false
backgroundImage=bordlg.xpm
roundedCorners=0
sliderControlThickness=40
scrollBarExtent=40
scrollBarSliderMin=40
buttonShading=NONE
colouredButtonBorders=0
buttonBorderWidth=1
active.Background=#4d4d4d
active.Foreground=#ffffff
active.Base=#ffffff
active.Text=#000000
active.Button=#bfbfbf
active.ButtonText=#ffffff
active.Light=#ffffff
active.Midlight=#f0f0f0
active.Dark=#5f5f5f
active.Mid=cyan
active.Shadow=#8f8f8f
active.Highlight=#000080
active.HighlightedText=#ffffff
active.BrightText=#ffffff
active.Link=#0000ff
active.LinkVisited=#ff00ff
disabled.Background=#4d4d4d
disabled.Foreground=#808080
disabled.Base=#000000
disabled.Text=#808080
disabled.Button=#4d4d4d
disabled.ButtonText=#808080
disabled.Light=red
disabled.Midlight=green
disabled.Dark=blue
disabled.Mid=yellow
disabled.Shadow=cyan
disabled.Highlight=#000080
disabled.HighlightedText=#ffffff
disabled.BrightText=#ffffff
disabled.Link=#0000ff
disabled.LinkVisited=#ff00ff
Copyright Atos 2012/td> /tr>