.TH wxAuiManager 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxAuiManager \- Functions for wxAuiManager class .SH DESCRIPTION .LP \fIwxAuiManager\fR\& is the central class of the wxAUI class framework\&. .LP \fIwxAuiManager\fR\& manages the panes associated with it for a particular \fIwxFrame\fR\&, using a pane\&'s \fIwxAuiPaneInfo\fR\& information to determine each pane\&'s docking and floating behaviour\&. .LP \fIwxAuiManager\fR\& uses wxWidgets\&' sizer mechanism to plan the layout of each frame\&. It uses a replaceable dock art class to do all drawing, so all drawing is localized in one area, and may be customized depending on an application\&'s specific needs\&. .LP \fIwxAuiManager\fR\& works as follows: the programmer adds panes to the class, or makes changes to existing pane properties (dock position, floating state, show state, etc\&.)\&. To apply these changes, \fIwxAuiManager\fR\&\&'s \fIupdate/1\fR\& function is called\&. This batch processing can be used to avoid flicker, by modifying more than one pane at a time, and then "committing" all of the changes at once by calling \fIupdate/1\fR\&\&. .LP Panes can be added quite easily: .LP Later on, the positions can be modified easily\&. The following will float an existing pane in a tool window: .LP Layers, Rows and Directions, Positions .LP Inside wxAUI, the docking layout is figured out by checking several pane parameters\&. Four of these are important for determining where a pane will end up: .LP Styles .LP This class supports the following styles: .LP See: Overview aui, \fIwxAuiNotebook\fR\&, \fIwxAuiDockArt\fR\&, \fIwxAuiPaneInfo\fR\& .LP This class is derived (and can use functions) from: \fIwxEvtHandler\fR\& .LP wxWidgets docs: wxAuiManager .SH "EVENTS" .LP Event types emitted from this class: \fIaui_pane_button\fR\&, \fIaui_pane_close\fR\&, \fIaui_pane_maximize\fR\&, \fIaui_pane_restore\fR\&, \fIaui_pane_activated\fR\&, \fIaui_render\fR\& .SH DATA TYPES .nf \fBwxAuiManager()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxAuiManager() .br .fi .br .LP .nf .B new(Options :: [Option]) -> wxAuiManager() .br .fi .br .RS .LP Types: .RS 3 Option = .br {managed_wnd, wxWindow:wxWindow()} | {flags, integer()} .br .RE .RE .RS .LP Constructor\&. .RE .LP .nf .B destroy(This :: wxAuiManager()) -> ok .br .fi .br .RS .LP Dtor\&. .RE .LP .nf .B addPane(This, Window) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br .RE .RE .LP .nf .B addPane(This, Window, Options :: [Option]) -> boolean() .br .fi .br .nf .B addPane(This, Window, Pane_info) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br Pane_info = wxAuiPaneInfo:wxAuiPaneInfo() .br .RE .RE .RS .LP \fIaddPane/4\fR\& tells the frame manager to start managing a child window\&. .LP There are several versions of this function\&. The first version allows the full spectrum of pane parameter possibilities\&. The second version is used for simpler user interfaces which do not require as much configuration\&. The last version allows a drop position to be specified, which will determine where the pane will be added\&. .RE .LP .nf .B addPane(This, Window, Pane_info, Drop_pos) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br Pane_info = wxAuiPaneInfo:wxAuiPaneInfo() .br Drop_pos = {X :: integer(), Y :: integer()} .br .RE .RE .RS .RE .LP .nf .B detachPane(This, Window) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br .RE .RE .RS .LP Tells the \fIwxAuiManager\fR\& to stop managing the pane specified by window\&. .LP The window, if in a floated frame, is reparented to the frame managed by \fIwxAuiManager\fR\&\&. .RE .LP .nf .B getAllPanes(This) -> [wxAuiPaneInfo:wxAuiPaneInfo()] .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Returns an array of all panes managed by the frame manager\&. .RE .LP .nf .B getArtProvider(This) -> wxAuiDockArt:wxAuiDockArt() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Returns the current art provider being used\&. .LP See: \fIwxAuiDockArt\fR\& .RE .LP .nf .B getDockSizeConstraint(This) -> .B {Widthpct :: number(), .B Heightpct :: number()} .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Returns the current dock constraint values\&. .LP See \fIsetDockSizeConstraint/3\fR\& for more information\&. .RE .LP .nf .B getFlags(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Returns the current ?wxAuiManagerOption\&'s flags\&. .RE .LP .nf .B getManagedWindow(This) -> wxWindow:wxWindow() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Returns the frame currently being managed by \fIwxAuiManager\fR\&\&. .RE .LP .nf .B getManager(Window) -> wxAuiManager() .br .fi .br .RS .LP Types: .RS 3 Window = wxWindow:wxWindow() .br .RE .RE .RS .LP Calling this method will return the \fIwxAuiManager\fR\& for a given window\&. .LP The \fIwindow\fR\& parameter should specify any child window or sub-child window of the frame or window managed by \fIwxAuiManager\fR\&\&. .LP The \fIwindow\fR\& parameter need not be managed by the manager itself, nor does it even need to be a child or sub-child of a managed window\&. It must however be inside the window hierarchy underneath the managed window\&. .RE .LP .nf .B getPane(This, Name) -> wxAuiPaneInfo:wxAuiPaneInfo() .br .fi .br .nf .B getPane(This, Window) -> wxAuiPaneInfo:wxAuiPaneInfo() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br .RE .RE .RS .LP \fIgetPane/2\fR\& is used to lookup a \fIwxAuiPaneInfo\fR\& object either by window pointer or by pane name, which acts as a unique id for a window pane\&. .LP The returned \fIwxAuiPaneInfo\fR\& object may then be modified to change a pane\&'s look, state or position\&. After one or more modifications to \fIwxAuiPaneInfo\fR\&, \fIupdate/1\fR\& should be called to commit the changes to the user interface\&. If the lookup failed (meaning the pane could not be found in the manager), a call to the returned \fIwxAuiPaneInfo\fR\&\&'s IsOk() method will return false\&. .RE .LP .nf .B hideHint(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP \fIhideHint/1\fR\& hides any docking hint that may be visible\&. .RE .LP .nf .B insertPane(This, Window, Insert_location) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br Insert_location = wxAuiPaneInfo:wxAuiPaneInfo() .br .RE .RE .LP .nf .B insertPane(This, Window, Insert_location, Options :: [Option]) -> .B boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Window = wxWindow:wxWindow() .br Insert_location = wxAuiPaneInfo:wxAuiPaneInfo() .br Option = {insert_level, integer()} .br .RE .RE .RS .LP This method is used to insert either a previously unmanaged pane window into the frame manager, or to insert a currently managed pane somewhere else\&. .LP \fIinsertPane/4\fR\& will push all panes, rows, or docks aside and insert the window into the position specified by \fIinsert_location\fR\&\&. .LP Because \fIinsert_location\fR\& can specify either a pane, dock row, or dock layer, the \fIinsert_level\fR\& parameter is used to disambiguate this\&. The parameter \fIinsert_level\fR\& can take a value of wxAUI_INSERT_PANE, wxAUI_INSERT_ROW or wxAUI_INSERT_DOCK\&. .RE .LP .nf .B loadPaneInfo(This, Pane_part, Pane) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Pane_part = unicode:chardata() .br Pane = wxAuiPaneInfo:wxAuiPaneInfo() .br .RE .RE .RS .LP \fIloadPaneInfo/3\fR\& is similar to LoadPerspective, with the exception that it only loads information about a single pane\&. .LP This method writes the serialized data into the passed pane\&. Pointers to UI elements are not modified\&. .LP Note: This operation also changes the name in the pane information! .LP See: \fIloadPerspective/3\fR\& .LP See: \fIsavePaneInfo/2\fR\& .LP See: \fIsavePerspective/1\fR\& .RE .LP .nf .B loadPerspective(This, Perspective) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Perspective = unicode:chardata() .br .RE .RE .LP .nf .B loadPerspective(This, Perspective, Options :: [Option]) -> .B boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Perspective = unicode:chardata() .br Option = {update, boolean()} .br .RE .RE .RS .LP Loads a saved perspective\&. .LP A perspective is the layout state of an AUI managed window\&. .LP All currently existing panes that have an object in "perspective" with the same name ("equivalent") will receive the layout parameters of the object in "perspective"\&. Existing panes that do not have an equivalent in "perspective" remain unchanged, objects in "perspective" having no equivalent in the manager are ignored\&. .LP See: \fIloadPaneInfo/3\fR\& .LP See: \fIloadPerspective/3\fR\& .LP See: \fIsavePerspective/1\fR\& .RE .LP .nf .B savePaneInfo(This, Pane) -> unicode:charlist() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Pane = wxAuiPaneInfo:wxAuiPaneInfo() .br .RE .RE .RS .LP \fIsavePaneInfo/2\fR\& is similar to SavePerspective, with the exception that it only saves information about a single pane\&. .LP Return: The serialized layout parameters of the pane are returned within the string\&. Information about the pointers to UI elements stored in the pane are not serialized\&. .LP See: \fIloadPaneInfo/3\fR\& .LP See: \fIloadPerspective/3\fR\& .LP See: \fIsavePerspective/1\fR\& .RE .LP .nf .B savePerspective(This) -> unicode:charlist() .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Saves the entire user interface layout into an encoded \fIwxString\fR\& (not implemented in wx), which can then be stored by the application (probably using wxConfig)\&. .LP See: \fIloadPerspective/3\fR\& .LP See: \fIloadPaneInfo/3\fR\& .LP See: \fIsavePaneInfo/2\fR\& .RE .LP .nf .B setArtProvider(This, Art_provider) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Art_provider = wxAuiDockArt:wxAuiDockArt() .br .RE .RE .RS .LP Instructs \fIwxAuiManager\fR\& to use art provider specified by parameter \fIart_provider\fR\& for all drawing calls\&. .LP This allows pluggable look-and-feel features\&. The previous art provider object, if any, will be deleted by \fIwxAuiManager\fR\&\&. .LP See: \fIwxAuiDockArt\fR\& .RE .LP .nf .B setDockSizeConstraint(This, Widthpct, Heightpct) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Widthpct = Heightpct = number() .br .RE .RE .RS .LP When a user creates a new dock by dragging a window into a docked position, often times the large size of the window will create a dock that is unwieldy large\&. .LP \fIwxAuiManager\fR\& by default limits the size of any new dock to 1/3 of the window size\&. For horizontal docks, this would be 1/3 of the window height\&. For vertical docks, 1/3 of the width\&. .LP Calling this function will adjust this constraint value\&. The numbers must be between 0\&.0 and 1\&.0\&. For instance, calling SetDockSizeContraint with 0\&.5, 0\&.5 will cause new docks to be limited to half of the size of the entire managed window\&. .RE .LP .nf .B setFlags(This, Flags) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Flags = integer() .br .RE .RE .RS .LP This method is used to specify ?wxAuiManagerOption\&'s flags\&. .LP \fIflags\fR\& specifies options which allow the frame management behaviour to be modified\&. .RE .LP .nf .B setManagedWindow(This, Managed_wnd) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Managed_wnd = wxWindow:wxWindow() .br .RE .RE .RS .LP Called to specify the frame or window which is to be managed by \fIwxAuiManager\fR\&\&. .LP Frame management is not restricted to just frames\&. Child windows or custom controls are also allowed\&. .RE .LP .nf .B showHint(This, Rect) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br Rect = .br {X :: integer(), .br Y :: integer(), .br W :: integer(), .br H :: integer()} .br .RE .RE .RS .LP This function is used by controls to explicitly show a hint window at the specified rectangle\&. .LP It is rarely called, and is mostly used by controls implementing custom pane drag/drop behaviour\&. The specified rectangle should be in screen coordinates\&. .RE .LP .nf .B unInit(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP Dissociate the managed window from the manager\&. .LP This function may be called before the managed frame or window is destroyed, but, since wxWidgets 3\&.1\&.4, it\&'s unnecessary to call it explicitly, as it will be called automatically when this window is destroyed, as well as when the manager itself is\&. .RE .LP .nf .B update(This) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxAuiManager() .br .RE .RE .RS .LP This method is called after any number of changes are made to any of the managed panes\&. .LP \fIupdate/1\fR\& must be invoked after \fIaddPane/4\fR\& or \fIinsertPane/4\fR\& are called in order to "realize" or "commit" the changes\&. In addition, any number of changes may be made to \fIwxAuiPaneInfo\fR\& structures (retrieved with \fIgetPane/2\fR\&), but to realize the changes, \fIupdate/1\fR\& must be called\&. This construction allows pane flicker to be avoided by updating the whole layout at one time\&. .RE