mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
Fl_Text* widgets backported to 1.1 (Carl, please confirm that I haven't
goofed with the layout->resize conversion. Also check fix for mMaxSize being 0 so I set it to textsize()) contrast,inactive -> fl_contrast, fl_inactive, with defines for old names. fl_rect() and fl_rectf() with color args. fl_height, etc. with font,size args. Send FL_RELEASE and FL_DRAG events to the pushed() widget by default. Fix file chooser so it doesn't automatically change dirs if the only matching name is a dir. Updated Fl_Browser_ and Fl_Scrollbar for better mouse wheel support. Moved DLL definitions to new Fl_Export.H. Restore callback functionality in file chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -23,7 +23,7 @@ TODO - Added keyboard navigation to all widgets.
|
|||||||
TODO - Added the Fl_Check_Browser, and Fl_Tree_Browser
|
TODO - Added the Fl_Check_Browser, and Fl_Tree_Browser
|
||||||
widgets from the bazaar.
|
widgets from the bazaar.
|
||||||
|
|
||||||
TODO - Added 2.0 Fl_Text_Display and Fl_Text_Editor widgets
|
- Added 2.0 Fl_Text_Display and Fl_Text_Editor widgets
|
||||||
based on NEdit.
|
based on NEdit.
|
||||||
|
|
||||||
TODO - The Fl_Choice widget now looks more line a combo box
|
TODO - The Fl_Choice widget now looks more line a combo box
|
||||||
|
|||||||
+7
-16
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $"
|
// "$Id: Enumerations.H,v 1.18.2.14.2.3 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Enumerations for the Fast Light Tool Kit (FLTK).
|
// Enumerations for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,19 +26,8 @@
|
|||||||
#ifndef Fl_Enumerations_H
|
#ifndef Fl_Enumerations_H
|
||||||
#define Fl_Enumerations_H
|
#define Fl_Enumerations_H
|
||||||
|
|
||||||
//
|
# include "Fl_Export.H"
|
||||||
// The following is only used when building DLLs under WIN32 with Visual C++...
|
|
||||||
//
|
|
||||||
|
|
||||||
#if defined(FL_DLL) && defined(_MSC_VER)
|
|
||||||
# ifdef FL_LIBRARY
|
|
||||||
# define FL_EXPORT __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_EXPORT __declspec(dllimport)
|
|
||||||
# endif /* FL_LIBRARY */
|
|
||||||
#else
|
|
||||||
# define FL_EXPORT
|
|
||||||
#endif /* FL_DLL && _MSC_VER */
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// The FLTK version number; this is changed slightly from the beta versions
|
// The FLTK version number; this is changed slightly from the beta versions
|
||||||
@@ -300,8 +289,10 @@ enum Fl_Color { // standard colors
|
|||||||
FL_COLOR_CUBE = 56
|
FL_COLOR_CUBE = 56
|
||||||
};
|
};
|
||||||
|
|
||||||
FL_EXPORT Fl_Color inactive(Fl_Color c);
|
#define inactive fl_inactive
|
||||||
FL_EXPORT Fl_Color contrast(Fl_Color fg, Fl_Color bg);
|
FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
|
||||||
|
#define contrast fl_contrast
|
||||||
|
FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
|
||||||
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
|
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
|
||||||
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
|
inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
|
||||||
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
|
inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
|
||||||
@@ -374,5 +365,5 @@ enum Fl_Damage {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Enumerations.H,v 1.18.2.14.2.2 2001/08/02 16:17:04 easysw Exp $".
|
// End of "$Id: Enumerations.H,v 1.18.2.14.2.3 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+43
-33
@@ -1,37 +1,47 @@
|
|||||||
/*
|
//
|
||||||
The following is only used when building DLLs under WIN32
|
// "$Id: Fl_Export.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
*/
|
//
|
||||||
|
// WIN32 DLL export definitions for the Fast Light Tool Kit (FLTK).
|
||||||
|
//
|
||||||
|
// Copyright 1998-2001 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
|
||||||
|
// License as published by the Free Software Foundation; either
|
||||||
|
// version 2 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
|
||||||
|
// Library General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Library 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.
|
||||||
|
//
|
||||||
|
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||||
|
//
|
||||||
|
|
||||||
#if defined(WIN32) && defined(FL_SHARED)
|
#ifndef Fl_Export_H
|
||||||
|
#define Fl_Export_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// The following is only used when building DLLs under WIN32 with Visual C++...
|
||||||
|
//
|
||||||
|
|
||||||
|
#if defined(FL_DLL) && defined(_MSC_VER)
|
||||||
# ifdef FL_LIBRARY
|
# ifdef FL_LIBRARY
|
||||||
# define FL_API __declspec(dllexport)
|
# define FL_EXPORT __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
# define FL_API __declspec(dllimport)
|
# define FL_EXPORT __declspec(dllimport)
|
||||||
# endif
|
# endif /* FL_LIBRARY */
|
||||||
# ifdef FL_IMAGES_LIBRARY
|
|
||||||
# define FL_IMAGES_API __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_IMAGES_API __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
# ifdef FL_GLUT_LIBRARY
|
|
||||||
# define FL_GLUT_API __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_GLUT_API __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
# ifdef FL_FORMS_LIBRARY
|
|
||||||
# define FL_FORMS_API __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_FORMS_API __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
# ifdef FL_GL_LIBRARY
|
|
||||||
# define FL_GL_API __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_GL_API __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
#else
|
#else
|
||||||
# define FL_API
|
# define FL_EXPORT
|
||||||
# define FL_IMAGES_API
|
#endif /* FL_DLL && _MSC_VER */
|
||||||
# define FL_GLUT_API
|
|
||||||
# define FL_FORMS_API
|
#endif // !Fl_Export_H
|
||||||
# define FL_GL_API
|
|
||||||
#endif
|
//
|
||||||
|
// End of "$Id: Fl_Export.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
|
//
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ private:
|
|||||||
static void cb_dirMenu(Fl_Choice*, void*);
|
static void cb_dirMenu(Fl_Choice*, void*);
|
||||||
inline void cb_allfiles_i(Fl_Button*, void*);
|
inline void cb_allfiles_i(Fl_Button*, void*);
|
||||||
static void cb_allfiles(Fl_Button*, void*);
|
static void cb_allfiles(Fl_Button*, void*);
|
||||||
|
void (*callback_)(Fl_FileChooser*, void *);
|
||||||
|
void *data_;
|
||||||
char directory_[1024];
|
char directory_[1024];
|
||||||
int type_;
|
int type_;
|
||||||
void fileListCB();
|
void fileListCB();
|
||||||
@@ -51,6 +53,7 @@ private:
|
|||||||
void newdir();
|
void newdir();
|
||||||
void up();
|
void up();
|
||||||
public:
|
public:
|
||||||
|
void callback(void (*cb)(Fl_FileChooser *, void *), void *d);
|
||||||
void color(Fl_Color c);
|
void color(Fl_Color c);
|
||||||
Fl_Color color();
|
Fl_Color color();
|
||||||
int count();
|
int count();
|
||||||
|
|||||||
+5
-5
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Buffer.H,v 1.3 2001/02/21 06:15:44 clip Exp $"
|
// "$Id: Fl_Text_Buffer.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Header file for Fl_Text_Buffer class.
|
// Header file for Fl_Text_Buffer class.
|
||||||
//
|
//
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
of a single buffer character */
|
of a single buffer character */
|
||||||
#define FL_TEXT_MAX_EXP_CHAR_LEN 20
|
#define FL_TEXT_MAX_EXP_CHAR_LEN 20
|
||||||
|
|
||||||
#include <FL/Fl_Export.H>
|
#include "Fl_Export.H"
|
||||||
|
|
||||||
class FL_API Fl_Text_Selection {
|
class FL_EXPORT Fl_Text_Selection {
|
||||||
friend class Fl_Text_Buffer;
|
friend class Fl_Text_Buffer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -65,7 +65,7 @@ typedef void (*Fl_Text_Modify_Cb)(int pos, int nInserted, int nDeleted,
|
|||||||
int nRestyled, const char* deletedText,
|
int nRestyled, const char* deletedText,
|
||||||
void* cbArg);
|
void* cbArg);
|
||||||
|
|
||||||
class FL_API Fl_Text_Buffer {
|
class FL_EXPORT Fl_Text_Buffer {
|
||||||
public:
|
public:
|
||||||
Fl_Text_Buffer(int requestedSize = 0);
|
Fl_Text_Buffer(int requestedSize = 0);
|
||||||
~Fl_Text_Buffer();
|
~Fl_Text_Buffer();
|
||||||
@@ -237,5 +237,5 @@ class FL_API Fl_Text_Buffer {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Buffer.H,v 1.3 2001/02/21 06:15:44 clip Exp $".
|
// End of "$Id: Fl_Text_Buffer.H,v 1.3.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+26
-14
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Display.H,v 1.4 2000/08/20 04:31:36 spitzak Exp $"
|
// "$Id: Fl_Text_Display.H,v 1.4.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Header file for Fl_Text_Display class.
|
// Header file for Fl_Text_Display class.
|
||||||
//
|
//
|
||||||
@@ -27,13 +27,13 @@
|
|||||||
#ifndef FL_TEXT_DISPLAY_H
|
#ifndef FL_TEXT_DISPLAY_H
|
||||||
#define FL_TEXT_DISPLAY_H
|
#define FL_TEXT_DISPLAY_H
|
||||||
|
|
||||||
#include <FL/fl_draw.H>
|
#include "fl_draw.H"
|
||||||
#include <FL/Fl_Group.H>
|
#include "Fl_Group.H"
|
||||||
#include <FL/Fl_Widget.H>
|
#include "Fl_Widget.H"
|
||||||
#include <FL/Fl_Scrollbar.H>
|
#include "Fl_Scrollbar.H"
|
||||||
#include <FL/Fl_Text_Buffer.H>
|
#include "Fl_Text_Buffer.H"
|
||||||
|
|
||||||
class FL_API Fl_Text_Display: public Fl_Group {
|
class FL_EXPORT Fl_Text_Display: public Fl_Group {
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR,
|
NORMAL_CURSOR, CARET_CURSOR, DIM_CURSOR,
|
||||||
@@ -54,7 +54,7 @@ class FL_API Fl_Text_Display: public Fl_Group {
|
|||||||
|
|
||||||
typedef void (*Unfinished_Style_Cb)();
|
typedef void (*Unfinished_Style_Cb)();
|
||||||
|
|
||||||
struct FL_API Style_Table_Entry {
|
struct FL_EXPORT Style_Table_Entry {
|
||||||
Fl_Color color;
|
Fl_Color color;
|
||||||
Fl_Font font;
|
Fl_Font font;
|
||||||
int size;
|
int size;
|
||||||
@@ -85,12 +85,13 @@ class FL_API Fl_Text_Display: public Fl_Group {
|
|||||||
void hide_cursor() { show_cursor(0); }
|
void hide_cursor() { show_cursor(0); }
|
||||||
void cursor_style(int style);
|
void cursor_style(int style);
|
||||||
int scrollbar_width() { return scrollbar_width_; }
|
int scrollbar_width() { return scrollbar_width_; }
|
||||||
Fl_Flags scrollbar_align() { return scrollbar_align_; }
|
Fl_Align scrollbar_align() { return scrollbar_align_; }
|
||||||
void scrollbar_width(int w) { scrollbar_width_ = w; }
|
void scrollbar_width(int w) { scrollbar_width_ = w; }
|
||||||
void scrollbar_align(Fl_Flags a) { scrollbar_align_ = a; }
|
void scrollbar_align(Fl_Align a) { scrollbar_align_ = a; }
|
||||||
int word_start(int pos) { return buffer()->word_start(pos); }
|
int word_start(int pos) { return buffer()->word_start(pos); }
|
||||||
int word_end(int pos) { return buffer()->word_end(pos); }
|
int word_end(int pos) { return buffer()->word_end(pos); }
|
||||||
|
|
||||||
|
|
||||||
void highlight_data(Fl_Text_Buffer *styleBuffer,
|
void highlight_data(Fl_Text_Buffer *styleBuffer,
|
||||||
Style_Table_Entry *styleTable,
|
Style_Table_Entry *styleTable,
|
||||||
int nStyles, char unfinishedStyle,
|
int nStyles, char unfinishedStyle,
|
||||||
@@ -100,12 +101,19 @@ class FL_API Fl_Text_Display: public Fl_Group {
|
|||||||
int position_style(int lineStartPos, int lineLen, int lineIndex,
|
int position_style(int lineStartPos, int lineLen, int lineIndex,
|
||||||
int dispIndex);
|
int dispIndex);
|
||||||
|
|
||||||
|
Fl_Font textfont() const {return (Fl_Font)textfont_;}
|
||||||
|
void textfont(uchar s) {textfont_ = s;}
|
||||||
|
uchar textsize() const {return textsize_;}
|
||||||
|
void textsize(uchar s) {textsize_ = s;}
|
||||||
|
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
|
||||||
|
void textcolor(uchar n) {textcolor_ = n;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Most (all?) of this stuff should only be called from layout() or
|
// Most (all?) of this stuff should only be called from resize() or
|
||||||
// draw().
|
// draw().
|
||||||
// Anything with "vline" indicates thats it deals with currently
|
// Anything with "vline" indicates thats it deals with currently
|
||||||
// visible lines.
|
// visible lines.
|
||||||
virtual void layout();
|
virtual void resize(int X, int Y, int W, int H);
|
||||||
|
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
void draw_text(int X, int Y, int W, int H);
|
void draw_text(int X, int Y, int W, int H);
|
||||||
@@ -204,14 +212,18 @@ class FL_API Fl_Text_Display: public Fl_Group {
|
|||||||
Fl_Scrollbar* mHScrollBar;
|
Fl_Scrollbar* mHScrollBar;
|
||||||
Fl_Scrollbar* mVScrollBar;
|
Fl_Scrollbar* mVScrollBar;
|
||||||
int scrollbar_width_;
|
int scrollbar_width_;
|
||||||
Fl_Flags scrollbar_align_;
|
Fl_Align scrollbar_align_;
|
||||||
int dragPos, dragType, dragging;
|
int dragPos, dragType, dragging;
|
||||||
int display_insert_position_hint;
|
int display_insert_position_hint;
|
||||||
struct { int x, y, w, h; } text_area;
|
struct { int x, y, w, h; } text_area;
|
||||||
|
|
||||||
|
uchar textfont_;
|
||||||
|
uchar textsize_;
|
||||||
|
uchar textcolor_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Display.H,v 1.4 2000/08/20 04:31:36 spitzak Exp $".
|
// End of "$Id: Fl_Text_Display.H,v 1.4.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-5
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Editor.H,v 1.1 2000/08/04 10:21:59 clip Exp $"
|
// "$Id: Fl_Text_Editor.H,v 1.1.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Header file for Fl_Text_Editor class.
|
// Header file for Fl_Text_Editor class.
|
||||||
//
|
//
|
||||||
@@ -28,16 +28,16 @@
|
|||||||
#ifndef FL_TEXT_EDITOR_H
|
#ifndef FL_TEXT_EDITOR_H
|
||||||
#define FL_TEXT_EDITOR_H
|
#define FL_TEXT_EDITOR_H
|
||||||
|
|
||||||
#include <FL/Fl_Text_Display.H>
|
#include "Fl_Text_Display.H"
|
||||||
|
|
||||||
// key will match in any state
|
// key will match in any state
|
||||||
#define FL_TEXT_EDITOR_ANY_STATE (-1L)
|
#define FL_TEXT_EDITOR_ANY_STATE (-1L)
|
||||||
|
|
||||||
class FL_API Fl_Text_Editor : public Fl_Text_Display {
|
class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
|
||||||
public:
|
public:
|
||||||
typedef int (*Key_Func)(int key, Fl_Text_Editor* editor);
|
typedef int (*Key_Func)(int key, Fl_Text_Editor* editor);
|
||||||
|
|
||||||
struct FL_API Key_Binding {
|
struct FL_EXPORT Key_Binding {
|
||||||
int key;
|
int key;
|
||||||
int state;
|
int state;
|
||||||
Key_Func function;
|
Key_Func function;
|
||||||
@@ -100,6 +100,6 @@ class FL_API Fl_Text_Editor : public Fl_Text_Display {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Editor.H,v 1.1 2000/08/04 10:21:59 clip Exp $".
|
// End of "$Id: Fl_Text_Editor.H,v 1.1.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|||||||
+3
-15
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: filename.H,v 1.11.2.4 2001/01/22 15:13:38 easysw Exp $"
|
// "$Id: filename.H,v 1.11.2.4.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Filename header file for the Fast Light Tool Kit (FLTK).
|
// Filename header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -26,19 +26,7 @@
|
|||||||
#ifndef FL_FILENAME_H
|
#ifndef FL_FILENAME_H
|
||||||
#define FL_FILENAME_H
|
#define FL_FILENAME_H
|
||||||
|
|
||||||
//
|
# include "Fl_Export.H"
|
||||||
// The following is only used when building DLLs under WIN32 with Visual C++...
|
|
||||||
//
|
|
||||||
|
|
||||||
#if defined(FL_DLL) && defined(_MSC_VER)
|
|
||||||
# ifdef FL_LIBRARY
|
|
||||||
# define FL_EXPORT __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define FL_EXPORT __declspec(dllimport)
|
|
||||||
# endif /* FL_LIBRARY */
|
|
||||||
#else
|
|
||||||
# define FL_EXPORT
|
|
||||||
#endif /* FL_DLL && _MSC_VER */
|
|
||||||
|
|
||||||
#define FL_PATH_MAX 256 // all buffers are this length
|
#define FL_PATH_MAX 256 // all buffers are this length
|
||||||
|
|
||||||
@@ -76,5 +64,5 @@ FL_EXPORT int filename_list(const char *d, struct dirent ***list);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: filename.H,v 1.11.2.4 2001/01/22 15:13:38 easysw Exp $".
|
// End of "$Id: filename.H,v 1.11.2.4.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_draw.H,v 1.9.2.6 2001/04/13 19:07:40 easysw Exp $"
|
// "$Id: fl_draw.H,v 1.9.2.6.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
|
// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -66,7 +66,9 @@ enum {
|
|||||||
|
|
||||||
// rectangles tweaked to exactly fill the pixel rectangle:
|
// rectangles tweaked to exactly fill the pixel rectangle:
|
||||||
FL_EXPORT void fl_rect(int x, int y, int w, int h);
|
FL_EXPORT void fl_rect(int x, int y, int w, int h);
|
||||||
|
inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);}
|
||||||
FL_EXPORT void fl_rectf(int x, int y, int w, int h);
|
FL_EXPORT void fl_rectf(int x, int y, int w, int h);
|
||||||
|
inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);}
|
||||||
|
|
||||||
// line segments:
|
// line segments:
|
||||||
FL_EXPORT void fl_line(int,int, int,int);
|
FL_EXPORT void fl_line(int,int, int,int);
|
||||||
@@ -134,6 +136,7 @@ inline int fl_size() {return fl_size_;}
|
|||||||
|
|
||||||
// information you can get about the current font:
|
// information you can get about the current font:
|
||||||
FL_EXPORT int fl_height(); // using "size" should work ok
|
FL_EXPORT int fl_height(); // using "size" should work ok
|
||||||
|
inline int fl_height(int, int size) {return size;}
|
||||||
FL_EXPORT int fl_descent();
|
FL_EXPORT int fl_descent();
|
||||||
FL_EXPORT double fl_width(const char*);
|
FL_EXPORT double fl_width(const char*);
|
||||||
FL_EXPORT double fl_width(const char*, int n);
|
FL_EXPORT double fl_width(const char*, int n);
|
||||||
@@ -181,5 +184,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_draw.H,v 1.9.2.6 2001/04/13 19:07:40 easysw Exp $".
|
// End of "$Id: fl_draw.H,v 1.9.2.6.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_file_chooser.H,v 1.5.2.3.2.1 2001/08/03 18:46:57 easysw Exp $"
|
// "$Id: fl_file_chooser.H,v 1.5.2.3.2.2 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// File chooser header file for the Fast Light Tool Kit (FLTK).
|
// File chooser header file for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -29,9 +29,10 @@
|
|||||||
#include "Enumerations.H"
|
#include "Enumerations.H"
|
||||||
|
|
||||||
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname);
|
FL_EXPORT char *fl_file_chooser(const char *message,const char *pat,const char *fname);
|
||||||
|
FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_file_chooser.H,v 1.5.2.3.2.1 2001/08/03 18:46:57 easysw Exp $".
|
// End of "$Id: fl_file_chooser.H,v 1.5.2.3.2.2 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+113
-108
@@ -1,80 +1,84 @@
|
|||||||
# DO NOT DELETE
|
# DO NOT DELETE
|
||||||
|
|
||||||
Fl_Function_Type.o: ../FL/Fl.H ../FL/Enumerations.H Fl_Type.h
|
Fl_Function_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
Fl_Function_Type.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
||||||
Fl_Function_Type.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Group.H
|
Fl_Function_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
Fl_Function_Type.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
Fl_Function_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Menu_Bar.H ../FL/fl_show_input.H ../FL/fl_ask.H
|
Fl_Function_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
|
||||||
Fl_Function_Type.o: function_panel.h ../FL/Fl_Window.H
|
Fl_Function_Type.o: ../FL/fl_show_input.H ../FL/fl_ask.H function_panel.h
|
||||||
Fl_Function_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
Fl_Function_Type.o: ../FL/Fl_Window.H ../FL/Fl_Light_Button.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
Fl_Function_Type.o: ../FL/Fl_Button.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||||
Fl_Function_Type.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Box.H
|
Fl_Function_Type.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Box.H
|
||||||
Fl_Function_Type.o: ../FL/fl_ask.H
|
Fl_Function_Type.o: ../FL/fl_ask.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl.H ../FL/Enumerations.H Fl_Widget_Type.h Fl_Type.h
|
Fl_Menu_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
Fl_Menu_Type.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
||||||
Fl_Menu_Type.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Group.H
|
Fl_Menu_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
Fl_Menu_Type.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
Fl_Menu_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Window.H
|
Fl_Menu_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H alignment_panel.h
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
Fl_Menu_Type.o: ../FL/Fl_Window.H ../FL/Fl_Box.H ../FL/Fl_Input.H
|
||||||
Fl_Menu_Type.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
Fl_Menu_Type.o: ../FL/Fl_Input_.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
|
||||||
Fl_Menu_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/Fl_Output.H
|
Fl_Menu_Type.o: ../FL/Fl_Button.H ../FL/fl_message.H ../FL/fl_ask.H
|
||||||
Fl_Menu_Type.o: Shortcut_Button.h ../FL/fl_draw.H
|
Fl_Menu_Type.o: ../FL/Fl_Output.H Shortcut_Button.h ../FL/fl_draw.H
|
||||||
Fl_Group_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Group.H
|
Fl_Group_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Group_Type.o: ../FL/fl_message.H ../FL/fl_ask.H Fl_Widget_Type.h Fl_Type.h
|
Fl_Group_Type.o: ../FL/Fl_Group.H ../FL/fl_message.H ../FL/fl_ask.H
|
||||||
Fl_Group_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
Fl_Group_Type.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
||||||
Fl_Group_Type.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Group.H
|
Fl_Group_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
||||||
Fl_Group_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
|
Fl_Group_Type.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Menu_.H
|
||||||
Fl_Group_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
|
Fl_Group_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
||||||
Fl_Group_Type.o: ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
|
Fl_Group_Type.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Scroll.H ../FL/Fl_Scrollbar.H
|
||||||
Fl_Group_Type.o: ../FL/Fl_Valuator.H
|
Fl_Group_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Group.H
|
Fl_Widget_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H Fl_Widget_Type.h
|
Fl_Widget_Type.o: ../FL/Fl_Group.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||||
Fl_Widget_Type.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
Fl_Widget_Type.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
Fl_Widget_Type.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Menu_.H
|
Fl_Widget_Type.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Pack.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
Fl_Widget_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Window.H
|
Fl_Widget_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H alignment_panel.h
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
|
Fl_Widget_Type.o: ../FL/Fl_Window.H ../FL/Fl_Box.H ../FL/Fl_Button.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Button.H ../FL/fl_message.H ../FL/fl_ask.H
|
Fl_Widget_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H widget_panel.h
|
Fl_Widget_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/Fl_Slider.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Value_Input.H ../FL/Fl_Input.H Shortcut_Button.h
|
Fl_Widget_Type.o: ../FL/Fl_Valuator.H widget_panel.h ../FL/Fl_Value_Input.H
|
||||||
Fl_Widget_Type.o: ../FL/Fl_Return_Button.H ../FL/fl_show_colormap.H
|
Fl_Widget_Type.o: ../FL/Fl_Input.H Shortcut_Button.h ../FL/Fl_Return_Button.H
|
||||||
Fl_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Browser_.H
|
Fl_Widget_Type.o: ../FL/fl_show_colormap.H
|
||||||
Fl_Type.o: ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H
|
Fl_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Type.o: ../FL/Fl_Valuator.H ../FL/fl_draw.H Fl_Type.h ../FL/Fl_Widget.H
|
Fl_Type.o: ../FL/Fl_Browser_.H ../FL/Fl_Group.H ../FL/Fl_Scrollbar.H
|
||||||
Fl_Type.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
Fl_Type.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/fl_draw.H Fl_Type.h
|
||||||
Fl_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
Fl_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
||||||
Fl_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
Fl_Type.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
|
||||||
Fl_Type.o: ../FL/Fl_Menu_Bar.H
|
Fl_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
Fl_Window_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Overlay_Window.H
|
Fl_Type.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
Fl_Window_Type.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fl_Window_Type.o: ../FL/fl_message.H ../FL/fl_ask.H ../FL/fl_draw.H
|
Fl_Window_Type.o: ../FL/Fl_Overlay_Window.H ../FL/Fl_Double_Window.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H Fl_Widget_Type.h
|
Fl_Window_Type.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/fl_message.H
|
||||||
Fl_Window_Type.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
Fl_Window_Type.o: ../FL/fl_ask.H ../FL/fl_draw.H ../FL/Fl_Menu_Item.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
Fl_Window_Type.o: ../FL/Fl_Widget.H Fl_Widget_Type.h Fl_Type.h
|
||||||
Fl_Window_Type.o: ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
Fl_Window_Type.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
Fl_Window_Type.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Window.H
|
Fl_Window_Type.o: ../FL/Fl_Group.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
Fl_Window_Type.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
Fl_Window_Type.o: alignment_panel.h ../FL/Fl_Window.H ../FL/Fl_Box.H
|
||||||
Fl_Window_Type.o: widget_panel.h ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
|
Fl_Window_Type.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Button.H
|
||||||
Fl_Window_Type.o: ../FL/Fl_Input.H Shortcut_Button.h ../FL/Fl_Return_Button.H
|
Fl_Window_Type.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H widget_panel.h
|
||||||
Fluid_Image.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Widget.H Fl_Type.h
|
Fl_Window_Type.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H ../FL/Fl_Input.H
|
||||||
Fluid_Image.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
Fl_Window_Type.o: Shortcut_Button.h ../FL/Fl_Return_Button.H
|
||||||
Fluid_Image.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Pack.H
|
Fluid_Image.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
Fluid_Image.o: ../FL/Fl_Group.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
|
Fluid_Image.o: ../FL/Fl_Widget.H Fl_Type.h ../FL/Fl_Menu.H
|
||||||
Fluid_Image.o: ../FL/Fl_Menu_.H ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H
|
Fluid_Image.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
||||||
Fluid_Image.o: ../FL/filename.H ../FL/Fl_Pixmap.H
|
Fluid_Image.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
|
||||||
code.o: ../FL/Fl.H ../FL/Enumerations.H Fl_Type.h ../FL/Fl_Widget.H
|
Fluid_Image.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
code.o: ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
Fluid_Image.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H ../FL/filename.H
|
||||||
code.o: ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
Fluid_Image.o: ../FL/Fl_Pixmap.H
|
||||||
code.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H ../FL/Fl_Choice.H
|
code.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H Fl_Type.h
|
||||||
code.o: ../FL/Fl_Menu_Bar.H alignment_panel.h ../FL/Fl_Window.H
|
code.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
||||||
code.o: ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Button.H
|
code.o: ../FL/Fl_Tabs.H ../FL/Fl_Group.H ../FL/Fl_Pack.H ../FL/Fl_Group.H
|
||||||
code.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/filename.H
|
code.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_.H
|
||||||
factory.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Group.H
|
code.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_Bar.H alignment_panel.h
|
||||||
|
code.o: ../FL/Fl_Window.H ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||||
|
code.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
||||||
|
code.o: ../FL/filename.H
|
||||||
|
factory.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H ../FL/Fl_Group.H
|
||||||
factory.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../config.h
|
factory.o: ../FL/Fl_Menu_Item.H ../FL/Fl_Widget.H ../config.h
|
||||||
factory.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
factory.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
||||||
factory.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
factory.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H
|
||||||
@@ -91,43 +95,44 @@ factory.o: ../FL/Fl_Clock.H ../FL/Fl_Adjuster.H ../FL/Fl_Dial.H
|
|||||||
factory.o: ../FL/Fl_Roller.H ../FL/Fl_Scrollbar.H ../FL/Fl_Output.H
|
factory.o: ../FL/Fl_Roller.H ../FL/Fl_Scrollbar.H ../FL/Fl_Output.H
|
||||||
factory.o: ../FL/Fl_Value_Input.H ../FL/Fl_Input.H ../FL/Fl_Value_Output.H
|
factory.o: ../FL/Fl_Value_Input.H ../FL/Fl_Input.H ../FL/Fl_Value_Output.H
|
||||||
factory.o: ../FL/Fl_Value_Slider.H
|
factory.o: ../FL/Fl_Value_Slider.H
|
||||||
file.o: alignment_panel.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Window.H
|
file.o: alignment_panel.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
file.o: ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
file.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Input.H
|
||||||
file.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
file.o: ../FL/Fl_Input_.H ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
|
||||||
file.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/fl_message.H ../FL/fl_ask.H
|
file.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
|
||||||
file.o: Fl_Widget_Type.h Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
file.o: ../FL/fl_message.H ../FL/fl_ask.H Fl_Widget_Type.h Fl_Type.h
|
||||||
file.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
|
file.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
||||||
file.o: ../FL/Fl_Group.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
|
file.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Menu_.H
|
||||||
file.o: ../FL/Fl_Menu_Bar.H
|
file.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_Bar.H
|
||||||
fluid.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Double_Window.H
|
fluid.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
fluid.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Button.H
|
fluid.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
fluid.o: ../FL/Fl_Hold_Browser.H ../FL/Fl_Browser.H ../FL/Fl_Browser_.H
|
fluid.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Hold_Browser.H
|
||||||
fluid.o: ../FL/Fl_Scrollbar.H ../FL/Fl_Slider.H ../FL/Fl_Valuator.H
|
fluid.o: ../FL/Fl_Browser.H ../FL/Fl_Browser_.H ../FL/Fl_Scrollbar.H
|
||||||
fluid.o: ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H ../FL/Fl_Input.H
|
fluid.o: ../FL/Fl_Slider.H ../FL/Fl_Valuator.H ../FL/Fl_Menu_Bar.H
|
||||||
fluid.o: ../FL/Fl_Input_.H ../FL/fl_ask.H ../FL/fl_draw.H
|
fluid.o: ../FL/Fl_Menu_.H ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_ask.H
|
||||||
fluid.o: ../FL/fl_file_chooser.H ../FL/fl_message.H ../FL/fl_ask.H
|
fluid.o: ../FL/fl_draw.H ../FL/fl_file_chooser.H ../FL/fl_message.H
|
||||||
fluid.o: ../FL/filename.H about_panel.h ../FL/Fl_Window.H ../FL/Fl_Group.H
|
fluid.o: ../FL/fl_ask.H ../FL/filename.H about_panel.h ../FL/Fl_Window.H
|
||||||
fluid.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H Fl_Type.h
|
fluid.o: ../FL/Fl_Group.H ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
|
||||||
fluid.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
fluid.o: Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H
|
||||||
fluid.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Menu_.H
|
fluid.o: Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Menu_.H
|
||||||
fluid.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Choice.H
|
fluid.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Choice.H
|
||||||
about_panel.o: about_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
about_panel.o: about_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
||||||
about_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Group.H
|
about_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
about_panel.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Return_Button.H
|
about_panel.o: ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Button.H
|
||||||
about_panel.o: ../FL/Fl_Button.H
|
about_panel.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H
|
||||||
widget_panel.o: widget_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
widget_panel.o: widget_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
||||||
widget_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Input.H
|
widget_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
widget_panel.o: ../FL/Fl_Input_.H ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
widget_panel.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Light_Button.H
|
||||||
widget_panel.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H ../FL/Fl_Button.H
|
widget_panel.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
|
||||||
widget_panel.o: ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H ../FL/Fl_Input.H
|
widget_panel.o: ../FL/Fl_Button.H ../FL/Fl_Value_Input.H ../FL/Fl_Valuator.H
|
||||||
widget_panel.o: Shortcut_Button.h ../FL/Fl_Group.H ../FL/Fl_Box.H
|
widget_panel.o: ../FL/Fl_Input.H Shortcut_Button.h ../FL/Fl_Group.H
|
||||||
widget_panel.o: ../FL/Fl_Return_Button.H
|
widget_panel.o: ../FL/Fl_Box.H ../FL/Fl_Return_Button.H
|
||||||
alignment_panel.o: alignment_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
alignment_panel.o: alignment_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
||||||
alignment_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Box.H
|
alignment_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
alignment_panel.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/Fl_Button.H
|
alignment_panel.o: ../FL/Fl_Box.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
||||||
alignment_panel.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H
|
alignment_panel.o: ../FL/Fl_Button.H ../FL/Fl_Light_Button.H
|
||||||
alignment_panel.o: ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
|
alignment_panel.o: ../FL/Fl_Button.H ../FL/Fl_Choice.H ../FL/Fl_Menu_.H
|
||||||
function_panel.o: function_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
function_panel.o: function_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
||||||
function_panel.o: ../FL/Fl_Window.H ../FL/Fl_Group.H ../FL/Fl_Light_Button.H
|
function_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
function_panel.o: ../FL/Fl_Button.H ../FL/Fl_Input.H ../FL/Fl_Input_.H
|
function_panel.o: ../FL/Fl_Light_Button.H ../FL/Fl_Button.H ../FL/Fl_Input.H
|
||||||
function_panel.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H ../FL/Fl_Box.H
|
function_panel.o: ../FL/Fl_Input_.H ../FL/Fl_Return_Button.H
|
||||||
|
function_panel.o: ../FL/Fl_Button.H ../FL/Fl_Box.H
|
||||||
|
|||||||
+2
-10
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.3 2001/08/03 15:48:20 easysw Exp $"
|
// "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.4 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
|
// Base Browser widget class for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -551,14 +551,6 @@ int Fl_Browser_::handle(int event) {
|
|||||||
static char whichway;
|
static char whichway;
|
||||||
static int py;
|
static int py;
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case FL_MOUSEWHEEL: {
|
|
||||||
int i = position() + Fl::e_dy * incr_height() * 3;
|
|
||||||
if (i < 0) i = 0;
|
|
||||||
else if (i > (full_height() - h())) i = full_height() - h();
|
|
||||||
position(i);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
if (!Fl::event_inside(X, Y, W, H)) return 0;
|
if (!Fl::event_inside(X, Y, W, H)) return 0;
|
||||||
my = py = Fl::event_y();
|
my = py = Fl::event_y();
|
||||||
@@ -715,5 +707,5 @@ void Fl_Browser_::item_select(void*, int) {}
|
|||||||
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
|
int Fl_Browser_::item_selected(void* l) const {return l==selection_;}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.3 2001/08/03 15:48:20 easysw Exp $".
|
// End of "$Id: Fl_Browser_.cxx,v 1.10.2.16.2.4 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+12
-1
@@ -28,7 +28,11 @@ void Fl_FileChooser::cb_Cancel(Fl_Button* o, void* v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void Fl_FileChooser::cb_okButton_i(Fl_Return_Button*, void*) {
|
inline void Fl_FileChooser::cb_okButton_i(Fl_Return_Button*, void*) {
|
||||||
window->hide();
|
// Do any callback that is registered...
|
||||||
|
if (callback_)
|
||||||
|
(*callback_)(this, data_);
|
||||||
|
|
||||||
|
window->hide();
|
||||||
}
|
}
|
||||||
void Fl_FileChooser::cb_okButton(Fl_Return_Button* o, void* v) {
|
void Fl_FileChooser::cb_okButton(Fl_Return_Button* o, void* v) {
|
||||||
((Fl_FileChooser*)(o->parent()->user_data()))->cb_okButton_i(o,v);
|
((Fl_FileChooser*)(o->parent()->user_data()))->cb_okButton_i(o,v);
|
||||||
@@ -150,6 +154,13 @@ Fl_FileChooser::Fl_FileChooser(const char *d, const char *p, int t, const char *
|
|||||||
fileList->filter(p);
|
fileList->filter(p);
|
||||||
type(t);
|
type(t);
|
||||||
value(d);
|
value(d);
|
||||||
|
callback_ = 0;
|
||||||
|
data_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Fl_FileChooser::callback(void (*cb)(Fl_FileChooser *, void *), void *d) {
|
||||||
|
callback_ = cb;
|
||||||
|
data_ = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_FileChooser::color(Fl_Color c) {
|
void Fl_FileChooser::color(Fl_Color c) {
|
||||||
|
|||||||
+17
-4
@@ -16,7 +16,7 @@ class Fl_FileChooser {open
|
|||||||
callback {fileList->deselect();
|
callback {fileList->deselect();
|
||||||
fileName->value("");
|
fileName->value("");
|
||||||
window->hide();} open
|
window->hide();} open
|
||||||
private xywh {208 292 375 315} resizable hotspot
|
private xywh {250 430 375 315} resizable hotspot
|
||||||
code0 {if (title) window->label(title);}
|
code0 {if (title) window->label(title);}
|
||||||
code1 {\#include <stdio.h>}
|
code1 {\#include <stdio.h>}
|
||||||
code2 {\#include <stdlib.h>}
|
code2 {\#include <stdlib.h>}
|
||||||
@@ -32,13 +32,17 @@ window->hide();} open
|
|||||||
label Cancel
|
label Cancel
|
||||||
callback {fileList->deselect();
|
callback {fileList->deselect();
|
||||||
fileName->value("");
|
fileName->value("");
|
||||||
window->hide();} selected
|
window->hide();}
|
||||||
private xywh {285 280 80 25}
|
private xywh {285 280 80 25}
|
||||||
code0 {o->label(fl_cancel);}
|
code0 {o->label(fl_cancel);}
|
||||||
}
|
}
|
||||||
Fl_Return_Button okButton {
|
Fl_Return_Button okButton {
|
||||||
label OK
|
label OK
|
||||||
callback {window->hide();}
|
callback {// Do any callback that is registered...
|
||||||
|
if (callback_)
|
||||||
|
(*callback_)(this, data_);
|
||||||
|
|
||||||
|
window->hide();}
|
||||||
private xywh {200 280 75 25}
|
private xywh {200 280 75 25}
|
||||||
code0 {\#include <FL/fl_ask.H>}
|
code0 {\#include <FL/fl_ask.H>}
|
||||||
code1 {okButton->label(fl_ok);}
|
code1 {okButton->label(fl_ok);}
|
||||||
@@ -86,14 +90,23 @@ if ((f = fl_input("New Filter?",
|
|||||||
code {window->size_range(345, 270, 345);
|
code {window->size_range(345, 270, 345);
|
||||||
fileList->filter(p);
|
fileList->filter(p);
|
||||||
type(t);
|
type(t);
|
||||||
value(d);} {}
|
value(d);
|
||||||
|
callback_ = 0;
|
||||||
|
data_ = 0;} {}
|
||||||
}
|
}
|
||||||
|
decl {void (*callback_)(Fl_FileChooser*, void *);} {}
|
||||||
|
decl {void *data_;} {}
|
||||||
decl {char directory_[1024];} {}
|
decl {char directory_[1024];} {}
|
||||||
decl {int type_;} {}
|
decl {int type_;} {}
|
||||||
decl {void fileListCB();} {}
|
decl {void fileListCB();} {}
|
||||||
decl {void fileNameCB();} {}
|
decl {void fileNameCB();} {}
|
||||||
decl {void newdir();} {}
|
decl {void newdir();} {}
|
||||||
decl {void up();} {}
|
decl {void up();} {}
|
||||||
|
Function {callback(void (*cb)(Fl_FileChooser *, void *), void *d)} {selected return_type void
|
||||||
|
} {
|
||||||
|
code {callback_ = cb;
|
||||||
|
data_ = d;} {}
|
||||||
|
}
|
||||||
Function {color(Fl_Color c)} {} {
|
Function {color(Fl_Color c)} {} {
|
||||||
code {fileList->color(c);} {}
|
code {fileList->color(c);} {}
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-2
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_FileChooser2.cxx,v 1.15.2.1 2001/08/02 16:17:04 easysw Exp $"
|
// "$Id: Fl_FileChooser2.cxx,v 1.15.2.2 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// More Fl_FileChooser routines.
|
// More Fl_FileChooser routines.
|
||||||
//
|
//
|
||||||
@@ -431,7 +431,14 @@ Fl_FileChooser::fileListCB()
|
|||||||
upButton->activate();
|
upButton->activate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// Do any callback that is registered...
|
||||||
|
if (callback_)
|
||||||
|
(*callback_)(this, data_);
|
||||||
|
|
||||||
|
// Hide the window...
|
||||||
window->hide();
|
window->hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -542,6 +549,10 @@ Fl_FileChooser::fileNameCB()
|
|||||||
if (type_ == MULTI)
|
if (type_ == MULTI)
|
||||||
type(SINGLE);
|
type(SINGLE);
|
||||||
|
|
||||||
|
// Do any callback that is registered...
|
||||||
|
if (callback_)
|
||||||
|
(*callback_)(this, data_);
|
||||||
|
|
||||||
// Hide the window to signal things are done...
|
// Hide the window to signal things are done...
|
||||||
window->hide();
|
window->hide();
|
||||||
}
|
}
|
||||||
@@ -614,6 +625,13 @@ Fl_FileChooser::fileNameCB()
|
|||||||
pathname[sizeof(pathname) - 1] = '\0';
|
pathname[sizeof(pathname) - 1] = '\0';
|
||||||
max_match = strlen(pathname);
|
max_match = strlen(pathname);
|
||||||
|
|
||||||
|
// Strip trailing /, if any...
|
||||||
|
if (pathname[max_match - 1] == '/')
|
||||||
|
{
|
||||||
|
max_match --;
|
||||||
|
pathname[max_match] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
// And then make sure that the item is visible
|
// And then make sure that the item is visible
|
||||||
fileList->topline(i);
|
fileList->topline(i);
|
||||||
first_line = i;
|
first_line = i;
|
||||||
@@ -673,5 +691,5 @@ Fl_FileChooser::fileNameCB()
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_FileChooser2.cxx,v 1.15.2.1 2001/08/02 16:17:04 easysw Exp $".
|
// End of "$Id: Fl_FileChooser2.cxx,v 1.15.2.2 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+12
-6
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.4 2001/08/03 15:48:20 easysw Exp $"
|
// "$Id: Fl_Group.cxx,v 1.8.2.8.2.5 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Group widget for the Fast Light Tool Kit (FLTK).
|
// Group widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -170,10 +170,16 @@ int Fl_Group::handle(int event) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case FL_RELEASE:
|
case FL_RELEASE:
|
||||||
for (i = children(); i--;) {
|
case FL_DRAG:
|
||||||
o = a[i];
|
o = Fl::pushed();
|
||||||
if (o->takesevents() && Fl::event_inside(o)) {
|
if (o == this) return 0;
|
||||||
if (send(o,FL_RELEASE)) return 1;
|
else if (o) send(o,event);
|
||||||
|
else {
|
||||||
|
for (i = children(); i--;) {
|
||||||
|
o = a[i];
|
||||||
|
if (o->takesevents() && Fl::event_inside(o)) {
|
||||||
|
if (send(o,event)) return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -546,5 +552,5 @@ void Fl_Group::draw_outside_label(const Fl_Widget& w) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.4 2001/08/03 15:48:20 easysw Exp $".
|
// End of "$Id: Fl_Group.cxx,v 1.8.2.8.2.5 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14 2001/07/30 18:30:39 easysw Exp $"
|
// "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
|
// Scroll bar widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -122,6 +122,10 @@ int Fl_Scrollbar::handle(int event) {
|
|||||||
case FL_DRAG:
|
case FL_DRAG:
|
||||||
if (pushed_) return 1;
|
if (pushed_) return 1;
|
||||||
return Fl_Slider::handle(event, X,Y,W,H);
|
return Fl_Slider::handle(event, X,Y,W,H);
|
||||||
|
case FL_MOUSEWHEEL :
|
||||||
|
if (horizontal()) return 0;
|
||||||
|
handle_drag(clamp(value() + 3 * linesize_ * Fl::e_dy));
|
||||||
|
return 1;
|
||||||
case FL_SHORTCUT: {
|
case FL_SHORTCUT: {
|
||||||
int v = value();
|
int v = value();
|
||||||
int ls = maximum()>=minimum() ? linesize_ : -linesize_;
|
int ls = maximum()>=minimum() ? linesize_ : -linesize_;
|
||||||
@@ -234,5 +238,5 @@ Fl_Scrollbar::Fl_Scrollbar(int X, int Y, int W, int H, const char* L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14 2001/07/30 18:30:39 easysw Exp $".
|
// End of "$Id: Fl_Scrollbar.cxx,v 1.7.2.14.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Buffer.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $"
|
// "$Id: Fl_Text_Buffer.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
||||||
// the FLTK library granted by Mark Edel.
|
// the FLTK library granted by Mark Edel.
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fltk/Fl_Text_Buffer.h>
|
#include <FL/Fl_Text_Buffer.H>
|
||||||
|
|
||||||
|
|
||||||
#define PREFERRED_GAP_SIZE 80
|
#define PREFERRED_GAP_SIZE 80
|
||||||
@@ -2283,5 +2283,5 @@ Fl_Text_Buffer::outputfile(const char *file, int start, int end, int buflen) {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Buffer.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $".
|
// End of "$Id: Fl_Text_Buffer.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+52
-47
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Display.cxx,v 1.12 2001/07/23 09:50:05 spitzak Exp $"
|
// "$Id: Fl_Text_Display.cxx,v 1.12.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
||||||
// the FLTK library granted by Mark Edel.
|
// the FLTK library granted by Mark Edel.
|
||||||
@@ -22,10 +22,9 @@
|
|||||||
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <fltk/Fl.h>
|
#include <FL/Fl.H>
|
||||||
#include <fltk/Fl_Text_Buffer.h>
|
#include <FL/Fl_Text_Buffer.H>
|
||||||
#include <fltk/Fl_Text_Display.h>
|
#include <FL/Fl_Text_Display.H>
|
||||||
#include <fltk/Fl_Style.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -72,6 +71,11 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
|
|||||||
dragPos = dragType = dragging = 0;
|
dragPos = dragType = dragging = 0;
|
||||||
display_insert_position_hint = 0;
|
display_insert_position_hint = 0;
|
||||||
|
|
||||||
|
box(FL_DOWN_FRAME);
|
||||||
|
textsize(FL_NORMAL_SIZE);
|
||||||
|
textcolor(FL_BLACK);
|
||||||
|
textfont(FL_HELVETICA);
|
||||||
|
|
||||||
Fl_Group* current = Fl_Group::current();
|
Fl_Group* current = Fl_Group::current();
|
||||||
Fl_Group::current(this);
|
Fl_Group::current(this);
|
||||||
|
|
||||||
@@ -83,8 +87,8 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l)
|
|||||||
|
|
||||||
Fl_Group::current(current);
|
Fl_Group::current(current);
|
||||||
|
|
||||||
scrollbar_width(Fl_Style::scrollbar_width);
|
scrollbar_width(16);
|
||||||
scrollbar_align(Fl_Style::scrollbar_align);
|
scrollbar_align(FL_ALIGN_BOTTOM_RIGHT);
|
||||||
|
|
||||||
mCursorOn = 0;
|
mCursorOn = 0;
|
||||||
mCursorPos = 0;
|
mCursorPos = 0;
|
||||||
@@ -182,10 +186,14 @@ int Fl_Text_Display::longest_vline() {
|
|||||||
/*
|
/*
|
||||||
** Change the size of the displayed text area
|
** Change the size of the displayed text area
|
||||||
*/
|
*/
|
||||||
void Fl_Text_Display::layout() {
|
void Fl_Text_Display::resize(int X, int Y, int W, int H) {
|
||||||
|
Fl_Widget::resize(X,Y,W,H);
|
||||||
if (!buffer() || !visible_r()) return;
|
if (!buffer() || !visible_r()) return;
|
||||||
int X = 0, Y = 0, W = w(), H = h();
|
X += Fl::box_dx(box());
|
||||||
text_box()->inset(X, Y, W, H);
|
Y += Fl::box_dy(box());
|
||||||
|
W -= Fl::box_dw(box());
|
||||||
|
H -= Fl::box_dh(box());
|
||||||
|
|
||||||
text_area.x = X+LEFT_MARGIN;
|
text_area.x = X+LEFT_MARGIN;
|
||||||
text_area.y = Y+BOTTOM_MARGIN;
|
text_area.y = Y+BOTTOM_MARGIN;
|
||||||
text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN;
|
text_area.w = W-LEFT_MARGIN-RIGHT_MARGIN;
|
||||||
@@ -193,8 +201,8 @@ void Fl_Text_Display::layout() {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Find the new maximum font height for this text display */
|
/* Find the new maximum font height for this text display */
|
||||||
for (i = 0, mMaxsize = fl_height(text_font(), text_size())+leading(); i < mNStyles; i++)
|
for (i = 0, mMaxsize = fl_height(textfont(), textsize()); i < mNStyles; i++)
|
||||||
mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size)+leading());
|
mMaxsize = max(mMaxsize, fl_height(mStyleTable[i].font, mStyleTable[i].size));
|
||||||
|
|
||||||
// did we have scrollbars initially?
|
// did we have scrollbars initially?
|
||||||
bool hscrollbarvisible = mHScrollBar->visible();
|
bool hscrollbarvisible = mHScrollBar->visible();
|
||||||
@@ -311,10 +319,6 @@ void Fl_Text_Display::layout() {
|
|||||||
|
|
||||||
update_v_scrollbar();
|
update_v_scrollbar();
|
||||||
update_h_scrollbar();
|
update_h_scrollbar();
|
||||||
damage(FL_DAMAGE_CHILD);
|
|
||||||
|
|
||||||
// clear the layout flag
|
|
||||||
damage(damage()&(~FL_DAMAGE_LAYOUT));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -325,7 +329,7 @@ void Fl_Text_Display::draw_text( int left, int top, int width, int height ) {
|
|||||||
int fontHeight, firstLine, lastLine, line;
|
int fontHeight, firstLine, lastLine, line;
|
||||||
|
|
||||||
/* find the line number range of the display */
|
/* find the line number range of the display */
|
||||||
fontHeight = mMaxsize;
|
fontHeight = mMaxsize ? mMaxsize : textsize_;
|
||||||
firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight;
|
firstLine = ( top - text_area.y - fontHeight + 1 ) / fontHeight;
|
||||||
lastLine = ( top + height - text_area.y ) / fontHeight + 1;
|
lastLine = ( top + height - text_area.y ) / fontHeight + 1;
|
||||||
|
|
||||||
@@ -639,7 +643,7 @@ void Fl_Text_Display::display_insert() {
|
|||||||
|
|
||||||
void Fl_Text_Display::show_insert_position() {
|
void Fl_Text_Display::show_insert_position() {
|
||||||
display_insert_position_hint = 1;
|
display_insert_position_hint = 1;
|
||||||
relayout();
|
resize(x(), y(), w(), h());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -750,7 +754,7 @@ void Fl_Text_Display::buffer_modified_cb( int pos, int nInserted, int nDeleted,
|
|||||||
int scrolled, origCursorPos = textD->mCursorPos;
|
int scrolled, origCursorPos = textD->mCursorPos;
|
||||||
|
|
||||||
// refigure scrollbars & stuff
|
// refigure scrollbars & stuff
|
||||||
textD->relayout();
|
textD->resize(textD->x(), textD->y(), textD->w(), textD->h());
|
||||||
|
|
||||||
/* buffer modification cancels vertical cursor motion column */
|
/* buffer modification cancels vertical cursor motion column */
|
||||||
if ( nInserted != 0 || nDeleted != 0 )
|
if ( nInserted != 0 || nDeleted != 0 )
|
||||||
@@ -1040,8 +1044,8 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX,
|
|||||||
pre-allocated and pre-configured. For syntax highlighting, GCs are
|
pre-allocated and pre-configured. For syntax highlighting, GCs are
|
||||||
configured here, on the fly. */
|
configured here, on the fly. */
|
||||||
|
|
||||||
Fl_Font font = text_font();
|
Fl_Font font = textfont();
|
||||||
int size = text_size();
|
int size = textsize();
|
||||||
Fl_Color foreground;
|
Fl_Color foreground;
|
||||||
Fl_Color background;
|
Fl_Color background;
|
||||||
|
|
||||||
@@ -1050,19 +1054,19 @@ void Fl_Text_Display::draw_string( int style, int X, int Y, int toX,
|
|||||||
font = styleRec->font;
|
font = styleRec->font;
|
||||||
size = styleRec->size;
|
size = styleRec->size;
|
||||||
foreground = styleRec->color;
|
foreground = styleRec->color;
|
||||||
background = style & PRIMARY_MASK ? selection_color() :
|
background = style & PRIMARY_MASK ? FL_SELECTION_COLOR :
|
||||||
style & HIGHLIGHT_MASK ? highlight_color() : text_background();
|
style & HIGHLIGHT_MASK ? fl_contrast(textcolor(),color()) : color();
|
||||||
if ( foreground == background ) /* B&W kludge */
|
if ( foreground == background ) /* B&W kludge */
|
||||||
foreground = text_background();
|
foreground = textcolor();
|
||||||
} else if ( style & HIGHLIGHT_MASK ) {
|
} else if ( style & HIGHLIGHT_MASK ) {
|
||||||
foreground = highlight_label_color();
|
foreground = textcolor();
|
||||||
background = highlight_color();
|
background = fl_contrast(textcolor(),color());
|
||||||
} else if ( style & PRIMARY_MASK ) {
|
} else if ( style & PRIMARY_MASK ) {
|
||||||
foreground = selection_text_color();
|
foreground = textcolor();
|
||||||
background = selection_color();
|
background = FL_SELECTION_COLOR;
|
||||||
} else {
|
} else {
|
||||||
foreground = text_color();
|
foreground = textcolor();
|
||||||
background = text_background();
|
background = color();
|
||||||
}
|
}
|
||||||
|
|
||||||
fl_color( background );
|
fl_color( background );
|
||||||
@@ -1101,13 +1105,13 @@ void Fl_Text_Display::clear_rect( int style, int X, int Y,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ( style & HIGHLIGHT_MASK ) {
|
if ( style & HIGHLIGHT_MASK ) {
|
||||||
fl_color( highlight_color() );
|
fl_color( fl_contrast(textcolor(), color()) );
|
||||||
fl_rectf( X, Y, width, height );
|
fl_rectf( X, Y, width, height );
|
||||||
} else if ( style & PRIMARY_MASK ) {
|
} else if ( style & PRIMARY_MASK ) {
|
||||||
fl_color( selection_color() );
|
fl_color( FL_SELECTION_COLOR );
|
||||||
fl_rectf( X, Y, width, height );
|
fl_rectf( X, Y, width, height );
|
||||||
} else {
|
} else {
|
||||||
fl_color( text_background() );
|
fl_color( color() );
|
||||||
fl_rectf( X, Y, width, height );
|
fl_rectf( X, Y, width, height );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1240,8 +1244,8 @@ int Fl_Text_Display::string_width( const char *string, int length, int style ) {
|
|||||||
font = mStyleTable[ ( style & STYLE_LOOKUP_MASK ) - 'A' ].font;
|
font = mStyleTable[ ( style & STYLE_LOOKUP_MASK ) - 'A' ].font;
|
||||||
size = mStyleTable[ ( style & STYLE_LOOKUP_MASK ) - 'A' ].size;
|
size = mStyleTable[ ( style & STYLE_LOOKUP_MASK ) - 'A' ].size;
|
||||||
} else {
|
} else {
|
||||||
font = text_font();
|
font = textfont();
|
||||||
size = text_size();
|
size = textsize();
|
||||||
}
|
}
|
||||||
fl_font( font, size );
|
fl_font( font, size );
|
||||||
|
|
||||||
@@ -1548,7 +1552,7 @@ void Fl_Text_Display::calc_last_char() {
|
|||||||
void Fl_Text_Display::scroll(int topLineNum, int horizOffset) {
|
void Fl_Text_Display::scroll(int topLineNum, int horizOffset) {
|
||||||
mTopLineNumHint = topLineNum;
|
mTopLineNumHint = topLineNum;
|
||||||
mHorizOffsetHint = horizOffset;
|
mHorizOffsetHint = horizOffset;
|
||||||
relayout();
|
resize(x(), y(), w(), h());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Text_Display::scroll_(int topLineNum, int horizOffset) {
|
void Fl_Text_Display::scroll_(int topLineNum, int horizOffset) {
|
||||||
@@ -1644,7 +1648,7 @@ int Fl_Text_Display::measure_vline( int visLineNum ) {
|
|||||||
len = mBuffer->expand_character( lineStartPos + i,
|
len = mBuffer->expand_character( lineStartPos + i,
|
||||||
charCount, expandedChar );
|
charCount, expandedChar );
|
||||||
|
|
||||||
fl_font( text_font(), text_size() );
|
fl_font( textfont(), textsize() );
|
||||||
|
|
||||||
width += ( int ) fl_width( expandedChar, len );
|
width += ( int ) fl_width( expandedChar, len );
|
||||||
|
|
||||||
@@ -1738,25 +1742,26 @@ void Fl_Text_Display::draw(void) {
|
|||||||
if (damage() & FL_DAMAGE_ALL) {
|
if (damage() & FL_DAMAGE_ALL) {
|
||||||
//printf("drawing all\n");
|
//printf("drawing all\n");
|
||||||
// draw the box()
|
// draw the box()
|
||||||
draw_text_frame();
|
draw_box(box(), text_area.x, text_area.y, text_area.w, text_area.h,
|
||||||
|
color());
|
||||||
|
|
||||||
// left margin
|
// left margin
|
||||||
fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN,
|
fl_rectf(text_area.x-LEFT_MARGIN, text_area.y-TOP_MARGIN,
|
||||||
LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
|
LEFT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
|
||||||
text_background());
|
color());
|
||||||
|
|
||||||
// right margin
|
// right margin
|
||||||
fl_rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN,
|
fl_rectf(text_area.x+text_area.w, text_area.y-TOP_MARGIN,
|
||||||
RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
|
RIGHT_MARGIN, text_area.h+TOP_MARGIN+BOTTOM_MARGIN,
|
||||||
text_background());
|
color());
|
||||||
|
|
||||||
// top margin
|
// top margin
|
||||||
fl_rectf(text_area.x, text_area.y-TOP_MARGIN,
|
fl_rectf(text_area.x, text_area.y-TOP_MARGIN,
|
||||||
text_area.w, TOP_MARGIN, text_background());
|
text_area.w, TOP_MARGIN, color());
|
||||||
|
|
||||||
// bottom margin
|
// bottom margin
|
||||||
fl_rectf(text_area.x, text_area.y+text_area.h,
|
fl_rectf(text_area.x, text_area.y+text_area.h,
|
||||||
text_area.w, BOTTOM_MARGIN, text_background());
|
text_area.w, BOTTOM_MARGIN, color());
|
||||||
|
|
||||||
// draw that little box in the corner of the scrollbars
|
// draw that little box in the corner of the scrollbars
|
||||||
if (mVScrollBar->visible() && mHScrollBar->visible())
|
if (mVScrollBar->visible() && mHScrollBar->visible())
|
||||||
@@ -1774,9 +1779,9 @@ void Fl_Text_Display::draw(void) {
|
|||||||
text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
|
text_area.w+LEFT_MARGIN+RIGHT_MARGIN,
|
||||||
text_area.h);
|
text_area.h);
|
||||||
fl_rectf(text_area.x-LEFT_MARGIN, mCursorOldY,
|
fl_rectf(text_area.x-LEFT_MARGIN, mCursorOldY,
|
||||||
LEFT_MARGIN, mMaxsize, text_background());
|
LEFT_MARGIN, mMaxsize, color());
|
||||||
fl_rectf(text_area.x+text_area.w, mCursorOldY,
|
fl_rectf(text_area.x+text_area.w, mCursorOldY,
|
||||||
RIGHT_MARGIN, mMaxsize, text_background());
|
RIGHT_MARGIN, mMaxsize, color());
|
||||||
fl_pop_clip();
|
fl_pop_clip();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1917,13 +1922,13 @@ int Fl_Text_Display::handle(int event) {
|
|||||||
dragType = DRAG_CHAR;
|
dragType = DRAG_CHAR;
|
||||||
|
|
||||||
const char* copy = buffer()->selection_text();
|
const char* copy = buffer()->selection_text();
|
||||||
if (*copy) Fl::copy(copy, strlen(copy), false);
|
if (*copy) Fl::selection(*this, copy, strlen(copy));
|
||||||
free((void*)copy);
|
free((void*)copy);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
case FL_MOUSEWHEEL:
|
case FL_MOUSEWHEEL:
|
||||||
return send(event, *mVScrollBar);
|
return mVScrollBar->handle(event);
|
||||||
#if 0
|
#if 0
|
||||||
// I shouldn't be using mNVisibleLines or mTopLineNum here in handle()
|
// I shouldn't be using mNVisibleLines or mTopLineNum here in handle()
|
||||||
// because the values for these might change between now and layout(),
|
// because the values for these might change between now and layout(),
|
||||||
@@ -1943,5 +1948,5 @@ int Fl_Text_Display::handle(int event) {
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Display.cxx,v 1.12 2001/07/23 09:50:05 spitzak Exp $".
|
// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+7
-12
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Text_Editor.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $"
|
// "$Id: Fl_Text_Editor.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
// Copyright Mark Edel. Permission to distribute under the LGPL for
|
||||||
// the FLTK library granted by Mark Edel.
|
// the FLTK library granted by Mark Edel.
|
||||||
@@ -23,20 +23,15 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include <fltk/Fl.h>
|
#include <FL/Fl.H>
|
||||||
#include <fltk/Fl_Text_Editor.h>
|
#include <FL/Fl_Text_Editor.H>
|
||||||
#include <fltk/Fl_Style.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
static void revert(Fl_Style*) {}
|
|
||||||
static Fl_Named_Style style("Text_Editor", revert, &Fl_Text_Editor::default_style);
|
|
||||||
Fl_Named_Style* Fl_Text_Editor::default_style = &::style;
|
|
||||||
|
|
||||||
Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l)
|
Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l)
|
||||||
: Fl_Text_Display(X, Y, W, H, l) {
|
: Fl_Text_Display(X, Y, W, H, l) {
|
||||||
style(default_style);
|
|
||||||
mCursorOn = 1;
|
mCursorOn = 1;
|
||||||
insert_mode_ = 1;
|
insert_mode_ = 1;
|
||||||
key_bindings = 0;
|
key_bindings = 0;
|
||||||
@@ -348,7 +343,7 @@ int Fl_Text_Editor::kf_delete(int, Fl_Text_Editor* e) {
|
|||||||
int Fl_Text_Editor::kf_copy(int, Fl_Text_Editor* e) {
|
int Fl_Text_Editor::kf_copy(int, Fl_Text_Editor* e) {
|
||||||
if (!e->buffer()->selected()) return 1;
|
if (!e->buffer()->selected()) return 1;
|
||||||
const char *copy = e->buffer()->selection_text();
|
const char *copy = e->buffer()->selection_text();
|
||||||
if (*copy) Fl::copy(copy, strlen(copy), true);
|
if (*copy) Fl::selection(*e, copy, strlen(copy));
|
||||||
free((void*)copy);
|
free((void*)copy);
|
||||||
e->show_insert_position();
|
e->show_insert_position();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -362,7 +357,7 @@ int Fl_Text_Editor::kf_cut(int c, Fl_Text_Editor* e) {
|
|||||||
|
|
||||||
int Fl_Text_Editor::kf_paste(int, Fl_Text_Editor* e) {
|
int Fl_Text_Editor::kf_paste(int, Fl_Text_Editor* e) {
|
||||||
kill_selection(e);
|
kill_selection(e);
|
||||||
Fl::paste(*e,true);
|
Fl::paste(*e);
|
||||||
e->show_insert_position();
|
e->show_insert_position();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -406,7 +401,7 @@ int Fl_Text_Editor::handle(int event) {
|
|||||||
|
|
||||||
if (event == FL_PUSH && Fl::event_button() == 2) {
|
if (event == FL_PUSH && Fl::event_button() == 2) {
|
||||||
dragType = -1;
|
dragType = -1;
|
||||||
Fl::paste(*this,false);
|
Fl::paste(*this);
|
||||||
Fl::focus(this);
|
Fl::focus(this);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -442,5 +437,5 @@ int Fl_Text_Editor::handle(int event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Text_Editor.cxx,v 1.9 2001/07/23 09:50:05 spitzak Exp $".
|
// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+5
-2
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# "$Id: Makefile,v 1.18.2.14.2.7 2001/08/02 19:43:49 easysw Exp $"
|
# "$Id: Makefile,v 1.18.2.14.2.8 2001/08/04 12:21:33 easysw Exp $"
|
||||||
#
|
#
|
||||||
# Library makefile for the Fast Light Tool Kit (FLTK).
|
# Library makefile for the Fast Light Tool Kit (FLTK).
|
||||||
#
|
#
|
||||||
@@ -73,6 +73,9 @@ CPPFILES = \
|
|||||||
Fl_Single_Window.cxx \
|
Fl_Single_Window.cxx \
|
||||||
Fl_Slider.cxx \
|
Fl_Slider.cxx \
|
||||||
Fl_Tabs.cxx \
|
Fl_Tabs.cxx \
|
||||||
|
Fl_Text_Buffer.cxx \
|
||||||
|
Fl_Text_Display.cxx \
|
||||||
|
Fl_Text_Editor.cxx \
|
||||||
Fl_Tile.cxx \
|
Fl_Tile.cxx \
|
||||||
Fl_Tooltip.cxx \
|
Fl_Tooltip.cxx \
|
||||||
Fl_Valuator.cxx \
|
Fl_Valuator.cxx \
|
||||||
@@ -253,5 +256,5 @@ install: $(LIBNAME) $(DSONAME) $(GLLIBNAME) $(GLDSONAME)
|
|||||||
ln -s FL $(includedir)/Fl
|
ln -s FL $(includedir)/Fl
|
||||||
|
|
||||||
#
|
#
|
||||||
# End of "$Id: Makefile,v 1.18.2.14.2.7 2001/08/02 19:43:49 easysw Exp $".
|
# End of "$Id: Makefile,v 1.18.2.14.2.8 2001/08/04 12:21:33 easysw Exp $".
|
||||||
#
|
#
|
||||||
|
|||||||
+2
-7
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_boxtype.cxx,v 1.8.2.4 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: fl_boxtype.cxx,v 1.8.2.4.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
// Box drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -176,11 +176,6 @@ void fl_rectbound(int x, int y, int w, int h, Fl_Color bgcolor) {
|
|||||||
}
|
}
|
||||||
#define fl_border_box fl_rectbound
|
#define fl_border_box fl_rectbound
|
||||||
|
|
||||||
void fl_rectf(int x, int y, int w, int h, Fl_Color c) {
|
|
||||||
fl_color(c);
|
|
||||||
fl_rectf(x, y, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
void fl_border_frame(int x, int y, int w, int h, Fl_Color c) {
|
void fl_border_frame(int x, int y, int w, int h, Fl_Color c) {
|
||||||
fl_color(c);
|
fl_color(c);
|
||||||
fl_rect(x, y, w, h);
|
fl_rect(x, y, w, h);
|
||||||
@@ -282,5 +277,5 @@ const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: fl_boxtype.cxx,v 1.8.2.4.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+4
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_color.cxx,v 1.12.2.5 2001/01/22 15:13:40 easysw Exp $"
|
// "$Id: fl_color.cxx,v 1.12.2.5.2.1 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Color functions for the Fast Light Tool Kit (FLTK).
|
// Color functions for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -339,11 +339,11 @@ Fl_Color fl_color_average(Fl_Color color1, Fl_Color color2, float weight) {
|
|||||||
return avg;
|
return avg;
|
||||||
}
|
}
|
||||||
|
|
||||||
Fl_Color inactive(Fl_Color c) {
|
Fl_Color fl_inactive(Fl_Color c) {
|
||||||
return fl_color_average(c, FL_GRAY, .33f);
|
return fl_color_average(c, FL_GRAY, .33f);
|
||||||
}
|
}
|
||||||
|
|
||||||
Fl_Color contrast(Fl_Color fg, Fl_Color bg) {
|
Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) {
|
||||||
int c1 = int(fl_cmap[fg]);
|
int c1 = int(fl_cmap[fg]);
|
||||||
int c2 = int(fl_cmap[bg]);
|
int c2 = int(fl_cmap[bg]);
|
||||||
if ((c1^c2)&0x80800000)
|
if ((c1^c2)&0x80800000)
|
||||||
@@ -355,5 +355,5 @@ Fl_Color contrast(Fl_Color fg, Fl_Color bg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_color.cxx,v 1.12.2.5 2001/01/22 15:13:40 easysw Exp $".
|
// End of "$Id: fl_color.cxx,v 1.12.2.5.2.1 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+19
-4
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.3 2001/08/03 18:46:57 easysw Exp $"
|
// "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.4 2001/08/04 12:21:33 easysw Exp $"
|
||||||
//
|
//
|
||||||
// File chooser widget for the Fast Light Tool Kit (FLTK).
|
// File chooser widget for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -28,13 +28,28 @@
|
|||||||
#include <FL/Fl_FileChooser.H>
|
#include <FL/Fl_FileChooser.H>
|
||||||
|
|
||||||
static Fl_FileChooser *fc = (Fl_FileChooser *)0;
|
static Fl_FileChooser *fc = (Fl_FileChooser *)0;
|
||||||
|
static void (*current_callback)(const char*) = 0;
|
||||||
|
|
||||||
|
|
||||||
|
static void callback(Fl_FileChooser *, void*) {
|
||||||
|
if (current_callback)
|
||||||
|
(*current_callback)(fc->value(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void fl_file_chooser_callback(void (*cb)(const char*)) {
|
||||||
|
current_callback = cb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char* fl_file_chooser(const char* message, const char* pat, const char* fname)
|
char* fl_file_chooser(const char* message, const char* pat, const char* fname)
|
||||||
{
|
{
|
||||||
if (!fname || !*fname) fname = ".";
|
if (!fname || !*fname) fname = ".";
|
||||||
|
|
||||||
if (!fc) fc = new Fl_FileChooser(fname, pat, Fl_FileChooser::CREATE, message);
|
if (!fc) {
|
||||||
else {
|
fc = new Fl_FileChooser(fname, pat, Fl_FileChooser::CREATE, message);
|
||||||
|
fc->callback(callback, 0);
|
||||||
|
} else {
|
||||||
fc->filter(pat);
|
fc->filter(pat);
|
||||||
fc->value(fname);
|
fc->value(fname);
|
||||||
fc->label(message);
|
fc->label(message);
|
||||||
@@ -50,5 +65,5 @@ char* fl_file_chooser(const char* message, const char* pat, const char* fname)
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.3 2001/08/03 18:46:57 easysw Exp $".
|
// End of "$Id: fl_file_chooser.cxx,v 1.10.2.10.2.4 2001/08/04 12:21:33 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
+338
-305
File diff suppressed because it is too large
Load Diff
+365
-326
File diff suppressed because it is too large
Load Diff
+253
-236
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user