<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxFrame</title>
</header>
<module>wxFrame</module>
<modulesummary>Functions for wxFrame class</modulesummary>
<description><p>A frame is a window whose size and position can (usually) be changed by the user.
      </p><p>It usually has thick borders and a title bar, and can optionally contain a menu bar, toolbar and status bar. A frame can contain any window that is not a frame or dialog.
      </p><p>A frame that has a status bar and toolbar, created via the <seemfa marker="#createStatusBar/2"><c>createStatusBar/2</c></seemfa> and <seemfa marker="#createToolBar/2"><c>createToolBar/2</c></seemfa> functions, manages these windows and adjusts the value returned by <seemfa marker="wxWindow#getClientSize/1"><c>wxWindow:getClientSize/1</c></seemfa> to reflect the remaining size available to application windows.
      </p><p>Remark: An application should normally define an <seeerl marker="wxCloseEvent"><c>wxCloseEvent</c></seeerl> handler for the frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
      </p><p>Default event processing</p> <p><seeerl marker="wxFrame"><c>wxFrame</c></seeerl> processes the following events:
      </p> <p>Styles</p><p>This class supports the following styles:
      </p><p>See also the overview_windowstyles.
      </p><p>Extra Styles</p><p>This class supports the following extra styles:
      </p><p>See: <seeerl marker="wxMDIParentFrame"><c>wxMDIParentFrame</c></seeerl>, <seeerl marker="wxMDIChildFrame"><c>wxMDIChildFrame</c></seeerl>, <seeerl marker="wxMiniFrame"><c>wxMiniFrame</c></seeerl>, <seeerl marker="wxDialog"><c>wxDialog</c></seeerl>
      </p>
  <p>This class is derived (and can use functions) from: 
    <seeerl marker="wxTopLevelWindow"><c>wxTopLevelWindow</c></seeerl> <seeerl marker="wxWindow"><c>wxWindow</c></seeerl> <seeerl marker="wxEvtHandler"><c>wxEvtHandler</c></seeerl></p>
  
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_frame.html">wxFrame</url></p>
  </description><section><title>Events</title><p>Event types emitted from this class: <seeerl marker="wxCloseEvent"><c>close_window</c></seeerl>, <seeerl marker="wxIconizeEvent"><c>iconize</c></seeerl>, <seeerl marker="wxMenuEvent"><c>menu_open</c></seeerl>, <seeerl marker="wxMenuEvent"><c>menu_close</c></seeerl>, <seeerl marker="wxMenuEvent"><c>menu_highlight</c></seeerl></p></section>
