~ubuntu-branches/ubuntu/raring/lmms/raring-proposed

« back to all changes in this revision

Viewing changes to plugins/zynaddsubfx/fltk/FL/Fl.H

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl.H 7334 2010-03-25 14:37:46Z AlbrechtS $"
 
2
// "$Id: Fl.H 8724 2011-05-23 18:01:29Z manolo $"
3
3
//
4
4
// Main header file for the Fast Light Tool Kit (FLTK).
5
5
//
6
 
// Copyright 1998-2009 by Bill Spitzak and others.
 
6
// Copyright 1998-2010 by Bill Spitzak and others.
7
7
//
8
8
// This library is free software; you can redistribute it and/or
9
9
// modify it under the terms of the GNU Library General Public
25
25
//     http://www.fltk.org/str.php
26
26
//
27
27
 
28
 
/* \file
 
28
/** \file
29
29
    Fl static class.
30
30
 */
31
31
 
32
32
#ifndef Fl_H
33
33
#  define Fl_H
34
34
 
35
 
#ifdef HAVE_CAIRO
 
35
#ifdef FLTK_HAVE_CAIRO
36
36
# include <FL/Fl_Cairo.H>
37
37
#endif
38
38
 
54
54
 
55
55
 
56
56
/** \defgroup  callback_functions Callback function typedefs
57
 
    \brief Typedefs for callback or handler functions passed as function parameters.
 
57
 \brief Typedefs defined in <FL/Fl.H> for callback or handler functions passed as function parameters.
58
58
 
59
59
    FLTK uses callback functions as parameters for some function calls, e.g. to
60
60
    set up global event handlers (Fl::add_handler()), to add a timeout handler
68
68
         Fl::remove_timeout() and others
69
69
  @{ */
70
70
 
71
 
/** signature of some label drawing functions passed as parameters */
 
71
/** Signature of some label drawing functions passed as parameters */
72
72
typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, Fl_Align align);
73
73
 
74
 
/** signature of some label measurement functions passed as parameters */
 
74
/** Signature of some label measurement functions passed as parameters */
75
75
typedef void (Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height);
76
76
 
77
 
/** signature of some box drawing functions passed as parameters */
 
77
/** Signature of some box drawing functions passed as parameters */
78
78
typedef void (Fl_Box_Draw_F)(int x, int y, int w, int h, Fl_Color color);
79
79
 
80
 
/** signature of some timeout callback functions passed as parameters */
 
80
/** Signature of some timeout callback functions passed as parameters */
81
81
typedef void (*Fl_Timeout_Handler)(void *data);
82
82
 
83
 
/** signature of some wakeup callback functions passed as parameters */
 
83
/** Signature of some wakeup callback functions passed as parameters */
84
84
typedef void (*Fl_Awake_Handler)(void *data);
85
85
 
86
 
/** signature of add_idle callback functions passed as parameters */
 
86
/** Signature of add_idle callback functions passed as parameters */
87
87
typedef void (*Fl_Idle_Handler)(void *data);
88
88
 
89
 
/** signature of set_idle callback functions passed as parameters */
 
89
/** Signature of set_idle callback functions passed as parameters */
90
90
typedef void (*Fl_Old_Idle_Handler)();
91
91
 
92
 
/** signature of add_fd functions passed as parameters */
 
92
/** Signature of add_fd functions passed as parameters */
93
93
typedef void (*Fl_FD_Handler)(int fd, void *data);
94
94
 
95
 
/** signature of add_handler functions passed as parameters */
 
95
/** Signature of add_handler functions passed as parameters */
96
96
typedef int (*Fl_Event_Handler)(int event);
97
97
 
98
 
/** signature of set_abort functions passed as parameters */
 
98
/** Signature of set_abort functions passed as parameters */
99
99
typedef void (*Fl_Abort_Handler)(const char *format,...);
100
100
 
101
 
/** signature of set_atclose functions passed as parameters */
 
101
/** Signature of set_atclose functions passed as parameters */
102
102
typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data);
103
103
 
