;ò =§Cc@s,dkZdkZdkiiZhdddf<dddf<ddd f<d d d f<d ddf<dddfs       1c Cs8|iƒg}xA|iD]6}|i|d|d|d|d|dgƒqW|i}|d|d|d|d|dg}ti |i ƒ}||_dddddg|_ ||_ |idtiƒ|idtidƒƒ|idtidƒƒ|iddtidƒƒ|iddtidƒƒ|id dtidƒƒ|idtidƒƒ|iddtidƒƒ|id tidƒƒtidƒ|_|id d tidƒƒ|id dddtiddd tidƒƒ|idd tidƒddƒ|iƒdS(NiiiiisREDsWHITEs LIGHT BLUEiiswxWindows Applicationsscolours Printed: stypes Date & TimesalignsindentiÿÿÿÿsBLUEsPage NosNum(sselfsReadDatasnew_datasdatasvalsappendsheaders new_headersprintouts PrintTablesframesprts set_columnslabelsSetColAlignmentswxs ALIGN_CENTREsSetColBackgroundColours NamedColoursSetColTextColours SetCellColours SetCellTextslabel_font_colours SetHeaders ALIGN_RIGHTs SetFootersPreview(sselfsnew_datasvals new_headersprt((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys PreviewNarrowRs2  4 )  1"c Cs'd}d}d}d} g}d}g} x!t|ƒD]}| i |ƒq7Wt i |i ƒ}xQt|ƒD]C} g}x't|ƒD]} |i t| ƒƒq†W|i |ƒqmWx't|ƒD]} |i| tiƒqÁW|iƒd|_d|_||_| |_|idƒ|iƒdS(Ni-i f0.20000000000000001f1.0iisTest of Small Grid Size(s total_cols total_rowshsizesvsizesdatasstartxscolumnssrangesvalsappendsprintouts PrintTablesselfsframesprtsrowsvaluescolsstrsSetColAlignmentswxs ALIGN_CENTREs SetLandscapestext_font_sizescell_left_margins set_columns SetHeadersPreview( sselfsstartxs total_colsvalshsizesdatasvaluesprts total_rowsvsizescolscolumnssrow((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pysOnPreviewMatrixqs8          cCsfti|iƒ}dddg|_g|_dddgddd gg|_|iƒ|i ƒdS( NsHeader 1sHeader 2sHeader 3sRow 1s1s2sRow 2s3sV4 New Line to see if it also can wrap around the cell region properly Another new line( sprintouts PrintTablesselfsframesprtslabels set_columnsdatas SetFootersPreview(sselfsprt((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys PreviewLine‘s  ! cCsvti|iƒ}|idƒtdƒ}g}x!|D]}|i |i ƒƒq8W|i ƒ||_|i ƒdS(Ns PROCLAMATIONsdata/proclamation.txt(sprintouts PrintTablesselfsframesprts SetHeadersopensfilesdatastxtsappendsstripsclosesPreview(sselfsdatasprtsfilestxt((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys PreviewText™s    cCss|iƒti|iƒ}|i|_d|_dddddddg|_|i |_ |i ƒ|i ƒdS(Nf0.5iii( sselfsReadDatasprintouts PrintTablesframesprtsdatas left_margins set_columnssheaderslabels SetLandscapesPrint(sselfsprt((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys PrintWide¤s     ( s__name__s __module__s__init__sOnButtonsReadDatas PreviewWides PreviewNarrowsOnPreviewMatrixs PreviewLines PreviewTexts PrintWide(((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys TablePanels       cCst|||ƒ}|SdS(N(s TablePanelsnbslogsframeswin(sframesnbslogswin((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pysrunTest²ss`

Table Printing

This demo shows various ways of using the new PrintOut class. To understand the class you need to examine the demo examples and the library printout.py module classes.

The initial class primarily contains a Table preview/printing class. There is a lot of flexibility in manipulating the placement, sizing, colours, alignment of the table text and cell background colors. There are also a number of options for printing Header and Footer information on the page.

There is also a class to extract the parameters from a wxGrid and easily recreate a Table printout.

The data is printed from a list object containing the column and row values. The label or table header can be defined and will be repeated for all pages.

The correct "Total Page" does get calculated and used in the print out Footer.

There is still problems with the print framework to properly get the total pages in the preview unless the program knows it before trying to parse through the available pages. This will be fixed when the framework allows for it. s printout.pys__main__sii(sosswxswx.lib.printoutslibsprintouts buttonDefssPanels TablePanelsrunTestspathsjoinsdirnames__file__soverviews__name__ssyssrunsmainsbasenamesargv( ssyss buttonDefssrunsossprintoutsrunTestsoverviews TablePanelswx((sj/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/TablePrint.pys?s  `   (