;ò /¯ÑCc@s®dkZdkZdfd„ƒYZdeifd„ƒYZd„ZdZedjoPdkZdk Z dk Z e i de i i eid ƒgeid ƒndS( Ns DragShapecBs2tZd„Zd„Zd„Zeid„ZRS(NcCs7||_ddf|_t|_t|_t|_dS(Ni( sbmpsselfspossTruesshownsNonestextsFalses fullscreen(sselfsbmp((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys__init__s    cCs&|iƒ}|i|i|iƒSdS(N(sselfsGetRectsrectsInsideXYsptsxsy(sselfsptsrect((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysHitTests cCs:ti|id|id|iiƒ|iiƒƒSdS(Nii(swxsRectsselfspossbmpsGetWidths GetHeight(sself((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysGetRectsc Cs|iiƒoitiƒ}|i|iƒ|i|i d|i d|ii ƒ|ii ƒ|dd|t ƒ t SntSdS(Nii(sselfsbmpsOkswxsMemoryDCsmemDCs SelectObjectsdcsBlitspossGetWidths GetHeightsopsTruesFalse(sselfsdcsopsmemDC((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysDraws (s__name__s __module__s__init__sHitTestsGetRectswxsCOPYsDraw(((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys DragShapes   s DragCanvascBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( Nc Cs«tii|||ƒg|_t|_t|_ t|_ |i ti ti ƒƒtiƒ|_|itiƒtiƒ}t|ƒ}ddf|_t|_|ii|ƒd}tidddƒ}tidtiti ti!ƒ} |i#|| ƒ} ti%| d| dƒ}ti&ƒ}|i(|ƒ|i)ti*|ti+ƒƒ|i,ƒ|i-ti.ƒ|i/| ƒ|i0|ddƒ|i(ti1ƒti2||ƒ}|i4|ƒt|ƒ}ddf|_d |_|ii|ƒti5ƒ}t|ƒ}d df|_|ii|ƒ|i6ti7|i8ƒ|i6ti9|i:ƒ|i6ti;|i<ƒ|i6ti=|i>ƒ|i6ti?|i@ƒ|i6tiA|iBƒdS( Nis Some Texti9isiiiidsSome dragging textiÈ(CswxsScrolledWindows__init__sselfsparentsIDsshapessNones dragImages dragShapes hiliteShapes SetCursors StockCursors CURSOR_ARROWsimagessgetBackgroundBitmapsbg_bmpsSetBackgroundStylesBG_STYLE_CUSTOMsgetTestStarBitmapsbmps DragShapesshapespossTrues fullscreensappendstextsColours bg_coloursFontsROMANsNORMALsBOLDsfontsGetFullTextExtents textExtents EmptyBitmapsMemoryDCsdcs SelectObjects SetBackgroundsBrushsSOLIDsClearsSetTextForegroundsREDsSetFontsDrawTexts NullBitmapsMasksmasksSetMasksgetTheKidBitmapsBindsEVT_ERASE_BACKGROUNDsOnEraseBackgrounds EVT_PAINTsOnPaints EVT_LEFT_DOWNs OnLeftDowns EVT_LEFT_UPsOnLeftUps EVT_MOTIONsOnMotionsEVT_LEAVE_WINDOWs OnLeaveWindow( sselfsparentsIDs bg_coloursmaskstextsshapesdcsbmps textExtentsfont((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys__init__)sT       !         cCsdS(N((sselfsevt((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys OnLeaveWindowgscCs”|iƒ}|iiƒ}|iiƒ}d}x]||i joLd}x5||i jo$|i |i||ƒ||}qLW||}q3WdS(Ni(sselfs GetClientSizesszsbg_bmpsGetWidthsws GetHeightshsxswidthsysheightsdcs DrawBitmap(sselfsdcsszshswsysx((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysTileBackgroundls cCs3x,|iD]!}|io|i|ƒq q WdS(N(sselfsshapessshapesshownsDrawsdc(sselfsdcsshape((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys DrawShapes~s  cCs4x)|iD]}|i|ƒo|Sq q WtSdS(N(sselfsshapessshapesHitTestsptsNone(sselfsptsshape((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys FindShape…s   cCsA|iƒ}|i|ƒ|i|ƒ|i|ƒ|iƒdS(N( sshapesGetRectsrsdcsSetClippingRectsselfsTileBackgrounds DrawShapessDestroyClippingRegion(sselfsshapesdcsr((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys EraseShapeŒs     cCsT|iƒ}| o/t|ƒ}|iƒiƒ}|i|ƒn|i |ƒdS(N( sevtsGetDCsdcs wxClientDCsselfsGetUpdateRegionsGetBoxsrectsSetClippingRectsTileBackground(sselfsevtsdcsrect((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysOnEraseBackground•s   cCs-ti|ƒ}|i|ƒ|i|ƒdS(N(swxsPaintDCsselfsdcs PrepareDCs DrawShapes(sselfsevtsdc((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysOnPaintŸs cCs<|i|iƒƒ}|o||_|iƒ|_ndS(N(sselfs FindShapesevts GetPositionsshapes dragShapes dragStartPos(sselfsevtsshape((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys OnLeftDown¥s cCs |i p|i ot|_t|_dSn|iiƒ|iiƒt|_ti|ƒ}|i o|i i |ƒt|_ n|ii d|i ƒd|id|ii d|i ƒd|idf|i_ t|i_|ii |ƒt|_dS(Nii(sselfs dragImages dragShapesNonesHidesEndDragswxsClientDCsdcs hiliteShapesDrawspossevts GetPositions dragStartPossTruesshown(sselfsevtsdc((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysOnLeftUp±s       X c Csä|i p|iƒ p |iƒ odSn|io|i oCd} |iƒ}t |i |i i ƒ}t |i |i i ƒ}|| jo || jodSnti|ƒ}t|i_|i|i|ƒ|iio+ti|iititiƒƒ|_n(ti|iititiƒƒ|_|i |ii}|ii|||iiƒ|ii|ƒ|ii ƒnZ|io|ioE|i!|iƒƒ} t}t}|i%o+| t&jp |i%| j o t'}qñn| o| |i%j o| io t'}n|p|o|ii(ƒn|o,ti|ƒ}|i%i)|ƒt&|_%n|o2ti|ƒ}| |_%|i%i)|ti*ƒn|ii|iƒƒ|p|o|ii ƒqàndS(Ni(+sselfs dragShapesevtsDraggings LeftIsDowns dragImages tolerances GetPositionsptsabssxs dragStartPossdxsysdyswxsClientDCsdcsFalsesshowns EraseShapestexts DragStrings StockCursors CURSOR_HANDs DragImagesbmpsposshotspots BeginDrags fullscreensMovesShows FindShapesonShapes unhiliteOlds hiliteNews hiliteShapesNonesTruesHidesDrawsINVERT( sselfsevtsptsdcshotspots unhiliteOlds hiliteNewsdxsdysonShapes tolerance((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysOnMotionÛsV'    !   ( s__name__s __module__s__init__s OnLeaveWindowsTileBackgrounds DrawShapess FindShapes EraseShapesOnEraseBackgroundsOnPaints OnLeftDownsOnLeftUpsOnMotion(((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys DragCanvas(s >      *cCsKti|dƒ}t|dƒ}||d„}|iti|ƒ|SdS(NiÿÿÿÿcCs|i|iƒƒdS(N(scanvassSetSizespanelsGetSize(sevtspanelscanvas((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysonSize(s( swxsPanelsnbswins DragCanvasscanvassonSizesBindsEVT_SIZE(sframesnbslogscanvasswinsonSize((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pysrunTest#s sŒDragImage is used when you wish to drag an object on the screen, and a simple cursor is not enough. On Windows, the WIN32 API is used to do achieve smooth dragging. On other platforms, GenericDragImage is used. Applications may also prefer to use GenericDragImage on Windows, too. wxPython note: wxPython uses GenericDragImage on all platforms, but uses the DragImage name. To use this class, when you wish to start dragging an image, create a DragImage object and store it somewhere you can access it as the drag progresses. Call BeginDrag to start, and EndDrag to stop the drag. To move the image, initially call Show and then Move. If you wish to update the screen contents during the drag (for example, highlight an item as in the example), first call Hide, update the screen, call Move, and then call Show. You can drag within one window, or you can use full-screen dragging either across the whole screen, or just restricted to one area of the screen to save resources. If you want the user to drag between two windows, then you will need to use full-screen dragging. s__main__sii(swxsimagess DragShapesScrolledWindows DragCanvassrunTestsoverviews__name__ssyssossrunsmainspathsbasenamesargv( ssyssrunsoverviews DragShapesrunTests DragCanvassimagessosswx((si/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/DragImage.pys?s  !û