Class: Fidgit::Packer Abstract
- Defined in:
- lib/fidgit/elements/packer.rb
Overview
Container that auto-packs elements.
Constant Summary
Constants inherited from Element
Element::DEFAULT_SCHEMA_FILE, Element::VALID_ALIGN_H, Element::VALID_ALIGN_V
Instance Attribute Summary collapse
-
#spacing_h ⇒ Object
readonly
Returns the value of attribute spacing_h.
-
#spacing_v ⇒ Object
readonly
Returns the value of attribute spacing_v.
Attributes inherited from Element
#align_h, #align_v, #background_color, #border_thickness, #font, #padding_bottom, #padding_left, #padding_right, #padding_top, #parent, #tip, #z
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Packer
constructor
A new instance of Packer.
Methods inherited from Container
#add, #button, #clear, #color_picker, #color_well, #combo_box, #file_browser, #grid, #group, #hit_element, #horizontal, #image_frame, #insert, #label, #list, #radio_button, #remove, #scroll_area, #scroll_window, #slider, #text_area, #to_s, #toggle_button, #update, #vertical, #write_tree, #x=, #y=
Methods inherited from Element
#default, #drag?, #draw, #draw_frame, #draw_rect, #enabled=, #enabled?, #height, #height=, #hit?, #max_height, #max_width, #min_height, #min_width, new, original_new, #outer_height, #outer_width, #recalc, schema, #to_s, #update, #width, #width=, #with, #x, #x=, #y, #y=
Methods included from Event
#events, included, new_event_handlers, #publish, #subscribe, #unsubscribe
Constructor Details
#initialize(options = {}) ⇒ Packer
Returns a new instance of Packer.
13 14 15 16 17 18 19 20 21 |
# File 'lib/fidgit/elements/packer.rb', line 13 def initialize( = {}) = { }.merge! @spacing_h = [:spacing_h] || [:spacing] || default(:spacing_h) @spacing_v = [:spacing_v] || [:spacing] || default(:spacing_v) super() end |
Instance Attribute Details
#spacing_h ⇒ Object (readonly)
Returns the value of attribute spacing_h.
8 9 10 |
# File 'lib/fidgit/elements/packer.rb', line 8 def spacing_h @spacing_h end |
#spacing_v ⇒ Object (readonly)
Returns the value of attribute spacing_v.
8 9 10 |
# File 'lib/fidgit/elements/packer.rb', line 8 def spacing_v @spacing_v end |