Class: MittensUi::WebLink

Inherits:
Core
  • Object
show all
Defined in:
lib/mittens_ui/web_link.rb

Instance Attribute Summary collapse

Attributes inherited from Core

#core_widget

Instance Method Summary collapse

Methods inherited from Core

#hidden?, #hide, #remove, #show

Methods included from Helpers

#icon_map, #list_system_icons, #set_margin_from_opts_for

Constructor Details

#initialize(name, url, options = {}) ⇒ WebLink

Returns a new instance of WebLink.



7
8
9
10
11
12
13
14
15
# File 'lib/mittens_ui/web_link.rb', line 7

def initialize(name, url, options={})
  @name = name || ""
  
  @url = url || nil

  @web_link = Gtk::LinkButton.new(@url, @name)
			
  super(@web_link, options)
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



5
6
7
# File 'lib/mittens_ui/web_link.rb', line 5

def url
  @url
end

Instance Method Details

#renderObject



17
18
19
20
# File 'lib/mittens_ui/web_link.rb', line 17

def render
  $vertical_box.pack_start(@web_link)
  return self
end