104
 
/** signature of args functions passed as parameters */
 
104
/** Signature of args functions passed as parameters */
105
105
typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
106
106
 
 
107
/** Signature of event_dispatch functions passed as parameters.
 
108
    \see Fl::event_dispatch(Fl_Event_Dispatch) */
 
109
typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w);
 
110
 
107
111
/** @} */ /* group callback_functions */
108
112
 
 
113
 
109
114
/**
110
 
  The Fl is the FLTK global (static) containing
 
115
  The Fl is the FLTK global (static) class containing
111
116
  state information and global methods for the current application.
112
117
*/
113
118
class FL_EXPORT Fl {
114
119
  Fl() {}; // no constructor!
115
 
 
 
120
  
116
121
public: // should be private!
117
122
#ifndef FL_DOXYGEN
118
123
  static int e_number;
128
133
  static int e_keysym;
129
134
  static char* e_text;
130
135
  static int e_length;
 
136
  static Fl_Event_Dispatch e_dispatch;
131
137
  static Fl_Widget* belowmouse_;
132
138
  static Fl_Widget* pushed_;
133
139
  static Fl_Widget* focus_;
136
142
  static Fl_Window* modal_;
137
143
  static Fl_Window* grab_;
138
144
  static int compose_state;
139
 
  static int visible_focus_;
140
 
  static int dnd_text_ops_;
141
145
#endif
142
146
  /**
143
147
    If true then flush() will do something.
144
148
  */
145
149
  static void damage(int d) {damage_ = d;}
 
150
  
 
151
public:
 
152
  /** Enumerator for global FLTK options.
 
153
      These options can be set system wide, per user, or for the running
 
154
      application only.
 
155
      \see Fl::option(Fl_Option, bool)
 
156
      \see Fl::option(Fl_Option)
 
157
  */
 
158
  typedef enum {
 
159
      /// When switched on, moving the text cursor beyond the start or end of
 
160
      /// a text in a text widget will change focus to the next text widget.
 
161
      /// When switched off, the cursor will stop at the end of the text.
 
162
      /// Pressing Tab or Ctrl-Tab will advance the keyboard focus.
 
163
    OPTION_ARROW_FOCUS = 0,
 
164
      // When switched on, FLTK will use the file chooser dialog that comes 
 
165
      // with your operating system whenever possible. When switched off, FLTK
 
166
      // will present its own file chooser.
 
167
      // \todo implement me
 
168
    // OPTION_NATIVE_FILECHOOSER,
 
169
      // When Filechooser Preview is enabled, the FLTK or native file chooser
 
170
      // will show a preview of a selected file (if possible) before the user
 
171
      // decides to choose the file.
 
172
      // \todo implement me
 
173
    //OPTION_FILECHOOSER_PREVIEW,
 
174
      /// If visible focus is switched on, FLTK will draw a dotted rectangle 
 
175
      /// inside the widget that will receive the next keystroke. If switched
 
176
      /// off, no such indicator will be drawn and keyboard navigation
 
177
      /// is disabled.
 
178
    OPTION_VISIBLE_FOCUS,
 
179
      /// If text drag-and-drop is enabled, the user can select and drag text
 
180
      /// from any text widget. If disabled, no dragging is possible, however
 
181
      /// dropping text from other applications still works.
 
182
    OPTION_DND_TEXT,
 
183
      /// If tooltips are enabled, hovering the mouse over a widget with a 
 
184
      /// tooltip text will open a little tooltip window until the mouse leaves
 
185
      /// the widget. If disabled, no tooltip is shown.
 
186
    OPTION_SHOW_TOOLTIPS,
 
187
      // don't change this, leave it always as the last element
 
188
      /// For internal use only.
 
189
    OPTION_LAST
 
190
  } Fl_Option;
146
191
 
 
192
private:  
 
193
  static unsigned char options_[OPTION_LAST];
 
194
  static unsigned char options_read_;
 
195
  
 
196
public:  
 
197
  /*
 
198
   Return a global setting for all FLTK applications, possibly overridden
 
199
   by a setting specifically for this application.
 
200
   */
 
201
  static bool option(Fl_Option opt);
 
202
  
 
203
  /*
 
204
   Override an option while the application is running.
 
205
   */
 
206
  static void option(Fl_Option opt, bool val);
 
207
  
147
208
  /**
148
209
    The currently executing idle callback function: DO NOT USE THIS DIRECTLY!
149
210
    
176
237
  static double version();
177
238
 
178
239
  // argument parsers:
179
 
  static int arg(int, char**, int&);
180
 
  static int args(int, char**, int&, Fl_Args_Handler ah = 0);
181
 
  static void args(int, char**);
 
240
  static int arg(int argc, char **argv, int& i);
 
241
  static int args(int argc, char **argv, int& i, Fl_Args_Handler cb = 0);
 
242
  static void args(int argc, char **argv);
182
243
  /**
183
244
    Usage string displayed if Fl::args() detects an invalid argument.
184
245
    This may be changed to point to customized text at run-time.
329
390
  be messed up, but the user can probably keep working - all X protocol
330
391
  errors call this, for example. The default implementation returns after
331
392
  displaying the message.
 
393
   \note \#include <FL/Fl.H>
332
394
  */
333
395
  static void (*warning)(const char*, ...);
334
396
  /**
343
405
 
344
406
  Fl::error() means there is a recoverable error such as the inability to read
345
407
  an image file. The default implementation returns after displaying the message.
 
408
   \note \#include <FL/Fl.H>
346
409
  */
347
410
  static void (*error)(const char*, ...);
348
411
  /**
359
422
  version may be able to use longjmp or an exception to continue, as long as
360
423
  it does not call FLTK again. The default implementation exits with status 1
361
424
  after displaying the message.
 
425
   \note \#include <FL/Fl.H>
362
426
  */
363
427
  static void (*fatal)(const char*, ...);
364
428
  /** @} */
365
429
 
366
430
  /** \defgroup  fl_windows Windows handling functions
367
 
      Windows and standard dialogs handling
 
431
      \brief Windows and standard dialogs handling declared in <FL/Fl.H>
368
432
    @{ */
369
433
  static Fl_Window* first_window();
370
434
  static void first_window(Fl_Window*);
380
444
    called (grab() overrides this).
381
445
  */
382
446
  static Fl_Window* modal() {return modal_;}
383
 
