fxruby 1.6.20 → 1.6.22.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/.gemtest +0 -0
  2. data/README.txt +2 -1
  3. data/Rakefile +43 -35
  4. data/TODO +4 -4
  5. data/doap.rdf +2 -2
  6. data/ext/fox16/FXRbDataTarget.cpp +2 -2
  7. data/ext/fox16/FXRuby.cpp +31 -96
  8. data/ext/fox16/core_wrap.cpp +5 -1
  9. data/ext/fox16/dialogs_wrap.cpp +4 -4
  10. data/ext/fox16/extconf.rb +15 -7
  11. data/ext/fox16/frames_wrap.cpp +1 -1
  12. data/ext/fox16/fx3d_wrap.cpp +1 -1
  13. data/ext/fox16/iconlist_wrap.cpp +2 -2
  14. data/ext/fox16/include/FXRbApp.h +2 -2
  15. data/ext/fox16/include/FXRbCommon.h +2 -0
  16. data/ext/fox16/list_wrap.cpp +3 -3
  17. data/ext/fox16/markfuncs.cpp +1 -0
  18. data/ext/fox16/treelist_wrap.cpp +2 -2
  19. data/ext/fox16/ui_wrap.cpp +3 -3
  20. data/lib/fox16/accel_table.rb +16 -3
  21. data/lib/fox16/bitmapview.rb +7 -8
  22. data/lib/fox16/core.rb +5 -5
  23. data/lib/fox16/kwargs.rb +877 -879
  24. data/lib/fox16/scintilla.rb +1321 -45
  25. data/lib/fox16/version.rb +1 -1
  26. data/scripts/generate_kwargs_lib.rb +2 -4
  27. data/swig-interfaces/FXMemoryStream.i +9 -5
  28. data/swig-interfaces/ruby-typemaps.i +4 -4
  29. data/test/TC_FXAccelTable.rb +2 -2
  30. data/test/TC_FXApp.rb +48 -2
  31. data/test/TC_FXArc.rb +2 -2
  32. data/test/TC_FXBMPIcon.rb +2 -2
  33. data/test/TC_FXBMPImage.rb +2 -2
  34. data/test/TC_FXButton.rb +2 -2
  35. data/test/TC_FXCheckButton.rb +2 -2
  36. data/test/TC_FXComboBox.rb +2 -2
  37. data/test/TC_FXDC.rb +2 -2
  38. data/test/TC_FXDCPrint.rb +6 -5
  39. data/test/TC_FXDCWindow.rb +5 -3
  40. data/test/TC_FXDataTarget.rb +2 -2
  41. data/test/TC_FXDialogBox.rb +2 -2
  42. data/test/TC_FXDirList.rb +2 -2
  43. data/test/TC_FXExtentd.rb +2 -2
  44. data/test/TC_FXExtentf.rb +2 -2
  45. data/test/TC_FXFileAssoc.rb +2 -2
  46. data/test/TC_FXFileStream.rb +2 -2
  47. data/test/TC_FXFoldingList.rb +2 -2
  48. data/test/TC_FXFont.rb +2 -2
  49. data/test/TC_FXFontDesc.rb +2 -2
  50. data/test/TC_FXGLGroup.rb +2 -2
  51. data/test/TC_FXGLShape.rb +2 -2
  52. data/test/TC_FXGLViewer.rb +2 -2
  53. data/test/TC_FXGradientBar.rb +2 -2
  54. data/test/TC_FXHeader.rb +2 -2
  55. data/test/TC_FXHiliteStyle.rb +2 -2
  56. data/test/TC_FXIconDict.rb +2 -2
  57. data/test/TC_FXIconList.rb +2 -2
  58. data/test/TC_FXId.rb +2 -2
  59. data/test/TC_FXImage.rb +2 -2
  60. data/test/TC_FXLight.rb +2 -2
  61. data/test/TC_FXList.rb +2 -2
  62. data/test/TC_FXListBox.rb +2 -2
  63. data/test/TC_FXMainWindow.rb +2 -2
  64. data/test/TC_FXMat4f.rb +2 -2
  65. data/test/TC_FXMaterial.rb +2 -16
  66. data/test/TC_FXMemoryStream.rb +6 -6
  67. data/test/TC_FXMenuCheck.rb +2 -2
  68. data/test/TC_FXMenuCommand.rb +2 -2
  69. data/test/TC_FXMenuRadio.rb +7 -7
  70. data/test/TC_FXMessageBox.rb +2 -2
  71. data/test/TC_FXPoint.rb +2 -2
  72. data/test/TC_FXQuatf.rb +2 -2
  73. data/test/TC_FXRadioButton.rb +2 -2
  74. data/test/TC_FXRanged.rb +2 -2
  75. data/test/TC_FXRangef.rb +2 -2
  76. data/test/TC_FXRectangle.rb +2 -2
  77. data/test/TC_FXRegion.rb +2 -2
  78. data/test/TC_FXRegistry.rb +2 -2
  79. data/test/TC_FXScrollArea.rb +2 -2
  80. data/test/TC_FXScrollWindow.rb +2 -2
  81. data/test/TC_FXSegment.rb +2 -2
  82. data/test/TC_FXSettings.rb +2 -2
  83. data/test/TC_FXShell.rb +2 -2
  84. data/test/TC_FXSize.rb +2 -2
  85. data/test/TC_FXStream.rb +2 -2
  86. data/test/TC_FXTable.rb +47 -47
  87. data/test/TC_FXTableItem.rb +4 -4
  88. data/test/TC_FXText.rb +4 -4
  89. data/test/TC_FXTopWindow.rb +2 -2
  90. data/test/TC_FXTreeList.rb +2 -2
  91. data/test/TC_FXTreeListBox.rb +2 -2
  92. data/test/TC_FXUndoList.rb +3 -3
  93. data/test/TC_FXVec2d.rb +2 -2
  94. data/test/TC_FXVec2f.rb +2 -2
  95. data/test/TC_FXVec3d.rb +2 -2
  96. data/test/TC_FXVec3f.rb +2 -2
  97. data/test/TC_FXVec4f.rb +2 -2
  98. data/test/TC_FXViewport.rb +2 -2
  99. data/test/TC_FXXBMIcon.rb +2 -2
  100. data/test/TC_FXXBMImage.rb +2 -2
  101. data/test/TC_FXXPMIcon.rb +2 -2
  102. data/test/TC_FXXPMImage.rb +2 -2
  103. data/test/TC_downcast.rb +2 -2
  104. metadata +112 -77
