From 6923d0a94792d9fae2f4292d842ab723464b599b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 14 Jun 2004 22:07:24 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_misc_wrap.cpp | 45 ++++++++++++++++++++++++++++++++- wxPython/src/gtk/_windows.py | 6 +++-- wxPython/src/gtk/grid.py | 19 ++++++++++++++ wxPython/src/mac/_misc_wrap.cpp | 45 ++++++++++++++++++++++++++++++++- wxPython/src/mac/_windows.py | 6 +++-- wxPython/src/mac/grid.py | 19 ++++++++++++++ wxPython/src/msw/_misc_wrap.cpp | 45 ++++++++++++++++++++++++++++++++- wxPython/src/msw/_windows.py | 6 +++-- wxPython/src/msw/grid.py | 19 ++++++++++++++ 9 files changed, 201 insertions(+), 9 deletions(-) diff --git a/wxPython/src/gtk/_misc_wrap.cpp b/wxPython/src/gtk/_misc_wrap.cpp index 4c9ab5d3de..a2d4b18bc2 100644 --- a/wxPython/src/gtk/_misc_wrap.cpp +++ b/wxPython/src/gtk/_misc_wrap.cpp @@ -1560,10 +1560,53 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); } -#include "wx/display.h" +#include bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; } bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True; } + +// dummy version of wxDisplay for when it is not enabled in the wxWidgets build +#if !wxUSE_DISPLAY +#include +#include + +WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxArrayVideoModes); +const wxVideoMode wxDefaultVideoMode; + +class wxDisplay +{ +public: + wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); } + ~wxDisplay() {} + + static size_t GetCount() + { wxPyRaiseNotImplemented(); return 0; } + + static int GetFromPoint(const wxPoint& pt) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + static int GetFromWindow(wxWindow *window) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + + virtual bool IsOk() const { return false; } + virtual wxRect GetGeometry() const { wxRect r; return r; } + virtual wxString GetName() const { return wxEmptyString; } + bool IsPrimary() const { return false; } + + wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) + { wxArrayVideoModes a; return a; } + + virtual wxVideoMode GetCurrentMode() const + { return wxDefaultVideoMode; } + + virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) + { return false; } + + void ResetMode() {} +}; +#endif + int Display_GetFromWindow(wxWindow *window){ wxPyRaiseNotImplemented(); return wxNOT_FOUND; } PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){ PyObject* pyList = NULL; diff --git a/wxPython/src/gtk/_windows.py b/wxPython/src/gtk/_windows.py index 271300e9ab..536def9979 100644 --- a/wxPython/src/gtk/_windows.py +++ b/wxPython/src/gtk/_windows.py @@ -2838,8 +2838,10 @@ class ProgressDialog(Frame): Update(self, int value, String newmsg=EmptyString) -> bool Updates the dialog, setting the progress bar to the new value and, if - given changes the message above it. Returns true unless the Cancel - button has been pressed. + given changes the message above it. The value given should be less + than or equal to the maximum value given to the constructor and the + dialog is closed if it is equal to the maximum. Returns true unless + the Cancel button has been pressed. If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is diff --git a/wxPython/src/gtk/grid.py b/wxPython/src/gtk/grid.py index 30ddf3efca..8caf74ef97 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/grid.py @@ -2289,3 +2289,22 @@ EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN ) EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) +# The same as above but with the ability to specify an identifier +EVT_GRID_CMD_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE, 1 ) +EVT_GRID_CMD_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE, 1 ) +EVT_GRID_CMD_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT, 1 ) +EVT_GRID_CMD_CELL_CHANGE = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGE, 1 ) +EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, 1 ) +EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 ) +EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 ) +EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 ) + + diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 55e369e7b5..4c32099023 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -1551,10 +1551,53 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); } -#include "wx/display.h" +#include bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; } bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True; } + +// dummy version of wxDisplay for when it is not enabled in the wxWidgets build +#if !wxUSE_DISPLAY +#include +#include + +WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxArrayVideoModes); +const wxVideoMode wxDefaultVideoMode; + +class wxDisplay +{ +public: + wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); } + ~wxDisplay() {} + + static size_t GetCount() + { wxPyRaiseNotImplemented(); return 0; } + + static int GetFromPoint(const wxPoint& pt) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + static int GetFromWindow(wxWindow *window) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + + virtual bool IsOk() const { return false; } + virtual wxRect GetGeometry() const { wxRect r; return r; } + virtual wxString GetName() const { return wxEmptyString; } + bool IsPrimary() const { return false; } + + wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) + { wxArrayVideoModes a; return a; } + + virtual wxVideoMode GetCurrentMode() const + { return wxDefaultVideoMode; } + + virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) + { return false; } + + void ResetMode() {} +}; +#endif + int Display_GetFromWindow(wxWindow *window){ wxPyRaiseNotImplemented(); return wxNOT_FOUND; } PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){ PyObject* pyList = NULL; diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index b0002e43ac..20c4e4f9e4 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -2802,8 +2802,10 @@ class ProgressDialog(Frame): Update(self, int value, String newmsg=EmptyString) -> bool Updates the dialog, setting the progress bar to the new value and, if - given changes the message above it. Returns true unless the Cancel - button has been pressed. + given changes the message above it. The value given should be less + than or equal to the maximum value given to the constructor and the + dialog is closed if it is equal to the maximum. Returns true unless + the Cancel button has been pressed. If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 30ddf3efca..8caf74ef97 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -2289,3 +2289,22 @@ EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN ) EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) +# The same as above but with the ability to specify an identifier +EVT_GRID_CMD_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE, 1 ) +EVT_GRID_CMD_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE, 1 ) +EVT_GRID_CMD_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT, 1 ) +EVT_GRID_CMD_CELL_CHANGE = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGE, 1 ) +EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, 1 ) +EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 ) +EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 ) +EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 ) + + diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 13a74adc0c..ab346c766f 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -1550,10 +1550,53 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyFileDropTarget, wxFileDropTarget, OnDrop); bool wxClipboardLocker___nonzero__(wxClipboardLocker *self){ return !!(*self); } -#include "wx/display.h" +#include bool wxVideoMode___eq__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self == *other) : False; } bool wxVideoMode___ne__(wxVideoMode *self,wxVideoMode const *other){ return other ? (*self != *other) : True; } + +// dummy version of wxDisplay for when it is not enabled in the wxWidgets build +#if !wxUSE_DISPLAY +#include +#include + +WX_DECLARE_OBJARRAY(wxVideoMode, wxArrayVideoModes); +#include "wx/arrimpl.cpp" +WX_DEFINE_OBJARRAY(wxArrayVideoModes); +const wxVideoMode wxDefaultVideoMode; + +class wxDisplay +{ +public: + wxDisplay(size_t index = 0) { wxPyRaiseNotImplemented(); } + ~wxDisplay() {} + + static size_t GetCount() + { wxPyRaiseNotImplemented(); return 0; } + + static int GetFromPoint(const wxPoint& pt) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + static int GetFromWindow(wxWindow *window) + { wxPyRaiseNotImplemented(); return wxNOT_FOUND; } + + virtual bool IsOk() const { return false; } + virtual wxRect GetGeometry() const { wxRect r; return r; } + virtual wxString GetName() const { return wxEmptyString; } + bool IsPrimary() const { return false; } + + wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) + { wxArrayVideoModes a; return a; } + + virtual wxVideoMode GetCurrentMode() const + { return wxDefaultVideoMode; } + + virtual bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode) + { return false; } + + void ResetMode() {} +}; +#endif + PyObject *wxDisplay_GetModes(wxDisplay *self,wxVideoMode const &mode){ PyObject* pyList = NULL; wxArrayVideoModes arr = self->GetModes(mode); diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index fcb5487e44..5dcdef14dd 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -2828,8 +2828,10 @@ class ProgressDialog(Frame): Update(self, int value, String newmsg=EmptyString) -> bool Updates the dialog, setting the progress bar to the new value and, if - given changes the message above it. Returns true unless the Cancel - button has been pressed. + given changes the message above it. The value given should be less + than or equal to the maximum value given to the constructor and the + dialog is closed if it is equal to the maximum. Returns true unless + the Cancel button has been pressed. If false is returned, the application can either immediately destroy the dialog or ask the user for the confirmation and if the abort is diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 30ddf3efca..8caf74ef97 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -2289,3 +2289,22 @@ EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN ) EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) +# The same as above but with the ability to specify an identifier +EVT_GRID_CMD_CELL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_CELL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_CELL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_CELL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_CLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_CLICK, 1 ) +EVT_GRID_CMD_LABEL_LEFT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_LEFT_DCLICK, 1 ) +EVT_GRID_CMD_LABEL_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_GRID_LABEL_RIGHT_DCLICK, 1 ) +EVT_GRID_CMD_ROW_SIZE = wx.PyEventBinder( wxEVT_GRID_ROW_SIZE, 1 ) +EVT_GRID_CMD_COL_SIZE = wx.PyEventBinder( wxEVT_GRID_COL_SIZE, 1 ) +EVT_GRID_CMD_RANGE_SELECT = wx.PyEventBinder( wxEVT_GRID_RANGE_SELECT, 1 ) +EVT_GRID_CMD_CELL_CHANGE = wx.PyEventBinder( wxEVT_GRID_CELL_CHANGE, 1 ) +EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, 1 ) +EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 ) +EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 ) +EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 ) + + -- 2.45.2