module MultimediaParadise::GUI::Gtk::LyricsModule

Constants

HEIGHT
#

HEIGHT

#
NAMESPACE
#

NAMESPACE

#
TITLE
#

TITLE

#
WIDTH
#

WIDTH

#

Public Class Methods

new( run_already = true ) click to toggle source
#

initialize

#
Calls superclass method
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 48
def initialize(
    run_already = true
  )
  super()
  reset
  run if run_already
end
run() click to toggle source
#

MultimediaParadise::GUI::Gtk::LyricsModule.run

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 127
def self.run
  require 'gtk_paradise/run'
  lyrics_widget = MultimediaParadise::GUI::Gtk::Lyrics.new
  r = ::Gtk.run
  r << lyrics_widget
  r.modify_background(:normal, :azure)
  r.set_size_request(r.width?, r.height?)
  r.top_left_then_run
end

Public Instance Methods

create_skeleton() click to toggle source
#

create_skeleton

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 107
def create_skeleton
  try_to_read_in_the_main_dataset
  # ======================================================================= #
  # === @file_viewer
  # ======================================================================= #
  @file_viewer = ::Gtk::FileViewer.new(FILE_LYRICS)
  @file_viewer.use_this_font(main_font?)
  add(@file_viewer)
end
height?() click to toggle source
#

height?

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 79
def height?
  HEIGHT
end
main_font?() click to toggle source
#

main_font?

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 100
def main_font?
  :hack_18
end
reset() click to toggle source
#

reset

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 59
def reset
  reset_the_internal_variables
  # ======================================================================= #
  # === @configuration
  # ====================================================================== #
  @configuration = [true, __dir__, NAMESPACE]
  title_width_height_font(TITLE, width?, height?, main_font?)
  append_project_css_file
end
run() click to toggle source
#

run (run tag)

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 120
def run
  create_skeleton
end
try_to_read_in_the_main_dataset( this_file = FILE_LYRICS ) click to toggle source
#

try_to_read_in_the_main_dataset

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 86
def try_to_read_in_the_main_dataset(
    this_file = FILE_LYRICS
  )
  if File.exist? this_file
    _ = File.read(FILE_LYRICS, encoding: 'utf-8')
    @dataset = _
  else
    @dataset = nil
  end
end
width?() click to toggle source
#

width?

#
# File lib/multimedia_paradise/gui/shared_code/lyrics/lyrics_module.rb, line 72
def width?
  WIDTH
end