Skip to content

Commit

Permalink
Build windows/amd64 library based on version 1.4.0-1
Browse files Browse the repository at this point in the history
pwiecz committed Nov 18, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
o01eg O01eg
1 parent b82739c commit a9a3e04
Showing 186 changed files with 40,329 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cgo_windows_amd64.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// go:build windows && amd64
//go:build windows && amd64

package fltk

// #cgo windows,amd64 CXXFLAGS: -std=c++11
// #cgo windows,amd64 CPPFLAGS: -I${SRCDIR}/lib/windows/amd64 -I${SRCDIR}/include -I${SRCDIR}/include/FL/images -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
// #cgo windows,amd64 CPPFLAGS: -I${SRCDIR}/include/windows/amd64 -I${SRCDIR}/include/windows/amd64/FL/images -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
// #cgo windows,amd64 LDFLAGS: -mwindows ${SRCDIR}/lib/windows/amd64/libfltk_images.a ${SRCDIR}/lib/windows/amd64/libfltk_jpeg.a ${SRCDIR}/lib/windows/amd64/libfltk_png.a ${SRCDIR}/lib/windows/amd64/libfltk_z.a ${SRCDIR}/lib/windows/amd64/libfltk_gl.a -lglu32 -lopengl32 ${SRCDIR}/lib/windows/amd64/libfltk_forms.a ${SRCDIR}/lib/windows/amd64/libfltk.a -lgdiplus -lole32 -luuid -lcomctl32 -lws2_32
import "C"
7 changes: 4 additions & 3 deletions fltk-build.go
Original file line number Diff line number Diff line change
@@ -244,11 +244,12 @@ func main() {

} else {
// Switching to slashes in paths in cgo directives as backslashes are causing problems when being passed to gcc.
libdir := filepath.ToSlash(libDir)
libDirWithSlashes := filepath.ToSlash(libDir)
includeDirWithSlashes := filepath.ToSlash(includeDir)
// Hardcoding contents of cgo directive for windows,
// as we cannot extract it from fltk-config if we're not using a UNIX shell.
fmt.Fprintf(cgoFile, "// #cgo %s,%s CPPFLAGS: -I${SRCDIR}/%s -I${SRCDIR}/%s/FL/images -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64\n", runtime.GOOS, runtime.GOARCH, includeDir, includeDir)
fmt.Fprintf(cgoFile, "// #cgo %s,%s LDFLAGS: -mwindows ${SRCDIR}/%s/libfltk_images.a ${SRCDIR}/%s/libfltk_jpeg.a ${SRCDIR}/%s/libfltk_png.a ${SRCDIR}/%s/libfltk_z.a ${SRCDIR}/%s/libfltk_gl.a -lglu32 -lopengl32 ${SRCDIR}/%s/libfltk_forms.a ${SRCDIR}/%s/libfltk.a -lgdiplus -lole32 -luuid -lcomctl32 -lws2_32\n", runtime.GOOS, runtime.GOARCH, libdir, libdir, libdir, libdir, libdir, libdir, libdir)
fmt.Fprintf(cgoFile, "// #cgo %s,%s CPPFLAGS: -I${SRCDIR}/%s -I${SRCDIR}/%s/FL/images -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64\n", runtime.GOOS, runtime.GOARCH, includeDirWithSlashes, includeDirWithSlashes)
fmt.Fprintf(cgoFile, "// #cgo %s,%s LDFLAGS: -mwindows ${SRCDIR}/%s/libfltk_images.a ${SRCDIR}/%s/libfltk_jpeg.a ${SRCDIR}/%s/libfltk_png.a ${SRCDIR}/%s/libfltk_z.a ${SRCDIR}/%s/libfltk_gl.a -lglu32 -lopengl32 ${SRCDIR}/%s/libfltk_forms.a ${SRCDIR}/%s/libfltk.a -lgdiplus -lole32 -luuid -lcomctl32 -lws2_32\n", runtime.GOOS, runtime.GOARCH, libDirWithSlashes, libDirWithSlashes, libDirWithSlashes, libDirWithSlashes, libDirWithSlashes, libDirWithSlashes, libDirWithSlashes)
}
fmt.Fprintln(cgoFile, "import \"C\"")

1,396 changes: 1,396 additions & 0 deletions include/windows/amd64/FL/Enumerations.H

Large diffs are not rendered by default.

1,636 changes: 1,636 additions & 0 deletions include/windows/amd64/FL/Fl.H

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions include/windows/amd64/FL/Fl_Adjuster.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// Adjuster widget header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Adjuster widget . */

// 3-button "slider", made for Nuke

#ifndef Fl_Adjuster_H
#define Fl_Adjuster_H

#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif

/**
The Fl_Adjuster widget was stolen from Prisms, and has proven
to be very useful for values that need a large dynamic range.
\image html adjuster1.png
\image latex adjuster1.png "Fl_Adjuster" width=4cm
<P>When you press a button and drag to the right the value increases.
When you drag to the left it decreases. The largest button adjusts by
100 * step(), the next by 10 * step() and that
smallest button by step(). Clicking on the buttons
increments by 10 times the amount dragging by a pixel does. Shift +
click decrements by 10 times the amount.
*/
class FL_EXPORT Fl_Adjuster : public Fl_Valuator {
int drag;
int ix;
int soft_;
protected:
void draw() FL_OVERRIDE;
int handle(int) FL_OVERRIDE;
void value_damage() FL_OVERRIDE;
public:
Fl_Adjuster(int X,int Y,int W,int H,const char *l=0);
/**
If "soft" is turned on, the user is allowed to drag the value outside
the range. If they drag the value to one of the ends, let go, then
grab again and continue to drag, they can get to any value. Default is
one.
*/
void soft(int s) {soft_ = s;}
/**
If "soft" is turned on, the user is allowed to drag the value outside
the range. If they drag the value to one of the ends, let go, then
grab again and continue to drag, they can get to any value. Default is
one.
*/
int soft() const {return soft_;}
};

#endif
185 changes: 185 additions & 0 deletions include/windows/amd64/FL/Fl_Anim_GIF_Image.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
//
// Fl_Anim_GIF_Image class header for the Fast Light Tool Kit (FLTK).
//
// Copyright 2016-2023 by Christian Grabner <wcout@gmx.net>.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

#ifndef Fl_Anim_Gif_Image_H
#define Fl_Anim_Gif_Image_H

// forward declarations
class Fl_Image;
class Fl_Widget;

#include <FL/Fl_GIF_Image.H>

// Load and display animated GIF images
class FL_EXPORT Fl_Anim_GIF_Image : public Fl_GIF_Image {

class FrameInfo; // internal helper class

public:

/**
When opening an Fl_Anim_GIF_Image there are some options
that can be passed in a `flags` value.
*/
enum Flags {
/**
This flag indicates to the loader that it should not start
the animation immediately after successful load, which is
the default.
It can be started later using the \ref start() method.
*/
DONT_START = 1,
/**
This flag indicates to the loader that it should not
resize the canvas widget of the animation to the dimensions
of the animation, which is the default.
Needed for special use cases.
*/
DONT_RESIZE_CANVAS = 2,
/**
This flag indicates to the loader that it should not
set the animation as \ref image() member of the canvas widget,
which is the default.
Needed for special use cases.
*/
DONT_SET_AS_IMAGE = 4,
/**
Often frames change just a small area of the animation canvas.
This flag indicates to the loader to try using less memory
by storing frame data not as canvas-sized images but use the
sizes defined in the GIF file.
The drawbacks are higher cpu usage during playback and maybe
minor artifacts when resized.
*/
OPTIMIZE_MEMORY = 8,
/**
This flag can be used to print informations about the
decoding process to the console.
*/
LOG_FLAG = 64,
/**
This flag can be used to print even more informations about
the decoding process to the console.
*/
DEBUG_FLAG = 128
};

// -- constructors and destructor
Fl_Anim_GIF_Image(const char *filename, Fl_Widget *canvas = 0, unsigned short flags = 0);
Fl_Anim_GIF_Image(const char* imagename, const unsigned char *data,
const size_t length, Fl_Widget *canvas = 0,
unsigned short flags = 0);
Fl_Anim_GIF_Image();
~Fl_Anim_GIF_Image() FL_OVERRIDE;

// -- file handling
bool load(const char *name, const unsigned char *imgdata=NULL, size_t imglength=0);
bool valid() const;

// -- getters and setters
void frame_uncache(bool uncache);
bool frame_uncache() const;
double delay(int frame_) const;
void delay(int frame, double delay);
void canvas(Fl_Widget *canvas, unsigned short flags = 0);
Fl_Widget *canvas() const;
int canvas_w() const;
int canvas_h() const;
bool is_animated() const;
const char *name() const;
void speed(double speed);
double speed() const;

// -- animation
int frames() const;
void frame(int frame);
int frame() const;
Fl_Image *image() const;
Fl_Image *image(int frame) const;
bool start();
bool stop();
bool next();

/** Return if the animation is currently running or stopped.
\return true if the animation is running
*/
bool playing() const { return valid() && Fl::has_timeout(cb_animate, (void *)this); }

// -- image data
Fl_Anim_GIF_Image& resize(int w, int h);
Fl_Anim_GIF_Image& resize(double scale);
int frame_x(int frame) const;
int frame_y(int frame) const;
int frame_w(int frame) const;
int frame_h(int frame) const;

// -- overridden methods
void color_average(Fl_Color c, float i) FL_OVERRIDE;
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
Fl_Image *copy() const { return Fl_Pixmap::copy(); }
void desaturate() FL_OVERRIDE;
void draw(int x, int y, int w, int h, int cx = 0, int cy = 0) FL_OVERRIDE;
void uncache() FL_OVERRIDE;

// -- debugging and logging
int debug() const;

// -- static methods
static int frame_count(const char *name, const unsigned char *imgdata = NULL, size_t imglength = 0);

/**
The loop flag can be used to (dis-)allow loop count.
If set (which is the default), the animation will be
stopped after the number of repeats specified in the
GIF file (typically this count is set to 'forever' anyway).
If cleared the animation will always be 'forever',
regardless of what is specified in the GIF file.
*/
static bool loop;

/**
The min_delay value can be used to set a minimum value
for the frame delay for playback. This is to prevent
CPU hogs caused by images with very low delay rates.
This is a global value for all Fl_Anim_GIF_Image objects.
*/
static double min_delay;

protected:

bool next_frame();
void clear_frames();
void set_frame(int frame);

static void cb_animate(void *d);
void scale_frame();
void set_frame();
void on_frame_data(Fl_GIF_Image::GIF_FRAME &f) FL_OVERRIDE;
void on_extension_data(Fl_GIF_Image::GIF_FRAME &f) FL_OVERRIDE;

private:

char *name_;
unsigned short flags_;
Fl_Widget *canvas_;
bool uncache_;
bool valid_;
int frame_; // current frame
double speed_;
FrameInfo *fi_;
};

