class MultimediaParadise::GUI::LibUI::CutMultimedia
Constants
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Class Methods
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
create_skeleton()
click to toggle source
#¶ ↑
create_skeleton
(create tag, skeleton tag)¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/libui/cut_multimedia/cut_multimedia.rb, line 63 def create_skeleton # ======================================================================= # # === @window # ======================================================================= # @window = ui_padded_main_window(title?, width?, height?, 1) # ======================================================================= # # === @entry_work_on_this_file # ======================================================================= # @entry_work_on_this_file = create_entry _ = commandline_arguments? if _ and !_.empty? and File.exist?(_.first.to_s) @entry_work_on_this_file.set_text(_.first.to_s) end create_the_trim_button create_the_play_the_audio_file_button create_the_commit_button end
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/libui/cut_multimedia/cut_multimedia.rb, line 84 def run create_skeleton_then_connect_skeleton outer_vbox = padded_vbox outer_vbox.add_hsep grid = ui_padded_grid # widget, left, top, xspan, yspan, hexpand, halign, vexpand, valign grid.ui_grid_append(text('Work on this file:'), 0, 0, 1, 1, 0, 0.5, 1, 0) grid.ui_grid_append(@entry_work_on_this_file, 1, 0, 1, 1, 0, 0.5, 1, 0) # widget, left, top, xspan, yspan, hexpand, halign, vexpand, valign button_open_file = button('Open file') button_open_file.on_clicked { filename = ui_open_file(window).to_s # This is the part that will open a local file. if File.exist? filename main_entry?.set_text(filename) end } grid.ui_grid_append(button_open_file, 2, 0, 1, 1, 0, 0.5, 1, 0) grid.ui_grid_append(return_hbox_containing_the_start_and_end_position_entries, 0, 1, 3, 1, 0, 0.5, 1, 0) outer_vbox.minimal(grid) outer_vbox.add_hsep box = create_hbox box.maximal(trim_button?) box.maximal(quit_button) outer_vbox.minimal(box) @window.add(outer_vbox) @window.intelligent_exit end