wRebar

A rebar control can contain one or more bands, and each band can have a gripper bar, a bitmap, a text label, and one child control. As you dynamically reposition a rebar control band, the rebar control manages the size and position of the child window assigned to that band.

Superclass:wControl

Consts

wRbBandBorder = 0x00000400
wRbDoubleClickToggle = 0x00008000
wRbFixedSize = 0x00000002
wRbBreak = 0x00000001
wRbTopAlign = 0x00000800
wRbHittestCaption = 0x00000002
wRbHittestChevron = 0x00000008
wRbHittestClient = 0x00000003
wRbHittestGrabber = 0x00000004
wRbHittestNowhere = 0x00000001
wRbHittestSplitter = 0x00000010

Procs

proc setImageList(self: wRebar; imageList: wImageList) {...}{.raises: [], tags: [].}
Sets the image list associated with the rebar.
proc getImageList(self: wRebar): wImageList {...}{.inline, raises: [], tags: [].}
Returns the image list associated with the rebar.
proc getCount(self: wRebar): int {...}{.inline, raises: [], tags: [].}
Returns the number of bands in the rebar.
proc getRowCount(self: wRebar): int {...}{.inline, raises: [], tags: [].}
Returns the number of rows in the rebar.
proc getHeight(self: wRebar): int {...}{.inline, raises: [], tags: [].}
Returns the height of the rebar.
proc insertBand(self: wRebar; pos: int; control: wWindow = nil; image = -1; label = "";
               style: wStyle = 0): wCommandID {...}{.discardable, raises: [Exception],
    tags: [RootEffect].}
Inserts a band to the rebar and returns the ID of the band (wIdZero if failed). If control is nil, an empty band will be inserted. Add wRbBreak style to indicate the band is on a new line.
proc addBand(self: wRebar; control: wWindow = nil; image = -1; label = ""; style: wStyle = 0): wCommandID {...}{.
    inline, discardable, raises: [Exception], tags: [RootEffect].}
Adds a band to the rebar and returns the ID of the band (wIdZero if failed). If control is nil, an empty band will be added. Add wRbBreak style to indicate the band is on a new line.
proc findBand(self: wRebar; id: wCommandID): int {...}{.inline, raises: [], tags: [].}
Find a band by id. Returns zero-based index, or -1 otherwise.
proc getBandId(self: wRebar; index: int): wCommandID {...}{.inline, raises: [], tags: [].}
Returns the id for a given band.
proc setBandId(self: wRebar; index: int; id: wCommandID) {...}{.inline, raises: [], tags: [].}
Sets the id for a band.
proc deleteBand(self: wRebar; index: int) {...}{.inline, raises: [], tags: [].}
Deletes a band from a rebar by index.
proc deleteBand(self: wRebar; id: wCommandID) {...}{.inline, raises: [], tags: [].}
Deletes a band from a rebar by id.
proc showBand(self: wRebar; index: int; flag = true) {...}{.inline, raises: [], tags: [].}
Shows or hides a given band in a rebar by index.
proc showBand(self: wRebar; id: wCommandID; flag = true) {...}{.inline, raises: [], tags: [].}
Shows or hides a given band in a rebar by id.
proc minimizeBand(self: wRebar; index: int) {...}{.inline, raises: [], tags: [].}
Resizes a band to its smallest size by index.
proc minimizeBand(self: wRebar; id: wCommandID) {...}{.inline, raises: [], tags: [].}
Resizes a band to its smallest size by id.
proc maximizeBand(self: wRebar; index: int) {...}{.inline, raises: [], tags: [].}
Resizes a band to either its ideal or largest size by index.
proc maximizeBand(self: wRebar; id: wCommandID) {...}{.inline, raises: [], tags: [].}
Resizes a band to either its ideal or largest size by id.
proc getBandRect(self: wRebar; index: int): wRect {...}{.inline, raises: [], tags: [].}
Returns the bounding rectangle for a given band by index.
proc getBandRect(self: wRebar; id: wCommandID): wRect {...}{.inline, raises: [], tags: [].}
Returns the bounding rectangle for a given band by id.
proc getBandWidth(self: wRebar; index: int): int {...}{.inline, raises: [], tags: [].}
Returns the width for a given band by index.
proc getBandWidth(self: wRebar; id: wCommandID): int {...}{.inline, raises: [], tags: [].}
Returns the width for a given band by id.
proc setBandWidth(self: wRebar; index: int; width: int; exactly = false) {...}{.raises: [],
    tags: [].}
Sets the width for a band by index.
proc setBandWidth(self: wRebar; id: wCommandID; width: int; exactly = false) {...}{.inline,
    raises: [], tags: [].}
Sets the width for a band by id.
proc setBandMinWidth(self: wRebar; index: int; width: int) {...}{.inline, raises: [], tags: [].}
Sets the minimum width for a band by index.
proc setBandMinWidth(self: wRebar; id: wCommandID; width: int) {...}{.inline, raises: [],
    tags: [].}
