Class: CyberarmEngine::Element::Flow

Inherits:
Container show all
Defined in:
lib/cyberarm_engine/ui/elements/flow.rb

Direct Known Subclasses

CheckBox

Constant Summary

Constants included from Theme

Theme::THEME

Instance Attribute Summary

Attributes inherited from Container

#children, #fill_color, #gui_state, #scroll_position, #scroll_target_position, #stroke_color

Attributes inherited from CyberarmEngine::Element

#background_canvas, #border_canvas, #element_visible, #event_handler, #options, #parent, #style, #tip, #x, #y, #z

Instance Method Summary collapse

Methods inherited from Container

#add, #append, #build, #clear, current_container, current_container=, #debug_draw, #fits_on_line?, #hit_element?, #initialize, #max_width, #mouse_wheel_down, #mouse_wheel_up, #move_to_next_line, #position_on_current_line, #position_on_next_line, #recalculate, #remove, #render, #scroll_jump_to_end, #scroll_jump_to_top, #scroll_page_down, #scroll_page_up, #scroll_top, #scroll_top=, #tallest_neighbor, #to_s, #update, #update_child_element_visibity, #update_scroll, #value, #write_tree

Methods included from Common

#alt_down?, #control_down?, #current_state, #darken, #draw_rect, #fill, #find_element_by_tag, #get_asset, #get_image, #get_sample, #get_song, #lighten, #opacity, #pop_state, #previous_state, #push_state, #shift_down?, #shift_state, #show_cursor, #show_cursor=, #window

Methods inherited from CyberarmEngine::Element

#background=, #background_image=, #background_nine_slice=, #blur, #button_down, #button_up, #child_of?, #clicked_left_mouse_button, #content_height, #content_width, #debug_draw, #default_events, #dimensional_size, #draggable?, #draw, #element_visible?, #enabled=, #enabled?, #enter, #focus, #focused?, #height, #hide, #hit?, #initialize, #inner_height, #inner_width, #inspect, #is_root?, #leave, #left_mouse_button, #max_scroll_height, #max_scroll_width, #noncontent_height, #noncontent_width, #outer_height, #outer_width, #parent_of?, #recalculate, #recalculate_if_size_changed, #released_left_mouse_button, #render, #reposition, #root, #safe_style_fetch, #scroll_height, #scroll_width, #set_background, #set_background_image, #set_background_nine_slice, #set_border_color, #set_border_thickness, #set_color, #set_font, #set_margin, #set_padding, #set_static_position, #show, #space_available_height, #space_available_width, #stylize, #to_s, #toggle, #update, #update_background, #update_background_image, #update_background_nine_slice, #update_styles, #value, #value=, #visible?, #width

Methods included from CyberarmEngine::Event

#event, #publish, #subscribe, #unsubscribe

Methods included from Theme

#deep_merge, #default, #theme_defaults

Constructor Details

This class inherits a constructor from CyberarmEngine::Element::Container

Instance Method Details

#layoutObject



4
5
6
7
8
9
10
11
12
# File 'lib/cyberarm_engine/ui/elements/flow.rb', line 4

def layout
  @children.each do |child|
    if fits_on_line?(child)
      position_on_current_line(child)
    else
      position_on_next_line(child)
    end
  end
end