#endif // Fl_Anim_Gif_Image_H
41 changes: 41 additions & 0 deletions include/windows/amd64/FL/Fl_BMP_Image.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// BMP image header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_BMP_Image widget . */

#ifndef Fl_BMP_Image_H
#define Fl_BMP_Image_H
# include "Fl_Image.H"

/**
The Fl_BMP_Image class supports loading, caching,
and drawing of Windows Bitmap (BMP) image files.
*/
class FL_EXPORT Fl_BMP_Image : public Fl_RGB_Image {

public:

Fl_BMP_Image(const char* filename);
Fl_BMP_Image(const char* imagename, const unsigned char *data, const long length = -1);

protected:

void load_bmp_(class Fl_Image_Reader &rdr, int ico_height = 0, int ico_width = 0);

};

#endif
68 changes: 68 additions & 0 deletions include/windows/amd64/FL/Fl_Bitmap.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
//
// Bitmap header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Bitmap widget . */

#ifndef Fl_Bitmap_H
#define Fl_Bitmap_H
#include "Fl_Image.H"
#include "Fl_Widget.H" // for fl_uintptr_t

class Fl_Widget;
struct Fl_Menu_Item;

/**
The Fl_Bitmap class supports caching and drawing of mono-color
(bitmap) images. Images are drawn using the current color.
*/
class FL_EXPORT Fl_Bitmap : public Fl_Image {
friend class Fl_Graphics_Driver;
public:
/** pointer to raw bitmap data */
const uchar *array;
/** Non-zero if array points to bitmap data allocated internally */
int alloc_array;

private:
/** for internal use */
fl_uintptr_t id_;
int cache_w_, cache_h_; // size of bitmap when cached

public:
/** The constructors create a new bitmap from the specified bitmap data.
\see Fl_Bitmap(const uchar *bits, int bits_length, int W, int H) */
Fl_Bitmap(const uchar *bits, int W, int H) :
Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
/** The constructors create a new bitmap from the specified bitmap data.
\see Fl_Bitmap(const char *bits, int bits_length, int W, int H) */
Fl_Bitmap(const char *bits, int W, int H) :
Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
Fl_Bitmap(const uchar *bits, int bits_length, int W, int H);
Fl_Bitmap(const char *bits, int bits_length, int W, int H);
virtual ~Fl_Bitmap();
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
Fl_Image *copy() const { return Fl_Image::copy(); }
void draw(int X, int Y, int W, int H, int cx=0, int cy=0) FL_OVERRIDE;
void draw(int X, int Y) {draw(X, Y, w(), h(), 0, 0);}
void label(Fl_Widget*w) FL_OVERRIDE;
void label(Fl_Menu_Item*m) FL_OVERRIDE;
void uncache() FL_OVERRIDE;
int cache_w() {return cache_w_;}
int cache_h() {return cache_h_;}
};

#endif
53 changes: 53 additions & 0 deletions include/windows/amd64/FL/Fl_Box.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// Box header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file FL/Fl_Box.H
\brief Fl_Box widget.
*/

#ifndef Fl_Box_H
#define Fl_Box_H

#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif

/**
This widget simply draws its box, and possibly its label. Putting it
before some other widgets and making it big enough to surround them
will let you draw a frame around them.
*/
class FL_EXPORT Fl_Box : public Fl_Widget {
protected:
void draw() FL_OVERRIDE;
public:
/**
- The first constructor sets box() to FL_NO_BOX, which means it is invisible.
However such widgets are useful as placeholders or Fl_Group::resizable()
values. To change the box to something visible, use box(n).
- The second form of the constructor sets the box to the specified box type.
The destructor removes the box.
*/
Fl_Box(int X, int Y, int W, int H, const char *l=0);

/** See Fl_Box::Fl_Box(int x, int y, int w, int h, const char * = 0) */
Fl_Box(Fl_Boxtype b, int X, int Y, int W, int H, const char *l);

int handle(int) FL_OVERRIDE;
};

#endif
330 changes: 330 additions & 0 deletions include/windows/amd64/FL/Fl_Browser.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,330 @@
//
// Browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Browser widget . */

// Forms-compatible browser. Probably useful for other
// lists of textual data. Notice that the line numbers
// start from 1, and 0 means "no line".

#ifndef Fl_Browser_H
#define Fl_Browser_H

#include "Fl_Browser_.H"
#include "Fl_Image.H"

struct FL_BLINE;

/**
The Fl_Browser widget displays a scrolling list of text
lines, and manages all the storage for the text. This is not a text
editor or spreadsheet! But it is useful for showing a vertical list of
named objects to the user.
\image html fl_hold_browser.png "Fl_Hold_Browser"
\image latex fl_hold_browser.png "Fl_Hold_Browser" width=4cm
\par
\image html fl_multi_browser.png "Fl_Multi_Browser"
\image latex fl_multi_browser.png "Fl_Multi_Browser" width=4cm
Each line in the browser is identified by number. <I>The numbers
start at one</I> (this is so that zero can be reserved for "no line" in
the selective browsers). <I>Unless otherwise noted, the methods do not
check to see if the passed line number is in range and legal. It must
always be greater than zero and &lt;= size().</I>
Each line contains a null-terminated string of text and a void *
data pointer. The text string is displayed, the void *
pointer can be used by the callbacks to reference the object the text
describes.
The base class does nothing when the user clicks on it. The
subclasses
Fl_Select_Browser,
Fl_Hold_Browser, and
Fl_Multi_Browser react to user clicks to select lines in
the browser and do callbacks.
The base class
Fl_Browser_ provides the scrolling and selection mechanisms of
this and all the subclasses, but the dimensions and appearance of each
item are determined by the subclass. You can use Fl_Browser_
to display information other than text, or text that is dynamically
produced from your own data structures. If you find that loading the
browser is a lot of work or is inefficient, you may want to make a
subclass of Fl_Browser_.
Some common coding patterns used for working with Fl_Browser:
\code
// How to loop through all the items in the browser
for ( int t=1; t<=browser->size(); t++ ) { // index 1 based..!
printf("item #%d, label='%s'\n", t, browser->text(t));
}
\endcode
Note: If you are <I>subclassing</I> Fl_Browser, it's more efficient
to use the protected methods item_first() and item_next(), since
Fl_Browser internally uses linked lists to manage the browser's items.
For more info, see find_item(int).
*/
class FL_EXPORT Fl_Browser : public Fl_Browser_ {

FL_BLINE *first; // the array of lines
FL_BLINE *last;
FL_BLINE *cache;
int cacheline; // line number of cache
int lines; // Number of lines
int full_height_;
const int* column_widths_;
char format_char_; // alternative to @-sign
char column_char_; // alternative to tab

protected:

// required routines for Fl_Browser_ subclass:
void* item_first() const FL_OVERRIDE;
void* item_next(void* item) const FL_OVERRIDE;
void* item_prev(void* item) const FL_OVERRIDE;
void* item_last()const FL_OVERRIDE;
int item_selected(void* item) const FL_OVERRIDE;
void item_select(void* item, int val) FL_OVERRIDE;
int item_height(void* item) const FL_OVERRIDE;
int item_width(void* item) const FL_OVERRIDE;
void item_draw(void* item, int X, int Y, int W, int H) const FL_OVERRIDE;
int full_height() const FL_OVERRIDE;
int incr_height() const FL_OVERRIDE;
const char *item_text(void *item) const FL_OVERRIDE;
/** Swap the items \p a and \p b.
You must call redraw() to make any changes visible.
\param[in] a,b the items to be swapped.
\see swap(int,int), item_swap()
*/
void item_swap(void *a, void *b) FL_OVERRIDE { swap((FL_BLINE*)a, (FL_BLINE*)b); }
/** Return the item at specified \p line.
\param[in] line The line of the item to return. (1 based)
\returns The item, or NULL if line out of range.
\see item_at(), find_line(), lineno()
*/
void *item_at(int line) const FL_OVERRIDE { return (void*)find_line(line); }

FL_BLINE* find_line(int line) const ;
FL_BLINE* _remove(int line) ;
void insert(int line, FL_BLINE* item);
int lineno(void *item) const ;
void swap(FL_BLINE *a, FL_BLINE *b);

public:

void remove(int line);
void add(const char* newtext, void* d = 0);
void insert(int line, const char* newtext, void* d = 0);
void move(int to, int from);
int load(const char* filename);
void swap(int a, int b);
void clear();

/**
Returns how many lines are in the browser.
The last line number is equal to this.
Returns 0 if browser is empty.
*/
int size() const { return lines; }
void size(int W, int H) { Fl_Widget::size(W, H); }

/**
Gets the default text size (in pixels) for the lines in the browser.
*/
Fl_Fontsize textsize() const { return Fl_Browser_::textsize(); }

/*
Sets the default text size for the lines in the browser to newSize.
Defined and documented in Fl_Browser.cxx
*/
void textsize(Fl_Fontsize newSize);

int topline() const ;
/** For internal use only? */
enum Fl_Line_Position { TOP, BOTTOM, MIDDLE };
void lineposition(int line, Fl_Line_Position pos);
/**
Scrolls the browser so the top item in the browser
is showing the specified \p line.
\param[in] line The line to be displayed at the top.
\see topline(), middleline(), bottomline(), displayed(), lineposition()
*/
void topline(int line) { lineposition(line, TOP); }
/**
Scrolls the browser so the bottom item in the browser
is showing the specified \p line.
\param[in] line The line to be displayed at the bottom.
\see topline(), middleline(), bottomline(), displayed(), lineposition()
*/
void bottomline(int line) { lineposition(line, BOTTOM); }
/**
Scrolls the browser so the middle item in the browser
is showing the specified \p line.
\param[in] line The line to be displayed in the middle.
\see topline(), middleline(), bottomline(), displayed(), lineposition()
*/
void middleline(int line) { lineposition(line, MIDDLE); }

int select(int line, int val=1);
int selected(int line) const ;
void show(int line);
/** Shows the entire Fl_Browser widget -- opposite of hide(). */
void show() FL_OVERRIDE { Fl_Widget::show(); }
void hide(int line);
/** Hides the entire Fl_Browser widget -- opposite of show(). */
void hide() FL_OVERRIDE { Fl_Widget::hide(); }
int visible(int line) const ;

int value() const ;
/**
Sets the browser's value(), which selects the specified \p line.
This is the same as calling select(line).
\see select(), selected(), value(), item_select(), item_selected()
*/
void value(int line) { select(line); }
const char* text(int line) const ;
void text(int line, const char* newtext);
void* data(int line) const ;
void data(int line, void* d);

Fl_Browser(int X, int Y, int W, int H, const char *L = 0);
/**
The destructor deletes all list items and destroys the browser.
*/
~Fl_Browser() { clear(); }

/**
Gets the current format code prefix character, which by default is '\@'.
A string of formatting codes at the start of each column are stripped off
and used to modify how the rest of the line is printed:
\li <tt>'\@.'</tt> Print rest of line, don't look for more '\@' signs
\li <tt>'\@\@'</tt> Doubling the format character prints the format
character once, followed by the rest of line
\li <tt>'\@l'</tt> Use a LARGE (24 point) font
\li <tt>'\@m'</tt> Use a medium large (18 point) font
\li <tt>'\@s'</tt> Use a <SMALL>small</SMALL> (11 point) font
\li <tt>'\@b'</tt> Use a <B>bold</B> font (adds FL_BOLD to font)
\li <tt>'\@i'</tt> Use an <I>italic</I> font (adds FL_ITALIC to font)
\li <tt>'\@f' or '\@t'</tt> Use a fixed-pitch
font (sets font to FL_COURIER)
\li <tt>'\@c'</tt> Center the line horizontally
\li <tt>'\@r'</tt> Right-justify the text
\li <tt>'\@N'</tt> Use fl_inactive_color() to draw the text
\li <tt>'\@B0', '\@B1', ... '\@B255'</tt> Fill the background with
fl_color(n)
\li <tt>'\@C0', '\@C1', ... '\@C255'</tt> Use fl_color(n) to draw the text
\li <tt>'\@F0', '\@F1', ...</tt> Use fl_font(n) to draw the text
\li <tt>'\@S1', '\@S2', ...</tt> Use point size n to draw the text
\li <tt>'\@u' or '\@_'</tt> Underline the text.
\li <tt>'\@-'</tt> draw an engraved line through the middle.
Notice that the '\@.' command can be used to reliably
terminate the parsing. To print a random string in a random color, use
<tt>sprintf("@C%d@.%s", color, string)</tt> and it will work even if the
string starts with a digit or has the format character in it.
*/
char format_char() const { return format_char_; }
/**
Sets the current format code prefix character to \p c.
The default prefix is '\@'. Set the prefix to 0 to disable formatting.
\see format_char() for list of '\@' codes
*/
void format_char(char c) { format_char_ = c; }
/**
Gets the current column separator character.
The default is '\\t' (tab).
\see column_char(), column_widths()
*/
char column_char() const { return column_char_; }
/**
Sets the column separator to c.
This will only have an effect if you also set column_widths().
The default is '\\t' (tab).
\see column_char(), column_widths()
*/
void column_char(char c) { column_char_ = c; }
/**
Gets the current column width array.
This array is zero-terminated and specifies the widths in pixels of
each column. The text is split at each column_char() and each part is
formatted into it's own column. After the last column any remaining
text is formatted into the space between the last column and the
right edge of the browser, even if the text contains instances of
column_char() . The default value is a one-element array of just
a zero, which means there are no columns.
Example:
\code
Fl_Browser *b = new Fl_Browser(..);
static int widths[] = { 50, 50, 50, 70, 70, 40, 40, 70, 70, 50, 0 }; // widths for each column
b->column_widths(widths); // assign array to widget
b->column_char('\t'); // use tab as the column character
b->add("USER\tPID\tCPU\tMEM\tVSZ\tRSS\tTTY\tSTAT\tSTART\tTIME\tCOMMAND");
b->add("root\t2888\t0.0\t0.0\t1352\t0\ttty3\tSW\tAug15\t0:00\t@b@f/sbin/mingetty tty3");
b->add("root\t13115\t0.0\t0.0\t1352\t0\ttty2\tSW\tAug30\t0:00\t@b@f/sbin/mingetty tty2");
[..]
\endcode
\see column_char(), column_widths()
*/
const int* column_widths() const { return column_widths_; }
/**
Sets the current array to \p arr. Make sure the last entry is zero.
\see column_char(), column_widths()
*/
void column_widths(const int* arr) { column_widths_ = arr; }

/**
Returns non-zero if \p line has been scrolled to a position where it is being displayed.
Checks to see if the item's vertical position is within the top and bottom
edges of the display window. This does NOT take into account the hide()/show()
status of the widget or item.
\param[in] line The line to be checked
\returns 1 if visible, 0 if not visible.
\see topline(), middleline(), bottomline(), displayed(), lineposition()
*/
int displayed(int line) const { return Fl_Browser_::displayed(find_line(line)); }

/**
Make the item at the specified \p line visible().
Functionally similar to show(int line).
If \p line is out of range, redisplay top or bottom of list as appropriate.
\param[in] line The line to be made visible.
\see show(int), hide(int), display(), visible(), make_visible()
*/
void make_visible(int line) {
if (line < 1) Fl_Browser_::display(find_line(1));
else if (line > lines) Fl_Browser_::display(find_line(lines));
else Fl_Browser_::display(find_line(line));
}

// icon support
void icon(int line, Fl_Image* icon);
Fl_Image* icon(int line) const;
void remove_icon(int line);

/** For back compatibility only. */
void replace(int a, const char* b) { text(a, b); }
void display(int line, int val=1);
};

