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]) {...}{.inline, raises: [Exception], tags: [RootEffect].}
-
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]) {...}{.inline, raises: [Exception], tags: [RootEffect].}
- Sets the number of fields. All the fields has the same width.
proc getFieldsCount(self: wStatusBar): int {...}{.inline, raises: [], tags: [].}
- Returns the number of fields in the status bar.
proc getStatusWidth(self: wStatusBar; index: int): int {...}{.inline, raises: [], tags: [].}
- Returns the width of the specified field.
proc setStatusText(self: wStatusBar; text = ""; index = 0) {...}{.inline, raises: [], tags: [].}
- Sets the status text for the specified field.
proc getStatusText(self: wStatusBar; index: int): string {...}{.raises: [], tags: [].}
- Returns the string associated with a status bar of the specified field.
proc setStatusIcon(self: wStatusBar; icon: wIcon = nil; index: int = 0) {...}{.inline, raises: [], tags: [].}
- Sets the icon for the specified field.
proc setMinHeight(self: wStatusBar; height: int) {...}{.inline, raises: [], tags: [].}
- Sets the minimal possible height for the status bar.
proc setHelpIndex(self: wStatusBar; index: int) {...}{.inline, raises: [], tags: [].}
- Sets the index to show the help string for menu items.
proc getHelpIndex(self: wStatusBar): int {...}{.inline, raises: [], tags: [].}
- Returns the index to show the help string for menu items.
proc `[]=`(self: wStatusBar; index: int; text: string) {...}{.inline, raises: [], tags: [].}
- Sets the status text for the specified field.
proc `[]`(self: wStatusBar; index: int): string {...}{.inline, raises: [], tags: [].}
- Returns the string associated with a status bar of the specified field.
proc init(self: wStatusBar; parent: wWindow; id = wDefaultID; style: wStyle = 0) {...}{.raises: [ wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError], tags: [RootEffect].}
- Initializes a status bar.
proc StatusBar(parent: wWindow; id = wDefaultID; style: wStyle = 0): wStatusBar {...}{.inline, discardable, raises: [wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError], tags: [RootEffect].}
- Constructor.
Methods
method getBestSize(self: wStatusBar): wSize {...}{.inline, raises: [Exception], tags: [RootEffect].}
- Returns the best size for the status bar.
method getDefaultSize(self: wStatusBar): wSize {...}{.inline, raises: [Exception], tags: [RootEffect].}
- Returns the default size for the status bar.
method show(self: wStatusBar; flag = true) {...}{.inline, raises: [Exception], tags: [RootEffect].}
- Shows or hides the status bar.
method release(self: wStatusBar) {...}{.raises: [], tags: [RootEffect].}
- Release all the resources during destroying. Used internally.