Sets the minimum width for a band by id.
proc getBandHeight(self: wRebar; index: int): int {...}{.inline, raises: [], tags: [].}
Returns the height for a given band by index.
proc getBandHeight(self: wRebar; id: wCommandID): int {...}{.inline, raises: [], tags: [].}
Returns the height for a given band by id.
proc setBandMinHeight(self: wRebar; index: int; height: int) {...}{.inline, raises: [],
    tags: [].}
Sets the minimum height for a band by index.
proc setBandMinHeight(self: wRebar; id: wCommandID; height: int) {...}{.inline, raises: [],
    tags: [].}
Sets the minimum height for a band by id.
proc getBandLabel(self: wRebar; index: int): string {...}{.raises: [], tags: [].}
Returns the label for a band by index.
proc getBandLabel(self: wRebar; id: wCommandID): string {...}{.inline, raises: [], tags: [].}
Returns the label for a band by id.
proc setBandLabel(self: wRebar; index: int; label: string) {...}{.raises: [], tags: [].}
Sets the label for a band by index.
proc setBandLabel(self: wRebar; id: wCommandID; label: string) {...}{.inline, raises: [],
    tags: [].}
Sets the label for a band by id.
proc getBandImage(self: wRebar; index: int): int {...}{.inline, raises: [], tags: [].}
Returns the index of image list for a band by index. -1 means no image.
proc getBandImage(self: wRebar; id: wCommandID): int {...}{.inline, raises: [], tags: [].}
Returns the index of image list for a band by id. -1 means no image.
proc setBandImage(self: wRebar; index: int; image: int) {...}{.inline, raises: [], tags: [].}
Sets the index of image list for a band by index. -1 means no image.
proc setBandImage(self: wRebar; id: wCommandID; image: int) {...}{.inline, raises: [], tags: [].}
Sets the index of image list for a band by id. -1 means no image.
proc getBandStyle(self: wRebar; index: int): wStyle {...}{.inline, raises: [], tags: [].}
Returns the style for a band by index.
proc getBandStyle(self: wRebar; id: wCommandID): wStyle {...}{.inline, raises: [], tags: [].}
Returns the style for a band by id.
proc setBandStyle(self: wRebar; index: int; style: wStyle) {...}{.inline, raises: [], tags: [].}
Sets the style for a band by index.
proc setBandStyle(self: wRebar; id: wCommandID; style: wStyle) {...}{.inline, raises: [],
    tags: [].}
Sets the style for a band by id.
proc moveBand(self: wRebar; index: int; newPos: int) {...}{.raises: [], tags: [].}
Moves a band to another position by index.
proc moveBand(self: wRebar; id: wCommandID; newPos: int) {...}{.inline, raises: [], tags: [].}
Moves a band to another position by id.
proc hitTest(self: wRebar; x: int; y: int): tuple[band: wCommandID, flag: int] {...}{.
    raises: [], tags: [].}
Determines which band (if any, wIdZero otherwise) is at the specified point, giving details in flags. flag will be a one of the following flags:
FlagDescription
wRbHittestCaptionIn the rebar band's caption.
wRbHittestChevronIn the rebar band's chevron
wRbHittestClientIn the rebar band's client area.
wRbHittestGrabberIn the rebar band's gripper.
wRbHittestNowhereNot in a rebar band.
wRbHittestSplitterIn the rebar band's splitter.
proc hitTest(self: wRebar; pos: wPoint): tuple[band: wCommandID, flag: int] {...}{.inline,
    raises: [], tags: [].}
The same as hitTest().
proc disableMinMax(self: wRebar; disable = true) {...}{.inline, raises: [], tags: [].}
Disables or enables maximizing or minimizing a band.
proc disableDrag(self: wRebar; disable = true) {...}{.inline, raises: [], tags: [].}
Disables or enables dragging a band.
proc getLayout(self: wRebar): string {...}{.raises: [], tags: [].}
Returns the current layout of bands in the rebar (binary format). The bands must have different id to work.
proc setLayout(self: wRebar; layout: string) {...}{.raises: [], tags: [].}
Sets a layout of bands in the rebar. The bands must have different id to work.
proc len(self: wRebar): int {...}{.inline, raises: [], tags: [].}
Returns the number of bands in the rebar.
proc init(self: wRebar; parent: wWindow; id = wDefaultID; imageList: wImageList = nil;
         style: wStyle = 0) {...}{.raises: [wNilAccess, wWindowError, wCursorError,
                                  wBrushError, Exception, IndexDefect, wFontError],
                          tags: [RootEffect].}
Initializes a rebar.
proc Rebar(parent: wWindow; id = wDefaultID; imageList: wImageList = nil;
          style: wStyle = 0): wRebar {...}{.inline, discardable, raises: [wNilAccess,
    wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError],
                                  tags: [RootEffect].}
Constructor.

Methods

method show(self: wRebar; flag = true) {...}{.inline, raises: [Exception], tags: [RootEffect].}
Shows or hides the rebar bar.
method release(self: wRebar) {...}{.raises: [], tags: [RootEffect].}
Release all the resources during destroying. Used internally.