module AsciiParadise::GUI::Gtk::AnimatedFrameModule
Constants
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- USE_THIS_FONT
#¶ ↑
USE_THIS_FONT
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Class Methods
new( run_already = true )
click to toggle source
run()
click to toggle source
#¶ ↑
AsciiParadise::GUI::Gtk::AnimatedFrameModule.run
¶ ↑
#¶ ↑
# File lib/ascii_paradise/gui/shared_code/animated_frame/animated_frame_module.rb, line 168 def self.run require 'gtk_paradise/run' r = ::Gtk.run r.set_title( 'Animated Frame Module' ) _ = ::AsciiParadise::GUI::Gtk::AnimatedFrame.new r.automatic_title r.automatic_size r.set_width(_.default_width?) r.set_height(_.default_height?) r << _ r.show_all r.top_left_then_run end
Public Instance Methods
border_size?()
click to toggle source
create_skeleton()
click to toggle source
#¶ ↑
create_skeleton
¶ ↑
Create the GUI-skeleton via this method.
#¶ ↑
# File lib/ascii_paradise/gui/shared_code/animated_frame/animated_frame_module.rb, line 98 def create_skeleton label_on_top = bold_label('Showing the individual frames') minimal(label_on_top, 0) @text_buffer = gtk_text_buffer @text_view = gtk_text_view(@text_buffer) @text_view.set_editable(true) @text_view.cursor_visible = false @scrolled_window = gtk_scrolled_window(@text_view) if @scrolled_window.respond_to? :min_content_height @scrolled_window.min_content_height = 500 end @scrolled_window.show_scrollbars maximal(@scrolled_window, 2) create_the_combo_box_entry populate_the_combo_box @combo_box_entry.active = 0 @combo_box_entry.on_changed { if @combo_box_entry.active_iter active_text = @combo_box_entry.active_text @array_dataset = AsciiParadise.dataset_for( active_text, :do_not_uppercase ) # =================================================================== # # We will display the first element of the Array. # =================================================================== # if @array_dataset.respond_to? :first set_text(@array_dataset.first) end end } maximal(@combo_box_entry, 0) show_all end
create_the_combo_box_entry()
click to toggle source
#¶ ↑
create_the_combo_box_entry
¶ ↑
#¶ ↑
# File lib/ascii_paradise/gui/shared_code/animated_frame/animated_frame_module.rb, line 204 def create_the_combo_box_entry # ======================================================================= # # Add the combobox next. # ======================================================================= # if ::Gtk.use_gtk2? @combo_box_entry = gtk_combo_box_entry(:text_only) else @combo_box_entry = gtk_combo_box_text end @combo_box_entry.css_class('combo_box1') end
minimum_height?()
click to toggle source
minimum_width?()
click to toggle source
populate_the_combo_box()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset¶ ↑
#¶ ↑
# File lib/ascii_paradise/gui/shared_code/animated_frame/animated_frame_module.rb, line 64 def reset reset_the_internal_variables # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, NAMESPACE] # ======================================================================= # # === @title # ======================================================================= # @title = TITLE # ======================================================================= # # === @width # ======================================================================= # set_width(WIDTH) # ======================================================================= # # === @height # ======================================================================= # set_height(HEIGHT) # ======================================================================= # # === @array_dataset # ======================================================================= # @array_dataset = [] # This variable will contain the whole Array. # ======================================================================= # # === @available_components # ======================================================================= # @available_components = ::AsciiParadise.available_components? - [:AnimatedProgressBar] append_project_css_file end
run()
click to toggle source