Class: UU::OS::GVC::Icon

Inherits:
Component show all
Includes:
Styleable
Defined in:
uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb

Overview

Icon component for displaying icons from uuImageCatalog.

Instance Attribute Summary (collapse)

Attributes included from Styleable

#style_class

Attributes inherited from Component

#attributes, #code, #component_type, #form, #id, #name

Method Summary

Methods included from Styleable

#add_style_class, #remove_style_class

Methods inherited from Component

#add_message, #focus, #initialize, #messages

Constructor Details

This class inherits a constructor from UU::OS::GVC::Component

Instance Attribute Details

- (Object) height (readonly)

The height to fit the icon into.



16
17
18
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb', line 16

def height
  @height
end

- (Object) icon_uri

The URI of the catalog icon.



19
20
21
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb', line 19

def icon_uri
  @icon_uri
end

- (Hash) style

The style for the component. The value can be semicolon separated String containing style rules or a Hash. The style has bigger priority than styling via style_class. Allowed styles:

  • color - the color of the icon as a hexa value, e.g. '#123456'.

Examples:

icon.style = { :color => '#123456' }
a = icon.style                       # returns { :color => '#123456' }

icon.style = 'color: #ff0000; example: value;'
b = icon.style                       # returns { :color => '#ff0000', :example => 'value' }

Returns:

  • (Hash)

    Hash containing style rules (style name as a symbol => style value).



37
38
39
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb', line 37

def style
  @style
end

- (Object) tooltip

The tooltip to show when mouse is over the component.



22
23
24
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb', line 22

def tooltip
  @tooltip
end

- (Object) width (readonly)

The width to fit the icon into.



13
14
15
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/icon.rb', line 13

def width
  @width
end