X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1c74ca98b236925f24e40ff1920dcd2a299b0c9..9c039d08bfbb59c0abcbc705fb49f9b2cb321edf:/utils/wxPython/src/frames.i?ds=inline diff --git a/utils/wxPython/src/frames.i b/utils/wxPython/src/frames.i new file mode 100644 index 0000000000..5dc589fff7 --- /dev/null +++ b/utils/wxPython/src/frames.i @@ -0,0 +1,96 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: frames.i +// Purpose: SWIG definitions of various window classes +// +// Author: Robin Dunn +// +// Created: 8/27/98 +// RCS-ID: $Id$ +// Copyright: (c) 1998 by Total Control Software +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + + +%module frames + +%{ +#include "helpers.h" + +#ifdef __WXMSW__ +#include +#endif +%} + +//---------------------------------------------------------------------- + +%include typemaps.i +%include my_typemaps.i + +// Import some definitions of other classes, etc. +%import _defs.i +%import misc.i +%import gdi.i +%import windows.i +%import stattool.i + +%pragma(python) code = "import wxp" + +//---------------------------------------------------------------------- + +class wxFrame : public wxWindow { +public: + wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos = wxPyDefaultPosition, + const wxSize& size = wxPyDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + char* name = "frame"); + + %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" + + void Centre(int direction = wxBOTH); +#ifdef __WXMSW__ + void Command(int id); +#endif + wxStatusBar* CreateStatusBar(int number = 1, + long style = wxST_SIZEGRIP, + wxWindowID id = -1, + char* name = "statusBar"); + wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, + wxWindowID id = -1, + char* name = "toolBar"); + + wxMenuBar* GetMenuBar(); + wxStatusBar* GetStatusBar(); + wxString GetTitle(); + wxToolBar* GetToolBar(); + void Iconize(bool iconize); + bool IsIconized(); + void Maximize(bool maximize); +#ifdef __WXMSW__ + void SetAcceleratorTable(const wxAcceleratorTable& accel); +#endif + void SetIcon(const wxIcon& icon); + void SetMenuBar(wxMenuBar* menuBar); + void SetStatusBar(wxStatusBar *statusBar); + void SetStatusText(const wxString& text, int number = 0); + void SetStatusWidths(int LCOUNT, int* LIST); // uses typemap + void SetTitle(const wxString& title); + void SetToolBar(wxToolBar* toolbar); + +}; + +//--------------------------------------------------------------------------- + +#ifdef __WXMSW__ +class wxMiniFrame : public wxFrame { +public: + wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title, + const wxPoint& pos = wxPyDefaultPosition, + const wxSize& size = wxPyDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + char* name = "frame"); + + %pragma(python) addtomethod = "__init__:wxp._StdFrameCallbacks(self)" +}; +#endif +