;ò ÉNŽBc@s´dkZdkZdeifd„ƒYZdeifd„ƒYZd„ZdZedjoPdk Z dk Z dk Z e i de i ie id ƒge id ƒndS( Ns TestFramecBsPtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS( NcCs£||_tii||dddtitiBtiBti Bƒt |_ ddf|_ |i ti|iƒ|i ti|iƒ|i ti|iƒ|i ti|iƒ|i ti|iƒ|i ti|iƒtiƒ|_|iiƒ|iiƒf\}}|i!||fƒti"djo|i#dƒnti"djo|i ti$|i%ƒn |i%ƒti&|ƒ}|i(|iddt)ƒdS(Niÿÿÿÿs Shaped Windowsstyleis __WXMAC__sTRight-click to close the window Double-click the image to set/unset the window shapes __WXGTK__(*slogsselfswxsFrames__init__sparents FRAME_SHAPEDs SIMPLE_BORDERsFRAME_NO_TASKBARs STAY_ON_TOPsFalseshasShapesdeltasBindsEVT_LEFT_DCLICKs OnDoubleClicks EVT_LEFT_DOWNs OnLeftDowns EVT_LEFT_UPsOnLeftUps EVT_MOTIONs OnMouseMoves EVT_RIGHT_UPsOnExits EVT_PAINTsOnPaintsimagessgetVippiBitmapsbmpsGetWidths GetHeightswshs SetClientSizesPlatformsSetToolTipStringsEVT_WINDOW_CREATEsSetWindowShapesClientDCsdcs DrawBitmapsTrue(sselfsparentslogshsdcsw((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys__init__s* " $ cGs(ti|iƒ}|i|ƒ|_dS(N(swxsRegionFromBitmapsselfsbmpsrsSetShapeshasShape(sselfsevtsr((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysSetWindowShape2scCs8|io |itiƒƒt|_n |iƒdS(N(sselfshasShapesSetShapeswxsRegionsFalsesSetWindowShape(sselfsevt((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys OnDoubleClick8s  cCs,ti|ƒ}|i|iddtƒdS(Ni(swxsPaintDCsselfsdcs DrawBitmapsbmpsTrue(sselfsevtsdc((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysOnPaint@scCs|iƒdS(N(sselfsClose(sselfsevt((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysOnExitDscCs^|iƒ|i|iƒƒ\}}|iƒ\}}||}||}||f|_ dS(N( sselfs CaptureMousesClientToScreensevts GetPositionsxsysoriginxsoriginysdxsdysdelta(sselfsevtsoriginysoriginxsdxsdysysx((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys OnLeftDownHs    cCs|iƒo|iƒndS(N(sselfs HasCaptures ReleaseMouse(sselfsevt((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysOnLeftUpQs cCsl|iƒo |iƒoN|i|iƒƒ\}}||id||idf}|i |ƒndS(Nii( sevtsDraggings LeftIsDownsselfsClientToScreens GetPositionsxsysdeltasfpsMove(sselfsevtsysxsfp((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys OnMouseMoveVs"( s__name__s __module__s__init__sSetWindowShapes OnDoubleClicksOnPaintsOnExits OnLeftDownsOnLeftUps OnMouseMove(((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys TestFrames *     s TestPanelcBstZd„Zd„ZRS(NcCsZ||_tii||dƒti|ddddfƒ}|iti |i |ƒdS(NiÿÿÿÿsShow the ShapedWindow samplei2( slogsselfswxsPanels__init__sparentsButtonsbsBinds EVT_BUTTONsOnButton(sselfsparentslogsb((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys__init__`s cCs#t||iƒ}|itƒdS(N(s TestFramesselfslogswinsShowsTrue(sselfsevtswin((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysOnButtonhs(s__name__s __module__s__init__sOnButton(((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys TestPanel_s cCst||ƒ}|SdS(N(s TestPanelsnbslogswin(sframesnbslogswin((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pysrunTestoss;

Shaped Window

Top level windows now have a SetShape method that lets you set a non-rectangular shape for the window using a wxRegion. All pixels outside of the region will not be drawn and the window will not be sensitive to the mouse in those areas either. s__main__sii(swxsimagessFrames TestFramesPanels TestPanelsrunTestsoverviews__name__ssyssossrunsmainspathsbasenamesargv( ssyssrunsoverviewsrunTests TestFramesimagesswxsoss TestPanel((sl/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/ShapedWindow.pys?s  X