@@ -1,9 +1,9 @@
1
1
  require 'test/unit'
2
2
  require 'fox16'
3
3
 
4
- include Fox
5
-
6
4
  class TC_FXRegistry < Test::Unit::TestCase
5
+ include Fox
6
+
7
7
  def setup
8
8
  @reg = FXRegistry.new("TC_FXRegistry", "FXRuby")
9
9
  end
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
  require 'fox16'
3
3
  require 'testcase'
4
4
 
5
- include Fox
5
+ class TC_FXScrollArea < Fox::TestCase
6
+ include Fox
6
7
 
7
- class TC_FXScrollArea < TestCase
8
8
  def setup
9
9
  super(self.class.name)
10
10
  @scrollArea = FXScrollArea.new(mainWindow)
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
  require 'fox16'
3
3
  require 'testcase'
4
4
 
5
- include Fox
5
+ class TC_FXScrollWindow < Fox::TestCase
6
+ include Fox
6
7
 
7
- class TC_FXScrollWindow < TestCase
8
8
  def setup
9
9
  super(self.class.name)
10
10
  @scrollWindow = FXScrollWindow.new(mainWindow)
data/test/TC_FXSegment.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'test/unit'
2
2
  require 'fox16'
3
3
 
4
- include Fox
5
-
6
4
  class TC_FXSegment < Test::Unit::TestCase
5
+ include Fox
6
+
7
7
  def test_new
8
8
  aSeg = FXSegment.new
9
9
  assert_equal(0, aSeg.x1)
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
  require 'fox16'
3
3
  require 'testcase'
4
4
 
5
- include Fox
5
+ class TC_FXSettings < Fox::TestCase
6
+ include Fox
6
7
 
7
- class TC_FXSettings < TestCase
8
8
 
9
9
  def setup
10
10
  super(self.class.name)
data/test/TC_FXShell.rb CHANGED
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
 
3
3
  require 'fox16'
4
4
 
5
- include Fox
6
-
7
5
  class TC_FXShell < Test::Unit::TestCase
6
+ include Fox
7
+
8
8
  def setup
9
9
  if FXApp.instance.nil?
10
10
  @app = FXApp.new('TC_FXShell', 'FXRuby')
data/test/TC_FXSize.rb CHANGED
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
 
3
3
  require 'fox16'
4
4
 
5
- include Fox
6
-
7
5
  class TC_FXSize < Test::Unit::TestCase
6
+ include Fox
7
+
8
8
  def setup
9
9
  @size1 = FXSize.new
10
10
  @size2 = FXSize.new(300, 200)
data/test/TC_FXStream.rb CHANGED
@@ -2,9 +2,9 @@ require 'test/unit'
2
2
  require 'fox16'
