fxruby 1.6.2 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fox16/version.rb CHANGED
@@ -5,7 +5,7 @@ module Fox
5
5
  # Returns the FXRuby version number as a string, e.g. "1.0.19".
6
6
  #
7
7
  def Fox.fxrubyversion
8
- "1.6.2"
8
+ "1.6.3"
9
9
  end
10
10
  end
11
11
 
@@ -8,10 +8,12 @@ module Fox
8
8
  class FXChoiceBox < FXDialogBox
9
9
  #
10
10
  # Construct choice box with given caption, icon, message text, and with choices from array of strings.
11
+ # If _owner_ is another FXWindow, the dialog box is created as a child of that window. If _owner_
12
+ # is an FXApp instance, it's created as a free-floating dialog box.
11
13
  #
12
14
  # ==== Parameters:
13
15
  #
14
- # +owner+:: Owner window for this dialog box [FXWindow]
16
+ # +owner+:: Owner for this dialog box [FXWindow or FXApp]
15
17
  # +caption+:: Caption for this dialog box [String]
16
18
  # +text+:: Message text for this dialog box [String]
17
19
  # +icon+:: Icon for this dialog box [FXIcon]
@@ -25,25 +27,6 @@ module Fox
25
27
  def initialize(owner, caption, text, icon, choices, opts=0, x=0, y=0, w=0, h=0) # :yields: theChoiceBox
26
28
  end
27
29
 
28
- #
29
- # Construct free floating choice box with given caption, icon, message text, and with choices from array of strings.
30
- #
31
- # ==== Parameters:
32
- #
33
- # +app+:: Reference to the application object [FXApp]
34
- # +caption+:: Caption for this dialog box [String]
35
- # +text+:: Message text for this dialog box [String]
36
- # +icon+:: Icon for this dialog box [FXIcon]
37
- # +choices+:: Array of strings containing choices [Array]
38
- # +opts+:: Dialog box options [Integer]
39
- # +x+:: x-coordinate
40
- # +y+:: y-coordinate
41
- # +w+:: width
42
- # +h+:: height
43
- #
44
- def initialize(app, caption, text, icon, choices, opts=0, x=0, y=0, w=0, h=0) # :yields: theChoiceBox
45
- end
46
-
47
30
  #
48
31
  # Show a modal choice dialog.
49
32
  # Prompt the user using a dialog with given caption, icon,
@@ -52,7 +35,7 @@ module Fox
52
35
  #
53
36
  # ==== Parameters:
54
37
  #
55
- # +owner+:: Owner window for this dialog box [FXWindow]
38
+ # +owner+:: Owner for this dialog box [FXWindow or FXApp]
56
39
  # +opts+:: Dialog box options [Integer]
57
40
  # +caption+:: Caption for this dialog box [String]
58
41
  # +text+:: Message text for this dialog box [String]
@@ -61,22 +44,6 @@ module Fox
61
44
  #
62
45
  def FXChoiceBox.ask(owner, opts, caption, text, icon, choices); end
63
46
 
64
- #
65
- # Show modal choice message, in free floating window.
66
- # Prompt the user using a dialog with given caption, icon,
67
- # message text, and with choices from array of strings.
68
- # Returns -1 if the dialog box is cancelled, otherwise returns the index of the selected choice
69
- #
70
- # ==== Parameters:
71
- #
72
- # +app+:: Reference to the application object [FXApp]
73
- # +opts+:: Dialog box options [Integer]
74
- # +caption+:: Caption for this dialog box [String]
75
- # +text+:: Message text for this dialog box [String]
76
- # +icon+:: Icon for this dialog box [FXIcon]
77
- # +choices+:: Array of strings containing choices [Array]
78
- #
79
- def FXChoiceBox.ask(app, opts, caption, text, icon, choices); end
80
47
  end
81
48
  end
82
49
 
@@ -1,26 +1,22 @@
1
1
  module Fox
2
2
  #
3
3
  # A window device context allows drawing into an FXDrawable, such as an
4
- # on-screen window (i.e. FXWindow and itsderivatives) or an off-screen image (FXImage
4
+ # on-screen window (i.e. FXWindow and its derivatives) or an off-screen image (FXImage
5
5
  # and its derivatives).
6
6
  # Because certain hardware resources are locked down, only one FXDCWindow may be
7
7
  # locked on a drawable at any one time.
8
8
  #
