Codebase list ruby-fxruby / ddfc60e swig-interfaces / macros.i
ddfc60e

Tree @ddfc60e (Download .tar.gz)

macros.i @ddfc60eraw · history · blame

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
/***********************************************************************
 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
 * Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * For further information please contact the author by e-mail
 * at "[email protected]".
 ***********************************************************************/

%define DECLARE_FXAPP_VIRTUALS(klass)
%extend klass {
  /// Create application's windows
  virtual void create();

  /// Destroy application's windows
  virtual void destroy();

  /// Detach application's windows
  virtual void detach();

  /**
   * Initialize application.
   * Parses and removes common command line arguments, reads the registry.
   * Finally, if connect is TRUE, it opens the display.
   */
  virtual void init(VALUE arr,bool connect=true);

  /**
   * Exit application.
   * Closes the display and writes the registry.
   */
  virtual void exit(FXint code=0);
  }
%enddef

%define DECLARE_FXBITMAP_VIRTUALS(klass)
%extend klass {
   /**
  * Retrieves pixels from the server-side bitmap.
  */
  virtual void restore();

  /// Render pixels
  virtual void render();

  /// Release the client-side pixels buffer, freeing it if it was owned.
  virtual void release();

  /// Save pixel data only
  virtual bool savePixels(FXStream& store) const;

  /// Load pixel data
  virtual bool loadPixels(FXStream& store);

  /// Rescale pixels to the specified width and height
  virtual void scale(FXint w,FXint h);

  /// Mirror bitmap horizontally and/or vertically
  virtual void mirror(FXbool horizontal,FXbool vertical);

  /// Rotate bitmap by degrees ccw
  virtual void rotate(FXint degrees);

  /// Crop bitmap to given rectangle
  virtual void crop(FXint x,FXint y,FXint w,FXint h,FXbool color=0);

  /// Fill bitmap with uniform value
  virtual void fill(FXbool color);

  /**
  * Populate the bitmap with new pixel data of the same size; it will assume
  * ownership of the pixel data if image BITMAP_OWNED option is passed.
  * The server-side representation of the image, if it exists, is not updated.
  * This can be done by calling render().
  */
  virtual void setData(FXuchar *pix,FXuint opts=0);

  /**
  * Populate the bitmap with new pixel data of a new size; it will assume ownership
  * of the pixel data if image BITMAP_OWNED option is passed.  The size of the server-
  * side representation of the image, if it exists, is adjusted but the contents are
  * not updated yet. This can be done by calling render().
  */
  virtual void setData(FXuchar *pix,FXuint opts,FXint w,FXint h);
  }
%enddef

%define DECLARE_FXCURSOR_VIRTUALS(klass)
%extend klass {
  /// Save pixel data only
  virtual bool savePixels(FXStream& store) const;

  /// Load pixel data
  virtual bool loadPixels(FXStream& store);
  }
%enddef

