Second phase of OOR completed. (Original python object return for

wxEvtHandler and derived classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-10-12 23:26:38 +00:00
parent 8754feb848
commit 0122b7e3fc
112 changed files with 3422 additions and 870 deletions

View File

@@ -18,6 +18,7 @@
#include <wx/dirdlg.h>
#include <wx/fontdlg.h>
#include <wx/progdlg.h>
#include <wx/fdrepdlg.h>
%}
//----------------------------------------------------------------------
@@ -30,6 +31,7 @@
%import misc.i
%import gdi.i
%import windows.i
%import events.i
%import frames.i
%pragma(python) code = "import wx"
@@ -54,6 +56,8 @@ class wxColourDialog : public wxDialog {
public:
wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxColourData& GetColourData();
int ShowModal();
};
@@ -69,6 +73,8 @@ public:
long style = 0,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxString GetPath();
wxString GetMessage();
long GetStyle();
@@ -89,6 +95,8 @@ public:
long style = 0,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxString GetDirectory();
wxString GetFilename();
int GetFilterIndex();
@@ -154,6 +162,7 @@ public:
return new wxSingleChoiceDialog(parent, *message, *caption,
LCOUNT, choices, NULL, style, *pos);
}
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
}
@@ -175,6 +184,8 @@ public:
long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxString GetValue();
void SetValue(const wxString& value);
int ShowModal();
@@ -206,6 +217,7 @@ public:
class wxFontDialog : public wxDialog {
public:
wxFontDialog(wxWindow* parent, wxFontData* data);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
wxFontData& GetFontData();
int ShowModal();
@@ -221,6 +233,7 @@ public:
char* caption = "Message box",
long style = wxOK | wxCANCEL | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
int ShowModal();
};
@@ -234,10 +247,117 @@ public:
int maximum = 100,
wxWindow* parent = NULL,
int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
bool Update(int value = -1, const char* newmsg = NULL);
void Resume();
}
//----------------------------------------------------------------------
enum wxFindReplaceFlags
{
// downward search/replace selected (otherwise - upwards)
wxFR_DOWN = 1,
// whole word search/replace selected
wxFR_WHOLEWORD = 2,
// case sensitive search/replace selected (otherwise - case insensitive)
wxFR_MATCHCASE = 4
};
enum wxFindReplaceDialogStyles
{
// replace dialog (otherwise find dialog)
wxFR_REPLACEDIALOG = 1,
// don't allow changing the search direction
wxFR_NOUPDOWN = 2,
// don't allow case sensitive searching
wxFR_NOMATCHCASE = 4,
// don't allow whole word searching
wxFR_NOWHOLEWORD = 8
};
enum {
wxEVT_COMMAND_FIND,
wxEVT_COMMAND_FIND_NEXT,
wxEVT_COMMAND_FIND_REPLACE,
wxEVT_COMMAND_FIND_REPLACE_ALL,
wxEVT_COMMAND_FIND_CLOSE,
};
%pragma(python) code = "
def EVT_COMMAND_FIND(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_FIND, func)
def EVT_COMMAND_FIND_NEXT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_FIND_NEXT, func)
def EVT_COMMAND_FIND_REPLACE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_FIND_REPLACE, func)
def EVT_COMMAND_FIND_REPLACE_ALL(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_FIND_REPLACE_ALL, func)
def EVT_COMMAND_FIND_CLOSE(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_FIND_CLOSE, func)
"
class wxFindDialogEvent : public wxCommandEvent
{
public:
wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
int GetFlags();
wxString GetFindString();
const wxString& GetReplaceString();
wxFindReplaceDialog *GetDialog();
void SetFlags(int flags);
void SetFindString(const wxString& str);
void SetReplaceString(const wxString& str);
};
class wxFindReplaceData : public wxObject
{
public:
wxFindReplaceData(int flags=0);
~wxFindReplaceData();
const wxString& GetFindString();
const wxString& GetReplaceString();
int GetFlags();
void SetFlags(int flags);
void SetFindString(const wxString& str);
void SetReplaceString(const wxString& str);
};
class wxFindReplaceDialog : public wxDialog {
public:
wxFindReplaceDialog(wxWindow *parent,
wxFindReplaceData *data,
const wxString &title,
int style = 0);
%name(wxPreFindReplaceDialog)wxFindReplaceDialog();
bool Create(wxWindow *parent,
wxFindReplaceData *data,
const wxString &title,
int style = 0);
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
%pragma(python) addtomethod = "wxPreFindReplaceDialog:val._setOORInfo(self)"
const wxFindReplaceData *GetData();
void SetData(wxFindReplaceData *data);
};
//----------------------------------------------------------------------