;ò n.3Bc @sðdkZdkiiZed„edƒƒ\ ZZZZ Z Z Z Z ZZdeifd„ƒYZdeifd„ƒYZd„ZdZed joPdkZdkZdkZeid eiieid ƒgeid ƒndS( NcCs tiƒS(N(swxsNewId(s _init_ctrls((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pyssi sAnchorsDemoFramecBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCsdS(N((sself((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys _init_utilsscCstii|dddfdtddd|dd d titiBd d d fƒ|iƒti dddfd|dt ddd ti tiBti Bd ddfƒ|_ |i itƒtidddtd|i dddddfd dd ddfƒ|_|iiti|ittttƒƒ|iti|idtƒti dddfd|i dtddd titiBd ddfƒ|_|iitidddƒƒ|iiti|ittttƒƒti ddd fdtd|idd!d tid d"d#fƒ|_ |i itiddd$ƒƒ|i iti|i ttttƒƒti!dd%dt"d|i dd&d dd ddfƒ|_#|i#iti|i#ttttƒƒ|iti$|i%d'|i#dt"ƒti!dd(dt&d|i dd)d dd ddfƒ|_'|i'iti|i'ttttƒƒ|iti$|i%d'|i'dt&ƒti!dd*dt(d|i dd+d dd d,dfƒ|_)|i)iti|i)ttttƒƒ|iti$|i%d'|i)dt(ƒti!dd-dt*d|i dd.d dd d/dfƒ|_+|i+iti|i+ttttƒƒ|iti$|i%d'|i+dt*ƒti,dd0dt-d|i dd1dd2dfd ti.d ddfƒ|_/|i/iti|i/ttttƒƒdS(3NssizeiHi»sidstitlesLayoutAnchors DemonstrationsparentsnamesAnchorsDemoFramesstylesposii{i@i spanel1islabelsOKsokButtoniHiiði€i0iPsbackgroundPanelii(iÿiXi0s anchoredPanelihiiÞsLefts leftCheckBoxssourcesTops topCheckBoxsRights rightCheckBoxi¨sBottomsbottomCheckBoxiøsASelect anchor options above, then resize window to see the effectshelpStaticTextià(0swxsFrames__init__sselfsID_ANCHORSDEMOFRAMEsprntsDEFAULT_FRAME_STYLEs CLIP_CHILDRENs _init_utilssPanelsID_ANCHORSDEMOFRAMEMAINPANELs TAB_TRAVERSALsFULL_REPAINT_ON_RESIZEs mainPanels SetAutoLayoutsTruesButtonsID_ANCHORSDEMOFRAMEOKBUTTONsokButtonsSetConstraintssanchorss LayoutAnchorssFalsesBinds EVT_BUTTONsOnOkButtonButtons"ID_ANCHORSDEMOFRAMEBACKGROUNDPANELs SIMPLE_BORDERsbackgroundPanelsSetBackgroundColoursColours ID_ANCHORSDEMOFRAMEANCHOREDPANELs anchoredPanelsCheckBoxsID_ANCHORSDEMOFRAMELEFTCHECKBOXs leftCheckBoxs EVT_CHECKBOXsOnCheckboxCheckboxsID_ANCHORSDEMOFRAMETOPCHECKBOXs topCheckBoxs ID_ANCHORSDEMOFRAMERIGHTCHECKBOXs rightCheckBoxs!ID_ANCHORSDEMOFRAMEBOTTOMCHECKBOXsbottomCheckBoxs StaticTexts!ID_ANCHORSDEMOFRAMEHELPSTATICTEXTsST_NO_AUTORESIZEshelpStaticText(sselfsprnt((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys _init_ctrlssr    '(((( ( ( (  cCs|i|ƒdS(N(sselfs _init_ctrlssparent(sselfsparent((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys__init__ scCsP|iiti|i|iiƒ|iiƒ|iiƒ|i iƒƒƒdS(N( sselfs anchoredPanelsSetConstraintssanchorss LayoutAnchorss leftCheckBoxsGetValues topCheckBoxs rightCheckBoxsbottomCheckBox(sselfsevent((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pysOnCheckboxCheckbox¥scCs|iƒdS(N(sselfsClose(sselfsevent((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pysOnOkButtonButton­s(s__name__s __module__s _init_utilss _init_ctrlss__init__sOnCheckboxCheckboxsOnOkButtonButton(((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pysAnchorsDemoFrames   ‚  s TestPanelcBstZd„Zd„ZRS(NcCsZ||_tii||dƒti|ddddfƒ}|iti |i |ƒdS(NiÿÿÿÿsShow the LayoutAnchors samplei2( slogsselfswxsPanels__init__sparentsButtonsbsBinds EVT_BUTTONsOnButton(sselfsparentslogsb((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys__init__³s cCst|ƒ}|itƒdS(N(sAnchorsDemoFramesselfswinsShowsTrue(sselfsevtswin((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pysOnButton»s (s__name__s __module__s__init__sOnButton(((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys TestPanel²s cCst||ƒ}|SdS(N(s TestPanelsnbslogswin(sframesnbslogswin((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pysrunTestÃssÜ

LayoutAnchors

A class that implements Delphi's Anchors with wxLayoutConstraints.

Anchored sides maintain the distance from the edge of the control to the same edge of the parent. When neither side is selected, the control keeps the same relative position to both sides.

The current position and size of the control and it's parent is used when setting up the constraints. To change the size or position of an already anchored control, set the constraints to None, reposition or resize and reapply the anchors.

Examples:

Let's anchor the right and bottom edge of a control and resize it's parent.

        ctrl.SetConstraints(LayoutAnchors(ctrl, left=0, top=0, right=1, bottom=1))

        +=========+         +===================+
        | +-----+ |         |                   |
        | |     * |   ->    |                   |
        | +--*--+ |         |           +-----+ |
        +---------+         |           |     * |
                            |           +--*--+ |
                            +-------------------+
        * = anchored edge

When anchored on both sides the control will stretch horizontally.

        ctrl.SetConstraints(LayoutAnchors(ctrl, 1, 0, 1, 1))

        +=========+         +===================+
        | +-----+ |         |                   |
        | *     * |   ->    |                   |
        | +--*--+ |         | +---------------+ |
        +---------+         | *     ctrl      * |
                            | +-------*-------+ |
                            +-------------------+
        * = anchored edge
s__main__sii(swxswx.lib.anchorsslibsanchorssmapsranges ID_ANCHORSDEMOFRAMEANCHOREDPANELs!ID_ANCHORSDEMOFRAMEHELPSTATICTEXTsID_ANCHORSDEMOFRAMEMAINPANELs"ID_ANCHORSDEMOFRAMEBACKGROUNDPANELs ID_ANCHORSDEMOFRAMERIGHTCHECKBOXsID_ANCHORSDEMOFRAMEOKBUTTONsID_ANCHORSDEMOFRAMETOPCHECKBOXs!ID_ANCHORSDEMOFRAMEBOTTOMCHECKBOXsID_ANCHORSDEMOFRAMEsID_ANCHORSDEMOFRAMELEFTCHECKBOXsFramesAnchorsDemoFramesPanels TestPanelsrunTestsoverviews__name__ssyssossrunsmainspathsbasenamesargv(soverviewsID_ANCHORSDEMOFRAMELEFTCHECKBOXsID_ANCHORSDEMOFRAMETOPCHECKBOXswxs ID_ANCHORSDEMOFRAMERIGHTCHECKBOXs TestPanelsID_ANCHORSDEMOFRAMEMAINPANELsrunsanchorssID_ANCHORSDEMOFRAMEs"ID_ANCHORSDEMOFRAMEBACKGROUNDPANELssyss ID_ANCHORSDEMOFRAMEANCHOREDPANELsID_ANCHORSDEMOFRAMEOKBUTTONs!ID_ANCHORSDEMOFRAMEBOTTOMCHECKBOXs!ID_ANCHORSDEMOFRAMEHELPSTATICTEXTsrunTestsossAnchorsDemoFrame((sm/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/LayoutAnchors.pys?s 6˜ 3