  /**
384
 
    This is used when pop-up menu systems are active.
385
 
    
386
 
    Send all events to the passed window no matter where the pointer or
387
 
    focus is (including in other programs). The window <I>does not have
388
 
    to be shown()</I> , this lets the handle() method of a
389
 
    "dummy" window override all event handling and allows you to
390
 
    map and unmap a complex set of windows (under both X and WIN32
391
 
    <I>some</I> window must be mapped because the system interface needs a
392
 
    window id).
393
 
    
394
 
    If grab() is on it will also affect show() of windows by doing
395
 
    system-specific operations (on X it turns on override-redirect).
396
 
    These are designed to make menus popup reliably
397
 
    and faster on the system.
398
 
    
399
 
    To turn off grabbing do Fl::grab(0).
400
 
    
401
 
    <I>Be careful that your program does not enter an infinite loop
402
 
    while grab() is on.  On X this will lock up your screen!</I>
403
 
    To avoid this potential lockup, all newer operating systems seem to 
404
 
    limit mouse pointer grabbing to the time during which a mouse button 
405
 
    is held down. Some OS's may not support grabbing at all.
 
447
  /** Returns the window that currently receives all events.
 
448
   
 
449
   \return The window that currently receives all events,
 
450
   or NULL if event grabbing is currently OFF.
406
451
  */
407
452
  static Fl_Window* grab() {return grab_;}
408
 
