Beginings of wxGTK compatibility

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1998-08-14 23:36:49 +00:00
parent 903f689bf7
commit 853b255a6b
14 changed files with 216 additions and 1607 deletions

View File

@@ -314,7 +314,7 @@ distclean: clobber
# Custom rules and dependencies added for wxPython
#
SWIGFLAGS=-c++ -shadow -python -dnone
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
ifndef FINAL
PYEXT=pyc

View File

@@ -12,7 +12,7 @@ TARGETDIR=..
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
-I$(WXWIN)/include -I/usr/lib/glib/include \
-I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk

View File

@@ -327,9 +327,11 @@ enum {
wxHIDE_READONLY,
wxOVERWRITE_PROMPT,
#ifdef __WXMSW__
wxACCEL_ALT,
wxACCEL_CTRL,
wxACCEL_SHIFT,
#endif
};
@@ -693,6 +695,9 @@ enum wxEventType {
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.3 1998/08/14 23:36:33 RD
// Beginings of wxGTK compatibility
//
// Revision 1.2 1998/08/14 03:16:35 RD
// removed some definitions that got removed from defs.h
//

View File

@@ -70,6 +70,7 @@ extern PyObject *SWIG_newvarlink(void);
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
@@ -121,7 +122,9 @@ extern char** string_LIST_helper(PyObject* source);
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
extern wxString* wxString_LIST_helper(PyObject* source);
#ifdef __WXMSW__
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
#endif
static char* wxStringErrorMsg = "string type is required for parameter";

View File

@@ -14,6 +14,11 @@
#include <Python.h>
#include "helpers.h"
#ifdef __WXGTK__
#ifdef USE_GDK_IMLIB
#include "gdk_imlib/gdk_imlib.h"
#endif
#endif
//---------------------------------------------------------------------------
@@ -65,7 +70,7 @@ void wxPyApp::AfterMainLoop(void) {
wxApp::CleanUp();
#endif
#ifdef __WXGTK__
wxApp::CommonCleanup();
wxApp::CommonCleanUp();
#endif
delete wxPythonApp;
}
@@ -137,7 +142,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
wxApp::CleanUp();
#endif
#ifdef __WXGTK__
wxApp::CommonCleanup();
wxApp::CommonCleanUp();
#endif
PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting...");
return NULL;
@@ -335,6 +340,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
//---------------------------------------------------------------------------
#ifdef __WXMSW__
wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func)
: wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) {
@@ -367,6 +373,7 @@ void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) {
Py_DECREF(evtobj);
Py_DECREF(menuobj);
}
#endif
//---------------------------------------------------------------------------
@@ -936,6 +943,7 @@ wxString* wxString_LIST_helper(PyObject* source) {
}
#ifdef __WXMSW__
wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
if (!PyList_Check(source)) {
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
@@ -975,7 +983,7 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
return temp;
}
#endif
//----------------------------------------------------------------------
// A WinMain for when wxWindows and Python are linked together in a single
@@ -1052,6 +1060,9 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.2 1998/08/14 23:36:36 RD
// Beginings of wxGTK compatibility
//
// Revision 1.1 1998/08/09 08:25:51 RD
// Initial version
//

View File

@@ -74,6 +74,7 @@ public:
//---------------------------------------------------------------------------
#ifdef __WXMSW__
class wxPyMenu : public wxMenu {
public:
wxPyMenu(const wxString& title = "", PyObject* func=NULL);
@@ -83,6 +84,7 @@ private:
static void MenuCallback(wxMenu& menu, wxCommandEvent& evt);
PyObject* func;
};
#endif
//---------------------------------------------------------------------------
@@ -101,6 +103,9 @@ private:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.2 1998/08/14 23:36:37 RD
// Beginings of wxGTK compatibility
//
// Revision 1.1 1998/08/09 08:25:51 RD
// Initial version
//

View File

@@ -71,6 +71,7 @@ extern PyObject *SWIG_newvarlink(void);
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
@@ -122,7 +123,9 @@ extern char** string_LIST_helper(PyObject* source);
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
extern wxString* wxString_LIST_helper(PyObject* source);
#ifdef __WXMSW__
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
#endif
static char* wxStringErrorMsg = "string type is required for parameter";

View File

