return val
def GetTopWindow(self, *_args, **_kwargs):
val = apply(wxc.wxPyApp_GetTopWindow,(self,) + _args, _kwargs)
- if val: val = wxWindowPtr(val)
return val
def GetVendorName(self, *_args, **_kwargs):
val = apply(wxc.wxPyApp_GetVendorName,(self,) + _args, _kwargs)
wxRESIZE_BORDER = wxc.wxRESIZE_BORDER
wxDIALOG_MODAL = wxc.wxDIALOG_MODAL
wxDIALOG_MODELESS = wxc.wxDIALOG_MODELESS
+wxDIALOG_NO_PARENT = wxc.wxDIALOG_NO_PARENT
wxDEFAULT_FRAME_STYLE = wxc.wxDEFAULT_FRAME_STYLE
wxDEFAULT_DIALOG_STYLE = wxc.wxDEFAULT_DIALOG_STYLE
wxFRAME_TOOL_WINDOW = wxc.wxFRAME_TOOL_WINDOW
wxED_STATIC_LINE = wxc.wxED_STATIC_LINE
wxEXT_DIALOG_STYLE = wxc.wxEXT_DIALOG_STYLE
wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN
+wxCLIP_SIBLINGS = wxc.wxCLIP_SIBLINGS
wxRETAINED = wxc.wxRETAINED
wxBACKINGSTORE = wxc.wxBACKINGSTORE
wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
wxTR_MULTIPLE = wxc.wxTR_MULTIPLE
wxTR_SINGLE = wxc.wxTR_SINGLE
wxTR_HAS_VARIABLE_ROW_HEIGHT = wxc.wxTR_HAS_VARIABLE_ROW_HEIGHT
-wxLC_ICON = wxc.wxLC_ICON
-wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON
-wxLC_LIST = wxc.wxLC_LIST
-wxLC_REPORT = wxc.wxLC_REPORT
-wxLC_ALIGN_TOP = wxc.wxLC_ALIGN_TOP
-wxLC_ALIGN_LEFT = wxc.wxLC_ALIGN_LEFT
-wxLC_AUTOARRANGE = wxc.wxLC_AUTOARRANGE
-wxLC_USER_TEXT = wxc.wxLC_USER_TEXT
-wxLC_EDIT_LABELS = wxc.wxLC_EDIT_LABELS
-wxLC_NO_HEADER = wxc.wxLC_NO_HEADER
-wxLC_NO_SORT_HEADER = wxc.wxLC_NO_SORT_HEADER
-wxLC_SINGLE_SEL = wxc.wxLC_SINGLE_SEL
-wxLC_SORT_ASCENDING = wxc.wxLC_SORT_ASCENDING
-wxLC_SORT_DESCENDING = wxc.wxLC_SORT_DESCENDING
-wxLC_MASK_TYPE = wxc.wxLC_MASK_TYPE
-wxLC_MASK_ALIGN = wxc.wxLC_MASK_ALIGN
-wxLC_MASK_SORT = wxc.wxLC_MASK_SORT
-wxLC_HRULES = wxc.wxLC_HRULES
-wxLC_VRULES = wxc.wxLC_VRULES
wxSP_VERTICAL = wxc.wxSP_VERTICAL
wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
wxID_PASTE = wxc.wxID_PASTE
wxID_CLEAR = wxc.wxID_CLEAR
wxID_FIND = wxc.wxID_FIND
+wxID_DUPLICATE = wxc.wxID_DUPLICATE
+wxID_SELECTALL = wxc.wxID_SELECTALL
wxID_FILE1 = wxc.wxID_FILE1
wxID_FILE2 = wxc.wxID_FILE2
wxID_FILE3 = wxc.wxID_FILE3
wxNB_LEFT = wxc.wxNB_LEFT
wxNB_RIGHT = wxc.wxNB_RIGHT
wxNB_BOTTOM = wxc.wxNB_BOTTOM
+wxNB_MULTILINE = wxc.wxNB_MULTILINE
wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL
wxLI_VERTICAL = wxc.wxLI_VERTICAL
wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER
wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3
wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4
wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
+wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
wxDEFAULT = wxc.wxDEFAULT
wxDECORATIVE = wxc.wxDECORATIVE
wxROMAN = wxc.wxROMAN
wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER
wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS
wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS
+wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL
wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN
wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP
wxEVT_MIDDLE_DOWN = wxc.wxEVT_MIDDLE_DOWN
wxEVT_MEASURE_ITEM = wxc.wxEVT_MEASURE_ITEM
wxEVT_COMPARE_ITEM = wxc.wxEVT_COMPARE_ITEM
wxEVT_INIT_DIALOG = wxc.wxEVT_INIT_DIALOG
+wxEVT_HELP = wxc.wxEVT_HELP
+wxEVT_DETAILED_HELP = wxc.wxEVT_DETAILED_HELP
wxEVT_IDLE = wxc.wxEVT_IDLE
wxEVT_UPDATE_UI = wxc.wxEVT_UPDATE_UI
wxEVT_COMMAND_LEFT_CLICK = wxc.wxEVT_COMMAND_LEFT_CLICK
wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY
wxEVT_TIMER = wxc.wxEVT_TIMER
-wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
__version__ = wxc.__version__
cvar = wxc.cvar
wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition)
def EVT_ENTER_WINDOW(win, func):
win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
+def EVT_MOUSEWHEEL(win, func):
+ win.Connect(-1, -1, wxEVT_MOUSEWHEEL, func)
# all mouse events
def EVT_MOUSE_EVENTS(win, func):
def EVT_TREE_BEGIN_RDRAG(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
+def EVT_TREE_END_DRAG(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TREE_END_DRAG, func)
+
def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
# wxJoyStick
def EVT_JOY_DOWN(win, func):
- win.Connect(-1, -1, wxEVT_JOY_DOWN, func)
+ win.Connect(-1, -1, wxEVT_JOY_BUTTON_DOWN, func)
def EVT_JOY_UP(win, func):
- win.Connect(-1, -1, wxEVT_JOY_UP, func)
+ win.Connect(-1, -1, wxEVT_JOY_BUTTON_UP, func)
def EVT_JOY_MOVE(win, func):
win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
def EVT_JOYSTICK_EVENTS(win, func):
- win.Connect(-1, -1, wxEVT_JOY_DOWN, func)
- win.Connect(-1, -1, wxEVT_JOY_UP, func)
+ win.Connect(-1, -1, wxEVT_JOY_BUTTON_DOWN, func)
+ win.Connect(-1, -1, wxEVT_JOY_BUTTON_UP, func)
win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
+
+def EVT_TOGGLEBUTTON(win, id, func):
+ win.Connect(id, -1, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, func)
+
+
#----------------------------------------------------------------------
class wxTimer(wxPyTimer):
self.SetOwner(evtHandler, id)
#----------------------------------------------------------------------
-# Some wxWin methods can take "NULL" as parameters, but the shadow classes
-# expect an object with the SWIG pointer as a 'this' member. This class
-# and instance fools the shadow into passing the NULL pointer.
-## NOTE: This is not needed anymore as None can be passed instead and
-# will be interpreted as NULL.
-
-class _NullObj:
- this = 'NULL' # SWIG converts this to (void*)0
-
-NULL = _NullObj()
+NULL = None # For backwards compatibility only. You should really be
+ # using None now.
#----------------------------------------------------------------------
def wxPyTypeCast(obj, typeStr):
if obj is None:
return None
+ theClass = globals()[typeStr+"Ptr"]
+ typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr)
if hasattr(obj, "this"):
+ if obj.__class__ is theClass: # if already the right type then just return it
+ return obj
newPtr = ptrcast(obj.this, typeStr+"_p")
else:
newPtr = ptrcast(obj, typeStr+"_p")
- theClass = globals()[typeStr+"Ptr"]
theObj = theClass(newPtr)
if hasattr(obj, "this"):
theObj.thisown = obj.thisown
self.cleanup()
__cleanMeUp = __wxPyCleanup()
+
+#----------------------------------------------------------------------------
#----------------------------------------------------------------------------