%define DECLARE_FXDC_VIRTUALS(klass)
%extend klass {
  /// Read back pixel
  virtual FXColor readPixel(FXint x,FXint y);

  /// Draw points
  virtual void drawPoint(FXint x,FXint y);
  virtual void drawPoints(const FXPoint* points,FXuint npoints);
  virtual void drawPointsRel(const FXPoint* points,FXuint npoints);

  /// Draw lines
  virtual void drawLine(FXint x1,FXint y1,FXint x2,FXint y2);
  virtual void drawLines(const FXPoint* points,FXuint npoints);
  virtual void drawLinesRel(const FXPoint* points,FXuint npoints);
  virtual void drawLineSegments(const FXSegment* segments,FXuint nsegments);

  /// Draw rectangles
  virtual void drawRectangle(FXint x,FXint y,FXint w,FXint h);
  virtual void drawRectangles(const FXRectangle* rectangles,FXuint nrectangles);

  /// Draw rounded rectangle with ellipse with ew and ellips height eh
  virtual void drawRoundRectangle(FXint x,FXint y,FXint w,FXint h,FXint ew,FXint eh);

  /**
  * Draw arcs.
  * The argument ang1 specifies the start of the arc relative to the
  * three-o'clock position from the center, in units of degrees*64.
  * The argument ang2 specifies the path and extent of the arc relative
  * to the start of the arc, in units of degrees*64.
  * The arguments x,y,w,h specify the bounding rectangle.
  */
  virtual void drawArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2);
  virtual void drawArcs(const FXArc* arcs,FXuint narcs);

  /// Draw ellipse
  virtual void drawEllipse(FXint x,FXint y,FXint w,FXint h);

  /// Filled rectangles
  virtual void fillRectangle(FXint x,FXint y,FXint w,FXint h);
  virtual void fillRectangles(const FXRectangle* rectangles,FXuint nrectangles);

  /// Draw filled rounded rectangle with ellipse with ew and ellips height eh
  virtual void fillRoundRectangle(FXint x,FXint y,FXint w,FXint h,FXint ew,FXint eh);

  /// Draw chords
  virtual void fillChord(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2);
  virtual void fillChords(const FXArc* chord,FXuint nchords);

  /// Draw arcs
  virtual void fillArc(FXint x,FXint y,FXint w,FXint h,FXint ang1,FXint ang2);
  virtual void fillArcs(const FXArc* arcs,FXuint narcs);

  /// Filled polygon
  virtual void fillPolygon(const FXPoint* points,FXuint npoints);
  virtual void fillConcavePolygon(const FXPoint* points,FXuint npoints);
  virtual void fillComplexPolygon(const FXPoint* points,FXuint npoints);

  /// Filled polygon with relative points
  virtual void fillPolygonRel(const FXPoint* points,FXuint npoints);
  virtual void fillConcavePolygonRel(const FXPoint* points,FXuint npoints);
  virtual void fillComplexPolygonRel(const FXPoint* points,FXuint npoints);

  /// Draw hashed box
  virtual void drawHashBox(FXint x,FXint y,FXint w,FXint h,FXint b=1);

  /// Draw focus rectangle
  virtual void drawFocusRectangle(FXint x,FXint y,FXint w,FXint h);

  /// Draw area from source
  virtual void drawArea(const FXDrawable* source,FXint sx,FXint sy,FXint sw,FXint sh,FXint dx,FXint dy);

  /// Draw stretched area from source
  virtual void drawArea(const FXDrawable* source,FXint sx,FXint sy,FXint sw,FXint sh,FXint dx,FXint dy,FXint dw,FXint dh);

  /// Draw image
  virtual void drawImage(const FXImage* image,FXint dx,FXint dy);

  /// Draw bitmap
  virtual void drawBitmap(const FXBitmap* bitmap,FXint dx,FXint dy);

  /// Draw icon
  virtual void drawIcon(const FXIcon* icon,FXint dx,FXint dy);
  virtual void drawIconShaded(const FXIcon* icon,FXint dx,FXint dy);
  virtual void drawIconSunken(const FXIcon* icon,FXint dx,FXint dy);

  /// Draw string
  // virtual void drawText(FXint x,FXint y,const FXString& string);
  virtual void drawText(FXint x,FXint y,const FXchar* string,FXuint length);
  // virtual void drawImageText(FXint x,FXint y,const FXString& string);
  virtual void drawImageText(FXint x,FXint y,const FXchar* string,FXuint length);

  /// Set foreground drawing color
  virtual void setForeground(FXColor clr);

  /// Set background drawing color
  virtual void setBackground(FXColor clr);

  /**
  * Set dash pattern and dash offset.
  * A dash pattern of [1 2 3 4] is a repeating pattern of 1 foreground pixel,
  * 2 background pixels, 3 foreground pixels, and 4 background pixels.
  * The offset is where in the pattern the system will start counting.
  * The maximum length of the dash pattern is 32.
  */
  virtual void setDashes(FXuint dashoffset,const FXchar *dashpattern,FXuint dashlength);

  /// Set line width:- 0 means thinnest/fastest possible
  virtual void setLineWidth(FXuint linewidth=0);

  /// Set line cap style
  virtual void setLineCap(FXCapStyle capstyle=CAP_BUTT);

  /// Set line join style
  virtual void setLineJoin(FXJoinStyle joinstyle=JOIN_MITER);

  /// Set line style
  virtual void setLineStyle(FXLineStyle linestyle=LINE_SOLID);

  /// Set fill style
  virtual void setFillStyle(FXFillStyle fillstyle=FILL_SOLID);

  /// Set fill rule
  virtual void setFillRule(FXFillRule fillrule=RULE_EVEN_ODD);

  /// Set rasterop function
  virtual void setFunction(FXFunction func=BLT_SRC);

  /// Set the tile image
  virtual void setTile(FXImage* image,FXint dx=0,FXint dy=0);

  /// Set the stipple pattern
  virtual void setStipple(FXBitmap *bitmap,FXint dx=0,FXint dy=0);

  /// Set the stipple pattern
  virtual void setStipple(FXStipplePattern pat,FXint dx=0,FXint dy=0);

  /// Set clip region
  virtual void setClipRegion(const FXRegion& region);

  /// Set clip rectangle
  virtual void setClipRectangle(FXint x,FXint y,FXint w,FXint h);

  /// Change clip rectangle
  virtual void setClipRectangle(const FXRectangle& rectangle);

  /// Clear clipping
  virtual void clearClipRectangle();

  /// Set clip mask
  virtual void setClipMask(FXBitmap* bitmap,FXint dx=0,FXint dy=0);

  /// Clear clip mask
  virtual void clearClipMask();

  /// Set font to draw text with
  virtual void setFont(FXFont *fnt);

  /// Clip against child windows
  virtual void clipChildren(FXbool yes);
  }
%enddef

%define DECLARE_FXDIALOGBOX_VIRTUALS(klass)
%extend klass {
  /// Run modal invocation of the dialog
  virtual FXuint execute(FXuint placement=PLACEMENT_CURSOR);
  }
%enddef

