]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/toplevel.h
Always give all the remaining space to the first wxTreeListCtrl column.
[wxWidgets.git] / interface / wx / toplevel.h
index 822e2edc7f3c06778e5a7674a07b303579b77a4e..cd00995b2d0048472cd13069582f26d168795cae 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     interface of wxTopLevelWindow
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Purpose:     interface of wxTopLevelWindow
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 /**
 /////////////////////////////////////////////////////////////////////////////
 
 /**
@@ -45,6 +45,24 @@ enum
     Note that the instances of wxTopLevelWindow are managed by wxWidgets in the
     internal top level window list.
 
     Note that the instances of wxTopLevelWindow are managed by wxWidgets in the
     internal top level window list.
 
+    @beginEventEmissionTable
+    @event{EVT_MAXIMIZE(id, func)}
+        Process a @c wxEVT_MAXIMIZE event. See wxMaximizeEvent.
+    @event{EVT_MOVE(func)}
+        Process a @c wxEVT_MOVE event, which is generated when a window is moved.
+        See wxMoveEvent.
+    @event{EVT_MOVE_START(func)}
+        Process a @c wxEVT_MOVE_START event, which is generated when the user starts
+        to move or size a window. wxMSW only.
+        See wxMoveEvent.
+    @event{EVT_MOVE_END(func)}
+        Process a @c wxEVT_MOVE_END event, which is generated when the user stops
+        moving or sizing a window. wxMSW only.
+        See wxMoveEvent.
+    @event{EVT_SHOW(func)}
+        Process a @c wxEVT_SHOW event. See wxShowEvent.
+    @endEventTable
+
     @library{wxcore}
     @category{managedwnd}
 
     @library{wxcore}
     @category{managedwnd}
 
@@ -62,7 +80,7 @@ public:
         Constructor creating the top level window.
     */
     wxTopLevelWindow(wxWindow *parent,
         Constructor creating the top level window.
     */
     wxTopLevelWindow(wxWindow *parent,
-                    wxWindowID winid,
+                    wxWindowID id,
                     const wxString& title,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
                     const wxString& title,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
@@ -132,6 +150,19 @@ public:
     */
     wxWindow* GetDefaultItem() const;
 
     */
     wxWindow* GetDefaultItem() const;
 
+    /**
+        Get the default size for a new top level window.
+
+        This is used internally by wxWidgets on some platforms to determine the
+        default size for a window created using ::wxDefaultSize so it is not
+        necessary to use it when creating a wxTopLevelWindow, however it may be
+        useful if a rough estimation of the window size is needed for some
+        other reason.
+
+        @since 2.9.2
+     */
+    static wxSize GetDefaultSize();
+
     /**
         Returns the standard icon of the window. The icon will be invalid if it
         hadn't been previously set by SetIcon().
     /**
         Returns the standard icon of the window. The icon will be invalid if it
         hadn't been previously set by SetIcon().
@@ -231,6 +262,33 @@ public:
     */
     virtual void Maximize(bool maximize = true);
 
     */
     virtual void Maximize(bool maximize = true);
 
+    /**
+        MSW-specific function for accessing the system menu.
+
+        Returns a wxMenu pointer representing the system menu of the window
+        under MSW. The returned wxMenu may be used, if non-@c NULL, to add
+        extra items to the system menu. The usual @c wxEVT_COMMAND_MENU_SELECTED
+        events (that can be processed using @c EVT_MENU event table macro) will
+        then be generated for them. All the other wxMenu methods may be used as
+        well but notice that they won't allow you to access any standard system
+        menu items (e.g. they can't be deleted or modified in any way
+        currently).
+
+        Notice that because of the native system limitations the identifiers of
+        the items added to the system menu must be multiples of 16, otherwise
+        no events will be generated for them.
+
+        The returned pointer must @em not be deleted, it is owned by the window
+        and will be only deleted when the window itself is destroyed.
+
+        This function is not available in the other ports by design, any
+        occurrences of it in the portable code must be guarded by
+        @code #ifdef __WXMSW__ @endcode preprocessor guards.
+
+        @since 2.9.3
+     */
+    wxMenu *MSWGetSystemMenu() const;
+
     /**
         Use a system-dependent way to attract users attention to the window when
         it is in background.
     /**
         Use a system-dependent way to attract users attention to the window when
         it is in background.
@@ -257,6 +315,11 @@ public:
     */
     wxWindow* SetDefaultItem(wxWindow* win);
 
     */
     wxWindow* SetDefaultItem(wxWindow* win);
 
+    
+    wxWindow*  SetTmpDefaultItem(wxWindow * win);
+    wxWindow* GetTmpDefaultItem() const;
+
+    
     /**
         Sets the icon for this window.
 
     /**
         Sets the icon for this window.
 
@@ -409,7 +472,7 @@ public:
 
         @param alpha
             Determines how opaque or transparent the window will be, if the
 
         @param alpha
             Determines how opaque or transparent the window will be, if the
-            platform supports the opreration. A value of 0 sets the window to be
+            platform supports the operation. A value of 0 sets the window to be
             fully transparent, and a value of 255 sets the window to be fully
             opaque.
     */
             fully transparent, and a value of 255 sets the window to be fully
             opaque.
     */
@@ -423,6 +486,23 @@ public:
         there are any open top level windows.
     */
     virtual bool ShouldPreventAppExit() const;
         there are any open top level windows.
     */
     virtual bool ShouldPreventAppExit() const;
+    
+    /**
+        This function sets the wxTopLevelWindow's modified state on OS X,
+        which currently draws a black dot in the wxTopLevelWindow's close button.
+        On other platforms, this method does nothing.
+        
+        @see OSXIsModified()
+    */
+    virtual void OSXSetModified(bool modified);
+    
+    /**
+        Returns the current modified state of the wxTopLevelWindow on OS X.
+        On other platforms, this method does nothing.
+        
+        @see OSXSetModified()
+    */
+    virtual bool OSXIsModified() const;
 
     /**
         Depending on the value of @a show parameter the window is either shown
 
     /**
         Depending on the value of @a show parameter the window is either shown