module MultimediaParadise::GUI::CutMultimediaModule
Constants
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- USE_THIS_FONT
#¶ ↑
USE_THIS_FONT
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Instance Methods
a_new_file_has_been_assigned(i)
click to toggle source
border_size?()
click to toggle source
do_assume_the_duration_as_end_position_if_a_file_has_been_assigned()
click to toggle source
#¶ ↑
do_assume_the_duration_as_end_position_if_a_file_has_been_assigned
¶ ↑
This method may modify the content of the entry stored under @end_position_entry. This will only work if
# ¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 254 def do_assume_the_duration_as_end_position_if_a_file_has_been_assigned _ = duration_of_the_file? @end_position_entry.set_text(_.to_s) end
do_cut_the_audio_file()
click to toggle source
#¶ ↑
do_cut_the_audio_file
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 192 def do_cut_the_audio_file start_position = @start_position_entry.text? end_position = @end_position_entry.text? audio_file_to_use = File.absolute_path(main_file?) # ======================================================================= # # Navigate to a "safe" directory next: # ======================================================================= # cd('/tmp/') if File.directory? '/tmp/' cd('/home/x/Temp/') if File.directory? '/home/x/Temp/' # This is for my home directory. e 'The file `'+sfile(audio_file_to_use.to_s)+'` will be used.' _ = MultimediaParadise::CutMultimedia.new(audio_file_to_use, :do_not_run_yet) _.assign_this_file(audio_file_to_use) _.set_start_position(start_position) _.set_end_position(end_position) _.do_cut result = _.absolute_path_of_the_output_file? popup_over_this_widget( commit_button?, "The new file can now be found at:\n\n <b>#{result}</b>\n\n" ) { :make_selectable } if uses_gtk3? return result # Return the file position of the newly created file as well, just in case. end
do_play_the_audio_file( i = main_file? )
click to toggle source
#¶ ↑
do_play_the_audio_file
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 70 def do_play_the_audio_file( i = main_file? ) if i @cut_multimedia_object.set_main_file(i) Thread.new { @cut_multimedia_object.interactive_menu( 'play_the_audio_file' ) } end end
do_trim()
click to toggle source
#¶ ↑
do_trim
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 239 def do_trim _ = "trim #{@entry_n_seconds_for_trimming.text?}" @cut_multimedia_object.interactive_menu(_) this_file = @cut_multimedia_object.output_file? set_main_entry(this_file) update_the_duration @cut_multimedia_object.set_work_on_this_file(this_file) end
duration?(i)
click to toggle source
duration_of_the_file?()
click to toggle source
main_entry?()
click to toggle source
main_file?()
click to toggle source
padding?()
click to toggle source
return_hbox_containing_the_start_and_end_position_entries()
click to toggle source
#¶ ↑
return_hbox_containing_the_start_and_end_position_entries
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 140 def return_hbox_containing_the_start_and_end_position_entries hbox = create_hbox hbox.minimal(text('Start position:'), 5) # ======================================================================= # # === @start_position_entry # ======================================================================= # @start_position_entry = create_entry('0') @start_position_entry.light_blue_background @start_position_entry.bblack1 @start_position_entry.center @start_position_entry.hint = 'You can provide n seconds, such as '\ '20, to start at the 20 seconds mark.' hbox.minimal(@start_position_entry, 3) hbox.minimal(text('End position:'), 5) # ======================================================================= # # === @end_position_entry # ======================================================================= # @end_position_entry = create_entry @end_position_entry.light_blue_background @end_position_entry.bblack1 @end_position_entry.center @end_position_entry.hint = 'You can provide n seconds, such as '\ '20, to end at the 20 seconds mark.' hbox.minimal(@end_position_entry, 3) hbox.minimal(button_commit?, 3) button_merge_the_created_files = button('_Merge the created files') button_merge_the_created_files.clear_background button_merge_the_created_files.bblack2 button_merge_the_created_files.css_class('BG_lightgreen') button_merge_the_created_files.on_hover_colour(:springgreen) button_merge_the_created_files.on_clicked { do_merge_the_created_files } hbox.minimal(button_merge_the_created_files, 3) return hbox end
set_use_this_file(i)
click to toggle source
#¶ ↑
set_use_this_file
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/shared_code/cut_multimedia/cut_multimedia_module.rb, line 232 def set_use_this_file(i) main_entry?.set_text(i.to_s) end
Also aliased as: set_main_entry