#endif
417 changes: 417 additions & 0 deletions include/windows/amd64/FL/Fl_Browser_.H

Large diffs are not rendered by default.

181 changes: 181 additions & 0 deletions include/windows/amd64/FL/Fl_Button.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
//
// Button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Button widget . */

#ifndef Fl_Button_H
#define Fl_Button_H

#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif

// values for type()
#define FL_NORMAL_BUTTON 0 /**< value() will be set to 1 during the press of the button and
reverts back to 0 when the button is released */
#define FL_TOGGLE_BUTTON 1 ///< value() toggles between 0 and 1 at every click of the button
#define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) /**< is set to 1 at button press, and all other
buttons in the same group with <tt>type() == FL_RADIO_BUTTON</tt>
are set to zero.*/
#define FL_HIDDEN_BUTTON 3 ///< for Forms compatibility

extern FL_EXPORT Fl_Shortcut fl_old_shortcut(const char*);

class Fl_Widget_Tracker;

/**
\class Fl_Button
\brief Buttons generate callbacks when they are clicked by the user.
You control exactly when and how by changing the values for type(uchar) and
when(uchar). Buttons can also generate callbacks in response to \c FL_SHORTCUT
events. The button can either have an explicit shortcut(int s) value or a
letter shortcut can be indicated in the label() with an '\&' character
before it. For the label shortcut it does not matter if \e Alt is held
down, but if you have an input field in the same window, the user will have
to hold down the \e Alt key so that the input field does not eat the event
first as an \c FL_KEYBOARD event.
\see Fl_Widget::shortcut_label(int)
For an Fl_Button object, the type() call returns one of:
\li \c FL_NORMAL_BUTTON (0): value() remains unchanged after button press.
\li \c FL_TOGGLE_BUTTON: value() is inverted after button press.
\li \c FL_RADIO_BUTTON: value() is set to 1 after button press, and all other
buttons in the current group with <tt>type() == FL_RADIO_BUTTON</tt>
are set to zero.
For an Fl_Button object, the following when() values are useful, the default
being \c FL_WHEN_RELEASE:
\li \c 0: The callback is not done, instead changed() is turned on.
\li \c FL_WHEN_RELEASE: The callback is done after the user successfully
clicks the button, or when a shortcut is typed. The reason is
\p FL_REASON_RELEASED.
\li \c FL_WHEN_CHANGED: The callback is done each time the value() changes
(when the user pushes and releases the button, and as the mouse is
dragged around in and out of the button). The reason is set to
\p FL_REASON_CHANGED
\li \c FL_WHEN_NOT_CHANGED: The callback is done when the mouse button is
released, but the value did not changed. The reason is set to
\p FL_REASON_SELECTED
*/

class FL_EXPORT Fl_Button : public Fl_Widget {

int shortcut_;
char value_;
char oldval;
uchar down_box_;
uchar compact_;

protected:

static Fl_Widget_Tracker *key_release_tracker;
static void key_release_timeout(void*);
void simulate_key_action();

void draw() FL_OVERRIDE;

public:

int handle(int) FL_OVERRIDE;

Fl_Button(int X, int Y, int W, int H, const char *L = 0);

int value(int v);

/**
Returns the current value of the button (0 or 1).
*/
char value() const {return value_;}

/**
Same as \c value(1).
\see value(int v)
*/
int set() {return value(1);}

/**
Same as \c value(0).
\see value(int v)
*/
int clear() {return value(0);}

void setonly(); // this should only be called on FL_RADIO_BUTTONs

/**
Returns the current shortcut key for the button.
\retval int
*/
int shortcut() const {return shortcut_;}

/**
Sets the shortcut key to \c s.
Setting this overrides the use of '\&' in the label().
The value is a bitwise OR of a key and a set of shift flags, for example:
<tt>FL_ALT | 'a'</tt>, or
<tt>FL_ALT | (FL_F + 10)</tt>, or just
<tt>'a'</tt>.
A value of 0 disables the shortcut.
The key can be any value returned by Fl::event_key(), but will usually be
an ASCII letter. Use a lower-case letter unless you require the shift key
to be held down.
The shift flags can be any set of values accepted by Fl::event_state().
If the bit is on, that shift key must be pushed. Meta, Alt, Ctrl, and
Shift must be off if they are not in the shift flags (zero for the other
bits indicates a "don't care" setting).
\param[in] s bitwise OR of key and shift flags
*/
void shortcut(int s) {shortcut_ = s;}

/**
Returns the current down box type, which is drawn when value() is non-zero.
\retval Fl_Boxtype
*/
Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;}

/**
Sets the down box type. The default value of 0 causes FLTK to figure out
the correct matching down version of box().
Some derived classes (e.g. Fl_Round_Button and Fl_Light_Button use
down_box() for special purposes. See docs of these classes.
\param[in] b down box type
*/
void down_box(Fl_Boxtype b) {down_box_ = b;}

/// (for backwards compatibility)
void shortcut(const char *s) {shortcut(fl_old_shortcut(s));}

/// (for backwards compatibility)
Fl_Color down_color() const {return selection_color();}

/// (for backwards compatibility)
void down_color(unsigned c) {selection_color(c);}

// handle flag for compact buttons, documentation in source code
void compact(uchar v);

/// Return true if buttons are rendered as compact buttons.
/// \return 0 if compact mode is off, 1 if it is on
/// \see compact(bool)
uchar compact() { return compact_; }
};

