Deprecated NewId and RegisterId
Added missing Disable method git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -595,12 +595,7 @@ wxPen = wxPyPen
|
|||||||
wxScrollbar = wxScrollBar
|
wxScrollbar = wxScrollBar
|
||||||
wxPoint2D = wxPoint2DDouble
|
wxPoint2D = wxPoint2DDouble
|
||||||
|
|
||||||
# Use Python's bool constants if available, make aliases if not
|
wxPyAssertionError = wxc.wxPyAssertionError
|
||||||
try:
|
|
||||||
True
|
|
||||||
except NameError:
|
|
||||||
True = 1==1
|
|
||||||
False = 1==0
|
|
||||||
|
|
||||||
|
|
||||||
# backwards compatibility
|
# backwards compatibility
|
||||||
@@ -611,15 +606,43 @@ NULL = None
|
|||||||
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
||||||
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
false = FALSE = False
|
|
||||||
true = TRUE = True
|
|
||||||
|
|
||||||
|
|
||||||
# workarounds for bad wxRTTI names
|
# workarounds for bad wxRTTI names
|
||||||
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
|
||||||
|
|
||||||
|
|
||||||
wxPyAssertionError = wxc.wxPyAssertionError
|
|
||||||
|
def NewId():
|
||||||
|
import warnings
|
||||||
|
warnings.warn("Use wxNewId instead", DeprecationWarning, 2)
|
||||||
|
return wxNewId()
|
||||||
|
|
||||||
|
def RegisterId(ID):
|
||||||
|
import warnings
|
||||||
|
warnings.warn("Use wxRegisterId instead", DeprecationWarning, 2)
|
||||||
|
return wxRegisterId(ID)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Use Python's bool constants if available, make aliases if not
|
||||||
|
try:
|
||||||
|
True
|
||||||
|
except NameError:
|
||||||
|
True = 1==1
|
||||||
|
False = 1==0
|
||||||
|
|
||||||
|
class _DeprecatedNonBool:
|
||||||
|
def __init__(self, val, txt):
|
||||||
|
self.__val = val
|
||||||
|
self.__txt = txt
|
||||||
|
def __int__(self):
|
||||||
|
import warnings
|
||||||
|
warnings.warn("Use Python's %s instead" % self.__txt, DeprecationWarning, 3)
|
||||||
|
return self.__val
|
||||||
|
|
||||||
|
TRUE = true = _DeprecatedNonBool(True, 'True')
|
||||||
|
FALSE = false = _DeprecatedNonBool(False, 'False')
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
@@ -511,8 +511,6 @@ public:
|
|||||||
|
|
||||||
long wxNewId();
|
long wxNewId();
|
||||||
void wxRegisterId(long id);
|
void wxRegisterId(long id);
|
||||||
%name(NewId) long wxNewId();
|
|
||||||
%name(RegisterId) void wxRegisterId(long id);
|
|
||||||
long wxGetCurrentId();
|
long wxGetCurrentId();
|
||||||
|
|
||||||
void wxBell();
|
void wxBell();
|
||||||
|
@@ -216,6 +216,7 @@ public:
|
|||||||
void DragAcceptFiles(bool accept);
|
void DragAcceptFiles(bool accept);
|
||||||
#endif
|
#endif
|
||||||
void Enable(bool enable);
|
void Enable(bool enable);
|
||||||
|
void Disable();
|
||||||
|
|
||||||
// Find child window by ID or name
|
// Find child window by ID or name
|
||||||
%name(FindWindowById) wxWindow* FindWindow(long id);
|
%name(FindWindowById) wxWindow* FindWindow(long id);
|
||||||
|
Reference in New Issue
Block a user