9
9
  class FXDCWindow < FXDC
10
10
  #
11
- # Construct for painting in response to expose; this sets the clip rectangle to the exposed rectangle.
11
+ # Construct a device context for drawing into a window (specified by _drawable_).
12
+ # If _event_ is +nil_, the device context is constructed for normal drawing, and the
13
+ # clip rectangle is set to the whole rectange.
14
+ # If _event_ is a reference to an FXEvent, the device context is constructed for
15
+ # painting in response to an expose; this sets the clip rectangle to the exposed rectangle.
12
16
  # If an optional code block is provided, the new device context will be passed into the block as an
13
17
  # argument and #end will be called automatically when the block terminates.
14
18
  #
15
- def initialize(drawable, event) # :yields: dc
16
- end
17
-
18
- #
19
- # Construct for normal drawing; this sets clip rectangle to the whole drawable.
20
- # If an optional code block is provided, the new device context will be passed into the block as an
21
- # argument and #end will be called automatically when the block terminates.
22
- #
23
- def initialize(drawable) # :yields: dc
19
+ def initialize(drawable, event=nil) # :yields: dc
24
20
  end
25
21
 
26
22
  #
@@ -16,13 +16,9 @@ module Fox
16
16
  #
17
17
  class FXDialogBox < FXTopWindow
18
18
  #
19
- # Construct free-floating dialog.
20
- #
21
- def initialize(app, title, opts=DECOR_TITLE|DECOR_BORDER, x=0, y=0, w=0, h=0, padLeft=10, padRight=10, padTop=10, padBottom=10, hSpacing=4, vSpacing=4) # :yields: theDialogBox
22
- end
23
-
24
- #
25
- # Construct dialog which will always float over the _owner_ window.
19
+ # Construct an empty dialog box.
20
+ # If the _owner_ is an FXWindow instance, the dialog will always float over that window.
21
+ # If the _owner_ is an FXApp instance, it will be a free-floating dialog.
26
22
  #
27
23
  def initialize(owner, title, opts=DECOR_TITLE|DECOR_BORDER, x=0, y=0, w=0, h=0, padLeft=10, padRight=10, padTop=10, padBottom=10, hSpacing=4, vSpacing=4) # :yields: theDialogBox
28
24
  end
@@ -17,10 +17,6 @@ module Fox
17
17
  def initialize(owner, name, opts=0, x=0, y=0, w=500, h=300) # :yields: theDirDialog
18
18
  end
19
19
 
20
- # Returns a free-floating initialized FXDirDialog instance.
21
- def initialize(app, name, opts=0, x=0, y=0, w=500, h=300) # :yields: theDirDialog
22
- end
23
-
24
20
  # Return +true+ if showing files as well as directories
25
21
  def filesShown?; end
26
22
 
@@ -66,10 +66,6 @@ module Fox
66
66
  def initialize(owner, name, opts=0, x=0, y=0, w=500, h=300) # :yields: theFileDialog
67
67
  end
68
68
 
69
- # Construct a free-floating file dialog box
70
- def initialize(app, name, opts=0, x=0, y=0, w=500, h=300) # :yields: theFileDialog
71
- end
72
-
73
69
  #
74
70
  # Change the list of file patterns shown in the file dialog.
75
71
  # The _patterns_ argument is an array of strings, and each string
@@ -84,24 +84,17 @@ module Fox
84
84
  def FXFileDict.defaultFileBinding(); end
85
85
 
86
86
  #
87
- # Construct a dictionary mapping file-extension to file associations,
88
- # using the application registry settings as a source for the bindings.
89
- #
90
- def initialize(app); end
91
-
92
- #
93
- # Construct a dictionary mapping file-extension to file associations,
94
- # using the specified settings database as a source for the bindings.
87
+ # Construct a dictionary that maps file extensions to file associations.
88
+ # If _db_ is not +nil+, the specified settings database is used as a
89
+ # source for the bindings.
90
+ # Otherwise, the application registry settings are used.
95
91
  #
96
92
  # ==== Parameters:
97
93
  #
98
94
  # +app+: Application [FXApp]
99
95
  # +db+:: Settings database [FXSettings]
100
96
  #
101
- def initialize(app, db); end
102
- return new FXRbFileDict(a,db);
103
- }
104
- }
97
+ def initialize(app, db=nil); end
105
98
 
106
99
  #
