proc getPageCount(self: wNoteBook): int {...}{.inline, raises: [], tags: [].}
-
Returns the number of pages in the control.
proc len(self: wNoteBook): int {...}{.inline, raises: [], tags: [].}
-
Returns the number of pages in the control. This shoud be equal to getPageCount() in most case.
proc getSelection(self: wNoteBook): int {...}{.inline, raises: [], tags: [].}
-
Returns the currently selected page, or wNotFound if none was selected.
proc insertPage(self: wNoteBook; pos = -1; page: wPanel; text = ""; select = false;
image: wImage = nil; imageId: int = -1) {...}{.raises: [Exception, wNilAccess,
wBitmapError, wImageError, IndexDefect, wFontError, wPenError, wBrushError],
tags: [RootEffect].}
-
Inserts a page (wPanel object) at the specified position. Page's parent must be this control. Do not delete the page, it will be deleted by the wNoteBook control (if not removed).
proc insertPage(self: wNoteBook; pos = -1; text = ""; select = false; image: wImage = nil;
imageId: int = -1): wPanel {...}{.inline, discardable, raises: [wNilAccess,
wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError,
wBitmapError, wImageError, wPenError], tags: [RootEffect].}
-
Inserts a new page at the specified position. Return the new page (wPanel object).
proc addPage(self: wNoteBook; page: wPanel; text = ""; select = false; image: wImage = nil;
imageId: int = -1) {...}{.inline, raises: [Exception, wNilAccess, wBitmapError,
wImageError, IndexDefect, wFontError, wPenError, wBrushError], tags: [RootEffect].}
-
Adds a page (wPanel object). Page's parent must be this control. Do not delete the page, it will be deleted by the wNoteBook control (if not removed).
proc addPage(self: wNoteBook; text = ""; select = false; image: wImage = nil;
imageId: int = -1): wPanel {...}{.inline, discardable, raises: [wNilAccess,
wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError,
wBitmapError, wImageError, wPenError], tags: [RootEffect].}
-
Adds a new page. Return the new page (wPanel object).
proc getPageText(self: wNoteBook; pos: int): string {...}{.raises: [], tags: [].}
-
Returns the string for the given page.
proc setPageText(self: wNoteBook; pos: int; text: string) {...}{.raises: [], tags: [].}
-
Sets the text for the given page.
proc changeSelection(self: wNoteBook; pos: int) {...}{.raises: [Exception],
tags: [RootEffect].}
-
Changes the selection to the given page. This function behaves as setSelection() but does not generate the page changing events.
proc setSelection(self: wNoteBook; pos: int): int {...}{.discardable, raises: [Exception],
tags: [RootEffect].}
-
Sets the selection to the given page. Notice that this function generates the page changing events, use the changeSelection() if you don't want these events to be generated.
proc getCurrentPage(self: wNoteBook): wPanel {...}{.inline, raises: [], tags: [].}
-
Returns the currently selected page or nil.
proc getPage(self: wNoteBook; pos: int): wPanel {...}{.inline, raises: [], tags: [].}
-
Returns the page at the given position or nil.
proc `[]`(self: wNoteBook; pos: int): wPanel {...}{.inline, raises: [], tags: [].}
-
Returns the page at the given position. Raise error if index out of bounds.
proc removePage(self: wNoteBook; pos: int): wPanel {...}{.inline, discardable, raises: [
Exception, wNilAccess, IndexDefect, wFontError, wPenError, wBrushError],
tags: [RootEffect].}
-
Removes the specified page, without deleting the associated panel object. Returns the removed panel object.
proc deletePage(self: wNoteBook; pos: int) {...}{.inline, raises: [Exception, wNilAccess,
IndexDefect, wFontError, wPenError, wBrushError], tags: [RootEffect].}
-
Deletes the specified page, and the associated window.
proc removeAllPages(self: wNoteBook) {...}{.inline, raises: [Exception, wNilAccess,
IndexDefect, wFontError, wPenError, wBrushError], tags: [RootEffect].}
-
Removes all pages.
proc deleteAllPages(self: wNoteBook) {...}{.inline, raises: [Exception, wNilAccess,
IndexDefect, wFontError, wPenError, wBrushError], tags: [RootEffect].}
-
Deletes all pages.
proc setImageList(self: wNoteBook; imageList: wImageList) {...}{.inline,
raises: [wNilAccess], tags: [].}
-
Sets the image list to use. By default, wNoteBook handle it's owns imagelist. However, you can decide to use another image list if needed. Assign imageId in insertPage()/addPage() to set the image index.
proc getImageList(self: wNoteBook): wImageList {...}{.inline, raises: [], tags: [].}
-
Returns the associated image list.
proc setPageImage(self: wNoteBook; pos: int; image: int) {...}{.raises: [], tags: [].}
-
Sets the image index for the given page. Notice that this should only use to change the image index. If the page don't have a image when creation, don't set image index for it.
proc getPageImage(self: wNoteBook; pos: int): int {...}{.raises: [], tags: [].}
-
Returns the image index for the given page.
proc setPadding(self: wNoteBook; size: wSize) {...}{.inline, raises: [], tags: [].}
-
Sets the amount of space around each page's icon and label, in pixels.
proc init(self: wNoteBook; parent: wWindow; id = wDefaultID; pos = wDefaultPoint;
size = wDefaultSize; style: wStyle = 0) {...}{.raises: [wNilAccess, wWindowError,
wCursorError, wBrushError, Exception, IndexDefect, wFontError],
tags: [RootEffect].}
-
Initializes a notebook control.
proc NoteBook(parent: wWindow; id = wDefaultID; pos = wDefaultPoint; size = wDefaultSize;
style: wStyle = 0): wNoteBook {...}{.inline, discardable, raises: [wNilAccess,
wWindowError, wCursorError, wBrushError, Exception, IndexDefect, wFontError],
tags: [RootEffect].}
-
Constructor.