class WhirledPeas::Settings::ElementSettings

Attributes

_bg_color[RW]
_bold[RW]
_color[RW]
_underline[RW]
height[RW]
theme[RW]
width[RW]

Public Class Methods

inherit(parent) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 10
def self.inherit(parent)
  child = self.new(parent.theme)
  child.inherit(parent)
  child
end
new(theme) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 18
def initialize(theme)
  @theme = theme
end

Public Instance Methods

bg_color() click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 25
def bg_color
  @_bg_color || theme.bg_color
end
bg_color=(color) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 29
def bg_color=(color)
  if color == :highlight
    @_bg_color = theme.highlight_bg_color
  else
    @_bg_color = BgColor.validate!(color)
  end
end
bold=(val) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 41
def bold=(val)
  @_bold = val
end
bold?() click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 37
def bold?
  @_bold || false
end
color() click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 45
def color
  @_color || theme.color
end
color=(color) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 49
def color=(color)
  if color == :highlight
    @_color = theme.highlight_color
  else
    @_color = TextColor.validate!(color)
  end
end
inherit(parent) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 65
def inherit(parent)
  @_bg_color = parent._bg_color
  @_bold = parent._bold
  @_color = parent._color
  @_underline = parent._underline
end
underline=(val) click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 61
def underline=(val)
  @_underline = val
end
underline?() click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 57
def underline?
  @_underline || false
end
validate!() click to toggle source
# File lib/whirled_peas/settings/element_settings.rb, line 22
def validate!
end