#endif
101 changes: 101 additions & 0 deletions include/windows/amd64/FL/Fl_Cairo.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
//
// Main Cairo support header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file Fl_Cairo.H
Cairo is currently supported for the following platforms:
Windows, macOS, Unix/Linux (X11 + Wayland).
\note In FLTK 1.3.x this header file (Fl_Cairo.H) included the platform
specific Cairo headers. This is no longer true since 1.4.0.
This header file is platform agnostic. If you need platform specific Cairo
headers you need to \#include them in your source file.
To use FLTK's builtin Cairo support you need to <tt>\#include \<FL/Fl.H></tt>
\b before you include any other FLTK header which is officially required anyway.
Since FLTK 1.4.0 the preprocessor constants \p FLTK_HAVE_CAIRO and/or
\p FLTK_HAVE_CAIROEXT are defined in \<FL/Fl.H> by including \<FL/fl_config.h>.
*/

#ifndef FL_CAIRO_H
#define FL_CAIRO_H

#include <FL/Fl.H>

# ifdef FLTK_HAVE_CAIRO

# include <cairo.h>

/**
\addtogroup group_cairo
@{
*/

/**
Contains all the necessary info on the current cairo context.
A private internal & unique corresponding object is created to
permit cairo context state handling while keeping it opaque.
For internal use only.
\note Only available when configure has the --enable-cairo or
--enable-cairoext option or one or both of the CMake options
FLTK_OPTION_CAIRO_WINDOW or FLTK_OPTION_CAIRO_EXT is set (ON)
*/
class FL_EXPORT Fl_Cairo_State {
public:
Fl_Cairo_State()
: cc_(0)
, own_cc_(false)
, autolink_(false)
, window_(0)
, gc_(0) {}

// access attributes
cairo_t *cc() const { return cc_; } ///< Gets the current cairo context
bool autolink() const { return autolink_; } ///< Gets the autolink option. See Fl::cairo_autolink_context(bool)
/** Sets the current cairo context.
\p own == \e true (the default) indicates that the cairo context \p c
will be deleted by FLTK internally when another cc is set later.
\p own == \e false indicates cc deletion is handled externally
by the user program.
*/
void cc(cairo_t *c, bool own = true) {
if (cc_ && own_cc_)
cairo_destroy(cc_);
cc_ = c;
if (!cc_)
window_ = 0;
own_cc_ = own;
}
void autolink(bool b); ///< Sets the autolink option, only available with --enable-cairoext
void window(void *w) { window_ = w; } ///< Sets the window \p w to keep track on
void *window() const { return window_; } ///< Gets the last window attached to a cc
void gc(void *c) { gc_ = c; } ///< Sets the gc \p c to keep track on
void *gc() const { return gc_; } ///< Gets the last gc attached to a cc

private:
cairo_t *cc_; // contains the unique autoupdated cairo context
bool own_cc_; // indicates whether we must delete the cc, useful for internal cleanup
bool autolink_; // false by default, prevents the automatic cairo mapping on fltk windows
// for custom cairo implementations.
void *window_, *gc_; // for keeping track internally of last win+gc treated
};

/** @} */

#endif // FLTK_HAVE_CAIRO
#endif // FL_CAIRO_H
128 changes: 128 additions & 0 deletions include/windows/amd64/FL/Fl_Cairo_Window.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
//
// Fl_Cairo_Window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file FL/Fl_Cairo_Window.H
\brief Fl_Cairo_Window, an FLTK window incorporating a Cairo draw callback.
*/

#ifndef FL_CAIRO_WINDOW_H
# define FL_CAIRO_WINDOW_H

#include <FL/fl_config.h>

# ifdef FLTK_HAVE_CAIRO

// Cairo is currently supported for the following platforms:
// Win32, Apple Quartz, X11, Wayland

# include <FL/Fl.H>
# include <FL/Fl_Double_Window.H>

/**
\addtogroup group_cairo
@{
*/

/**
This defines an FLTK window with Cairo support.
This class overloads the virtual draw() method for you,
so that the only thing you have to do is to provide your Cairo code.
All Cairo context handling is achieved transparently.
The default coordinate system for Cairo drawing commands within Fl_Cairo_Window
is FLTK's coordinate system, where the `x,y,w,h` values are relative to the
top/left corner of the Fl_Cairo_Window, as one would expect with regular
FLTK drawing commands, e.g.: `(0 ≤ x ≤ w-1), (0 ≤ y ≤ h-1)`.
\b Example:
\code
static void my_cairo_draw_cb(Fl_Cairo_Window *window, cairo_t *cr) {
// Draw an "X"
const double xmax = (window->w() - 1);
const double ymax = (window->h() - 1);
cairo_set_line_width(cr, 1.00); // line width for drawing
cairo_set_source_rgb(cr, 1.0, 0.5, 0.0); // orange
cairo_move_to(cr, 0.0, 0.0); cairo_line_to(cr, xmax, ymax); // draw diagonal "\"
cairo_move_to(cr, 0.0, ymax); cairo_line_to(cr, xmax, 0.0); // draw diagonal "/"
cairo_stroke(cr); // stroke the lines
}
\endcode
The FLTK coordinate system differs from the default native Cairo coordinate system
which uses normalized `(0.0 … 1.0)` values for x and y, e.g.: `(0 ≤ x ≤ 1.0), (0 ≤ y ≤ 1.0)`.
So beware of this when copy/pasting Cairo example programs that assume normalized values.
If need be, you can revert to the Cairo coordinate system by simply calling `cairo_scale()`
with the widget's `w()` and `h()` values. \b Example:
\code
static void my_cairo_draw_cb(Fl_Cairo_Window *window, cairo_t *cr) {
cairo_scale(cr, window->w(), window->h()); // use Cairo's default coordinate system
[..use 0.0 to 1.0 values from here on..]
}
\endcode
\see examples/cairo-draw-x.cxx
\see test/cairo_test.cxx
\note Class Fl_Cairo_Window requires the FLTK library to have been built with
CMake option FLTK_OPTION_CAIRO_WINDOW or configure --enable-cairo.
\note You can alternatively define your custom Cairo FLTK window,
and thus at least override the draw() method to provide custom Cairo
support. In this case you will probably use Fl::cairo_make_current(Fl_Window*)
to attach a context to your window. You should do this only when your window is
the current window. \see Fl_Window::current()
*/
class FL_EXPORT Fl_Cairo_Window : public Fl_Double_Window {

public:
Fl_Cairo_Window(int W, int H, const char *L = 0)
: Fl_Double_Window(W, H, L), draw_cb_(0) {}
Fl_Cairo_Window(int X, int Y, int W, int H, const char *L = 0)
: Fl_Double_Window(X, Y, W, H, L), draw_cb_(0) {}

protected:
/** Overloaded to provide Cairo callback support. */
void draw() FL_OVERRIDE {
Fl_Double_Window::draw();
if (draw_cb_) { // call the Cairo draw callback
// manual method ? if yes explicitly get a cairo_context here
if (!Fl::cairo_autolink_context())
Fl::cairo_make_current(this);
draw_cb_(this, Fl::cairo_cc());
// flush Cairo drawings: necessary at least for Windows
Fl::cairo_flush(Fl::cairo_cc());
}
}

public:
/** The Cairo draw callback prototype you need to implement. */
typedef void (*cairo_draw_cb) (Fl_Cairo_Window* self, cairo_t* def);

/**
You must provide a draw callback that implements your Cairo rendering.
This method permits you to set your Cairo callback to \p cb.
*/
void set_draw_cb(cairo_draw_cb cb) { draw_cb_ = cb; }
private:
cairo_draw_cb draw_cb_;
};


/** @} */

# endif // FLTK_HAVE_CAIRO
#endif // FL_CAIRO_WINDOW_H
178 changes: 178 additions & 0 deletions include/windows/amd64/FL/Fl_Chart.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
//
// Fl_Chart widget header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file FL/Fl_Chart.H
\brief Fl_Chart widget.
*/

#ifndef Fl_Chart_H
#define Fl_Chart_H

#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif

// values for type()
#define FL_BAR_CHART 0 ///< type() for Bar Chart variant
#define FL_HORBAR_CHART 1 ///< type() for Horizontal Bar Chart variant
#define FL_LINE_CHART 2 ///< type() for Line Chart variant
#define FL_FILL_CHART 3 ///< type() for Fill Line Chart variant
#define FL_SPIKE_CHART 4 ///< type() for Spike Chart variant
#define FL_PIE_CHART 5 ///< type() for Pie Chart variant
#define FL_SPECIALPIE_CHART 6 ///< type() for Special Pie Chart variant

#define FL_FILLED_CHART FL_FILL_CHART ///< for compatibility

#define FL_CHART_MAX 128 ///< max entries per chart
#define FL_CHART_LABEL_MAX 18 ///< max label length for entry

/** For internal use only. */
struct FL_CHART_ENTRY {
float val; ///< For internal use only.
unsigned col; ///< For internal use only.
char str[FL_CHART_LABEL_MAX + 1]; ///< For internal use only.
};

/**
\class Fl_Chart
\brief Fl_Chart displays simple charts.
It is provided for Forms compatibility.
\image html charts.png
\image latex charts.png "Fl_Chart" width=10cm
\todo Refactor Fl_Chart::type() information.
The type of an Fl_Chart object can be set using type(uchar t) to:
| Chart Type | Description |
|---------------------|-------------------------------------------------------------------------------------------------|
| FL_BAR_CHART | Each sample value is drawn as a vertical bar. |
| FL_FILLED_CHART | The chart is filled from the bottom of the graph to the sample values. |
| FL_HORBAR_CHART | Each sample value is drawn as a horizontal bar. |
| FL_LINE_CHART | The chart is drawn as a polyline with vertices at each sample value. |
| FL_PIE_CHART | A pie chart is drawn with each sample value being drawn as a proportionate slice in the circle. |
| FL_SPECIALPIE_CHART | Like \c FL_PIE_CHART, but the first slice is separated from the pie. |
| FL_SPIKE_CHART | Each sample value is drawn as a vertical line. |
*/
class FL_EXPORT Fl_Chart : public Fl_Widget {
int numb;
int maxnumb;
int sizenumb;
FL_CHART_ENTRY *entries;
double min, max;
uchar autosize_;
Fl_Font textfont_;
Fl_Fontsize textsize_;
Fl_Color textcolor_;

protected:
void draw() FL_OVERRIDE;

// (static) protected draw methods (STR 2022)
// these methods are documented in src/Fl_Chart.cxx

static void draw_barchart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[],
double min, double max, int autosize, int maxnumb, Fl_Color textcolor);

static void draw_horbarchart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[],
double min, double max, int autosize, int maxnumb,
Fl_Color textcolor);

static void draw_linechart(int type, int x, int y, int w, int h, int numb,
FL_CHART_ENTRY entries[], double min, double max, int autosize,
int maxnumb, Fl_Color textcolor);

static void draw_piechart(int x, int y, int w, int h, int numb, FL_CHART_ENTRY entries[],
int special, Fl_Color textcolor);

public:
Fl_Chart(int X, int Y, int W, int H, const char *L = 0);

~Fl_Chart();