107
100
  # Replace file association for the specified extension;
@@ -14,12 +14,11 @@ module Fox
14
14
  # The visual [FXGLVisual]
15
15
  attr_reader :visual
16
16
 
17
- # Construct an OpenGL context with its own private display list.
18
- def initialize(anApp, aVisual) # :yields: theGLContext
19
- end
20
-
21
- # Construct an OpenGL context sharing display lists with an existing GL context.
22
- def initialize(anApp, aVisual, aContext) # :yields: theGLContext
17
+ # Construct an OpenGL context.
18
+ # If _other_ is a reference to an existing FXGLContext, this context will
19
+ # share display lists with that other context.
20
+ # Otherwise, this context will use its own private display list.
21
+ def initialize(app, visual, other=nil) # :yields: theGLContext
23
22
  end
24
23
 
25
24
  # Return +true+ if it is sharing display lists.
@@ -43,16 +43,10 @@ module Fox
43
43
  #
44
44
  def drawshape(viewer); end
45
45
 
46
- #
47
- # Construct with specified origin and options.
48
- #
49
- def initialize(x, y, z, opts) # :yields: theGLShape
50
- end
51
-
52
46
  #
53
47
  # Construct with specified origin, options and front and back materials.
54
48
  #
55
- def initialize(x, y, z, opts, front, back) # :yields: theGLShape
49
+ def initialize(x, y, z, opts, front=nil, back=nil) # :yields: theGLShape
56
50
  end
57
51
 
58
52
  #
@@ -21,16 +21,12 @@ module Fox
21
21
 
22
22
  #
23
23
  # Construct input dialog box with given caption, icon, and prompt text.
24
+ # If _owner_ is a window, the dialog box will float over that window.
25
+ # If _owner_ is the application, the dialog box will be free-floating.
24
26
  #
25
- def initialize(owner, caption, label, ic=nil, opts=INPUTDIALOG_STRING, x=0, y=0, w=0, h=0) # :yields: theInputDialog
27
+ def initialize(owner, caption, label, icon=nil, opts=INPUTDIALOG_STRING, x=0, y=0, w=0, h=0) # :yields: theInputDialog
26
28
  end
27
29
 
28
- #
29
- # Construct free-floating input dialog box with given caption, icon, and prompt text.
30
- #
31
- def initialize(anApp, caption, label, ic=nil, opts=INPUTDIALOG_STRING, x=0, y=0, w=0, h=0) # :yields: theInputDialog
32
- end
33
-
34
30
  #
35
31
  # Change limits (where _lo_ and _hi_ are numbers).
36
32
  #
@@ -33,55 +33,40 @@ module Fox
33
33
  class FXMessageBox < FXDialogBox
34
34
  #
35
35
  # Construct message box with given caption, icon, and message text.
36
+ # If _owner_ is a window, the message box will float over that window.
37
+ # If _owner_ is the application, the message box will be free-floating.
36
38
  #
37
39
  def initialize(owner, caption, text, ic=nil, opts=0, x=0, y=0) # :yields: theMessageBox
38
40
  end
39
-
40
- #
41
- # Construct free-floating message box with given caption, icon, and message text.
42
- #
43
- def initialize(anApp, caption, text, ic=nil, opts=0, x=0, y=0) # :yields: theMessageBox
44
- end
45
41
 
46
42
  #
47
43
  # Show a modal error message; returns one of the return values listed above.
44
+ # If _owner_ is a window, the message box will float over that window.
45
+ # If _owner_ is the application, the message box will be free-floating.
48
46
  #
49
47
  def FXMessageBox.error(owner, opts, caption, message); end
50
48
 
51
- #
52
- # Show a modal error message in a free-floating window; returns one of the return values listed above.
53
- #
54
- def FXMessageBox.error(app, opts, caption, message); end
55
-
56
49
  #
57
50
  # Show a modal warning message; returns one of the return values listed above.
51
+ # If _owner_ is a window, the message box will float over that window.
52
+ # If _owner_ is the application, the message box will be free-floating.
58
53
  #
59
54
  def FXMessageBox.warning(owner, opts, caption, message); end
60
55
 
61
- #
62
- # Show a modal warning message in a free-floating window; returns one of the return values listed above.
63
- #
64
- def FXMessageBox.warning(app, opts, caption, message); end
65
-
66
56
  #
67
57
  # Show a modal question dialog; returns one of the return values listed above.
