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:
@@ -314,7 +314,7 @@ distclean: clobber
|
|||||||
# Custom rules and dependencies added for wxPython
|
# Custom rules and dependencies added for wxPython
|
||||||
#
|
#
|
||||||
|
|
||||||
SWIGFLAGS=-c++ -shadow -python -dnone
|
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
|
||||||
|
|
||||||
ifndef FINAL
|
ifndef FINAL
|
||||||
PYEXT=pyc
|
PYEXT=pyc
|
||||||
|
@@ -12,7 +12,7 @@ TARGETDIR=..
|
|||||||
|
|
||||||
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||||
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.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
|
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk
|
||||||
|
|
||||||
|
|
||||||
|
@@ -327,9 +327,11 @@ enum {
|
|||||||
wxHIDE_READONLY,
|
wxHIDE_READONLY,
|
||||||
wxOVERWRITE_PROMPT,
|
wxOVERWRITE_PROMPT,
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxACCEL_ALT,
|
wxACCEL_ALT,
|
||||||
wxACCEL_CTRL,
|
wxACCEL_CTRL,
|
||||||
wxACCEL_SHIFT,
|
wxACCEL_SHIFT,
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -693,6 +695,9 @@ enum wxEventType {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.2 1998/08/14 03:16:35 RD
|
||||||
// removed some definitions that got removed from defs.h
|
// removed some definitions that got removed from defs.h
|
||||||
//
|
//
|
||||||
|
@@ -70,6 +70,7 @@ extern PyObject *SWIG_newvarlink(void);
|
|||||||
|
|
||||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||||
PyObject* o2;
|
PyObject* o2;
|
||||||
|
PyObject* o3;
|
||||||
if (!target) {
|
if (!target) {
|
||||||
target = o;
|
target = o;
|
||||||
} else if (target == Py_None) {
|
} else if (target == Py_None) {
|
||||||
@@ -121,7 +122,9 @@ extern char** string_LIST_helper(PyObject* source);
|
|||||||
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
||||||
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
||||||
extern wxString* wxString_LIST_helper(PyObject* source);
|
extern wxString* wxString_LIST_helper(PyObject* source);
|
||||||
|
#ifdef __WXMSW__
|
||||||
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||||
|
@@ -14,6 +14,11 @@
|
|||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include "helpers.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();
|
wxApp::CleanUp();
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
wxApp::CommonCleanup();
|
wxApp::CommonCleanUp();
|
||||||
#endif
|
#endif
|
||||||
delete wxPythonApp;
|
delete wxPythonApp;
|
||||||
}
|
}
|
||||||
@@ -137,7 +142,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
|||||||
wxApp::CleanUp();
|
wxApp::CleanUp();
|
||||||
#endif
|
#endif
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
wxApp::CommonCleanup();
|
wxApp::CommonCleanUp();
|
||||||
#endif
|
#endif
|
||||||
PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting...");
|
PyErr_SetString(PyExc_SystemExit, "OnInit returned false, exiting...");
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -335,6 +340,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func)
|
wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func)
|
||||||
: wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) {
|
: wxMenu(title, (wxFunction)(func ? MenuCallback : NULL)), func(0) {
|
||||||
|
|
||||||
@@ -367,6 +373,7 @@ void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) {
|
|||||||
Py_DECREF(evtobj);
|
Py_DECREF(evtobj);
|
||||||
Py_DECREF(menuobj);
|
Py_DECREF(menuobj);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -936,6 +943,7 @@ wxString* wxString_LIST_helper(PyObject* source) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
||||||
if (!PyList_Check(source)) {
|
if (!PyList_Check(source)) {
|
||||||
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
PyErr_SetString(PyExc_TypeError, "Expected a list object.");
|
||||||
@@ -975,7 +983,7 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
|||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// A WinMain for when wxWindows and Python are linked together in a single
|
// A WinMain for when wxWindows and Python are linked together in a single
|
||||||
@@ -1052,6 +1060,9 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.1 1998/08/09 08:25:51 RD
|
||||||
// Initial version
|
// Initial version
|
||||||
//
|
//
|
||||||
|
@@ -74,6 +74,7 @@ public:
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
class wxPyMenu : public wxMenu {
|
class wxPyMenu : public wxMenu {
|
||||||
public:
|
public:
|
||||||
wxPyMenu(const wxString& title = "", PyObject* func=NULL);
|
wxPyMenu(const wxString& title = "", PyObject* func=NULL);
|
||||||
@@ -83,6 +84,7 @@ private:
|
|||||||
static void MenuCallback(wxMenu& menu, wxCommandEvent& evt);
|
static void MenuCallback(wxMenu& menu, wxCommandEvent& evt);
|
||||||
PyObject* func;
|
PyObject* func;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -101,6 +103,9 @@ private:
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.1 1998/08/09 08:25:51 RD
|
||||||
// Initial version
|
// Initial version
|
||||||
//
|
//
|
||||||
|
@@ -71,6 +71,7 @@ extern PyObject *SWIG_newvarlink(void);
|
|||||||
|
|
||||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||||
PyObject* o2;
|
PyObject* o2;
|
||||||
|
PyObject* o3;
|
||||||
if (!target) {
|
if (!target) {
|
||||||
target = o;
|
target = o;
|
||||||
} else if (target == Py_None) {
|
} else if (target == Py_None) {
|
||||||
@@ -122,7 +123,9 @@ extern char** string_LIST_helper(PyObject* source);
|
|||||||
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
||||||
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
||||||
extern wxString* wxString_LIST_helper(PyObject* source);
|
extern wxString* wxString_LIST_helper(PyObject* source);
|
||||||
|
#ifdef __WXMSW__
|
||||||
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||||
|
@@ -22,7 +22,9 @@ extern char** string_LIST_helper(PyObject* source);
|
|||||||
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
||||||
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
||||||
extern wxString* wxString_LIST_helper(PyObject* source);
|
extern wxString* wxString_LIST_helper(PyObject* source);
|
||||||
|
#ifdef __WXMSW__
|
||||||
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
||||||
|
#endif
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@@ -186,6 +188,9 @@ static char* wxStringErrorMsg = "string type is required for parameter";
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.1 1998/08/09 08:25:52 RD
|
||||||
// Initial version
|
// Initial version
|
||||||
//
|
//
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,15 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
#include <wx/minifram.h>
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
// wxGTK defines wxMenuItem inside menu.h
|
||||||
#include <wx/menuitem.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) {
|
void Connect( int id, int lastId, int eventType, PyObject* func) {
|
||||||
if (PyCallable_Check(func)) {
|
if (PyCallable_Check(func)) {
|
||||||
self->Connect(id, lastId, eventType,
|
self->Connect(id, lastId, eventType,
|
||||||
(wxObjectEventFunction) wxPyCallback::EventThunker,
|
(wxObjectEventFunction) &wxPyCallback::EventThunker,
|
||||||
new wxPyCallback(func));
|
new wxPyCallback(func));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,45 +66,66 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void CaptureMouse();
|
void CaptureMouse();
|
||||||
void Center(int direction = wxHORIZONTAL);
|
//void Center(int direction = wxHORIZONTAL);
|
||||||
void Centre(int direction = wxHORIZONTAL);
|
void Centre(int direction = wxHORIZONTAL);
|
||||||
void ClientToScreen(int *BOTH, int *BOTH);
|
void ClientToScreen(int *BOTH, int *BOTH);
|
||||||
bool Close(int force = FALSE);
|
bool Close(int force = FALSE);
|
||||||
bool Destroy();
|
bool Destroy();
|
||||||
void DestroyChildren();
|
void DestroyChildren();
|
||||||
|
#ifdef __WXMSW__
|
||||||
void DragAcceptFiles(bool accept);
|
void DragAcceptFiles(bool accept);
|
||||||
|
#endif
|
||||||
void Enable(bool enable);
|
void Enable(bool enable);
|
||||||
//bool FakePopupMenu(wxMenu* menu, int x, int y);
|
//bool FakePopupMenu(wxMenu* menu, int x, int y);
|
||||||
void Fit();
|
void Fit();
|
||||||
wxColour GetBackgroundColour();
|
wxColour GetBackgroundColour();
|
||||||
|
#ifdef __WXMSW__
|
||||||
int GetCharHeight();
|
int GetCharHeight();
|
||||||
int GetCharWidth();
|
int GetCharWidth();
|
||||||
|
#endif
|
||||||
void GetClientSize(int *OUTPUT, int *OUTPUT);
|
void GetClientSize(int *OUTPUT, int *OUTPUT);
|
||||||
wxLayoutConstraints * GetConstraints();
|
wxLayoutConstraints * GetConstraints();
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxButton* GetDefaultItem();
|
wxButton* GetDefaultItem();
|
||||||
|
#endif
|
||||||
//wxEvtHandler* GetEventHandler();
|
//wxEvtHandler* GetEventHandler();
|
||||||
wxFont* GetFont();
|
wxFont* GetFont();
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxColour GetForegroundColour();
|
wxColour GetForegroundColour();
|
||||||
wxWindow * GetGrandParent();
|
wxWindow * GetGrandParent();
|
||||||
|
#endif
|
||||||
int GetId();
|
int GetId();
|
||||||
void GetPosition(int *OUTPUT, int *OUTPUT);
|
void GetPosition(int *OUTPUT, int *OUTPUT);
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxString& GetLabel();
|
wxString& GetLabel();
|
||||||
wxString& GetName();
|
wxString& GetName();
|
||||||
|
#else
|
||||||
|
wxString GetLabel();
|
||||||
|
wxString GetName();
|
||||||
|
#endif
|
||||||
wxWindow * GetParent();
|
wxWindow * GetParent();
|
||||||
int GetReturnCode();
|
int GetReturnCode();
|
||||||
int GetScrollThumb(int orientation);
|
int GetScrollThumb(int orientation);
|
||||||
int GetScrollPos(int orientation);
|
int GetScrollPos(int orientation);
|
||||||
int GetScrollRange(int orientation);
|
int GetScrollRange(int orientation);
|
||||||
void GetSize(int *OUTPUT, int *OUTPUT);
|
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)
|
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();
|
wxString& GetTitle();
|
||||||
|
#else
|
||||||
|
wxString GetTitle();
|
||||||
|
#endif
|
||||||
long GetWindowStyleFlag();
|
long GetWindowStyleFlag();
|
||||||
void InitDialog();
|
void InitDialog();
|
||||||
bool IsEnabled();
|
bool IsEnabled();
|
||||||
bool IsRetained();
|
bool IsRetained();
|
||||||
bool IsShown();
|
bool IsShown();
|
||||||
void Layout();
|
void Layout();
|
||||||
|
#ifdef __WXMSW__
|
||||||
bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
|
bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL);
|
||||||
|
#endif
|
||||||
void Lower();
|
void Lower();
|
||||||
void MakeModal(bool flag);
|
void MakeModal(bool flag);
|
||||||
void Move(int x, int y);
|
void Move(int x, int y);
|
||||||
@@ -117,7 +145,9 @@ public:
|
|||||||
void SetDoubleClick(bool allowDoubleClick);
|
void SetDoubleClick(bool allowDoubleClick);
|
||||||
void SetFocus();
|
void SetFocus();
|
||||||
void SetFont(const wxFont& font);
|
void SetFont(const wxFont& font);
|
||||||
|
#ifdef __WXMSW__
|
||||||
void SetForegroundColour(const wxColour& colour);
|
void SetForegroundColour(const wxColour& colour);
|
||||||
|
#endif
|
||||||
void SetId(int id);
|
void SetId(int id);
|
||||||
void SetName(const wxString& name);
|
void SetName(const wxString& name);
|
||||||
void SetReturnCode(int retCode);
|
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);
|
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 SetClientSize(int width, int height);
|
||||||
//void SetPalette(wxPalette* palette);
|
//void SetPalette(wxPalette* palette);
|
||||||
//void SetColourMap(wxColourMap *colourMap);
|
//void SetColourMap(wxColourMap *colourMap);
|
||||||
@@ -149,18 +181,21 @@ public:
|
|||||||
bool TransferDataFromWindow();
|
bool TransferDataFromWindow();
|
||||||
bool TransferDataToWindow();
|
bool TransferDataToWindow();
|
||||||
bool Validate();
|
bool Validate();
|
||||||
|
#ifdef __WXMSW__
|
||||||
void WarpPointer(int x, int y);
|
void WarpPointer(int x, int y);
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Static method(s)
|
// Static method(s)
|
||||||
|
#ifdef __WXMSW__
|
||||||
%inline %{
|
%inline %{
|
||||||
wxWindow* wxWindow_FindFocus() {
|
wxWindow* wxWindow_FindFocus() {
|
||||||
return wxWindow::FindFocus();
|
return wxWindow::FindFocus();
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -173,17 +208,23 @@ public:
|
|||||||
char* name = "frame");
|
char* name = "frame");
|
||||||
|
|
||||||
void Centre(int direction = wxBOTH);
|
void Centre(int direction = wxBOTH);
|
||||||
|
#ifdef __WXMSW__
|
||||||
void Command(int id);
|
void Command(int id);
|
||||||
|
#endif
|
||||||
bool CreateStatusBar(int number = 1);
|
bool CreateStatusBar(int number = 1);
|
||||||
wxMenuBar* GetMenuBar();
|
wxMenuBar* GetMenuBar();
|
||||||
wxStatusBar* GetStatusBar();
|
wxStatusBar* GetStatusBar();
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxString& GetTitle();
|
wxString& GetTitle();
|
||||||
|
#else
|
||||||
|
wxString GetTitle();
|
||||||
|
#endif
|
||||||
|
#ifdef __WXMSW__
|
||||||
void Iconize(bool iconize);
|
void Iconize(bool iconize);
|
||||||
bool IsIconized();
|
bool IsIconized();
|
||||||
// *** removed *** void LoadAccelerators(const wxString& table);
|
|
||||||
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
void SetAcceleratorTable(const wxAcceleratorTable& accel);
|
||||||
|
|
||||||
void Maximize(bool maximize);
|
void Maximize(bool maximize);
|
||||||
|
#endif
|
||||||
void SetIcon(const wxIcon& icon);
|
void SetIcon(const wxIcon& icon);
|
||||||
void SetMenuBar(wxMenuBar* menuBar);
|
void SetMenuBar(wxMenuBar* menuBar);
|
||||||
void SetStatusText(const wxString& text, int number = 0);
|
void SetStatusText(const wxString& text, int number = 0);
|
||||||
@@ -194,6 +235,7 @@ public:
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
class wxMiniFrame : public wxFrame {
|
class wxMiniFrame : public wxFrame {
|
||||||
public:
|
public:
|
||||||
wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
|
wxMiniFrame(wxWindow* parent, const wxWindowID id, const wxString& title,
|
||||||
@@ -201,8 +243,8 @@ public:
|
|||||||
const wxSize& size = wxPyDefaultSize,
|
const wxSize& size = wxPyDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
char* name = "frame");
|
char* name = "frame");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -233,10 +275,12 @@ public:
|
|||||||
void Centre(int direction = wxBOTH);
|
void Centre(int direction = wxBOTH);
|
||||||
void EndModal(int retCode);
|
void EndModal(int retCode);
|
||||||
wxString GetTitle();
|
wxString GetTitle();
|
||||||
|
#ifdef __WXMSW__
|
||||||
void Iconize(bool iconize);
|
void Iconize(bool iconize);
|
||||||
bool IsIconized();
|
bool IsIconized();
|
||||||
bool IsModal();
|
|
||||||
void SetModal(bool flag);
|
void SetModal(bool flag);
|
||||||
|
#endif
|
||||||
|
bool IsModal();
|
||||||
void SetTitle(const wxString& title);
|
void SetTitle(const wxString& title);
|
||||||
bool Show(bool show);
|
bool Show(bool show);
|
||||||
int ShowModal();
|
int ShowModal();
|
||||||
@@ -280,20 +324,23 @@ public:
|
|||||||
void AppendSeparator();
|
void AppendSeparator();
|
||||||
void Break();
|
void Break();
|
||||||
void Check(int id, bool flag);
|
void Check(int id, bool flag);
|
||||||
bool Checked(int id);
|
|
||||||
void Enable(int id, bool enable);
|
void Enable(int id, bool enable);
|
||||||
int FindItem(const wxString& itemString);
|
int FindItem(const wxString& itemString);
|
||||||
|
#ifdef __WXMSW__
|
||||||
wxMenuItem* FindItemForId(int id);
|
wxMenuItem* FindItemForId(int id);
|
||||||
wxString& GetHelpString(int id);
|
wxString& GetHelpString(int id);
|
||||||
wxString GetLabel(int id);
|
wxString GetLabel(int id);
|
||||||
wxString GetTitle();
|
wxString GetTitle();
|
||||||
void SetHelpString(int id, const wxString& helpString);
|
void SetHelpString(int id, const wxString& helpString);
|
||||||
void SetLabel(int id, const wxString& label);
|
|
||||||
void SetTitle(const wxString& title);
|
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
|
// 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
|
// 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(const wxString& title = wxPyEmptyStr, PyObject* func = NULL);
|
||||||
~wxPyMenu();
|
~wxPyMenu();
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -315,15 +363,17 @@ public:
|
|||||||
void Check(int id, bool flag);
|
void Check(int id, bool flag);
|
||||||
bool Checked(int id);
|
bool Checked(int id);
|
||||||
void Enable(int id, bool enable);
|
void Enable(int id, bool enable);
|
||||||
void EnableTop(int pos, bool enable);
|
|
||||||
int FindMenuItem(const wxString& menuString, const wxString& itemString);
|
int FindMenuItem(const wxString& menuString, const wxString& itemString);
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
void EnableTop(int pos, bool enable);
|
||||||
wxMenuItem * FindItemForId(int id);
|
wxMenuItem * FindItemForId(int id);
|
||||||
wxString GetHelpString(int id);
|
wxString GetHelpString(int id);
|
||||||
wxString GetLabel(int id);
|
wxString GetLabel(int id);
|
||||||
wxString GetLabelTop(int pos);
|
|
||||||
void SetHelpString(int id, const wxString& helpString);
|
void SetHelpString(int id, const wxString& helpString);
|
||||||
void SetLabel(int id, const wxString& label);
|
void SetLabel(int id, const wxString& label);
|
||||||
|
wxString GetLabelTop(int pos);
|
||||||
void SetLabelTop(int pos, const wxString& label);
|
void SetLabelTop(int pos, const wxString& label);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -335,14 +385,18 @@ public:
|
|||||||
bool IsEnabled();
|
bool IsEnabled();
|
||||||
bool IsChecked();
|
bool IsChecked();
|
||||||
int GetId();
|
int GetId();
|
||||||
const wxString& GetHelp();
|
|
||||||
wxMenu* GetSubMenu();
|
wxMenu* GetSubMenu();
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
const wxString& GetHelp();
|
||||||
void SetName(const wxString& strName);
|
void SetName(const wxString& strName);
|
||||||
void SetHelp(const wxString& strHelp);
|
void SetHelp(const wxString& strHelp);
|
||||||
|
#endif
|
||||||
void Enable(bool bDoEnable = TRUE);
|
void Enable(bool bDoEnable = TRUE);
|
||||||
void Check(bool bDoCheck = TRUE);
|
void Check(bool bDoCheck = TRUE);
|
||||||
|
#ifdef __WXMSW__
|
||||||
void DeleteSubMenu();
|
void DeleteSubMenu();
|
||||||
const wxString& GetName();
|
const wxString& GetName();
|
||||||
|
#endif
|
||||||
bool IsCheckable();
|
bool IsCheckable();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -350,6 +404,9 @@ public:
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.1 1998/08/09 08:25:52 RD
|
||||||
// Initial version
|
// Initial version
|
||||||
//
|
//
|
||||||
|
@@ -27,9 +27,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def CaptureMouse(self):
|
def CaptureMouse(self):
|
||||||
val = windowsc.wxWindow_CaptureMouse(self.this)
|
val = windowsc.wxWindow_CaptureMouse(self.this)
|
||||||
return val
|
return val
|
||||||
def Center(self,*args):
|
|
||||||
val = apply(windowsc.wxWindow_Center,(self.this,)+args)
|
|
||||||
return val
|
|
||||||
def Centre(self,*args):
|
def Centre(self,*args):
|
||||||
val = apply(windowsc.wxWindow_Centre,(self.this,)+args)
|
val = apply(windowsc.wxWindow_Centre,(self.this,)+args)
|
||||||
return val
|
return val
|
||||||
@@ -45,9 +42,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def DestroyChildren(self):
|
def DestroyChildren(self):
|
||||||
val = windowsc.wxWindow_DestroyChildren(self.this)
|
val = windowsc.wxWindow_DestroyChildren(self.this)
|
||||||
return val
|
return val
|
||||||
def DragAcceptFiles(self,arg0):
|
|
||||||
val = windowsc.wxWindow_DragAcceptFiles(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def Enable(self,arg0):
|
def Enable(self,arg0):
|
||||||
val = windowsc.wxWindow_Enable(self.this,arg0)
|
val = windowsc.wxWindow_Enable(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
@@ -59,12 +53,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
val = wxColourPtr(val)
|
val = wxColourPtr(val)
|
||||||
val.thisown = 1
|
val.thisown = 1
|
||||||
return val
|
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):
|
def GetClientSize(self):
|
||||||
val = windowsc.wxWindow_GetClientSize(self.this)
|
val = windowsc.wxWindow_GetClientSize(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -72,23 +60,10 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
val = windowsc.wxWindow_GetConstraints(self.this)
|
val = windowsc.wxWindow_GetConstraints(self.this)
|
||||||
val = wxLayoutConstraintsPtr(val)
|
val = wxLayoutConstraintsPtr(val)
|
||||||
return val
|
return val
|
||||||
def GetDefaultItem(self):
|
|
||||||
val = windowsc.wxWindow_GetDefaultItem(self.this)
|
|
||||||
val = wxButtonPtr(val)
|
|
||||||
return val
|
|
||||||
def GetFont(self):
|
def GetFont(self):
|
||||||
val = windowsc.wxWindow_GetFont(self.this)
|
val = windowsc.wxWindow_GetFont(self.this)
|
||||||
val = wxFontPtr(val)
|
val = wxFontPtr(val)
|
||||||
return 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):
|
def GetId(self):
|
||||||
val = windowsc.wxWindow_GetId(self.this)
|
val = windowsc.wxWindow_GetId(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -120,9 +95,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def GetSize(self):
|
def GetSize(self):
|
||||||
val = windowsc.wxWindow_GetSize(self.this)
|
val = windowsc.wxWindow_GetSize(self.this)
|
||||||
return val
|
return val
|
||||||
def GetTextExtent(self,arg0):
|
|
||||||
val = windowsc.wxWindow_GetTextExtent(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def GetTitle(self):
|
def GetTitle(self):
|
||||||
val = windowsc.wxWindow_GetTitle(self.this)
|
val = windowsc.wxWindow_GetTitle(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -144,9 +116,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def Layout(self):
|
def Layout(self):
|
||||||
val = windowsc.wxWindow_Layout(self.this)
|
val = windowsc.wxWindow_Layout(self.this)
|
||||||
return val
|
return val
|
||||||
def LoadFromResource(self,arg0,arg1,*args):
|
|
||||||
val = apply(windowsc.wxWindow_LoadFromResource,(self.this,arg0.this,arg1,)+args)
|
|
||||||
return val
|
|
||||||
def Lower(self):
|
def Lower(self):
|
||||||
val = windowsc.wxWindow_Lower(self.this)
|
val = windowsc.wxWindow_Lower(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -200,9 +169,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def SetFont(self,arg0):
|
def SetFont(self,arg0):
|
||||||
val = windowsc.wxWindow_SetFont(self.this,arg0.this)
|
val = windowsc.wxWindow_SetFont(self.this,arg0.this)
|
||||||
return val
|
return val
|
||||||
def SetForegroundColour(self,arg0):
|
|
||||||
val = windowsc.wxWindow_SetForegroundColour(self.this,arg0.this)
|
|
||||||
return val
|
|
||||||
def SetId(self,arg0):
|
def SetId(self,arg0):
|
||||||
val = windowsc.wxWindow_SetId(self.this,arg0)
|
val = windowsc.wxWindow_SetId(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
@@ -227,9 +193,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def SetPosition(self,arg0):
|
def SetPosition(self,arg0):
|
||||||
val = windowsc.wxWindow_SetPosition(self.this,arg0.this)
|
val = windowsc.wxWindow_SetPosition(self.this,arg0.this)
|
||||||
return val
|
return val
|
||||||
def SetSizeHints(self,*args):
|
|
||||||
val = apply(windowsc.wxWindow_SetSizeHints,(self.this,)+args)
|
|
||||||
return val
|
|
||||||
def SetClientSize(self,arg0,arg1):
|
def SetClientSize(self,arg0,arg1):
|
||||||
val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1)
|
val = windowsc.wxWindow_SetClientSize(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
@@ -251,9 +214,6 @@ class wxWindowPtr(wxEvtHandlerPtr):
|
|||||||
def Validate(self):
|
def Validate(self):
|
||||||
val = windowsc.wxWindow_Validate(self.this)
|
val = windowsc.wxWindow_Validate(self.this)
|
||||||
return val
|
return val
|
||||||
def WarpPointer(self,arg0,arg1):
|
|
||||||
val = windowsc.wxWindow_WarpPointer(self.this,arg0,arg1)
|
|
||||||
return val
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxWindow instance>"
|
return "<C wxWindow instance>"
|
||||||
class wxWindow(wxWindowPtr):
|
class wxWindow(wxWindowPtr):
|
||||||
@@ -277,9 +237,6 @@ class wxFramePtr(wxWindowPtr):
|
|||||||
def Centre(self,*args):
|
def Centre(self,*args):
|
||||||
val = apply(windowsc.wxFrame_Centre,(self.this,)+args)
|
val = apply(windowsc.wxFrame_Centre,(self.this,)+args)
|
||||||
return val
|
return val
|
||||||
def Command(self,arg0):
|
|
||||||
val = windowsc.wxFrame_Command(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def CreateStatusBar(self,*args):
|
def CreateStatusBar(self,*args):
|
||||||
val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args)
|
val = apply(windowsc.wxFrame_CreateStatusBar,(self.this,)+args)
|
||||||
return val
|
return val
|
||||||
@@ -293,18 +250,6 @@ class wxFramePtr(wxWindowPtr):
|
|||||||
def GetTitle(self):
|
def GetTitle(self):
|
||||||
val = windowsc.wxFrame_GetTitle(self.this)
|
val = windowsc.wxFrame_GetTitle(self.this)
|
||||||
return val
|
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):
|
def SetIcon(self,arg0):
|
||||||
val = windowsc.wxFrame_SetIcon(self.this,arg0.this)
|
val = windowsc.wxFrame_SetIcon(self.this,arg0.this)
|
||||||
return val
|
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):
|
class wxPanelPtr(wxWindowPtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
@@ -392,18 +317,9 @@ class wxDialogPtr(wxPanelPtr):
|
|||||||
def GetTitle(self):
|
def GetTitle(self):
|
||||||
val = windowsc.wxDialog_GetTitle(self.this)
|
val = windowsc.wxDialog_GetTitle(self.this)
|
||||||
return val
|
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):
|
def IsModal(self):
|
||||||
val = windowsc.wxDialog_IsModal(self.this)
|
val = windowsc.wxDialog_IsModal(self.this)
|
||||||
return val
|
return val
|
||||||
def SetModal(self,arg0):
|
|
||||||
val = windowsc.wxDialog_SetModal(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def SetTitle(self,arg0):
|
def SetTitle(self,arg0):
|
||||||
val = windowsc.wxDialog_SetTitle(self.this,arg0)
|
val = windowsc.wxDialog_SetTitle(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
@@ -492,37 +408,21 @@ class wxMenuPtr(wxEvtHandlerPtr):
|
|||||||
def Check(self,arg0,arg1):
|
def Check(self,arg0,arg1):
|
||||||
val = windowsc.wxMenu_Check(self.this,arg0,arg1)
|
val = windowsc.wxMenu_Check(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
def Checked(self,arg0):
|
|
||||||
val = windowsc.wxMenu_Checked(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def Enable(self,arg0,arg1):
|
def Enable(self,arg0,arg1):
|
||||||
val = windowsc.wxMenu_Enable(self.this,arg0,arg1)
|
val = windowsc.wxMenu_Enable(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
def FindItem(self,arg0):
|
def FindItem(self,arg0):
|
||||||
val = windowsc.wxMenu_FindItem(self.this,arg0)
|
val = windowsc.wxMenu_FindItem(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
def FindItemForId(self,arg0):
|
def IsChecked(self,arg0):
|
||||||
val = windowsc.wxMenu_FindItemForId(self.this,arg0)
|
val = windowsc.wxMenu_IsChecked(self.this,arg0)
|
||||||
val = wxMenuItemPtr(val)
|
|
||||||
return val
|
return val
|
||||||
def GetHelpString(self,arg0):
|
def IsEnabled(self,arg0):
|
||||||
val = windowsc.wxMenu_GetHelpString(self.this,arg0)
|
val = windowsc.wxMenu_IsEnabled(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)
|
|
||||||
return val
|
return val
|
||||||
def SetLabel(self,arg0,arg1):
|
def SetLabel(self,arg0,arg1):
|
||||||
val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1)
|
val = windowsc.wxMenu_SetLabel(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
def SetTitle(self,arg0):
|
|
||||||
val = windowsc.wxMenu_SetTitle(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxMenu instance>"
|
return "<C wxMenu instance>"
|
||||||
class wxMenu(wxMenuPtr):
|
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):
|
class wxMenuBarPtr(wxEvtHandlerPtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
@@ -566,34 +449,9 @@ class wxMenuBarPtr(wxEvtHandlerPtr):
|
|||||||
def Enable(self,arg0,arg1):
|
def Enable(self,arg0,arg1):
|
||||||
val = windowsc.wxMenuBar_Enable(self.this,arg0,arg1)
|
val = windowsc.wxMenuBar_Enable(self.this,arg0,arg1)
|
||||||
return val
|
return val
|
||||||
def EnableTop(self,arg0,arg1):
|
|
||||||
val = windowsc.wxMenuBar_EnableTop(self.this,arg0,arg1)
|
|
||||||
return val
|
|
||||||
def FindMenuItem(self,arg0,arg1):
|
def FindMenuItem(self,arg0,arg1):
|
||||||
val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1)
|
val = windowsc.wxMenuBar_FindMenuItem(self.this,arg0,arg1)
|
||||||
return val
|
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):
|
def __repr__(self):
|
||||||
return "<C wxMenuBar instance>"
|
return "<C wxMenuBar instance>"
|
||||||
class wxMenuBar(wxMenuBarPtr):
|
class wxMenuBar(wxMenuBarPtr):
|
||||||
@@ -620,31 +478,16 @@ class wxMenuItemPtr :
|
|||||||
def GetId(self):
|
def GetId(self):
|
||||||
val = windowsc.wxMenuItem_GetId(self.this)
|
val = windowsc.wxMenuItem_GetId(self.this)
|
||||||
return val
|
return val
|
||||||
def GetHelp(self):
|
|
||||||
val = windowsc.wxMenuItem_GetHelp(self.this)
|
|
||||||
return val
|
|
||||||
def GetSubMenu(self):
|
def GetSubMenu(self):
|
||||||
val = windowsc.wxMenuItem_GetSubMenu(self.this)
|
val = windowsc.wxMenuItem_GetSubMenu(self.this)
|
||||||
val = wxMenuPtr(val)
|
val = wxMenuPtr(val)
|
||||||
return 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):
|
def Enable(self,*args):
|
||||||
val = apply(windowsc.wxMenuItem_Enable,(self.this,)+args)
|
val = apply(windowsc.wxMenuItem_Enable,(self.this,)+args)
|
||||||
return val
|
return val
|
||||||
def Check(self,*args):
|
def Check(self,*args):
|
||||||
val = apply(windowsc.wxMenuItem_Check,(self.this,)+args)
|
val = apply(windowsc.wxMenuItem_Check,(self.this,)+args)
|
||||||
return val
|
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):
|
def IsCheckable(self):
|
||||||
val = windowsc.wxMenuItem_IsCheckable(self.this)
|
val = windowsc.wxMenuItem_IsCheckable(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -661,11 +504,6 @@ class wxMenuItem(wxMenuItemPtr):
|
|||||||
|
|
||||||
#-------------- FUNCTION WRAPPERS ------------------
|
#-------------- FUNCTION WRAPPERS ------------------
|
||||||
|
|
||||||
def wxWindow_FindFocus():
|
|
||||||
val = windowsc.wxWindow_FindFocus()
|
|
||||||
val = wxWindowPtr(val)
|
|
||||||
return val
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- VARIABLE WRAPPERS ------------------
|
#-------------- VARIABLE WRAPPERS ------------------
|
||||||
|
@@ -33,8 +33,8 @@
|
|||||||
* and things like that.
|
* and things like that.
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.2 1998/08/14 03:16:36 RD
|
* Revision 1.3 1998/08/14 23:36:47 RD
|
||||||
* removed some definitions that got removed from defs.h
|
* 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) {
|
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||||
PyObject* o2;
|
PyObject* o2;
|
||||||
|
PyObject* o3;
|
||||||
if (!target) {
|
if (!target) {
|
||||||
target = o;
|
target = o;
|
||||||
} else if (target == Py_None) {
|
} else if (target == Py_None) {
|
||||||
@@ -632,7 +633,9 @@ extern char** string_LIST_helper(PyObject* source);
|
|||||||
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
extern wxPoint* wxPoint_LIST_helper(PyObject* source);
|
||||||
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
extern wxBitmap** wxBitmap_LIST_helper(PyObject* source);
|
||||||
extern wxString* wxString_LIST_helper(PyObject* source);
|
extern wxString* wxString_LIST_helper(PyObject* source);
|
||||||
|
#ifdef __WXMSW__
|
||||||
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||||
@@ -745,27 +748,6 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args) {
|
|||||||
return _resultobj;
|
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())
|
#define wxPyApp_GetClassName(_swigobj) (_swigobj->GetClassName())
|
||||||
static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1022,30 +1004,6 @@ static PyObject *_wrap_wxPyApp_SetAppName(PyObject *self, PyObject *args) {
|
|||||||
return _resultobj;
|
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))
|
#define wxPyApp_SetClassName(_swigobj,_swigarg0) (_swigobj->SetClassName(_swigarg0))
|
||||||
static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_wxPyApp_SetClassName(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1217,7 +1175,6 @@ static PyMethodDef wxpcMethods[] = {
|
|||||||
{ "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 },
|
{ "wxPyApp_SetPrintMode", _wrap_wxPyApp_SetPrintMode, 1 },
|
||||||
{ "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 },
|
{ "wxPyApp_SetExitOnFrameDelete", _wrap_wxPyApp_SetExitOnFrameDelete, 1 },
|
||||||
{ "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 },
|
{ "wxPyApp_SetClassName", _wrap_wxPyApp_SetClassName, 1 },
|
||||||
{ "wxPyApp_SetAuto3D", _wrap_wxPyApp_SetAuto3D, 1 },
|
|
||||||
{ "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 },
|
{ "wxPyApp_SetAppName", _wrap_wxPyApp_SetAppName, 1 },
|
||||||
{ "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 },
|
{ "wxPyApp_Pending", _wrap_wxPyApp_Pending, 1 },
|
||||||
{ "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 },
|
{ "wxPyApp_MainLoop", _wrap_wxPyApp_MainLoop, 1 },
|
||||||
@@ -1229,7 +1186,6 @@ static PyMethodDef wxpcMethods[] = {
|
|||||||
{ "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 },
|
{ "wxPyApp_GetPrintMode", _wrap_wxPyApp_GetPrintMode, 1 },
|
||||||
{ "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 },
|
{ "wxPyApp_GetExitOnFrameDelete", _wrap_wxPyApp_GetExitOnFrameDelete, 1 },
|
||||||
{ "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 },
|
{ "wxPyApp_GetClassName", _wrap_wxPyApp_GetClassName, 1 },
|
||||||
{ "wxPyApp_GetAuto3D", _wrap_wxPyApp_GetAuto3D, 1 },
|
|
||||||
{ "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 },
|
{ "wxPyApp_GetAppName", _wrap_wxPyApp_GetAppName, 1 },
|
||||||
{ "new_wxPyApp", _wrap_new_wxPyApp, 1 },
|
{ "new_wxPyApp", _wrap_new_wxPyApp, 1 },
|
||||||
{ "_wxSetDictionary", __wxSetDictionary, 1 },
|
{ "_wxSetDictionary", __wxSetDictionary, 1 },
|
||||||
@@ -1457,9 +1413,6 @@ SWIGEXPORT(void,initwxpc)() {
|
|||||||
PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE));
|
PyDict_SetItemString(d,"wxSAVE", PyInt_FromLong((long) wxSAVE));
|
||||||
PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY));
|
PyDict_SetItemString(d,"wxHIDE_READONLY", PyInt_FromLong((long) wxHIDE_READONLY));
|
||||||
PyDict_SetItemString(d,"wxOVERWRITE_PROMPT", PyInt_FromLong((long) wxOVERWRITE_PROMPT));
|
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_PARAM", PyInt_FromLong((long) ERR_PARAM));
|
||||||
PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA));
|
PyDict_SetItemString(d,"ERR_NODATA", PyInt_FromLong((long) ERR_NODATA));
|
||||||
PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL));
|
PyDict_SetItemString(d,"ERR_CANCEL", PyInt_FromLong((long) ERR_CANCEL));
|
||||||
|
@@ -49,12 +49,10 @@
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#define __version__ "0.3.0"
|
#define __version__ "0.3.1"
|
||||||
|
|
||||||
//%readonly
|
|
||||||
wxPoint wxPyDefaultPosition;
|
wxPoint wxPyDefaultPosition;
|
||||||
wxSize wxPyDefaultSize;
|
wxSize wxPyDefaultSize;
|
||||||
//%readwrite
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -70,7 +68,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
wxString GetAppName();
|
wxString GetAppName();
|
||||||
|
#ifdef __WXMSW__
|
||||||
bool GetAuto3D();
|
bool GetAuto3D();
|
||||||
|
#endif
|
||||||
wxString GetClassName();
|
wxString GetClassName();
|
||||||
bool GetExitOnFrameDelete();
|
bool GetExitOnFrameDelete();
|
||||||
int GetPrintMode();
|
int GetPrintMode();
|
||||||
@@ -84,7 +84,9 @@ public:
|
|||||||
bool Pending();
|
bool Pending();
|
||||||
|
|
||||||
void SetAppName(const wxString& name);
|
void SetAppName(const wxString& name);
|
||||||
|
#ifdef __WXMSW__
|
||||||
void SetAuto3D(bool auto3D);
|
void SetAuto3D(bool auto3D);
|
||||||
|
#endif
|
||||||
void SetClassName(const wxString& name);
|
void SetClassName(const wxString& name);
|
||||||
void SetExitOnFrameDelete(bool flag);
|
void SetExitOnFrameDelete(bool flag);
|
||||||
void SetPrintMode(int mode);
|
void SetPrintMode(int mode);
|
||||||
@@ -176,6 +178,9 @@ extern "C" SWIGEXPORT(void,initcmndlgsc)();
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// $Log$
|
// $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
|
// Revision 1.1 1998/08/09 08:25:53 RD
|
||||||
// Initial version
|
// Initial version
|
||||||
//
|
//
|
||||||
|
@@ -25,9 +25,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
|
|||||||
def GetAppName(self):
|
def GetAppName(self):
|
||||||
val = wxpc.wxPyApp_GetAppName(self.this)
|
val = wxpc.wxPyApp_GetAppName(self.this)
|
||||||
return val
|
return val
|
||||||
def GetAuto3D(self):
|
|
||||||
val = wxpc.wxPyApp_GetAuto3D(self.this)
|
|
||||||
return val
|
|
||||||
def GetClassName(self):
|
def GetClassName(self):
|
||||||
val = wxpc.wxPyApp_GetClassName(self.this)
|
val = wxpc.wxPyApp_GetClassName(self.this)
|
||||||
return val
|
return val
|
||||||
@@ -62,9 +59,6 @@ class wxPyAppPtr(wxEvtHandlerPtr):
|
|||||||
def SetAppName(self,arg0):
|
def SetAppName(self,arg0):
|
||||||
val = wxpc.wxPyApp_SetAppName(self.this,arg0)
|
val = wxpc.wxPyApp_SetAppName(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
def SetAuto3D(self,arg0):
|
|
||||||
val = wxpc.wxPyApp_SetAuto3D(self.this,arg0)
|
|
||||||
return val
|
|
||||||
def SetClassName(self,arg0):
|
def SetClassName(self,arg0):
|
||||||
val = wxpc.wxPyApp_SetClassName(self.this,arg0)
|
val = wxpc.wxPyApp_SetClassName(self.this,arg0)
|
||||||
return val
|
return val
|
||||||
@@ -317,9 +311,6 @@ wxOPEN = wxpc.wxOPEN
|
|||||||
wxSAVE = wxpc.wxSAVE
|
wxSAVE = wxpc.wxSAVE
|
||||||
wxHIDE_READONLY = wxpc.wxHIDE_READONLY
|
wxHIDE_READONLY = wxpc.wxHIDE_READONLY
|
||||||
wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT
|
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_PARAM = wxpc.ERR_PARAM
|
||||||
ERR_NODATA = wxpc.ERR_NODATA
|
ERR_NODATA = wxpc.ERR_NODATA
|
||||||
ERR_CANCEL = wxpc.ERR_CANCEL
|
ERR_CANCEL = wxpc.ERR_CANCEL
|
||||||
@@ -1380,8 +1371,8 @@ class wxApp(wxPyApp):
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# $Log$
|
# $Log$
|
||||||
# Revision 1.2 1998/08/14 03:16:39 RD
|
# Revision 1.3 1998/08/14 23:36:49 RD
|
||||||
# removed some definitions that got removed from defs.h
|
# Beginings of wxGTK compatibility
|
||||||
#
|
#
|
||||||
# Revision 1.1 1998/08/09 08:25:49 RD
|
# Revision 1.1 1998/08/09 08:25:49 RD
|
||||||
# Initial version
|
# Initial version
|
||||||
|
Reference in New Issue
Block a user