Class: MultimediaParadise::GUI::Libui::YoutubeChannels
- Inherits:
-
Object
- Object
- MultimediaParadise::GUI::Libui::YoutubeChannels
- Defined in:
- lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb
Overview
MultimediaParadise::GUI::Libui::YoutubeChannels
Constant Summary collapse
- ARRAY_ADD_THESE_CHANNELS =
#
ARRAY_ADD_THESE_CHANNELS
#
%i( daily_dose_of_internet ozzy_man wt3 chris_sumo devon_larrat monster_michael tods_workshop )
Instance Method Summary collapse
-
#create_skeleton ⇒ Object
# === create_skeleton ========================================================================= #.
-
#create_the_grid ⇒ Object
# === create_the_grid ========================================================================= #.
-
#do_open_this_channel_associated_URL(i) ⇒ Object
# === do_open_this_channel_associated_URL ========================================================================= #.
-
#initialize ⇒ YoutubeChannels
constructor
# === initialize ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
Constructor Details
#initialize ⇒ YoutubeChannels
#
initialize
#
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb', line 41 def initialize reset create_skeleton @main_window = ui_main_window( 'YoutubeChannels', 300, 300, 0 ) outer_vbox = ui_vbox outer_vbox.is_padded outer_vbox.minimal( ui_text('Show video channels') ) ARRAY_ADD_THESE_CHANNELS.each_with_index {|this_channel, index| = ( this_channel. to_s.tr('_',' '). center(65) ) .on_clicked { Thread.new { do_open_this_channel_associated_URL(this_channel) } } @grid.ui_grid_append( ui_text(" #{index+1} "), 0, 0+index, 1, 1, 1, 1, 1, 1 ) @grid.ui_grid_append( , 1, 0+index, 2, 1, 1, 1, 1, 1 ) } outer_vbox.maximal(@grid) @main_window.child = outer_vbox @main_window.intelligent_exit end |
Instance Method Details
#create_skeleton ⇒ Object
#
create_skeleton
#
98 99 100 |
# File 'lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb', line 98 def create_skeleton create_the_grid end |
#create_the_grid ⇒ Object
#
create_the_grid
#
105 106 107 108 109 110 |
# File 'lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb', line 105 def create_the_grid # ======================================================================= # # === @grid # ======================================================================= # @grid = ui_grid end |
#do_open_this_channel_associated_URL(i) ⇒ Object
#
do_open_this_channel_associated_URL
#
81 82 83 84 85 86 87 |
# File 'lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb', line 81 def do_open_this_channel_associated_URL( i ) remote_url = BeautifulUrl[i] e 'Now opening '+::Colours.sfancy(remote_url)+'.' Open.in_browser(remote_url) end |
#reset ⇒ Object
#
reset (reset tag)
#
92 93 |
# File 'lib/multimedia_paradise/gui/libui/youtube_channels/youtube_channels.rb', line 92 def reset end |