wxMINIMIZE,
wxMAXIMIZE,
wxCLOSE_BOX,
- wxTHICK_FRAME,
wxSYSTEM_MENU,
wxMINIMIZE_BOX,
wxMAXIMIZE_BOX,
wxTINY_CAPTION_HORIZ,
wxTINY_CAPTION_VERT,
- wxRESIZE_BOX,
wxRESIZE_BORDER,
wxDIALOG_NO_PARENT,
wxFRAME_EX_METAL,
wxDIALOG_EX_METAL,
wxWS_EX_CONTEXTHELP,
-
- // Obsolete
- wxDIALOG_MODAL,
- wxDIALOG_MODELESS,
- wxUSER_COLOURS,
- wxNO_3D,
wxFRAME_EX_CONTEXTHELP,
wxDIALOG_EX_CONTEXTHELP,
-};
+};
+
+%pythoncode {
+ %# deprecated
+ RESIZE_BOX = MAXIMIZE_BOX
+ THICK_FRAME = RESIZE_BORDER
+
+ %# Obsolete
+ wxDIALOG_MODAL = 0
+ wxDIALOG_MODELESS = 0
+ wxUSER_COLOURS = 0
+ wxNO_3D = 0
+}
enum
virtual void SetTitle(const wxString& title);
virtual wxString GetTitle() const;
+ // enable/disable close button [x]
+ virtual bool EnableCloseButton(bool enable );
+
// Set the shape of the window to the given region.
// Returns True if the platform supports this feature
// (and the operation is successful.)
"Center the window on screen", "");
%pythoncode { CentreOnScreen = CenterOnScreen }
-#ifdef __WXMSW__
- bool EnableCloseButton(bool enable = true);
-#else
- %extend {
- bool EnableCloseButton(bool enable = true) { return false; }
- }
-#endif
-
-
DocDeclStr(
virtual wxWindow *, GetDefaultItem() const,
void SetEscapeId(int escapeId);
int GetEscapeId() const;
+ // Returns the parent to use for modal dialogs if the user did not specify it
+ // explicitly
+ wxWindow *GetParentForModalDialog(wxWindow *parent = NULL) const;
+
// splits text up at newlines and places the
// lines into a vertical wxBoxSizer
wxSizer* CreateTextSizer( const wxString &message );
- // places buttons into a horizontal wxBoxSizer
- wxSizer* CreateButtonSizer( long flags,
- bool separated = false,
- wxCoord distance = 0 );
+
+ // returns a horizontal wxBoxSizer containing the given buttons
+ //
+ // notice that the returned sizer can be NULL if no buttons are put in the
+ // sizer (this mostly happens under smart phones and other atypical
+ // platforms which have hardware buttons replacing OK/Cancel and such)
+ %Rename(_CreateButtonSizer,
+ wxSizer* , CreateButtonSizer( long flags ));
+ %pythoncode {
+ def CreateButtonSizer(self, flags, *ignored):
+ return self._CreateButtonSizer(flags)
+ }
+
+ // returns the sizer containing CreateButtonSizer() below a separating
+ // static line for the platforms which use static lines for items
+ // separation (i.e. not Mac)
+ wxSizer *CreateSeparatedButtonSizer(long flags);
+
wxStdDialogButtonSizer* CreateStdDialogButtonSizer( long flags );
//void SetModal( bool flag );
//---------------------------------------------------------------------------
%newgroup
+%{
+#define wxDEFAULT_MINIFRAME_STYLE wxCAPTION | wxRESIZE_BORDER | wxTINY_CAPTION_HORIZ
+%}
+
+enum {
+ wxDEFAULT_MINIFRAME_STYLE
+};
+
MustHaveApp(wxMiniFrame);
const wxString& title = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
+ long style = wxDEFAULT_MINIFRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
%RenameCtor(PreMiniFrame, wxMiniFrame());
const wxString& title = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
+ long style = wxDEFAULT_MINIFRAME_STYLE,
const wxString& name = wxPyFrameNameStr);
};