@@ -22,7 +22,9 @@ extern char** string_LIST_helper(PyObject* source);
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
extern wxString* wxString_LIST_helper(PyObject* source);
#ifdef __WXMSW__
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
#endif
%}
@@ -186,6 +188,9 @@ static char* wxStringErrorMsg = "string type is required for parameter";
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.2 1998/08/14 23:36:39 RD
// Beginings of wxGTK compatibility
//
// Revision 1.1 1998/08/09 08:25:52 RD
// Initial version
//

File diff suppressed because it is too large Load Diff

View File

@@ -14,8 +14,15 @@
#include "helpers.h"
#include <wx/minifram.h>
#ifdef __WXMSW__
// wxGTK defines wxMenuItem inside menu.h
#include <wx/menuitem.h>
#endif
#ifdef __WXMSW__
#include <wx/minifram.h>
#endif
%}
//----------------------------------------------------------------------
@@ -37,7 +44,7 @@ public:
void Connect( int id, int lastId, int eventType, PyObject* func) {
if (PyCallable_Check(func)) {
self->Connect(id, lastId, eventType,
(wxObjectEventFunction) wxPyCallback::EventThunker,
(wxObjectEventFunction) &wxPyCallback::EventThunker,
new wxPyCallback(func));
}
}
@@ -59,45 +66,66 @@ public:
void CaptureMouse();
void Center(int direction = wxHORIZONTAL);
//void Center(int direction = wxHORIZONTAL);
void Centre(int direction = wxHORIZONTAL);
void ClientToScreen(int *BOTH, int *BOTH);
bool Close(int force = FALSE);
bool Destroy();
void DestroyChildren();
#ifdef __WXMSW__
void DragAcceptFiles(bool accept);
#endif
void Enable(bool enable);
//bool FakePopupMenu(wxMenu* menu, int x, int y);
void Fit();
wxColour GetBackgroundColour();
#ifdef __WXMSW__
int GetCharHeight();
int GetCharWidth();
#endif
void GetClientSize(int *OUTPUT, int *OUTPUT);
wxLayoutConstraints * GetConstraints();
#ifdef __WXMSW__
wxButton* GetDefaultItem();
#endif
//wxEvtHandler* GetEventHandler();
wxFont* GetFont();
#ifdef __WXMSW__
wxColour GetForegroundColour();
wxWindow * GetGrandParent();
#endif
int GetId();
void GetPosition(int *OUTPUT, int *OUTPUT);
#ifdef __WXMSW__
wxString& GetLabel();
wxString& GetName();
#else
wxString GetLabel();
wxString GetName();
#endif
wxWindow * GetParent();
int GetReturnCode();
int GetScrollThumb(int orientation);
int GetScrollPos(int orientation);
int GetScrollRange(int orientation);
void GetSize(int *OUTPUT, int *OUTPUT);
#ifdef __WXMSW__
void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE)
#endif
#ifdef __WXMSW__
wxString& GetTitle();
#else
wxString GetTitle();
#endif
long GetWindowStyleFlag();
void InitDialog();
bool IsEnabled();
bool IsRetained();
bool IsShown();
void Layout();
#ifdef __WXMSW__
bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
#endif
void Lower();
void MakeModal(bool flag);
void Move(int x, int y);
@@ -117,7 +145,9 @@ public:
void SetDoubleClick(bool allowDoubleClick);
void SetFocus();
void SetFont(const wxFont& font);
#ifdef __WXMSW__
void SetForegroundColour(const wxColour& colour);
#endif
void SetId(int id);
void SetName(const wxString& name);
void SetReturnCode(int retCode);
@@ -138,7 +168,9 @@ public:
}
}
#ifdef __WXMSW__
void SetSizeHints(int minW=-1, int minH=-1, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1);
#endif
void SetClientSize(int width, int height);
//void SetPalette(wxPalette* palette);
//void SetColourMap(wxColourMap *colourMap);
@@ -149,18 +181,21 @@ public:
bool TransferDataFromWindow();
bool TransferDataToWindow();
bool Validate();
#ifdef __WXMSW__
void WarpPointer(int x, int y);
#endif
};
// Static method(s)
#ifdef __WXMSW__
%inline %{
wxWindow* wxWindow_FindFocus() {
return wxWindow::FindFocus();
}
%}
#endif
//----------------------------------------------------------------------
@@ -173,17 +208,23 @@ public:
char* name = "frame");
void Centre(int direction = wxBOTH);
#ifdef __WXMSW__
void Command(int id);
#endif
bool CreateStatusBar(int number = 1);
wxMenuBar* GetMenuBar();
wxStatusBar* GetStatusBar();
#ifdef __WXMSW__
wxString& GetTitle();
#else
wxString GetTitle();
#endif
#ifdef __WXMSW__
void Iconize(bool iconize);
bool IsIconized();
// *** removed *** void LoadAccelerators(const wxString& table);
void SetAcceleratorTable(const wxAcceleratorTable& accel);
void Maximize(bool maximize);
#endif
void SetIcon(const wxIcon& icon);
void SetMenuBar(wxMenuBar* menuBar);
void SetStatusText(const wxString& text, int number = 0);
@@ -194,6 +235,7 @@ public:
//---------------------------------------------------------------------------
#ifdef __WXMSW__
class wxMiniFrame : public wxFrame {
public:
wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
@@ -201,8 +243,8 @@ public:
const wxSize& size = wxPyDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
char* name = "frame");
};
#endif
//---------------------------------------------------------------------------
@@ -233,10 +275,12 @@ public:
void Centre(int direction = wxBOTH);
void EndModal(int retCode);
wxString GetTitle();
#ifdef __WXMSW__
void Iconize(bool iconize);
bool IsIconized();
bool IsModal();
void SetModal(bool flag);
#endif
bool IsModal();
void SetTitle(const wxString& title);
bool Show(bool show);
int ShowModal();
@@ -280,20 +324,23 @@ public:
void AppendSeparator();
void Break();
void Check(int id, bool flag);
bool Checked(int id);
void Enable(int id, bool enable);
int FindItem(const wxString& itemString);
#ifdef __WXMSW__
wxMenuItem* FindItemForId(int id);
wxString& GetHelpString(int id);
wxString GetLabel(int id);
wxString GetTitle();
void SetHelpString(int id, const wxString& helpString);
void SetLabel(int id, const wxString& label);
void SetTitle(const wxString& title);
#endif
bool IsChecked(int id);
bool IsEnabled(int id);
void SetLabel(int id, const wxString& label);
};
#ifdef __WXMSW__
//
// This one knows how to set a callback and handle INC- and DECREFing it. To
// be used for PopupMenus, but you must retain a referece to it while using
@@ -304,6 +351,7 @@ public:
wxPyMenu(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
~wxPyMenu();
};
#endif
//----------------------------------------------------------------------
@@ -315,15 +363,17 @@ public:
void Check(int id, bool flag);
bool Checked(int id);
void Enable(int id, bool enable);
void EnableTop(int pos, bool enable);
int FindMenuItem(const wxString& menuString, const wxString& itemString);
#ifdef __WXMSW__
void EnableTop(int pos, bool enable);
wxMenuItem * FindItemForId(int id);
wxString GetHelpString(int id);
wxString GetLabel(int id);
wxString GetLabelTop(int pos);
void SetHelpString(int id, const wxString& helpString);
void SetLabel(int id, const wxString& label);
wxString GetLabelTop(int pos);
void SetLabelTop(int pos, const wxString& label);
#endif
};
@@ -335,14 +385,18 @@ public:
bool IsEnabled();
bool IsChecked();
int GetId();
const wxString& GetHelp();
wxMenu* GetSubMenu();
#ifdef __WXMSW__
const wxString& GetHelp();
void SetName(const wxString& strName);
void SetHelp(const wxString& strHelp);
#endif
void Enable(bool bDoEnable = TRUE);
void Check(bool bDoCheck = TRUE);
#ifdef __WXMSW__
void DeleteSubMenu();
const wxString& GetName();
#endif
bool IsCheckable();
};
@@ -350,6 +404,9 @@ public:
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.2 1998/08/14 23:36:46 RD
// Beginings of wxGTK compatibility
//
// Revision 1.1 1998/08/09 08:25:52 RD
// Initial version
//

