proc setBitmapPosition(self: wButton; direction: int) {...}{.raises: [], tags: [].}
-
Set the position at which the bitmap is displayed. Direction can be one of wLeft, wRight, wTop, wBottom, or wCenter.
proc getBitmapPosition(self: wButton): int {...}{.raises: [], tags: [].}
-
Get the position at which the bitmap is displayed. Returned direction can be one of wLeft, wRight, wTop, wBottom, or wCenter.
proc setBitmapMargins(self: wButton; x: int; y: int) {...}{.raises: [], tags: [].}
-
Set the margins between the bitmap and the text of the button.
proc setBitmapMargins(self: wButton; size: wSize) {...}{.inline, raises: [], tags: [].}
-
Set the margins between the bitmap and the text of the button.
proc getBitmapMargins(self: wButton): wSize {...}{.raises: [], tags: [].}
-
Get the margins between the bitmap and the text of the button.
proc setBitmap4Margins(self: wButton; left: int; top: int; right: int; bottom: int) {...}{.
raises: [], tags: [].}
-
Set the margins between the bitmap and the text of the button.
proc setBitmap4Margins(self: wButton; margins: tuple[left: int, top: int, right: int,
bottom: int]) {...}{.inline, raises: [], tags: [].}
-
Set the margins between the bitmap and the text of the button.
proc getBitmap4Margins(self: wButton): tuple[left: int, top: int, right: int, bottom: int] {...}{.
raises: [], tags: [].}
-
Get the margins between the bitmap and the text of the button.
proc setBitmap(self: wButton; bitmap: wBitmap; direction = -1) {...}{.raises: [wNilAccess],
tags: [].}
-
Sets the bitmap to display in the button.
proc getBitmap(self: wButton): wBitmap {...}{.raises: [wBitmapError], tags: [].}
-
Return the bitmap shown by the button. Notice: it create a copy of the bitmap.
proc setIcon(self: wButton; icon: wIcon; direction = -1) {...}{.raises: [wNilAccess], tags: [].}
-
Sets the icon to display in the button.
proc getIcon(self: wButton): wIcon {...}{.raises: [wIconError], tags: [].}
-
Return the icon shown by the button. Notice: it create a copy of the icon.
proc setDefault(self: wButton; flag = true) {...}{.raises: [], tags: [].}
-
This sets the button to be the default item.
proc setDropdownMenu(self: wButton; menu: wMenu = nil) {...}{.raises: [], tags: [RootEffect].}
-
Sets a dropdown menu for a button, or nil to cancel it.
proc showDropdownMenu(self: wButton) {...}{.raises: [Exception, wNilAccess],
tags: [RootEffect].}
-
Show a dropdown menu for a button.
proc click(self: wButton) {...}{.inline, raises: [], tags: [].}
-
Simulates the user clicking a button.
proc init(self: wButton; parent: wWindow; id = wDefaultID; label: string = "";
pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0) {...}{.raises: [
wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
wFontError], tags: [RootEffect].}
-
Initializes a button.
proc Button(parent: wWindow; id = wDefaultID; label: string = ""; pos = wDefaultPoint;
size = wDefaultSize; style: wStyle = 0): wButton {...}{.inline, discardable, raises: [
wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
wFontError], tags: [RootEffect].}
-
Constructor.