  /** Selects the window to grab. See Fl_Window* Fl::grab() */
 
453
  /** Selects the window to grab.  
 
454
   This is used when pop-up menu systems are active.
 
455
   
 
456
   Send all events to the passed window no matter where the pointer or
 
457
   focus is (including in other programs). The window <I>does not have
 
458
   to be shown()</I> , this lets the handle() method of a
 
459
   "dummy" window override all event handling and allows you to
 
460
   map and unmap a complex set of windows (under both X and WIN32
 
461
   <I>some</I> window must be mapped because the system interface needs a
 
462
   window id).
 
463
   
 
464
   If grab() is on it will also affect show() of windows by doing
 
465
   system-specific operations (on X it turns on override-redirect).
 
466
   These are designed to make menus popup reliably
 
467
   and faster on the system.
 
468
   
 
469
   To turn off grabbing do Fl::grab(0).
 
470
   
 
471
   <I>Be careful that your program does not enter an infinite loop
 
472
   while grab() is on.  On X this will lock up your screen!</I>
 
473
   To avoid this potential lockup, all newer operating systems seem to 
 
474
   limit mouse pointer grabbing to the time during which a mouse button 
 
475
   is held down. Some OS's may not support grabbing at all.
 
476
   */
409
477
  static void grab(Fl_Window*); // platform dependent
410
478
  /** @} */
411
479
 
412
480
  /** \defgroup fl_events Events handling functions
413
 
        Fl class events handling API
 
481
        Fl class events handling API declared in <FL/Fl.H>
414
482
        @{
415
483
  */
416
484
  // event information:
481
549
  */
482
550
  static void event_clicks(int i) {e_clicks = i;}
483
551
  /**
484
 
    The first form returns non-zero if the mouse has not moved far enough
485
 
    and not enough time has passed since the last FL_PUSH or 
486
 
    FL_KEYBOARD event for it to be considered a "drag" rather than a
487
 
    "click".  You can test this on FL_DRAG, FL_RELEASE,
488
 
    and FL_MOVE events.  The second form clears the value returned
489
 
    by Fl::event_is_click().  Useful to prevent the <I>next</I>
490
 
    click from being counted as a double-click or to make a popup menu
491
 
    pick an item with a single click.  Don't pass non-zero to this.
 
552
  Returns non-zero if the mouse has not moved far enough
 
553
  and not enough time has passed since the last FL_PUSH or 
 
554
  FL_KEYBOARD event for it to be considered a "drag" rather than a
 
555
  "click".  You can test this on FL_DRAG, FL_RELEASE,
 
556
  and FL_MOVE events.  
492
557
  */
493
558
  static int event_is_click()   {return e_is_click;}
494
559
  /**
495
 
    Only i=0 works! See int event_is_click(). 
 
560
   Clears the value returned by Fl::event_is_click().  
 
561
   Useful to prevent the <I>next</I>
 
562
   click from being counted as a double-click or to make a popup menu
 
563
   pick an item with a single click.  Don't pass non-zero to this. 
496
564
  */
497
565
  static void event_is_click(int i) {e_is_click = i;}
498
566
  /**
618
686
  static int event_length() {return e_length;}
619
687
 
620
688
  static int compose(int &del);
621
 
  /**
622
 
    If the user moves the cursor, be sure to call Fl::compose_reset().
623
 
    The next call to Fl::compose() will start out in an initial state. In
624
 
    particular it will not set "del" to non-zero. This call is very fast
625
 
    so it is ok to call it many times and in many places.
626
 
  */
627
 
