Class: MultimediaParadise::GUI::UniversalWidgets::Playlist

Inherits:
Base
  • Object
show all
Includes:
Gtk::PlaylistModule, UniversalWidgets::BaseModule
Defined in:
lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb

Overview

MultimediaParadise::GUI::UniversalWidgets::Playlist

Constant Summary collapse

TITLE =
#

TITLE

#
'Playlist'
WIDTH =
#

WIDTH

#
'100% or minimum 1820px'
HEIGHT =
#

HEIGHT

#
'88% or minimum 1540px'

Constants included from Gtk::PlaylistModule

Gtk::PlaylistModule::DEFAULT_STREAM, Gtk::PlaylistModule::FONT_FAMILY_TO_USE, Gtk::PlaylistModule::FONT_SIZE, Gtk::PlaylistModule::LARGER_FONT, Gtk::PlaylistModule::SMALLER_FONT, Gtk::PlaylistModule::SMALLER_FONT_SIZE, Gtk::PlaylistModule::USE_THIS_FONT

Constants inherited from Base

Base::ERROR, Base::ERROR_LINE, Base::NAMESPACE, Base::USE_THIS_NAMESPACE_FOR_THE_COLOURS, Base::USE_THIS_NAMESPACE_FOR_THE_CORE_COLOURS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Gtk::PlaylistModule

#connect_skeleton, #create_skeleton, #main_font?, #play_this_song, #reset_the_shared_module, #return_the_box_containing_all_playlist_buttons, #return_the_default_scrolled_window

Methods inherited from Base

#actions, #append_what_into, #be_silent, #be_verbose?, #beautiful_url, #cartoons_directory?, #clear_the_internal_hash, #cliner, #cliner_with_time_stamp, #colourized_comment, #copy_file, #crimson, #dataset_from_file_video_collection, #dd_mm_yyyy, #debug?, #default_readlines, #directory_to_realvids?, #do_not_use_opn, #dodgerblue, #does_the_video_player_support_this_commandline?, #e, #ecomment, #ecrimson, #efancy, #enable_debug, #ensure_main_encoding, #ensure_that_the_output_directory_exists, #eparse, #erev, #esystem, #ewarn, #file_video_collection?, #filter_for_audio_files, #filter_for_video_files, #forestgreen, #gold, #grey, #hh_mm_ss, #home_x_video?, #indianred, #infer_the_namespace, #internal_hash?, #is_audio_file?, #is_mkv?, #is_mp3?, #is_mp4?, #is_multimedia_file?, #is_on_roebe?, #is_video_file?, #konsole_colour_peru, #lightblue, #lightgreen, #load_yaml, #local_audio_directory?, #log_dir?, #map_symbol_to_locally_existing_file, #mediumorchid, #mediumpurple, #mediumslateblue, #mkdir, #move_file, #namespace?, #no_file_exists, #no_file_exists_at, #olive, #olivedrab, #opne, #opnecomment, #opnn, #orange, #palegoldenrod, #palegreen, #powderblue, #project_base_directory?, #rds, #register_sigint, #remove_file, #report_pwd, #reset_the_internal_hash, #return_all_video_files, #return_pwd, #return_random_video, #rev, #royalblue, #save_what_into, #sdir, #seagreen, #seconds_to_time_format, #select_only_video_files_from, #set_be_verbose, #set_use_colours, #sfancy, #sfile, #simp, #skyblue, #slateblue, #springgreen, #steelblue, #swarn, #teal, #time_right_now, #to_hh_mm_ss, #tomato, #true_rev, #try_to_rename_kde_konsole_tab, #ucliner, #use_colours?, #use_opn?, #use_which_video_player?, #verbose_truth, #video_collection?, #violet, #yaml_directory?, #yel

Methods included from CommandlineArgumentsModule

#all_input_starts_with_a_number?, #commandline_arguments?, #commandline_arguments_as_a_string, #first_argument?, #first_non_hyphened_commandline_argument?, #set_commandline_arguments

Constructor Details

#initialize(commandline_arguments = nil, run_already = true) ⇒ Playlist

#

initialize

#


48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 48

def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  determine_the_GUI_to_be_used(commandline_arguments) # This must come first, even before reset().
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  on_delete_event_quit_the_application
  run if run_already
end

Class Method Details

.[](i = ARGV) ⇒ Object

#

MultimediaParadise::GUI::UniversalWidgets::Playlist[]

#


189
190
191
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 189

def self.[](i = ARGV)
  new(i)
end

.run(i = ARGV) ⇒ Object

#

MultimediaParadise::GUI::UniversalWidgets::Playlist.run

#


168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 168

def self.run(
    i = ARGV
  )
  require 'gtk_paradise/run'
  _ = ::MultimediaParadise::GUI::Gtk::Playlist.new(i)
  r = ::Gtk.run
  r << _
  _.set_parent_widget(r) # Must come before we enable the key-combinations.
  r.enable_context_menu_on_button_click_events
  r.signal_connect(:delete_event) { |_widget| ::Gtk.main_quit }
  _.maximize_button?.set_new_parent(r)
  r.automatic_size_then_automatic_title
  r.enable_quick_exit
  r.modify_background(:normal, :azure)
  r.maximize
  r.top_left_then_run
end

Instance Method Details

#border_size?Boolean

#

border_size?

#

Returns:

  • (Boolean)


107
108
109
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 107

def border_size?
  0
end

#connect_the_skeletonObject

#

connect_the_skeleton (connect tag)

#


140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 140

def connect_the_skeleton
  abort_on_exception

  outer_vbox = return_the_default_scrolled_window

  window = create_window_or_runner(nil, width?, height?, title?)
  window << outer_vbox

  properly_prepare_this_window(window,
    {
      title:       title?,
      font:        font?,
      width:       width?,
      height:      height?,
      padding:     padding?,
      border_size: border_size?
    }
  )
  window.set_size_request(width?, height?)
  window.show_all
  window.top_left
  do_all_startup_related_actions
  run_main
end

#create_the_skeletonObject

#

create_the_skeleton (create tag, skeleton tag)

#


121
122
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 121

def create_the_skeleton
end
#
#


134
135
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 134

def do_all_startup_related_actions
end

#handle_CSS_rulesObject

#

handle_CSS_rules (CSS tag)

#


89
90
91
92
93
94
95
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 89

def handle_CSS_rules
  use_gtk_paradise_project_css_file
  append_project_css_file
  more_CSS_then_apply_it '

'
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


100
101
102
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 100

def padding?
  0
end

#resetObject

#

reset (reset tag)

#


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 64

def reset
  super() if respond_to?(:super)
  reset_the_shared_module # This can come early.
  reset_the_base_module
  reset_the_internal_variables
  infer_the_namespace
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, namespace?]
  # ======================================================================= #
  # === Set the title, width, height and the font in use.
  # ======================================================================= #
  title_width_height_font(
    TITLE, WIDTH, HEIGHT, "#{FONT_FAMILY_TO_USE} #{FONT_SIZE}"
  )
  if use_gtk3?
    handle_CSS_rules
  end
  infer_the_size_automatically
end

#runObject

#

run (run tag)

#


127
128
129
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 127

def run
  run_super
end

#smaller_font?Boolean

#

smaller_font?

#

Returns:

  • (Boolean)


114
115
116
# File 'lib/multimedia_paradise/gui/universal_widgets/playlist/playlist.rb', line 114

def smaller_font?
  "#{FONT_FAMILY_TO_USE} #{SMALLER_FONT_SIZE}"
end