;ò (’½Cc@s¡dkZdkZdZdeifd„ƒYZd„ZdZedjoPdkZdkZdk Z e i dei i ei dƒgei d ƒndS( NsnRight-click on the panel above the line to get a menu. This menu will be managed by a FileHistory object and so the files you select will automatically be added to the end of the menu and will be selectable the next time the menu is viewed. The filename selected, either via the Open menu item, or from the history, will be displayed in the log window below. s TestPanelcBs5tZd„Zd„Zd„Zd„Zd„ZRS(Nc Cs·||_tii||dƒtitiƒ}|i ƒi ƒ}ti |dti titiƒ}ti |dti titiƒ}ti|ddƒ}|i|ƒ|i|dtitiBdƒ|iti|dƒdtiƒ|iddfƒti|dtƒ}|i|ƒ|i|dtitiBdƒ|i|ƒ|itƒtiƒ|_}|i!ti"d ƒ|i!ti#d ƒ|i!ti$d ƒ|i!ti%d ƒ|i!ti&d ƒ|i'ti"t(ƒ|i'ti$t(ƒ|i'ti%t(ƒ|i'ti&t(ƒti)ƒ|_*|i*i+|iƒ|i,ti-|i.ƒ|i,ti/|i0dti#ƒ|i,ti1|i2dti3dti4ƒ|i,ti5|i6ƒdS(Niÿÿÿÿiis FileHistoryiii is&News&Open...s&Closes&Saves Save &as...sidsid2(7slogsselfswxsPanels__init__sparentsBoxSizersVERTICALsboxsGetFonts GetPointSizesfssFontsSWISSsNORMALsBOLDsbfsnfs StaticTextstsSetFontsAddsCENTERsALLs StaticLinesEXPANDstextsSetSizers SetAutoLayoutsTruesMenusmenusmsAppendsID_NEWsID_OPENsID_CLOSEsID_SAVEs ID_SAVEASsEnablesFalses FileHistorys filehistorysUseMenusBinds EVT_RIGHT_UPs OnRightClicksEVT_MENUsOnFileOpenDialogsEVT_MENU_RANGEs OnFileHistorysID_FILE1sID_FILE9sEVT_WINDOW_DESTROYsCleanup( sselfsparentslogsboxsbfsfssmsnfst((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pys__init__s@ %%  "    (cGs|`|iiƒdS(N(sselfs filehistorysmenusDestroy(sselfsargs((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pysCleanupKscCs|i|iƒdS(N(sselfs PopupMenusmenu(sselfsevt((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pys OnRightClickQsc Cs‰ti|dtiƒdddtitiBƒ}|iƒti jo4|i ƒ}|i i d|ƒ|ii|ƒn|iƒdS(Ns defaultDirswildcards All Files|*sstylesYou selected %s (swxs FileDialogsselfsossgetcwdsOPENs CHANGE_DIRsdlgs ShowModalsID_OKsGetPathspathslogswrites filehistorysAddFileToHistorysDestroy(sselfsevtsdlgspath((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pysOnFileOpenDialogUs   cCsM|iƒti}|ii|ƒ}|i i d|ƒ|ii |ƒdS(NsYou selected %s ( sevtsGetIdswxsID_FILE1sfileNumsselfs filehistorysGetHistoryFilespathslogswritesAddFileToHistory(sselfsevtspathsfileNum((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pys OnFileHistoryes(s__name__s __module__s__init__sCleanups OnRightClicksOnFileOpenDialogs OnFileHistory(((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pys TestPanels  8   cCst||ƒ}|SdS(N(s TestPanelsnbslogswin(sframesnbslogswin((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pysrunTestrssN

FileHistory

wxFileHistory encapsulates functionality to record the last few files visited, and to allow the user to quickly load these files using the list appended to a menu, such as the File menu.

Note that this inclusion is not automatic; as illustrated in this example, you must add files (and remove them) as deemed necessary within the framework of your program.

Note also the additional cleanup required for this class, namely trapping the enclosing window's Destroy event and deleting the file history control and its associated menu. s__main__sii(sosswxstextsPanels TestPanelsrunTestsoverviews__name__ssyssrunsmainspathsbasenamesargv(ssyssrunstextsrunTestsoverviewswxsoss TestPanel((sk/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/FileHistory.pys?s   `