  static void compose_reset() {compose_state = 0;}
 
689
  static void compose_reset();
628
690
  static int event_inside(int,int,int,int);
629
691
  static int event_inside(const Fl_Widget*);
630
692
  static int test_shortcut(Fl_Shortcut);
631
693
 
632
694
  // event destinations:
633
695
  static int handle(int, Fl_Window*);
 
696
  static int handle_(int, Fl_Window*);
634
697
  /**  Gets the widget that is below the mouse. 
635
698
       \see  belowmouse(Fl_Widget*) */
636
699
  static Fl_Widget* belowmouse() {return belowmouse_;}
644
707
  static void focus(Fl_Widget*);
645
708
  static void add_handler(Fl_Event_Handler h);
646
709
  static void remove_handler(Fl_Event_Handler h);
 
710
  static void event_dispatch(Fl_Event_Dispatch d);
 
711
  static Fl_Event_Dispatch event_dispatch();
647
712
  /** @} */
648
713
 
649
714
  /** \defgroup  fl_clipboard  Selection & Clipboard functions
650
 
        fl global copy/cut/paste functions
 
715
        FLTK global copy/cut/paste functions declared in <FL/Fl.H>
651
716
   @{ */
652
717
  // cut/paste:
653
718
  /**
654
 
    Copies the data pointed to by \p stuff to the selection (0) or
655
 
    primary (1) clipboard. The selection clipboard is used for
656
 
    middle-mouse pastes and for drag-and-drop selections. The primary
657
 
    clipboard is used for traditional copy/cut/paste operations.
658
 
  */
659
 
  static void copy(const char* stuff, int len, int clipboard = 0); // platform dependent
660
 
  /**
661
 
    Pastes the data from the selection (0) or primary (1) clipboard into receiver.  
662
 
    The selection clipboard is used for middle-mouse pastes and for 
663
 
    drag-and-drop selections. The primary clipboard is used for 
664
 
    traditional copy/cut/paste operations.
665
 
  */
666
 
  static void paste(Fl_Widget &receiver, int clipboard /*=0*/); // platform dependent
667
 
  /**
668
 
    Initiate a Drag And Drop operation. The clipboard should be
 
719
  Copies the data pointed to by \p stuff to the selection buffer 
 
720
  (\p destination is 0) or
 
721
  the clipboard (\p destination is 1); \p len is the number of relevant
 
722
  bytes in \p stuff.
 
723
  The selection buffer is used for
 
724
  middle-mouse pastes and for drag-and-drop selections. The 
 
725
  clipboard is used for traditional copy/cut/paste operations.
 
726
  */
 
727
  static void copy(const char* stuff, int len, int destination = 0); // platform dependent
 
728
  /**
 
729
  Pastes the data from the selection buffer (\p source is 0) or the clipboard 
 
730
  (\p source is 1) into \p receiver.  
 
731
  Set things up so the receiver widget will be called with an FL_PASTE event some
 
732
  time in the future with the data from the specified \p source in Fl::event_text()
 
733
  and the number of characters in Fl::event_length().
 
734
  The receiver
 
735
  should be prepared to be called \e directly by this, or for
 
736
  it to happen \e later, or possibly <i>not at all</i>.  This
 
737
  allows the window system to take as long as necessary to retrieve
 
738
  the paste buffer (or even to screw up completely) without complex
 
739
  and error-prone synchronization code in FLTK.
 
740
   
 
741
  The selection buffer is used for middle-mouse pastes and for 
 
742
  drag-and-drop selections. The clipboard is used for traditional 
 
743
  copy/cut/paste operations.
 
744
  */
 
745
  static void paste(Fl_Widget &receiver, int source /*=0*/); // platform dependent
 
746
  /**
 
747
    Initiate a Drag And Drop operation. The selection buffer should be
669
748
    filled with relevant data before calling this method. FLTK will
670
749
    then initiate the system wide drag and drop handling. Dropped data
671
750
    will be marked as <i>text</i>.
 
751
   
 
752
    Create a selection first using:
 
753
    Fl::copy(const char *stuff, int len, 0)
672
754
  */
673
755
  static int dnd(); // platform dependent
674
756
 
681
763
  static void paste(Fl_Widget &receiver);
682
764
/** @} */
683
765
/** \defgroup  fl_screen  Screen functions
684
 
        fl global screen functions
 
766
        fl global screen functions declared in <FL/Fl.H>
685
767
     @{ */
686
768
  // screen size:
687
 
  /** Returns the origin of the current screen, where 0 indicates the left side of the screen. */
 
769
  /** Returns the origin of the current screen work area, where 0 indicates the left side of the screen. */
688
770
  static int x(); // platform dependent
689
 
