wStatusBar

A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information.

Superclass:wControl
Events:wStatusBarEvent

Procs

proc setStatusWidths(self: wStatusBar; widths: openArray[int]) {...}{.validate, property,
    inline, raises: [], tags: [].}

Sets the widths of the fields in the status line. There are two types of fields: fixed widths and variable width fields. For the fixed width fields you should specify their (constant) width in pixels. For the variable width fields, specify a negative number which indicates how the field should expand: the space left for all variable width fields is divided between them according to the absolute value of this number. A variable width field with width of -2 gets twice as much of it as a field with width -1 and so on.

For example, to create one fixed width field of width 100 in the right part of the status bar and two more fields which get 66% and 33% of the remaining space correspondingly, you should use an array containing -2, -1 and 100.

proc setFieldsCount(self: wStatusBar; number: range[0 .. 256]) {...}{.validate, property,
    inline, raises: [], tags: [].}
Sets the number of fields. All the fields has the same width.
proc getFieldsCount(self: wStatusBar): int {...}{.validate, property, inline, raises: [],
    tags: [].}
Returns the number of fields in the status bar.
proc getStatusWidth(self: wStatusBar; index: int): int {...}{.validate, property, inline,
    raises: [], tags: [].}
Returns the width of the specified field.
proc setStatusText(self: wStatusBar; text = ""; index = 0) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the status text for the specified field.
proc getStatusText(self: wStatusBar; index: int): string {...}{.validate, property,
    raises: [], tags: [].}
Returns the string associated with a status bar of the specified field.
proc setStatusIcon(self: wStatusBar; icon: wIcon = nil; index: int = 0) {...}{.validate,
    property, inline, raises: [], tags: [].}
Sets the icon for the specified field.
proc setMinHeight(self: wStatusBar; height: int) {...}{.validate, property, inline,
    raises: [], tags: [].}
Sets the minimal possible height for the status bar.
proc `[]=`(self: wStatusBar; index: int; text: string) {...}{.validate, inline, raises: [],
    tags: [].}
Sets the status text for the specified field.
proc `[]`(self: wStatusBar; index: int): string {...}{.validate, inline, raises: [], tags: [].}
Returns the string associated with a status bar of the specified field.
proc final(self: wStatusBar) {...}{.raises: [], tags: [].}
Default finalizer for wStatusBar.
proc init(self: wStatusBar; parent: wWindow; id = wDefaultID; style: wStyle = 0) {...}{.validate,
    raises: [], tags: [].}
Initializer.
proc StatusBar(parent: wWindow; id = wDefaultID; style: wStyle = 0): wStatusBar {...}{.inline,
    discardable, raises: [], tags: [].}
Constructor.

Methods

method getBestSize(self: wStatusBar): wSize {...}{.property, inline, raises: [], tags: [].}
Returns the best size for the status bar.
method getDefaultSize(self: wStatusBar): wSize {...}{.property, inline, raises: [], tags: [].}
Returns the default size for the status bar.