.TH wxNotebook 3erl "wx 2.4.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxNotebook \- Functions for wxNotebook class .SH DESCRIPTION .LP This class represents a notebook control, which manages multiple windows with associated tabs\&. .LP To use the class, create a \fIwxNotebook\fR\& object and call \fIwxBookCtrlBase:addPage/4\fR\& or \fIwxBookCtrlBase:insertPage/5\fR\&, passing a window to be used as the page\&. Do not explicitly delete the window for a page that is currently managed by \fIwxNotebook\fR\&\&. .LP \fIwxNotebookPage\fR\& is a typedef for \fIwxWindow\fR\&\&. .LP Styles .LP This class supports the following styles: .LP Page backgrounds .LP On Windows, the default theme paints a background on the notebook\&'s pages\&. If you wish to suppress this theme, for aesthetic or performance reasons, there are three ways of doing it\&. You can use \fIwxNB_NOPAGETHEME\fR\& to disable themed drawing for a particular notebook, you can call \fIwxSystemOptions:setOption/2\fR\& to disable it for the whole application, or you can disable it for individual pages by using \fIwxWindow:setBackgroundColour/2\fR\&\&. .LP To disable themed pages globally: .LP Set the value to 1 to enable it again\&. To give a single page a solid background that more or less fits in with the overall theme, use: .LP On platforms other than Windows, or if the application is not using Windows themes, \fIgetThemeBackgroundColour/1\fR\& will return an uninitialised colour object, and the above code will therefore work on all platforms\&. .LP See: ?wxBookCtrl, \fIwxBookCtrlEvent\fR\&, \fIwxImageList\fR\&, Examples .LP This class is derived (and can use functions) from: \fIwxBookCtrlBase\fR\& \fIwxControl\fR\& \fIwxWindow\fR\& \fIwxEvtHandler\fR\& .LP wxWidgets docs: wxNotebook .SH "EVENTS" .LP Event types emitted from this class: \fIcommand_notebook_page_changed\fR\&, \fIcommand_notebook_page_changing\fR\& .SH DATA TYPES .nf \fBwxNotebook()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxNotebook() .br .fi .br .RS .LP Constructs a notebook control\&. .RE .LP .nf .B new(Parent, Id) -> wxNotebook() .br .fi .br .RS .LP Types: .RS 3 Parent = wxWindow:wxWindow() .br Id = integer() .br .RE .RE .LP .nf .B new(Parent, Id, Options :: [Option]) -> wxNotebook() .br .fi .br .RS .LP Types: .RS 3 Parent = wxWindow:wxWindow() .br Id = integer() .br Option = .br {pos, {X :: integer(), Y :: integer()}} | .br {size, {W :: integer(), H :: integer()}} | .br {style, integer()} .br .RE .RE .RS .LP Constructs a notebook control\&. .LP Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN window style\&. .RE .LP .nf .B destroy(This :: wxNotebook()) -> ok .br .fi .br .RS .LP Destroys the \fIwxNotebook\fR\& object\&. .RE .LP .nf .B assignImageList(This, ImageList) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br ImageList = wxImageList:wxImageList() .br .RE .RE .RS .LP Sets the image list for the page control and takes ownership of the list\&. .LP See: \fIwxImageList\fR\&, \fIsetImageList/2\fR\& .RE .LP .nf .B create(This, Parent, Id) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br Parent = wxWindow:wxWindow() .br Id = integer() .br .RE .RE .LP .nf .B create(This, Parent, Id, Options :: [Option]) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br Parent = wxWindow:wxWindow() .br Id = integer() .br Option = .br {pos, {X :: integer(), Y :: integer()}} | .br {size, {W :: integer(), H :: integer()}} | .br {style, integer()} .br .RE .RE .RS .LP Creates a notebook control\&. .LP See \fInew/3\fR\& for a description of the parameters\&. .RE .LP .nf .B getImageList(This) -> wxImageList:wxImageList() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br .RE .RE .RS .LP Returns the associated image list, may be NULL\&. .LP See: \fIwxImageList\fR\&, \fIsetImageList/2\fR\& .RE .LP .nf .B getPageImage(This, NPage) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br NPage = integer() .br .RE .RE .RS .LP Returns the image index for the given page\&. .RE .LP .nf .B getRowCount(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br .RE .RE .RS .LP Returns the number of rows in the notebook control\&. .RE .LP .nf .B getThemeBackgroundColour(This) -> wx:wx_colour4() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br .RE .RE .RS .LP If running under Windows and themes are enabled for the application, this function returns a suitable colour for painting the background of a notebook page, and can be passed to \fIwxWindow:setBackgroundColour/2\fR\&\&. .LP Otherwise, an uninitialised colour will be returned\&. .RE .LP .nf .B setImageList(This, ImageList) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br ImageList = wxImageList:wxImageList() .br .RE .RE .RS .LP Sets the image list to use\&. .LP It does not take ownership of the image list, you must delete it yourself\&. .LP See: \fIwxImageList\fR\&, \fIassignImageList/2\fR\& .RE .LP .nf .B setPadding(This, Padding) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br Padding = {W :: integer(), H :: integer()} .br .RE .RE .RS .LP Sets the amount of space around each page\&'s icon and label, in pixels\&. .LP Note: The vertical padding cannot be changed in wxGTK\&. .RE .LP .nf .B setPageSize(This, Size) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br Size = {W :: integer(), H :: integer()} .br .RE .RE .RS .LP Sets the width and height of the pages\&. .LP Note: This method is currently not implemented for wxGTK\&. .RE .LP .nf .B setPageImage(This, Page, Image) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxNotebook() .br Page = Image = integer() .br .RE .RE .RS .LP Sets the image index for the given page\&. .LP \fIimage\fR\& is an index into the image list which was set with \fIsetImageList/2\fR\&\&. .RE