Added wx.combo.BitmapComboBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-11-18 19:43:32 +00:00
parent 4532786ee2
commit f27895d289
16 changed files with 3201 additions and 558 deletions

View File

@@ -0,0 +1,60 @@
import wx
import wx.combo
import images
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
bcb = wx.combo.BitmapComboBox(self, pos=(25,25), size=(200,-1))
for x in range(12):
funcName = 'getLB%02dImage' % (x+1)
func = getattr(images, funcName)
img = func()
img.Rescale(20,20)
bmp = img.ConvertToBitmap()
bcb.Append('images.%s()' % funcName, bmp, funcName)
self.Bind(wx.EVT_COMBOBOX, self.OnCombo, bcb)
def OnCombo(self, evt):
bcb = evt.GetEventObject()
idx = evt.GetInt()
st = bcb.GetString(idx)
cd = bcb.GetClientData(idx)
self.log.write("EVT_COMBOBOX: Id %d, string '%s', clientData '%s'" % (idx, st, cd))
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
overview = """<html><body>
<h2><center>wx.combo.BitmapComboBox</center></h2>
A combobox that displays a bitmap in front of the list items. It
currently only allows using bitmaps of one size, and resizes itself so
that a bitmap can be shown next to the text field.
</body></html>
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])

View File

@@ -72,6 +72,7 @@ _treeList = [
'CollapsiblePane', 'CollapsiblePane',
'ComboCtrl', 'ComboCtrl',
'OwnerDrawnComboBox', 'OwnerDrawnComboBox',
'BitmapComboBox',
]), ]),
# managed windows == things with a (optional) caption you can close # managed windows == things with a (optional) caption you can close
@@ -176,7 +177,7 @@ _treeList = [
'ActiveX_FlashWindow', 'ActiveX_FlashWindow',
'ActiveX_IEHtmlWindow', 'ActiveX_IEHtmlWindow',
'ActiveX_PDFWindow', 'ActiveX_PDFWindow',
#'RightTextCtrl', deprecated as we have wxTE_RIGHT now. 'BitmapComboBox',
'Calendar', 'Calendar',
'CalendarCtrl', 'CalendarCtrl',
'CheckListCtrlMixin', 'CheckListCtrlMixin',

View File

@@ -26,6 +26,8 @@ the drawing of the items in the popup and in the control itself to
overridden methods of a derived class, similarly to how wx.VListBox overridden methods of a derived class, similarly to how wx.VListBox
works. works.
Added wx.combo.BitmapComboBox which is a combobox that displays a
bitmap in front of the list items.

View File

@@ -11,7 +11,7 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
%define DOCSTRING %define DOCSTRING
"ComboCtrl class that can have any type of popup widget, and also an "ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an
owner-drawn combobox control." owner-drawn combobox control."
%enddef %enddef
@@ -141,6 +141,12 @@ public:
} }
virtual wxWindow *GetMainWindowOfCompositeControl()
{
return wxComboCtrl::GetMainWindowOfCompositeControl();
}
enum enum
{ {
ShowBelow = 0x0000, // Showing popup below the control ShowBelow = 0x0000, // Showing popup below the control
@@ -352,7 +358,7 @@ use the default. The popup implementation may choose to ignore this.", "");
void , SetPopupExtents( int extLeft, int extRight ), void , SetPopupExtents( int extLeft, int extRight ),
"Extends popup size horizontally, relative to the edges of the combo "Extends popup size horizontally, relative to the edges of the combo
control. Values are given in pixels, and the defaults are zero. It control. Values are given in pixels, and the defaults are zero. It
is up to th epopup to fully take these values into account.", ""); is up to the popup to fully take these values into account.", "");
DocDeclStr( DocDeclStr(
@@ -510,6 +516,7 @@ flags are the same as wx.RendererNative flags:
// Set value returned by GetMainWindowOfCompositeControl // Set value returned by GetMainWindowOfCompositeControl
void SetCtrlMainWnd( wxWindow* wnd ); void SetCtrlMainWnd( wxWindow* wnd );
virtual wxWindow *GetMainWindowOfCompositeControl();
DocDeclStr( DocDeclStr(
static int , GetFeatures(), static int , GetFeatures(),
@@ -550,6 +557,22 @@ derived class calls `DoShowPopup`. Flags are same as for `DoShowPopup`.
", ""); ", "");
%property(PopupControl, GetPopupControl, SetPopupControl);
%property(PopupWindow, GetPopupWindow);
%property(TextCtrl, GetTextCtrl);
%property(Button, GetButton);
%property(Value, GetValue, SetValue);
%property(InsertionPoint, GetInsertionPoint);
%property(CustomPaintWidth, GetCustomPaintWidth, SetCustomPaintWidth);
%property(ButtonSize, GetButtonSize);
%property(TextIndent, GetTextIndent, SetTextIndent);
%property(TextRect, GetTextRect);
%property(BitmapNormal, GetBitmapNormal);
%property(BitmapPressed, GetBitmapPressed);
%property(BitmapHover, GetBitmapHover);
%property(BitmapDisabled, GetBitmapDisabled);
%property(PopupWindowState, GetPopupWindowState);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -998,6 +1021,115 @@ or current. ``flags`` has the sam meaning as with `OnDrawItem`.", "");
}; };
//---------------------------------------------------------------------------
%{
#include <wx/bmpcbox.h>
%}
DocStr(wxBitmapComboBox,
"A combobox that displays a bitmap in front of the list items. It
currently only allows using bitmaps of one size, and resizes itself so
that a bitmap can be shown next to the text field.",
"
Window Styles
-------------
=================== ============================================
wx.CB_READONLY Creates a combobox without a text editor. On
some platforms the control may appear very
different when this style is used.
wx.CB_SORT Sorts the entries in the list alphabetically.
wx.TE_PROCESS_ENTER The control will generate the event
wx.EVT__TEXT_ENTER (otherwise pressing Enter
key is either processed internally by the
control or used for navigation between dialog
controls).
=================== ============================================
");
MustHaveApp(wxBitmapComboBox);
class wxBitmapComboBox : public wxPyOwnerDrawnComboBox
{
public:
%pythonAppend wxBitmapComboBox "self._setOORInfo(self);";
%pythonAppend wxBitmapComboBox() "";
DocCtorStr(
wxBitmapComboBox(wxWindow *parent,
wxWindowID id = -1,
const wxString& value = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxArrayString& choices = wxPyEmptyStringArray,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr),
"Standard constructor", "");
DocCtorStrName(wxBitmapComboBox(),
"2-phase create constructor.", "",
PreBitmapComboBox);
DocDeclStr(
bool , Create(wxWindow *parent,
wxWindowID id = -1,
const wxString& value = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxArrayString& choices = wxPyEmptyStringArray,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxBitmapComboBoxNameStr),
"Create the UI object, and other initialization.", "");
%extend {
DocStr(Append,
"Adds the item to the control, associating the given data with the item
if not None. The return value is the index of the newly added item.", "");
int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap, PyObject* clientData=NULL) {
if (clientData) {
wxPyClientData* data = new wxPyClientData(clientData);
return self->Append(item, bitmap, data);
} else
return self->Append(item, bitmap);
}
}
DocDeclStr(
virtual wxBitmap , GetItemBitmap(unsigned int n) const,
"Returns the image of the item with the given index.", "");
%extend {
DocStr(Insert,
"Insert an item into the control before the item at the ``pos`` index,
optionally associating some data object with the item.", "");
int Insert(const wxString& item, const wxBitmap& bitmap,
unsigned int pos, PyObject* clientData=NULL) {
if (clientData) {
wxPyClientData* data = new wxPyClientData(clientData);
return self->Insert(item, bitmap, pos, data);
} else
return self->Insert(item, bitmap, pos);
}
}
DocDeclStr(
virtual void , SetItemBitmap(unsigned int n, const wxBitmap& bitmap),
"Sets the image for the given item.", "");
DocDeclStr(
virtual wxSize , GetBitmapSize() const,
"Returns size of the image used in list.", "");
};
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View File

@@ -2,7 +2,7 @@
# Don't modify this file, modify the SWIG interface instead. # Don't modify this file, modify the SWIG interface instead.
""" """
ComboCtrl class that can have any type of popup widget, and also an ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an
owner-drawn combobox control. owner-drawn combobox control.
""" """
@@ -299,7 +299,7 @@ class ComboCtrl(_core.Control):
Extends popup size horizontally, relative to the edges of the combo Extends popup size horizontally, relative to the edges of the combo
control. Values are given in pixels, and the defaults are zero. It control. Values are given in pixels, and the defaults are zero. It
is up to th epopup to fully take these values into account. is up to the popup to fully take these values into account.
""" """
return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs) return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
@@ -498,6 +498,10 @@ class ComboCtrl(_core.Control):
"""SetCtrlMainWnd(self, Window wnd)""" """SetCtrlMainWnd(self, Window wnd)"""
return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs) return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
def GetMainWindowOfCompositeControl(*args, **kwargs):
"""GetMainWindowOfCompositeControl(self) -> Window"""
return _combo.ComboCtrl_GetMainWindowOfCompositeControl(*args, **kwargs)
def GetFeatures(*args, **kwargs): def GetFeatures(*args, **kwargs):
""" """
GetFeatures() -> int GetFeatures() -> int
@@ -539,6 +543,21 @@ class ComboCtrl(_core.Control):
""" """
return _combo.ComboCtrl_AnimateShow(*args, **kwargs) return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
PopupControl = property(GetPopupControl,SetPopupControl)
PopupWindow = property(GetPopupWindow)
TextCtrl = property(GetTextCtrl)
Button = property(GetButton)
Value = property(GetValue,SetValue)
InsertionPoint = property(GetInsertionPoint)
CustomPaintWidth = property(GetCustomPaintWidth,SetCustomPaintWidth)
ButtonSize = property(GetButtonSize)
TextIndent = property(GetTextIndent,SetTextIndent)
TextRect = property(GetTextRect)
BitmapNormal = property(GetBitmapNormal)
BitmapPressed = property(GetBitmapPressed)
BitmapHover = property(GetBitmapHover)
BitmapDisabled = property(GetBitmapDisabled)
PopupWindowState = property(GetPopupWindowState)
_combo.ComboCtrl_swigregister(ComboCtrl) _combo.ComboCtrl_swigregister(ComboCtrl)
def PreComboCtrl(*args, **kwargs): def PreComboCtrl(*args, **kwargs):
@@ -895,5 +914,91 @@ def PreOwnerDrawnComboBox(*args, **kwargs):
val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs) val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
return val return val
class BitmapComboBox(OwnerDrawnComboBox):
"""
A combobox that displays a bitmap in front of the list items. It
currently only allows using bitmaps of one size, and resizes itself so
that a bitmap can be shown next to the text field.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> BitmapComboBox
Standard constructor
"""
_combo.BitmapComboBox_swiginit(self,_combo.new_BitmapComboBox(*args, **kwargs))
self._setOORInfo(self);
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> bool
Create the UI object, and other initialization.
"""
return _combo.BitmapComboBox_Create(*args, **kwargs)
def Append(*args, **kwargs):
"""
Append(self, String item, Bitmap bitmap=wxNullBitmap, PyObject clientData=None) -> int
Adds the item to the control, associating the given data with the item
if not None. The return value is the index of the newly added item.
"""
return _combo.BitmapComboBox_Append(*args, **kwargs)
def GetItemBitmap(*args, **kwargs):
"""
GetItemBitmap(self, unsigned int n) -> Bitmap
Returns the image of the item with the given index.
"""
return _combo.BitmapComboBox_GetItemBitmap(*args, **kwargs)
def Insert(*args, **kwargs):
"""
Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int
Insert an item into the control before the item at the ``pos`` index,
optionally associating some data object with the item.
"""
return _combo.BitmapComboBox_Insert(*args, **kwargs)
def SetItemBitmap(*args, **kwargs):
"""
SetItemBitmap(self, unsigned int n, Bitmap bitmap)
Sets the image for the given item.
"""
return _combo.BitmapComboBox_SetItemBitmap(*args, **kwargs)
def GetBitmapSize(*args, **kwargs):
"""
GetBitmapSize(self) -> Size
Returns size of the image used in list.
"""
return _combo.BitmapComboBox_GetBitmapSize(*args, **kwargs)
_combo.BitmapComboBox_swigregister(BitmapComboBox)
def PreBitmapComboBox(*args, **kwargs):
"""
PreBitmapComboBox() -> BitmapComboBox
2-phase create constructor.
"""
val = _combo.new_PreBitmapComboBox(*args, **kwargs)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1428,8 +1428,6 @@ def PreRichTextCtrl(*args, **kwargs):
val = _richtext.new_PreRichTextCtrl(*args, **kwargs) val = _richtext.new_PreRichTextCtrl(*args, **kwargs)
return val return val
wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED
wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED
wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK
wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK
wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK
@@ -1439,8 +1437,8 @@ wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING = _richtext.wxEVT_COMMAND_RICHTEXT_ST
wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED
EVT_RICHTEXT_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 1) wxEVT_COMMAND_RICHTEXT_CHARACTER = _richtext.wxEVT_COMMAND_RICHTEXT_CHARACTER
EVT_RICHTEXT_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 1) wxEVT_COMMAND_RICHTEXT_DELETE = _richtext.wxEVT_COMMAND_RICHTEXT_DELETE
EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1) EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1)
EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1) EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1)
EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1) EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1)
@@ -1450,6 +1448,8 @@ EVT_RICHTEXT_STYLESHEET_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYL
EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1) EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1)
EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1) EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1)
EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1) EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1)
EVT_RICHTEXT_CHARACTER = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_CHARACTER, 1)
EVT_RICHTEXT_DELETE = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_DELETE, 1)
class RichTextEvent(_core.NotifyEvent): class RichTextEvent(_core.NotifyEvent):
"""Proxy of C++ RichTextEvent class""" """Proxy of C++ RichTextEvent class"""
@@ -1458,13 +1458,13 @@ class RichTextEvent(_core.NotifyEvent):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent""" """__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent"""
_richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs)) _richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs))
def GetIndex(*args, **kwargs): def GetPosition(*args, **kwargs):
"""GetIndex(self) -> int""" """GetPosition(self) -> int"""
return _richtext.RichTextEvent_GetIndex(*args, **kwargs) return _richtext.RichTextEvent_GetPosition(*args, **kwargs)
def SetIndex(*args, **kwargs): def SetPosition(*args, **kwargs):
"""SetIndex(self, int n)""" """SetPosition(self, int n)"""
return _richtext.RichTextEvent_SetIndex(*args, **kwargs) return _richtext.RichTextEvent_SetPosition(*args, **kwargs)
def GetFlags(*args, **kwargs): def GetFlags(*args, **kwargs):
"""GetFlags(self) -> int""" """GetFlags(self) -> int"""
@@ -1475,7 +1475,7 @@ class RichTextEvent(_core.NotifyEvent):
return _richtext.RichTextEvent_SetFlags(*args, **kwargs) return _richtext.RichTextEvent_SetFlags(*args, **kwargs)
Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`") Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`")
Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`") Index = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`")
_richtext.RichTextEvent_swigregister(RichTextEvent) _richtext.RichTextEvent_swigregister(RichTextEvent)

View File

@@ -11906,7 +11906,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_RichTextEvent_GetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int result; int result;
@@ -11918,12 +11918,12 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self)
swig_obj[0] = args; swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)((wxRichTextEvent const *)arg1)->GetIndex(); result = (int)((wxRichTextEvent const *)arg1)->GetPosition();
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -11934,7 +11934,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { SWIGINTERN PyObject *_wrap_RichTextEvent_SetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int arg2 ; int arg2 ;
@@ -11948,20 +11948,20 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self)
(char *) "self",(char *) "n", NULL (char *) "self",(char *) "n", NULL
}; };
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetIndex",kwnames,&obj0,&obj1)) SWIG_fail; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetPosition",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2); ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) { if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetIndex" "', expected argument " "2"" of type '" "int""'"); SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetPosition" "', expected argument " "2"" of type '" "int""'");
} }
arg2 = static_cast< int >(val2); arg2 = static_cast< int >(val2);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetIndex(arg2); (arg1)->SetPosition(arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -12294,8 +12294,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL},
{ (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL},
{ (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetIndex", (PyCFunction)_wrap_RichTextEvent_GetIndex, METH_O, NULL}, { (char *)"RichTextEvent_GetPosition", (PyCFunction)_wrap_RichTextEvent_GetPosition, METH_O, NULL},
{ (char *)"RichTextEvent_SetIndex", (PyCFunction) _wrap_RichTextEvent_SetIndex, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetPosition", (PyCFunction) _wrap_RichTextEvent_SetPosition, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL}, { (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL},
{ (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL},
@@ -14500,8 +14500,6 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER))); SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH))); SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL))); SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL)));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK));
@@ -14511,6 +14509,8 @@ SWIGEXPORT void SWIG_init(void) {
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_CHARACTER", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_CHARACTER));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_DELETE", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_DELETE));
wxRichTextModuleInit(); wxRichTextModuleInit();

View File

@@ -2,7 +2,7 @@
# Don't modify this file, modify the SWIG interface instead. # Don't modify this file, modify the SWIG interface instead.
""" """
ComboCtrl class that can have any type of popup widget, and also an ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an
owner-drawn combobox control. owner-drawn combobox control.
""" """
@@ -299,7 +299,7 @@ class ComboCtrl(_core.Control):
Extends popup size horizontally, relative to the edges of the combo Extends popup size horizontally, relative to the edges of the combo
control. Values are given in pixels, and the defaults are zero. It control. Values are given in pixels, and the defaults are zero. It
is up to th epopup to fully take these values into account. is up to the popup to fully take these values into account.
""" """
return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs) return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
@@ -498,6 +498,10 @@ class ComboCtrl(_core.Control):
"""SetCtrlMainWnd(self, Window wnd)""" """SetCtrlMainWnd(self, Window wnd)"""
return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs) return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
def GetMainWindowOfCompositeControl(*args, **kwargs):
"""GetMainWindowOfCompositeControl(self) -> Window"""
return _combo.ComboCtrl_GetMainWindowOfCompositeControl(*args, **kwargs)
def GetFeatures(*args, **kwargs): def GetFeatures(*args, **kwargs):
""" """
GetFeatures() -> int GetFeatures() -> int
@@ -539,6 +543,21 @@ class ComboCtrl(_core.Control):
""" """
return _combo.ComboCtrl_AnimateShow(*args, **kwargs) return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
PopupControl = property(GetPopupControl,SetPopupControl)
PopupWindow = property(GetPopupWindow)
TextCtrl = property(GetTextCtrl)
Button = property(GetButton)
Value = property(GetValue,SetValue)
InsertionPoint = property(GetInsertionPoint)
CustomPaintWidth = property(GetCustomPaintWidth,SetCustomPaintWidth)
ButtonSize = property(GetButtonSize)
TextIndent = property(GetTextIndent,SetTextIndent)
TextRect = property(GetTextRect)
BitmapNormal = property(GetBitmapNormal)
BitmapPressed = property(GetBitmapPressed)
BitmapHover = property(GetBitmapHover)
BitmapDisabled = property(GetBitmapDisabled)
PopupWindowState = property(GetPopupWindowState)
_combo.ComboCtrl_swigregister(ComboCtrl) _combo.ComboCtrl_swigregister(ComboCtrl)
def PreComboCtrl(*args, **kwargs): def PreComboCtrl(*args, **kwargs):
@@ -895,5 +914,91 @@ def PreOwnerDrawnComboBox(*args, **kwargs):
val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs) val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
return val return val
class BitmapComboBox(OwnerDrawnComboBox):
"""
A combobox that displays a bitmap in front of the list items. It
currently only allows using bitmaps of one size, and resizes itself so
that a bitmap can be shown next to the text field.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> BitmapComboBox
Standard constructor
"""
_combo.BitmapComboBox_swiginit(self,_combo.new_BitmapComboBox(*args, **kwargs))
self._setOORInfo(self);
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> bool
Create the UI object, and other initialization.
"""
return _combo.BitmapComboBox_Create(*args, **kwargs)
def Append(*args, **kwargs):
"""
Append(self, String item, Bitmap bitmap=wxNullBitmap, PyObject clientData=None) -> int
Adds the item to the control, associating the given data with the item
if not None. The return value is the index of the newly added item.
"""
return _combo.BitmapComboBox_Append(*args, **kwargs)
def GetItemBitmap(*args, **kwargs):
"""
GetItemBitmap(self, unsigned int n) -> Bitmap
Returns the image of the item with the given index.
"""
return _combo.BitmapComboBox_GetItemBitmap(*args, **kwargs)
def Insert(*args, **kwargs):
"""
Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int
Insert an item into the control before the item at the ``pos`` index,
optionally associating some data object with the item.
"""
return _combo.BitmapComboBox_Insert(*args, **kwargs)
def SetItemBitmap(*args, **kwargs):
"""
SetItemBitmap(self, unsigned int n, Bitmap bitmap)
Sets the image for the given item.
"""
return _combo.BitmapComboBox_SetItemBitmap(*args, **kwargs)
def GetBitmapSize(*args, **kwargs):
"""
GetBitmapSize(self) -> Size
Returns size of the image used in list.
"""
return _combo.BitmapComboBox_GetBitmapSize(*args, **kwargs)
_combo.BitmapComboBox_swigregister(BitmapComboBox)
def PreBitmapComboBox(*args, **kwargs):
"""
PreBitmapComboBox() -> BitmapComboBox
2-phase create constructor.
"""
val = _combo.new_PreBitmapComboBox(*args, **kwargs)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1428,8 +1428,6 @@ def PreRichTextCtrl(*args, **kwargs):
val = _richtext.new_PreRichTextCtrl(*args, **kwargs) val = _richtext.new_PreRichTextCtrl(*args, **kwargs)
return val return val
wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED
wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED
wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK
wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK
wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK
@@ -1439,8 +1437,8 @@ wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING = _richtext.wxEVT_COMMAND_RICHTEXT_ST
wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED
EVT_RICHTEXT_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 1) wxEVT_COMMAND_RICHTEXT_CHARACTER = _richtext.wxEVT_COMMAND_RICHTEXT_CHARACTER
EVT_RICHTEXT_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 1) wxEVT_COMMAND_RICHTEXT_DELETE = _richtext.wxEVT_COMMAND_RICHTEXT_DELETE
EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1) EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1)
EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1) EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1)
EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1) EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1)
@@ -1450,6 +1448,8 @@ EVT_RICHTEXT_STYLESHEET_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYL
EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1) EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1)
EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1) EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1)
EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1) EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1)
EVT_RICHTEXT_CHARACTER = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_CHARACTER, 1)
EVT_RICHTEXT_DELETE = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_DELETE, 1)
class RichTextEvent(_core.NotifyEvent): class RichTextEvent(_core.NotifyEvent):
"""Proxy of C++ RichTextEvent class""" """Proxy of C++ RichTextEvent class"""
@@ -1458,13 +1458,13 @@ class RichTextEvent(_core.NotifyEvent):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent""" """__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent"""
_richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs)) _richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs))
def GetIndex(*args, **kwargs): def GetPosition(*args, **kwargs):
"""GetIndex(self) -> int""" """GetPosition(self) -> int"""
return _richtext.RichTextEvent_GetIndex(*args, **kwargs) return _richtext.RichTextEvent_GetPosition(*args, **kwargs)
def SetIndex(*args, **kwargs): def SetPosition(*args, **kwargs):
"""SetIndex(self, int n)""" """SetPosition(self, int n)"""
return _richtext.RichTextEvent_SetIndex(*args, **kwargs) return _richtext.RichTextEvent_SetPosition(*args, **kwargs)
def GetFlags(*args, **kwargs): def GetFlags(*args, **kwargs):
"""GetFlags(self) -> int""" """GetFlags(self) -> int"""
@@ -1475,7 +1475,7 @@ class RichTextEvent(_core.NotifyEvent):
return _richtext.RichTextEvent_SetFlags(*args, **kwargs) return _richtext.RichTextEvent_SetFlags(*args, **kwargs)
Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`") Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`")
Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`") Index = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`")
_richtext.RichTextEvent_swigregister(RichTextEvent) _richtext.RichTextEvent_swigregister(RichTextEvent)

View File

@@ -11906,7 +11906,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_RichTextEvent_GetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int result; int result;
@@ -11918,12 +11918,12 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self)
swig_obj[0] = args; swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)((wxRichTextEvent const *)arg1)->GetIndex(); result = (int)((wxRichTextEvent const *)arg1)->GetPosition();
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -11934,7 +11934,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { SWIGINTERN PyObject *_wrap_RichTextEvent_SetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int arg2 ; int arg2 ;
@@ -11948,20 +11948,20 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self)
(char *) "self",(char *) "n", NULL (char *) "self",(char *) "n", NULL
}; };
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetIndex",kwnames,&obj0,&obj1)) SWIG_fail; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetPosition",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2); ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) { if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetIndex" "', expected argument " "2"" of type '" "int""'"); SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetPosition" "', expected argument " "2"" of type '" "int""'");
} }
arg2 = static_cast< int >(val2); arg2 = static_cast< int >(val2);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetIndex(arg2); (arg1)->SetPosition(arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -12294,8 +12294,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL},
{ (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL},
{ (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetIndex", (PyCFunction)_wrap_RichTextEvent_GetIndex, METH_O, NULL}, { (char *)"RichTextEvent_GetPosition", (PyCFunction)_wrap_RichTextEvent_GetPosition, METH_O, NULL},
{ (char *)"RichTextEvent_SetIndex", (PyCFunction) _wrap_RichTextEvent_SetIndex, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetPosition", (PyCFunction) _wrap_RichTextEvent_SetPosition, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL}, { (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL},
{ (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL},
@@ -14500,8 +14500,6 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER))); SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH))); SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL))); SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL)));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK));
@@ -14511,6 +14509,8 @@ SWIGEXPORT void SWIG_init(void) {
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_CHARACTER", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_CHARACTER));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_DELETE", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_DELETE));
wxRichTextModuleInit(); wxRichTextModuleInit();

View File

@@ -2,7 +2,7 @@
# Don't modify this file, modify the SWIG interface instead. # Don't modify this file, modify the SWIG interface instead.
""" """
ComboCtrl class that can have any type of popup widget, and also an ComboCtrl class that can have any type ofconst wxBitmap& bitmap, popup widget, and also an
owner-drawn combobox control. owner-drawn combobox control.
""" """
@@ -299,7 +299,7 @@ class ComboCtrl(_core.Control):
Extends popup size horizontally, relative to the edges of the combo Extends popup size horizontally, relative to the edges of the combo
control. Values are given in pixels, and the defaults are zero. It control. Values are given in pixels, and the defaults are zero. It
is up to th epopup to fully take these values into account. is up to the popup to fully take these values into account.
""" """
return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs) return _combo.ComboCtrl_SetPopupExtents(*args, **kwargs)
@@ -498,6 +498,10 @@ class ComboCtrl(_core.Control):
"""SetCtrlMainWnd(self, Window wnd)""" """SetCtrlMainWnd(self, Window wnd)"""
return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs) return _combo.ComboCtrl_SetCtrlMainWnd(*args, **kwargs)
def GetMainWindowOfCompositeControl(*args, **kwargs):
"""GetMainWindowOfCompositeControl(self) -> Window"""
return _combo.ComboCtrl_GetMainWindowOfCompositeControl(*args, **kwargs)
def GetFeatures(*args, **kwargs): def GetFeatures(*args, **kwargs):
""" """
GetFeatures() -> int GetFeatures() -> int
@@ -539,6 +543,21 @@ class ComboCtrl(_core.Control):
""" """
return _combo.ComboCtrl_AnimateShow(*args, **kwargs) return _combo.ComboCtrl_AnimateShow(*args, **kwargs)
PopupControl = property(GetPopupControl,SetPopupControl)
PopupWindow = property(GetPopupWindow)
TextCtrl = property(GetTextCtrl)
Button = property(GetButton)
Value = property(GetValue,SetValue)
InsertionPoint = property(GetInsertionPoint)
CustomPaintWidth = property(GetCustomPaintWidth,SetCustomPaintWidth)
ButtonSize = property(GetButtonSize)
TextIndent = property(GetTextIndent,SetTextIndent)
TextRect = property(GetTextRect)
BitmapNormal = property(GetBitmapNormal)
BitmapPressed = property(GetBitmapPressed)
BitmapHover = property(GetBitmapHover)
BitmapDisabled = property(GetBitmapDisabled)
PopupWindowState = property(GetPopupWindowState)
_combo.ComboCtrl_swigregister(ComboCtrl) _combo.ComboCtrl_swigregister(ComboCtrl)
def PreComboCtrl(*args, **kwargs): def PreComboCtrl(*args, **kwargs):
@@ -895,5 +914,91 @@ def PreOwnerDrawnComboBox(*args, **kwargs):
val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs) val = _combo.new_PreOwnerDrawnComboBox(*args, **kwargs)
return val return val
class BitmapComboBox(OwnerDrawnComboBox):
"""
A combobox that displays a bitmap in front of the list items. It
currently only allows using bitmaps of one size, and resizes itself so
that a bitmap can be shown next to the text field.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
def __init__(self, *args, **kwargs):
"""
__init__(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> BitmapComboBox
Standard constructor
"""
_combo.BitmapComboBox_swiginit(self,_combo.new_BitmapComboBox(*args, **kwargs))
self._setOORInfo(self);
def Create(*args, **kwargs):
"""
Create(self, Window parent, int id=-1, String value=EmptyString,
Point pos=DefaultPosition, Size size=DefaultSize,
wxArrayString choices=wxPyEmptyStringArray,
long style=0, Validator validator=DefaultValidator,
String name=wxBitmapComboBoxNameStr) -> bool
Create the UI object, and other initialization.
"""
return _combo.BitmapComboBox_Create(*args, **kwargs)
def Append(*args, **kwargs):
"""
Append(self, String item, Bitmap bitmap=wxNullBitmap, PyObject clientData=None) -> int
Adds the item to the control, associating the given data with the item
if not None. The return value is the index of the newly added item.
"""
return _combo.BitmapComboBox_Append(*args, **kwargs)
def GetItemBitmap(*args, **kwargs):
"""
GetItemBitmap(self, unsigned int n) -> Bitmap
Returns the image of the item with the given index.
"""
return _combo.BitmapComboBox_GetItemBitmap(*args, **kwargs)
def Insert(*args, **kwargs):
"""
Insert(self, String item, Bitmap bitmap, unsigned int pos, PyObject clientData=None) -> int
Insert an item into the control before the item at the ``pos`` index,
optionally associating some data object with the item.
"""
return _combo.BitmapComboBox_Insert(*args, **kwargs)
def SetItemBitmap(*args, **kwargs):
"""
SetItemBitmap(self, unsigned int n, Bitmap bitmap)
Sets the image for the given item.
"""
return _combo.BitmapComboBox_SetItemBitmap(*args, **kwargs)
def GetBitmapSize(*args, **kwargs):
"""
GetBitmapSize(self) -> Size
Returns size of the image used in list.
"""
return _combo.BitmapComboBox_GetBitmapSize(*args, **kwargs)
_combo.BitmapComboBox_swigregister(BitmapComboBox)
def PreBitmapComboBox(*args, **kwargs):
"""
PreBitmapComboBox() -> BitmapComboBox
2-phase create constructor.
"""
val = _combo.new_PreBitmapComboBox(*args, **kwargs)
return val

