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.
- data/VERSION +1 -1
- data/bin/nicome +4 -5
- data/lib/nicome.rb +28 -0
- data/nicome.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/bin/nicome
CHANGED
data/lib/nicome.rb
CHANGED
@@ -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
|
data/nicome.gemspec
CHANGED