include demo/data/*.h
include demo/data/*.py
include demo/data/*.wav
+include demo/data/*.wdr
+include demo/data/*.xrc
include samples/doodle/*.txt
include samples/doodle/*.py
include contrib/stc/contrib/src/stc/scintilla/src/*.h
include contrib/stc/contrib/src/stc/scintilla/src/*.cxx
+include contrib/xrc/*.txt
+include contrib/xrc/*.i
+include contrib/xrc/*.py
+include contrib/xrc/*.cpp
+include contrib/xrc/*.c
+include contrib/xrc/*.h
+include contrib/xrc/contrib/include/wx/xrc/*.h
+include contrib/xrc/contrib/src/xrc/*.cpp
+include contrib/xrc/contrib/src/xrc/*.txt
+include contrib/xrc/contrib/src/xrc/README.EXPAT
+include contrib/xrc/contrib/src/xrc/expat/*.txt
+include contrib/xrc/contrib/src/xrc/expat/xmlparse/*.c
+include contrib/xrc/contrib/src/xrc/expat/xmlparse/*.h
+include contrib/xrc/contrib/src/xrc/expat/xmltok/*.c
+include contrib/xrc/contrib/src/xrc/expat/xmltok/*.h
%include _ogldefs.i
-%extern oglbasic.i
+%import oglbasic.i
%pragma(python) code = "import wx"
wxDiagram();
//~wxDiagram();
- void AddShape(wxPyShape*shape, wxPyShape *addAfter = NULL);
+ void AddShape(wxPyShape* shape, wxPyShape *addAfter = NULL);
void Clear(wxDC& dc);
void DeleteAllShapes();
void DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2);
from filesys import *
from utils import *
+
+from oglbasic import *
import wx
class wxDiagramPtr(wxObjectPtr):
def __init__(self,this):
EVT_GRID_EDITOR_CREATED(self, self.OnEditorCreated)
+
def OnCellLeftClick(self, evt):
self.log.write("OnCellLeftClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
wxTreeCtrl.__init__(self, parent, ID)
self.nodeStack = [self.AddRoot("Root")]
+ # Trees need an image list to do DnD...
+ self.il = wxImageList(16,16)
+ self.SetImageList(self.il)
+
+ # event handlers for DnD
+ EVT_TREE_BEGIN_DRAG(self, ID, self.OnBeginDrag)
+ EVT_TREE_END_DRAG(self, ID, self.OnEndDrag)
+
+
+ def OnBeginDrag(self, event):
+ item = event.GetItem()
+ if item != self.GetRootItem():
+ self.draggingItem = item
+ event.Allow() # if DnD of this item is okay Allow it.
+
+
+ def OnEndDrag(self, evt):
+ itemSrc = self.draggingItem
+ itemDst = evt.GetItem()
+ self.draggingItem = None
+
+ if not itemDst.IsOk():
+ print "Can't drag to here..."
+ return
+
+ # For this simple example just take the text of the source item
+ # and append it to the destination item. In real life you would
+ # possibly want to copy subtrees...
+ text = self.GetItemText(itemSrc)
+ self.AppendItem(itemDst, text)
+ self.Delete(itemSrc)
+
+
# Define a handler for start element events
def StartElement(self, name, attrs ):
if py2:
#---------------------------------------------------------------------------
class MyFrame(wxFrame):
- def __init__(self, parent, ID, title, pos, size):
- wxFrame.__init__(self, parent, ID, title, pos, size)
+ def __init__(self, parent, ID, title, pos=wxDefaultPosition,
+ size=wxDefaultSize, style=wxDEFAULT_FRAME_STYLE):
+ wxFrame.__init__(self, parent, ID, title, pos, size, style)
panel = wxPanel(self, -1)
button = wxButton(panel, 1003, "Close Me")
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
- win = MyFrame(frame, -1, "This is a wxFrame", wxDefaultPosition, wxSize(350, 200))
+ win = MyFrame(frame, -1, "This is a wxFrame", size=(350, 200),
+ style = wxDEFAULT_FRAME_STYLE | wxFRAME_TOOL_WINDOW )
frame.otherWin = win
win.Show(true)
"""
-wxSTC_CMD_ZOOMIN
+
#----------------------------------------------------------------------
Source: "demo\data\*.h"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.wav"; DestDir: "{app}\wxPython\demo\data"; Components: demo
+Source: "demo\data\*.xrc"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "README.txt"; DestDir: "{app}\wxPython\docs"; Flags: isreadme; Components: core
Source: "CHANGES.txt"; DestDir: "{app}\wxPython\docs"; Components: core
wxEXT_DIALOG_STYLE,
wxCLIP_CHILDREN,
+ wxCLIP_SIBLINGS,
wxRETAINED,
wxBACKINGSTORE,
wxLC_MASK_SORT,
wxLC_HRULES,
wxLC_VRULES,
+ //wxLC_VIRTUAL,
wxSP_VERTICAL,
wxSP_HORIZONTAL,
wxSP_ARROW_KEYS,
bool Command(int id);
bool ProcessCommand(int id);
bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
+ bool IsFullScreen();
};
//---------------------------------------------------------------------------
void BeginBatch();
void EndBatch();
int GetBatchCount();
+ void ForceRefresh();
// ------ edit control functions
wxString GetTip();
// *** Not in the "public" interface void SetWindow(wxWindow *win);
wxWindow *GetWindow();
-};
-
-
-%inline %{
- void wxToolTip_Enable(bool flag) {
- wxToolTip::Enable(flag);
- }
- void wxToolTip_SetDelay(long milliseconds) {
- wxToolTip::SetDelay(milliseconds);
- }
-%}
+ static void Enable(bool flag);
+ static void SetDelay(long milliseconds);
+};
//----------------------------------------------------------------------
return _resultobj;
}
+#define wxFrame_IsFullScreen(_swigobj) (_swigobj->IsFullScreen())
+static PyObject *_wrap_wxFrame_IsFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _result;
+ wxFrame * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsFullScreen",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsFullScreen. Expected _wxFrame_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ _result = (bool )wxFrame_IsFullScreen(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} _resultobj = Py_BuildValue("i",_result);
+ return _resultobj;
+}
+
static void *SwigwxMiniFrameTowxFrame(void *ptr) {
wxMiniFrame *src;
wxFrame *dest;
static PyMethodDef framescMethods[] = {
{ "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS },
+ { "wxFrame_IsFullScreen", (PyCFunction) _wrap_wxFrame_IsFullScreen, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_ShowFullScreen", (PyCFunction) _wrap_wxFrame_ShowFullScreen, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS },
{ "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS },
def ShowFullScreen(self, *_args, **_kwargs):
val = apply(framesc.wxFrame_ShowFullScreen,(self,) + _args, _kwargs)
return val
+ def IsFullScreen(self, *_args, **_kwargs):
+ val = apply(framesc.wxFrame_IsFullScreen,(self,) + _args, _kwargs)
+ return val
def __repr__(self):
return "<C wxFrame instance at %s>" % (self.this,)
class wxFrame(wxFramePtr):
return _resultobj;
}
+#define wxGrid_ForceRefresh(_swigobj) (_swigobj->ForceRefresh())
+static PyObject *_wrap_wxGrid_ForceRefresh(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxGrid * _arg0;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_ForceRefresh",_kwnames,&_argo0))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_ForceRefresh. Expected _wxGrid_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxGrid_ForceRefresh(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define wxGrid_IsEditable(_swigobj) (_swigobj->IsEditable())
static PyObject *_wrap_wxGrid_IsEditable(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxGrid_EnableCellEditControl", (PyCFunction) _wrap_wxGrid_EnableCellEditControl, METH_VARARGS | METH_KEYWORDS },
{ "wxGrid_EnableEditing", (PyCFunction) _wrap_wxGrid_EnableEditing, METH_VARARGS | METH_KEYWORDS },
{ "wxGrid_IsEditable", (PyCFunction) _wrap_wxGrid_IsEditable, METH_VARARGS | METH_KEYWORDS },
+ { "wxGrid_ForceRefresh", (PyCFunction) _wrap_wxGrid_ForceRefresh, METH_VARARGS | METH_KEYWORDS },
{ "wxGrid_GetBatchCount", (PyCFunction) _wrap_wxGrid_GetBatchCount, METH_VARARGS | METH_KEYWORDS },
{ "wxGrid_EndBatch", (PyCFunction) _wrap_wxGrid_EndBatch, METH_VARARGS | METH_KEYWORDS },
{ "wxGrid_BeginBatch", (PyCFunction) _wrap_wxGrid_BeginBatch, METH_VARARGS | METH_KEYWORDS },
def GetBatchCount(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_GetBatchCount,(self,) + _args, _kwargs)
return val
+ def ForceRefresh(self, *_args, **_kwargs):
+ val = apply(gridc.wxGrid_ForceRefresh,(self,) + _args, _kwargs)
+ return val
def IsEditable(self, *_args, **_kwargs):
val = apply(gridc.wxGrid_IsEditable,(self,) + _args, _kwargs)
return val
return wxSystemSettings::GetSystemMetric(index);
}
- void wxToolTip_Enable(bool flag) {
- wxToolTip::Enable(flag);
- }
-
- void wxToolTip_SetDelay(long milliseconds) {
- wxToolTip::SetDelay(milliseconds);
- }
-
int wxCaret_GetBlinkTime() {
return wxCaret::GetBlinkTime();
}
return _resultobj;
}
-static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- bool _arg0;
- int tempbool0;
- char *_kwnames[] = { "flag", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0))
- return NULL;
- _arg0 = (bool ) tempbool0;
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxToolTip_Enable(_arg0);
-
- wxPy_END_ALLOW_THREADS;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
-static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) {
- PyObject * _resultobj;
- long _arg0;
- char *_kwnames[] = { "milliseconds", NULL };
-
- self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0))
- return NULL;
-{
- wxPy_BEGIN_ALLOW_THREADS;
- wxToolTip_SetDelay(_arg0);
-
- wxPy_END_ALLOW_THREADS;
-} Py_INCREF(Py_None);
- _resultobj = Py_None;
- return _resultobj;
-}
-
static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
return _resultobj;
}
+static PyObject *_wrap_wxToolTip_Enable(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ bool _arg0;
+ int tempbool0;
+ char *_kwnames[] = { "flag", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxToolTip_Enable",_kwnames,&tempbool0))
+ return NULL;
+ _arg0 = (bool ) tempbool0;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxToolTip::Enable(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ long _arg0;
+ char *_kwnames[] = { "milliseconds", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxToolTip_SetDelay",_kwnames,&_arg0))
+ return NULL;
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxToolTip::SetDelay(_arg0);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
{ "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS },
{ "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS },
+ { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS },
+ { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS },
{ "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS },
- { "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS },
- { "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetSystemMetric", (PyCFunction) _wrap_wxSystemSettings_GetSystemMetric, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetSystemFont", (PyCFunction) _wrap_wxSystemSettings_GetSystemFont, METH_VARARGS | METH_KEYWORDS },
{ "wxSystemSettings_GetSystemColour", (PyCFunction) _wrap_wxSystemSettings_GetSystemColour, METH_VARARGS | METH_KEYWORDS },
wxSystemSettings_GetSystemMetric = misc2c.wxSystemSettings_GetSystemMetric
-wxToolTip_Enable = misc2c.wxToolTip_Enable
-
-wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay
-
wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime
wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime
if val: val = wxWavePtr(val); val.thisown = 1
return val
+wxToolTip_Enable = misc2c.wxToolTip_Enable
+
+wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay
+
wxLog_IsEnabled = misc2c.wxLog_IsEnabled
wxLog_EnableLogging = misc2c.wxLog_EnableLogging