class MultimediaParadise::GUI::Gtk::InformationAboutAMp3File
Constants
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Class Methods
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
Calls superclass method
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 49 def initialize( commandline_arguments = ARGV, run_already = true ) super(:vertical) reset set_commandline_arguments( commandline_arguments ) run if run_already end
run( i = ARGV )
click to toggle source
#¶ ↑
MultimediaParadise::GUI::Gtk::InformationAboutAMp3File.run
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 406 def self.run( i = ARGV ) require 'gtk_paradise/app/app.rb' _ = ::MultimediaParadise::GUI::Gtk::InformationAboutAMp3File.new(i) r = ::Gtk.run r << _ r.automatic_size_then_automatic_title r.top_left_then_run end
Public Instance Methods
border_size?()
click to toggle source
connect_skeleton()
click to toggle source
create_skeleton()
click to toggle source
#¶ ↑
create_skeleton
(create tag)¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 167 def create_skeleton create_the_labels # ======================================================================= # # === grid tag # # In the old code base before the rewrite in 2021, the resulting widget # was a gtk-table rather than a gtk-grid, and the instance variable # @table1 was assigned to it. In the rewrite it is now a grid, and # the instance variable is no longer necessary. (table tag, grid tag) # ======================================================================= # grid_containing_the_bitrate_and_associated_values = default_gtk_grid grid_containing_the_bitrate_and_associated_values.width_height(300, 100) grid_containing_the_bitrate_and_associated_values.set_column_spacing(8) grid_containing_the_bitrate_and_associated_values.set_row_spacing(8) grid_containing_the_bitrate_and_associated_values.set_border_width(2) grid_containing_the_bitrate_and_associated_values.clear grid_containing_the_bitrate_and_associated_values.use_this_font(smallest_font?) label_bit_rate = modify_bold_label( 'Bit rate:','black',:right, 1 ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_bit_rate, :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.right( @label_bit_rate_content, :default, :default, 1 ) # ======================================================================= # # === label_bit_rate_content # # label_bit_rate_content = gtk_label('') # grid_containing_the_bitrate_and_associated_values.left( # label_bit_rate_content, :default, :default, 2 # ) # # ======================================================================= # label_mpeg_level = modify_bold_label( 'MPEG Level:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_mpeg_level, :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.right( @label_mpeg_level_content, :default, :default, 1 ) label_sample_rate = modify_bold_label( 'Sample rate:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_sample_rate, :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.right( @label_sample_rate_content, :default, :default, 1 ) # ======================================================================= # # === The Frames-label # ======================================================================= # label_frames = modify_bold_label( 'Frames:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_frames, :default, :default, 1 ) label_frames_content = modify_label( '','black',:left ).right grid_containing_the_bitrate_and_associated_values.right( label_frames_content, :default, :default, 1 ) # ======================================================================= # # === The file size of the .mp3 file at hand comes next # ======================================================================= # label_file_size = modify_bold_label( 'File size:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_file_size, :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.right( @label_file_size_content.left, :default, :default, 1 ) # ======================================================================= # # === The duration of the song # ======================================================================= # label_duration = modify_bold_label( 'Duration (in n seconds):','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_duration, :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.right( @label_duration_content.left, :default, :default, 1 ) # ======================================================================= # # === Spacer # # Next, we add a "spacer" element - an empty line in the table. # ======================================================================= # spacer = unicode_horizontal_spacer * n_times_unicode_horizontal_spacer? grid_containing_the_bitrate_and_associated_values.left( gtk_text(spacer), :default, :default, 1 ) grid_containing_the_bitrate_and_associated_values.new_row label_error_protection = modify_bold_label( 'Error Protection:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_error_protection, :default, :default, 1 ) label_error_protection_content = modify_label('','black',:left).left grid_containing_the_bitrate_and_associated_values.right( label_error_protection_content, :default, :default, 1 ) # ======================================================================= # # === Copyright # ======================================================================= # label_copyright = modify_bold_label( 'Copyright:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_copyright, :default, :default, 1 ) label_copyright_content = modify_label('','black',:left).left grid_containing_the_bitrate_and_associated_values.right( label_copyright_content, :default, :default, 1 ) # ======================================================================= # # === Original # ======================================================================= # label_original = modify_bold_label( 'Original:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_original, :default, :default, 1 ) label_original_content = modify_label('','black',:left).left grid_containing_the_bitrate_and_associated_values.right( label_original_content, :default, :default, 1 ) # ======================================================================= # # === Emphasis # ======================================================================= # label_emphasis = modify_bold_label( 'Emphasis:','black',:right ).align_to_the_right grid_containing_the_bitrate_and_associated_values.left( label_emphasis, :default, :default, 1 ) label_emphasis_content = modify_label('','black',:left).left grid_containing_the_bitrate_and_associated_values.right( label_emphasis_content, :default, :default, 1 ) # ======================================================================= # # === @widget_that_can_be_dragged # ======================================================================= # @widget_that_can_be_dragged = can_be_dragged_up_and_down( grid_containing_the_bitrate_and_associated_values, return_widget_files_in_directory ) end
create_the_labels()
click to toggle source
#¶ ↑
create_the_labels
(labels tag, label tag)¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 117 def create_the_labels # ======================================================================= # # === @label_sample_rate_content # ======================================================================= # @label_sample_rate_content = modify_bold_label('','black',:right) # ======================================================================= # # === @label_mpeg_level_content # ======================================================================= # @label_mpeg_level_content = modify_label('','black',:left) # ======================================================================= # # === @label_bit_rate_content # ======================================================================= # @label_bit_rate_content = gtk_text('') # ======================================================================= # # === @label_file_size_content # ======================================================================= # @label_file_size_content = gtk_label # Keep track of the filesize. @label_file_size_content.make_selectable # And it can be selected by the user. # ======================================================================= # # === @label_duration_content # # Keep track of the duration of the song, in n seconds. # ======================================================================= # @label_duration_content = gtk_label end
files_in_directory?()
click to toggle source
label_bit_rate_content?()
click to toggle source
label_duration_content?()
click to toggle source
#¶ ↑
label_duration_content
?¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 146 def label_duration_content? @label_duration_content end
Also aliased as: label_duration_content
label_file_size_content?()
click to toggle source
#¶ ↑
label_file_size_content
?¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 153 def label_file_size_content? @label_file_size_content end
Also aliased as: label_file_size_content
label_mpeg_level_content?()
click to toggle source
#¶ ↑
label_mpeg_level_content
?¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 103 def label_mpeg_level_content? @label_mpeg_level_content end
Also aliased as: label_mpeg_level_content
label_sample_rate_content?()
click to toggle source
#¶ ↑
label_sample_rate_content
?¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 110 def label_sample_rate_content? @label_sample_rate_content end
Also aliased as: label_sample_rate_content
padding?()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 64 def reset reset_the_internal_variables # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, NAMESPACE] title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT) use_gtk_paradise_project_css_file infer_the_size_automatically # ======================================================================= # # === @parent_widget # ======================================================================= # @parent_widget = nil end
return_widget_files_in_directory()
click to toggle source
#¶ ↑
return_widget_files_in_directory
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 358 def return_widget_files_in_directory @files_in_directory = ::Gtk::FilesInDirectory.new # ======================================================================= # # We must designate the proper parent widget here. # ======================================================================= # _ = @parent_widget _ = self if _.nil? @files_in_directory.set_parent_widget(_) @files_in_directory.on_click_use_green_border return @files_in_directory end
run()
click to toggle source
set_duration(i)
click to toggle source
set_filesize(i)
click to toggle source
set_main_entry(i)
click to toggle source
#¶ ↑
set_main_entry
¶ ↑
This method will be propagated back onto the parent widget, if one has been defined.
#¶ ↑
# File lib/multimedia_paradise/gui/gtk3/information_about_a_mp3_file/information_about_a_mp3_file.rb, line 383 def set_main_entry(i) if @parent_widget and @parent_widget.respond_to?(:set_main_entry) @parent_widget.set_main_entry(i) end end
set_parent_widget(i)
click to toggle source