Class: Fidgit::Composite

Inherits:
Packer show all
Defined in:
lib/fidgit/elements/composite.rb

Overview

A composite element, made up of other elements (but manages them internally).

Constant Summary collapse

DEBUG_BORDER_COLOR =

Color to draw an outline in when debugging layout.

Gosu::Color.rgba(0, 255, 0, 100)

Constants inherited from Element

Element::DEFAULT_SCHEMA_FILE, Element::VALID_ALIGN_H, Element::VALID_ALIGN_V

Instance Attribute Summary

Attributes inherited from Packer

#spacing_h, #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

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 = {}) ⇒ Composite

Returns a new instance of Composite.



11
12
13
14
15
# File 'lib/fidgit/elements/composite.rb', line 11

def initialize(options = {})
  options[:border_color] = DEBUG_BORDER_COLOR if Fidgit.debug_mode?

  super(options)
end