void clear();

void add(double val, const char *str = 0, unsigned col = 0);

void insert(int ind, double val, const char *str = 0, unsigned col = 0);

void replace(int ind, double val, const char *str = 0, unsigned col = 0);

/**
Gets the lower and upper bounds of the chart values.
\param[out] a, b are set to lower, upper
*/
void bounds(double *a, double *b) const {
*a = min;
*b = max;
}

void bounds(double a, double b);

/**
Returns the number of data values in the chart.
*/
int size() const { return numb; }

/**
Sets the widget size (width, height).
This is the same as calling Fl_Widget::size(int W, int H);
\param[in] W,H new width and height of the widget
*/
void size(int W, int H) { Fl_Widget::size(W, H); }

/**
Gets the maximum number of data values for a chart.
*/
int maxsize() const { return maxnumb; }

void maxsize(int m);

/** Gets the chart's text font */
Fl_Font textfont() const { return textfont_; }

/** Sets the chart's text font to \p s. */
void textfont(Fl_Font s) { textfont_ = s; }

/** Gets the chart's text size */
Fl_Fontsize textsize() const { return textsize_; }

/** Sets the chart's text size to \p s. */
void textsize(Fl_Fontsize s) { textsize_ = s; }

/** Gets the chart's text color */
Fl_Color textcolor() const { return textcolor_; }

/** Sets the chart's text color to \p n. */
void textcolor(Fl_Color n) { textcolor_ = n; }

/**
Gets whether the chart will automatically adjust the bounds of the chart.
\returns non-zero if auto-sizing is enabled and zero if disabled.
*/
uchar autosize() const { return autosize_; }

/**
Sets whether the chart will automatically adjust the bounds of the chart.
\param[in] n non-zero to enable automatic resizing, zero to disable.
*/
void autosize(uchar n) { autosize_ = n; }
};

#endif
110 changes: 110 additions & 0 deletions include/windows/amd64/FL/Fl_Check_Browser.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//
// Fl_Check_Browser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2020 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Check_Browser widget . */

#ifndef Fl_Check_Browser_H
#define Fl_Check_Browser_H

#include "Fl.H"
#include "Fl_Browser_.H"

/**
The Fl_Check_Browser widget displays a scrolling list of text
lines that may be selected and/or checked by the user.
*/
class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {

protected:
/* required routines for Fl_Browser_ subclass: */
void *item_first() const FL_OVERRIDE;
void *item_next(void *) const FL_OVERRIDE;
void *item_prev(void *) const FL_OVERRIDE;
int item_height(void *) const FL_OVERRIDE;
int item_width(void *) const FL_OVERRIDE;
void item_draw(void *, int, int, int, int) const FL_OVERRIDE;
void item_select(void *, int) FL_OVERRIDE;
int item_selected(void *) const FL_OVERRIDE;
const char *item_text(void *item) const FL_OVERRIDE;

public:
void *item_at(int index) const FL_OVERRIDE;
void item_swap(int ia, int ib);
void item_swap(void *a, void *b) FL_OVERRIDE;

/* private data */

public: // IRIX 5.3 C++ compiler doesn't support private structures...

#ifndef FL_DOXYGEN
/** For internal use only. */
struct cb_item {
cb_item *next; /**< For internal use only. */
cb_item *prev; /**< For internal use only. */
char checked; /**< For internal use only. */
char selected; /**< For internal use only. */
char *text; /**< For internal use only. */
};
#endif // !FL_DOXYGEN

private:
cb_item *first;
cb_item *last;
cb_item *cache;
int cached_item;
int nitems_;
int nchecked_;
cb_item *find_item(int) const;
int lineno(cb_item *) const;

public:
Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0);
/** The destructor deletes all list items and destroys the browser. */
~Fl_Check_Browser() { clear(); }
int add(char *s); // add an (unchecked) item
int add(char *s, int b); // add an item and set checked
// both return the new nitems()
int remove(int item); // delete an item. Returns nitems()

// inline const char * methods to avoid breaking binary compatibility...
/** See int Fl_Check_Browser::add(char *s) */
int add(const char *s) { return add((char *)s); }
/** See int Fl_Check_Browser::add(char *s) */
int add(const char *s, int b) { return add((char *)s, b); }

void clear(); // delete all items
/**
Returns how many lines are in the browser. The last line number is equal to
this.
*/
int nitems() const { return nitems_; }
/** Returns how many items are currently checked. */
int nchecked() const { return nchecked_; }
int checked(int item) const;
void checked(int item, int b);
/** Equivalent to Fl_Check_Browser::checked(item, 1). */
void set_checked(int item) { checked(item, 1); }
void check_all();
void check_none();
int value() const; // currently selected item
char *text(int item) const; // returns pointer to internal buffer

protected:
int handle(int) FL_OVERRIDE;
};

#endif // Fl_Check_Browser_H
33 changes: 33 additions & 0 deletions include/windows/amd64/FL/Fl_Check_Button.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// Check button header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

#ifndef Fl_Check_Button_H
#define Fl_Check_Button_H

#include "Fl_Light_Button.H"

/*
class: Fl_Check_Button.
A button with a "checkmark" to show its status.
*/

class FL_EXPORT Fl_Check_Button : public Fl_Light_Button {
public:
Fl_Check_Button(int X, int Y, int W, int H, const char *L = 0);
};

#endif
123 changes: 123 additions & 0 deletions include/windows/amd64/FL/Fl_Choice.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
//
// Choice header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2024 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Choice widget . */

#ifndef Fl_Choice_H
#define Fl_Choice_H

#include "Fl_Menu_.H"

/**
\class Fl_Choice
\brief A button that is used to pop up a menu.
\image html choice.png
\image latex choice.png "Fl_Choice" width=4cm
This is a button that, when pushed, pops up a menu (or hierarchy of menus)
defined by an array of Fl_Menu_Item objects.
Motif calls this an OptionButton.
The only difference between this and a Fl_Menu_Button is that the name of
the most recent chosen menu item is displayed inside the box, while the
label is displayed outside the box. However, since the use of this is most
often to control a single variable rather than do individual callbacks,
some of the Fl_Menu_Button methods are redescribed here in those terms.
When the user clicks a menu item, value() is set to that item
and then:
- The item's callback is done if one has been set; the
Fl_Choice is passed as the Fl_Widget* argument,
along with any userdata configured for the callback.
- If the item does not have a callback, the Fl_Choice widget's
callback is done instead, along with any userdata configured
for it. The callback can determine which item was picked using
value(), mvalue(), item_pathname(), etc.
All three mouse buttons pop up the menu. The Forms behavior of the first
two buttons to increment/decrement the choice is not implemented. This
could be added with a subclass, however.
The menu will also pop up in response to shortcuts indicated by putting
a '\&' character in the label(). See Fl_Button::shortcut(int s) for a
description of this.
Typing the shortcut() of any of the items will do exactly the same as when
you pick the item with the mouse. The '\&' character in item names are
only looked at when the menu is popped up, however.
The inherited Fl_Widget::changed() and related methods can be used as follows:
\li <tt>int Fl_Widget::changed() const</tt>
This value is true when the user picks a different value. <em>It is turned
off by value() and just before doing a callback (the callback can turn
it back on if desired).</em>
\li <tt>void Fl_Widget::set_changed()</tt>
This method sets the changed() flag.
\li <tt>void Fl_Widget::clear_changed()</tt>
This method clears the changed() flag.
The inherited Fl_Menu_::down_box() methods can be used as follows:
\li <tt>Fl_Boxtype Fl_Menu_::down_box() const</tt>
Gets the current down box, which is used when the menu is popped up.
The default down box type is \c FL_DOWN_BOX.
\li <tt>void Fl_Menu_::down_box(Fl_Boxtype b)</tt>
Sets the current down box type to \p b.
Simple example:
\par
\code
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Choice.H>
int main() {
Fl_Window *win = new Fl_Window(300,200);
Fl_Choice *choice = new Fl_Choice(100,10,100,25,"Choice:");
choice->add("Zero");
choice->add("One");
choice->add("Two");
choice->add("Three");
choice->value(2); // make "Two" selected by default (zero based!)
win->end();
win->show();
return Fl::run();
}
\endcode
*/
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
protected:
void draw() FL_OVERRIDE;
public:
int handle(int) FL_OVERRIDE;

Fl_Choice(int X, int Y, int W, int H, const char *L = 0);

/**
Gets the index of the last item chosen by the user.
The index is -1 initially.
*/
int value() const {return Fl_Menu_::value();}

int value(int v);

int value(const Fl_Menu_Item* v);
};

#endif
163 changes: 163 additions & 0 deletions include/windows/amd64/FL/Fl_Clock.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
//
// Clock header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2017 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Clock, Fl_Clock_Output widgets . */

#ifndef Fl_Clock_H
#define Fl_Clock_H

#ifndef Fl_Widget_H
#include "Fl_Widget.H"
#endif

// Values for type():
// Please change doxygen documentation below (class Fl_Clock_Output)
// accordingly as well when changing the following type values:

#define FL_SQUARE_CLOCK 0 /**< type() of Square Clock variant */
#define FL_ROUND_CLOCK 1 /**< type() of Round Clock variant */
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK /**< An analog clock is square */
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK /**< Not yet implemented */

// fabien: Please keep the horizontal formatting of both images in class desc,
// don't lose vertical space for nothing!

/**
\class Fl_Clock_Output
\brief This widget can be used to display a program-supplied time.
The time shown on the clock is not updated. To display the current time,
use Fl_Clock instead.
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
\image html clock.png
\htmlonly </TD> <TD> \endhtmlonly
\image html round_clock.png
\htmlonly </TD> </TR> </table> \endhtmlonly
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
Values for clock type() (\#include \<FL/Clock.H\>):
\code
#define FL_SQUARE_CLOCK 0 // Square Clock variant
#define FL_ROUND_CLOCK 1 // Round Clock variant
#define FL_ANALOG_CLOCK FL_SQUARE_CLOCK // An analog clock is square
#define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK // Not yet implemented
\endcode
*/
class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
int hour_, minute_, second_;
ulong value_;
int shadow_; // draw shadows of hands
void drawhands(Fl_Color,Fl_Color); // part of draw
protected:
void draw() FL_OVERRIDE;
void draw(int X, int Y, int W, int H);
public:

Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);

void value(ulong v); // set to this Unix time

void value(int H, int m, int s);

/**
Returns the displayed time.
Returns the time in seconds since the UNIX epoch (January 1, 1970).
\see value(ulong)
*/
ulong value() const {return value_;}

/**
Returns the displayed hour (0 to 23).
\see value(), minute(), second()
*/
int hour() const {return hour_;}

/**
Returns the displayed minute (0 to 59).
\see value(), hour(), second()
*/
int minute() const {return minute_;}

