%{
#include "helpers.h"
#include <wx/minifram.h>
+#include <wx/splash.h>
%}
//----------------------------------------------------------------------
//----------------------------------------------------------------------
+%{
+ // Put some wx default wxChar* values into wxStrings.
+ DECLARE_DEF_STRING(FrameNameStr);
+ DECLARE_DEF_STRING(DialogNameStr);
+ DECLARE_DEF_STRING(StatusLineNameStr);
+ DECLARE_DEF_STRING(ToolBarNameStr);
+%}
+
+//----------------------------------------------------------------------
+
enum {
wxFULLSCREEN_NOMENUBAR,
wxFULLSCREEN_NOTOOLBAR,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%name(wxPreTopLevelWindow)wxTopLevelWindow();
bool Create(wxWindow *parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- const char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreTopLevelWindow:val._setOORInfo(val)"
// set the frame icon
virtual void SetIcon(const wxIcon& icon);
+ // set the frame icons
+ virtual void SetIcons(const wxIconBundle& icons );
// maximize the window to cover entire screen
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual void SetTitle(const wxString& title);
virtual wxString GetTitle() const;
+
+ // Set the shape of the window to the given region.
+ // Returns TRUE if the platform supports this feature (and the operation
+ // is successful.)
+ virtual bool SetShape(const wxRegion& region);
+
};
//----------------------------------------------------------------------
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%name(wxPreFrame)wxFrame();
bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreFrame:val._setOORInfo(val)"
wxMenuBar *GetMenuBar();
- // call this to simulate a menu command
- bool Command(int id);
-
// process menu command: returns TRUE if processed
bool ProcessCommand(int id);
+ %pragma(python) addtoclass = "Command = ProcessCommand"
// create the main status bar
wxStatusBar* CreateStatusBar(int number = 1,
long style = wxST_SIZEGRIP,
wxWindowID id = -1,
- char* name = "statusBar");
+ const wxString& name = wxPyStatusLineNameStr);
// get the main status bar
wxStatusBar *GetStatusBar();
// forward these to status bar
virtual void SetStatusText(const wxString &text, int number = 0);
virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap
+ void PushStatusText(const wxString &text, int number = 0);
+ void PopStatusText(int number = 0);
+
+ // show help text (typically in the statusbar); show is FALSE
+ // if you are hiding the help, TRUE otherwise
+ virtual void DoGiveHelp(const wxString& text, bool show);
+
+ // set the status bar pane the help will be shown in
+ void SetStatusBarPane(int n);
+ int GetStatusBarPane() const;
// create main toolbar
- virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL,
+ virtual wxToolBar* CreateToolBar(long style = -1, //wxNO_BORDER|wxTB_HORIZONTAL,
wxWindowID id = -1,
- const char* name = "toolBar");
+ const wxString& name = wxPyToolBarNameStr);
// get/set the main toolbar
virtual wxToolBar *GetToolBar() const { return m_frameToolBar; }
virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; }
+ // sends a size event to the window using its current size -- this has an
+ // effect of refreshing the window layout
+ virtual void SendSizeEvent();
+
+
+ // send wxUpdateUIEvents for all menu items in the menubar,
+ // or just for menu if non-NULL
+ void DoMenuUpdates(wxMenu* menu = NULL);
+
+ // do the UI update processing for this window
+ virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE);
};
//---------------------------------------------------------------------------
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
- const char* name = "dialogBox");
+ const wxString& name = wxPyDialogNameStr);
%name(wxPreDialog)wxDialog();
bool Create(wxWindow* parent,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE,
- const char* name = "dialogBox");
+ const wxString& name = wxPyDialogNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreDialog:val._setOORInfo(val)"
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%name(wxPreMiniFrame)wxMiniFrame();
bool Create(wxWindow* parent, const wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
- char* name = "frame");
+ const wxString& name = wxPyFrameNameStr);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreMiniFrame:val._setOORInfo(val)"
//---------------------------------------------------------------------------
+enum {
+ wxSPLASH_CENTRE_ON_PARENT,
+ wxSPLASH_CENTRE_ON_SCREEN,
+ wxSPLASH_NO_CENTRE,
+ wxSPLASH_TIMEOUT,
+ wxSPLASH_NO_TIMEOUT,
+};
+
+
+class wxSplashScreenWindow: public wxWindow
+{
+public:
+ wxSplashScreenWindow(const wxBitmap& bitmap,
+ wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxNO_BORDER);
+
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+
+ void SetBitmap(const wxBitmap& bitmap);
+ wxBitmap& GetBitmap();
+};
+
+
+class wxSplashScreen : public wxFrame {
+public:
+ wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds,
+ wxWindow* parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP);
+
+ %pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
+
+ long GetSplashStyle() const;
+ wxSplashScreenWindow* GetSplashWindow() const;
+ int GetTimeout() const;
+};
+
+
+//---------------------------------------------------------------------------
+