.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Prima::Header 3" .TH Prima::Header 3 "2009-02-24" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Prima::Header \- a multi\-tabbed header widget. .SH "DESCRIPTION" .IX Header "DESCRIPTION" The widget class provides functionality of several button-like caption tabs, that can be moved and resized by the user. The class was implemented with a view to serve as a table header for list and grid widgets. .SH "API" .IX Header "API" .SS "Events" .IX Subsection "Events" .IP "Click \s-1INDEX\s0" 4 .IX Item "Click INDEX" Called when the user clicks on the tab, positioned at \s-1INDEX\s0. .IP "DrawItem \s-1CANVAS\s0, \s-1INDEX\s0, X1, Y1, X2, Y2, \s-1TEXT_BASELINE\s0" 4 .IX Item "DrawItem CANVAS, INDEX, X1, Y1, X2, Y2, TEXT_BASELINE" A callback used to draw the tabs. \s-1CANVAS\s0 is the output object; \&\s-1INDEX\s0 is the index of a tab. X1,Y2,X2,Y2 are the coordinates of the boundaries of the tab rectangle; \&\s-1TEXT_BASELINE\s0 is a pre-calculated vertical position for eventual centered text output. .IP "MeasureItem \s-1INDEX\s0, \s-1RESULT\s0" 4 .IX Item "MeasureItem INDEX, RESULT" Stores in scalar, referenced by \s-1RESULT\s0, the width or height ( depending on vertical property value ) of the tab in pixels. .IP "MoveItem \s-1OLD_INDEX\s0, \s-1NEW_INDEX\s0" 4 .IX Item "MoveItem OLD_INDEX, NEW_INDEX" Called when the user moves a tab from its old location, specified by \s-1OLD_INDEX\s0, to the \s-1NEW_INDEX\s0 position. By the time of call, all internal structures are updated. .IP "SizeItem \s-1INDEX\s0, \s-1OLD_EXTENT\s0, \s-1NEW_EXTENT\s0" 4 .IX Item "SizeItem INDEX, OLD_EXTENT, NEW_EXTENT" Called when the user resizes a tab in \s-1INDEX\s0 position. \s-1OLD_EXTENT\s0 and \s-1NEW_EXTENT\s0 are either width or height of the tab, depending on vertical property value. .IP "SizeItems" 4 .IX Item "SizeItems" Called when more than one tab has changed its extent. This might happen as a result of user action, as well as an effect of set-calling to some properties. .SS "Properties" .IX Subsection "Properties" .IP "clickable \s-1BOOLEAN\s0" 4 .IX Item "clickable BOOLEAN" Selects if the user is allowed to click the tabs. .Sp Default value: 1 .IP "dragable \s-1BOOLEAN\s0" 4 .IX Item "dragable BOOLEAN" Selects if the user is allowed to move of the tabs. .Sp Default value: 1 .IP "items \s-1ARRAY\s0" 4 .IX Item "items ARRAY" Array of scalars, representing the internal data of the tabs. By default the scalars are treated as text strings. .IP "minTabWidth \s-1INTEGER\s0" 4 .IX Item "minTabWidth INTEGER" A minimal extent in pixels a tab must occupy. .Sp Default value: 2 .IP "offset \s-1INTEGER\s0" 4 .IX Item "offset INTEGER" An offset on the major axis ( depends on vertical property value ) that the widget is drawn with. Used for the conjunction with list widgets ( see Prima::DetailedList ), when the list is horizontally or vertically scrolled. .Sp Default value: 0 .IP "pressed \s-1INTEGER\s0" 4 .IX Item "pressed INTEGER" Contains the index of the currently pressed tab. A \-1 value is selected when no tabs are pressed. .Sp Default value: \-1 .IP "scalable \s-1BOOLEAN\s0" 4 .IX Item "scalable BOOLEAN" Selects if the user is allowed to resize the tabs. .Sp Default value: 1 .IP "vertical \s-1BOOLEAN\s0" 4 .IX Item "vertical BOOLEAN" If 1, the tabs are aligned vertically; the offset, widths property and extent parameters of the callback notification assume heights of the tabs. .Sp If 0, the tabs are aligned horizontally, and the extent properties and parameters assume tab widths. .IP "widths \s-1ARRAY\s0" 4 .IX Item "widths ARRAY" Array of integer values, corresponding to the extents of the tabs. The extents are widths ( \f(CW\*(C`vertical\*(C'\fR is 0 ) or heights ( \f(CW\*(C`vertical\*(C'\fR is 1 ). .SS "Methods" .IX Subsection "Methods" .IP "tab2offset \s-1INDEX\s0" 4 .IX Item "tab2offset INDEX" Returns offset of the INDEXth tab ( without regard to offset property value ). .IP "tab2rect \s-1INDEX\s0" 4 .IX Item "tab2rect INDEX" Returns four integers, representing the rectangle area, occupied by the INDEXth tab ( without regard to offset property value ). .SH "AUTHOR" .IX Header "AUTHOR" Dmitry Karasik, . .SH "SEE ALSO" .IX Header "SEE ALSO" Prima, Prima::Widget, Prima::DetailedList, \fIexamples/sheet.pl\fR.