File diff suppressed because one or more lines are too long

View File

@@ -1428,8 +1428,6 @@ def PreRichTextCtrl(*args, **kwargs):
val = _richtext.new_PreRichTextCtrl(*args, **kwargs) val = _richtext.new_PreRichTextCtrl(*args, **kwargs)
return val return val
wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED
wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED
wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK
wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK
wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK
@@ -1439,8 +1437,8 @@ wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING = _richtext.wxEVT_COMMAND_RICHTEXT_ST
wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING
wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED = _richtext.wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED
EVT_RICHTEXT_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 1) wxEVT_COMMAND_RICHTEXT_CHARACTER = _richtext.wxEVT_COMMAND_RICHTEXT_CHARACTER
EVT_RICHTEXT_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 1) wxEVT_COMMAND_RICHTEXT_DELETE = _richtext.wxEVT_COMMAND_RICHTEXT_DELETE
EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1) EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1)
EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1) EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1)
EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1) EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1)
@@ -1450,6 +1448,8 @@ EVT_RICHTEXT_STYLESHEET_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYL
EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1) EVT_RICHTEXT_STYLESHEET_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED, 1)
EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1) EVT_RICHTEXT_STYLESHEET_REPLACING = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING, 1)
EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1) EVT_RICHTEXT_STYLESHEET_REPLACED = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED, 1)
EVT_RICHTEXT_CHARACTER = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_CHARACTER, 1)
EVT_RICHTEXT_DELETE = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_DELETE, 1)
class RichTextEvent(_core.NotifyEvent): class RichTextEvent(_core.NotifyEvent):
"""Proxy of C++ RichTextEvent class""" """Proxy of C++ RichTextEvent class"""
@@ -1458,13 +1458,13 @@ class RichTextEvent(_core.NotifyEvent):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
"""__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent""" """__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent"""
_richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs)) _richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs))
def GetIndex(*args, **kwargs): def GetPosition(*args, **kwargs):
"""GetIndex(self) -> int""" """GetPosition(self) -> int"""
return _richtext.RichTextEvent_GetIndex(*args, **kwargs) return _richtext.RichTextEvent_GetPosition(*args, **kwargs)
def SetIndex(*args, **kwargs): def SetPosition(*args, **kwargs):
"""SetIndex(self, int n)""" """SetPosition(self, int n)"""
return _richtext.RichTextEvent_SetIndex(*args, **kwargs) return _richtext.RichTextEvent_SetPosition(*args, **kwargs)
def GetFlags(*args, **kwargs): def GetFlags(*args, **kwargs):
"""GetFlags(self) -> int""" """GetFlags(self) -> int"""
@@ -1475,7 +1475,7 @@ class RichTextEvent(_core.NotifyEvent):
return _richtext.RichTextEvent_SetFlags(*args, **kwargs) return _richtext.RichTextEvent_SetFlags(*args, **kwargs)
Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`") Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`")
Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`") Index = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`")
_richtext.RichTextEvent_swigregister(RichTextEvent) _richtext.RichTextEvent_swigregister(RichTextEvent)

