Changeset 477

Show
Ignore:
Timestamp:
03/18/03 16:29:04 (6 years ago)
Author:
sholloway
Message:

Added "show" attribute to all wxWindow derived objects in wxPythonSkin
Removed supurfulus "show" attributes from other components

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/dialog.py

    r472 r477  
    4242        'title':    'Dialog', 
    4343        'topframe': '0', 
    44         'show':     '0', 
    4544        'ctxvar':   'frame', 
    4645        }) 
     
    6059        self.wxFinalStandardOptions() 
    6160 
    62         nShow = self.wxEval('show'
     61        nShow = self.wxEvalCond('show', None
    6362        if nShow is wx.wxDIALOG_MODAL: 
    6463            self.object.ShowModal() 
    6564        elif nShow: 
    66             self.object.Show(1
     65            self.object.Show(nShow
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/frame.py

    r472 r477  
    4343        'title':    'Frame', 
    4444        'topframe': '0', 
    45         'show':     '0', 
    4645        'ctxvar':   'frame', 
    4746        'locking':  'None', 
     
    7170    def SkinFinalize(self): 
    7271        self.wxFinalStandardOptions() 
    73         if self.wxEval('show'): 
    74             self.object.Show(1) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/layout.py

    r475 r477  
    5555    default_settings = wxSkinLayoutObject.default_settings.copy() 
    5656    default_settings.update({ 
    57         'orientation': 'opposite', 
     57        'ctxvar': 'layout', 
     58        #'orientation': 'opposite', 
    5859        #'autosize': '1', 
    5960        #'sethints': '1', 
     
    100101            warnings.warn('"sizerFit" attribute should be replaced with "fit"', DeprecationWarning) 
    101102 
    102         self.PushContext() 
     103        # Grab the window parent object, or the first layout derived parent 
    103104        self.winParent = self.wxGetParentObject((wx.wxWindowPtr, layout)) 
    104         if not isinstance(self.winParent, wx.wxWindowPtr): self.winParent = None 
    105         orientation = self.settings['orientation'] 
     105        if not isinstance(self.winParent, wx.wxWindowPtr):  
     106            # Layouts cancel the window parent 
     107            self.winParent = None 
     108 
     109        # Figure out what type of sizer we should be creating 
     110        orientation = self.settings.get('orientation', 'opposite') 
    106111        if not self.winParent and orientation == 'opposite': 
    107112            orientation = 'vertical' # New Default 
     
    117122        postArgs = self.wxEvalCond('args', ()) 
    118123        self.object = sizerClass(*(preArgs + postArgs)) 
    119         self.context.layout = self.object 
    120124        self.wxInitialStandardOptions() 
     125 
     126        # Tinker with the context to make things available 
     127        self.PushContext() 
    121128 
    122129    def SkinFinalize(self): 
     
    152159        sizerargs = ChildNode.wxEvalCond('sizercfg', None) 
    153160        if sizerargs is None: 
    154             sizerargs = [ChildNode.wxEvalCond(*evalargs) for evalargs in (('sizerOption', 0), ('sizerFlag', 0), ('sizerBorder', 0))] 
     161            sizerargs = tuple([ChildNode.wxEvalCond(*evalargs) for evalargs in (('sizerOption', 0), ('sizerFlag', 0), ('sizerBorder', 0))]) 
    155162            if sizerargs != (0,0,0): 
     163                print sizerargs 
    156164                warnings.warn('"sizerOption", "sizerFlag", and "sizerBorder" attributes should be replaced with "sizercfg"', DeprecationWarning) 
    157165        args = args + tuple(sizerargs) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/layout_flexgrid.py

    r472 r477  
    3737    default_settings = layout.default_settings.copy() 
    3838    default_settings.update({ 
     39        'ctxvar': 'layout', 
    3940        'orientation': 'opposite', 
    4041        'sizerAuto': '1', 
     
    5354 
    5455    def SkinInitialize(self): 
    55         self.PushContext() 
    5656        self.winParent = self.wxGetParentObject((wx.wxWindowPtr, layout)) 
    5757        if not isinstance(self.winParent, wx.wxWindowPtr): self.winParent = None 
     
    7070            self.object.AddGrowableCol(col) 
    7171 
    72         self.context.layout = self.object 
     72        self.PushContext() 
    7373 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/mdi_child_frame.py

    r473 r477  
    4141        'style':    'wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN', 
    4242        'title':    'Frame', 
    43         'show':     '0', 
    4443        'ctxvar':   'frame', 
    4544        }) 
     
    5958    def SkinFinalize(self): 
    6059        self.wxFinalStandardOptions() 
    61         if self.wxEval('show'): 
    62             self.object.Show(1) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/mdi_parent_frame.py

    r473 r477  
    4242        'title':    'Frame', 
    4343        'topframe': '0', 
    44         'show':     '0', 
    4544        'ctxvar':   'frame', 
    4645        }) 
     
    6261    def SkinFinalize(self): 
    6362        self.wxFinalStandardOptions() 
    64         if self.wxEval('show'): 
    65             self.object.Show(1) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/mini_frame.py

    r473 r477  
    4141        'style':    'wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN', 
    4242        'title':    'Frame', 
    43         'show':     '0', 
    4443        'ctxvar':   'frame', 
    4544        }) 
     
    5958    def SkinFinalize(self): 
    6059        self.wxFinalStandardOptions() 
    61         if self.wxEval('show'): 
    62             self.object.Show(1) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/popup.py

    r277 r477  
    3939        'name':     __name__, 
    4040        'style':    'wxCLIP_CHILDREN', 
    41         'show':     '0', 
    4241        'transient': '0', 
    4342        }) 
     
    6059    def SkinFinalize(self): 
    6160        self.wxFinalStandardOptions() 
    62         if self.wxEval('show'): 
    63             self.object.Show(1) 
  • trunk/RBSkinning/RBSkinning/wxPythonSkin/wxSkinObject.py

    r472 r477  
    134134        if 'enable' in self.source_settings: 
    135135            self.object.Enable(self.wxEval('enable')) 
     136        if 'show' in self.source_settings: 
     137            self.object.Show(self.wxEval('show')) 
    136138        if 'tooltip' in self.source_settings: 
    137139            self.object.SetToolTipString(self.settings['tooltip'])