X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7353d818016e293e14980b53bcd9698bdbb8226f..db679b8c836e69c111cdc31e62cf92cebe4f938f:/wxPython/wx/tools/XRCed/xxx.py diff --git a/wxPython/wx/tools/XRCed/xxx.py b/wxPython/wx/tools/XRCed/xxx.py index 535c6e2395..03bb4f70bc 100644 --- a/wxPython/wx/tools/XRCed/xxx.py +++ b/wxPython/wx/tools/XRCed/xxx.py @@ -49,9 +49,9 @@ class xxxParam(xxxNode): def value(self): return self.textNode.data.encode(g.currentEncoding) def update(self, value): - try: # handle exception if encoding is wrong + try: # handle exception if encoding is wrong self.textNode.data = unicode(value, g.currentEncoding) - except UnicodeDecodeError: + except UnicodeDecodeError: wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate") # Integer parameter @@ -238,9 +238,11 @@ class xxxObject: else: # simple parameter self.params[tag] = xxxParam(node) else: + pass # Remove all other nodes - element.removeChild(node) - node.unlink() +# element.removeChild(node) +# node.unlink() + # Check that all required params are set for param in self.required: if not self.params.has_key(param): @@ -294,7 +296,7 @@ class xxxObject: # This is a little special: it is both xxxObject and xxxNode class xxxParamFont(xxxObject, xxxNode): - allParams = ['size', 'style', 'weight', 'family', 'underlined', + allParams = ['size', 'family', 'style', 'weight', 'underlined', 'face', 'encoding'] def __init__(self, parent, element): xxxObject.__init__(self, parent, element) @@ -333,6 +335,7 @@ class xxxParamFont(xxxObject, xxxNode): class xxxContainer(xxxObject): hasChildren = True + exStyles = [] # Simulate normal parameter for encoding class xxxEncoding: @@ -360,40 +363,37 @@ class xxxPanel(xxxContainer): allParams = ['pos', 'size', 'style'] styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle', 'tooltip'] - winStyles = ['wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN'] - exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY'] class xxxDialog(xxxContainer): allParams = ['title', 'centered', 'pos', 'size', 'style'] paramDict = {'centered': ParamBool} required = ['title'] default = {'title': ''} - winStyles = ['wxDEFAULT_DIALOG_STYLE', 'wxSTAY_ON_TOP', -## 'wxDIALOG_MODAL', 'wxDIALOG_MODELESS', - 'wxCAPTION', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER', 'wxRESIZE_BOX', + winStyles = ['wxDEFAULT_DIALOG_STYLE', + 'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX', + 'wxSTAY_ON_TOP', 'wxTHICK_FRAME', - 'wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN'] + 'wxNO_3D', 'wxDIALOG_NO_PARENT'] styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle', 'tooltip'] - exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY'] class xxxFrame(xxxContainer): allParams = ['title', 'centered', 'pos', 'size', 'style'] paramDict = {'centered': ParamBool} required = ['title'] default = {'title': ''} - winStyles = ['wxDEFAULT_FRAME_STYLE', 'wxDEFAULT_DIALOG_STYLE', + winStyles = ['wxDEFAULT_FRAME_STYLE', + 'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX', 'wxSTAY_ON_TOP', - 'wxCAPTION', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER', - 'wxRESIZE_BOX', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', - 'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_TOOL_WINDOW', - 'wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN'] + 'wxSYSTEM_MENU', 'wxRESIZE_BORDER', + 'wxFRAME_TOOL_WINDOW', 'wxFRAME_NO_TASKBAR', + 'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_SHAPED' + ] styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle', 'tooltip'] - exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY'] class xxxTool(xxxObject): - allParams = ['bitmap', 'bitmap2', 'toggle', 'tooltip', 'longhelp'] + allParams = ['bitmap', 'bitmap2', 'toggle', 'tooltip', 'longhelp', 'label'] required = ['bitmap'] paramDict = {'bitmap2': ParamBitmap, 'toggle': ParamBool} hasStyle = False @@ -405,7 +405,24 @@ class xxxToolBar(xxxContainer): paramDict = {'bitmapsize': ParamPosSize, 'margins': ParamPosSize, 'packing': ParamInt, 'separation': ParamInt, 'style': ParamNonGenericStyle} - winStyles = ['wxTB_FLAT', 'wxTB_DOCKABLE', 'wxTB_VERTICAL', 'wxTB_HORIZONTAL'] + winStyles = ['wxTB_FLAT', 'wxTB_DOCKABLE', 'wxTB_VERTICAL', 'wxTB_HORIZONTAL', 'wxTB_TEXT'] + +class xxxWizard(xxxContainer): + allParams = ['title', 'bitmap', 'pos'] + required = ['title'] + default = {'title': ''} + winStyles = [] + exStyles = ['wxWIZARD_EX_HELPBUTTON'] + +class xxxWizardPage(xxxContainer): + allParams = ['bitmap'] + winStyles = [] + exStyles = [] + +class xxxWizardPageSimple(xxxContainer): + allParams = ['bitmap'] + winStyles = [] + exStyles = [] ################################################################################ # Bitmap, Icon @@ -416,8 +433,7 @@ class xxxBitmap(xxxObject): # Just like bitmap class xxxIcon(xxxObject): - allParams = ['icon'] - required = ['icon'] + allParams = [] ################################################################################ # Controls @@ -501,8 +517,8 @@ class xxxSplitterWindow(xxxContainer): allParams = ['orientation', 'sashpos', 'minsize', 'pos', 'size', 'style'] paramDict = {'orientation': ParamOrientation, 'sashpos': ParamUnit, 'minsize': ParamUnit } winStyles = ['wxSP_3D', 'wxSP_3DSASH', 'wxSP_3DBORDER', 'wxSP_BORDER', - 'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE', - 'wxSP_NO_XP_THEME' ] + 'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE', + 'wxSP_NO_XP_THEME' ] class xxxGenericDirCtrl(xxxObject): allParams = ['defaultfolder', 'filter', 'defaultfilter', 'pos', 'size', 'style'] @@ -621,6 +637,9 @@ class xxxGridSizer(xxxSizer): required = ['cols'] default = {'cols': '2', 'rows': '2'} +class xxxStdDialogButtonSizer(xxxSizer): + allParams = [] + # For repeated parameters class xxxParamMulti: def __init__(self, node): @@ -773,6 +792,9 @@ xxxDict = { 'wxFrame': xxxFrame, 'tool': xxxTool, 'wxToolBar': xxxToolBar, + 'wxWizard': xxxWizard, + 'wxWizardPage': xxxWizardPage, + 'wxWizardPageSimple': xxxWizardPageSimple, 'wxBitmap': xxxBitmap, 'wxIcon': xxxIcon, @@ -814,6 +836,7 @@ xxxDict = { 'wxGridSizer': xxxGridSizer, 'wxFlexGridSizer': xxxFlexGridSizer, 'wxGridBagSizer': xxxGridBagSizer, + 'wxStdDialogButtonSizer': xxxStdDialogButtonSizer, 'sizeritem': xxxSizerItem, 'spacer': xxxSpacer,