Commit 9b5d5801 authored by Aaron M. Ucko's avatar Aaron M. Ucko

[svn-upgrade] Integrating new upstream version, fltk1.1 (1.1.8~r5840)

parent a7324bb0
config.cache
config.h
config.log
config.status
configure
fltk-config
fltk.list
makeinclude
*.bck
This diff is collapsed.
//
// "$Id: Enumerations.H 4288 2005-04-16 00:13:17Z mike $"
// "$Id: Enumerations.H 5834 2007-05-16 08:30:48Z matt $"
//
// Enumerations for the Fast Light Tool Kit (FLTK).
//
......@@ -47,7 +47,7 @@
#define FL_MAJOR_VERSION 1
#define FL_MINOR_VERSION 1
#define FL_PATCH_VERSION 7
#define FL_PATCH_VERSION 8
#define FL_VERSION ((double)FL_MAJOR_VERSION + \
(double)FL_MINOR_VERSION * 0.01 + \
(double)FL_PATCH_VERSION * 0.0001)
......@@ -177,6 +177,11 @@ enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
_FL_PLASTIC_UP_FRAME, _FL_PLASTIC_DOWN_FRAME,
_FL_PLASTIC_THIN_UP_BOX, _FL_PLASTIC_THIN_DOWN_BOX,
_FL_PLASTIC_ROUND_UP_BOX, _FL_PLASTIC_ROUND_DOWN_BOX,
_FL_GTK_UP_BOX, _FL_GTK_DOWN_BOX,
_FL_GTK_UP_FRAME, _FL_GTK_DOWN_FRAME,
_FL_GTK_THIN_UP_BOX, _FL_GTK_THIN_DOWN_BOX,
_FL_GTK_THIN_UP_FRAME, _FL_GTK_THIN_DOWN_FRAME,
_FL_GTK_ROUND_UP_BOX, _FL_GTK_ROUND_DOWN_BOX,
FL_FREE_BOXTYPE
};
extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
......@@ -211,9 +216,28 @@ extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
#define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
#define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
#define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
#define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
#define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
#define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
#define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
#define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
#define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
#define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
#define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
#define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
// conversions of box types to other boxtypes:
inline Fl_Boxtype fl_down(Fl_Boxtype b) {return (Fl_Boxtype)(b|1);}
inline Fl_Boxtype fl_frame(Fl_Boxtype b) {return (Fl_Boxtype)(b|2);}
inline Fl_Boxtype fl_box(Fl_Boxtype b) {
return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
}
inline Fl_Boxtype fl_down(Fl_Boxtype b) {
return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
}
inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
return (Fl_Boxtype)((b%4<2)?b:(b+2));
}
// back-compatability box types:
#define FL_FRAME FL_ENGRAVED_FRAME
......@@ -401,6 +425,10 @@ enum Fl_Mode { // visual types and Fl_Gl_Window::mode() (values match Glut)
FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer
};
// image alpha blending
#define FL_IMAGE_WITH_ALPHA 0x40000000
// damage masks
enum Fl_Damage {
......@@ -424,5 +452,5 @@ enum Fl_Damage {
#endif
//
// End of "$Id: Enumerations.H 4288 2005-04-16 00:13:17Z mike $".
// End of "$Id: Enumerations.H 5834 2007-05-16 08:30:48Z matt $".
//
//
// "$Id: Fl.H 4223 2005-03-31 16:01:24Z mike $"
// "$Id: Fl.H 5749 2007-03-20 10:41:14Z matt $"
//
// Main header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2005 by Bill Spitzak and others.
// Copyright 1998-2006 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
......@@ -46,6 +46,7 @@ typedef void (Fl_Label_Measure_F)(const Fl_Label*, int&, int&);
typedef void (Fl_Box_Draw_F)(int,int,int,int, Fl_Color);
typedef void (*Fl_Timeout_Handler)(void*);
typedef void (*Fl_Awake_Handler)(void*);
class FL_EXPORT Fl {
Fl() {}; // no constructor!
......@@ -78,10 +79,20 @@ public: // should be private!
static void damage(int d) {damage_ = d;}
static void (*idle)();
static Fl_Awake_Handler *awake_ring_;
static void **awake_data_;
static int awake_ring_size_;
static int awake_ring_head_;
static int awake_ring_tail_;
static int add_awake_handler_(Fl_Awake_Handler, void*);
static int get_awake_handler_(Fl_Awake_Handler&, void*&);
static const char* scheme_;
static Fl_Image* scheme_bg_;
static int e_original_keysym; // late addition
public:
// API version number
......@@ -107,6 +118,8 @@ public:
static int scheme(const char*);
static const char* scheme() {return scheme_;}
static int reload_scheme();
static int scrollbar_size();
static void scrollbar_size(int W);
// execution:
static int wait();
......@@ -159,6 +172,7 @@ public:
static int event_state() {return e_state;}
static int event_state(int i) {return e_state&i;}
static int event_key() {return e_keysym;}
static int event_original_key(){return e_original_keysym;}
static int event_key(int);
static int get_key(int);
static const char* event_text() {return e_text;}
......@@ -191,13 +205,8 @@ public:
static void paste(Fl_Widget &receiver);
// screen size:
#if defined(WIN32) || defined(__APPLE__)
static int x();
static int y();
#else
static int x() {return 0;}
static int y() {return 0;}
#endif /* WIN32 || __APPLE__ */
static int w();
static int h();
......@@ -266,15 +275,19 @@ public:
static void lock();
static void unlock();
static void awake(void* message = 0);
static int awake(Fl_Awake_Handler cb, void* message = 0);
static void* thread_message();
// Widget deletion:
static void delete_widget(Fl_Widget *w);
static void do_widget_deletion();
static void watch_widget_pointer(Fl_Widget *&w);
static void release_widget_pointer(Fl_Widget *&w);
static void clear_widget_pointer(Fl_Widget const *w);
};
#endif // !Fl_H
//
// End of "$Id: Fl.H 4223 2005-03-31 16:01:24Z mike $".
// End of "$Id: Fl.H 5749 2007-03-20 10:41:14Z matt $".
//
//
// "$Id: Fl_Browser_.H 4288 2005-04-16 00:13:17Z mike $"
// "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $"
//
// Common browser header file for the Fast Light Tool Kit (FLTK).
//
......@@ -88,6 +88,7 @@ protected:
void new_list(); // completely clobber all data, as though list replaced
void deleting(void *a); // get rid of any pointers to a
void replacing(void *a,void *b); // change a pointers to b
void swapping(void *a,void *b); // exchange pointers a and b
void inserting(void *a,void *b); // insert b near a
int displayed(void *) const ; // true if this line is visible
void redraw_line(void *); // minimal update, no change in size
......@@ -149,5 +150,5 @@ public:
#endif
//
// End of "$Id: Fl_Browser_.H 4288 2005-04-16 00:13:17Z mike $".
// End of "$Id: Fl_Browser_.H 4879 2006-03-28 23:27:20Z matt $".
//
//
// "$Id: Fl_Check_Browser.H 4461 2005-08-05 13:31:02Z dejan $"
// "$Id: Fl_Check_Browser.H 5006 2006-04-20 03:53:41Z matt $"
//
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
//
......@@ -88,11 +88,15 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {
void check_none();
int value() const; // currently selected item
char *text(int item) const; // returns pointer to internal buffer
protected:
int handle(int);
};
#endif // Fl_Check_Browser_H
//
// End of "$Id: Fl_Check_Browser.H 4461 2005-08-05 13:31:02Z dejan $".
// End of "$Id: Fl_Check_Browser.H 5006 2006-04-20 03:53:41Z matt $".
//
//
// "$Id: Fl_File_Chooser.H 4473 2005-08-08 00:50:02Z mike $"
// "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $"
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
......@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0107
// generated by Fast Light User Interface Designer (fluid) version 1.0108
#ifndef Fl_File_Chooser_H
#define Fl_File_Chooser_H
......@@ -49,24 +49,24 @@
class FL_EXPORT Fl_File_Chooser {
public:
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
enum { SINGLE = 0, MULTI = 1, CREATE = 2, DIRECTORY = 4 };
private:
static Fl_Preferences prefs_;
void (*callback_)(Fl_File_Chooser*, void *);
void *data_;
char directory_[1024];
char pattern_[1024];
char preview_text_[2048];
int type_;
void favoritesButtonCB();
void favoritesCB(Fl_Widget *w);
void fileListCB();
void fileNameCB();
void newdir();
static void previewCB(Fl_File_Chooser *fc);
void showChoiceCB();
void update_favorites();
void update_preview();
static Fl_Preferences prefs_;
void (*callback_)(Fl_File_Chooser*, void *);
void *data_;
char directory_[1024];
char pattern_[1024];
char preview_text_[2048];
int type_;
void favoritesButtonCB();
void favoritesCB(Fl_Widget *w);
void fileListCB();
void fileNameCB();
void newdir();
static void previewCB(Fl_File_Chooser *fc);
void showChoiceCB();
void update_favorites();
void update_preview();
public:
Fl_File_Chooser(const char *d, const char *p, int t, const char *title);
private:
......@@ -128,10 +128,10 @@ public:
void callback(void (*cb)(Fl_File_Chooser *, void *), void *d = 0);
void color(Fl_Color c);
Fl_Color color();
int count();
void directory(const char *d);
int count();
void directory(const char *d);
char * directory();
void filter(const char *p);
void filter(const char *p);
const char * filter();
int filter_value();
void filter_value(int f);
......@@ -142,9 +142,10 @@ public:
const char * label();
void ok_label(const char *l);
const char * ok_label();
void preview(int e);
int preview() const { return previewButton->value(); };
void rescan();
void preview(int e);
int preview() const { return previewButton->value(); };
void rescan();
void rescan_keep_filename();
void show();
int shown();
void textcolor(Fl_Color c);
......@@ -157,23 +158,23 @@ public:
int type();
void * user_data() const;
void user_data(void *d);
const char *value(int f = 1);
void value(const char *filename);
const char *value(int f = 1);
void value(const char *filename);
int visible();
static const char *add_favorites_label;
static const char *all_files_label;
static const char *custom_filter_label;
static const char *existing_file_label;
static const char *favorites_label;
static const char *filename_label;
static const char *filesystems_label;
static const char *manage_favorites_label;
static const char *new_directory_label;
static const char *new_directory_tooltip;
static const char *preview_label;
static const char *save_label;
static const char *show_label;
static Fl_File_Sort_F *sort;
static const char *add_favorites_label;
static const char *all_files_label;
static const char *custom_filter_label;
static const char *existing_file_label;
static const char *favorites_label;
static const char *filename_label;
static const char *filesystems_label;
static const char *manage_favorites_label;
static const char *new_directory_label;
static const char *new_directory_tooltip;
static const char *preview_label;
static const char *save_label;
static const char *show_label;
static Fl_File_Sort_F *sort;
};
FL_EXPORT char *fl_dir_chooser(const char *message,const char *fname,int relative=0);
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname,int relative=0);
......@@ -182,5 +183,5 @@ FL_EXPORT void fl_file_chooser_ok_label(const char*l);
#endif
//
// End of "$Id: Fl_File_Chooser.H 4473 2005-08-08 00:50:02Z mike $".
// End of "$Id: Fl_File_Chooser.H 5644 2007-01-28 19:41:56Z mike $".
//
//
// "$Id: Fl_Gl_Window.H 4288 2005-04-16 00:13:17Z mike $"
// "$Id: Fl_Gl_Window.H 5322 2006-08-17 09:49:43Z matt $"
//
// OpenGL header file for the Fast Light Tool Kit (FLTK).
//
......@@ -41,7 +41,7 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window {
const int *alist;
Fl_Gl_Choice *g;
GLContext context_;
char valid_;
char valid_f_;
char damage1_; // damage() of back buffer
virtual void draw_overlay();
void init();
......@@ -61,10 +61,13 @@ public:
void hide();
void resize(int,int,int,int);
char valid() const {return valid_;}
void valid(char v) {valid_ = v;}
char valid() const {return valid_f_ & 1;}
void valid(char v) {if (v) valid_f_ |= 1; else valid_f_ &= 0xfe;}
void invalidate();
char context_valid() const {return valid_f_ & 2;}
void context_valid(char v) {if (v) valid_f_ |= 2; else valid_f_ &= 0xfd;}
static int can_do(int m) {return can_do(m,0);}
static int can_do(const int *m) {return can_do(0, m);}
int can_do() {return can_do(mode_,alist);}
......@@ -92,5 +95,5 @@ public:
#endif
//
// End of "$Id: Fl_Gl_Window.H 4288 2005-04-16 00:13:17Z mike $".
// End of "$Id: Fl_Gl_Window.H 5322 2006-08-17 09:49:43Z matt $".
//
//
// "$Id: Fl_Help_Dialog.H 4582 2005-09-25 16:54:40Z matt $"
// "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $"
//
// Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
//
......@@ -25,32 +25,28 @@
// http://www.fltk.org/str.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0107
// generated by Fast Light User Interface Designer (fluid) version 1.0108
#ifndef Fl_Help_Dialog_H
#define Fl_Help_Dialog_H
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Help_View.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Help_View.H>
class FL_EXPORT Fl_Help_Dialog {
int index_;
int max_;
int line_[100];
char file_[100][256];
int find_pos_;
int index_;
int max_;
int line_[100];
char file_[100][256];
int find_pos_;
public:
Fl_Help_Dialog();
private:
Fl_Double_Window *window_;
Fl_Help_View *view_;
void cb_view__i(Fl_Help_View*, void*);
static void cb_view_(Fl_Help_View*, void*);
void cb_Close_i(Fl_Button*, void*);
static void cb_Close(Fl_Button*, void*);
Fl_Button *back_;
void cb_back__i(Fl_Button*, void*);
static void cb_back_(Fl_Button*, void*);
......@@ -66,6 +62,9 @@ private:
Fl_Input *find_;
void cb_find__i(Fl_Input*, void*);
static void cb_find_(Fl_Input*, void*);
Fl_Help_View *view_;
void cb_view__i(Fl_Help_View*, void*);
static void cb_view_(Fl_Help_View*, void*);
public:
~Fl_Help_Dialog();
int h();
......@@ -89,5 +88,5 @@ public:
#endif
//
// End of "$Id: Fl_Help_Dialog.H 4582 2005-09-25 16:54:40Z matt $".
// End of "$Id: Fl_Help_Dialog.H 5643 2007-01-28 19:36:51Z mike $".
//
//
// "$Id: Fl_Help_View.H 4288 2005-04-16 00:13:17Z mike $"
// "$Id: Fl_Help_View.H 5207 2006-06-18 15:53:26Z matt $"
//
// Help Viewer widget definitions.
//
......@@ -133,6 +133,21 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
Fl_Scrollbar scrollbar_, // Vertical scrollbar for document
hscrollbar_; // Horizontal scrollbar
static int selection_first;
static int selection_last;
static int selection_push_first;
static int selection_push_last;
static int selection_drag_first;
static int selection_drag_last;
static int selected;
static int draw_mode;
static int mouse_x;
static int mouse_y;
static int current_pos;
static Fl_Help_View *current_view;
static Fl_Color hv_selection_color;
static Fl_Color hv_selection_text_color;
Fl_Help_Block *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
void add_link(const char *n, int xx, int yy, int ww, int hh);
void add_target(const char *n, int yy);
......@@ -158,7 +173,15 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
fl_font(f = fonts_[nfonts_][0],
s = fonts_[nfonts_][1]); }
public:
void hv_draw(const char *t, int x, int y);
char begin_selection();
char extend_selection();
void end_selection(int c=0);
void clear_global_selection();
Fl_Help_Link *find_link(int, int);
void follow_link(Fl_Help_Link*);
public:
Fl_Help_View(int xx, int yy, int ww, int hh, const char *l = 0);
~Fl_Help_View();
......@@ -186,10 +209,12 @@ class FL_EXPORT Fl_Help_View : public Fl_Group //// Help viewer widget
int leftline() const { return (leftline_); }
void value(const char *v);
const char *value() const { return (value_); }
void clear_selection();
void select_all();
};