Class: Shoes::Common::BackgroundElement

Inherits:
UIElement
  • Object
show all
Defined in:
shoes-core/lib/shoes/common/background_element.rb

Direct Known Subclasses

Background, Border

Constant Summary

Constants included from Style

Style::DEFAULT_STYLES, Style::STYLE_GROUPS

Instance Attribute Summary

Attributes inherited from UIElement

#app, #dimensions, #gui, #parent

Instance Method Summary collapse

Methods inherited from UIElement

#add_to_parent, #after_initialize, #before_initialize, #create_backend, #handle_block, #initialize, #needs_rotate?, #redraw_height, #redraw_left, #redraw_top, #redraw_width, #update_fill, #update_stroke

Methods included from Style

#applicable_app_styles, #create_style_hash, included, #style, #style_init

Methods included from SafelyEvaluate

#safely_evaluate

Methods included from Remove

#remove

Methods included from Positioning

#_position, #displace, #move

Methods included from Visibility

#hidden?, #hidden_from_view?, #hide, #outside_parent_view?, #show, #toggle, #visible?

Methods included from Inspect

#inspect, #to_s

Methods included from Attachable

#attached_to

Constructor Details

This class inherits a constructor from Shoes::Common::UIElement

Instance Method Details

#create_dimensions(*_) ⇒ Object


6
7
8
# File 'shoes-core/lib/shoes/common/background_element.rb', line 6

def create_dimensions(*_)
  @dimensions = ParentDimensions.new @parent, @style
end

#needs_positioning?Boolean

We derive everything from our parent, so we skip slot positioning.


15
16
17
# File 'shoes-core/lib/shoes/common/background_element.rb', line 15

def needs_positioning?
  false
end

#painted?Boolean


10
11
12
# File 'shoes-core/lib/shoes/common/background_element.rb', line 10

def painted?
  true
end

#takes_up_space?Boolean


19
20
21
# File 'shoes-core/lib/shoes/common/background_element.rb', line 19

def takes_up_space?
  false
end

#translate_leftObject


23
24
25
# File 'shoes-core/lib/shoes/common/background_element.rb', line 23

def translate_left
  0
end

#translate_topObject


27
28
29
# File 'shoes-core/lib/shoes/common/background_element.rb', line 27

def translate_top
  0
end