Manual Pages for UNIX Darwin command on man iwidgets_canvasprintbox
MyWebUniversity

Manual Pages for UNIX Darwin command on man iwidgets_canvasprintbox

iwidgets::canvasprintbox(1) [incr Widgets] iwidgets::canvasprintbox(1)

NAME

iwidgets::canvasprintbox - Create and manipulate a canvas print box

widget

SYNOPSIS

iiwwiiddggeettss::::ccaannvvaasspprriinnttbbooxx pathName ?options? IINNHHEERRIITTAANNCCEE

itk::Widget <- iwidgets::Canvasprintbox

SSTTAANNDDAARRDD OOPPTTIIOONNSS aaccttiivveeBBaacckkggrroouunndd bbaacckkggrroouunndd bboorrddeerrWWiiddtthh ccuurrssoorr ffoorreeggrroouunndd hhiigghhlliigghhttBBaacckkggrroouunndd hhiigghhlliigghhttCCoolloorr hhiigghhlliigghhttTThhiicckknneessss iinnsseerrttBBaacckkggrroouunndd iinnsseerrttBBoorrddeerrWWiiddtthh iinnsseerrttOOffffTTiimmee iinnsseerrttOOnnTTiimmee iinnsseerrttWWiiddtthh rreelliieeff rreeppeeaattDDeellaayy rreeppeeaattIInntteerrvvaall sseelleeccttBBaacckkggrroouunndd sseelleeccttBBoorrddeerrWWiiddtthh sseelleeccttFFoorreeggrroouunndd See the "options" manual entry for details on the standard options. AASSSSOOCCIIAATTEEDD OOPPTTIIOONNSS

WWIIDDGGEETT-SSPPEECCIIFFIICC OOPPTTIIOONNSS

Name: ffiilleennaammee Class: FFiilleeNNaammee

Command-Line Switch: -ffiilleennaammee

The file to write the postscript output to (Only when output is set to "file"). If posterizing is turned on and hhppaaggeeccnntt and/or vvppaaggeeccnntt is more than 1, x.y is appended to the filename where x is the horizontal page number and y the vertical page number. Name: hhppaaggeeccnntt Class: PPaaggeeCCnntt

Command-Line Switch: -hhppaaggeeccnntt

Is used in combination with ppoosstteerriizzee to determine over how many pages the output should be distributed. This attribute specifies how many pages should be used horizontaly. Any change to this attribute will automatically update the "stamp". Defaults to 1. Name: oorriieenntt Class: OOrriieenntt

Command-Line Switch: -oorriieenntt

Determines the orientation of the output to the printer (or file). It can take the value "portrait" or "landscape"

(default). Changes to this attribute will be reflected immedi-

ately in the "stamp". Defaults to "landscape" but will be

changed automaticaly to the value deemed appropiate for the cur-

rent canvas. Setting this attribute when the canvasprintbox is first constructed (instead of using the "configure" method) will turn off the auto adjustment of this attribute. Name: oouuttppuutt Class: OOuuttppuutt

Command-Line Switch: -oouuttppuutt

Specifies where the postscript output should go: to the printer or to a file. Can take on the values "printer" or "file". The

corresponding entry-widget will reflect the contents of either

the pprriinnttccmmdd attribute or the ffiilleennaammee attribute. Defaults to "printer". Name: ppaaggeeSSiizzee Class: PPaaggeeSSiizzee

Command-Line Switch: -ppaaggeessiizzee

The pagesize the printer supports. Changes to this attribute will be reflected immediately in the "stamp". Defaults to "a4". Name: ppoosstteerriizzee Class: PPoosstteerriizzee

Command-Line Switch: -ppoosstteerriizzee

Indicates if posterizing is turned on or not. Posterizing the output means that it is possible to distribute the output over

more than one page. This way it is possible to print a can-

vas/region which is larger than the specified pagesize without stretching. If used in combination with stretching it can be used to "blow up" the contents of a canvas to as large as size as you want (See attributes: hpagecnt and vpagecnt). Any change to this attribute will automatically update the "stamp". Defaults to 0. Name: pprriinnttCCmmdd Class: PPrriinnttCCmmdd

Command-Line Switch: -pprriinnttccmmdd

