Class: Shoes::Swt::Image
- Inherits:
-
Object
- Object
- Shoes::Swt::Image
- Includes:
- Common::PainterUpdatesPosition, Common::Resource, Common::Clickable, Common::ImageHandling, Common::Remove, Common::Visibility
- Defined in:
- shoes-swt/lib/shoes/swt/image.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#dsl ⇒ Object
readonly
Returns the value of attribute dsl.
-
#full_height ⇒ Object
readonly
Returns the value of attribute full_height.
-
#full_width ⇒ Object
readonly
Returns the value of attribute full_width.
-
#painter ⇒ Object
readonly
Returns the value of attribute painter.
-
#real ⇒ Object
readonly
Returns the value of attribute real.
Attributes included from Common::Clickable
Instance Method Summary collapse
-
#initialize(dsl, app) ⇒ Image
constructor
A new instance of Image.
- #update_image ⇒ Object
Methods included from Common::ImageHandling
#absolute_file_path, #default_search_paths, #search_for
Methods included from Common::Remove
Methods included from Common::Visibility
#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?
Methods included from Common::Clickable
#click, #pass_coordinates?, #register_click, #release
Constructor Details
#initialize(dsl, app) ⇒ Image
Returns a new instance of Image.
20 21 22 23 24 25 26 27 28 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 20 def initialize(dsl, app) @dsl = dsl @app = app @tmpname_or_data = nil update_image @painter = ImagePainter.new(self) app.add_paint_listener(@painter) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def app @app end |
#dsl ⇒ Object (readonly)
Returns the value of attribute dsl.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def dsl @dsl end |
#full_height ⇒ Object (readonly)
Returns the value of attribute full_height.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def full_height @full_height end |
#full_width ⇒ Object (readonly)
Returns the value of attribute full_width.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def full_width @full_width end |
#painter ⇒ Object (readonly)
Returns the value of attribute painter.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def painter @painter end |
#real ⇒ Object (readonly)
Returns the value of attribute real.
18 19 20 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 18 def real @real end |
Instance Method Details
#update_image ⇒ Object
30 31 32 |
# File 'shoes-swt/lib/shoes/swt/image.rb', line 30 def update_image load_image(@dsl.file_path) end |