X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bb2ef2cc9ed97a347c3a5f45b51127b6faa301aa..ad3a156e18c0d5adae80b79cf382bca28546b4d9:/wxPython/src/mac/_core.py?ds=sidebyside diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index fd353f4ca6..5593db49c5 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -1,18 +1,18 @@ -# This file was created automatically by SWIG. +# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. -import __core - +import _core_ +import new +new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) if (name == "this"): - if isinstance(value, class_type): - self.__dict__[name] = value.this - if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown - del value.thisown + if type(value).__name__ == 'PySwigObject': + self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) - if (not static) or hasattr(self,name) or (name == "thisown"): + if (not static) or hasattr(self,name): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) @@ -21,10 +21,16 @@ def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + import types try: _object = types.ObjectType @@ -37,7 +43,8 @@ del types def _swig_setattr_nondynamic_method(set): def set_attr(self,name,value): - if hasattr(self,name) or (name in ("this", "thisown")): + if (name == "thisown"): return self.this.own(value) + if hasattr(self,name) or (name == "this"): set(self,name,value) else: raise AttributeError("You cannot add attributes to %s" % self) @@ -73,574 +80,624 @@ def _deprecated(callable, msg=None): #---------------------------------------------------------------------------- -wxNOT_FOUND = __core.wxNOT_FOUND -wxVSCROLL = __core.wxVSCROLL -wxHSCROLL = __core.wxHSCROLL -wxCAPTION = __core.wxCAPTION -wxDOUBLE_BORDER = __core.wxDOUBLE_BORDER -wxSUNKEN_BORDER = __core.wxSUNKEN_BORDER -wxRAISED_BORDER = __core.wxRAISED_BORDER -wxBORDER = __core.wxBORDER -wxSIMPLE_BORDER = __core.wxSIMPLE_BORDER -wxSTATIC_BORDER = __core.wxSTATIC_BORDER -wxTRANSPARENT_WINDOW = __core.wxTRANSPARENT_WINDOW -wxNO_BORDER = __core.wxNO_BORDER -wxTAB_TRAVERSAL = __core.wxTAB_TRAVERSAL -wxWANTS_CHARS = __core.wxWANTS_CHARS -wxPOPUP_WINDOW = __core.wxPOPUP_WINDOW -wxCENTER_FRAME = __core.wxCENTER_FRAME -wxCENTRE_ON_SCREEN = __core.wxCENTRE_ON_SCREEN -wxCENTER_ON_SCREEN = __core.wxCENTER_ON_SCREEN -wxCLIP_CHILDREN = __core.wxCLIP_CHILDREN -wxCLIP_SIBLINGS = __core.wxCLIP_SIBLINGS -wxALWAYS_SHOW_SB = __core.wxALWAYS_SHOW_SB -wxRETAINED = __core.wxRETAINED -wxBACKINGSTORE = __core.wxBACKINGSTORE -wxCOLOURED = __core.wxCOLOURED -wxFIXED_LENGTH = __core.wxFIXED_LENGTH -wxLB_NEEDED_SB = __core.wxLB_NEEDED_SB -wxLB_ALWAYS_SB = __core.wxLB_ALWAYS_SB -wxLB_SORT = __core.wxLB_SORT -wxLB_SINGLE = __core.wxLB_SINGLE -wxLB_MULTIPLE = __core.wxLB_MULTIPLE -wxLB_EXTENDED = __core.wxLB_EXTENDED -wxLB_OWNERDRAW = __core.wxLB_OWNERDRAW -wxLB_HSCROLL = __core.wxLB_HSCROLL -wxPROCESS_ENTER = __core.wxPROCESS_ENTER -wxPASSWORD = __core.wxPASSWORD -wxCB_SIMPLE = __core.wxCB_SIMPLE -wxCB_DROPDOWN = __core.wxCB_DROPDOWN -wxCB_SORT = __core.wxCB_SORT -wxCB_READONLY = __core.wxCB_READONLY -wxRA_HORIZONTAL = __core.wxRA_HORIZONTAL -wxRA_VERTICAL = __core.wxRA_VERTICAL -wxRA_SPECIFY_ROWS = __core.wxRA_SPECIFY_ROWS -wxRA_SPECIFY_COLS = __core.wxRA_SPECIFY_COLS -wxRA_USE_CHECKBOX = __core.wxRA_USE_CHECKBOX -wxRB_GROUP = __core.wxRB_GROUP -wxRB_SINGLE = __core.wxRB_SINGLE -wxSB_HORIZONTAL = __core.wxSB_HORIZONTAL -wxSB_VERTICAL = __core.wxSB_VERTICAL -wxRB_USE_CHECKBOX = __core.wxRB_USE_CHECKBOX -wxST_SIZEGRIP = __core.wxST_SIZEGRIP -wxST_NO_AUTORESIZE = __core.wxST_NO_AUTORESIZE -wxFLOOD_SURFACE = __core.wxFLOOD_SURFACE -wxFLOOD_BORDER = __core.wxFLOOD_BORDER -wxODDEVEN_RULE = __core.wxODDEVEN_RULE -wxWINDING_RULE = __core.wxWINDING_RULE -wxTOOL_TOP = __core.wxTOOL_TOP -wxTOOL_BOTTOM = __core.wxTOOL_BOTTOM -wxTOOL_LEFT = __core.wxTOOL_LEFT -wxTOOL_RIGHT = __core.wxTOOL_RIGHT -wxOK = __core.wxOK -wxYES_NO = __core.wxYES_NO -wxCANCEL = __core.wxCANCEL -wxYES = __core.wxYES -wxNO = __core.wxNO -wxNO_DEFAULT = __core.wxNO_DEFAULT -wxYES_DEFAULT = __core.wxYES_DEFAULT -wxICON_EXCLAMATION = __core.wxICON_EXCLAMATION -wxICON_HAND = __core.wxICON_HAND -wxICON_QUESTION = __core.wxICON_QUESTION -wxICON_INFORMATION = __core.wxICON_INFORMATION -wxICON_STOP = __core.wxICON_STOP -wxICON_ASTERISK = __core.wxICON_ASTERISK -wxICON_MASK = __core.wxICON_MASK -wxICON_WARNING = __core.wxICON_WARNING -wxICON_ERROR = __core.wxICON_ERROR -wxFORWARD = __core.wxFORWARD -wxBACKWARD = __core.wxBACKWARD -wxRESET = __core.wxRESET -wxHELP = __core.wxHELP -wxMORE = __core.wxMORE -wxSETUP = __core.wxSETUP -wxSIZE_AUTO_WIDTH = __core.wxSIZE_AUTO_WIDTH -wxSIZE_AUTO_HEIGHT = __core.wxSIZE_AUTO_HEIGHT -wxSIZE_AUTO = __core.wxSIZE_AUTO -wxSIZE_USE_EXISTING = __core.wxSIZE_USE_EXISTING -wxSIZE_ALLOW_MINUS_ONE = __core.wxSIZE_ALLOW_MINUS_ONE -wxPORTRAIT = __core.wxPORTRAIT -wxLANDSCAPE = __core.wxLANDSCAPE -wxPRINT_QUALITY_HIGH = __core.wxPRINT_QUALITY_HIGH -wxPRINT_QUALITY_MEDIUM = __core.wxPRINT_QUALITY_MEDIUM -wxPRINT_QUALITY_LOW = __core.wxPRINT_QUALITY_LOW -wxPRINT_QUALITY_DRAFT = __core.wxPRINT_QUALITY_DRAFT -wxID_ANY = __core.wxID_ANY -wxID_SEPARATOR = __core.wxID_SEPARATOR -wxID_LOWEST = __core.wxID_LOWEST -wxID_OPEN = __core.wxID_OPEN -wxID_CLOSE = __core.wxID_CLOSE -wxID_NEW = __core.wxID_NEW -wxID_SAVE = __core.wxID_SAVE -wxID_SAVEAS = __core.wxID_SAVEAS -wxID_REVERT = __core.wxID_REVERT -wxID_EXIT = __core.wxID_EXIT -wxID_UNDO = __core.wxID_UNDO -wxID_REDO = __core.wxID_REDO -wxID_HELP = __core.wxID_HELP -wxID_PRINT = __core.wxID_PRINT -wxID_PRINT_SETUP = __core.wxID_PRINT_SETUP -wxID_PREVIEW = __core.wxID_PREVIEW -wxID_ABOUT = __core.wxID_ABOUT -wxID_HELP_CONTENTS = __core.wxID_HELP_CONTENTS -wxID_HELP_COMMANDS = __core.wxID_HELP_COMMANDS -wxID_HELP_PROCEDURES = __core.wxID_HELP_PROCEDURES -wxID_HELP_CONTEXT = __core.wxID_HELP_CONTEXT -wxID_CLOSE_ALL = __core.wxID_CLOSE_ALL -wxID_PREFERENCES = __core.wxID_PREFERENCES -wxID_CUT = __core.wxID_CUT -wxID_COPY = __core.wxID_COPY -wxID_PASTE = __core.wxID_PASTE -wxID_CLEAR = __core.wxID_CLEAR -wxID_FIND = __core.wxID_FIND -wxID_DUPLICATE = __core.wxID_DUPLICATE -wxID_SELECTALL = __core.wxID_SELECTALL -wxID_DELETE = __core.wxID_DELETE -wxID_REPLACE = __core.wxID_REPLACE -wxID_REPLACE_ALL = __core.wxID_REPLACE_ALL -wxID_PROPERTIES = __core.wxID_PROPERTIES -wxID_VIEW_DETAILS = __core.wxID_VIEW_DETAILS -wxID_VIEW_LARGEICONS = __core.wxID_VIEW_LARGEICONS -wxID_VIEW_SMALLICONS = __core.wxID_VIEW_SMALLICONS -wxID_VIEW_LIST = __core.wxID_VIEW_LIST -wxID_VIEW_SORTDATE = __core.wxID_VIEW_SORTDATE -wxID_VIEW_SORTNAME = __core.wxID_VIEW_SORTNAME -wxID_VIEW_SORTSIZE = __core.wxID_VIEW_SORTSIZE -wxID_VIEW_SORTTYPE = __core.wxID_VIEW_SORTTYPE -wxID_FILE1 = __core.wxID_FILE1 -wxID_FILE2 = __core.wxID_FILE2 -wxID_FILE3 = __core.wxID_FILE3 -wxID_FILE4 = __core.wxID_FILE4 -wxID_FILE5 = __core.wxID_FILE5 -wxID_FILE6 = __core.wxID_FILE6 -wxID_FILE7 = __core.wxID_FILE7 -wxID_FILE8 = __core.wxID_FILE8 -wxID_FILE9 = __core.wxID_FILE9 -wxID_OK = __core.wxID_OK -wxID_CANCEL = __core.wxID_CANCEL -wxID_APPLY = __core.wxID_APPLY -wxID_YES = __core.wxID_YES -wxID_NO = __core.wxID_NO -wxID_STATIC = __core.wxID_STATIC -wxID_FORWARD = __core.wxID_FORWARD -wxID_BACKWARD = __core.wxID_BACKWARD -wxID_DEFAULT = __core.wxID_DEFAULT -wxID_MORE = __core.wxID_MORE -wxID_SETUP = __core.wxID_SETUP -wxID_RESET = __core.wxID_RESET -wxID_CONTEXT_HELP = __core.wxID_CONTEXT_HELP -wxID_YESTOALL = __core.wxID_YESTOALL -wxID_NOTOALL = __core.wxID_NOTOALL -wxID_ABORT = __core.wxID_ABORT -wxID_RETRY = __core.wxID_RETRY -wxID_IGNORE = __core.wxID_IGNORE -wxID_ADD = __core.wxID_ADD -wxID_REMOVE = __core.wxID_REMOVE -wxID_UP = __core.wxID_UP -wxID_DOWN = __core.wxID_DOWN -wxID_HOME = __core.wxID_HOME -wxID_REFRESH = __core.wxID_REFRESH -wxID_STOP = __core.wxID_STOP -wxID_INDEX = __core.wxID_INDEX -wxID_BOLD = __core.wxID_BOLD -wxID_ITALIC = __core.wxID_ITALIC -wxID_JUSTIFY_CENTER = __core.wxID_JUSTIFY_CENTER -wxID_JUSTIFY_FILL = __core.wxID_JUSTIFY_FILL -wxID_JUSTIFY_RIGHT = __core.wxID_JUSTIFY_RIGHT -wxID_JUSTIFY_LEFT = __core.wxID_JUSTIFY_LEFT -wxID_UNDERLINE = __core.wxID_UNDERLINE -wxID_INDENT = __core.wxID_INDENT -wxID_UNINDENT = __core.wxID_UNINDENT -wxID_ZOOM_100 = __core.wxID_ZOOM_100 -wxID_ZOOM_FIT = __core.wxID_ZOOM_FIT -wxID_ZOOM_IN = __core.wxID_ZOOM_IN -wxID_ZOOM_OUT = __core.wxID_ZOOM_OUT -wxID_UNDELETE = __core.wxID_UNDELETE -wxID_REVERT_TO_SAVED = __core.wxID_REVERT_TO_SAVED -wxID_HIGHEST = __core.wxID_HIGHEST -wxOPEN = __core.wxOPEN -wxSAVE = __core.wxSAVE -wxHIDE_READONLY = __core.wxHIDE_READONLY -wxOVERWRITE_PROMPT = __core.wxOVERWRITE_PROMPT -wxFILE_MUST_EXIST = __core.wxFILE_MUST_EXIST -wxMULTIPLE = __core.wxMULTIPLE -wxCHANGE_DIR = __core.wxCHANGE_DIR -wxACCEL_ALT = __core.wxACCEL_ALT -wxACCEL_CTRL = __core.wxACCEL_CTRL -wxACCEL_SHIFT = __core.wxACCEL_SHIFT -wxACCEL_NORMAL = __core.wxACCEL_NORMAL -wxPD_AUTO_HIDE = __core.wxPD_AUTO_HIDE -wxPD_APP_MODAL = __core.wxPD_APP_MODAL -wxPD_CAN_ABORT = __core.wxPD_CAN_ABORT -wxPD_ELAPSED_TIME = __core.wxPD_ELAPSED_TIME -wxPD_ESTIMATED_TIME = __core.wxPD_ESTIMATED_TIME -wxPD_REMAINING_TIME = __core.wxPD_REMAINING_TIME -wxPD_SMOOTH = __core.wxPD_SMOOTH -wxPD_CAN_SKIP = __core.wxPD_CAN_SKIP -wxDD_NEW_DIR_BUTTON = __core.wxDD_NEW_DIR_BUTTON -wxDD_DEFAULT_STYLE = __core.wxDD_DEFAULT_STYLE -wxMENU_TEAROFF = __core.wxMENU_TEAROFF -wxMB_DOCKABLE = __core.wxMB_DOCKABLE -wxNO_FULL_REPAINT_ON_RESIZE = __core.wxNO_FULL_REPAINT_ON_RESIZE -wxFULL_REPAINT_ON_RESIZE = __core.wxFULL_REPAINT_ON_RESIZE -wxLI_HORIZONTAL = __core.wxLI_HORIZONTAL -wxLI_VERTICAL = __core.wxLI_VERTICAL -wxWS_EX_VALIDATE_RECURSIVELY = __core.wxWS_EX_VALIDATE_RECURSIVELY -wxWS_EX_BLOCK_EVENTS = __core.wxWS_EX_BLOCK_EVENTS -wxWS_EX_TRANSIENT = __core.wxWS_EX_TRANSIENT -wxWS_EX_THEMED_BACKGROUND = __core.wxWS_EX_THEMED_BACKGROUND -wxWS_EX_PROCESS_IDLE = __core.wxWS_EX_PROCESS_IDLE -wxWS_EX_PROCESS_UI_UPDATES = __core.wxWS_EX_PROCESS_UI_UPDATES -wxMM_TEXT = __core.wxMM_TEXT -wxMM_LOMETRIC = __core.wxMM_LOMETRIC -wxMM_HIMETRIC = __core.wxMM_HIMETRIC -wxMM_LOENGLISH = __core.wxMM_LOENGLISH -wxMM_HIENGLISH = __core.wxMM_HIENGLISH -wxMM_TWIPS = __core.wxMM_TWIPS -wxMM_ISOTROPIC = __core.wxMM_ISOTROPIC -wxMM_ANISOTROPIC = __core.wxMM_ANISOTROPIC -wxMM_POINTS = __core.wxMM_POINTS -wxMM_METRIC = __core.wxMM_METRIC -wxCENTRE = __core.wxCENTRE -wxCENTER = __core.wxCENTER -wxHORIZONTAL = __core.wxHORIZONTAL -wxVERTICAL = __core.wxVERTICAL -wxBOTH = __core.wxBOTH -wxLEFT = __core.wxLEFT -wxRIGHT = __core.wxRIGHT -wxUP = __core.wxUP -wxDOWN = __core.wxDOWN -wxTOP = __core.wxTOP -wxBOTTOM = __core.wxBOTTOM -wxNORTH = __core.wxNORTH -wxSOUTH = __core.wxSOUTH -wxWEST = __core.wxWEST -wxEAST = __core.wxEAST -wxALL = __core.wxALL -wxALIGN_NOT = __core.wxALIGN_NOT -wxALIGN_CENTER_HORIZONTAL = __core.wxALIGN_CENTER_HORIZONTAL -wxALIGN_CENTRE_HORIZONTAL = __core.wxALIGN_CENTRE_HORIZONTAL -wxALIGN_LEFT = __core.wxALIGN_LEFT -wxALIGN_TOP = __core.wxALIGN_TOP -wxALIGN_RIGHT = __core.wxALIGN_RIGHT -wxALIGN_BOTTOM = __core.wxALIGN_BOTTOM -wxALIGN_CENTER_VERTICAL = __core.wxALIGN_CENTER_VERTICAL -wxALIGN_CENTRE_VERTICAL = __core.wxALIGN_CENTRE_VERTICAL -wxALIGN_CENTER = __core.wxALIGN_CENTER -wxALIGN_CENTRE = __core.wxALIGN_CENTRE -wxALIGN_MASK = __core.wxALIGN_MASK -wxSTRETCH_NOT = __core.wxSTRETCH_NOT -wxSHRINK = __core.wxSHRINK -wxGROW = __core.wxGROW -wxEXPAND = __core.wxEXPAND -wxSHAPED = __core.wxSHAPED -wxFIXED_MINSIZE = __core.wxFIXED_MINSIZE -wxTILE = __core.wxTILE -wxADJUST_MINSIZE = __core.wxADJUST_MINSIZE -wxBORDER_DEFAULT = __core.wxBORDER_DEFAULT -wxBORDER_NONE = __core.wxBORDER_NONE -wxBORDER_STATIC = __core.wxBORDER_STATIC -wxBORDER_SIMPLE = __core.wxBORDER_SIMPLE -wxBORDER_RAISED = __core.wxBORDER_RAISED -wxBORDER_SUNKEN = __core.wxBORDER_SUNKEN -wxBORDER_DOUBLE = __core.wxBORDER_DOUBLE -wxBORDER_MASK = __core.wxBORDER_MASK -wxBG_STYLE_SYSTEM = __core.wxBG_STYLE_SYSTEM -wxBG_STYLE_COLOUR = __core.wxBG_STYLE_COLOUR -wxBG_STYLE_CUSTOM = __core.wxBG_STYLE_CUSTOM -wxDEFAULT = __core.wxDEFAULT -wxDECORATIVE = __core.wxDECORATIVE -wxROMAN = __core.wxROMAN -wxSCRIPT = __core.wxSCRIPT -wxSWISS = __core.wxSWISS -wxMODERN = __core.wxMODERN -wxTELETYPE = __core.wxTELETYPE -wxVARIABLE = __core.wxVARIABLE -wxFIXED = __core.wxFIXED -wxNORMAL = __core.wxNORMAL -wxLIGHT = __core.wxLIGHT -wxBOLD = __core.wxBOLD -wxITALIC = __core.wxITALIC -wxSLANT = __core.wxSLANT -wxSOLID = __core.wxSOLID -wxDOT = __core.wxDOT -wxLONG_DASH = __core.wxLONG_DASH -wxSHORT_DASH = __core.wxSHORT_DASH -wxDOT_DASH = __core.wxDOT_DASH -wxUSER_DASH = __core.wxUSER_DASH -wxTRANSPARENT = __core.wxTRANSPARENT -wxSTIPPLE = __core.wxSTIPPLE -wxBDIAGONAL_HATCH = __core.wxBDIAGONAL_HATCH -wxCROSSDIAG_HATCH = __core.wxCROSSDIAG_HATCH -wxFDIAGONAL_HATCH = __core.wxFDIAGONAL_HATCH -wxCROSS_HATCH = __core.wxCROSS_HATCH -wxHORIZONTAL_HATCH = __core.wxHORIZONTAL_HATCH -wxVERTICAL_HATCH = __core.wxVERTICAL_HATCH -wxJOIN_BEVEL = __core.wxJOIN_BEVEL -wxJOIN_MITER = __core.wxJOIN_MITER -wxJOIN_ROUND = __core.wxJOIN_ROUND -wxCAP_ROUND = __core.wxCAP_ROUND -wxCAP_PROJECTING = __core.wxCAP_PROJECTING -wxCAP_BUTT = __core.wxCAP_BUTT -wxCLEAR = __core.wxCLEAR -wxXOR = __core.wxXOR -wxINVERT = __core.wxINVERT -wxOR_REVERSE = __core.wxOR_REVERSE -wxAND_REVERSE = __core.wxAND_REVERSE -wxCOPY = __core.wxCOPY -wxAND = __core.wxAND -wxAND_INVERT = __core.wxAND_INVERT -wxNO_OP = __core.wxNO_OP -wxNOR = __core.wxNOR -wxEQUIV = __core.wxEQUIV -wxSRC_INVERT = __core.wxSRC_INVERT -wxOR_INVERT = __core.wxOR_INVERT -wxNAND = __core.wxNAND -wxOR = __core.wxOR -wxSET = __core.wxSET -WXK_BACK = __core.WXK_BACK -WXK_TAB = __core.WXK_TAB -WXK_RETURN = __core.WXK_RETURN -WXK_ESCAPE = __core.WXK_ESCAPE -WXK_SPACE = __core.WXK_SPACE -WXK_DELETE = __core.WXK_DELETE -WXK_START = __core.WXK_START -WXK_LBUTTON = __core.WXK_LBUTTON -WXK_RBUTTON = __core.WXK_RBUTTON -WXK_CANCEL = __core.WXK_CANCEL -WXK_MBUTTON = __core.WXK_MBUTTON -WXK_CLEAR = __core.WXK_CLEAR -WXK_SHIFT = __core.WXK_SHIFT -WXK_ALT = __core.WXK_ALT -WXK_CONTROL = __core.WXK_CONTROL -WXK_MENU = __core.WXK_MENU -WXK_PAUSE = __core.WXK_PAUSE -WXK_CAPITAL = __core.WXK_CAPITAL -WXK_PRIOR = __core.WXK_PRIOR -WXK_NEXT = __core.WXK_NEXT -WXK_END = __core.WXK_END -WXK_HOME = __core.WXK_HOME -WXK_LEFT = __core.WXK_LEFT -WXK_UP = __core.WXK_UP -WXK_RIGHT = __core.WXK_RIGHT -WXK_DOWN = __core.WXK_DOWN -WXK_SELECT = __core.WXK_SELECT -WXK_PRINT = __core.WXK_PRINT -WXK_EXECUTE = __core.WXK_EXECUTE -WXK_SNAPSHOT = __core.WXK_SNAPSHOT -WXK_INSERT = __core.WXK_INSERT -WXK_HELP = __core.WXK_HELP -WXK_NUMPAD0 = __core.WXK_NUMPAD0 -WXK_NUMPAD1 = __core.WXK_NUMPAD1 -WXK_NUMPAD2 = __core.WXK_NUMPAD2 -WXK_NUMPAD3 = __core.WXK_NUMPAD3 -WXK_NUMPAD4 = __core.WXK_NUMPAD4 -WXK_NUMPAD5 = __core.WXK_NUMPAD5 -WXK_NUMPAD6 = __core.WXK_NUMPAD6 -WXK_NUMPAD7 = __core.WXK_NUMPAD7 -WXK_NUMPAD8 = __core.WXK_NUMPAD8 -WXK_NUMPAD9 = __core.WXK_NUMPAD9 -WXK_MULTIPLY = __core.WXK_MULTIPLY -WXK_ADD = __core.WXK_ADD -WXK_SEPARATOR = __core.WXK_SEPARATOR -WXK_SUBTRACT = __core.WXK_SUBTRACT -WXK_DECIMAL = __core.WXK_DECIMAL -WXK_DIVIDE = __core.WXK_DIVIDE -WXK_F1 = __core.WXK_F1 -WXK_F2 = __core.WXK_F2 -WXK_F3 = __core.WXK_F3 -WXK_F4 = __core.WXK_F4 -WXK_F5 = __core.WXK_F5 -WXK_F6 = __core.WXK_F6 -WXK_F7 = __core.WXK_F7 -WXK_F8 = __core.WXK_F8 -WXK_F9 = __core.WXK_F9 -WXK_F10 = __core.WXK_F10 -WXK_F11 = __core.WXK_F11 -WXK_F12 = __core.WXK_F12 -WXK_F13 = __core.WXK_F13 -WXK_F14 = __core.WXK_F14 -WXK_F15 = __core.WXK_F15 -WXK_F16 = __core.WXK_F16 -WXK_F17 = __core.WXK_F17 -WXK_F18 = __core.WXK_F18 -WXK_F19 = __core.WXK_F19 -WXK_F20 = __core.WXK_F20 -WXK_F21 = __core.WXK_F21 -WXK_F22 = __core.WXK_F22 -WXK_F23 = __core.WXK_F23 -WXK_F24 = __core.WXK_F24 -WXK_NUMLOCK = __core.WXK_NUMLOCK -WXK_SCROLL = __core.WXK_SCROLL -WXK_PAGEUP = __core.WXK_PAGEUP -WXK_PAGEDOWN = __core.WXK_PAGEDOWN -WXK_NUMPAD_SPACE = __core.WXK_NUMPAD_SPACE -WXK_NUMPAD_TAB = __core.WXK_NUMPAD_TAB -WXK_NUMPAD_ENTER = __core.WXK_NUMPAD_ENTER -WXK_NUMPAD_F1 = __core.WXK_NUMPAD_F1 -WXK_NUMPAD_F2 = __core.WXK_NUMPAD_F2 -WXK_NUMPAD_F3 = __core.WXK_NUMPAD_F3 -WXK_NUMPAD_F4 = __core.WXK_NUMPAD_F4 -WXK_NUMPAD_HOME = __core.WXK_NUMPAD_HOME -WXK_NUMPAD_LEFT = __core.WXK_NUMPAD_LEFT -WXK_NUMPAD_UP = __core.WXK_NUMPAD_UP -WXK_NUMPAD_RIGHT = __core.WXK_NUMPAD_RIGHT -WXK_NUMPAD_DOWN = __core.WXK_NUMPAD_DOWN -WXK_NUMPAD_PRIOR = __core.WXK_NUMPAD_PRIOR -WXK_NUMPAD_PAGEUP = __core.WXK_NUMPAD_PAGEUP -WXK_NUMPAD_NEXT = __core.WXK_NUMPAD_NEXT -WXK_NUMPAD_PAGEDOWN = __core.WXK_NUMPAD_PAGEDOWN -WXK_NUMPAD_END = __core.WXK_NUMPAD_END -WXK_NUMPAD_BEGIN = __core.WXK_NUMPAD_BEGIN -WXK_NUMPAD_INSERT = __core.WXK_NUMPAD_INSERT -WXK_NUMPAD_DELETE = __core.WXK_NUMPAD_DELETE -WXK_NUMPAD_EQUAL = __core.WXK_NUMPAD_EQUAL -WXK_NUMPAD_MULTIPLY = __core.WXK_NUMPAD_MULTIPLY -WXK_NUMPAD_ADD = __core.WXK_NUMPAD_ADD -WXK_NUMPAD_SEPARATOR = __core.WXK_NUMPAD_SEPARATOR -WXK_NUMPAD_SUBTRACT = __core.WXK_NUMPAD_SUBTRACT -WXK_NUMPAD_DECIMAL = __core.WXK_NUMPAD_DECIMAL -WXK_NUMPAD_DIVIDE = __core.WXK_NUMPAD_DIVIDE -WXK_WINDOWS_LEFT = __core.WXK_WINDOWS_LEFT -WXK_WINDOWS_RIGHT = __core.WXK_WINDOWS_RIGHT -WXK_WINDOWS_MENU = __core.WXK_WINDOWS_MENU -WXK_COMMAND = __core.WXK_COMMAND -WXK_SPECIAL1 = __core.WXK_SPECIAL1 -WXK_SPECIAL2 = __core.WXK_SPECIAL2 -WXK_SPECIAL3 = __core.WXK_SPECIAL3 -WXK_SPECIAL4 = __core.WXK_SPECIAL4 -WXK_SPECIAL5 = __core.WXK_SPECIAL5 -WXK_SPECIAL6 = __core.WXK_SPECIAL6 -WXK_SPECIAL7 = __core.WXK_SPECIAL7 -WXK_SPECIAL8 = __core.WXK_SPECIAL8 -WXK_SPECIAL9 = __core.WXK_SPECIAL9 -WXK_SPECIAL10 = __core.WXK_SPECIAL10 -WXK_SPECIAL11 = __core.WXK_SPECIAL11 -WXK_SPECIAL12 = __core.WXK_SPECIAL12 -WXK_SPECIAL13 = __core.WXK_SPECIAL13 -WXK_SPECIAL14 = __core.WXK_SPECIAL14 -WXK_SPECIAL15 = __core.WXK_SPECIAL15 -WXK_SPECIAL16 = __core.WXK_SPECIAL16 -WXK_SPECIAL17 = __core.WXK_SPECIAL17 -WXK_SPECIAL18 = __core.WXK_SPECIAL18 -WXK_SPECIAL19 = __core.WXK_SPECIAL19 -WXK_SPECIAL20 = __core.WXK_SPECIAL20 -wxPAPER_NONE = __core.wxPAPER_NONE -wxPAPER_LETTER = __core.wxPAPER_LETTER -wxPAPER_LEGAL = __core.wxPAPER_LEGAL -wxPAPER_A4 = __core.wxPAPER_A4 -wxPAPER_CSHEET = __core.wxPAPER_CSHEET -wxPAPER_DSHEET = __core.wxPAPER_DSHEET -wxPAPER_ESHEET = __core.wxPAPER_ESHEET -wxPAPER_LETTERSMALL = __core.wxPAPER_LETTERSMALL -wxPAPER_TABLOID = __core.wxPAPER_TABLOID -wxPAPER_LEDGER = __core.wxPAPER_LEDGER -wxPAPER_STATEMENT = __core.wxPAPER_STATEMENT -wxPAPER_EXECUTIVE = __core.wxPAPER_EXECUTIVE -wxPAPER_A3 = __core.wxPAPER_A3 -wxPAPER_A4SMALL = __core.wxPAPER_A4SMALL -wxPAPER_A5 = __core.wxPAPER_A5 -wxPAPER_B4 = __core.wxPAPER_B4 -wxPAPER_B5 = __core.wxPAPER_B5 -wxPAPER_FOLIO = __core.wxPAPER_FOLIO -wxPAPER_QUARTO = __core.wxPAPER_QUARTO -wxPAPER_10X14 = __core.wxPAPER_10X14 -wxPAPER_11X17 = __core.wxPAPER_11X17 -wxPAPER_NOTE = __core.wxPAPER_NOTE -wxPAPER_ENV_9 = __core.wxPAPER_ENV_9 -wxPAPER_ENV_10 = __core.wxPAPER_ENV_10 -wxPAPER_ENV_11 = __core.wxPAPER_ENV_11 -wxPAPER_ENV_12 = __core.wxPAPER_ENV_12 -wxPAPER_ENV_14 = __core.wxPAPER_ENV_14 -wxPAPER_ENV_DL = __core.wxPAPER_ENV_DL -wxPAPER_ENV_C5 = __core.wxPAPER_ENV_C5 -wxPAPER_ENV_C3 = __core.wxPAPER_ENV_C3 -wxPAPER_ENV_C4 = __core.wxPAPER_ENV_C4 -wxPAPER_ENV_C6 = __core.wxPAPER_ENV_C6 -wxPAPER_ENV_C65 = __core.wxPAPER_ENV_C65 -wxPAPER_ENV_B4 = __core.wxPAPER_ENV_B4 -wxPAPER_ENV_B5 = __core.wxPAPER_ENV_B5 -wxPAPER_ENV_B6 = __core.wxPAPER_ENV_B6 -wxPAPER_ENV_ITALY = __core.wxPAPER_ENV_ITALY -wxPAPER_ENV_MONARCH = __core.wxPAPER_ENV_MONARCH -wxPAPER_ENV_PERSONAL = __core.wxPAPER_ENV_PERSONAL -wxPAPER_FANFOLD_US = __core.wxPAPER_FANFOLD_US -wxPAPER_FANFOLD_STD_GERMAN = __core.wxPAPER_FANFOLD_STD_GERMAN -wxPAPER_FANFOLD_LGL_GERMAN = __core.wxPAPER_FANFOLD_LGL_GERMAN -wxPAPER_ISO_B4 = __core.wxPAPER_ISO_B4 -wxPAPER_JAPANESE_POSTCARD = __core.wxPAPER_JAPANESE_POSTCARD -wxPAPER_9X11 = __core.wxPAPER_9X11 -wxPAPER_10X11 = __core.wxPAPER_10X11 -wxPAPER_15X11 = __core.wxPAPER_15X11 -wxPAPER_ENV_INVITE = __core.wxPAPER_ENV_INVITE -wxPAPER_LETTER_EXTRA = __core.wxPAPER_LETTER_EXTRA -wxPAPER_LEGAL_EXTRA = __core.wxPAPER_LEGAL_EXTRA -wxPAPER_TABLOID_EXTRA = __core.wxPAPER_TABLOID_EXTRA -wxPAPER_A4_EXTRA = __core.wxPAPER_A4_EXTRA -wxPAPER_LETTER_TRANSVERSE = __core.wxPAPER_LETTER_TRANSVERSE -wxPAPER_A4_TRANSVERSE = __core.wxPAPER_A4_TRANSVERSE -wxPAPER_LETTER_EXTRA_TRANSVERSE = __core.wxPAPER_LETTER_EXTRA_TRANSVERSE -wxPAPER_A_PLUS = __core.wxPAPER_A_PLUS -wxPAPER_B_PLUS = __core.wxPAPER_B_PLUS -wxPAPER_LETTER_PLUS = __core.wxPAPER_LETTER_PLUS -wxPAPER_A4_PLUS = __core.wxPAPER_A4_PLUS -wxPAPER_A5_TRANSVERSE = __core.wxPAPER_A5_TRANSVERSE -wxPAPER_B5_TRANSVERSE = __core.wxPAPER_B5_TRANSVERSE -wxPAPER_A3_EXTRA = __core.wxPAPER_A3_EXTRA -wxPAPER_A5_EXTRA = __core.wxPAPER_A5_EXTRA -wxPAPER_B5_EXTRA = __core.wxPAPER_B5_EXTRA -wxPAPER_A2 = __core.wxPAPER_A2 -wxPAPER_A3_TRANSVERSE = __core.wxPAPER_A3_TRANSVERSE -wxPAPER_A3_EXTRA_TRANSVERSE = __core.wxPAPER_A3_EXTRA_TRANSVERSE -wxDUPLEX_SIMPLEX = __core.wxDUPLEX_SIMPLEX -wxDUPLEX_HORIZONTAL = __core.wxDUPLEX_HORIZONTAL -wxDUPLEX_VERTICAL = __core.wxDUPLEX_VERTICAL -wxITEM_SEPARATOR = __core.wxITEM_SEPARATOR -wxITEM_NORMAL = __core.wxITEM_NORMAL -wxITEM_CHECK = __core.wxITEM_CHECK -wxITEM_RADIO = __core.wxITEM_RADIO -wxITEM_MAX = __core.wxITEM_MAX -wxHT_NOWHERE = __core.wxHT_NOWHERE -wxHT_SCROLLBAR_FIRST = __core.wxHT_SCROLLBAR_FIRST -wxHT_SCROLLBAR_ARROW_LINE_1 = __core.wxHT_SCROLLBAR_ARROW_LINE_1 -wxHT_SCROLLBAR_ARROW_LINE_2 = __core.wxHT_SCROLLBAR_ARROW_LINE_2 -wxHT_SCROLLBAR_ARROW_PAGE_1 = __core.wxHT_SCROLLBAR_ARROW_PAGE_1 -wxHT_SCROLLBAR_ARROW_PAGE_2 = __core.wxHT_SCROLLBAR_ARROW_PAGE_2 -wxHT_SCROLLBAR_THUMB = __core.wxHT_SCROLLBAR_THUMB -wxHT_SCROLLBAR_BAR_1 = __core.wxHT_SCROLLBAR_BAR_1 -wxHT_SCROLLBAR_BAR_2 = __core.wxHT_SCROLLBAR_BAR_2 -wxHT_SCROLLBAR_LAST = __core.wxHT_SCROLLBAR_LAST -wxHT_WINDOW_OUTSIDE = __core.wxHT_WINDOW_OUTSIDE -wxHT_WINDOW_INSIDE = __core.wxHT_WINDOW_INSIDE -wxHT_WINDOW_VERT_SCROLLBAR = __core.wxHT_WINDOW_VERT_SCROLLBAR -wxHT_WINDOW_HORZ_SCROLLBAR = __core.wxHT_WINDOW_HORZ_SCROLLBAR -wxHT_WINDOW_CORNER = __core.wxHT_WINDOW_CORNER -wxHT_MAX = __core.wxHT_MAX -wxMOD_NONE = __core.wxMOD_NONE -wxMOD_ALT = __core.wxMOD_ALT -wxMOD_CONTROL = __core.wxMOD_CONTROL -wxMOD_SHIFT = __core.wxMOD_SHIFT -wxMOD_WIN = __core.wxMOD_WIN -wxUPDATE_UI_NONE = __core.wxUPDATE_UI_NONE -wxUPDATE_UI_RECURSE = __core.wxUPDATE_UI_RECURSE -wxUPDATE_UI_FROMIDLE = __core.wxUPDATE_UI_FROMIDLE +NOT_FOUND = _core_.NOT_FOUND +VSCROLL = _core_.VSCROLL +HSCROLL = _core_.HSCROLL +CAPTION = _core_.CAPTION +DOUBLE_BORDER = _core_.DOUBLE_BORDER +SUNKEN_BORDER = _core_.SUNKEN_BORDER +RAISED_BORDER = _core_.RAISED_BORDER +BORDER = _core_.BORDER +SIMPLE_BORDER = _core_.SIMPLE_BORDER +STATIC_BORDER = _core_.STATIC_BORDER +TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW +NO_BORDER = _core_.NO_BORDER +DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER +DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE +TAB_TRAVERSAL = _core_.TAB_TRAVERSAL +WANTS_CHARS = _core_.WANTS_CHARS +POPUP_WINDOW = _core_.POPUP_WINDOW +CENTER_FRAME = _core_.CENTER_FRAME +CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN +CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN +CLIP_CHILDREN = _core_.CLIP_CHILDREN +CLIP_SIBLINGS = _core_.CLIP_SIBLINGS +WINDOW_STYLE_MASK = _core_.WINDOW_STYLE_MASK +ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB +RETAINED = _core_.RETAINED +BACKINGSTORE = _core_.BACKINGSTORE +COLOURED = _core_.COLOURED +FIXED_LENGTH = _core_.FIXED_LENGTH +LB_NEEDED_SB = _core_.LB_NEEDED_SB +LB_ALWAYS_SB = _core_.LB_ALWAYS_SB +LB_SORT = _core_.LB_SORT +LB_SINGLE = _core_.LB_SINGLE +LB_MULTIPLE = _core_.LB_MULTIPLE +LB_EXTENDED = _core_.LB_EXTENDED +LB_OWNERDRAW = _core_.LB_OWNERDRAW +LB_HSCROLL = _core_.LB_HSCROLL +PROCESS_ENTER = _core_.PROCESS_ENTER +PASSWORD = _core_.PASSWORD +CB_SIMPLE = _core_.CB_SIMPLE +CB_DROPDOWN = _core_.CB_DROPDOWN +CB_SORT = _core_.CB_SORT +CB_READONLY = _core_.CB_READONLY +RA_HORIZONTAL = _core_.RA_HORIZONTAL +RA_VERTICAL = _core_.RA_VERTICAL +RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS +RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS +RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX +RB_GROUP = _core_.RB_GROUP +RB_SINGLE = _core_.RB_SINGLE +SB_HORIZONTAL = _core_.SB_HORIZONTAL +SB_VERTICAL = _core_.SB_VERTICAL +RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX +ST_SIZEGRIP = _core_.ST_SIZEGRIP +ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE +ST_DOTS_MIDDLE = _core_.ST_DOTS_MIDDLE +ST_DOTS_END = _core_.ST_DOTS_END +FLOOD_SURFACE = _core_.FLOOD_SURFACE +FLOOD_BORDER = _core_.FLOOD_BORDER +ODDEVEN_RULE = _core_.ODDEVEN_RULE +WINDING_RULE = _core_.WINDING_RULE +TOOL_TOP = _core_.TOOL_TOP +TOOL_BOTTOM = _core_.TOOL_BOTTOM +TOOL_LEFT = _core_.TOOL_LEFT +TOOL_RIGHT = _core_.TOOL_RIGHT +OK = _core_.OK +YES_NO = _core_.YES_NO +CANCEL = _core_.CANCEL +YES = _core_.YES +NO = _core_.NO +NO_DEFAULT = _core_.NO_DEFAULT +YES_DEFAULT = _core_.YES_DEFAULT +ICON_EXCLAMATION = _core_.ICON_EXCLAMATION +ICON_HAND = _core_.ICON_HAND +ICON_QUESTION = _core_.ICON_QUESTION +ICON_INFORMATION = _core_.ICON_INFORMATION +ICON_STOP = _core_.ICON_STOP +ICON_ASTERISK = _core_.ICON_ASTERISK +ICON_MASK = _core_.ICON_MASK +ICON_WARNING = _core_.ICON_WARNING +ICON_ERROR = _core_.ICON_ERROR +FORWARD = _core_.FORWARD +BACKWARD = _core_.BACKWARD +RESET = _core_.RESET +HELP = _core_.HELP +MORE = _core_.MORE +SETUP = _core_.SETUP +SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH +SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT +SIZE_AUTO = _core_.SIZE_AUTO +SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING +SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE +SIZE_FORCE = _core_.SIZE_FORCE +PORTRAIT = _core_.PORTRAIT +LANDSCAPE = _core_.LANDSCAPE +PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH +PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM +PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW +PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT +ID_ANY = _core_.ID_ANY +ID_SEPARATOR = _core_.ID_SEPARATOR +ID_NONE = _core_.ID_NONE +ID_LOWEST = _core_.ID_LOWEST +ID_OPEN = _core_.ID_OPEN +ID_CLOSE = _core_.ID_CLOSE +ID_NEW = _core_.ID_NEW +ID_SAVE = _core_.ID_SAVE +ID_SAVEAS = _core_.ID_SAVEAS +ID_REVERT = _core_.ID_REVERT +ID_EXIT = _core_.ID_EXIT +ID_UNDO = _core_.ID_UNDO +ID_REDO = _core_.ID_REDO +ID_HELP = _core_.ID_HELP +ID_PRINT = _core_.ID_PRINT +ID_PRINT_SETUP = _core_.ID_PRINT_SETUP +ID_PAGE_SETUP = _core_.ID_PAGE_SETUP +ID_PREVIEW = _core_.ID_PREVIEW +ID_ABOUT = _core_.ID_ABOUT +ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS +ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS +ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES +ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT +ID_HELP_INDEX = _core_.ID_HELP_INDEX +ID_HELP_SEARCH = _core_.ID_HELP_SEARCH +ID_CLOSE_ALL = _core_.ID_CLOSE_ALL +ID_PREFERENCES = _core_.ID_PREFERENCES +ID_EDIT = _core_.ID_EDIT +ID_CUT = _core_.ID_CUT +ID_COPY = _core_.ID_COPY +ID_PASTE = _core_.ID_PASTE +ID_CLEAR = _core_.ID_CLEAR +ID_FIND = _core_.ID_FIND +ID_DUPLICATE = _core_.ID_DUPLICATE +ID_SELECTALL = _core_.ID_SELECTALL +ID_DELETE = _core_.ID_DELETE +ID_REPLACE = _core_.ID_REPLACE +ID_REPLACE_ALL = _core_.ID_REPLACE_ALL +ID_PROPERTIES = _core_.ID_PROPERTIES +ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS +ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS +ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS +ID_VIEW_LIST = _core_.ID_VIEW_LIST +ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE +ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME +ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE +ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE +ID_FILE = _core_.ID_FILE +ID_FILE1 = _core_.ID_FILE1 +ID_FILE2 = _core_.ID_FILE2 +ID_FILE3 = _core_.ID_FILE3 +ID_FILE4 = _core_.ID_FILE4 +ID_FILE5 = _core_.ID_FILE5 +ID_FILE6 = _core_.ID_FILE6 +ID_FILE7 = _core_.ID_FILE7 +ID_FILE8 = _core_.ID_FILE8 +ID_FILE9 = _core_.ID_FILE9 +ID_OK = _core_.ID_OK +ID_CANCEL = _core_.ID_CANCEL +ID_APPLY = _core_.ID_APPLY +ID_YES = _core_.ID_YES +ID_NO = _core_.ID_NO +ID_STATIC = _core_.ID_STATIC +ID_FORWARD = _core_.ID_FORWARD +ID_BACKWARD = _core_.ID_BACKWARD +ID_DEFAULT = _core_.ID_DEFAULT +ID_MORE = _core_.ID_MORE +ID_SETUP = _core_.ID_SETUP +ID_RESET = _core_.ID_RESET +ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP +ID_YESTOALL = _core_.ID_YESTOALL +ID_NOTOALL = _core_.ID_NOTOALL +ID_ABORT = _core_.ID_ABORT +ID_RETRY = _core_.ID_RETRY +ID_IGNORE = _core_.ID_IGNORE +ID_ADD = _core_.ID_ADD +ID_REMOVE = _core_.ID_REMOVE +ID_UP = _core_.ID_UP +ID_DOWN = _core_.ID_DOWN +ID_HOME = _core_.ID_HOME +ID_REFRESH = _core_.ID_REFRESH +ID_STOP = _core_.ID_STOP +ID_INDEX = _core_.ID_INDEX +ID_BOLD = _core_.ID_BOLD +ID_ITALIC = _core_.ID_ITALIC +ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER +ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL +ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT +ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT +ID_UNDERLINE = _core_.ID_UNDERLINE +ID_INDENT = _core_.ID_INDENT +ID_UNINDENT = _core_.ID_UNINDENT +ID_ZOOM_100 = _core_.ID_ZOOM_100 +ID_ZOOM_FIT = _core_.ID_ZOOM_FIT +ID_ZOOM_IN = _core_.ID_ZOOM_IN +ID_ZOOM_OUT = _core_.ID_ZOOM_OUT +ID_UNDELETE = _core_.ID_UNDELETE +ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED +ID_HIGHEST = _core_.ID_HIGHEST +MENU_TEAROFF = _core_.MENU_TEAROFF +MB_DOCKABLE = _core_.MB_DOCKABLE +NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE +FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE +LI_HORIZONTAL = _core_.LI_HORIZONTAL +LI_VERTICAL = _core_.LI_VERTICAL +WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY +WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS +WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT +WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND +WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE +WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES +MM_TEXT = _core_.MM_TEXT +MM_LOMETRIC = _core_.MM_LOMETRIC +MM_HIMETRIC = _core_.MM_HIMETRIC +MM_LOENGLISH = _core_.MM_LOENGLISH +MM_HIENGLISH = _core_.MM_HIENGLISH +MM_TWIPS = _core_.MM_TWIPS +MM_ISOTROPIC = _core_.MM_ISOTROPIC +MM_ANISOTROPIC = _core_.MM_ANISOTROPIC +MM_POINTS = _core_.MM_POINTS +MM_METRIC = _core_.MM_METRIC +CENTRE = _core_.CENTRE +CENTER = _core_.CENTER +HORIZONTAL = _core_.HORIZONTAL +VERTICAL = _core_.VERTICAL +BOTH = _core_.BOTH +LEFT = _core_.LEFT +RIGHT = _core_.RIGHT +UP = _core_.UP +DOWN = _core_.DOWN +TOP = _core_.TOP +BOTTOM = _core_.BOTTOM +NORTH = _core_.NORTH +SOUTH = _core_.SOUTH +WEST = _core_.WEST +EAST = _core_.EAST +ALL = _core_.ALL +ALIGN_NOT = _core_.ALIGN_NOT +ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL +ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL +ALIGN_LEFT = _core_.ALIGN_LEFT +ALIGN_TOP = _core_.ALIGN_TOP +ALIGN_RIGHT = _core_.ALIGN_RIGHT +ALIGN_BOTTOM = _core_.ALIGN_BOTTOM +ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL +ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL +ALIGN_CENTER = _core_.ALIGN_CENTER +ALIGN_CENTRE = _core_.ALIGN_CENTRE +ALIGN_MASK = _core_.ALIGN_MASK +STRETCH_NOT = _core_.STRETCH_NOT +SHRINK = _core_.SHRINK +GROW = _core_.GROW +EXPAND = _core_.EXPAND +SHAPED = _core_.SHAPED +FIXED_MINSIZE = _core_.FIXED_MINSIZE +TILE = _core_.TILE +ADJUST_MINSIZE = _core_.ADJUST_MINSIZE +BORDER_DEFAULT = _core_.BORDER_DEFAULT +BORDER_NONE = _core_.BORDER_NONE +BORDER_STATIC = _core_.BORDER_STATIC +BORDER_SIMPLE = _core_.BORDER_SIMPLE +BORDER_RAISED = _core_.BORDER_RAISED +BORDER_SUNKEN = _core_.BORDER_SUNKEN +BORDER_DOUBLE = _core_.BORDER_DOUBLE +BORDER_MASK = _core_.BORDER_MASK +BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM +BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR +BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM +DEFAULT = _core_.DEFAULT +DECORATIVE = _core_.DECORATIVE +ROMAN = _core_.ROMAN +SCRIPT = _core_.SCRIPT +SWISS = _core_.SWISS +MODERN = _core_.MODERN +TELETYPE = _core_.TELETYPE +VARIABLE = _core_.VARIABLE +FIXED = _core_.FIXED +NORMAL = _core_.NORMAL +LIGHT = _core_.LIGHT +BOLD = _core_.BOLD +ITALIC = _core_.ITALIC +SLANT = _core_.SLANT +SOLID = _core_.SOLID +DOT = _core_.DOT +LONG_DASH = _core_.LONG_DASH +SHORT_DASH = _core_.SHORT_DASH +DOT_DASH = _core_.DOT_DASH +USER_DASH = _core_.USER_DASH +TRANSPARENT = _core_.TRANSPARENT +STIPPLE = _core_.STIPPLE +STIPPLE_MASK = _core_.STIPPLE_MASK +STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE +BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH +CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH +FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH +CROSS_HATCH = _core_.CROSS_HATCH +HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH +VERTICAL_HATCH = _core_.VERTICAL_HATCH +JOIN_BEVEL = _core_.JOIN_BEVEL +JOIN_MITER = _core_.JOIN_MITER +JOIN_ROUND = _core_.JOIN_ROUND +CAP_ROUND = _core_.CAP_ROUND +CAP_PROJECTING = _core_.CAP_PROJECTING +CAP_BUTT = _core_.CAP_BUTT +CLEAR = _core_.CLEAR +XOR = _core_.XOR +INVERT = _core_.INVERT +OR_REVERSE = _core_.OR_REVERSE +AND_REVERSE = _core_.AND_REVERSE +COPY = _core_.COPY +AND = _core_.AND +AND_INVERT = _core_.AND_INVERT +NO_OP = _core_.NO_OP +NOR = _core_.NOR +EQUIV = _core_.EQUIV +SRC_INVERT = _core_.SRC_INVERT +OR_INVERT = _core_.OR_INVERT +NAND = _core_.NAND +OR = _core_.OR +SET = _core_.SET +WXK_BACK = _core_.WXK_BACK +WXK_TAB = _core_.WXK_TAB +WXK_RETURN = _core_.WXK_RETURN +WXK_ESCAPE = _core_.WXK_ESCAPE +WXK_SPACE = _core_.WXK_SPACE +WXK_DELETE = _core_.WXK_DELETE +WXK_START = _core_.WXK_START +WXK_LBUTTON = _core_.WXK_LBUTTON +WXK_RBUTTON = _core_.WXK_RBUTTON +WXK_CANCEL = _core_.WXK_CANCEL +WXK_MBUTTON = _core_.WXK_MBUTTON +WXK_CLEAR = _core_.WXK_CLEAR +WXK_SHIFT = _core_.WXK_SHIFT +WXK_ALT = _core_.WXK_ALT +WXK_CONTROL = _core_.WXK_CONTROL +WXK_MENU = _core_.WXK_MENU +WXK_PAUSE = _core_.WXK_PAUSE +WXK_CAPITAL = _core_.WXK_CAPITAL +WXK_PRIOR = _core_.WXK_PRIOR +WXK_NEXT = _core_.WXK_NEXT +WXK_END = _core_.WXK_END +WXK_HOME = _core_.WXK_HOME +WXK_LEFT = _core_.WXK_LEFT +WXK_UP = _core_.WXK_UP +WXK_RIGHT = _core_.WXK_RIGHT +WXK_DOWN = _core_.WXK_DOWN +WXK_SELECT = _core_.WXK_SELECT +WXK_PRINT = _core_.WXK_PRINT +WXK_EXECUTE = _core_.WXK_EXECUTE +WXK_SNAPSHOT = _core_.WXK_SNAPSHOT +WXK_INSERT = _core_.WXK_INSERT +WXK_HELP = _core_.WXK_HELP +WXK_NUMPAD0 = _core_.WXK_NUMPAD0 +WXK_NUMPAD1 = _core_.WXK_NUMPAD1 +WXK_NUMPAD2 = _core_.WXK_NUMPAD2 +WXK_NUMPAD3 = _core_.WXK_NUMPAD3 +WXK_NUMPAD4 = _core_.WXK_NUMPAD4 +WXK_NUMPAD5 = _core_.WXK_NUMPAD5 +WXK_NUMPAD6 = _core_.WXK_NUMPAD6 +WXK_NUMPAD7 = _core_.WXK_NUMPAD7 +WXK_NUMPAD8 = _core_.WXK_NUMPAD8 +WXK_NUMPAD9 = _core_.WXK_NUMPAD9 +WXK_MULTIPLY = _core_.WXK_MULTIPLY +WXK_ADD = _core_.WXK_ADD +WXK_SEPARATOR = _core_.WXK_SEPARATOR +WXK_SUBTRACT = _core_.WXK_SUBTRACT +WXK_DECIMAL = _core_.WXK_DECIMAL +WXK_DIVIDE = _core_.WXK_DIVIDE +WXK_F1 = _core_.WXK_F1 +WXK_F2 = _core_.WXK_F2 +WXK_F3 = _core_.WXK_F3 +WXK_F4 = _core_.WXK_F4 +WXK_F5 = _core_.WXK_F5 +WXK_F6 = _core_.WXK_F6 +WXK_F7 = _core_.WXK_F7 +WXK_F8 = _core_.WXK_F8 +WXK_F9 = _core_.WXK_F9 +WXK_F10 = _core_.WXK_F10 +WXK_F11 = _core_.WXK_F11 +WXK_F12 = _core_.WXK_F12 +WXK_F13 = _core_.WXK_F13 +WXK_F14 = _core_.WXK_F14 +WXK_F15 = _core_.WXK_F15 +WXK_F16 = _core_.WXK_F16 +WXK_F17 = _core_.WXK_F17 +WXK_F18 = _core_.WXK_F18 +WXK_F19 = _core_.WXK_F19 +WXK_F20 = _core_.WXK_F20 +WXK_F21 = _core_.WXK_F21 +WXK_F22 = _core_.WXK_F22 +WXK_F23 = _core_.WXK_F23 +WXK_F24 = _core_.WXK_F24 +WXK_NUMLOCK = _core_.WXK_NUMLOCK +WXK_SCROLL = _core_.WXK_SCROLL +WXK_PAGEUP = _core_.WXK_PAGEUP +WXK_PAGEDOWN = _core_.WXK_PAGEDOWN +WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE +WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB +WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER +WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1 +WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2 +WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3 +WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4 +WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME +WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT +WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP +WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT +WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN +WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR +WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP +WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT +WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN +WXK_NUMPAD_END = _core_.WXK_NUMPAD_END +WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN +WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT +WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE +WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL +WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY +WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD +WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR +WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT +WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL +WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE +WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT +WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT +WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU +WXK_COMMAND = _core_.WXK_COMMAND +WXK_SPECIAL1 = _core_.WXK_SPECIAL1 +WXK_SPECIAL2 = _core_.WXK_SPECIAL2 +WXK_SPECIAL3 = _core_.WXK_SPECIAL3 +WXK_SPECIAL4 = _core_.WXK_SPECIAL4 +WXK_SPECIAL5 = _core_.WXK_SPECIAL5 +WXK_SPECIAL6 = _core_.WXK_SPECIAL6 +WXK_SPECIAL7 = _core_.WXK_SPECIAL7 +WXK_SPECIAL8 = _core_.WXK_SPECIAL8 +WXK_SPECIAL9 = _core_.WXK_SPECIAL9 +WXK_SPECIAL10 = _core_.WXK_SPECIAL10 +WXK_SPECIAL11 = _core_.WXK_SPECIAL11 +WXK_SPECIAL12 = _core_.WXK_SPECIAL12 +WXK_SPECIAL13 = _core_.WXK_SPECIAL13 +WXK_SPECIAL14 = _core_.WXK_SPECIAL14 +WXK_SPECIAL15 = _core_.WXK_SPECIAL15 +WXK_SPECIAL16 = _core_.WXK_SPECIAL16 +WXK_SPECIAL17 = _core_.WXK_SPECIAL17 +WXK_SPECIAL18 = _core_.WXK_SPECIAL18 +WXK_SPECIAL19 = _core_.WXK_SPECIAL19 +WXK_SPECIAL20 = _core_.WXK_SPECIAL20 +PAPER_NONE = _core_.PAPER_NONE +PAPER_LETTER = _core_.PAPER_LETTER +PAPER_LEGAL = _core_.PAPER_LEGAL +PAPER_A4 = _core_.PAPER_A4 +PAPER_CSHEET = _core_.PAPER_CSHEET +PAPER_DSHEET = _core_.PAPER_DSHEET +PAPER_ESHEET = _core_.PAPER_ESHEET +PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL +PAPER_TABLOID = _core_.PAPER_TABLOID +PAPER_LEDGER = _core_.PAPER_LEDGER +PAPER_STATEMENT = _core_.PAPER_STATEMENT +PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE +PAPER_A3 = _core_.PAPER_A3 +PAPER_A4SMALL = _core_.PAPER_A4SMALL +PAPER_A5 = _core_.PAPER_A5 +PAPER_B4 = _core_.PAPER_B4 +PAPER_B5 = _core_.PAPER_B5 +PAPER_FOLIO = _core_.PAPER_FOLIO +PAPER_QUARTO = _core_.PAPER_QUARTO +PAPER_10X14 = _core_.PAPER_10X14 +PAPER_11X17 = _core_.PAPER_11X17 +PAPER_NOTE = _core_.PAPER_NOTE +PAPER_ENV_9 = _core_.PAPER_ENV_9 +PAPER_ENV_10 = _core_.PAPER_ENV_10 +PAPER_ENV_11 = _core_.PAPER_ENV_11 +PAPER_ENV_12 = _core_.PAPER_ENV_12 +PAPER_ENV_14 = _core_.PAPER_ENV_14 +PAPER_ENV_DL = _core_.PAPER_ENV_DL +PAPER_ENV_C5 = _core_.PAPER_ENV_C5 +PAPER_ENV_C3 = _core_.PAPER_ENV_C3 +PAPER_ENV_C4 = _core_.PAPER_ENV_C4 +PAPER_ENV_C6 = _core_.PAPER_ENV_C6 +PAPER_ENV_C65 = _core_.PAPER_ENV_C65 +PAPER_ENV_B4 = _core_.PAPER_ENV_B4 +PAPER_ENV_B5 = _core_.PAPER_ENV_B5 +PAPER_ENV_B6 = _core_.PAPER_ENV_B6 +PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY +PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH +PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL +PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US +PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN +PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN +PAPER_ISO_B4 = _core_.PAPER_ISO_B4 +PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD +PAPER_9X11 = _core_.PAPER_9X11 +PAPER_10X11 = _core_.PAPER_10X11 +PAPER_15X11 = _core_.PAPER_15X11 +PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE +PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA +PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA +PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA +PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA +PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE +PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE +PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE +PAPER_A_PLUS = _core_.PAPER_A_PLUS +PAPER_B_PLUS = _core_.PAPER_B_PLUS +PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS +PAPER_A4_PLUS = _core_.PAPER_A4_PLUS +PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE +PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE +PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA +PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA +PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA +PAPER_A2 = _core_.PAPER_A2 +PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE +PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE +PAPER_DBL_JAPANESE_POSTCARD = _core_.PAPER_DBL_JAPANESE_POSTCARD +PAPER_A6 = _core_.PAPER_A6 +PAPER_JENV_KAKU2 = _core_.PAPER_JENV_KAKU2 +PAPER_JENV_KAKU3 = _core_.PAPER_JENV_KAKU3 +PAPER_JENV_CHOU3 = _core_.PAPER_JENV_CHOU3 +PAPER_JENV_CHOU4 = _core_.PAPER_JENV_CHOU4 +PAPER_LETTER_ROTATED = _core_.PAPER_LETTER_ROTATED +PAPER_A3_ROTATED = _core_.PAPER_A3_ROTATED +PAPER_A4_ROTATED = _core_.PAPER_A4_ROTATED +PAPER_A5_ROTATED = _core_.PAPER_A5_ROTATED +PAPER_B4_JIS_ROTATED = _core_.PAPER_B4_JIS_ROTATED +PAPER_B5_JIS_ROTATED = _core_.PAPER_B5_JIS_ROTATED +PAPER_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_JAPANESE_POSTCARD_ROTATED +PAPER_DBL_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_DBL_JAPANESE_POSTCARD_ROTATED +PAPER_A6_ROTATED = _core_.PAPER_A6_ROTATED +PAPER_JENV_KAKU2_ROTATED = _core_.PAPER_JENV_KAKU2_ROTATED +PAPER_JENV_KAKU3_ROTATED = _core_.PAPER_JENV_KAKU3_ROTATED +PAPER_JENV_CHOU3_ROTATED = _core_.PAPER_JENV_CHOU3_ROTATED +PAPER_JENV_CHOU4_ROTATED = _core_.PAPER_JENV_CHOU4_ROTATED +PAPER_B6_JIS = _core_.PAPER_B6_JIS +PAPER_B6_JIS_ROTATED = _core_.PAPER_B6_JIS_ROTATED +PAPER_12X11 = _core_.PAPER_12X11 +PAPER_JENV_YOU4 = _core_.PAPER_JENV_YOU4 +PAPER_JENV_YOU4_ROTATED = _core_.PAPER_JENV_YOU4_ROTATED +PAPER_P16K = _core_.PAPER_P16K +PAPER_P32K = _core_.PAPER_P32K +PAPER_P32KBIG = _core_.PAPER_P32KBIG +PAPER_PENV_1 = _core_.PAPER_PENV_1 +PAPER_PENV_2 = _core_.PAPER_PENV_2 +PAPER_PENV_3 = _core_.PAPER_PENV_3 +PAPER_PENV_4 = _core_.PAPER_PENV_4 +PAPER_PENV_5 = _core_.PAPER_PENV_5 +PAPER_PENV_6 = _core_.PAPER_PENV_6 +PAPER_PENV_7 = _core_.PAPER_PENV_7 +PAPER_PENV_8 = _core_.PAPER_PENV_8 +PAPER_PENV_9 = _core_.PAPER_PENV_9 +PAPER_PENV_10 = _core_.PAPER_PENV_10 +PAPER_P16K_ROTATED = _core_.PAPER_P16K_ROTATED +PAPER_P32K_ROTATED = _core_.PAPER_P32K_ROTATED +PAPER_P32KBIG_ROTATED = _core_.PAPER_P32KBIG_ROTATED +PAPER_PENV_1_ROTATED = _core_.PAPER_PENV_1_ROTATED +PAPER_PENV_2_ROTATED = _core_.PAPER_PENV_2_ROTATED +PAPER_PENV_3_ROTATED = _core_.PAPER_PENV_3_ROTATED +PAPER_PENV_4_ROTATED = _core_.PAPER_PENV_4_ROTATED +PAPER_PENV_5_ROTATED = _core_.PAPER_PENV_5_ROTATED +PAPER_PENV_6_ROTATED = _core_.PAPER_PENV_6_ROTATED +PAPER_PENV_7_ROTATED = _core_.PAPER_PENV_7_ROTATED +PAPER_PENV_8_ROTATED = _core_.PAPER_PENV_8_ROTATED +PAPER_PENV_9_ROTATED = _core_.PAPER_PENV_9_ROTATED +PAPER_PENV_10_ROTATED = _core_.PAPER_PENV_10_ROTATED +DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX +DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL +DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL +ITEM_SEPARATOR = _core_.ITEM_SEPARATOR +ITEM_NORMAL = _core_.ITEM_NORMAL +ITEM_CHECK = _core_.ITEM_CHECK +ITEM_RADIO = _core_.ITEM_RADIO +ITEM_MAX = _core_.ITEM_MAX +HT_NOWHERE = _core_.HT_NOWHERE +HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST +HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1 +HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2 +HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1 +HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2 +HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB +HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1 +HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2 +HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST +HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE +HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE +HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR +HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR +HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER +HT_MAX = _core_.HT_MAX +MOD_NONE = _core_.MOD_NONE +MOD_ALT = _core_.MOD_ALT +MOD_CONTROL = _core_.MOD_CONTROL +MOD_ALTGR = _core_.MOD_ALTGR +MOD_SHIFT = _core_.MOD_SHIFT +MOD_META = _core_.MOD_META +MOD_WIN = _core_.MOD_WIN +MOD_CMD = _core_.MOD_CMD +MOD_ALL = _core_.MOD_ALL +UPDATE_UI_NONE = _core_.UPDATE_UI_NONE +UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE +UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE +Layout_Default = _core_.Layout_Default +Layout_LeftToRight = _core_.Layout_LeftToRight +Layout_RightToLeft = _core_.Layout_RightToLeft #--------------------------------------------------------------------------- -class wxObject(object): +class Object(object): """ The base class for most wx objects, although in wxPython not much functionality is needed nor exposed. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def GetClassName(*args, **kwargs): """ - GetClassName(self) -> wxString + GetClassName(self) -> String Returns the class name of the C++ class using wxRTTI. """ - return __core.wxObject_GetClassName(*args, **kwargs) + return _core_.Object_GetClassName(*args, **kwargs) def Destroy(*args, **kwargs): """ @@ -648,154 +705,167 @@ class wxObject(object): Deletes the C++ object this Python object is a proxy for. """ - return __core.wxObject_Destroy(*args, **kwargs) - + args[0].this.own(False) + return _core_.Object_Destroy(*args, **kwargs) -class wxObjectPtr(wxObject): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxObject -__core.wxObject_swigregister(wxObjectPtr) -_wxPySetDictionary = __core._wxPySetDictionary + def IsSameAs(*args, **kwargs): + """ + IsSameAs(self, Object p) -> bool -_wxPyFixStockObjects = __core._wxPyFixStockObjects + For wx.Objects that use C++ reference counting internally, this method + can be used to determine if two objects are referencing the same data + object. + """ + return _core_.Object_IsSameAs(*args, **kwargs) -cvar = __core.cvar + ClassName = property(GetClassName,doc="See `GetClassName`") +_core_.Object_swigregister(Object) +_wxPySetDictionary = _core_._wxPySetDictionary +cvar = _core_.cvar EmptyString = cvar.EmptyString #--------------------------------------------------------------------------- -wxBITMAP_TYPE_INVALID = __core.wxBITMAP_TYPE_INVALID -wxBITMAP_TYPE_BMP = __core.wxBITMAP_TYPE_BMP -wxBITMAP_TYPE_ICO = __core.wxBITMAP_TYPE_ICO -wxBITMAP_TYPE_CUR = __core.wxBITMAP_TYPE_CUR -wxBITMAP_TYPE_XBM = __core.wxBITMAP_TYPE_XBM -wxBITMAP_TYPE_XBM_DATA = __core.wxBITMAP_TYPE_XBM_DATA -wxBITMAP_TYPE_XPM = __core.wxBITMAP_TYPE_XPM -wxBITMAP_TYPE_XPM_DATA = __core.wxBITMAP_TYPE_XPM_DATA -wxBITMAP_TYPE_TIF = __core.wxBITMAP_TYPE_TIF -wxBITMAP_TYPE_GIF = __core.wxBITMAP_TYPE_GIF -wxBITMAP_TYPE_PNG = __core.wxBITMAP_TYPE_PNG -wxBITMAP_TYPE_JPEG = __core.wxBITMAP_TYPE_JPEG -wxBITMAP_TYPE_PNM = __core.wxBITMAP_TYPE_PNM -wxBITMAP_TYPE_PCX = __core.wxBITMAP_TYPE_PCX -wxBITMAP_TYPE_PICT = __core.wxBITMAP_TYPE_PICT -wxBITMAP_TYPE_ICON = __core.wxBITMAP_TYPE_ICON -wxBITMAP_TYPE_ANI = __core.wxBITMAP_TYPE_ANI -wxBITMAP_TYPE_IFF = __core.wxBITMAP_TYPE_IFF -wxBITMAP_TYPE_MACCURSOR = __core.wxBITMAP_TYPE_MACCURSOR -wxBITMAP_TYPE_ANY = __core.wxBITMAP_TYPE_ANY -wxCURSOR_NONE = __core.wxCURSOR_NONE -wxCURSOR_ARROW = __core.wxCURSOR_ARROW -wxCURSOR_RIGHT_ARROW = __core.wxCURSOR_RIGHT_ARROW -wxCURSOR_BULLSEYE = __core.wxCURSOR_BULLSEYE -wxCURSOR_CHAR = __core.wxCURSOR_CHAR -wxCURSOR_CROSS = __core.wxCURSOR_CROSS -wxCURSOR_HAND = __core.wxCURSOR_HAND -wxCURSOR_IBEAM = __core.wxCURSOR_IBEAM -wxCURSOR_LEFT_BUTTON = __core.wxCURSOR_LEFT_BUTTON -wxCURSOR_MAGNIFIER = __core.wxCURSOR_MAGNIFIER -wxCURSOR_MIDDLE_BUTTON = __core.wxCURSOR_MIDDLE_BUTTON -wxCURSOR_NO_ENTRY = __core.wxCURSOR_NO_ENTRY -wxCURSOR_PAINT_BRUSH = __core.wxCURSOR_PAINT_BRUSH -wxCURSOR_PENCIL = __core.wxCURSOR_PENCIL -wxCURSOR_POINT_LEFT = __core.wxCURSOR_POINT_LEFT -wxCURSOR_POINT_RIGHT = __core.wxCURSOR_POINT_RIGHT -wxCURSOR_QUESTION_ARROW = __core.wxCURSOR_QUESTION_ARROW -wxCURSOR_RIGHT_BUTTON = __core.wxCURSOR_RIGHT_BUTTON -wxCURSOR_SIZENESW = __core.wxCURSOR_SIZENESW -wxCURSOR_SIZENS = __core.wxCURSOR_SIZENS -wxCURSOR_SIZENWSE = __core.wxCURSOR_SIZENWSE -wxCURSOR_SIZEWE = __core.wxCURSOR_SIZEWE -wxCURSOR_SIZING = __core.wxCURSOR_SIZING -wxCURSOR_SPRAYCAN = __core.wxCURSOR_SPRAYCAN -wxCURSOR_WAIT = __core.wxCURSOR_WAIT -wxCURSOR_WATCH = __core.wxCURSOR_WATCH -wxCURSOR_BLANK = __core.wxCURSOR_BLANK -wxCURSOR_DEFAULT = __core.wxCURSOR_DEFAULT -wxCURSOR_COPY_ARROW = __core.wxCURSOR_COPY_ARROW -wxCURSOR_ARROWWAIT = __core.wxCURSOR_ARROWWAIT -wxCURSOR_MAX = __core.wxCURSOR_MAX +BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID +BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP +BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO +BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR +BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM +BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA +BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM +BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA +BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF +BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF +BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG +BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG +BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM +BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX +BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT +BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON +BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI +BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF +BITMAP_TYPE_TGA = _core_.BITMAP_TYPE_TGA +BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR +BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY +CURSOR_NONE = _core_.CURSOR_NONE +CURSOR_ARROW = _core_.CURSOR_ARROW +CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW +CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE +CURSOR_CHAR = _core_.CURSOR_CHAR +CURSOR_CROSS = _core_.CURSOR_CROSS +CURSOR_HAND = _core_.CURSOR_HAND +CURSOR_IBEAM = _core_.CURSOR_IBEAM +CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON +CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER +CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON +CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY +CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH +CURSOR_PENCIL = _core_.CURSOR_PENCIL +CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT +CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT +CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW +CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON +CURSOR_SIZENESW = _core_.CURSOR_SIZENESW +CURSOR_SIZENS = _core_.CURSOR_SIZENS +CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE +CURSOR_SIZEWE = _core_.CURSOR_SIZEWE +CURSOR_SIZING = _core_.CURSOR_SIZING +CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN +CURSOR_WAIT = _core_.CURSOR_WAIT +CURSOR_WATCH = _core_.CURSOR_WATCH +CURSOR_BLANK = _core_.CURSOR_BLANK +CURSOR_DEFAULT = _core_.CURSOR_DEFAULT +CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW +CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT +CURSOR_MAX = _core_.CURSOR_MAX #--------------------------------------------------------------------------- -class wxSize(object): +class Size(object): """ wx.Size is a useful data structure used to represent the size of - something. It simply contians integer width and height - proprtites. In most places in wxPython where a wx.Size is + something. It simply contains integer width and height + properties. In most places in wxPython where a wx.Size is expected a (width, height) tuple can be used instead. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - width = property(__core.wxSize_width_get, __core.wxSize_width_set) - height = property(__core.wxSize_height_get, __core.wxSize_height_set) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + width = property(_core_.Size_width_get, _core_.Size_width_set) + height = property(_core_.Size_height_get, _core_.Size_height_set) x = width; y = height - def __init__(self, *args, **kwargs): + def __init__(self, *args, **kwargs): """ - __init__(self, int w=0, int h=0) -> wxSize + __init__(self, int w=0, int h=0) -> Size Creates a size object. """ - newobj = __core.new_wxSize(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxSize): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.Size_swiginit(self,_core_.new_Size(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Size + __del__ = lambda self : None; def __eq__(*args, **kwargs): """ - __eq__(self, wxSize sz) -> bool + __eq__(self, PyObject other) -> bool Test for equality of wx.Size objects. """ - return __core.wxSize___eq__(*args, **kwargs) + return _core_.Size___eq__(*args, **kwargs) def __ne__(*args, **kwargs): """ - __ne__(self, wxSize sz) -> bool + __ne__(self, PyObject other) -> bool - Test for inequality. + Test for inequality of wx.Size objects. """ - return __core.wxSize___ne__(*args, **kwargs) + return _core_.Size___ne__(*args, **kwargs) def __add__(*args, **kwargs): """ - __add__(self, wxSize sz) -> wxSize + __add__(self, Size sz) -> Size Add sz's proprties to this and return the result. """ - return __core.wxSize___add__(*args, **kwargs) + return _core_.Size___add__(*args, **kwargs) def __sub__(*args, **kwargs): """ - __sub__(self, wxSize sz) -> wxSize + __sub__(self, Size sz) -> Size Subtract sz's properties from this and return the result. """ - return __core.wxSize___sub__(*args, **kwargs) + return _core_.Size___sub__(*args, **kwargs) def IncTo(*args, **kwargs): """ - IncTo(self, wxSize sz) + IncTo(self, Size sz) Increments this object so that both of its dimensions are not less than the corresponding dimensions of the size. """ - return __core.wxSize_IncTo(*args, **kwargs) + return _core_.Size_IncTo(*args, **kwargs) def DecTo(*args, **kwargs): """ - DecTo(self, wxSize sz) + DecTo(self, Size sz) Decrements this object so that both of its dimensions are not greater than the corresponding dimensions of the size. """ - return __core.wxSize_DecTo(*args, **kwargs) + return _core_.Size_DecTo(*args, **kwargs) + + def IncBy(*args, **kwargs): + """IncBy(self, int dx, int dy)""" + return _core_.Size_IncBy(*args, **kwargs) + + def DecBy(*args, **kwargs): + """DecBy(self, int dx, int dy)""" + return _core_.Size_DecBy(*args, **kwargs) + + def Scale(*args, **kwargs): + """ + Scale(self, float xscale, float yscale) + + Scales the dimensions of this object by the given factors. + """ + return _core_.Size_Scale(*args, **kwargs) def Set(*args, **kwargs): """ @@ -803,23 +873,23 @@ class wxSize(object): Set both width and height. """ - return __core.wxSize_Set(*args, **kwargs) + return _core_.Size_Set(*args, **kwargs) def SetWidth(*args, **kwargs): """SetWidth(self, int w)""" - return __core.wxSize_SetWidth(*args, **kwargs) + return _core_.Size_SetWidth(*args, **kwargs) def SetHeight(*args, **kwargs): """SetHeight(self, int h)""" - return __core.wxSize_SetHeight(*args, **kwargs) + return _core_.Size_SetHeight(*args, **kwargs) def GetWidth(*args, **kwargs): """GetWidth(self) -> int""" - return __core.wxSize_GetWidth(*args, **kwargs) + return _core_.Size_GetWidth(*args, **kwargs) def GetHeight(*args, **kwargs): """GetHeight(self) -> int""" - return __core.wxSize_GetHeight(*args, **kwargs) + return _core_.Size_GetHeight(*args, **kwargs) def IsFullySpecified(*args, **kwargs): """ @@ -827,16 +897,16 @@ class wxSize(object): Returns True if both components of the size are non-default values. """ - return __core.wxSize_IsFullySpecified(*args, **kwargs) + return _core_.Size_IsFullySpecified(*args, **kwargs) def SetDefaults(*args, **kwargs): """ - SetDefaults(self, wxSize size) + SetDefaults(self, Size size) Combine this size with the other one replacing the default components of this object (i.e. equal to -1) with those of the other. """ - return __core.wxSize_SetDefaults(*args, **kwargs) + return _core_.Size_SetDefaults(*args, **kwargs) def Get(*args, **kwargs): """ @@ -844,7 +914,7 @@ class wxSize(object): Returns the width and height properties as a tuple. """ - return __core.wxSize_Get(*args, **kwargs) + return _core_.Size_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -859,73 +929,60 @@ class wxSize(object): __safe_for_unpickling__ = True def __reduce__(self): return (wx.Size, self.Get()) - -class wxSizePtr(wxSize): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSize -__core.wxSize_swigregister(wxSizePtr) +_core_.Size_swigregister(Size) #--------------------------------------------------------------------------- -class wxRealPoint(object): +class RealPoint(object): """ A data structure for representing a point or position with floating point x and y properties. In wxPython most places that expect a wx.RealPoint can also accept a (x,y) tuple. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - x = property(__core.wxRealPoint_x_get, __core.wxRealPoint_x_set) - y = property(__core.wxRealPoint_y_get, __core.wxRealPoint_y_set) - def __init__(self, *args, **kwargs): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set) + y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set) + def __init__(self, *args, **kwargs): """ - __init__(self, double x=0.0, double y=0.0) -> wxRealPoint + __init__(self, double x=0.0, double y=0.0) -> RealPoint Create a wx.RealPoint object """ - newobj = __core.new_wxRealPoint(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxRealPoint): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.RealPoint_swiginit(self,_core_.new_RealPoint(*args, **kwargs)) + __swig_destroy__ = _core_.delete_RealPoint + __del__ = lambda self : None; def __eq__(*args, **kwargs): """ - __eq__(self, wxRealPoint pt) -> bool + __eq__(self, PyObject other) -> bool Test for equality of wx.RealPoint objects. """ - return __core.wxRealPoint___eq__(*args, **kwargs) + return _core_.RealPoint___eq__(*args, **kwargs) def __ne__(*args, **kwargs): """ - __ne__(self, wxRealPoint pt) -> bool + __ne__(self, PyObject other) -> bool Test for inequality of wx.RealPoint objects. """ - return __core.wxRealPoint___ne__(*args, **kwargs) + return _core_.RealPoint___ne__(*args, **kwargs) def __add__(*args, **kwargs): """ - __add__(self, wxRealPoint pt) -> wxRealPoint + __add__(self, RealPoint pt) -> RealPoint Add pt's proprties to this and return the result. """ - return __core.wxRealPoint___add__(*args, **kwargs) + return _core_.RealPoint___add__(*args, **kwargs) def __sub__(*args, **kwargs): """ - __sub__(self, wxRealPoint pt) -> wxRealPoint + __sub__(self, RealPoint pt) -> RealPoint Subtract pt's proprties from this and return the result """ - return __core.wxRealPoint___sub__(*args, **kwargs) + return _core_.RealPoint___sub__(*args, **kwargs) def Set(*args, **kwargs): """ @@ -933,7 +990,7 @@ class wxRealPoint(object): Set both the x and y properties """ - return __core.wxRealPoint_Set(*args, **kwargs) + return _core_.RealPoint_Set(*args, **kwargs) def Get(*args, **kwargs): """ @@ -941,7 +998,7 @@ class wxRealPoint(object): Return the x and y properties as a tuple. """ - return __core.wxRealPoint_Get(*args, **kwargs) + return _core_.RealPoint_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -956,89 +1013,76 @@ class wxRealPoint(object): __safe_for_unpickling__ = True def __reduce__(self): return (wx.RealPoint, self.Get()) - -class wxRealPointPtr(wxRealPoint): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxRealPoint -__core.wxRealPoint_swigregister(wxRealPointPtr) +_core_.RealPoint_swigregister(RealPoint) #--------------------------------------------------------------------------- -class wxPoint(object): +class Point(object): """ A data structure for representing a point or position with integer x and y properties. Most places in wxPython that expect a wx.Point can also accept a (x,y) tuple. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - x = property(__core.wxPoint_x_get, __core.wxPoint_x_set) - y = property(__core.wxPoint_y_get, __core.wxPoint_y_set) - def __init__(self, *args, **kwargs): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + x = property(_core_.Point_x_get, _core_.Point_x_set) + y = property(_core_.Point_y_get, _core_.Point_y_set) + def __init__(self, *args, **kwargs): """ - __init__(self, int x=0, int y=0) -> wxPoint + __init__(self, int x=0, int y=0) -> Point Create a wx.Point object """ - newobj = __core.new_wxPoint(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxPoint): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.Point_swiginit(self,_core_.new_Point(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Point + __del__ = lambda self : None; def __eq__(*args, **kwargs): """ - __eq__(self, wxPoint pt) -> bool + __eq__(self, PyObject other) -> bool Test for equality of wx.Point objects. """ - return __core.wxPoint___eq__(*args, **kwargs) + return _core_.Point___eq__(*args, **kwargs) def __ne__(*args, **kwargs): """ - __ne__(self, wxPoint pt) -> bool + __ne__(self, PyObject other) -> bool Test for inequality of wx.Point objects. """ - return __core.wxPoint___ne__(*args, **kwargs) + return _core_.Point___ne__(*args, **kwargs) def __add__(*args, **kwargs): """ - __add__(self, wxPoint pt) -> wxPoint + __add__(self, Point pt) -> Point Add pt's proprties to this and return the result. """ - return __core.wxPoint___add__(*args, **kwargs) + return _core_.Point___add__(*args, **kwargs) def __sub__(*args, **kwargs): """ - __sub__(self, wxPoint pt) -> wxPoint + __sub__(self, Point pt) -> Point Subtract pt's proprties from this and return the result """ - return __core.wxPoint___sub__(*args, **kwargs) + return _core_.Point___sub__(*args, **kwargs) def __iadd__(*args, **kwargs): """ - __iadd__(self, wxPoint pt) -> wxPoint + __iadd__(self, Point pt) -> Point Add pt to this object. """ - return __core.wxPoint___iadd__(*args, **kwargs) + return _core_.Point___iadd__(*args, **kwargs) def __isub__(*args, **kwargs): """ - __isub__(self, wxPoint pt) -> wxPoint + __isub__(self, Point pt) -> Point Subtract pt from this object. """ - return __core.wxPoint___isub__(*args, **kwargs) + return _core_.Point___isub__(*args, **kwargs) def Set(*args, **kwargs): """ @@ -1046,7 +1090,7 @@ class wxPoint(object): Set both the x and y properties """ - return __core.wxPoint_Set(*args, **kwargs) + return _core_.Point_Set(*args, **kwargs) def Get(*args, **kwargs): """ @@ -1054,7 +1098,7 @@ class wxPoint(object): Return the x and y properties as a tuple. """ - return __core.wxPoint_Get(*args, **kwargs) + return _core_.Point_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -1069,139 +1113,142 @@ class wxPoint(object): __safe_for_unpickling__ = True def __reduce__(self): return (wx.Point, self.Get()) - -class wxPointPtr(wxPoint): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPoint -__core.wxPoint_swigregister(wxPointPtr) +_core_.Point_swigregister(Point) #--------------------------------------------------------------------------- -class wxRect(object): +class Rect(object): """ A class for representing and manipulating rectangles. It has x, y, width and height properties. In wxPython most palces that expect a wx.Rect can also accept a (x,y,width,height) tuple. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int x=0, int y=0, int width=0, int height=0) -> wxRect + __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect Create a new Rect object. """ - newobj = __core.new_wxRect(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxRect): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.Rect_swiginit(self,_core_.new_Rect(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Rect + __del__ = lambda self : None; def GetX(*args, **kwargs): """GetX(self) -> int""" - return __core.wxRect_GetX(*args, **kwargs) + return _core_.Rect_GetX(*args, **kwargs) def SetX(*args, **kwargs): """SetX(self, int x)""" - return __core.wxRect_SetX(*args, **kwargs) + return _core_.Rect_SetX(*args, **kwargs) def GetY(*args, **kwargs): """GetY(self) -> int""" - return __core.wxRect_GetY(*args, **kwargs) + return _core_.Rect_GetY(*args, **kwargs) def SetY(*args, **kwargs): """SetY(self, int y)""" - return __core.wxRect_SetY(*args, **kwargs) + return _core_.Rect_SetY(*args, **kwargs) def GetWidth(*args, **kwargs): """GetWidth(self) -> int""" - return __core.wxRect_GetWidth(*args, **kwargs) + return _core_.Rect_GetWidth(*args, **kwargs) def SetWidth(*args, **kwargs): """SetWidth(self, int w)""" - return __core.wxRect_SetWidth(*args, **kwargs) + return _core_.Rect_SetWidth(*args, **kwargs) def GetHeight(*args, **kwargs): """GetHeight(self) -> int""" - return __core.wxRect_GetHeight(*args, **kwargs) + return _core_.Rect_GetHeight(*args, **kwargs) def SetHeight(*args, **kwargs): """SetHeight(self, int h)""" - return __core.wxRect_SetHeight(*args, **kwargs) + return _core_.Rect_SetHeight(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> wxPoint""" - return __core.wxRect_GetPosition(*args, **kwargs) + """GetPosition(self) -> Point""" + return _core_.Rect_GetPosition(*args, **kwargs) def SetPosition(*args, **kwargs): - """SetPosition(self, wxPoint p)""" - return __core.wxRect_SetPosition(*args, **kwargs) + """SetPosition(self, Point p)""" + return _core_.Rect_SetPosition(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> wxSize""" - return __core.wxRect_GetSize(*args, **kwargs) + """GetSize(self) -> Size""" + return _core_.Rect_GetSize(*args, **kwargs) def SetSize(*args, **kwargs): - """SetSize(self, wxSize s)""" - return __core.wxRect_SetSize(*args, **kwargs) + """SetSize(self, Size s)""" + return _core_.Rect_SetSize(*args, **kwargs) def IsEmpty(*args, **kwargs): """IsEmpty(self) -> bool""" - return __core.wxRect_IsEmpty(*args, **kwargs) + return _core_.Rect_IsEmpty(*args, **kwargs) def GetTopLeft(*args, **kwargs): - """GetTopLeft(self) -> wxPoint""" - return __core.wxRect_GetTopLeft(*args, **kwargs) + """GetTopLeft(self) -> Point""" + return _core_.Rect_GetTopLeft(*args, **kwargs) def SetTopLeft(*args, **kwargs): - """SetTopLeft(self, wxPoint p)""" - return __core.wxRect_SetTopLeft(*args, **kwargs) + """SetTopLeft(self, Point p)""" + return _core_.Rect_SetTopLeft(*args, **kwargs) def GetBottomRight(*args, **kwargs): - """GetBottomRight(self) -> wxPoint""" - return __core.wxRect_GetBottomRight(*args, **kwargs) + """GetBottomRight(self) -> Point""" + return _core_.Rect_GetBottomRight(*args, **kwargs) def SetBottomRight(*args, **kwargs): - """SetBottomRight(self, wxPoint p)""" - return __core.wxRect_SetBottomRight(*args, **kwargs) + """SetBottomRight(self, Point p)""" + return _core_.Rect_SetBottomRight(*args, **kwargs) + + def GetTopRight(*args, **kwargs): + """GetTopRight(self) -> Point""" + return _core_.Rect_GetTopRight(*args, **kwargs) + + def SetTopRight(*args, **kwargs): + """SetTopRight(self, Point p)""" + return _core_.Rect_SetTopRight(*args, **kwargs) + + def GetBottomLeft(*args, **kwargs): + """GetBottomLeft(self) -> Point""" + return _core_.Rect_GetBottomLeft(*args, **kwargs) + + def SetBottomLeft(*args, **kwargs): + """SetBottomLeft(self, Point p)""" + return _core_.Rect_SetBottomLeft(*args, **kwargs) def GetLeft(*args, **kwargs): """GetLeft(self) -> int""" - return __core.wxRect_GetLeft(*args, **kwargs) + return _core_.Rect_GetLeft(*args, **kwargs) def GetTop(*args, **kwargs): """GetTop(self) -> int""" - return __core.wxRect_GetTop(*args, **kwargs) + return _core_.Rect_GetTop(*args, **kwargs) def GetBottom(*args, **kwargs): """GetBottom(self) -> int""" - return __core.wxRect_GetBottom(*args, **kwargs) + return _core_.Rect_GetBottom(*args, **kwargs) def GetRight(*args, **kwargs): """GetRight(self) -> int""" - return __core.wxRect_GetRight(*args, **kwargs) + return _core_.Rect_GetRight(*args, **kwargs) def SetLeft(*args, **kwargs): """SetLeft(self, int left)""" - return __core.wxRect_SetLeft(*args, **kwargs) + return _core_.Rect_SetLeft(*args, **kwargs) def SetRight(*args, **kwargs): """SetRight(self, int right)""" - return __core.wxRect_SetRight(*args, **kwargs) + return _core_.Rect_SetRight(*args, **kwargs) def SetTop(*args, **kwargs): """SetTop(self, int top)""" - return __core.wxRect_SetTop(*args, **kwargs) + return _core_.Rect_SetTop(*args, **kwargs) def SetBottom(*args, **kwargs): """SetBottom(self, int bottom)""" - return __core.wxRect_SetBottom(*args, **kwargs) + return _core_.Rect_SetBottom(*args, **kwargs) position = property(GetPosition, SetPosition) size = property(GetSize, SetSize) @@ -1212,7 +1259,7 @@ class wxRect(object): def Inflate(*args, **kwargs): """ - Inflate(self, int dx, int dy) -> wxRect + Inflate(self, int dx, int dy) -> Rect Increases the size of the rectangle. @@ -1233,17 +1280,17 @@ class wxRect(object): """ - return __core.wxRect_Inflate(*args, **kwargs) + return _core_.Rect_Inflate(*args, **kwargs) def Deflate(*args, **kwargs): """ - Deflate(self, int dx, int dy) -> wxRect + Deflate(self, int dx, int dy) -> Rect Decrease the rectangle size. This method is the opposite of `Inflate` in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to `Inflate` for a full description. """ - return __core.wxRect_Deflate(*args, **kwargs) + return _core_.Rect_Deflate(*args, **kwargs) def OffsetXY(*args, **kwargs): """ @@ -1253,99 +1300,125 @@ class wxRect(object): rectangle is moved to the right, if dy is positive, it is moved to the bottom, otherwise it is moved to the left or top respectively. """ - return __core.wxRect_OffsetXY(*args, **kwargs) + return _core_.Rect_OffsetXY(*args, **kwargs) def Offset(*args, **kwargs): """ - Offset(self, wxPoint pt) + Offset(self, Point pt) - Same as OffsetXY but uses dx,dy from Point + Same as `OffsetXY` but uses dx,dy from Point """ - return __core.wxRect_Offset(*args, **kwargs) + return _core_.Rect_Offset(*args, **kwargs) def Intersect(*args, **kwargs): """ - Intersect(self, wxRect rect) -> wxRect + Intersect(self, Rect rect) -> Rect Returns the intersectsion of this rectangle and rect. """ - return __core.wxRect_Intersect(*args, **kwargs) + return _core_.Rect_Intersect(*args, **kwargs) def Union(*args, **kwargs): """ - Union(self, wxRect rect) -> wxRect + Union(self, Rect rect) -> Rect Returns the union of this rectangle and rect. """ - return __core.wxRect_Union(*args, **kwargs) + return _core_.Rect_Union(*args, **kwargs) def __add__(*args, **kwargs): """ - __add__(self, wxRect rect) -> wxRect + __add__(self, Rect rect) -> Rect Add the properties of rect to this rectangle and return the result. """ - return __core.wxRect___add__(*args, **kwargs) + return _core_.Rect___add__(*args, **kwargs) def __iadd__(*args, **kwargs): """ - __iadd__(self, wxRect rect) -> wxRect + __iadd__(self, Rect rect) -> Rect Add the properties of rect to this rectangle, updating this rectangle. """ - return __core.wxRect___iadd__(*args, **kwargs) + return _core_.Rect___iadd__(*args, **kwargs) def __eq__(*args, **kwargs): """ - __eq__(self, wxRect rect) -> bool + __eq__(self, PyObject other) -> bool - Test for equality. + Test for equality of wx.Rect objects. """ - return __core.wxRect___eq__(*args, **kwargs) + return _core_.Rect___eq__(*args, **kwargs) def __ne__(*args, **kwargs): """ - __ne__(self, wxRect rect) -> bool + __ne__(self, PyObject other) -> bool - Test for inequality. + Test for inequality of wx.Rect objects. """ - return __core.wxRect___ne__(*args, **kwargs) + return _core_.Rect___ne__(*args, **kwargs) - def InsideXY(*args, **kwargs): + def ContainsXY(*args, **kwargs): """ - InsideXY(self, int x, int y) -> bool + ContainsXY(self, int x, int y) -> bool - Return True if the point is (not strcitly) inside the rect. + Return True if the point is inside the rect. """ - return __core.wxRect_InsideXY(*args, **kwargs) + return _core_.Rect_ContainsXY(*args, **kwargs) - def Inside(*args, **kwargs): + def Contains(*args, **kwargs): """ - Inside(self, wxPoint pt) -> bool + Contains(self, Point pt) -> bool - Return True if the point is (not strcitly) inside the rect. + Return True if the point is inside the rect. """ - return __core.wxRect_Inside(*args, **kwargs) + return _core_.Rect_Contains(*args, **kwargs) + + def ContainsRect(*args, **kwargs): + """ + ContainsRect(self, Rect rect) -> bool + + Returns ``True`` if the given rectangle is completely inside this + rectangle or touches its boundary. + """ + return _core_.Rect_ContainsRect(*args, **kwargs) + + #Inside = wx._deprecated(Contains, "Use `Contains` instead.") + #InsideXY = wx._deprecated(ContainsXY, "Use `ContainsXY` instead.") + #InsideRect = wx._deprecated(ContainsRect, "Use `ContainsRect` instead.") + Inside = Contains + InsideXY = ContainsXY + InsideRect = ContainsRect def Intersects(*args, **kwargs): """ - Intersects(self, wxRect rect) -> bool + Intersects(self, Rect rect) -> bool Returns True if the rectangles have a non empty intersection. """ - return __core.wxRect_Intersects(*args, **kwargs) + return _core_.Rect_Intersects(*args, **kwargs) + + def CenterIn(*args, **kwargs): + """ + CenterIn(self, Rect r, int dir=BOTH) -> Rect + + Center this rectangle within the one passed to the method, which is + usually, but not necessarily, the larger one. + """ + return _core_.Rect_CenterIn(*args, **kwargs) - x = property(__core.wxRect_x_get, __core.wxRect_x_set) - y = property(__core.wxRect_y_get, __core.wxRect_y_set) - width = property(__core.wxRect_width_get, __core.wxRect_width_set) - height = property(__core.wxRect_height_get, __core.wxRect_height_set) + CentreIn = CenterIn + x = property(_core_.Rect_x_get, _core_.Rect_x_set) + y = property(_core_.Rect_y_get, _core_.Rect_y_set) + width = property(_core_.Rect_width_get, _core_.Rect_width_set) + height = property(_core_.Rect_height_get, _core_.Rect_height_set) def Set(*args, **kwargs): """ Set(self, int x=0, int y=0, int width=0, int height=0) Set all rectangle properties. """ - return __core.wxRect_Set(*args, **kwargs) + return _core_.Rect_Set(*args, **kwargs) def Get(*args, **kwargs): """ @@ -1353,7 +1426,7 @@ class wxRect(object): Return the rectangle properties as a tuple. """ - return __core.wxRect_Get(*args, **kwargs) + return _core_.Rect_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -1370,78 +1443,83 @@ class wxRect(object): __safe_for_unpickling__ = True def __reduce__(self): return (wx.Rect, self.Get()) - -class wxRectPtr(wxRect): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxRect -__core.wxRect_swigregister(wxRectPtr) + Bottom = property(GetBottom,SetBottom,doc="See `GetBottom` and `SetBottom`") + BottomRight = property(GetBottomRight,SetBottomRight,doc="See `GetBottomRight` and `SetBottomRight`") + BottomLeft = property(GetBottomLeft,SetBottomLeft,doc="See `GetBottomLeft` and `SetBottomLeft`") + Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`") + Left = property(GetLeft,SetLeft,doc="See `GetLeft` and `SetLeft`") + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") + Right = property(GetRight,SetRight,doc="See `GetRight` and `SetRight`") + Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") + Top = property(GetTop,SetTop,doc="See `GetTop` and `SetTop`") + TopLeft = property(GetTopLeft,SetTopLeft,doc="See `GetTopLeft` and `SetTopLeft`") + TopRight = property(GetTopRight,SetTopRight,doc="See `GetTopRight` and `SetTopRight`") + Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`") + X = property(GetX,SetX,doc="See `GetX` and `SetX`") + Y = property(GetY,SetY,doc="See `GetY` and `SetY`") + Empty = property(IsEmpty,doc="See `IsEmpty`") +_core_.Rect_swigregister(Rect) def RectPP(*args, **kwargs): """ - RectPP(wxPoint topLeft, wxPoint bottomRight) -> wxRect + RectPP(Point topLeft, Point bottomRight) -> Rect Create a new Rect object from Points representing two corners. """ - val = __core.new_RectPP(*args, **kwargs) - val.thisown = 1 + val = _core_.new_RectPP(*args, **kwargs) return val def RectPS(*args, **kwargs): """ - RectPS(wxPoint pos, wxSize size) -> wxRect + RectPS(Point pos, Size size) -> Rect Create a new Rect from a position and size. """ - val = __core.new_RectPS(*args, **kwargs) - val.thisown = 1 + val = _core_.new_RectPS(*args, **kwargs) return val def RectS(*args, **kwargs): """ - RectS(wxSize size) -> wxRect + RectS(Size size) -> Rect Create a new Rect from a size only. """ - val = __core.new_RectS(*args, **kwargs) - val.thisown = 1 + val = _core_.new_RectS(*args, **kwargs) return val -def wxIntersectRect(*args, **kwargs): - """ +def IntersectRect(*args, **kwargs): + """ IntersectRect(Rect r1, Rect r2) -> Rect Calculate and return the intersection of r1 and r2. """ - return __core.wxIntersectRect(*args, **kwargs) + return _core_.IntersectRect(*args, **kwargs) #--------------------------------------------------------------------------- -class wxPoint2D(object): +class Point2D(object): """ wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, double x=0.0, double y=0.0) -> wxPoint2D + __init__(self, double x=0.0, double y=0.0) -> Point2D Create a w.Point2D object. """ - newobj = __core.new_wxPoint2D(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Point2D + __del__ = lambda self : None; def GetFloor(*args, **kwargs): """ GetFloor() -> (x,y) Convert to integer """ - return __core.wxPoint2D_GetFloor(*args, **kwargs) + return _core_.Point2D_GetFloor(*args, **kwargs) def GetRounded(*args, **kwargs): """ @@ -1449,23 +1527,23 @@ class wxPoint2D(object): Convert to integer """ - return __core.wxPoint2D_GetRounded(*args, **kwargs) + return _core_.Point2D_GetRounded(*args, **kwargs) def GetVectorLength(*args, **kwargs): """GetVectorLength(self) -> double""" - return __core.wxPoint2D_GetVectorLength(*args, **kwargs) + return _core_.Point2D_GetVectorLength(*args, **kwargs) def GetVectorAngle(*args, **kwargs): """GetVectorAngle(self) -> double""" - return __core.wxPoint2D_GetVectorAngle(*args, **kwargs) + return _core_.Point2D_GetVectorAngle(*args, **kwargs) def SetVectorLength(*args, **kwargs): """SetVectorLength(self, double length)""" - return __core.wxPoint2D_SetVectorLength(*args, **kwargs) + return _core_.Point2D_SetVectorLength(*args, **kwargs) def SetVectorAngle(*args, **kwargs): """SetVectorAngle(self, double degrees)""" - return __core.wxPoint2D_SetVectorAngle(*args, **kwargs) + return _core_.Point2D_SetVectorAngle(*args, **kwargs) def SetPolarCoordinates(self, angle, length): self.SetVectorLength(length) @@ -1474,66 +1552,66 @@ class wxPoint2D(object): self.SetVectorLength(1.0) def GetDistance(*args, **kwargs): - """GetDistance(self, wxPoint2D pt) -> double""" - return __core.wxPoint2D_GetDistance(*args, **kwargs) + """GetDistance(self, Point2D pt) -> double""" + return _core_.Point2D_GetDistance(*args, **kwargs) def GetDistanceSquare(*args, **kwargs): - """GetDistanceSquare(self, wxPoint2D pt) -> double""" - return __core.wxPoint2D_GetDistanceSquare(*args, **kwargs) + """GetDistanceSquare(self, Point2D pt) -> double""" + return _core_.Point2D_GetDistanceSquare(*args, **kwargs) def GetDotProduct(*args, **kwargs): - """GetDotProduct(self, wxPoint2D vec) -> double""" - return __core.wxPoint2D_GetDotProduct(*args, **kwargs) + """GetDotProduct(self, Point2D vec) -> double""" + return _core_.Point2D_GetDotProduct(*args, **kwargs) def GetCrossProduct(*args, **kwargs): - """GetCrossProduct(self, wxPoint2D vec) -> double""" - return __core.wxPoint2D_GetCrossProduct(*args, **kwargs) + """GetCrossProduct(self, Point2D vec) -> double""" + return _core_.Point2D_GetCrossProduct(*args, **kwargs) def __neg__(*args, **kwargs): """ - __neg__(self) -> wxPoint2D + __neg__(self) -> Point2D the reflection of this point """ - return __core.wxPoint2D___neg__(*args, **kwargs) + return _core_.Point2D___neg__(*args, **kwargs) def __iadd__(*args, **kwargs): - """__iadd__(self, wxPoint2D pt) -> wxPoint2D""" - return __core.wxPoint2D___iadd__(*args, **kwargs) + """__iadd__(self, Point2D pt) -> Point2D""" + return _core_.Point2D___iadd__(*args, **kwargs) def __isub__(*args, **kwargs): - """__isub__(self, wxPoint2D pt) -> wxPoint2D""" - return __core.wxPoint2D___isub__(*args, **kwargs) + """__isub__(self, Point2D pt) -> Point2D""" + return _core_.Point2D___isub__(*args, **kwargs) def __imul__(*args, **kwargs): - """__imul__(self, wxPoint2D pt) -> wxPoint2D""" - return __core.wxPoint2D___imul__(*args, **kwargs) + """__imul__(self, Point2D pt) -> Point2D""" + return _core_.Point2D___imul__(*args, **kwargs) def __idiv__(*args, **kwargs): - """__idiv__(self, wxPoint2D pt) -> wxPoint2D""" - return __core.wxPoint2D___idiv__(*args, **kwargs) + """__idiv__(self, Point2D pt) -> Point2D""" + return _core_.Point2D___idiv__(*args, **kwargs) def __eq__(*args, **kwargs): """ - __eq__(self, wxPoint2D pt) -> bool + __eq__(self, PyObject other) -> bool - Test for equality + Test for equality of wx.Point2D objects. """ - return __core.wxPoint2D___eq__(*args, **kwargs) + return _core_.Point2D___eq__(*args, **kwargs) def __ne__(*args, **kwargs): """ - __ne__(self, wxPoint2D pt) -> bool + __ne__(self, PyObject other) -> bool - Test for inequality + Test for inequality of wx.Point2D objects. """ - return __core.wxPoint2D___ne__(*args, **kwargs) + return _core_.Point2D___ne__(*args, **kwargs) - x = property(__core.wxPoint2D_x_get, __core.wxPoint2D_x_set) - y = property(__core.wxPoint2D_y_get, __core.wxPoint2D_y_set) + x = property(_core_.Point2D_x_get, _core_.Point2D_x_set) + y = property(_core_.Point2D_y_get, _core_.Point2D_y_set) def Set(*args, **kwargs): """Set(self, double x=0, double y=0)""" - return __core.wxPoint2D_Set(*args, **kwargs) + return _core_.Point2D_Set(*args, **kwargs) def Get(*args, **kwargs): """ @@ -1541,7 +1619,7 @@ class wxPoint2D(object): Return x and y properties as a tuple. """ - return __core.wxPoint2D_Get(*args, **kwargs) + return _core_.Point2D_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -1556,422 +1634,622 @@ class wxPoint2D(object): __safe_for_unpickling__ = True def __reduce__(self): return (wx.Point2D, self.Get()) - -class wxPoint2DPtr(wxPoint2D): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPoint2D -__core.wxPoint2D_swigregister(wxPoint2DPtr) + Floor = property(GetFloor,doc="See `GetFloor`") + Rounded = property(GetRounded,doc="See `GetRounded`") + VectorAngle = property(GetVectorAngle,SetVectorAngle,doc="See `GetVectorAngle` and `SetVectorAngle`") + VectorLength = property(GetVectorLength,SetVectorLength,doc="See `GetVectorLength` and `SetVectorLength`") +_core_.Point2D_swigregister(Point2D) def Point2DCopy(*args, **kwargs): """ - Point2DCopy(wxPoint2D pt) -> wxPoint2D + Point2DCopy(Point2D pt) -> Point2D Create a w.Point2D object. """ - val = __core.new_Point2DCopy(*args, **kwargs) - val.thisown = 1 + val = _core_.new_Point2DCopy(*args, **kwargs) return val def Point2DFromPoint(*args, **kwargs): """ - Point2DFromPoint(wxPoint pt) -> wxPoint2D + Point2DFromPoint(Point pt) -> Point2D Create a w.Point2D object. """ - val = __core.new_Point2DFromPoint(*args, **kwargs) - val.thisown = 1 + val = _core_.new_Point2DFromPoint(*args, **kwargs) return val #--------------------------------------------------------------------------- -wxFromStart = __core.wxFromStart -wxFromCurrent = __core.wxFromCurrent -wxFromEnd = __core.wxFromEnd +Inside = _core_.Inside +OutLeft = _core_.OutLeft +OutRight = _core_.OutRight +OutTop = _core_.OutTop +OutBottom = _core_.OutBottom +class Rect2D(object): + """ + wx.Rect2D is a rectangle, with position and size, in a 2D coordinate system + with floating point component values. + """ + 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, wxDouble x=0.0, wxDouble y=0.0, wxDouble w=0.0, wxDouble h=0.0) -> Rect2D + + wx.Rect2D is a rectangle, with position and size, in a 2D coordinate system + with floating point component values. + """ + _core_.Rect2D_swiginit(self,_core_.new_Rect2D(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Rect2D + __del__ = lambda self : None; + def GetPosition(*args, **kwargs): + """GetPosition(self) -> Point2D""" + return _core_.Rect2D_GetPosition(*args, **kwargs) + + def GetSize(*args, **kwargs): + """GetSize(self) -> Size""" + return _core_.Rect2D_GetSize(*args, **kwargs) + + def GetLeft(*args, **kwargs): + """GetLeft(self) -> wxDouble""" + return _core_.Rect2D_GetLeft(*args, **kwargs) + + def SetLeft(*args, **kwargs): + """SetLeft(self, wxDouble n)""" + return _core_.Rect2D_SetLeft(*args, **kwargs) + + def MoveLeftTo(*args, **kwargs): + """MoveLeftTo(self, wxDouble n)""" + return _core_.Rect2D_MoveLeftTo(*args, **kwargs) + + def GetTop(*args, **kwargs): + """GetTop(self) -> wxDouble""" + return _core_.Rect2D_GetTop(*args, **kwargs) + + def SetTop(*args, **kwargs): + """SetTop(self, wxDouble n)""" + return _core_.Rect2D_SetTop(*args, **kwargs) + + def MoveTopTo(*args, **kwargs): + """MoveTopTo(self, wxDouble n)""" + return _core_.Rect2D_MoveTopTo(*args, **kwargs) + + def GetBottom(*args, **kwargs): + """GetBottom(self) -> wxDouble""" + return _core_.Rect2D_GetBottom(*args, **kwargs) + + def SetBottom(*args, **kwargs): + """SetBottom(self, wxDouble n)""" + return _core_.Rect2D_SetBottom(*args, **kwargs) + + def MoveBottomTo(*args, **kwargs): + """MoveBottomTo(self, wxDouble n)""" + return _core_.Rect2D_MoveBottomTo(*args, **kwargs) + + def GetRight(*args, **kwargs): + """GetRight(self) -> wxDouble""" + return _core_.Rect2D_GetRight(*args, **kwargs) + + def SetRight(*args, **kwargs): + """SetRight(self, wxDouble n)""" + return _core_.Rect2D_SetRight(*args, **kwargs) + + def MoveRightTo(*args, **kwargs): + """MoveRightTo(self, wxDouble n)""" + return _core_.Rect2D_MoveRightTo(*args, **kwargs) + + def GetLeftTop(*args, **kwargs): + """GetLeftTop(self) -> Point2D""" + return _core_.Rect2D_GetLeftTop(*args, **kwargs) + + def SetLeftTop(*args, **kwargs): + """SetLeftTop(self, Point2D pt)""" + return _core_.Rect2D_SetLeftTop(*args, **kwargs) + + def MoveLeftTopTo(*args, **kwargs): + """MoveLeftTopTo(self, Point2D pt)""" + return _core_.Rect2D_MoveLeftTopTo(*args, **kwargs) + + def GetLeftBottom(*args, **kwargs): + """GetLeftBottom(self) -> Point2D""" + return _core_.Rect2D_GetLeftBottom(*args, **kwargs) + + def SetLeftBottom(*args, **kwargs): + """SetLeftBottom(self, Point2D pt)""" + return _core_.Rect2D_SetLeftBottom(*args, **kwargs) + + def MoveLeftBottomTo(*args, **kwargs): + """MoveLeftBottomTo(self, Point2D pt)""" + return _core_.Rect2D_MoveLeftBottomTo(*args, **kwargs) + + def GetRightTop(*args, **kwargs): + """GetRightTop(self) -> Point2D""" + return _core_.Rect2D_GetRightTop(*args, **kwargs) + + def SetRightTop(*args, **kwargs): + """SetRightTop(self, Point2D pt)""" + return _core_.Rect2D_SetRightTop(*args, **kwargs) + + def MoveRightTopTo(*args, **kwargs): + """MoveRightTopTo(self, Point2D pt)""" + return _core_.Rect2D_MoveRightTopTo(*args, **kwargs) + + def GetRightBottom(*args, **kwargs): + """GetRightBottom(self) -> Point2D""" + return _core_.Rect2D_GetRightBottom(*args, **kwargs) + + def SetRightBottom(*args, **kwargs): + """SetRightBottom(self, Point2D pt)""" + return _core_.Rect2D_SetRightBottom(*args, **kwargs) + + def MoveRightBottomTo(*args, **kwargs): + """MoveRightBottomTo(self, Point2D pt)""" + return _core_.Rect2D_MoveRightBottomTo(*args, **kwargs) + + def GetCentre(*args, **kwargs): + """GetCentre(self) -> Point2D""" + return _core_.Rect2D_GetCentre(*args, **kwargs) + + def SetCentre(*args, **kwargs): + """SetCentre(self, Point2D pt)""" + return _core_.Rect2D_SetCentre(*args, **kwargs) + + def MoveCentreTo(*args, **kwargs): + """MoveCentreTo(self, Point2D pt)""" + return _core_.Rect2D_MoveCentreTo(*args, **kwargs) + + def GetOutcode(*args, **kwargs): + """GetOutcode(self, Point2D pt) -> int""" + return _core_.Rect2D_GetOutcode(*args, **kwargs) + + def Contains(*args, **kwargs): + """Contains(self, Point2D pt) -> bool""" + return _core_.Rect2D_Contains(*args, **kwargs) + + def ContainsRect(*args, **kwargs): + """ContainsRect(self, Rect2D rect) -> bool""" + return _core_.Rect2D_ContainsRect(*args, **kwargs) + + def IsEmpty(*args, **kwargs): + """IsEmpty(self) -> bool""" + return _core_.Rect2D_IsEmpty(*args, **kwargs) + + def HaveEqualSize(*args, **kwargs): + """HaveEqualSize(self, Rect2D rect) -> bool""" + return _core_.Rect2D_HaveEqualSize(*args, **kwargs) + + def Inset(*args): + """ + Inset(self, wxDouble x, wxDouble y) + Inset(self, wxDouble left, wxDouble top, wxDouble right, wxDouble bottom) + """ + return _core_.Rect2D_Inset(*args) + + def Offset(*args, **kwargs): + """Offset(self, Point2D pt)""" + return _core_.Rect2D_Offset(*args, **kwargs) + + def ConstrainTo(*args, **kwargs): + """ConstrainTo(self, Rect2D rect)""" + return _core_.Rect2D_ConstrainTo(*args, **kwargs) + + def Interpolate(*args, **kwargs): + """Interpolate(self, int widthfactor, int heightfactor) -> Point2D""" + return _core_.Rect2D_Interpolate(*args, **kwargs) + + def Intersect(*args, **kwargs): + """Intersect(self, Rect2D otherRect)""" + return _core_.Rect2D_Intersect(*args, **kwargs) + + def CreateIntersection(*args, **kwargs): + """CreateIntersection(self, Rect2D otherRect) -> Rect2D""" + return _core_.Rect2D_CreateIntersection(*args, **kwargs) + + def Intersects(*args, **kwargs): + """Intersects(self, Rect2D rect) -> bool""" + return _core_.Rect2D_Intersects(*args, **kwargs) + + def Union(*args, **kwargs): + """Union(self, Rect2D otherRect)""" + return _core_.Rect2D_Union(*args, **kwargs) + + def CreateUnion(*args, **kwargs): + """CreateUnion(self, Rect2D otherRect) -> Rect2D""" + return _core_.Rect2D_CreateUnion(*args, **kwargs) + + def Scale(*args): + """ + Scale(self, wxDouble f) + Scale(self, int num, int denum) + """ + return _core_.Rect2D_Scale(*args) + + def __eq__(*args, **kwargs): + """ + __eq__(self, PyObject other) -> bool + + Test for equality of wx.Rect2D objects. + """ + return _core_.Rect2D___eq__(*args, **kwargs) + + def __ne__(*args, **kwargs): + """ + __ne__(self, PyObject other) -> bool + + Test for inequality of wx.Rect2D objects. + """ + return _core_.Rect2D___ne__(*args, **kwargs) + + x = property(_core_.Rect2D_x_get, _core_.Rect2D_x_set) + y = property(_core_.Rect2D_y_get, _core_.Rect2D_y_set) + width = property(_core_.Rect2D_width_get, _core_.Rect2D_width_set) + height = property(_core_.Rect2D_height_get, _core_.Rect2D_height_set) + def Set(*args, **kwargs): + """Set(self, wxDouble x=0, wxDouble y=0, wxDouble width=0, wxDouble height=0)""" + return _core_.Rect2D_Set(*args, **kwargs) + + def Get(*args, **kwargs): + """ + Get() -> (x,y, width, height) + + Return x, y, width and height y properties as a tuple. + """ + return _core_.Rect2D_Get(*args, **kwargs) + + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wx.Rect2D'+str(self.Get()) + def __len__(self): return len(self.Get()) + def __getitem__(self, index): return self.Get()[index] + def __setitem__(self, index, val): + if index == 0: self.x = val + elif index == 1: self.y = val + elif index == 2: self.width = val + elif index == 3: self.height = val + else: raise IndexError + def __nonzero__(self): return self.Get() != (0.0, 0.0, 0.0, 0.0) + __safe_for_unpickling__ = True + def __reduce__(self): return (wx.Rect2D, self.Get()) + +_core_.Rect2D_swigregister(Rect2D) + +#--------------------------------------------------------------------------- + +FromStart = _core_.FromStart +FromCurrent = _core_.FromCurrent +FromEnd = _core_.FromEnd class InputStream(object): """Proxy of C++ InputStream class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, PyObject p) -> InputStream""" - newobj = __core.new_InputStream(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_InputStream): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.InputStream_swiginit(self,_core_.new_InputStream(*args, **kwargs)) + __swig_destroy__ = _core_.delete_InputStream + __del__ = lambda self : None; def close(*args, **kwargs): """close(self)""" - return __core.InputStream_close(*args, **kwargs) + return _core_.InputStream_close(*args, **kwargs) def flush(*args, **kwargs): """flush(self)""" - return __core.InputStream_flush(*args, **kwargs) + return _core_.InputStream_flush(*args, **kwargs) def eof(*args, **kwargs): """eof(self) -> bool""" - return __core.InputStream_eof(*args, **kwargs) + return _core_.InputStream_eof(*args, **kwargs) def read(*args, **kwargs): """read(self, int size=-1) -> PyObject""" - return __core.InputStream_read(*args, **kwargs) + return _core_.InputStream_read(*args, **kwargs) def readline(*args, **kwargs): """readline(self, int size=-1) -> PyObject""" - return __core.InputStream_readline(*args, **kwargs) + return _core_.InputStream_readline(*args, **kwargs) def readlines(*args, **kwargs): """readlines(self, int sizehint=-1) -> PyObject""" - return __core.InputStream_readlines(*args, **kwargs) + return _core_.InputStream_readlines(*args, **kwargs) def seek(*args, **kwargs): """seek(self, int offset, int whence=0)""" - return __core.InputStream_seek(*args, **kwargs) + return _core_.InputStream_seek(*args, **kwargs) def tell(*args, **kwargs): """tell(self) -> int""" - return __core.InputStream_tell(*args, **kwargs) + return _core_.InputStream_tell(*args, **kwargs) def Peek(*args, **kwargs): """Peek(self) -> char""" - return __core.InputStream_Peek(*args, **kwargs) + return _core_.InputStream_Peek(*args, **kwargs) def GetC(*args, **kwargs): """GetC(self) -> char""" - return __core.InputStream_GetC(*args, **kwargs) + return _core_.InputStream_GetC(*args, **kwargs) def LastRead(*args, **kwargs): """LastRead(self) -> size_t""" - return __core.InputStream_LastRead(*args, **kwargs) + return _core_.InputStream_LastRead(*args, **kwargs) def CanRead(*args, **kwargs): """CanRead(self) -> bool""" - return __core.InputStream_CanRead(*args, **kwargs) + return _core_.InputStream_CanRead(*args, **kwargs) def Eof(*args, **kwargs): """Eof(self) -> bool""" - return __core.InputStream_Eof(*args, **kwargs) + return _core_.InputStream_Eof(*args, **kwargs) def Ungetch(*args, **kwargs): """Ungetch(self, char c) -> bool""" - return __core.InputStream_Ungetch(*args, **kwargs) + return _core_.InputStream_Ungetch(*args, **kwargs) def SeekI(*args, **kwargs): - """SeekI(self, long pos, int mode=wxFromStart) -> long""" - return __core.InputStream_SeekI(*args, **kwargs) + """SeekI(self, long pos, int mode=FromStart) -> long""" + return _core_.InputStream_SeekI(*args, **kwargs) def TellI(*args, **kwargs): """TellI(self) -> long""" - return __core.InputStream_TellI(*args, **kwargs) - + return _core_.InputStream_TellI(*args, **kwargs) -class InputStreamPtr(InputStream): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = InputStream -__core.InputStream_swigregister(InputStreamPtr) -wxDefaultPosition = cvar.wxDefaultPosition -wxDefaultSize = cvar.wxDefaultSize +_core_.InputStream_swigregister(InputStream) +DefaultPosition = cvar.DefaultPosition +DefaultSize = cvar.DefaultSize -class wxOutputStream(object): - """Proxy of C++ wxOutputStream class""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) +class OutputStream(object): + """Proxy of C++ OutputStream class""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def write(*args, **kwargs): """write(self, PyObject obj)""" - return __core.wxOutputStream_write(*args, **kwargs) + return _core_.OutputStream_write(*args, **kwargs) + def LastWrite(*args, **kwargs): + """LastWrite(self) -> size_t""" + return _core_.OutputStream_LastWrite(*args, **kwargs) -class wxOutputStreamPtr(wxOutputStream): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxOutputStream -__core.wxOutputStream_swigregister(wxOutputStreamPtr) +_core_.OutputStream_swigregister(OutputStream) #--------------------------------------------------------------------------- -class wxFSFile(wxObject): - """Proxy of C++ wxFSFile class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): +class FSFile(Object): + """Proxy of C++ FSFile 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, wxInputStream stream, wxString loc, wxString mimetype, - wxString anchor, wxDateTime modif) -> wxFSFile + __init__(self, InputStream stream, String loc, String mimetype, String anchor, + DateTime modif) -> FSFile """ - newobj = __core.new_wxFSFile(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem - - def __del__(self, destroy=__core.delete_wxFSFile): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.FSFile_swiginit(self,_core_.new_FSFile(*args, **kwargs)) + __swig_destroy__ = _core_.delete_FSFile + __del__ = lambda self : None; def GetStream(*args, **kwargs): - """GetStream(self) -> wxInputStream""" - return __core.wxFSFile_GetStream(*args, **kwargs) + """GetStream(self) -> InputStream""" + return _core_.FSFile_GetStream(*args, **kwargs) + + def DetachStream(*args, **kwargs): + """DetachStream(self)""" + return _core_.FSFile_DetachStream(*args, **kwargs) def GetMimeType(*args, **kwargs): - """GetMimeType(self) -> wxString""" - return __core.wxFSFile_GetMimeType(*args, **kwargs) + """GetMimeType(self) -> String""" + return _core_.FSFile_GetMimeType(*args, **kwargs) def GetLocation(*args, **kwargs): - """GetLocation(self) -> wxString""" - return __core.wxFSFile_GetLocation(*args, **kwargs) + """GetLocation(self) -> String""" + return _core_.FSFile_GetLocation(*args, **kwargs) def GetAnchor(*args, **kwargs): - """GetAnchor(self) -> wxString""" - return __core.wxFSFile_GetAnchor(*args, **kwargs) + """GetAnchor(self) -> String""" + return _core_.FSFile_GetAnchor(*args, **kwargs) def GetModificationTime(*args, **kwargs): - """GetModificationTime(self) -> wxDateTime""" - return __core.wxFSFile_GetModificationTime(*args, **kwargs) + """GetModificationTime(self) -> DateTime""" + return _core_.FSFile_GetModificationTime(*args, **kwargs) - -class wxFSFilePtr(wxFSFile): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxFSFile -__core.wxFSFile_swigregister(wxFSFilePtr) + Anchor = property(GetAnchor,doc="See `GetAnchor`") + Location = property(GetLocation,doc="See `GetLocation`") + MimeType = property(GetMimeType,doc="See `GetMimeType`") + ModificationTime = property(GetModificationTime,doc="See `GetModificationTime`") + Stream = property(GetStream,doc="See `GetStream`") +_core_.FSFile_swigregister(FSFile) class CPPFileSystemHandler(object): """Proxy of C++ CPPFileSystemHandler class""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - -class CPPFileSystemHandlerPtr(CPPFileSystemHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = CPPFileSystemHandler -__core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_CPPFileSystemHandler + __del__ = lambda self : None; +_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandler) class FileSystemHandler(CPPFileSystemHandler): """Proxy of C++ FileSystemHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> FileSystemHandler""" - newobj = __core.new_FileSystemHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs)) self._setCallbackInfo(self, FileSystemHandler) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" - return __core.FileSystemHandler__setCallbackInfo(*args, **kwargs) + return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs) def CanOpen(*args, **kwargs): - """CanOpen(self, wxString location) -> bool""" - return __core.FileSystemHandler_CanOpen(*args, **kwargs) + """CanOpen(self, String location) -> bool""" + return _core_.FileSystemHandler_CanOpen(*args, **kwargs) def OpenFile(*args, **kwargs): - """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile""" - return __core.FileSystemHandler_OpenFile(*args, **kwargs) + """OpenFile(self, FileSystem fs, String location) -> FSFile""" + return _core_.FileSystemHandler_OpenFile(*args, **kwargs) def FindFirst(*args, **kwargs): - """FindFirst(self, wxString spec, int flags=0) -> wxString""" - return __core.FileSystemHandler_FindFirst(*args, **kwargs) + """FindFirst(self, String spec, int flags=0) -> String""" + return _core_.FileSystemHandler_FindFirst(*args, **kwargs) def FindNext(*args, **kwargs): - """FindNext(self) -> wxString""" - return __core.FileSystemHandler_FindNext(*args, **kwargs) + """FindNext(self) -> String""" + return _core_.FileSystemHandler_FindNext(*args, **kwargs) def GetProtocol(*args, **kwargs): - """GetProtocol(self, wxString location) -> wxString""" - return __core.FileSystemHandler_GetProtocol(*args, **kwargs) + """GetProtocol(self, String location) -> String""" + return _core_.FileSystemHandler_GetProtocol(*args, **kwargs) def GetLeftLocation(*args, **kwargs): - """GetLeftLocation(self, wxString location) -> wxString""" - return __core.FileSystemHandler_GetLeftLocation(*args, **kwargs) + """GetLeftLocation(self, String location) -> String""" + return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs) def GetAnchor(*args, **kwargs): - """GetAnchor(self, wxString location) -> wxString""" - return __core.FileSystemHandler_GetAnchor(*args, **kwargs) + """GetAnchor(self, String location) -> String""" + return _core_.FileSystemHandler_GetAnchor(*args, **kwargs) def GetRightLocation(*args, **kwargs): - """GetRightLocation(self, wxString location) -> wxString""" - return __core.FileSystemHandler_GetRightLocation(*args, **kwargs) + """GetRightLocation(self, String location) -> String""" + return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs) def GetMimeTypeFromExt(*args, **kwargs): - """GetMimeTypeFromExt(self, wxString location) -> wxString""" - return __core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) - - -class FileSystemHandlerPtr(FileSystemHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = FileSystemHandler -__core.FileSystemHandler_swigregister(FileSystemHandlerPtr) - -class wxFileSystem(wxObject): - """Proxy of C++ wxFileSystem class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxFileSystem""" - newobj = __core.new_wxFileSystem(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxFileSystem): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + """GetMimeTypeFromExt(self, String location) -> String""" + return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs) + + Anchor = property(GetAnchor,doc="See `GetAnchor`") + LeftLocation = property(GetLeftLocation,doc="See `GetLeftLocation`") + MimeTypeFromExt = property(GetMimeTypeFromExt,doc="See `GetMimeTypeFromExt`") + Protocol = property(GetProtocol,doc="See `GetProtocol`") + RightLocation = property(GetRightLocation,doc="See `GetRightLocation`") +_core_.FileSystemHandler_swigregister(FileSystemHandler) + +class FileSystem(Object): + """Proxy of C++ FileSystem 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) -> FileSystem""" + _core_.FileSystem_swiginit(self,_core_.new_FileSystem(*args, **kwargs)) + __swig_destroy__ = _core_.delete_FileSystem + __del__ = lambda self : None; def ChangePathTo(*args, **kwargs): - """ChangePathTo(self, wxString location, bool is_dir=False)""" - return __core.wxFileSystem_ChangePathTo(*args, **kwargs) + """ChangePathTo(self, String location, bool is_dir=False)""" + return _core_.FileSystem_ChangePathTo(*args, **kwargs) def GetPath(*args, **kwargs): - """GetPath(self) -> wxString""" - return __core.wxFileSystem_GetPath(*args, **kwargs) + """GetPath(self) -> String""" + return _core_.FileSystem_GetPath(*args, **kwargs) def OpenFile(*args, **kwargs): - """OpenFile(self, wxString location) -> wxFSFile""" - return __core.wxFileSystem_OpenFile(*args, **kwargs) + """OpenFile(self, String location) -> FSFile""" + return _core_.FileSystem_OpenFile(*args, **kwargs) def FindFirst(*args, **kwargs): - """FindFirst(self, wxString spec, int flags=0) -> wxString""" - return __core.wxFileSystem_FindFirst(*args, **kwargs) + """FindFirst(self, String spec, int flags=0) -> String""" + return _core_.FileSystem_FindFirst(*args, **kwargs) def FindNext(*args, **kwargs): - """FindNext(self) -> wxString""" - return __core.wxFileSystem_FindNext(*args, **kwargs) + """FindNext(self) -> String""" + return _core_.FileSystem_FindNext(*args, **kwargs) def AddHandler(*args, **kwargs): """AddHandler(CPPFileSystemHandler handler)""" - return __core.wxFileSystem_AddHandler(*args, **kwargs) + return _core_.FileSystem_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) + def RemoveHandler(*args, **kwargs): + """RemoveHandler(CPPFileSystemHandler handler) -> CPPFileSystemHandler""" + return _core_.FileSystem_RemoveHandler(*args, **kwargs) + + RemoveHandler = staticmethod(RemoveHandler) def CleanUpHandlers(*args, **kwargs): """CleanUpHandlers()""" - return __core.wxFileSystem_CleanUpHandlers(*args, **kwargs) + return _core_.FileSystem_CleanUpHandlers(*args, **kwargs) CleanUpHandlers = staticmethod(CleanUpHandlers) def FileNameToURL(*args, **kwargs): - """FileNameToURL(wxString filename) -> wxString""" - return __core.wxFileSystem_FileNameToURL(*args, **kwargs) + """FileNameToURL(String filename) -> String""" + return _core_.FileSystem_FileNameToURL(*args, **kwargs) FileNameToURL = staticmethod(FileNameToURL) def URLToFileName(*args, **kwargs): - """URLToFileName(wxString url) -> wxString""" - return __core.wxFileSystem_URLToFileName(*args, **kwargs) + """URLToFileName(String url) -> String""" + return _core_.FileSystem_URLToFileName(*args, **kwargs) URLToFileName = staticmethod(URLToFileName) - -class wxFileSystemPtr(wxFileSystem): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxFileSystem -__core.wxFileSystem_swigregister(wxFileSystemPtr) - -def wxFileSystem_AddHandler(*args, **kwargs): - """wxFileSystem_AddHandler(CPPFileSystemHandler handler)""" - return __core.wxFileSystem_AddHandler(*args, **kwargs) - -def wxFileSystem_CleanUpHandlers(*args, **kwargs): - """wxFileSystem_CleanUpHandlers()""" - return __core.wxFileSystem_CleanUpHandlers(*args, **kwargs) - -def wxFileSystem_FileNameToURL(*args, **kwargs): - """wxFileSystem_FileNameToURL(wxString filename) -> wxString""" - return __core.wxFileSystem_FileNameToURL(*args, **kwargs) - -def wxFileSystem_URLToFileName(*args, **kwargs): - """wxFileSystem_URLToFileName(wxString url) -> wxString""" - return __core.wxFileSystem_URLToFileName(*args, **kwargs) - -class wxInternetFSHandler(CPPFileSystemHandler): - """Proxy of C++ wxInternetFSHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxInternetFSHandler""" - newobj = __core.new_wxInternetFSHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + Path = property(GetPath,doc="See `GetPath`") +_core_.FileSystem_swigregister(FileSystem) + +def FileSystem_AddHandler(*args, **kwargs): + """FileSystem_AddHandler(CPPFileSystemHandler handler)""" + return _core_.FileSystem_AddHandler(*args, **kwargs) + +def FileSystem_RemoveHandler(*args, **kwargs): + """FileSystem_RemoveHandler(CPPFileSystemHandler handler) -> CPPFileSystemHandler""" + return _core_.FileSystem_RemoveHandler(*args, **kwargs) + +def FileSystem_CleanUpHandlers(*args): + """FileSystem_CleanUpHandlers()""" + return _core_.FileSystem_CleanUpHandlers(*args) + +def FileSystem_FileNameToURL(*args, **kwargs): + """FileSystem_FileNameToURL(String filename) -> String""" + return _core_.FileSystem_FileNameToURL(*args, **kwargs) + +def FileSystem_URLToFileName(*args, **kwargs): + """FileSystem_URLToFileName(String url) -> String""" + return _core_.FileSystem_URLToFileName(*args, **kwargs) + +class InternetFSHandler(CPPFileSystemHandler): + """Proxy of C++ InternetFSHandler 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) -> InternetFSHandler""" + _core_.InternetFSHandler_swiginit(self,_core_.new_InternetFSHandler(*args, **kwargs)) def CanOpen(*args, **kwargs): - """CanOpen(self, wxString location) -> bool""" - return __core.wxInternetFSHandler_CanOpen(*args, **kwargs) + """CanOpen(self, String location) -> bool""" + return _core_.InternetFSHandler_CanOpen(*args, **kwargs) def OpenFile(*args, **kwargs): - """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile""" - return __core.wxInternetFSHandler_OpenFile(*args, **kwargs) - - -class wxInternetFSHandlerPtr(wxInternetFSHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxInternetFSHandler -__core.wxInternetFSHandler_swigregister(wxInternetFSHandlerPtr) - -class wxZipFSHandler(CPPFileSystemHandler): - """Proxy of C++ wxZipFSHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxZipFSHandler""" - newobj = __core.new_wxZipFSHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + """OpenFile(self, FileSystem fs, String location) -> FSFile""" + return _core_.InternetFSHandler_OpenFile(*args, **kwargs) + +_core_.InternetFSHandler_swigregister(InternetFSHandler) + +class ZipFSHandler(CPPFileSystemHandler): + """Proxy of C++ ZipFSHandler 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) -> ZipFSHandler""" + _core_.ZipFSHandler_swiginit(self,_core_.new_ZipFSHandler(*args, **kwargs)) def CanOpen(*args, **kwargs): - """CanOpen(self, wxString location) -> bool""" - return __core.wxZipFSHandler_CanOpen(*args, **kwargs) + """CanOpen(self, String location) -> bool""" + return _core_.ZipFSHandler_CanOpen(*args, **kwargs) def OpenFile(*args, **kwargs): - """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile""" - return __core.wxZipFSHandler_OpenFile(*args, **kwargs) + """OpenFile(self, FileSystem fs, String location) -> FSFile""" + return _core_.ZipFSHandler_OpenFile(*args, **kwargs) def FindFirst(*args, **kwargs): - """FindFirst(self, wxString spec, int flags=0) -> wxString""" - return __core.wxZipFSHandler_FindFirst(*args, **kwargs) + """FindFirst(self, String spec, int flags=0) -> String""" + return _core_.ZipFSHandler_FindFirst(*args, **kwargs) def FindNext(*args, **kwargs): - """FindNext(self) -> wxString""" - return __core.wxZipFSHandler_FindNext(*args, **kwargs) + """FindNext(self) -> String""" + return _core_.ZipFSHandler_FindNext(*args, **kwargs) - -class wxZipFSHandlerPtr(wxZipFSHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxZipFSHandler -__core.wxZipFSHandler_swigregister(wxZipFSHandlerPtr) +_core_.ZipFSHandler_swigregister(ZipFSHandler) def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs): - """__wxMemoryFSHandler_AddFile_wxImage(wxString filename, wxImage image, long type)""" - return __core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) + """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)""" + return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs) def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs): - """__wxMemoryFSHandler_AddFile_wxBitmap(wxString filename, wxBitmap bitmap, long type)""" - return __core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) + """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)""" + return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs) def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs): - """__wxMemoryFSHandler_AddFile_Data(wxString filename, PyObject data)""" - return __core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) + """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)""" + return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs) def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): """ Add 'file' to the memory filesystem. The dataItem parameter can @@ -1989,118 +2267,182 @@ def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1): else: raise TypeError, 'wx.Image, wx.Bitmap or string expected' -class wxMemoryFSHandler(CPPFileSystemHandler): - """Proxy of C++ wxMemoryFSHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxMemoryFSHandler""" - newobj = __core.new_wxMemoryFSHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class MemoryFSHandler(CPPFileSystemHandler): + """Proxy of C++ MemoryFSHandler 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) -> MemoryFSHandler""" + _core_.MemoryFSHandler_swiginit(self,_core_.new_MemoryFSHandler(*args, **kwargs)) def RemoveFile(*args, **kwargs): - """RemoveFile(wxString filename)""" - return __core.wxMemoryFSHandler_RemoveFile(*args, **kwargs) + """RemoveFile(String filename)""" + return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) RemoveFile = staticmethod(RemoveFile) AddFile = staticmethod(MemoryFSHandler_AddFile) def CanOpen(*args, **kwargs): - """CanOpen(self, wxString location) -> bool""" - return __core.wxMemoryFSHandler_CanOpen(*args, **kwargs) + """CanOpen(self, String location) -> bool""" + return _core_.MemoryFSHandler_CanOpen(*args, **kwargs) def OpenFile(*args, **kwargs): - """OpenFile(self, wxFileSystem fs, wxString location) -> wxFSFile""" - return __core.wxMemoryFSHandler_OpenFile(*args, **kwargs) + """OpenFile(self, FileSystem fs, String location) -> FSFile""" + return _core_.MemoryFSHandler_OpenFile(*args, **kwargs) def FindFirst(*args, **kwargs): - """FindFirst(self, wxString spec, int flags=0) -> wxString""" - return __core.wxMemoryFSHandler_FindFirst(*args, **kwargs) + """FindFirst(self, String spec, int flags=0) -> String""" + return _core_.MemoryFSHandler_FindFirst(*args, **kwargs) def FindNext(*args, **kwargs): - """FindNext(self) -> wxString""" - return __core.wxMemoryFSHandler_FindNext(*args, **kwargs) + """FindNext(self) -> String""" + return _core_.MemoryFSHandler_FindNext(*args, **kwargs) +_core_.MemoryFSHandler_swigregister(MemoryFSHandler) -class wxMemoryFSHandlerPtr(wxMemoryFSHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMemoryFSHandler -__core.wxMemoryFSHandler_swigregister(wxMemoryFSHandlerPtr) - -def wxMemoryFSHandler_RemoveFile(*args, **kwargs): - """wxMemoryFSHandler_RemoveFile(wxString filename)""" - return __core.wxMemoryFSHandler_RemoveFile(*args, **kwargs) +def MemoryFSHandler_RemoveFile(*args, **kwargs): + """MemoryFSHandler_RemoveFile(String filename)""" + return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs) +IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT +IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD +IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE +IMAGE_QUALITY_NORMAL = _core_.IMAGE_QUALITY_NORMAL +IMAGE_QUALITY_HIGH = _core_.IMAGE_QUALITY_HIGH #--------------------------------------------------------------------------- -class wxImageHandler(wxObject): - """Proxy of C++ wxImageHandler class""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) +class ImageHandler(Object): + """ + This is the base class for implementing image file loading/saving, and + image creation from data. It is used within `wx.Image` and is not + normally seen by the application. + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def GetName(*args, **kwargs): - """GetName(self) -> wxString""" - return __core.wxImageHandler_GetName(*args, **kwargs) + """GetName(self) -> String""" + return _core_.ImageHandler_GetName(*args, **kwargs) def GetExtension(*args, **kwargs): - """GetExtension(self) -> wxString""" - return __core.wxImageHandler_GetExtension(*args, **kwargs) + """GetExtension(self) -> String""" + return _core_.ImageHandler_GetExtension(*args, **kwargs) def GetType(*args, **kwargs): """GetType(self) -> long""" - return __core.wxImageHandler_GetType(*args, **kwargs) + return _core_.ImageHandler_GetType(*args, **kwargs) def GetMimeType(*args, **kwargs): - """GetMimeType(self) -> wxString""" - return __core.wxImageHandler_GetMimeType(*args, **kwargs) + """GetMimeType(self) -> String""" + return _core_.ImageHandler_GetMimeType(*args, **kwargs) def CanRead(*args, **kwargs): - """CanRead(self, wxString name) -> bool""" - return __core.wxImageHandler_CanRead(*args, **kwargs) + """CanRead(self, String name) -> bool""" + return _core_.ImageHandler_CanRead(*args, **kwargs) + + def CanReadStream(*args, **kwargs): + """CanReadStream(self, InputStream stream) -> bool""" + return _core_.ImageHandler_CanReadStream(*args, **kwargs) def SetName(*args, **kwargs): - """SetName(self, wxString name)""" - return __core.wxImageHandler_SetName(*args, **kwargs) + """SetName(self, String name)""" + return _core_.ImageHandler_SetName(*args, **kwargs) def SetExtension(*args, **kwargs): - """SetExtension(self, wxString extension)""" - return __core.wxImageHandler_SetExtension(*args, **kwargs) + """SetExtension(self, String extension)""" + return _core_.ImageHandler_SetExtension(*args, **kwargs) def SetType(*args, **kwargs): """SetType(self, long type)""" - return __core.wxImageHandler_SetType(*args, **kwargs) + return _core_.ImageHandler_SetType(*args, **kwargs) def SetMimeType(*args, **kwargs): - """SetMimeType(self, wxString mimetype)""" - return __core.wxImageHandler_SetMimeType(*args, **kwargs) + """SetMimeType(self, String mimetype)""" + return _core_.ImageHandler_SetMimeType(*args, **kwargs) + Extension = property(GetExtension,SetExtension,doc="See `GetExtension` and `SetExtension`") + MimeType = property(GetMimeType,SetMimeType,doc="See `GetMimeType` and `SetMimeType`") + Name = property(GetName,SetName,doc="See `GetName` and `SetName`") + Type = property(GetType,SetType,doc="See `GetType` and `SetType`") +_core_.ImageHandler_swigregister(ImageHandler) -class wxImageHandlerPtr(wxImageHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxImageHandler -__core.wxImageHandler_swigregister(wxImageHandlerPtr) +class PyImageHandler(ImageHandler): + """ + This is the base class for implementing image file loading/saving, and + image creation from data, all written in Python. To create a custom + image handler derive a new class from wx.PyImageHandler and provide + the following methods:: -class wxImageHistogram(object): - """Proxy of C++ wxImageHistogram class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxImageHistogram""" - newobj = __core.new_wxImageHistogram(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + def DoCanRead(self, stream) --> bool + '''Check if this handler can read the image on the stream''' + + def LoadFile(self, image, stream, verbose, index) --> bool + '''Load image data from the stream and load it into image.''' + + def SaveFile(self, image, stream, verbose) --> bool + '''Save the iamge data in image to the stream using + this handler's image file format.''' + + def GetImageCount(self, stream) --> int + '''If this image format can hold more than one image, + how many does the image on the stream have?''' + + To activate your handler create an instance of it and pass it to + `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and + `SetExtension` from your constructor. + + """ + 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) -> PyImageHandler + + This is the base class for implementing image file loading/saving, and + image creation from data, all written in Python. To create a custom + image handler derive a new class from wx.PyImageHandler and provide + the following methods:: + + def DoCanRead(self, stream) --> bool + '''Check if this handler can read the image on the stream''' + + def LoadFile(self, image, stream, verbose, index) --> bool + '''Load image data from the stream and load it into image.''' + + def SaveFile(self, image, stream, verbose) --> bool + '''Save the iamge data in image to the stream using + this handler's image file format.''' + + def GetImageCount(self, stream) --> int + '''If this image format can hold more than one image, + how many does the image on the stream have?''' + + To activate your handler create an instance of it and pass it to + `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and + `SetExtension` from your constructor. + + """ + _core_.PyImageHandler_swiginit(self,_core_.new_PyImageHandler(*args, **kwargs)) + self._SetSelf(self) + + def _SetSelf(*args, **kwargs): + """_SetSelf(self, PyObject self)""" + return _core_.PyImageHandler__SetSelf(*args, **kwargs) + +_core_.PyImageHandler_swigregister(PyImageHandler) + +class ImageHistogram(object): + """Proxy of C++ ImageHistogram 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) -> ImageHistogram""" + _core_.ImageHistogram_swiginit(self,_core_.new_ImageHistogram(*args, **kwargs)) def MakeKey(*args, **kwargs): """ - MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long + MakeKey(byte r, byte g, byte b) -> unsigned long Get the key in the histogram for the given RGB values """ - return __core.wxImageHistogram_MakeKey(*args, **kwargs) + return _core_.ImageHistogram_MakeKey(*args, **kwargs) MakeKey = staticmethod(MakeKey) def FindFirstUnusedColour(*args, **kwargs): @@ -2111,7 +2453,7 @@ class wxImageHistogram(object): values than startR, startG, startB. Returns a tuple consisting of a success flag and rgb values. """ - return __core.wxImageHistogram_FindFirstUnusedColour(*args, **kwargs) + return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs) def GetCount(*args, **kwargs): """ @@ -2120,126 +2462,316 @@ class wxImageHistogram(object): Returns the pixel count for the given key. Use `MakeKey` to create a key value from a RGB tripple. """ - return __core.wxImageHistogram_GetCount(*args, **kwargs) + return _core_.ImageHistogram_GetCount(*args, **kwargs) def GetCountRGB(*args, **kwargs): """ - GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long + GetCountRGB(self, byte r, byte g, byte b) -> unsigned long Returns the pixel count for the given RGB values. """ - return __core.wxImageHistogram_GetCountRGB(*args, **kwargs) + return _core_.ImageHistogram_GetCountRGB(*args, **kwargs) def GetCountColour(*args, **kwargs): """ - GetCountColour(self, wxColour colour) -> unsigned long + GetCountColour(self, Colour colour) -> unsigned long Returns the pixel count for the given `wx.Colour` value. """ - return __core.wxImageHistogram_GetCountColour(*args, **kwargs) + return _core_.ImageHistogram_GetCountColour(*args, **kwargs) +_core_.ImageHistogram_swigregister(ImageHistogram) -class wxImageHistogramPtr(wxImageHistogram): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxImageHistogram -__core.wxImageHistogram_swigregister(wxImageHistogramPtr) +def ImageHistogram_MakeKey(*args, **kwargs): + """ + ImageHistogram_MakeKey(byte r, byte g, byte b) -> unsigned long -def wxImageHistogram_MakeKey(*args, **kwargs): + Get the key in the histogram for the given RGB values """ - wxImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long + return _core_.ImageHistogram_MakeKey(*args, **kwargs) - Get the key in the histogram for the given RGB values +class Image_RGBValue(object): """ - return __core.wxImageHistogram_MakeKey(*args, **kwargs) + An object that contains values for red, green and blue which represent + the value of a color. It is used by `wx.Image.HSVtoRGB` and + `wx.Image.RGBtoHSV`, which converts between HSV color space and RGB + color space. + """ + 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, byte r=0, byte g=0, byte b=0) -> Image_RGBValue -class wxImage(wxObject): - """Proxy of C++ wxImage class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxString name, long type=wxBITMAP_TYPE_ANY, int index=-1) -> wxImage""" - newobj = __core.new_wxImage(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxImage): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + Constructor. + """ + _core_.Image_RGBValue_swiginit(self,_core_.new_Image_RGBValue(*args, **kwargs)) + red = property(_core_.Image_RGBValue_red_get, _core_.Image_RGBValue_red_set) + green = property(_core_.Image_RGBValue_green_get, _core_.Image_RGBValue_green_set) + blue = property(_core_.Image_RGBValue_blue_get, _core_.Image_RGBValue_blue_set) +_core_.Image_RGBValue_swigregister(Image_RGBValue) + +class Image_HSVValue(object): + """ + An object that contains values for hue, saturation and value which + represent the value of a color. It is used by `wx.Image.HSVtoRGB` and + `wx.Image.RGBtoHSV`, which +converts between HSV color space and RGB + color space. + """ + 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, double h=0.0, double s=0.0, double v=0.0) -> Image_HSVValue + + Constructor. + """ + _core_.Image_HSVValue_swiginit(self,_core_.new_Image_HSVValue(*args, **kwargs)) + hue = property(_core_.Image_HSVValue_hue_get, _core_.Image_HSVValue_hue_set) + saturation = property(_core_.Image_HSVValue_saturation_get, _core_.Image_HSVValue_saturation_set) + value = property(_core_.Image_HSVValue_value_get, _core_.Image_HSVValue_value_set) +_core_.Image_HSVValue_swigregister(Image_HSVValue) + +class Image(Object): + """ + A platform-independent image class. An image can be created from + data, or using `wx.Bitmap.ConvertToImage`, or loaded from a file in a + variety of formats. Functions are available to set and get image + bits, so it can be used for basic image manipulation. + + A wx.Image cannot be drawn directly to a `wx.DC`. Instead, a + platform-specific `wx.Bitmap` object must be created from it using the + `wx.BitmapFromImage` constructor. This bitmap can then be drawn in a + device context, using `wx.DC.DrawBitmap`. + + One colour value of the image may be used as a mask colour which will + lead to the automatic creation of a `wx.Mask` object associated to the + bitmap object. + + wx.Image supports alpha channel data, that is in addition to a byte + for the red, green and blue colour components for each pixel it also + stores a byte representing the pixel opacity. An alpha value of 0 + corresponds to a transparent pixel (null opacity) while a value of 255 + means that the pixel is 100% opaque. + Unlike RGB data, not all images have an alpha channel and before using + `GetAlpha` you should check if this image contains an alpha channel + with `HasAlpha`. Note that currently only images loaded from PNG files + with transparency information will have an alpha channel. + """ + 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, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image + + Loads an image from a file. + """ + _core_.Image_swiginit(self,_core_.new_Image(*args, **kwargs)) + __swig_destroy__ = _core_.delete_Image + __del__ = lambda self : None; def Create(*args, **kwargs): - """Create(self, int width, int height)""" - return __core.wxImage_Create(*args, **kwargs) + """ + Create(self, int width, int height, bool clear=True) + + Creates a fresh image. If clear is ``True``, the new image will be + initialized to black. Otherwise, the image data will be uninitialized. + """ + return _core_.Image_Create(*args, **kwargs) def Destroy(*args, **kwargs): """ Destroy(self) - Deletes the C++ object this Python object is a proxy for. + Destroys the image data. """ - return __core.wxImage_Destroy(*args, **kwargs) + args[0].this.own(False) + return _core_.Image_Destroy(*args, **kwargs) def Scale(*args, **kwargs): - """Scale(self, int width, int height) -> wxImage""" - return __core.wxImage_Scale(*args, **kwargs) + """ + Scale(self, int width, int height, int quality=IMAGE_QUALITY_NORMAL) -> Image - def ShrinkBy(*args, **kwargs): - """ShrinkBy(self, int xFactor, int yFactor) -> wxImage""" - return __core.wxImage_ShrinkBy(*args, **kwargs) + Returns a scaled version of the image. This is also useful for scaling + bitmaps in general as the only other way to scale bitmaps is to blit a + `wx.MemoryDC` into another `wx.MemoryDC`. The ``quality`` parameter + specifies what method to use for resampling the image. It can be + either wx.IMAGE_QUALITY_NORMAL, which uses the normal default scaling + method of pixel replication, or wx.IMAGE_QUALITY_HIGH which uses + bicubic and box averaging resampling methods for upsampling and + downsampling respectively. + """ + return _core_.Image_Scale(*args, **kwargs) - def Rescale(*args, **kwargs): - """Rescale(self, int width, int height) -> wxImage""" - return __core.wxImage_Rescale(*args, **kwargs) + def ResampleBox(*args, **kwargs): + """ResampleBox(self, int width, int height) -> Image""" + return _core_.Image_ResampleBox(*args, **kwargs) - def Resize(*args, **kwargs): - """Resize(self, wxSize size, wxPoint pos, int r=-1, int g=-1, int b=-1) -> wxImage""" - return __core.wxImage_Resize(*args, **kwargs) + def ResampleBicubic(*args, **kwargs): + """ResampleBicubic(self, int width, int height) -> Image""" + return _core_.Image_ResampleBicubic(*args, **kwargs) - def SetRGB(*args, **kwargs): - """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)""" - return __core.wxImage_SetRGB(*args, **kwargs) + def Blur(*args, **kwargs): + """ + Blur(self, int radius) -> Image - def SetRGBRect(*args, **kwargs): - """SetRGBRect(self, wxRect rect, unsigned char r, unsigned char g, unsigned char b)""" - return __core.wxImage_SetRGBRect(*args, **kwargs) + Blurs the image in both horizontal and vertical directions by the + specified pixel ``radius``. This should not be used when using a + single mask colour for transparency. + """ + return _core_.Image_Blur(*args, **kwargs) - def GetRed(*args, **kwargs): - """GetRed(self, int x, int y) -> unsigned char""" - return __core.wxImage_GetRed(*args, **kwargs) + def BlurHorizontal(*args, **kwargs): + """ + BlurHorizontal(self, int radius) -> Image - def GetGreen(*args, **kwargs): - """GetGreen(self, int x, int y) -> unsigned char""" - return __core.wxImage_GetGreen(*args, **kwargs) + Blurs the image in the horizontal direction only. This should not be + used when using a single mask colour for transparency. - def GetBlue(*args, **kwargs): - """GetBlue(self, int x, int y) -> unsigned char""" - return __core.wxImage_GetBlue(*args, **kwargs) + """ + return _core_.Image_BlurHorizontal(*args, **kwargs) - def SetAlpha(*args, **kwargs): - """SetAlpha(self, int x, int y, unsigned char alpha)""" - return __core.wxImage_SetAlpha(*args, **kwargs) + def BlurVertical(*args, **kwargs): + """ + BlurVertical(self, int radius) -> Image - def GetAlpha(*args, **kwargs): - """GetAlpha(self, int x, int y) -> unsigned char""" - return __core.wxImage_GetAlpha(*args, **kwargs) + Blurs the image in the vertical direction only. This should not be + used when using a single mask colour for transparency. + """ + return _core_.Image_BlurVertical(*args, **kwargs) - def HasAlpha(*args, **kwargs): - """HasAlpha(self) -> bool""" - return __core.wxImage_HasAlpha(*args, **kwargs) + def ShrinkBy(*args, **kwargs): + """ + ShrinkBy(self, int xFactor, int yFactor) -> Image - def InitAlpha(*args, **kwargs): + Return a version of the image scaled smaller by the given factors. """ - InitAlpha(self) + return _core_.Image_ShrinkBy(*args, **kwargs) - Initializes the image alpha channel data. It is an error to call it if + def Rescale(*args, **kwargs): + """ + Rescale(self, int width, int height, int quality=IMAGE_QUALITY_NORMAL) -> Image + + Changes the size of the image in-place by scaling it: after a call to + this function, the image will have the given width and height. + + Returns the (modified) image itself. + """ + return _core_.Image_Rescale(*args, **kwargs) + + def Resize(*args, **kwargs): + """ + Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image + + Changes the size of the image in-place without scaling it, by adding + either a border with the given colour or cropping as necessary. The + image is pasted into a new image with the given size and background + colour at the position pos relative to the upper left of the new + image. If red = green = blue = -1 then use either the current mask + colour if set or find, use, and set a suitable mask colour for any + newly exposed areas. + + Returns the (modified) image itself. + """ + return _core_.Image_Resize(*args, **kwargs) + + def SetRGB(*args, **kwargs): + """ + SetRGB(self, int x, int y, byte r, byte g, byte b) + + Sets the pixel at the given coordinate. This routine performs + bounds-checks for the coordinate so it can be considered a safe way to + manipulate the data, but in some cases this might be too slow so that + the data will have to be set directly. In that case you will have to + get access to the image data using the `GetData` method. + """ + return _core_.Image_SetRGB(*args, **kwargs) + + def SetRGBRect(*args, **kwargs): + """ + SetRGBRect(self, Rect rect, byte r, byte g, byte b) + + Sets the colour of the pixels within the given rectangle. This routine + performs bounds-checks for the rectangle so it can be considered a + safe way to manipulate the data. + """ + return _core_.Image_SetRGBRect(*args, **kwargs) + + def GetRed(*args, **kwargs): + """ + GetRed(self, int x, int y) -> byte + + Returns the red intensity at the given coordinate. + """ + return _core_.Image_GetRed(*args, **kwargs) + + def GetGreen(*args, **kwargs): + """ + GetGreen(self, int x, int y) -> byte + + Returns the green intensity at the given coordinate. + """ + return _core_.Image_GetGreen(*args, **kwargs) + + def GetBlue(*args, **kwargs): + """ + GetBlue(self, int x, int y) -> byte + + Returns the blue intensity at the given coordinate. + """ + return _core_.Image_GetBlue(*args, **kwargs) + + def SetAlpha(*args, **kwargs): + """ + SetAlpha(self, int x, int y, byte alpha) + + Sets the alpha value for the given pixel. This function should only be + called if the image has alpha channel data, use `HasAlpha` to check + for this. + """ + return _core_.Image_SetAlpha(*args, **kwargs) + + def GetAlpha(*args, **kwargs): + """ + GetAlpha(self, int x, int y) -> byte + + Returns the alpha value for the given pixel. This function may only be + called for the images with alpha channel, use `HasAlpha` to check for + this. + + The returned value is the *opacity* of the image, i.e. the value of 0 + corresponds to the fully transparent pixels while the value of 255 to + the fully opaque pixels. + """ + return _core_.Image_GetAlpha(*args, **kwargs) + + def HasAlpha(*args, **kwargs): + """ + HasAlpha(self) -> bool + + Returns true if this image has alpha channel, false otherwise. + """ + return _core_.Image_HasAlpha(*args, **kwargs) + + def InitAlpha(*args, **kwargs): + """ + InitAlpha(self) + + Initializes the image alpha channel data. It is an error to call it if the image already has alpha data. If it doesn't, alpha data will be by default initialized to all pixels being fully opaque. But if the image has a a mask colour, all mask pixels will be completely transparent. """ - return __core.wxImage_InitAlpha(*args, **kwargs) + return _core_.Image_InitAlpha(*args, **kwargs) + + def IsTransparent(*args, **kwargs): + """ + IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool + + Returns ``True`` if this pixel is masked or has an alpha value less + than the spcified threshold. + """ + return _core_.Image_IsTransparent(*args, **kwargs) def FindFirstUnusedColour(*args, **kwargs): """ @@ -2249,25 +2781,25 @@ class wxImage(wxObject): values than startR, startG, startB. Returns a tuple consisting of a success flag and rgb values. """ - return __core.wxImage_FindFirstUnusedColour(*args, **kwargs) + return _core_.Image_FindFirstUnusedColour(*args, **kwargs) def ConvertAlphaToMask(*args, **kwargs): """ - ConvertAlphaToMask(self, byte threshold=128) -> bool + ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool - If the image has alpha channel, this method converts it to mask. All pixels - with alpha value less than ``threshold`` are replaced with mask colour and the - alpha channel is removed. Mask colour is chosen automatically using - `FindFirstUnusedColour`. + If the image has alpha channel, this method converts it to mask. All + pixels with alpha value less than ``threshold`` are replaced with the + mask colour and the alpha channel is removed. The mask colour is + chosen automatically using `FindFirstUnusedColour`. If the image image doesn't have alpha channel, ConvertAlphaToMask does nothing. """ - return __core.wxImage_ConvertAlphaToMask(*args, **kwargs) + return _core_.Image_ConvertAlphaToMask(*args, **kwargs) def ConvertColourToAlpha(*args, **kwargs): """ - ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool + ConvertColourToAlpha(self, byte r, byte g, byte b) -> bool This method converts an image where the original alpha information is only available as a shades of a colour (actually shades of grey) @@ -2277,85 +2809,183 @@ class wxImage(wxObject): method reverses it, assuming a black (!) background and white text. The method will then fill up the whole image with the colour given. """ - return __core.wxImage_ConvertColourToAlpha(*args, **kwargs) + return _core_.Image_ConvertColourToAlpha(*args, **kwargs) def SetMaskFromImage(*args, **kwargs): - """SetMaskFromImage(self, wxImage mask, byte mr, byte mg, byte mb) -> bool""" - return __core.wxImage_SetMaskFromImage(*args, **kwargs) + """ + SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool + + Sets the image's mask so that the pixels that have RGB value of + ``(mr,mg,mb)`` in ``mask`` will be masked in this image. This is done + by first finding an unused colour in the image, setting this colour as + the mask colour and then using this colour to draw all pixels in the + image who corresponding pixel in mask has given RGB value. + + Returns ``False`` if ``mask`` does not have same dimensions as the + image or if there is no unused colour left. Returns ``True`` if the + mask was successfully applied. + + Note that this method involves computing the histogram, which is + computationally intensive operation. + """ + return _core_.Image_SetMaskFromImage(*args, **kwargs) def CanRead(*args, **kwargs): - """CanRead(wxString name) -> bool""" - return __core.wxImage_CanRead(*args, **kwargs) + """ + CanRead(String filename) -> bool + + Returns True if the image handlers can read this file. + """ + return _core_.Image_CanRead(*args, **kwargs) CanRead = staticmethod(CanRead) def GetImageCount(*args, **kwargs): - """GetImageCount(wxString name, long type=wxBITMAP_TYPE_ANY) -> int""" - return __core.wxImage_GetImageCount(*args, **kwargs) + """ + GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int + + If the image file contains more than one image and the image handler + is capable of retrieving these individually, this function will return + the number of available images. + """ + return _core_.Image_GetImageCount(*args, **kwargs) GetImageCount = staticmethod(GetImageCount) def LoadFile(*args, **kwargs): - """LoadFile(self, wxString name, long type=wxBITMAP_TYPE_ANY, int index=-1) -> bool""" - return __core.wxImage_LoadFile(*args, **kwargs) + """ + LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool + + Loads an image from a file. If no handler type is provided, the + library will try to autodetect the format. + """ + return _core_.Image_LoadFile(*args, **kwargs) def LoadMimeFile(*args, **kwargs): - """LoadMimeFile(self, wxString name, wxString mimetype, int index=-1) -> bool""" - return __core.wxImage_LoadMimeFile(*args, **kwargs) + """ + LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool + + Loads an image from a file, specifying the image type with a MIME type + string. + """ + return _core_.Image_LoadMimeFile(*args, **kwargs) def SaveFile(*args, **kwargs): - """SaveFile(self, wxString name, int type) -> bool""" - return __core.wxImage_SaveFile(*args, **kwargs) + """ + SaveFile(self, String name, int type) -> bool + + Saves an image in the named file. + """ + return _core_.Image_SaveFile(*args, **kwargs) def SaveMimeFile(*args, **kwargs): - """SaveMimeFile(self, wxString name, wxString mimetype) -> bool""" - return __core.wxImage_SaveMimeFile(*args, **kwargs) + """ + SaveMimeFile(self, String name, String mimetype) -> bool + + Saves an image in the named file. + """ + return _core_.Image_SaveMimeFile(*args, **kwargs) def CanReadStream(*args, **kwargs): - """CanReadStream(wxInputStream stream) -> bool""" - return __core.wxImage_CanReadStream(*args, **kwargs) + """ + CanReadStream(InputStream stream) -> bool + + Returns True if the image handlers can read an image file from the + data currently on the input stream, or a readable Python file-like + object. + """ + return _core_.Image_CanReadStream(*args, **kwargs) CanReadStream = staticmethod(CanReadStream) def LoadStream(*args, **kwargs): """ - LoadStream(self, wxInputStream stream, long type=wxBITMAP_TYPE_ANY, - int index=-1) -> bool + LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool + + Loads an image from an input stream or a readable Python file-like + object. If no handler type is provided, the library will try to + autodetect the format. """ - return __core.wxImage_LoadStream(*args, **kwargs) + return _core_.Image_LoadStream(*args, **kwargs) def LoadMimeStream(*args, **kwargs): - """LoadMimeStream(self, wxInputStream stream, wxString mimetype, int index=-1) -> bool""" - return __core.wxImage_LoadMimeStream(*args, **kwargs) + """ + LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool + + Loads an image from an input stream or a readable Python file-like + object, using a MIME type string to specify the image file format. + """ + return _core_.Image_LoadMimeStream(*args, **kwargs) + + def IsOk(*args, **kwargs): + """ + IsOk(self) -> bool - def Ok(*args, **kwargs): - """Ok(self) -> bool""" - return __core.wxImage_Ok(*args, **kwargs) + Returns true if image data is present. + """ + return _core_.Image_IsOk(*args, **kwargs) + Ok = IsOk def GetWidth(*args, **kwargs): - """GetWidth(self) -> int""" - return __core.wxImage_GetWidth(*args, **kwargs) + """ + GetWidth(self) -> int + + Gets the width of the image in pixels. + """ + return _core_.Image_GetWidth(*args, **kwargs) def GetHeight(*args, **kwargs): - """GetHeight(self) -> int""" - return __core.wxImage_GetHeight(*args, **kwargs) + """ + GetHeight(self) -> int + + Gets the height of the image in pixels. + """ + return _core_.Image_GetHeight(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize(self) -> wxSize""" - return __core.wxImage_GetSize(*args, **kwargs) + """ + GetSize(self) -> Size + + Returns the size of the image in pixels. + """ + return _core_.Image_GetSize(*args, **kwargs) def GetSubImage(*args, **kwargs): - """GetSubImage(self, wxRect rect) -> wxImage""" - return __core.wxImage_GetSubImage(*args, **kwargs) + """ + GetSubImage(self, Rect rect) -> Image + + Returns a sub image of the current one as long as the rect belongs + entirely to the image. + """ + return _core_.Image_GetSubImage(*args, **kwargs) def Size(*args, **kwargs): - """Size(self, wxSize size, wxPoint pos, int r=-1, int g=-1, int b=-1) -> wxImage""" - return __core.wxImage_Size(*args, **kwargs) + """ + Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image + + Returns a resized version of this image without scaling it by adding + either a border with the given colour or cropping as necessary. The + image is pasted into a new image with the given size and background + colour at the position ``pos`` relative to the upper left of the new + image. If red = green = blue = -1 then use either the current mask + colour if set or find, use, and set a suitable mask colour for any + newly exposed areas. + """ + return _core_.Image_Size(*args, **kwargs) def Copy(*args, **kwargs): - """Copy(self) -> wxImage""" - return __core.wxImage_Copy(*args, **kwargs) + """ + Copy(self) -> Image + + Returns an identical copy of the image. + """ + return _core_.Image_Copy(*args, **kwargs) def Paste(*args, **kwargs): - """Paste(self, wxImage image, int x, int y)""" - return __core.wxImage_Paste(*args, **kwargs) + """ + Paste(self, Image image, int x, int y) + + Pastes ``image`` into this instance and takes care of the mask colour + and any out of bounds problems. + """ + return _core_.Image_Paste(*args, **kwargs) def GetData(*args, **kwargs): """ @@ -2363,7 +2993,7 @@ class wxImage(wxObject): Returns a string containing a copy of the RGB bytes of the image. """ - return __core.wxImage_GetData(*args, **kwargs) + return _core_.Image_GetData(*args, **kwargs) def SetData(*args, **kwargs): """ @@ -2373,26 +3003,27 @@ class wxImage(wxObject): either a string or a buffer object holding the data and the length of the data must be width*height*3. """ - return __core.wxImage_SetData(*args, **kwargs) + return _core_.Image_SetData(*args, **kwargs) def GetDataBuffer(*args, **kwargs): """ GetDataBuffer(self) -> PyObject Returns a writable Python buffer object that is pointing at the RGB - image data buffer inside the wx.Image. + image data buffer inside the wx.Image. You need to ensure that you do + not use this buffer object after the image has been destroyed. """ - return __core.wxImage_GetDataBuffer(*args, **kwargs) + return _core_.Image_GetDataBuffer(*args, **kwargs) def SetDataBuffer(*args, **kwargs): """ SetDataBuffer(self, buffer data) Sets the internal image data pointer to point at a Python buffer - object. This can save a copy of the data but you must ensure that the - buffer object lives longer than the wx.Image does. + object. This can save making an extra copy of the data but you must + ensure that the buffer object lives longer than the wx.Image does. """ - return __core.wxImage_SetDataBuffer(*args, **kwargs) + return _core_.Image_SetDataBuffer(*args, **kwargs) def GetAlphaData(*args, **kwargs): """ @@ -2400,7 +3031,7 @@ class wxImage(wxObject): Returns a string containing a copy of the alpha bytes of the image. """ - return __core.wxImage_GetAlphaData(*args, **kwargs) + return _core_.Image_GetAlphaData(*args, **kwargs) def SetAlphaData(*args, **kwargs): """ @@ -2410,19 +3041,36 @@ class wxImage(wxObject): a string or a buffer object holding the data and the length of the data must be width*height. """ - return __core.wxImage_SetAlphaData(*args, **kwargs) + return _core_.Image_SetAlphaData(*args, **kwargs) def GetAlphaBuffer(*args, **kwargs): - """GetAlphaBuffer(self) -> PyObject""" - return __core.wxImage_GetAlphaBuffer(*args, **kwargs) + """ + GetAlphaBuffer(self) -> PyObject + + Returns a writable Python buffer object that is pointing at the Alpha + data buffer inside the wx.Image. You need to ensure that you do not + use this buffer object after the image has been destroyed. + """ + return _core_.Image_GetAlphaBuffer(*args, **kwargs) def SetAlphaBuffer(*args, **kwargs): - """SetAlphaBuffer(self, buffer alpha)""" - return __core.wxImage_SetAlphaBuffer(*args, **kwargs) + """ + SetAlphaBuffer(self, buffer alpha) + + Sets the internal image alpha pointer to point at a Python buffer + object. This can save making an extra copy of the data but you must + ensure that the buffer object lives as long as the wx.Image does. + """ + return _core_.Image_SetAlphaBuffer(*args, **kwargs) def SetMaskColour(*args, **kwargs): - """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)""" - return __core.wxImage_SetMaskColour(*args, **kwargs) + """ + SetMaskColour(self, byte r, byte g, byte b) + + Sets the mask colour for this image (and tells the image to use the + mask). + """ + return _core_.Image_SetMaskColour(*args, **kwargs) def GetOrFindMaskColour(*args, **kwargs): """ @@ -2430,212 +3078,415 @@ class wxImage(wxObject): Get the current mask colour or find a suitable colour. """ - return __core.wxImage_GetOrFindMaskColour(*args, **kwargs) + return _core_.Image_GetOrFindMaskColour(*args, **kwargs) def GetMaskRed(*args, **kwargs): - """GetMaskRed(self) -> unsigned char""" - return __core.wxImage_GetMaskRed(*args, **kwargs) + """ + GetMaskRed(self) -> byte + + Gets the red component of the mask colour. + """ + return _core_.Image_GetMaskRed(*args, **kwargs) def GetMaskGreen(*args, **kwargs): - """GetMaskGreen(self) -> unsigned char""" - return __core.wxImage_GetMaskGreen(*args, **kwargs) + """ + GetMaskGreen(self) -> byte + + Gets the green component of the mask colour. + """ + return _core_.Image_GetMaskGreen(*args, **kwargs) def GetMaskBlue(*args, **kwargs): - """GetMaskBlue(self) -> unsigned char""" - return __core.wxImage_GetMaskBlue(*args, **kwargs) + """ + GetMaskBlue(self) -> byte + + Gets the blue component of the mask colour. + """ + return _core_.Image_GetMaskBlue(*args, **kwargs) def SetMask(*args, **kwargs): - """SetMask(self, bool mask=True)""" - return __core.wxImage_SetMask(*args, **kwargs) + """ + SetMask(self, bool mask=True) + + Specifies whether there is a mask or not. The area of the mask is + determined by the current mask colour. + """ + return _core_.Image_SetMask(*args, **kwargs) def HasMask(*args, **kwargs): - """HasMask(self) -> bool""" - return __core.wxImage_HasMask(*args, **kwargs) + """ + HasMask(self) -> bool + + Returns ``True`` if there is a mask active, ``False`` otherwise. + """ + return _core_.Image_HasMask(*args, **kwargs) def Rotate(*args, **kwargs): """ - Rotate(self, double angle, wxPoint centre_of_rotation, bool interpolating=True, - wxPoint offset_after_rotation=None) -> wxImage + Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True, + Point offset_after_rotation=None) -> Image + + Rotates the image about the given point, by ``angle`` radians. Passing + ``True`` to ``interpolating`` results in better image quality, but is + slower. If the image has a mask, then the mask colour is used for the + uncovered pixels in the rotated image background. Otherwise, black + will be used as the fill colour. + + Returns the rotated image, leaving this image intact. """ - return __core.wxImage_Rotate(*args, **kwargs) + return _core_.Image_Rotate(*args, **kwargs) def Rotate90(*args, **kwargs): - """Rotate90(self, bool clockwise=True) -> wxImage""" - return __core.wxImage_Rotate90(*args, **kwargs) + """ + Rotate90(self, bool clockwise=True) -> Image + + Returns a copy of the image rotated 90 degrees in the direction + indicated by ``clockwise``. + """ + return _core_.Image_Rotate90(*args, **kwargs) def Mirror(*args, **kwargs): - """Mirror(self, bool horizontally=True) -> wxImage""" - return __core.wxImage_Mirror(*args, **kwargs) + """ + Mirror(self, bool horizontally=True) -> Image + + Returns a mirrored copy of the image. The parameter ``horizontally`` + indicates the orientation. + """ + return _core_.Image_Mirror(*args, **kwargs) def Replace(*args, **kwargs): """ - Replace(self, unsigned char r1, unsigned char g1, unsigned char b1, - unsigned char r2, unsigned char g2, unsigned char b2) + Replace(self, byte r1, byte g1, byte b1, byte r2, byte g2, byte b2) + + Replaces the colour specified by ``(r1,g1,b1)`` by the colour + ``(r2,g2,b2)``. + """ + return _core_.Image_Replace(*args, **kwargs) + + def ConvertToGreyscale(*args, **kwargs): + """ + ConvertToGreyscale(self, double lr=0.299, double lg=0.587, double lb=0.114) -> Image + + Convert to greyscale image. Uses the luminance component (Y) of the + image. The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb), + defaults to ITU-T BT.601 """ - return __core.wxImage_Replace(*args, **kwargs) + return _core_.Image_ConvertToGreyscale(*args, **kwargs) def ConvertToMono(*args, **kwargs): - """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> wxImage""" - return __core.wxImage_ConvertToMono(*args, **kwargs) + """ + ConvertToMono(self, byte r, byte g, byte b) -> Image + + Returns monochromatic version of the image. The returned image has + white colour where the original has ``(r,g,b)`` colour and black + colour everywhere else. + """ + return _core_.Image_ConvertToMono(*args, **kwargs) def SetOption(*args, **kwargs): - """SetOption(self, wxString name, wxString value)""" - return __core.wxImage_SetOption(*args, **kwargs) + """ + SetOption(self, String name, String value) + + Sets an image handler defined option. For example, when saving as a + JPEG file, the option ``wx.IMAGE_OPTION_QUALITY`` is used, which is a + number between 0 and 100 (0 is terrible, 100 is very good). + """ + return _core_.Image_SetOption(*args, **kwargs) def SetOptionInt(*args, **kwargs): - """SetOptionInt(self, wxString name, int value)""" - return __core.wxImage_SetOptionInt(*args, **kwargs) + """ + SetOptionInt(self, String name, int value) + + Sets an image option as an integer. + """ + return _core_.Image_SetOptionInt(*args, **kwargs) def GetOption(*args, **kwargs): - """GetOption(self, wxString name) -> wxString""" - return __core.wxImage_GetOption(*args, **kwargs) + """ + GetOption(self, String name) -> String + + Gets the value of an image handler option. + """ + return _core_.Image_GetOption(*args, **kwargs) def GetOptionInt(*args, **kwargs): - """GetOptionInt(self, wxString name) -> int""" - return __core.wxImage_GetOptionInt(*args, **kwargs) + """ + GetOptionInt(self, String name) -> int + + Gets the value of an image handler option as an integer. If the given + option is not present, the function returns 0. + """ + return _core_.Image_GetOptionInt(*args, **kwargs) def HasOption(*args, **kwargs): - """HasOption(self, wxString name) -> bool""" - return __core.wxImage_HasOption(*args, **kwargs) + """ + HasOption(self, String name) -> bool + + Returns true if the given option is present. + """ + return _core_.Image_HasOption(*args, **kwargs) def CountColours(*args, **kwargs): """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long""" - return __core.wxImage_CountColours(*args, **kwargs) + return _core_.Image_CountColours(*args, **kwargs) def ComputeHistogram(*args, **kwargs): - """ComputeHistogram(self, wxImageHistogram h) -> unsigned long""" - return __core.wxImage_ComputeHistogram(*args, **kwargs) + """ComputeHistogram(self, ImageHistogram h) -> unsigned long""" + return _core_.Image_ComputeHistogram(*args, **kwargs) def AddHandler(*args, **kwargs): - """AddHandler(wxImageHandler handler)""" - return __core.wxImage_AddHandler(*args, **kwargs) + """AddHandler(ImageHandler handler)""" + return _core_.Image_AddHandler(*args, **kwargs) AddHandler = staticmethod(AddHandler) def InsertHandler(*args, **kwargs): - """InsertHandler(wxImageHandler handler)""" - return __core.wxImage_InsertHandler(*args, **kwargs) + """InsertHandler(ImageHandler handler)""" + return _core_.Image_InsertHandler(*args, **kwargs) InsertHandler = staticmethod(InsertHandler) def RemoveHandler(*args, **kwargs): - """RemoveHandler(wxString name) -> bool""" - return __core.wxImage_RemoveHandler(*args, **kwargs) + """RemoveHandler(String name) -> bool""" + return _core_.Image_RemoveHandler(*args, **kwargs) RemoveHandler = staticmethod(RemoveHandler) + def GetHandlers(*args, **kwargs): + """GetHandlers() -> PyObject""" + return _core_.Image_GetHandlers(*args, **kwargs) + + GetHandlers = staticmethod(GetHandlers) def GetImageExtWildcard(*args, **kwargs): - """GetImageExtWildcard() -> wxString""" - return __core.wxImage_GetImageExtWildcard(*args, **kwargs) + """ + GetImageExtWildcard() -> String + + Iterates all registered wxImageHandler objects, and returns a string + containing file extension masks suitable for passing to file open/save + dialog boxes. + """ + return _core_.Image_GetImageExtWildcard(*args, **kwargs) GetImageExtWildcard = staticmethod(GetImageExtWildcard) def ConvertToBitmap(*args, **kwargs): - """ConvertToBitmap(self, int depth=-1) -> wxBitmap""" - return __core.wxImage_ConvertToBitmap(*args, **kwargs) + """ConvertToBitmap(self, int depth=-1) -> Bitmap""" + return _core_.Image_ConvertToBitmap(*args, **kwargs) def ConvertToMonoBitmap(*args, **kwargs): - """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> wxBitmap""" - return __core.wxImage_ConvertToMonoBitmap(*args, **kwargs) + """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap""" + return _core_.Image_ConvertToMonoBitmap(*args, **kwargs) + + def RotateHue(*args, **kwargs): + """ + RotateHue(self, double angle) + + Rotates the hue of each pixel of the image. Hue is a double in the + range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees + """ + return _core_.Image_RotateHue(*args, **kwargs) + + def RGBtoHSV(*args, **kwargs): + """ + RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue - def __nonzero__(self): return self.Ok() + Converts a color in RGB color space to HSV color space. + """ + return _core_.Image_RGBtoHSV(*args, **kwargs) + + RGBtoHSV = staticmethod(RGBtoHSV) + def HSVtoRGB(*args, **kwargs): + """ + HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue + + Converts a color in HSV color space to RGB color space. + """ + return _core_.Image_HSVtoRGB(*args, **kwargs) -class wxImagePtr(wxImage): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxImage -__core.wxImage_swigregister(wxImagePtr) + HSVtoRGB = staticmethod(HSVtoRGB) + def __nonzero__(self): return self.IsOk() + AlphaBuffer = property(GetAlphaBuffer,SetAlphaBuffer,doc="See `GetAlphaBuffer` and `SetAlphaBuffer`") + AlphaData = property(GetAlphaData,SetAlphaData,doc="See `GetAlphaData` and `SetAlphaData`") + Data = property(GetData,SetData,doc="See `GetData` and `SetData`") + DataBuffer = property(GetDataBuffer,SetDataBuffer,doc="See `GetDataBuffer` and `SetDataBuffer`") + Height = property(GetHeight,doc="See `GetHeight`") + MaskBlue = property(GetMaskBlue,doc="See `GetMaskBlue`") + MaskGreen = property(GetMaskGreen,doc="See `GetMaskGreen`") + MaskRed = property(GetMaskRed,doc="See `GetMaskRed`") + Width = property(GetWidth,doc="See `GetWidth`") +_core_.Image_swigregister(Image) def ImageFromMime(*args, **kwargs): - """ImageFromMime(wxString name, wxString mimetype, int index=-1) -> wxImage""" - val = __core.new_ImageFromMime(*args, **kwargs) - val.thisown = 1 + """ + ImageFromMime(String name, String mimetype, int index=-1) -> Image + + Loads an image from a file, using a MIME type string (such as + 'image/jpeg') to specify image type. + """ + val = _core_.new_ImageFromMime(*args, **kwargs) return val def ImageFromStream(*args, **kwargs): """ - ImageFromStream(wxInputStream stream, long type=wxBITMAP_TYPE_ANY, - int index=-1) -> wxImage + ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image + + Loads an image from an input stream, or any readable Python file-like + object. """ - val = __core.new_ImageFromStream(*args, **kwargs) - val.thisown = 1 + val = _core_.new_ImageFromStream(*args, **kwargs) return val def ImageFromStreamMime(*args, **kwargs): - """ImageFromStreamMime(wxInputStream stream, wxString mimetype, int index=-1) -> wxImage""" - val = __core.new_ImageFromStreamMime(*args, **kwargs) - val.thisown = 1 + """ + ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image + + Loads an image from an input stream, or any readable Python file-like + object, specifying the image format with a MIME type string. + """ + val = _core_.new_ImageFromStreamMime(*args, **kwargs) return val def EmptyImage(*args, **kwargs): """ - EmptyImage(int width=0, int height=0, bool clear=True) -> wxImage + EmptyImage(int width=0, int height=0, bool clear=True) -> Image Construct an empty image of a given size, optionally setting all pixels to black. """ - val = __core.new_EmptyImage(*args, **kwargs) - val.thisown = 1 + val = _core_.new_EmptyImage(*args, **kwargs) return val def ImageFromBitmap(*args, **kwargs): """ - ImageFromBitmap(wxBitmap bitmap) -> wxImage + ImageFromBitmap(Bitmap bitmap) -> Image Construct an Image from a `wx.Bitmap`. """ - val = __core.new_ImageFromBitmap(*args, **kwargs) - val.thisown = 1 + val = _core_.new_ImageFromBitmap(*args, **kwargs) return val def ImageFromData(*args, **kwargs): """ - ImageFromData(int width, int height, buffer data) -> wxImage + ImageFromData(int width, int height, buffer data) -> Image Construct an Image from a buffer of RGB bytes. Accepts either a string or a buffer object holding the data and the length of the data must be width*height*3. """ - val = __core.new_ImageFromData(*args, **kwargs) - val.thisown = 1 + val = _core_.new_ImageFromData(*args, **kwargs) return val def ImageFromDataWithAlpha(*args, **kwargs): """ - ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> wxImage + ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image Construct an Image from a buffer of RGB bytes with an Alpha channel. Accepts either a string or a buffer object holding the data and the - length of the data must be width*height*3. + length of the data must be width*height*3 bytes, and the length of the + alpha data must be width*height bytes. """ - val = __core.new_ImageFromDataWithAlpha(*args, **kwargs) - val.thisown = 1 + val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs) return val -def wxImage_CanRead(*args, **kwargs): - """wxImage_CanRead(wxString name) -> bool""" - return __core.wxImage_CanRead(*args, **kwargs) +def Image_CanRead(*args, **kwargs): + """ + Image_CanRead(String filename) -> bool + + Returns True if the image handlers can read this file. + """ + return _core_.Image_CanRead(*args, **kwargs) + +def Image_GetImageCount(*args, **kwargs): + """ + Image_GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int + + If the image file contains more than one image and the image handler + is capable of retrieving these individually, this function will return + the number of available images. + """ + return _core_.Image_GetImageCount(*args, **kwargs) + +def Image_CanReadStream(*args, **kwargs): + """ + Image_CanReadStream(InputStream stream) -> bool + + Returns True if the image handlers can read an image file from the + data currently on the input stream, or a readable Python file-like + object. + """ + return _core_.Image_CanReadStream(*args, **kwargs) + +def Image_AddHandler(*args, **kwargs): + """Image_AddHandler(ImageHandler handler)""" + return _core_.Image_AddHandler(*args, **kwargs) + +def Image_InsertHandler(*args, **kwargs): + """Image_InsertHandler(ImageHandler handler)""" + return _core_.Image_InsertHandler(*args, **kwargs) -def wxImage_GetImageCount(*args, **kwargs): - """wxImage_GetImageCount(wxString name, long type=wxBITMAP_TYPE_ANY) -> int""" - return __core.wxImage_GetImageCount(*args, **kwargs) +def Image_RemoveHandler(*args, **kwargs): + """Image_RemoveHandler(String name) -> bool""" + return _core_.Image_RemoveHandler(*args, **kwargs) -def wxImage_CanReadStream(*args, **kwargs): - """wxImage_CanReadStream(wxInputStream stream) -> bool""" - return __core.wxImage_CanReadStream(*args, **kwargs) +def Image_GetHandlers(*args): + """Image_GetHandlers() -> PyObject""" + return _core_.Image_GetHandlers(*args) -def wxImage_AddHandler(*args, **kwargs): - """wxImage_AddHandler(wxImageHandler handler)""" - return __core.wxImage_AddHandler(*args, **kwargs) +def Image_GetImageExtWildcard(*args): + """ + Image_GetImageExtWildcard() -> String + + Iterates all registered wxImageHandler objects, and returns a string + containing file extension masks suitable for passing to file open/save + dialog boxes. + """ + return _core_.Image_GetImageExtWildcard(*args) + +def Image_RGBtoHSV(*args, **kwargs): + """ + Image_RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue + + Converts a color in RGB color space to HSV color space. + """ + return _core_.Image_RGBtoHSV(*args, **kwargs) + +def Image_HSVtoRGB(*args, **kwargs): + """ + Image_HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue + + Converts a color in HSV color space to RGB color space. + """ + return _core_.Image_HSVtoRGB(*args, **kwargs) -def wxImage_InsertHandler(*args, **kwargs): - """wxImage_InsertHandler(wxImageHandler handler)""" - return __core.wxImage_InsertHandler(*args, **kwargs) -def wxImage_RemoveHandler(*args, **kwargs): - """wxImage_RemoveHandler(wxString name) -> bool""" - return __core.wxImage_RemoveHandler(*args, **kwargs) +def _ImageFromBuffer(*args, **kwargs): + """_ImageFromBuffer(int width, int height, buffer data, buffer alpha=None) -> Image""" + return _core_._ImageFromBuffer(*args, **kwargs) +def ImageFromBuffer(width, height, dataBuffer, alphaBuffer=None): + """ + Creates a `wx.Image` from the data in dataBuffer. The dataBuffer + parameter must be a Python object that implements the buffer interface, + such as a string, array, etc. The dataBuffer object is expected to + contain a series of RGB bytes and be width*height*3 bytes long. A buffer + object can optionally be supplied for the image's alpha channel data, and + it is expected to be width*height bytes long. + + The wx.Image will be created with its data and alpha pointers initialized + to the memory address pointed to by the buffer objects, thus saving the + time needed to copy the image data from the buffer object to the wx.Image. + While this has advantages, it also has the shoot-yourself-in-the-foot + risks associated with sharing a C pointer between two objects. -def wxImage_GetImageExtWildcard(*args, **kwargs): - """wxImage_GetImageExtWildcard() -> wxString""" - return __core.wxImage_GetImageExtWildcard(*args, **kwargs) + To help alleviate the risk a reference to the data and alpha buffer + objects are kept with the wx.Image, so that they won't get deleted until + after the wx.Image is deleted. However please be aware that it is not + guaranteed that an object won't move its memory buffer to a new location + when it needs to resize its contents. If that happens then the wx.Image + will end up referring to an invalid memory location and could cause the + application to crash. Therefore care should be taken to not manipulate + the objects used for the data and alpha buffers in a way that would cause + them to change size. + """ + image = _core_._ImageFromBuffer(width, height, dataBuffer, alphaBuffer) + image._buffer = dataBuffer + image._alpha = alphaBuffer + return image def InitAllImageHandlers(): """ @@ -2644,38 +3495,33 @@ def InitAllImageHandlers(): """ pass -wxIMAGE_RESOLUTION_INCHES = __core.wxIMAGE_RESOLUTION_INCHES -wxIMAGE_RESOLUTION_CM = __core.wxIMAGE_RESOLUTION_CM -wxPNG_TYPE_COLOUR = __core.wxPNG_TYPE_COLOUR -wxPNG_TYPE_GREY = __core.wxPNG_TYPE_GREY -wxPNG_TYPE_GREY_RED = __core.wxPNG_TYPE_GREY_RED -wxBMP_24BPP = __core.wxBMP_24BPP -wxBMP_8BPP = __core.wxBMP_8BPP -wxBMP_8BPP_GREY = __core.wxBMP_8BPP_GREY -wxBMP_8BPP_GRAY = __core.wxBMP_8BPP_GRAY -wxBMP_8BPP_RED = __core.wxBMP_8BPP_RED -wxBMP_8BPP_PALETTE = __core.wxBMP_8BPP_PALETTE -wxBMP_4BPP = __core.wxBMP_4BPP -wxBMP_1BPP = __core.wxBMP_1BPP -wxBMP_1BPP_BW = __core.wxBMP_1BPP_BW -class wxBMPHandler(wxImageHandler): - """Proxy of C++ wxBMPHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxBMPHandler""" - newobj = __core.new_wxBMPHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxBMPHandlerPtr(wxBMPHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxBMPHandler -__core.wxBMPHandler_swigregister(wxBMPHandlerPtr) -wxNullImage = cvar.wxNullImage +IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES +IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM +PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR +PNG_TYPE_GREY = _core_.PNG_TYPE_GREY +PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED +BMP_24BPP = _core_.BMP_24BPP +BMP_8BPP = _core_.BMP_8BPP +BMP_8BPP_GREY = _core_.BMP_8BPP_GREY +BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY +BMP_8BPP_RED = _core_.BMP_8BPP_RED +BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE +BMP_4BPP = _core_.BMP_4BPP +BMP_1BPP = _core_.BMP_1BPP +BMP_1BPP_BW = _core_.BMP_1BPP_BW +class BMPHandler(ImageHandler): + """A `wx.ImageHandler` for \*.bmp bitmap files.""" + 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) -> BMPHandler + + A `wx.ImageHandler` for \*.bmp bitmap files. + """ + _core_.BMPHandler_swiginit(self,_core_.new_BMPHandler(*args, **kwargs)) +_core_.BMPHandler_swigregister(BMPHandler) +NullImage = cvar.NullImage IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X @@ -2692,283 +3538,239 @@ IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH -class wxICOHandler(wxBMPHandler): - """Proxy of C++ wxICOHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxICOHandler""" - newobj = __core.new_wxICOHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxICOHandlerPtr(wxICOHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxICOHandler -__core.wxICOHandler_swigregister(wxICOHandlerPtr) - -class wxCURHandler(wxICOHandler): - """Proxy of C++ wxCURHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxCURHandler""" - newobj = __core.new_wxCURHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxCURHandlerPtr(wxCURHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxCURHandler -__core.wxCURHandler_swigregister(wxCURHandlerPtr) - -class wxANIHandler(wxCURHandler): - """Proxy of C++ wxANIHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxANIHandler""" - newobj = __core.new_wxANIHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxANIHandlerPtr(wxANIHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxANIHandler -__core.wxANIHandler_swigregister(wxANIHandlerPtr) - -class wxPNGHandler(wxImageHandler): - """Proxy of C++ wxPNGHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxPNGHandler""" - newobj = __core.new_wxPNGHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxPNGHandlerPtr(wxPNGHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPNGHandler -__core.wxPNGHandler_swigregister(wxPNGHandlerPtr) - -class wxGIFHandler(wxImageHandler): - """Proxy of C++ wxGIFHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxGIFHandler""" - newobj = __core.new_wxGIFHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxGIFHandlerPtr(wxGIFHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGIFHandler -__core.wxGIFHandler_swigregister(wxGIFHandlerPtr) - -class wxPCXHandler(wxImageHandler): - """Proxy of C++ wxPCXHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxPCXHandler""" - newobj = __core.new_wxPCXHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxPCXHandlerPtr(wxPCXHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPCXHandler -__core.wxPCXHandler_swigregister(wxPCXHandlerPtr) - -class wxJPEGHandler(wxImageHandler): - """Proxy of C++ wxJPEGHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxJPEGHandler""" - newobj = __core.new_wxJPEGHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxJPEGHandlerPtr(wxJPEGHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxJPEGHandler -__core.wxJPEGHandler_swigregister(wxJPEGHandlerPtr) - -class wxPNMHandler(wxImageHandler): - """Proxy of C++ wxPNMHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxPNMHandler""" - newobj = __core.new_wxPNMHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxPNMHandlerPtr(wxPNMHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPNMHandler -__core.wxPNMHandler_swigregister(wxPNMHandlerPtr) - -class wxXPMHandler(wxImageHandler): - """Proxy of C++ wxXPMHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxXPMHandler""" - newobj = __core.new_wxXPMHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxXPMHandlerPtr(wxXPMHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxXPMHandler -__core.wxXPMHandler_swigregister(wxXPMHandlerPtr) - -class wxTIFFHandler(wxImageHandler): - """Proxy of C++ wxTIFFHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxTIFFHandler""" - newobj = __core.new_wxTIFFHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxTIFFHandlerPtr(wxTIFFHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxTIFFHandler -__core.wxTIFFHandler_swigregister(wxTIFFHandlerPtr) - -wxQUANTIZE_INCLUDE_WINDOWS_COLOURS = __core.wxQUANTIZE_INCLUDE_WINDOWS_COLOURS -wxQUANTIZE_FILL_DESTINATION_IMAGE = __core.wxQUANTIZE_FILL_DESTINATION_IMAGE -class wxQuantize(object): - """Performs quantization, or colour reduction, on a wxImage.""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def Quantize(*args, **kwargs): +class ICOHandler(BMPHandler): + """A `wx.ImageHandler` for \*.ico icon files.""" + 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): """ - Quantize(wxImage src, wxImage dest, int desiredNoColours=236, - int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool + __init__(self) -> ICOHandler - Reduce the colours in the source image and put the result into the - destination image, setting the palette in the destination if - needed. Both images may be the same, to overwrite the source image. + A `wx.ImageHandler` for \*.ico icon files. """ - return __core.wxQuantize_Quantize(*args, **kwargs) + _core_.ICOHandler_swiginit(self,_core_.new_ICOHandler(*args, **kwargs)) +_core_.ICOHandler_swigregister(ICOHandler) - Quantize = staticmethod(Quantize) +class CURHandler(ICOHandler): + """A `wx.ImageHandler` for \*.cur cursor files.""" + 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) -> CURHandler -class wxQuantizePtr(wxQuantize): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxQuantize -__core.wxQuantize_swigregister(wxQuantizePtr) + A `wx.ImageHandler` for \*.cur cursor files. + """ + _core_.CURHandler_swiginit(self,_core_.new_CURHandler(*args, **kwargs)) +_core_.CURHandler_swigregister(CURHandler) -def wxQuantize_Quantize(*args, **kwargs): - """ - wxQuantize_Quantize(wxImage src, wxImage dest, int desiredNoColours=236, - int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool +class ANIHandler(CURHandler): + """A `wx.ImageHandler` for \*.ani animated cursor files.""" + 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) -> ANIHandler - Reduce the colours in the source image and put the result into the - destination image, setting the palette in the destination if - needed. Both images may be the same, to overwrite the source image. - """ - return __core.wxQuantize_Quantize(*args, **kwargs) + A `wx.ImageHandler` for \*.ani animated cursor files. + """ + _core_.ANIHandler_swiginit(self,_core_.new_ANIHandler(*args, **kwargs)) +_core_.ANIHandler_swigregister(ANIHandler) -#--------------------------------------------------------------------------- +class PNGHandler(ImageHandler): + """A `wx.ImageHandler` for PNG image files.""" + 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) -> PNGHandler -class wxEvtHandler(wxObject): - """Proxy of C++ wxEvtHandler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxEvtHandler""" - newobj = __core.new_wxEvtHandler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def GetNextHandler(*args, **kwargs): - """GetNextHandler(self) -> wxEvtHandler""" - return __core.wxEvtHandler_GetNextHandler(*args, **kwargs) + A `wx.ImageHandler` for PNG image files. + """ + _core_.PNGHandler_swiginit(self,_core_.new_PNGHandler(*args, **kwargs)) +_core_.PNGHandler_swigregister(PNGHandler) - def GetPreviousHandler(*args, **kwargs): - """GetPreviousHandler(self) -> wxEvtHandler""" - return __core.wxEvtHandler_GetPreviousHandler(*args, **kwargs) +class GIFHandler(ImageHandler): + """A `wx.ImageHandler` for GIF image files.""" + 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) -> GIFHandler - def SetNextHandler(*args, **kwargs): - """SetNextHandler(self, wxEvtHandler handler)""" - return __core.wxEvtHandler_SetNextHandler(*args, **kwargs) + A `wx.ImageHandler` for GIF image files. + """ + _core_.GIFHandler_swiginit(self,_core_.new_GIFHandler(*args, **kwargs)) +_core_.GIFHandler_swigregister(GIFHandler) - def SetPreviousHandler(*args, **kwargs): - """SetPreviousHandler(self, wxEvtHandler handler)""" - return __core.wxEvtHandler_SetPreviousHandler(*args, **kwargs) +class PCXHandler(ImageHandler): + """A `wx.ImageHandler` for PCX imager files.""" + 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) -> PCXHandler + + A `wx.ImageHandler` for PCX imager files. + """ + _core_.PCXHandler_swiginit(self,_core_.new_PCXHandler(*args, **kwargs)) +_core_.PCXHandler_swigregister(PCXHandler) + +class JPEGHandler(ImageHandler): + """A `wx.ImageHandler` for JPEG/JPG image files.""" + 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) -> JPEGHandler + + A `wx.ImageHandler` for JPEG/JPG image files. + """ + _core_.JPEGHandler_swiginit(self,_core_.new_JPEGHandler(*args, **kwargs)) +_core_.JPEGHandler_swigregister(JPEGHandler) + +class PNMHandler(ImageHandler): + """A `wx.ImageHandler` for PNM image files.""" + 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) -> PNMHandler + + A `wx.ImageHandler` for PNM image files. + """ + _core_.PNMHandler_swiginit(self,_core_.new_PNMHandler(*args, **kwargs)) +_core_.PNMHandler_swigregister(PNMHandler) + +class XPMHandler(ImageHandler): + """A `wx.ImageHandler` for XPM image.""" + 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) -> XPMHandler + + A `wx.ImageHandler` for XPM image. + """ + _core_.XPMHandler_swiginit(self,_core_.new_XPMHandler(*args, **kwargs)) +_core_.XPMHandler_swigregister(XPMHandler) + +class TIFFHandler(ImageHandler): + """A `wx.ImageHandler` for TIFF image files.""" + 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) -> TIFFHandler + + A `wx.ImageHandler` for TIFF image files. + """ + _core_.TIFFHandler_swiginit(self,_core_.new_TIFFHandler(*args, **kwargs)) +_core_.TIFFHandler_swigregister(TIFFHandler) + +class TGAHandler(ImageHandler): + """A `wx.ImageHandler` for TGA image files.""" + 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) -> TGAHandler + + A `wx.ImageHandler` for TGA image files. + """ + _core_.TGAHandler_swiginit(self,_core_.new_TGAHandler(*args, **kwargs)) +_core_.TGAHandler_swigregister(TGAHandler) + +QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS +QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE +class Quantize(object): + """Performs quantization, or colour reduction, on a wxImage.""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + def Quantize(*args, **kwargs): + """ + Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool + + Reduce the colours in the source image and put the result into the + destination image, setting the palette in the destination if + needed. Both images may be the same, to overwrite the source image. + """ + return _core_.Quantize_Quantize(*args, **kwargs) + + Quantize = staticmethod(Quantize) +_core_.Quantize_swigregister(Quantize) + +def Quantize_Quantize(*args, **kwargs): + """ + Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool + + Reduce the colours in the source image and put the result into the + destination image, setting the palette in the destination if + needed. Both images may be the same, to overwrite the source image. + """ + return _core_.Quantize_Quantize(*args, **kwargs) + +#--------------------------------------------------------------------------- + +class EvtHandler(Object): + """Proxy of C++ EvtHandler 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) -> EvtHandler""" + _core_.EvtHandler_swiginit(self,_core_.new_EvtHandler(*args, **kwargs)) + self._setOORInfo(self) + + def GetNextHandler(*args, **kwargs): + """GetNextHandler(self) -> EvtHandler""" + return _core_.EvtHandler_GetNextHandler(*args, **kwargs) + + def GetPreviousHandler(*args, **kwargs): + """GetPreviousHandler(self) -> EvtHandler""" + return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs) + + def SetNextHandler(*args, **kwargs): + """SetNextHandler(self, EvtHandler handler)""" + return _core_.EvtHandler_SetNextHandler(*args, **kwargs) + + def SetPreviousHandler(*args, **kwargs): + """SetPreviousHandler(self, EvtHandler handler)""" + return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs) def GetEvtHandlerEnabled(*args, **kwargs): """GetEvtHandlerEnabled(self) -> bool""" - return __core.wxEvtHandler_GetEvtHandlerEnabled(*args, **kwargs) + return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs) def SetEvtHandlerEnabled(*args, **kwargs): """SetEvtHandlerEnabled(self, bool enabled)""" - return __core.wxEvtHandler_SetEvtHandlerEnabled(*args, **kwargs) + return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs) def ProcessEvent(*args, **kwargs): - """ProcessEvent(self, wxEvent event) -> bool""" - return __core.wxEvtHandler_ProcessEvent(*args, **kwargs) + """ProcessEvent(self, Event event) -> bool""" + return _core_.EvtHandler_ProcessEvent(*args, **kwargs) def AddPendingEvent(*args, **kwargs): - """AddPendingEvent(self, wxEvent event)""" - return __core.wxEvtHandler_AddPendingEvent(*args, **kwargs) + """AddPendingEvent(self, Event event)""" + return _core_.EvtHandler_AddPendingEvent(*args, **kwargs) def ProcessPendingEvents(*args, **kwargs): """ProcessPendingEvents(self)""" - return __core.wxEvtHandler_ProcessPendingEvents(*args, **kwargs) + return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs) def Connect(*args, **kwargs): """Connect(self, int id, int lastId, int eventType, PyObject func)""" - return __core.wxEvtHandler_Connect(*args, **kwargs) + return _core_.EvtHandler_Connect(*args, **kwargs) def Disconnect(*args, **kwargs): - """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool""" - return __core.wxEvtHandler_Disconnect(*args, **kwargs) + """Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL) -> bool""" + return _core_.EvtHandler_Disconnect(*args, **kwargs) def _setOORInfo(*args, **kwargs): """_setOORInfo(self, PyObject _self, bool incref=True)""" - return __core.wxEvtHandler__setOORInfo(*args, **kwargs) + val = _core_.EvtHandler__setOORInfo(*args, **kwargs) + args[0].thisown = 0 + return val def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY): """ @@ -3009,13 +3811,10 @@ class wxEvtHandler(wxObject): id = source.GetId() return event.Unbind(self, id, id2) - -class wxEvtHandlerPtr(wxEvtHandler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxEvtHandler -__core.wxEvtHandler_swigregister(wxEvtHandlerPtr) + EvtHandlerEnabled = property(GetEvtHandlerEnabled,SetEvtHandlerEnabled,doc="See `GetEvtHandlerEnabled` and `SetEvtHandlerEnabled`") + NextHandler = property(GetNextHandler,SetNextHandler,doc="See `GetNextHandler` and `SetNextHandler`") + PreviousHandler = property(GetPreviousHandler,SetPreviousHandler,doc="See `GetPreviousHandler` and `SetPreviousHandler`") +_core_.EvtHandler_swigregister(EvtHandler) #--------------------------------------------------------------------------- @@ -3086,127 +3885,131 @@ def EVT_COMMAND_RANGE(win, id1, id2, cmd, func): #--------------------------------------------------------------------------- -wxEVENT_PROPAGATE_NONE = __core.wxEVENT_PROPAGATE_NONE -wxEVENT_PROPAGATE_MAX = __core.wxEVENT_PROPAGATE_MAX - -def wxNewEventType(*args, **kwargs): - """wxNewEventType() -> wxEventType""" - return __core.wxNewEventType(*args, **kwargs) -wxEVT_NULL = __core.wxEVT_NULL -wxEVT_FIRST = __core.wxEVT_FIRST -wxEVT_USER_FIRST = __core.wxEVT_USER_FIRST -wxEVT_COMMAND_BUTTON_CLICKED = __core.wxEVT_COMMAND_BUTTON_CLICKED -wxEVT_COMMAND_CHECKBOX_CLICKED = __core.wxEVT_COMMAND_CHECKBOX_CLICKED -wxEVT_COMMAND_CHOICE_SELECTED = __core.wxEVT_COMMAND_CHOICE_SELECTED -wxEVT_COMMAND_LISTBOX_SELECTED = __core.wxEVT_COMMAND_LISTBOX_SELECTED -wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = __core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED -wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = __core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED -wxEVT_COMMAND_MENU_SELECTED = __core.wxEVT_COMMAND_MENU_SELECTED -wxEVT_COMMAND_TOOL_CLICKED = __core.wxEVT_COMMAND_TOOL_CLICKED -wxEVT_COMMAND_SLIDER_UPDATED = __core.wxEVT_COMMAND_SLIDER_UPDATED -wxEVT_COMMAND_RADIOBOX_SELECTED = __core.wxEVT_COMMAND_RADIOBOX_SELECTED -wxEVT_COMMAND_RADIOBUTTON_SELECTED = __core.wxEVT_COMMAND_RADIOBUTTON_SELECTED -wxEVT_COMMAND_SCROLLBAR_UPDATED = __core.wxEVT_COMMAND_SCROLLBAR_UPDATED -wxEVT_COMMAND_VLBOX_SELECTED = __core.wxEVT_COMMAND_VLBOX_SELECTED -wxEVT_COMMAND_COMBOBOX_SELECTED = __core.wxEVT_COMMAND_COMBOBOX_SELECTED -wxEVT_COMMAND_TOOL_RCLICKED = __core.wxEVT_COMMAND_TOOL_RCLICKED -wxEVT_COMMAND_TOOL_ENTER = __core.wxEVT_COMMAND_TOOL_ENTER -wxEVT_LEFT_DOWN = __core.wxEVT_LEFT_DOWN -wxEVT_LEFT_UP = __core.wxEVT_LEFT_UP -wxEVT_MIDDLE_DOWN = __core.wxEVT_MIDDLE_DOWN -wxEVT_MIDDLE_UP = __core.wxEVT_MIDDLE_UP -wxEVT_RIGHT_DOWN = __core.wxEVT_RIGHT_DOWN -wxEVT_RIGHT_UP = __core.wxEVT_RIGHT_UP -wxEVT_MOTION = __core.wxEVT_MOTION -wxEVT_ENTER_WINDOW = __core.wxEVT_ENTER_WINDOW -wxEVT_LEAVE_WINDOW = __core.wxEVT_LEAVE_WINDOW -wxEVT_LEFT_DCLICK = __core.wxEVT_LEFT_DCLICK -wxEVT_MIDDLE_DCLICK = __core.wxEVT_MIDDLE_DCLICK -wxEVT_RIGHT_DCLICK = __core.wxEVT_RIGHT_DCLICK -wxEVT_SET_FOCUS = __core.wxEVT_SET_FOCUS -wxEVT_KILL_FOCUS = __core.wxEVT_KILL_FOCUS -wxEVT_CHILD_FOCUS = __core.wxEVT_CHILD_FOCUS -wxEVT_MOUSEWHEEL = __core.wxEVT_MOUSEWHEEL -wxEVT_NC_LEFT_DOWN = __core.wxEVT_NC_LEFT_DOWN -wxEVT_NC_LEFT_UP = __core.wxEVT_NC_LEFT_UP -wxEVT_NC_MIDDLE_DOWN = __core.wxEVT_NC_MIDDLE_DOWN -wxEVT_NC_MIDDLE_UP = __core.wxEVT_NC_MIDDLE_UP -wxEVT_NC_RIGHT_DOWN = __core.wxEVT_NC_RIGHT_DOWN -wxEVT_NC_RIGHT_UP = __core.wxEVT_NC_RIGHT_UP -wxEVT_NC_MOTION = __core.wxEVT_NC_MOTION -wxEVT_NC_ENTER_WINDOW = __core.wxEVT_NC_ENTER_WINDOW -wxEVT_NC_LEAVE_WINDOW = __core.wxEVT_NC_LEAVE_WINDOW -wxEVT_NC_LEFT_DCLICK = __core.wxEVT_NC_LEFT_DCLICK -wxEVT_NC_MIDDLE_DCLICK = __core.wxEVT_NC_MIDDLE_DCLICK -wxEVT_NC_RIGHT_DCLICK = __core.wxEVT_NC_RIGHT_DCLICK -wxEVT_CHAR = __core.wxEVT_CHAR -wxEVT_CHAR_HOOK = __core.wxEVT_CHAR_HOOK -wxEVT_NAVIGATION_KEY = __core.wxEVT_NAVIGATION_KEY -wxEVT_KEY_DOWN = __core.wxEVT_KEY_DOWN -wxEVT_KEY_UP = __core.wxEVT_KEY_UP -wxEVT_HOTKEY = __core.wxEVT_HOTKEY -wxEVT_SET_CURSOR = __core.wxEVT_SET_CURSOR -wxEVT_SCROLL_TOP = __core.wxEVT_SCROLL_TOP -wxEVT_SCROLL_BOTTOM = __core.wxEVT_SCROLL_BOTTOM -wxEVT_SCROLL_LINEUP = __core.wxEVT_SCROLL_LINEUP -wxEVT_SCROLL_LINEDOWN = __core.wxEVT_SCROLL_LINEDOWN -wxEVT_SCROLL_PAGEUP = __core.wxEVT_SCROLL_PAGEUP -wxEVT_SCROLL_PAGEDOWN = __core.wxEVT_SCROLL_PAGEDOWN -wxEVT_SCROLL_THUMBTRACK = __core.wxEVT_SCROLL_THUMBTRACK -wxEVT_SCROLL_THUMBRELEASE = __core.wxEVT_SCROLL_THUMBRELEASE -wxEVT_SCROLL_ENDSCROLL = __core.wxEVT_SCROLL_ENDSCROLL -wxEVT_SCROLLWIN_TOP = __core.wxEVT_SCROLLWIN_TOP -wxEVT_SCROLLWIN_BOTTOM = __core.wxEVT_SCROLLWIN_BOTTOM -wxEVT_SCROLLWIN_LINEUP = __core.wxEVT_SCROLLWIN_LINEUP -wxEVT_SCROLLWIN_LINEDOWN = __core.wxEVT_SCROLLWIN_LINEDOWN -wxEVT_SCROLLWIN_PAGEUP = __core.wxEVT_SCROLLWIN_PAGEUP -wxEVT_SCROLLWIN_PAGEDOWN = __core.wxEVT_SCROLLWIN_PAGEDOWN -wxEVT_SCROLLWIN_THUMBTRACK = __core.wxEVT_SCROLLWIN_THUMBTRACK -wxEVT_SCROLLWIN_THUMBRELEASE = __core.wxEVT_SCROLLWIN_THUMBRELEASE -wxEVT_SIZE = __core.wxEVT_SIZE -wxEVT_MOVE = __core.wxEVT_MOVE -wxEVT_CLOSE_WINDOW = __core.wxEVT_CLOSE_WINDOW -wxEVT_END_SESSION = __core.wxEVT_END_SESSION -wxEVT_QUERY_END_SESSION = __core.wxEVT_QUERY_END_SESSION -wxEVT_ACTIVATE_APP = __core.wxEVT_ACTIVATE_APP -wxEVT_POWER = __core.wxEVT_POWER -wxEVT_ACTIVATE = __core.wxEVT_ACTIVATE -wxEVT_CREATE = __core.wxEVT_CREATE -wxEVT_DESTROY = __core.wxEVT_DESTROY -wxEVT_SHOW = __core.wxEVT_SHOW -wxEVT_ICONIZE = __core.wxEVT_ICONIZE -wxEVT_MAXIMIZE = __core.wxEVT_MAXIMIZE -wxEVT_MOUSE_CAPTURE_CHANGED = __core.wxEVT_MOUSE_CAPTURE_CHANGED -wxEVT_PAINT = __core.wxEVT_PAINT -wxEVT_ERASE_BACKGROUND = __core.wxEVT_ERASE_BACKGROUND -wxEVT_NC_PAINT = __core.wxEVT_NC_PAINT -wxEVT_PAINT_ICON = __core.wxEVT_PAINT_ICON -wxEVT_MENU_OPEN = __core.wxEVT_MENU_OPEN -wxEVT_MENU_CLOSE = __core.wxEVT_MENU_CLOSE -wxEVT_MENU_HIGHLIGHT = __core.wxEVT_MENU_HIGHLIGHT -wxEVT_CONTEXT_MENU = __core.wxEVT_CONTEXT_MENU -wxEVT_SYS_COLOUR_CHANGED = __core.wxEVT_SYS_COLOUR_CHANGED -wxEVT_DISPLAY_CHANGED = __core.wxEVT_DISPLAY_CHANGED -wxEVT_SETTING_CHANGED = __core.wxEVT_SETTING_CHANGED -wxEVT_QUERY_NEW_PALETTE = __core.wxEVT_QUERY_NEW_PALETTE -wxEVT_PALETTE_CHANGED = __core.wxEVT_PALETTE_CHANGED -wxEVT_DROP_FILES = __core.wxEVT_DROP_FILES -wxEVT_DRAW_ITEM = __core.wxEVT_DRAW_ITEM -wxEVT_MEASURE_ITEM = __core.wxEVT_MEASURE_ITEM -wxEVT_COMPARE_ITEM = __core.wxEVT_COMPARE_ITEM -wxEVT_INIT_DIALOG = __core.wxEVT_INIT_DIALOG -wxEVT_IDLE = __core.wxEVT_IDLE -wxEVT_UPDATE_UI = __core.wxEVT_UPDATE_UI -wxEVT_SIZING = __core.wxEVT_SIZING -wxEVT_MOVING = __core.wxEVT_MOVING -wxEVT_HIBERNATE = __core.wxEVT_HIBERNATE -wxEVT_COMMAND_LEFT_CLICK = __core.wxEVT_COMMAND_LEFT_CLICK -wxEVT_COMMAND_LEFT_DCLICK = __core.wxEVT_COMMAND_LEFT_DCLICK -wxEVT_COMMAND_RIGHT_CLICK = __core.wxEVT_COMMAND_RIGHT_CLICK -wxEVT_COMMAND_RIGHT_DCLICK = __core.wxEVT_COMMAND_RIGHT_DCLICK -wxEVT_COMMAND_SET_FOCUS = __core.wxEVT_COMMAND_SET_FOCUS -wxEVT_COMMAND_KILL_FOCUS = __core.wxEVT_COMMAND_KILL_FOCUS -wxEVT_COMMAND_ENTER = __core.wxEVT_COMMAND_ENTER +EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE +EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX + +def NewEventType(*args): + """NewEventType() -> EventType""" + return _core_.NewEventType(*args) +wxEVT_NULL = _core_.wxEVT_NULL +wxEVT_FIRST = _core_.wxEVT_FIRST +wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST +wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED +wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED +wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED +wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED +wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED +wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED +wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED +wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED +wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED +wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED +wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED +wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED +wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED +wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED +wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED +wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER +wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN +wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP +wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN +wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP +wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN +wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP +wxEVT_MOTION = _core_.wxEVT_MOTION +wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW +wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW +wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK +wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK +wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK +wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS +wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS +wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS +wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL +wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN +wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP +wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN +wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP +wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN +wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP +wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION +wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW +wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW +wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK +wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK +wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK +wxEVT_CHAR = _core_.wxEVT_CHAR +wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK +wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY +wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN +wxEVT_KEY_UP = _core_.wxEVT_KEY_UP +wxEVT_HOTKEY = _core_.wxEVT_HOTKEY +wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR +wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP +wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM +wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP +wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN +wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP +wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN +wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK +wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE +wxEVT_SCROLL_CHANGED = _core_.wxEVT_SCROLL_CHANGED +wxEVT_SCROLL_ENDSCROLL = wxEVT_SCROLL_CHANGED +wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP +wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM +wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP +wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN +wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP +wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN +wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK +wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE +wxEVT_SIZE = _core_.wxEVT_SIZE +wxEVT_MOVE = _core_.wxEVT_MOVE +wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW +wxEVT_END_SESSION = _core_.wxEVT_END_SESSION +wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION +wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP +wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE +wxEVT_CREATE = _core_.wxEVT_CREATE +wxEVT_DESTROY = _core_.wxEVT_DESTROY +wxEVT_SHOW = _core_.wxEVT_SHOW +wxEVT_ICONIZE = _core_.wxEVT_ICONIZE +wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE +wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED +wxEVT_MOUSE_CAPTURE_LOST = _core_.wxEVT_MOUSE_CAPTURE_LOST +wxEVT_PAINT = _core_.wxEVT_PAINT +wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND +wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT +wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON +wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN +wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE +wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT +wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU +wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED +wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED +wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED +wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE +wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED +wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES +wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM +wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM +wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM +wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG +wxEVT_IDLE = _core_.wxEVT_IDLE +wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI +wxEVT_SIZING = _core_.wxEVT_SIZING +wxEVT_MOVING = _core_.wxEVT_MOVING +wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE +wxEVT_COMMAND_TEXT_COPY = _core_.wxEVT_COMMAND_TEXT_COPY +wxEVT_COMMAND_TEXT_CUT = _core_.wxEVT_COMMAND_TEXT_CUT +wxEVT_COMMAND_TEXT_PASTE = _core_.wxEVT_COMMAND_TEXT_PASTE +wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK +wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK +wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK +wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK +wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS +wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS +wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER # # Create some event binders EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE ) @@ -3222,7 +4025,7 @@ EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND ) EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR ) EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN ) EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP ) -EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) +EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1) EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK ) EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN ) EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE ) @@ -3233,7 +4036,7 @@ EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS ) EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS ) EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE ) EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP ) -EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE ) +EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE ) EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION ) EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION ) EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES ) @@ -3250,6 +4053,7 @@ EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE ) EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY ) EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR ) EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED ) +EVT_MOUSE_CAPTURE_LOST = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_LOST ) EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN ) EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP ) @@ -3282,11 +4086,11 @@ EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN, # Scrolling from wxWindow (sent to wxScrolledWindow) -EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, +EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP, wxEVT_SCROLLWIN_BOTTOM, wxEVT_SCROLLWIN_LINEUP, wxEVT_SCROLLWIN_LINEDOWN, - wxEVT_SCROLLWIN_PAGEUP, + wxEVT_SCROLLWIN_PAGEUP, wxEVT_SCROLLWIN_PAGEDOWN, wxEVT_SCROLLWIN_THUMBTRACK, wxEVT_SCROLLWIN_THUMBRELEASE, @@ -3301,16 +4105,16 @@ EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN ) EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK ) EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE ) -# Scrolling from wxSlider and wxScrollBar -EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, - wxEVT_SCROLL_BOTTOM, - wxEVT_SCROLL_LINEUP, - wxEVT_SCROLL_LINEDOWN, - wxEVT_SCROLL_PAGEUP, - wxEVT_SCROLL_PAGEDOWN, - wxEVT_SCROLL_THUMBTRACK, - wxEVT_SCROLL_THUMBRELEASE, - wxEVT_SCROLL_ENDSCROLL, +# Scrolling from wx.Slider and wx.ScrollBar +EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, + wxEVT_SCROLL_BOTTOM, + wxEVT_SCROLL_LINEUP, + wxEVT_SCROLL_LINEDOWN, + wxEVT_SCROLL_PAGEUP, + wxEVT_SCROLL_PAGEDOWN, + wxEVT_SCROLL_THUMBTRACK, + wxEVT_SCROLL_THUMBRELEASE, + wxEVT_SCROLL_CHANGED, ]) EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP ) @@ -3321,18 +4125,19 @@ EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP ) EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN ) EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK ) EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE ) -EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL ) - -# Scrolling from wxSlider and wxScrollBar, with an id -EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, - wxEVT_SCROLL_BOTTOM, - wxEVT_SCROLL_LINEUP, - wxEVT_SCROLL_LINEDOWN, - wxEVT_SCROLL_PAGEUP, - wxEVT_SCROLL_PAGEDOWN, - wxEVT_SCROLL_THUMBTRACK, +EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED ) +EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED + +# Scrolling from wx.Slider and wx.ScrollBar, with an id +EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP, + wxEVT_SCROLL_BOTTOM, + wxEVT_SCROLL_LINEUP, + wxEVT_SCROLL_LINEDOWN, + wxEVT_SCROLL_PAGEUP, + wxEVT_SCROLL_PAGEDOWN, + wxEVT_SCROLL_THUMBTRACK, wxEVT_SCROLL_THUMBRELEASE, - wxEVT_SCROLL_ENDSCROLL, + wxEVT_SCROLL_CHANGED, ], 1) EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1) @@ -3343,7 +4148,8 @@ EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1) EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1) EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1) EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1) -EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1) +EVT_COMMAND_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED, 1) +EVT_COMMAND_SCROLL_ENDSCROLL = EVT_COMMAND_SCROLL_CHANGED EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1) EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1) @@ -3382,378 +4188,635 @@ EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2) EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU ) +EVT_TEXT_CUT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_CUT ) +EVT_TEXT_COPY = wx.PyEventBinder( wxEVT_COMMAND_TEXT_COPY ) +EVT_TEXT_PASTE = wx.PyEventBinder( wxEVT_COMMAND_TEXT_PASTE ) #--------------------------------------------------------------------------- -class wxEvent(wxObject): - """Proxy of C++ wxEvent class""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __del__(self, destroy=__core.delete_wxEvent): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - +class Event(Object): + """ + An event is a structure holding information about an event passed to a + callback or member function. wx.Event is an abstract base class for + other event classes + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_Event + __del__ = lambda self : None; def SetEventType(*args, **kwargs): - """SetEventType(self, wxEventType typ)""" - return __core.wxEvent_SetEventType(*args, **kwargs) + """ + SetEventType(self, EventType typ) + + Sets the specific type of the event. + """ + return _core_.Event_SetEventType(*args, **kwargs) def GetEventType(*args, **kwargs): - """GetEventType(self) -> wxEventType""" - return __core.wxEvent_GetEventType(*args, **kwargs) + """ + GetEventType(self) -> EventType + + Returns the identifier of the given event type, such as + ``wxEVT_COMMAND_BUTTON_CLICKED``. + """ + return _core_.Event_GetEventType(*args, **kwargs) def GetEventObject(*args, **kwargs): - """GetEventObject(self) -> wxObject""" - return __core.wxEvent_GetEventObject(*args, **kwargs) + """ + GetEventObject(self) -> Object + + Returns the object (usually a window) associated with the event, if + any. + """ + return _core_.Event_GetEventObject(*args, **kwargs) def SetEventObject(*args, **kwargs): - """SetEventObject(self, wxObject obj)""" - return __core.wxEvent_SetEventObject(*args, **kwargs) + """ + SetEventObject(self, Object obj) + + Sets the originating object, or in other words, obj is normally the + object that is sending the event. + """ + return _core_.Event_SetEventObject(*args, **kwargs) def GetTimestamp(*args, **kwargs): """GetTimestamp(self) -> long""" - return __core.wxEvent_GetTimestamp(*args, **kwargs) + return _core_.Event_GetTimestamp(*args, **kwargs) def SetTimestamp(*args, **kwargs): """SetTimestamp(self, long ts=0)""" - return __core.wxEvent_SetTimestamp(*args, **kwargs) + return _core_.Event_SetTimestamp(*args, **kwargs) def GetId(*args, **kwargs): - """GetId(self) -> int""" - return __core.wxEvent_GetId(*args, **kwargs) + """ + GetId(self) -> int + + Returns the identifier associated with this event, such as a button + command id. + """ + return _core_.Event_GetId(*args, **kwargs) def SetId(*args, **kwargs): - """SetId(self, int Id)""" - return __core.wxEvent_SetId(*args, **kwargs) + """ + SetId(self, int Id) + + Set's the ID for the event. This is usually the ID of the window that + is sending the event, but it can also be a command id from a menu + item, etc. + """ + return _core_.Event_SetId(*args, **kwargs) def IsCommandEvent(*args, **kwargs): - """IsCommandEvent(self) -> bool""" - return __core.wxEvent_IsCommandEvent(*args, **kwargs) + """ + IsCommandEvent(self) -> bool + + Returns true if the event is or is derived from `wx.CommandEvent` else + it returns false. Note: Exists only for optimization purposes. + """ + return _core_.Event_IsCommandEvent(*args, **kwargs) def Skip(*args, **kwargs): """ Skip(self, bool skip=True) - Called by an event handler, it controls whether additional event - handlers bound to this event will be called after the current event - handler returns. Skip(false) (the default setting) will prevent - additional event handlers from being called and control will be - returned to the sender of the event immediately after the current - handler has finished. Skip(True) will cause the event processing - system to continue searching for a handler function for this event. - + This method can be used inside an event handler to control whether + further event handlers bound to this event will be called after the + current one returns. Without Skip() (or equivalently if Skip(False) is + used), the event will not be processed any more. If Skip(True) is + called, the event processing system continues searching for a further + handler function for this event, even though it has been processed + already in the current handler. """ - return __core.wxEvent_Skip(*args, **kwargs) + return _core_.Event_Skip(*args, **kwargs) def GetSkipped(*args, **kwargs): - """GetSkipped(self) -> bool""" - return __core.wxEvent_GetSkipped(*args, **kwargs) + """ + GetSkipped(self) -> bool + + Returns true if the event handler should be skipped, false otherwise. + :see: `Skip` + """ + return _core_.Event_GetSkipped(*args, **kwargs) def ShouldPropagate(*args, **kwargs): - """ShouldPropagate(self) -> bool""" - return __core.wxEvent_ShouldPropagate(*args, **kwargs) + """ + ShouldPropagate(self) -> bool + + Test if this event should be propagated to the parent window or not, + i.e. if the propagation level is currently greater than 0. + """ + return _core_.Event_ShouldPropagate(*args, **kwargs) def StopPropagation(*args, **kwargs): - """StopPropagation(self) -> int""" - return __core.wxEvent_StopPropagation(*args, **kwargs) + """ + StopPropagation(self) -> int - def ResumePropagation(*args, **kwargs): - """ResumePropagation(self, int propagationLevel)""" - return __core.wxEvent_ResumePropagation(*args, **kwargs) + Stop the event from propagating to its parent window. Returns the old + propagation level value which may be later passed to + `ResumePropagation` to allow propagating the event again. + """ + return _core_.Event_StopPropagation(*args, **kwargs) - def Clone(*args, **kwargs): - """Clone(self) -> wxEvent""" - return __core.wxEvent_Clone(*args, **kwargs) + def ResumePropagation(*args, **kwargs): + """ + ResumePropagation(self, int propagationLevel) + Resume the event propagation by restoring the propagation level. (For + example, you can use the value returned by an earlier call to + `StopPropagation`.) -class wxEventPtr(wxEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxEvent -__core.wxEvent_swigregister(wxEventPtr) + """ + return _core_.Event_ResumePropagation(*args, **kwargs) -#--------------------------------------------------------------------------- + def Clone(*args, **kwargs): + """Clone(self) -> Event""" + return _core_.Event_Clone(*args, **kwargs) -class wxPropagationDisabler(object): - """Proxy of C++ wxPropagationDisabler class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEvent event) -> wxPropagationDisabler""" - newobj = __core.new_wxPropagationDisabler(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxPropagationDisabler): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + EventObject = property(GetEventObject,SetEventObject,doc="See `GetEventObject` and `SetEventObject`") + EventType = property(GetEventType,SetEventType,doc="See `GetEventType` and `SetEventType`") + Id = property(GetId,SetId,doc="See `GetId` and `SetId`") + Skipped = property(GetSkipped,doc="See `GetSkipped`") + Timestamp = property(GetTimestamp,SetTimestamp,doc="See `GetTimestamp` and `SetTimestamp`") +_core_.Event_swigregister(Event) +#--------------------------------------------------------------------------- -class wxPropagationDisablerPtr(wxPropagationDisabler): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPropagationDisabler -__core.wxPropagationDisabler_swigregister(wxPropagationDisablerPtr) +class PropagationDisabler(object): + """ + Helper class to temporarily change an event not to propagate. Simply + create an instance of this class and then whe it is destroyed the + propogation of the event will be restored. + """ + 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, Event event) -> PropagationDisabler -class wxPropagateOnce(object): - """Proxy of C++ wxPropagateOnce class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEvent event) -> wxPropagateOnce""" - newobj = __core.new_wxPropagateOnce(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxPropagateOnce): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + Helper class to temporarily change an event not to propagate. Simply + create an instance of this class and then whe it is destroyed the + propogation of the event will be restored. + """ + _core_.PropagationDisabler_swiginit(self,_core_.new_PropagationDisabler(*args, **kwargs)) + __swig_destroy__ = _core_.delete_PropagationDisabler + __del__ = lambda self : None; +_core_.PropagationDisabler_swigregister(PropagationDisabler) +class PropagateOnce(object): + """ + A helper class that will temporarily lower propagation level of an + event. Simply create an instance of this class and then whe it is + destroyed the propogation of the event will be restored. + """ + 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, Event event) -> PropagateOnce -class wxPropagateOncePtr(wxPropagateOnce): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPropagateOnce -__core.wxPropagateOnce_swigregister(wxPropagateOncePtr) + A helper class that will temporarily lower propagation level of an + event. Simply create an instance of this class and then whe it is + destroyed the propogation of the event will be restored. + """ + _core_.PropagateOnce_swiginit(self,_core_.new_PropagateOnce(*args, **kwargs)) + __swig_destroy__ = _core_.delete_PropagateOnce + __del__ = lambda self : None; +_core_.PropagateOnce_swigregister(PropagateOnce) #--------------------------------------------------------------------------- -class wxCommandEvent(wxEvent): - """Proxy of C++ wxCommandEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> wxCommandEvent""" - newobj = __core.new_wxCommandEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class CommandEvent(Event): + """ + This event class contains information about command events, which + originate from a variety of simple controls, as well as menus and + toolbars. + """ + 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, EventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent + + This event class contains information about command events, which + originate from a variety of simple controls, as well as menus and + toolbars. + """ + _core_.CommandEvent_swiginit(self,_core_.new_CommandEvent(*args, **kwargs)) def GetSelection(*args, **kwargs): - """GetSelection(self) -> int""" - return __core.wxCommandEvent_GetSelection(*args, **kwargs) + """ + GetSelection(self) -> int + + Returns item index for a listbox or choice selection event (not valid + for a deselection). + """ + return _core_.CommandEvent_GetSelection(*args, **kwargs) def SetString(*args, **kwargs): - """SetString(self, wxString s)""" - return __core.wxCommandEvent_SetString(*args, **kwargs) + """SetString(self, String s)""" + return _core_.CommandEvent_SetString(*args, **kwargs) def GetString(*args, **kwargs): - """GetString(self) -> wxString""" - return __core.wxCommandEvent_GetString(*args, **kwargs) + """ + GetString(self) -> String + + Returns item string for a listbox or choice selection event (not valid + for a deselection). + """ + return _core_.CommandEvent_GetString(*args, **kwargs) def IsChecked(*args, **kwargs): - """IsChecked(self) -> bool""" - return __core.wxCommandEvent_IsChecked(*args, **kwargs) + """ + IsChecked(self) -> bool + + This method can be used with checkbox and menu events: for the + checkboxes, the method returns true for a selection event and false + for a deselection one. For the menu events, this method indicates if + the menu item just has become checked or unchecked (and thus only + makes sense for checkable menu items). + """ + return _core_.CommandEvent_IsChecked(*args, **kwargs) Checked = IsChecked def IsSelection(*args, **kwargs): - """IsSelection(self) -> bool""" - return __core.wxCommandEvent_IsSelection(*args, **kwargs) + """ + IsSelection(self) -> bool + + For a listbox or similar event, returns true if it is a selection, + false if it is a deselection. + """ + return _core_.CommandEvent_IsSelection(*args, **kwargs) def SetExtraLong(*args, **kwargs): """SetExtraLong(self, long extraLong)""" - return __core.wxCommandEvent_SetExtraLong(*args, **kwargs) + return _core_.CommandEvent_SetExtraLong(*args, **kwargs) def GetExtraLong(*args, **kwargs): - """GetExtraLong(self) -> long""" - return __core.wxCommandEvent_GetExtraLong(*args, **kwargs) + """ + GetExtraLong(self) -> long + + Returns extra information dependant on the event objects type. If the + event comes from a listbox selection, it is a boolean determining + whether the event was a selection (true) or a deselection (false). A + listbox deselection only occurs for multiple-selection boxes, and in + this case the index and string values are indeterminate and the + listbox must be examined by the application. + """ + return _core_.CommandEvent_GetExtraLong(*args, **kwargs) def SetInt(*args, **kwargs): """SetInt(self, int i)""" - return __core.wxCommandEvent_SetInt(*args, **kwargs) + return _core_.CommandEvent_SetInt(*args, **kwargs) def GetInt(*args, **kwargs): - """GetInt(self) -> long""" - return __core.wxCommandEvent_GetInt(*args, **kwargs) + """ + GetInt(self) -> int - def Clone(*args, **kwargs): - """Clone(self) -> wxEvent""" - return __core.wxCommandEvent_Clone(*args, **kwargs) + Returns the integer identifier corresponding to a listbox, choice or + radiobox selection (only if the event was a selection, not a + deselection), or a boolean value representing the value of a checkbox. + """ + return _core_.CommandEvent_GetInt(*args, **kwargs) + + def GetClientData(*args, **kwargs): + """ + GetClientData(self) -> PyObject + + Returns the client data object for a listbox or choice selection event, (if any.) + """ + return _core_.CommandEvent_GetClientData(*args, **kwargs) + + def SetClientData(*args, **kwargs): + """ + SetClientData(self, PyObject clientData) + Associate the given client data with the item at position n. + """ + return _core_.CommandEvent_SetClientData(*args, **kwargs) + + GetClientObject = GetClientData + SetClientObject = SetClientData + + def Clone(*args, **kwargs): + """Clone(self) -> Event""" + return _core_.CommandEvent_Clone(*args, **kwargs) -class wxCommandEventPtr(wxCommandEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxCommandEvent -__core.wxCommandEvent_swigregister(wxCommandEventPtr) + ClientData = property(GetClientData,SetClientData,doc="See `GetClientData` and `SetClientData`") + ClientObject = property(GetClientObject,SetClientObject,doc="See `GetClientObject` and `SetClientObject`") + ExtraLong = property(GetExtraLong,SetExtraLong,doc="See `GetExtraLong` and `SetExtraLong`") + Int = property(GetInt,SetInt,doc="See `GetInt` and `SetInt`") + Selection = property(GetSelection,doc="See `GetSelection`") + String = property(GetString,SetString,doc="See `GetString` and `SetString`") +_core_.CommandEvent_swigregister(CommandEvent) #--------------------------------------------------------------------------- -class wxNotifyEvent(wxCommandEvent): - """Proxy of C++ wxNotifyEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> wxNotifyEvent""" - newobj = __core.new_wxNotifyEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class NotifyEvent(CommandEvent): + """ + An instance of this class (or one of its derived classes) is sent from + a control when the control's state is being changed and the control + allows that change to be prevented from happening. The event handler + can call `Veto` or `Allow` to tell the control what to do. + """ + 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, EventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent + + An instance of this class (or one of its derived classes) is sent from + a control when the control's state is being changed and the control + allows that change to be prevented from happening. The event handler + can call `Veto` or `Allow` to tell the control what to do. + """ + _core_.NotifyEvent_swiginit(self,_core_.new_NotifyEvent(*args, **kwargs)) def Veto(*args, **kwargs): - """Veto(self)""" - return __core.wxNotifyEvent_Veto(*args, **kwargs) + """ + Veto(self) + + Prevents the change announced by this event from happening. + + It is in general a good idea to notify the user about the reasons for + vetoing the change because otherwise the applications behaviour (which + just refuses to do what the user wants) might be quite surprising. + """ + return _core_.NotifyEvent_Veto(*args, **kwargs) def Allow(*args, **kwargs): - """Allow(self)""" - return __core.wxNotifyEvent_Allow(*args, **kwargs) + """ + Allow(self) + + This is the opposite of `Veto`: it explicitly allows the event to be + processed. For most events it is not necessary to call this method as + the events are allowed anyhow but some are forbidden by default (this + will be mentioned in the corresponding event description). + """ + return _core_.NotifyEvent_Allow(*args, **kwargs) def IsAllowed(*args, **kwargs): - """IsAllowed(self) -> bool""" - return __core.wxNotifyEvent_IsAllowed(*args, **kwargs) + """ + IsAllowed(self) -> bool + Returns true if the change is allowed (`Veto` hasn't been called) or + false otherwise (if it was). + """ + return _core_.NotifyEvent_IsAllowed(*args, **kwargs) -class wxNotifyEventPtr(wxNotifyEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxNotifyEvent -__core.wxNotifyEvent_swigregister(wxNotifyEventPtr) +_core_.NotifyEvent_swigregister(NotifyEvent) #--------------------------------------------------------------------------- -class wxScrollEvent(wxCommandEvent): - """Proxy of C++ wxScrollEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): +class ScrollEvent(CommandEvent): + """ + A scroll event holds information about events sent from stand-alone + scrollbars and sliders. Note that scrolled windows do not send + instnaces of this event class, but send the `wx.ScrollWinEvent` + instead. + """ + 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, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0, - int orient=0) -> wxScrollEvent + __init__(self, EventType commandType=wxEVT_NULL, int winid=0, int pos=0, + int orient=0) -> ScrollEvent """ - newobj = __core.new_wxScrollEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.ScrollEvent_swiginit(self,_core_.new_ScrollEvent(*args, **kwargs)) def GetOrientation(*args, **kwargs): - """GetOrientation(self) -> int""" - return __core.wxScrollEvent_GetOrientation(*args, **kwargs) + """ + GetOrientation(self) -> int + + Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of + the scrollbar. + """ + return _core_.ScrollEvent_GetOrientation(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> int""" - return __core.wxScrollEvent_GetPosition(*args, **kwargs) + """ + GetPosition(self) -> int + + Returns the position of the scrollbar. + """ + return _core_.ScrollEvent_GetPosition(*args, **kwargs) def SetOrientation(*args, **kwargs): """SetOrientation(self, int orient)""" - return __core.wxScrollEvent_SetOrientation(*args, **kwargs) + return _core_.ScrollEvent_SetOrientation(*args, **kwargs) def SetPosition(*args, **kwargs): """SetPosition(self, int pos)""" - return __core.wxScrollEvent_SetPosition(*args, **kwargs) - + return _core_.ScrollEvent_SetPosition(*args, **kwargs) -class wxScrollEventPtr(wxScrollEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxScrollEvent -__core.wxScrollEvent_swigregister(wxScrollEventPtr) + Orientation = property(GetOrientation,SetOrientation,doc="See `GetOrientation` and `SetOrientation`") + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") +_core_.ScrollEvent_swigregister(ScrollEvent) #--------------------------------------------------------------------------- -class wxScrollWinEvent(wxEvent): - """Proxy of C++ wxScrollWinEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> wxScrollWinEvent""" - newobj = __core.new_wxScrollWinEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class ScrollWinEvent(Event): + """ + A wx.ScrollWinEvent holds information about scrolling and is sent from + scrolling windows. + """ + 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, EventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent + + A wx.ScrollWinEvent holds information about scrolling and is sent from + scrolling windows. + """ + _core_.ScrollWinEvent_swiginit(self,_core_.new_ScrollWinEvent(*args, **kwargs)) def GetOrientation(*args, **kwargs): - """GetOrientation(self) -> int""" - return __core.wxScrollWinEvent_GetOrientation(*args, **kwargs) + """ + GetOrientation(self) -> int + + Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of + the scrollbar. + """ + return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs) def GetPosition(*args, **kwargs): - """GetPosition(self) -> int""" - return __core.wxScrollWinEvent_GetPosition(*args, **kwargs) + """ + GetPosition(self) -> int + + Returns the position of the scrollbar for the thumb track and release + events. Note that this field can't be used for the other events, you + need to query the window itself for the current position in that case. + """ + return _core_.ScrollWinEvent_GetPosition(*args, **kwargs) def SetOrientation(*args, **kwargs): """SetOrientation(self, int orient)""" - return __core.wxScrollWinEvent_SetOrientation(*args, **kwargs) + return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs) def SetPosition(*args, **kwargs): """SetPosition(self, int pos)""" - return __core.wxScrollWinEvent_SetPosition(*args, **kwargs) - + return _core_.ScrollWinEvent_SetPosition(*args, **kwargs) -class wxScrollWinEventPtr(wxScrollWinEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxScrollWinEvent -__core.wxScrollWinEvent_swigregister(wxScrollWinEventPtr) + Orientation = property(GetOrientation,SetOrientation,doc="See `GetOrientation` and `SetOrientation`") + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") +_core_.ScrollWinEvent_swigregister(ScrollWinEvent) #--------------------------------------------------------------------------- -wxMOUSE_BTN_ANY = __core.wxMOUSE_BTN_ANY -wxMOUSE_BTN_NONE = __core.wxMOUSE_BTN_NONE -wxMOUSE_BTN_LEFT = __core.wxMOUSE_BTN_LEFT -wxMOUSE_BTN_MIDDLE = __core.wxMOUSE_BTN_MIDDLE -wxMOUSE_BTN_RIGHT = __core.wxMOUSE_BTN_RIGHT -class wxMouseEvent(wxEvent): - """Proxy of C++ wxMouseEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType mouseType=wxEVT_NULL) -> wxMouseEvent""" - newobj = __core.new_wxMouseEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY +MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE +MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT +MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE +MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT +class MouseEvent(Event): + """ + This event class contains information about the events generated by + the mouse: they include mouse buttons press and release events and + mouse move events. + + All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for + the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and + ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have + a middle button so a portable application should avoid relying on the + events from it. + + Note the difference between methods like `LeftDown` and `LeftIsDown`: + the former returns true when the event corresponds to the left mouse + button click while the latter returns true if the left mouse button is + currently being pressed. For example, when the user is dragging the + mouse you can use `LeftIsDown` to test whether the left mouse button + is (still) depressed. Also, by convention, if `LeftDown` returns true, + `LeftIsDown` will also return true in wxWidgets whatever the + underlying GUI behaviour is (which is platform-dependent). The same + applies, of course, to other mouse buttons as well. + """ + 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, EventType mouseType=wxEVT_NULL) -> MouseEvent + + Constructs a wx.MouseEvent. Valid event types are: + + * wxEVT_ENTER_WINDOW + * wxEVT_LEAVE_WINDOW + * wxEVT_LEFT_DOWN + * wxEVT_LEFT_UP + * wxEVT_LEFT_DCLICK + * wxEVT_MIDDLE_DOWN + * wxEVT_MIDDLE_UP + * wxEVT_MIDDLE_DCLICK + * wxEVT_RIGHT_DOWN + * wxEVT_RIGHT_UP + * wxEVT_RIGHT_DCLICK + * wxEVT_MOTION + * wxEVT_MOUSEWHEEL + """ + _core_.MouseEvent_swiginit(self,_core_.new_MouseEvent(*args, **kwargs)) def IsButton(*args, **kwargs): - """IsButton(self) -> bool""" - return __core.wxMouseEvent_IsButton(*args, **kwargs) + """ + IsButton(self) -> bool + + Returns true if the event was a mouse button event (not necessarily a + button down event - that may be tested using `ButtonDown`). + """ + return _core_.MouseEvent_IsButton(*args, **kwargs) def ButtonDown(*args, **kwargs): - """ButtonDown(self, int but=wxMOUSE_BTN_ANY) -> bool""" - return __core.wxMouseEvent_ButtonDown(*args, **kwargs) + """ + ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool + + If the argument is omitted, this returns true if the event was any + mouse button down event. Otherwise the argument specifies which + button-down event shold be checked for (see `Button` for the possible + values). + """ + return _core_.MouseEvent_ButtonDown(*args, **kwargs) def ButtonDClick(*args, **kwargs): - """ButtonDClick(self, int but=wxMOUSE_BTN_ANY) -> bool""" - return __core.wxMouseEvent_ButtonDClick(*args, **kwargs) + """ + ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool + + If the argument is omitted, this returns true if the event was any + mouse double click event. Otherwise the argument specifies which + double click event to check for (see `Button` for the possible + values). + """ + return _core_.MouseEvent_ButtonDClick(*args, **kwargs) def ButtonUp(*args, **kwargs): - """ButtonUp(self, int but=wxMOUSE_BTN_ANY) -> bool""" - return __core.wxMouseEvent_ButtonUp(*args, **kwargs) + """ + ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool + + If the argument is omitted, this returns true if the event was any + mouse button up event. Otherwise the argument specifies which button + up event to check for (see `Button` for the possible values). + """ + return _core_.MouseEvent_ButtonUp(*args, **kwargs) def Button(*args, **kwargs): - """Button(self, int but) -> bool""" - return __core.wxMouseEvent_Button(*args, **kwargs) + """ + Button(self, int button) -> bool + + Returns true if the identified mouse button is changing state. Valid + values of button are: + + ==================== ===================================== + wx.MOUSE_BTN_LEFT check if left button was pressed + wx.MOUSE_BTN_MIDDLE check if middle button was pressed + wx.MOUSE_BTN_RIGHT check if right button was pressed + wx.MOUSE_BTN_ANY check if any button was pressed + ==================== ===================================== + + """ + return _core_.MouseEvent_Button(*args, **kwargs) def ButtonIsDown(*args, **kwargs): """ButtonIsDown(self, int but) -> bool""" - return __core.wxMouseEvent_ButtonIsDown(*args, **kwargs) + return _core_.MouseEvent_ButtonIsDown(*args, **kwargs) def GetButton(*args, **kwargs): - """GetButton(self) -> int""" - return __core.wxMouseEvent_GetButton(*args, **kwargs) + """ + GetButton(self) -> int + + Returns the mouse button which generated this event or + wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or + leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for + the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE + and wx.MOUSE_BTN_RIGHT for the same events for the middle and the + right buttons respectively. + """ + return _core_.MouseEvent_GetButton(*args, **kwargs) def ControlDown(*args, **kwargs): - """ControlDown(self) -> bool""" - return __core.wxMouseEvent_ControlDown(*args, **kwargs) + """ + ControlDown(self) -> bool + + Returns true if the control key was down at the time of the event. + """ + return _core_.MouseEvent_ControlDown(*args, **kwargs) def MetaDown(*args, **kwargs): - """MetaDown(self) -> bool""" - return __core.wxMouseEvent_MetaDown(*args, **kwargs) + """ + MetaDown(self) -> bool + + Returns true if the Meta key was down at the time of the event. + """ + return _core_.MouseEvent_MetaDown(*args, **kwargs) def AltDown(*args, **kwargs): - """AltDown(self) -> bool""" - return __core.wxMouseEvent_AltDown(*args, **kwargs) + """ + AltDown(self) -> bool + + Returns true if the Alt key was down at the time of the event. + """ + return _core_.MouseEvent_AltDown(*args, **kwargs) def ShiftDown(*args, **kwargs): - """ShiftDown(self) -> bool""" - return __core.wxMouseEvent_ShiftDown(*args, **kwargs) + """ + ShiftDown(self) -> bool + + Returns true if the Shift key was down at the time of the event. + """ + return _core_.MouseEvent_ShiftDown(*args, **kwargs) def CmdDown(*args, **kwargs): """ @@ -3761,211 +4824,449 @@ class wxMouseEvent(wxEvent): "Cmd" is a pseudo key which is the same as Control for PC and Unix platforms but the special "Apple" (a.k.a as "Command") key on - Macs: it makes often sense to use it instead of, say, `ControlDown` + Macs. It often makes sense to use it instead of, say, `ControlDown` because Cmd key is used for the same thing under Mac as Ctrl - elsewhere. The Ctrl still exists, it's just not used for this + elsewhere. The Ctrl key still exists, it's just not used for this purpose. So for non-Mac platforms this is the same as `ControlDown` and Macs this is the same as `MetaDown`. """ - return __core.wxMouseEvent_CmdDown(*args, **kwargs) + return _core_.MouseEvent_CmdDown(*args, **kwargs) def LeftDown(*args, **kwargs): - """LeftDown(self) -> bool""" - return __core.wxMouseEvent_LeftDown(*args, **kwargs) + """ + LeftDown(self) -> bool + + Returns true if the left mouse button state changed to down. + """ + return _core_.MouseEvent_LeftDown(*args, **kwargs) def MiddleDown(*args, **kwargs): - """MiddleDown(self) -> bool""" - return __core.wxMouseEvent_MiddleDown(*args, **kwargs) + """ + MiddleDown(self) -> bool + + Returns true if the middle mouse button state changed to down. + """ + return _core_.MouseEvent_MiddleDown(*args, **kwargs) def RightDown(*args, **kwargs): - """RightDown(self) -> bool""" - return __core.wxMouseEvent_RightDown(*args, **kwargs) + """ + RightDown(self) -> bool + + Returns true if the right mouse button state changed to down. + """ + return _core_.MouseEvent_RightDown(*args, **kwargs) def LeftUp(*args, **kwargs): - """LeftUp(self) -> bool""" - return __core.wxMouseEvent_LeftUp(*args, **kwargs) + """ + LeftUp(self) -> bool + + Returns true if the left mouse button state changed to up. + """ + return _core_.MouseEvent_LeftUp(*args, **kwargs) def MiddleUp(*args, **kwargs): - """MiddleUp(self) -> bool""" - return __core.wxMouseEvent_MiddleUp(*args, **kwargs) + """ + MiddleUp(self) -> bool + + Returns true if the middle mouse button state changed to up. + """ + return _core_.MouseEvent_MiddleUp(*args, **kwargs) def RightUp(*args, **kwargs): - """RightUp(self) -> bool""" - return __core.wxMouseEvent_RightUp(*args, **kwargs) + """ + RightUp(self) -> bool + + Returns true if the right mouse button state changed to up. + """ + return _core_.MouseEvent_RightUp(*args, **kwargs) def LeftDClick(*args, **kwargs): - """LeftDClick(self) -> bool""" - return __core.wxMouseEvent_LeftDClick(*args, **kwargs) + """ + LeftDClick(self) -> bool + + Returns true if the event was a left button double click. + """ + return _core_.MouseEvent_LeftDClick(*args, **kwargs) def MiddleDClick(*args, **kwargs): - """MiddleDClick(self) -> bool""" - return __core.wxMouseEvent_MiddleDClick(*args, **kwargs) + """ + MiddleDClick(self) -> bool + + Returns true if the event was a middle button double click. + """ + return _core_.MouseEvent_MiddleDClick(*args, **kwargs) def RightDClick(*args, **kwargs): - """RightDClick(self) -> bool""" - return __core.wxMouseEvent_RightDClick(*args, **kwargs) + """ + RightDClick(self) -> bool + + Returns true if the event was a right button double click. + """ + return _core_.MouseEvent_RightDClick(*args, **kwargs) def LeftIsDown(*args, **kwargs): - """LeftIsDown(self) -> bool""" - return __core.wxMouseEvent_LeftIsDown(*args, **kwargs) + """ + LeftIsDown(self) -> bool - def MiddleIsDown(*args, **kwargs): - """MiddleIsDown(self) -> bool""" - return __core.wxMouseEvent_MiddleIsDown(*args, **kwargs) + Returns true if the left mouse button is currently down, independent + of the current event type. - def RightIsDown(*args, **kwargs): - """RightIsDown(self) -> bool""" - return __core.wxMouseEvent_RightIsDown(*args, **kwargs) + Please notice that it is not the same as LeftDown which returns true + if the left mouse button was just pressed. Rather, it describes the + state of the mouse button before the event happened. - def Dragging(*args, **kwargs): - """Dragging(self) -> bool""" - return __core.wxMouseEvent_Dragging(*args, **kwargs) + This event is usually used in the mouse event handlers which process + "move mouse" messages to determine whether the user is (still) + dragging the mouse. + """ + return _core_.MouseEvent_LeftIsDown(*args, **kwargs) + + def MiddleIsDown(*args, **kwargs): + """ + MiddleIsDown(self) -> bool + + Returns true if the middle mouse button is currently down, independent + of the current event type. + """ + return _core_.MouseEvent_MiddleIsDown(*args, **kwargs) + + def RightIsDown(*args, **kwargs): + """ + RightIsDown(self) -> bool + + Returns true if the right mouse button is currently down, independent + of the current event type. + """ + return _core_.MouseEvent_RightIsDown(*args, **kwargs) + + def Dragging(*args, **kwargs): + """ + Dragging(self) -> bool + + Returns true if this was a dragging event (motion while a button is + depressed). + """ + return _core_.MouseEvent_Dragging(*args, **kwargs) def Moving(*args, **kwargs): - """Moving(self) -> bool""" - return __core.wxMouseEvent_Moving(*args, **kwargs) + """ + Moving(self) -> bool + + Returns true if this was a motion event and no mouse buttons were + pressed. If any mouse button is held pressed, then this method returns + false and Dragging returns true. + """ + return _core_.MouseEvent_Moving(*args, **kwargs) def Entering(*args, **kwargs): - """Entering(self) -> bool""" - return __core.wxMouseEvent_Entering(*args, **kwargs) + """ + Entering(self) -> bool + + Returns true if the mouse was entering the window. + """ + return _core_.MouseEvent_Entering(*args, **kwargs) def Leaving(*args, **kwargs): - """Leaving(self) -> bool""" - return __core.wxMouseEvent_Leaving(*args, **kwargs) + """ + Leaving(self) -> bool + + Returns true if the mouse was leaving the window. + """ + return _core_.MouseEvent_Leaving(*args, **kwargs) def GetPosition(*args, **kwargs): """ - GetPosition(self) -> wxPoint + GetPosition(self) -> Point - Returns the position of the mouse in window coordinates when the event - happened. + Returns the pixel position of the mouse in window coordinates when the + event happened. """ - return __core.wxMouseEvent_GetPosition(*args, **kwargs) + return _core_.MouseEvent_GetPosition(*args, **kwargs) def GetPositionTuple(*args, **kwargs): """ GetPositionTuple() -> (x,y) - Returns the position of the mouse in window coordinates when the event - happened. + Returns the pixel position of the mouse in window coordinates when the + event happened. """ - return __core.wxMouseEvent_GetPositionTuple(*args, **kwargs) + return _core_.MouseEvent_GetPositionTuple(*args, **kwargs) def GetLogicalPosition(*args, **kwargs): - """GetLogicalPosition(self, wxDC dc) -> wxPoint""" - return __core.wxMouseEvent_GetLogicalPosition(*args, **kwargs) + """ + GetLogicalPosition(self, DC dc) -> Point + + Returns the logical mouse position in pixels (i.e. translated + according to the translation set for the DC, which usually indicates + that the window has been scrolled). + """ + return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs) def GetX(*args, **kwargs): - """GetX(self) -> int""" - return __core.wxMouseEvent_GetX(*args, **kwargs) + """ + GetX(self) -> int + + Returns X coordinate of the physical mouse event position. + """ + return _core_.MouseEvent_GetX(*args, **kwargs) def GetY(*args, **kwargs): - """GetY(self) -> int""" - return __core.wxMouseEvent_GetY(*args, **kwargs) + """ + GetY(self) -> int + + Returns Y coordinate of the physical mouse event position. + """ + return _core_.MouseEvent_GetY(*args, **kwargs) def GetWheelRotation(*args, **kwargs): - """GetWheelRotation(self) -> int""" - return __core.wxMouseEvent_GetWheelRotation(*args, **kwargs) + """ + GetWheelRotation(self) -> int + + Get wheel rotation, positive or negative indicates direction of + rotation. Current devices all send an event when rotation is equal to + +/-WheelDelta, but this allows for finer resolution devices to be + created in the future. Because of this you shouldn't assume that one + event is equal to 1 line or whatever, but you should be able to either + do partial line scrolling or wait until +/-WheelDelta rotation values + have been accumulated before scrolling. + """ + return _core_.MouseEvent_GetWheelRotation(*args, **kwargs) def GetWheelDelta(*args, **kwargs): - """GetWheelDelta(self) -> int""" - return __core.wxMouseEvent_GetWheelDelta(*args, **kwargs) + """ + GetWheelDelta(self) -> int + + Get wheel delta, normally 120. This is the threshold for action to be + taken, and one such action (for example, scrolling one increment) + should occur for each delta. + """ + return _core_.MouseEvent_GetWheelDelta(*args, **kwargs) def GetLinesPerAction(*args, **kwargs): - """GetLinesPerAction(self) -> int""" - return __core.wxMouseEvent_GetLinesPerAction(*args, **kwargs) + """ + GetLinesPerAction(self) -> int + + Returns the configured number of lines (or whatever) to be scrolled + per wheel action. Defaults to three. + """ + return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs) def IsPageScroll(*args, **kwargs): - """IsPageScroll(self) -> bool""" - return __core.wxMouseEvent_IsPageScroll(*args, **kwargs) - - m_x = property(__core.wxMouseEvent_m_x_get, __core.wxMouseEvent_m_x_set) - m_y = property(__core.wxMouseEvent_m_y_get, __core.wxMouseEvent_m_y_set) - m_leftDown = property(__core.wxMouseEvent_m_leftDown_get, __core.wxMouseEvent_m_leftDown_set) - m_middleDown = property(__core.wxMouseEvent_m_middleDown_get, __core.wxMouseEvent_m_middleDown_set) - m_rightDown = property(__core.wxMouseEvent_m_rightDown_get, __core.wxMouseEvent_m_rightDown_set) - m_controlDown = property(__core.wxMouseEvent_m_controlDown_get, __core.wxMouseEvent_m_controlDown_set) - m_shiftDown = property(__core.wxMouseEvent_m_shiftDown_get, __core.wxMouseEvent_m_shiftDown_set) - m_altDown = property(__core.wxMouseEvent_m_altDown_get, __core.wxMouseEvent_m_altDown_set) - m_metaDown = property(__core.wxMouseEvent_m_metaDown_get, __core.wxMouseEvent_m_metaDown_set) - m_wheelRotation = property(__core.wxMouseEvent_m_wheelRotation_get, __core.wxMouseEvent_m_wheelRotation_set) - m_wheelDelta = property(__core.wxMouseEvent_m_wheelDelta_get, __core.wxMouseEvent_m_wheelDelta_set) - m_linesPerAction = property(__core.wxMouseEvent_m_linesPerAction_get, __core.wxMouseEvent_m_linesPerAction_set) - -class wxMouseEventPtr(wxMouseEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMouseEvent -__core.wxMouseEvent_swigregister(wxMouseEventPtr) + """ + IsPageScroll(self) -> bool + + Returns true if the system has been setup to do page scrolling with + the mouse wheel instead of line scrolling. + """ + return _core_.MouseEvent_IsPageScroll(*args, **kwargs) + + m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set) + m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set) + m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set) + m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set) + m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set) + m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set) + m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set) + m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set) + m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set) + m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set) + m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set) + m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set) + Button = property(GetButton,doc="See `GetButton`") + LinesPerAction = property(GetLinesPerAction,doc="See `GetLinesPerAction`") + LogicalPosition = property(GetLogicalPosition,doc="See `GetLogicalPosition`") + Position = property(GetPosition,doc="See `GetPosition`") + WheelDelta = property(GetWheelDelta,doc="See `GetWheelDelta`") + WheelRotation = property(GetWheelRotation,doc="See `GetWheelRotation`") + X = property(GetX,doc="See `GetX`") + Y = property(GetY,doc="See `GetY`") +_core_.MouseEvent_swigregister(MouseEvent) #--------------------------------------------------------------------------- -class wxSetCursorEvent(wxEvent): - """Proxy of C++ wxSetCursorEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int x=0, int y=0) -> wxSetCursorEvent""" - newobj = __core.new_wxSetCursorEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class SetCursorEvent(Event): + """ + A SetCursorEvent is generated when the mouse cursor is about to be set + as a result of mouse motion. This event gives the application the + chance to perform specific mouse cursor processing based on the + current position of the mouse within the window. Use the `SetCursor` + method to specify the cursor you want to be displayed. + """ + 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, int x=0, int y=0) -> SetCursorEvent + + Construct a new `wx.SetCursorEvent`. + """ + _core_.SetCursorEvent_swiginit(self,_core_.new_SetCursorEvent(*args, **kwargs)) def GetX(*args, **kwargs): - """GetX(self) -> int""" - return __core.wxSetCursorEvent_GetX(*args, **kwargs) + """ + GetX(self) -> int + + Returns the X coordinate of the mouse in client coordinates. + """ + return _core_.SetCursorEvent_GetX(*args, **kwargs) def GetY(*args, **kwargs): - """GetY(self) -> int""" - return __core.wxSetCursorEvent_GetY(*args, **kwargs) + """ + GetY(self) -> int + + Returns the Y coordinate of the mouse in client coordinates. + """ + return _core_.SetCursorEvent_GetY(*args, **kwargs) def SetCursor(*args, **kwargs): - """SetCursor(self, wxCursor cursor)""" - return __core.wxSetCursorEvent_SetCursor(*args, **kwargs) + """ + SetCursor(self, Cursor cursor) + + Sets the cursor associated with this event. + """ + return _core_.SetCursorEvent_SetCursor(*args, **kwargs) def GetCursor(*args, **kwargs): - """GetCursor(self) -> wxCursor""" - return __core.wxSetCursorEvent_GetCursor(*args, **kwargs) + """ + GetCursor(self) -> Cursor + + Returns a reference to the cursor specified by this event. + """ + return _core_.SetCursorEvent_GetCursor(*args, **kwargs) def HasCursor(*args, **kwargs): - """HasCursor(self) -> bool""" - return __core.wxSetCursorEvent_HasCursor(*args, **kwargs) + """ + HasCursor(self) -> bool + Returns true if the cursor specified by this event is a valid cursor. + """ + return _core_.SetCursorEvent_HasCursor(*args, **kwargs) -class wxSetCursorEventPtr(wxSetCursorEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSetCursorEvent -__core.wxSetCursorEvent_swigregister(wxSetCursorEventPtr) + Cursor = property(GetCursor,SetCursor,doc="See `GetCursor` and `SetCursor`") + X = property(GetX,doc="See `GetX`") + Y = property(GetY,doc="See `GetY`") +_core_.SetCursorEvent_swigregister(SetCursorEvent) #--------------------------------------------------------------------------- -class wxKeyEvent(wxEvent): - """Proxy of C++ wxKeyEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType keyType=wxEVT_NULL) -> wxKeyEvent""" - newobj = __core.new_wxKeyEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class KeyEvent(Event): + """ + This event class contains information about keypress and character + events. These events are only sent to the widget that currently has + the keyboard focus. + + Notice that there are three different kinds of keyboard events in + wxWidgets: key down and up events and char events. The difference + between the first two is clear - the first corresponds to a key press + and the second to a key release - otherwise they are identical. Just + note that if the key is maintained in a pressed state you will + typically get a lot of (automatically generated) down events but only + one up so it is wrong to assume that there is one up event + corresponding to each down one. + + Both key events provide untranslated key codes while the char event + carries the translated one. The untranslated code for alphanumeric + keys is always an upper case value. For the other keys it is one of + WXK_XXX values from the keycodes table. The translated key is, in + general, the character the user expects to appear as the result of the + key combination when typing the text into a text entry zone, for + example. + + A few examples to clarify this (all assume that CAPS LOCK is unpressed + and the standard US keyboard): when the 'A' key is pressed, the key + down event key code is equal to ASCII A == 65. But the char event key + code is ASCII a == 97. On the other hand, if you press both SHIFT and + 'A' keys simultaneously , the key code in key down event will still be + just 'A' while the char event key code parameter will now be 'A' as + well. + + Although in this simple case it is clear that the correct key code + could be found in the key down event handler by checking the value + returned by `ShiftDown`, in general you should use EVT_CHAR for this + as for non alphanumeric keys or non-US keyboard layouts the + translation is keyboard-layout dependent and can only be done properly + by the system itself. + + Another kind of translation is done when the control key is pressed: + for example, for CTRL-A key press the key down event still carries the + same key code 'A' as usual but the char event will have key code of 1, + the ASCII value of this key combination. + + You may discover how the other keys on your system behave + interactively by running the KeyEvents sample in the wxPython demo and + pressing some keys while the blue box at the top has the keyboard + focus. + + **Note**: If a key down event is caught and the event handler does not + call event.Skip() then the coresponding char event will not + happen. This is by design and enables the programs that handle both + types of events to be a bit simpler. + + **Note for Windows programmers**: The key and char events in wxWidgets + are similar to but slightly different from Windows WM_KEYDOWN and + WM_CHAR events. In particular, Alt-x combination will generate a char + event in wxWidgets (unless it is used as an accelerator). + + **Tip**: be sure to call event.Skip() for events that you don't + process in key event function, otherwise menu shortcuts may cease to + work under Windows. + + """ + 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, EventType eventType=wxEVT_NULL) -> KeyEvent + + Construct a new `wx.KeyEvent`. Valid event types are: + * + """ + _core_.KeyEvent_swiginit(self,_core_.new_KeyEvent(*args, **kwargs)) + def GetModifiers(*args, **kwargs): + """ + GetModifiers(self) -> int + + Returns a bitmask of the current modifier settings. Can be used to + check if the key event has exactly the given modifiers without having + to explicitly check that the other modifiers are not down. For + example:: + + if event.GetModifers() == wx.MOD_CONTROL: + DoSomething() + + """ + return _core_.KeyEvent_GetModifiers(*args, **kwargs) + def ControlDown(*args, **kwargs): - """ControlDown(self) -> bool""" - return __core.wxKeyEvent_ControlDown(*args, **kwargs) + """ + ControlDown(self) -> bool + + Returns ``True`` if the Control key was down at the time of the event. + """ + return _core_.KeyEvent_ControlDown(*args, **kwargs) def MetaDown(*args, **kwargs): - """MetaDown(self) -> bool""" - return __core.wxKeyEvent_MetaDown(*args, **kwargs) + """ + MetaDown(self) -> bool + + Returns ``True`` if the Meta key was down at the time of the event. + """ + return _core_.KeyEvent_MetaDown(*args, **kwargs) def AltDown(*args, **kwargs): - """AltDown(self) -> bool""" - return __core.wxKeyEvent_AltDown(*args, **kwargs) + """ + AltDown(self) -> bool + + Returns ``True`` if the Alt key was down at the time of the event. + """ + return _core_.KeyEvent_AltDown(*args, **kwargs) def ShiftDown(*args, **kwargs): - """ShiftDown(self) -> bool""" - return __core.wxKeyEvent_ShiftDown(*args, **kwargs) + """ + ShiftDown(self) -> bool + + Returns ``True`` if the Shift key was down at the time of the event. + """ + return _core_.KeyEvent_ShiftDown(*args, **kwargs) def CmdDown(*args, **kwargs): """ @@ -3973,1098 +5274,1798 @@ class wxKeyEvent(wxEvent): "Cmd" is a pseudo key which is the same as Control for PC and Unix platforms but the special "Apple" (a.k.a as "Command") key on - Macs: it makes often sense to use it instead of, say, `ControlDown` + Macs. It makes often sense to use it instead of, say, `ControlDown` because Cmd key is used for the same thing under Mac as Ctrl elsewhere. The Ctrl still exists, it's just not used for this purpose. So for non-Mac platforms this is the same as `ControlDown` and Macs this is the same as `MetaDown`. """ - return __core.wxKeyEvent_CmdDown(*args, **kwargs) + return _core_.KeyEvent_CmdDown(*args, **kwargs) def HasModifiers(*args, **kwargs): - """HasModifiers(self) -> bool""" - return __core.wxKeyEvent_HasModifiers(*args, **kwargs) + """ + HasModifiers(self) -> bool + + Returns true if either CTRL or ALT keys was down at the time of the + key event. Note that this function does not take into account neither + SHIFT nor META key states (the reason for ignoring the latter is that + it is common for NUMLOCK key to be configured as META under X but the + key presses even while NUMLOCK is on should be still processed + normally). + """ + return _core_.KeyEvent_HasModifiers(*args, **kwargs) def GetKeyCode(*args, **kwargs): - """GetKeyCode(self) -> int""" - return __core.wxKeyEvent_GetKeyCode(*args, **kwargs) + """ + GetKeyCode(self) -> int + + Returns the virtual key code. ASCII events return normal ASCII values, + while non-ASCII events return values such as WXK_LEFT for the left + cursor key. See `wx.KeyEvent` for a full list of the virtual key + codes. + + Note that in Unicode build, the returned value is meaningful only if + the user entered a character that can be represented in current + locale's default charset. You can obtain the corresponding Unicode + character using `GetUnicodeKey`. + """ + return _core_.KeyEvent_GetKeyCode(*args, **kwargs) - KeyCode = GetKeyCode def GetUnicodeKey(*args, **kwargs): - """GetUnicodeKey(self) -> int""" - return __core.wxKeyEvent_GetUnicodeKey(*args, **kwargs) + """ + GetUnicodeKey(self) -> int + + Returns the Unicode character corresponding to this key event. This + function is only meaningfule in a Unicode build of wxPython. + """ + return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs) GetUniChar = GetUnicodeKey + def SetUnicodeKey(*args, **kwargs): + """ + SetUnicodeKey(self, int uniChar) + + Set the Unicode value of the key event, but only if this is a Unicode + build of wxPython. + """ + return _core_.KeyEvent_SetUnicodeKey(*args, **kwargs) + def GetRawKeyCode(*args, **kwargs): - """GetRawKeyCode(self) -> unsigned int""" - return __core.wxKeyEvent_GetRawKeyCode(*args, **kwargs) + """ + GetRawKeyCode(self) -> unsigned int + + Returns the raw key code for this event. This is a platform-dependent + scan code which should only be used in advanced + applications. Currently the raw key codes are not supported by all + ports. + """ + return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs) def GetRawKeyFlags(*args, **kwargs): - """GetRawKeyFlags(self) -> unsigned int""" - return __core.wxKeyEvent_GetRawKeyFlags(*args, **kwargs) + """ + GetRawKeyFlags(self) -> unsigned int + + Returns the low level key flags for this event. The flags are + platform-dependent and should only be used in advanced applications. + Currently the raw key flags are not supported by all ports. + """ + return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs) def GetPosition(*args, **kwargs): """ - GetPosition(self) -> wxPoint + GetPosition(self) -> Point - Find the position of the event. + Find the position of the event, if applicable. """ - return __core.wxKeyEvent_GetPosition(*args, **kwargs) + return _core_.KeyEvent_GetPosition(*args, **kwargs) def GetPositionTuple(*args, **kwargs): """ GetPositionTuple() -> (x,y) - Find the position of the event. + Find the position of the event, if applicable. """ - return __core.wxKeyEvent_GetPositionTuple(*args, **kwargs) + return _core_.KeyEvent_GetPositionTuple(*args, **kwargs) def GetX(*args, **kwargs): - """GetX(self) -> int""" - return __core.wxKeyEvent_GetX(*args, **kwargs) + """ + GetX(self) -> int + + Returns the X position (in client coordinates) of the event, if + applicable. + """ + return _core_.KeyEvent_GetX(*args, **kwargs) def GetY(*args, **kwargs): - """GetY(self) -> int""" - return __core.wxKeyEvent_GetY(*args, **kwargs) - - m_x = property(__core.wxKeyEvent_m_x_get, __core.wxKeyEvent_m_x_set) - m_y = property(__core.wxKeyEvent_m_y_get, __core.wxKeyEvent_m_y_set) - m_keyCode = property(__core.wxKeyEvent_m_keyCode_get, __core.wxKeyEvent_m_keyCode_set) - m_controlDown = property(__core.wxKeyEvent_m_controlDown_get, __core.wxKeyEvent_m_controlDown_set) - m_shiftDown = property(__core.wxKeyEvent_m_shiftDown_get, __core.wxKeyEvent_m_shiftDown_set) - m_altDown = property(__core.wxKeyEvent_m_altDown_get, __core.wxKeyEvent_m_altDown_set) - m_metaDown = property(__core.wxKeyEvent_m_metaDown_get, __core.wxKeyEvent_m_metaDown_set) - m_scanCode = property(__core.wxKeyEvent_m_scanCode_get, __core.wxKeyEvent_m_scanCode_set) - m_rawCode = property(__core.wxKeyEvent_m_rawCode_get, __core.wxKeyEvent_m_rawCode_set) - m_rawFlags = property(__core.wxKeyEvent_m_rawFlags_get, __core.wxKeyEvent_m_rawFlags_set) - -class wxKeyEventPtr(wxKeyEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxKeyEvent -__core.wxKeyEvent_swigregister(wxKeyEventPtr) + """ + GetY(self) -> int + + Returns the Y position (in client coordinates) of the event, if + applicable. + """ + return _core_.KeyEvent_GetY(*args, **kwargs) + + m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set) + m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set) + m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set) + m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set) + m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set) + m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set) + m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set) + m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set) + m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set) + m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set) + KeyCode = property(GetKeyCode,doc="See `GetKeyCode`") + Modifiers = property(GetModifiers,doc="See `GetModifiers`") + Position = property(GetPosition,doc="See `GetPosition`") + RawKeyCode = property(GetRawKeyCode,doc="See `GetRawKeyCode`") + RawKeyFlags = property(GetRawKeyFlags,doc="See `GetRawKeyFlags`") + UnicodeKey = property(GetUnicodeKey,SetUnicodeKey,doc="See `GetUnicodeKey` and `SetUnicodeKey`") + X = property(GetX,doc="See `GetX`") + Y = property(GetY,doc="See `GetY`") +_core_.KeyEvent_swigregister(KeyEvent) #--------------------------------------------------------------------------- -class wxSizeEvent(wxEvent): - """Proxy of C++ wxSizeEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxSize sz=wxDefaultSize, int winid=0) -> wxSizeEvent""" - newobj = __core.new_wxSizeEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class SizeEvent(Event): + """ + A size event holds information about size change events. The EVT_SIZE + handler function will be called when the window it is bound to has + been resized. + + Note that the size passed is of the whole window: call + `wx.Window.GetClientSize` for the area which may be used by the + application. + + When a window is resized, usually only a small part of the window is + damaged and and that area is all that is in the update region for the + next paint event. However, if your drawing depends on the size of the + window, you may need to clear the DC explicitly and repaint the whole + window. In which case, you may need to call `wx.Window.Refresh` to + invalidate the entire window. + + """ + 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, Size sz=DefaultSize, int winid=0) -> SizeEvent + + Construct a new ``wx.SizeEvent``. + """ + _core_.SizeEvent_swiginit(self,_core_.new_SizeEvent(*args, **kwargs)) def GetSize(*args, **kwargs): - """GetSize(self) -> wxSize""" - return __core.wxSizeEvent_GetSize(*args, **kwargs) + """ + GetSize(self) -> Size + + Returns the entire size of the window generating the size change + event. + """ + return _core_.SizeEvent_GetSize(*args, **kwargs) def GetRect(*args, **kwargs): - """GetRect(self) -> wxRect""" - return __core.wxSizeEvent_GetRect(*args, **kwargs) + """GetRect(self) -> Rect""" + return _core_.SizeEvent_GetRect(*args, **kwargs) def SetRect(*args, **kwargs): - """SetRect(self, wxRect rect)""" - return __core.wxSizeEvent_SetRect(*args, **kwargs) + """SetRect(self, Rect rect)""" + return _core_.SizeEvent_SetRect(*args, **kwargs) def SetSize(*args, **kwargs): - """SetSize(self, wxSize size)""" - return __core.wxSizeEvent_SetSize(*args, **kwargs) + """SetSize(self, Size size)""" + return _core_.SizeEvent_SetSize(*args, **kwargs) - m_size = property(__core.wxSizeEvent_m_size_get, __core.wxSizeEvent_m_size_set) - m_rect = property(__core.wxSizeEvent_m_rect_get, __core.wxSizeEvent_m_rect_set) - -class wxSizeEventPtr(wxSizeEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSizeEvent -__core.wxSizeEvent_swigregister(wxSizeEventPtr) + m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set) + m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set) + Rect = property(GetRect,SetRect,doc="See `GetRect` and `SetRect`") + Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") +_core_.SizeEvent_swigregister(SizeEvent) #--------------------------------------------------------------------------- -class wxMoveEvent(wxEvent): - """Proxy of C++ wxMoveEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxPoint pos=wxDefaultPosition, int winid=0) -> wxMoveEvent""" - newobj = __core.new_wxMoveEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class MoveEvent(Event): + """ + This event object is sent for EVT_MOVE event bindings when a window is + moved to a new position. + """ + 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, Point pos=DefaultPosition, int winid=0) -> MoveEvent + + Constructor. + """ + _core_.MoveEvent_swiginit(self,_core_.new_MoveEvent(*args, **kwargs)) def GetPosition(*args, **kwargs): - """GetPosition(self) -> wxPoint""" - return __core.wxMoveEvent_GetPosition(*args, **kwargs) + """ + GetPosition(self) -> Point + + Returns the position of the window generating the move change event. + """ + return _core_.MoveEvent_GetPosition(*args, **kwargs) def GetRect(*args, **kwargs): - """GetRect(self) -> wxRect""" - return __core.wxMoveEvent_GetRect(*args, **kwargs) + """GetRect(self) -> Rect""" + return _core_.MoveEvent_GetRect(*args, **kwargs) def SetRect(*args, **kwargs): - """SetRect(self, wxRect rect)""" - return __core.wxMoveEvent_SetRect(*args, **kwargs) + """SetRect(self, Rect rect)""" + return _core_.MoveEvent_SetRect(*args, **kwargs) def SetPosition(*args, **kwargs): - """SetPosition(self, wxPoint pos)""" - return __core.wxMoveEvent_SetPosition(*args, **kwargs) + """SetPosition(self, Point pos)""" + return _core_.MoveEvent_SetPosition(*args, **kwargs) m_pos = property(GetPosition, SetPosition) m_rect = property(GetRect, SetRect) - -class wxMoveEventPtr(wxMoveEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMoveEvent -__core.wxMoveEvent_swigregister(wxMoveEventPtr) + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") + Rect = property(GetRect,SetRect,doc="See `GetRect` and `SetRect`") +_core_.MoveEvent_swigregister(MoveEvent) #--------------------------------------------------------------------------- -class wxPaintEvent(wxEvent): - """Proxy of C++ wxPaintEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int Id=0) -> wxPaintEvent""" - newobj = __core.new_wxPaintEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxPaintEventPtr(wxPaintEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPaintEvent -__core.wxPaintEvent_swigregister(wxPaintEventPtr) - -class wxNcPaintEvent(wxEvent): - """Proxy of C++ wxNcPaintEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int winid=0) -> wxNcPaintEvent""" - newobj = __core.new_wxNcPaintEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxNcPaintEventPtr(wxNcPaintEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxNcPaintEvent -__core.wxNcPaintEvent_swigregister(wxNcPaintEventPtr) +class PaintEvent(Event): + """ + A paint event is sent when a window's contents needs to be repainted. + Note that in an EVT_PAINT handler the application must *always* create + a `wx.PaintDC` object, even if you do not use it. Otherwise MS + Windows assumes that the window has not been painted yet and will send + the event again, causing endless refreshes. + + You can optimize painting by retrieving the rectangles that have been + damaged using `wx.Window.GetUpdateRegion` and/or `wx.RegionIterator`, + and only repainting these rectangles. The rectangles are in terms of + the client area, and are unscrolled, so you will need to do some + calculations using the current view position to obtain logical, + scrolled units. + + """ + 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, int Id=0) -> PaintEvent""" + _core_.PaintEvent_swiginit(self,_core_.new_PaintEvent(*args, **kwargs)) +_core_.PaintEvent_swigregister(PaintEvent) + +class NcPaintEvent(Event): + """Proxy of C++ NcPaintEvent 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, int winid=0) -> NcPaintEvent""" + _core_.NcPaintEvent_swiginit(self,_core_.new_NcPaintEvent(*args, **kwargs)) +_core_.NcPaintEvent_swigregister(NcPaintEvent) #--------------------------------------------------------------------------- -class wxEraseEvent(wxEvent): - """Proxy of C++ wxEraseEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int Id=0, wxDC dc=(wxDC *) NULL) -> wxEraseEvent""" - newobj = __core.new_wxEraseEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class EraseEvent(Event): + """ + An erase event is sent whenever the background of a window needs to be + repainted. To intercept this event use the EVT_ERASE_BACKGROUND event + binder. On some platforms, such as GTK+, this event is simulated + (simply generated just before the paint event) and may cause flicker. + + To paint a custom background use the `GetDC` method and use the returned + device context if it is not ``None``, otherwise create a temporary + `wx.ClientDC` and draw on that. + + """ + 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, int Id=0, DC dc=None) -> EraseEvent + + Constructor + """ + _core_.EraseEvent_swiginit(self,_core_.new_EraseEvent(*args, **kwargs)) def GetDC(*args, **kwargs): - """GetDC(self) -> wxDC""" - return __core.wxEraseEvent_GetDC(*args, **kwargs) + """ + GetDC(self) -> DC + Returns the device context the event handler should draw upon. If + ``None`` is returned then create a temporary `wx.ClientDC` and use + that instead. + """ + return _core_.EraseEvent_GetDC(*args, **kwargs) -class wxEraseEventPtr(wxEraseEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxEraseEvent -__core.wxEraseEvent_swigregister(wxEraseEventPtr) + DC = property(GetDC,doc="See `GetDC`") +_core_.EraseEvent_swigregister(EraseEvent) #--------------------------------------------------------------------------- -class wxFocusEvent(wxEvent): - """Proxy of C++ wxFocusEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> wxFocusEvent""" - newobj = __core.new_wxFocusEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class FocusEvent(Event): + """ + A focus event is sent when a window's focus changes. The window losing + focus receives an EVT_KILL_FOCUS event while the window gaining it + gets an EVT_SET_FOCUS event. + + Notice that the set focus event happens both when the user gives focus + to the window (whether using the mouse or keyboard) and when it is + done from the program itself using `wx.Window.SetFocus`. + + """ + 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, EventType type=wxEVT_NULL, int winid=0) -> FocusEvent + + Constructor + """ + _core_.FocusEvent_swiginit(self,_core_.new_FocusEvent(*args, **kwargs)) def GetWindow(*args, **kwargs): - """GetWindow(self) -> wxWindow""" - return __core.wxFocusEvent_GetWindow(*args, **kwargs) + """ + GetWindow(self) -> Window - def SetWindow(*args, **kwargs): - """SetWindow(self, wxWindow win)""" - return __core.wxFocusEvent_SetWindow(*args, **kwargs) + Returns the other window associated with this event, that is the + window which had the focus before for the EVT_SET_FOCUS event and the + window which is going to receive focus for the wxEVT_KILL_FOCUS event. + Warning: the window returned may be None! + """ + return _core_.FocusEvent_GetWindow(*args, **kwargs) + + def SetWindow(*args, **kwargs): + """SetWindow(self, Window win)""" + return _core_.FocusEvent_SetWindow(*args, **kwargs) -class wxFocusEventPtr(wxFocusEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxFocusEvent -__core.wxFocusEvent_swigregister(wxFocusEventPtr) + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") +_core_.FocusEvent_swigregister(FocusEvent) #--------------------------------------------------------------------------- -class wxChildFocusEvent(wxCommandEvent): - """Proxy of C++ wxChildFocusEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxWindow win=None) -> wxChildFocusEvent""" - newobj = __core.new_wxChildFocusEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class ChildFocusEvent(CommandEvent): + """ + A child focus event is sent to a (parent-)window when one of its child + windows gains focus, so that the window could restore the focus back + to its corresponding child if it loses it now and regains later. + + Notice that child window is the direct child of the window receiving + the event, and so may not be the actual widget recieving focus if it + is further down the containment heirarchy. Use `wx.Window.FindFocus` + to get the widget that is actually receiving focus. + """ + 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 win=None) -> ChildFocusEvent + + Constructor + """ + _core_.ChildFocusEvent_swiginit(self,_core_.new_ChildFocusEvent(*args, **kwargs)) def GetWindow(*args, **kwargs): - """GetWindow(self) -> wxWindow""" - return __core.wxChildFocusEvent_GetWindow(*args, **kwargs) + """ + GetWindow(self) -> Window + The window, or (grand)parent of the window which has just received the + focus. + """ + return _core_.ChildFocusEvent_GetWindow(*args, **kwargs) -class wxChildFocusEventPtr(wxChildFocusEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxChildFocusEvent -__core.wxChildFocusEvent_swigregister(wxChildFocusEventPtr) + Window = property(GetWindow,doc="See `GetWindow`") +_core_.ChildFocusEvent_swigregister(ChildFocusEvent) #--------------------------------------------------------------------------- -class wxActivateEvent(wxEvent): - """Proxy of C++ wxActivateEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> wxActivateEvent""" - newobj = __core.new_wxActivateEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class ActivateEvent(Event): + """ + An activate event is sent when a top-level window or the entire + application is being activated or deactivated. + + A top-level window (a dialog or frame) receives an activate event when + is being activated or deactivated. This is indicated visually by the + title bar changing colour, and a subwindow gaining the keyboard focus. + An application is activated or deactivated when one of its frames + becomes activated, or a frame becomes inactivate resulting in all + application frames being inactive. + + Please note that usually you should call event.Skip() in your handlers + for these events so the default handlers will still be called, as not + doing so can result in strange effects. + + """ + 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, EventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent + + Constructor + """ + _core_.ActivateEvent_swiginit(self,_core_.new_ActivateEvent(*args, **kwargs)) def GetActive(*args, **kwargs): - """GetActive(self) -> bool""" - return __core.wxActivateEvent_GetActive(*args, **kwargs) + """ + GetActive(self) -> bool + Returns true if the application or window is being activated, false + otherwise. + """ + return _core_.ActivateEvent_GetActive(*args, **kwargs) -class wxActivateEventPtr(wxActivateEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxActivateEvent -__core.wxActivateEvent_swigregister(wxActivateEventPtr) + Active = property(GetActive,doc="See `GetActive`") +_core_.ActivateEvent_swigregister(ActivateEvent) #--------------------------------------------------------------------------- -class wxInitDialogEvent(wxEvent): - """Proxy of C++ wxInitDialogEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int Id=0) -> wxInitDialogEvent""" - newobj = __core.new_wxInitDialogEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxInitDialogEventPtr(wxInitDialogEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxInitDialogEvent -__core.wxInitDialogEvent_swigregister(wxInitDialogEventPtr) +class InitDialogEvent(Event): + """ + A wx.InitDialogEvent is sent as a dialog is being initialised, or for + any window when `wx.Window.InitDialog` is called. Handlers for this + event can transfer data to the window, or anything else that should be + done before the user begins editing the form. The default handler + calls `wx.Window.TransferDataToWindow`. + """ + 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, int Id=0) -> InitDialogEvent + + Constructor + """ + _core_.InitDialogEvent_swiginit(self,_core_.new_InitDialogEvent(*args, **kwargs)) +_core_.InitDialogEvent_swigregister(InitDialogEvent) #--------------------------------------------------------------------------- -class wxMenuEvent(wxEvent): - """Proxy of C++ wxMenuEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, wxMenu menu=None) -> wxMenuEvent""" - newobj = __core.new_wxMenuEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class MenuEvent(Event): + """ + This class is used for a variety of menu-related events. Note that + these do not include menu command events, which are handled by sending + `wx.CommandEvent` objects. + + The default handler for wx.EVT_MENU_HIGHLIGHT displays menu item help + text in the first field of the status bar. + """ + 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, EventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent + + Constructor + """ + _core_.MenuEvent_swiginit(self,_core_.new_MenuEvent(*args, **kwargs)) def GetMenuId(*args, **kwargs): - """GetMenuId(self) -> int""" - return __core.wxMenuEvent_GetMenuId(*args, **kwargs) + """ + GetMenuId(self) -> int + + Returns the menu identifier associated with the event. This method + should be only used with the HIGHLIGHT events. + """ + return _core_.MenuEvent_GetMenuId(*args, **kwargs) def IsPopup(*args, **kwargs): - """IsPopup(self) -> bool""" - return __core.wxMenuEvent_IsPopup(*args, **kwargs) + """ + IsPopup(self) -> bool + + Returns ``True`` if the menu which is being opened or closed is a + popup menu, ``False`` if it is a normal one. This method should only + be used with the OPEN and CLOSE events. + """ + return _core_.MenuEvent_IsPopup(*args, **kwargs) def GetMenu(*args, **kwargs): - """GetMenu(self) -> wxMenu""" - return __core.wxMenuEvent_GetMenu(*args, **kwargs) + """ + GetMenu(self) -> Menu + Returns the menu which is being opened or closed. This method should + only be used with the OPEN and CLOSE events. + """ + return _core_.MenuEvent_GetMenu(*args, **kwargs) -class wxMenuEventPtr(wxMenuEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMenuEvent -__core.wxMenuEvent_swigregister(wxMenuEventPtr) + Menu = property(GetMenu,doc="See `GetMenu`") + MenuId = property(GetMenuId,doc="See `GetMenuId`") +_core_.MenuEvent_swigregister(MenuEvent) #--------------------------------------------------------------------------- -class wxCloseEvent(wxEvent): - """Proxy of C++ wxCloseEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> wxCloseEvent""" - newobj = __core.new_wxCloseEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class CloseEvent(Event): + """ + This event class contains information about window and session close + events. + + The handler function for EVT_CLOSE is called when the user has tried + to close a a frame or dialog box using the window manager controls or + the system menu. It can also be invoked by the application itself + programmatically, for example by calling the `wx.Window.Close` + function. + + You should check whether the application is forcing the deletion of + the window using `CanVeto`. If it returns ``False``, you must destroy + the window using `wx.Window.Destroy`. If the return value is ``True``, + it is up to you whether you respond by destroying the window or not. + For example you may wish to display a message dialog prompting to save + files or to cancel the close. + + If you don't destroy the window, you should call `Veto` to let the + calling code know that you did not destroy the window. This allows the + `wx.Window.Close` function to return ``True`` or ``False`` depending + on whether the close instruction was honored or not. + """ + 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, EventType type=wxEVT_NULL, int winid=0) -> CloseEvent + + Constructor. + """ + _core_.CloseEvent_swiginit(self,_core_.new_CloseEvent(*args, **kwargs)) def SetLoggingOff(*args, **kwargs): - """SetLoggingOff(self, bool logOff)""" - return __core.wxCloseEvent_SetLoggingOff(*args, **kwargs) + """ + SetLoggingOff(self, bool logOff) + + Sets the 'logging off' flag. + """ + return _core_.CloseEvent_SetLoggingOff(*args, **kwargs) def GetLoggingOff(*args, **kwargs): - """GetLoggingOff(self) -> bool""" - return __core.wxCloseEvent_GetLoggingOff(*args, **kwargs) + """ + GetLoggingOff(self) -> bool + + Returns ``True`` if the user is logging off or ``False`` if the + system is shutting down. This method can only be called for end + session and query end session events, it doesn't make sense for close + window event. + """ + return _core_.CloseEvent_GetLoggingOff(*args, **kwargs) def Veto(*args, **kwargs): - """Veto(self, bool veto=True)""" - return __core.wxCloseEvent_Veto(*args, **kwargs) + """ + Veto(self, bool veto=True) - def SetCanVeto(*args, **kwargs): - """SetCanVeto(self, bool canVeto)""" - return __core.wxCloseEvent_SetCanVeto(*args, **kwargs) + Call this from your event handler to veto a system shutdown or to + signal to the calling application that a window close did not happen. - def CanVeto(*args, **kwargs): - """CanVeto(self) -> bool""" - return __core.wxCloseEvent_CanVeto(*args, **kwargs) + You can only veto a shutdown or close if `CanVeto` returns true. + """ + return _core_.CloseEvent_Veto(*args, **kwargs) def GetVeto(*args, **kwargs): """GetVeto(self) -> bool""" - return __core.wxCloseEvent_GetVeto(*args, **kwargs) + return _core_.CloseEvent_GetVeto(*args, **kwargs) + def SetCanVeto(*args, **kwargs): + """ + SetCanVeto(self, bool canVeto) -class wxCloseEventPtr(wxCloseEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxCloseEvent -__core.wxCloseEvent_swigregister(wxCloseEventPtr) + Sets the 'can veto' flag. + """ + return _core_.CloseEvent_SetCanVeto(*args, **kwargs) + + def CanVeto(*args, **kwargs): + """ + CanVeto(self) -> bool + + Returns true if you can veto a system shutdown or a window close + event. Vetoing a window close event is not possible if the calling + code wishes to force the application to exit, and so this function + must be called to check this. + """ + return _core_.CloseEvent_CanVeto(*args, **kwargs) + + LoggingOff = property(GetLoggingOff,SetLoggingOff,doc="See `GetLoggingOff` and `SetLoggingOff`") +_core_.CloseEvent_swigregister(CloseEvent) #--------------------------------------------------------------------------- -class wxShowEvent(wxEvent): - """Proxy of C++ wxShowEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int winid=0, bool show=False) -> wxShowEvent""" - newobj = __core.new_wxShowEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class ShowEvent(Event): + """An EVT_SHOW event is sent when a window is shown or hidden.""" + 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, int winid=0, bool show=False) -> ShowEvent + + An EVT_SHOW event is sent when a window is shown or hidden. + """ + _core_.ShowEvent_swiginit(self,_core_.new_ShowEvent(*args, **kwargs)) def SetShow(*args, **kwargs): """SetShow(self, bool show)""" - return __core.wxShowEvent_SetShow(*args, **kwargs) + return _core_.ShowEvent_SetShow(*args, **kwargs) def GetShow(*args, **kwargs): """GetShow(self) -> bool""" - return __core.wxShowEvent_GetShow(*args, **kwargs) - + return _core_.ShowEvent_GetShow(*args, **kwargs) -class wxShowEventPtr(wxShowEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxShowEvent -__core.wxShowEvent_swigregister(wxShowEventPtr) + Show = property(GetShow,SetShow,doc="See `GetShow` and `SetShow`") +_core_.ShowEvent_swigregister(ShowEvent) #--------------------------------------------------------------------------- -class wxIconizeEvent(wxEvent): - """Proxy of C++ wxIconizeEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int id=0, bool iconized=True) -> wxIconizeEvent""" - newobj = __core.new_wxIconizeEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class IconizeEvent(Event): + """ + An EVT_ICONIZE event is sent when a frame is iconized (minimized) or + restored. + """ + 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, int id=0, bool iconized=True) -> IconizeEvent + + An EVT_ICONIZE event is sent when a frame is iconized (minimized) or + restored. + """ + _core_.IconizeEvent_swiginit(self,_core_.new_IconizeEvent(*args, **kwargs)) def Iconized(*args, **kwargs): - """Iconized(self) -> bool""" - return __core.wxIconizeEvent_Iconized(*args, **kwargs) + """ + Iconized(self) -> bool + Returns ``True`` if the frame has been iconized, ``False`` if it has + been restored. + """ + return _core_.IconizeEvent_Iconized(*args, **kwargs) -class wxIconizeEventPtr(wxIconizeEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxIconizeEvent -__core.wxIconizeEvent_swigregister(wxIconizeEventPtr) +_core_.IconizeEvent_swigregister(IconizeEvent) #--------------------------------------------------------------------------- -class wxMaximizeEvent(wxEvent): - """Proxy of C++ wxMaximizeEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int id=0) -> wxMaximizeEvent""" - newobj = __core.new_wxMaximizeEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxMaximizeEventPtr(wxMaximizeEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMaximizeEvent -__core.wxMaximizeEvent_swigregister(wxMaximizeEventPtr) +class MaximizeEvent(Event): + """An EVT_MAXIMIZE event is sent when a frame is maximized or restored.""" + 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, int id=0) -> MaximizeEvent + + An EVT_MAXIMIZE event is sent when a frame is maximized or restored. + """ + _core_.MaximizeEvent_swiginit(self,_core_.new_MaximizeEvent(*args, **kwargs)) +_core_.MaximizeEvent_swigregister(MaximizeEvent) #--------------------------------------------------------------------------- -class wxDropFilesEvent(wxEvent): - """Proxy of C++ wxDropFilesEvent class""" - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) +class DropFilesEvent(Event): + """ + This class is used for drop files events, that is, when files have + been dropped onto the window. This functionality is only available + under Windows. The window must have previously been enabled for + dropping by calling `wx.Window.DragAcceptFiles`. + + Important note: this is a separate implementation to the more general + drag and drop implementation using `wx.FileDropTarget`, and etc. This + implementation uses the older, Windows message-based approach of + dropping files. + + Use wx.EVT_DROP_FILES to bind an event handler to receive file drop + events. + + """ + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def GetPosition(*args, **kwargs): - """GetPosition(self) -> wxPoint""" - return __core.wxDropFilesEvent_GetPosition(*args, **kwargs) + """ + GetPosition(self) -> Point + + Returns the position at which the files were dropped. + """ + return _core_.DropFilesEvent_GetPosition(*args, **kwargs) def GetNumberOfFiles(*args, **kwargs): - """GetNumberOfFiles(self) -> int""" - return __core.wxDropFilesEvent_GetNumberOfFiles(*args, **kwargs) + """ + GetNumberOfFiles(self) -> int + + Returns the number of files dropped. + """ + return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs) def GetFiles(*args, **kwargs): - """GetFiles(self) -> PyObject""" - return __core.wxDropFilesEvent_GetFiles(*args, **kwargs) + """ + GetFiles(self) -> PyObject + Returns a list of the filenames that were dropped. + """ + return _core_.DropFilesEvent_GetFiles(*args, **kwargs) -class wxDropFilesEventPtr(wxDropFilesEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxDropFilesEvent -__core.wxDropFilesEvent_swigregister(wxDropFilesEventPtr) + Files = property(GetFiles,doc="See `GetFiles`") + NumberOfFiles = property(GetNumberOfFiles,doc="See `GetNumberOfFiles`") + Position = property(GetPosition,doc="See `GetPosition`") +_core_.DropFilesEvent_swigregister(DropFilesEvent) #--------------------------------------------------------------------------- -wxUPDATE_UI_PROCESS_ALL = __core.wxUPDATE_UI_PROCESS_ALL -wxUPDATE_UI_PROCESS_SPECIFIED = __core.wxUPDATE_UI_PROCESS_SPECIFIED -class wxUpdateUIEvent(wxCommandEvent): - """Proxy of C++ wxUpdateUIEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int commandId=0) -> wxUpdateUIEvent""" - newobj = __core.new_wxUpdateUIEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL +UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED +class UpdateUIEvent(CommandEvent): + """ + This class is used for EVT_UPDATE_UI pseudo-events which are sent by + wxWidgets to give an application the chance to update various user + interface elements. + + Without update UI events, an application has to work hard to + check/uncheck, enable/disable, and set the text for elements such as + menu items and toolbar buttons. The code for doing this has to be + mixed up with the code that is invoked when an action is invoked for a + menu item or button. + + With update UI events, you define an event handler to look at the + state of the application and change UI elements accordingly. wxWidgets + will call your handler functions in idle time, so you don't have to + worry where to call this code. In addition to being a clearer and more + declarative method, it also means you don't have to worry whether + you're updating a toolbar or menubar identifier. The same handler can + update a menu item and toolbar button, if the ID values are the same. + + Instead of directly manipulating the menu or button, you call + functions in the event object, such as `Check`. wxWidgets will + determine whether such a call has been made, and which UI element to + update. + + These events will work for popup menus as well as menubars. Just + before a menu is popped up, `wx.Menu.UpdateUI` is called to process + any UI events for the window that owns the menu. + + If you find that the overhead of UI update processing is affecting + your application, you can do one or both of the following: + + 1. Call `wx.UpdateUIEvent.SetMode` with a value of + wx.UPDATE_UI_PROCESS_SPECIFIED, and set the extra style + wx.WS_EX_PROCESS_UPDATE_EVENTS for every window that should + receive update events. No other windows will receive update + events. + + 2. Call `wx.UpdateUIEvent.SetUpdateInterval` with a millisecond + value to set the delay between updates. You may need to call + `wx.Window.UpdateWindowUI` at critical points, for example when + a dialog is about to be shown, in case the user sees a slight + delay before windows are updated. + + Note that although events are sent in idle time, defining a EVT_IDLE + handler for a window does not affect this because the events are sent + from an internal idle handler. + + wxWidgets tries to optimize update events on some platforms. On + Windows and GTK+, events for menubar items are only sent when the menu + is about to be shown, and not in idle time. + + """ + 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, int commandId=0) -> UpdateUIEvent + + Constructor + """ + _core_.UpdateUIEvent_swiginit(self,_core_.new_UpdateUIEvent(*args, **kwargs)) def GetChecked(*args, **kwargs): - """GetChecked(self) -> bool""" - return __core.wxUpdateUIEvent_GetChecked(*args, **kwargs) + """ + GetChecked(self) -> bool + + Returns ``True`` if the UI element should be checked. + """ + return _core_.UpdateUIEvent_GetChecked(*args, **kwargs) def GetEnabled(*args, **kwargs): - """GetEnabled(self) -> bool""" - return __core.wxUpdateUIEvent_GetEnabled(*args, **kwargs) + """ + GetEnabled(self) -> bool + + Returns ``True`` if the UI element should be enabled. + """ + return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs) + + def GetShown(*args, **kwargs): + """ + GetShown(self) -> bool + + Returns ``True`` if the UI element should be shown. + """ + return _core_.UpdateUIEvent_GetShown(*args, **kwargs) def GetText(*args, **kwargs): - """GetText(self) -> wxString""" - return __core.wxUpdateUIEvent_GetText(*args, **kwargs) + """ + GetText(self) -> String + + Returns the text that should be set for the UI element. + """ + return _core_.UpdateUIEvent_GetText(*args, **kwargs) def GetSetText(*args, **kwargs): - """GetSetText(self) -> bool""" - return __core.wxUpdateUIEvent_GetSetText(*args, **kwargs) + """ + GetSetText(self) -> bool + + Returns ``True`` if the application has called `SetText`. For + wxWidgets internal use only. + """ + return _core_.UpdateUIEvent_GetSetText(*args, **kwargs) def GetSetChecked(*args, **kwargs): - """GetSetChecked(self) -> bool""" - return __core.wxUpdateUIEvent_GetSetChecked(*args, **kwargs) + """ + GetSetChecked(self) -> bool + + Returns ``True`` if the application has called `Check`. For wxWidgets + internal use only. + """ + return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs) def GetSetEnabled(*args, **kwargs): - """GetSetEnabled(self) -> bool""" - return __core.wxUpdateUIEvent_GetSetEnabled(*args, **kwargs) + """ + GetSetEnabled(self) -> bool + + Returns ``True`` if the application has called `Enable`. For wxWidgets + internal use only. + """ + return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs) + + def GetSetShown(*args, **kwargs): + """ + GetSetShown(self) -> bool + + Returns ``True`` if the application has called `Show`. For wxWidgets + internal use only. + """ + return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs) def Check(*args, **kwargs): - """Check(self, bool check)""" - return __core.wxUpdateUIEvent_Check(*args, **kwargs) + """ + Check(self, bool check) + + Check or uncheck the UI element. + """ + return _core_.UpdateUIEvent_Check(*args, **kwargs) def Enable(*args, **kwargs): - """Enable(self, bool enable)""" - return __core.wxUpdateUIEvent_Enable(*args, **kwargs) + """ + Enable(self, bool enable) + + Enable or disable the UI element. + """ + return _core_.UpdateUIEvent_Enable(*args, **kwargs) + + def Show(*args, **kwargs): + """ + Show(self, bool show) + + Show or hide the UI element. + """ + return _core_.UpdateUIEvent_Show(*args, **kwargs) def SetText(*args, **kwargs): - """SetText(self, wxString text)""" - return __core.wxUpdateUIEvent_SetText(*args, **kwargs) + """ + SetText(self, String text) + + Sets the text for this UI element. + """ + return _core_.UpdateUIEvent_SetText(*args, **kwargs) def SetUpdateInterval(*args, **kwargs): - """SetUpdateInterval(long updateInterval)""" - return __core.wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs) + """ + SetUpdateInterval(long updateInterval) + + Sets the interval between updates in milliseconds. Set to -1 to + disable updates, or to 0 to update as frequently as possible. The + default is 0. + + Use this to reduce the overhead of UI update events if your + application has a lot of windows. If you set the value to -1 or + greater than 0, you may also need to call `wx.Window.UpdateWindowUI` + at appropriate points in your application, such as when a dialog is + about to be shown. + """ + return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) SetUpdateInterval = staticmethod(SetUpdateInterval) def GetUpdateInterval(*args, **kwargs): - """GetUpdateInterval() -> long""" - return __core.wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs) + """ + GetUpdateInterval() -> long + + Returns the current interval between updates in milliseconds. -1 + disables updates, 0 updates as frequently as possible. + """ + return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs) GetUpdateInterval = staticmethod(GetUpdateInterval) def CanUpdate(*args, **kwargs): - """CanUpdate(wxWindow win) -> bool""" - return __core.wxUpdateUIEvent_CanUpdate(*args, **kwargs) + """ + CanUpdate(Window win) -> bool + + Returns ``True`` if it is appropriate to update (send UI update events + to) this window. + + This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`), + the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update + events were last sent in idle time, and the update interval, to + determine whether events should be sent to this window now. By default + this will always return true because the update mode is initially + wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update + events will be sent as often as possible. You can reduce the frequency + that events are sent by changing the mode and/or setting an update + interval. + + """ + return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) CanUpdate = staticmethod(CanUpdate) def ResetUpdateTime(*args, **kwargs): - """ResetUpdateTime()""" - return __core.wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs) + """ + ResetUpdateTime() + + Used internally to reset the last-updated time to the current time. It + is assumed that update events are normally sent in idle time, so this + is called at the end of idle processing. + """ + return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs) ResetUpdateTime = staticmethod(ResetUpdateTime) def SetMode(*args, **kwargs): - """SetMode(int mode)""" - return __core.wxUpdateUIEvent_SetMode(*args, **kwargs) + """ + SetMode(int mode) + + Specify how wxWidgets will send update events: to all windows, or only + to those which specify that they will process the events. + + The mode may be one of the following values: + + ============================= ========================================== + wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This + is the default setting. + wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that + have the wx.WS_EX_PROCESS_UI_UPDATES extra + style set. + ============================= ========================================== + + """ + return _core_.UpdateUIEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """GetMode() -> int""" - return __core.wxUpdateUIEvent_GetMode(*args, **kwargs) + """ + GetMode() -> int + + Returns a value specifying how wxWidgets will send update events: to + all windows, or only to those which specify that they will process the + events. + """ + return _core_.UpdateUIEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) + Checked = property(GetChecked,Check,doc="See `GetChecked`") + Enabled = property(GetEnabled,Enable,doc="See `GetEnabled`") + Shown = property(GetShown,Show,doc="See `GetShown`") + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") +_core_.UpdateUIEvent_swigregister(UpdateUIEvent) -class wxUpdateUIEventPtr(wxUpdateUIEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxUpdateUIEvent -__core.wxUpdateUIEvent_swigregister(wxUpdateUIEventPtr) +def UpdateUIEvent_SetUpdateInterval(*args, **kwargs): + """ + UpdateUIEvent_SetUpdateInterval(long updateInterval) -def wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs): - """wxUpdateUIEvent_SetUpdateInterval(long updateInterval)""" - return __core.wxUpdateUIEvent_SetUpdateInterval(*args, **kwargs) + Sets the interval between updates in milliseconds. Set to -1 to + disable updates, or to 0 to update as frequently as possible. The + default is 0. -def wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs): - """wxUpdateUIEvent_GetUpdateInterval() -> long""" - return __core.wxUpdateUIEvent_GetUpdateInterval(*args, **kwargs) + Use this to reduce the overhead of UI update events if your + application has a lot of windows. If you set the value to -1 or + greater than 0, you may also need to call `wx.Window.UpdateWindowUI` + at appropriate points in your application, such as when a dialog is + about to be shown. + """ + return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs) + +def UpdateUIEvent_GetUpdateInterval(*args): + """ + UpdateUIEvent_GetUpdateInterval() -> long + + Returns the current interval between updates in milliseconds. -1 + disables updates, 0 updates as frequently as possible. + """ + return _core_.UpdateUIEvent_GetUpdateInterval(*args) + +def UpdateUIEvent_CanUpdate(*args, **kwargs): + """ + UpdateUIEvent_CanUpdate(Window win) -> bool -def wxUpdateUIEvent_CanUpdate(*args, **kwargs): - """wxUpdateUIEvent_CanUpdate(wxWindow win) -> bool""" - return __core.wxUpdateUIEvent_CanUpdate(*args, **kwargs) + Returns ``True`` if it is appropriate to update (send UI update events + to) this window. -def wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs): - """wxUpdateUIEvent_ResetUpdateTime()""" - return __core.wxUpdateUIEvent_ResetUpdateTime(*args, **kwargs) + This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`), + the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update + events were last sent in idle time, and the update interval, to + determine whether events should be sent to this window now. By default + this will always return true because the update mode is initially + wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update + events will be sent as often as possible. You can reduce the frequency + that events are sent by changing the mode and/or setting an update + interval. -def wxUpdateUIEvent_SetMode(*args, **kwargs): - """wxUpdateUIEvent_SetMode(int mode)""" - return __core.wxUpdateUIEvent_SetMode(*args, **kwargs) + """ + return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs) -def wxUpdateUIEvent_GetMode(*args, **kwargs): - """wxUpdateUIEvent_GetMode() -> int""" - return __core.wxUpdateUIEvent_GetMode(*args, **kwargs) +def UpdateUIEvent_ResetUpdateTime(*args): + """ + UpdateUIEvent_ResetUpdateTime() + + Used internally to reset the last-updated time to the current time. It + is assumed that update events are normally sent in idle time, so this + is called at the end of idle processing. + """ + return _core_.UpdateUIEvent_ResetUpdateTime(*args) + +def UpdateUIEvent_SetMode(*args, **kwargs): + """ + UpdateUIEvent_SetMode(int mode) + + Specify how wxWidgets will send update events: to all windows, or only + to those which specify that they will process the events. + + The mode may be one of the following values: + + ============================= ========================================== + wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This + is the default setting. + wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that + have the wx.WS_EX_PROCESS_UI_UPDATES extra + style set. + ============================= ========================================== + + """ + return _core_.UpdateUIEvent_SetMode(*args, **kwargs) + +def UpdateUIEvent_GetMode(*args): + """ + UpdateUIEvent_GetMode() -> int + + Returns a value specifying how wxWidgets will send update events: to + all windows, or only to those which specify that they will process the + events. + """ + return _core_.UpdateUIEvent_GetMode(*args) #--------------------------------------------------------------------------- -class wxSysColourChangedEvent(wxEvent): - """Proxy of C++ wxSysColourChangedEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxSysColourChangedEvent""" - newobj = __core.new_wxSysColourChangedEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxSysColourChangedEventPtr(wxSysColourChangedEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSysColourChangedEvent -__core.wxSysColourChangedEvent_swigregister(wxSysColourChangedEventPtr) +class SysColourChangedEvent(Event): + """ + This class is used for EVT_SYS_COLOUR_CHANGED, which are generated + when the user changes the colour settings using the control + panel. This is only applicable under Windows. + + The default event handler for this event propagates the event to child + windows, since Windows only sends the events to top-level windows. If + intercepting this event for a top-level window, remember to call + `Skip` so the the base class handler will still be executed, or to + pass the event on to the window's children explicitly. + + """ + 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) -> SysColourChangedEvent + + Constructor + """ + _core_.SysColourChangedEvent_swiginit(self,_core_.new_SysColourChangedEvent(*args, **kwargs)) +_core_.SysColourChangedEvent_swigregister(SysColourChangedEvent) #--------------------------------------------------------------------------- -class wxMouseCaptureChangedEvent(wxEvent): - """Proxy of C++ wxMouseCaptureChangedEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int winid=0, wxWindow gainedCapture=None) -> wxMouseCaptureChangedEvent""" - newobj = __core.new_wxMouseCaptureChangedEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class MouseCaptureChangedEvent(Event): + """ + An mouse capture changed event (EVT_MOUSE_CAPTURE_CHANGED) is sent to + a window that loses its mouse capture. This is called even if + `wx.Window.ReleaseMouse` was called by the application code. Handling + this event allows an application to cater for unexpected capture + releases which might otherwise confuse mouse handling code. + + This event is implemented under Windows only. + """ + 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, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent + + Constructor + """ + _core_.MouseCaptureChangedEvent_swiginit(self,_core_.new_MouseCaptureChangedEvent(*args, **kwargs)) def GetCapturedWindow(*args, **kwargs): - """GetCapturedWindow(self) -> wxWindow""" - return __core.wxMouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) + """ + GetCapturedWindow(self) -> Window + Returns the window that gained the capture, or ``None`` if it was a + non-wxWidgets window. + """ + return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs) -class wxMouseCaptureChangedEventPtr(wxMouseCaptureChangedEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMouseCaptureChangedEvent -__core.wxMouseCaptureChangedEvent_swigregister(wxMouseCaptureChangedEventPtr) + CapturedWindow = property(GetCapturedWindow,doc="See `GetCapturedWindow`") +_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEvent) #--------------------------------------------------------------------------- -class wxDisplayChangedEvent(wxEvent): - """Proxy of C++ wxDisplayChangedEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxDisplayChangedEvent""" - newobj = __core.new_wxDisplayChangedEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - -class wxDisplayChangedEventPtr(wxDisplayChangedEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxDisplayChangedEvent -__core.wxDisplayChangedEvent_swigregister(wxDisplayChangedEventPtr) +class MouseCaptureLostEvent(Event): + """ + A mouse capture lost event is sent to a window that obtained mouse + capture, which was subsequently loss due to "external" event, for + example when a dialog box is shown or if another application captures + the mouse. + + If this happens, this event is sent to all windows that are on the + capture stack (i.e. a window that called `wx.Window.CaptureMouse`, but + didn't call `wx.Window.ReleaseMouse` yet). The event is *not* sent + if the capture changes because of a call to CaptureMouse or + ReleaseMouse. + + This event is currently emitted under Windows only. + + """ + 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, int winid=0) -> MouseCaptureLostEvent + + A mouse capture lost event is sent to a window that obtained mouse + capture, which was subsequently loss due to "external" event, for + example when a dialog box is shown or if another application captures + the mouse. + + If this happens, this event is sent to all windows that are on the + capture stack (i.e. a window that called `wx.Window.CaptureMouse`, but + didn't call `wx.Window.ReleaseMouse` yet). The event is *not* sent + if the capture changes because of a call to CaptureMouse or + ReleaseMouse. + + This event is currently emitted under Windows only. + + """ + _core_.MouseCaptureLostEvent_swiginit(self,_core_.new_MouseCaptureLostEvent(*args, **kwargs)) +_core_.MouseCaptureLostEvent_swigregister(MouseCaptureLostEvent) + +#--------------------------------------------------------------------------- + +class DisplayChangedEvent(Event): + """ + An EVT_DISPLAY_CHANGED event is sent to all windows when the display + resolution has changed. + + This event is implemented under Windows only. + """ + 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) -> DisplayChangedEvent""" + _core_.DisplayChangedEvent_swiginit(self,_core_.new_DisplayChangedEvent(*args, **kwargs)) +_core_.DisplayChangedEvent_swigregister(DisplayChangedEvent) + +#--------------------------------------------------------------------------- + +class PaletteChangedEvent(Event): + """ + An EVT_PALETTE_CHANGED event is sent when the system palette has + changed, thereby giving each window a chance to redo their own to + match. + + This event is implemented under Windows only. + """ + 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, int id=0) -> PaletteChangedEvent -#--------------------------------------------------------------------------- + An EVT_PALETTE_CHANGED event is sent when the system palette has + changed, thereby giving each window a chance to redo their own to + match. -class wxPaletteChangedEvent(wxEvent): - """Proxy of C++ wxPaletteChangedEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int id=0) -> wxPaletteChangedEvent""" - newobj = __core.new_wxPaletteChangedEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + This event is implemented under Windows only. + """ + _core_.PaletteChangedEvent_swiginit(self,_core_.new_PaletteChangedEvent(*args, **kwargs)) def SetChangedWindow(*args, **kwargs): - """SetChangedWindow(self, wxWindow win)""" - return __core.wxPaletteChangedEvent_SetChangedWindow(*args, **kwargs) + """SetChangedWindow(self, Window win)""" + return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs) def GetChangedWindow(*args, **kwargs): - """GetChangedWindow(self) -> wxWindow""" - return __core.wxPaletteChangedEvent_GetChangedWindow(*args, **kwargs) - + """GetChangedWindow(self) -> Window""" + return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs) -class wxPaletteChangedEventPtr(wxPaletteChangedEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPaletteChangedEvent -__core.wxPaletteChangedEvent_swigregister(wxPaletteChangedEventPtr) + ChangedWindow = property(GetChangedWindow,SetChangedWindow,doc="See `GetChangedWindow` and `SetChangedWindow`") +_core_.PaletteChangedEvent_swigregister(PaletteChangedEvent) #--------------------------------------------------------------------------- -class wxQueryNewPaletteEvent(wxEvent): - """Proxy of C++ wxQueryNewPaletteEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int winid=0) -> wxQueryNewPaletteEvent""" - newobj = __core.new_wxQueryNewPaletteEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class QueryNewPaletteEvent(Event): + """ + An EVT_QUERY_NEW_PALETE event indicates the window is getting keyboard + focus and should re-do its palette. + + This event is implemented under Windows only. + """ + 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, int winid=0) -> QueryNewPaletteEvent + + Constructor. + """ + _core_.QueryNewPaletteEvent_swiginit(self,_core_.new_QueryNewPaletteEvent(*args, **kwargs)) def SetPaletteRealized(*args, **kwargs): - """SetPaletteRealized(self, bool realized)""" - return __core.wxQueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) + """ + SetPaletteRealized(self, bool realized) + + App should set this if it changes the palette. + """ + return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs) def GetPaletteRealized(*args, **kwargs): """GetPaletteRealized(self) -> bool""" - return __core.wxQueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) + return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs) - -class wxQueryNewPaletteEventPtr(wxQueryNewPaletteEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxQueryNewPaletteEvent -__core.wxQueryNewPaletteEvent_swigregister(wxQueryNewPaletteEventPtr) + PaletteRealized = property(GetPaletteRealized,SetPaletteRealized,doc="See `GetPaletteRealized` and `SetPaletteRealized`") +_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEvent) #--------------------------------------------------------------------------- -class wxNavigationKeyEvent(wxEvent): - """Proxy of C++ wxNavigationKeyEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxNavigationKeyEvent""" - newobj = __core.new_wxNavigationKeyEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class NavigationKeyEvent(Event): + """ + EVT_NAVIGATION_KEY events are used to control moving the focus between + widgets, otherwise known as tab-traversal. You woudl normally not + catch navigation events in applications as there are already + appropriate handlers in `wx.Dialog` and `wx.Panel`, but you may find + it useful to send navigation events in certain situations to change + the focus in certain ways, although it's probably easier to just call + `wx.Window.Navigate`. + """ + 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) -> NavigationKeyEvent""" + _core_.NavigationKeyEvent_swiginit(self,_core_.new_NavigationKeyEvent(*args, **kwargs)) def GetDirection(*args, **kwargs): - """GetDirection(self) -> bool""" - return __core.wxNavigationKeyEvent_GetDirection(*args, **kwargs) + """ + GetDirection(self) -> bool + + Returns ``True`` if the direction is forward, ``False`` otherwise. + """ + return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs) def SetDirection(*args, **kwargs): - """SetDirection(self, bool forward)""" - return __core.wxNavigationKeyEvent_SetDirection(*args, **kwargs) + """ + SetDirection(self, bool forward) + + Specify the direction that the navigation should take. Usually the + difference between using Tab and Shift-Tab. + """ + return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs) def IsWindowChange(*args, **kwargs): - """IsWindowChange(self) -> bool""" - return __core.wxNavigationKeyEvent_IsWindowChange(*args, **kwargs) + """ + IsWindowChange(self) -> bool + + Returns ``True`` if window change is allowed. + """ + return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs) def SetWindowChange(*args, **kwargs): - """SetWindowChange(self, bool ischange)""" - return __core.wxNavigationKeyEvent_SetWindowChange(*args, **kwargs) + """ + SetWindowChange(self, bool ischange) + + Specify if the navigation should be able to change parent windows. + For example, changing notebook pages, etc. This is usually implemented + by using Control-Tab. + """ + return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs) def IsFromTab(*args, **kwargs): - """IsFromTab(self) -> bool""" - return __core.wxNavigationKeyEvent_IsFromTab(*args, **kwargs) + """ + IsFromTab(self) -> bool + + Returns ``True`` if the navigation event is originated from the Tab + key. + """ + return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs) def SetFromTab(*args, **kwargs): - """SetFromTab(self, bool bIs)""" - return __core.wxNavigationKeyEvent_SetFromTab(*args, **kwargs) + """ + SetFromTab(self, bool bIs) + + Set to true under MSW if the event was generated using the tab key. + This is required for proper navogation over radio buttons. + """ + return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs) def SetFlags(*args, **kwargs): - """SetFlags(self, long flags)""" - return __core.wxNavigationKeyEvent_SetFlags(*args, **kwargs) + """ + SetFlags(self, long flags) + + Set the navigation flags to a combination of the following: + + * wx.NavigationKeyEvent.IsBackward + * wx.NavigationKeyEvent.IsForward + * wx.NavigationKeyEvent.WinChange + * wx.NavigationKeyEvent.FromTab + + """ + return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs) def GetCurrentFocus(*args, **kwargs): - """GetCurrentFocus(self) -> wxWindow""" - return __core.wxNavigationKeyEvent_GetCurrentFocus(*args, **kwargs) + """ + GetCurrentFocus(self) -> Window + + Returns the child window which currenty has the focus. May be + ``None``. + """ + return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs) def SetCurrentFocus(*args, **kwargs): - """SetCurrentFocus(self, wxWindow win)""" - return __core.wxNavigationKeyEvent_SetCurrentFocus(*args, **kwargs) + """ + SetCurrentFocus(self, Window win) - IsBackward = __core.wxNavigationKeyEvent_IsBackward - IsForward = __core.wxNavigationKeyEvent_IsForward - WinChange = __core.wxNavigationKeyEvent_WinChange - FromTab = __core.wxNavigationKeyEvent_FromTab + Set the window that has the focus. + """ + return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs) -class wxNavigationKeyEventPtr(wxNavigationKeyEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxNavigationKeyEvent -__core.wxNavigationKeyEvent_swigregister(wxNavigationKeyEventPtr) + IsBackward = _core_.NavigationKeyEvent_IsBackward + IsForward = _core_.NavigationKeyEvent_IsForward + WinChange = _core_.NavigationKeyEvent_WinChange + FromTab = _core_.NavigationKeyEvent_FromTab + CurrentFocus = property(GetCurrentFocus,SetCurrentFocus,doc="See `GetCurrentFocus` and `SetCurrentFocus`") + Direction = property(GetDirection,SetDirection,doc="See `GetDirection` and `SetDirection`") +_core_.NavigationKeyEvent_swigregister(NavigationKeyEvent) #--------------------------------------------------------------------------- -class wxWindowCreateEvent(wxCommandEvent): - """Proxy of C++ wxWindowCreateEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxWindow win=None) -> wxWindowCreateEvent""" - newobj = __core.new_wxWindowCreateEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class WindowCreateEvent(CommandEvent): + """ + The EVT_WINDOW_CREATE event is sent as soon as the window object (the + underlying GUI object) exists. + """ + 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 win=None) -> WindowCreateEvent + + The EVT_WINDOW_CREATE event is sent as soon as the window object (the + underlying GUI object) exists. + """ + _core_.WindowCreateEvent_swiginit(self,_core_.new_WindowCreateEvent(*args, **kwargs)) def GetWindow(*args, **kwargs): - """GetWindow(self) -> wxWindow""" - return __core.wxWindowCreateEvent_GetWindow(*args, **kwargs) + """ + GetWindow(self) -> Window + Returns the window that this event refers to. + """ + return _core_.WindowCreateEvent_GetWindow(*args, **kwargs) -class wxWindowCreateEventPtr(wxWindowCreateEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxWindowCreateEvent -__core.wxWindowCreateEvent_swigregister(wxWindowCreateEventPtr) + Window = property(GetWindow,doc="See `GetWindow`") +_core_.WindowCreateEvent_swigregister(WindowCreateEvent) -class wxWindowDestroyEvent(wxCommandEvent): - """Proxy of C++ wxWindowDestroyEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxWindow win=None) -> wxWindowDestroyEvent""" - newobj = __core.new_wxWindowDestroyEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class WindowDestroyEvent(CommandEvent): + """ + The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor + when the GUI window is destroyed. + + When a class derived from `wx.Window` is destroyed its destructor will + have already run by the time this event is sent. Therefore this event + will not usually be received at all by the window itself. Since it is + received after the destructor has run, an object should not try to + handle its own wx.WindowDestroyEvent, but it can be used to get + notification of the destruction of another window. + """ + 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 win=None) -> WindowDestroyEvent + + The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor + when the GUI window is destroyed. + + When a class derived from `wx.Window` is destroyed its destructor will + have already run by the time this event is sent. Therefore this event + will not usually be received at all by the window itself. Since it is + received after the destructor has run, an object should not try to + handle its own wx.WindowDestroyEvent, but it can be used to get + notification of the destruction of another window. + """ + _core_.WindowDestroyEvent_swiginit(self,_core_.new_WindowDestroyEvent(*args, **kwargs)) def GetWindow(*args, **kwargs): - """GetWindow(self) -> wxWindow""" - return __core.wxWindowDestroyEvent_GetWindow(*args, **kwargs) + """ + GetWindow(self) -> Window + Returns the window that this event refers to. + """ + return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs) -class wxWindowDestroyEventPtr(wxWindowDestroyEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxWindowDestroyEvent -__core.wxWindowDestroyEvent_swigregister(wxWindowDestroyEventPtr) + Window = property(GetWindow,doc="See `GetWindow`") +_core_.WindowDestroyEvent_swigregister(WindowDestroyEvent) #--------------------------------------------------------------------------- -class wxContextMenuEvent(wxCommandEvent): - """Proxy of C++ wxContextMenuEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, wxPoint pt=wxDefaultPosition) -> wxContextMenuEvent""" - newobj = __core.new_wxContextMenuEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class ContextMenuEvent(CommandEvent): + """ + This class is used for context menu events (EVT_CONTECT_MENU,) sent to + give the application a chance to show a context (popup) menu. + """ + 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, EventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent + + Constructor. + """ + _core_.ContextMenuEvent_swiginit(self,_core_.new_ContextMenuEvent(*args, **kwargs)) def GetPosition(*args, **kwargs): - """GetPosition(self) -> wxPoint""" - return __core.wxContextMenuEvent_GetPosition(*args, **kwargs) + """ + GetPosition(self) -> Point + + Returns the position (in screen coordinants) at which the menu should + be shown. + """ + return _core_.ContextMenuEvent_GetPosition(*args, **kwargs) def SetPosition(*args, **kwargs): - """SetPosition(self, wxPoint pos)""" - return __core.wxContextMenuEvent_SetPosition(*args, **kwargs) + """ + SetPosition(self, Point pos) + Sets the position at which the menu should be shown. + """ + return _core_.ContextMenuEvent_SetPosition(*args, **kwargs) -class wxContextMenuEventPtr(wxContextMenuEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxContextMenuEvent -__core.wxContextMenuEvent_swigregister(wxContextMenuEventPtr) + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") +_core_.ContextMenuEvent_swigregister(ContextMenuEvent) #--------------------------------------------------------------------------- -wxIDLE_PROCESS_ALL = __core.wxIDLE_PROCESS_ALL -wxIDLE_PROCESS_SPECIFIED = __core.wxIDLE_PROCESS_SPECIFIED -class wxIdleEvent(wxEvent): - """Proxy of C++ wxIdleEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxIdleEvent""" - newobj = __core.new_wxIdleEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL +IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED +class IdleEvent(Event): + """ + This class is used for EVT_IDLE events, which are generated and sent + when the application *becomes* idle. In other words, the when the + event queue becomes empty then idle events are sent to all windows (by + default) and as long as none of them call `RequestMore` then there are + no more idle events until after the system event queue has some normal + events and then becomes empty again. + + By default, idle events are sent to all windows. If this is causing a + significant overhead in your application, you can call + `wx.IdleEvent.SetMode` with the value wx.IDLE_PROCESS_SPECIFIED, and + set the wx.WS_EX_PROCESS_IDLE extra window style for every window + which should receive idle events. Then idle events will only be sent + to those windows and not to any others. + """ + 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) -> IdleEvent + + Constructor + """ + _core_.IdleEvent_swiginit(self,_core_.new_IdleEvent(*args, **kwargs)) def RequestMore(*args, **kwargs): - """RequestMore(self, bool needMore=True)""" - return __core.wxIdleEvent_RequestMore(*args, **kwargs) + """ + RequestMore(self, bool needMore=True) + + Tells wxWidgets that more processing is required. This function can be + called by an EVT_IDLE handler for a window to indicate that the + application should forward the EVT_IDLE event once more to the + application windows. If no window calls this function during its + EVT_IDLE handler, then the application will remain in a passive event + loop until a new event is posted to the application by the windowing + system. + """ + return _core_.IdleEvent_RequestMore(*args, **kwargs) def MoreRequested(*args, **kwargs): - """MoreRequested(self) -> bool""" - return __core.wxIdleEvent_MoreRequested(*args, **kwargs) + """ + MoreRequested(self) -> bool + + Returns ``True`` if the OnIdle function processing this event + requested more processing time. + """ + return _core_.IdleEvent_MoreRequested(*args, **kwargs) def SetMode(*args, **kwargs): - """SetMode(int mode)""" - return __core.wxIdleEvent_SetMode(*args, **kwargs) + """ + SetMode(int mode) + + Static method for specifying how wxWidgets will send idle events: to + all windows, or only to those which specify that they will process the + events. + + The mode can be one of the following values: + + ========================= ======================================== + wx.IDLE_PROCESS_ALL Send idle events to all windows + wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have + the wx.WS_EX_PROCESS_IDLE extra style + flag set. + ========================= ======================================== + + """ + return _core_.IdleEvent_SetMode(*args, **kwargs) SetMode = staticmethod(SetMode) def GetMode(*args, **kwargs): - """GetMode() -> int""" - return __core.wxIdleEvent_GetMode(*args, **kwargs) + """ + GetMode() -> int + + Static method returning a value specifying how wxWidgets will send + idle events: to all windows, or only to those which specify that they + will process the events. + """ + return _core_.IdleEvent_GetMode(*args, **kwargs) GetMode = staticmethod(GetMode) def CanSend(*args, **kwargs): - """CanSend(wxWindow win) -> bool""" - return __core.wxIdleEvent_CanSend(*args, **kwargs) + """ + CanSend(Window win) -> bool + + Returns ``True`` if it is appropriate to send idle events to this + window. + + This function looks at the mode used (see `wx.IdleEvent.SetMode`), and + the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle + events should be sent to this window now. By default this will always + return ``True`` because the update mode is initially + wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events + to windows with the wx.WS_EX_PROCESS_IDLE extra window style set. + """ + return _core_.IdleEvent_CanSend(*args, **kwargs) CanSend = staticmethod(CanSend) +_core_.IdleEvent_swigregister(IdleEvent) + +def IdleEvent_SetMode(*args, **kwargs): + """ + IdleEvent_SetMode(int mode) + + Static method for specifying how wxWidgets will send idle events: to + all windows, or only to those which specify that they will process the + events. -class wxIdleEventPtr(wxIdleEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxIdleEvent -__core.wxIdleEvent_swigregister(wxIdleEventPtr) + The mode can be one of the following values: -def wxIdleEvent_SetMode(*args, **kwargs): - """wxIdleEvent_SetMode(int mode)""" - return __core.wxIdleEvent_SetMode(*args, **kwargs) + ========================= ======================================== + wx.IDLE_PROCESS_ALL Send idle events to all windows + wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have + the wx.WS_EX_PROCESS_IDLE extra style + flag set. + ========================= ======================================== -def wxIdleEvent_GetMode(*args, **kwargs): - """wxIdleEvent_GetMode() -> int""" - return __core.wxIdleEvent_GetMode(*args, **kwargs) + """ + return _core_.IdleEvent_SetMode(*args, **kwargs) + +def IdleEvent_GetMode(*args): + """ + IdleEvent_GetMode() -> int + + Static method returning a value specifying how wxWidgets will send + idle events: to all windows, or only to those which specify that they + will process the events. + """ + return _core_.IdleEvent_GetMode(*args) -def wxIdleEvent_CanSend(*args, **kwargs): - """wxIdleEvent_CanSend(wxWindow win) -> bool""" - return __core.wxIdleEvent_CanSend(*args, **kwargs) +def IdleEvent_CanSend(*args, **kwargs): + """ + IdleEvent_CanSend(Window win) -> bool + + Returns ``True`` if it is appropriate to send idle events to this + window. + + This function looks at the mode used (see `wx.IdleEvent.SetMode`), and + the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle + events should be sent to this window now. By default this will always + return ``True`` because the update mode is initially + wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events + to windows with the wx.WS_EX_PROCESS_IDLE extra window style set. + """ + return _core_.IdleEvent_CanSend(*args, **kwargs) #--------------------------------------------------------------------------- -class wxPyEvent(wxEvent): - """Proxy of C++ wxPyEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> wxPyEvent""" - newobj = __core.new_wxPyEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - self.SetSelf(self) - - def __del__(self, destroy=__core.delete_wxPyEvent): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass +class ClipboardTextEvent(CommandEvent): + """ + A Clipboard Text event is sent when a window intercepts a text + copy/cut/paste message, i.e. the user has cut/copied/pasted data + from/into a text control via ctrl-C/X/V, ctrl/shift-del/insert, a + popup menu command, etc. NOTE : under windows these events are *NOT* + generated automatically for a Rich Edit text control. + """ + 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, EventType type=wxEVT_NULL, int winid=0) -> ClipboardTextEvent - def SetSelf(*args, **kwargs): - """SetSelf(self, PyObject self)""" - return __core.wxPyEvent_SetSelf(*args, **kwargs) + A Clipboard Text event is sent when a window intercepts a text + copy/cut/paste message, i.e. the user has cut/copied/pasted data + from/into a text control via ctrl-C/X/V, ctrl/shift-del/insert, a + popup menu command, etc. NOTE : under windows these events are *NOT* + generated automatically for a Rich Edit text control. + """ + _core_.ClipboardTextEvent_swiginit(self,_core_.new_ClipboardTextEvent(*args, **kwargs)) +_core_.ClipboardTextEvent_swigregister(ClipboardTextEvent) - def GetSelf(*args, **kwargs): - """GetSelf(self) -> PyObject""" - return __core.wxPyEvent_GetSelf(*args, **kwargs) +#--------------------------------------------------------------------------- +class PyEvent(Event): + """ + wx.PyEvent can be used as a base class for implementing custom event + types in Python. You should derived from this class instead of + `wx.Event` because this class is Python-aware and is able to transport + its Python bits safely through the wxWidgets event system and have + them still be there when the event handler is invoked. -class wxPyEventPtr(wxPyEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPyEvent -__core.wxPyEvent_swigregister(wxPyEventPtr) + :see: `wx.PyCommandEvent` -class wxPyCommandEvent(wxCommandEvent): - """Proxy of C++ wxPyCommandEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> wxPyCommandEvent""" - newobj = __core.new_wxPyCommandEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - self.SetSelf(self) - - def __del__(self, destroy=__core.delete_wxPyCommandEvent): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + """ + 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, int winid=0, EventType eventType=wxEVT_NULL) -> PyEvent""" + _core_.PyEvent_swiginit(self,_core_.new_PyEvent(*args, **kwargs)) + self._SetSelf(self) - def SetSelf(*args, **kwargs): - """SetSelf(self, PyObject self)""" - return __core.wxPyCommandEvent_SetSelf(*args, **kwargs) + __swig_destroy__ = _core_.delete_PyEvent + __del__ = lambda self : None; + def _SetSelf(*args, **kwargs): + """_SetSelf(self, PyObject self)""" + return _core_.PyEvent__SetSelf(*args, **kwargs) - def GetSelf(*args, **kwargs): - """GetSelf(self) -> PyObject""" - return __core.wxPyCommandEvent_GetSelf(*args, **kwargs) + def _GetSelf(*args, **kwargs): + """_GetSelf(self) -> PyObject""" + return _core_.PyEvent__GetSelf(*args, **kwargs) +_core_.PyEvent_swigregister(PyEvent) -class wxPyCommandEventPtr(wxPyCommandEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPyCommandEvent -__core.wxPyCommandEvent_swigregister(wxPyCommandEventPtr) +class PyCommandEvent(CommandEvent): + """ + wx.PyCommandEvent can be used as a base class for implementing custom + event types in Python, where the event shoudl travel up to parent + windows looking for a handler. You should derived from this class + instead of `wx.CommandEvent` because this class is Python-aware and is + able to transport its Python bits safely through the wxWidgets event + system and have them still be there when the event handler is invoked. -class wxDateEvent(wxCommandEvent): - """Proxy of C++ wxDateEvent class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxWindow win, wxDateTime dt, wxEventType type) -> wxDateEvent""" - newobj = __core.new_wxDateEvent(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + :see: `wx.PyEvent` + + """ + 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, EventType eventType=wxEVT_NULL, int id=0) -> PyCommandEvent""" + _core_.PyCommandEvent_swiginit(self,_core_.new_PyCommandEvent(*args, **kwargs)) + self._SetSelf(self) + + __swig_destroy__ = _core_.delete_PyCommandEvent + __del__ = lambda self : None; + def _SetSelf(*args, **kwargs): + """_SetSelf(self, PyObject self)""" + return _core_.PyCommandEvent__SetSelf(*args, **kwargs) + + def _GetSelf(*args, **kwargs): + """_GetSelf(self) -> PyObject""" + return _core_.PyCommandEvent__GetSelf(*args, **kwargs) + +_core_.PyCommandEvent_swigregister(PyCommandEvent) + +class DateEvent(CommandEvent): + """ + This event class holds information about a date change event and is + used together with `wx.DatePickerCtrl`. It also serves as a base class + for `wx.calendar.CalendarEvent`. Bind these event types with + EVT_DATE_CHANGED. + """ + 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 win, DateTime dt, EventType type) -> DateEvent""" + _core_.DateEvent_swiginit(self,_core_.new_DateEvent(*args, **kwargs)) def GetDate(*args, **kwargs): - """GetDate(self) -> wxDateTime""" - return __core.wxDateEvent_GetDate(*args, **kwargs) + """ + GetDate(self) -> DateTime + + Returns the date. + """ + return _core_.DateEvent_GetDate(*args, **kwargs) def SetDate(*args, **kwargs): - """SetDate(self, wxDateTime date)""" - return __core.wxDateEvent_SetDate(*args, **kwargs) + """ + SetDate(self, DateTime date) + Sets the date carried by the event, normally only used by the library + internally. + """ + return _core_.DateEvent_SetDate(*args, **kwargs) -class wxDateEventPtr(wxDateEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxDateEvent -__core.wxDateEvent_swigregister(wxDateEventPtr) + Date = property(GetDate,SetDate,doc="See `GetDate` and `SetDate`") +_core_.DateEvent_swigregister(DateEvent) -wxEVT_DATE_CHANGED = __core.wxEVT_DATE_CHANGED +wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 ) #--------------------------------------------------------------------------- -wxPYAPP_ASSERT_SUPPRESS = __core.wxPYAPP_ASSERT_SUPPRESS -wxPYAPP_ASSERT_EXCEPTION = __core.wxPYAPP_ASSERT_EXCEPTION -wxPYAPP_ASSERT_DIALOG = __core.wxPYAPP_ASSERT_DIALOG -wxPYAPP_ASSERT_LOG = __core.wxPYAPP_ASSERT_LOG -wxPRINT_WINDOWS = __core.wxPRINT_WINDOWS -wxPRINT_POSTSCRIPT = __core.wxPRINT_POSTSCRIPT -class wxPyApp(wxEvtHandler): +PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS +PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION +PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG +PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG +PRINT_WINDOWS = _core_.PRINT_WINDOWS +PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT +class PyApp(EvtHandler): """ The ``wx.PyApp`` class is an *implementation detail*, please use the `wx.App` class (or some other derived class) instead. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> wxPyApp + __init__(self) -> PyApp Create a new application object, starting the bootstrap process. """ - newobj = __core.new_wxPyApp(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - self._setCallbackInfo(self, PyApp) - self._setOORInfo(self) - - def __del__(self, destroy=__core.delete_wxPyApp): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs)) + self._setCallbackInfo(self, PyApp, False) + self._setOORInfo(self, False) + __swig_destroy__ = _core_.delete_PyApp + __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class)""" - return __core.wxPyApp__setCallbackInfo(*args, **kwargs) + """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" + return _core_.PyApp__setCallbackInfo(*args, **kwargs) def GetAppName(*args, **kwargs): """ - GetAppName(self) -> wxString + GetAppName(self) -> String Get the application name. """ - return __core.wxPyApp_GetAppName(*args, **kwargs) + return _core_.PyApp_GetAppName(*args, **kwargs) def SetAppName(*args, **kwargs): """ - SetAppName(self, wxString name) + SetAppName(self, String name) Set the application name. This value may be used automatically by `wx.Config` and such. """ - return __core.wxPyApp_SetAppName(*args, **kwargs) + return _core_.PyApp_SetAppName(*args, **kwargs) def GetClassName(*args, **kwargs): """ - GetClassName(self) -> wxString + GetClassName(self) -> String Get the application's class name. """ - return __core.wxPyApp_GetClassName(*args, **kwargs) + return _core_.PyApp_GetClassName(*args, **kwargs) def SetClassName(*args, **kwargs): """ - SetClassName(self, wxString name) + SetClassName(self, String name) Set the application's class name. This value may be used for X-resources if applicable for the platform """ - return __core.wxPyApp_SetClassName(*args, **kwargs) + return _core_.PyApp_SetClassName(*args, **kwargs) def GetVendorName(*args, **kwargs): """ - GetVendorName(self) -> wxString + GetVendorName(self) -> String Get the application's vendor name. """ - return __core.wxPyApp_GetVendorName(*args, **kwargs) + return _core_.PyApp_GetVendorName(*args, **kwargs) def SetVendorName(*args, **kwargs): """ - SetVendorName(self, wxString name) + SetVendorName(self, String name) Set the application's vendor name. This value may be used automatically by `wx.Config` and such. """ - return __core.wxPyApp_SetVendorName(*args, **kwargs) + return _core_.PyApp_SetVendorName(*args, **kwargs) def GetTraits(*args, **kwargs): """ @@ -5079,7 +7080,7 @@ class wxPyApp(wxEvtHandler): :todo: Add support for overriding CreateAppTraits in wxPython. """ - return __core.wxPyApp_GetTraits(*args, **kwargs) + return _core_.PyApp_GetTraits(*args, **kwargs) def ProcessPendingEvents(*args, **kwargs): """ @@ -5089,7 +7090,7 @@ class wxPyApp(wxEvtHandler): call this function to process posted events. This normally happens during each event loop iteration. """ - return __core.wxPyApp_ProcessPendingEvents(*args, **kwargs) + return _core_.PyApp_ProcessPendingEvents(*args, **kwargs) def Yield(*args, **kwargs): """ @@ -5107,7 +7108,7 @@ class wxPyApp(wxEvtHandler): :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield` """ - return __core.wxPyApp_Yield(*args, **kwargs) + return _core_.PyApp_Yield(*args, **kwargs) def WakeUpIdle(*args, **kwargs): """ @@ -5116,7 +7117,7 @@ class wxPyApp(wxEvtHandler): Make sure that idle events are sent again. :see: `wx.WakeUpIdle` """ - return __core.wxPyApp_WakeUpIdle(*args, **kwargs) + return _core_.PyApp_WakeUpIdle(*args, **kwargs) def IsMainLoopRunning(*args, **kwargs): """ @@ -5125,7 +7126,7 @@ class wxPyApp(wxEvtHandler): Returns True if we're running the main loop, i.e. if the events can currently be dispatched. """ - return __core.wxPyApp_IsMainLoopRunning(*args, **kwargs) + return _core_.PyApp_IsMainLoopRunning(*args, **kwargs) IsMainLoopRunning = staticmethod(IsMainLoopRunning) def MainLoop(*args, **kwargs): @@ -5135,7 +7136,7 @@ class wxPyApp(wxEvtHandler): Execute the main GUI loop, the function doesn't normally return until all top level windows have been closed and destroyed. """ - return __core.wxPyApp_MainLoop(*args, **kwargs) + return _core_.PyApp_MainLoop(*args, **kwargs) def Exit(*args, **kwargs): """ @@ -5144,7 +7145,15 @@ class wxPyApp(wxEvtHandler): Exit the main loop thus terminating the application. :see: `wx.Exit` """ - return __core.wxPyApp_Exit(*args, **kwargs) + return _core_.PyApp_Exit(*args, **kwargs) + + def GetLayoutDirection(*args, **kwargs): + """ + GetLayoutDirection(self) -> int + + Return the layout direction for the current locale. + """ + return _core_.PyApp_GetLayoutDirection(*args, **kwargs) def ExitMainLoop(*args, **kwargs): """ @@ -5153,7 +7162,7 @@ class wxPyApp(wxEvtHandler): Exit the main GUI loop during the next iteration of the main loop, (i.e. it does not stop the program immediately!) """ - return __core.wxPyApp_ExitMainLoop(*args, **kwargs) + return _core_.PyApp_ExitMainLoop(*args, **kwargs) def Pending(*args, **kwargs): """ @@ -5161,7 +7170,7 @@ class wxPyApp(wxEvtHandler): Returns True if there are unprocessed events in the event queue. """ - return __core.wxPyApp_Pending(*args, **kwargs) + return _core_.PyApp_Pending(*args, **kwargs) def Dispatch(*args, **kwargs): """ @@ -5170,7 +7179,7 @@ class wxPyApp(wxEvtHandler): Process the first event in the event queue (blocks until an event appears if there are none currently) """ - return __core.wxPyApp_Dispatch(*args, **kwargs) + return _core_.PyApp_Dispatch(*args, **kwargs) def ProcessIdle(*args, **kwargs): """ @@ -5180,16 +7189,16 @@ class wxPyApp(wxEvtHandler): no pending events) and sends a `wx.IdleEvent` to all interested parties. Returns True if more idle events are needed, False if not. """ - return __core.wxPyApp_ProcessIdle(*args, **kwargs) + return _core_.PyApp_ProcessIdle(*args, **kwargs) def SendIdleEvents(*args, **kwargs): """ - SendIdleEvents(self, wxWindow win, wxIdleEvent event) -> bool + SendIdleEvents(self, Window win, IdleEvent event) -> bool Send idle event to window and all subwindows. Returns True if more idle time is requested. """ - return __core.wxPyApp_SendIdleEvents(*args, **kwargs) + return _core_.PyApp_SendIdleEvents(*args, **kwargs) def IsActive(*args, **kwargs): """ @@ -5197,25 +7206,25 @@ class wxPyApp(wxEvtHandler): Return True if our app has focus. """ - return __core.wxPyApp_IsActive(*args, **kwargs) + return _core_.PyApp_IsActive(*args, **kwargs) def SetTopWindow(*args, **kwargs): """ - SetTopWindow(self, wxWindow win) + SetTopWindow(self, Window win) Set the *main* top level window """ - return __core.wxPyApp_SetTopWindow(*args, **kwargs) + return _core_.PyApp_SetTopWindow(*args, **kwargs) def GetTopWindow(*args, **kwargs): """ - GetTopWindow(self) -> wxWindow + GetTopWindow(self) -> Window Return the *main* top level window (if it hadn't been set previously with SetTopWindow(), will return just some top level window and, if there not any, will return None) """ - return __core.wxPyApp_GetTopWindow(*args, **kwargs) + return _core_.PyApp_GetTopWindow(*args, **kwargs) def SetExitOnFrameDelete(*args, **kwargs): """ @@ -5227,7 +7236,7 @@ class wxPyApp(wxEvtHandler): SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly from somewhere. """ - return __core.wxPyApp_SetExitOnFrameDelete(*args, **kwargs) + return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs) def GetExitOnFrameDelete(*args, **kwargs): """ @@ -5235,7 +7244,7 @@ class wxPyApp(wxEvtHandler): Get the current exit behaviour setting. """ - return __core.wxPyApp_GetExitOnFrameDelete(*args, **kwargs) + return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs) def SetUseBestVisual(*args, **kwargs): """ @@ -5244,7 +7253,7 @@ class wxPyApp(wxEvtHandler): Set whether the app should try to use the best available visual on systems where more than one is available, (Sun, SGI, XFree86 4, etc.) """ - return __core.wxPyApp_SetUseBestVisual(*args, **kwargs) + return _core_.PyApp_SetUseBestVisual(*args, **kwargs) def GetUseBestVisual(*args, **kwargs): """ @@ -5252,15 +7261,15 @@ class wxPyApp(wxEvtHandler): Get current UseBestVisual setting. """ - return __core.wxPyApp_GetUseBestVisual(*args, **kwargs) + return _core_.PyApp_GetUseBestVisual(*args, **kwargs) def SetPrintMode(*args, **kwargs): """SetPrintMode(self, int mode)""" - return __core.wxPyApp_SetPrintMode(*args, **kwargs) + return _core_.PyApp_SetPrintMode(*args, **kwargs) def GetPrintMode(*args, **kwargs): """GetPrintMode(self) -> int""" - return __core.wxPyApp_GetPrintMode(*args, **kwargs) + return _core_.PyApp_GetPrintMode(*args, **kwargs) def SetAssertMode(*args, **kwargs): """ @@ -5268,7 +7277,7 @@ class wxPyApp(wxEvtHandler): Set the OnAssert behaviour for debug and hybrid builds. """ - return __core.wxPyApp_SetAssertMode(*args, **kwargs) + return _core_.PyApp_SetAssertMode(*args, **kwargs) def GetAssertMode(*args, **kwargs): """ @@ -5276,56 +7285,56 @@ class wxPyApp(wxEvtHandler): Get the current OnAssert behaviour setting. """ - return __core.wxPyApp_GetAssertMode(*args, **kwargs) + return _core_.PyApp_GetAssertMode(*args, **kwargs) def GetMacSupportPCMenuShortcuts(*args, **kwargs): """GetMacSupportPCMenuShortcuts() -> bool""" - return __core.wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) + return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts) def GetMacAboutMenuItemId(*args, **kwargs): """GetMacAboutMenuItemId() -> long""" - return __core.wxPyApp_GetMacAboutMenuItemId(*args, **kwargs) + return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs) GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId) def GetMacPreferencesMenuItemId(*args, **kwargs): """GetMacPreferencesMenuItemId() -> long""" - return __core.wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs) + return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs) GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId) def GetMacExitMenuItemId(*args, **kwargs): """GetMacExitMenuItemId() -> long""" - return __core.wxPyApp_GetMacExitMenuItemId(*args, **kwargs) + return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs) GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId) def GetMacHelpMenuTitleName(*args, **kwargs): - """GetMacHelpMenuTitleName() -> wxString""" - return __core.wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs) + """GetMacHelpMenuTitleName() -> String""" + return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs) GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName) def SetMacSupportPCMenuShortcuts(*args, **kwargs): """SetMacSupportPCMenuShortcuts(bool val)""" - return __core.wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) + return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts) def SetMacAboutMenuItemId(*args, **kwargs): """SetMacAboutMenuItemId(long val)""" - return __core.wxPyApp_SetMacAboutMenuItemId(*args, **kwargs) + return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId) def SetMacPreferencesMenuItemId(*args, **kwargs): """SetMacPreferencesMenuItemId(long val)""" - return __core.wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs) + return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId) def SetMacExitMenuItemId(*args, **kwargs): """SetMacExitMenuItemId(long val)""" - return __core.wxPyApp_SetMacExitMenuItemId(*args, **kwargs) + return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId) def SetMacHelpMenuTitleName(*args, **kwargs): - """SetMacHelpMenuTitleName(wxString val)""" - return __core.wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs) + """SetMacHelpMenuTitleName(String val)""" + return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName) def _BootstrapApp(*args, **kwargs): @@ -5334,7 +7343,7 @@ class wxPyApp(wxEvtHandler): For internal use only """ - return __core.wxPyApp__BootstrapApp(*args, **kwargs) + return _core_.PyApp__BootstrapApp(*args, **kwargs) def GetComCtl32Version(*args, **kwargs): """ @@ -5343,105 +7352,153 @@ class wxPyApp(wxEvtHandler): Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn't found at all. Raises an exception on non-Windows platforms. """ - return __core.wxPyApp_GetComCtl32Version(*args, **kwargs) + return _core_.PyApp_GetComCtl32Version(*args, **kwargs) GetComCtl32Version = staticmethod(GetComCtl32Version) + def IsDisplayAvailable(*args, **kwargs): + """ + IsDisplayAvailable() -> bool -class wxPyAppPtr(wxPyApp): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPyApp -__core.wxPyApp_swigregister(wxPyAppPtr) + Tests if it is possible to create a GUI in the current environment. + This will mean different things on the different platforms. -def wxPyApp_IsMainLoopRunning(*args, **kwargs): - """ - wxPyApp_IsMainLoopRunning() -> bool + * On X Windows systems this function will return ``False`` if it is + not able to open a connection to the X display, which can happen + if $DISPLAY is not set, or is not set correctly. + + * On Mac OS X a ``False`` return value will mean that wx is not + able to access the window manager, which can happen if logged in + remotely or if running from the normal version of python instead + of the framework version, (i.e., pythonw.) + + * On MS Windows... + + """ + return _core_.PyApp_IsDisplayAvailable(*args, **kwargs) + + IsDisplayAvailable = staticmethod(IsDisplayAvailable) + AppName = property(GetAppName,SetAppName,doc="See `GetAppName` and `SetAppName`") + AssertMode = property(GetAssertMode,SetAssertMode,doc="See `GetAssertMode` and `SetAssertMode`") + ClassName = property(GetClassName,SetClassName,doc="See `GetClassName` and `SetClassName`") + ExitOnFrameDelete = property(GetExitOnFrameDelete,SetExitOnFrameDelete,doc="See `GetExitOnFrameDelete` and `SetExitOnFrameDelete`") + LayoutDirection = property(GetLayoutDirection,doc="See `GetLayoutDirection`") + PrintMode = property(GetPrintMode,SetPrintMode,doc="See `GetPrintMode` and `SetPrintMode`") + TopWindow = property(GetTopWindow,SetTopWindow,doc="See `GetTopWindow` and `SetTopWindow`") + Traits = property(GetTraits,doc="See `GetTraits`") + UseBestVisual = property(GetUseBestVisual,SetUseBestVisual,doc="See `GetUseBestVisual` and `SetUseBestVisual`") + VendorName = property(GetVendorName,SetVendorName,doc="See `GetVendorName` and `SetVendorName`") + Active = property(IsActive) +_core_.PyApp_swigregister(PyApp) + +def PyApp_IsMainLoopRunning(*args): + """ + PyApp_IsMainLoopRunning() -> bool Returns True if we're running the main loop, i.e. if the events can currently be dispatched. """ - return __core.wxPyApp_IsMainLoopRunning(*args, **kwargs) + return _core_.PyApp_IsMainLoopRunning(*args) -def wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs): - """wxPyApp_GetMacSupportPCMenuShortcuts() -> bool""" - return __core.wxPyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs) +def PyApp_GetMacSupportPCMenuShortcuts(*args): + """PyApp_GetMacSupportPCMenuShortcuts() -> bool""" + return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args) -def wxPyApp_GetMacAboutMenuItemId(*args, **kwargs): - """wxPyApp_GetMacAboutMenuItemId() -> long""" - return __core.wxPyApp_GetMacAboutMenuItemId(*args, **kwargs) +def PyApp_GetMacAboutMenuItemId(*args): + """PyApp_GetMacAboutMenuItemId() -> long""" + return _core_.PyApp_GetMacAboutMenuItemId(*args) -def wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs): - """wxPyApp_GetMacPreferencesMenuItemId() -> long""" - return __core.wxPyApp_GetMacPreferencesMenuItemId(*args, **kwargs) +def PyApp_GetMacPreferencesMenuItemId(*args): + """PyApp_GetMacPreferencesMenuItemId() -> long""" + return _core_.PyApp_GetMacPreferencesMenuItemId(*args) -def wxPyApp_GetMacExitMenuItemId(*args, **kwargs): - """wxPyApp_GetMacExitMenuItemId() -> long""" - return __core.wxPyApp_GetMacExitMenuItemId(*args, **kwargs) +def PyApp_GetMacExitMenuItemId(*args): + """PyApp_GetMacExitMenuItemId() -> long""" + return _core_.PyApp_GetMacExitMenuItemId(*args) -def wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs): - """wxPyApp_GetMacHelpMenuTitleName() -> wxString""" - return __core.wxPyApp_GetMacHelpMenuTitleName(*args, **kwargs) +def PyApp_GetMacHelpMenuTitleName(*args): + """PyApp_GetMacHelpMenuTitleName() -> String""" + return _core_.PyApp_GetMacHelpMenuTitleName(*args) -def wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): - """wxPyApp_SetMacSupportPCMenuShortcuts(bool val)""" - return __core.wxPyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) +def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs): + """PyApp_SetMacSupportPCMenuShortcuts(bool val)""" + return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs) -def wxPyApp_SetMacAboutMenuItemId(*args, **kwargs): - """wxPyApp_SetMacAboutMenuItemId(long val)""" - return __core.wxPyApp_SetMacAboutMenuItemId(*args, **kwargs) +def PyApp_SetMacAboutMenuItemId(*args, **kwargs): + """PyApp_SetMacAboutMenuItemId(long val)""" + return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs) -def wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs): - """wxPyApp_SetMacPreferencesMenuItemId(long val)""" - return __core.wxPyApp_SetMacPreferencesMenuItemId(*args, **kwargs) +def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs): + """PyApp_SetMacPreferencesMenuItemId(long val)""" + return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs) -def wxPyApp_SetMacExitMenuItemId(*args, **kwargs): - """wxPyApp_SetMacExitMenuItemId(long val)""" - return __core.wxPyApp_SetMacExitMenuItemId(*args, **kwargs) +def PyApp_SetMacExitMenuItemId(*args, **kwargs): + """PyApp_SetMacExitMenuItemId(long val)""" + return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs) -def wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs): - """wxPyApp_SetMacHelpMenuTitleName(wxString val)""" - return __core.wxPyApp_SetMacHelpMenuTitleName(*args, **kwargs) +def PyApp_SetMacHelpMenuTitleName(*args, **kwargs): + """PyApp_SetMacHelpMenuTitleName(String val)""" + return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs) -def wxPyApp_GetComCtl32Version(*args, **kwargs): - """ - wxPyApp_GetComCtl32Version() -> int +def PyApp_GetComCtl32Version(*args): + """ + PyApp_GetComCtl32Version() -> int Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if it wasn't found at all. Raises an exception on non-Windows platforms. """ - return __core.wxPyApp_GetComCtl32Version(*args, **kwargs) + return _core_.PyApp_GetComCtl32Version(*args) -#--------------------------------------------------------------------------- +def PyApp_IsDisplayAvailable(*args): + """ + PyApp_IsDisplayAvailable() -> bool + Tests if it is possible to create a GUI in the current environment. + This will mean different things on the different platforms. + + * On X Windows systems this function will return ``False`` if it is + not able to open a connection to the X display, which can happen + if $DISPLAY is not set, or is not set correctly. + + * On Mac OS X a ``False`` return value will mean that wx is not + able to access the window manager, which can happen if logged in + remotely or if running from the normal version of python instead + of the framework version, (i.e., pythonw.) + + * On MS Windows... -def wxExit(*args, **kwargs): """ - wxExit() + return _core_.PyApp_IsDisplayAvailable(*args) + +#--------------------------------------------------------------------------- + + +def Exit(*args): + """ + Exit() Force an exit of the application. Convenience for wx.GetApp().Exit() """ - return __core.wxExit(*args, **kwargs) + return _core_.Exit(*args) -def wxYield(*args, **kwargs): - """ - wxYield() -> bool +def Yield(*args): + """ + Yield() -> bool Yield to other apps/messages. Convenience for wx.GetApp().Yield() """ - return __core.wxYield(*args, **kwargs) + return _core_.Yield(*args) -def wxYieldIfNeeded(*args, **kwargs): - """ - wxYieldIfNeeded() -> bool +def YieldIfNeeded(*args): + """ + YieldIfNeeded() -> bool Yield to other apps/messages. Convenience for wx.GetApp().Yield(True) """ - return __core.wxYieldIfNeeded(*args, **kwargs) + return _core_.YieldIfNeeded(*args) -def wxSafeYield(*args, **kwargs): - """ - wxSafeYield(wxWindow win=None, bool onlyIfNeeded=False) -> bool +def SafeYield(*args, **kwargs): + """ + SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool This function is similar to `wx.Yield`, except that it disables the user input to all program windows before calling `wx.Yield` and @@ -5451,45 +7508,45 @@ def wxSafeYield(*args, **kwargs): :Returns: the result of the call to `wx.Yield`. """ - return __core.wxSafeYield(*args, **kwargs) + return _core_.SafeYield(*args, **kwargs) -def wxWakeUpIdle(*args, **kwargs): - """ - wxWakeUpIdle() +def WakeUpIdle(*args): + """ + WakeUpIdle() Cause the message queue to become empty again, so idle events will be sent. """ - return __core.wxWakeUpIdle(*args, **kwargs) + return _core_.WakeUpIdle(*args) -def wxPostEvent(*args, **kwargs): - """ - wxPostEvent(wxEvtHandler dest, wxEvent event) +def PostEvent(*args, **kwargs): + """ + PostEvent(EvtHandler dest, Event event) Send an event to a window or other wx.EvtHandler to be processed later. """ - return __core.wxPostEvent(*args, **kwargs) + return _core_.PostEvent(*args, **kwargs) -def wxApp_CleanUp(*args, **kwargs): - """ - wxApp_CleanUp() +def App_CleanUp(*args): + """ + App_CleanUp() For internal use only, it is used to cleanup after wxWidgets when Python shuts down. """ - return __core.wxApp_CleanUp(*args, **kwargs) + return _core_.App_CleanUp(*args) -def GetApp(*args, **kwargs): - """ - GetApp() -> wxPyApp +def GetApp(*args): + """ + GetApp() -> PyApp Return a reference to the current wx.App object. """ - return __core.GetApp(*args, **kwargs) + return _core_.GetApp(*args) -def wxSetDefaultPyEncoding(*args, **kwargs): - """ +def SetDefaultPyEncoding(*args, **kwargs): + """ SetDefaultPyEncoding(string encoding) Sets the encoding that wxPython will use when it needs to convert a @@ -5501,16 +7558,16 @@ def wxSetDefaultPyEncoding(*args, **kwargs): see http://www.alanwood.net/demos/charsetdiffs.html for differences between the common latin/roman encodings. """ - return __core.wxSetDefaultPyEncoding(*args, **kwargs) + return _core_.SetDefaultPyEncoding(*args, **kwargs) -def wxGetDefaultPyEncoding(*args, **kwargs): - """ +def GetDefaultPyEncoding(*args): + """ GetDefaultPyEncoding() -> string Gets the current encoding that wxPython will use when it needs to convert a Python string or unicode object to or from a wxString. """ - return __core.wxGetDefaultPyEncoding(*args, **kwargs) + return _core_.GetDefaultPyEncoding(*args) #---------------------------------------------------------------------- class PyOnDemandOutputWindow: @@ -5539,7 +7596,7 @@ class PyOnDemandOutputWindow: style=wx.TE_MULTILINE|wx.TE_READONLY) self.text.AppendText(st) self.frame.Show(True) - EVT_CLOSE(self.frame, self.OnCloseWindow) + self.frame.Bind(wx.EVT_CLOSE, self.OnCloseWindow) def OnCloseWindow(self, event): @@ -5581,7 +7638,7 @@ class PyOnDemandOutputWindow: #---------------------------------------------------------------------- _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__') - + class App(wx.PyApp): """ The ``wx.App`` class represents the application and is used to: @@ -5639,22 +7696,26 @@ class App(wx.PyApp): initialization to ensure that the system, toolkit and wxWidgets are fully initialized. """ + wx.PyApp.__init__(self) - if wx.Platform == "__WXMAC__": - try: - import MacOS - if not MacOS.WMAvailable(): - print """\ -This program needs access to the screen. Please run with 'pythonw', -not 'python', and only when you are logged in on the main display of -your Mac.""" - _sys.exit(1) - except SystemExit: - raise - except: - pass + # make sure we can create a GUI + if not self.IsDisplayAvailable(): + + if wx.Platform == "__WXMAC__": + msg = """This program needs access to the screen. +Please run with 'pythonw', not 'python', and only when you are logged +in on the main display of your Mac.""" + + elif wx.Platform == "__WXGTK__": + msg ="Unable to access the X Display, is $DISPLAY set properly?" + + else: + msg = "Unable to create GUI" + # TODO: more description is needed for wxMSW... + raise SystemExit(msg) + # This has to be done before OnInit self.SetUseBestVisual(useBestVisual) @@ -5685,12 +7746,22 @@ your Mac.""" self._BootstrapApp() - def __del__(self): - try: - self.RestoreStdio() # Just in case the MainLoop was overridden - except: - pass + def OnPreInit(self): + """ + Things that must be done after _BootstrapApp has done its + thing, but would be nice if they were already done by the time + that OnInit is called. + """ + wx.StockGDI._initStockObjects() + + + def __del__(self, destroy=wx.PyApp.__del__): + self.RestoreStdio() # Just in case the MainLoop was overridden + destroy(self) + def Destroy(self): + self.this.own(False) + wx.PyApp.Destroy(self) def SetTopWindow(self, frame): """Set the \"main\" top level window""" @@ -5715,7 +7786,10 @@ your Mac.""" def RestoreStdio(self): - _sys.stdout, _sys.stderr = self.saveStdio + try: + _sys.stdout, _sys.stderr = self.saveStdio + except: + pass def SetOutputWindowAttributes(self, title=None, pos=None, size=None): @@ -5814,71 +7888,74 @@ _sys.__wxPythonCleanup = __wxPyCleanup() #--------------------------------------------------------------------------- -class wxEventLoop(object): - """Proxy of C++ wxEventLoop class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxEventLoop""" - newobj = __core.new_wxEventLoop(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxEventLoop): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - +class EventLoop(object): + """Proxy of C++ EventLoop 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) -> EventLoop""" + _core_.EventLoop_swiginit(self,_core_.new_EventLoop(*args, **kwargs)) + __swig_destroy__ = _core_.delete_EventLoop + __del__ = lambda self : None; def Run(*args, **kwargs): """Run(self) -> int""" - return __core.wxEventLoop_Run(*args, **kwargs) + return _core_.EventLoop_Run(*args, **kwargs) def Exit(*args, **kwargs): """Exit(self, int rc=0)""" - return __core.wxEventLoop_Exit(*args, **kwargs) + return _core_.EventLoop_Exit(*args, **kwargs) def Pending(*args, **kwargs): """Pending(self) -> bool""" - return __core.wxEventLoop_Pending(*args, **kwargs) + return _core_.EventLoop_Pending(*args, **kwargs) def Dispatch(*args, **kwargs): """Dispatch(self) -> bool""" - return __core.wxEventLoop_Dispatch(*args, **kwargs) + return _core_.EventLoop_Dispatch(*args, **kwargs) def IsRunning(*args, **kwargs): """IsRunning(self) -> bool""" - return __core.wxEventLoop_IsRunning(*args, **kwargs) + return _core_.EventLoop_IsRunning(*args, **kwargs) def GetActive(*args, **kwargs): - """GetActive() -> wxEventLoop""" - return __core.wxEventLoop_GetActive(*args, **kwargs) + """GetActive() -> EventLoop""" + return _core_.EventLoop_GetActive(*args, **kwargs) GetActive = staticmethod(GetActive) def SetActive(*args, **kwargs): - """SetActive(wxEventLoop loop)""" - return __core.wxEventLoop_SetActive(*args, **kwargs) + """SetActive(EventLoop loop)""" + return _core_.EventLoop_SetActive(*args, **kwargs) SetActive = staticmethod(SetActive) - -class wxEventLoopPtr(wxEventLoop): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxEventLoop -__core.wxEventLoop_swigregister(wxEventLoopPtr) - -def wxEventLoop_GetActive(*args, **kwargs): - """wxEventLoop_GetActive() -> wxEventLoop""" - return __core.wxEventLoop_GetActive(*args, **kwargs) - -def wxEventLoop_SetActive(*args, **kwargs): - """wxEventLoop_SetActive(wxEventLoop loop)""" - return __core.wxEventLoop_SetActive(*args, **kwargs) +_core_.EventLoop_swigregister(EventLoop) + +def EventLoop_GetActive(*args): + """EventLoop_GetActive() -> EventLoop""" + return _core_.EventLoop_GetActive(*args) + +def EventLoop_SetActive(*args, **kwargs): + """EventLoop_SetActive(EventLoop loop)""" + return _core_.EventLoop_SetActive(*args, **kwargs) + +class EventLoopActivator(object): + """Proxy of C++ EventLoopActivator 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, EventLoop evtLoop) -> EventLoopActivator""" + _core_.EventLoopActivator_swiginit(self,_core_.new_EventLoopActivator(*args, **kwargs)) + __swig_destroy__ = _core_.delete_EventLoopActivator + __del__ = lambda self : None; +_core_.EventLoopActivator_swigregister(EventLoopActivator) #--------------------------------------------------------------------------- -class wxAcceleratorEntry(object): +ACCEL_ALT = _core_.ACCEL_ALT +ACCEL_CTRL = _core_.ACCEL_CTRL +ACCEL_SHIFT = _core_.ACCEL_SHIFT +ACCEL_NORMAL = _core_.ACCEL_NORMAL +ACCEL_CMD = _core_.ACCEL_CMD +class AcceleratorEntry(object): """ A class used to define items in an `wx.AcceleratorTable`. wxPython programs can choose to use wx.AcceleratorEntry objects, but using a @@ -5887,24 +7964,17 @@ class wxAcceleratorEntry(object): :see: `wx.AcceleratorTable` """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int flags=0, int keyCode=0, int cmdID=0) -> wxAcceleratorEntry + __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry Construct a wx.AcceleratorEntry. """ - newobj = __core.new_wxAcceleratorEntry(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxAcceleratorEntry): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _core_.AcceleratorEntry_swiginit(self,_core_.new_AcceleratorEntry(*args, **kwargs)) + __swig_destroy__ = _core_.delete_AcceleratorEntry + __del__ = lambda self : None; def Set(*args, **kwargs): """ Set(self, int flags, int keyCode, int cmd) @@ -5912,15 +7982,25 @@ class wxAcceleratorEntry(object): (Re)set the attributes of a wx.AcceleratorEntry. :see `__init__` """ - return __core.wxAcceleratorEntry_Set(*args, **kwargs) + return _core_.AcceleratorEntry_Set(*args, **kwargs) + + def Create(*args, **kwargs): + """ + Create(String str) -> AcceleratorEntry + + Create accelerator corresponding to the specified string, or None if + it coulnd't be parsed. + """ + return _core_.AcceleratorEntry_Create(*args, **kwargs) + Create = staticmethod(Create) def GetFlags(*args, **kwargs): """ GetFlags(self) -> int Get the AcceleratorEntry's flags. """ - return __core.wxAcceleratorEntry_GetFlags(*args, **kwargs) + return _core_.AcceleratorEntry_GetFlags(*args, **kwargs) def GetKeyCode(*args, **kwargs): """ @@ -5928,7 +8008,7 @@ class wxAcceleratorEntry(object): Get the AcceleratorEntry's keycode. """ - return __core.wxAcceleratorEntry_GetKeyCode(*args, **kwargs) + return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs) def GetCommand(*args, **kwargs): """ @@ -5936,26 +8016,55 @@ class wxAcceleratorEntry(object): Get the AcceleratorEntry's command ID. """ - return __core.wxAcceleratorEntry_GetCommand(*args, **kwargs) + return _core_.AcceleratorEntry_GetCommand(*args, **kwargs) + + def IsOk(*args, **kwargs): + """IsOk(self) -> bool""" + return _core_.AcceleratorEntry_IsOk(*args, **kwargs) + + def ToString(*args, **kwargs): + """ + ToString(self) -> String + + Returns a string representation for the this accelerator. The string + is formatted using the - format where maybe a + hyphen-separed list of "shift|alt|ctrl" + + """ + return _core_.AcceleratorEntry_ToString(*args, **kwargs) + + def FromString(*args, **kwargs): + """ + FromString(self, String str) -> bool + + Returns true if the given string correctly initialized this object. + """ + return _core_.AcceleratorEntry_FromString(*args, **kwargs) + + Command = property(GetCommand,doc="See `GetCommand`") + Flags = property(GetFlags,doc="See `GetFlags`") + KeyCode = property(GetKeyCode,doc="See `GetKeyCode`") +_core_.AcceleratorEntry_swigregister(AcceleratorEntry) +def AcceleratorEntry_Create(*args, **kwargs): + """ + AcceleratorEntry_Create(String str) -> AcceleratorEntry -class wxAcceleratorEntryPtr(wxAcceleratorEntry): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxAcceleratorEntry -__core.wxAcceleratorEntry_swigregister(wxAcceleratorEntryPtr) + Create accelerator corresponding to the specified string, or None if + it coulnd't be parsed. + """ + return _core_.AcceleratorEntry_Create(*args, **kwargs) -class wxAcceleratorTable(wxObject): +class AcceleratorTable(Object): """ An accelerator table allows the application to specify a table of keyboard shortcuts for menus or other commands. On Windows, menu or button commands are supported; on GTK, only menu commands are supported. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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__(entries) -> AcceleratorTable @@ -5964,73 +8073,48 @@ class wxAcceleratorTable(wxObject): :see: `wx.AcceleratorEntry` """ - newobj = __core.new_wxAcceleratorTable(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxAcceleratorTable): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - - def Ok(*args, **kwargs): - """Ok(self) -> bool""" - return __core.wxAcceleratorTable_Ok(*args, **kwargs) + _core_.AcceleratorTable_swiginit(self,_core_.new_AcceleratorTable(*args, **kwargs)) + __swig_destroy__ = _core_.delete_AcceleratorTable + __del__ = lambda self : None; + def IsOk(*args, **kwargs): + """IsOk(self) -> bool""" + return _core_.AcceleratorTable_IsOk(*args, **kwargs) + Ok = IsOk +_core_.AcceleratorTable_swigregister(AcceleratorTable) -class wxAcceleratorTablePtr(wxAcceleratorTable): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxAcceleratorTable -__core.wxAcceleratorTable_swigregister(wxAcceleratorTablePtr) - -def wxGetAccelFromString(*args, **kwargs): - """wxGetAccelFromString(wxString label) -> wxAcceleratorEntry""" - return __core.wxGetAccelFromString(*args, **kwargs) +def GetAccelFromString(*args, **kwargs): + """GetAccelFromString(String label) -> AcceleratorEntry""" + return _core_.GetAccelFromString(*args, **kwargs) #--------------------------------------------------------------------------- -class wxVisualAttributes(object): +class VisualAttributes(object): """struct containing all the visual attributes of a control""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> wxVisualAttributes + __init__(self) -> VisualAttributes struct containing all the visual attributes of a control """ - newobj = __core.new_wxVisualAttributes(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=__core.delete_wxVisualAttributes): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - - font = property(__core.wxVisualAttributes_font_get, __core.wxVisualAttributes_font_set) - colFg = property(__core.wxVisualAttributes_colFg_get, __core.wxVisualAttributes_colFg_set) - colBg = property(__core.wxVisualAttributes_colBg_get, __core.wxVisualAttributes_colBg_set) - -class wxVisualAttributesPtr(wxVisualAttributes): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxVisualAttributes -__core.wxVisualAttributes_swigregister(wxVisualAttributesPtr) -wxNullAcceleratorTable = cvar.wxNullAcceleratorTable + _core_.VisualAttributes_swiginit(self,_core_.new_VisualAttributes(*args, **kwargs)) + __swig_destroy__ = _core_.delete_VisualAttributes + __del__ = lambda self : None; + font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set) + colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set) + colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set) +_core_.VisualAttributes_swigregister(VisualAttributes) +NullAcceleratorTable = cvar.NullAcceleratorTable PanelNameStr = cvar.PanelNameStr -wxWINDOW_VARIANT_NORMAL = __core.wxWINDOW_VARIANT_NORMAL -wxWINDOW_VARIANT_SMALL = __core.wxWINDOW_VARIANT_SMALL -wxWINDOW_VARIANT_MINI = __core.wxWINDOW_VARIANT_MINI -wxWINDOW_VARIANT_LARGE = __core.wxWINDOW_VARIANT_LARGE -wxWINDOW_VARIANT_MAX = __core.wxWINDOW_VARIANT_MAX -class wxWindow(wxEvtHandler): +WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL +WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL +WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI +WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE +WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX +class Window(EvtHandler): """ wx.Window is the base class for all windows and represents any visible object on the screen. All controls, top level windows and so on are @@ -6038,31 +8122,26 @@ class wxWindow(wxEvtHandler): appear on screen themselves. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition, - wxSize size=wxDefaultSize, long style=0, - wxString name=PanelNameStr) -> wxWindow + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window Construct and show a generic Window. """ - newobj = __core.new_wxWindow(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.Window_swiginit(self,_core_.new_Window(*args, **kwargs)) self._setOORInfo(self) def Create(*args, **kwargs): """ - Create(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition, - wxSize size=wxDefaultSize, long style=0, - wxString name=PanelNameStr) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool Create the GUI part of the Window for 2-phase creation mode. """ - return __core.wxWindow_Create(*args, **kwargs) + return _core_.Window_Create(*args, **kwargs) def Close(*args, **kwargs): """ @@ -6073,7 +8152,7 @@ class wxWindow(wxEvtHandler): however. If force is False (the default) then the window's close handler will be allowed to veto the destruction of the window. """ - return __core.wxWindow_Close(*args, **kwargs) + return _core_.Window_Close(*args, **kwargs) def Destroy(*args, **kwargs): """ @@ -6088,7 +8167,8 @@ class wxWindow(wxEvtHandler): Returns True if the window has either been successfully deleted, or it has been added to the list of windows pending real deletion. """ - return __core.wxWindow_Destroy(*args, **kwargs) + args[0].this.own(False) + return _core_.Window_Destroy(*args, **kwargs) def DestroyChildren(*args, **kwargs): """ @@ -6097,7 +8177,7 @@ class wxWindow(wxEvtHandler): Destroys all children of a window. Called automatically by the destructor. """ - return __core.wxWindow_DestroyChildren(*args, **kwargs) + return _core_.Window_DestroyChildren(*args, **kwargs) def IsBeingDeleted(*args, **kwargs): """ @@ -6105,35 +8185,19 @@ class wxWindow(wxEvtHandler): Is the window in the process of being deleted? """ - return __core.wxWindow_IsBeingDeleted(*args, **kwargs) - - def SetTitle(*args, **kwargs): - """ - SetTitle(self, wxString title) - - Sets the window's title. Applicable only to frames and dialogs. - """ - return __core.wxWindow_SetTitle(*args, **kwargs) - - def GetTitle(*args, **kwargs): - """ - GetTitle(self) -> wxString - - Gets the window's title. Applicable only to frames and dialogs. - """ - return __core.wxWindow_GetTitle(*args, **kwargs) + return _core_.Window_IsBeingDeleted(*args, **kwargs) def SetLabel(*args, **kwargs): """ - SetLabel(self, wxString label) + SetLabel(self, String label) Set the text which the window shows in its label if applicable. """ - return __core.wxWindow_SetLabel(*args, **kwargs) + return _core_.Window_SetLabel(*args, **kwargs) def GetLabel(*args, **kwargs): """ - GetLabel(self) -> wxString + GetLabel(self) -> String Generic way of getting a label from any window, for identification purposes. The interpretation of this function differs from class to @@ -6142,26 +8206,26 @@ class wxWindow(wxEvtHandler): can be useful for meta-programs such as testing tools or special-needs access programs)which need to identify windows by name. """ - return __core.wxWindow_GetLabel(*args, **kwargs) + return _core_.Window_GetLabel(*args, **kwargs) def SetName(*args, **kwargs): """ - SetName(self, wxString name) + SetName(self, String name) Sets the window's name. The window name is used for ressource setting in X, it is not the same as the window title/label """ - return __core.wxWindow_SetName(*args, **kwargs) + return _core_.Window_SetName(*args, **kwargs) def GetName(*args, **kwargs): """ - GetName(self) -> wxString + GetName(self) -> String Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName. """ - return __core.wxWindow_GetName(*args, **kwargs) + return _core_.Window_GetName(*args, **kwargs) def SetWindowVariant(*args, **kwargs): """ @@ -6170,11 +8234,11 @@ class wxWindow(wxEvtHandler): Sets the variant of the window/font size to use for this window, if the platform supports variants, for example, wxMac. """ - return __core.wxWindow_SetWindowVariant(*args, **kwargs) + return _core_.Window_SetWindowVariant(*args, **kwargs) def GetWindowVariant(*args, **kwargs): """GetWindowVariant(self) -> int""" - return __core.wxWindow_GetWindowVariant(*args, **kwargs) + return _core_.Window_GetWindowVariant(*args, **kwargs) def SetId(*args, **kwargs): """ @@ -6185,7 +8249,7 @@ class wxWindow(wxEvtHandler): will be generated. Normally, the identifier should be provided on creation and should not be modified subsequently. """ - return __core.wxWindow_SetId(*args, **kwargs) + return _core_.Window_SetId(*args, **kwargs) def GetId(*args, **kwargs): """ @@ -6196,7 +8260,7 @@ class wxWindow(wxEvtHandler): -1 is used) then an unique identifier with a negative value will be generated. """ - return __core.wxWindow_GetId(*args, **kwargs) + return _core_.Window_GetId(*args, **kwargs) def NewControlId(*args, **kwargs): """ @@ -6204,40 +8268,66 @@ class wxWindow(wxEvtHandler): Generate a control id for the controls which were not given one. """ - return __core.wxWindow_NewControlId(*args, **kwargs) + return _core_.Window_NewControlId(*args, **kwargs) NewControlId = staticmethod(NewControlId) def NextControlId(*args, **kwargs): """ NextControlId(int winid) -> int - Get the id of the control following the one with the given - autogenerated) id + Get the id of the control following the one with the given + autogenerated) id + """ + return _core_.Window_NextControlId(*args, **kwargs) + + NextControlId = staticmethod(NextControlId) + def PrevControlId(*args, **kwargs): + """ + PrevControlId(int winid) -> int + + Get the id of the control preceding the one with the given + autogenerated) id + """ + return _core_.Window_PrevControlId(*args, **kwargs) + + PrevControlId = staticmethod(PrevControlId) + def GetLayoutDirection(*args, **kwargs): + """ + GetLayoutDirection(self) -> int + + Get the layout direction (LTR or RTL) for this window. Returns + ``wx.Layout_Default`` if layout direction is not supported. + """ + return _core_.Window_GetLayoutDirection(*args, **kwargs) + + def SetLayoutDirection(*args, **kwargs): + """ + SetLayoutDirection(self, int dir) + + Set the layout direction (LTR or RTL) for this window. """ - return __core.wxWindow_NextControlId(*args, **kwargs) + return _core_.Window_SetLayoutDirection(*args, **kwargs) - NextControlId = staticmethod(NextControlId) - def PrevControlId(*args, **kwargs): + def AdjustForLayoutDirection(*args, **kwargs): """ - PrevControlId(int winid) -> int + AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int - Get the id of the control preceding the one with the given - autogenerated) id + Mirror coordinates for RTL layout if this window uses it and if the + mirroring is not done automatically like Win32. """ - return __core.wxWindow_PrevControlId(*args, **kwargs) + return _core_.Window_AdjustForLayoutDirection(*args, **kwargs) - PrevControlId = staticmethod(PrevControlId) def SetSize(*args, **kwargs): """ - SetSize(self, wxSize size) + SetSize(self, Size size) Sets the size of the window in pixels. """ - return __core.wxWindow_SetSize(*args, **kwargs) + return _core_.Window_SetSize(*args, **kwargs) def SetDimensions(*args, **kwargs): """ - SetDimensions(self, int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO) + SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels. The sizeFlags parameter indicates the interpretation of the other params if they are @@ -6254,15 +8344,15 @@ class wxWindow(wxEvtHandler): ======================== ====================================== """ - return __core.wxWindow_SetDimensions(*args, **kwargs) + return _core_.Window_SetDimensions(*args, **kwargs) def SetRect(*args, **kwargs): """ - SetRect(self, wxRect rect, int sizeFlags=wxSIZE_AUTO) + SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO) Sets the position and size of the window in pixels using a wx.Rect. """ - return __core.wxWindow_SetRect(*args, **kwargs) + return _core_.Window_SetRect(*args, **kwargs) def SetSizeWH(*args, **kwargs): """ @@ -6270,55 +8360,56 @@ class wxWindow(wxEvtHandler): Sets the size of the window in pixels. """ - return __core.wxWindow_SetSizeWH(*args, **kwargs) + return _core_.Window_SetSizeWH(*args, **kwargs) def Move(*args, **kwargs): """ - Move(self, wxPoint pt, int flags=wxSIZE_USE_EXISTING) + Move(self, Point pt, int flags=SIZE_USE_EXISTING) Moves the window to the given position. """ - return __core.wxWindow_Move(*args, **kwargs) + return _core_.Window_Move(*args, **kwargs) SetPosition = Move def MoveXY(*args, **kwargs): """ - MoveXY(self, int x, int y, int flags=wxSIZE_USE_EXISTING) + MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING) Moves the window to the given position. """ - return __core.wxWindow_MoveXY(*args, **kwargs) + return _core_.Window_MoveXY(*args, **kwargs) - def SetBestFittingSize(*args, **kwargs): + def SetInitialSize(*args, **kwargs): """ - SetBestFittingSize(self, wxSize size=wxDefaultSize) + SetInitialSize(self, Size size=DefaultSize) A 'Smart' SetSize that will fill in default size components with the window's *best size* values. Also set's the minsize for use with sizers. """ - return __core.wxWindow_SetBestFittingSize(*args, **kwargs) + return _core_.Window_SetInitialSize(*args, **kwargs) + SetBestFittingSize = wx._deprecated(SetInitialSize, 'Use `SetInitialSize`') def Raise(*args, **kwargs): """ Raise(self) - Raises the window to the top of the window hierarchy if it is a - managed window (dialog or frame). + Raises the window to the top of the window hierarchy. In current + version of wxWidgets this works both for manage and child windows. """ - return __core.wxWindow_Raise(*args, **kwargs) + return _core_.Window_Raise(*args, **kwargs) def Lower(*args, **kwargs): """ Lower(self) - Lowers the window to the bottom of the window hierarchy if it is a - managed window (dialog or frame). + Lowers the window to the bottom of the window hierarchy. In current + version of wxWidgets this works both for manage and child windows. """ - return __core.wxWindow_Lower(*args, **kwargs) + return _core_.Window_Lower(*args, **kwargs) def SetClientSize(*args, **kwargs): """ - SetClientSize(self, wxSize size) + SetClientSize(self, Size size) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than @@ -6326,7 +8417,7 @@ class wxWindow(wxEvtHandler): dimensions the border or title bar have when trying to fit the window around panel items, for example. """ - return __core.wxWindow_SetClientSize(*args, **kwargs) + return _core_.Window_SetClientSize(*args, **kwargs) def SetClientSizeWH(*args, **kwargs): """ @@ -6338,11 +8429,11 @@ class wxWindow(wxEvtHandler): dimensions the border or title bar have when trying to fit the window around panel items, for example. """ - return __core.wxWindow_SetClientSizeWH(*args, **kwargs) + return _core_.Window_SetClientSizeWH(*args, **kwargs) def SetClientRect(*args, **kwargs): """ - SetClientRect(self, wxRect rect) + SetClientRect(self, Rect rect) This sets the size of the window client area in pixels. Using this function to size a window tends to be more device-independent than @@ -6350,31 +8441,62 @@ class wxWindow(wxEvtHandler): dimensions the border or title bar have when trying to fit the window around panel items, for example. """ - return __core.wxWindow_SetClientRect(*args, **kwargs) + return _core_.Window_SetClientRect(*args, **kwargs) def GetPosition(*args, **kwargs): """ - GetPosition(self) -> wxPoint + GetPosition(self) -> Point - Get the window's position. + Get the window's position. Notice that the position is in client + coordinates for child windows and screen coordinates for the top level + ones, use `GetScreenPosition` if you need screen coordinates for all + kinds of windows. """ - return __core.wxWindow_GetPosition(*args, **kwargs) + return _core_.Window_GetPosition(*args, **kwargs) def GetPositionTuple(*args, **kwargs): """ GetPositionTuple() -> (x,y) - Get the window's position. + Get the window's position. Notice that the position is in client + coordinates for child windows and screen coordinates for the top level + ones, use `GetScreenPosition` if you need screen coordinates for all + kinds of windows. + """ + return _core_.Window_GetPositionTuple(*args, **kwargs) + + def GetScreenPosition(*args, **kwargs): + """ + GetScreenPosition(self) -> Point + + Get the position of the window in screen coordinantes. + """ + return _core_.Window_GetScreenPosition(*args, **kwargs) + + def GetScreenPositionTuple(*args, **kwargs): + """ + GetScreenPositionTuple() -> (x,y) + + Get the position of the window in screen coordinantes. """ - return __core.wxWindow_GetPositionTuple(*args, **kwargs) + return _core_.Window_GetScreenPositionTuple(*args, **kwargs) + + def GetScreenRect(*args, **kwargs): + """ + GetScreenRect(self) -> Rect + + Returns the size and position of the window in screen coordinantes as + a `wx.Rect` object. + """ + return _core_.Window_GetScreenRect(*args, **kwargs) def GetSize(*args, **kwargs): """ - GetSize(self) -> wxSize + GetSize(self) -> Size Get the window size. """ - return __core.wxWindow_GetSize(*args, **kwargs) + return _core_.Window_GetSize(*args, **kwargs) def GetSizeTuple(*args, **kwargs): """ @@ -6382,25 +8504,25 @@ class wxWindow(wxEvtHandler): Get the window size. """ - return __core.wxWindow_GetSizeTuple(*args, **kwargs) + return _core_.Window_GetSizeTuple(*args, **kwargs) def GetRect(*args, **kwargs): """ - GetRect(self) -> wxRect + GetRect(self) -> Rect - Returns the size and position of the window as a wx.Rect object. + Returns the size and position of the window as a `wx.Rect` object. """ - return __core.wxWindow_GetRect(*args, **kwargs) + return _core_.Window_GetRect(*args, **kwargs) def GetClientSize(*args, **kwargs): """ - GetClientSize(self) -> wxSize + GetClientSize(self) -> Size This gets the size of the window's 'client area' in pixels. The client area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc. """ - return __core.wxWindow_GetClientSize(*args, **kwargs) + return _core_.Window_GetClientSize(*args, **kwargs) def GetClientSizeTuple(*args, **kwargs): """ @@ -6410,29 +8532,29 @@ class wxWindow(wxEvtHandler): area is the area which may be drawn on by the programmer, excluding title bar, border, scrollbars, etc. """ - return __core.wxWindow_GetClientSizeTuple(*args, **kwargs) + return _core_.Window_GetClientSizeTuple(*args, **kwargs) def GetClientAreaOrigin(*args, **kwargs): """ - GetClientAreaOrigin(self) -> wxPoint + GetClientAreaOrigin(self) -> Point Get the origin of the client area of the window relative to the window's top left corner (the client area may be shifted because of the borders, scrollbars, other decorations...) """ - return __core.wxWindow_GetClientAreaOrigin(*args, **kwargs) + return _core_.Window_GetClientAreaOrigin(*args, **kwargs) def GetClientRect(*args, **kwargs): """ - GetClientRect(self) -> wxRect + GetClientRect(self) -> Rect Get the client area position and size as a `wx.Rect` object. """ - return __core.wxWindow_GetClientRect(*args, **kwargs) + return _core_.Window_GetClientRect(*args, **kwargs) def GetBestSize(*args, **kwargs): """ - GetBestSize(self) -> wxSize + GetBestSize(self) -> Size This function returns the best acceptable minimal size for the window, if applicable. For example, for a static text control, it will @@ -6441,7 +8563,7 @@ class wxWindow(wxEvtHandler): this function will be the same as the size the window would have had after calling Fit. """ - return __core.wxWindow_GetBestSize(*args, **kwargs) + return _core_.Window_GetBestSize(*args, **kwargs) def GetBestSizeTuple(*args, **kwargs): """ @@ -6454,7 +8576,7 @@ class wxWindow(wxEvtHandler): this function will be the same as the size the window would have had after calling Fit. """ - return __core.wxWindow_GetBestSizeTuple(*args, **kwargs) + return _core_.Window_GetBestSizeTuple(*args, **kwargs) def InvalidateBestSize(*args, **kwargs): """ @@ -6463,35 +8585,38 @@ class wxWindow(wxEvtHandler): Reset the cached best size value so it will be recalculated the next time it is needed. """ - return __core.wxWindow_InvalidateBestSize(*args, **kwargs) + return _core_.Window_InvalidateBestSize(*args, **kwargs) + + def CacheBestSize(*args, **kwargs): + """ + CacheBestSize(self, Size size) + + Cache the best size so it doesn't need to be calculated again, (at least until + some properties of the window change.) + """ + return _core_.Window_CacheBestSize(*args, **kwargs) - def GetBestFittingSize(*args, **kwargs): + def GetEffectiveMinSize(*args, **kwargs): """ - GetBestFittingSize(self) -> wxSize + GetEffectiveMinSize(self) -> Size This function will merge the window's best size into the window's minimum size, giving priority to the min size components, and returns the results. """ - return __core.wxWindow_GetBestFittingSize(*args, **kwargs) + return _core_.Window_GetEffectiveMinSize(*args, **kwargs) - def GetAdjustedBestSize(*args, **kwargs): - """ - GetAdjustedBestSize(self) -> wxSize - - This method is similar to GetBestSize, except in one - thing. GetBestSize should return the minimum untruncated size of the - window, while this method will return the largest of BestSize and any - user specified minimum size. ie. it is the minimum size the window - should currently be drawn at, not the minimal size it can possibly - tolerate. - """ - return __core.wxWindow_GetAdjustedBestSize(*args, **kwargs) + GetBestFittingSize = wx._deprecated(GetEffectiveMinSize, 'Use `GetEffectiveMinSize` instead.') + def GetAdjustedBestSize(self): + s = self.GetBestSize() + return wx.Size(max(s.width, self.GetMinWidth()), + max(s.height, self.GetMinHeight())) + GetAdjustedBestSize = wx._deprecated(GetAdjustedBestSize, 'Use `GetEffectiveMinSize` instead.') def Center(*args, **kwargs): """ - Center(self, int direction=wxBOTH) + Center(self, int direction=BOTH) Centers the window. The parameter specifies the direction for cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may @@ -6500,25 +8625,16 @@ class wxWindow(wxEvtHandler): top-level window and has no parent then it will always be centered relative to the screen. """ - return __core.wxWindow_Center(*args, **kwargs) + return _core_.Window_Center(*args, **kwargs) Centre = Center - def CenterOnScreen(*args, **kwargs): - """ - CenterOnScreen(self, int dir=wxBOTH) - - Center on screen (only works for top level windows) - """ - return __core.wxWindow_CenterOnScreen(*args, **kwargs) - - CentreOnScreen = CenterOnScreen def CenterOnParent(*args, **kwargs): """ - CenterOnParent(self, int dir=wxBOTH) + CenterOnParent(self, int dir=BOTH) Center with respect to the the parent window """ - return __core.wxWindow_CenterOnParent(*args, **kwargs) + return _core_.Window_CenterOnParent(*args, **kwargs) CentreOnParent = CenterOnParent def Fit(*args, **kwargs): @@ -6533,7 +8649,7 @@ class wxWindow(wxEvtHandler): its calculations) to call window.SetClientSize(child.GetSize()) instead of calling Fit. """ - return __core.wxWindow_Fit(*args, **kwargs) + return _core_.Window_Fit(*args, **kwargs) def FitInside(*args, **kwargs): """ @@ -6545,7 +8661,7 @@ class wxWindow(wxEvtHandler): windows without an interior sizer. This function similarly won't do anything if there are no subwindows. """ - return __core.wxWindow_FitInside(*args, **kwargs) + return _core_.Window_FitInside(*args, **kwargs) def SetSizeHints(*args, **kwargs): """ @@ -6561,11 +8677,11 @@ class wxWindow(wxEvtHandler): The resizing increments are only significant under Motif or Xt. """ - return __core.wxWindow_SetSizeHints(*args, **kwargs) + return _core_.Window_SetSizeHints(*args, **kwargs) def SetSizeHintsSz(*args, **kwargs): """ - SetSizeHintsSz(self, wxSize minSize, wxSize maxSize=wxDefaultSize, wxSize incSize=wxDefaultSize) + SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the @@ -6576,7 +8692,7 @@ class wxWindow(wxEvtHandler): The resizing increments are only significant under Motif or Xt. """ - return __core.wxWindow_SetSizeHintsSz(*args, **kwargs) + return _core_.Window_SetSizeHintsSz(*args, **kwargs) def SetVirtualSizeHints(*args, **kwargs): """ @@ -6587,70 +8703,70 @@ class wxWindow(wxEvtHandler): used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. """ - return __core.wxWindow_SetVirtualSizeHints(*args, **kwargs) + return _core_.Window_SetVirtualSizeHints(*args, **kwargs) def SetVirtualSizeHintsSz(*args, **kwargs): """ - SetVirtualSizeHintsSz(self, wxSize minSize, wxSize maxSize=wxDefaultSize) + SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. """ - return __core.wxWindow_SetVirtualSizeHintsSz(*args, **kwargs) + return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) def GetMaxSize(*args, **kwargs): - """GetMaxSize(self) -> wxSize""" - return __core.wxWindow_GetMaxSize(*args, **kwargs) + """GetMaxSize(self) -> Size""" + return _core_.Window_GetMaxSize(*args, **kwargs) def GetMinSize(*args, **kwargs): - """GetMinSize(self) -> wxSize""" - return __core.wxWindow_GetMinSize(*args, **kwargs) + """GetMinSize(self) -> Size""" + return _core_.Window_GetMinSize(*args, **kwargs) def SetMinSize(*args, **kwargs): """ - SetMinSize(self, wxSize minSize) + SetMinSize(self, Size minSize) A more convenient method than `SetSizeHints` for setting just the min size. """ - return __core.wxWindow_SetMinSize(*args, **kwargs) + return _core_.Window_SetMinSize(*args, **kwargs) def SetMaxSize(*args, **kwargs): """ - SetMaxSize(self, wxSize maxSize) + SetMaxSize(self, Size maxSize) A more convenient method than `SetSizeHints` for setting just the max size. """ - return __core.wxWindow_SetMaxSize(*args, **kwargs) + return _core_.Window_SetMaxSize(*args, **kwargs) def GetMinWidth(*args, **kwargs): """GetMinWidth(self) -> int""" - return __core.wxWindow_GetMinWidth(*args, **kwargs) + return _core_.Window_GetMinWidth(*args, **kwargs) def GetMinHeight(*args, **kwargs): """GetMinHeight(self) -> int""" - return __core.wxWindow_GetMinHeight(*args, **kwargs) + return _core_.Window_GetMinHeight(*args, **kwargs) def GetMaxWidth(*args, **kwargs): """GetMaxWidth(self) -> int""" - return __core.wxWindow_GetMaxWidth(*args, **kwargs) + return _core_.Window_GetMaxWidth(*args, **kwargs) def GetMaxHeight(*args, **kwargs): """GetMaxHeight(self) -> int""" - return __core.wxWindow_GetMaxHeight(*args, **kwargs) + return _core_.Window_GetMaxHeight(*args, **kwargs) def SetVirtualSize(*args, **kwargs): """ - SetVirtualSize(self, wxSize size) + SetVirtualSize(self, Size size) Set the the virtual size of a window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. """ - return __core.wxWindow_SetVirtualSize(*args, **kwargs) + return _core_.Window_SetVirtualSize(*args, **kwargs) def SetVirtualSizeWH(*args, **kwargs): """ @@ -6660,17 +8776,17 @@ class wxWindow(wxEvtHandler): is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. """ - return __core.wxWindow_SetVirtualSizeWH(*args, **kwargs) + return _core_.Window_SetVirtualSizeWH(*args, **kwargs) def GetVirtualSize(*args, **kwargs): """ - GetVirtualSize(self) -> wxSize + GetVirtualSize(self) -> Size Get the the virtual size of the window in pixels. For most windows this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. """ - return __core.wxWindow_GetVirtualSize(*args, **kwargs) + return _core_.Window_GetVirtualSize(*args, **kwargs) def GetVirtualSizeTuple(*args, **kwargs): """ @@ -6680,16 +8796,16 @@ class wxWindow(wxEvtHandler): this is just the client area of the window, but for some like scrolled windows it is more or less independent of the screen window size. """ - return __core.wxWindow_GetVirtualSizeTuple(*args, **kwargs) + return _core_.Window_GetVirtualSizeTuple(*args, **kwargs) def GetBestVirtualSize(*args, **kwargs): """ - GetBestVirtualSize(self) -> wxSize + GetBestVirtualSize(self) -> Size Return the largest of ClientSize and BestSize (as determined by a sizer, interior children, or other means) """ - return __core.wxWindow_GetBestVirtualSize(*args, **kwargs) + return _core_.Window_GetBestVirtualSize(*args, **kwargs) def Show(*args, **kwargs): """ @@ -6701,7 +8817,7 @@ class wxWindow(wxEvtHandler): the window has been shown or hidden or False if nothing was done because it already was in the requested state. """ - return __core.wxWindow_Show(*args, **kwargs) + return _core_.Window_Show(*args, **kwargs) def Hide(*args, **kwargs): """ @@ -6709,7 +8825,7 @@ class wxWindow(wxEvtHandler): Equivalent to calling Show(False). """ - return __core.wxWindow_Hide(*args, **kwargs) + return _core_.Window_Hide(*args, **kwargs) def Enable(*args, **kwargs): """ @@ -6721,7 +8837,7 @@ class wxWindow(wxEvtHandler): has been enabled or disabled, false if nothing was done, i.e. if the window had already been in the specified state. """ - return __core.wxWindow_Enable(*args, **kwargs) + return _core_.Window_Enable(*args, **kwargs) def Disable(*args, **kwargs): """ @@ -6729,7 +8845,7 @@ class wxWindow(wxEvtHandler): Disables the window, same as Enable(false). """ - return __core.wxWindow_Disable(*args, **kwargs) + return _core_.Window_Disable(*args, **kwargs) def IsShown(*args, **kwargs): """ @@ -6737,7 +8853,7 @@ class wxWindow(wxEvtHandler): Returns true if the window is shown, false if it has been hidden. """ - return __core.wxWindow_IsShown(*args, **kwargs) + return _core_.Window_IsShown(*args, **kwargs) def IsEnabled(*args, **kwargs): """ @@ -6745,7 +8861,17 @@ class wxWindow(wxEvtHandler): Returns true if the window is enabled for input, false otherwise. """ - return __core.wxWindow_IsEnabled(*args, **kwargs) + return _core_.Window_IsEnabled(*args, **kwargs) + + def IsShownOnScreen(*args, **kwargs): + """ + IsShownOnScreen(self) -> bool + + Returns ``True`` if the window is physically visible on the screen, + i.e. it is shown and all its parents up to the toplevel window are + shown as well. + """ + return _core_.Window_IsShownOnScreen(*args, **kwargs) def SetWindowStyleFlag(*args, **kwargs): """ @@ -6756,7 +8882,7 @@ class wxWindow(wxEvtHandler): called after changing the others for the change to take place immediately. """ - return __core.wxWindow_SetWindowStyleFlag(*args, **kwargs) + return _core_.Window_SetWindowStyleFlag(*args, **kwargs) def GetWindowStyleFlag(*args, **kwargs): """ @@ -6765,7 +8891,7 @@ class wxWindow(wxEvtHandler): Gets the window style that was passed to the constructor or Create method. """ - return __core.wxWindow_GetWindowStyleFlag(*args, **kwargs) + return _core_.Window_GetWindowStyleFlag(*args, **kwargs) SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag def HasFlag(*args, **kwargs): @@ -6774,7 +8900,7 @@ class wxWindow(wxEvtHandler): Test if the given style is set for this window. """ - return __core.wxWindow_HasFlag(*args, **kwargs) + return _core_.Window_HasFlag(*args, **kwargs) def IsRetained(*args, **kwargs): """ @@ -6783,7 +8909,7 @@ class wxWindow(wxEvtHandler): Returns true if the window is retained, false otherwise. Retained windows are only available on X platforms. """ - return __core.wxWindow_IsRetained(*args, **kwargs) + return _core_.Window_IsRetained(*args, **kwargs) def SetExtraStyle(*args, **kwargs): """ @@ -6793,7 +8919,7 @@ class wxWindow(wxEvtHandler): often used style bits which can't be set with the constructor or with SetWindowStyleFlag() """ - return __core.wxWindow_SetExtraStyle(*args, **kwargs) + return _core_.Window_SetExtraStyle(*args, **kwargs) def GetExtraStyle(*args, **kwargs): """ @@ -6801,7 +8927,7 @@ class wxWindow(wxEvtHandler): Returns the extra style bits for the window. """ - return __core.wxWindow_GetExtraStyle(*args, **kwargs) + return _core_.Window_GetExtraStyle(*args, **kwargs) def MakeModal(*args, **kwargs): """ @@ -6811,7 +8937,7 @@ class wxWindow(wxEvtHandler): only interact with this window. Passing False will reverse this effect. """ - return __core.wxWindow_MakeModal(*args, **kwargs) + return _core_.Window_MakeModal(*args, **kwargs) def SetThemeEnabled(*args, **kwargs): """ @@ -6827,7 +8953,7 @@ class wxWindow(wxEvtHandler): Dialogs, notebook pages and the status bar have this flag set to true by default so that the default look and feel is simulated best. """ - return __core.wxWindow_SetThemeEnabled(*args, **kwargs) + return _core_.Window_SetThemeEnabled(*args, **kwargs) def GetThemeEnabled(*args, **kwargs): """ @@ -6835,7 +8961,7 @@ class wxWindow(wxEvtHandler): Return the themeEnabled flag. """ - return __core.wxWindow_GetThemeEnabled(*args, **kwargs) + return _core_.Window_GetThemeEnabled(*args, **kwargs) def SetFocus(*args, **kwargs): """ @@ -6843,7 +8969,7 @@ class wxWindow(wxEvtHandler): Set's the focus to this window, allowing it to receive keyboard input. """ - return __core.wxWindow_SetFocus(*args, **kwargs) + return _core_.Window_SetFocus(*args, **kwargs) def SetFocusFromKbd(*args, **kwargs): """ @@ -6852,16 +8978,16 @@ class wxWindow(wxEvtHandler): Set focus to this window as the result of a keyboard action. Normally only called internally. """ - return __core.wxWindow_SetFocusFromKbd(*args, **kwargs) + return _core_.Window_SetFocusFromKbd(*args, **kwargs) def FindFocus(*args, **kwargs): """ - FindFocus() -> wxWindow + FindFocus() -> Window Returns the window or control that currently has the keyboard focus, or None. """ - return __core.wxWindow_FindFocus(*args, **kwargs) + return _core_.Window_FindFocus(*args, **kwargs) FindFocus = staticmethod(FindFocus) def AcceptsFocus(*args, **kwargs): @@ -6870,7 +8996,7 @@ class wxWindow(wxEvtHandler): Can this window have focus? """ - return __core.wxWindow_AcceptsFocus(*args, **kwargs) + return _core_.Window_AcceptsFocus(*args, **kwargs) def AcceptsFocusFromKeyboard(*args, **kwargs): """ @@ -6880,32 +9006,7 @@ class wxWindow(wxEvtHandler): only way to give it focus (provided it accepts it at all) is to click it. """ - return __core.wxWindow_AcceptsFocusFromKeyboard(*args, **kwargs) - - def GetDefaultItem(*args, **kwargs): - """ - GetDefaultItem(self) -> wxWindow - - Get the default child of this parent, i.e. the one which is activated - by pressing such as the OK button on a wx.Dialog. - """ - return __core.wxWindow_GetDefaultItem(*args, **kwargs) - - def SetDefaultItem(*args, **kwargs): - """ - SetDefaultItem(self, wxWindow child) -> wxWindow - - Set this child as default, return the old default. - """ - return __core.wxWindow_SetDefaultItem(*args, **kwargs) - - def SetTmpDefaultItem(*args, **kwargs): - """ - SetTmpDefaultItem(self, wxWindow win) - - Set this child as temporary default - """ - return __core.wxWindow_SetTmpDefaultItem(*args, **kwargs) + return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs) def Navigate(*args, **kwargs): """ @@ -6914,11 +9015,11 @@ class wxWindow(wxEvtHandler): Does keyboard navigation from this window to another, by sending a `wx.NavigationKeyEvent`. """ - return __core.wxWindow_Navigate(*args, **kwargs) + return _core_.Window_Navigate(*args, **kwargs) def MoveAfterInTabOrder(*args, **kwargs): """ - MoveAfterInTabOrder(self, wxWindow win) + MoveAfterInTabOrder(self, Window win) Moves this window in the tab navigation order after the specified sibling window. This means that when the user presses the TAB key on @@ -6929,16 +9030,16 @@ class wxWindow(wxEvtHandler): windows. """ - return __core.wxWindow_MoveAfterInTabOrder(*args, **kwargs) + return _core_.Window_MoveAfterInTabOrder(*args, **kwargs) def MoveBeforeInTabOrder(*args, **kwargs): """ - MoveBeforeInTabOrder(self, wxWindow win) + MoveBeforeInTabOrder(self, Window win) Same as `MoveAfterInTabOrder` except that it inserts this window just before win instead of putting it right after it. """ - return __core.wxWindow_MoveBeforeInTabOrder(*args, **kwargs) + return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs) def GetChildren(*args, **kwargs): """ @@ -6949,24 +9050,24 @@ class wxWindow(wxEvtHandler): value of this function is only valid as long as the window's children do not change. """ - return __core.wxWindow_GetChildren(*args, **kwargs) + return _core_.Window_GetChildren(*args, **kwargs) def GetParent(*args, **kwargs): """ - GetParent(self) -> wxWindow + GetParent(self) -> Window Returns the parent window of this window, or None if there isn't one. """ - return __core.wxWindow_GetParent(*args, **kwargs) + return _core_.Window_GetParent(*args, **kwargs) def GetGrandParent(*args, **kwargs): """ - GetGrandParent(self) -> wxWindow + GetGrandParent(self) -> Window Returns the parent of the parent of this window, or None if there isn't one. """ - return __core.wxWindow_GetGrandParent(*args, **kwargs) + return _core_.Window_GetGrandParent(*args, **kwargs) def IsTopLevel(*args, **kwargs): """ @@ -6976,11 +9077,11 @@ class wxWindow(wxEvtHandler): frames and dialogs are always considered to be top-level windows (even if they have a parent window). """ - return __core.wxWindow_IsTopLevel(*args, **kwargs) + return _core_.Window_IsTopLevel(*args, **kwargs) def Reparent(*args, **kwargs): """ - Reparent(self, wxWindow newParent) -> bool + Reparent(self, Window newParent) -> bool Reparents the window, i.e the window will be removed from its current parent window (e.g. a non-standard toolbar in a wxFrame) and then @@ -6988,126 +9089,140 @@ class wxWindow(wxEvtHandler): if the parent was changed, False otherwise (error or newParent == oldParent) """ - return __core.wxWindow_Reparent(*args, **kwargs) + return _core_.Window_Reparent(*args, **kwargs) def AddChild(*args, **kwargs): """ - AddChild(self, wxWindow child) + AddChild(self, Window child) Adds a child window. This is called automatically by window creation functions so should not be required by the application programmer. """ - return __core.wxWindow_AddChild(*args, **kwargs) + return _core_.Window_AddChild(*args, **kwargs) def RemoveChild(*args, **kwargs): """ - RemoveChild(self, wxWindow child) + RemoveChild(self, Window child) Removes a child window. This is called automatically by window deletion functions so should not be required by the application programmer. """ - return __core.wxWindow_RemoveChild(*args, **kwargs) + return _core_.Window_RemoveChild(*args, **kwargs) + + def SetDoubleBuffered(*args, **kwargs): + """ + SetDoubleBuffered(self, bool on) + + Currently wxGTK2 only. + """ + return _core_.Window_SetDoubleBuffered(*args, **kwargs) def FindWindowById(*args, **kwargs): """ - FindWindowById(self, long winid) -> wxWindow + FindWindowById(self, long winid) -> Window Find a chld of this window by window ID """ - return __core.wxWindow_FindWindowById(*args, **kwargs) + return _core_.Window_FindWindowById(*args, **kwargs) def FindWindowByName(*args, **kwargs): """ - FindWindowByName(self, wxString name) -> wxWindow + FindWindowByName(self, String name) -> Window Find a child of this window by name """ - return __core.wxWindow_FindWindowByName(*args, **kwargs) + return _core_.Window_FindWindowByName(*args, **kwargs) def GetEventHandler(*args, **kwargs): """ - GetEventHandler(self) -> wxEvtHandler + GetEventHandler(self) -> EvtHandler Returns the event handler for this window. By default, the window is its own event handler. """ - return __core.wxWindow_GetEventHandler(*args, **kwargs) + return _core_.Window_GetEventHandler(*args, **kwargs) def SetEventHandler(*args, **kwargs): """ - SetEventHandler(self, wxEvtHandler handler) + SetEventHandler(self, EvtHandler handler) Sets the event handler for this window. An event handler is an object - that is capable of processing the events sent to a window. By default, - the window is its own event handler, but an application may wish to - substitute another, for example to allow central implementation of - event-handling for a variety of different window classes. + that is capable of processing the events sent to a window. (In other + words, is able to dispatch the events to handler function.) By + default, the window is its own event handler, but an application may + wish to substitute another, for example to allow central + implementation of event-handling for a variety of different window + classes. It is usually better to use `wx.Window.PushEventHandler` since this sets up a chain of event handlers, where an event not handled by one event - handler is handed to the next one in the chain. + handler is handed off to the next one in the chain. """ - return __core.wxWindow_SetEventHandler(*args, **kwargs) + return _core_.Window_SetEventHandler(*args, **kwargs) def PushEventHandler(*args, **kwargs): """ - PushEventHandler(self, wxEvtHandler handler) + PushEventHandler(self, EvtHandler handler) Pushes this event handler onto the event handler stack for the window. An event handler is an object that is capable of processing the events - sent to a window. By default, the window is its own event handler, but - an application may wish to substitute another, for example to allow - central implementation of event-handling for a variety of different - window classes. + sent to a window. (In other words, is able to dispatch the events to + handler function.) By default, the window is its own event handler, + but an application may wish to substitute another, for example to + allow central implementation of event-handling for a variety of + different window classes. wx.Window.PushEventHandler allows an application to set up a chain of event handlers, where an event not handled by one event handler is - handed to the next one in the chain. Use `wx.Window.PopEventHandler` to - remove the event handler. + handed to the next one in the chain. Use `wx.Window.PopEventHandler` + to remove the event handler. Ownership of the handler is *not* given + to the window, so you should be sure to pop the handler before the + window is destroyed and either let PopEventHandler destroy it, or call + its Destroy method yourself. """ - return __core.wxWindow_PushEventHandler(*args, **kwargs) + return _core_.Window_PushEventHandler(*args, **kwargs) def PopEventHandler(*args, **kwargs): """ - PopEventHandler(self, bool deleteHandler=False) -> wxEvtHandler + PopEventHandler(self, bool deleteHandler=False) -> EvtHandler Removes and returns the top-most event handler on the event handler stack. If deleteHandler is True then the wx.EvtHandler object will be - destroyed after it is popped. + destroyed after it is popped, and ``None`` will be returned instead. """ - return __core.wxWindow_PopEventHandler(*args, **kwargs) + return _core_.Window_PopEventHandler(*args, **kwargs) def RemoveEventHandler(*args, **kwargs): """ - RemoveEventHandler(self, wxEvtHandler handler) -> bool + RemoveEventHandler(self, EvtHandler handler) -> bool Find the given handler in the event handler chain and remove (but not - delete) it from the event handler chain, return True if it was found + delete) it from the event handler chain, returns True if it was found and False otherwise (this also results in an assert failure so this function should only be called when the handler is supposed to be there.) """ - return __core.wxWindow_RemoveEventHandler(*args, **kwargs) + return _core_.Window_RemoveEventHandler(*args, **kwargs) def SetValidator(*args, **kwargs): """ - SetValidator(self, wxValidator validator) + SetValidator(self, Validator validator) Deletes the current validator (if any) and sets the window validator, having called wx.Validator.Clone to create a new validator of this type. """ - return __core.wxWindow_SetValidator(*args, **kwargs) + return _core_.Window_SetValidator(*args, **kwargs) def GetValidator(*args, **kwargs): """ - GetValidator(self) -> wxValidator + GetValidator(self) -> Validator Returns a pointer to the current validator for the window, or None if there is none. """ - return __core.wxWindow_GetValidator(*args, **kwargs) + return _core_.Window_GetValidator(*args, **kwargs) def Validate(*args, **kwargs): """ @@ -7118,7 +9233,7 @@ class wxWindow(wxEvtHandler): style flag set, the method will also call Validate() of all child windows. Returns false if any of the validations failed. """ - return __core.wxWindow_Validate(*args, **kwargs) + return _core_.Window_Validate(*args, **kwargs) def TransferDataToWindow(*args, **kwargs): """ @@ -7129,7 +9244,7 @@ class wxWindow(wxEvtHandler): style flag set, the method will also call TransferDataToWindow() of all child windows. """ - return __core.wxWindow_TransferDataToWindow(*args, **kwargs) + return _core_.Window_TransferDataToWindow(*args, **kwargs) def TransferDataFromWindow(*args, **kwargs): """ @@ -7140,7 +9255,7 @@ class wxWindow(wxEvtHandler): wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will also call TransferDataFromWindow() of all child windows. """ - return __core.wxWindow_TransferDataFromWindow(*args, **kwargs) + return _core_.Window_TransferDataFromWindow(*args, **kwargs) def InitDialog(*args, **kwargs): """ @@ -7149,23 +9264,23 @@ class wxWindow(wxEvtHandler): Sends an EVT_INIT_DIALOG event, whose handler usually transfers data to the dialog via validators. """ - return __core.wxWindow_InitDialog(*args, **kwargs) + return _core_.Window_InitDialog(*args, **kwargs) def SetAcceleratorTable(*args, **kwargs): """ - SetAcceleratorTable(self, wxAcceleratorTable accel) + SetAcceleratorTable(self, AcceleratorTable accel) Sets the accelerator table for this window. """ - return __core.wxWindow_SetAcceleratorTable(*args, **kwargs) + return _core_.Window_SetAcceleratorTable(*args, **kwargs) def GetAcceleratorTable(*args, **kwargs): """ - GetAcceleratorTable(self) -> wxAcceleratorTable + GetAcceleratorTable(self) -> AcceleratorTable Gets the accelerator table for this window. """ - return __core.wxWindow_GetAcceleratorTable(*args, **kwargs) + return _core_.Window_GetAcceleratorTable(*args, **kwargs) def RegisterHotKey(*args, **kwargs): """ @@ -7179,7 +9294,7 @@ class wxWindow(wxEvtHandler): use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the hotkey was registered successfully. """ - return __core.wxWindow_RegisterHotKey(*args, **kwargs) + return _core_.Window_RegisterHotKey(*args, **kwargs) def UnregisterHotKey(*args, **kwargs): """ @@ -7187,11 +9302,11 @@ class wxWindow(wxEvtHandler): Unregisters a system wide hotkey. """ - return __core.wxWindow_UnregisterHotKey(*args, **kwargs) + return _core_.Window_UnregisterHotKey(*args, **kwargs) def ConvertDialogPointToPixels(*args, **kwargs): """ - ConvertDialogPointToPixels(self, wxPoint pt) -> wxPoint + ConvertDialogPointToPixels(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font @@ -7200,11 +9315,11 @@ class wxWindow(wxEvtHandler): the dialog units are multiplied by the average character height and then divided by 8. """ - return __core.wxWindow_ConvertDialogPointToPixels(*args, **kwargs) + return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs) def ConvertDialogSizeToPixels(*args, **kwargs): """ - ConvertDialogSizeToPixels(self, wxSize sz) -> wxSize + ConvertDialogSizeToPixels(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font @@ -7213,11 +9328,11 @@ class wxWindow(wxEvtHandler): the dialog units are multiplied by the average character height and then divided by 8. """ - return __core.wxWindow_ConvertDialogSizeToPixels(*args, **kwargs) + return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs) def DLG_PNT(*args, **kwargs): """ - DLG_PNT(self, wxPoint pt) -> wxPoint + DLG_PNT(self, Point pt) -> Point Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font @@ -7226,11 +9341,11 @@ class wxWindow(wxEvtHandler): the dialog units are multiplied by the average character height and then divided by 8. """ - return __core.wxWindow_DLG_PNT(*args, **kwargs) + return _core_.Window_DLG_PNT(*args, **kwargs) def DLG_SZE(*args, **kwargs): """ - DLG_SZE(self, wxSize sz) -> wxSize + DLG_SZE(self, Size sz) -> Size Converts a point or size from dialog units to pixels. Dialog units are used for maintaining a dialog's proportions even if the font @@ -7239,15 +9354,15 @@ class wxWindow(wxEvtHandler): the dialog units are multiplied by the average character height and then divided by 8. """ - return __core.wxWindow_DLG_SZE(*args, **kwargs) + return _core_.Window_DLG_SZE(*args, **kwargs) def ConvertPixelPointToDialog(*args, **kwargs): - """ConvertPixelPointToDialog(self, wxPoint pt) -> wxPoint""" - return __core.wxWindow_ConvertPixelPointToDialog(*args, **kwargs) + """ConvertPixelPointToDialog(self, Point pt) -> Point""" + return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs) def ConvertPixelSizeToDialog(*args, **kwargs): - """ConvertPixelSizeToDialog(self, wxSize sz) -> wxSize""" - return __core.wxWindow_ConvertPixelSizeToDialog(*args, **kwargs) + """ConvertPixelSizeToDialog(self, Size sz) -> Size""" + return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs) def WarpPointer(*args, **kwargs): """ @@ -7258,7 +9373,7 @@ class wxWindow(wxEvtHandler): NOTE: This function is not supported under Mac because Apple Human Interface Guidelines forbid moving the mouse cursor programmatically. """ - return __core.wxWindow_WarpPointer(*args, **kwargs) + return _core_.Window_WarpPointer(*args, **kwargs) def CaptureMouse(*args, **kwargs): """ @@ -7271,9 +9386,15 @@ class wxWindow(wxEvtHandler): mouse and when the mouse is released the capture returns to the window which had had captured it previously and it is only really released if there were no previous window. In particular, this means that you must - release the mouse as many times as you capture it. + release the mouse as many times as you capture it, unless the window + receives the `wx.MouseCaptureLostEvent` event. + + Any application which captures the mouse in the beginning of some + operation *must* handle `wx.MouseCaptureLostEvent` and cancel this + operation when it receives the event. The event handler must not + recapture mouse. """ - return __core.wxWindow_CaptureMouse(*args, **kwargs) + return _core_.Window_CaptureMouse(*args, **kwargs) def ReleaseMouse(*args, **kwargs): """ @@ -7281,15 +9402,15 @@ class wxWindow(wxEvtHandler): Releases mouse input captured with wx.Window.CaptureMouse. """ - return __core.wxWindow_ReleaseMouse(*args, **kwargs) + return _core_.Window_ReleaseMouse(*args, **kwargs) def GetCapture(*args, **kwargs): """ - GetCapture() -> wxWindow + GetCapture() -> Window Returns the window which currently captures the mouse or None """ - return __core.wxWindow_GetCapture(*args, **kwargs) + return _core_.Window_GetCapture(*args, **kwargs) GetCapture = staticmethod(GetCapture) def HasCapture(*args, **kwargs): @@ -7298,26 +9419,26 @@ class wxWindow(wxEvtHandler): Returns true if this window has the current mouse capture. """ - return __core.wxWindow_HasCapture(*args, **kwargs) + return _core_.Window_HasCapture(*args, **kwargs) def Refresh(*args, **kwargs): """ - Refresh(self, bool eraseBackground=True, wxRect rect=None) + Refresh(self, bool eraseBackground=True, Rect rect=None) Mark the specified rectangle (or the whole window) as "dirty" so it will be repainted. Causes an EVT_PAINT event to be generated and sent to the window. """ - return __core.wxWindow_Refresh(*args, **kwargs) + return _core_.Window_Refresh(*args, **kwargs) def RefreshRect(*args, **kwargs): """ - RefreshRect(self, wxRect rect, bool eraseBackground=True) + RefreshRect(self, Rect rect, bool eraseBackground=True) Redraws the contents of the given rectangle: the area inside it will be repainted. This is the same as Refresh but has a nicer syntax. """ - return __core.wxWindow_RefreshRect(*args, **kwargs) + return _core_.Window_RefreshRect(*args, **kwargs) def Update(*args, **kwargs): """ @@ -7327,11 +9448,11 @@ class wxWindow(wxEvtHandler): window instead of waiting for the EVT_PAINT event to happen, (normally this would usually only happen when the flow of control returns to the event loop.) Notice that this function doesn't refresh the window and - does nothing if the window has been already repainted. Use Refresh + does nothing if the window has been already repainted. Use `Refresh` first if you want to immediately redraw the window (or some portion of it) unconditionally. """ - return __core.wxWindow_Update(*args, **kwargs) + return _core_.Window_Update(*args, **kwargs) def ClearBackground(*args, **kwargs): """ @@ -7340,7 +9461,7 @@ class wxWindow(wxEvtHandler): Clears the window by filling it with the current background colour. Does not cause an erase background event to be generated. """ - return __core.wxWindow_ClearBackground(*args, **kwargs) + return _core_.Window_ClearBackground(*args, **kwargs) def Freeze(*args, **kwargs): """ @@ -7358,7 +9479,17 @@ class wxWindow(wxEvtHandler): for all controls so it is mostly just a hint to wxWindows and not a mandatory directive. """ - return __core.wxWindow_Freeze(*args, **kwargs) + return _core_.Window_Freeze(*args, **kwargs) + + def IsFrozen(*args, **kwargs): + """ + IsFrozen(self) -> bool + + Returns ``True`` if the window has been frozen and not thawed yet. + + :see: `Freeze` and `Thaw` + """ + return _core_.Window_IsFrozen(*args, **kwargs) def Thaw(*args, **kwargs): """ @@ -7368,34 +9499,45 @@ class wxWindow(wxEvtHandler): Freeze/Thaw may be nested, so Thaw must be called the same number of times that Freeze was before the window will be updated. """ - return __core.wxWindow_Thaw(*args, **kwargs) + return _core_.Window_Thaw(*args, **kwargs) def PrepareDC(*args, **kwargs): """ - PrepareDC(self, wxDC dc) + PrepareDC(self, DC dc) Call this function to prepare the device context for drawing a scrolled image. It sets the device origin according to the current scroll position. """ - return __core.wxWindow_PrepareDC(*args, **kwargs) + return _core_.Window_PrepareDC(*args, **kwargs) + + def IsDoubleBuffered(*args, **kwargs): + """ + IsDoubleBuffered(self) -> bool + + Returns ``True`` if the window contents is double-buffered by the + system, i.e. if any drawing done on the window is really done on a + temporary backing surface and transferred to the screen all at once + later. + """ + return _core_.Window_IsDoubleBuffered(*args, **kwargs) def GetUpdateRegion(*args, **kwargs): """ - GetUpdateRegion(self) -> wxRegion + GetUpdateRegion(self) -> Region Returns the region specifying which parts of the window have been damaged. Should only be called within an EVT_PAINT handler. """ - return __core.wxWindow_GetUpdateRegion(*args, **kwargs) + return _core_.Window_GetUpdateRegion(*args, **kwargs) def GetUpdateClientRect(*args, **kwargs): """ - GetUpdateClientRect(self) -> wxRect + GetUpdateClientRect(self) -> Rect Get the update rectangle region bounding box in client coords. """ - return __core.wxWindow_GetUpdateClientRect(*args, **kwargs) + return _core_.Window_GetUpdateClientRect(*args, **kwargs) def IsExposed(*args, **kwargs): """ @@ -7406,33 +9548,33 @@ class wxWindow(wxEvtHandler): optimize redrawing by only redrawing those areas, which have been exposed. """ - return __core.wxWindow_IsExposed(*args, **kwargs) + return _core_.Window_IsExposed(*args, **kwargs) def IsExposedPoint(*args, **kwargs): """ - IsExposedPoint(self, wxPoint pt) -> bool + IsExposedPoint(self, Point pt) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. """ - return __core.wxWindow_IsExposedPoint(*args, **kwargs) + return _core_.Window_IsExposedPoint(*args, **kwargs) def IsExposedRect(*args, **kwargs): """ - IsExposedRect(self, wxRect rect) -> bool + IsExposedRect(self, Rect rect) -> bool Returns true if the given point or rectangle area has been exposed since the last repaint. Call this in an paint event handler to optimize redrawing by only redrawing those areas, which have been exposed. """ - return __core.wxWindow_IsExposedRect(*args, **kwargs) + return _core_.Window_IsExposedRect(*args, **kwargs) def GetDefaultAttributes(*args, **kwargs): """ - GetDefaultAttributes(self) -> wxVisualAttributes + GetDefaultAttributes(self) -> VisualAttributes Get the default attributes for an instance of this class. This is useful if you want to use the same font or colour in your own control @@ -7440,11 +9582,11 @@ class wxWindow(wxEvtHandler): coding specific colours or fonts which might look completely out of place on the user's system, especially if it uses themes. """ - return __core.wxWindow_GetDefaultAttributes(*args, **kwargs) + return _core_.Window_GetDefaultAttributes(*args, **kwargs) def GetClassDefaultAttributes(*args, **kwargs): """ - GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard @@ -7457,12 +9599,12 @@ class wxWindow(wxEvtHandler): the returned font. See `wx.Window.SetWindowVariant` for more about this. """ - return __core.wxWindow_GetClassDefaultAttributes(*args, **kwargs) + return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) def SetBackgroundColour(*args, **kwargs): """ - SetBackgroundColour(self, wxColour colour) -> bool + SetBackgroundColour(self, Colour colour) -> bool Sets the background colour of the window. Returns True if the colour was changed. The background colour is usually painted by the default @@ -7479,52 +9621,52 @@ class wxWindow(wxEvtHandler): themes represent the appearance chosen by the user to be used for all applications on the system. """ - return __core.wxWindow_SetBackgroundColour(*args, **kwargs) + return _core_.Window_SetBackgroundColour(*args, **kwargs) def SetOwnBackgroundColour(*args, **kwargs): - """SetOwnBackgroundColour(self, wxColour colour)""" - return __core.wxWindow_SetOwnBackgroundColour(*args, **kwargs) + """SetOwnBackgroundColour(self, Colour colour)""" + return _core_.Window_SetOwnBackgroundColour(*args, **kwargs) def SetForegroundColour(*args, **kwargs): """ - SetForegroundColour(self, wxColour colour) -> bool + SetForegroundColour(self, Colour colour) -> bool Sets the foreground colour of the window. Returns True is the colour was changed. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all. """ - return __core.wxWindow_SetForegroundColour(*args, **kwargs) + return _core_.Window_SetForegroundColour(*args, **kwargs) def SetOwnForegroundColour(*args, **kwargs): - """SetOwnForegroundColour(self, wxColour colour)""" - return __core.wxWindow_SetOwnForegroundColour(*args, **kwargs) + """SetOwnForegroundColour(self, Colour colour)""" + return _core_.Window_SetOwnForegroundColour(*args, **kwargs) def GetBackgroundColour(*args, **kwargs): """ - GetBackgroundColour(self) -> wxColour + GetBackgroundColour(self) -> Colour Returns the background colour of the window. """ - return __core.wxWindow_GetBackgroundColour(*args, **kwargs) + return _core_.Window_GetBackgroundColour(*args, **kwargs) def GetForegroundColour(*args, **kwargs): """ - GetForegroundColour(self) -> wxColour + GetForegroundColour(self) -> Colour Returns the foreground colour of the window. The interpretation of foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all. """ - return __core.wxWindow_GetForegroundColour(*args, **kwargs) + return _core_.Window_GetForegroundColour(*args, **kwargs) def InheritsBackgroundColour(*args, **kwargs): """InheritsBackgroundColour(self) -> bool""" - return __core.wxWindow_InheritsBackgroundColour(*args, **kwargs) + return _core_.Window_InheritsBackgroundColour(*args, **kwargs) def UseBgCol(*args, **kwargs): """UseBgCol(self) -> bool""" - return __core.wxWindow_UseBgCol(*args, **kwargs) + return _core_.Window_UseBgCol(*args, **kwargs) def SetBackgroundStyle(*args, **kwargs): """ @@ -7547,7 +9689,7 @@ class wxWindow(wxEvtHandler): :see: `GetBackgroundStyle`, `SetBackgroundColour` """ - return __core.wxWindow_SetBackgroundStyle(*args, **kwargs) + return _core_.Window_SetBackgroundStyle(*args, **kwargs) def GetBackgroundStyle(*args, **kwargs): """ @@ -7557,7 +9699,7 @@ class wxWindow(wxEvtHandler): :see: `SetBackgroundStyle` """ - return __core.wxWindow_GetBackgroundStyle(*args, **kwargs) + return _core_.Window_GetBackgroundStyle(*args, **kwargs) def HasTransparentBackground(*args, **kwargs): """ @@ -7572,11 +9714,11 @@ class wxWindow(wxEvtHandler): it in your custom control classes to ensure that background is painted correctly. """ - return __core.wxWindow_HasTransparentBackground(*args, **kwargs) + return _core_.Window_HasTransparentBackground(*args, **kwargs) def SetCursor(*args, **kwargs): """ - SetCursor(self, wxCursor cursor) -> bool + SetCursor(self, Cursor cursor) -> bool Sets the window's cursor. Notice that the window cursor also sets it for the children of the window implicitly. @@ -7584,51 +9726,51 @@ class wxWindow(wxEvtHandler): The cursor may be wx.NullCursor in which case the window cursor will be reset back to default. """ - return __core.wxWindow_SetCursor(*args, **kwargs) + return _core_.Window_SetCursor(*args, **kwargs) def GetCursor(*args, **kwargs): """ - GetCursor(self) -> wxCursor + GetCursor(self) -> Cursor Return the cursor associated with this window. """ - return __core.wxWindow_GetCursor(*args, **kwargs) + return _core_.Window_GetCursor(*args, **kwargs) def SetFont(*args, **kwargs): """ - SetFont(self, wxFont font) -> bool + SetFont(self, Font font) -> bool Sets the font for this window. """ - return __core.wxWindow_SetFont(*args, **kwargs) + return _core_.Window_SetFont(*args, **kwargs) def SetOwnFont(*args, **kwargs): - """SetOwnFont(self, wxFont font)""" - return __core.wxWindow_SetOwnFont(*args, **kwargs) + """SetOwnFont(self, Font font)""" + return _core_.Window_SetOwnFont(*args, **kwargs) def GetFont(*args, **kwargs): """ - GetFont(self) -> wxFont + GetFont(self) -> Font Returns the default font used for this window. """ - return __core.wxWindow_GetFont(*args, **kwargs) + return _core_.Window_GetFont(*args, **kwargs) def SetCaret(*args, **kwargs): """ - SetCaret(self, wxCaret caret) + SetCaret(self, Caret caret) Sets the caret associated with the window. """ - return __core.wxWindow_SetCaret(*args, **kwargs) + return _core_.Window_SetCaret(*args, **kwargs) def GetCaret(*args, **kwargs): """ - GetCaret(self) -> wxCaret + GetCaret(self) -> Caret Returns the caret associated with the window. """ - return __core.wxWindow_GetCaret(*args, **kwargs) + return _core_.Window_GetCaret(*args, **kwargs) def GetCharHeight(*args, **kwargs): """ @@ -7636,7 +9778,7 @@ class wxWindow(wxEvtHandler): Get the (average) character size for the current font. """ - return __core.wxWindow_GetCharHeight(*args, **kwargs) + return _core_.Window_GetCharHeight(*args, **kwargs) def GetCharWidth(*args, **kwargs): """ @@ -7644,7 +9786,7 @@ class wxWindow(wxEvtHandler): Get the (average) character size for the current font. """ - return __core.wxWindow_GetCharWidth(*args, **kwargs) + return _core_.Window_GetCharWidth(*args, **kwargs) def GetTextExtent(*args, **kwargs): """ @@ -7652,7 +9794,7 @@ class wxWindow(wxEvtHandler): Get the width and height of the text using the current font. """ - return __core.wxWindow_GetTextExtent(*args, **kwargs) + return _core_.Window_GetTextExtent(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): """ @@ -7662,7 +9804,7 @@ class wxWindow(wxEvtHandler): Get the width, height, decent and leading of the text using the current or specified font. """ - return __core.wxWindow_GetFullTextExtent(*args, **kwargs) + return _core_.Window_GetFullTextExtent(*args, **kwargs) def ClientToScreenXY(*args, **kwargs): """ @@ -7670,7 +9812,7 @@ class wxWindow(wxEvtHandler): Converts to screen coordinates from coordinates relative to this window. """ - return __core.wxWindow_ClientToScreenXY(*args, **kwargs) + return _core_.Window_ClientToScreenXY(*args, **kwargs) def ScreenToClientXY(*args, **kwargs): """ @@ -7678,23 +9820,23 @@ class wxWindow(wxEvtHandler): Converts from screen to client window coordinates. """ - return __core.wxWindow_ScreenToClientXY(*args, **kwargs) + return _core_.Window_ScreenToClientXY(*args, **kwargs) def ClientToScreen(*args, **kwargs): """ - ClientToScreen(self, wxPoint pt) -> wxPoint + ClientToScreen(self, Point pt) -> Point Converts to screen coordinates from coordinates relative to this window. """ - return __core.wxWindow_ClientToScreen(*args, **kwargs) + return _core_.Window_ClientToScreen(*args, **kwargs) def ScreenToClient(*args, **kwargs): """ - ScreenToClient(self, wxPoint pt) -> wxPoint + ScreenToClient(self, Point pt) -> Point Converts from screen to client window coordinates. """ - return __core.wxWindow_ScreenToClient(*args, **kwargs) + return _core_.Window_ScreenToClient(*args, **kwargs) def HitTestXY(*args, **kwargs): """ @@ -7702,15 +9844,15 @@ class wxWindow(wxEvtHandler): Test where the given (in client coords) point lies """ - return __core.wxWindow_HitTestXY(*args, **kwargs) + return _core_.Window_HitTestXY(*args, **kwargs) def HitTest(*args, **kwargs): """ - HitTest(self, wxPoint pt) -> int + HitTest(self, Point pt) -> int Test where the given (in client coords) point lies """ - return __core.wxWindow_HitTest(*args, **kwargs) + return _core_.Window_HitTest(*args, **kwargs) def GetBorder(*args): """ @@ -7719,11 +9861,11 @@ class wxWindow(wxEvtHandler): Get border for the flags of this window """ - return __core.wxWindow_GetBorder(*args) + return _core_.Window_GetBorder(*args) def UpdateWindowUI(*args, **kwargs): """ - UpdateWindowUI(self, long flags=wxUPDATE_UI_NONE) + UpdateWindowUI(self, long flags=UPDATE_UI_NONE) This function sends EVT_UPDATE_UI events to the window. The particular implementation depends on the window; for example a wx.ToolBar will @@ -7732,15 +9874,15 @@ class wxWindow(wxEvtHandler): function from your application to ensure that your UI is up-to-date at a particular point in time (as far as your EVT_UPDATE_UI handlers are concerned). This may be necessary if you have called - wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to + `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to limit the overhead that wxWindows incurs by sending update UI events in idle time. """ - return __core.wxWindow_UpdateWindowUI(*args, **kwargs) + return _core_.Window_UpdateWindowUI(*args, **kwargs) def PopupMenuXY(*args, **kwargs): """ - PopupMenuXY(self, wxMenu menu, int x=-1, int y=-1) -> bool + PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is @@ -7748,11 +9890,11 @@ class wxWindow(wxEvtHandler): usual. If the default position is given then the current position of the mouse cursor will be used. """ - return __core.wxWindow_PopupMenuXY(*args, **kwargs) + return _core_.Window_PopupMenuXY(*args, **kwargs) def PopupMenu(*args, **kwargs): """ - PopupMenu(self, wxMenu menu, wxPoint pos=wxDefaultPosition) -> bool + PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is @@ -7760,7 +9902,11 @@ class wxWindow(wxEvtHandler): usual. If the default position is given then the current position of the mouse cursor will be used. """ - return __core.wxWindow_PopupMenu(*args, **kwargs) + return _core_.Window_PopupMenu(*args, **kwargs) + + def HasMultiplePages(*args, **kwargs): + """HasMultiplePages(self) -> bool""" + return _core_.Window_HasMultiplePages(*args, **kwargs) def GetHandle(*args, **kwargs): """ @@ -7770,7 +9916,7 @@ class wxWindow(wxEvtHandler): physical window. Currently on wxMac it returns the handle of the toplevel parent of the window. """ - return __core.wxWindow_GetHandle(*args, **kwargs) + return _core_.Window_GetHandle(*args, **kwargs) def AssociateHandle(*args, **kwargs): """ @@ -7778,7 +9924,7 @@ class wxWindow(wxEvtHandler): Associate the window with a new native handle """ - return __core.wxWindow_AssociateHandle(*args, **kwargs) + return _core_.Window_AssociateHandle(*args, **kwargs) def DissociateHandle(*args, **kwargs): """ @@ -7786,7 +9932,7 @@ class wxWindow(wxEvtHandler): Dissociate the current native handle from the window """ - return __core.wxWindow_DissociateHandle(*args, **kwargs) + return _core_.Window_DissociateHandle(*args, **kwargs) def HasScrollbar(*args, **kwargs): """ @@ -7794,7 +9940,7 @@ class wxWindow(wxEvtHandler): Does the window have the scrollbar for this orientation? """ - return __core.wxWindow_HasScrollbar(*args, **kwargs) + return _core_.Window_HasScrollbar(*args, **kwargs) def SetScrollbar(*args, **kwargs): """ @@ -7803,7 +9949,7 @@ class wxWindow(wxEvtHandler): Sets the scrollbar properties of a built-in scrollbar. """ - return __core.wxWindow_SetScrollbar(*args, **kwargs) + return _core_.Window_SetScrollbar(*args, **kwargs) def SetScrollPos(*args, **kwargs): """ @@ -7811,7 +9957,7 @@ class wxWindow(wxEvtHandler): Sets the position of one of the built-in scrollbars. """ - return __core.wxWindow_SetScrollPos(*args, **kwargs) + return _core_.Window_SetScrollPos(*args, **kwargs) def GetScrollPos(*args, **kwargs): """ @@ -7819,7 +9965,7 @@ class wxWindow(wxEvtHandler): Returns the built-in scrollbar position. """ - return __core.wxWindow_GetScrollPos(*args, **kwargs) + return _core_.Window_GetScrollPos(*args, **kwargs) def GetScrollThumb(*args, **kwargs): """ @@ -7827,7 +9973,7 @@ class wxWindow(wxEvtHandler): Returns the built-in scrollbar thumb size. """ - return __core.wxWindow_GetScrollThumb(*args, **kwargs) + return _core_.Window_GetScrollThumb(*args, **kwargs) def GetScrollRange(*args, **kwargs): """ @@ -7835,18 +9981,18 @@ class wxWindow(wxEvtHandler): Returns the built-in scrollbar range. """ - return __core.wxWindow_GetScrollRange(*args, **kwargs) + return _core_.Window_GetScrollRange(*args, **kwargs) def ScrollWindow(*args, **kwargs): """ - ScrollWindow(self, int dx, int dy, wxRect rect=None) + ScrollWindow(self, int dx, int dy, Rect rect=None) Physically scrolls the pixels in the window and move child windows accordingly. Use this function to optimise your scrolling implementations, to minimise the area that must be redrawn. Note that it is rarely required to call this function from a user program. """ - return __core.wxWindow_ScrollWindow(*args, **kwargs) + return _core_.Window_ScrollWindow(*args, **kwargs) def ScrollLines(*args, **kwargs): """ @@ -7857,7 +10003,7 @@ class wxWindow(wxEvtHandler): is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. """ - return __core.wxWindow_ScrollLines(*args, **kwargs) + return _core_.Window_ScrollLines(*args, **kwargs) def ScrollPages(*args, **kwargs): """ @@ -7868,7 +10014,7 @@ class wxWindow(wxEvtHandler): is negative. Returns True if the window was scrolled, False if it was already on top/bottom and nothing was done. """ - return __core.wxWindow_ScrollPages(*args, **kwargs) + return _core_.Window_ScrollPages(*args, **kwargs) def LineUp(*args, **kwargs): """ @@ -7876,7 +10022,7 @@ class wxWindow(wxEvtHandler): This is just a wrapper for ScrollLines(-1). """ - return __core.wxWindow_LineUp(*args, **kwargs) + return _core_.Window_LineUp(*args, **kwargs) def LineDown(*args, **kwargs): """ @@ -7884,7 +10030,7 @@ class wxWindow(wxEvtHandler): This is just a wrapper for ScrollLines(1). """ - return __core.wxWindow_LineDown(*args, **kwargs) + return _core_.Window_LineDown(*args, **kwargs) def PageUp(*args, **kwargs): """ @@ -7892,7 +10038,7 @@ class wxWindow(wxEvtHandler): This is just a wrapper for ScrollPages(-1). """ - return __core.wxWindow_PageUp(*args, **kwargs) + return _core_.Window_PageUp(*args, **kwargs) def PageDown(*args, **kwargs): """ @@ -7900,81 +10046,102 @@ class wxWindow(wxEvtHandler): This is just a wrapper for ScrollPages(1). """ - return __core.wxWindow_PageDown(*args, **kwargs) + return _core_.Window_PageDown(*args, **kwargs) def SetHelpText(*args, **kwargs): """ - SetHelpText(self, wxString text) + SetHelpText(self, String text) Sets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current - wxHelpProvider implementation, and not in the window object itself. + `wx.HelpProvider` implementation, and not in the window object itself. """ - return __core.wxWindow_SetHelpText(*args, **kwargs) + return _core_.Window_SetHelpText(*args, **kwargs) def SetHelpTextForId(*args, **kwargs): """ - SetHelpTextForId(self, wxString text) + SetHelpTextForId(self, String text) Associate this help text with all windows with the same id as this one. """ - return __core.wxWindow_SetHelpTextForId(*args, **kwargs) + return _core_.Window_SetHelpTextForId(*args, **kwargs) + + def GetHelpTextAtPoint(*args, **kwargs): + """ + GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String + + Get the help string associated with the given position in this window. + + Notice that pt may be invalid if event origin is keyboard or unknown + and this method should return the global window help text then + + """ + return _core_.Window_GetHelpTextAtPoint(*args, **kwargs) def GetHelpText(*args, **kwargs): """ - GetHelpText(self) -> wxString + GetHelpText(self) -> String Gets the help text to be used as context-sensitive help for this window. Note that the text is actually stored by the current - wxHelpProvider implementation, and not in the window object itself. + `wx.HelpProvider` implementation, and not in the window object itself. """ - return __core.wxWindow_GetHelpText(*args, **kwargs) + return _core_.Window_GetHelpText(*args, **kwargs) def SetToolTipString(*args, **kwargs): """ - SetToolTipString(self, wxString tip) + SetToolTipString(self, String tip) Attach a tooltip to the window. """ - return __core.wxWindow_SetToolTipString(*args, **kwargs) + return _core_.Window_SetToolTipString(*args, **kwargs) def SetToolTip(*args, **kwargs): """ - SetToolTip(self, wxToolTip tip) + SetToolTip(self, ToolTip tip) Attach a tooltip to the window. """ - return __core.wxWindow_SetToolTip(*args, **kwargs) + return _core_.Window_SetToolTip(*args, **kwargs) def GetToolTip(*args, **kwargs): """ - GetToolTip(self) -> wxToolTip + GetToolTip(self) -> ToolTip get the associated tooltip or None if none """ - return __core.wxWindow_GetToolTip(*args, **kwargs) + return _core_.Window_GetToolTip(*args, **kwargs) def SetDropTarget(*args, **kwargs): """ - SetDropTarget(self, wxPyDropTarget dropTarget) + SetDropTarget(self, DropTarget dropTarget) Associates a drop target with this window. If the window already has a drop target, it is deleted. """ - return __core.wxWindow_SetDropTarget(*args, **kwargs) + return _core_.Window_SetDropTarget(*args, **kwargs) def GetDropTarget(*args, **kwargs): """ - GetDropTarget(self) -> wxPyDropTarget + GetDropTarget(self) -> DropTarget Returns the associated drop target, which may be None. """ - return __core.wxWindow_GetDropTarget(*args, **kwargs) + return _core_.Window_GetDropTarget(*args, **kwargs) + + def DragAcceptFiles(*args, **kwargs): + """ + DragAcceptFiles(self, bool accept) + + Enables or disables eligibility for drop file events, EVT_DROP_FILES. + Only functional on Windows. + """ + return _core_.Window_DragAcceptFiles(*args, **kwargs) def SetConstraints(*args, **kwargs): """ - SetConstraints(self, wxLayoutConstraints constraints) + SetConstraints(self, LayoutConstraints constraints) Sets the window to have the given layout constraints. If an existing layout constraints object is already owned by the window, it will be @@ -7987,27 +10154,31 @@ class wxWindow(wxEvtHandler): both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have effect. """ - return __core.wxWindow_SetConstraints(*args, **kwargs) + return _core_.Window_SetConstraints(*args, **kwargs) def GetConstraints(*args, **kwargs): """ - GetConstraints(self) -> wxLayoutConstraints + GetConstraints(self) -> LayoutConstraints Returns a pointer to the window's layout constraints, or None if there are none. """ - return __core.wxWindow_GetConstraints(*args, **kwargs) + return _core_.Window_GetConstraints(*args, **kwargs) def SetAutoLayout(*args, **kwargs): """ SetAutoLayout(self, bool autoLayout) Determines whether the Layout function will be called automatically - when the window is resized. It is called implicitly by SetSizer but - if you use SetConstraints you should call it manually or otherwise the - window layout won't be correctly updated when its size changes. + when the window is resized. lease note that this only happens for the + windows usually used to contain children, namely `wx.Panel` and + `wx.TopLevelWindow` (and the classes deriving from them). + + This method is called implicitly by `SetSizer` but if you use + `SetConstraints` you should call it manually or otherwise the window + layout won't be correctly updated when its size changes. """ - return __core.wxWindow_SetAutoLayout(*args, **kwargs) + return _core_.Window_SetAutoLayout(*args, **kwargs) def GetAutoLayout(*args, **kwargs): """ @@ -8015,7 +10186,7 @@ class wxWindow(wxEvtHandler): Returns the current autoLayout setting """ - return __core.wxWindow_GetAutoLayout(*args, **kwargs) + return _core_.Window_GetAutoLayout(*args, **kwargs) def Layout(*args, **kwargs): """ @@ -8026,11 +10197,11 @@ class wxWindow(wxEvtHandler): this function gets called automatically by the default EVT_SIZE handler when the window is resized. """ - return __core.wxWindow_Layout(*args, **kwargs) + return _core_.Window_Layout(*args, **kwargs) def SetSizer(*args, **kwargs): """ - SetSizer(self, wxSizer sizer, bool deleteOld=True) + SetSizer(self, Sizer sizer, bool deleteOld=True) Sets the window to have the given layout sizer. The window will then own the object, and will take care of its deletion. If an existing @@ -8039,43 +10210,43 @@ class wxWindow(wxEvtHandler): call SetAutoLayout implicitly with a True parameter if the sizer is non-None, and False otherwise. """ - return __core.wxWindow_SetSizer(*args, **kwargs) + return _core_.Window_SetSizer(*args, **kwargs) def SetSizerAndFit(*args, **kwargs): """ - SetSizerAndFit(self, wxSizer sizer, bool deleteOld=True) + SetSizerAndFit(self, Sizer sizer, bool deleteOld=True) The same as SetSizer, except it also sets the size hints for the window based on the sizer's minimum size. """ - return __core.wxWindow_SetSizerAndFit(*args, **kwargs) + return _core_.Window_SetSizerAndFit(*args, **kwargs) def GetSizer(*args, **kwargs): """ - GetSizer(self) -> wxSizer + GetSizer(self) -> Sizer Return the sizer associated with the window by a previous call to SetSizer or None if there isn't one. """ - return __core.wxWindow_GetSizer(*args, **kwargs) + return _core_.Window_GetSizer(*args, **kwargs) def SetContainingSizer(*args, **kwargs): """ - SetContainingSizer(self, wxSizer sizer) + SetContainingSizer(self, Sizer sizer) This normally does not need to be called by application code. It is called internally when a window is added to a sizer, and is used so the window can remove itself from the sizer when it is destroyed. """ - return __core.wxWindow_SetContainingSizer(*args, **kwargs) + return _core_.Window_SetContainingSizer(*args, **kwargs) def GetContainingSizer(*args, **kwargs): """ - GetContainingSizer(self) -> wxSizer + GetContainingSizer(self) -> Sizer Return the sizer that this window is a member of, if any, otherwise None. """ - return __core.wxWindow_GetContainingSizer(*args, **kwargs) + return _core_.Window_GetContainingSizer(*args, **kwargs) def InheritAttributes(*args, **kwargs): """ @@ -8106,7 +10277,7 @@ class wxWindow(wxEvtHandler): parents attributes. """ - return __core.wxWindow_InheritAttributes(*args, **kwargs) + return _core_.Window_InheritAttributes(*args, **kwargs) def ShouldInheritColours(*args, **kwargs): """ @@ -8119,7 +10290,33 @@ class wxWindow(wxEvtHandler): The base class version returns false, but this method is overridden in wxControl where it returns true. """ - return __core.wxWindow_ShouldInheritColours(*args, **kwargs) + return _core_.Window_ShouldInheritColours(*args, **kwargs) + + def CanSetTransparent(*args, **kwargs): + """ + CanSetTransparent(self) -> bool + + Returns ``True`` if the platform supports setting the transparency for + this window. Note that this method will err on the side of caution, + so it is possible that this will return ``False`` when it is in fact + possible to set the transparency. + + NOTE: On X-windows systems the X server must have the composite + extension loaded, and there must be a composite manager program (such + as xcompmgr) running. + """ + return _core_.Window_CanSetTransparent(*args, **kwargs) + + def SetTransparent(*args, **kwargs): + """ + SetTransparent(self, byte alpha) -> bool + + Attempt to set the transparency of this window to the ``alpha`` value, + returns True on success. The ``alpha`` value is an integer in the + range of 0 to 255, where 0 is fully transparent and 255 is fully + opaque. + """ + return _core_.Window_SetTransparent(*args, **kwargs) def PostCreate(self, pre): """ @@ -8134,70 +10331,123 @@ class wxWindow(wxEvtHandler): if hasattr(self, '_setCallbackInfo'): self._setCallbackInfo(self, self.__class__) - -class wxWindowPtr(wxWindow): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxWindow -__core.wxWindow_swigregister(wxWindowPtr) + def SendSizeEvent(self): + self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1))) + + AcceleratorTable = property(GetAcceleratorTable,SetAcceleratorTable,doc="See `GetAcceleratorTable` and `SetAcceleratorTable`") + AdjustedBestSize = property(GetAdjustedBestSize,doc="See `GetAdjustedBestSize`") + AutoLayout = property(GetAutoLayout,SetAutoLayout,doc="See `GetAutoLayout` and `SetAutoLayout`") + BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`") + BackgroundStyle = property(GetBackgroundStyle,SetBackgroundStyle,doc="See `GetBackgroundStyle` and `SetBackgroundStyle`") + EffectiveMinSize = property(GetEffectiveMinSize,doc="See `GetEffectiveMinSize`") + BestSize = property(GetBestSize,doc="See `GetBestSize`") + BestVirtualSize = property(GetBestVirtualSize,doc="See `GetBestVirtualSize`") + Border = property(GetBorder,doc="See `GetBorder`") + Caret = property(GetCaret,SetCaret,doc="See `GetCaret` and `SetCaret`") + CharHeight = property(GetCharHeight,doc="See `GetCharHeight`") + CharWidth = property(GetCharWidth,doc="See `GetCharWidth`") + Children = property(GetChildren,doc="See `GetChildren`") + ClientAreaOrigin = property(GetClientAreaOrigin,doc="See `GetClientAreaOrigin`") + ClientRect = property(GetClientRect,SetClientRect,doc="See `GetClientRect` and `SetClientRect`") + ClientSize = property(GetClientSize,SetClientSize,doc="See `GetClientSize` and `SetClientSize`") + Constraints = property(GetConstraints,SetConstraints,doc="See `GetConstraints` and `SetConstraints`") + ContainingSizer = property(GetContainingSizer,SetContainingSizer,doc="See `GetContainingSizer` and `SetContainingSizer`") + Cursor = property(GetCursor,SetCursor,doc="See `GetCursor` and `SetCursor`") + DefaultAttributes = property(GetDefaultAttributes,doc="See `GetDefaultAttributes`") + DropTarget = property(GetDropTarget,SetDropTarget,doc="See `GetDropTarget` and `SetDropTarget`") + EventHandler = property(GetEventHandler,SetEventHandler,doc="See `GetEventHandler` and `SetEventHandler`") + ExtraStyle = property(GetExtraStyle,SetExtraStyle,doc="See `GetExtraStyle` and `SetExtraStyle`") + Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") + ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`") + GrandParent = property(GetGrandParent,doc="See `GetGrandParent`") + Handle = property(GetHandle,doc="See `GetHandle`") + HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`") + Id = property(GetId,SetId,doc="See `GetId` and `SetId`") + Label = property(GetLabel,SetLabel,doc="See `GetLabel` and `SetLabel`") + LayoutDirection = property(GetLayoutDirection,SetLayoutDirection,doc="See `GetLayoutDirection` and `SetLayoutDirection`") + MaxHeight = property(GetMaxHeight,doc="See `GetMaxHeight`") + MaxSize = property(GetMaxSize,SetMaxSize,doc="See `GetMaxSize` and `SetMaxSize`") + MaxWidth = property(GetMaxWidth,doc="See `GetMaxWidth`") + MinHeight = property(GetMinHeight,doc="See `GetMinHeight`") + MinSize = property(GetMinSize,SetMinSize,doc="See `GetMinSize` and `SetMinSize`") + MinWidth = property(GetMinWidth,doc="See `GetMinWidth`") + Name = property(GetName,SetName,doc="See `GetName` and `SetName`") + Parent = property(GetParent,doc="See `GetParent`") + Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`") + Rect = property(GetRect,SetRect,doc="See `GetRect` and `SetRect`") + ScreenPosition = property(GetScreenPosition,doc="See `GetScreenPosition`") + ScreenRect = property(GetScreenRect,doc="See `GetScreenRect`") + Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`") + Sizer = property(GetSizer,SetSizer,doc="See `GetSizer` and `SetSizer`") + ThemeEnabled = property(GetThemeEnabled,SetThemeEnabled,doc="See `GetThemeEnabled` and `SetThemeEnabled`") + ToolTip = property(GetToolTip,SetToolTip,doc="See `GetToolTip` and `SetToolTip`") + UpdateClientRect = property(GetUpdateClientRect,doc="See `GetUpdateClientRect`") + UpdateRegion = property(GetUpdateRegion,doc="See `GetUpdateRegion`") + Validator = property(GetValidator,SetValidator,doc="See `GetValidator` and `SetValidator`") + VirtualSize = property(GetVirtualSize,SetVirtualSize,doc="See `GetVirtualSize` and `SetVirtualSize`") + WindowStyle = property(GetWindowStyle,SetWindowStyle,doc="See `GetWindowStyle` and `SetWindowStyle`") + WindowStyleFlag = property(GetWindowStyleFlag,SetWindowStyleFlag,doc="See `GetWindowStyleFlag` and `SetWindowStyleFlag`") + WindowVariant = property(GetWindowVariant,SetWindowVariant,doc="See `GetWindowVariant` and `SetWindowVariant`") + Shown = property(IsShown,Show,doc="See `IsShown` and `Show`") + Enabled = property(IsEnabled,Enable,doc="See `IsEnabled` and `Enable`") + TopLevel = property(IsTopLevel,doc="See `IsTopLevel`") +_core_.Window_swigregister(Window) def PreWindow(*args, **kwargs): """ - PreWindow() -> wxWindow + PreWindow() -> Window Precreate a Window for 2-phase creation. """ - val = __core.new_PreWindow(*args, **kwargs) - val.thisown = 1 + val = _core_.new_PreWindow(*args, **kwargs) return val -def wxWindow_NewControlId(*args, **kwargs): - """ - wxWindow_NewControlId() -> int +def Window_NewControlId(*args): + """ + Window_NewControlId() -> int Generate a control id for the controls which were not given one. """ - return __core.wxWindow_NewControlId(*args, **kwargs) + return _core_.Window_NewControlId(*args) -def wxWindow_NextControlId(*args, **kwargs): - """ - wxWindow_NextControlId(int winid) -> int +def Window_NextControlId(*args, **kwargs): + """ + Window_NextControlId(int winid) -> int Get the id of the control following the one with the given autogenerated) id """ - return __core.wxWindow_NextControlId(*args, **kwargs) + return _core_.Window_NextControlId(*args, **kwargs) -def wxWindow_PrevControlId(*args, **kwargs): - """ - wxWindow_PrevControlId(int winid) -> int +def Window_PrevControlId(*args, **kwargs): + """ + Window_PrevControlId(int winid) -> int Get the id of the control preceding the one with the given autogenerated) id """ - return __core.wxWindow_PrevControlId(*args, **kwargs) + return _core_.Window_PrevControlId(*args, **kwargs) -def wxWindow_FindFocus(*args, **kwargs): - """ - wxWindow_FindFocus() -> wxWindow +def Window_FindFocus(*args): + """ + Window_FindFocus() -> Window Returns the window or control that currently has the keyboard focus, or None. """ - return __core.wxWindow_FindFocus(*args, **kwargs) + return _core_.Window_FindFocus(*args) -def wxWindow_GetCapture(*args, **kwargs): - """ - wxWindow_GetCapture() -> wxWindow +def Window_GetCapture(*args): + """ + Window_GetCapture() -> Window Returns the window which currently captures the mouse or None """ - return __core.wxWindow_GetCapture(*args, **kwargs) + return _core_.Window_GetCapture(*args) -def wxWindow_GetClassDefaultAttributes(*args, **kwargs): - """ - wxWindow_GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes +def Window_GetClassDefaultAttributes(*args, **kwargs): + """ + Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard @@ -8210,7 +10460,7 @@ def wxWindow_GetClassDefaultAttributes(*args, **kwargs): the returned font. See `wx.Window.SetWindowVariant` for more about this. """ - return __core.wxWindow_GetClassDefaultAttributes(*args, **kwargs) + return _core_.Window_GetClassDefaultAttributes(*args, **kwargs) def DLG_PNT(win, point_or_x, y=None): """ @@ -8233,20 +10483,20 @@ def DLG_SZE(win, size_width, height=None): return win.ConvertDialogSizeToPixels(wx.Size(size_width, height)) -def wxFindWindowById(*args, **kwargs): - """ - wxFindWindowById(long id, wxWindow parent=None) -> wxWindow +def FindWindowById(*args, **kwargs): + """ + FindWindowById(long id, Window parent=None) -> Window Find the first window in the application with the given id. If parent is None, the search will start from all top-level frames and dialog boxes; if non-None, the search will be limited to the given window hierarchy. The search is recursive in both cases. """ - return __core.wxFindWindowById(*args, **kwargs) + return _core_.FindWindowById(*args, **kwargs) -def wxFindWindowByName(*args, **kwargs): - """ - wxFindWindowByName(wxString name, wxWindow parent=None) -> wxWindow +def FindWindowByName(*args, **kwargs): + """ + FindWindowByName(String name, Window parent=None) -> Window Find a window by its name (as given in a window constructor or Create function call). If parent is None, the search will start from all @@ -8256,11 +10506,11 @@ def wxFindWindowByName(*args, **kwargs): If no window with such name is found, wx.FindWindowByLabel is called. """ - return __core.wxFindWindowByName(*args, **kwargs) + return _core_.FindWindowByName(*args, **kwargs) -def wxFindWindowByLabel(*args, **kwargs): - """ - wxFindWindowByLabel(wxString label, wxWindow parent=None) -> wxWindow +def FindWindowByLabel(*args, **kwargs): + """ + FindWindowByLabel(String label, Window parent=None) -> Window Find a window by its label. Depending on the type of window, the label may be a window title or panel item label. If parent is None, the @@ -8268,212 +10518,211 @@ def wxFindWindowByLabel(*args, **kwargs): non-None, the search will be limited to the given window hierarchy. The search is recursive in both cases. """ - return __core.wxFindWindowByLabel(*args, **kwargs) + return _core_.FindWindowByLabel(*args, **kwargs) + +def Window_FromHWND(*args, **kwargs): + """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window""" + return _core_.Window_FromHWND(*args, **kwargs) -def wxWindow_FromHWND(*args, **kwargs): - """wxWindow_FromHWND(wxWindow parent, unsigned long _hWnd) -> wxWindow""" - return __core.wxWindow_FromHWND(*args, **kwargs) +def GetTopLevelWindows(*args): + """ + GetTopLevelWindows() -> PyObject + + Returns a list of the the application's top-level windows, (frames, + dialogs, etc.) NOTE: Currently this is a copy of the list maintained + by wxWidgets, and so it is only valid as long as no top-level windows + are closed or new top-level windows are created. + + """ + return _core_.GetTopLevelWindows(*args) #--------------------------------------------------------------------------- -class wxValidator(wxEvtHandler): - """Proxy of C++ wxValidator class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxValidator""" - newobj = __core.new_wxValidator(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class Validator(EvtHandler): + """Proxy of C++ Validator 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) -> Validator""" + _core_.Validator_swiginit(self,_core_.new_Validator(*args, **kwargs)) self._setOORInfo(self) def Clone(*args, **kwargs): - """Clone(self) -> wxValidator""" - return __core.wxValidator_Clone(*args, **kwargs) + """Clone(self) -> Validator""" + return _core_.Validator_Clone(*args, **kwargs) def Validate(*args, **kwargs): - """Validate(self, wxWindow parent) -> bool""" - return __core.wxValidator_Validate(*args, **kwargs) + """Validate(self, Window parent) -> bool""" + return _core_.Validator_Validate(*args, **kwargs) def TransferToWindow(*args, **kwargs): """TransferToWindow(self) -> bool""" - return __core.wxValidator_TransferToWindow(*args, **kwargs) + return _core_.Validator_TransferToWindow(*args, **kwargs) def TransferFromWindow(*args, **kwargs): """TransferFromWindow(self) -> bool""" - return __core.wxValidator_TransferFromWindow(*args, **kwargs) + return _core_.Validator_TransferFromWindow(*args, **kwargs) def GetWindow(*args, **kwargs): - """GetWindow(self) -> wxWindow""" - return __core.wxValidator_GetWindow(*args, **kwargs) + """GetWindow(self) -> Window""" + return _core_.Validator_GetWindow(*args, **kwargs) def SetWindow(*args, **kwargs): - """SetWindow(self, wxWindow window)""" - return __core.wxValidator_SetWindow(*args, **kwargs) + """SetWindow(self, Window window)""" + return _core_.Validator_SetWindow(*args, **kwargs) def IsSilent(*args, **kwargs): """IsSilent() -> bool""" - return __core.wxValidator_IsSilent(*args, **kwargs) + return _core_.Validator_IsSilent(*args, **kwargs) IsSilent = staticmethod(IsSilent) def SetBellOnError(*args, **kwargs): """SetBellOnError(int doIt=True)""" - return __core.wxValidator_SetBellOnError(*args, **kwargs) + return _core_.Validator_SetBellOnError(*args, **kwargs) SetBellOnError = staticmethod(SetBellOnError) - -class wxValidatorPtr(wxValidator): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxValidator -__core.wxValidator_swigregister(wxValidatorPtr) - -def wxValidator_IsSilent(*args, **kwargs): - """wxValidator_IsSilent() -> bool""" - return __core.wxValidator_IsSilent(*args, **kwargs) - -def wxValidator_SetBellOnError(*args, **kwargs): - """wxValidator_SetBellOnError(int doIt=True)""" - return __core.wxValidator_SetBellOnError(*args, **kwargs) - -class wxPyValidator(wxValidator): - """Proxy of C++ wxPyValidator class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxPyValidator""" - newobj = __core.new_wxPyValidator(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") +_core_.Validator_swigregister(Validator) + +def Validator_IsSilent(*args): + """Validator_IsSilent() -> bool""" + return _core_.Validator_IsSilent(*args) + +def Validator_SetBellOnError(*args, **kwargs): + """Validator_SetBellOnError(int doIt=True)""" + return _core_.Validator_SetBellOnError(*args, **kwargs) + +class PyValidator(Validator): + """Proxy of C++ PyValidator 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) -> PyValidator""" + _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs)) self._setCallbackInfo(self, PyValidator, 1) self._setOORInfo(self) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)""" - return __core.wxPyValidator__setCallbackInfo(*args, **kwargs) - + return _core_.PyValidator__setCallbackInfo(*args, **kwargs) -class wxPyValidatorPtr(wxPyValidator): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPyValidator -__core.wxPyValidator_swigregister(wxPyValidatorPtr) +_core_.PyValidator_swigregister(PyValidator) #--------------------------------------------------------------------------- -class wxMenu(wxEvtHandler): - """Proxy of C++ wxMenu class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, wxString title=EmptyString, long style=0) -> wxMenu""" - newobj = __core.new_wxMenu(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class Menu(EvtHandler): + """Proxy of C++ Menu 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, String title=EmptyString, long style=0) -> Menu""" + _core_.Menu_swiginit(self,_core_.new_Menu(*args, **kwargs)) self._setOORInfo(self) def Append(*args, **kwargs): - """Append(self, int id, wxString text, wxString help=EmptyString, int kind=wxITEM_NORMAL) -> wxMenuItem""" - return __core.wxMenu_Append(*args, **kwargs) + """ + Append(self, int id, String text=EmptyString, String help=EmptyString, + int kind=ITEM_NORMAL) -> MenuItem + """ + return _core_.Menu_Append(*args, **kwargs) def AppendSeparator(*args, **kwargs): - """AppendSeparator(self) -> wxMenuItem""" - return __core.wxMenu_AppendSeparator(*args, **kwargs) + """AppendSeparator(self) -> MenuItem""" + return _core_.Menu_AppendSeparator(*args, **kwargs) def AppendCheckItem(*args, **kwargs): - """AppendCheckItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_AppendCheckItem(*args, **kwargs) + """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_AppendCheckItem(*args, **kwargs) def AppendRadioItem(*args, **kwargs): - """AppendRadioItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_AppendRadioItem(*args, **kwargs) + """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_AppendRadioItem(*args, **kwargs) def AppendMenu(*args, **kwargs): - """AppendMenu(self, int id, wxString text, wxMenu submenu, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_AppendMenu(*args, **kwargs) + """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" + return _core_.Menu_AppendMenu(*args, **kwargs) + + def AppendSubMenu(*args, **kwargs): + """AppendSubMenu(self, Menu submenu, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_AppendSubMenu(*args, **kwargs) def AppendItem(*args, **kwargs): - """AppendItem(self, wxMenuItem item) -> wxMenuItem""" - return __core.wxMenu_AppendItem(*args, **kwargs) + """AppendItem(self, MenuItem item) -> MenuItem""" + return _core_.Menu_AppendItem(*args, **kwargs) + + def InsertItem(*args, **kwargs): + """InsertItem(self, size_t pos, MenuItem item) -> MenuItem""" + return _core_.Menu_InsertItem(*args, **kwargs) + + def PrependItem(*args, **kwargs): + """PrependItem(self, MenuItem item) -> MenuItem""" + return _core_.Menu_PrependItem(*args, **kwargs) def Break(*args, **kwargs): """Break(self)""" - return __core.wxMenu_Break(*args, **kwargs) - - def InsertItem(*args, **kwargs): - """InsertItem(self, size_t pos, wxMenuItem item) -> wxMenuItem""" - return __core.wxMenu_InsertItem(*args, **kwargs) + return _core_.Menu_Break(*args, **kwargs) def Insert(*args, **kwargs): """ - Insert(self, size_t pos, int id, wxString text, wxString help=EmptyString, - int kind=wxITEM_NORMAL) -> wxMenuItem + Insert(self, size_t pos, int id, String text=EmptyString, String help=EmptyString, + int kind=ITEM_NORMAL) -> MenuItem """ - return __core.wxMenu_Insert(*args, **kwargs) + return _core_.Menu_Insert(*args, **kwargs) def InsertSeparator(*args, **kwargs): - """InsertSeparator(self, size_t pos) -> wxMenuItem""" - return __core.wxMenu_InsertSeparator(*args, **kwargs) + """InsertSeparator(self, size_t pos) -> MenuItem""" + return _core_.Menu_InsertSeparator(*args, **kwargs) def InsertCheckItem(*args, **kwargs): - """InsertCheckItem(self, size_t pos, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_InsertCheckItem(*args, **kwargs) + """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_InsertCheckItem(*args, **kwargs) def InsertRadioItem(*args, **kwargs): - """InsertRadioItem(self, size_t pos, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_InsertRadioItem(*args, **kwargs) + """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_InsertRadioItem(*args, **kwargs) def InsertMenu(*args, **kwargs): - """ - InsertMenu(self, size_t pos, int id, wxString text, wxMenu submenu, - wxString help=EmptyString) -> wxMenuItem - """ - return __core.wxMenu_InsertMenu(*args, **kwargs) - - def PrependItem(*args, **kwargs): - """PrependItem(self, wxMenuItem item) -> wxMenuItem""" - return __core.wxMenu_PrependItem(*args, **kwargs) + """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" + return _core_.Menu_InsertMenu(*args, **kwargs) def Prepend(*args, **kwargs): - """Prepend(self, int id, wxString text, wxString help=EmptyString, int kind=wxITEM_NORMAL) -> wxMenuItem""" - return __core.wxMenu_Prepend(*args, **kwargs) + """ + Prepend(self, int id, String text=EmptyString, String help=EmptyString, + int kind=ITEM_NORMAL) -> MenuItem + """ + return _core_.Menu_Prepend(*args, **kwargs) def PrependSeparator(*args, **kwargs): - """PrependSeparator(self) -> wxMenuItem""" - return __core.wxMenu_PrependSeparator(*args, **kwargs) + """PrependSeparator(self) -> MenuItem""" + return _core_.Menu_PrependSeparator(*args, **kwargs) def PrependCheckItem(*args, **kwargs): - """PrependCheckItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_PrependCheckItem(*args, **kwargs) + """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_PrependCheckItem(*args, **kwargs) def PrependRadioItem(*args, **kwargs): - """PrependRadioItem(self, int id, wxString text, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_PrependRadioItem(*args, **kwargs) + """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem""" + return _core_.Menu_PrependRadioItem(*args, **kwargs) def PrependMenu(*args, **kwargs): - """PrependMenu(self, int id, wxString text, wxMenu submenu, wxString help=EmptyString) -> wxMenuItem""" - return __core.wxMenu_PrependMenu(*args, **kwargs) + """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem""" + return _core_.Menu_PrependMenu(*args, **kwargs) def Remove(*args, **kwargs): - """Remove(self, int id) -> wxMenuItem""" - return __core.wxMenu_Remove(*args, **kwargs) + """Remove(self, int id) -> MenuItem""" + return _core_.Menu_Remove(*args, **kwargs) def RemoveItem(*args, **kwargs): - """RemoveItem(self, wxMenuItem item) -> wxMenuItem""" - return __core.wxMenu_RemoveItem(*args, **kwargs) + """RemoveItem(self, MenuItem item) -> MenuItem""" + return _core_.Menu_RemoveItem(*args, **kwargs) def Delete(*args, **kwargs): """Delete(self, int id) -> bool""" - return __core.wxMenu_Delete(*args, **kwargs) + return _core_.Menu_Delete(*args, **kwargs) def DeleteItem(*args, **kwargs): - """DeleteItem(self, wxMenuItem item) -> bool""" - return __core.wxMenu_DeleteItem(*args, **kwargs) + """DeleteItem(self, MenuItem item) -> bool""" + return _core_.Menu_DeleteItem(*args, **kwargs) def Destroy(*args, **kwargs): """ @@ -8481,533 +10730,560 @@ class wxMenu(wxEvtHandler): Deletes the C++ object this Python object is a proxy for. """ - return __core.wxMenu_Destroy(*args, **kwargs) + args[0].this.own(False) + return _core_.Menu_Destroy(*args, **kwargs) def DestroyId(*args, **kwargs): - """ - DestroyId(self, int id) -> bool - - Deletes the C++ object this Python object is a proxy for. - """ - return __core.wxMenu_DestroyId(*args, **kwargs) + """DestroyId(self, int id) -> bool""" + return _core_.Menu_DestroyId(*args, **kwargs) def DestroyItem(*args, **kwargs): - """ - DestroyItem(self, wxMenuItem item) -> bool - - Deletes the C++ object this Python object is a proxy for. - """ - return __core.wxMenu_DestroyItem(*args, **kwargs) + """DestroyItem(self, MenuItem item) -> bool""" + return _core_.Menu_DestroyItem(*args, **kwargs) def GetMenuItemCount(*args, **kwargs): """GetMenuItemCount(self) -> size_t""" - return __core.wxMenu_GetMenuItemCount(*args, **kwargs) + return _core_.Menu_GetMenuItemCount(*args, **kwargs) def GetMenuItems(*args, **kwargs): """GetMenuItems(self) -> PyObject""" - return __core.wxMenu_GetMenuItems(*args, **kwargs) + return _core_.Menu_GetMenuItems(*args, **kwargs) def FindItem(*args, **kwargs): - """FindItem(self, wxString item) -> int""" - return __core.wxMenu_FindItem(*args, **kwargs) + """FindItem(self, String item) -> int""" + return _core_.Menu_FindItem(*args, **kwargs) def FindItemById(*args, **kwargs): - """FindItemById(self, int id) -> wxMenuItem""" - return __core.wxMenu_FindItemById(*args, **kwargs) + """FindItemById(self, int id) -> MenuItem""" + return _core_.Menu_FindItemById(*args, **kwargs) def FindItemByPosition(*args, **kwargs): - """FindItemByPosition(self, size_t position) -> wxMenuItem""" - return __core.wxMenu_FindItemByPosition(*args, **kwargs) + """FindItemByPosition(self, size_t position) -> MenuItem""" + return _core_.Menu_FindItemByPosition(*args, **kwargs) def Enable(*args, **kwargs): """Enable(self, int id, bool enable)""" - return __core.wxMenu_Enable(*args, **kwargs) + return _core_.Menu_Enable(*args, **kwargs) def IsEnabled(*args, **kwargs): """IsEnabled(self, int id) -> bool""" - return __core.wxMenu_IsEnabled(*args, **kwargs) + return _core_.Menu_IsEnabled(*args, **kwargs) def Check(*args, **kwargs): """Check(self, int id, bool check)""" - return __core.wxMenu_Check(*args, **kwargs) + return _core_.Menu_Check(*args, **kwargs) def IsChecked(*args, **kwargs): """IsChecked(self, int id) -> bool""" - return __core.wxMenu_IsChecked(*args, **kwargs) + return _core_.Menu_IsChecked(*args, **kwargs) def SetLabel(*args, **kwargs): - """SetLabel(self, int id, wxString label)""" - return __core.wxMenu_SetLabel(*args, **kwargs) + """SetLabel(self, int id, String label)""" + return _core_.Menu_SetLabel(*args, **kwargs) def GetLabel(*args, **kwargs): - """GetLabel(self, int id) -> wxString""" - return __core.wxMenu_GetLabel(*args, **kwargs) + """GetLabel(self, int id) -> String""" + return _core_.Menu_GetLabel(*args, **kwargs) def SetHelpString(*args, **kwargs): - """SetHelpString(self, int id, wxString helpString)""" - return __core.wxMenu_SetHelpString(*args, **kwargs) + """SetHelpString(self, int id, String helpString)""" + return _core_.Menu_SetHelpString(*args, **kwargs) def GetHelpString(*args, **kwargs): - """GetHelpString(self, int id) -> wxString""" - return __core.wxMenu_GetHelpString(*args, **kwargs) + """GetHelpString(self, int id) -> String""" + return _core_.Menu_GetHelpString(*args, **kwargs) def SetTitle(*args, **kwargs): - """SetTitle(self, wxString title)""" - return __core.wxMenu_SetTitle(*args, **kwargs) + """SetTitle(self, String title)""" + return _core_.Menu_SetTitle(*args, **kwargs) def GetTitle(*args, **kwargs): - """GetTitle(self) -> wxString""" - return __core.wxMenu_GetTitle(*args, **kwargs) + """GetTitle(self) -> String""" + return _core_.Menu_GetTitle(*args, **kwargs) def SetEventHandler(*args, **kwargs): - """SetEventHandler(self, wxEvtHandler handler)""" - return __core.wxMenu_SetEventHandler(*args, **kwargs) + """SetEventHandler(self, EvtHandler handler)""" + return _core_.Menu_SetEventHandler(*args, **kwargs) def GetEventHandler(*args, **kwargs): - """GetEventHandler(self) -> wxEvtHandler""" - return __core.wxMenu_GetEventHandler(*args, **kwargs) + """GetEventHandler(self) -> EvtHandler""" + return _core_.Menu_GetEventHandler(*args, **kwargs) def SetInvokingWindow(*args, **kwargs): - """SetInvokingWindow(self, wxWindow win)""" - return __core.wxMenu_SetInvokingWindow(*args, **kwargs) + """SetInvokingWindow(self, Window win)""" + return _core_.Menu_SetInvokingWindow(*args, **kwargs) def GetInvokingWindow(*args, **kwargs): - """GetInvokingWindow(self) -> wxWindow""" - return __core.wxMenu_GetInvokingWindow(*args, **kwargs) + """GetInvokingWindow(self) -> Window""" + return _core_.Menu_GetInvokingWindow(*args, **kwargs) def GetStyle(*args, **kwargs): """GetStyle(self) -> long""" - return __core.wxMenu_GetStyle(*args, **kwargs) + return _core_.Menu_GetStyle(*args, **kwargs) def UpdateUI(*args, **kwargs): - """UpdateUI(self, wxEvtHandler source=None)""" - return __core.wxMenu_UpdateUI(*args, **kwargs) + """UpdateUI(self, EvtHandler source=None)""" + return _core_.Menu_UpdateUI(*args, **kwargs) def GetMenuBar(*args, **kwargs): - """GetMenuBar(self) -> wxMenuBar""" - return __core.wxMenu_GetMenuBar(*args, **kwargs) + """GetMenuBar(self) -> MenuBar""" + return _core_.Menu_GetMenuBar(*args, **kwargs) def Attach(*args, **kwargs): """Attach(self, wxMenuBarBase menubar)""" - return __core.wxMenu_Attach(*args, **kwargs) + return _core_.Menu_Attach(*args, **kwargs) def Detach(*args, **kwargs): """Detach(self)""" - return __core.wxMenu_Detach(*args, **kwargs) + return _core_.Menu_Detach(*args, **kwargs) def IsAttached(*args, **kwargs): """IsAttached(self) -> bool""" - return __core.wxMenu_IsAttached(*args, **kwargs) + return _core_.Menu_IsAttached(*args, **kwargs) def SetParent(*args, **kwargs): - """SetParent(self, wxMenu parent)""" - return __core.wxMenu_SetParent(*args, **kwargs) + """SetParent(self, Menu parent)""" + return _core_.Menu_SetParent(*args, **kwargs) def GetParent(*args, **kwargs): - """GetParent(self) -> wxMenu""" - return __core.wxMenu_GetParent(*args, **kwargs) - - -class wxMenuPtr(wxMenu): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMenu -__core.wxMenu_swigregister(wxMenuPtr) -wxDefaultValidator = cvar.wxDefaultValidator + """GetParent(self) -> Menu""" + return _core_.Menu_GetParent(*args, **kwargs) + + EventHandler = property(GetEventHandler,SetEventHandler,doc="See `GetEventHandler` and `SetEventHandler`") + HelpString = property(GetHelpString,SetHelpString,doc="See `GetHelpString` and `SetHelpString`") + InvokingWindow = property(GetInvokingWindow,SetInvokingWindow,doc="See `GetInvokingWindow` and `SetInvokingWindow`") + MenuBar = property(GetMenuBar,doc="See `GetMenuBar`") + MenuItemCount = property(GetMenuItemCount,doc="See `GetMenuItemCount`") + MenuItems = property(GetMenuItems,doc="See `GetMenuItems`") + Parent = property(GetParent,SetParent,doc="See `GetParent` and `SetParent`") + Style = property(GetStyle,doc="See `GetStyle`") + Title = property(GetTitle,SetTitle,doc="See `GetTitle` and `SetTitle`") +_core_.Menu_swigregister(Menu) +DefaultValidator = cvar.DefaultValidator #--------------------------------------------------------------------------- -class wxMenuBar(wxWindow): - """Proxy of C++ wxMenuBar class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self, long style=0) -> wxMenuBar""" - newobj = __core.new_wxMenuBar(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown +class MenuBar(Window): + """Proxy of C++ MenuBar 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, long style=0) -> MenuBar""" + _core_.MenuBar_swiginit(self,_core_.new_MenuBar(*args, **kwargs)) self._setOORInfo(self) def Append(*args, **kwargs): - """Append(self, wxMenu menu, wxString title) -> bool""" - return __core.wxMenuBar_Append(*args, **kwargs) + """Append(self, Menu menu, String title) -> bool""" + return _core_.MenuBar_Append(*args, **kwargs) def Insert(*args, **kwargs): - """Insert(self, size_t pos, wxMenu menu, wxString title) -> bool""" - return __core.wxMenuBar_Insert(*args, **kwargs) + """Insert(self, size_t pos, Menu menu, String title) -> bool""" + return _core_.MenuBar_Insert(*args, **kwargs) def GetMenuCount(*args, **kwargs): """GetMenuCount(self) -> size_t""" - return __core.wxMenuBar_GetMenuCount(*args, **kwargs) + return _core_.MenuBar_GetMenuCount(*args, **kwargs) def GetMenu(*args, **kwargs): - """GetMenu(self, size_t pos) -> wxMenu""" - return __core.wxMenuBar_GetMenu(*args, **kwargs) + """GetMenu(self, size_t pos) -> Menu""" + return _core_.MenuBar_GetMenu(*args, **kwargs) def Replace(*args, **kwargs): - """Replace(self, size_t pos, wxMenu menu, wxString title) -> wxMenu""" - return __core.wxMenuBar_Replace(*args, **kwargs) + """Replace(self, size_t pos, Menu menu, String title) -> Menu""" + return _core_.MenuBar_Replace(*args, **kwargs) def Remove(*args, **kwargs): - """Remove(self, size_t pos) -> wxMenu""" - return __core.wxMenuBar_Remove(*args, **kwargs) + """Remove(self, size_t pos) -> Menu""" + return _core_.MenuBar_Remove(*args, **kwargs) def EnableTop(*args, **kwargs): """EnableTop(self, size_t pos, bool enable)""" - return __core.wxMenuBar_EnableTop(*args, **kwargs) + return _core_.MenuBar_EnableTop(*args, **kwargs) def IsEnabledTop(*args, **kwargs): """IsEnabledTop(self, size_t pos) -> bool""" - return __core.wxMenuBar_IsEnabledTop(*args, **kwargs) + return _core_.MenuBar_IsEnabledTop(*args, **kwargs) def SetLabelTop(*args, **kwargs): - """SetLabelTop(self, size_t pos, wxString label)""" - return __core.wxMenuBar_SetLabelTop(*args, **kwargs) + """SetLabelTop(self, size_t pos, String label)""" + return _core_.MenuBar_SetLabelTop(*args, **kwargs) def GetLabelTop(*args, **kwargs): - """GetLabelTop(self, size_t pos) -> wxString""" - return __core.wxMenuBar_GetLabelTop(*args, **kwargs) + """GetLabelTop(self, size_t pos) -> String""" + return _core_.MenuBar_GetLabelTop(*args, **kwargs) def FindMenuItem(*args, **kwargs): - """FindMenuItem(self, wxString menu, wxString item) -> int""" - return __core.wxMenuBar_FindMenuItem(*args, **kwargs) + """FindMenuItem(self, String menu, String item) -> int""" + return _core_.MenuBar_FindMenuItem(*args, **kwargs) def FindItemById(*args, **kwargs): - """FindItemById(self, int id) -> wxMenuItem""" - return __core.wxMenuBar_FindItemById(*args, **kwargs) + """FindItemById(self, int id) -> MenuItem""" + return _core_.MenuBar_FindItemById(*args, **kwargs) def FindMenu(*args, **kwargs): - """FindMenu(self, wxString title) -> int""" - return __core.wxMenuBar_FindMenu(*args, **kwargs) + """FindMenu(self, String title) -> int""" + return _core_.MenuBar_FindMenu(*args, **kwargs) def Enable(*args, **kwargs): """Enable(self, int id, bool enable)""" - return __core.wxMenuBar_Enable(*args, **kwargs) + return _core_.MenuBar_Enable(*args, **kwargs) def Check(*args, **kwargs): """Check(self, int id, bool check)""" - return __core.wxMenuBar_Check(*args, **kwargs) + return _core_.MenuBar_Check(*args, **kwargs) def IsChecked(*args, **kwargs): """IsChecked(self, int id) -> bool""" - return __core.wxMenuBar_IsChecked(*args, **kwargs) + return _core_.MenuBar_IsChecked(*args, **kwargs) def IsEnabled(*args, **kwargs): """IsEnabled(self, int id) -> bool""" - return __core.wxMenuBar_IsEnabled(*args, **kwargs) + return _core_.MenuBar_IsEnabled(*args, **kwargs) def SetLabel(*args, **kwargs): - """SetLabel(self, int id, wxString label)""" - return __core.wxMenuBar_SetLabel(*args, **kwargs) + """SetLabel(self, int id, String label)""" + return _core_.MenuBar_SetLabel(*args, **kwargs) def GetLabel(*args, **kwargs): - """GetLabel(self, int id) -> wxString""" - return __core.wxMenuBar_GetLabel(*args, **kwargs) + """GetLabel(self, int id) -> String""" + return _core_.MenuBar_GetLabel(*args, **kwargs) def SetHelpString(*args, **kwargs): - """SetHelpString(self, int id, wxString helpString)""" - return __core.wxMenuBar_SetHelpString(*args, **kwargs) + """SetHelpString(self, int id, String helpString)""" + return _core_.MenuBar_SetHelpString(*args, **kwargs) def GetHelpString(*args, **kwargs): - """GetHelpString(self, int id) -> wxString""" - return __core.wxMenuBar_GetHelpString(*args, **kwargs) + """GetHelpString(self, int id) -> String""" + return _core_.MenuBar_GetHelpString(*args, **kwargs) def GetFrame(*args, **kwargs): """GetFrame(self) -> wxFrame""" - return __core.wxMenuBar_GetFrame(*args, **kwargs) + return _core_.MenuBar_GetFrame(*args, **kwargs) def IsAttached(*args, **kwargs): """IsAttached(self) -> bool""" - return __core.wxMenuBar_IsAttached(*args, **kwargs) + return _core_.MenuBar_IsAttached(*args, **kwargs) def Attach(*args, **kwargs): """Attach(self, wxFrame frame)""" - return __core.wxMenuBar_Attach(*args, **kwargs) + return _core_.MenuBar_Attach(*args, **kwargs) def Detach(*args, **kwargs): """Detach(self)""" - return __core.wxMenuBar_Detach(*args, **kwargs) - - -class wxMenuBarPtr(wxMenuBar): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMenuBar -__core.wxMenuBar_swigregister(wxMenuBarPtr) + return _core_.MenuBar_Detach(*args, **kwargs) + + def UpdateMenus(*args, **kwargs): + """UpdateMenus(self)""" + return _core_.MenuBar_UpdateMenus(*args, **kwargs) + + def SetAutoWindowMenu(*args, **kwargs): + """SetAutoWindowMenu(bool enable)""" + return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs) + + SetAutoWindowMenu = staticmethod(SetAutoWindowMenu) + def GetAutoWindowMenu(*args, **kwargs): + """GetAutoWindowMenu() -> bool""" + return _core_.MenuBar_GetAutoWindowMenu(*args, **kwargs) + + GetAutoWindowMenu = staticmethod(GetAutoWindowMenu) + def GetMenus(self): + """Return a list of (menu, label) items for the menus in the MenuBar. """ + return [(self.GetMenu(i), self.GetLabelTop(i)) + for i in range(self.GetMenuCount())] + + def SetMenus(self, items): + """Clear and add new menus to the MenuBar from a list of (menu, label) items. """ + for i in range(self.GetMenuCount()-1, -1, -1): + self.Remove(i) + for m, l in items: + self.Append(m, l) + + Frame = property(GetFrame,doc="See `GetFrame`") + Menu = property(GetMenu,doc="See `GetMenu`") + MenuCount = property(GetMenuCount,doc="See `GetMenuCount`") + Menus = property(GetMenus,SetMenus,doc="See `GetMenus` and `SetMenus`") +_core_.MenuBar_swigregister(MenuBar) + +def MenuBar_SetAutoWindowMenu(*args, **kwargs): + """MenuBar_SetAutoWindowMenu(bool enable)""" + return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs) + +def MenuBar_GetAutoWindowMenu(*args): + """MenuBar_GetAutoWindowMenu() -> bool""" + return _core_.MenuBar_GetAutoWindowMenu(*args) #--------------------------------------------------------------------------- -class wxMenuItem(wxObject): - """Proxy of C++ wxMenuItem class""" - def __repr__(self): - return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): +class MenuItem(Object): + """Proxy of C++ MenuItem 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, wxMenu parentMenu=None, int id=wxID_ANY, wxString text=EmptyString, - wxString help=EmptyString, int kind=wxITEM_NORMAL, - wxMenu subMenu=None) -> wxMenuItem + __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString, + String help=EmptyString, int kind=ITEM_NORMAL, + Menu subMenu=None) -> MenuItem """ - newobj = __core.new_wxMenuItem(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs)) + __swig_destroy__ = _core_.delete_MenuItem + __del__ = lambda self : None; def GetMenu(*args, **kwargs): - """GetMenu(self) -> wxMenu""" - return __core.wxMenuItem_GetMenu(*args, **kwargs) + """GetMenu(self) -> Menu""" + return _core_.MenuItem_GetMenu(*args, **kwargs) def SetMenu(*args, **kwargs): - """SetMenu(self, wxMenu menu)""" - return __core.wxMenuItem_SetMenu(*args, **kwargs) + """SetMenu(self, Menu menu)""" + return _core_.MenuItem_SetMenu(*args, **kwargs) def SetId(*args, **kwargs): """SetId(self, int id)""" - return __core.wxMenuItem_SetId(*args, **kwargs) + return _core_.MenuItem_SetId(*args, **kwargs) def GetId(*args, **kwargs): """GetId(self) -> int""" - return __core.wxMenuItem_GetId(*args, **kwargs) + return _core_.MenuItem_GetId(*args, **kwargs) def IsSeparator(*args, **kwargs): """IsSeparator(self) -> bool""" - return __core.wxMenuItem_IsSeparator(*args, **kwargs) + return _core_.MenuItem_IsSeparator(*args, **kwargs) def SetText(*args, **kwargs): - """SetText(self, wxString str)""" - return __core.wxMenuItem_SetText(*args, **kwargs) + """SetText(self, String str)""" + return _core_.MenuItem_SetText(*args, **kwargs) def GetLabel(*args, **kwargs): - """GetLabel(self) -> wxString""" - return __core.wxMenuItem_GetLabel(*args, **kwargs) + """GetLabel(self) -> String""" + return _core_.MenuItem_GetLabel(*args, **kwargs) def GetText(*args, **kwargs): - """GetText(self) -> wxString""" - return __core.wxMenuItem_GetText(*args, **kwargs) + """GetText(self) -> String""" + return _core_.MenuItem_GetText(*args, **kwargs) def GetLabelFromText(*args, **kwargs): - """GetLabelFromText(wxString text) -> wxString""" - return __core.wxMenuItem_GetLabelFromText(*args, **kwargs) + """GetLabelFromText(String text) -> String""" + return _core_.MenuItem_GetLabelFromText(*args, **kwargs) GetLabelFromText = staticmethod(GetLabelFromText) def GetKind(*args, **kwargs): """GetKind(self) -> int""" - return __core.wxMenuItem_GetKind(*args, **kwargs) + return _core_.MenuItem_GetKind(*args, **kwargs) def SetKind(*args, **kwargs): """SetKind(self, int kind)""" - return __core.wxMenuItem_SetKind(*args, **kwargs) + return _core_.MenuItem_SetKind(*args, **kwargs) def SetCheckable(*args, **kwargs): """SetCheckable(self, bool checkable)""" - return __core.wxMenuItem_SetCheckable(*args, **kwargs) + return _core_.MenuItem_SetCheckable(*args, **kwargs) def IsCheckable(*args, **kwargs): """IsCheckable(self) -> bool""" - return __core.wxMenuItem_IsCheckable(*args, **kwargs) + return _core_.MenuItem_IsCheckable(*args, **kwargs) def IsSubMenu(*args, **kwargs): """IsSubMenu(self) -> bool""" - return __core.wxMenuItem_IsSubMenu(*args, **kwargs) + return _core_.MenuItem_IsSubMenu(*args, **kwargs) def SetSubMenu(*args, **kwargs): - """SetSubMenu(self, wxMenu menu)""" - return __core.wxMenuItem_SetSubMenu(*args, **kwargs) + """SetSubMenu(self, Menu menu)""" + return _core_.MenuItem_SetSubMenu(*args, **kwargs) def GetSubMenu(*args, **kwargs): - """GetSubMenu(self) -> wxMenu""" - return __core.wxMenuItem_GetSubMenu(*args, **kwargs) + """GetSubMenu(self) -> Menu""" + return _core_.MenuItem_GetSubMenu(*args, **kwargs) def Enable(*args, **kwargs): """Enable(self, bool enable=True)""" - return __core.wxMenuItem_Enable(*args, **kwargs) + return _core_.MenuItem_Enable(*args, **kwargs) def IsEnabled(*args, **kwargs): """IsEnabled(self) -> bool""" - return __core.wxMenuItem_IsEnabled(*args, **kwargs) + return _core_.MenuItem_IsEnabled(*args, **kwargs) def Check(*args, **kwargs): """Check(self, bool check=True)""" - return __core.wxMenuItem_Check(*args, **kwargs) + return _core_.MenuItem_Check(*args, **kwargs) def IsChecked(*args, **kwargs): """IsChecked(self) -> bool""" - return __core.wxMenuItem_IsChecked(*args, **kwargs) + return _core_.MenuItem_IsChecked(*args, **kwargs) def Toggle(*args, **kwargs): """Toggle(self)""" - return __core.wxMenuItem_Toggle(*args, **kwargs) + return _core_.MenuItem_Toggle(*args, **kwargs) def SetHelp(*args, **kwargs): - """SetHelp(self, wxString str)""" - return __core.wxMenuItem_SetHelp(*args, **kwargs) + """SetHelp(self, String str)""" + return _core_.MenuItem_SetHelp(*args, **kwargs) def GetHelp(*args, **kwargs): - """GetHelp(self) -> wxString""" - return __core.wxMenuItem_GetHelp(*args, **kwargs) + """GetHelp(self) -> String""" + return _core_.MenuItem_GetHelp(*args, **kwargs) def GetAccel(*args, **kwargs): - """GetAccel(self) -> wxAcceleratorEntry""" - return __core.wxMenuItem_GetAccel(*args, **kwargs) + """GetAccel(self) -> AcceleratorEntry""" + return _core_.MenuItem_GetAccel(*args, **kwargs) def SetAccel(*args, **kwargs): - """SetAccel(self, wxAcceleratorEntry accel)""" - return __core.wxMenuItem_SetAccel(*args, **kwargs) + """SetAccel(self, AcceleratorEntry accel)""" + return _core_.MenuItem_SetAccel(*args, **kwargs) + + def SetBitmap(*args, **kwargs): + """SetBitmap(self, Bitmap bitmap)""" + return _core_.MenuItem_SetBitmap(*args, **kwargs) + + def GetBitmap(*args, **kwargs): + """GetBitmap(self) -> Bitmap""" + return _core_.MenuItem_GetBitmap(*args, **kwargs) def SetFont(*args, **kwargs): - """SetFont(self, wxFont font)""" - return __core.wxMenuItem_SetFont(*args, **kwargs) + """SetFont(self, Font font)""" + return _core_.MenuItem_SetFont(*args, **kwargs) def GetFont(*args, **kwargs): - """GetFont(self) -> wxFont""" - return __core.wxMenuItem_GetFont(*args, **kwargs) + """GetFont(self) -> Font""" + return _core_.MenuItem_GetFont(*args, **kwargs) def SetTextColour(*args, **kwargs): - """SetTextColour(self, wxColour colText)""" - return __core.wxMenuItem_SetTextColour(*args, **kwargs) + """SetTextColour(self, Colour colText)""" + return _core_.MenuItem_SetTextColour(*args, **kwargs) def GetTextColour(*args, **kwargs): - """GetTextColour(self) -> wxColour""" - return __core.wxMenuItem_GetTextColour(*args, **kwargs) + """GetTextColour(self) -> Colour""" + return _core_.MenuItem_GetTextColour(*args, **kwargs) def SetBackgroundColour(*args, **kwargs): - """SetBackgroundColour(self, wxColour colBack)""" - return __core.wxMenuItem_SetBackgroundColour(*args, **kwargs) + """SetBackgroundColour(self, Colour colBack)""" + return _core_.MenuItem_SetBackgroundColour(*args, **kwargs) def GetBackgroundColour(*args, **kwargs): - """GetBackgroundColour(self) -> wxColour""" - return __core.wxMenuItem_GetBackgroundColour(*args, **kwargs) + """GetBackgroundColour(self) -> Colour""" + return _core_.MenuItem_GetBackgroundColour(*args, **kwargs) def SetBitmaps(*args, **kwargs): - """SetBitmaps(self, wxBitmap bmpChecked, wxBitmap bmpUnchecked=wxNullBitmap)""" - return __core.wxMenuItem_SetBitmaps(*args, **kwargs) + """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)""" + return _core_.MenuItem_SetBitmaps(*args, **kwargs) def SetDisabledBitmap(*args, **kwargs): - """SetDisabledBitmap(self, wxBitmap bmpDisabled)""" - return __core.wxMenuItem_SetDisabledBitmap(*args, **kwargs) + """SetDisabledBitmap(self, Bitmap bmpDisabled)""" + return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs) def GetDisabledBitmap(*args, **kwargs): - """GetDisabledBitmap(self) -> wxBitmap""" - return __core.wxMenuItem_GetDisabledBitmap(*args, **kwargs) + """GetDisabledBitmap(self) -> Bitmap""" + return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs) def SetMarginWidth(*args, **kwargs): """SetMarginWidth(self, int nWidth)""" - return __core.wxMenuItem_SetMarginWidth(*args, **kwargs) + return _core_.MenuItem_SetMarginWidth(*args, **kwargs) def GetMarginWidth(*args, **kwargs): """GetMarginWidth(self) -> int""" - return __core.wxMenuItem_GetMarginWidth(*args, **kwargs) + return _core_.MenuItem_GetMarginWidth(*args, **kwargs) def GetDefaultMarginWidth(*args, **kwargs): """GetDefaultMarginWidth() -> int""" - return __core.wxMenuItem_GetDefaultMarginWidth(*args, **kwargs) + return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs) GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth) def IsOwnerDrawn(*args, **kwargs): """IsOwnerDrawn(self) -> bool""" - return __core.wxMenuItem_IsOwnerDrawn(*args, **kwargs) + return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs) def SetOwnerDrawn(*args, **kwargs): """SetOwnerDrawn(self, bool ownerDrawn=True)""" - return __core.wxMenuItem_SetOwnerDrawn(*args, **kwargs) + return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs) def ResetOwnerDrawn(*args, **kwargs): """ResetOwnerDrawn(self)""" - return __core.wxMenuItem_ResetOwnerDrawn(*args, **kwargs) - - def SetBitmap(*args, **kwargs): - """SetBitmap(self, wxBitmap bitmap)""" - return __core.wxMenuItem_SetBitmap(*args, **kwargs) - - def GetBitmap(*args, **kwargs): - """GetBitmap(self) -> wxBitmap""" - return __core.wxMenuItem_GetBitmap(*args, **kwargs) - - -class wxMenuItemPtr(wxMenuItem): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxMenuItem -__core.wxMenuItem_swigregister(wxMenuItemPtr) - -def wxMenuItem_GetLabelFromText(*args, **kwargs): - """wxMenuItem_GetLabelFromText(wxString text) -> wxString""" - return __core.wxMenuItem_GetLabelFromText(*args, **kwargs) - -def wxMenuItem_GetDefaultMarginWidth(*args, **kwargs): - """wxMenuItem_GetDefaultMarginWidth() -> int""" - return __core.wxMenuItem_GetDefaultMarginWidth(*args, **kwargs) + return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs) + + Accel = property(GetAccel,SetAccel,doc="See `GetAccel` and `SetAccel`") + BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`") + Bitmap = property(GetBitmap,SetBitmap,doc="See `GetBitmap` and `SetBitmap`") + DisabledBitmap = property(GetDisabledBitmap,SetDisabledBitmap,doc="See `GetDisabledBitmap` and `SetDisabledBitmap`") + Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`") + Help = property(GetHelp,SetHelp,doc="See `GetHelp` and `SetHelp`") + Id = property(GetId,SetId,doc="See `GetId` and `SetId`") + Kind = property(GetKind,SetKind,doc="See `GetKind` and `SetKind`") + Label = property(GetLabel,doc="See `GetLabel`") + MarginWidth = property(GetMarginWidth,SetMarginWidth,doc="See `GetMarginWidth` and `SetMarginWidth`") + Menu = property(GetMenu,SetMenu,doc="See `GetMenu` and `SetMenu`") + SubMenu = property(GetSubMenu,SetSubMenu,doc="See `GetSubMenu` and `SetSubMenu`") + Text = property(GetText,SetText,doc="See `GetText` and `SetText`") + TextColour = property(GetTextColour,SetTextColour,doc="See `GetTextColour` and `SetTextColour`") +_core_.MenuItem_swigregister(MenuItem) + +def MenuItem_GetLabelFromText(*args, **kwargs): + """MenuItem_GetLabelFromText(String text) -> String""" + return _core_.MenuItem_GetLabelFromText(*args, **kwargs) + +def MenuItem_GetDefaultMarginWidth(*args): + """MenuItem_GetDefaultMarginWidth() -> int""" + return _core_.MenuItem_GetDefaultMarginWidth(*args) #--------------------------------------------------------------------------- -class wxControl(wxWindow): +class Control(Window): """ This is the base class for a control or 'widget'. A control is generally a small window which processes user input and/or displays one or more item of data. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition, - wxSize size=wxDefaultSize, long style=0, - wxValidator validator=wxDefaultValidator, - wxString name=ControlNameStr) -> wxControl + __init__(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, + String name=ControlNameStr) -> Control Create a Control. Normally you should only call this from a subclass' __init__ as a plain old wx.Control is not very useful. """ - newobj = __core.new_wxControl(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.Control_swiginit(self,_core_.new_Control(*args, **kwargs)) self._setOORInfo(self) def Create(*args, **kwargs): """ - Create(self, wxWindow parent, int id=-1, wxPoint pos=wxDefaultPosition, - wxSize size=wxDefaultSize, long style=0, - wxValidator validator=wxDefaultValidator, - wxString name=ControlNameStr) -> bool + Create(self, Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, Validator validator=DefaultValidator, + String name=ControlNameStr) -> bool Do the 2nd phase and create the GUI control. """ - return __core.wxControl_Create(*args, **kwargs) + return _core_.Control_Create(*args, **kwargs) - def Command(*args, **kwargs): + def GetAlignment(*args, **kwargs): """ - Command(self, wxCommandEvent event) - - Simulates the effect of the user issuing a command to the item. - - :see: `wx.CommandEvent` + GetAlignment(self) -> int + Get the control alignment (left/right/centre, top/bottom/centre) """ - return __core.wxControl_Command(*args, **kwargs) + return _core_.Control_GetAlignment(*args, **kwargs) - def GetLabel(*args, **kwargs): + def GetLabelText(*args, **kwargs): """ - GetLabel(self) -> wxString + GetLabelText(self) -> String - Return a control's text. + Get just the text of the label, without mnemonic characters ('&') """ - return __core.wxControl_GetLabel(*args, **kwargs) + return _core_.Control_GetLabelText(*args, **kwargs) - def SetLabel(*args, **kwargs): + def Command(*args, **kwargs): """ - SetLabel(self, wxString label) + Command(self, CommandEvent event) + + Simulates the effect of the user issuing a command to the item. + + :see: `wx.CommandEvent` - Sets the item's text. """ - return __core.wxControl_SetLabel(*args, **kwargs) + return _core_.Control_Command(*args, **kwargs) def GetClassDefaultAttributes(*args, **kwargs): """ - GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard @@ -9020,31 +11296,26 @@ class wxControl(wxWindow): the returned font. See `wx.Window.SetWindowVariant` for more about this. """ - return __core.wxControl_GetClassDefaultAttributes(*args, **kwargs) + return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) - -class wxControlPtr(wxControl): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxControl -__core.wxControl_swigregister(wxControlPtr) + Alignment = property(GetAlignment,doc="See `GetAlignment`") + LabelText = property(GetLabelText,doc="See `GetLabelText`") +_core_.Control_swigregister(Control) ControlNameStr = cvar.ControlNameStr def PreControl(*args, **kwargs): """ - PreControl() -> wxControl + PreControl() -> Control Precreate a Control control for 2-phase creation """ - val = __core.new_PreControl(*args, **kwargs) - val.thisown = 1 + val = _core_.new_PreControl(*args, **kwargs) return val -def wxControl_GetClassDefaultAttributes(*args, **kwargs): - """ - wxControl_GetClassDefaultAttributes(int variant=wxWINDOW_VARIANT_NORMAL) -> wxVisualAttributes +def Control_GetClassDefaultAttributes(*args, **kwargs): + """ + Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes Get the default attributes for this class. This is useful if you want to use the same font or colour in your own control as in a standard @@ -9057,11 +11328,11 @@ def wxControl_GetClassDefaultAttributes(*args, **kwargs): the returned font. See `wx.Window.SetWindowVariant` for more about this. """ - return __core.wxControl_GetClassDefaultAttributes(*args, **kwargs) + return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- -class wxItemContainer(object): +class ItemContainer(object): """ The wx.ItemContainer class defines an interface which is implemented by all controls which have string subitems, each of which may be @@ -9077,19 +11348,19 @@ class wxItemContainer(object): optionally, client data associated with them. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def Append(*args, **kwargs): """ - Append(self, wxString item, PyObject clientData=None) -> int + Append(self, String item, 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 which may be different from the last one if the control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style). """ - return __core.wxItemContainer_Append(*args, **kwargs) + return _core_.ItemContainer_Append(*args, **kwargs) def AppendItems(*args, **kwargs): """ @@ -9099,16 +11370,16 @@ class wxItemContainer(object): method may be much faster than appending the items one by one if you need to add a lot of items. """ - return __core.wxItemContainer_AppendItems(*args, **kwargs) + return _core_.ItemContainer_AppendItems(*args, **kwargs) def Insert(*args, **kwargs): """ - Insert(self, wxString item, int pos, PyObject clientData=None) -> int + Insert(self, String item, 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 __core.wxItemContainer_Insert(*args, **kwargs) + return _core_.ItemContainer_Insert(*args, **kwargs) def Clear(*args, **kwargs): """ @@ -9116,42 +11387,42 @@ class wxItemContainer(object): Removes all items from the control. """ - return __core.wxItemContainer_Clear(*args, **kwargs) + return _core_.ItemContainer_Clear(*args, **kwargs) def Delete(*args, **kwargs): """ - Delete(self, int n) + Delete(self, unsigned int n) Deletes the item at the zero-based index 'n' from the control. Note that it is an error (signalled by a `wx.PyAssertionError` exception if enabled) to remove an item with the index negative or greater or equal than the number of items in the control. """ - return __core.wxItemContainer_Delete(*args, **kwargs) + return _core_.ItemContainer_Delete(*args, **kwargs) def GetClientData(*args, **kwargs): """ - GetClientData(self, int n) -> PyObject + GetClientData(self, unsigned int n) -> PyObject Returns the client data associated with the given item, (if any.) """ - return __core.wxItemContainer_GetClientData(*args, **kwargs) + return _core_.ItemContainer_GetClientData(*args, **kwargs) def SetClientData(*args, **kwargs): """ - SetClientData(self, int n, PyObject clientData) + SetClientData(self, unsigned int n, PyObject clientData) Associate the given client data with the item at position n. """ - return __core.wxItemContainer_SetClientData(*args, **kwargs) + return _core_.ItemContainer_SetClientData(*args, **kwargs) def GetCount(*args, **kwargs): """ - GetCount(self) -> int + GetCount(self) -> unsigned int Returns the number of items in the control. """ - return __core.wxItemContainer_GetCount(*args, **kwargs) + return _core_.ItemContainer_GetCount(*args, **kwargs) def IsEmpty(*args, **kwargs): """ @@ -9159,37 +11430,37 @@ class wxItemContainer(object): Returns True if the control is empty or False if it has some items. """ - return __core.wxItemContainer_IsEmpty(*args, **kwargs) + return _core_.ItemContainer_IsEmpty(*args, **kwargs) def GetString(*args, **kwargs): """ - GetString(self, int n) -> wxString + GetString(self, unsigned int n) -> String Returns the label of the item with the given index. """ - return __core.wxItemContainer_GetString(*args, **kwargs) + return _core_.ItemContainer_GetString(*args, **kwargs) def GetStrings(*args, **kwargs): """GetStrings(self) -> wxArrayString""" - return __core.wxItemContainer_GetStrings(*args, **kwargs) + return _core_.ItemContainer_GetStrings(*args, **kwargs) def SetString(*args, **kwargs): """ - SetString(self, int n, wxString s) + SetString(self, unsigned int n, String s) Sets the label for the given item. """ - return __core.wxItemContainer_SetString(*args, **kwargs) + return _core_.ItemContainer_SetString(*args, **kwargs) def FindString(*args, **kwargs): """ - FindString(self, wxString s) -> int + FindString(self, String s) -> int Finds an item whose label matches the given string. Returns the zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not found. """ - return __core.wxItemContainer_FindString(*args, **kwargs) + return _core_.ItemContainer_FindString(*args, **kwargs) def SetSelection(*args, **kwargs): """ @@ -9197,7 +11468,7 @@ class wxItemContainer(object): Sets the item at index 'n' to be the selected item. """ - return __core.wxItemContainer_SetSelection(*args, **kwargs) + return _core_.ItemContainer_SetSelection(*args, **kwargs) def GetSelection(*args, **kwargs): """ @@ -9206,20 +11477,20 @@ class wxItemContainer(object): Returns the index of the selected item or ``wx.NOT_FOUND`` if no item is selected. """ - return __core.wxItemContainer_GetSelection(*args, **kwargs) + return _core_.ItemContainer_GetSelection(*args, **kwargs) def SetStringSelection(*args, **kwargs): - """SetStringSelection(self, wxString s) -> bool""" - return __core.wxItemContainer_SetStringSelection(*args, **kwargs) + """SetStringSelection(self, String s) -> bool""" + return _core_.ItemContainer_SetStringSelection(*args, **kwargs) def GetStringSelection(*args, **kwargs): """ - GetStringSelection(self) -> wxString + GetStringSelection(self) -> String Returns the label of the selected item or an empty string if no item is selected. """ - return __core.wxItemContainer_GetStringSelection(*args, **kwargs) + return _core_.ItemContainer_GetStringSelection(*args, **kwargs) def Select(*args, **kwargs): """ @@ -9228,52 +11499,58 @@ class wxItemContainer(object): This is the same as `SetSelection` and exists only because it is slightly more natural for controls which support multiple selection. """ - return __core.wxItemContainer_Select(*args, **kwargs) - + return _core_.ItemContainer_Select(*args, **kwargs) -class wxItemContainerPtr(wxItemContainer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxItemContainer -__core.wxItemContainer_swigregister(wxItemContainerPtr) + def GetItems(self): + """Return a list of the strings in the control""" + return [self.GetString(i) for i in xrange(self.GetCount())] + + def SetItems(self, items): + """Clear and set the strings in the control from a list""" + self.Clear() + for i in items: + self.Append(i) + + Count = property(GetCount,doc="See `GetCount`") + Items = property(GetItems,SetItems,doc="See `GetItems` and `SetItems`") + Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`") + StringSelection = property(GetStringSelection,SetStringSelection,doc="See `GetStringSelection` and `SetStringSelection`") + Strings = property(GetStrings,doc="See `GetStrings`") +_core_.ItemContainer_swigregister(ItemContainer) #--------------------------------------------------------------------------- -class wxControlWithItems(wxControl,wxItemContainer): +class ControlWithItems(Control,ItemContainer): """ wx.ControlWithItems combines the ``wx.ItemContainer`` class with the wx.Control class, and is used for the base class of various controls that have items. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - -class wxControlWithItemsPtr(wxControlWithItems): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxControlWithItems -__core.wxControlWithItems_swigregister(wxControlWithItemsPtr) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr +_core_.ControlWithItems_swigregister(ControlWithItems) #--------------------------------------------------------------------------- -class wxSizerItem(wxObject): +class SizerItem(Object): """ The wx.SizerItem class is used to track the position, size and other - attributes of each item managed by a `wx.Sizer`. In normal usage user - code should never need to deal directly with a wx.SizerItem, but - custom classes derived from `wx.PySizer` will probably need to use the - collection of wx.SizerItems held by wx.Sizer when calculating layout. + attributes of each item managed by a `wx.Sizer`. It is not usually + necessary to use this class because the sizer elements can also be + identified by their positions or window or sizer references but + sometimes it may be more convenient to use wx.SizerItem directly. + Also, custom classes derived from `wx.PySizer` will probably need to + use the collection of wx.SizerItems held by wx.Sizer when calculating + layout. :see: `wx.Sizer`, `wx.GBSizerItem` """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> wxSizerItem + __init__(self) -> SizerItem Constructs an empty wx.SizerItem. Either a window, sizer or spacer size will need to be set before this item can be used in a Sizer. @@ -9284,10 +11561,9 @@ class wxSizerItem(wxObject): :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer` """ - newobj = __core.new_wxSizerItem(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.SizerItem_swiginit(self,_core_.new_SizerItem(*args, **kwargs)) + __swig_destroy__ = _core_.delete_SizerItem + __del__ = lambda self : None; def DeleteWindows(*args, **kwargs): """ DeleteWindows(self) @@ -9295,7 +11571,7 @@ class wxSizerItem(wxObject): Destroy the window or the windows in a subsizer, depending on the type of item. """ - return __core.wxSizerItem_DeleteWindows(*args, **kwargs) + return _core_.SizerItem_DeleteWindows(*args, **kwargs) def DetachSizer(*args, **kwargs): """ @@ -9303,56 +11579,56 @@ class wxSizerItem(wxObject): Enable deleting the SizerItem without destroying the contained sizer. """ - return __core.wxSizerItem_DetachSizer(*args, **kwargs) + return _core_.SizerItem_DetachSizer(*args, **kwargs) def GetSize(*args, **kwargs): """ - GetSize(self) -> wxSize + GetSize(self) -> Size Get the current size of the item, as set in the last Layout. """ - return __core.wxSizerItem_GetSize(*args, **kwargs) + return _core_.SizerItem_GetSize(*args, **kwargs) def CalcMin(*args, **kwargs): """ - CalcMin(self) -> wxSize + CalcMin(self) -> Size Calculates the minimum desired size for the item, including any space needed by borders. """ - return __core.wxSizerItem_CalcMin(*args, **kwargs) + return _core_.SizerItem_CalcMin(*args, **kwargs) def SetDimension(*args, **kwargs): """ - SetDimension(self, wxPoint pos, wxSize size) + SetDimension(self, Point pos, Size size) Set the position and size of the space allocated for this item by the sizer, and adjust the position and size of the item (window or subsizer) to be within that space taking alignment and borders into account. """ - return __core.wxSizerItem_SetDimension(*args, **kwargs) + return _core_.SizerItem_SetDimension(*args, **kwargs) def GetMinSize(*args, **kwargs): """ - GetMinSize(self) -> wxSize + GetMinSize(self) -> Size Get the minimum size needed for the item. """ - return __core.wxSizerItem_GetMinSize(*args, **kwargs) + return _core_.SizerItem_GetMinSize(*args, **kwargs) def GetMinSizeWithBorder(*args, **kwargs): """ - GetMinSizeWithBorder(self) -> wxSize + GetMinSizeWithBorder(self) -> Size Get the minimum size needed for the item with space for the borders added, if needed. """ - return __core.wxSizerItem_GetMinSizeWithBorder(*args, **kwargs) + return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) def SetInitSize(*args, **kwargs): """SetInitSize(self, int x, int y)""" - return __core.wxSizerItem_SetInitSize(*args, **kwargs) + return _core_.SizerItem_SetInitSize(*args, **kwargs) def SetRatioWH(*args, **kwargs): """ @@ -9360,15 +11636,15 @@ class wxSizerItem(wxObject): Set the ratio item attribute. """ - return __core.wxSizerItem_SetRatioWH(*args, **kwargs) + return _core_.SizerItem_SetRatioWH(*args, **kwargs) def SetRatioSize(*args, **kwargs): """ - SetRatioSize(self, wxSize size) + SetRatioSize(self, Size size) Set the ratio item attribute. """ - return __core.wxSizerItem_SetRatioSize(*args, **kwargs) + return _core_.SizerItem_SetRatioSize(*args, **kwargs) def SetRatio(*args, **kwargs): """ @@ -9376,7 +11652,7 @@ class wxSizerItem(wxObject): Set the ratio item attribute. """ - return __core.wxSizerItem_SetRatio(*args, **kwargs) + return _core_.SizerItem_SetRatio(*args, **kwargs) def GetRatio(*args, **kwargs): """ @@ -9384,15 +11660,15 @@ class wxSizerItem(wxObject): Set the ratio item attribute. """ - return __core.wxSizerItem_GetRatio(*args, **kwargs) + return _core_.SizerItem_GetRatio(*args, **kwargs) def GetRect(*args, **kwargs): """ - GetRect(self) -> wxRect + GetRect(self) -> Rect Returns the rectangle that the sizer item should occupy """ - return __core.wxSizerItem_GetRect(*args, **kwargs) + return _core_.SizerItem_GetRect(*args, **kwargs) def IsWindow(*args, **kwargs): """ @@ -9400,7 +11676,7 @@ class wxSizerItem(wxObject): Is this sizer item a window? """ - return __core.wxSizerItem_IsWindow(*args, **kwargs) + return _core_.SizerItem_IsWindow(*args, **kwargs) def IsSizer(*args, **kwargs): """ @@ -9408,7 +11684,7 @@ class wxSizerItem(wxObject): Is this sizer item a subsizer? """ - return __core.wxSizerItem_IsSizer(*args, **kwargs) + return _core_.SizerItem_IsSizer(*args, **kwargs) def IsSpacer(*args, **kwargs): """ @@ -9416,7 +11692,7 @@ class wxSizerItem(wxObject): Is this sizer item a spacer? """ - return __core.wxSizerItem_IsSpacer(*args, **kwargs) + return _core_.SizerItem_IsSpacer(*args, **kwargs) def SetProportion(*args, **kwargs): """ @@ -9424,7 +11700,7 @@ class wxSizerItem(wxObject): Set the proportion value for this item. """ - return __core.wxSizerItem_SetProportion(*args, **kwargs) + return _core_.SizerItem_SetProportion(*args, **kwargs) def GetProportion(*args, **kwargs): """ @@ -9432,7 +11708,7 @@ class wxSizerItem(wxObject): Get the proportion value for this item. """ - return __core.wxSizerItem_GetProportion(*args, **kwargs) + return _core_.SizerItem_GetProportion(*args, **kwargs) SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.") GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.") @@ -9442,7 +11718,7 @@ class wxSizerItem(wxObject): Set the flag value for this item. """ - return __core.wxSizerItem_SetFlag(*args, **kwargs) + return _core_.SizerItem_SetFlag(*args, **kwargs) def GetFlag(*args, **kwargs): """ @@ -9450,7 +11726,7 @@ class wxSizerItem(wxObject): Get the flag value for this item. """ - return __core.wxSizerItem_GetFlag(*args, **kwargs) + return _core_.SizerItem_GetFlag(*args, **kwargs) def SetBorder(*args, **kwargs): """ @@ -9458,7 +11734,7 @@ class wxSizerItem(wxObject): Set the border value for this item. """ - return __core.wxSizerItem_SetBorder(*args, **kwargs) + return _core_.SizerItem_SetBorder(*args, **kwargs) def GetBorder(*args, **kwargs): """ @@ -9466,55 +11742,55 @@ class wxSizerItem(wxObject): Get the border value for this item. """ - return __core.wxSizerItem_GetBorder(*args, **kwargs) + return _core_.SizerItem_GetBorder(*args, **kwargs) def GetWindow(*args, **kwargs): """ - GetWindow(self) -> wxWindow + GetWindow(self) -> Window Get the window (if any) that is managed by this sizer item. """ - return __core.wxSizerItem_GetWindow(*args, **kwargs) + return _core_.SizerItem_GetWindow(*args, **kwargs) def SetWindow(*args, **kwargs): """ - SetWindow(self, wxWindow window) + SetWindow(self, Window window) Set the window to be managed by this sizer item. """ - return __core.wxSizerItem_SetWindow(*args, **kwargs) + return _core_.SizerItem_SetWindow(*args, **kwargs) def GetSizer(*args, **kwargs): """ - GetSizer(self) -> wxSizer + GetSizer(self) -> Sizer Get the subsizer (if any) that is managed by this sizer item. """ - return __core.wxSizerItem_GetSizer(*args, **kwargs) + return _core_.SizerItem_GetSizer(*args, **kwargs) def SetSizer(*args, **kwargs): """ - SetSizer(self, wxSizer sizer) + SetSizer(self, Sizer sizer) Set the subsizer to be managed by this sizer item. """ - return __core.wxSizerItem_SetSizer(*args, **kwargs) + return _core_.SizerItem_SetSizer(*args, **kwargs) def GetSpacer(*args, **kwargs): """ - GetSpacer(self) -> wxSize + GetSpacer(self) -> Size Get the size of the spacer managed by this sizer item. """ - return __core.wxSizerItem_GetSpacer(*args, **kwargs) + return _core_.SizerItem_GetSpacer(*args, **kwargs) def SetSpacer(*args, **kwargs): """ - SetSpacer(self, wxSize size) + SetSpacer(self, Size size) Set the size of the spacer to be managed by this sizer item. """ - return __core.wxSizerItem_SetSpacer(*args, **kwargs) + return _core_.SizerItem_SetSpacer(*args, **kwargs) def Show(*args, **kwargs): """ @@ -9524,7 +11800,7 @@ class wxSizerItem(wxObject): is to be made part of the layout or not. If the item is tracking a window then it is shown or hidden as needed. """ - return __core.wxSizerItem_Show(*args, **kwargs) + return _core_.SizerItem_Show(*args, **kwargs) def IsShown(*args, **kwargs): """ @@ -9532,15 +11808,15 @@ class wxSizerItem(wxObject): Is the item to be shown in the layout? """ - return __core.wxSizerItem_IsShown(*args, **kwargs) + return _core_.SizerItem_IsShown(*args, **kwargs) def GetPosition(*args, **kwargs): """ - GetPosition(self) -> wxPoint + GetPosition(self) -> Point Returns the current position of the item, as set in the last Layout. """ - return __core.wxSizerItem_GetPosition(*args, **kwargs) + return _core_.SizerItem_GetPosition(*args, **kwargs) def GetUserData(*args, **kwargs): """ @@ -9549,56 +11825,68 @@ class wxSizerItem(wxObject): Returns the userData associated with this sizer item, or None if there isn't any. """ - return __core.wxSizerItem_GetUserData(*args, **kwargs) + return _core_.SizerItem_GetUserData(*args, **kwargs) + + def SetUserData(*args, **kwargs): + """ + SetUserData(self, PyObject userData) + Associate a Python object with this sizer item. + """ + return _core_.SizerItem_SetUserData(*args, **kwargs) -class wxSizerItemPtr(wxSizerItem): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSizerItem -__core.wxSizerItem_swigregister(wxSizerItemPtr) + Border = property(GetBorder,SetBorder,doc="See `GetBorder` and `SetBorder`") + Flag = property(GetFlag,SetFlag,doc="See `GetFlag` and `SetFlag`") + MinSize = property(GetMinSize,doc="See `GetMinSize`") + MinSizeWithBorder = property(GetMinSizeWithBorder,doc="See `GetMinSizeWithBorder`") + Position = property(GetPosition,doc="See `GetPosition`") + Proportion = property(GetProportion,SetProportion,doc="See `GetProportion` and `SetProportion`") + Ratio = property(GetRatio,SetRatio,doc="See `GetRatio` and `SetRatio`") + Rect = property(GetRect,doc="See `GetRect`") + Size = property(GetSize,doc="See `GetSize`") + Sizer = property(GetSizer,SetSizer,doc="See `GetSizer` and `SetSizer`") + Spacer = property(GetSpacer,SetSpacer,doc="See `GetSpacer` and `SetSpacer`") + UserData = property(GetUserData,SetUserData,doc="See `GetUserData` and `SetUserData`") + Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`") +_core_.SizerItem_swigregister(SizerItem) def SizerItemWindow(*args, **kwargs): """ - SizerItemWindow(wxWindow window, int proportion, int flag, int border, - PyObject userData=None) -> wxSizerItem + SizerItemWindow(Window window, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem Constructs a `wx.SizerItem` for tracking a window. """ - val = __core.new_SizerItemWindow(*args, **kwargs) - val.thisown = 1 + val = _core_.new_SizerItemWindow(*args, **kwargs) return val def SizerItemSpacer(*args, **kwargs): """ SizerItemSpacer(int width, int height, int proportion, int flag, int border, - PyObject userData=None) -> wxSizerItem + PyObject userData=None) -> SizerItem Constructs a `wx.SizerItem` for tracking a spacer. """ - val = __core.new_SizerItemSpacer(*args, **kwargs) - val.thisown = 1 + val = _core_.new_SizerItemSpacer(*args, **kwargs) return val def SizerItemSizer(*args, **kwargs): """ - SizerItemSizer(wxSizer sizer, int proportion, int flag, int border, - PyObject userData=None) -> wxSizerItem + SizerItemSizer(Sizer sizer, int proportion, int flag, int border, + PyObject userData=None) -> SizerItem Constructs a `wx.SizerItem` for tracking a subsizer """ - val = __core.new_SizerItemSizer(*args, **kwargs) - val.thisown = 1 + val = _core_.new_SizerItemSizer(*args, **kwargs) return val -class wxSizer(wxObject): +class Sizer(Object): """ wx.Sizer is the abstract base class used for laying out subwindows in a window. You cannot use wx.Sizer directly; instead, you will have to use one of the sizer classes derived from it such as `wx.BoxSizer`, - `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer` - and `wx.GridBagSizer`. + `wx.StaticBoxSizer`, `wx.GridSizer`, `wx.FlexGridSizer` and + `wx.GridBagSizer`. The concept implemented by sizers in wxWidgets is closely related to layout tools in other GUI toolkits, such as Java's AWT, the GTK @@ -9622,12 +11910,14 @@ class wxSizer(wxObject): more space than on Windows, then the initial size of a dialog using a sizer will automatically be bigger on Mac than on Windows. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr + __swig_destroy__ = _core_.delete_Sizer + __del__ = lambda self : None; def _setOORInfo(*args, **kwargs): """_setOORInfo(self, PyObject _self)""" - return __core.wxSizer__setOORInfo(*args, **kwargs) + return _core_.Sizer__setOORInfo(*args, **kwargs) def Add(*args, **kwargs): """ @@ -9636,7 +11926,7 @@ class wxSizer(wxObject): Appends a child item to the sizer. """ - return __core.wxSizer_Add(*args, **kwargs) + return _core_.Sizer_Add(*args, **kwargs) def Insert(*args, **kwargs): """ @@ -9646,7 +11936,7 @@ class wxSizer(wxObject): Inserts a new item into the list of items managed by this sizer before the item at index *before*. See `Add` for a description of the parameters. """ - return __core.wxSizer_Insert(*args, **kwargs) + return _core_.Sizer_Insert(*args, **kwargs) def Prepend(*args, **kwargs): """ @@ -9656,7 +11946,7 @@ class wxSizer(wxObject): Adds a new item to the begining of the list of sizer items managed by this sizer. See `Add` for a description of the parameters. """ - return __core.wxSizer_Prepend(*args, **kwargs) + return _core_.Sizer_Prepend(*args, **kwargs) def Remove(*args, **kwargs): """ @@ -9669,7 +11959,7 @@ class wxSizer(wxObject): index of an item to remove. Returns True if the child item was found and removed. """ - return __core.wxSizer_Remove(*args, **kwargs) + return _core_.Sizer_Remove(*args, **kwargs) def Detach(*args, **kwargs): """ @@ -9681,7 +11971,7 @@ class wxSizer(wxObject): zero-based index of the item to be detached. Returns True if the child item was found and detached. """ - return __core.wxSizer_Detach(*args, **kwargs) + return _core_.Sizer_Detach(*args, **kwargs) def GetItem(*args, **kwargs): """ @@ -9689,13 +11979,64 @@ class wxSizer(wxObject): Returns the `wx.SizerItem` which holds the *item* given. The *item* parameter can be either a window, a sizer, or the zero-based index of - the item to be detached. + the item to be found. """ - return __core.wxSizer_GetItem(*args, **kwargs) + return _core_.Sizer_GetItem(*args, **kwargs) def _SetItemMinSize(*args, **kwargs): - """_SetItemMinSize(self, PyObject item, wxSize size)""" - return __core.wxSizer__SetItemMinSize(*args, **kwargs) + """_SetItemMinSize(self, PyObject item, Size size)""" + return _core_.Sizer__SetItemMinSize(*args, **kwargs) + + def _ReplaceWin(*args, **kwargs): + """_ReplaceWin(self, Window oldwin, Window newwin, bool recursive=False) -> bool""" + return _core_.Sizer__ReplaceWin(*args, **kwargs) + + def _ReplaceSizer(*args, **kwargs): + """_ReplaceSizer(self, Sizer oldsz, Sizer newsz, bool recursive=False) -> bool""" + return _core_.Sizer__ReplaceSizer(*args, **kwargs) + + def _ReplaceItem(*args, **kwargs): + """_ReplaceItem(self, size_t index, SizerItem newitem) -> bool""" + return _core_.Sizer__ReplaceItem(*args, **kwargs) + + def Replace(self, olditem, item, recursive=False): + """ + Detaches the given ``olditem`` from the sizer and replaces it with + ``item`` which can be a window, sizer, or `wx.SizerItem`. The + detached child is destroyed only if it is not a window, (because + windows are owned by their parent, not the sizer.) The + ``recursive`` parameter can be used to search for the given + element recursivly in subsizers. + + This method does not cause any layout or resizing to take place, + call `Layout` to do so. + + Returns ``True`` if the child item was found and removed. + """ + if isinstance(olditem, wx.Window): + return self._ReplaceWin(olditem, item, recursive) + elif isinstnace(olditem, wx.Sizer): + return self._ReplaceSizer(olditem, item, recursive) + elif isinstnace(olditem, int): + return self._ReplaceItem(olditem, item) + else: + raise TypeError("Expected Window, Sizer, or integer for first parameter.") + + def SetContainingWindow(*args, **kwargs): + """ + SetContainingWindow(self, Window window) + + Set (or unset) the window this sizer is used in. + """ + return _core_.Sizer_SetContainingWindow(*args, **kwargs) + + def GetContainingWindow(*args, **kwargs): + """ + GetContainingWindow(self) -> Window + + Get the window this sizer is used in. + """ + return _core_.Sizer_GetContainingWindow(*args, **kwargs) def SetItemMinSize(self, item, *args): """ @@ -9718,7 +12059,7 @@ class wxSizer(wxObject): Adds a `wx.SizerItem` to the sizer. """ - return __core.wxSizer_AddItem(*args, **kwargs) + return _core_.Sizer_AddItem(*args, **kwargs) def InsertItem(*args, **kwargs): """ @@ -9726,7 +12067,7 @@ class wxSizer(wxObject): Inserts a `wx.SizerItem` to the sizer at the position given by *index*. """ - return __core.wxSizer_InsertItem(*args, **kwargs) + return _core_.Sizer_InsertItem(*args, **kwargs) def PrependItem(*args, **kwargs): """ @@ -9734,7 +12075,7 @@ class wxSizer(wxObject): Prepends a `wx.SizerItem` to the sizer. """ - return __core.wxSizer_PrependItem(*args, **kwargs) + return _core_.Sizer_PrependItem(*args, **kwargs) def AddMany(self, items): """ @@ -9748,6 +12089,50 @@ class wxSizer(wxObject): item = (item, ) self.Add(*item) + def AddSpacer(self, *args, **kw): + """AddSpacer(int size) --> SizerItem + + Add a spacer that is (size,size) pixels. + """ + if args and type(args[0]) == int: + return self.Add( (args[0],args[0] ), 0) + else: # otherwise stay compatible with old AddSpacer + return self.Add(*args, **kw) + def PrependSpacer(self, *args, **kw): + """PrependSpacer(int size) --> SizerItem + + Prepend a spacer that is (size, size) pixels.""" + if args and type(args[0]) == int: + return self.Prepend( (args[0],args[0] ), 0) + else: # otherwise stay compatible with old PrependSpacer + return self.Prepend(*args, **kw) + def InsertSpacer(self, index, *args, **kw): + """InsertSpacer(int index, int size) --> SizerItem + + Insert a spacer at position index that is (size, size) pixels.""" + if args and type(args[0]) == int: + return self.Insert( index, (args[0],args[0] ), 0) + else: # otherwise stay compatible with old InsertSpacer + return self.Insert(index, *args, **kw) + + + def AddStretchSpacer(self, prop=1): + """AddStretchSpacer(int prop=1) --> SizerItem + + Add a stretchable spacer.""" + return self.Add((0,0), prop) + def PrependStretchSpacer(self, prop=1): + """PrependStretchSpacer(int prop=1) --> SizerItem + + Prepend a stretchable spacer.""" + return self.Prepend((0,0), prop) + def InsertStretchSpacer(self, index, prop=1): + """InsertStretchSpacer(int index, int prop=1) --> SizerItem + + Insert a stretchable spacer.""" + return self.Insert(index, (0,0), prop) + + # for backwards compatibility only, please do not use in new code def AddWindow(self, *args, **kw): """Compatibility alias for `Add`.""" @@ -9755,9 +12140,6 @@ class wxSizer(wxObject): def AddSizer(self, *args, **kw): """Compatibility alias for `Add`.""" return self.Add(*args, **kw) - def AddSpacer(self, *args, **kw): - """Compatibility alias for `Add`.""" - return self.Add(*args, **kw) def PrependWindow(self, *args, **kw): """Compatibility alias for `Prepend`.""" @@ -9765,9 +12147,6 @@ class wxSizer(wxObject): def PrependSizer(self, *args, **kw): """Compatibility alias for `Prepend`.""" return self.Prepend(*args, **kw) - def PrependSpacer(self, *args, **kw): - """Compatibility alias for `Prepend`.""" - return self.Prepend(*args, **kw) def InsertWindow(self, *args, **kw): """Compatibility alias for `Insert`.""" @@ -9775,9 +12154,6 @@ class wxSizer(wxObject): def InsertSizer(self, *args, **kw): """Compatibility alias for `Insert`.""" return self.Insert(*args, **kw) - def InsertSpacer(self, *args, **kw): - """Compatibility alias for `Insert`.""" - return self.Insert(*args, **kw) def RemoveWindow(self, *args, **kw): """Compatibility alias for `Remove`.""" @@ -9799,11 +12175,11 @@ class wxSizer(wxObject): the rules defined by the parameter in the `Add`, `Insert` or `Prepend` methods. """ - return __core.wxSizer_SetDimension(*args, **kwargs) + return _core_.Sizer_SetDimension(*args, **kwargs) def SetMinSize(*args, **kwargs): """ - SetMinSize(self, wxSize size) + SetMinSize(self, Size size) Call this to give the sizer a minimal size. Normally, the sizer will calculate its minimal size based purely on how much space its children @@ -9811,33 +12187,33 @@ class wxSizer(wxObject): minimal size as requested by its children or the minimal size set here, depending on which is bigger. """ - return __core.wxSizer_SetMinSize(*args, **kwargs) + return _core_.Sizer_SetMinSize(*args, **kwargs) def GetSize(*args, **kwargs): """ - GetSize(self) -> wxSize + GetSize(self) -> Size Returns the current size of the space managed by the sizer. """ - return __core.wxSizer_GetSize(*args, **kwargs) + return _core_.Sizer_GetSize(*args, **kwargs) def GetPosition(*args, **kwargs): """ - GetPosition(self) -> wxPoint + GetPosition(self) -> Point Returns the current position of the sizer's managed space. """ - return __core.wxSizer_GetPosition(*args, **kwargs) + return _core_.Sizer_GetPosition(*args, **kwargs) def GetMinSize(*args, **kwargs): """ - GetMinSize(self) -> wxSize + GetMinSize(self) -> Size Returns the minimal size of the sizer. This is either the combined minimal size of all the children and their borders or the minimal size set by SetMinSize, depending on which is bigger. """ - return __core.wxSizer_GetMinSize(*args, **kwargs) + return _core_.Sizer_GetMinSize(*args, **kwargs) def GetSizeTuple(self): return self.GetSize().Get() @@ -9854,17 +12230,17 @@ class wxSizer(wxObject): items managed by this sizer. You should not need to call this directly as it is called by `Layout`. """ - return __core.wxSizer_RecalcSizes(*args, **kwargs) + return _core_.Sizer_RecalcSizes(*args, **kwargs) def CalcMin(*args, **kwargs): """ - CalcMin(self) -> wxSize + CalcMin(self) -> Size This method is where the sizer will do the actual calculation of its children's minimal sizes. You should not need to call this directly as it is called by `Layout`. """ - return __core.wxSizer_CalcMin(*args, **kwargs) + return _core_.Sizer_CalcMin(*args, **kwargs) def Layout(*args, **kwargs): """ @@ -9877,11 +12253,11 @@ class wxSizer(wxObject): one of the items in a sizer change size, or items are added or removed. """ - return __core.wxSizer_Layout(*args, **kwargs) + return _core_.Sizer_Layout(*args, **kwargs) def Fit(*args, **kwargs): """ - Fit(self, wxWindow window) -> wxSize + Fit(self, Window window) -> Size Tell the sizer to resize the *window* to match the sizer's minimal size. This is commonly done in the constructor of the window itself in @@ -9890,11 +12266,11 @@ class wxSizer(wxObject): For a top level window this is the total window size, not the client size. """ - return __core.wxSizer_Fit(*args, **kwargs) + return _core_.Sizer_Fit(*args, **kwargs) def FitInside(*args, **kwargs): """ - FitInside(self, wxWindow window) + FitInside(self, Window window) Tell the sizer to resize the *virtual size* of the *window* to match the sizer's minimal size. This will not alter the on screen size of the @@ -9904,11 +12280,11 @@ class wxSizer(wxObject): :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints` """ - return __core.wxSizer_FitInside(*args, **kwargs) + return _core_.Sizer_FitInside(*args, **kwargs) def SetSizeHints(*args, **kwargs): """ - SetSizeHints(self, wxWindow window) + SetSizeHints(self, Window window) Tell the sizer to set (and `Fit`) the minimal size of the *window* to match the sizer's minimal size. This is commonly done in the @@ -9917,11 +12293,11 @@ class wxSizer(wxObject): to prevent the window from being sized smaller than the minimal size required by the sizer. """ - return __core.wxSizer_SetSizeHints(*args, **kwargs) + return _core_.Sizer_SetSizeHints(*args, **kwargs) def SetVirtualSizeHints(*args, **kwargs): """ - SetVirtualSizeHints(self, wxWindow window) + SetVirtualSizeHints(self, Window window) Tell the sizer to set the minimal size of the window virtual area to match the sizer's minimal size. For windows with managed scrollbars @@ -9930,7 +12306,7 @@ class wxSizer(wxObject): :see: `wx.ScrolledWindow.SetScrollbars` """ - return __core.wxSizer_SetVirtualSizeHints(*args, **kwargs) + return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs) def Clear(*args, **kwargs): """ @@ -9939,7 +12315,7 @@ class wxSizer(wxObject): Clear all items from the sizer, optionally destroying the window items as well. """ - return __core.wxSizer_Clear(*args, **kwargs) + return _core_.Sizer_Clear(*args, **kwargs) def DeleteWindows(*args, **kwargs): """ @@ -9947,7 +12323,7 @@ class wxSizer(wxObject): Destroy all windows managed by the sizer. """ - return __core.wxSizer_DeleteWindows(*args, **kwargs) + return _core_.Sizer_DeleteWindows(*args, **kwargs) def GetChildren(*args, **kwargs): """ @@ -9955,7 +12331,7 @@ class wxSizer(wxObject): Returns a list of all the `wx.SizerItem` objects managed by the sizer. """ - return __core.wxSizer_GetChildren(*args, **kwargs) + return _core_.Sizer_GetChildren(*args, **kwargs) def Show(*args, **kwargs): """ @@ -9967,22 +12343,22 @@ class wxSizer(wxObject): the item. Use the recursive parameter to show or hide an item in a subsizer. Returns True if the item was found. """ - return __core.wxSizer_Show(*args, **kwargs) + return _core_.Sizer_Show(*args, **kwargs) def IsShown(*args, **kwargs): """ IsShown(self, item) - Determines if the item is currently shown. sizer. To make a sizer + Determines if the item is currently shown. To make a sizer item disappear or reappear, use Show followed by `Layout`. The *item* parameter can be either a window, a sizer, or the zero-based index of the item. """ - return __core.wxSizer_IsShown(*args, **kwargs) + return _core_.Sizer_IsShown(*args, **kwargs) def Hide(self, item, recursive=False): """ - A convenience method for `Show`(item, False, recursive). + A convenience method for `Show` (item, False, recursive). """ return self.Show(item, False, recursive) @@ -9992,17 +12368,16 @@ class wxSizer(wxObject): Recursively call `wx.SizerItem.Show` on all sizer items. """ - return __core.wxSizer_ShowItems(*args, **kwargs) + return _core_.Sizer_ShowItems(*args, **kwargs) + Children = property(GetChildren,doc="See `GetChildren`") + ContainingWindow = property(GetContainingWindow,SetContainingWindow,doc="See `GetContainingWindow` and `SetContainingWindow`") + MinSize = property(GetMinSize,SetMinSize,doc="See `GetMinSize` and `SetMinSize`") + Position = property(GetPosition,doc="See `GetPosition`") + Size = property(GetSize,doc="See `GetSize`") +_core_.Sizer_swigregister(Sizer) -class wxSizerPtr(wxSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxSizer -__core.wxSizer_swigregister(wxSizerPtr) - -class wxPySizer(wxSizer): +class PySizer(Sizer): """ wx.PySizer is a special version of `wx.Sizer` that has been instrumented to allow the C++ virtual methods to be overloaded in @@ -10044,36 +12419,27 @@ class wxPySizer(wxSizer): """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> wxPySizer + __init__(self) -> PySizer Creates a wx.PySizer. Must be called from the __init__ in the derived class. """ - newobj = __core.new_wxPySizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs)) self._setCallbackInfo(self, PySizer);self._setOORInfo(self) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" - return __core.wxPySizer__setCallbackInfo(*args, **kwargs) + return _core_.PySizer__setCallbackInfo(*args, **kwargs) - -class wxPySizerPtr(wxPySizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxPySizer -__core.wxPySizer_swigregister(wxPySizerPtr) +_core_.PySizer_swigregister(PySizer) #--------------------------------------------------------------------------- -class wxBoxSizer(wxSizer): +class BoxSizer(Sizer): """ The basic idea behind a box sizer is that windows will most often be laid out in rather simple basic geometry, typically in a row or a @@ -10081,20 +12447,17 @@ class wxBoxSizer(wxSizer): its items in a simple row or column, depending on the orientation parameter passed to the constructor. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int orient=wxHORIZONTAL) -> wxBoxSizer + __init__(self, int orient=HORIZONTAL) -> BoxSizer Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL`` or ``wx.HORIZONTAL`` for creating either a column sizer or a row sizer. """ - newobj = __core.new_wxBoxSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.BoxSizer_swiginit(self,_core_.new_BoxSizer(*args, **kwargs)) self._setOORInfo(self) def GetOrientation(*args, **kwargs): @@ -10103,7 +12466,7 @@ class wxBoxSizer(wxSizer): Returns the current orientation of the sizer. """ - return __core.wxBoxSizer_GetOrientation(*args, **kwargs) + return _core_.BoxSizer_GetOrientation(*args, **kwargs) def SetOrientation(*args, **kwargs): """ @@ -10111,60 +12474,47 @@ class wxBoxSizer(wxSizer): Resets the orientation of the sizer. """ - return __core.wxBoxSizer_SetOrientation(*args, **kwargs) + return _core_.BoxSizer_SetOrientation(*args, **kwargs) - -class wxBoxSizerPtr(wxBoxSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxBoxSizer -__core.wxBoxSizer_swigregister(wxBoxSizerPtr) + Orientation = property(GetOrientation,SetOrientation,doc="See `GetOrientation` and `SetOrientation`") +_core_.BoxSizer_swigregister(BoxSizer) #--------------------------------------------------------------------------- -class wxStaticBoxSizer(wxBoxSizer): +class StaticBoxSizer(BoxSizer): """ wx.StaticBoxSizer derives from and functions identically to the `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer manages. Note that this static box must be created separately and passed to the sizer constructor. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, wxStaticBox box, int orient=wxHORIZONTAL) -> wxStaticBoxSizer + __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer Constructor. It takes an associated static box and the orientation *orient* as parameters - orient can be either of ``wx.VERTICAL`` or ``wx.HORIZONTAL``. """ - newobj = __core.new_wxStaticBoxSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.StaticBoxSizer_swiginit(self,_core_.new_StaticBoxSizer(*args, **kwargs)) self._setOORInfo(self) def GetStaticBox(*args, **kwargs): """ - GetStaticBox(self) -> wxStaticBox + GetStaticBox(self) -> StaticBox Returns the static box associated with this sizer. """ - return __core.wxStaticBoxSizer_GetStaticBox(*args, **kwargs) + return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs) - -class wxStaticBoxSizerPtr(wxStaticBoxSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxStaticBoxSizer -__core.wxStaticBoxSizer_swigregister(wxStaticBoxSizerPtr) + StaticBox = property(GetStaticBox,doc="See `GetStaticBox`") +_core_.StaticBoxSizer_swigregister(StaticBoxSizer) #--------------------------------------------------------------------------- -class wxGridSizer(wxSizer): +class GridSizer(Sizer): """ A grid sizer is a sizer which lays out its children in a two-dimensional table with all cells having the same size. In other @@ -10181,11 +12531,11 @@ class wxGridSizer(wxSizer): then use the `wx.GridBagSizer`. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int rows=1, int cols=0, int vgap=0, int hgap=0) -> wxGridSizer + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer Constructor for a wx.GridSizer. *rows* and *cols* determine the number of columns and rows in the sizer - if either of the parameters is @@ -10193,10 +12543,7 @@ class wxGridSizer(wxSizer): the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* define extra space between all children. """ - newobj = __core.new_wxGridSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.GridSizer_swiginit(self,_core_.new_GridSizer(*args, **kwargs)) self._setOORInfo(self) def SetCols(*args, **kwargs): @@ -10205,7 +12552,7 @@ class wxGridSizer(wxSizer): Sets the number of columns in the sizer. """ - return __core.wxGridSizer_SetCols(*args, **kwargs) + return _core_.GridSizer_SetCols(*args, **kwargs) def SetRows(*args, **kwargs): """ @@ -10213,7 +12560,7 @@ class wxGridSizer(wxSizer): Sets the number of rows in the sizer. """ - return __core.wxGridSizer_SetRows(*args, **kwargs) + return _core_.GridSizer_SetRows(*args, **kwargs) def SetVGap(*args, **kwargs): """ @@ -10221,7 +12568,7 @@ class wxGridSizer(wxSizer): Sets the vertical gap (in pixels) between the cells in the sizer. """ - return __core.wxGridSizer_SetVGap(*args, **kwargs) + return _core_.GridSizer_SetVGap(*args, **kwargs) def SetHGap(*args, **kwargs): """ @@ -10229,7 +12576,7 @@ class wxGridSizer(wxSizer): Sets the horizontal gap (in pixels) between cells in the sizer """ - return __core.wxGridSizer_SetHGap(*args, **kwargs) + return _core_.GridSizer_SetHGap(*args, **kwargs) def GetCols(*args, **kwargs): """ @@ -10237,7 +12584,7 @@ class wxGridSizer(wxSizer): Returns the number of columns in the sizer. """ - return __core.wxGridSizer_GetCols(*args, **kwargs) + return _core_.GridSizer_GetCols(*args, **kwargs) def GetRows(*args, **kwargs): """ @@ -10245,7 +12592,7 @@ class wxGridSizer(wxSizer): Returns the number of rows in the sizer. """ - return __core.wxGridSizer_GetRows(*args, **kwargs) + return _core_.GridSizer_GetRows(*args, **kwargs) def GetVGap(*args, **kwargs): """ @@ -10253,7 +12600,7 @@ class wxGridSizer(wxSizer): Returns the vertical gap (in pixels) between the cells in the sizer. """ - return __core.wxGridSizer_GetVGap(*args, **kwargs) + return _core_.GridSizer_GetVGap(*args, **kwargs) def GetHGap(*args, **kwargs): """ @@ -10261,22 +12608,38 @@ class wxGridSizer(wxSizer): Returns the horizontal gap (in pixels) between cells in the sizer. """ - return __core.wxGridSizer_GetHGap(*args, **kwargs) + return _core_.GridSizer_GetHGap(*args, **kwargs) + + def CalcRowsCols(self): + """ + CalcRowsCols() -> (rows, cols) + Calculates how many rows and columns will be in the sizer based + on the current number of items and also the rows, cols specified + in the constructor. + """ + nitems = len(self.GetChildren()) + rows = self.GetRows() + cols = self.GetCols() + assert rows != 0 or cols != 0, "Grid sizer must have either rows or columns fixed" + if cols != 0: + rows = (nitems + cols - 1) / cols + elif rows != 0: + cols = (nitems + rows - 1) / rows + return (rows, cols) -class wxGridSizerPtr(wxGridSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGridSizer -__core.wxGridSizer_swigregister(wxGridSizerPtr) + Cols = property(GetCols,SetCols,doc="See `GetCols` and `SetCols`") + HGap = property(GetHGap,SetHGap,doc="See `GetHGap` and `SetHGap`") + Rows = property(GetRows,SetRows,doc="See `GetRows` and `SetRows`") + VGap = property(GetVGap,SetVGap,doc="See `GetVGap` and `SetVGap`") +_core_.GridSizer_swigregister(GridSizer) #--------------------------------------------------------------------------- -wxFLEX_GROWMODE_NONE = __core.wxFLEX_GROWMODE_NONE -wxFLEX_GROWMODE_SPECIFIED = __core.wxFLEX_GROWMODE_SPECIFIED -wxFLEX_GROWMODE_ALL = __core.wxFLEX_GROWMODE_ALL -class wxFlexGridSizer(wxGridSizer): +FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE +FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED +FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL +class FlexGridSizer(GridSizer): """ A flex grid sizer is a sizer which lays out its children in a two-dimensional table with all table cells in one row having the same @@ -10293,11 +12656,11 @@ class wxFlexGridSizer(wxGridSizer): """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int rows=1, int cols=0, int vgap=0, int hgap=0) -> wxFlexGridSizer + __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the number of columns and rows in the sizer - if either of the parameters @@ -10305,10 +12668,7 @@ class wxFlexGridSizer(wxGridSizer): the sizer, thus making the sizer grow dynamically. *vgap* and *hgap* define extra space between all children. """ - newobj = __core.new_wxFlexGridSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.FlexGridSizer_swiginit(self,_core_.new_FlexGridSizer(*args, **kwargs)) self._setOORInfo(self) def AddGrowableRow(*args, **kwargs): @@ -10322,7 +12682,7 @@ class wxFlexGridSizer(wxGridSizer): for the box sizers except that if all proportions are 0, then all columns are resized equally (instead of not being resized at all). """ - return __core.wxFlexGridSizer_AddGrowableRow(*args, **kwargs) + return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs) def RemoveGrowableRow(*args, **kwargs): """ @@ -10330,7 +12690,7 @@ class wxFlexGridSizer(wxGridSizer): Specifies that row *idx* is no longer growable. """ - return __core.wxFlexGridSizer_RemoveGrowableRow(*args, **kwargs) + return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs) def AddGrowableCol(*args, **kwargs): """ @@ -10343,7 +12703,7 @@ class wxFlexGridSizer(wxGridSizer): for the box sizers except that if all proportions are 0, then all columns are resized equally (instead of not being resized at all). """ - return __core.wxFlexGridSizer_AddGrowableCol(*args, **kwargs) + return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs) def RemoveGrowableCol(*args, **kwargs): """ @@ -10351,7 +12711,7 @@ class wxFlexGridSizer(wxGridSizer): Specifies that column *idx* is no longer growable. """ - return __core.wxFlexGridSizer_RemoveGrowableCol(*args, **kwargs) + return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs) def SetFlexibleDirection(*args, **kwargs): """ @@ -10371,7 +12731,7 @@ class wxFlexGridSizer(wxGridSizer): Note that this method does not trigger relayout. """ - return __core.wxFlexGridSizer_SetFlexibleDirection(*args, **kwargs) + return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs) def GetFlexibleDirection(*args, **kwargs): """ @@ -10382,7 +12742,7 @@ class wxFlexGridSizer(wxGridSizer): :see: `SetFlexibleDirection` """ - return __core.wxFlexGridSizer_GetFlexibleDirection(*args, **kwargs) + return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs) def SetNonFlexibleGrowMode(*args, **kwargs): """ @@ -10404,10 +12764,8 @@ class wxFlexGridSizer(wxGridSizer): ========================== ================================================= Note that this method does not trigger relayout. - - """ - return __core.wxFlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) + return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs) def GetNonFlexibleGrowMode(*args, **kwargs): """ @@ -10418,7 +12776,7 @@ class wxFlexGridSizer(wxGridSizer): :see: `SetNonFlexibleGrowMode` """ - return __core.wxFlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) + return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs) def GetRowHeights(*args, **kwargs): """ @@ -10427,7 +12785,7 @@ class wxFlexGridSizer(wxGridSizer): Returns a list of integers representing the heights of each of the rows in the sizer. """ - return __core.wxFlexGridSizer_GetRowHeights(*args, **kwargs) + return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs) def GetColWidths(*args, **kwargs): """ @@ -10436,17 +12794,15 @@ class wxFlexGridSizer(wxGridSizer): Returns a list of integers representing the widths of each of the columns in the sizer. """ - return __core.wxFlexGridSizer_GetColWidths(*args, **kwargs) + return _core_.FlexGridSizer_GetColWidths(*args, **kwargs) + ColWidths = property(GetColWidths,doc="See `GetColWidths`") + FlexibleDirection = property(GetFlexibleDirection,SetFlexibleDirection,doc="See `GetFlexibleDirection` and `SetFlexibleDirection`") + NonFlexibleGrowMode = property(GetNonFlexibleGrowMode,SetNonFlexibleGrowMode,doc="See `GetNonFlexibleGrowMode` and `SetNonFlexibleGrowMode`") + RowHeights = property(GetRowHeights,doc="See `GetRowHeights`") +_core_.FlexGridSizer_swigregister(FlexGridSizer) -class wxFlexGridSizerPtr(wxFlexGridSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxFlexGridSizer -__core.wxFlexGridSizer_swigregister(wxFlexGridSizerPtr) - -class wxStdDialogButtonSizer(wxBoxSizer): +class StdDialogButtonSizer(BoxSizer): """ A special sizer that knows how to order and position standard buttons in order to conform to the current platform's standards. You simply @@ -10455,14 +12811,11 @@ class wxStdDialogButtonSizer(wxBoxSizer): will take care of the rest. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxStdDialogButtonSizer""" - newobj = __core.new_wxStdDialogButtonSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + 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) -> StdDialogButtonSizer""" + _core_.StdDialogButtonSizer_swiginit(self,_core_.new_StdDialogButtonSizer(*args, **kwargs)) def AddButton(*args, **kwargs): """ AddButton(self, wxButton button) @@ -10470,7 +12823,7 @@ class wxStdDialogButtonSizer(wxBoxSizer): Use this to add the buttons to this sizer. Do not use the `Add` method in the base class. """ - return __core.wxStdDialogButtonSizer_AddButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs) def Realize(*args, **kwargs): """ @@ -10480,51 +12833,50 @@ class wxStdDialogButtonSizer(wxBoxSizer): to the sizer. It will reorder them and position them in a platform specifc manner. """ - return __core.wxStdDialogButtonSizer_Realize(*args, **kwargs) + return _core_.StdDialogButtonSizer_Realize(*args, **kwargs) def SetAffirmativeButton(*args, **kwargs): """SetAffirmativeButton(self, wxButton button)""" - return __core.wxStdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs) def SetNegativeButton(*args, **kwargs): """SetNegativeButton(self, wxButton button)""" - return __core.wxStdDialogButtonSizer_SetNegativeButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs) def SetCancelButton(*args, **kwargs): """SetCancelButton(self, wxButton button)""" - return __core.wxStdDialogButtonSizer_SetCancelButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs) def GetAffirmativeButton(*args, **kwargs): """GetAffirmativeButton(self) -> wxButton""" - return __core.wxStdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs) def GetApplyButton(*args, **kwargs): """GetApplyButton(self) -> wxButton""" - return __core.wxStdDialogButtonSizer_GetApplyButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs) def GetNegativeButton(*args, **kwargs): """GetNegativeButton(self) -> wxButton""" - return __core.wxStdDialogButtonSizer_GetNegativeButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs) def GetCancelButton(*args, **kwargs): """GetCancelButton(self) -> wxButton""" - return __core.wxStdDialogButtonSizer_GetCancelButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs) def GetHelpButton(*args, **kwargs): """GetHelpButton(self) -> wxButton""" - return __core.wxStdDialogButtonSizer_GetHelpButton(*args, **kwargs) + return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs) - -class wxStdDialogButtonSizerPtr(wxStdDialogButtonSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxStdDialogButtonSizer -__core.wxStdDialogButtonSizer_swigregister(wxStdDialogButtonSizerPtr) + AffirmativeButton = property(GetAffirmativeButton,SetAffirmativeButton,doc="See `GetAffirmativeButton` and `SetAffirmativeButton`") + ApplyButton = property(GetApplyButton,doc="See `GetApplyButton`") + CancelButton = property(GetCancelButton,SetCancelButton,doc="See `GetCancelButton` and `SetCancelButton`") + HelpButton = property(GetHelpButton,doc="See `GetHelpButton`") + NegativeButton = property(GetNegativeButton,SetNegativeButton,doc="See `GetNegativeButton` and `SetNegativeButton`") +_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizer) #--------------------------------------------------------------------------- -class wxGBPosition(object): +class GBPosition(object): """ This class represents the position of an item in a virtual grid of rows and columns managed by a `wx.GridBagSizer`. wxPython has @@ -10532,11 +12884,11 @@ class wxGBPosition(object): integers to a wx.GBPosition, so you can use the more pythonic representation of the position nearly transparently in Python code. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int row=0, int col=0) -> wxGBPosition + __init__(self, int row=0, int col=0) -> GBPosition This class represents the position of an item in a virtual grid of rows and columns managed by a `wx.GridBagSizer`. wxPython has @@ -10544,41 +12896,48 @@ class wxGBPosition(object): integers to a wx.GBPosition, so you can use the more pythonic representation of the position nearly transparently in Python code. """ - newobj = __core.new_wxGBPosition(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.GBPosition_swiginit(self,_core_.new_GBPosition(*args, **kwargs)) + __swig_destroy__ = _core_.delete_GBPosition + __del__ = lambda self : None; def GetRow(*args, **kwargs): """GetRow(self) -> int""" - return __core.wxGBPosition_GetRow(*args, **kwargs) + return _core_.GBPosition_GetRow(*args, **kwargs) def GetCol(*args, **kwargs): """GetCol(self) -> int""" - return __core.wxGBPosition_GetCol(*args, **kwargs) + return _core_.GBPosition_GetCol(*args, **kwargs) def SetRow(*args, **kwargs): """SetRow(self, int row)""" - return __core.wxGBPosition_SetRow(*args, **kwargs) + return _core_.GBPosition_SetRow(*args, **kwargs) def SetCol(*args, **kwargs): """SetCol(self, int col)""" - return __core.wxGBPosition_SetCol(*args, **kwargs) + return _core_.GBPosition_SetCol(*args, **kwargs) def __eq__(*args, **kwargs): - """__eq__(self, wxGBPosition other) -> bool""" - return __core.wxGBPosition___eq__(*args, **kwargs) + """ + __eq__(self, PyObject other) -> bool + + Compare GBPosition for equality. + """ + return _core_.GBPosition___eq__(*args, **kwargs) def __ne__(*args, **kwargs): - """__ne__(self, wxGBPosition other) -> bool""" - return __core.wxGBPosition___ne__(*args, **kwargs) + """ + __ne__(self, PyObject other) -> bool + + Compare GBPosition for inequality. + """ + return _core_.GBPosition___ne__(*args, **kwargs) def Set(*args, **kwargs): """Set(self, int row=0, int col=0)""" - return __core.wxGBPosition_Set(*args, **kwargs) + return _core_.GBPosition_Set(*args, **kwargs) def Get(*args, **kwargs): """Get(self) -> PyObject""" - return __core.wxGBPosition_Get(*args, **kwargs) + return _core_.GBPosition_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -10596,15 +12955,9 @@ class wxGBPosition(object): row = property(GetRow, SetRow) col = property(GetCol, SetCol) +_core_.GBPosition_swigregister(GBPosition) -class wxGBPositionPtr(wxGBPosition): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGBPosition -__core.wxGBPosition_swigregister(wxGBPositionPtr) - -class wxGBSpan(object): +class GBSpan(object): """ This class is used to hold the row and column spanning attributes of items in a `wx.GridBagSizer`. wxPython has typemaps that will @@ -10613,51 +12966,58 @@ class wxGBSpan(object): nearly transparently in Python code. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int rowspan=1, int colspan=1) -> wxGBSpan + __init__(self, int rowspan=1, int colspan=1) -> GBSpan Construct a new wxGBSpan, optionally setting the rowspan and colspan. The default is (1,1). (Meaning that the item occupies one cell in each direction. """ - newobj = __core.new_wxGBSpan(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.GBSpan_swiginit(self,_core_.new_GBSpan(*args, **kwargs)) + __swig_destroy__ = _core_.delete_GBSpan + __del__ = lambda self : None; def GetRowspan(*args, **kwargs): """GetRowspan(self) -> int""" - return __core.wxGBSpan_GetRowspan(*args, **kwargs) + return _core_.GBSpan_GetRowspan(*args, **kwargs) def GetColspan(*args, **kwargs): """GetColspan(self) -> int""" - return __core.wxGBSpan_GetColspan(*args, **kwargs) + return _core_.GBSpan_GetColspan(*args, **kwargs) def SetRowspan(*args, **kwargs): """SetRowspan(self, int rowspan)""" - return __core.wxGBSpan_SetRowspan(*args, **kwargs) + return _core_.GBSpan_SetRowspan(*args, **kwargs) def SetColspan(*args, **kwargs): """SetColspan(self, int colspan)""" - return __core.wxGBSpan_SetColspan(*args, **kwargs) + return _core_.GBSpan_SetColspan(*args, **kwargs) def __eq__(*args, **kwargs): - """__eq__(self, wxGBSpan other) -> bool""" - return __core.wxGBSpan___eq__(*args, **kwargs) + """ + __eq__(self, PyObject other) -> bool + + Compare wxGBSpan for equality. + """ + return _core_.GBSpan___eq__(*args, **kwargs) def __ne__(*args, **kwargs): - """__ne__(self, wxGBSpan other) -> bool""" - return __core.wxGBSpan___ne__(*args, **kwargs) + """ + __ne__(self, PyObject other) -> bool + + Compare GBSpan for inequality. + """ + return _core_.GBSpan___ne__(*args, **kwargs) def Set(*args, **kwargs): """Set(self, int rowspan=1, int colspan=1)""" - return __core.wxGBSpan_Set(*args, **kwargs) + return _core_.GBSpan_Set(*args, **kwargs) def Get(*args, **kwargs): """Get(self) -> PyObject""" - return __core.wxGBSpan_Get(*args, **kwargs) + return _core_.GBSpan_Get(*args, **kwargs) asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") def __str__(self): return str(self.Get()) @@ -10675,26 +13035,20 @@ class wxGBSpan(object): rowspan = property(GetRowspan, SetRowspan) colspan = property(GetColspan, SetColspan) +_core_.GBSpan_swigregister(GBSpan) -class wxGBSpanPtr(wxGBSpan): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGBSpan -__core.wxGBSpan_swigregister(wxGBSpanPtr) - -class wxGBSizerItem(wxSizerItem): +class GBSizerItem(SizerItem): """ The wx.GBSizerItem class is used to track the additional data about items in a `wx.GridBagSizer` such as the item's position in the grid and how many rows or columns it spans. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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) -> wxGBSizerItem + __init__(self) -> GBSizerItem Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer size will need to be set, as well as a position and span before this @@ -10703,42 +13057,41 @@ class wxGBSizerItem(wxSizerItem): You will probably never need to create a wx.GBSizerItem directly as they are created automatically when the sizer's Add method is called. """ - newobj = __core.new_wxGBSizerItem(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.GBSizerItem_swiginit(self,_core_.new_GBSizerItem(*args, **kwargs)) + __swig_destroy__ = _core_.delete_GBSizerItem + __del__ = lambda self : None; def GetPos(*args, **kwargs): """ - GetPos(self) -> wxGBPosition + GetPos(self) -> GBPosition Get the grid position of the item """ - return __core.wxGBSizerItem_GetPos(*args, **kwargs) + return _core_.GBSizerItem_GetPos(*args, **kwargs) def GetPosTuple(self): return self.GetPos().Get() def GetSpan(*args, **kwargs): """ - GetSpan(self) -> wxGBSpan + GetSpan(self) -> GBSpan Get the row and column spanning of the item """ - return __core.wxGBSizerItem_GetSpan(*args, **kwargs) + return _core_.GBSizerItem_GetSpan(*args, **kwargs) def GetSpanTuple(self): return self.GetSpan().Get() def SetPos(*args, **kwargs): """ - SetPos(self, wxGBPosition pos) -> bool + SetPos(self, GBPosition pos) -> bool If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one at the new position, then set the new position. Returns True if the change is successful and after the next Layout() the item will be moved. """ - return __core.wxGBSizerItem_SetPos(*args, **kwargs) + return _core_.GBSizerItem_SetPos(*args, **kwargs) def SetSpan(*args, **kwargs): """ - SetSpan(self, wxGBSpan span) -> bool + SetSpan(self, GBSpan span) -> bool If the item is already a member of a sizer then first ensure that there is no other item that would intersect with this one with its new @@ -10746,91 +13099,86 @@ class wxGBSizerItem(wxSizerItem): is successful and after the next Layout() the item will be resized. """ - return __core.wxGBSizerItem_SetSpan(*args, **kwargs) + return _core_.GBSizerItem_SetSpan(*args, **kwargs) def Intersects(*args, **kwargs): """ - Intersects(self, wxGBSizerItem other) -> bool + Intersects(self, GBSizerItem other) -> bool Returns True if this item and the other item instersect. """ - return __core.wxGBSizerItem_Intersects(*args, **kwargs) + return _core_.GBSizerItem_Intersects(*args, **kwargs) def IntersectsPos(*args, **kwargs): """ - IntersectsPos(self, wxGBPosition pos, wxGBSpan span) -> bool + IntersectsPos(self, GBPosition pos, GBSpan span) -> bool Returns True if the given pos/span would intersect with this item. """ - return __core.wxGBSizerItem_IntersectsPos(*args, **kwargs) + return _core_.GBSizerItem_IntersectsPos(*args, **kwargs) def GetEndPos(*args, **kwargs): """ - GetEndPos(self) -> wxGBPosition + GetEndPos(self) -> GBPosition Get the row and column of the endpoint of this item. """ - return __core.wxGBSizerItem_GetEndPos(*args, **kwargs) + return _core_.GBSizerItem_GetEndPos(*args, **kwargs) def GetGBSizer(*args, **kwargs): """ - GetGBSizer(self) -> wxGridBagSizer + GetGBSizer(self) -> GridBagSizer Get the sizer this item is a member of. """ - return __core.wxGBSizerItem_GetGBSizer(*args, **kwargs) + return _core_.GBSizerItem_GetGBSizer(*args, **kwargs) def SetGBSizer(*args, **kwargs): """ - SetGBSizer(self, wxGridBagSizer sizer) + SetGBSizer(self, GridBagSizer sizer) Set the sizer this item is a member of. """ - return __core.wxGBSizerItem_SetGBSizer(*args, **kwargs) + return _core_.GBSizerItem_SetGBSizer(*args, **kwargs) - -class wxGBSizerItemPtr(wxGBSizerItem): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGBSizerItem -__core.wxGBSizerItem_swigregister(wxGBSizerItemPtr) -wxDefaultSpan = cvar.wxDefaultSpan + EndPos = property(GetEndPos,doc="See `GetEndPos`") + GBSizer = property(GetGBSizer,SetGBSizer,doc="See `GetGBSizer` and `SetGBSizer`") + Pos = property(GetPos,SetPos,doc="See `GetPos` and `SetPos`") + Span = property(GetSpan,SetSpan,doc="See `GetSpan` and `SetSpan`") +_core_.GBSizerItem_swigregister(GBSizerItem) +DefaultSpan = cvar.DefaultSpan def GBSizerItemWindow(*args, **kwargs): """ - GBSizerItemWindow(wxWindow window, wxGBPosition pos, wxGBSpan span, int flag, - int border, PyObject userData=None) -> wxGBSizerItem + GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag, + int border, PyObject userData=None) -> GBSizerItem Construct a `wx.GBSizerItem` for a window. """ - val = __core.new_GBSizerItemWindow(*args, **kwargs) - val.thisown = 1 + val = _core_.new_GBSizerItemWindow(*args, **kwargs) return val def GBSizerItemSizer(*args, **kwargs): """ - GBSizerItemSizer(wxSizer sizer, wxGBPosition pos, wxGBSpan span, int flag, - int border, PyObject userData=None) -> wxGBSizerItem + GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag, + int border, PyObject userData=None) -> GBSizerItem Construct a `wx.GBSizerItem` for a sizer """ - val = __core.new_GBSizerItemSizer(*args, **kwargs) - val.thisown = 1 + val = _core_.new_GBSizerItemSizer(*args, **kwargs) return val def GBSizerItemSpacer(*args, **kwargs): """ - GBSizerItemSpacer(int width, int height, wxGBPosition pos, wxGBSpan span, - int flag, int border, PyObject userData=None) -> wxGBSizerItem + GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span, + int flag, int border, PyObject userData=None) -> GBSizerItem Construct a `wx.GBSizerItem` for a spacer. """ - val = __core.new_GBSizerItemSpacer(*args, **kwargs) - val.thisown = 1 + val = _core_.new_GBSizerItemSpacer(*args, **kwargs) return val -class wxGridBagSizer(wxFlexGridSizer): +class GridBagSizer(FlexGridSizer): """ A `wx.Sizer` that can lay out items in a virtual grid like a `wx.FlexGridSizer` but in this case explicit positioning of the items @@ -10840,19 +13188,16 @@ class wxGridBagSizer(wxFlexGridSizer): positioned at, adjusted for spanning. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + 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, int vgap=0, int hgap=0) -> wxGridBagSizer + __init__(self, int vgap=0, int hgap=0) -> GridBagSizer Constructor, with optional parameters to specify the gap between the rows and columns. """ - newobj = __core.new_wxGridBagSizer(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _core_.GridBagSizer_swiginit(self,_core_.new_GridBagSizer(*args, **kwargs)) self._setOORInfo(self) def Add(*args, **kwargs): @@ -10868,7 +13213,7 @@ class wxGridBagSizer(wxFlexGridSizer): position, False if something was already there. """ - return __core.wxGridBagSizer_Add(*args, **kwargs) + return _core_.GridBagSizer_Add(*args, **kwargs) def AddItem(*args, **kwargs): """ @@ -10878,32 +13223,32 @@ class wxGridBagSizer(wxFlexGridSizer): the item was successfully placed at its given cell position, False if something was already there. """ - return __core.wxGridBagSizer_AddItem(*args, **kwargs) + return _core_.GridBagSizer_AddItem(*args, **kwargs) def GetCellSize(*args, **kwargs): """ - GetCellSize(self, int row, int col) -> wxSize + GetCellSize(self, int row, int col) -> Size Get the size of the specified cell, including hgap and vgap. Only valid after a Layout. """ - return __core.wxGridBagSizer_GetCellSize(*args, **kwargs) + return _core_.GridBagSizer_GetCellSize(*args, **kwargs) def GetEmptyCellSize(*args, **kwargs): """ - GetEmptyCellSize(self) -> wxSize + GetEmptyCellSize(self) -> Size Get the size used for cells in the grid with no item. """ - return __core.wxGridBagSizer_GetEmptyCellSize(*args, **kwargs) + return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs) def SetEmptyCellSize(*args, **kwargs): """ - SetEmptyCellSize(self, wxSize sz) + SetEmptyCellSize(self, Size sz) Set the size used for cells in the grid with no item. """ - return __core.wxGridBagSizer_SetEmptyCellSize(*args, **kwargs) + return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs) def GetItemPosition(*args): """ @@ -10913,7 +13258,7 @@ class wxGridBagSizer(wxFlexGridSizer): window or subsizer that is a member of this sizer, or a zero-based index of an item. """ - return __core.wxGridBagSizer_GetItemPosition(*args) + return _core_.GridBagSizer_GetItemPosition(*args) def SetItemPosition(*args): """ @@ -10925,7 +13270,7 @@ class wxGridBagSizer(wxFlexGridSizer): allowed (because an item is already there) then False is returned. """ - return __core.wxGridBagSizer_SetItemPosition(*args) + return _core_.GridBagSizer_SetItemPosition(*args) def GetItemSpan(*args): """ @@ -10935,7 +13280,7 @@ class wxGridBagSizer(wxFlexGridSizer): either a window or subsizer that is a member of this sizer, or a zero-based index of an item. """ - return __core.wxGridBagSizer_GetItemSpan(*args) + return _core_.GridBagSizer_GetItemSpan(*args) def SetItemSpan(*args): """ @@ -10946,7 +13291,7 @@ class wxGridBagSizer(wxFlexGridSizer): zero-based index of an item. Returns True on success. If the move is not allowed (because an item is already there) then False is returned. """ - return __core.wxGridBagSizer_SetItemSpan(*args) + return _core_.GridBagSizer_SetItemSpan(*args) def FindItem(*args): """ @@ -10955,31 +13300,31 @@ class wxGridBagSizer(wxFlexGridSizer): Find the sizer item for the given window or subsizer, returns None if not found. (non-recursive) """ - return __core.wxGridBagSizer_FindItem(*args) + return _core_.GridBagSizer_FindItem(*args) def FindItemAtPosition(*args, **kwargs): """ - FindItemAtPosition(self, wxGBPosition pos) -> wxGBSizerItem + FindItemAtPosition(self, GBPosition pos) -> GBSizerItem Return the sizer item for the given grid cell, or None if there is no item at that position. (non-recursive) """ - return __core.wxGridBagSizer_FindItemAtPosition(*args, **kwargs) + return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs) def FindItemAtPoint(*args, **kwargs): """ - FindItemAtPoint(self, wxPoint pt) -> wxGBSizerItem + FindItemAtPoint(self, Point pt) -> GBSizerItem Return the sizer item located at the point given in *pt*, or None if there is no item at that point. The (x,y) coordinates in pt correspond to the client coordinates of the window using the sizer for layout. (non-recursive) """ - return __core.wxGridBagSizer_FindItemAtPoint(*args, **kwargs) + return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs) def CheckForIntersection(*args, **kwargs): """ - CheckForIntersection(self, wxGBSizerItem item, wxGBSizerItem excludeItem=None) -> bool + CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool Look at all items and see if any intersect (or would overlap) the given *item*. Returns True if so, False if there would be no overlap. @@ -10988,11 +13333,11 @@ class wxGridBagSizer(wxFlexGridSizer): position of. """ - return __core.wxGridBagSizer_CheckForIntersection(*args, **kwargs) + return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs) def CheckForIntersectionPos(*args, **kwargs): """ - CheckForIntersectionPos(self, wxGBPosition pos, wxGBSpan span, wxGBSizerItem excludeItem=None) -> bool + CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool Look at all items and see if any intersect (or would overlap) the given position and span. Returns True if so, False if there would be @@ -11000,38 +13345,32 @@ class wxGridBagSizer(wxFlexGridSizer): for intersection, for example it may be the item we are checking the position of. """ - return __core.wxGridBagSizer_CheckForIntersectionPos(*args, **kwargs) + return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs) - -class wxGridBagSizerPtr(wxGridBagSizer): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxGridBagSizer -__core.wxGridBagSizer_swigregister(wxGridBagSizerPtr) +_core_.GridBagSizer_swigregister(GridBagSizer) #--------------------------------------------------------------------------- -wxLeft = __core.wxLeft -wxTop = __core.wxTop -wxRight = __core.wxRight -wxBottom = __core.wxBottom -wxWidth = __core.wxWidth -wxHeight = __core.wxHeight -wxCentre = __core.wxCentre -wxCenter = __core.wxCenter -wxCentreX = __core.wxCentreX -wxCentreY = __core.wxCentreY -wxUnconstrained = __core.wxUnconstrained -wxAsIs = __core.wxAsIs -wxPercentOf = __core.wxPercentOf -wxAbove = __core.wxAbove -wxBelow = __core.wxBelow -wxLeftOf = __core.wxLeftOf -wxRightOf = __core.wxRightOf -wxSameAs = __core.wxSameAs -wxAbsolute = __core.wxAbsolute -class wxIndividualLayoutConstraint(wxObject): +Left = _core_.Left +Top = _core_.Top +Right = _core_.Right +Bottom = _core_.Bottom +Width = _core_.Width +Height = _core_.Height +Centre = _core_.Centre +Center = _core_.Center +CentreX = _core_.CentreX +CentreY = _core_.CentreY +Unconstrained = _core_.Unconstrained +AsIs = _core_.AsIs +PercentOf = _core_.PercentOf +Above = _core_.Above +Below = _core_.Below +LeftOf = _core_.LeftOf +RightOf = _core_.RightOf +SameAs = _core_.SameAs +Absolute = _core_.Absolute +class IndividualLayoutConstraint(Object): """ Objects of this class are stored in the `wx.LayoutConstraints` class as one of eight possible constraints that a window can be involved in. @@ -11040,75 +13379,75 @@ class wxIndividualLayoutConstraint(wxObject): `wx.LayoutConstraints` instance and use the individual contstraints that it contains. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + def __init__(self): raise AttributeError, "No constructor defined" + __repr__ = _swig_repr def Set(*args, **kwargs): """ - Set(self, int rel, wxWindow otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) + Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN) Sets the properties of the constraint. Normally called by one of the convenience functions such as Above, RightOf, SameAs. """ - return __core.wxIndividualLayoutConstraint_Set(*args, **kwargs) + return _core_.IndividualLayoutConstraint_Set(*args, **kwargs) def LeftOf(*args, **kwargs): """ - LeftOf(self, wxWindow sibling, int marg=0) + LeftOf(self, Window sibling, int marg=0) Constrains this edge to be to the left of the given window, with an optional margin. Implicitly, this is relative to the left edge of the other window. """ - return __core.wxIndividualLayoutConstraint_LeftOf(*args, **kwargs) + return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs) def RightOf(*args, **kwargs): """ - RightOf(self, wxWindow sibling, int marg=0) + RightOf(self, Window sibling, int marg=0) Constrains this edge to be to the right of the given window, with an optional margin. Implicitly, this is relative to the right edge of the other window. """ - return __core.wxIndividualLayoutConstraint_RightOf(*args, **kwargs) + return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs) def Above(*args, **kwargs): """ - Above(self, wxWindow sibling, int marg=0) + Above(self, Window sibling, int marg=0) Constrains this edge to be above the given window, with an optional margin. Implicitly, this is relative to the top edge of the other window. """ - return __core.wxIndividualLayoutConstraint_Above(*args, **kwargs) + return _core_.IndividualLayoutConstraint_Above(*args, **kwargs) def Below(*args, **kwargs): """ - Below(self, wxWindow sibling, int marg=0) + Below(self, Window sibling, int marg=0) Constrains this edge to be below the given window, with an optional margin. Implicitly, this is relative to the bottom edge of the other window. """ - return __core.wxIndividualLayoutConstraint_Below(*args, **kwargs) + return _core_.IndividualLayoutConstraint_Below(*args, **kwargs) def SameAs(*args, **kwargs): """ - SameAs(self, wxWindow otherW, int edge, int marg=0) + SameAs(self, Window otherW, int edge, int marg=0) Constrains this edge or dimension to be to the same as the edge of the given window, with an optional margin. """ - return __core.wxIndividualLayoutConstraint_SameAs(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs) def PercentOf(*args, **kwargs): """ - PercentOf(self, wxWindow otherW, int wh, int per) + PercentOf(self, Window otherW, int wh, int per) Constrains this edge or dimension to be to a percentage of the given window, with an optional margin. """ - return __core.wxIndividualLayoutConstraint_PercentOf(*args, **kwargs) + return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs) def Absolute(*args, **kwargs): """ @@ -11116,7 +13455,7 @@ class wxIndividualLayoutConstraint(wxObject): Constrains this edge or dimension to be the given absolute value. """ - return __core.wxIndividualLayoutConstraint_Absolute(*args, **kwargs) + return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs) def Unconstrained(*args, **kwargs): """ @@ -11125,7 +13464,7 @@ class wxIndividualLayoutConstraint(wxObject): Sets this edge or dimension to be unconstrained, that is, dependent on other edges and dimensions from which this value can be deduced. """ - return __core.wxIndividualLayoutConstraint_Unconstrained(*args, **kwargs) + return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs) def AsIs(*args, **kwargs): """ @@ -11138,94 +13477,96 @@ class wxIndividualLayoutConstraint(wxObject): size, such as a button, which may take its size from the size of the button label. """ - return __core.wxIndividualLayoutConstraint_AsIs(*args, **kwargs) + return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs) def GetOtherWindow(*args, **kwargs): - """GetOtherWindow(self) -> wxWindow""" - return __core.wxIndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) + """GetOtherWindow(self) -> Window""" + return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs) def GetMyEdge(*args, **kwargs): """GetMyEdge(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetMyEdge(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs) def SetEdge(*args, **kwargs): """SetEdge(self, int which)""" - return __core.wxIndividualLayoutConstraint_SetEdge(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs) def SetValue(*args, **kwargs): """SetValue(self, int v)""" - return __core.wxIndividualLayoutConstraint_SetValue(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs) def GetMargin(*args, **kwargs): """GetMargin(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetMargin(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs) def SetMargin(*args, **kwargs): """SetMargin(self, int m)""" - return __core.wxIndividualLayoutConstraint_SetMargin(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs) def GetValue(*args, **kwargs): """GetValue(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetValue(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs) def GetPercent(*args, **kwargs): """GetPercent(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetPercent(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs) def GetOtherEdge(*args, **kwargs): """GetOtherEdge(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs) def GetDone(*args, **kwargs): """GetDone(self) -> bool""" - return __core.wxIndividualLayoutConstraint_GetDone(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs) def SetDone(*args, **kwargs): """SetDone(self, bool d)""" - return __core.wxIndividualLayoutConstraint_SetDone(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs) def GetRelationship(*args, **kwargs): """GetRelationship(self) -> int""" - return __core.wxIndividualLayoutConstraint_GetRelationship(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs) def SetRelationship(*args, **kwargs): """SetRelationship(self, int r)""" - return __core.wxIndividualLayoutConstraint_SetRelationship(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs) def ResetIfWin(*args, **kwargs): """ - ResetIfWin(self, wxWindow otherW) -> bool + ResetIfWin(self, Window otherW) -> bool Reset constraint if it mentions otherWin """ - return __core.wxIndividualLayoutConstraint_ResetIfWin(*args, **kwargs) + return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs) def SatisfyConstraint(*args, **kwargs): """ - SatisfyConstraint(self, wxLayoutConstraints constraints, wxWindow win) -> bool + SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool Try to satisfy constraint """ - return __core.wxIndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) + return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs) def GetEdge(*args, **kwargs): """ - GetEdge(self, int which, wxWindow thisWin, wxWindow other) -> int + GetEdge(self, int which, Window thisWin, Window other) -> int Get the value of this edge or dimension, or if this is not determinable, -1. """ - return __core.wxIndividualLayoutConstraint_GetEdge(*args, **kwargs) + return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs) + Done = property(GetDone,SetDone,doc="See `GetDone` and `SetDone`") + Margin = property(GetMargin,SetMargin,doc="See `GetMargin` and `SetMargin`") + MyEdge = property(GetMyEdge,doc="See `GetMyEdge`") + OtherEdge = property(GetOtherEdge,doc="See `GetOtherEdge`") + OtherWindow = property(GetOtherWindow,doc="See `GetOtherWindow`") + Percent = property(GetPercent,doc="See `GetPercent`") + Relationship = property(GetRelationship,SetRelationship,doc="See `GetRelationship` and `SetRelationship`") + Value = property(GetValue,SetValue,doc="See `GetValue` and `SetValue`") +_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraint) -class wxIndividualLayoutConstraintPtr(wxIndividualLayoutConstraint): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxIndividualLayoutConstraint -__core.wxIndividualLayoutConstraint_swigregister(wxIndividualLayoutConstraintPtr) - -class wxLayoutConstraints(wxObject): +class LayoutConstraints(Object): """ **Note:** constraints are now deprecated and you should use sizers instead. @@ -11257,37 +13598,30 @@ class wxLayoutConstraints(wxObject): :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints` """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - left = property(__core.wxLayoutConstraints_left_get) - top = property(__core.wxLayoutConstraints_top_get) - right = property(__core.wxLayoutConstraints_right_get) - bottom = property(__core.wxLayoutConstraints_bottom_get) - width = property(__core.wxLayoutConstraints_width_get) - height = property(__core.wxLayoutConstraints_height_get) - centreX = property(__core.wxLayoutConstraints_centreX_get) - centreY = property(__core.wxLayoutConstraints_centreY_get) - def __init__(self, *args, **kwargs): - """__init__(self) -> wxLayoutConstraints""" - newobj = __core.new_wxLayoutConstraints(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + left = property(_core_.LayoutConstraints_left_get) + top = property(_core_.LayoutConstraints_top_get) + right = property(_core_.LayoutConstraints_right_get) + bottom = property(_core_.LayoutConstraints_bottom_get) + width = property(_core_.LayoutConstraints_width_get) + height = property(_core_.LayoutConstraints_height_get) + centreX = property(_core_.LayoutConstraints_centreX_get) + centreY = property(_core_.LayoutConstraints_centreY_get) + def __init__(self, *args, **kwargs): + """__init__(self) -> LayoutConstraints""" + _core_.LayoutConstraints_swiginit(self,_core_.new_LayoutConstraints(*args, **kwargs)) + __swig_destroy__ = _core_.delete_LayoutConstraints + __del__ = lambda self : None; def SatisfyConstraints(*args, **kwargs): """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)""" - return __core.wxLayoutConstraints_SatisfyConstraints(*args, **kwargs) + return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs) def AreSatisfied(*args, **kwargs): """AreSatisfied(self) -> bool""" - return __core.wxLayoutConstraints_AreSatisfied(*args, **kwargs) + return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs) - -class wxLayoutConstraintsPtr(wxLayoutConstraints): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = wxLayoutConstraints -__core.wxLayoutConstraints_swigregister(wxLayoutConstraintsPtr) +_core_.LayoutConstraints_swigregister(LayoutConstraints) #---------------------------------------------------------------------------- @@ -11323,11 +13657,15 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION: #---------------------------------------------------------------------------- -# Set the default string<-->unicode conversion encoding from the -# locale. This encoding is used when string or unicode objects need -# to be converted in order to pass them to wxWidgets. Please be aware -# that the default encoding within the same locale may be slightly -# different on different platforms. For example, please see +# Set wxPython's default string<-->unicode conversion encoding from +# the locale, but only if Python's default hasn't been changed. (We +# assume that if the user has customized it already then that is the +# encoding we need to use as well.) +# +# The encoding selected here is used when string or unicode objects +# need to be converted in order to pass them to wxWidgets. Please be +# aware that the default encoding within the same locale may be +# slightly different on different platforms. For example, please see # http://www.alanwood.net/demos/charsetdiffs.html for differences # between the common latin/roman encodings. @@ -11338,7 +13676,7 @@ if default == 'ascii': try: default = locale.getdefaultlocale()[1] codecs.lookup(default) - except (ValueError, LookupError): + except (ValueError, LookupError, TypeError): default = _sys.getdefaultencoding() del locale del codecs @@ -11414,7 +13752,7 @@ def CallAfter(callable, *args, **kw): method calls from non-GUI threads. Any extra positional or keyword args are passed on to the callable when it is called. - :see: `wx.FutureCall` + :see: `wx.CallLater` """ app = wx.GetApp() assert app is not None, 'No wx.App created yet' @@ -11433,7 +13771,7 @@ def CallAfter(callable, *args, **kw): #---------------------------------------------------------------------------- -class FutureCall: +class CallLater: """ A convenience class for `wx.Timer`, that calls the given callable object once after the given amount of milliseconds, passing any @@ -11444,7 +13782,7 @@ class FutureCall: then there is no need to hold a reference to this object. It will hold a reference to itself while the timer is running (the timer has a reference to self.Notify) but the cycle will be broken when - the timer completes, automatically cleaning up the wx.FutureCall + the timer completes, automatically cleaning up the wx.CallLater object. :see: `wx.CallAfter` @@ -11530,8 +13868,13 @@ class FutureCall: # if it wasn't restarted, then cleanup wx.CallAfter(self.Stop) + Interval = property(GetInterval) + Result = property(GetResult) +class FutureCall(CallLater): + """A compatibility alias for `CallLater`.""" + #---------------------------------------------------------------------------- # Control which items in this module should be documented by epydoc. # We allow only classes and functions, which will help reduce the size @@ -11543,7 +13886,7 @@ class FutureCall: class __DocFilter: """ A filter for epydoc that only allows non-Ptr classes and - fucntions, in order to reduce the clutter in the API docs. + functions, in order to reduce the clutter in the API docs. """ def __init__(self, globals): self._globals = globals @@ -11551,10 +13894,22 @@ class __DocFilter: def __call__(self, name): import types obj = self._globals.get(name, None) + + # only document classes and function if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: return False - if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): + + # skip other things that are private or will be documented as part of somethign else + if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') : return False + + # skip functions that are duplicates of static functions in a class + if name.find('_') != -1: + cls = self._globals.get(name.split('_')[0], None) + methname = name.split('_')[1] + if hasattr(cls, methname) and type(getattr(cls, methname)) is types.FunctionType: + return False + return True #---------------------------------------------------------------------------- @@ -11567,12 +13922,8 @@ from _windows import * from _controls import * from _misc import * - -# Fixup the stock objects since they can't be used yet. (They will be -# restored in wx.PyApp.OnInit.) -_core_._wxPyFixStockObjects() - #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- +