Class: Wads::TopMiddleBottomLayout
- Inherits:
-
SectionLayout
- Object
- WadsLayout
- SectionLayout
- Wads::TopMiddleBottomLayout
- Defined in:
- lib/wads/widgets.rb
Overview
The layout sections are as follows:
+-------------------------------------------------+
+ SECTION_NORTH +
+-------------------------------------------------+
+ +
+ SECTION_CENTER +
+ +
+-------------------------------------------------+
+ SECTION_SOUTH +
+-------------------------------------------------+
Instance Attribute Summary
Attributes inherited from SectionLayout
Attributes inherited from WadsLayout
#args, #border_coords, #parent_widget
Instance Method Summary collapse
-
#initialize(x, y, width, height, parent_widget, args = {}) ⇒ TopMiddleBottomLayout
constructor
A new instance of TopMiddleBottomLayout.
Methods inherited from SectionLayout
#add_east_west_panel, #get_coordinates
Methods inherited from WadsLayout
#add_button, #add_document, #add_graph_display, #add_horizontal_panel, #add_image, #add_max_panel, #add_multi_select_table, #add_plot, #add_single_select_table, #add_table, #add_text, #add_text_input, #add_vertical_panel, #add_widget, #get_coordinates, #internal_add_panel
Constructor Details
#initialize(x, y, width, height, parent_widget, args = {}) ⇒ TopMiddleBottomLayout
Returns a new instance of TopMiddleBottomLayout.
914 915 916 917 918 919 920 921 922 923 924 925 |
# File 'lib/wads/widgets.rb', line 914 def initialize(x, y, width, height, , args = {}) super # Divide the height into 100, 100, and the middle gets everything else # Right now we are using 100 pixels rather than a percentage for the borders middle_section_y_start = y + 100 bottom_section_y_start = y + height - 100 height_middle_section = height - 200 @container_map[SECTION_NORTH] = GuiContainer.new(x, y, width, 100) @container_map[SECTION_CENTER] = GuiContainer.new(x, middle_section_y_start, width, height_middle_section, FILL_VERTICAL_STACK) @container_map[SECTION_SOUTH] = GuiContainer.new(x, bottom_section_y_start, width, 100) end |