The command to execute when printing the postscript output. The command will get the postscript directed to its standard input (Only when output is set to "printer"). Defaults to "lpr". Name: pprriinnttRReeggiioonn Class: PPrriinnttRReeggiioonn

Command-Line Switch: -pprriinnttrreeggiioonn

A list of four coordinates specifying which part of the canvas

to print. An empty list means that the canvas' entire ssccrroollllrree-

ggiioonn should be printed. Any change to this attribute will auto-

matically update the "stamp". Defaults to an empty list. Name: ssttrreettcchh Class: SSttrreettcchh

Command-Line Switch: -ssttrreettcchh

Determines if the output should be stretched to fill the page (as defined by the attribute pagesize) as large as possible. The

aspect-ratio of the output will be retained and the output will

never fall outside of the boundaries of the page. Defaults to 0 but will be changed automaticaly to the value deemed appropiate

for the current canvas. Setting this attribute when the can-

vasprintbox is first constructed (instead of using the "config-

ure" method) will turn off the auto adjustment of this attribute. Name: vvPPaaggeeCCnntt Class: PPaaggeeCCnntt

Command-Line Switch: -vvppaaggeeccnntt

Is used in combination with "posterize" to determine over how many pages the output should be distributed. This attribute specifies how many pages should be used verticaly. Any change to this attribute will automatically update the "stamp". Defaults to 1.

DESCRIPTION

Implements a print box for printing the contents of a canvas widget to a printer or a file. It is possible to specify page orientation, the number of pages to print the image on and if the output should be stretched to fit the page. Options exist to control the appearance and actions of the widget. MMEETTHHOODDSS The iiwwiiddggeettss::::ccaannvvaasspprriinnttbbooxx command creates a new Tcl command whose

name is pathName. This command may be used to invoke various opera-

tions on the widget. It has the following general form: pathName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for canvasprintbox widgets:

WWIIDDGGEETT-SSPPEECCIIFFIICC MMEETTHHOODDSS

pathName ccggeett option Returns the current value of the configuration option given by

option. Option may have any of the values accepted by the iiwwiidd-

ggeettss::::ccaannvvaasspprriinnttbbooxx command. pathName ccoonnffiigguurree ?option? ?value option value ...? Query or modify the configuration options of the widget. If no

option is specified, returns a list describing all of the avail-

able options for pathName (see TTkkCCoonnffiigguurreeIInnffoo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or

more option-value pairs are specified, then the command modifies

the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the iiwwiiddggeettss::::ccaannvvaasspprriinnttbbooxx command. pathName ggeettoouuttppuutt Returns the value of the pprriinntteerrccmmdd or ffiilleennaammee option depending on the current setting of oouuttppuutt. pathName pprriinntt

Perfrom the actual printing of the canvas using the current set-

tings of all the attributes. Returns a boolean indicating wether the printing was successful or not. pathName rreeffrreesshh Retrieves the current value for all edit fields and updates the

stamp accordingly. Is useful for Apply-buttons.

pathName sseettccaannvvaass canvas

This is used to set the canvas that has to be printed. A stamp-

sized copy will automatically be drawn to show how the output would look with the current settings. pathName ssttoopp Stops the drawing of the "stamp". I'm currently unable to detect

when a Canvasprintbox gets destroyed or withdrawn. It's there-

fore advised that you perform a stop before you do something like that. CCOOMMPPOONNEENNTTSS Name: pprrttfflleennttrryy Class: EEnnttrryy The prtflentry component is the entry field for user input of

the ffiilleennaammee or pprriinntteerr command (depending on the value of oouutt-

ppuutt). Name: hhppccnntt Class: EEnnttrryy The hpcnt component is the entry field for user input of the number of pages to use horizontaly when ppoosstteerriizzee is turned on. Name: vvppccnntt Class: EEnnttrryy The vpcnt component is the entry field for user input of the number of pages to use verticaly when ppoosstteerriizzee is turned on. EEXXAAMMPPLLEE package require Iwidgets 4.0

iwidgets::canvasprintbox .fsb -orient landscape -stretch 1

pack .fsb -padx 10 -pady 10 -fill both -expand yes

AUTHOR Tako Schotanus Tako.Schotanus@bouw.tno.nl KKEEYYWWOORRDDSS canvasprintbox, widget Tk iwidgets::canvasprintbox(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™