1Padre::Wx::Role::Dwell(U3s)er Contributed Perl DocumentatPiaodnre::Wx::Role::Dwell(3)
2
3
4
6 Padre::Wx::Role::Dwell - Convenience methods for implementing dwell
7 timers
8
10 This role implements a set of methods for letting Wx objects in Padre
11 implement dwell events on elements that do not otherwise natively
12 support them.
13
14 In this initial simplified implementation, we support only one common
15 dwell event for each combination of object class and dwell method.
16
17 If multiple instances of a class are used, then the timer id will
18 collide across multiple timers and unexpected behaviour may occur.
19
21 dwell_start
22 # Half second dwell timer on a text input
23 $wx_object->dwell_start( 'on_text', 500 );
24
25 The "dwell_start" method starts (or restarts) the dwell timer.
26
27 It has two required parameters of the method to call, and the amount of
28 time (in thousands of a second) that the event should be delayed.
29
30 Note that when the dwell-delayed event is actually called, it will NOT
31 be passed the original Wx event object. The method will be called
32 directly and with no parameters.
33
34 Please note that calling this method will result in the creating of a
35 Wx::Timer object in an object HASH slot that matches the name of the
36 method.
37
38 As a result, if you wish to create a dwell to a method "foo" you may
39 never make use of the "$wx_object->{foo}" slot on that object.
40
41 dwell_stop
42 $wx_object->dwell_stop( 'on_text' );
43
44 The "dwell_stop" method prevents a single named dwell event from
45 firing, if there is a timer underway.
46
47 If there is no dwell for the named event the method will silently
48 succeed.
49
51 Copyright 2008-2011 The Padre development team as listed in Padre.pm.
52
53 This program is free software; you can redistribute it and/or modify it
54 under the same terms as Perl 5 itself.
55
56 The full text of the license can be found in the LICENSE file included
57 with this module.
58
59
60
61perl v5.28.1 2011-08-16 Padre::Wx::Role::Dwell(3)