58
+ # If _owner_ is a window, the message box will float over that window.
59
+ # If _owner_ is the application, the message box will be free-floating.
68
60
  #
69
61
  def FXMessageBox.question(owner, opts, caption, message); end
70
62
 
71
- #
72
- # Show a modal question dialog in a free-floating window; returns one of the return values listed above.
73
- #
74
- def FXMessageBox.question(app, opts, caption, message); end
75
-
76
63
  #
77
64
  # Show a modal information dialog; returns one of the return values listed above.
65
+ # If _owner_ is a window, the message box will float over that window.
66
+ # If _owner_ is the application, the message box will be free-floating.
78
67
  #
79
68
  def FXMessageBox.information(owner, opts, caption, message); end
80
69
 
81
- #
82
- # Show a modal information dialog in a free-floating window; returns one of the return values listed above.
83
- #
84
- def FXMessageBox.information(app, opts, caption, message); end
85
70
  end
86
71
  end
87
72
 
@@ -20,11 +20,7 @@ module Fox
20
20
  attr_accessor :delay
21
21
 
22
22
  # Construct splash window
23
- def initialize(app, ic, opts=SPLASH_SIMPLE, ms=5000) # :yields: theSplashWindow
24
- end
25
-
26
- # Construct splash window
27
- def initialize(ow, ic, opts=SPLASH_SIMPLE, ms=5000) # :yields: theSplashWindow
23
+ def initialize(owner, icon, opts=SPLASH_SIMPLE, ms=5000) # :yields: theSplashWindow
28
24
  end
29
25
  end
30
26
  end
@@ -30,7 +30,7 @@ module Fox
30
30
  # <tt>text3</tt>:: the text for this tri-state button's third state [String]
31
31
  # <tt>icon1</tt>:: the icon, if any, for this tri-state button's first state [FXIcon]
32
32
  # <tt>icon2</tt>:: the icon, if any, for this tri-state button's second state [FXIcon]
33
- # <tt>icon3</tt>:: the icon, if any, for this tri-state button's second state [FXIcon]
33
+ # <tt>icon3</tt>:: the icon, if any, for this tri-state button's third state [FXIcon]
34
34
  # +tgt+:: the message target, if any, for this tri-state button [FXObject]
35
35
  # +sel+:: the message identifier for this tri-state button [Integer]
36
36
  # +opts+:: tri-state button options [Integer]
@@ -35,13 +35,9 @@ module Fox
35
35
  attr_accessor :image
36
36
 
37
37
  #
38
- # Return an initialized, free-floating FXWizard instance.
39
- #
40
- def initialize(a, name, image, opts=DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE, x=0, y=0, w=0, h=0, pl=10, pr=10, pt=10, pb=10, hs=10, vs=10) # :yields: theWizard
41
- end
42
-
43
- #
44
- # Return an initialized, window-owned FXWizard instance.
38
+ # Return an initialized FXWizard instance.
39
+ # If _owner_ is a window, the dialog box will float over that window.
40
+ # If _owner_ is the application, the dialog box will be free-floating.
45
41
  #
46
42
  def initialize(owner, name, image, opts=DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE, x=0, y=0, w=0, h=0, pl=10, pr=10, pt=10, pb=10, hs=10, vs=10) # :yields: theWizard
47
43
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: fxruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.6.2
7
- date: 2006-09-14 00:00:00 -05:00
6
+ version: 1.6.3
7
+ date: 2006-10-27 00:00:00 -05:00
8
8
  summary: FXRuby is the Ruby binding to the FOX GUI toolkit.
9
9
  require_paths:
10
10
  - ext/fox16
@@ -140,6 +140,7 @@ files:
140
140
  - examples/styledtext.rb
141
141
  - examples/tabbook.rb
142
142
  - examples/table.rb
143
+ - examples/unicode.rb
143
144
  - examples/icons/backview.png
144
145
  - examples/icons/big.png
145
146
  - examples/icons/bigfolder.png
@@ -226,6 +227,7 @@ files:
226
227
  - lib/fox16/irb.rb
227
228
  - lib/fox16/iterators.rb
228
229
  - lib/fox16/keys.rb
230
+ - lib/fox16/kwargs.rb
229
231
  - lib/fox16/missingdep.rb
230
232
  - lib/fox16/pseudokeyboard.rb
231
233
  - lib/fox16/pseudomouse.rb