class Object

  def large_font(text)
    '<span style="font-size: large">' + text + '</span>'
  end

  def small_font(text)
    '<span style="font-size: small">' + text + '</span>'
  end

  def link(url, text = nil)
    text ||= url
    '<a href="' + url + '">' + text + '</a>'
   end

  def center(text)
    '<center>' + text + '</center>'
  end

  def enabled_when_webcam_present
    unless $dev_pool.webcam?
      self.set_disabled true
      $dev_pool.connect(SIGNAL :webcam_added){ self.set_enabled true }
    end
  end

  def no_margins
    set_contents_margins(0, 0, 0, 0)
  end

  def no_spaces
    set_spacing 0
  end

end