/**
Returns the displayed second (0 to 60, 60=leap second).
\see value(), hour(), minute()
*/
int second() const {return second_;}

/**
Returns the shadow drawing mode of the hands.
\returns shadow drawing mode of the hands
\retval 0 no shadows
\retval 1 draw shadows of hands (default)
*/
int shadow() const {return shadow_;}

/**
Sets the shadow drawing mode of the hands.
Enables (1) or disables (0) drawing the hands with shadows.
Values except 0 and 1 are reserved for future extensions and
yield undefined behavior.
The default is to draw the shadows (1).
\param[in] mode 1 = shadows (default), 0 = no shadows
*/
void shadow(int mode) { shadow_ = mode ? 1 : 0; }
};

// a Fl_Clock displays the current time always by using a timeout:

/**
\class Fl_Clock
\brief This widget provides a round analog clock display.
Fl_Clock is provided for Forms compatibility.
It installs a 1-second timeout callback using Fl::add_timeout().
You can choose the rounded or square type of the clock with type().
Please see Fl_Clock_Output widget for applicable values.
\htmlonly <BR> <table align=CENTER border=1 cellpadding=5 >
<caption align=bottom>type() FL_SQUARE_CLOCK and FL_ROUND_CLOCK </caption> <TR><TD> \endhtmlonly
\image html clock.png
\htmlonly </TD> <TD> \endhtmlonly
\image html round_clock.png
\htmlonly </TD> </TR> </table> \endhtmlonly
\image latex clock.png "FL_SQUARE_CLOCK type" width=4cm
\image latex round_clock.png "FL_ROUND_CLOCK type" width=4cm
\see class Fl_Clock_Output
*/
class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
public:
int handle(int) FL_OVERRIDE;

Fl_Clock(int X, int Y, int W, int H, const char *L = 0);

Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L);

~Fl_Clock();
};

#endif
193 changes: 193 additions & 0 deletions include/windows/amd64/FL/Fl_Color_Chooser.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
//
// Color chooser header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2019 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file
Fl_Color_Chooser widget . */

// The color chooser object and the color chooser popup. The popup
// is just a window containing a single color chooser and some boxes
// to indicate the current and cancelled color.

#ifndef Fl_Color_Chooser_H
#define Fl_Color_Chooser_H

#include <FL/Fl_Group.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Return_Button.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Value_Input.H>

#ifndef FL_DOXYGEN

/** For internal use only */
class FL_EXPORT Flcc_HueBox : public Fl_Widget {
int px, py;
protected:
void draw() FL_OVERRIDE;
int handle_key(int);
public:
int handle(int) FL_OVERRIDE;
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
px = py = 0;}
};

/** For internal use only */
class FL_EXPORT Flcc_ValueBox : public Fl_Widget {
int py;
protected:
void draw() FL_OVERRIDE;
int handle_key(int);
public:
int handle(int) FL_OVERRIDE;
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
py = 0;}
};

/** For internal use only */
class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input {
public:
int format(char*) FL_OVERRIDE;
Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {}
};

#endif // !FL_DOXYGEN

/** \addtogroup group_comdlg
@{ */

/**
\class Fl_Color_Chooser
\brief The Fl_Color_Chooser widget provides a standard RGB color chooser.
\image html fl_color_chooser.jpg
\image latex fl_color_chooser.jpg "fl_color_chooser()" width=5cm
You can place any number of the widgets into a panel of your own design.
The diagram shows the widget as part of a color chooser dialog created by
the fl_color_chooser() function. The Fl_Color_Chooser widget contains the
hue box, value slider, and rgb input fields from the above diagram (it
does not have the color chips or the Cancel or OK buttons).
The callback is done every time the user changes the rgb value. It is not
done if they move the hue control in a way that produces the \e same rgb
value, such as when saturation or value is zero.
The fl_color_chooser() function pops up a window to let the user pick an
arbitrary RGB color. They can pick the hue and saturation in the "hue box"
on the left (hold down CTRL to just change the saturation), and the
brightness using the vertical slider. Or they can type the 8-bit numbers
into the RGB Fl_Value_Input fields, or drag the mouse across them to adjust
them. The pull-down menu lets the user set the input fields to show RGB,
HSV, or 8-bit RGB (0 to 255).
The user can press CTRL-C to copy the currently selected color value as
text in RGB hex format with leading zeroes to the clipboard, for instance
\p FL_GREEN would be '00FF00' (since FLTK 1.4.0).
fl_color_chooser() returns non-zero if the user picks ok, and updates the
RGB values. If the user picks cancel or closes the window this returns
zero and leaves RGB unchanged.
If you use the color chooser on an 8-bit screen, it will allocate all the
available colors, leaving you no space to exactly represent the color the
user picks! You can however use fl_rectf() to fill a region with a simulated
color using dithering.
Callback reasons can be \c FL_REASON_DRAGGED, \c FL_REASON_CHANGED, or
\c FL_REASON_RESELECTED.
*/
/** @} */
class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
Flcc_HueBox huebox;
Flcc_ValueBox valuebox;
Fl_Choice choice;
Flcc_Value_Input rvalue;
Flcc_Value_Input gvalue;
Flcc_Value_Input bvalue;
Fl_Box resize_box;
double hue_, saturation_, value_;
double r_, g_, b_;
void set_valuators();
static void rgb_cb(Fl_Widget*, void*);
static void mode_cb(Fl_Widget*, void*);
public:

int handle(int e) FL_OVERRIDE;

/**
Returns which Fl_Color_Chooser variant is currently active
\return color modes are rgb(0), byte(1), hex(2), or hsv(3)
*/
int mode() {return choice.value();}

/**
Set which Fl_Color_Chooser variant is currently active
\param[in] newMode color modes are rgb(0), byte(1), hex(2), or hsv(3)
*/
void mode(int newMode);

/**
Returns the current hue.
0 <= hue < 6. Zero is red, one is yellow, two is green, etc.
<em>This value is convenient for the internal calculations - some other
systems consider hue to run from zero to one, or from 0 to 360.</em>
*/
double hue() const {return hue_;}

/**
Returns the saturation.
0 <= saturation <= 1.
*/
double saturation() const {return saturation_;}

/**
Returns the value/brightness.
0 <= value <= 1.
*/
double value() const {return value_;}

/**
Returns the current red value.
0 <= r <= 1.
*/
double r() const {return r_;}

/**
Returns the current green value.
0 <= g <= 1.
*/
double g() const {return g_;}

/**
Returns the current blue value.
0 <= b <= 1.
*/
double b() const {return b_;}

int hsv(double H, double S, double V);

int rgb(double R, double G, double B);

static void hsv2rgb(double H, double S, double V, double& R, double& G, double& B);

static void rgb2hsv(double R, double G, double B, double& H, double& S, double& V);

Fl_Color_Chooser(int X, int Y, int W, int H, const char *L = 0);
};

FL_EXPORT int fl_color_chooser(const char* name, double& r, double& g, double& b, int m=-1);
FL_EXPORT int fl_color_chooser(const char* name, uchar& r, uchar& g, uchar& b, int m=-1);

#endif
107 changes: 107 additions & 0 deletions include/windows/amd64/FL/Fl_Copy_Surface.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
//
// Copy-to-clipboard code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

#ifndef Fl_Copy_Surface_H
#define Fl_Copy_Surface_H

#include <FL/Fl_Widget_Surface.H>

/** Supports copying of graphical data to the clipboard.
<br> After creation of an Fl_Copy_Surface object, make it the current drawing surface calling Fl_Surface_Device::push_current(), and all subsequent graphics requests
will be recorded in the clipboard. It's possible to draw widgets (using Fl_Copy_Surface::draw()
) or to use any of the \ref fl_drawings or the \ref fl_attributes.
Finally, delete the Fl_Copy_Surface object to load the clipboard with the graphical data.
<br> Fl_Gl_Window 's can be copied to the clipboard as well.
<br> Usage example:
\code
Fl_Widget *g = ...; // a widget you want to copy to the clipboard
Fl_Copy_Surface *copy_surf = new Fl_Copy_Surface(g->w(), g->h()); // create an Fl_Copy_Surface object
Fl_Surface_Device::push_current(copy_surf); // direct graphics requests to the clipboard
fl_color(FL_WHITE); fl_rectf(0, 0, g->w(), g->h()); // draw a white background
copy_surf->draw(g); // draw the g widget in the clipboard
Fl_Surface_Device::pop_current(); // direct graphics requests back to their previous destination
delete copy_surf; // after this, the clipboard is loaded
\endcode
Platform details:
\li Windows: Transparent RGB images copy without transparency.
The graphical data are copied to the clipboard in two formats: 1) as an 'enhanced metafile';
2) as a color bitmap. Applications to which the clipboard content is pasted can use the format
that suits them best.
\li Mac OS: The graphical data are copied to the clipboard (a.k.a. pasteboard) in two 'flavors':
1) in vectorial form as PDF data; 2) in bitmap form as a TIFF image.
Applications to which the clipboard content is pasted can use the flavor that suits them best.
\li X11 and Wayland: the graphical data are copied to the clipboard as an image in BMP format.
*/
class FL_EXPORT Fl_Copy_Surface : public Fl_Widget_Surface {
private:
class Fl_Copy_Surface_Driver *platform_surface;
protected:
void translate(int x, int y) FL_OVERRIDE;
void untranslate() FL_OVERRIDE;
public:
Fl_Copy_Surface(int w, int h);
~Fl_Copy_Surface();
void set_current() FL_OVERRIDE;
bool is_current() FL_OVERRIDE;
/** Returns the pixel width of the copy surface */
int w();
/** Returns the pixel height of the copy surface */
int h();
void origin(int *x, int *y) FL_OVERRIDE;
void origin(int x, int y) FL_OVERRIDE;
int printable_rect(int *w, int *h) FL_OVERRIDE;
};


/**
\cond DriverDev
\addtogroup DriverDeveloper
\{
*/

