fxruby 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +124 -0
- data/doc/apes02.html +2 -2
- data/doc/apes03.html +1 -1
- data/doc/book.html +1 -1
- data/doc/changes.html +194 -112
- data/doc/cvs.html +2 -2
- data/doc/differences.html +3 -3
- data/doc/gems.html +1 -1
- 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/ext/fox12/core_wrap.cpp +44 -3
- data/ext/fox12/include/FXRbTable.h +18 -7
- data/ext/fox12/unregisterOwnedObjects.cpp +7 -4
- data/lib/fox12/aliases.rb +1 -9
- data/lib/fox12/core.rb +52 -0
- data/lib/fox12/version.rb +1 -1
- data/rdoc-sources/FXCheckButton.rb +0 -15
- data/rdoc-sources/FXDC.rb +1 -1
- data/rdoc-sources/FXFont.rb +8 -1
- data/rdoc-sources/FXImage.rb +0 -2
- data/rdoc-sources/FXScrollArea.rb +4 -4
- data/rdoc-sources/FXTreeList.rb +3 -0
- data/tests/TC_FXFont.rb +10 -0
- data/tests/TC_FXSettings.rb +34 -0
- metadata +4 -3
data/lib/fox12/core.rb
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
module Fox
|
2
2
|
|
3
|
+
class FXCheckButton
|
4
|
+
#
|
5
|
+
# Return +true+ if the check state for this check button is +TRUE+,
|
6
|
+
# or +false+ if the check state is either +FALSE+ or +MAYBE+.
|
7
|
+
#
|
8
|
+
def checked?
|
9
|
+
self.check == TRUE
|
10
|
+
end
|
11
|
+
|
12
|
+
#
|
13
|
+
# Return +true+ if the check state for this check button is +FALSE+,
|
14
|
+
# or +false+ if the check state is either +TRUE+ or +MAYBE+.
|
15
|
+
#
|
16
|
+
def unchecked?
|
17
|
+
self.check == FALSE
|
18
|
+
end
|
19
|
+
|
20
|
+
#
|
21
|
+
# Return +true+ if the check state for this check button is +MAYBE+,
|
22
|
+
# or +false+ if the check state is either +TRUE+ or +FALSE+.
|
23
|
+
#
|
24
|
+
def maybe?
|
25
|
+
self.check == MAYBE
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
3
29
|
class FXIconItem
|
4
30
|
def <=>(otherItem)
|
5
31
|
text <=> otherItem.text
|
@@ -66,6 +92,32 @@ module Fox
|
|
66
92
|
end
|
67
93
|
end
|
68
94
|
|
95
|
+
class FXMenuCheck
|
96
|
+
#
|
97
|
+
# Return +true+ if the check state for this menu check item is +TRUE+,
|
98
|
+
# or +false+ if the check state is either +FALSE+ or +MAYBE+.
|
99
|
+
#
|
100
|
+
def checked?
|
101
|
+
self.check == TRUE
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Return +true+ if the check state for this menu check item is +FALSE+,
|
106
|
+
# or +false+ if the check state is either +TRUE+ or +MAYBE+.
|
107
|
+
#
|
108
|
+
def unchecked?
|
109
|
+
self.check == FALSE
|
110
|
+
end
|
111
|
+
|
112
|
+
#
|
113
|
+
# Return +true+ if the check state for this menu check item is +MAYBE+,
|
114
|
+
# or +false+ if the check state is either +TRUE+ or +FALSE+.
|
115
|
+
#
|
116
|
+
def maybe?
|
117
|
+
self.check == MAYBE
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
69
121
|
class FXScrollArea
|
70
122
|
# Returns a reference to the scroll corner (an FXScrollCorner instance) for this window.
|
71
123
|
def scrollCorner
|
data/lib/fox12/version.rb
CHANGED
@@ -38,20 +38,5 @@ module Fox
|
|
38
38
|
# Construct new check button
|
39
39
|
def initialize(parent, text, target=nil, selector=0, opts=CHECKBUTTON_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theCheckButton
|
40
40
|
end
|
41
|
-
|
42
|
-
# Return +true+ if the check button state is +TRUE+
|
43
|
-
def checked?
|
44
|
-
self.check == TRUE
|
45
|
-
end
|
46
|
-
|
47
|
-
# Return +true+ if the check button state is +FALSE+
|
48
|
-
def unchecked?
|
49
|
-
self.check == FALSE
|
50
|
-
end
|
51
|
-
|
52
|
-
# Return +true+ if the check button state is +MAYBE+
|
53
|
-
def maybe?
|
54
|
-
self.check == MAYBE
|
55
|
-
end
|
56
41
|
end
|
57
42
|
end
|
data/rdoc-sources/FXDC.rb
CHANGED
data/rdoc-sources/FXFont.rb
CHANGED
@@ -311,7 +311,14 @@ module Fox
|
|
311
311
|
def fontMono? ; end
|
312
312
|
|
313
313
|
#
|
314
|
-
# Return +true+ if font has glyph for _ch_.
|
314
|
+
# Return +true+ if font has glyph for _ch_. Here, _ch_ can either be an
|
315
|
+
# ordinal value, e.g.
|
316
|
+
#
|
317
|
+
# aFont.hasChar?(?a)
|
318
|
+
#
|
319
|
+
# or a string of length one (i.e. a single character), e.g.
|
320
|
+
#
|
321
|
+
# aFont.hasChar?('a')
|
315
322
|
#
|
316
323
|
def hasChar?(ch) ; end
|
317
324
|
|
data/rdoc-sources/FXImage.rb
CHANGED
@@ -44,11 +44,11 @@ module Fox
|
|
44
44
|
# Scroll style [Integer]
|
45
45
|
attr_accessor :scrollStyle
|
46
46
|
|
47
|
-
# Horizontal scrollbar [
|
48
|
-
attr_reader :
|
47
|
+
# Horizontal scrollbar [FXScrollBar]
|
48
|
+
attr_reader :horizontalScrollBar
|
49
49
|
|
50
|
-
# Vertical scrollbar [
|
51
|
-
attr_reader :
|
50
|
+
# Vertical scrollbar [FXScrollBar]
|
51
|
+
attr_reader :verticalScrollBar
|
52
52
|
|
53
53
|
# Current x-position [Integer]
|
54
54
|
attr_reader :xPosition
|
data/rdoc-sources/FXTreeList.rb
CHANGED
@@ -357,6 +357,9 @@ module Fox
|
|
357
357
|
|
358
358
|
# Return item height
|
359
359
|
def getItemHeight(item); end
|
360
|
+
|
361
|
+
# Return a reference to the tree item at (_x_, _y_), if any.
|
362
|
+
def getItemAt(x, y); end
|
360
363
|
|
361
364
|
# Search items for item by _text_, starting from _startItem_; the
|
362
365
|
# _flags_ argument controls the search direction, and case sensitivity.
|
data/tests/TC_FXFont.rb
CHANGED
@@ -56,4 +56,14 @@ class TC_FXFont < Test::Unit::TestCase
|
|
56
56
|
assert_instance_of(Array, fonts)
|
57
57
|
assert(fonts.length > 0)
|
58
58
|
end
|
59
|
+
|
60
|
+
def test_hasChar?
|
61
|
+
@app.normalFont.create
|
62
|
+
assert(@app.normalFont.hasChar('a'))
|
63
|
+
assert(@app.normalFont.hasChar(?a))
|
64
|
+
assert(@app.normalFont.hasChar?('a'))
|
65
|
+
assert(@app.normalFont.hasChar?(?a))
|
66
|
+
assert_raises(ArgumentError) { @app.normalFont.hasChar? "" }
|
67
|
+
assert_raises(ArgumentError) { @app.normalFont.hasChar? "ab" }
|
68
|
+
end
|
59
69
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'fox12'
|
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
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.10
|
3
3
|
specification_version: 1
|
4
4
|
name: fxruby
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.2.
|
7
|
-
date: 2005-
|
6
|
+
version: 1.2.6
|
7
|
+
date: 2005-04-15
|
8
8
|
summary: FXRuby is the Ruby binding to the FOX GUI toolkit.
|
9
9
|
require_paths:
|
10
10
|
- ext/fox12
|
@@ -516,6 +516,7 @@ files:
|
|
516
516
|
- tests/TC_FXScrollArea.rb
|
517
517
|
- tests/TC_FXScrollWindow.rb
|
518
518
|
- tests/TC_FXSegment.rb
|
519
|
+
- tests/TC_FXSettings.rb
|
519
520
|
- tests/TC_FXShell.rb
|
520
521
|
- tests/TC_FXSize.rb
|
521
522
|
- tests/TC_FXStream.rb
|