Class: MultimediaParadise::GUI::LibUI::CutMultimedia
- Inherits:
-
Object
- Object
- MultimediaParadise::GUI::LibUI::CutMultimedia
- Includes:
- LibuiParadise::Extensions, CutMultimediaModule
- Defined in:
- lib/multimedia_paradise/gui/libui/cut_multimedia/cut_multimedia.rb
Overview
MultimediaParadise::GUI::LibUI::CutMultimedia
Constant Summary collapse
- TITLE =
#
TITLE
#
'CutMultimedia'
- WIDTH =
#
WIDTH
#
680
- HEIGHT =
#
HEIGHT
#
520
Instance Method Summary collapse
-
#create_skeleton ⇒ Object
# === create_skeleton (create tag, skeleton tag) ========================================================================= #.
-
#initialize(commandline_arguments = ARGV, run_already = true) ⇒ CutMultimedia
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run ========================================================================= #.
Constructor Details
#initialize(commandline_arguments = ARGV, run_already = true) ⇒ CutMultimedia
#
initialize
#
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/multimedia_paradise/gui/libui/cut_multimedia/cut_multimedia.rb', line 42 def initialize( commandline_arguments = ARGV, run_already = true ) reset set_commandline_arguments( commandline_arguments ) run if run_already end |
Instance Method Details
#create_skeleton ⇒ Object
#
create_skeleton (create tag, skeleton tag)
#
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# 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 end |
#reset ⇒ Object
#
reset (reset tag)
#
56 57 58 |
# File 'lib/multimedia_paradise/gui/libui/cut_multimedia/cut_multimedia.rb', line 56 def reset title_width_height(TITLE, WIDTH, HEIGHT) end |
#run ⇒ Object
#
run
#
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# 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 = ('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(, 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() box.maximal() outer_vbox.minimal(box) @window.add(outer_vbox) @window.intelligent_exit end |