X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9abdd2cb902ca40a25ab84e70155dcf58e92c4e2..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/wx/tools/XRCed/params.py diff --git a/wxPython/wx/tools/XRCed/params.py b/wxPython/wx/tools/XRCed/params.py index 7a1b4b75a9..ef153502b4 100644 --- a/wxPython/wx/tools/XRCed/params.py +++ b/wxPython/wx/tools/XRCed/params.py @@ -10,11 +10,20 @@ from globals import * from types import * from wxPython.xrc import * -genericStyles = ['wxSIMPLE_BORDER', 'wxDOUBLE_BORDER', - 'wxSUNKEN_BORDER', 'wxRAISED_BORDER', - 'wxSTATIC_BORDER', 'wxNO_BORDER', - 'wxTRANSPARENT_WINDOW', 'wxWANTS_CHARS', - 'wxNO_FULL_REPAINT_ON_RESIZE'] +genericStyles = [ + 'wxCLIP_CHILDREN', + 'wxSIMPLE_BORDER', + 'wxSUNKEN_BORDER', + 'wxDOUBLE_BORDER', + 'wxRAISED_BORDER', + 'wxSTATIC_BORDER', + 'wxNO_BORDER', + 'wxTRANSPARENT_WINDOW', + 'wxWANTS_CHARS', + 'wxNO_FULL_REPAINT_ON_RESIZE', + 'wxFULL_REPAINT_ON_RESIZE', + 'wxWS_EX_BLOCK_EVENTS', +] buttonSize = (35,-1) # in dialog units, transformed to pixels in panel ctor @@ -407,10 +416,10 @@ class ParamEncoding(ParamText): class ContentDialog(wxDialog): def __init__(self, parent, value): # Load from resource - pre = wxPreDialog() + pre = wxPreDialog() g.frame.res.LoadOnDialog(pre, parent, 'DIALOG_CONTENT') self.this = pre.this - self._setOORInfo(self) + self._setOORInfo(self) self.list = XRCCTRL(self, 'LIST') # Set list items for v in value: @@ -457,10 +466,10 @@ class ContentDialog(wxDialog): class ContentCheckListDialog(wxDialog): def __init__(self, parent, value): - pre = wxPreDialog() + pre = wxPreDialog() g.frame.res.LoadOnDialog(pre, parent, 'DIALOG_CONTENT_CHECK_LIST') self.this = pre.this - self._setOORInfo(self) + self._setOORInfo(self) self.list = XRCCTRL(self, 'CHECK_LIST') # Set list items i = 0 @@ -589,10 +598,10 @@ class ParamContentCheckList(ParamContent): class IntListDialog(wxDialog): def __init__(self, parent, value): - pre = wxPreDialog() + pre = wxPreDialog() g.frame.res.LoadOnDialog(pre, parent, 'DIALOG_INTLIST') self.this = pre.this - self._setOORInfo(self) + self._setOORInfo(self) self.list = XRCCTRL(self, 'LIST') # Set list items value.sort() @@ -706,6 +715,17 @@ class ParamOrient(RadioBox): if not value: value = 'wxHORIZONTAL' self.SetStringSelection(self.seulav[value]) +class ParamOrientation(RadioBox): + values = {'horizontal': 'horizontal', 'vertical': 'vertical'} + seulav = {'horizontal': 'horizontal', 'vertical': 'vertical'} + def __init__(self, parent, name): + RadioBox.__init__(self, parent, -1, choices=self.values.keys(), name=name) + def GetValue(self): + return self.values[self.GetStringSelection()] + def SetValue(self, value): + if not value: value = 'vertical' + self.SetStringSelection(self.seulav[value]) + class ParamFile(PPanel): def __init__(self, parent, name): PPanel.__init__(self, parent, name) @@ -754,10 +774,10 @@ class ParamFile(PPanel): class ParamBitmap(PPanel): def __init__(self, parent, name): - pre = wxPrePanel() + pre = wxPrePanel() g.frame.res.LoadOnPanel(pre, parent, 'PANEL_BITMAP') self.this = pre.this - self._setOORInfo(self) + self._setOORInfo(self) self.SetBackgroundColour(parent.GetBackgroundColour()) self.SetForegroundColour(parent.GetForegroundColour()) self.modified = self.freeze = False @@ -841,6 +861,7 @@ paramDict = { 'flag': ParamFlag, 'style': ParamStyle, 'exstyle': ParamExStyle, 'pos': ParamPosSize, 'size': ParamPosSize, + 'cellpos': ParamPosSize, 'cellspan': ParamPosSize, 'border': ParamUnit, 'cols': ParamInt, 'rows': ParamInt, 'vgap': ParamUnit, 'hgap': ParamUnit, 'checkable': ParamBool, 'checked': ParamBool, 'radio': ParamBool,