MainDocs:Standard Components

From ClanLib Game SDK

Contents

Component

All components inherit from CL_GUIComponent, and therefore they all share the base css properties as defined below in CL_Component section.

CL_Component API Reference

Available CSS Properties

Property Type Default Condition Explanation
minimum-width int 0
minimum-height int 0
maximum-width int 4026531839
maximum-height int 4026531839
preferred-width int 0
preferred-height int 0
 
bg_image string none Resource name of image
 
bg-image-sizing [tile, center, repeat, stretch] stretch bg-image is set
 
bg-image-sizing-left int 0 bg-image-sizing is repeat or stretch
bg-image-sizing-top int 0 bg-image-sizing is repeat or stretch
bg-image-sizing-right int 0 bg-image-sizing is repeat or stretch
bg-image-sizing-bottom int 0 bg-image-sizing is repeat or stretch
bg-image-sizing-center-width int 0 bg-image-sizing is repeat or stretch
bg-image-sizing-center-height int 0 bg-image-sizing is repeat or stretch
 
margin-top int 0 bg-image is not set
margin-left int 0 bg-image is not set
margin-right int 0 bg-image is not set
margin-bottom int 0 bg-image is not set
 
border-top int 0
border-left int 0
border-right int 0
border-bottom int 0
 
padding-top int 0
padding-left int 0
padding-right int 0
padding-bottom int 0
 
bg-color color transparent bg-image is not set
border-color color transparent bg-image is not set


Label

CL_Label API Reference

Part States Explanation
Label Normal, Hot, Disabled


Part Property Type Default Condition Explanation
Label text-color color black
 
Label font-weight int or [normal, bold, bolder, light, lighter] normal
Label font-size int -11
Label font-style [none, italic] none
Label font-family string Tahoma
 
Label align [left, center, right, justify] left
Label vertical-align [top, center, bottom] center

LineEdit

CL_LineEdit API Reference

Part States Explanation
LineEdit Normal, Hot, Disabled
Selection Normal, Disabled
Cursor Normal, Disabled


Part Property Type Default Condition Explanation
LineEdit text-color color black
 
LineEdit font-weight int or [normal, bold, bolder, light, lighter] normal
LineEdit font-size int -11
LineEdit font-style [none, italic] none
LineEdit font-family string Tahoma
 
Selection text-color color white
 
Selection font-weight int or [normal, bold, bolder, light, lighter] normal
Selection font-size int -11
Selection font-style [none, italic] none
Selection font-family string Tahoma


ScrollBar

CL_ScrollBar API Reference

Part States Explanation
ScrollBar Normal, Hot, Disabled
 
ScrollButton.Up Normal, Hot, Disabled, Pressed Only available for vertical scrollbars
ScrollButton.Down Normal, Hot, Disabled, Pressed Only available for vertical scrollbars
ScrollTrack.Up Normal, Hot, Disabled, Pressed Only available for vertical scrollbars
ScrollTrack.Down Normal, Hot, Disabled, Pressed Only available for vertical scrollbars
ScrollThumb.Vertical Normal, Hot, Disabled, Pressed Only available for vertical scrollbars
 
ScrollButton.Left Normal, Hot, Disabled, Pressed Only available for horizontal scrollbars
ScrollButton.Right Normal, Hot, Disabled, Pressed Only available for horizontal scrollbars
ScrollTrack.Left Normal, Hot, Disabled, Pressed Only available for horizontal scrollbars
ScrollTrack.Right Normal, Hot, Disabled, Pressed Only available for horizontal scrollbars
ScrollThumb.Horizontal Normal, Hot, Disabled, Pressed Only available for horizontal scrollbars


Part Property Type Default Condition Explanation

Note: ScrollButton parts use preferred size, and should be set.


PushButton

CL_PushButton API Reference

Part States Explanation
Button Normal, Hot, Pressed, Defaulted, Disabled, Flat
Focus Normal


Part Property Type Default Condition Explanation
Button text-color color black
 
Button font-weight int or [normal, bold, bolder, light, lighter] normal
Button font-size int -11
Button font-style [none, italic] none
Button font-family string Tahoma
 
Button align [left, center, right, justify] left
Button vertical-align [top, center, bottom] center


ListView

CL_ListView API Reference

Part States Explanation
ListView Normal
Row Normal, Alternate
Row_opener Open, Closed
Selection Normal
Columns_bg Normal
Column Normal This is only the background for the columns behind cells, not the header
Cell Normal, Details, Icons Details and Icons states are only available in their specific listviewmodes
Icon_selection Normal
mouse_selection Normal


Part Property Type Default Condition Explanation
Cell font-weight int or [normal, bold, bolder, light, lighter] normal
Cell font-size int -11
Cell font-style [none, italic] none
Cell font-family string Tahoma
 
Cell text-color color black
Cell text-color-selected color white
 
Cell icon-color color white
Cell icon-color-selected color white
Cell icon-color-overlay color white
Cell icon-color-selected-overlay color white
 
Row_opener offset-x int 0
Row_opener offset-y int 0
Row indent-width int 20
Cell opener-icon-gap int 6
Cell icon-text-gap int 6
Cell icon-offset-y int 0
Cell icon-width int 16
Cell icon-height int 16
Cell line-edit-offset-left int 0
Cell line-edit-offset-top int 0
Cell line-edit-offset-bottom int 0
Cell line-edit-offset-right int 0

Note: Cell and Part_opener use preferred size, and should be set.


ListView Header

CL_ListViewHeader API Reference

Part States Explanation
Listview_header Normal
Columnheader Normal, Pressed, Hot


Part Property Type Default Condition Explanation
Columnheader text-color color black
Columnheader font-weight int or [normal, bold, bolder, light, lighter] normal
Columnheader font-size int -11
Columnheader font-style [none, italic] none
Columnheader font-family string Tahoma