View File

@@ -11906,7 +11906,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_RichTextEvent_GetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int result; int result;
@@ -11918,12 +11918,12 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_GetIndex(PyObject *SWIGUNUSEDPARM(self)
swig_obj[0] = args; swig_obj[0] = args;
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_GetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent const *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)((wxRichTextEvent const *)arg1)->GetIndex(); result = (int)((wxRichTextEvent const *)arg1)->GetPosition();
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -11934,7 +11934,7 @@ fail:
} }
SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { SWIGINTERN PyObject *_wrap_RichTextEvent_SetPosition(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ; wxRichTextEvent *arg1 = (wxRichTextEvent *) 0 ;
int arg2 ; int arg2 ;
@@ -11948,20 +11948,20 @@ SWIGINTERN PyObject *_wrap_RichTextEvent_SetIndex(PyObject *SWIGUNUSEDPARM(self)
(char *) "self",(char *) "n", NULL (char *) "self",(char *) "n", NULL
}; };
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetIndex",kwnames,&obj0,&obj1)) SWIG_fail; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:RichTextEvent_SetPosition",kwnames,&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 ); res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxRichTextEvent, 0 | 0 );
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetIndex" "', expected argument " "1"" of type '" "wxRichTextEvent *""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RichTextEvent_SetPosition" "', expected argument " "1"" of type '" "wxRichTextEvent *""'");
} }
arg1 = reinterpret_cast< wxRichTextEvent * >(argp1); arg1 = reinterpret_cast< wxRichTextEvent * >(argp1);
ecode2 = SWIG_AsVal_int(obj1, &val2); ecode2 = SWIG_AsVal_int(obj1, &val2);
if (!SWIG_IsOK(ecode2)) { if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetIndex" "', expected argument " "2"" of type '" "int""'"); SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RichTextEvent_SetPosition" "', expected argument " "2"" of type '" "int""'");
} }
arg2 = static_cast< int >(val2); arg2 = static_cast< int >(val2);
{ {
PyThreadState* __tstate = wxPyBeginAllowThreads(); PyThreadState* __tstate = wxPyBeginAllowThreads();
(arg1)->SetIndex(arg2); (arg1)->SetPosition(arg2);
wxPyEndAllowThreads(__tstate); wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail; if (PyErr_Occurred()) SWIG_fail;
} }
@@ -12294,8 +12294,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swigregister", RichTextCtrl_swigregister, METH_VARARGS, NULL},
{ (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL}, { (char *)"RichTextCtrl_swiginit", RichTextCtrl_swiginit, METH_VARARGS, NULL},
{ (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_RichTextEvent", (PyCFunction) _wrap_new_RichTextEvent, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetIndex", (PyCFunction)_wrap_RichTextEvent_GetIndex, METH_O, NULL}, { (char *)"RichTextEvent_GetPosition", (PyCFunction)_wrap_RichTextEvent_GetPosition, METH_O, NULL},
{ (char *)"RichTextEvent_SetIndex", (PyCFunction) _wrap_RichTextEvent_SetIndex, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetPosition", (PyCFunction) _wrap_RichTextEvent_SetPosition, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL}, { (char *)"RichTextEvent_GetFlags", (PyCFunction)_wrap_RichTextEvent_GetFlags, METH_O, NULL},
{ (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RichTextEvent_SetFlags", (PyCFunction) _wrap_RichTextEvent_SetFlags, METH_VARARGS | METH_KEYWORDS, NULL},
{ (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL}, { (char *)"RichTextEvent_swigregister", RichTextEvent_swigregister, METH_VARARGS, NULL},
@@ -14500,8 +14500,6 @@ SWIGEXPORT void SWIG_init(void) {
SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER))); SWIG_Python_SetConstant(d, "TEXT_ATTR_CHARACTER",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_CHARACTER)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH))); SWIG_Python_SetConstant(d, "TEXT_ATTR_PARAGRAPH",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_PARAGRAPH)));
SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL))); SWIG_Python_SetConstant(d, "TEXT_ATTR_ALL",SWIG_From_int(static_cast< int >(wxTEXT_ATTR_ALL)));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_LEFT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK));
@@ -14511,6 +14509,8 @@ SWIGEXPORT void SWIG_init(void) {
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED)); PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_CHARACTER", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_CHARACTER));
PyDict_SetItemString(d, "wxEVT_COMMAND_RICHTEXT_DELETE", PyInt_FromLong(wxEVT_COMMAND_RICHTEXT_DELETE));
wxRichTextModuleInit(); wxRichTextModuleInit();