1Prima::Header(3)      User Contributed Perl Documentation     Prima::Header(3)
2
3
4

NAME

6       Prima::Header - a multi-tabbed header widget.
7

DESCRIPTION

9       The widget class provides functionality of several button-like caption
10       tabs, that can be moved and resized by the user.  The class was
11       implemented with a view to serve as a table header for list and grid
12       widgets.
13

API

15   Events
16       Click INDEX
17           Called when the user clicks on the tab, positioned at INDEX.
18
19       DrawItem CANVAS, INDEX, X1, Y1, X2, Y2, TEXT_BASELINE
20           A callback used to draw the tabs. CANVAS is the output object;
21           INDEX is the index of a tab.  X1,Y2,X2,Y2 are the coordinates of
22           the boundaries of the tab rectangle; TEXT_BASELINE is a pre-
23           calculated vertical position for eventual centered text output.
24
25       MeasureItem INDEX, RESULT
26           Stores in scalar, referenced by RESULT, the width or height (
27           depending on vertical property value ) of the tab in pixels.
28
29       MoveItem OLD_INDEX, NEW_INDEX
30           Called when the user moves a tab from its old location, specified
31           by OLD_INDEX, to the NEW_INDEX position. By the time of call, all
32           internal structures are updated.
33
34       SizeItem INDEX, OLD_EXTENT, NEW_EXTENT
35           Called when the user resizes a tab in INDEX position. OLD_EXTENT
36           and NEW_EXTENT are either width or height of the tab, depending on
37           vertical property value.
38
39       SizeItems
40           Called when more than one tab has changed its extent. This might
41           happen as a result of user action, as well as an effect of set-
42           calling to some properties.
43
44   Properties
45       clickable BOOLEAN
46           Selects if the user is allowed to click the tabs.
47
48           Default value: 1
49
50       dragable BOOLEAN
51           Selects if the user is allowed to move of the tabs.
52
53           Default value: 1
54
55       items ARRAY
56           Array of scalars, representing the internal data of the tabs.  By
57           default the scalars are treated as text strings.
58
59       minTabWidth INTEGER
60           A minimal extent in pixels a tab must occupy.
61
62           Default value: 2
63
64       offset INTEGER
65           An offset on the major axis ( depends on vertical property value )
66           that the widget is drawn with. Used for the conjunction with list
67           widgets ( see Prima::DetailedList ), when the list is horizontally
68           or vertically scrolled.
69
70           Default value: 0
71
72       pressed INTEGER
73           Contains the index of the currently pressed tab. A -1 value is
74           selected when no tabs are pressed.
75
76           Default value: -1
77
78       scalable BOOLEAN
79           Selects if the user is allowed to resize the tabs.
80
81           Default value: 1
82
83       vertical BOOLEAN
84           If 1, the tabs are aligned vertically; the offset, widths property
85           and extent parameters of the callback notification assume heights
86           of the tabs.
87
88           If 0, the tabs are aligned horizontally, and the extent properties
89           and parameters assume tab widths.
90
91       widths ARRAY
92           Array of integer values, corresponding to the extents of the tabs.
93           The extents are widths ( "vertical" is 0 ) or heights ( "vertical"
94           is 1 ).
95
96   Methods
97       tab2offset INDEX
98           Returns offset of the INDEXth tab ( without regard to offset
99           property value ).
100
101       tab2rect INDEX
102           Returns four integers, representing the rectangle area, occupied by
103           the INDEXth tab ( without regard to offset property value ).
104

AUTHOR

106       Dmitry Karasik, <dmitry@karasik.eu.org>.
107

SEE ALSO

109       Prima, Prima::Widget, Prima::DetailedList, examples/sheet.pl.
110
111
112
113perl v5.32.1                      2021-01-27                  Prima::Header(3)
Impressum