  /** Returns the origin of the current screen, where 0 indicates the top edge of the screen. */
 
771
  /** Returns the origin of the current screen work area, where 0 indicates the top edge of the screen. */
690
772
  static int y(); // platform dependent
691
 
  /** Returns the width of the screen in pixels. */
 
773
  /** Returns the width of the screen work area in pixels. */
692
774
  static int w(); // platform dependent
693
 
  /** Returns the height of the screen in pixels. */
 
775
  /** Returns the height of the screen work area in pixels. */
694
776
  static int h(); // platform dependent
695
777
 
696
778
  // multi-head support:
704
786
    screen_xywh(X, Y, W, H, e_x_root, e_y_root);
705
787
  }
706
788
  static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
707
 
  static void screen_xywh(int &X, int &Y, int &W, int &H, int n);
 
789
  static void screen_xywh(int &X, int &Y, int &W, int &H, int n); 
 
790
  static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
 
791
  static void screen_dpi(float &h, float &v, int n=0);
708
792
 
709
793
  /**   @} */
710
794
 
711
795
  /** \defgroup  fl_attributes  Color & Font functions
712
 
        fl global color, font functions
 
796
        fl global color, font functions.
 
797
   These functions are declared in <FL/Fl.H> or <FL/fl_draw.H>. 
713
798
     @{ */
714
799
 
715
800
  // color map:
718
803
    Sets an entry in the fl_color index table. You can set it to any
719
804
    8-bit RGB color. The color is not allocated until fl_color(i) is used.
720
805
  */
721
 
  static void   set_color(Fl_Color, unsigned); // platform dependent
722
 
  static Fl_Color get_color(Fl_Color);
723
 
  static void   get_color(Fl_Color, uchar&, uchar&, uchar&);
 
806
  static void   set_color(Fl_Color i, unsigned c); // platform dependent
 
807
  static unsigned get_color(Fl_Color i);
 
808
  static void   get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue);
724
809
  /**
725
810
    Frees the specified color from the colormap, if applicable.
726
811
    If overlay is non-zero then the color is freed from the
727
812
    overlay colormap.
728
813
  */
729
 
  static void   free_color(Fl_Color, int overlay = 0); // platform dependent
 
814
  static void   free_color(Fl_Color i, int overlay = 0); // platform dependent
730
815
 
731
816
  // fonts:
732
817
  static const char* get_font(Fl_Font);
779
864
 
780
865
  /**   @} */
781
866
 /** \defgroup  fl_drawings  Drawing functions
782
 
        fl global graphics and gui drawing functions
 
867
  FLTK global graphics and GUI drawing functions.
 
868
  These functions are declared in <FL/fl_draw.H>, 
 
869
  and in <FL/x.H> for offscreen buffer-related ones.
783
870
     @{ */
784
871
  // <Hack to re-order the 'Drawing functions' group>
785
872
 /** @} */
854
941
    \deprecated This method is obsolete - use the add_idle() method instead.
855
942
  */
856
943
  static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
857
 
  /** See Fl_Window* grab() */
858
 
  static void grab(Fl_Window&win) {grab(&win);}
 
944
  /** See grab(Fl_Window*) */
 
945
  static void grab(Fl_Window& win) {grab(&win);}
859
946
  /** Releases the current grabbed window, equals grab(0).
860
947
  \deprecated Use Fl::grab(0) instead.
861
 
  \see Fl_Window* grab() */
 
948
  \see grab(Fl_Window*) */
862
949
  static void release() {grab(0);}
863
950
 
864
951
  // Visible focus methods...
867
954
    non-text widgets. The default mode is to enable keyboard focus
868
955
    for all widgets.
869
956
  */
870
 
  static void visible_focus(int v) { visible_focus_ = v; }
 
957
  static void visible_focus(int v) { option(OPTION_VISIBLE_FOCUS, (v!=0)); }
