/usr/share/doc/python-kiwi/api/kiwi.ui.proxy.Proxy.html is in python-kiwi 1.9.22-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>kiwi.ui.proxy.Proxy : API documentation</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link type="text/css" rel="stylesheet" href="bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="apidocs.css" />
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
Kiwi API Documentation
</a>
</div>
</div>
</nav>
<div id="showPrivate">
<button class="btn btn-link" onclick="togglePrivate()">Toggle Private API</button>
</div>
<div class="container">
<div class="page-header">
<h1 class="class"><code>kiwi.ui.proxy.Proxy</code> <small>class documentation</small></h1>
<span id="partOf">
Part of <code><a href="kiwi.html" data-type="Package" class="code">kiwi</a>.<a href="kiwi.ui.html" data-type="Package" class="code">ui</a>.<a href="kiwi.ui.proxy.html" data-type="Module" class="code">proxy</a></code>
<a href="classIndex.html#kiwi.ui.proxy.Proxy">(View In Hierarchy)</a>
</span>
</div>
<div class="extrasDocstring">
</div>
<div class="moduleDocstring">
<div><p>A Proxy is a class that 'attaches' an instance to an interface's
widgets, and transparently manipulates that instance's attributes as the
user alters the content of the widgets.</p>
<p>The Proxy takes the widget list and detects what widgets are to be
attached to the model by looking if it is a KiwiWidget and if it has the
model-attribute set.</p><table class="fieldTable"></table></div>
</div>
<div id="splitTables">
<table class="children sortable" id="id428">
<tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#__init__" data-type="Method" class="code">__init__</a></td>
<td><span class="undocumented">No summary</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#proxy_updated" data-type="Method" class="code">proxy_updated</a></td>
<td><span class="undocumented">No summary</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#update_many" data-type="Method" class="code">update_many</a></td>
<td><span>Like <a href="kiwi.ui.proxy.Proxy.html#update"><code>update</code></a>
but takes a sequence of attributes</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#update" data-type="Method" class="code">update</a></td>
<td><span>Generic frontend function to update the contentss of a widget based on
its model attribute name using the internal update functions.</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#set_model" data-type="Method" class="code">set_model</a></td>
<td><span>Updates the model instance of the proxy. Allows a proxy interface to
change model without the need to destroy and recreate the UI (which would
cause flashing, at least)</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#add_widget" data-type="Method" class="code">add_widget</a></td>
<td><span>Adds a new widget to the proxy</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#remove_widget" data-type="Method" class="code">remove_widget</a></td>
<td><span>Removes a widget from the proxy</span></td>
</tr><tr class="method">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#new_model" data-type="Method" class="code">new_model</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_reset_widget" data-type="Method" class="code">_reset_widget</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_setup_widget" data-type="Method" class="code">_setup_widget</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_register_proxy_in_model" data-type="Method" class="code">_register_proxy_in_model</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_unregister_proxy_in_model" data-type="Method" class="code">_unregister_proxy_in_model</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_on_widget__content_changed" data-type="Method" class="code">_on_widget__content_changed</a></td>
<td><span>This is called as soon as the content of one of the widget changes, the
widgets tries fairly hard to not emit when it's not neccessary</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_on_widget__notify" data-type="Method" class="code">_on_widget__notify</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="method private">
<td>Method</td>
<td><a href="kiwi.ui.proxy.Proxy.html#_get_model" data-type="Method" class="code">_get_model</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr>
</table>
</div>
<div id="childList">
<div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.__init__">
</a>
<a name="__init__">
</a>
<div class="functionHeader">
def
__init__(self, view, model=None, widgets=()):
</div>
<div class="docstring functionBody">
<div><p>Create a new Proxy object.</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">view</td><td>view attched to the slave (type: a <a href="kiwi.ui.views.BaseView.html"><code>kiwi.ui.views.BaseView</code></a>
subclass)</td></tr><tr><td></td><td class="fieldArg">model</td><td>model attached to proxy</td></tr><tr><td></td><td class="fieldArg">widgets</td><td>the widget names (type: list of strings)</td></tr></table></div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._reset_widget">
</a>
<a name="_reset_widget">
</a>
<div class="functionHeader">
def
_reset_widget(self, attribute, widget):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._setup_widget">
</a>
<a name="_setup_widget">
</a>
<div class="functionHeader">
def
_setup_widget(self, widget_name, widget):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._register_proxy_in_model">
</a>
<a name="_register_proxy_in_model">
</a>
<div class="functionHeader">
def
_register_proxy_in_model(self, attribute):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._unregister_proxy_in_model">
</a>
<a name="_unregister_proxy_in_model">
</a>
<div class="functionHeader">
def
_unregister_proxy_in_model(self):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._on_widget__content_changed">
</a>
<a name="_on_widget__content_changed">
</a>
<div class="functionHeader">
def
_on_widget__content_changed(self, widget, attribute, validate):
</div>
<div class="docstring functionBody">
<div><p>This is called as soon as the content of one of the widget changes, the
widgets tries fairly hard to not emit when it's not neccessary</p><table class="fieldTable"></table></div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._on_widget__notify">
</a>
<a name="_on_widget__notify">
</a>
<div class="functionHeader">
def
_on_widget__notify(self, widget, pspec):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod private">
<a name="kiwi.ui.proxy.Proxy._get_model">
</a>
<a name="_get_model">
</a>
<div class="functionHeader">
def
_get_model(self):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.proxy_updated">
</a>
<a name="proxy_updated">
</a>
<div class="functionHeader">
def
proxy_updated(self, widget, attribute, value):
</div>
<div class="docstring functionBody">
<div><p>This is a hook that is called whenever the proxy updates the model.
Implement it in the inherited class to perform actions that should be done
each time the user changes something in the interface. This hook by default
does nothing.</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">widget</td><td></td></tr><tr><td></td><td class="fieldArg">attribute</td><td></td></tr><tr><td></td><td class="fieldArg">value</td><td></td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.update_many">
</a>
<a name="update_many">
</a>
<div class="functionHeader">
def
update_many(self, attributes, value=ValueUnset, block=False):
</div>
<div class="docstring functionBody">
<div><p>Like <a href="kiwi.ui.proxy.Proxy.html#update"><code>update</code></a>
but takes a sequence of attributes</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">attributes</td><td>sequence of attributes to update</td></tr><tr><td></td><td class="fieldArg">value</td><td>see <a href="kiwi.ui.proxy.Proxy.html#update"><code>update</code></a></td></tr><tr><td></td><td class="fieldArg">block</td><td>see <a href="kiwi.ui.proxy.Proxy.html#update"><code>update</code></a></td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.update">
</a>
<a name="update">
</a>
<div class="functionHeader">
def
update(self, attribute, value=ValueUnset, block=False):
</div>
<div class="docstring functionBody">
<div><p>Generic frontend function to update the contentss of a widget based on
its model attribute name using the internal update functions.</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">attribute</td><td>the name of the attribute whose widget we wish to updated. If accessing a
radiobutton, specify its group name.</td></tr><tr><td></td><td class="fieldArg">value</td><td>specifies the value to set in the widget. If unspecified, it defaults to
the current model's value (through an accessor, if it exists, or getattr).</td></tr><tr><td></td><td class="fieldArg">block</td><td>defines if we are to block cascading proxy updates triggered by this
update. You should use block if you are calling update on *the same
attribute that is currently being updated*. This means if you have hooked
to a signal of the widget associated to that attribute, and you call
update() for the *same attribute*, use block=True. And pray. 8). If block
is set to False, the normal update mechanism will occur (the model being
updated in the end, hopefully).</td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.set_model">
</a>
<a name="set_model">
</a>
<div class="functionHeader">
def
set_model(self, model, relax_type=False):
</div>
<div class="docstring functionBody">
<div><p>Updates the model instance of the proxy. Allows a proxy interface to
change model without the need to destroy and recreate the UI (which would
cause flashing, at least)</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">model</td><td></td></tr><tr><td></td><td class="fieldArg">relax_type</td><td></td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.add_widget">
</a>
<a name="add_widget">
</a>
<div class="functionHeader">
def
add_widget(self, name, widget):
</div>
<div class="docstring functionBody">
<div><p>Adds a new widget to the proxy</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">name</td><td>name of the widget</td></tr><tr><td></td><td class="fieldArg">widget</td><td>widget, must be a gtk.Widget subclass</td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.remove_widget">
</a>
<a name="remove_widget">
</a>
<div class="functionHeader">
def
remove_widget(self, name):
</div>
<div class="docstring functionBody">
<div><p>Removes a widget from the proxy</p><table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">name</td><td>the name of the widget to remove</td></tr></table></div>
</div>
</div><div class="basemethod">
<a name="kiwi.ui.proxy.Proxy.new_model">
</a>
<a name="new_model">
</a>
<div class="functionHeader">
def
new_model(self, model, relax_type=False):
</div>
<div class="docstring functionBody">
<div class="undocumented">Undocumented</div>
</div>
</div>
</div>
<address>
<a href="index.html">API Documentation</a> for Kiwi, generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a> at 2015-12-15 11:23:22.
</address>
</div>
<script type="text/javascript" src="pydoctor.js"></script>
</body>
</html>
|