Class: GGLib::ThemeInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/theme.rb

Direct Known Subclasses

DrawnThemeInstance, ImageThemeInstance

Instance Method Summary collapse

Constructor Details

#initialize(klass, wid) ⇒ ThemeInstance

Returns a new instance of ThemeInstance.



56
57
58
59
60
61
62
63
64
65
# File 'lib/theme.rb', line 56

def initialize(klass, wid)
  @klass = klass
  @state = 1
  @widget = wid
  @x1 = @widget.x1
  @y1 = @widget.y1
  @x2 = @widget.x2
  @y2 = @widget.y2
  @klass = @klass.request(@widget)
end

Instance Method Details

#draw ⇒ Object



98
99
# File 'lib/theme.rb', line 98

def draw
end

#font ⇒ Object



86
87
88
# File 'lib/theme.rb', line 86

def font
  return @klass.font
end

#height ⇒ Object



95
96
97
# File 'lib/theme.rb', line 95

def height
  return @klass.height
end

#name ⇒ Object



89
90
91
# File 'lib/theme.rb', line 89

def name
  return @klass.name
end

#setCoords(x1, y1, x2, y2) ⇒ Object



66
67
68
69
70
71
# File 'lib/theme.rb', line 66

def setCoords(x1,y1,x2,y2)
  @x1 = x1
  @y1 = y1
  @x2 = x2
  @y2 = y2    
end

#setDefaultState ⇒ Object



72
73
74
# File 'lib/theme.rb', line 72

def setDefaultState
  @state = 1
end

#setDownState ⇒ Object



78
79
80
# File 'lib/theme.rb', line 78

def setDownState
  @state = 3
end

#setOverState ⇒ Object



75
76
77
# File 'lib/theme.rb', line 75

def setOverState
  @state = 2
end

#setSleepState ⇒ Object



81
82
# File 'lib/theme.rb', line 81

def setSleepState
end

#setWakeState ⇒ Object



83
84
85
# File 'lib/theme.rb', line 83

def setWakeState
  @state = 1
end

#width ⇒ Object



92
93
94
# File 'lib/theme.rb', line 92

def width
  return @klass.width
end