class MultimediaParadise::GUI::FOX::PlayFromRadioStation
Public Class Methods
Public Instance Methods
create_skeleton()
click to toggle source
#¶ ↑
create_skeleton
¶ ↑
#¶ ↑
# File lib/multimedia_paradise/gui/fox/play_from_radio_station.rb, line 42 def create_skeleton @app = Fox::FXApp.new main_window = Fox::FXMainWindow.new(@app, 'Radio stations') MultimediaParadise.radio_stations?.each {|array| name = array.first hash = array.last url = hash['url'] # ===================================================================== # # Add the button next: # ===================================================================== # font = Fox::FXFont.new(@app, 'times', 22) button = Fox::FXButton.new(main_window, name) button.setFont(font) button.connect(Fox::SEL_COMMAND) { |sender, selector, data| puts url esystem 'mpv '+url } Fox::FXVerticalSeparator.new( main_window, Fox::LAYOUT_SIDE_RIGHT|Fox::LAYOUT_FILL_Y|Fox::SEPARATOR_RIDGE ) } main_window.show @app.create main_window.resize(1240, 1000) @app.run # rb $FOX/simple_windows.rb end
esystem(i)
click to toggle source