Class: Shoes::Mock::TextBlock

Inherits:
Object
  • Object
show all
Includes:
Clickable, CommonMethods
Defined in:
shoes-core/lib/shoes/mock/text_block.rb

Direct Known Subclasses

Banner, Caption, Inscription, Para, Subtitle, Tagline, Title

Instance Method Summary collapse

Methods included from Clickable

#click, #release

Methods included from CommonMethods

#update_fill, #update_position, #update_stroke, #update_visibility

Constructor Details

#initialize(dsl, opts = nil) ⇒ TextBlock

Returns a new instance of TextBlock.



9
10
11
12
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 9

def initialize(dsl, opts = nil)
  @dsl = dsl
  @opts = opts
end

Instance Method Details

#adjust_current_position(*_args) ⇒ Object



27
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 27

def adjust_current_position(*_args); end

#contents_alignment(current_position) ⇒ Object

A very imperfect implementation, but at least it takes up about a line. Needed to spec scrolling behavior



23
24
25
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 23

def contents_alignment(current_position)
  @dsl.absolute_top = current_position.y + (@dsl.size || 12)
end

#redraw(*_opts) ⇒ Object



14
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 14

def redraw(*_opts); end

#removeObject



19
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 19

def remove; end

#replace(*_opts) ⇒ Object



16
17
# File 'shoes-core/lib/shoes/mock/text_block.rb', line 16

def replace(*_opts)
end