/**
A base class describing the interface between FLTK and draw-to-clipboard operations.
This class is only for internal use by the FLTK library.
A supported platform should implement the virtual methods of this class
in order to support drawing to the clipboard through class Fl_Copy_Surface.
*/
class Fl_Copy_Surface_Driver : public Fl_Widget_Surface {
friend class Fl_Copy_Surface;
protected:
int width;
int height;
Fl_Copy_Surface_Driver(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {}
virtual ~Fl_Copy_Surface_Driver() {}
void set_current() FL_OVERRIDE = 0;
void translate(int x, int y) FL_OVERRIDE = 0;
void untranslate() FL_OVERRIDE = 0;
int printable_rect(int *w, int *h) FL_OVERRIDE;
/** Each platform implements this function its own way.
It returns an object implementing all virtual functions
of class Fl_Copy_Surface_Driver for the platform.
*/
static Fl_Copy_Surface_Driver *newCopySurfaceDriver(int w, int h);
};

/**
\}
\endcond
*/

#endif // Fl_Copy_Surface_H
109 changes: 109 additions & 0 deletions include/windows/amd64/FL/Fl_Counter.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
//
// Counter header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Counter widget . */

// A numerical value with up/down step buttons. From Forms.

#ifndef Fl_Counter_H
#define Fl_Counter_H

#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif

// values for type():
#define FL_NORMAL_COUNTER 0 /**< type() for counter with fast buttons */
#define FL_SIMPLE_COUNTER 1 /**< type() for counter without fast buttons */

/**
Controls a single floating point value with button (or keyboard) arrows.
Double arrows buttons achieve larger steps than simple arrows.
\see Fl_Spinner for value input with vertical step arrows.
\image html counter.png
\image latex counter.png "Fl_Counter" width=4cm
The type of an Fl_Counter object can be set using Fl_Widget::type(uchar) to:
\li \c FL_NORMAL_COUNTER: Displays a counter with 4 arrow buttons.
\li \c FL_SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons.
*/
class FL_EXPORT Fl_Counter : public Fl_Valuator {

Fl_Font textfont_;
Fl_Fontsize textsize_;
Fl_Color textcolor_;
double lstep_;
uchar mouseobj_;
static void repeat_callback(void *);
int calc_mouseobj();
void increment_cb();

protected:

void draw() FL_OVERRIDE;
// compute widths of arrow boxes
void arrow_widths(int &w1, int &w2);

public:

int handle(int) FL_OVERRIDE;

Fl_Counter(int X, int Y, int W, int H, const char* L = 0);
~Fl_Counter();

/**
Sets the increment for the large step buttons.
The default value is 1.0.
\param[in] a large step increment.
*/
void lstep(double a) {lstep_ = a;}

/**
Sets the increments for the normal and large step buttons.
\param[in] a, b normal and large step increments.
*/
void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}

/**
Sets the increment for the normal step buttons.
\param[in] a normal step increment.
*/
void step(double a) {Fl_Valuator::step(a);}

/**
Returns the increment for normal step buttons.
*/
double step() const {return Fl_Valuator::step();}

/** Gets the text font */
Fl_Font textfont() const {return textfont_;}
/** Sets the text font to \p s */
void textfont(Fl_Font s) {textfont_ = s;}

/** Gets the font size */
Fl_Fontsize textsize() const {return textsize_;}
/** Sets the font size to \p s */
void textsize(Fl_Fontsize s) {textsize_ = s;}

/** Gets the font color */
Fl_Color textcolor() const {return textcolor_;}
/** Sets the font color to \p s */
void textcolor(Fl_Color s) {textcolor_ = s;}

};

#endif
127 changes: 127 additions & 0 deletions include/windows/amd64/FL/Fl_Device.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
//
// Definition of classes Fl_Surface_Device, Fl_Display_Device
// for the Fast Light Tool Kit (FLTK).
//
// Copyright 2010-2021 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/** \file Fl_Device.H
\brief declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
*/

#ifndef Fl_Device_H
#define Fl_Device_H

#include <FL/Fl_Plugin.H>
#include <FL/platform_types.h>

class Fl_Graphics_Driver;
class Fl_RGB_Image;
class Fl_Widget;
class Fl_Image_Surface;

/**
A drawing surface that's susceptible to receive graphical output.
Any FLTK application has at any time a current drawing surface to which all drawing requests are directed.
The current surface is given by Fl_Surface_Device::surface().
When main() begins running, the current drawing surface has been set to the computer's display,
an instance of the Fl_Display_Device class.
A drawing surface other than the computer's display, is typically used as follows:
<ol><li> Create \c surface, an object from an Fl_Surface_Device derived class (e.g., Fl_Image_Surface, Fl_Printer, Fl_Copy_Surface).
<li> Call \c Fl_Surface_Device::push_current(surface); to redirect all graphics requests to
\c surface which becomes the new current drawing surface (not necessary with classes Fl_Printer / Fl_PostScript_File_Device /
Fl_PDF_File_Surface because it is done by Fl_Paged_Device::begin_page()).
<li> At this point all of the \ref fl_drawings (e.g., fl_rect()) or the \ref fl_attributes or \ref drawing_images functions
(e.g., fl_draw_image(), Fl_Image::draw()) operate on the new current drawing surface.
It's also possible to draw to the current surface any widget with Fl_Widget_Surface::draw(Fl_Widget*, int, int), a window and its
titlebar with Fl_Widget_Surface::draw_decorated_window(), or the content of a rectangular zone of a window
with Fl_Widget_Surface::print_window_part().
<li> After all drawing requests have been performed, redirect graphics requests back to their previous destination
with \c Fl_Surface_Device::pop_current(); (not necessary with classes Fl_Printer / Fl_PostScript_File_Device / Fl_PDF_File_Surface).
<li> Delete \c surface.
</ol>
For back-compatibility, it is also possible to use the Fl_Surface_Device::set_current() member function
to change the current drawing surface, once to the new surface, once to the previous one.
*/
class FL_EXPORT Fl_Surface_Device {
/** The graphics driver in use by this surface. */
Fl_Graphics_Driver *pGraphicsDriver;
static Fl_Surface_Device *surface_; // the surface that currently receives graphics requests
static Fl_Surface_Device *default_surface(); // create surface if none exists yet
protected:
/** FLTK calls this each time a surface ceases to be the current drawing surface.
This member function is mostly of interest to developers of new Fl_Surface_Device derived classes.
It allows to perform surface-specific operations necessary when this surface ceases to be current.
Each implementation should end with a call to Fl_Surface_Device::end_current(). */
virtual void end_current() { surface_ = 0;}
/** Constructor that sets the graphics driver to use for the created surface. */
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
/** Sets the graphics driver of this drawing surface. */
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;}
public:
virtual void set_current(void);
virtual bool is_current();
/** \brief Returns the graphics driver of this drawing surface. */
inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; }
/** The current drawing surface.
In other words, the Fl_Surface_Device object that currently receives all graphics requests.
\note It's possible to transiently remove the GUI scaling factor in place in the current
drawing surface with \ref fl_override_scale(). */
static inline Fl_Surface_Device *surface() {
return surface_ ? surface_ : default_surface();
}
/** \brief The destructor. */
virtual ~Fl_Surface_Device();
static void push_current(Fl_Surface_Device *new_current);
static Fl_Surface_Device *pop_current();
};

/**
The computer's display.
When FLTK begins to access the computer's display, it creates an object of class Fl_Display_Device and makes
it the current drawing surface.
*/
class FL_EXPORT Fl_Display_Device : public Fl_Surface_Device {
Fl_Display_Device(Fl_Graphics_Driver *graphics_driver);
public:
static Fl_Display_Device *display_device();
};

/**
This plugin socket allows the integration of new device drivers for special
window or screen types.
This class is not intended for use outside the FLTK library.
It is currently used to provide an automated printing
service and screen capture for OpenGL windows, if linked with fltk_gl.
*/
class Fl_Device_Plugin : public Fl_Plugin {
public:
/** \brief The constructor */
Fl_Device_Plugin(const char *pluginName)
: Fl_Plugin(klass(), pluginName) { }
/** \brief Returns the class name */
virtual const char *klass() { return "fltk:device"; }
/** \brief Returns the plugin name */
virtual const char *name() = 0;
/** \brief Prints a widget */
virtual int print(Fl_Widget* w) = 0;
/** Captures a rectangle of a widget as an image
\return The captured pixels as an RGB image
*/
virtual Fl_RGB_Image* rectangle_capture(Fl_Widget *widget, int x, int y, int w, int h) = 0;
/** Returns the OpenGL plugin */
static Fl_Device_Plugin *opengl_plugin();
};

#endif // Fl_Device_H
82 changes: 82 additions & 0 deletions include/windows/amd64/FL/Fl_Dial.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//
// Dial header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2022 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Dial widget . */

#ifndef Fl_Dial_H
#define Fl_Dial_H

#ifndef Fl_Valuator_H
#include "Fl_Valuator.H"
#endif

// values for type():
#define FL_NORMAL_DIAL 0 /**< type() for dial variant with dot */
#define FL_LINE_DIAL 1 /**< type() for dial variant with line */
#define FL_FILL_DIAL 2 /**< type() for dial variant with filled arc */

/**
The Fl_Dial widget provides a circular dial to control a
single floating point value.
\image html dial.png
\image latex dial.png "Fl_Dial" width=4cm
Use type() to set the type of the dial to:
<UL>
<LI>FL_NORMAL_DIAL - Draws a normal dial with a knob. </LI>
<LI>FL_LINE_DIAL - Draws a dial with a line. </LI>
<LI>FL_FILL_DIAL - Draws a dial with a filled arc. </LI>
</UL>
*/
class FL_EXPORT Fl_Dial : public Fl_Valuator {

short a1,a2;

protected:

// these allow subclasses to put the dial in a smaller area:
void draw(int X, int Y, int W, int H);
int handle(int event, int X, int Y, int W, int H);
void draw() FL_OVERRIDE;

public:

int handle(int) FL_OVERRIDE;
/**
Creates a new Fl_Dial widget using the given position, size,
and label string. The default type is FL_NORMAL_DIAL.
*/
Fl_Dial(int x,int y,int w,int h, const char *l = 0);
/**
Sets Or gets the angles used for the minimum and maximum values. The default
values are 45 and 315 (0 degrees is straight down and the angles
progress clockwise). Normally angle1 is less than angle2, but if you
reverse them the dial moves counter-clockwise.
*/
short angle1() const {return a1;}
/** See short angle1() const */
void angle1(short a) {a1 = a;}
/** See short angle1() const */
short angle2() const {return a2;}
/** See short angle1() const */
void angle2(short a) {a2 = a;}
/** See short angle1() const */
void angles(short a, short b) {a1 = a; a2 = b;}

};

#endif
55 changes: 55 additions & 0 deletions include/windows/amd64/FL/Fl_Double_Window.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//
// Double-buffered window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2010 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_Double_Window widget . */

#ifndef Fl_Double_Window_H
#define Fl_Double_Window_H

#include "Fl_Window.H"

/**
The Fl_Double_Window provides a double-buffered window.
It will draw the window data into an off-screen pixmap, and then
copy it to the on-screen window.
*/
class FL_EXPORT Fl_Double_Window : public Fl_Window
{
public:
Fl_Double_Window *as_double_window() FL_OVERRIDE {return this; }
void show() FL_OVERRIDE;
/** Same as Fl_Window::show(int a, char **b) */
void show(int a, char **b) {Fl_Window::show(a,b);}
void resize(int,int,int,int) FL_OVERRIDE;
void hide() FL_OVERRIDE;
void flush() FL_OVERRIDE;
~Fl_Double_Window();

/**
Creates a new Fl_Double_Window widget using the given
position, size, and label (title) string.
*/
Fl_Double_Window(int W, int H, const char *l = 0);

/**
See Fl_Double_Window::Fl_Double_Window(int w, int h, const char *label = 0)
*/
Fl_Double_Window(int X, int Y, int W, int H, const char *l = 0);

};

