Class: Golumn::App
- Inherits:
-
WX::App
- Object
- WX::App
- Golumn::App
- Defined in:
- lib/golumn/app.rb
Overview
Main app window
Instance Method Summary collapse
-
#initialize(io: ARGF) ⇒ App
constructor
A new instance of App.
- #on_init ⇒ Object
Constructor Details
#initialize(io: ARGF) ⇒ App
Returns a new instance of App.
6 7 8 |
# File 'lib/golumn/app.rb', line 6 def initialize(io: ARGF) @io = io end |
Instance Method Details
#on_init ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/golumn/app.rb', line 10 def on_init @frame = WX::Frame.new(nil, title: 'widgets demo') @frame.sizer = WX::BoxSizer.new(:vertical) do |box| @grid = WX::Grid.new(@frame) @grid.table = ArrayGrid.new(data: CSV.parse(@io.read)) box.add(@grid, expand: true) end @frame.layout @frame.show end |