Class: LibuiParadise::GUI::LibUI::Prototype
- Inherits:
-
Base
- Object
- Base
- LibuiParadise::GUI::LibUI::Prototype
show all
- Defined in:
- lib/libui_paradise/prototype/prototype.rb
Overview
LibuiParadise::GUI::LibUI::Prototype
Constant Summary
collapse
- TITLE =
'A prototype GUI for LibUI'
- WIDTH =
680
- HEIGHT =
520
Instance Method Summary
collapse
-
#create_skeleton ⇒ Object
# === create_skeleton (create tag, skeleton tag) ========================================================================= #.
-
#initialize(run_already = true) ⇒ Prototype
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
Methods inherited from Base
[], #add_these_widgets_to_the_main_window, #create_the_skeleton, #default_title_width_height, #run_in_the_background, #update_the_main_window
Methods included from BaseModule
#abort_on_exception, #append_this_array_to_that_combobox, #area, #assumed_height?, #assumed_width?, #bold_button, #bold_label, #bold_text_left_aligned, #button, #chdir, #checkbox, #checked_checkbox, #close_properly, #colour_button, #colour_to_rgb, #combobox, #commandline_arguments?, #connect_skeleton, #copy, #copy_file, #create_directory, #create_grid, #create_skeleton_then_connect_skeleton, #create_table, #create_the_skeleton, #current_widget_pointer_type?, #delete_file, #do_quit, #editable_combobox, #entry, #error_msg, #esystem, #exit_from, #fancy_text, #font, #font_button, #free_table_model, #gtk3?, #hbox, #height?, #horizontal_separator, #image, #is_on_roebe?, #is_on_windows?, #label, #last_pointer?, #left_arrow?, #main_hash?, #main_then_quit, #menu, #message_box_error, #multiline_entry, #new_brush, #non_wrapping_multiline_entry, #parse_this_file_into_a_table, #password_entry, #quit_button, #radio_buttons, #register_this_fiddle_pointer_widget, #reset_the_internal_hash, #return_button_for_opening_a_local_file, #return_default_window, #return_pwd, #return_the_resolution_using_xrandr, #run_main, #scrolling_area, #search_entry, #selected?, #set_commandline_arguments, #set_height, #set_main_window, #set_title, #set_width, #set_window, #sfancy, #sfile, #slider, #spinbox, #tab, #table, #text?, #text_layout, #title?, #title_width_height, #title_width_height_font, #try_to_parse_this_config_file, #try_to_use_this_font, #two_elements_hbox, #ui_draw_text_layout_params, #ui_font_descriptor, #ui_margined_main_window, #ui_msg_box, #ui_open_file, #ui_padded_grid, #ui_padded_hbox, #ui_padded_vbox, #ui_sync_connect, #ui_table_params_malloc, #ui_text_then_entry, #use_gtk3?, #use_gtk?, #use_libui?, #vbox, #vertical_separator, #width?, #window, #window?, #without_trailing_comment, #wrapper_new_progress_bar
Constructor Details
#initialize(run_already = true) ⇒ Prototype
38
39
40
41
42
43
|
# File 'lib/libui_paradise/prototype/prototype.rb', line 38
def initialize(
run_already = true
)
reset
run if run_already
end
|
Instance Method Details
#create_skeleton ⇒ Object
#
create_skeleton (create tag, skeleton tag)
#
56
57
58
59
60
61
|
# File 'lib/libui_paradise/prototype/prototype.rb', line 56
def create_skeleton
@window = padded_main_window(title?, width?, height?, 0)
end
|
#run ⇒ Object
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# File 'lib/libui_paradise/prototype/prototype.rb', line 66
def run
create_skeleton_then_connect_skeleton
outer_vbox = padded_vbox
hbox_on_top = padded_hbox
button_refresh = create_button('Refresh')
button_refresh.on_clicked {
e 'TODO: Refresh this ... or add any other functionality.'
}
hbox_on_top.maximal(button_refresh)
hbox_on_top.maximal(quit_button)
outer_vbox.minimal(hbox_on_top)
outer_vbox.add_hsep
grid = ui_padded_grid
grid.ui_grid_append(text('Left'), 0, 0, 1, 1, 0, 0.5, 1, 0)
grid.ui_grid_append(text('Right'), 1, 0, 1, 1, 0, 0.5, 1, 0)
3.times.each {|index| index += 1
grid.ui_grid_append(text(index.to_s), 0, 1+index, 1, 1, 1, 1, 1, 1)
label_exam_topic = text(entry.to_s)
grid.ui_grid_append(label_exam_topic, 1, 1+index, 1, 1, 1, 1, 1, 1)
}
outer_vbox.maximal(grid)
@window.add(outer_vbox)
@window.intelligent_exit
end
|