#endif
37 changes: 37 additions & 0 deletions include/windows/amd64/FL/Fl_Export.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Windows DLL export .
*
* Copyright 1998-2018 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
* https://www.fltk.org/COPYING.php
*
* Please see the following page on how to report bugs and issues:
*
* https://www.fltk.org/bugs.php
*/

#ifndef Fl_Export_H
# define Fl_Export_H

/*
* The following is used when building DLLs under Windows
* and when building .so's under unix/linux.
*/

# if defined(FL_DLL)
# ifdef FL_LIBRARY
# define FL_EXPORT __declspec(dllexport)
# else
# define FL_EXPORT __declspec(dllimport)
# endif /* FL_LIBRARY */
# elif __GNUC__ >= 4
# define FL_EXPORT __attribute__ ((visibility ("default")))
# else
# define FL_EXPORT
# endif /* FL_DLL */

#endif /* !Fl_Export_H */
99 changes: 99 additions & 0 deletions include/windows/amd64/FL/Fl_File_Browser.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
//
// FileBrowser definitions.
//
// Copyright 1999-2010 by Michael Sweet.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//

/* \file
Fl_File_Browser widget . */

//
// Include necessary header files...
//

#ifndef _Fl_File_Browser_H_
# define _Fl_File_Browser_H_

# include "Fl_Browser.H"
# include "Fl_File_Icon.H"
# include "filename.H"


//
// Fl_File_Browser class...
//

/** The Fl_File_Browser widget displays a list of filenames, optionally with file-specific icons. */
class FL_EXPORT Fl_File_Browser : public Fl_Browser {

int filetype_;
const char *directory_;
uchar iconsize_;
const char *pattern_;
const char *errmsg_;

int full_height() const FL_OVERRIDE;
int item_height(void *) const FL_OVERRIDE;
int item_width(void *) const FL_OVERRIDE;
void item_draw(void *, int, int, int, int) const FL_OVERRIDE;
int incr_height() const FL_OVERRIDE { return (item_height(0) + linespacing()); }

public:
enum { FILES, DIRECTORIES };

Fl_File_Browser(int, int, int, int, const char * = 0);
~Fl_File_Browser();

/** Sets or gets the size of the icons. The default size is 20 pixels. */
uchar iconsize() const { return (iconsize_); }
/** Sets or gets the size of the icons. The default size is 20 pixels. */
void iconsize(uchar s) { iconsize_ = s; redraw(); }

/**
Sets or gets the filename filter. The pattern matching uses
the fl_filename_match()
function in FLTK.
*/
void filter(const char *pattern);
/**
Sets or gets the filename filter. The pattern matching uses
the fl_filename_match()
function in FLTK.
*/
const char *filter() const { return (pattern_); }
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }

/**
Sets or gets the file browser type, FILES or
DIRECTORIES. When set to FILES, both
files and directories are shown. Otherwise only directories are
shown.
*/
int filetype() const { return (filetype_); }
/**
Sets or gets the file browser type, FILES or
DIRECTORIES. When set to FILES, both
files and directories are shown. Otherwise only directories are
shown.
*/
void filetype(int t) { filetype_ = t; }
void errmsg(const char *emsg);
/**
Returns OS error messages, or NULL if none. Use when advised.
*/
const char* errmsg() const { return errmsg_; }
};

#endif // !_Fl_File_Browser_H_
257 changes: 257 additions & 0 deletions include/windows/amd64/FL/Fl_File_Chooser.H
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
//
// Fl_File_Chooser dialog for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2024 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
// https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
// https://www.fltk.org/bugs.php
//
// =======================================================================
// DO NOT EDIT FL/Fl_File_Chooser.H and src/Fl_File_Chooser.cxx !!!
// =======================================================================
// Please use fluid to change src/Fl_File_Chooser.fl interactively
// and then use fluid to "write code" or edit and use fluid -c .
// =======================================================================
//

// generated by Fast Light User Interface Designer (fluid) version 1.0400

#ifndef Fl_File_Chooser_H
#define Fl_File_Chooser_H
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Menu_Button.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Preferences.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_File_Browser.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_File_Input.H>
#include <FL/Fl_Return_Button.H>
#include <FL/fl_ask.H>

class FL_EXPORT Fl_File_Chooser {
public:
/**
\enum Type
Determines the type of file chooser presented to the user.
*/
enum Type {
SINGLE = 0, ///< Select a single, existing file.
MULTI = 1, ///< Select one or more existing files.
CREATE = 2, ///< When used alone, select a single, existing file or specify a new filename.
///< Can be combined with DIRECTORY (e.g. CREATE|DIRECTORY) to have the same
///< effect for directories.
DIRECTORY = 4 ///< Select a single, existing directory. Can be combined with CREATE.
};
private:
static Fl_Preferences *prefs_;
void (*callback_)(Fl_File_Chooser*, void *);
void *data_;
char directory_[FL_PATH_MAX];
char pattern_[FL_PATH_MAX];
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 *pathname, const char *pattern, int type_val, const char *title);
private:
Fl_Double_Window *window;
inline void cb_window_i(Fl_Double_Window*, void*);
static void cb_window(Fl_Double_Window*, void*);
Fl_Choice *showChoice;
inline void cb_showChoice_i(Fl_Choice*, void*);
static void cb_showChoice(Fl_Choice*, void*);
Fl_Menu_Button *favoritesButton;
inline void cb_favoritesButton_i(Fl_Menu_Button*, void*);
static void cb_favoritesButton(Fl_Menu_Button*, void*);
public:
Fl_Button *newButton;
private:
inline void cb_newButton_i(Fl_Button*, void*);
static void cb_newButton(Fl_Button*, void*);
inline void cb__i(Fl_Tile*, void*);
static void cb_(Fl_Tile*, void*);
Fl_File_Browser *fileList;
inline void cb_fileList_i(Fl_File_Browser*, void*);
static void cb_fileList(Fl_File_Browser*, void*);
Fl_Box *errorBox;
Fl_Box *previewBox;
public:
Fl_Check_Button *previewButton;
private:
inline void cb_previewButton_i(Fl_Check_Button*, void*);
static void cb_previewButton(Fl_Check_Button*, void*);
public:
Fl_Check_Button *showHiddenButton;
private:
inline void cb_showHiddenButton_i(Fl_Check_Button*, void*);
static void cb_showHiddenButton(Fl_Check_Button*, void*);
Fl_File_Input *fileName;
inline void cb_fileName_i(Fl_File_Input*, void*);
static void cb_fileName(Fl_File_Input*, void*);
Fl_Return_Button *okButton;
inline void cb_okButton_i(Fl_Return_Button*, void*);
static void cb_okButton(Fl_Return_Button*, void*);
Fl_Button *cancelButton;
inline void cb_cancelButton_i(Fl_Button*, void*);
static void cb_cancelButton(Fl_Button*, void*);
Fl_Double_Window *favWindow;
Fl_File_Browser *favList;
inline void cb_favList_i(Fl_File_Browser*, void*);
static void cb_favList(Fl_File_Browser*, void*);
Fl_Button *favUpButton;
inline void cb_favUpButton_i(Fl_Button*, void*);
static void cb_favUpButton(Fl_Button*, void*);
Fl_Button *favDeleteButton;
inline void cb_favDeleteButton_i(Fl_Button*, void*);
static void cb_favDeleteButton(Fl_Button*, void*);
Fl_Button *favDownButton;
inline void cb_favDownButton_i(Fl_Button*, void*);
static void cb_favDownButton(Fl_Button*, void*);
Fl_Button *favCancelButton;
inline void cb_favCancelButton_i(Fl_Button*, void*);
static void cb_favCancelButton(Fl_Button*, void*);
Fl_Return_Button *favOkButton;
inline void cb_favOkButton_i(Fl_Return_Button*, void*);
static void cb_favOkButton(Fl_Return_Button*, void*);
public:
~Fl_File_Chooser();
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);
char * directory();
void filter(const char *p);
const char * filter();
int filter_value();
void filter_value(int f);
void iconsize(uchar s);
uchar iconsize();
void label(const char *l);
const char * label();
void ok_label(const char *l);
const char * ok_label();
void preview(int e);
int preview() const { return previewButton->value(); }
private:
void showHidden(int e);
void remove_hidden_files();
public:
void rescan();
void rescan_keep_filename();
void show();
void hide();
int shown();
void textcolor(Fl_Color c);
Fl_Color textcolor();
void textfont(Fl_Font f);
Fl_Font textfont();
void textsize(Fl_Fontsize s);
Fl_Fontsize textsize();
void type(int t);
int type();
void * user_data() const;
void user_data(void *d);
const char *value(int f = 1);
void value(const char *filename);
int visible();
void position(int x, int y);
int x() const;
int y() const;
int w() const;
int h() const;
void size(int w, int h);
void resize(int x, int y, int w, int h);
/**
[standard text may be customized at run-time]
*/
static const char *add_favorites_label;
/**
[standard text may be customized at run-time]
*/
static const char *all_files_label;
/**
[standard text may be customized at run-time]
*/
static const char *custom_filter_label;
/**
[standard text may be customized at run-time]
*/
static const char *existing_file_label;
/**
[standard text may be customized at run-time]
*/
static const char *favorites_label;
/**
[standard text may be customized at run-time]
*/
static const char *filename_label;
/**
[standard text may be customized at run-time]
*/
static const char *filesystems_label;
/**
[standard text may be customized at run-time]
*/
static const char *manage_favorites_label;
/**
[standard text may be customized at run-time]
*/
static const char *new_directory_label;
/**
[standard text may be customized at run-time]
*/
static const char *new_directory_tooltip;
/**
[standard text may be customized at run-time]
*/
static const char *preview_label;
/**
[standard text may be customized at run-time]
*/
static const char *save_label;
/**
[standard text may be customized at run-time]
*/
static const char *show_label;
/**
[standard text may be customized at run-time]
*/
static const char *hidden_label;
/**
the sort function that is used when loading
the contents of a directory.
*/
static Fl_File_Sort_F *sort;
private:
Fl_Widget* ext_group;
public:
Fl_Widget* add_extra(Fl_Widget* gr);
protected:
void show_error_box(int val);
};
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);
FL_EXPORT void fl_file_chooser_callback(void (*cb)(const char*));
FL_EXPORT void fl_file_chooser_ok_label(const char*l);
#endif
Loading

0 comments on commit a9a3e04

Please sign in to comment.