1Prima::Widget::GroupScrUoslelrerC(o3n)tributed Perl DocuPmreinmtaa:t:iWoindget::GroupScroller(3)
2
3
4

NAME

6       Prima::Widget::GroupScroller - optional automatic scroll bars
7

DESCRIPTION

9       The class is used for widgets that contain optional scroll bars, and
10       provides means for their maintenance. The class is the descendant of
11       Prima::IntIndents, and adjusts the indents property when scrollbars are
12       shown or hidden, or borderWidth is changed.
13
14       The class does not provide range selection for the scrollbars; the
15       descentant classes must implement that.
16
17       The descendant classes must follow the guidelines:
18
19       •   A class must provide "borderWidth", "hScroll", and "vScroll"
20           property keys in profile_default() .  A class may provide
21           "autoHScroll" and "autoVScroll" property keys in profile_default()
22           .
23
24       •   A class' init() method must set "{borderWidth}", "{hScroll}", and
25           "{vScroll}" variables to 0 before the initialization, call
26           "setup_indents" method, and then assign the properties from the
27           object profile.
28
29           If a class provides "autoHScroll" and "autoVScroll" properties,
30           these must be set to 0 before the initialization.
31
32       •   If a class needs to overload one of "borderWidth", "hScroll",
33           "vScroll", "autoHScroll", and "autoVScroll" properties, it is
34           mandatory to call the inherited properties.
35
36       •   A class must implement the scroll bar notification callbacks:
37           "HScroll_Change" and "VScroll_Change".
38
39       •   A class must not use the reserved variable names, which are:
40
41                   {borderWidth}  - internal borderWidth storage
42                   {hScroll}      - internal hScroll value storage
43                   {vScroll}      - internal vScroll value storage
44                   {hScrollBar}   - pointer to the horizontal scroll bar
45                   {vScrollBar}   - pointer to the vertical scroll bar
46                   {bone}         - rectangular widget between the scrollbars
47                   {autoHScroll}  - internal autoHScroll value storage
48                   {autoVScroll}  - internal autoVScroll value storage
49
50           The reserved method names:
51
52                   set_h_scroll
53                   set_v_scroll
54                   insert_bone
55                   setup_indents
56                   reset_indents
57                   borderWidth
58                   autoHScroll
59                   autoVScroll
60                   hScroll
61                   vScroll
62
63           The reserved widget names:
64
65                   HScroll
66                   VScroll
67                   Bone
68

Properties

70       autoHScroll BOOLEAN
71           Selects if the horizontal scrollbar is to be shown and hidden
72           dynamically, depending on the widget layout.
73
74       autoVScroll BOOLEAN
75           Selects if the vertical scrollbar is to be shown and hidden
76           dynamically, depending on the widget layout.
77
78       borderWidth INTEGER
79           Width of 3d-shade border around the widget.
80
81           Recommended default value: 2
82
83       hScroll BOOLEAN
84           Selects if the horizontal scrollbar is visible. If it is,
85           "{hScrollBar}" points to it.
86
87       vScroll BOOLEAN
88           Selects if the vertical scrollbar is visible. If it is,
89           "{vScrollBar}" points to it.
90
91       scrollBarClass STRING = Prima::ScrollBar
92           Create-only property that allows to change scrollbar class
93
94       hScrollBarProfile, vScrollBarProfile HASH
95           Create-only property that allows to change scrollbar parameters
96           when it is being created
97

Methods

99       setup_indents
100           The method is never called directly; it should be called whenever
101           widget layout is changed so that indents are affected. The method
102           is a request to recalculate indents, depending on the widget
103           layout.
104
105           The method is not reentrant; to receive this callback and update
106           the widget layout, that in turn can result in more "setup_indents"
107           calls, overload "reset_indents" .
108
109       reset_indents
110           Called after "setup_indents" is called and internal widget layout
111           is updated, to give a chance to follow-up the layout changes.
112

AUTHOR

114       Dmitry Karasik, <dmitry@karasik.eu.org>.
115

SEE ALSO

117       Prima, Prima::Lists, Prima::Edit
118
119
120
121perl v5.38.0                      2023-07-21   Prima::Widget::GroupScroller(3)
Impressum