3
3
  require 'testcase'
4
4
 
5
- include Fox
5
+ class TC_FXStream < Fox::TestCase
6
+ include Fox
6
7
 
7
- class TC_FXStream < TestCase
8
8
  def setup
9
9
  super(self.class.name)
10
10
  end
data/test/TC_FXTable.rb CHANGED
@@ -2,12 +2,10 @@ require 'test/unit'
2
2
  require 'testcase'
3
3
  require 'fox16'
4
4
 
5
- include Fox
6
-
7
5
  class OverrideError < Exception
8
6
  end
9
7
 
10
- class CustomTable < FXTable
8
+ class CustomTable < Fox::FXTable
11
9
  def setColumnWidth(col, cwidth)
12
10
  raise OverrideError
13
11
  end
@@ -25,7 +23,9 @@ class CustomTable < FXTable
25
23
  end
26
24
  end
27
25
 
28
- class TC_FXTable < TestCase
26
+ class TC_FXTable < Fox::TestCase
27
+ include Fox
28
+
29
29
 
30
30
  private
31
31
 
@@ -39,13 +39,13 @@ private
39
39
  item = nil
40
40
  nr = @table.numRows
41
41
  nc = @table.numColumns
42
-
42
+
43
43
  (1..nc-2).each { |c|
44
44
  item = @table.getItem(nr-1, c)
45
45
  item.button = false
46
46
  item.justify = FXTableItem::RIGHT
47
47
  }
48
-
48
+
49
49
  unless extending
