Modified form of Patch #1611222, adds wxSearchCtrl (generic & native carbon HISearchField)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1012,6 +1012,7 @@ _controls_.StaticBox_swigregister(StaticBox)
|
||||
StaticBitmapNameStr = cvar.StaticBitmapNameStr
|
||||
StaticBoxNameStr = cvar.StaticBoxNameStr
|
||||
StaticTextNameStr = cvar.StaticTextNameStr
|
||||
StaticLineNameStr = cvar.StaticLineNameStr
|
||||
|
||||
def PreStaticBox(*args, **kwargs):
|
||||
"""PreStaticBox() -> StaticBox"""
|
||||
@@ -1045,7 +1046,7 @@ class StaticLine(_core.Control):
|
||||
"""
|
||||
__init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=LI_HORIZONTAL,
|
||||
String name=StaticTextNameStr) -> StaticLine
|
||||
String name=StaticLineNameStr) -> StaticLine
|
||||
"""
|
||||
_controls_.StaticLine_swiginit(self,_controls_.new_StaticLine(*args, **kwargs))
|
||||
self._setOORInfo(self)
|
||||
@@ -1054,7 +1055,7 @@ class StaticLine(_core.Control):
|
||||
"""
|
||||
Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
|
||||
Size size=DefaultSize, long style=LI_HORIZONTAL,
|
||||
String name=StaticTextNameStr) -> bool
|
||||
String name=StaticLineNameStr) -> bool
|
||||
"""
|
||||
return _controls_.StaticLine_Create(*args, **kwargs)
|
||||
|
||||
@@ -7121,5 +7122,86 @@ class CollapsiblePaneEvent(_core.CommandEvent):
|
||||
Collapsed = property(GetCollapsed,SetCollapsed)
|
||||
_controls_.CollapsiblePaneEvent_swigregister(CollapsiblePaneEvent)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class SearchCtrl(TextCtrl):
|
||||
"""Proxy of C++ SearchCtrl class"""
|
||||
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=wxEmptyString,
|
||||
Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=0, Validator validator=DefaultValidator,
|
||||
String name=SearchCtrlNameStr) -> SearchCtrl
|
||||
"""
|
||||
_controls_.SearchCtrl_swiginit(self,_controls_.new_SearchCtrl(*args, **kwargs))
|
||||
self._setOORInfo(self)
|
||||
|
||||
def Create(*args, **kwargs):
|
||||
"""
|
||||
Create(self, Window parent, int id=-1, String value=wxEmptyString,
|
||||
Point pos=DefaultPosition, Size size=DefaultSize,
|
||||
long style=0, Validator validator=DefaultValidator,
|
||||
String name=SearchCtrlNameStr) -> bool
|
||||
"""
|
||||
return _controls_.SearchCtrl_Create(*args, **kwargs)
|
||||
|
||||
def SetMenu(*args, **kwargs):
|
||||
"""SetMenu(self, Menu menu)"""
|
||||
return _controls_.SearchCtrl_SetMenu(*args, **kwargs)
|
||||
|
||||
def GetMenu(*args, **kwargs):
|
||||
"""GetMenu(self) -> Menu"""
|
||||
return _controls_.SearchCtrl_GetMenu(*args, **kwargs)
|
||||
|
||||
def SetSearchButtonVisible(*args, **kwargs):
|
||||
"""SetSearchButtonVisible(self, bool show)"""
|
||||
return _controls_.SearchCtrl_SetSearchButtonVisible(*args, **kwargs)
|
||||
|
||||
def GetSearchButtonVisible(*args, **kwargs):
|
||||
"""GetSearchButtonVisible(self) -> bool"""
|
||||
return _controls_.SearchCtrl_GetSearchButtonVisible(*args, **kwargs)
|
||||
|
||||
def SetCancelButtonVisible(*args, **kwargs):
|
||||
"""SetCancelButtonVisible(self, bool show)"""
|
||||
return _controls_.SearchCtrl_SetCancelButtonVisible(*args, **kwargs)
|
||||
|
||||
def GetCancelButtonVisible(*args, **kwargs):
|
||||
"""GetCancelButtonVisible(self) -> bool"""
|
||||
return _controls_.SearchCtrl_GetCancelButtonVisible(*args, **kwargs)
|
||||
|
||||
def SetSearchBitmap(*args, **kwargs):
|
||||
"""SetSearchBitmap(self, Bitmap ?)"""
|
||||
return _controls_.SearchCtrl_SetSearchBitmap(*args, **kwargs)
|
||||
|
||||
def SetSearchMenuBitmap(*args, **kwargs):
|
||||
"""SetSearchMenuBitmap(self, Bitmap ?)"""
|
||||
return _controls_.SearchCtrl_SetSearchMenuBitmap(*args, **kwargs)
|
||||
|
||||
def SetCancelBitmap(*args, **kwargs):
|
||||
"""SetCancelBitmap(self, Bitmap ?)"""
|
||||
return _controls_.SearchCtrl_SetCancelBitmap(*args, **kwargs)
|
||||
|
||||
Menu = property(GetMenu,SetMenu)
|
||||
SearchButtonVisible = property(GetSearchButtonVisible,SetSearchButtonVisible)
|
||||
CancelButtonVisible = property(GetCancelButtonVisible,SetCancelButtonVisible)
|
||||
_controls_.SearchCtrl_swigregister(SearchCtrl)
|
||||
SearchCtrlNameStr = cvar.SearchCtrlNameStr
|
||||
|
||||
def PreSearchCtrl(*args, **kwargs):
|
||||
"""
|
||||
PreSearchCtrl() -> SearchCtrl
|
||||
|
||||
Precreate a wx.SearchCtrl for 2-phase creation.
|
||||
"""
|
||||
val = _controls_.new_PreSearchCtrl(*args, **kwargs)
|
||||
return val
|
||||
|
||||
wxEVT_COMMAND_SEARCHCTRL_CANCEL = _controls_.wxEVT_COMMAND_SEARCHCTRL_CANCEL
|
||||
wxEVT_COMMAND_SEARCHCTRL_SEARCH = _controls_.wxEVT_COMMAND_SEARCHCTRL_SEARCH
|
||||
EVT_SEARCHCTRL_CANCEL = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_CANCEL, 1)
|
||||
EVT_SEARCHCTRL_SEARCH = wx.PyEventBinder( wxEVT_COMMAND_SEARCHCTRL_SEARCH, 1)
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -41271,6 +41271,7 @@ SWIGINTERN PyObject *_wrap_Window_FromHWND(PyObject *SWIGUNUSEDPARM(self), PyObj
|
||||
}
|
||||
arg2 = static_cast< unsigned long >(val2);
|
||||
{
|
||||
if (!wxPyCheckForApp()) SWIG_fail;
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxWindow *)wxWindow_FromHWND(arg1,arg2);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
|
||||
@@ -3320,6 +3320,7 @@ public:
|
||||
rval = *ptr;
|
||||
}
|
||||
else if (PySequence_Check(ro) && PyObject_Length(ro) == 2) {
|
||||
PyErr_Clear(); // Clear the exception left over from wxPyConvertSwigPtr
|
||||
PyObject* o1 = PySequence_GetItem(ro, 0);
|
||||
PyObject* o2 = PySequence_GetItem(ro, 1);
|
||||
if (PyNumber_Check(o1) && PyNumber_Check(o2))
|
||||
|
||||
Reference in New Issue
Block a user