Changed the img2py tool to use PNG instead of XPM for embedding image
data in Python source code, and the generated code now uses streams to convert the image data to wxImage, wxBitmap, or wxIcon. A few other changes to match recent additions to CVS. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -995,10 +995,9 @@ enum wxEventType {
|
||||
wxEVT_ERASE_BACKGROUND,
|
||||
wxEVT_NC_PAINT,
|
||||
wxEVT_PAINT_ICON,
|
||||
wxEVT_MENU_CHAR,
|
||||
wxEVT_MENU_INIT,
|
||||
wxEVT_MENU_OPEN,
|
||||
wxEVT_MENU_CLOSE,
|
||||
wxEVT_MENU_HIGHLIGHT,
|
||||
wxEVT_POPUP_MENU_INIT,
|
||||
wxEVT_SYS_COLOUR_CHANGED,
|
||||
wxEVT_DISPLAY_CHANGED,
|
||||
wxEVT_SETTING_CHANGED,
|
||||
|
@@ -62,6 +62,12 @@ def EVT_KEY_DOWN(win, func):
|
||||
def EVT_KEY_UP(win, func):
|
||||
win.Connect(-1, -1, wxEVT_KEY_UP, func)
|
||||
|
||||
def EVT_MENU_OPEN(win, func):
|
||||
win.Connect(-1, -1, wxEVT_MENU_OPEN, func)
|
||||
|
||||
def EVT_MENU_CLOSE(win, func):
|
||||
win.Connect(-1, -1, wxEVT_MENU_CLOSE, func)
|
||||
|
||||
def EVT_MENU_HIGHLIGHT(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
|
||||
|
||||
|
@@ -302,6 +302,7 @@ class wxMenuEvent: public wxEvent {
|
||||
public:
|
||||
wxMenuEvent(WXTYPE id = 0, int id = 0);
|
||||
int GetMenuId();
|
||||
bool IsPopup();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@@ -4734,6 +4734,34 @@ static PyObject *_wrap_wxMenuEvent_GetMenuId(PyObject *self, PyObject *args, PyO
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxMenuEvent_IsPopup(_swigobj) (_swigobj->IsPopup())
|
||||
static PyObject *_wrap_wxMenuEvent_IsPopup(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxMenuEvent * _arg0;
|
||||
PyObject * _argo0 = 0;
|
||||
char *_kwnames[] = { "self", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMenuEvent_IsPopup",_kwnames,&_argo0))
|
||||
return NULL;
|
||||
if (_argo0) {
|
||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuEvent_IsPopup. Expected _wxMenuEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = (bool )wxMenuEvent_IsPopup(_arg0);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxShowEventTowxEvent(void *ptr) {
|
||||
wxShowEvent *src;
|
||||
wxEvent *dest;
|
||||
@@ -7184,6 +7212,7 @@ static PyMethodDef eventscMethods[] = {
|
||||
{ "wxShowEvent_GetShow", (PyCFunction) _wrap_wxShowEvent_GetShow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxShowEvent_SetShow", (PyCFunction) _wrap_wxShowEvent_SetShow, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxShowEvent", (PyCFunction) _wrap_new_wxShowEvent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMenuEvent_IsPopup", (PyCFunction) _wrap_wxMenuEvent_IsPopup, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxMenuEvent_GetMenuId", (PyCFunction) _wrap_wxMenuEvent_GetMenuId, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxMenuEvent", (PyCFunction) _wrap_new_wxMenuEvent, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "new_wxInitDialogEvent", (PyCFunction) _wrap_new_wxInitDialogEvent, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -629,6 +629,9 @@ class wxMenuEventPtr(wxEventPtr):
|
||||
def GetMenuId(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxMenuEvent_GetMenuId,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def IsPopup(self, *_args, **_kwargs):
|
||||
val = apply(eventsc.wxMenuEvent_IsPopup,(self,) + _args, _kwargs)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxMenuEvent instance at %s>" % (self.this,)
|
||||
class wxMenuEvent(wxMenuEventPtr):
|
||||
|
@@ -2622,10 +2622,9 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxEVT_ERASE_BACKGROUND", PyInt_FromLong((long) wxEVT_ERASE_BACKGROUND));
|
||||
PyDict_SetItemString(d,"wxEVT_NC_PAINT", PyInt_FromLong((long) wxEVT_NC_PAINT));
|
||||
PyDict_SetItemString(d,"wxEVT_PAINT_ICON", PyInt_FromLong((long) wxEVT_PAINT_ICON));
|
||||
PyDict_SetItemString(d,"wxEVT_MENU_CHAR", PyInt_FromLong((long) wxEVT_MENU_CHAR));
|
||||
PyDict_SetItemString(d,"wxEVT_MENU_INIT", PyInt_FromLong((long) wxEVT_MENU_INIT));
|
||||
PyDict_SetItemString(d,"wxEVT_MENU_OPEN", PyInt_FromLong((long) wxEVT_MENU_OPEN));
|
||||
PyDict_SetItemString(d,"wxEVT_MENU_CLOSE", PyInt_FromLong((long) wxEVT_MENU_CLOSE));
|
||||
PyDict_SetItemString(d,"wxEVT_MENU_HIGHLIGHT", PyInt_FromLong((long) wxEVT_MENU_HIGHLIGHT));
|
||||
PyDict_SetItemString(d,"wxEVT_POPUP_MENU_INIT", PyInt_FromLong((long) wxEVT_POPUP_MENU_INIT));
|
||||
PyDict_SetItemString(d,"wxEVT_SYS_COLOUR_CHANGED", PyInt_FromLong((long) wxEVT_SYS_COLOUR_CHANGED));
|
||||
PyDict_SetItemString(d,"wxEVT_DISPLAY_CHANGED", PyInt_FromLong((long) wxEVT_DISPLAY_CHANGED));
|
||||
PyDict_SetItemString(d,"wxEVT_SETTING_CHANGED", PyInt_FromLong((long) wxEVT_SETTING_CHANGED));
|
||||
|
@@ -854,10 +854,9 @@ wxEVT_PAINT = wxc.wxEVT_PAINT
|
||||
wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND
|
||||
wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT
|
||||
wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON
|
||||
wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR
|
||||
wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
|
||||
wxEVT_MENU_OPEN = wxc.wxEVT_MENU_OPEN
|
||||
wxEVT_MENU_CLOSE = wxc.wxEVT_MENU_CLOSE
|
||||
wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
|
||||
wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
|
||||
wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
|
||||
wxEVT_DISPLAY_CHANGED = wxc.wxEVT_DISPLAY_CHANGED
|
||||
wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
|
||||
@@ -955,6 +954,12 @@ def EVT_KEY_DOWN(win, func):
|
||||
def EVT_KEY_UP(win, func):
|
||||
win.Connect(-1, -1, wxEVT_KEY_UP, func)
|
||||
|
||||
def EVT_MENU_OPEN(win, func):
|
||||
win.Connect(-1, -1, wxEVT_MENU_OPEN, func)
|
||||
|
||||
def EVT_MENU_CLOSE(win, func):
|
||||
win.Connect(-1, -1, wxEVT_MENU_CLOSE, func)
|
||||
|
||||
def EVT_MENU_HIGHLIGHT(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
|
||||
|
||||
|
Reference in New Issue
Block a user