fxruby 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/apes02.html +2 -2
- data/doc/apes03.html +1 -1
- data/doc/book.html +1 -1
- data/doc/changes.html +36 -9
- data/doc/cvs.html +2 -2
- data/doc/differences.html +3 -3
- data/doc/implementation.html +1 -1
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +4 -4
- data/examples/groupbox.rb +1 -1
- data/examples/iconlist.rb +0 -15
- data/examples/imageviewer.rb +24 -28
- data/examples/textedit/commands.rb +4 -1
- data/examples/textedit/helpwindow.rb +6 -2
- data/examples/textedit/prefdialog.rb +4 -0
- data/examples/textedit/textedit.rb +17 -16
- data/ext/fox14/FXRuby.cpp +6 -2
- data/ext/fox14/core_wrap.cpp +58 -22
- data/ext/fox14/iconlist_wrap.cpp +7 -11
- data/ext/fox14/menu_wrap.cpp +26 -4
- data/ext/fox14/treelist_wrap.cpp +7 -11
- data/lib/fox14/aliases.rb +53 -33
- data/lib/fox14/core.rb +86 -0
- data/lib/fox14/version.rb +1 -1
- data/rdoc-sources/FXCheckButton.rb +0 -15
- data/rdoc-sources/FXDC.rb +1 -1
- data/rdoc-sources/FXDockSite.rb +13 -13
- data/rdoc-sources/FXFont.rb +8 -1
- data/rdoc-sources/FXImage.rb +0 -2
- data/rdoc-sources/FXScrollArea.rb +4 -4
- data/rdoc-sources/FXStream.rb +19 -1
- data/rdoc-sources/FXTable.rb +0 -12
- data/rdoc-sources/FXTopWindow.rb +37 -12
- data/rdoc-sources/FXTreeList.rb +1 -5
- data/tests/TC_FXFont.rb +10 -0
- data/tests/TC_FXMenuCheck.rb +57 -0
- data/tests/TC_FXMenuRadio.rb +57 -0
- data/tests/TC_FXSettings.rb +34 -0
- metadata +5 -2
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'testcase'
|
3
|
+
require 'fox14'
|
4
|
+
|
5
|
+
include Fox
|
6
|
+
|
7
|
+
class TC_FXMenuRadio < TestCase
|
8
|
+
def setup
|
9
|
+
super(self.class.name)
|
10
|
+
@menuRadio = FXMenuRadio.new(mainWindow, "menuRadio")
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_setCheck_TRUE
|
14
|
+
@menuRadio.check = Fox::TRUE
|
15
|
+
assert_equal(true, @menuRadio.check)
|
16
|
+
assert_equal(Fox::TRUE, @menuRadio.checkState)
|
17
|
+
assert(@menuRadio.checked?)
|
18
|
+
assert(!@menuRadio.unchecked?)
|
19
|
+
assert(!@menuRadio.maybe?)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_setCheck_FALSE
|
23
|
+
@menuRadio.check = Fox::FALSE
|
24
|
+
assert_equal(false, @menuRadio.check)
|
25
|
+
assert_equal(Fox::FALSE, @menuRadio.checkState)
|
26
|
+
assert(!@menuRadio.checked?)
|
27
|
+
assert(@menuRadio.unchecked?)
|
28
|
+
assert(!@menuRadio.maybe?)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_setCheck_MAYBE
|
32
|
+
@menuRadio.check = Fox::MAYBE
|
33
|
+
assert_equal(true, @menuRadio.check) # this is not a typo!
|
34
|
+
assert_equal(Fox::MAYBE, @menuRadio.checkState)
|
35
|
+
assert(!@menuRadio.checked?)
|
36
|
+
assert(!@menuRadio.unchecked?)
|
37
|
+
assert(@menuRadio.maybe?)
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_setCheck_true
|
41
|
+
@menuRadio.check = true
|
42
|
+
assert_equal(true, @menuRadio.check)
|
43
|
+
assert_equal(Fox::TRUE, @menuRadio.checkState)
|
44
|
+
assert(@menuRadio.checked?)
|
45
|
+
assert(!@menuRadio.unchecked?)
|
46
|
+
assert(!@menuRadio.maybe?)
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_setCheck_false
|
50
|
+
@menuRadio.check = false
|
51
|
+
assert_equal(false, @menuRadio.check)
|
52
|
+
assert_equal(Fox::FALSE, @menuRadio.checkState)
|
53
|
+
assert(!@menuRadio.checked?)
|
54
|
+
assert(@menuRadio.unchecked?)
|
55
|
+
assert(!@menuRadio.maybe?)
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'fox14'
|
3
|
+
require 'testcase'
|
4
|
+
|
5
|
+
include Fox
|
6
|
+
|
7
|
+
class TC_FXSettings < TestCase
|
8
|
+
|
9
|
+
def setup
|
10
|
+
super(self.class.name)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_each_section_empty_settings
|
14
|
+
empty = FXSettings.new
|
15
|
+
num_sections = 0
|
16
|
+
empty.each_section do |sect|
|
17
|
+
num_sections = num_sections + 1
|
18
|
+
end
|
19
|
+
assert_equal(0, num_sections)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_each_section
|
23
|
+
settings = FXSettings.new
|
24
|
+
settings.writeStringEntry('sect1', 'key1', 'value1')
|
25
|
+
settings.writeStringEntry('sect2', 'key2', 'value2')
|
26
|
+
keys = []
|
27
|
+
settings.each_section do |sect|
|
28
|
+
sect.each_key do |key|
|
29
|
+
keys << key
|
30
|
+
end
|
31
|
+
end
|
32
|
+
assert_equal(['key1', 'key2'], keys.sort)
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: fxruby
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.4.
|
7
|
-
date: 2005-08-
|
6
|
+
version: 1.4.2
|
7
|
+
date: 2005-08-22
|
8
8
|
summary: FXRuby is the Ruby binding to the FOX GUI toolkit.
|
9
9
|
require_paths:
|
10
10
|
- ext/fox14
|
@@ -516,7 +516,9 @@ files:
|
|
516
516
|
- tests/TC_FXMat4f.rb
|
517
517
|
- tests/TC_FXMaterial.rb
|
518
518
|
- tests/TC_FXMemoryStream.rb
|
519
|
+
- tests/TC_FXMenuCheck.rb
|
519
520
|
- tests/TC_FXMenuCommand.rb
|
521
|
+
- tests/TC_FXMenuRadio.rb
|
520
522
|
- tests/TC_FXPoint.rb
|
521
523
|
- tests/TC_FXQuatf.rb
|
522
524
|
- tests/TC_FXRadioButton.rb
|
@@ -527,6 +529,7 @@ files:
|
|
527
529
|
- tests/TC_FXScrollArea.rb
|
528
530
|
- tests/TC_FXScrollWindow.rb
|
529
531
|
- tests/TC_FXSegment.rb
|
532
|
+
- tests/TC_FXSettings.rb
|
530
533
|
- tests/TC_FXShell.rb
|
531
534
|
- tests/TC_FXSize.rb
|
532
535
|
- tests/TC_FXStream.rb
|