kentaroi-nicome 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/nicome +4 -5
  3. data/lib/nicome.rb +28 -0
  4. data/nicome.gemspec +1 -1
  5. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/nicome CHANGED
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/ruby
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'nicome.rb'
2
4
 
3
- # require 'rubygems'
4
- # require 'wx'
5
-
6
- puts "nicome"
7
-
5
+ nicome = Nicome.new
6
+ nicome.main_loop
8
7
 
@@ -0,0 +1,28 @@
1
+ require 'rubygems'
2
+ require 'wx'
3
+
4
+
5
+ class MainFrame < Wx::Frame
6
+ def initialize(title, x, y)
7
+ super(nil, -1, title, Wx::Point.new(x, y), Wx::Size.new(500, 430))
8
+ file_menu = Wx::Menu.new
9
+ file_menu.append(Wx::ID_EXIT, "終了(&X)", "ニコメを終了します")
10
+
11
+ menu_bar = Wx::MenuBar.new
12
+ menu_bar.append(file_menu, "ファイル(&F)")
13
+
14
+ evt_menu(Wx::ID_EXIT){|event| on_quit(event)}
15
+ end
16
+
17
+ def on_quit
18
+ close(TRUE)
19
+ end
20
+
21
+ end
22
+
23
+ class Nicome < Wx::App
24
+ def on_init
25
+ frame = MainFrame.new("ニコメ!", 100, 100)
26
+ frame.show
27
+ end
28
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{nicome}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kentaro Imai"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kentaroi-nicome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaro Imai