871
958
  /**
872
959
    Gets or sets the visible keyboard focus on buttons and other
873
960
    non-text widgets. The default mode is to enable keyboard focus
874
961
    for all widgets.
875
962
  */
876
 
  static int  visible_focus() { return visible_focus_; }
 
963
  static int  visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
877
964
 
878
965
  // Drag-n-drop text operation methods...
879
966
  /**
882
969
    be dragged from text fields or dragged within a text field as a
883
970
    cut/paste shortcut.
884
971
  */
885
 
  static void dnd_text_ops(int v) { dnd_text_ops_ = v; }
 
972
  static void dnd_text_ops(int v) { option(OPTION_DND_TEXT, (v!=0)); }
886
973
  /**
887
974
    Gets or sets whether drag and drop text operations are
888
975
    supported. This specifically affects whether selected text can
889
976
    be dragged from text fields or dragged within a text field as a
890
977
    cut/paste shortcut.
891
978
  */
892
 
  static int  dnd_text_ops() { return dnd_text_ops_; }
 
979
  static int  dnd_text_ops() { return option(OPTION_DND_TEXT); }
893
980
  /** \defgroup fl_multithread Multithreading support functions
894
 
        fl multithreading support functions
 
981
        fl multithreading support functions declared in <FL/Fl.H>
895
982
   @{ */
896
983
 
897
984
  // Multithreading support:
898
 
  static void lock();
 
985
  static int lock();
899
986
  static void unlock();
900
987
  static void awake(void* message = 0);
901
988
  /** See void awake(void* message=0). */
904
991
    The thread_message() method returns the last message
905
992
    that was sent from a child by the awake() method.
906
993
    
907
 
    See also: multithreading
 
994
    See also: \ref advanced_multithreading
908
995
  */
909
996
  static void* thread_message(); // platform dependent
910
997
  /** @} */
911
998
 
912
999
  /** \defgroup fl_del_widget Safe widget deletion support functions
913
1000
 
914
 
    These functions support deletion of widgets inside callbacks.
 
1001
    These functions, declared in <FL/Fl.H>, support deletion of widgets inside callbacks.
915
1002
 
916
1003
    Fl::delete_widget() should be called when deleting widgets
917
1004
    or complete widget trees (Fl_Group, Fl_Window, ...) inside
946
1033
  static void clear_widget_pointer(Fl_Widget const *w);
947
1034
  /** @} */
948
1035
 
949
 
#ifdef HAVE_CAIRO
 
1036
#ifdef FLTK_HAVE_CAIRO
950
1037
  /** \defgroup group_cairo Cairo support functions and classes 
951
1038
      @{ 
952
1039
  */
953
1040
public:
954
1041
  // Cairo support API
955
1042
  static cairo_t * cairo_make_current(Fl_Window* w);
956
 
   /** when HAVE_CAIRO is defined and cairo_autolink_context() is true, 
 
1043
   /** when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, 
957
1044
      any current window dc is linked to a current context.
958
1045
      This is not the default, because it may not be necessary
959
1046
      to add cairo support to all fltk supported windows.
991
1078
public:
992
1079
  /** @} */ 
993
1080
 
994
 
#endif // HAVE_CAIRO
 
1081
#endif // FLTK_HAVE_CAIRO
995
1082
 
996
1083
};
997
1084
 
1076
1163
};
1077
1164
 
1078
1165
 /** \defgroup  fl_unicode  Unicode and UTF-8 functions
1079
 
        fl global Unicode and UTF-8 handling functions
 
1166
        fl global Unicode and UTF-8 handling functions declared in <FL/fl_utf8.h>
1080
1167
     @{ */
1081
1168
 /** @} */
1082
1169
 
1083
1170
#endif // !Fl_H
1084
1171
 
1085
1172
//
1086
 
// End of "$Id: Fl.H 7334 2010-03-25 14:37:46Z AlbrechtS $".
 
1173
// End of "$Id: Fl.H 8724 2011-05-23 18:01:29Z manolo $".
1087
1174
//