File: README

package info (click to toggle)
libtickit-widget-floatbox-perl 0.08-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 132 kB
  • sloc: perl: 346; makefile: 2
file content (148 lines) | stat: -rw-r--r-- 3,650 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
NAME

    Tickit::Widget::FloatBox - manage a collection of floating widgets

SYNOPSIS

     TODO

DESCRIPTION

    This container widget maintains a collection of floating widgets that
    can be displayed over the top of a single base widget. The box itself
    is entirely occupied by the base widget, and by default when no floats
    are created or displayed it will behave essentially invisibly, as
    though the box were not there and the base widget was an immediate
    child of the container the floatbox is inside.

CONSTRUCTOR

 new

       $floatbox = Tickit::Widget::FloatBox->new( %args )

    Constructs a new Tickit::Widget::FloatBox object.

    Takes the following named arguments in addition to those taken by the
    base Tickit::ContainerWidget constructor.

    base_child => Tickit::Widget

      The main Tickit::Widget instance to use as the base.

      This argument is now discouraged as it complicates the construction
      of subclasses; see instead the "set_base_child" method used as a
      chaining mutator.

ACCESSORS

 base_child

 set_base_child

       $base_child = $floatbox->base_child
    
       $floatbox->set_base_child( $base_child )

    Returns or sets the base widget to use.

    The mutator method returns the container widget instance itself making
    it suitable to use as a chaining mutator; e.g.

       my $container = Tickit::Widget::FloatBox->new( ... )
          ->set_base_child( Tickit::Widget::Box->new ... );

 add_float

       $float = $floatbox->add_float( %args )

    Adds a widget as a floating child and returns a new Float object. Takes
    the following arguments:

    child => Tickit::Widget

      The child widget

    top, bottom, left, right => INT

      The initial geometry of the floating area. These follow the same
      behaviour as the move method on the Float object.

    hidden => BOOL

      Optional. If true, the float starts off hidden initally, and must be
      shown by the show method before it becomes visible.

FLOATS

    The following objects represent a floating region as returned by the
    add_float method.

 child

       $child = $float->child

    Returns the child widget in the region.

 move

       $float->move( %args )

    Redefines the area geometry of the region. Takes arguments named top,
    bottom, left and right, each of which should either be a numeric value,
    or undef.

    The region must have at least one of top or bottom and at least one of
    left or right defined, which will then fix the position of one corner
    of the region. If the size is not otherwise determined by the geometry,
    it will use the preferred size of the child widget. Any geometry
    argument may be negative to count backwards from the limits of the
    parent.

    For example,

     # top-left corner
     $float->move( top => 0, left => 0 )
    
     # top-right corner
     $float->move( top => 0, right => -1 )
    
     # bottom 3 lines, flush left
     $float->move( left => 0, top => -3, bottom => -1 )

    Any arguments not passed will be left unchanged; to specifically clear
    the current value pass a value of undef.

 remove

       $float->remove

    Removes the float from the FloatBox.

 hide

       $float->hide

    Hide the float by hiding the window of its child widget.

 show

       $float->show

    Show the float by showing the window of its child widget. Undoes the
    effect of hide.

 is_visible

       $visible = $float->is_visible

    Return true if the float is currently visible.

TODO

      * Support adjusting stacking order of floats.

AUTHOR

    Paul Evans <leonerd@leonerd.org.uk>