%define DECLARE_FXDOCKBAR_VIRTUALS(klass)
%extend klass {
  /**
  * Dock the bar against the given side, after some other widget.
  * However, if after is -1, it will be docked as the innermost bar just before
  * the work-area, while if after is 0, if will be docked as the outermost bar.
  */
  virtual void dock(FXDockSite* docksite,FXWindow* before=NULL,FXbool notify=FALSE);

  /**
  * Dock the bar against the given side, near the given position relative
  * to the toolbar dock's origin.
  */
  virtual void dock(FXDockSite* docksite,FXint localx,FXint localy,FXbool notify);

  /**
  * Undock or float the bar.
  * The initial position of the wet dock is a few pixels
  * below and to the right of the original docked position.
  */
  virtual void undock(FXint rootx,FXint rooty,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXDOCKSITE_VIRTUALS(klass)
%extend klass {
  /**
  * Move tool bar, changing its options to suite the new position.
  * Used by the toolbar dragging to rearrange the toolbars inside the
  * toolbar dock.
  */
  virtual void moveToolBar(FXDockBar* bar,FXint barx,FXint bary);

  /**
  * The dock site is notified that the given bar has been added
  * logically before the given window, and is to placed on a new
  * galley all by itself.  The default implementation adjusts
  * the layout options of the bars accordingly.
  */
  virtual void dockToolBar(FXDockBar* bar,FXWindow* before);

  /**
  * The dock site is informed that the given bar has been docked
  * at the given coordinates.  The default implementation determines
  * where to insert the newly docked bar and adjusts the layout
  * options of the bars accordingly.
  */
  virtual void dockToolBar(FXDockBar* bar,FXint barx,FXint bary);

  /**
  * The dock site is informed that the given bar has been removed.
  * In the default implementation, the dock site fixes the layout
  * options of the remaining bars so they stay in the same place
  * if possible.
  */
  virtual void undockToolBar(FXDockBar* bar);
  }
%enddef

%define DECLARE_FXDRAWABLE_VIRTUALS(klass)
%extend klass {
  /// Resize drawable to the specified width and height
  virtual void resize(FXint w,FXint h);
  }
%enddef

%define DECLARE_FXFILEDICT_VIRTUALS(klass)
%extend klass {
  virtual FXFileAssoc* findFileBinding(const FXchar* pathname);
  virtual FXFileAssoc* findDirBinding(const FXchar* pathname);
  virtual FXFileAssoc* findExecBinding(const FXchar* pathname);
  }
%enddef

%define DECLARE_FXFOLDINGITEM_VIRTUALS(klass)
%extend klass {
  virtual void setText(const FXString& txt);
  virtual void setOpenIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setClosedIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setFocus(FXbool focus);
  virtual void setSelected(FXbool selected);
  virtual void setOpened(FXbool opened);
  virtual void setExpanded(FXbool expanded);
  virtual void setEnabled(FXbool enabled);
  virtual void setDraggable(FXbool draggable);
  virtual FXint getWidth(const FXFoldingList* list) const;
  virtual FXint getHeight(const FXFoldingList* list) const;
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXFOLDINGLIST_VIRTUALS(klass)
%extend klass {
  virtual FXFoldingItem *getItemAt(FXint x,FXint y) const;
  virtual void makeItemVisible(FXFoldingItem* item);

  /// Enable item
  virtual FXbool enableItem(FXFoldingItem* item);

  /// Disable item
  virtual FXbool disableItem(FXFoldingItem* item);

  /// Select item
  virtual FXbool selectItem(FXFoldingItem* item,FXbool notify=FALSE);

  /// Deselect item
  virtual FXbool deselectItem(FXFoldingItem* item,FXbool notify=FALSE);

  /// Toggle item selection
  virtual FXbool toggleItem(FXFoldingItem* item,FXbool notify=FALSE);

  /// Extend selection from anchor item to item
  virtual FXbool extendSelection(FXFoldingItem* item,FXbool notify=FALSE);

  /// Deselect all items
  virtual FXbool killSelection(FXbool notify=FALSE);

  /// Open item
  virtual FXbool openItem(FXFoldingItem* item,FXbool notify=FALSE);

  /// Close item
  virtual FXbool closeItem(FXFoldingItem* item,FXbool notify=FALSE);

  /// Collapse tree
  virtual FXbool collapseTree(FXFoldingItem* tree,FXbool notify=FALSE);

  /// Expand tree
  virtual FXbool expandTree(FXFoldingItem* tree,FXbool notify=FALSE);

  /// Change current item
  virtual void setCurrentItem(FXFoldingItem* item,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXFONT_VIRTUALS(klass)
%extend klass {
  /// Change font description
  virtual void setFontDesc(const FXFontDesc& fontdesc);

  /// Set to new angle, in degrees*64 relative to positive x axis
  virtual void setAngle(FXint ang);

  /**
  * Change the font to the specified font description string.
  */
  virtual void setFont(const FXString& string);

  /// Find out if the font is monotype or proportional
  virtual FXbool isFontMono() const;

  %extend {
    /// See if font has glyph for ch
    virtual FXbool hasChar(VALUE ch) const {
      if(TYPE(ch)==T_STRING){
        if(RSTRING_LEN(ch)==1){
          return self->hasChar(*(StringValuePtr(ch))); // FIXME: hasChar() expects an FXwchar
	  }
	else{
	  rb_raise(rb_eArgError,"expected a string of length one");
	  }
        }
      else{
        return self->hasChar(NUM2INT(ch)); // FIXME: hasChar() expects an FXwchar
        }
      }
  }

  /// Get first character glyph in font
  virtual FXwchar getMinChar() const;

  /// Get last character glyph in font
  virtual FXwchar getMaxChar() const;

  /// Left bearing
  virtual FXint leftBearing(FXwchar ch) const;

  /// Right bearing
  virtual FXint rightBearing(FXwchar ch) const;

  /// Width of widest character in font
  virtual FXint getFontWidth() const;

  /// Height of highest character in font
  virtual FXint getFontHeight() const;

  /// Ascent from baseline
  virtual FXint getFontAscent() const;

  /// Descent from baseline
  virtual FXint getFontDescent() const;

  /// Get font leading [that is lead-ing as in Pb!]
  virtual FXint getFontLeading() const;

  /// Get font line spacing
  virtual FXint getFontSpacing() const;

  /// Calculate width of single wide character in this font
  virtual FXint getCharWidth(const FXwchar ch) const;

   /// Calculate width of given text in this font
   virtual FXint getTextWidth(const FXString& string) const;

   /// Calculate height of given text in this font
   virtual FXint getTextHeight(const FXString& string) const;
}
%enddef

%define DECLARE_FXGLCANVAS_VIRTUALS(klass)
%extend klass {
  /// Make OpenGL context current prior to performing OpenGL commands
  virtual FXbool makeCurrent();

  /// Make OpenGL context non current
  virtual FXbool makeNonCurrent();

  /// Return TRUE if context is current
  virtual FXbool isCurrent() const;

  /// Swap front and back buffer
  virtual void swapBuffers();
  }
%enddef

%define DECLARE_FXGLOBJECT_VIRTUALS(klass)
%extend klass {
  /// Clone this object
  virtual FXGLObject* copy();

  /// Called by the viewer to get bounds for this object
  virtual FXRangef bounds();

  /// Draw this object in a viewer
  virtual void draw(FXGLViewer* viewer);

  /// Draw this object for hit-testing purposes
  virtual void hit(FXGLViewer* viewer);

  /// Return true if this object can be dragged around
  virtual FXbool canDrag() const;

  /// Return true if this object can be deleted from the scene
  virtual FXbool canDelete() const;

  /// Drag this object from one position to another
  virtual FXbool drag(FXGLViewer* viewer,FXint fx,FXint fy,FXint tx,FXint ty);
  }
%enddef

%define DECLARE_FXGLSHAPE_VIRTUALS(klass)
%extend klass {
  virtual void drawshape(FXGLViewer*);
  }
%enddef

%define DECLARE_FXGLVIEWER_VIRTUALS(klass)
%extend klass {
  /// Return a NULL-terminated list of all objects in the given rectangle, or NULL
  virtual FXGLObject** select(FXint x,FXint y,FXint w,FXint h);

  /// Perform a pick operation, returning the object at the given x,y position, or NULL
  virtual FXGLObject* pick(FXint x,FXint y);

  /// Change the model bounding box; this adjusts the viewer
  virtual FXbool setBounds(const FXRangef& box);
  }
%enddef

%define DECLARE_FXHEADERITEM_VIRTUALS(klass)
%extend klass {
  virtual void setText(const FXString& txt);
  virtual void setIcon(FXIcon *ic);
  virtual FXint getWidth(const FXHeader* header) const;
  virtual FXint getHeight(const FXHeader* header) const;
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXICONITEM_VIRTUALS(klass)
%extend klass {
  virtual void draw(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual FXint hitItem(const FXIconList* list,FXint rx,FXint ry,FXint rw=1,FXint rh=1) const;
  virtual void drawBigIcon(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawMiniIcon(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawDetails(const FXIconList* list,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void setText(const FXString& text);
  virtual void setBigIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setMiniIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setFocus(FXbool focus);
  virtual void setSelected(FXbool selected);
  virtual void setEnabled(FXbool enabled);
  virtual void setDraggable(FXbool draggable);
  virtual FXint getWidth(const FXIconList* list) const;
  virtual FXint getHeight(const FXIconList* list) const;
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXICONLIST_VIRTUALS(klass)
%extend klass {
  /// Select item at index
  virtual FXbool selectItem(FXint index,FXbool notify=FALSE);

  /// Deselect item at index
  virtual FXbool deselectItem(FXint index,FXbool notify=FALSE);

  /// Toggle item at index
  virtual FXbool toggleItem(FXint index,FXbool notify=FALSE);

  /// Select items in rectangle
  virtual FXbool selectInRectangle(FXint x,FXint y,FXint w,FXint h,FXbool notify=FALSE);

  /// Extend selection from anchor index to index
  virtual FXbool extendSelection(FXint index,FXbool notify=FALSE);

  /// Deselect all items
  virtual FXbool killSelection(FXbool notify=FALSE);

  /// Change current item index
  virtual void setCurrentItem(FXint index,FXbool notify=FALSE);

  /// Return index of item at x,y, or -1 if none
  virtual FXint getItemAt(FXint x,FXint y) const;

  /// Scroll to make item at index visible
  virtual void makeItemVisible(FXint index);

  /// Enable item at index
  virtual FXbool enableItem(FXint index);

  /// Disable item at index
  virtual FXbool disableItem(FXint index);
  }
%enddef

%define DECLARE_FXICONSOURCE_VIRTUALS(klass)
%extend klass {
  /**
  * Load an icon from the file filename. By default, the file extension is
  * stripped and used as the icon type; if an explicit icon type is forced,
  * then that type is used and the extension is ignored.
  * For example, loadIcon("icon","gif") will try to load a CompuServe GIF
  * file, since the filename does not give any clue as to the type of the
  * icon.
  */
  virtual FXIcon *loadIconFile(const FXString& filename,const FXString& type=FXString::null) const;

  /**
  * Load an icon of a given type (e.g. "gif") from reswrapped data.
  * Returns NULL if there's some error loading the icon.  [The optional
  * parameter is actually mandatory at the time of this writing; future
  * versions will attempt to inspect the first few bytes of the stream
  * to divine the icon format if the parameter is omitted].
  */
  virtual FXIcon *loadIconData(const void *pixels,const FXString& type=FXString::null) const;

  /**
  * Load an icon of a given type (e.g. "gif") from an already open stream.
  * Returns NULL if there's some error loading the icon.  [The optional
  * parameter is actually mandatory at the time of this writing; future
  * versions will attempt to inspect the first few bytes of the stream
  * to divine the icon format if the parameter is omitted].
  */
  virtual FXIcon *loadIconStream(FXStream& store,const FXString& type=FXString::null) const;

  /**
  * Load an image from the file filename. By default, the file extension is
  * stripped and used as the image type; if an explicit image type is forced,
  * then that type is used and the extension is ignored.
  * For example, loadImage("image","gif") will try to load a CompuServe GIF
  * file, since the filename does not give any clue as to the type of the
  * image.
  */
  virtual FXImage *loadImageFile(const FXString& filename,const FXString& type=FXString::null) const;

  /**
  * Load an image of a given type (e.g. "gif") from reswrapped data.
  * Returns NULL if there's some error loading the icon.  [The optional
  * parameter is actually mandatory at the time of this writing; future
  * versions will attempt to inspect the first few bytes of the stream
  * to divine the icon format if the parameter is omitted].
  */
  virtual FXImage *loadImageData(const void *pixels,const FXString& type=FXString::null) const;

  /**
  * Load an image of a given type (e.g. "gif") from an already open stream.
  * Returns NULL if there's some error loading the image.  [The optional
  * parameter is actually mandatory at the time of this writing; future
  * versions will attempt to inspect the first few bytes of the stream
  * to divine the image format if the parameter is omitted].
  */
  virtual FXImage *loadImageStream(FXStream& store,const FXString& type=FXString::null) const;

  /// Load icon and scale it such that its dimensions does not exceed given size
  virtual FXIcon *loadScaledIconFile(const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;

  /// Load icon and scale it such that its dimensions does not exceed given size
  virtual FXIcon *loadScaledIconData(const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;

  /// Load icon and scale it such that its dimensions does not exceed given size
  virtual FXIcon *loadScaledIconStream(FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;

  /// Load image and scale it such that its dimensions does not exceed given size
  virtual FXImage *loadScaledImageFile(const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;

  /// Load image and scale it such that its dimensions does not exceed given size
  virtual FXImage *loadScaledImageData(const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;

  /// Load image and scale it such that its dimensions does not exceed given size
  virtual FXImage *loadScaledImageStream(FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
  }
%enddef

%define DECLARE_FXID_VIRTUALS(klass)
%extend klass {
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXIMAGE_VIRTUALS(klass)
%extend klass {
  /**
  * Retrieves pixels from the server-side image.  For example, to make
  * screen snapshots, or to retrieve an image after it has been drawn
  * into by various means.
  */
  virtual void restore();

  /**
  * Render the server-side representation of the image from client-side
  * pixels.  Normally, IMAGE_DITHER is used which causes the server-side
  * representation to be rendered using a 16x16 ordered dither if necessary;
  * however if IMAGE_NEAREST is used a faster (but uglier-looking), nearest
  * neighbor algorithm is used.
  */
  virtual void render();

   /**
   * Release the client-side pixels buffer, free it if it was owned.
   * If it is not owned, the image just forgets about the buffer.
   */
  virtual void release();

  /**
  * Rescale pixels image to the specified width and height; this calls
  * resize() to adjust the client and server side representations.
  */
  virtual void scale(FXint w,FXint h,FXint quality=0);

  /// Mirror image horizontally and/or vertically
  virtual void mirror(bool horizontal,bool vertical);

  /**
  * Rotate image by degrees ccw; this calls resize() to adjust the client
  * and server side representations if necessary.
  */
  virtual void rotate(FXint degrees);

  /**
  * Crop image to given rectangle; this calls resize() to adjust the client
  * and server side representations.
  */
  virtual void crop(FXint x,FXint y,FXint w,FXint h,FXColor color=0);

  /// Fill image with uniform color
  virtual void fill(FXColor color);

  /// Fade image to uniform color
  virtual void fade(FXColor color,FXint factor=255);

  /**
  * Shear image horizontally; the number of pixels is equal to the
  * shear parameter times 256.  The area outside the image is filled
  * with transparent black, unless another color is specified.
  */
  virtual void xshear(FXint shear,FXColor clr=0);

  /**
  * Shear image vertically; the number of pixels is equal to the
  * shear parameter times 256.  The area outside the image is filled
  * with transparent black, unless another color is specified.
  */
  virtual void yshear(FXint shear,FXColor clr=0);

  /// Fill horizontal gradient
  virtual void hgradient(FXColor left,FXColor right);

  /// Fill vertical gradient
  virtual void vgradient(FXColor top,FXColor bottom);

  /// Fill with gradient
  virtual void gradient(FXColor topleft,FXColor topright,FXColor bottomleft,FXColor bottomright);

  /// Blend image over uniform color
  virtual void blend(FXColor color);

  virtual bool savePixels(FXStream& store) const;
  virtual bool loadPixels(FXStream& store);
  }
%enddef

%define DECLARE_FXLISTITEM_VIRTUALS(klass)
%extend klass {
  virtual void setText(const FXString& txt);
  virtual void setIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setFocus(FXbool focus);
  virtual void setSelected(FXbool selected);
  virtual void setEnabled(FXbool enabled);
  virtual void setDraggable(FXbool draggable);
  virtual FXint getWidth(const FXList* list) const;
  virtual FXint getHeight(const FXList* list) const;
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXLIST_VIRTUALS(klass)
%extend klass {
  /// Enable item
  virtual FXbool enableItem(FXint index);

  /// Disable item
  virtual FXbool disableItem(FXint index);

  /// Scroll to bring item into view
  virtual void makeItemVisible(FXint index);

  /// Return index of item at x,y, if any
  virtual FXint getItemAt(FXint x,FXint y) const;

  /// Select item
  virtual FXbool selectItem(FXint index,FXbool notify=FALSE);

  /// Deselect item
  virtual FXbool deselectItem(FXint index,FXbool notify=FALSE);

  /// Toggle item selection state
  virtual FXbool toggleItem(FXint index,FXbool notify=FALSE);

  /// Extend selection from anchor item to index
  virtual FXbool extendSelection(FXint index,FXbool notify=FALSE);

  /// Deselect all items
  virtual FXbool killSelection(FXbool notify=FALSE);

  /// Change current item
  virtual void setCurrentItem(FXint index,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXLISTBOX_VIRTUALS(klass)
%extend klass {
  /// Set the current item (index is zero-based)
  virtual void setCurrentItem(FXint index,FXbool notify=FALSE);
}
%enddef

%define DECLARE_FXMDICHILD_VIRTUALS(klass)
%extend klass {
  virtual FXbool minimize(FXbool notify=FALSE);
  virtual FXbool maximize(FXbool notify=FALSE);
  virtual FXbool restore(FXbool notify=FALSE);
  virtual FXbool close(FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXMDICLIENT_VIRTUALS(klass)
%extend klass {
  /// Set active MDI Child
  virtual FXbool setActiveChild(FXMDIChild* child=NULL,FXbool notify=TRUE);

  // Cascade windows
  virtual void cascade(FXbool notify=FALSE);

  // Layout horizontally
  virtual void horizontal(FXbool notify=FALSE);

  // Layout vertically
  virtual void vertical(FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXOBJECT_VIRTUALS(klass)
%extend klass {
  /// Save object to stream
  virtual void save(FXStream& store) const;

  /// Load object from stream
  virtual void load(FXStream& store);
  }
%enddef

%define DECLARE_FXPOPUP_VIRTUALS(klass)
%extend klass {
  virtual void popup(FXWindow* grabto,FXint x,FXint y,FXint w=0,FXint h=0);
  virtual void popdown();
  }
%enddef

%define DECLARE_FXREALSPINNER_VIRTUALS(klass)
%extend klass {
  virtual void setValue(FXdouble value,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXSCROLLAREA_VIRTUALS(klass)
%extend klass {
  virtual FXint getViewportHeight();
  virtual FXint getViewportWidth();
  virtual FXint getContentHeight();
  virtual FXint getContentWidth();

  /**
   * Get the current position.
   * Note: This is not a virtual member function in the C++ library,
   * but we need to redeclare it here so that SWIG's overloading
   * mechanism will correctly handle both this version and the the
   * four-argument version of position() declared in class FXWindow.
   */
  VALUE position() const {
    FXint x, y;
    self->getPosition(x, y);
    VALUE pos = rb_ary_new();
    rb_ary_push(pos, INT2NUM(x));
    rb_ary_push(pos, INT2NUM(y));
    return pos;
  }
}
%enddef

%define DECLARE_FXSPINNER_VIRTUALS(klass)
%extend klass {
  virtual void setValue(FXint value,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXSHUTTER_VIRTUALS(klass)
%extend klass {
  virtual void setCurrent(FXint panel);
  }
%enddef

%define DECLARE_FXSTREAM_VIRTUALS(klass)
%rename("setPosition") klass::position(FXlong offset,FXWhence whence);
%extend klass {
  virtual bool close();
  virtual bool flush();
  virtual bool position(FXlong offset,FXWhence whence=FXFromStart);
  }
%enddef

%define DECLARE_FXTABBAR_VIRTUALS(klass)
%extend klass {
  virtual void setCurrent(FXint panel,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXTABLEITEM_VIRTUALS(klass)
%extend klass {
  virtual void draw(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawBorders(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawContent(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawPattern(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;
  virtual void drawBackground(const FXTable* table,FXDC& dc,FXint x,FXint y,FXint w,FXint h) const;

  // Change item's text label
  virtual void setText(const FXString& txt);

  // Return item's text label
  virtual FXString getText() const;

  /// Change item's icon, deleting the old icon if it was owned
  virtual void setIcon(FXIcon* icn,FXbool owned=FALSE);

  /// Return item's icon
  virtual FXIcon* getIcon() const;

  // Make item draw as focused
  virtual void setFocus(FXbool focus);

  // Select item
  virtual void setSelected(FXbool selected);

  // Enable or disable item
  virtual void setEnabled(FXbool enabled);

  // Make item draggable
  virtual void setDraggable(FXbool draggable);

  /// Change item content justification
  virtual void setJustify(FXuint justify=RIGHT|CENTER_Y);

  /// Change item icon position
  virtual void setIconPosition(FXuint mode);

  /// Change item borders
  virtual void setBorders(FXuint borders=0);

  /// Change item background stipple
  virtual void setStipple(FXStipplePattern pattern);

  /// Create input control for editing this item
  virtual FXWindow *getControlFor(FXTable* table);

  /// Set value from input control
  virtual void setFromControl(FXWindow *control);

  // Return width of item
  virtual FXint getWidth(const FXTable* table) const;

  // Return height of item
  virtual FXint getHeight(const FXTable* table) const;

  // Create server-side resources
  virtual void create();

  // Detach server-side resources
  virtual void detach();

  // Destroy server-side resources
  virtual void destroy();
  }
%enddef

%define DECLARE_FXTABLE_VIRTUALS(klass)
%extend klass {
  virtual void drawCell(FXDC& dc,FXint sr,FXint er,FXint sc,FXint ec);
  virtual void drawRange(FXDC& dc,FXint rlo,FXint rhi,FXint clo,FXint chi);
  virtual void drawHGrid(FXDC& dc,FXint rlo,FXint rhi,FXint clo,FXint chi);
  virtual void drawVGrid(FXDC& dc,FXint rlo,FXint rhi,FXint clo,FXint chi);
  virtual void drawContents(FXDC& dc,FXint x,FXint y,FXint w,FXint h);
  virtual FXTableItem* createItem(const FXString& text,FXIcon* icon,void* ptr);

  /// Set the table size to nr rows and nc columns; all existing items will be removed
  virtual void setTableSize(FXint nr,FXint nc,FXbool notify=FALSE);

  /// Insert new row
  virtual void insertRows(FXint TABLE_ROW_ALL,FXint nr=1,FXbool notify=FALSE);

  /// Insert new column
  virtual void insertColumns(FXint TABLE_COLUMN_ALL,FXint nc=1,FXbool notify=FALSE);

  /// Remove rows of cells
  virtual void removeRows(FXint row,FXint nr=1,FXbool notify=FALSE);

  /// Remove column of cells
  virtual void removeColumns(FXint col,FXint nc=1,FXbool notify=FALSE);

  /// Extract item from table
  virtual FXTableItem* extractItem(FXint row,FXint col,FXbool notify=FALSE);

  /// Clear single cell
  virtual void removeItem(FXint row,FXint col,FXbool notify=FALSE);

  /// Clear all cells in the given range
  virtual void removeRange(FXint startrow,FXint endrow,FXint startcol,FXint endcol,FXbool notify=FALSE);

  /// Remove all items from table
  virtual void clearItems(FXbool notify=FALSE);

  /// Change column width
  virtual void setColumnWidth(FXint col,FXint cwidth);

  /// Change row height
  virtual void setRowHeight(FXint row,FXint rheight);

  /// Change current item
  virtual void setCurrentItem(FXint row_unchecked,FXint col_unchecked,FXbool notify=FALSE);

  /// Select a row
  virtual FXbool selectRow(FXint row,FXbool notify=FALSE);

  /// Select a column
  virtual FXbool selectColumn(FXint col,FXbool notify=FALSE);

  /// Select range
  virtual FXbool selectRange(FXint startrow,FXint endrow,FXint startcol,FXint endcol,FXbool notify=FALSE);

  /// Extend selection
  virtual FXbool extendSelection(FXint row_unchecked,FXint col_unchecked,FXbool notify=FALSE);

  /// Kill selection
  virtual FXbool killSelection(FXbool notify=FALSE);

  /**
  * Start input mode for the cell at the given position.
  * An input control is created which is used to edit the cell;
  * it is filled by the original item's contents if the cell contained
  * an item.  You can enter input mode also by sending the table an
  * ID_START_INPUT message.
  */
  virtual void startInput(FXint row_unchecked,FXint col_unchecked);

  /**
  * Cancel input mode.  The input control is immediately deleted
  * and the cell will retain its old value.  You can also cancel
  * input mode by sending the table an ID_CANCEL_INPUT message.
  */
  virtual void cancelInput();

  /**
  * End input mode and accept the new value from the control.
  * The item in the cell will be set to the value from the control,
  * and the control will be deleted.  If TRUE is passed, a SEL_REPLACED
  * callback will be generated to signify to the target that this call
  * has a new value.  You can also accept the input by sending the table
  * an ID_ACCEPT_INPUT message.
  */
  virtual void acceptInput(FXbool notify=FALSE);

  /// Scroll to make cell at r,c fully visible
  virtual void makePositionVisible(FXint row_unchecked,FXint col_unchecked);

  /// Enable item
  virtual FXbool enableItem(FXint r,FXint c);

  /// Disable item
  virtual FXbool disableItem(FXint r,FXint c);
  }
%enddef

%define DECLARE_FXTEXT_VIRTUALS(klass)
%extend klass {
  virtual void setCursorPos(FXint pos,FXbool notify=FALSE);
  virtual FXbool extendSelection(FXint pos,FXTextSelectionMode mode=SELECT_CHARS,FXbool notify=FALSE);
  virtual FXbool killSelection(FXbool notify=FALSE);

  /// Replace m bytes at pos by n characters
  virtual void replaceText(FXint pos,FXint m,const FXString& text,FXbool notify=FALSE);

  /// Replace m bytes at pos by n characters
  virtual void replaceStyledText(FXint pos,FXint m,const FXString& text,FXint style=0,FXbool notify=FALSE);

  /// Append n bytes of text at the end of the buffer
  virtual void appendText(const FXString& text,FXbool notify=FALSE);

  /// Append n bytes of text at the end of the buffer
  virtual void appendStyledText(const FXString& text,FXint style=0,FXbool notify=FALSE);

  /// Insert n bytes of text at position pos into the buffer
  virtual void insertText(FXint pos,const FXString& text,FXbool notify=FALSE);

  /// Insert n bytes of text at position pos into the buffer
  virtual void insertStyledText(FXint pos,const FXString& text,FXint style=0,FXbool notify=FALSE);

  /// Remove n bytes of text at position pos from the buffer
  virtual void removeText(FXint pos,FXint n,FXbool notify=FALSE);

  /// Change style of text range
  virtual void changeStyle(FXint pos,FXint n,FXint style);

  /// Change style of text range from style-array
  virtual void changeStyle(FXint pos,const FXString& style);

  /// Change the text in the buffer to new text
  virtual void setText(const FXString& text,FXbool notify=FALSE);

  /// Change the text in the buffer to new text
  virtual void setStyledText(const FXString& text,FXint style=0,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXTOPWINDOW_VIRTUALS(klass)
%extend klass {
  virtual void show(FXuint placement);
  virtual FXbool maximize(FXbool notify=FALSE);
  virtual FXbool minimize(FXbool notify=FALSE);
  virtual FXbool restore(FXbool notify=FALSE);

  /**
  * Close the window, return TRUE if actually closed.  If notify=TRUE, the target
  * will receive a SEL_CLOSE message to determine if it is OK to close the window.
  * If the target ignores the SEL_CLOSE message or returns 0, the window will
  * be closed, and subsequently deleted.  When the last main window has been
  * closed, the application will receive an ID_QUIT message and will be closed.
  */
  virtual FXbool close(FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXTRANSLATOR_VIRTUALS(klass)
%extend klass {
  /// Translate a string
  virtual const FXchar* tr(const FXchar* context,const FXchar* message,const FXchar* hint=NULL) const;
}
%enddef

%define DECLARE_FXTREEITEM_VIRTUALS(klass)
%extend klass {
  // Change item label
  virtual void setText(const FXString& txt);

  // Change open icon, deleting the old one if it was owned
  virtual void setOpenIcon(FXIcon* icn,FXbool owned=FALSE);

  // Change closed icon, deleting the old one if it was owned
  virtual void setClosedIcon(FXIcon* icn,FXbool owned=FALSE);
  virtual void setFocus(FXbool focus);
  virtual void setSelected(FXbool selected);
  virtual void setOpened(FXbool opened);
  virtual void setExpanded(FXbool expanded);
  virtual void setEnabled(FXbool enabled);
  virtual void setDraggable(FXbool draggable);
  virtual FXint getWidth(const FXTreeList* list) const;
  virtual FXint getHeight(const FXTreeList* list) const;
  virtual void create();
  virtual void detach();
  virtual void destroy();
  }
%enddef

%define DECLARE_FXTREELIST_VIRTUALS(klass)
%extend klass {
  /// Select item
  virtual FXbool selectItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Deselect item
  virtual FXbool deselectItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Toggle item selection
  virtual FXbool toggleItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Extend selection from anchor item to item
  virtual FXbool extendSelection(FXTreeItem* item,FXbool notify=FALSE);

  /// Deselect all items
  virtual FXbool killSelection(FXbool notify=FALSE);

  /// Open item
  virtual FXbool openItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Close item
  virtual FXbool closeItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Collapse tree
  virtual FXbool collapseTree(FXTreeItem* tree,FXbool notify=FALSE);

  /// Expand tree
  virtual FXbool expandTree(FXTreeItem* tree,FXbool notify=FALSE);

  /// Change current item
  virtual void setCurrentItem(FXTreeItem* item,FXbool notify=FALSE);

  /// Get item at x,y, if any
  virtual FXTreeItem* getItemAt(FXint x,FXint y) const;

  /// Scroll to make item visible
  virtual void makeItemVisible(FXTreeItem* item);

  /// Enable item
  virtual FXbool enableItem(FXTreeItem* item);

  /// Disable item
  virtual FXbool disableItem(FXTreeItem* item);
  }
%enddef

%define DECLARE_FXTREELISTBOX_VIRTUALS(klass)
%extend klass {
  /// Change current item
  virtual void setCurrentItem(FXTreeItem* item,FXbool notify=FALSE);
  }
%enddef

%define DECLARE_FXWINDOW_VIRTUALS(klass)
%rename("raiseWindow") klass::raise();
%extend klass {
  virtual FXint getDefaultWidth();
  virtual FXint getDefaultHeight();
  virtual FXint getWidthForHeight(FXint givenheight);
  virtual FXint getHeightForWidth(FXint givenwidth);
  virtual bool canFocus() const;
  virtual void setFocus();
  virtual void killFocus();

  /// Notification that focus moved to new child
  virtual void changeFocus(FXWindow *child);

  virtual void setDefault(FXbool enable=TRUE);
  virtual void enable();
  virtual void disable();
  virtual void raise();
  virtual void lower();

  /**
  * Move the window immediately, in the parent's coordinate system.
  * Update the server representation as well if the window is realized.
  * Perform layout of the children when necessary.
  */
  virtual void move(FXint x,FXint y);

  /**
  * Move and resize the window immediately, in the parent's coordinate system.
  * Update the server representation as well if the window is realized.
  * Perform layout of the children when necessary.
  */
  virtual void position(FXint x,FXint y,FXint w,FXint h);

  virtual void layout();
  virtual void recalc();
  virtual void reparent(FXWindow* father,FXWindow* other);
  virtual void show();
  virtual void hide();
  virtual bool isComposite() const;
  virtual bool contains(FXint parentx,FXint parenty) const;
  virtual bool doesSaveUnder() const;
  virtual void setBackColor(FXColor clr);

  /**
  * Translate message for localization; using the current FXTranslator,
  * an attempt is made to translate the given message into the current
  * language.  An optional hint may be passed to break any ties in case
  * more than one tranlation is possible for the given message text.
  * In addition, the name of the widget is passed as context name so
  * that controls in a single dialog may be grouped together.
  */
  virtual const FXchar* tr(const FXchar* message,const FXchar* hint=NULL) const;

  /// Enable this window to receive drops
  virtual void dropEnable();

  /// Disable this window from receiving drops
  virtual void dropDisable();

  /// Set window shape by means of region
  virtual void setShape(const FXRegion& region);

  /// Set window shape by means of bitmap
  virtual void setShape(FXBitmap* bitmap);

  /// Set window shape by means of icon
  virtual void setShape(FXIcon* icon);

  /// Clear window shape
  virtual void clearShape();
  }
%enddef