1Gtk2::Ex::FormFactory::UPsreorxyC(o3n)tributed Perl DocuGmtekn2t:a:tEixo:n:FormFactory::Proxy(3)
2
3
4

NAME

6       Gtk2::Ex::FormFactory::Proxy - Proxy class for application objects
7

SYNOPSIS

9         #-- Proxies are always created through
10         #-- Gtk2::Ex::FormFactory::Context, never
11         #-- directly by the application.
12
13         Gtk2::Ex::FormFactory::Proxy->new (
14           context              => Gtk2::Ex::FormFactory::Context,
15           object               => Object instance or CODEREF,
16           name                 => Name of this proxy,
17           set_prefix           => Method prefix for write accessors,
18           get_prefix           => Method prefix for read accessors,
19           attr_accessors_href  => Hashref with accessor callbacks,
20           attr_activity_href   => Hashref with activity callbacks,
21           aggregated_by        => Fully qualified attribute of the parent,
22           changes_attr_filter  => Regex for attributes which should not trigger
23                                   the object's 'changed' status
24         );
25

DESCRIPTION

27       This class implements a generic proxy mechanism for accessing
28       application objects and their attributes. It defines attributes of the
29       associated object are accessed. You never instantiate objects of this
30       class by yourself; they're created internally by
31       Gtk2::Ex::FormFactory::Context when adding objects with the
32       Context->add_object() method.
33
34       But you may use the proxy objects e.g. for updates which affect the
35       application object and the GUI as well.
36
37       You can receive Proxy objects using the
38       Gtk2::Ex::FormFactory::Context->get_proxy() method.
39

OBJECT HIERARCHY

41         Gtk2::Ex::FormFactory::Proxy
42

ATTRIBUTES

44       Attributes are handled through the common get_ATTR(), set_ATTR() style
45       accessors.
46
47       context = Gtk2::Ex::FormFactory::Context [mandatory]
48           The Context this proxy belongs to.
49
50       object = Object instance | CODEREF
51           The application object itself or a code reference, which returns
52           the object instance.
53
54       name = SCALAR [mandatory]
55           The Context wide unique name of this Proxy.
56
57       set_prefix = SCALAR [optional]
58           This is the method prefix for write accessors. Defaults to set_.
59
60       get_prefix = SCALAR [optional]
61           This is the method prefix for read accessors. Defaults to get_.
62
63       attr_accessors_href = HASHREF [optional]
64           With this hash you can override specific accessors with a code
65           reference, which is called instead of the object's own accessor.
66
67           Refer to Gtk2::Ex::FormFactory::Context->add_object for details.
68
69       attr_activity_href = HASHREF [optional]
70           This hash defines callbacks for attributes which return the
71           activity state of the corresonding attribute.
72
73           Refer to Gtk2::Ex::FormFactory::Context->add_object for details.
74
75       aggregated_by = "object.attr" [optional]
76           Fully qualified attribute of the parent aggregating this object
77
78           Refer to Gtk2::Ex::FormFactory::Context->add_object for details.
79
80       changes_attr_filter = REGEX [optional]
81           Refer to Gtk2::Ex::FormFactory::Context->add_object for details.
82
83       object_changed = BOOLEAN
84           This flag indicates whether the object represented by this Proxy
85           was changed. You may set this attribute to reset the object's
86           changed state.
87

METHODS

89       $app_object = $proxy->get_object ()
90           This returns the actual application object of this Proxy, either
91           the statical assigned instance or a dynamicly retrieved instance.
92
93       $proxy->set_object ($object)
94           Changes the application object instance in this Proxy. All
95           dependend Widgets on the GUI are updated accordingly.
96
97       $app_object_attr_value = $proxy->get_attr ($attr)
98           Returns the application object's attribute $attr of this Proxy.
99
100           If $attr has the form "object.attr" the attribute of the
101           correspondent object is retreived, instead of the object associated
102           with this proxy.
103
104       $proxy->set_attr ($attr => $value)
105           Changes the application object's attribute $attr to $value and
106           updates all dependend Widgets on the GUI accordingly.
107
108           If $attr has the form "object.attr" the correspondent object will
109           be updated, instead of the object associated with this proxy.
110
111       $proxy->set_attrs ( { $attr => $value, ... } )
112           Changes a bunch of application object's attributes, which is passed
113           as a hash reference with $attr => $value pairs and updates all
114           dependend Widgets on the GUI accordingly.
115
116       $activity = $proxy->get_attr_activity ($attr)
117           Returns the current activity state of $attr.
118
119
120

AUTHORS

122        Jörn Reder <joern at zyn dot de>
123
125       Copyright 2004-2006 by Jörn Reder.
126
127       This library is free software; you can redistribute it and/or modify it
128       under the terms of the GNU Library General Public License as published
129       by the Free Software Foundation; either version 2.1 of the License, or
130       (at your option) any later version.
131
132       This library is distributed in the hope that it will be useful, but
133       WITHOUT ANY WARRANTY; without even the implied warranty of
134       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
135       Library General Public License for more details.
136
137       You should have received a copy of the GNU Library General Public
138       License along with this library; if not, write to the Free Software
139       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307
140       USA.
141

POD ERRORS

143       Hey! The above document had some coding errors, which are explained
144       below:
145
146       Around line 470:
147           Expected text after =item, not a bullet
148
149       Around line 476:
150           Non-ASCII character seen before =encoding in 'Jörn'. Assuming UTF-8
151
152
153
154perl v5.36.0                      2022-07-22   Gtk2::Ex::FormFactory::Proxy(3)
Impressum