Description Usage Format Details
An Item combines a model, view and controller interface into one convenient package. Items may be combined into an ItemGroup or a Dialog to be shown.
1 |
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 | proto object
$ set_model :function (., model)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 255 36 283 26 36 26 255 283
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ attr : list()
$ tooltip : chr ""
$ init_ui :function (., container, attr = .$attr, context, ...)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 496 33 504 25 33 25 496 504
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ new :function (., ...)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 514 30 518 26 30 26 514 518
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ set_validate :function (., f)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 208 40 208 68 40 68 208 208
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ show_label : logi TRUE
$ to_string :function (., drop = TRUE)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 462 38 466 26 38 26 462 466
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ instance :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 526 35 532 26 35 26 526 532
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ visible_when :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 183 42 183 59 42 59 183 183
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ make_ui :function (., container, attr = .$attr, context, ...)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 164 36 168 26 36 26 164 168
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ make_default_gui_layout:function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 174 51 174 63 51 63 174 174
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ get_model :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 295 36 295 54 36 54 295 295
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ handler_user_data : NULL
$ setattr :function (., key, value, notify_private = TRUE)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 329 34 360 26 34 26 329 360
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ set_model_from_item :function (., item)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 285 46 291 26 46 26 285 291
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ parent : NULL
$ validate :function (., rawvalue)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 225 35 233 26 35 26 225 233
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ update_ui :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 537 36 542 26 36 26 537 542
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ visible :function (., value)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 188 37 190 27 37 27 188 190
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ label : chr "label"
$ init :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 508 31 510 26 31 26 508 510
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ to_R :function (., drop = TRUE)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 445 33 454 26 33 26 445 454
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ init_model :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 382 37 434 26 37 26 382 434
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ init_controller :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 477 41 488 26 41 26 477 488
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ class : chr [1:3] "Item" "Model" "TraitR"
$ on_realized : NULL
$ remove_observer :function (., o)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 308 44 310 26 44 26 308 310
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ coerce_with : NULL
$ set_editor :function (., editor)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 143 39 150 26 39 26 143 150
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ enabled :function (., value)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 202 37 204 27 37 27 202 204
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ default_get :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 365 37 367 25 37 25 365 367
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ controller : NULL
$ default_set :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 373 37 375 25 37 25 373 375
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ excluded_property_names: chr [1:2] "editor" "model"
$ model : NULL
$ is_valid :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 240 34 243 25 34 25 240 243
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ icon : chr ""
$ name : chr ""
$ enabled_when :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 197 42 197 59 42 59 197 197
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ add_observer :function (., o)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 301 41 303 26 41 26 301 303
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ get_editor :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 154 39 154 58 39 58 154 154
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ editor : NULL
$ properties : NULL
$ getattr :function (., key)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 316 34 321 26 34 26 316 321
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
$ add_handler_name : chr "addHandlerChanged"
$ value : chr "default value"
$ help : chr ""
$ get_controller :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 475 42 475 65 42 65 475 475
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc265c14c40>
parent: proto object
|
The make_ui
method creates the user interface, initializes the model and the controller.
The init_model
, init_controller
and init_ui
do the work.
The model may be shared with different items. See set_model_from_item
or
the instance
proto method.
Items implement the observer interface, so one can add observers to listen for changes to
the properties. (Properties are listed in the property "properties
".)
Items use the Adpater interface to link the model with the view (an Editor). The "properties
"
property lists the names of model properties. One should use "value" for the special one to be
returned by the method to_R
. (This method gathers values from the items after coercion)
When an item's user interface is made, the method on_realized
is called.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.