50
50
  (1..nr-2).each { |r|
51
51
  item = @table.getItem(r, nc-1)
@@ -161,7 +161,7 @@ private
161
161
  end
162
162
 
163
163
  public
164
-
164
+
165
165
  def setup
166
166
  super(self.class.name)
167
167
  @table = FXTable.new(mainWindow)
@@ -174,7 +174,7 @@ public
174
174
  100.times { loadLog } # this should be enough to do it
175
175
  end
176
176
  =end
177
-
177
+
178
178
  def test_getCellColor
179
179
  assert_nothing_raised {
180
180
  @table.getCellColor(0, 0)
@@ -232,7 +232,7 @@ public
232
232
  @table.setCellColor(0, 2, FXRGB(0, 0, 0))
233
233
  }
234
234
  end
235
-
235
+
236
236
  def test_updateRange
237
237
  @table.setTableSize(5, 5)
238
238
  assert_nothing_raised {
@@ -251,7 +251,7 @@ public
251
251
  @table.updateRange(0, 0, 0, 5) # endCol >= numColumns
252
252
  }
253
253
  end
254
-
254
+
255
255
  def test_insertRows
256
256
  @table.setTableSize(5, 5)
257
257
  assert_nothing_raised {
@@ -283,7 +283,7 @@ public
283
283
  @table.insertColumns(@table.numColumns+1) # column > numColumns
284
284
  }
285
285
  end
286
-
286
+
287
287
  def test_removeRows
288
288
  @table.setTableSize(8, 5)
289
289
  assert_raises(IndexError) {
@@ -299,7 +299,7 @@ public
299
299
  @table.removeRows(@table.numRows)
300
300
  }
301
301
  end
302
-
302
+
303
303
  def test_removeColumns
304
304
  @table.setTableSize(5, 8)
305
305
  assert_raises(IndexError) {
@@ -331,7 +331,7 @@ public
331
331
  @table.getColumnX(5)
332
332
  }
333
333
  end
334
-
334
+
335
335
  def test_getRowY
336
336
  @table.setTableSize(5, 5)
337
337
  assert_raises(IndexError) {
@@ -356,7 +356,7 @@ public
356
356
  @table.setItemText(1, 1, "(1, 1)")
357
357
  assert_equal("(0, 0)\t(0, 1)\n(1, 0)\t(1, 1)\n", @table.extractText(0, 1, 0, 1))
358
358
  end
359
-
359
+
360
360
  def test_overlayText
361
361
  @table.setTableSize(2, 2)
362
362
  @table.overlayText(0, 1, 0, 1, "(0, 0)\t(0, 1)\n(1, 0)\t(1, 1)\n")
@@ -365,196 +365,196 @@ public
365
365
  assert_equal("(1, 0)", @table.getItemText(1, 0))
366
366
  assert_equal("(1, 1)", @table.getItemText(1, 1))
367
367
  end
368
-
368
+
369
369
  def test_set_column_icon_negative_index_raises_index_error
370
370
  assert_raises(IndexError) {
371
- @table.setColumnIcon(-1, nil)
371
+ @table.setColumnIcon(-1, nil)
372
372
  }
373
373
  end
374
374
 
375
375
  def test_set_column_icon_large_index_raises_index_error
376
376
  assert_raises(IndexError) {
377
- @table.setColumnIcon(@table.numColumns, nil)
377
+ @table.setColumnIcon(@table.numColumns, nil)
378
378
  }
379
379
  end
380
380
 
381
381
  def test_get_column_icon_negative_index_raises_index_error
382
382
  assert_raises(IndexError) {
383
- @table.getColumnIcon(-1)
383
+ @table.getColumnIcon(-1)
384
384
  }
385
385
  end
386
386
 
387
387
  def test_get_column_icon_large_index_raises_index_error
388
388
  assert_raises(IndexError) {
389
- @table.getColumnIcon(@table.numColumns)
389
+ @table.getColumnIcon(@table.numColumns)
390
390
  }
391
391
  end
392
392
 
393
393
  def test_set_column_icon_position_negative_index_raises_index_error
394
394
  assert_raises(IndexError) {
395
- @table.setColumnIconPosition(-1, 0)
395
+ @table.setColumnIconPosition(-1, 0)
396
396
  }
397
397
  end
398
398
 
399
399
  def test_set_column_icon_position_large_index_raises_index_error
400
400
  assert_raises(IndexError) {
401
- @table.setColumnIconPosition(@table.numColumns, 0)
401
+ @table.setColumnIconPosition(@table.numColumns, 0)
402
402
  }
403
403
  end
404
404
 
405
405
  def test_get_column_icon_position_negative_index_raises_index_error
406
406
  assert_raises(IndexError) {
407
- @table.getColumnIconPosition(-1)
407
+ @table.getColumnIconPosition(-1)
408
408
  }
409
409
  end
410
410
 
411
411
  def test_get_column_icon_position_large_index_raises_index_error
412
412
  assert_raises(IndexError) {
413
- @table.getColumnIconPosition(@table.numColumns)
413
+ @table.getColumnIconPosition(@table.numColumns)
414
414
  }
415
415
  end
416
416
 
417
417
  def test_set_column_justify_negative_index_raises_index_error
418
418
  assert_raises(IndexError) {
419
- @table.setColumnJustify(-1, 0)
419
+ @table.setColumnJustify(-1, 0)
420
420
  }
421
421
  end
422
422
 
423
423
  def test_set_column_justify_large_index_raises_index_error
424
424
  assert_raises(IndexError) {
425
- @table.setColumnJustify(@table.numColumns, 0)
425
+ @table.setColumnJustify(@table.numColumns, 0)
426
426
  }
427
427
  end
428
428
 
429
429
  def test_get_column_justify_negative_index_raises_index_error
430
430
  assert_raises(IndexError) {
431
- @table.getColumnJustify(-1)
431
+ @table.getColumnJustify(-1)
432
432
  }
433
433
  end
434
434
 
435
435
  def test_get_column_justify_large_index_raises_index_error
436
436
  assert_raises(IndexError) {
437
- @table.getColumnJustify(@table.numColumns)
437
+ @table.getColumnJustify(@table.numColumns)
438
438
  }
439
439
  end
440
440
 
441
441
  def test_set_column_text_negative_index_raises_index_error
442
442
  assert_raises(IndexError) {
443
- @table.setColumnText(-1, "")
443
+ @table.setColumnText(-1, "")
444
444
  }
445
445
  end
446
446
 
447
447
  def test_set_column_text_large_index_raises_index_error
448
448
  assert_raises(IndexError) {
449
- @table.setColumnText(@table.numColumns, "")
449
+ @table.setColumnText(@table.numColumns, "")
450
450
  }
451
451
  end
452
452
 
453
453
  def test_get_column_text_negative_index_raises_index_error
454
454
  assert_raises(IndexError) {
455
- @table.getColumnText(-1)
455
+ @table.getColumnText(-1)
456
456
  }
457
457
  end
458
458
 
459
459
  def test_get_column_text_large_index_raises_index_error
460
460
  assert_raises(IndexError) {
461
- @table.getColumnText(@table.numColumns)
461
+ @table.getColumnText(@table.numColumns)
462
462
  }
463
463
  end
464
464
 
465
465
  def test_set_row_icon_negative_index_raises_index_error
466
466
  assert_raises(IndexError) {
467
- @table.setRowIcon(-1, nil)
467
+ @table.setRowIcon(-1, nil)
468
468
  }
469
469
  end
470
470
 
471
471
  def test_set_row_icon_large_index_raises_index_error
472
472
  assert_raises(IndexError) {
473
- @table.setRowIcon(@table.numRows, nil)
473
+ @table.setRowIcon(@table.numRows, nil)
474
474
  }
475
475
  end
476
476
 
477
477
  def test_get_row_icon_negative_index_raises_index_error
478
478
  assert_raises(IndexError) {
479
- @table.getRowIcon(-1)
479
+ @table.getRowIcon(-1)
480
480
  }
481
481
  end
482
482
 
483
483
  def test_get_row_icon_large_index_raises_index_error
484
484
  assert_raises(IndexError) {
485
- @table.getRowIcon(@table.numRows)
485
+ @table.getRowIcon(@table.numRows)
486
486
  }
487
487
  end
488
488
 
489
489
  def test_set_row_icon_position_negative_index_raises_index_error
490
490
  assert_raises(IndexError) {
491
- @table.setRowIconPosition(-1, 0)
491
+ @table.setRowIconPosition(-1, 0)
492
492
  }
493
493
  end
494
494
 
495
495
  def test_set_row_icon_position_large_index_raises_index_error
496
496
  assert_raises(IndexError) {
497
- @table.setRowIconPosition(@table.numRows, 0)
497
+ @table.setRowIconPosition(@table.numRows, 0)
498
498
  }
499
499
  end
500
500
 
501
501
  def test_get_row_icon_position_negative_index_raises_index_error
502
502
  assert_raises(IndexError) {
503
- @table.getRowIconPosition(-1)
503
+ @table.getRowIconPosition(-1)
504
504
  }
505
505
  end
506
506
 
507
507
  def test_get_row_icon_position_large_index_raises_index_error
508
508
  assert_raises(IndexError) {
509
- @table.getRowIconPosition(@table.numRows)
509
+ @table.getRowIconPosition(@table.numRows)
510
510
  }
511
511
  end
512
512
 
513
513
  def test_set_row_justify_negative_index_raises_index_error
514
514
  assert_raises(IndexError) {
515
- @table.setRowJustify(-1, 0)
515
+ @table.setRowJustify(-1, 0)
516
516
  }
517
517
  end
518
518
 
519
519
  def test_set_row_justify_large_index_raises_index_error
520
520
  assert_raises(IndexError) {
521
- @table.setRowJustify(@table.numRows, 0)
521
+ @table.setRowJustify(@table.numRows, 0)
522
522
  }
523
523
  end
524
524
 
525
525
  def test_get_row_justify_negative_index_raises_index_error
526
526
  assert_raises(IndexError) {
527
- @table.getRowJustify(-1)
527
+ @table.getRowJustify(-1)
528
528
  }
529
529
  end
530
530
 
531
531
  def test_get_row_justify_large_index_raises_index_error
532
532
  assert_raises(IndexError) {
533
- @table.getRowJustify(@table.numRows)
533
+ @table.getRowJustify(@table.numRows)
534
534
  }
535
535
  end
536
536
 
537
537
  def test_set_row_text_negative_index_raises_index_error
538
538
  assert_raises(IndexError) {
539
- @table.setRowText(-1, "")
539
+ @table.setRowText(-1, "")
540
540
  }
541
541
  end
542
542
 
543
543
  def test_set_row_text_large_index_raises_index_error
544
544
  assert_raises(IndexError) {
545
- @table.setRowText(@table.numRows, "")
545
+ @table.setRowText(@table.numRows, "")
546
546
  }
547
547
  end
548
548
 
549
549
  def test_get_row_text_negative_index_raises_index_error
550
550
  assert_raises(IndexError) {
551
- @table.getRowText(-1)
551
+ @table.getRowText(-1)
552
552
  }
553
553
  end
554
554
 
555
555
  def test_get_row_text_large_index_raises_index_error
556
556
  assert_raises(IndexError) {
557
- @table.getRowText(@table.numRows)
557
+ @table.getRowText(@table.numRows)
558
558
  }
559
559
  end
560
560
 
@@ -2,12 +2,10 @@ require 'test/unit'
2
2
  require 'testcase'
3
3
  require 'fox16'
4
4
 
5
- include Fox
6
-
7
5
  class OverrideError < Exception
8
6
  end
9
7
 
10
- class CustomTableItem < FXTableItem
8
+ class CustomTableItem < Fox::FXTableItem
11
9
  def getText
12
10
  raise OverrideError
13
11
  end
@@ -16,7 +14,9 @@ class CustomTableItem < FXTableItem
16
14
  end
17
15
  end
18
16
 
19
- class TC_FXTableItem < TestCase
17
+ class TC_FXTableItem < Fox::TestCase
18
+ include Fox
19
+
20
20
  def setup
21
21
  super(self.class.name)
22
22
  @table = FXTable.new(mainWindow)