Class: UIC::Application::Presentation
- Inherits:
-
Presentation
- Object
- Presentation
- UIC::Application::Presentation
- Extended by:
- ElementBacked::ClassMethods
- Includes:
- ElementBacked
- Defined in:
- lib/ruic/presentation.rb
Overview
An Presentation is a Presentation that is associated with a specific .uia
application.
In addition to normal Presentation methods it has additional methods related to its presense in the application.
Instance Attribute Summary collapse
-
#active ⇒ Boolean
Is the presentation initially active in the application?.
-
#id ⇒ String
The id of the presentation asset in the
.uia
. -
#src ⇒ String
The path to the presentation file.
Attributes included from ElementBacked
Attributes included from FileBacked
Instance Method Summary collapse
-
#initialize(application, el) ⇒ Presentation
constructor
A new instance of Presentation.
-
#path_to(el, from = nil) ⇒ Object
Overrides Presentation#path_to to prefix all absolute paths with the #id.
Methods included from ElementBacked::ClassMethods
Methods inherited from Presentation
#asset_by_id, #assets, #at, #attribute_linked?, #child_assets, #errors, #errors?, #find, #get_attribute, #has_slide?, #image_paths, #image_usage, #load_from_file, #master?, #owning_component, #parent_asset, #rebuild_caches_from_document, #replace_asset, #scene, #set_attribute, #slide_index, #slides_for, #to_xml, #unlink_attribute
Methods included from FileBacked
#file_found?, #filename, #save!, #save_as, #to_xml
Constructor Details
#initialize(application, el) ⇒ Presentation
Returns a new instance of Presentation.
577 578 579 580 581 |
# File 'lib/ruic/presentation.rb', line 577 def initialize(application,el) self.owner = application self.el = el super( application.path_to(src) ) end |
Instance Attribute Details
#active ⇒ Boolean
Returns Is the presentation initially active in the application?.
571 572 573 |
# File 'lib/ruic/presentation.rb', line 571 xmlattribute :active, ->(val){ val=="True" || val=="" } do |new_val| new_val ? 'True' : 'False' end |
#id ⇒ String
Returns the id of the presentation asset in the .uia
.
559 560 561 562 563 |
# File 'lib/ruic/presentation.rb', line 559 xmlattribute :id do |new_id| main_preso = app.main_presentation super(new_id) app.main_presentation=self if main_preso==self end |
#src ⇒ String
Returns the path to the presentation file.
567 |
# File 'lib/ruic/presentation.rb', line 567 xmlattribute :src |
Instance Method Details
#path_to(el, from = nil) ⇒ Object
Overrides Presentation#path_to to prefix all absolute paths with the #id
585 586 587 |
# File 'lib/ruic/presentation.rb', line 585 def path_to( el, from=nil ) from ? super : "#{id}:#{super}" end |