View File

@@ -27,9 +27,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def CaptureMouse(self):
val = windowsc.wxWindow_CaptureMouse(self.this)
return val
def Center(self,*args):
val = apply(windowsc.wxWindow_Center,(self.this,)+args)
return val
def Centre(self,*args):
val = apply(windowsc.wxWindow_Centre,(self.this,)+args)
return val
@@ -45,9 +42,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def DestroyChildren(self):
val = windowsc.wxWindow_DestroyChildren(self.this)
return val
def DragAcceptFiles(self,arg0):
val = windowsc.wxWindow_DragAcceptFiles(self.this,arg0)
return val
def Enable(self,arg0):
val = windowsc.wxWindow_Enable(self.this,arg0)
return val
@@ -59,12 +53,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
val = wxColourPtr(val)
val.thisown = 1
return val
def GetCharHeight(self):
val = windowsc.wxWindow_GetCharHeight(self.this)
return val
def GetCharWidth(self):
val = windowsc.wxWindow_GetCharWidth(self.this)
return val
def GetClientSize(self):
val = windowsc.wxWindow_GetClientSize(self.this)
return val
@@ -72,23 +60,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
val = windowsc.wxWindow_GetConstraints(self.this)
val = wxLayoutConstraintsPtr(val)
return val
def GetDefaultItem(self):
val = windowsc.wxWindow_GetDefaultItem(self.this)
val = wxButtonPtr(val)
return val
def GetFont(self):
val = windowsc.wxWindow_GetFont(self.this)
val = wxFontPtr(val)
return val
def GetForegroundColour(self):
val = windowsc.wxWindow_GetForegroundColour(self.this)
val = wxColourPtr(val)
val.thisown = 1
return val
def GetGrandParent(self):
val = windowsc.wxWindow_GetGrandParent(self.this)
val = wxWindowPtr(val)
return val
def GetId(self):
val = windowsc.wxWindow_GetId(self.this)
return val
@@ -120,9 +95,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def GetSize(self):
val = windowsc.wxWindow_GetSize(self.this)
return val
def GetTextExtent(self,arg0):
val = windowsc.wxWindow_GetTextExtent(self.this,arg0)
return val
def GetTitle(self):
val = windowsc.wxWindow_GetTitle(self.this)
return val
@@ -144,9 +116,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Layout(self):
val = windowsc.wxWindow_Layout(self.this)
return val
def LoadFromResource(self,arg0,arg1,*args):
val = apply(windowsc.wxWindow_LoadFromResource,(self.this,arg0.this,arg1,)+args)
return val
def Lower(self):
val = windowsc.wxWindow_Lower(self.this)
return val
@@ -200,9 +169,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetFont(self,arg0):
val = windowsc.wxWindow_SetFont(self.this,arg0.this)
return val
def SetForegroundColour(self,arg0):
val = windowsc.wxWindow_SetForegroundColour(self.this,arg0.this)
return val
def SetId(self,arg0):
val = windowsc.wxWindow_SetId(self.this,arg0)
return val
@@ -227,9 +193,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def SetPosition(self,arg0):
val = windowsc.wxWindow_SetPosition(self.this,arg0.this)
return val
def SetSizeHints(self,*args):
val = apply(windowsc.wxWindow_SetSizeHints,(self.this,)+args)
return val
def SetClientSize(self,arg0,arg1):
val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1)
return val
@@ -251,9 +214,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
def Validate(self):
val = windowsc.wxWindow_Validate(self.this)
return val
def WarpPointer(self,arg0,arg1):
val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1)
return val
def __repr__(self):
return "<C wxWindow instance>"
class wxWindow(wxWindowPtr):
@@ -277,9 +237,6 @@ class wxFramePtr(wxWindowPtr):
def Centre(self,*args):
val = apply(windowsc.wxFrame_Centre,(self.this,)+args)
return val
def Command(self,arg0):
val = windowsc.wxFrame_Command(self.this,arg0)
return val
def CreateStatusBar(self,*args):
val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args)
return val
@@ -293,18 +250,6 @@ class wxFramePtr(wxWindowPtr):
def GetTitle(self):
val = windowsc.wxFrame_GetTitle(self.this)
return val
def Iconize(self,arg0):
val = windowsc.wxFrame_Iconize(self.this,arg0)
return val
def IsIconized(self):
val = windowsc.wxFrame_IsIconized(self.this)
return val
def SetAcceleratorTable(self,arg0):
val = windowsc.wxFrame_SetAcceleratorTable(self.this,arg0.this)
return val
def Maximize(self,arg0):
val = windowsc.wxFrame_Maximize(self.this,arg0)
return val
def SetIcon(self,arg0):
val = windowsc.wxFrame_SetIcon(self.this,arg0.this)
return val
@@ -336,26 +281,6 @@ class wxFrame(wxFramePtr):
class wxMiniFramePtr(wxFramePtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __repr__(self):
return "<C wxMiniFrame instance>"
class wxMiniFrame(wxMiniFramePtr):
def __init__(self,arg0,arg1,arg2,*args) :
argl = map(None,args)
try: argl[0] = argl[0].this
except: pass
try: argl[1] = argl[1].this
except: pass
args = tuple(argl)
self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args)
self.thisown = 1
class wxPanelPtr(wxWindowPtr):
def __init__(self,this):
self.this = this
@@ -392,18 +317,9 @@ class wxDialogPtr(wxPanelPtr):
def GetTitle(self):
val = windowsc.wxDialog_GetTitle(self.this)
return val
def Iconize(self,arg0):
val = windowsc.wxDialog_Iconize(self.this,arg0)
return val
def IsIconized(self):
val = windowsc.wxDialog_IsIconized(self.this)
return val
def IsModal(self):
val = windowsc.wxDialog_IsModal(self.this)
return val
def SetModal(self,arg0):
val = windowsc.wxDialog_SetModal(self.this,arg0)
return val
def SetTitle(self,arg0):
val = windowsc.wxDialog_SetTitle(self.this,arg0)
return val
@@ -492,37 +408,21 @@ class wxMenuPtr(wxEvtHandlerPtr):
def Check(self,arg0,arg1):
val = windowsc.wxMenu_Check(self.this,arg0,arg1)
return val
def Checked(self,arg0):
val = windowsc.wxMenu_Checked(self.this,arg0)
return val
def Enable(self,arg0,arg1):
val = windowsc.wxMenu_Enable(self.this,arg0,arg1)
return val
def FindItem(self,arg0):
val = windowsc.wxMenu_FindItem(self.this,arg0)
return val
def FindItemForId(self,arg0):
val = windowsc.wxMenu_FindItemForId(self.this,arg0)
val = wxMenuItemPtr(val)
def IsChecked(self,arg0):
val = windowsc.wxMenu_IsChecked(self.this,arg0)
return val
def GetHelpString(self,arg0):
val = windowsc.wxMenu_GetHelpString(self.this,arg0)
return val
def GetLabel(self,arg0):
val = windowsc.wxMenu_GetLabel(self.this,arg0)
return val
def GetTitle(self):
val = windowsc.wxMenu_GetTitle(self.this)
return val
def SetHelpString(self,arg0,arg1):
val = windowsc.wxMenu_SetHelpString(self.this,arg0,arg1)
def IsEnabled(self,arg0):
val = windowsc.wxMenu_IsEnabled(self.this,arg0)
return val
def SetLabel(self,arg0,arg1):
val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1)
return val
def SetTitle(self,arg0):
val = windowsc.wxMenu_SetTitle(self.this,arg0)
return val
def __repr__(self):
return "<C wxMenu instance>"
class wxMenu(wxMenuPtr):
@@ -533,23 +433,6 @@ class wxMenu(wxMenuPtr):
class wxPyMenuPtr(wxMenuPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self):
if self.thisown == 1 :
windowsc.delete_wxPyMenu(self.this)
def __repr__(self):
return "<C wxPyMenu instance>"
class wxPyMenu(wxPyMenuPtr):
def __init__(self,*args) :
self.this = apply(windowsc.new_wxPyMenu,()+args)
self.thisown = 1
class wxMenuBarPtr(wxEvtHandlerPtr):
def __init__(self,this):
self.this = this
@@ -566,34 +449,9 @@ class wxMenuBarPtr(wxEvtHandlerPtr):
def Enable(self,arg0,arg1):
val = windowsc.wxMenuBar_Enable(self.this,arg0,arg1)
return val
def EnableTop(self,arg0,arg1):
val = windowsc.wxMenuBar_EnableTop(self.this,arg0,arg1)
return val
def FindMenuItem(self,arg0,arg1):
val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1)
return val
def FindItemForId(self,arg0):
val = windowsc.wxMenuBar_FindItemForId(self.this,arg0)
val = wxMenuItemPtr(val)
return val
def GetHelpString(self,arg0):
val = windowsc.wxMenuBar_GetHelpString(self.this,arg0)
return val
def GetLabel(self,arg0):
val = windowsc.wxMenuBar_GetLabel(self.this,arg0)
return val
def GetLabelTop(self,arg0):
val = windowsc.wxMenuBar_GetLabelTop(self.this,arg0)
return val
def SetHelpString(self,arg0,arg1):
val = windowsc.wxMenuBar_SetHelpString(self.this,arg0,arg1)
return val
def SetLabel(self,arg0,arg1):
val = windowsc.wxMenuBar_SetLabel(self.this,arg0,arg1)
return val
def SetLabelTop(self,arg0,arg1):
val = windowsc.wxMenuBar_SetLabelTop(self.this,arg0,arg1)
return val
def __repr__(self):
return "<C wxMenuBar instance>"
class wxMenuBar(wxMenuBarPtr):
@@ -620,31 +478,16 @@ class wxMenuItemPtr :
def GetId(self):
val = windowsc.wxMenuItem_GetId(self.this)
return val
def GetHelp(self):
val = windowsc.wxMenuItem_GetHelp(self.this)
return val
def GetSubMenu(self):
val = windowsc.wxMenuItem_GetSubMenu(self.this)
val = wxMenuPtr(val)
return val
def SetName(self,arg0):
val = windowsc.wxMenuItem_SetName(self.this,arg0)
return val
def SetHelp(self,arg0):
val = windowsc.wxMenuItem_SetHelp(self.this,arg0)
return val
def Enable(self,*args):
val = apply(windowsc.wxMenuItem_Enable,(self.this,)+args)
return val
def Check(self,*args):
val = apply(windowsc.wxMenuItem_Check,(self.this,)+args)
return val
def DeleteSubMenu(self):
val = windowsc.wxMenuItem_DeleteSubMenu(self.this)
return val
def GetName(self):
val = windowsc.wxMenuItem_GetName(self.this)
return val
def IsCheckable(self):
val = windowsc.wxMenuItem_IsCheckable(self.this)
return val
@@ -661,11 +504,6 @@ class wxMenuItem(wxMenuItemPtr):
#-------------- FUNCTION WRAPPERS ------------------
def wxWindow_FindFocus():
val = windowsc.wxWindow_FindFocus()
val = wxWindowPtr(val)
return val
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -33,8 +33,8 @@
* and things like that.
*
* $Log$
* Revision 1.2 1998/08/14 03:16:36 RD
* removed some definitions that got removed from defs.h
* Revision 1.3 1998/08/14 23:36:47 RD
* Beginings of wxGTK compatibility
*
************************************************************************/
@@ -581,6 +581,7 @@ char *SWIG_GetPtr(char *_c, void **ptr, char *_t)
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
PyObject* o3;
if (!target) {
target = o;
} else if (target == Py_None) {
@@ -632,7 +633,9 @@ extern char** string_LIST_helper(PyObject* source);
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
extern wxString* wxString_LIST_helper(PyObject* source);
#ifdef __WXMSW__
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
#endif
static char* wxStringErrorMsg = "string type is required for parameter";
@@ -745,27 +748,6 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxPyApp_GetAuto3D(_swigobj) (_swigobj->GetAuto3D())
static PyObject *_wrap_wxPyApp_GetAuto3D(PyObject *self, PyObject *args) {
PyObject * _resultobj;
bool _result;
wxPyApp * _arg0;
char * _argc0 = 0;
self = self;
if(!PyArg_ParseTuple(args,"s:wxPyApp_GetAuto3D",&_argc0))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAuto3D. Expected _wxPyApp_p.");
return NULL;
}
}
_result = (bool )wxPyApp_GetAuto3D(_arg0);
_resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxPyApp_GetClassName(_swigobj) (_swigobj->GetClassName())
static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1022,30 +1004,6 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) {
return _resultobj;
}
#define wxPyApp_SetAuto3D(_swigobj,_swigarg0) (_swigobj->SetAuto3D(_swigarg0))
static PyObject *_wrap_wxPyApp_SetAuto3D(PyObject *self, PyObject *args) {
PyObject * _resultobj;
wxPyApp * _arg0;
bool _arg1;
char * _argc0 = 0;
int tempbool1;
self = self;
if(!PyArg_ParseTuple(args,"si:wxPyApp_SetAuto3D",&_argc0,&tempbool1))
return NULL;
if (_argc0) {
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxPyApp_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAuto3D. Expected _wxPyApp_p.");
return NULL;
}
}
_arg1 = (bool ) tempbool1;
wxPyApp_SetAuto3D(_arg0,_arg1);
Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxPyApp_SetClassName(_swigobj,_swigarg0) (_swigobj->SetClassName(_swigarg0))
static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) {
PyObject * _resultobj;
@@ -1217,7 +1175,6 @@ static PyMethodDef wxpcMethods[] = {
{ "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 },
{ "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 },
{ "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 },
{ "wxPyApp_SetAuto3D", _wrap_wxPyApp_SetAuto3D, 1 },
{ "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 },
{ "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 },
{ "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 },
@@ -1229,7 +1186,6 @@ static PyMethodDef wxpcMethods[] = {
{ "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 },
{ "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 },
{ "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 },
{ "wxPyApp_GetAuto3D", _wrap_wxPyApp_GetAuto3D, 1 },
{ "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 },
{ "new_wxPyApp", _wrap_new_wxPyApp, 1 },
{ "_wxSetDictionary", __wxSetDictionary, 1 },
@@ -1457,9 +1413,6 @@ SWIGEXPORT(void,initwxpc)() {
PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE));
PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY));
PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT));
PyDict_SetItemString(d,"wxACCEL_ALT", PyInt_FromLong((long) wxACCEL_ALT));
PyDict_SetItemString(d,"wxACCEL_CTRL", PyInt_FromLong((long) wxACCEL_CTRL));
PyDict_SetItemString(d,"wxACCEL_SHIFT", PyInt_FromLong((long) wxACCEL_SHIFT));
PyDict_SetItemString(d,"ERR_PARAM", PyInt_FromLong((long) ERR_PARAM));
PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA));
PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL));

View File

@@ -49,12 +49,10 @@
//---------------------------------------------------------------------------
#define __version__ "0.3.0"
#define __version__ "0.3.1"
//%readonly
wxPoint wxPyDefaultPosition;
wxSize wxPyDefaultSize;
//%readwrite
wxPoint wxPyDefaultPosition;
wxSize wxPyDefaultSize;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
@@ -70,7 +68,9 @@ public:
wxString GetAppName();
#ifdef __WXMSW__
bool GetAuto3D();
#endif
wxString GetClassName();
bool GetExitOnFrameDelete();
int GetPrintMode();
@@ -84,7 +84,9 @@ public:
bool Pending();
void SetAppName(const wxString& name);
#ifdef __WXMSW__
void SetAuto3D(bool auto3D);
#endif
void SetClassName(const wxString& name);
void SetExitOnFrameDelete(bool flag);
void SetPrintMode(int mode);
@@ -176,6 +178,9 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
// Revision 1.2 1998/08/14 23:36:49 RD
// Beginings of wxGTK compatibility
//
// Revision 1.1 1998/08/09 08:25:53 RD
// Initial version
//

View File

@@ -25,9 +25,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
def GetAppName(self):
val = wxpc.wxPyApp_GetAppName(self.this)
return val
def GetAuto3D(self):
val = wxpc.wxPyApp_GetAuto3D(self.this)
return val
def GetClassName(self):
val = wxpc.wxPyApp_GetClassName(self.this)
return val
@@ -62,9 +59,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
def SetAppName(self,arg0):
val = wxpc.wxPyApp_SetAppName(self.this,arg0)
return val
def SetAuto3D(self,arg0):
val = wxpc.wxPyApp_SetAuto3D(self.this,arg0)
return val
def SetClassName(self,arg0):
val = wxpc.wxPyApp_SetClassName(self.this,arg0)
return val
@@ -317,9 +311,6 @@ wxOPEN = wxpc.wxOPEN
wxSAVE = wxpc.wxSAVE
wxHIDE_READONLY = wxpc.wxHIDE_READONLY
wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT
wxACCEL_ALT = wxpc.wxACCEL_ALT
wxACCEL_CTRL = wxpc.wxACCEL_CTRL
wxACCEL_SHIFT = wxpc.wxACCEL_SHIFT
ERR_PARAM = wxpc.ERR_PARAM
ERR_NODATA = wxpc.ERR_NODATA
ERR_CANCEL = wxpc.ERR_CANCEL
@@ -1380,8 +1371,8 @@ class wxApp(wxPyApp):
#----------------------------------------------------------------------------
#
# $Log$
# Revision 1.2 1998/08/14 03:16:39 RD
# removed some definitions that got removed from defs.h
# Revision 1.3 1998/08/14 23:36:49 RD
# Beginings of wxGTK compatibility
#
# Revision 1.1 1998/08/09 08:25:49 RD
# Initial version