// Purpose: interface of wxTopLevelWindow
// Author: wxWidgets team
// RCS-ID: $Id$
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/**
directly, but all of its methods are also applicable for the two classes
above.
+ 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}
class wxTopLevelWindow : public wxWindow
{
public:
+ /**
+ Default ctor.
+ */
+ wxTopLevelWindow();
+
+ /**
+ Constructor creating the top level window.
+ */
+ wxTopLevelWindow(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
+ /**
+ Destructor. Remember that wxTopLevelWindows do not get immediately
+ destroyed when the user (or the app) closes them; they have a
+ @b delayed destruction.
+
+ See @ref overview_windowdeletion for more info.
+ */
+ virtual ~wxTopLevelWindow();
+
+ /**
+ Creates the top level window.
+ */
+ bool Create(wxWindow *parent,
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDEFAULT_FRAME_STYLE,
+ const wxString& name = wxFrameNameStr);
+
/**
Returns @true if the platform supports making the window translucent.
*/
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().
*/
bool IsUsingNativeDecorations() const;
+ /**
+ See wxWindow::SetAutoLayout(): when auto layout is on, this function gets
+ called automatically when the window is resized.
+ */
+ virtual bool Layout();
+
/**
Maximizes or restores the window.
*/
wxWindow* SetDefaultItem(wxWindow* win);
+
+ wxWindow* SetTmpDefaultItem(wxWindow * win);
+ wxWindow* GetTmpDefaultItem() const;
+
+
/**
Sets the icon for this window.
@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.
*/
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