1Padre::Wx::Role::View(3U)ser Contributed Perl DocumentatiPoandre::Wx::Role::View(3)
2
3
4

NAME

6       Padre::Wx::Role::View - A role for GUI tools that live in panels
7

SYNOPSIS

9           # From the Padre::Wx::Role::View section of Padre::Wx::FunctionList
10
11           sub view_panel {
12               return 'right';
13           }
14
15           sub view_label {
16               Wx::gettext('Functions');
17           }
18
19           sub view_close {
20               shift->{main}->show_functions(0);
21           }
22

DESCRIPTION

24       This is a role that should be inherited from by GUI components that
25       live in the left, right or bottom notebook panels of Padre.
26
27       Anything that inherits from this role is expected to implement a number
28       of methods that allow it to play nicely with the Padre object model.
29

METHODS

31       To help compartmentalise methods that are provided by different roles,
32       a "view_" prefix is used across methods expected by the role.
33
34   view_panel
35       This method describes which panel the tool lives in.
36
37       Returns the string 'right', 'left', or 'bottom'.
38
39   view_label
40       The method returns the string that the notebook label should be filled
41       with. This should be internationalised properly. This method is called
42       once when the object is constructed, and again if the user triggers a
43       "relocale" cascade to change their interface language.
44
45   view_close
46       This method is called on the object by the event handler for the "X"
47       control on the notebook label, if it has one.
48
49       The method should generally initiate whatever is needed to close the
50       tool via the highest level API. Note that while we aren't calling the
51       equivalent menu handler directly, we are calling the high-level method
52       on the main window that the menu itself calls.
53

OPTIONAL

55   view_icon
56       This method should return a valid Wx bitmap to be used as the icon for
57       a notebook page (displayed alongside "view_label").
58
59   view_start
60       Called immediately after the view has been displayed, to allow the view
61       to kick off any timers or do additional post-creation setup.
62
63   view_stop
64       Called immediately before the view is hidden, to allow the view to
65       cancel any timers, cancel tasks or do pre-destruction teardown.
66
68       Copyright 2008-2011 The Padre development team as listed in Padre.pm.
69
70       This program is free software; you can redistribute it and/or modify it
71       under the same terms as Perl 5 itself.
72
73       The full text of the license can be found in the LICENSE file included
74       with this module.
75
76
77
78perl v5.30.0                      2019-07-26          Padre::Wx::Role::View(3)
Impressum