1Padre::Wx::TreeCtrl::ScUrsoelrlLCoocnkt(r3i)buted Perl DPoacdurmee:n:tWaxt:i:oTnreeCtrl::ScrollLock(3)
2
3
4

NAME

6       Padre::Wx::TreeCtrl::ScrollLock - Scroll-free transactions for tree
7       controls
8

SYNOPSIS

10         SCOPE: {
11             my $lock = $padre_wx_treectrl->scroll_lock;
12
13             # Change the tree here
14         }
15
16         # The tree will unlock before here
17

DESCRIPTION

19       Ny default a Wx TreeCtrl object will auto-scroll to the location of an
20       expand event or similar actions, as if it had been triggered by a
21       human.
22
23       For trees which are supposed to expanding or moving around on their
24       own, this looks quite bizarre.
25
26       This class provides an implementation of a "scroll lock" for short-
27       lived sections of fully self-contained code that will be updating the
28       structure of a tree control.
29
30       When created, the lock will create a Wx update locker for speed and
31       flicker free changes to the tree. It will additionally remember the
32       current scroll position of the tree.
33
34       When destroyed, the lock will move the scroll position back to the
35       original location if it has been changed in the process of an operation
36       and then release the update lock.
37
38       The result is that all operations on the tree should occur with the
39       tree appearing to stay fixed in place.
40
41       Note that the lock MUST be short-lived, as it does not integrate with
42       the rest of Padre's locking system. You should already have all the
43       data needed to change the tree prepared and ready to go before you
44       create the tree lock.
45

TODO

47       Find a way to prevent scrolling in native Wx and remove this class
48       entirely. This whole exercise feels like a bit of a waste of time,
49       because it emulates a more simple behaviour out of complex behaviour
50       just because we can't disable the complex behaviour.
51
53       Copyright 2008-2011 The Padre development team as listed in Padre.pm.
54

LICENSE

56       This program is free software; you can redistribute it and/or modify it
57       under the same terms as Perl 5 itself.
58
59
60
61perl v5.32.0                      2020-07-28Padre::Wx::TreeCtrl::ScrollLock(3)
Impressum