<datatypes><datatype><name name="wxFrame"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>new/4</c></fsummary>
  </func>
  
  <func>
    <name name="new" arity="4" clause_i="1" since=""/>
    <fsummary>Constructor, creating the window. </fsummary>
    <desc><p>Constructor, creating the window. 
      </p><p>Remark: For Motif, MWM (the Motif Window Manager) should be running for any window styles to work (otherwise all styles take effect).
      </p><p>See: <seemfa marker="#create/5"><c>create/5</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>Destroys all child windows and menu bar if present.
      </p><p>See overview_windowdeletion for more info. 
      </p></desc>
  </func>
  
  <func>
    <name name="create" arity="4" clause_i="1" since=""/>
    <fsummary>See: <c>create/5</c></fsummary>
  </func>
  
  <func>
    <name name="create" arity="5" clause_i="1" since=""/>
    <fsummary>Used in two-step frame construction. </fsummary>
    <desc><p>Used in two-step frame construction. 
      </p><p>See <seemfa marker="#new/4"><c>new/4</c></seemfa> for further details. 
      </p></desc>
  </func>
  
  <func>
    <name name="createStatusBar" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>createStatusBar/2</c></fsummary>
  </func>
  
  <func>
    <name name="createStatusBar" arity="2" clause_i="1" since=""/>
    <fsummary>Creates a status bar at the bottom of the frame. </fsummary>
    <desc><p>Creates a status bar at the bottom of the frame. 
      </p><p>Return: A pointer to the status bar if it was created successfully, NULL otherwise.
      </p><p>Remark: The width of the status bar is the whole width of the frame (adjusted automatically when resizing), and the height and text size are chosen by the host windowing system.
      </p><p>See: <seemfa marker="#setStatusText/3"><c>setStatusText/3</c></seemfa>, <c>OnCreateStatusBar()</c> (not implemented in wx), <seemfa marker="#getStatusBar/1"><c>getStatusBar/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="createToolBar" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>createToolBar/2</c></fsummary>
  </func>
  
  <func>
    <name name="createToolBar" arity="2" clause_i="1" since=""/>
    <fsummary>Creates a toolbar at the top or left of the frame. </fsummary>
    <desc><p>Creates a toolbar at the top or left of the frame. 
      </p><p>Return: A pointer to the toolbar if it was created successfully, NULL otherwise.
      </p><p>Remark: By default, the toolbar is an instance of <seeerl marker="wxToolBar"><c>wxToolBar</c></seeerl>. To use a different class, override <c>OnCreateToolBar()</c> (not implemented in wx). When a toolbar has been created with this function, or made known to the frame with <seemfa marker="#setToolBar/2"><c>setToolBar/2</c></seemfa>, the frame will manage the toolbar position and adjust the return value from <seemfa marker="wxWindow#getClientSize/1"><c>wxWindow:getClientSize/1</c></seemfa> to reflect the available space for application windows. Under Pocket PC, you should always use this function for creating the toolbar to be managed by the frame, so that wxWidgets can use a combined menubar and toolbar. Where you manage your own toolbars, create a <seeerl marker="wxToolBar"><c>wxToolBar</c></seeerl> as usual.
      </p><p>See: <seemfa marker="#createStatusBar/2"><c>createStatusBar/2</c></seemfa>, <c>OnCreateToolBar()</c> (not implemented in wx), <seemfa marker="#setToolBar/2"><c>setToolBar/2</c></seemfa>, <seemfa marker="#getToolBar/1"><c>getToolBar/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getClientAreaOrigin" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the origin of the frame client area (in client coordinates). </fsummary>
    <desc><p>Returns the origin of the frame client area (in client coordinates). 
      </p><p>It may be different from (0, 0) if the frame has a toolbar. 
      </p></desc>
  </func>
  
  <func>
    <name name="getMenuBar" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a pointer to the menubar currently associated with the frame (if any). </fsummary>
    <desc><p>Returns a pointer to the menubar currently associated with the frame (if any). 
      </p><p>See: <seemfa marker="#setMenuBar/2"><c>setMenuBar/2</c></seemfa>, <seeerl marker="wxMenuBar"><c>wxMenuBar</c></seeerl>, <seeerl marker="wxMenu"><c>wxMenu</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="getStatusBar" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a pointer to the status bar currently associated with the frame (if any). </fsummary>
    <desc><p>Returns a pointer to the status bar currently associated with the frame (if any). 
      </p><p>See: <seemfa marker="#createStatusBar/2"><c>createStatusBar/2</c></seemfa>, <seeerl marker="wxStatusBar"><c>wxStatusBar</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="getStatusBarPane" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the status bar pane used to display menu and toolbar help. </fsummary>
    <desc><p>Returns the status bar pane used to display menu and toolbar help. 
      </p><p>See: <seemfa marker="#setStatusBarPane/2"><c>setStatusBarPane/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getToolBar" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a pointer to the toolbar currently associated with the frame (if any). </fsummary>
    <desc><p>Returns a pointer to the toolbar currently associated with the frame (if any). 
      </p><p>See: <seemfa marker="#createToolBar/2"><c>createToolBar/2</c></seemfa>, <seeerl marker="wxToolBar"><c>wxToolBar</c></seeerl>, <seemfa marker="#setToolBar/2"><c>setToolBar/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="processCommand" arity="2" clause_i="1" since=""/>
    <fsummary>Simulate a menu command. </fsummary>
    <desc><p>Simulate a menu command. 
      </p></desc>
  </func>
  
  <func>
    <name name="sendSizeEvent" arity="1" clause_i="1" since=""/>
    <fsummary>See: <c>sendSizeEvent/2</c></fsummary>
  </func>
  
  <func>
    <name name="sendSizeEvent" arity="2" clause_i="1" since=""/>
    <fsummary>This function sends a dummy <c>wxSizeEvent</c> to the window allowing it to re-layout its children positions. </fsummary>
    <desc><p>This function sends a dummy <seeerl marker="wxSizeEvent"><c>wxSizeEvent</c></seeerl> to the window allowing it to re-layout its children positions. 
      </p><p>It is sometimes useful to call this function after adding or deleting a children after the frame creation or if a child size changes. Note that if the frame is using either sizers or constraints for the children layout, it is enough to call <seemfa marker="wxWindow#layout/1"><c>wxWindow:layout/1</c></seemfa> directly and this function should not be used in this case.
      </p><p>If <c>flags</c> includes <c>wxSEND_EVENT_POST</c> value, this function posts the event, i.e. schedules it for later processing, instead of dispatching it directly. You can also use <c>PostSizeEvent()</c> (not implemented in wx) as a more readable equivalent of calling this function with this flag.
      </p></desc>
  </func>
  
  <func>
    <name name="setMenuBar" arity="2" clause_i="1" since=""/>
    <fsummary>Tells the frame to show the given menu bar. </fsummary>
    <desc><p>Tells the frame to show the given menu bar. 
      </p><p>Remark: If the frame is destroyed, the menu bar and its menus will be destroyed also, so do not delete the menu bar explicitly (except by resetting the frame's menu bar to another frame or NULL). Under Windows, a size event is generated, so be sure to initialize data members properly before calling <seemfa marker="#setMenuBar/2"><c>setMenuBar/2</c></seemfa>. Note that on some platforms, it is not possible to call this function twice for the same frame object.
      </p><p>See: <seemfa marker="#getMenuBar/1"><c>getMenuBar/1</c></seemfa>, <seeerl marker="wxMenuBar"><c>wxMenuBar</c></seeerl>, <seeerl marker="wxMenu"><c>wxMenu</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setStatusBar" arity="2" clause_i="1" since=""/>
    <fsummary>Associates a status bar with the frame. </fsummary>
    <desc><p>Associates a status bar with the frame. 
      </p><p>If <c>statusBar</c> is NULL, then the status bar, if present, is detached from the frame, but <c>not</c> deleted.
      </p><p>See: <seemfa marker="#createStatusBar/2"><c>createStatusBar/2</c></seemfa>, <seeerl marker="wxStatusBar"><c>wxStatusBar</c></seeerl>, <seemfa marker="#getStatusBar/1"><c>getStatusBar/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setStatusBarPane" arity="2" clause_i="1" since=""/>
    <fsummary>Set the status bar pane used to display menu and toolbar help. </fsummary>
    <desc><p>Set the status bar pane used to display menu and toolbar help. 
      </p><p>Using -1 disables help display. 
      </p></desc>
  </func>
  
  <func>
    <name name="setStatusText" arity="2" clause_i="1" since=""/>
    <fsummary>See: <c>setStatusText/3</c></fsummary>
  </func>
  
  <func>
    <name name="setStatusText" arity="3" clause_i="1" since=""/>
    <fsummary>Sets the status bar text and updates the status bar display. </fsummary>
    <desc><p>Sets the status bar text and updates the status bar display. 
      </p><p>This is a simple wrapper for <seemfa marker="wxStatusBar#setStatusText/3"><c>wxStatusBar:setStatusText/3</c></seemfa> which doesn't do anything if the frame has no status bar, i.e. <seemfa marker="#getStatusBar/1"><c>getStatusBar/1</c></seemfa> returns NULL.
      </p><p>Remark: Use an empty string to clear the status bar.
      </p><p>See: <seemfa marker="#createStatusBar/2"><c>createStatusBar/2</c></seemfa>, <seeerl marker="wxStatusBar"><c>wxStatusBar</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setStatusWidths" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the widths of the fields in the status bar. </fsummary>
    <desc><p>Sets the widths of the fields in the status bar. 
      </p><p>Remark: The widths of the variable fields are calculated from the total width of all fields, minus the sum of widths of the non-variable fields, divided by the number of variable fields. 
      </p></desc>
  </func>
  
  <func>
    <name name="setToolBar" arity="2" clause_i="1" since=""/>
    <fsummary>Associates a toolbar with the frame. </fsummary>
    <desc><p>Associates a toolbar with the frame. 
      </p></desc>
  </func>
  </funcs>
</erlref>
