mirror of https://github.com/fltk/fltk
Use `FL_OVERRIDE` for all overridden virtual methods (#611)
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
This commit is contained in:
parent
f58a93a159
commit
44c874b731
|
@ -43,9 +43,9 @@ class FL_EXPORT Fl_Adjuster : public Fl_Valuator {
|
|||
int ix;
|
||||
int soft_;
|
||||
protected:
|
||||
void draw();
|
||||
int handle(int);
|
||||
void value_damage();
|
||||
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);
|
||||
/**
|
||||
|
|
|
@ -54,13 +54,13 @@ public:
|
|||
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();
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const { return Fl_Image::copy(); }
|
||||
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
|
||||
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);}
|
||||
virtual void label(Fl_Widget*w);
|
||||
virtual void label(Fl_Menu_Item*m);
|
||||
virtual void uncache();
|
||||
void label(Fl_Widget*w) FL_OVERRIDE;
|
||||
void label(Fl_Menu_Item*m) FL_OVERRIDE;
|
||||
void uncache() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Box : public Fl_Widget {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
/**
|
||||
- The first constructor sets box() to FL_NO_BOX, which
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
/** 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);
|
||||
|
||||
virtual int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -98,30 +98,30 @@ class FL_EXPORT Fl_Browser : public Fl_Browser_ {
|
|||
protected:
|
||||
|
||||
// required routines for Fl_Browser_ subclass:
|
||||
void* item_first() const ;
|
||||
void* item_next(void* item) const ;
|
||||
void* item_prev(void* item) const ;
|
||||
void* item_last()const ;
|
||||
int item_selected(void* item) const ;
|
||||
void item_select(void* item, int val);
|
||||
int item_height(void* item) const ;
|
||||
int item_width(void* item) const ;
|
||||
void item_draw(void* item, int X, int Y, int W, int H) const ;
|
||||
int full_height() const ;
|
||||
int incr_height() const ;
|
||||
const char *item_text(void *item) const;
|
||||
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) { swap((FL_BLINE*)a, (FL_BLINE*)b); }
|
||||
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 { return (void*)find_line(line); }
|
||||
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) ;
|
||||
|
@ -188,10 +188,10 @@ public:
|
|||
int selected(int line) const ;
|
||||
void show(int line);
|
||||
/** Shows the entire Fl_Browser widget -- opposite of hide(). */
|
||||
void show() { Fl_Widget::show(); }
|
||||
void show() FL_OVERRIDE { Fl_Widget::show(); }
|
||||
void hide(int line);
|
||||
/** Hides the entire Fl_Browser widget -- opposite of show(). */
|
||||
void hide() { Fl_Widget::hide(); }
|
||||
void hide() FL_OVERRIDE { Fl_Widget::hide(); }
|
||||
int visible(int line) const ;
|
||||
|
||||
int value() const ;
|
||||
|
|
|
@ -198,7 +198,7 @@ protected:
|
|||
int leftedge() const; // x position after scrollbar & border
|
||||
void *find_item(int ypos); // item under mouse
|
||||
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
Fl_Browser_(int X,int Y,int W,int H,const char *L=0);
|
||||
|
||||
public:
|
||||
|
@ -224,8 +224,8 @@ public:
|
|||
*/
|
||||
Fl_Scrollbar hscrollbar;
|
||||
|
||||
int handle(int event);
|
||||
void resize(int X,int Y,int W,int H);
|
||||
int handle(int event) FL_OVERRIDE;
|
||||
void resize(int X,int Y,int W,int H) FL_OVERRIDE;
|
||||
|
||||
int select(void *item,int val=1,int docallbacks=0);
|
||||
int select_only(void *item,int docallbacks=0);
|
||||
|
|
|
@ -84,11 +84,11 @@ protected:
|
|||
static void key_release_timeout(void*);
|
||||
void simulate_key_action();
|
||||
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
virtual int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
Fl_Button(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
protected:
|
||||
/** Overloaded to provide cairo callback support */
|
||||
void draw() {
|
||||
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
|
||||
|
|
|
@ -78,7 +78,7 @@ class FL_EXPORT Fl_Chart : public Fl_Widget {
|
|||
Fl_Fontsize textsize_;
|
||||
Fl_Color textcolor_;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_Chart(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
|
|
|
@ -31,20 +31,20 @@ class FL_EXPORT Fl_Check_Browser : public Fl_Browser_ {
|
|||
|
||||
protected:
|
||||
/* required routines for Fl_Browser_ subclass: */
|
||||
void *item_first() const;
|
||||
void *item_next(void *) const;
|
||||
void *item_prev(void *) const;
|
||||
int item_height(void *) const;
|
||||
int item_width(void *) const;
|
||||
void item_draw(void *, int, int, int, int) const;
|
||||
void item_select(void *, int);
|
||||
int item_selected(void *) const;
|
||||
const char *item_text(void *item) const; // override
|
||||
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; // override
|
||||
void item_swap(int ia, int ib); // override
|
||||
void item_swap(void *a, void *b); // override
|
||||
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 */
|
||||
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
char *text(int item) const; // returns pointer to internal buffer
|
||||
|
||||
protected:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // Fl_Check_Browser_H
|
||||
|
|
|
@ -102,9 +102,9 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Choice : public Fl_Menu_ {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
Fl_Choice(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
|
|||
int shadow_; // draw shadows of hands
|
||||
void drawhands(Fl_Color,Fl_Color); // part of draw
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw(int X, int Y, int W, int H);
|
||||
public:
|
||||
|
||||
|
@ -151,7 +151,7 @@ public:
|
|||
*/
|
||||
class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
Fl_Clock(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
class FL_EXPORT Flcc_HueBox : public Fl_Widget {
|
||||
int px, py;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
int handle_key(int);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Flcc_HueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
||||
px = py = 0;}
|
||||
};
|
||||
|
@ -48,10 +48,10 @@ public:
|
|||
class FL_EXPORT Flcc_ValueBox : public Fl_Widget {
|
||||
int py;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
int handle_key(int);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Flcc_ValueBox(int X, int Y, int W, int H) : Fl_Widget(X,Y,W,H) {
|
||||
py = 0;}
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
/** For internal use only */
|
||||
class FL_EXPORT Flcc_Value_Input : public Fl_Value_Input {
|
||||
public:
|
||||
int format(char*);
|
||||
int format(char*) FL_OVERRIDE;
|
||||
Flcc_Value_Input(int X, int Y, int W, int H) : Fl_Value_Input(X,Y,W,H) {}
|
||||
};
|
||||
|
||||
|
@ -121,7 +121,7 @@ class FL_EXPORT Fl_Color_Chooser : public Fl_Group {
|
|||
static void mode_cb(Fl_Widget*, void*);
|
||||
public:
|
||||
|
||||
int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Returns which Fl_Color_Chooser variant is currently active
|
||||
|
|
|
@ -50,20 +50,20 @@ 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);
|
||||
void untranslate();
|
||||
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();
|
||||
virtual bool is_current();
|
||||
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);
|
||||
void origin(int x, int y);
|
||||
int printable_rect(int *w, 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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -88,10 +88,10 @@ protected:
|
|||
int height;
|
||||
Fl_Copy_Surface_Driver(int w, int h) : Fl_Widget_Surface(NULL), width(w), height(h) {}
|
||||
virtual ~Fl_Copy_Surface_Driver() {}
|
||||
virtual void set_current() = 0;
|
||||
virtual void translate(int x, int y) = 0;
|
||||
virtual void untranslate() = 0;
|
||||
int printable_rect(int *w, int *h);
|
||||
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 plaform.
|
||||
|
|
|
@ -56,13 +56,13 @@ class FL_EXPORT Fl_Counter : public Fl_Valuator {
|
|||
|
||||
protected:
|
||||
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
// compute widths of arrow boxes
|
||||
void arrow_widths(int &w1, int &w2);
|
||||
|
||||
public:
|
||||
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
Fl_Counter(int X, int Y, int W, int H, const char* L = 0);
|
||||
~Fl_Counter();
|
||||
|
|
|
@ -51,11 +51,11 @@ 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();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
int handle(int);
|
||||
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.
|
||||
|
|
|
@ -33,13 +33,13 @@ public:
|
|||
/**
|
||||
Return non-null if this is an Fl_Overlay_Window object.
|
||||
*/
|
||||
virtual Fl_Double_Window *as_double_window() {return this; }
|
||||
void show();
|
||||
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);
|
||||
void hide();
|
||||
void flush();
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
void hide() FL_OVERRIDE;
|
||||
void flush() FL_OVERRIDE;
|
||||
~Fl_Double_Window();
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,11 +42,11 @@ class FL_EXPORT Fl_File_Browser : public Fl_Browser {
|
|||
const char *pattern_;
|
||||
const char *errmsg_;
|
||||
|
||||
int full_height() const;
|
||||
int item_height(void *) const;
|
||||
int item_width(void *) const;
|
||||
void item_draw(void *, int, int, int, int) const;
|
||||
int incr_height() const { return (item_height(0)); }
|
||||
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)); }
|
||||
|
||||
public:
|
||||
enum { FILES, DIRECTORIES };
|
||||
|
|
|
@ -57,10 +57,10 @@ public:
|
|||
|
||||
Fl_File_Input(int X, int Y, int W, int H, const char *L=0);
|
||||
|
||||
virtual int handle(int event);
|
||||
int handle(int event) FL_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
/** Gets the box type used for the navigation bar. */
|
||||
|
|
|
@ -144,7 +144,7 @@ public:
|
|||
virtual ~Fl_Flex();
|
||||
|
||||
virtual void end();
|
||||
virtual void resize(int x, int y, int w, int h);
|
||||
void resize(int x, int y, int w, int h) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Set the horizontal or vertical size of a child widget.
|
||||
|
@ -167,7 +167,7 @@ protected:
|
|||
|
||||
virtual int alloc_size(int size) const;
|
||||
|
||||
void on_remove(int); /* override */
|
||||
void on_remove(int) FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
class FL_EXPORT Fl_FormsBitmap : public Fl_Widget {
|
||||
Fl_Bitmap *b;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_FormsBitmap(Fl_Boxtype, int, int, int, int, const char * = 0);
|
||||
void set(int W, int H, const uchar *bits);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
class FL_EXPORT Fl_FormsPixmap : public Fl_Widget {
|
||||
Fl_Pixmap *b;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_FormsPixmap(Fl_Boxtype t, int X, int Y, int W, int H, const char *L= 0);
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ class FL_EXPORT Fl_Free : public Fl_Widget {
|
|||
FL_HANDLEPTR hfunc;
|
||||
static void step(void *);
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
Fl_Free(uchar t,int X,int Y,int W,int H,const char *L,FL_HANDLEPTR hdl);
|
||||
~Fl_Free();
|
||||
};
|
||||
|
|
|
@ -73,17 +73,17 @@ class FL_EXPORT Fl_Gl_Window : public Fl_Window {
|
|||
static int gl_plugin_linkage();
|
||||
protected:
|
||||
void draw_begin();
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw_end();
|
||||
|
||||
public:
|
||||
void show();
|
||||
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 flush();
|
||||
void hide();
|
||||
void resize(int,int,int,int);
|
||||
int handle(int);
|
||||
void flush() FL_OVERRIDE;
|
||||
void hide() FL_OVERRIDE;
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Is turned off when FLTK creates a new context for this window or
|
||||
|
@ -207,7 +207,7 @@ public:
|
|||
void make_overlay_current();
|
||||
|
||||
// Note: Doxygen docs in Fl_Widget.H to avoid redundancy.
|
||||
virtual Fl_Gl_Window* as_gl_window() {return this;}
|
||||
Fl_Gl_Window* as_gl_window() FL_OVERRIDE {return this;}
|
||||
|
||||
float pixels_per_unit();
|
||||
/** Gives the window width in OpenGL pixels.
|
||||
|
|
|
@ -419,76 +419,76 @@ protected:
|
|||
int line_width_;
|
||||
virtual Fl_Region scale_clip(float f);
|
||||
void unscale_clip(Fl_Region r);
|
||||
virtual void point(int x, int y);
|
||||
void point(int x, int y) FL_OVERRIDE;
|
||||
virtual void point_unscaled(float x, float y);
|
||||
virtual void rect(int x, int y, int w, int h);
|
||||
virtual void rectf(int x, int y, int w, int h);
|
||||
void rect(int x, int y, int w, int h) FL_OVERRIDE;
|
||||
void rectf(int x, int y, int w, int h) FL_OVERRIDE;
|
||||
virtual void rectf_unscaled(int x, int y, int w, int h);
|
||||
virtual void line(int x, int y, int x1, int y1);
|
||||
void line(int x, int y, int x1, int y1) FL_OVERRIDE;
|
||||
virtual void line_unscaled(int x, int y, int x1, int y1);
|
||||
virtual void line(int x, int y, int x1, int y1, int x2, int y2);
|
||||
void line(int x, int y, int x1, int y1, int x2, int y2) FL_OVERRIDE;
|
||||
virtual void line_unscaled(int x, int y, int x1, int y1, int x2, int y2);
|
||||
virtual void xyline(int x, int y, int x1);
|
||||
void xyline(int x, int y, int x1) FL_OVERRIDE;
|
||||
virtual void xyline_unscaled(int x, int y, int x1);
|
||||
virtual void xyline(int x, int y, int x1, int y2) {Fl_Graphics_Driver::xyline(x, y, x1, y2);}
|
||||
virtual void xyline(int x, int y, int x1, int y2, int x3) {Fl_Graphics_Driver::xyline(x, y, x1, y2, x3);}
|
||||
virtual void yxline(int x, int y, int y1);
|
||||
void xyline(int x, int y, int x1, int y2) FL_OVERRIDE {Fl_Graphics_Driver::xyline(x, y, x1, y2);}
|
||||
void xyline(int x, int y, int x1, int y2, int x3) FL_OVERRIDE {Fl_Graphics_Driver::xyline(x, y, x1, y2, x3);}
|
||||
void yxline(int x, int y, int y1) FL_OVERRIDE;
|
||||
virtual void yxline_unscaled(int x, int y, int y1);
|
||||
virtual void yxline(int x, int y, int y1, int x2) {Fl_Graphics_Driver::yxline(x, y, y1, x2);}
|
||||
virtual void yxline(int x, int y, int y1, int x2, int y3) {Fl_Graphics_Driver::yxline(x, y, y1, x2, y3);}
|
||||
virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2);
|
||||
void yxline(int x, int y, int y1, int x2) FL_OVERRIDE {Fl_Graphics_Driver::yxline(x, y, y1, x2);}
|
||||
void yxline(int x, int y, int y1, int x2, int y3) FL_OVERRIDE {Fl_Graphics_Driver::yxline(x, y, y1, x2, y3);}
|
||||
void loop(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE;
|
||||
virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2);
|
||||
virtual void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
|
||||
void loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE;
|
||||
virtual void loop_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
|
||||
virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2);
|
||||
void polygon(int x0, int y0, int x1, int y1, int x2, int y2) FL_OVERRIDE;
|
||||
virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2);
|
||||
virtual void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
|
||||
void polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3) FL_OVERRIDE;
|
||||
virtual void polygon_unscaled(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
|
||||
virtual void circle(double x, double y, double r);
|
||||
void circle(double x, double y, double r) FL_OVERRIDE;
|
||||
virtual void ellipse_unscaled(double xt, double yt, double rx, double ry);
|
||||
virtual void font(Fl_Font face, Fl_Fontsize size);
|
||||
virtual Fl_Font font();
|
||||
void font(Fl_Font face, Fl_Fontsize size) FL_OVERRIDE;
|
||||
Fl_Font font() FL_OVERRIDE;
|
||||
virtual void font_unscaled(Fl_Font face, Fl_Fontsize size);
|
||||
virtual double width(const char *str, int n);
|
||||
virtual double width(unsigned int c);
|
||||
double width(const char *str, int n) FL_OVERRIDE;
|
||||
double width(unsigned int c) FL_OVERRIDE;
|
||||
virtual double width_unscaled(const char *str, int n);
|
||||
virtual double width_unscaled(unsigned int c);
|
||||
virtual Fl_Fontsize size();
|
||||
Fl_Fontsize size() FL_OVERRIDE;
|
||||
virtual Fl_Fontsize size_unscaled();
|
||||
virtual void text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h);
|
||||
void text_extents(const char *str, int n, int &dx, int &dy, int &w, int &h) FL_OVERRIDE;
|
||||
virtual void text_extents_unscaled(const char *str, int n, int &dx, int &dy, int &w, int &h);
|
||||
virtual int height();
|
||||
virtual int descent();
|
||||
int height() FL_OVERRIDE;
|
||||
int descent() FL_OVERRIDE;
|
||||
virtual int height_unscaled();
|
||||
virtual int descent_unscaled();
|
||||
virtual void draw(const char *str, int n, int x, int y);
|
||||
void draw(const char *str, int n, int x, int y) FL_OVERRIDE;
|
||||
virtual void draw_unscaled(const char *str, int n, int x, int y);
|
||||
virtual void draw(int angle, const char *str, int n, int x, int y);
|
||||
void draw(int angle, const char *str, int n, int x, int y) FL_OVERRIDE;
|
||||
virtual void draw_unscaled(int angle, const char *str, int n, int x, int y);
|
||||
virtual void draw(const char *str, int nChars, float x, float y);
|
||||
virtual void rtl_draw(const char* str, int n, int x, int y);
|
||||
void draw(const char *str, int nChars, float x, float y) FL_OVERRIDE;
|
||||
void rtl_draw(const char* str, int n, int x, int y) FL_OVERRIDE;
|
||||
virtual void rtl_draw_unscaled(const char* str, int n, int x, int y);
|
||||
virtual void arc(double x, double y, double r, double start, double end);
|
||||
virtual void arc(int x, int y, int w, int h, double a1, double a2);
|
||||
void arc(double x, double y, double r, double start, double end) FL_OVERRIDE;
|
||||
void arc(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE;
|
||||
virtual void arc_unscaled(int x, int y, int w, int h, double a1, double a2);
|
||||
virtual void pie(int x, int y, int w, int h, double a1, double a2);
|
||||
void pie(int x, int y, int w, int h, double a1, double a2) FL_OVERRIDE;
|
||||
virtual void pie_unscaled(int x, int y, int w, int h, double a1, double a2);
|
||||
virtual void line_style(int style, int width=0, char* dashes=0);
|
||||
void line_style(int style, int width=0, char* dashes=0) FL_OVERRIDE;
|
||||
virtual void line_style_unscaled(int style, int width, char* dashes);
|
||||
void draw_image_rescale(void *buf, Fl_Draw_Image_Cb cb, int X, int Y, int W, int H, int D, int L, bool mono);
|
||||
virtual void draw_image_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0);
|
||||
virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3);
|
||||
void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0);
|
||||
void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3);
|
||||
void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0) FL_OVERRIDE;
|
||||
void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3) FL_OVERRIDE;
|
||||
virtual void draw_image_mono_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l);
|
||||
void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0);
|
||||
void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0) FL_OVERRIDE;
|
||||
virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1);
|
||||
void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1);
|
||||
void draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1) FL_OVERRIDE;
|
||||
|
||||
void transformed_vertex(double xf, double yf);
|
||||
void vertex(double x, double y);
|
||||
virtual float override_scale();
|
||||
virtual void restore_scale(float);
|
||||
void transformed_vertex(double xf, double yf) FL_OVERRIDE;
|
||||
void vertex(double x, double y) FL_OVERRIDE;
|
||||
float override_scale() FL_OVERRIDE;
|
||||
void restore_scale(float) FL_OVERRIDE;
|
||||
virtual void *change_pen_width(int lwidth);
|
||||
virtual void reset_pen_width(void *data);
|
||||
};
|
||||
|
|
|
@ -67,7 +67,7 @@ class FL_EXPORT Fl_Group : public Fl_Widget {
|
|||
Fl_Group& operator=(const Fl_Group&);
|
||||
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw_child(Fl_Widget& widget) const;
|
||||
void draw_children();
|
||||
void draw_outside_label(const Fl_Widget& widget) const ;
|
||||
|
@ -80,7 +80,7 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
void begin();
|
||||
void end();
|
||||
static Fl_Group *current();
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
int find(const Fl_Widget& o) const {return find(&o);}
|
||||
Fl_Widget* const* array() const;
|
||||
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
/**
|
||||
Creates a new Fl_Group widget using the given position, size,
|
||||
and label string. The default boxtype is FL_NO_BOX.
|
||||
|
@ -221,7 +221,7 @@ public:
|
|||
unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
|
||||
|
||||
// Note: Doxygen docs in Fl_Widget.H to avoid redundancy.
|
||||
virtual Fl_Group* as_group() { return this; }
|
||||
Fl_Group* as_group() FL_OVERRIDE { return this; }
|
||||
|
||||
// back compatibility functions:
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ class FL_EXPORT Fl_Help_View : public Fl_Group { // Help viewer widget
|
|||
static int compare_targets(const Fl_Help_Target *t0, const Fl_Help_Target *t1);
|
||||
int do_align(Fl_Help_Block *block, int line, int xx, int a, int &l);
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
private:
|
||||
void format();
|
||||
void format_table(int *table_width, int *columns, const char *table);
|
||||
|
@ -273,7 +273,7 @@ private:
|
|||
Fl_Shared_Image *get_image(const char *name, int W, int H);
|
||||
int get_length(const char *l);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
private:
|
||||
|
||||
void hv_draw(const char *t, int x, int y, int entity_extra_length = 0);
|
||||
|
@ -319,7 +319,7 @@ public:
|
|||
*/
|
||||
void link(Fl_Help_Func *fn) { link_ = fn; }
|
||||
int load(const char *f);
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
/** Gets the size of the help view. */
|
||||
int size() const { return (size_); }
|
||||
void size(int W, int H) { Fl_Widget::size(W, H); }
|
||||
|
|
|
@ -356,16 +356,16 @@ public:
|
|||
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0);
|
||||
Fl_RGB_Image(const uchar *bits, int bits_length, int W, int H, int D, int LD);
|
||||
Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY);
|
||||
virtual ~Fl_RGB_Image();
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
~Fl_RGB_Image() FL_OVERRIDE;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const { return Fl_Image::copy(); }
|
||||
virtual void color_average(Fl_Color c, float i);
|
||||
virtual void desaturate();
|
||||
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
|
||||
void color_average(Fl_Color c, float i) FL_OVERRIDE;
|
||||
void desaturate() FL_OVERRIDE;
|
||||
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);}
|
||||
virtual void label(Fl_Widget*w);
|
||||
virtual void label(Fl_Menu_Item*m);
|
||||
virtual void uncache();
|
||||
void label(Fl_Widget*w) FL_OVERRIDE;
|
||||
void label(Fl_Menu_Item*m) FL_OVERRIDE;
|
||||
void uncache() FL_OVERRIDE;
|
||||
/** Sets the maximum allowed image size in bytes when creating an Fl_RGB_Image object.
|
||||
|
||||
The image size in bytes of an Fl_RGB_Image object is the value of the product w() * h() * d().
|
||||
|
|
|
@ -68,18 +68,18 @@ private:
|
|||
class Fl_Image_Surface_Driver *platform_surface;
|
||||
Fl_Offscreen get_offscreen_before_delete_();
|
||||
protected:
|
||||
void translate(int x, int y);
|
||||
void untranslate();
|
||||
void translate(int x, int y) FL_OVERRIDE;
|
||||
void untranslate() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_Image_Surface(int w, int h, int high_res = 0, Fl_Offscreen off = 0);
|
||||
~Fl_Image_Surface();
|
||||
void set_current();
|
||||
virtual bool is_current();
|
||||
void set_current() FL_OVERRIDE;
|
||||
bool is_current() FL_OVERRIDE;
|
||||
Fl_RGB_Image *image();
|
||||
Fl_Shared_Image *highres_image();
|
||||
void origin(int *x, int *y);
|
||||
void origin(int x, int y);
|
||||
int printable_rect(int *w, 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;
|
||||
Fl_Offscreen offscreen();
|
||||
void rescale();
|
||||
};
|
||||
|
@ -107,10 +107,10 @@ protected:
|
|||
int external_offscreen;
|
||||
Fl_Image_Surface_Driver(int w, int h, int /*high_res*/, Fl_Offscreen off) : Fl_Widget_Surface(NULL), width(w), height(h), offscreen(off) {external_offscreen = (off != 0);}
|
||||
virtual ~Fl_Image_Surface_Driver() {}
|
||||
virtual void set_current() = 0;
|
||||
virtual void translate(int x, int y) = 0;
|
||||
virtual void untranslate() = 0;
|
||||
int printable_rect(int *w, int *h);
|
||||
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;
|
||||
virtual Fl_RGB_Image *image() = 0;
|
||||
/** Each platform implements this function its own way.
|
||||
It returns an object implementing all virtual functions
|
||||
|
|
|
@ -255,11 +255,11 @@ class FL_EXPORT Fl_Input : public Fl_Input_ {
|
|||
int kf_copy_cut();
|
||||
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
int handle_key();
|
||||
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Input(int,int,int,int,const char * = 0);
|
||||
};
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ protected:
|
|||
public:
|
||||
|
||||
/* Change the size of the widget. */
|
||||
void resize(int, int, int, int);
|
||||
void resize(int, int, int, int) FL_OVERRIDE;
|
||||
|
||||
/* Constructor */
|
||||
Fl_Input_(int, int, int, int, const char* = 0);
|
||||
|
|
|
@ -44,11 +44,11 @@ class FL_EXPORT Fl_Input_Choice : public Fl_Group {
|
|||
|
||||
// Private class to handle slightly 'special' behavior of menu button
|
||||
class InputMenuButton : public Fl_Menu_Button {
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
const Fl_Menu_Item* popup();
|
||||
public:
|
||||
InputMenuButton(int X, int Y, int W, int H, const char *L=0);
|
||||
int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
Fl_Input *inp_;
|
||||
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
Fl_Input_Choice(int X, int Y, int W, int H, const char *L=0);
|
||||
|
||||
void resize(int X, int Y, int W, int H);
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
|
||||
/** Adds an item to the menu.
|
||||
When any item is selected, the Fl_Input_Choice callback() is invoked,
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Light_Button : public Fl_Button {
|
||||
protected:
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
virtual int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Light_Button(int x,int y,int w,int h,const char *l = 0);
|
||||
};
|
||||
|
||||
|
|
|
@ -65,9 +65,9 @@
|
|||
class FL_EXPORT Fl_Menu_Bar : public Fl_Menu_ {
|
||||
friend class Fl_Sys_Menu_Bar_Driver;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
/**
|
||||
Creates a new Fl_Menu_Bar widget using the given position,
|
||||
size, and label string. The default boxtype is FL_UP_BOX.
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Menu_Button : public Fl_Menu_ {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
/**
|
||||
\brief indicate what mouse buttons pop up the menu.
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
POPUP23, /**< pops up with the mouse 2nd or 3rd buttons. */
|
||||
POPUP123 /**< pops up with any mouse button. */
|
||||
};
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
const Fl_Menu_Item* popup();
|
||||
Fl_Menu_Button(int,int,int,int,const char * =0);
|
||||
};
|
||||
|
|
|
@ -251,26 +251,26 @@ protected:
|
|||
public:
|
||||
Fl_Native_File_Chooser_FLTK_Driver(int val);
|
||||
virtual ~Fl_Native_File_Chooser_FLTK_Driver();
|
||||
virtual void type(int t);
|
||||
virtual int type() const ;
|
||||
virtual void options(int o);
|
||||
virtual int options() const;
|
||||
virtual int count() const;
|
||||
virtual const char *filename() const ;
|
||||
virtual const char *filename(int i) const ;
|
||||
virtual void directory(const char *val) ;
|
||||
virtual const char *directory() const;
|
||||
virtual void title(const char *t);
|
||||
virtual const char* title() const;
|
||||
virtual const char *filter() const ;
|
||||
virtual void filter(const char *f);
|
||||
virtual int filters() const ;
|
||||
virtual void filter_value(int i) ;
|
||||
virtual int filter_value() const ;
|
||||
virtual void preset_file(const char*f) ;
|
||||
virtual const char* preset_file() const;
|
||||
virtual const char *errmsg() const ;
|
||||
virtual int show() ;
|
||||
void type(int t) FL_OVERRIDE;
|
||||
int type() const FL_OVERRIDE;
|
||||
void options(int o) FL_OVERRIDE;
|
||||
int options() const FL_OVERRIDE;
|
||||
int count() const FL_OVERRIDE;
|
||||
const char *filename() const FL_OVERRIDE;
|
||||
const char *filename(int i) const FL_OVERRIDE;
|
||||
void directory(const char *val) FL_OVERRIDE;
|
||||
const char *directory() const FL_OVERRIDE;
|
||||
void title(const char *t) FL_OVERRIDE;
|
||||
const char* title() const FL_OVERRIDE;
|
||||
const char *filter() const FL_OVERRIDE;
|
||||
void filter(const char *f) FL_OVERRIDE;
|
||||
int filters() const FL_OVERRIDE;
|
||||
void filter_value(int i) FL_OVERRIDE;
|
||||
int filter_value() const FL_OVERRIDE;
|
||||
void preset_file(const char*f) FL_OVERRIDE;
|
||||
const char* preset_file() const FL_OVERRIDE;
|
||||
const char *errmsg() const FL_OVERRIDE;
|
||||
int show() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -49,10 +49,10 @@ public:
|
|||
private:
|
||||
Fl_Window *overlay_;
|
||||
public:
|
||||
void show();
|
||||
void hide();
|
||||
void flush();
|
||||
void resize(int,int,int,int);
|
||||
void show() FL_OVERRIDE;
|
||||
void hide() FL_OVERRIDE;
|
||||
void flush() FL_OVERRIDE;
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
~Fl_Overlay_Window();
|
||||
/** Returns non-zero if there's hardware overlay support */
|
||||
int can_do_overlay();
|
||||
|
@ -72,7 +72,7 @@ protected:
|
|||
public:
|
||||
/** Same as Fl_Window::show(int a, char **b) */
|
||||
void show(int a, char **b) {Fl_Double_Window::show(a,b);}
|
||||
virtual Fl_Overlay_Window *as_overlay_window() {return this; }
|
||||
Fl_Overlay_Window *as_overlay_window() FL_OVERRIDE {return this; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -61,7 +61,7 @@ public:
|
|||
};
|
||||
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
Fl_Pack(int X, int Y, int W, int H, const char *L = 0);
|
||||
|
|
|
@ -63,15 +63,15 @@ public:
|
|||
/** The constructors create a new pixmap from the specified XPM data. */
|
||||
explicit Fl_Pixmap(const uchar* const * D) : Fl_Image(-1,0,1), alloc_data(0), id_(0), mask_(0) {set_data((const char*const*)D); measure();}
|
||||
virtual ~Fl_Pixmap();
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const { return Fl_Image::copy(); }
|
||||
virtual void color_average(Fl_Color c, float i);
|
||||
virtual void desaturate();
|
||||
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0);
|
||||
void color_average(Fl_Color c, float i) FL_OVERRIDE;
|
||||
void desaturate() FL_OVERRIDE;
|
||||
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);}
|
||||
virtual void label(Fl_Widget*w);
|
||||
virtual void label(Fl_Menu_Item*m);
|
||||
virtual void uncache();
|
||||
void label(Fl_Widget*w) FL_OVERRIDE;
|
||||
void label(Fl_Menu_Item*m) FL_OVERRIDE;
|
||||
void uncache() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,11 +44,11 @@ protected:
|
|||
// these allow subclasses to put the dial in a smaller area:
|
||||
void draw(int, int, int, int);
|
||||
int handle(int, int, int, int, int);
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
/**
|
||||
Creates a new Fl_Positioner widget using the given position,
|
||||
size, and label string. The default boxtype is FL_NO_BOX.
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
/** The destructor. */
|
||||
~Fl_PostScript_File_Device();
|
||||
/** Don't use with this class. */
|
||||
int begin_job(int pagecount, int* from, int* to, char **perr_message);
|
||||
int begin_job(int pagecount, int* from, int* to, char **perr_message) FL_OVERRIDE;
|
||||
/** Begins the session where all graphics requests will go to a local PostScript file.
|
||||
Opens a file dialog to select an output PostScript file.
|
||||
This member function makes end_job() close the resulting PostScript file and display an
|
||||
|
@ -123,28 +123,28 @@ public:
|
|||
return begin_job(ps_output, pagecount, format, layout);
|
||||
}
|
||||
|
||||
int begin_page (void);
|
||||
int printable_rect(int *w, int *h);
|
||||
void margins(int *left, int *top, int *right, int *bottom);
|
||||
void origin(int *x, int *y);
|
||||
void origin(int x, int y);
|
||||
void scale (float scale_x, float scale_y = 0.);
|
||||
void rotate(float angle);
|
||||
void translate(int x, int y);
|
||||
void untranslate(void);
|
||||
int end_page (void);
|
||||
int begin_page (void) FL_OVERRIDE;
|
||||
int printable_rect(int *w, int *h) FL_OVERRIDE;
|
||||
void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE;
|
||||
void origin(int *x, int *y) FL_OVERRIDE;
|
||||
void origin(int x, int y) FL_OVERRIDE;
|
||||
void scale (float scale_x, float scale_y = 0.) FL_OVERRIDE;
|
||||
void rotate(float angle) FL_OVERRIDE;
|
||||
void translate(int x, int y) FL_OVERRIDE;
|
||||
void untranslate(void) FL_OVERRIDE;
|
||||
int end_page (void) FL_OVERRIDE;
|
||||
/** Completes all PostScript output.
|
||||
This also closes with \p fclose() the underlying file() unless close_command() was used to set another function.
|
||||
*/
|
||||
void end_job(void);
|
||||
void end_job(void) FL_OVERRIDE;
|
||||
/** Label of the PostScript file chooser window */
|
||||
static const char *file_chooser_title;
|
||||
/** Returns the underlying FILE* receiving all PostScript data */
|
||||
FILE *file();
|
||||
/** Sets the function end_job() calls to close the file() */
|
||||
void close_command(Fl_PostScript_Close_Command cmd);
|
||||
virtual void set_current();
|
||||
virtual void end_current();
|
||||
void set_current() FL_OVERRIDE;
|
||||
void end_current() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
/** Encapsulated PostScript drawing surface.
|
||||
|
@ -193,13 +193,13 @@ public:
|
|||
with fl_alert().
|
||||
*/
|
||||
~Fl_EPS_File_Surface();
|
||||
virtual int printable_rect(int *w, int *h);
|
||||
int printable_rect(int *w, int *h) FL_OVERRIDE;
|
||||
/** Returns the underlying FILE pointer */
|
||||
FILE *file();
|
||||
virtual void origin(int x, int y);
|
||||
virtual void origin(int *px, int *py);
|
||||
virtual void translate(int x, int y);
|
||||
virtual void untranslate();
|
||||
void origin(int x, int y) FL_OVERRIDE;
|
||||
void origin(int *px, int *py) FL_OVERRIDE;
|
||||
void translate(int x, int y) FL_OVERRIDE;
|
||||
void untranslate() FL_OVERRIDE;
|
||||
/** Completes all EPS output.
|
||||
The only operation possible with the Fl_EPS_File_Surface object after calling close() is its destruction.
|
||||
\return The status code of output operations to the FILE object. 0 indicates success. */
|
||||
|
|
|
@ -99,20 +99,20 @@ private:
|
|||
public:
|
||||
/** The constructor */
|
||||
Fl_Printer(void);
|
||||
int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL);
|
||||
int begin_page(void);
|
||||
int printable_rect(int *w, int *h);
|
||||
void margins(int *left, int *top, int *right, int *bottom);
|
||||
void origin(int *x, int *y);
|
||||
void origin(int x, int y);
|
||||
void scale(float scale_x, float scale_y = 0.);
|
||||
void rotate(float angle);
|
||||
void translate(int x, int y);
|
||||
void untranslate(void);
|
||||
int end_page (void);
|
||||
void end_job (void);
|
||||
void set_current(void);
|
||||
virtual bool is_current();
|
||||
int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL) FL_OVERRIDE;
|
||||
int begin_page(void) FL_OVERRIDE;
|
||||
int printable_rect(int *w, int *h) FL_OVERRIDE;
|
||||
void margins(int *left, int *top, int *right, int *bottom) FL_OVERRIDE;
|
||||
void origin(int *x, int *y) FL_OVERRIDE;
|
||||
void origin(int x, int y) FL_OVERRIDE;
|
||||
void scale(float scale_x, float scale_y = 0.) FL_OVERRIDE;
|
||||
void rotate(float angle) FL_OVERRIDE;
|
||||
void translate(int x, int y) FL_OVERRIDE;
|
||||
void untranslate(void) FL_OVERRIDE;
|
||||
int end_page (void) FL_OVERRIDE;
|
||||
void end_job (void) FL_OVERRIDE;
|
||||
void set_current(void) FL_OVERRIDE;
|
||||
bool is_current() FL_OVERRIDE;
|
||||
|
||||
/** \name These attributes are useful for the Linux/Unix platform only.
|
||||
\{
|
||||
|
|
|
@ -41,7 +41,7 @@ class FL_EXPORT Fl_Progress : public Fl_Widget {
|
|||
|
||||
protected:
|
||||
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
class FL_EXPORT Fl_Repeat_Button : public Fl_Button {
|
||||
static void repeat_callback(void *);
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
/**
|
||||
Creates a new Fl_Repeat_Button widget using the given
|
||||
position, size, and label string. The default boxtype is FL_UP_BOX.
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Return_Button : public Fl_Button {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
/**
|
||||
Creates a new Fl_Return_Button widget using the given
|
||||
position, size, and label string. The default boxtype is FL_UP_BOX.
|
||||
|
|
|
@ -37,9 +37,9 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Roller : public Fl_Valuator {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Roller(int X,int Y,int W,int H,const char* L=0);
|
||||
};
|
||||
|
||||
|
|
|
@ -65,11 +65,11 @@ public:
|
|||
~Fl_SVG_File_Surface();
|
||||
/** Returns the underlying FILE pointer */
|
||||
FILE *file();
|
||||
virtual void origin(int x, int y);
|
||||
virtual void origin(int *x, int *y);
|
||||
virtual void translate(int x, int y);
|
||||
virtual void untranslate();
|
||||
virtual int printable_rect(int *w, int *h);
|
||||
void origin(int x, int y) FL_OVERRIDE;
|
||||
void origin(int *x, int *y) FL_OVERRIDE;
|
||||
void translate(int x, int y) FL_OVERRIDE;
|
||||
void untranslate() FL_OVERRIDE;
|
||||
int printable_rect(int *w, int *h) FL_OVERRIDE;
|
||||
/** Closes the FILE pointer where SVG data is output.
|
||||
The underlying FILE is closed by function fclose() unless another function was set at object's construction time.
|
||||
The only operation possible after this on the Fl_SVG_File_Surface object is its destruction.
|
||||
|
|
|
@ -146,7 +146,7 @@ private:
|
|||
float average_weight_;
|
||||
float svg_scaling_(int W, int H);
|
||||
void rasterize_(int W, int H);
|
||||
virtual void cache_size_(int &width, int &height);
|
||||
void cache_size_(int &width, int &height) FL_OVERRIDE;
|
||||
void init_(const char *name, const unsigned char *filedata, size_t length);
|
||||
Fl_SVG_Image(const Fl_SVG_Image *source);
|
||||
public:
|
||||
|
@ -157,17 +157,17 @@ public:
|
|||
Fl_SVG_Image(const char *sharedname, const char *svg_data);
|
||||
Fl_SVG_Image(const char *sharedname, const unsigned char *svg_data, size_t length);
|
||||
virtual ~Fl_SVG_Image();
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const {
|
||||
return Fl_Image::copy();
|
||||
}
|
||||
void resize(int width, int height);
|
||||
virtual void desaturate();
|
||||
virtual void color_average(Fl_Color c, float i);
|
||||
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
|
||||
void desaturate() FL_OVERRIDE;
|
||||
void color_average(Fl_Color c, float i) FL_OVERRIDE;
|
||||
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); }
|
||||
virtual Fl_SVG_Image *as_svg_image() { return this; }
|
||||
virtual void normalize();
|
||||
Fl_SVG_Image *as_svg_image() FL_OVERRIDE { return this; }
|
||||
void normalize() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // FL_SVG_IMAGE_H
|
||||
|
|
|
@ -146,19 +146,19 @@ protected: // (STR#1895)
|
|||
|
||||
protected:
|
||||
|
||||
int on_insert(Fl_Widget*, int); // override
|
||||
int on_move(int, int); // override
|
||||
int on_insert(Fl_Widget*, int) FL_OVERRIDE;
|
||||
int on_move(int, int) FL_OVERRIDE;
|
||||
void fix_scrollbar_order();
|
||||
void bbox(int&,int&,int&,int&) const;
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
Fl_Scrollbar scrollbar;
|
||||
Fl_Scrollbar hscrollbar;
|
||||
|
||||
void resize(int X, int Y, int W, int H);
|
||||
int handle(int);
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
Fl_Scroll(int X, int Y, int W, int H, const char *L = 0);
|
||||
virtual ~Fl_Scroll();
|
||||
|
@ -181,7 +181,7 @@ public:
|
|||
void clear();
|
||||
|
||||
/* delete child n (by index) */
|
||||
virtual int delete_child(int n);
|
||||
int delete_child(int n) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Gets the current size of the scrollbars' troughs, in pixels.
|
||||
|
|
|
@ -45,13 +45,13 @@ class FL_EXPORT Fl_Scrollbar : public Fl_Slider {
|
|||
static void timeout_cb(void*);
|
||||
void increment_cb();
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
Fl_Scrollbar(int X,int Y,int W,int H, const char *L = 0);
|
||||
~Fl_Scrollbar();
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Gets the integer value (position) of the slider in the scrollbar.
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
Inherited destructor destroys the widget and any value associated with it.
|
||||
*/
|
||||
Fl_Secret_Input(int X,int Y,int W,int H,const char *l = 0);
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -139,22 +139,22 @@ public:
|
|||
*/
|
||||
int original() { return original_; }
|
||||
|
||||
void release();
|
||||
void reload();
|
||||
void release() FL_OVERRIDE;
|
||||
virtual void reload();
|
||||
|
||||
virtual Fl_Shared_Image *as_shared_image() {
|
||||
Fl_Shared_Image *as_shared_image() FL_OVERRIDE {
|
||||
return this;
|
||||
}
|
||||
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const {
|
||||
return Fl_Image::copy();
|
||||
}
|
||||
virtual void color_average(Fl_Color c, float i);
|
||||
virtual void desaturate();
|
||||
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
|
||||
void color_average(Fl_Color c, float i) FL_OVERRIDE;
|
||||
void desaturate() FL_OVERRIDE;
|
||||
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); }
|
||||
virtual void uncache();
|
||||
void uncache() FL_OVERRIDE;
|
||||
|
||||
static Fl_Shared_Image *find(const char *name, int W = 0, int H = 0);
|
||||
static Fl_Shared_Image *get(const char *name, int W = 0, int H = 0);
|
||||
|
|
|
@ -228,7 +228,7 @@ private:
|
|||
|
||||
protected:
|
||||
// Fltk
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
// Internal methods
|
||||
void enforce_stay_at_bottom();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
class FL_EXPORT Fl_Single_Window : public Fl_Window {
|
||||
public:
|
||||
void show();
|
||||
void show() FL_OVERRIDE;
|
||||
/** Same as Fl_Window::show(int a, char **b) */
|
||||
void show(int a, char **b) {Fl_Window::show(a,b);}
|
||||
|
||||
|
|
|
@ -68,11 +68,11 @@ protected:
|
|||
// these allow subclasses to put the slider in a smaller area:
|
||||
void draw(int, int, int, int);
|
||||
int handle(int, int, int, int, int);
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Slider(int X,int Y,int W,int H, const char *L = 0);
|
||||
Fl_Slider(uchar t,int X,int Y,int W,int H, const char *L);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ protected:
|
|||
public:
|
||||
Fl_Spinner_Input(int X, int Y, int W, int H)
|
||||
: Fl_Input(X, Y, W, H) {}
|
||||
int handle(int event); // implemented in src/Fl_Spinner.cxx
|
||||
int handle(int event) FL_OVERRIDE; // implemented in src/Fl_Spinner.cxx
|
||||
};
|
||||
|
||||
Fl_Spinner_Input input_; // Input field for the value
|
||||
|
@ -66,16 +66,16 @@ protected:
|
|||
up_button_, // Up button
|
||||
down_button_; // Down button
|
||||
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor
|
||||
Fl_Spinner(int X, int Y, int W, int H, const char *L = 0);
|
||||
// Event handling
|
||||
int handle(int event);
|
||||
int handle(int event) FL_OVERRIDE;
|
||||
// Resize group and subwidgets
|
||||
void resize(int X, int Y, int W, int H);
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
|
||||
/** Returns the format string for the value. */
|
||||
const char *format() const { return (format_); }
|
||||
|
|
|
@ -95,7 +95,7 @@ class Fl_Sys_Menu_Bar_Driver;
|
|||
class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar {
|
||||
static Fl_Sys_Menu_Bar_Driver *driver();
|
||||
protected:
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
/** Possible styles of the Window menu in the system menu bar */
|
||||
typedef enum {
|
||||
|
@ -110,7 +110,7 @@ public:
|
|||
*/
|
||||
const Fl_Menu_Item *menu() const {return Fl_Menu_::menu();}
|
||||
void menu(const Fl_Menu_Item *m);
|
||||
virtual void update();
|
||||
void update() FL_OVERRIDE;
|
||||
int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0);
|
||||
/** Adds a new menu item.
|
||||
\see Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0)
|
||||
|
|
|
@ -231,7 +231,7 @@ protected:
|
|||
Fl_Scrollbar *hscrollbar; ///< child horizontal scrollbar widget
|
||||
|
||||
// Fltk
|
||||
int handle(int e); // fltk handle() override
|
||||
int handle(int e) FL_OVERRIDE; // fltk handle() FL_OVERRIDE
|
||||
|
||||
// Class maintenance
|
||||
void recalc_dimensions();
|
||||
|
@ -397,7 +397,7 @@ protected:
|
|||
}
|
||||
|
||||
// draw() has to be protected per FLTK convention (was public in 1.3.x)
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
Fl_Table(int X, int Y, int W, int H, const char *l=0);
|
||||
|
@ -732,7 +732,7 @@ public:
|
|||
void set_selection(int row_top, int col_left, int row_bot, int col_right);
|
||||
int move_cursor(int R, int C, int shiftselect);
|
||||
int move_cursor(int R, int C);
|
||||
void resize(int X, int Y, int W, int H); // fltk resize() override
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE; // fltk resize() FL_OVERRIDE
|
||||
|
||||
// This crashes sortapp() during init.
|
||||
// void box(Fl_Boxtype val) {
|
||||
|
|
|
@ -112,7 +112,7 @@ private:
|
|||
TableRowSelectMode _selectmode;
|
||||
|
||||
protected:
|
||||
int handle(int event);
|
||||
int handle(int event) FL_OVERRIDE;
|
||||
int find_cell(TableContext context, // find cell's x/y/w/h given r/c
|
||||
int R, int C, int &X, int &Y, int &W, int &H) {
|
||||
return(Fl_Table::find_cell(context, R, C, X, Y, W, H));
|
||||
|
@ -139,7 +139,7 @@ public:
|
|||
*/
|
||||
~Fl_Table_Row() { }
|
||||
|
||||
void rows(int val); // set number of rows
|
||||
void rows(int val) FL_OVERRIDE; // set number of rows
|
||||
int rows() { // get number of rows
|
||||
return(Fl_Table::rows());
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
*/
|
||||
void select_all_rows(int flag=1); // all rows to a known state
|
||||
|
||||
void clear() {
|
||||
void clear() FL_OVERRIDE {
|
||||
rows(0); // implies clearing selection
|
||||
cols(0);
|
||||
Fl_Table::clear(); // clear the table
|
||||
|
|
|
@ -215,14 +215,14 @@ protected:
|
|||
virtual void draw_tab(int x1, int x2, int W, int H, Fl_Widget* o, int sel=0);
|
||||
virtual int tab_height();
|
||||
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
Fl_Tabs(int X, int Y, int W, int H, const char *L = 0);
|
||||
virtual ~Fl_Tabs();
|
||||
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Widget *value();
|
||||
int value(Fl_Widget *);
|
||||
/**
|
||||
|
|
|
@ -167,7 +167,7 @@ public:
|
|||
Fl_Text_Display(int X, int Y, int W, int H, const char *l = 0);
|
||||
~Fl_Text_Display();
|
||||
|
||||
virtual int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
|
||||
void buffer(Fl_Text_Buffer* buf);
|
||||
|
||||
|
@ -433,7 +433,7 @@ public:
|
|||
void wrap_mode(int wrap, int wrap_margin);
|
||||
|
||||
virtual void recalc_display();
|
||||
virtual void resize(int X, int Y, int W, int H);
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Convert an x pixel position into a column number.
|
||||
|
@ -471,7 +471,7 @@ protected:
|
|||
// Anything with "vline" indicates thats it deals with currently
|
||||
// visible lines.
|
||||
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw_text(int X, int Y, int W, int H);
|
||||
void draw_range(int start, int end);
|
||||
void draw_cursor(int, int);
|
||||
|
|
|
@ -50,7 +50,7 @@ class FL_EXPORT Fl_Text_Editor : public Fl_Text_Display {
|
|||
|
||||
Fl_Text_Editor(int X, int Y, int W, int H, const char* l = 0);
|
||||
~Fl_Text_Editor() { remove_all_key_bindings(); }
|
||||
virtual int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
/**
|
||||
Sets the current insert mode; if non-zero, new text
|
||||
is inserted before the current cursor position. Otherwise, new
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
class FL_EXPORT Fl_Tile : public Fl_Group {
|
||||
public:
|
||||
int handle(int event);
|
||||
int handle(int event) FL_OVERRIDE;
|
||||
Fl_Tile(int X, int Y, int W, int H, const char *L=0);
|
||||
void resize(int X, int Y, int W, int H);
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
void position(int oldx, int oldy, int newx, int newy);
|
||||
};
|
||||
|
||||
|
|
|
@ -43,13 +43,13 @@ public:
|
|||
Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0);
|
||||
virtual ~Fl_Tiled_Image();
|
||||
|
||||
virtual Fl_Image *copy(int W, int H) const;
|
||||
Fl_Image *copy(int W, int H) const FL_OVERRIDE;
|
||||
Fl_Image *copy() const {
|
||||
return Fl_Image::copy();
|
||||
}
|
||||
virtual void color_average(Fl_Color c, float i);
|
||||
virtual void desaturate();
|
||||
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
|
||||
void color_average(Fl_Color c, float i) FL_OVERRIDE;
|
||||
void desaturate() FL_OVERRIDE;
|
||||
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); }
|
||||
/** Gets The image that is tiled */
|
||||
Fl_Image *image() { return image_; }
|
||||
|
|
|
@ -43,9 +43,9 @@ class FL_EXPORT Fl_Timer : public Fl_Widget {
|
|||
double delay, total;
|
||||
long lastsec,lastusec;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Timer(uchar t,int x,int y,int w,int h, const char *l);
|
||||
~Fl_Timer();
|
||||
void value(double);
|
||||
|
|
|
@ -312,14 +312,14 @@ protected:
|
|||
// undocmented draw_tree() dropped -- draw() does all the work now
|
||||
|
||||
// draw() has to be protected per FLTK convention (was public in 1.3.x)
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
Fl_Tree(int X, int Y, int W, int H, const char *L=0);
|
||||
~Fl_Tree();
|
||||
int handle(int e);
|
||||
int handle(int e) FL_OVERRIDE;
|
||||
void show_self();
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
|
||||
///////////////////////
|
||||
// root methods
|
||||
|
|
|
@ -61,13 +61,13 @@ public:
|
|||
private:
|
||||
char soft_;
|
||||
static void input_cb(Fl_Widget*,void*);
|
||||
virtual void value_damage(); // cause damage() due to value() changing
|
||||
void value_damage() FL_OVERRIDE; // cause damage() due to value() changing
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
Fl_Value_Input(int x,int y,int w,int h,const char *l=0);
|
||||
~Fl_Value_Input();
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ class FL_EXPORT Fl_Value_Output : public Fl_Valuator {
|
|||
Fl_Color textcolor_;
|
||||
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Value_Output(int x,int y,int w,int h,const char *l=0);
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,10 +36,10 @@ class FL_EXPORT Fl_Value_Slider : public Fl_Slider {
|
|||
short value_height_;
|
||||
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Fl_Value_Slider(int x, int y, int w, int h, const char *l = 0);
|
||||
|
||||
/** Gets the typeface of the text in the value box. */
|
||||
|
|
|
@ -93,7 +93,7 @@ protected:
|
|||
|
||||
/** Stores the last window that was made current. See current() const */
|
||||
static Fl_Window *current_;
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
/** Forces the window to be drawn, this window is also made current and calls draw(). */
|
||||
virtual void flush();
|
||||
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
*/
|
||||
virtual ~Fl_Window();
|
||||
|
||||
virtual int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
|
||||
/**
|
||||
Changes the size and position of the window. If shown() is true,
|
||||
|
@ -188,7 +188,7 @@ public:
|
|||
dimensions. It is up to the application developer to verify window
|
||||
parameters after the resize request.
|
||||
*/
|
||||
virtual void resize(int X,int Y,int W,int H);
|
||||
void resize(int X,int Y,int W,int H) FL_OVERRIDE;
|
||||
/** Sets whether or not the window manager border is around the window.
|
||||
The default value is true. <I>With some X window
|
||||
managers, this does not work after show() has been called.</I>
|
||||
|
@ -201,9 +201,9 @@ public:
|
|||
void clear_border() {set_flag(NOBORDER);}
|
||||
/** Returns whether the window possesses a border */
|
||||
unsigned int border() const {return !(flags() & NOBORDER);}
|
||||
/** Activates the flags NOBORDER|FL_OVERRIDE */
|
||||
/** Activates the flags NOBORDER|OVERRIDE */
|
||||
void set_override() {set_flag(NOBORDER|OVERRIDE);}
|
||||
/** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */
|
||||
/** Returns non zero if OVERRIDE flag is set, 0 otherwise. */
|
||||
unsigned int override() const { return flags()&OVERRIDE; }
|
||||
/**
|
||||
A "modal" window, when shown(), will prevent any events from
|
||||
|
@ -424,12 +424,12 @@ public:
|
|||
|
||||
\see Fl_Window::show(int argc, char **argv)
|
||||
*/
|
||||
virtual void show();
|
||||
void show() FL_OVERRIDE;
|
||||
/**
|
||||
Removes the window from the screen. If the window is already hidden or
|
||||
has not been shown then this does nothing and is harmless.
|
||||
*/
|
||||
virtual void hide();
|
||||
void hide() FL_OVERRIDE;
|
||||
/**
|
||||
Puts the window on the screen and parses command-line arguments.
|
||||
|
||||
|
@ -567,7 +567,7 @@ public:
|
|||
int decorated_h() const;
|
||||
|
||||
// Note: Doxygen docs in Fl_Widget.H to avoid redundancy.
|
||||
virtual Fl_Window* as_window() { return this; }
|
||||
Fl_Window* as_window() FL_OVERRIDE { return this; }
|
||||
|
||||
/**
|
||||
Return non-null if this is an Fl_Overlay_Window object.
|
||||
|
|
|
@ -43,7 +43,7 @@ class FL_EXPORT Fl_Wizard : public Fl_Group {
|
|||
|
||||
protected:
|
||||
|
||||
virtual void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
|
|
58
FL/fl_attr.h
58
FL/fl_attr.h
|
@ -31,4 +31,62 @@
|
|||
# define __fl_attr(x)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FL_DOXYGEN
|
||||
|
||||
/**
|
||||
This macro makes it safe to use the C++11 keyword \c override with
|
||||
older compilers.
|
||||
*/
|
||||
#define FL_OVERRIDE override
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// Visual Studio defines __cplusplus = '199711L' which is not helpful.
|
||||
// We assume that Visual Studio 2015 (1900) and later support the
|
||||
// 'override' keyword. For VS version number encoding see:
|
||||
// https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
|
||||
|
||||
#define FL_OVERRIDE override
|
||||
|
||||
#else // not Visual Studio or an older version
|
||||
|
||||
#if (__cplusplus >= 202002L)
|
||||
// put here definitions applying to C++20 and above
|
||||
#endif
|
||||
|
||||
#if (__cplusplus >= 201703L)
|
||||
// put here definitions applying to C++17 and above
|
||||
#endif
|
||||
|
||||
#if (__cplusplus >= 201402L)
|
||||
// put here definitions applying to C++14 and above
|
||||
#endif
|
||||
|
||||
#if (__cplusplus >= 201103L)
|
||||
// put here definitions applying to C++11 and above
|
||||
#define FL_OVERRIDE override
|
||||
#else
|
||||
// replace non-existing `override` with no-op
|
||||
#define FL_OVERRIDE
|
||||
#endif
|
||||
|
||||
#if (__cplusplus >= 199711L)
|
||||
// put here definitions applying to C++98 and above
|
||||
#endif
|
||||
|
||||
#endif /* not Visual Studio */
|
||||
|
||||
#else
|
||||
/* C, not C++ */
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* FL_DOXYGEN */
|
||||
|
||||
|
||||
#endif /* !_FL_fl_attr_h_ */
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef FL_TYPES_H
|
||||
#define FL_TYPES_H
|
||||
|
||||
#include "fl_attr.h"
|
||||
|
||||
/** \name Miscellaneous */
|
||||
/*@{*/ /* group: Miscellaneous */
|
||||
|
||||
|
|
|
@ -802,7 +802,7 @@ inline void fl_set_slider_precision(Fl_Widget* o, int i) {
|
|||
// meaning of FL_ALIGN_INSIDE. Implementation in forms.cxx
|
||||
class FL_EXPORT Fl_FormsText : public Fl_Widget {
|
||||
protected:
|
||||
void draw();
|
||||
void draw() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0)
|
||||
: Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);}
|
||||
|
|
|
@ -43,9 +43,9 @@ class FL_EXPORT Fl_Glut_Window : public Fl_Gl_Window {
|
|||
void _init();
|
||||
int mouse_down;
|
||||
protected:
|
||||
void draw();
|
||||
void draw_overlay();
|
||||
int handle(int);
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw_overlay() FL_OVERRIDE;
|
||||
int handle(int) FL_OVERRIDE;
|
||||
public: // so the inline functions work
|
||||
int number;
|
||||
int menu[3];
|
||||
|
|
|
@ -67,7 +67,7 @@ void Fl_Cairo_State::autolink(bool b) {
|
|||
|
||||
/**
|
||||
Provides a corresponding Cairo context for window \a wi.
|
||||
This is needed in a draw() override if Fl::cairo_autolink_context()
|
||||
This is needed in a draw() FL_OVERRIDE if Fl::cairo_autolink_context()
|
||||
returns false, which is the default.
|
||||
The cairo_context() does not need to be freed as it is freed every time
|
||||
a new Cairo context is created. When the program terminates,
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
shaderProgram = 0;
|
||||
gl_version_major = 0;
|
||||
}
|
||||
void draw(void) {
|
||||
void draw(void) FL_OVERRIDE {
|
||||
if (gl_version_major >= 3 && !shaderProgram) {
|
||||
GLuint vs;
|
||||
GLuint fs;
|
||||
|
@ -141,7 +141,7 @@ public:
|
|||
}
|
||||
Fl_Gl_Window::draw(); // Draw FLTK child widgets.
|
||||
}
|
||||
virtual int handle(int event) {
|
||||
int handle(int event) FL_OVERRIDE {
|
||||
static int first = 1;
|
||||
if (first && event == FL_SHOW && shown()) {
|
||||
first = 0;
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
All other events are handled in Fl_Group::handle().
|
||||
Dragged widgets are limited inside the borders of their parent group.
|
||||
*/
|
||||
virtual int handle(int e) {
|
||||
int handle(int e) FL_OVERRIDE {
|
||||
|
||||
switch (e) {
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
label("Drag\nfrom\nhere..");
|
||||
}
|
||||
// Sender event handler
|
||||
int handle(int event) {
|
||||
int handle(int event) FL_OVERRIDE {
|
||||
int ret = Fl_Box::handle(event);
|
||||
switch ( event ) {
|
||||
case FL_PUSH: { // do 'copy/dnd' when someone clicks on box
|
||||
|
@ -64,7 +64,7 @@ public:
|
|||
dnd_text = 0;
|
||||
}
|
||||
// Receiver event handler
|
||||
int handle(int event) {
|
||||
int handle(int event) FL_OVERRIDE {
|
||||
int ret = Fl_Box::handle(event);
|
||||
int len;
|
||||
switch ( event ) {
|
||||
|
|
|
@ -27,7 +27,7 @@ class DrawX : public Fl_Widget {
|
|||
public:
|
||||
DrawX(int X, int Y, int W, int H, const char*L=0) : Fl_Widget(X,Y,W,H,L) {
|
||||
}
|
||||
void draw() {
|
||||
virtual void draw() FL_OVERRIDE {
|
||||
// Draw background - a white filled rectangle
|
||||
fl_color(FL_WHITE); fl_rectf(x(),y(),w(),h());
|
||||
// Draw black 'X' over base widget's background
|
||||
|
|
|
@ -33,7 +33,7 @@ void cb(Fl_Widget *w, void *) {
|
|||
class dragbox : public Fl_Box {
|
||||
public:
|
||||
dragbox(int x, int y, int w, int h, const char *t=0) : Fl_Box(x,y,w,h,t) {}
|
||||
int handle(int event) {
|
||||
int handle(int event) FL_OVERRIDE {
|
||||
static int fromx, fromy, winx, winy;
|
||||
if (event == FL_PUSH) {
|
||||
fromx = Fl::event_x_root();
|
||||
|
|
|
@ -40,7 +40,7 @@ void button_cb(Fl_Widget *w, void*);
|
|||
class WidgetTable : public Fl_Table {
|
||||
protected:
|
||||
void draw_cell(TableContext context, // table cell drawing
|
||||
int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0);
|
||||
int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
WidgetTable(int x, int y, int w, int h, const char *l=0) : Fl_Table(x,y,w,h,l) {
|
||||
|
|
|
@ -59,7 +59,7 @@ class MyTable : public Fl_Table {
|
|||
// Fl_Table calls this function to draw each visible cell in the table.
|
||||
// It's up to us to use FLTK's drawing functions to draw the cells the way we want.
|
||||
//
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) {
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE {
|
||||
static char s[40];
|
||||
switch ( context ) {
|
||||
case CONTEXT_STARTPAGE: // before page is drawn..
|
||||
|
|
|
@ -97,8 +97,8 @@ private:
|
|||
void event_callback2(); // callback for table events
|
||||
|
||||
protected:
|
||||
void draw_cell(TableContext context, int R=0, int C=0, // table cell drawing
|
||||
int X=0, int Y=0, int W=0, int H=0);
|
||||
void draw_cell(TableContext context, int R=0, int C=0, // table cell drawing
|
||||
int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE;
|
||||
void sort_column(int col, int reverse=0); // sort table by a column
|
||||
void draw_sort_arrow(int X,int Y,int W,int H);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class Spreadsheet : public Fl_Table {
|
|||
int s_left, s_top, s_right, s_bottom; // kb nav + mouse selection
|
||||
|
||||
protected:
|
||||
void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0);
|
||||
void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0) FL_OVERRIDE;
|
||||
void event_callback2(); // table's event callback (instance)
|
||||
static void event_callback(Fl_Widget*, void *v) { // table's event callback (static)
|
||||
((Spreadsheet*)v)->event_callback2();
|
||||
|
@ -75,11 +75,11 @@ public:
|
|||
window()->cursor(FL_CURSOR_DEFAULT); // XXX: if we don't do this, cursor can disappear!
|
||||
}
|
||||
// Change number of rows
|
||||
void rows(int val) {
|
||||
void rows(int val) FL_OVERRIDE {
|
||||
Fl_Table::rows(val);
|
||||
}
|
||||
// Change number of columns
|
||||
void cols(int val) {
|
||||
void cols(int val) FL_OVERRIDE {
|
||||
Fl_Table::cols(val);
|
||||
}
|
||||
// Get number of rows
|
||||
|
|
|
@ -31,7 +31,7 @@ class Spreadsheet : public Fl_Table {
|
|||
int row_edit, col_edit; // row/col being modified
|
||||
|
||||
protected:
|
||||
void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0);
|
||||
void draw_cell(TableContext context,int=0,int=0,int=0,int=0,int=0,int=0) FL_OVERRIDE;
|
||||
void event_callback2(); // table's event callback (instance)
|
||||
static void event_callback(Fl_Widget*,void *v) { // table's event callback (static)
|
||||
((Spreadsheet*)v)->event_callback2();
|
||||
|
|
|
@ -41,7 +41,7 @@ Fl_Output *G_sum = 0; // displays sum of user's select
|
|||
class MyTable : public Fl_Table_Row {
|
||||
protected:
|
||||
// Handle drawing all cells in table
|
||||
void draw_cell(TableContext context, int R=0,int C=0, int X=0,int Y=0,int W=0,int H=0) {
|
||||
void draw_cell(TableContext context, int R=0,int C=0, int X=0,int Y=0,int W=0,int H=0) FL_OVERRIDE {
|
||||
static char s[30];
|
||||
switch ( context ) {
|
||||
case CONTEXT_COL_HEADER:
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
{ G_sum->value(s); G_sum->redraw(); }
|
||||
}
|
||||
// Keyboard and mouse events
|
||||
int handle(int e) {
|
||||
int handle(int e) FL_OVERRIDE {
|
||||
int ret = Fl_Table_Row::handle(e);
|
||||
if ( e == FL_KEYBOARD && Fl::event_key() == FL_Escape ) exit(0);
|
||||
switch (e) {
|
||||
|
|
|
@ -59,7 +59,7 @@ class MyTable : public Fl_Table {
|
|||
// Fl_Table calls this function to draw each visible cell in the table.
|
||||
// It's up to us to use FLTK's drawing functions to draw the cells the way we want.
|
||||
//
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) {
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE {
|
||||
static char s[40];
|
||||
switch ( context ) {
|
||||
case CONTEXT_STARTPAGE: // before page is drawn..
|
||||
|
@ -115,7 +115,7 @@ public:
|
|||
}
|
||||
|
||||
// Handle window resizing
|
||||
void resize(int X,int Y,int W,int H) {
|
||||
void resize(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
Fl_Table::resize(X,Y,W,H);
|
||||
FixColumnSize(); // after letting window resize, fix our right most column
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
// that we want the user to be able to use the horizontal scrollbar
|
||||
// to reach.
|
||||
//
|
||||
int draw_item_content(int render) {
|
||||
int draw_item_content(int render) FL_OVERRIDE {
|
||||
Fl_Color fg = drawfgcolor();
|
||||
Fl_Color bg = drawbgcolor();
|
||||
// Show the date and time as two small strings
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
this->mode = mode;
|
||||
end();
|
||||
}
|
||||
void resize(int X,int Y,int W,int H) {
|
||||
void resize(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
if ( W > 718 ) W = 718; // don't exceed 700 in width
|
||||
Fl_Table::resize(X,Y,W,h()); // disallow changes in height
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
// Fl_Table calls this function to draw each visible cell in the table.
|
||||
// It's up to us to use FLTK's drawing functions to draw the cells the way we want.
|
||||
//
|
||||
void draw_cell(TableContext context, int ROW, int COL, int X, int Y, int W, int H) {
|
||||
void draw_cell(TableContext context, int ROW, int COL, int X, int Y, int W, int H) FL_OVERRIDE {
|
||||
static char s[40];
|
||||
switch ( context ) {
|
||||
case CONTEXT_STARTPAGE: // before page is drawn..
|
||||
|
|
|
@ -62,8 +62,8 @@ public:
|
|||
CodeViewer(int X, int Y, int W, int H, const char *L=0);
|
||||
|
||||
protected:
|
||||
int handle(int ev) { return Fl_Text_Display::handle(ev); }
|
||||
void draw();
|
||||
int handle(int ev) FL_OVERRIDE{ return Fl_Text_Display::handle(ev); }
|
||||
void draw() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
// ---- DesignViewer declaration
|
||||
|
|
|
@ -49,21 +49,21 @@ class Fl_Function_Type : public Fl_Type {
|
|||
public:
|
||||
Fl_Function_Type();
|
||||
~Fl_Function_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
void open();
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void open() FL_OVERRIDE;
|
||||
int ismain() {return name_ == 0;}
|
||||
virtual const char *type_name() {return "Function";}
|
||||
virtual const char *title() {
|
||||
const char *type_name() FL_OVERRIDE {return "Function";}
|
||||
const char *title() FL_OVERRIDE {
|
||||
return name() ? name() : "main()";
|
||||
}
|
||||
int is_parent() const {return 1;}
|
||||
int is_code_block() const {return 1;}
|
||||
virtual int is_public() const;
|
||||
int pixmapID() { return 7; }
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_code_block() const FL_OVERRIDE {return 1;}
|
||||
int is_public() const FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 7; }
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int has_signature(const char *, const char*) const;
|
||||
};
|
||||
|
||||
|
@ -77,16 +77,16 @@ class Fl_Code_Type : public Fl_Type {
|
|||
|
||||
public:
|
||||
Fl_Code_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write();
|
||||
void write_code1();
|
||||
void write_code2() { }
|
||||
void open();
|
||||
virtual const char *type_name() {return "code";}
|
||||
int is_code_block() const {return 0;}
|
||||
int is_code() const {return 1;}
|
||||
int pixmapID() { return 8; }
|
||||
virtual int is_public() const { return -1; }
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write() FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE { }
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "code";}
|
||||
int is_code_block() const FL_OVERRIDE {return 0;}
|
||||
int is_code() const FL_OVERRIDE {return 1;}
|
||||
int pixmapID() FL_OVERRIDE { return 8; }
|
||||
int is_public() const FL_OVERRIDE { return -1; }
|
||||
int is_editing();
|
||||
int reap_editor();
|
||||
int handle_editor_changes();
|
||||
|
@ -100,17 +100,17 @@ class Fl_CodeBlock_Type : public Fl_Type {
|
|||
public:
|
||||
Fl_CodeBlock_Type();
|
||||
~Fl_CodeBlock_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
void open();
|
||||
virtual const char *type_name() {return "codeblock";}
|
||||
int is_code_block() const {return 1;}
|
||||
int is_parent() const {return 1;}
|
||||
virtual int is_public() const { return -1; }
|
||||
int pixmapID() { return 9; }
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "codeblock";}
|
||||
int is_code_block() const FL_OVERRIDE {return 1;}
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_public() const FL_OVERRIDE { return -1; }
|
||||
int pixmapID() FL_OVERRIDE { return 9; }
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
// ---- Fl_Decl_Type declaration
|
||||
|
@ -123,15 +123,15 @@ protected:
|
|||
|
||||
public:
|
||||
Fl_Decl_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2() { }
|
||||
void open();
|
||||
virtual const char *type_name() {return "decl";}
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
virtual int is_public() const;
|
||||
int pixmapID() { return 10; }
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE { }
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "decl";}
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int is_public() const FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 10; }
|
||||
};
|
||||
|
||||
// ---- Fl_Data_Type declaration
|
||||
|
@ -143,14 +143,14 @@ class Fl_Data_Type : public Fl_Decl_Type {
|
|||
public:
|
||||
Fl_Data_Type();
|
||||
~Fl_Data_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2() {}
|
||||
void open();
|
||||
virtual const char *type_name() {return "data";}
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
int pixmapID() { return 49; }
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE {}
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "data";}
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 49; }
|
||||
};
|
||||
|
||||
// ---- Fl_DeclBlock_Type declaration
|
||||
|
@ -162,17 +162,17 @@ class Fl_DeclBlock_Type : public Fl_Type {
|
|||
public:
|
||||
Fl_DeclBlock_Type();
|
||||
~Fl_DeclBlock_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
void open();
|
||||
virtual const char *type_name() {return "declblock";}
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
int is_parent() const {return 1;}
|
||||
int is_decl_block() const {return 1;}
|
||||
virtual int is_public() const;
|
||||
int pixmapID() { return 11; }
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "declblock";}
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_decl_block() const FL_OVERRIDE {return 1;}
|
||||
int is_public() const FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 11; }
|
||||
};
|
||||
|
||||
// ---- Fl_Comment_Type declaration
|
||||
|
@ -183,17 +183,17 @@ class Fl_Comment_Type : public Fl_Type {
|
|||
|
||||
public:
|
||||
Fl_Comment_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2() { }
|
||||
void open();
|
||||
virtual const char *type_name() {return "comment";}
|
||||
virtual const char *title(); // string for browser
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
virtual int is_public() const { return 1; }
|
||||
virtual int is_comment() const { return 1; }
|
||||
int pixmapID() { return 46; }
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE { }
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "comment";}
|
||||
const char *title() FL_OVERRIDE; // string for browser
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int is_public() const FL_OVERRIDE { return 1; }
|
||||
int is_comment() const FL_OVERRIDE { return 1; }
|
||||
int pixmapID() FL_OVERRIDE { return 46; }
|
||||
};
|
||||
|
||||
// ---- Fl_Class_Type declaration
|
||||
|
@ -210,18 +210,18 @@ public:
|
|||
char write_public_state; // true when public: has been printed
|
||||
Fl_Class_Type* parent_class; // save class if nested
|
||||
//
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
void open();
|
||||
virtual const char *type_name() {return "class";}
|
||||
int is_parent() const {return 1;}
|
||||
int is_decl_block() const {return 1;}
|
||||
int is_class() const {return 1;}
|
||||
virtual int is_public() const;
|
||||
int pixmapID() { return 12; }
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void open() FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "class";}
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_decl_block() const FL_OVERRIDE {return 1;}
|
||||
int is_class() const FL_OVERRIDE {return 1;}
|
||||
int is_public() const FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 12; }
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
|
||||
// class prefix attribute access
|
||||
void prefix(const char* p);
|
||||
|
|
|
@ -419,7 +419,7 @@ class Fluid_Table : public Fl_Table {
|
|||
// Fl_Table calls this function to draw each visible cell in the table.
|
||||
// It's up to us to use FLTK's drawing functions to draw the cells the way we want.
|
||||
//
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) {
|
||||
void draw_cell(TableContext context, int ROW=0, int COL=0, int X=0, int Y=0, int W=0, int H=0) FL_OVERRIDE {
|
||||
static char s[40];
|
||||
switch ( context ) {
|
||||
case CONTEXT_STARTPAGE: // before page is drawn..
|
||||
|
|
|
@ -29,86 +29,86 @@ void ungroup_cb(Fl_Widget *, void *);
|
|||
|
||||
class igroup : public Fl_Group {
|
||||
public:
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); }
|
||||
igroup(int X,int Y,int W,int H) : Fl_Group(X,Y,W,H) {Fl_Group::current(0);}
|
||||
};
|
||||
|
||||
class itabs : public Fl_Tabs {
|
||||
public:
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); }
|
||||
itabs(int X,int Y,int W,int H) : Fl_Tabs(X,Y,W,H) {}
|
||||
};
|
||||
|
||||
class iwizard : public Fl_Wizard {
|
||||
public:
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
void full_resize(int X, int Y, int W, int H) { Fl_Group::resize(X, Y, W, H); }
|
||||
iwizard(int X,int Y,int W,int H) : Fl_Wizard(X,Y,W,H) {}
|
||||
};
|
||||
|
||||
class Fl_Group_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Group";}
|
||||
virtual const char *alt_type_name() {return "fltk::Group";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Group";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Group";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
igroup *g = new igroup(X,Y,W,H); Fl_Group::current(0); return g;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Group_Type();}
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
void add_child(Fl_Type*, Fl_Type*);
|
||||
void move_child(Fl_Type*, Fl_Type*);
|
||||
void remove_child(Fl_Type*);
|
||||
int is_parent() const {return 1;}
|
||||
int is_group() const {return 1;}
|
||||
int pixmapID() { return 6; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Group_Type();}
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_group() const FL_OVERRIDE {return 1;}
|
||||
int pixmapID() FL_OVERRIDE { return 6; }
|
||||
|
||||
virtual Fl_Widget *enter_live_mode(int top=0);
|
||||
virtual void leave_live_mode();
|
||||
virtual void copy_properties();
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void leave_live_mode() FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char pack_type_name[];
|
||||
extern Fl_Menu_Item pack_type_menu[];
|
||||
|
||||
class Fl_Pack_Type : public Fl_Group_Type {
|
||||
Fl_Menu_Item *subtypes() {return pack_type_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return pack_type_menu;}
|
||||
public:
|
||||
virtual const char *type_name() {return pack_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::PackedGroup";}
|
||||
Fl_Widget_Type *_make() {return new Fl_Pack_Type();}
|
||||
int pixmapID() { return 22; }
|
||||
void copy_properties();
|
||||
const char *type_name() FL_OVERRIDE {return pack_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::PackedGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Pack_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 22; }
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char flex_type_name[];
|
||||
extern Fl_Menu_Item flex_type_menu[];
|
||||
|
||||
class Fl_Flex_Type : public Fl_Group_Type {
|
||||
Fl_Menu_Item *subtypes() {return flex_type_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return flex_type_menu;}
|
||||
int fixedSizeTupleSize; /* number of pairs in array */
|
||||
int *fixedSizeTuple; /* [ index, size, index2, size2, ... ] */
|
||||
int suspend_auto_layout;
|
||||
public:
|
||||
Fl_Flex_Type() : fixedSizeTupleSize(0), fixedSizeTuple(NULL), suspend_auto_layout(0) { }
|
||||
virtual const char *type_name() {return flex_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::FlexGroup";}
|
||||
Fl_Widget_Type *_make() { return new Fl_Flex_Type(); }
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return flex_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::FlexGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE { return new Fl_Flex_Type(); }
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
Fl_Flex *g = new Fl_Flex(X,Y,W,H); Fl_Group::current(0); return g;}
|
||||
int pixmapID() { return 56; }
|
||||
void write_properties();
|
||||
void read_property(const char *);
|
||||
Fl_Widget *enter_live_mode(int top=0);
|
||||
void copy_properties();
|
||||
void postprocess_read();
|
||||
void write_code2();
|
||||
void add_child(Fl_Type*, Fl_Type*);
|
||||
void move_child(Fl_Type*, Fl_Type*);
|
||||
void remove_child(Fl_Type*);
|
||||
int is_flex() const {return 1;}
|
||||
int pixmapID() FL_OVERRIDE { return 56; }
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
void postprocess_read() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
int is_flex() const FL_OVERRIDE {return 1;}
|
||||
void change_subtype_to(int n);
|
||||
static int parent_is_flex(Fl_Type*);
|
||||
static int size(Fl_Type*, char fixed_only=0);
|
||||
|
@ -119,73 +119,73 @@ extern const char table_type_name[];
|
|||
|
||||
class Fl_Table_Type : public Fl_Group_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return table_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::TableGroup";}
|
||||
Fl_Widget_Type *_make() {return new Fl_Table_Type();}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H);
|
||||
int pixmapID() { return 51; }
|
||||
virtual Fl_Widget *enter_live_mode(int top=0);
|
||||
void add_child(Fl_Type*, Fl_Type*);
|
||||
void move_child(Fl_Type*, Fl_Type*);
|
||||
void remove_child(Fl_Type*);
|
||||
const char *type_name() FL_OVERRIDE {return table_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TableGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Table_Type();}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 51; }
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char tabs_type_name[];
|
||||
|
||||
class Fl_Tabs_Type : public Fl_Group_Type {
|
||||
public:
|
||||
virtual void ideal_spacing(int &x, int &y) {
|
||||
void ideal_spacing(int &x, int &y) FL_OVERRIDE {
|
||||
x = 10;
|
||||
fl_font(o->labelfont(), o->labelsize());
|
||||
y = fl_height() + o->labelsize() - 6;
|
||||
}
|
||||
virtual const char *type_name() {return tabs_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::TabGroup";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return tabs_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TabGroup";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
itabs *g = new itabs(X,Y,W,H); Fl_Group::current(0); return g;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Tabs_Type();}
|
||||
Fl_Type* click_test(int,int);
|
||||
void add_child(Fl_Type*, Fl_Type*);
|
||||
void remove_child(Fl_Type*);
|
||||
int pixmapID() { return 13; }
|
||||
Fl_Widget *enter_live_mode(int top=0);
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tabs_Type();}
|
||||
Fl_Type* click_test(int,int) FL_OVERRIDE;
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 13; }
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char scroll_type_name[];
|
||||
extern Fl_Menu_Item scroll_type_menu[];
|
||||
|
||||
class Fl_Scroll_Type : public Fl_Group_Type {
|
||||
Fl_Menu_Item *subtypes() {return scroll_type_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return scroll_type_menu;}
|
||||
public:
|
||||
virtual const char *type_name() {return scroll_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::ScrollGroup";}
|
||||
Fl_Widget_Type *_make() {return new Fl_Scroll_Type();}
|
||||
int pixmapID() { return 19; }
|
||||
Fl_Widget *enter_live_mode(int top=0);
|
||||
void copy_properties();
|
||||
const char *type_name() FL_OVERRIDE {return scroll_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ScrollGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scroll_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 19; }
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char tile_type_name[];
|
||||
|
||||
class Fl_Tile_Type : public Fl_Group_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return tile_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::TileGroup";}
|
||||
Fl_Widget_Type *_make() {return new Fl_Tile_Type();}
|
||||
int pixmapID() { return 20; }
|
||||
void copy_properties();
|
||||
const char *type_name() FL_OVERRIDE {return tile_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TileGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tile_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 20; }
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern const char wizard_type_name[];
|
||||
|
||||
class Fl_Wizard_Type : public Fl_Group_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return wizard_type_name;}
|
||||
virtual const char *alt_type_name() {return "fltk::WizardGroup";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return wizard_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::WizardGroup";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
iwizard *g = new iwizard(X,Y,W,H); Fl_Group::current(0); return g;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Wizard_Type();}
|
||||
int pixmapID() { return 21; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Wizard_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 21; }
|
||||
};
|
||||
|
||||
#endif // _FLUID_FL_GROUP_TYPE_H
|
||||
|
|
|
@ -33,55 +33,55 @@ extern Fl_Menu_Item menu_item_type_menu[];
|
|||
|
||||
class Fl_Menu_Item_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
Fl_Menu_Item* subtypes() {return menu_item_type_menu;}
|
||||
const char* type_name() {return "MenuItem";}
|
||||
const char* alt_type_name() {return "fltk::Item";}
|
||||
Fl_Type* make(Strategy strategy);
|
||||
int is_menu_item() const {return 1;}
|
||||
int is_button() const {return 1;} // this gets shortcut to work
|
||||
Fl_Widget* widget(int,int,int,int) {return 0;}
|
||||
Fl_Widget_Type* _make() {return 0;}
|
||||
const char* menu_name(int& i);
|
||||
Fl_Menu_Item* subtypes() FL_OVERRIDE {return menu_item_type_menu;}
|
||||
const char* type_name() FL_OVERRIDE {return "MenuItem";}
|
||||
const char* alt_type_name() FL_OVERRIDE {return "fltk::Item";}
|
||||
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
|
||||
int is_menu_item() const FL_OVERRIDE {return 1;}
|
||||
int is_button() const FL_OVERRIDE {return 1;} // this gets shortcut to work
|
||||
Fl_Widget* widget(int,int,int,int) FL_OVERRIDE {return 0;}
|
||||
Fl_Widget_Type* _make() FL_OVERRIDE {return 0;}
|
||||
virtual const char* menu_name(int& i);
|
||||
int flags();
|
||||
void write_static();
|
||||
void write_static() FL_OVERRIDE;
|
||||
void write_item();
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
int pixmapID() { return 16; }
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 16; }
|
||||
};
|
||||
|
||||
class Fl_Radio_Menu_Item_Type : public Fl_Menu_Item_Type {
|
||||
public:
|
||||
const char* type_name() {return "RadioMenuItem";}
|
||||
Fl_Type* make(Strategy strategy);
|
||||
int pixmapID() { return 55; }
|
||||
const char* type_name() FL_OVERRIDE {return "RadioMenuItem";}
|
||||
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 55; }
|
||||
};
|
||||
|
||||
class Fl_Checkbox_Menu_Item_Type : public Fl_Menu_Item_Type {
|
||||
public:
|
||||
const char* type_name() {return "CheckMenuItem";}
|
||||
Fl_Type* make(Strategy strategy);
|
||||
int pixmapID() { return 54; }
|
||||
const char* type_name() FL_OVERRIDE {return "CheckMenuItem";}
|
||||
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 54; }
|
||||
};
|
||||
|
||||
class Fl_Submenu_Type : public Fl_Menu_Item_Type {
|
||||
public:
|
||||
Fl_Menu_Item* subtypes() {return 0;}
|
||||
const char* type_name() {return "Submenu";}
|
||||
const char* alt_type_name() {return "fltk::ItemGroup";}
|
||||
int is_parent() const {return 1;}
|
||||
int is_button() const {return 0;} // disable shortcut
|
||||
Fl_Type* make(Strategy strategy);
|
||||
Fl_Menu_Item* subtypes() FL_OVERRIDE {return 0;}
|
||||
const char* type_name() FL_OVERRIDE {return "Submenu";}
|
||||
const char* alt_type_name() FL_OVERRIDE {return "fltk::ItemGroup";}
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_button() const FL_OVERRIDE {return 0;} // disable shortcut
|
||||
Fl_Type* make(Strategy strategy) FL_OVERRIDE;
|
||||
// changes to submenu must propagate up so build_menu is called
|
||||
// on the parent Fl_Menu_Type:
|
||||
void add_child(Fl_Type*a, Fl_Type*b) {parent->add_child(a,b);}
|
||||
void move_child(Fl_Type*a, Fl_Type*b) {parent->move_child(a,b);}
|
||||
void remove_child(Fl_Type*a) {parent->remove_child(a);}
|
||||
int pixmapID() { return 18; }
|
||||
void add_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->add_child(a,b);}
|
||||
void move_child(Fl_Type*a, Fl_Type*b) FL_OVERRIDE {parent->move_child(a,b);}
|
||||
void remove_child(Fl_Type*a) FL_OVERRIDE {parent->remove_child(a);}
|
||||
int pixmapID() FL_OVERRIDE { return 18; }
|
||||
};
|
||||
|
||||
class Fl_Menu_Type : public Fl_Widget_Type {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE {
|
||||
Fl_Menu_ *myo = (Fl_Menu_*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
|
||||
switch (w) {
|
||||
case 4:
|
||||
|
@ -93,40 +93,40 @@ class Fl_Menu_Type : public Fl_Widget_Type {
|
|||
return 1;
|
||||
}
|
||||
public:
|
||||
int is_menu_button() const {return 1;}
|
||||
int is_parent() const {return 1;}
|
||||
int is_menu_button() const FL_OVERRIDE {return 1;}
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int menusize;
|
||||
virtual void build_menu();
|
||||
Fl_Menu_Type() : Fl_Widget_Type() {menusize = 0;}
|
||||
~Fl_Menu_Type() {
|
||||
if (menusize) delete[] (Fl_Menu_Item*)(((Fl_Menu_*)o)->menu());
|
||||
}
|
||||
void add_child(Fl_Type*, Fl_Type*) {build_menu();}
|
||||
void move_child(Fl_Type*, Fl_Type*) {build_menu();}
|
||||
void remove_child(Fl_Type*) {build_menu();}
|
||||
Fl_Type* click_test(int x, int y);
|
||||
void write_code2();
|
||||
void copy_properties();
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE {build_menu();}
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE {build_menu();}
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE {build_menu();}
|
||||
Fl_Type* click_test(int x, int y) FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
extern Fl_Menu_Item button_type_menu[];
|
||||
|
||||
class Fl_Menu_Button_Type : public Fl_Menu_Type {
|
||||
Fl_Menu_Item *subtypes() {return button_type_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return button_type_menu;}
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += 2 * ((o->labelsize() - 3) & ~1) + o->labelsize() - 4;
|
||||
h = (h / 5) * 5;
|
||||
if (h < 15) h = 15;
|
||||
if (w < (15 + h)) w = 15 + h;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Menu_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::MenuButton";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Menu_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::MenuButton";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
return new Fl_Menu_Button(X,Y,W,H,"menu");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Menu_Button_Type();}
|
||||
int pixmapID() { return 26; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 26; }
|
||||
};
|
||||
|
||||
extern Fl_Menu_Item dummymenu[];
|
||||
|
@ -134,7 +134,7 @@ extern Fl_Menu_Item dummymenu[];
|
|||
#include <FL/Fl_Choice.H>
|
||||
class Fl_Choice_Type : public Fl_Menu_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
int w1 = o->h() - Fl::box_dh(o->box());
|
||||
if (w1 > 20) w1 = 20;
|
||||
|
@ -145,19 +145,19 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < (15 + h)) w = 15 + h;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Choice";}
|
||||
virtual const char *alt_type_name() {return "fltk::Choice";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Choice";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Choice";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
Fl_Choice *myo = new Fl_Choice(X,Y,W,H,"choice:");
|
||||
myo->menu(dummymenu);
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Choice_Type();}
|
||||
int pixmapID() { return 15; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Choice_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 15; }
|
||||
};
|
||||
|
||||
class Fl_Input_Choice_Type : public Fl_Menu_Type {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE {
|
||||
Fl_Input_Choice *myo = (Fl_Input_Choice*)(w==4 ? ((Fl_Widget_Type*)this->factory)->o : this->o);
|
||||
switch (w) {
|
||||
case 4:
|
||||
|
@ -169,7 +169,7 @@ class Fl_Input_Choice_Type : public Fl_Menu_Type {
|
|||
return 1;
|
||||
}
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Input_Choice *myo = (Fl_Input_Choice *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -179,33 +179,33 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < (15 + h)) w = 15 + h;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Input_Choice";}
|
||||
virtual const char *alt_type_name() {return "fltk::ComboBox";}
|
||||
virtual Fl_Type* click_test(int,int);
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Input_Choice";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ComboBox";}
|
||||
Fl_Type* click_test(int,int) FL_OVERRIDE;
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {
|
||||
Fl_Input_Choice *myo = new Fl_Input_Choice(X,Y,W,H,"input choice:");
|
||||
myo->menu(dummymenu);
|
||||
myo->value("input");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Input_Choice_Type();}
|
||||
virtual void build_menu();
|
||||
int pixmapID() { return 53; }
|
||||
void copy_properties();
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Choice_Type();}
|
||||
void build_menu() FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 53; }
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
};
|
||||
|
||||
class Fl_Menu_Bar_Type : public Fl_Menu_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
w = o->window()->w();
|
||||
h = ((o->labelsize() + Fl::box_dh(o->box()) + 4) / 5) * 5;
|
||||
if (h < 15) h = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Menu_Bar";}
|
||||
virtual const char *alt_type_name() {return "fltk::MenuBar";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) {return new Fl_Menu_Bar(X,Y,W,H);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Menu_Bar_Type();}
|
||||
int pixmapID() { return 17; }
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Menu_Bar";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::MenuBar";}
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE {return new Fl_Menu_Bar(X,Y,W,H);}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Menu_Bar_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 17; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ void comment_cb(class Fl_Text_Editor* i, void *v);
|
|||
class Fl_Widget_Type : public Fl_Type {
|
||||
virtual Fl_Widget *widget(int,int,int,int) = 0;
|
||||
virtual Fl_Widget_Type *_make() = 0; // virtual constructor
|
||||
virtual void setlabel(const char *);
|
||||
void setlabel(const char *) FL_OVERRIDE;
|
||||
|
||||
const char *extra_code_[NUM_EXTRA_CODE];
|
||||
const char *subclass_;
|
||||
|
@ -51,12 +51,12 @@ class Fl_Widget_Type : public Fl_Type {
|
|||
|
||||
protected:
|
||||
|
||||
void write_static();
|
||||
void write_code1();
|
||||
void write_static() FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_widget_code();
|
||||
void write_extra_code();
|
||||
void write_block_close();
|
||||
void write_code2();
|
||||
void write_code2() FL_OVERRIDE;
|
||||
void write_color(const char*, Fl_Color);
|
||||
Fl_Widget *live_widget;
|
||||
|
||||
|
@ -75,8 +75,8 @@ public:
|
|||
void setinactive(Fluid_Image *);
|
||||
|
||||
Fl_Widget_Type();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
void open();
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
void open() FL_OVERRIDE;
|
||||
|
||||
const char *extra_code(int n) const {return extra_code_[n];}
|
||||
void extra_code(int n,const char *);
|
||||
|
@ -96,16 +96,16 @@ public:
|
|||
virtual int textstuff(int what, Fl_Font &, int &, Fl_Color &);
|
||||
virtual Fl_Menu_Item *subtypes();
|
||||
|
||||
virtual int is_widget() const;
|
||||
virtual int is_public() const;
|
||||
int is_widget() const FL_OVERRIDE;
|
||||
int is_public() const FL_OVERRIDE;
|
||||
|
||||
virtual void write_properties();
|
||||
virtual void read_property(const char *);
|
||||
virtual int read_fdesign(const char*, const char*);
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int read_fdesign(const char*, const char*) FL_OVERRIDE;
|
||||
|
||||
virtual Fl_Widget *enter_live_mode(int top=0);
|
||||
virtual void leave_live_mode();
|
||||
virtual void copy_properties();
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void leave_live_mode() FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
|
||||
virtual void ideal_size(int &w, int &h);
|
||||
virtual void ideal_spacing(int &x, int &y);
|
||||
|
|
|
@ -313,13 +313,13 @@ static int overlays_invisible;
|
|||
// an overlay for the fluid ui, and special-cases the FL_NO_BOX.
|
||||
|
||||
class Overlay_Window : public Fl_Overlay_Window {
|
||||
void draw();
|
||||
void draw_overlay();
|
||||
void draw() FL_OVERRIDE;
|
||||
void draw_overlay() FL_OVERRIDE;
|
||||
public:
|
||||
Fl_Window_Type *window;
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Overlay_Window(int W,int H) : Fl_Overlay_Window(W,H) {Fl_Group::current(0);}
|
||||
void resize(int,int,int,int);
|
||||
void resize(int,int,int,int) FL_OVERRIDE;
|
||||
uchar *read_image(int &ww, int &hh);
|
||||
};
|
||||
void Overlay_Window::draw() {
|
||||
|
|
|
@ -36,7 +36,7 @@ void show_global_settings_cb(Fl_Widget *, void *);
|
|||
class Fl_Window_Type : public Fl_Widget_Type {
|
||||
protected:
|
||||
|
||||
Fl_Menu_Item* subtypes() {return window_type_menu;}
|
||||
Fl_Menu_Item* subtypes() FL_OVERRIDE {return window_type_menu;}
|
||||
|
||||
friend class Overlay_Window;
|
||||
int mx,my; // mouse position during dragging
|
||||
|
@ -51,14 +51,14 @@ protected:
|
|||
void newdx();
|
||||
void newposition(Fl_Widget_Type *,int &x,int &y,int &w,int &h);
|
||||
int handle(int);
|
||||
virtual void setlabel(const char *);
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
Fl_Widget_Type *_make() {return 0;} // we don't call this
|
||||
Fl_Widget *widget(int,int,int,int) {return 0;}
|
||||
void setlabel(const char *) FL_OVERRIDE;
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return 0;} // we don't call this
|
||||
Fl_Widget *widget(int,int,int,int) FL_OVERRIDE {return 0;}
|
||||
int recalc; // set by fix_overlay()
|
||||
void moveallchildren();
|
||||
int pixmapID() { return 1; }
|
||||
int pixmapID() FL_OVERRIDE { return 1; }
|
||||
|
||||
public:
|
||||
|
||||
|
@ -76,30 +76,30 @@ public:
|
|||
{ }
|
||||
uchar modal, non_modal;
|
||||
|
||||
Fl_Type *make(Strategy strategy);
|
||||
virtual const char *type_name() {return "Fl_Window";}
|
||||
virtual const char *alt_type_name() {return "fltk::Window";}
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Window";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Window";}
|
||||
|
||||
void open();
|
||||
void open() FL_OVERRIDE;
|
||||
|
||||
void fix_overlay(); // Update the bounding box, etc
|
||||
uchar *read_image(int &ww, int &hh); // Read an image of the window
|
||||
|
||||
virtual void write_properties();
|
||||
virtual void read_property(const char *);
|
||||
virtual int read_fdesign(const char*, const char*);
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
int read_fdesign(const char*, const char*) FL_OVERRIDE;
|
||||
|
||||
void add_child(Fl_Type*, Fl_Type*);
|
||||
void move_child(Fl_Type*, Fl_Type*);
|
||||
void remove_child(Fl_Type*);
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
|
||||
int is_parent() const {return 1;}
|
||||
int is_group() const {return 1;}
|
||||
int is_window() const {return 1;}
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_group() const FL_OVERRIDE {return 1;}
|
||||
int is_window() const FL_OVERRIDE {return 1;}
|
||||
|
||||
Fl_Widget *enter_live_mode(int top=0);
|
||||
void leave_live_mode();
|
||||
void copy_properties();
|
||||
Fl_Widget *enter_live_mode(int top=0) FL_OVERRIDE;
|
||||
void leave_live_mode() FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
|
||||
int sr_min_w, sr_min_h, sr_max_w, sr_max_h;
|
||||
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
|
||||
class Fl_Widget_Class_Type : private Fl_Window_Type {
|
||||
protected:
|
||||
Fl_Menu_Item* subtypes() {return 0;}
|
||||
Fl_Menu_Item* subtypes() FL_OVERRIDE {return 0;}
|
||||
|
||||
public:
|
||||
Fl_Widget_Class_Type() {
|
||||
|
@ -119,18 +119,18 @@ public:
|
|||
char write_public_state; // true when public: has been printed
|
||||
char wc_relative; // if 1, reposition all children, if 2, reposition and resize
|
||||
|
||||
virtual void write_properties();
|
||||
virtual void read_property(const char *);
|
||||
void write_properties() FL_OVERRIDE;
|
||||
void read_property(const char *) FL_OVERRIDE;
|
||||
|
||||
void write_code1();
|
||||
void write_code2();
|
||||
Fl_Type *make(Strategy strategy);
|
||||
virtual const char *type_name() {return "widget_class";}
|
||||
int pixmapID() { return 48; }
|
||||
int is_parent() const {return 1;}
|
||||
int is_code_block() const {return 1;}
|
||||
int is_decl_block() const {return 1;}
|
||||
int is_class() const {return 1;}
|
||||
void write_code1() FL_OVERRIDE;
|
||||
void write_code2() FL_OVERRIDE;
|
||||
Fl_Type *make(Strategy strategy) FL_OVERRIDE;
|
||||
const char *type_name() FL_OVERRIDE {return "widget_class";}
|
||||
int pixmapID() FL_OVERRIDE { return 48; }
|
||||
int is_parent() const FL_OVERRIDE {return 1;}
|
||||
int is_code_block() const FL_OVERRIDE {return 1;}
|
||||
int is_decl_block() const FL_OVERRIDE {return 1;}
|
||||
int is_class() const FL_OVERRIDE {return 1;}
|
||||
};
|
||||
|
||||
#endif // _FLUID_FL_WINDOW_TYPE_H
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
class Shortcut_Button : public Fl_Button {
|
||||
public:
|
||||
int svalue;
|
||||
int handle(int);
|
||||
void draw();
|
||||
int handle(int) FL_OVERRIDE;
|
||||
void draw() FL_OVERRIDE;
|
||||
Shortcut_Button(int X,int Y,int W,int H, const char* l = 0) :
|
||||
Fl_Button(X,Y,W,H,l) {svalue = 0;}
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ public:
|
|||
// Adding drag and drop for dragging widgets into windows.
|
||||
class Widget_Bin_Button : public Fl_Button {
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Widget_Bin_Button(int X,int Y,int W,int H, const char* l = 0) :
|
||||
Fl_Button(X,Y,W,H,l) { }
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
// Adding drag and drop functionality to drag window prototypes onto the desktop.
|
||||
class Widget_Bin_Window_Button : public Fl_Button {
|
||||
public:
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
Widget_Bin_Window_Button(int X,int Y,int W,int H, const char* l = 0) :
|
||||
Fl_Button(X,Y,W,H,l) { }
|
||||
};
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
#include <FL/Fl_Box.H>
|
||||
class Fl_Box_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Box";}
|
||||
virtual const char *alt_type_name() {return "fltk::Widget";}
|
||||
Fl_Widget *widget(int x,int y,int w, int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Box";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Widget";}
|
||||
Fl_Widget *widget(int x,int y,int w, int h) FL_OVERRIDE {
|
||||
return new Fl_Box(x,y,w,h,"label");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Box_Type();}
|
||||
int pixmapID() { return 5; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Box_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 5; }
|
||||
};
|
||||
static Fl_Box_Type Fl_Box_type;
|
||||
|
||||
|
@ -65,20 +65,20 @@ static Fl_Menu_Item buttontype_menu[] = {
|
|||
{"Radio",0,0,(void*)FL_RADIO_BUTTON},
|
||||
{0}};
|
||||
class Fl_Button_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return buttontype_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return buttontype_menu;}
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Widget_Type::ideal_size(w, h);
|
||||
w += 2 * (o->labelsize() - 4);
|
||||
h = (h / 5) * 5;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Button";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Button_Type();}
|
||||
int is_button() const {return 1;}
|
||||
int pixmapID() { return 2; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Button_Type();}
|
||||
int is_button() const FL_OVERRIDE {return 1;}
|
||||
int pixmapID() FL_OVERRIDE { return 2; }
|
||||
};
|
||||
static Fl_Button_Type Fl_Button_type;
|
||||
|
||||
|
@ -87,18 +87,18 @@ static Fl_Button_Type Fl_Button_type;
|
|||
#include <FL/Fl_Return_Button.H>
|
||||
class Fl_Return_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
int W = o->h();
|
||||
if (o->w()/3 < W) W = o->w()/3;
|
||||
w += W + 8 - o->labelsize();
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Return_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::ReturnButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Return_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ReturnButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Return_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Return_Button_Type();}
|
||||
int pixmapID() { return 23; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Return_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 23; }
|
||||
};
|
||||
static Fl_Return_Button_Type Fl_Return_Button_type;
|
||||
|
||||
|
@ -107,12 +107,12 @@ static Fl_Return_Button_Type Fl_Return_Button_type;
|
|||
#include <FL/Fl_Repeat_Button.H>
|
||||
class Fl_Repeat_Button_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Repeat_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::RepeatButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Repeat_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::RepeatButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Repeat_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Repeat_Button_Type();}
|
||||
int pixmapID() { return 25; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Repeat_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 25; }
|
||||
};
|
||||
static Fl_Repeat_Button_Type Fl_Repeat_Button_type;
|
||||
|
||||
|
@ -121,16 +121,16 @@ static Fl_Repeat_Button_Type Fl_Repeat_Button_type;
|
|||
#include <FL/Fl_Light_Button.H>
|
||||
class Fl_Light_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Light_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::LightButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Light_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::LightButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Light_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Light_Button_Type();}
|
||||
int pixmapID() { return 24; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Light_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 24; }
|
||||
};
|
||||
static Fl_Light_Button_Type Fl_Light_Button_type;
|
||||
|
||||
|
@ -139,16 +139,16 @@ static Fl_Light_Button_Type Fl_Light_Button_type;
|
|||
#include <FL/Fl_Check_Button.H>
|
||||
class Fl_Check_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Check_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::CheckButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Check_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::CheckButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Check_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Check_Button_Type();}
|
||||
int pixmapID() { return 3; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 3; }
|
||||
};
|
||||
static Fl_Check_Button_Type Fl_Check_Button_type;
|
||||
|
||||
|
@ -157,16 +157,16 @@ static Fl_Check_Button_Type Fl_Check_Button_type;
|
|||
#include <FL/Fl_Round_Button.H>
|
||||
class Fl_Round_Button_Type : public Fl_Button_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Button_Type::ideal_size(w, h);
|
||||
w += 4;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Round_Button";}
|
||||
virtual const char *alt_type_name() {return "fltk::RadioButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Round_Button";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::RadioButton";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Round_Button(x,y,w,h,"button");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Round_Button_Type();}
|
||||
int pixmapID() { return 4; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Round_Button_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 4; }
|
||||
};
|
||||
static Fl_Round_Button_Type Fl_Round_Button_type;
|
||||
|
||||
|
@ -183,10 +183,10 @@ static Fl_Menu_Item browser_type_menu[] = {
|
|||
{"Multi",0,0,(void*)FL_MULTI_BROWSER},
|
||||
{0}};
|
||||
class Fl_Browser_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Browser *myo = (Fl_Browser *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -197,9 +197,9 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Browser";}
|
||||
virtual const char *alt_type_name() {return "fltk::Browser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Browser";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Browser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Browser* b = new Fl_Browser(x,y,w,h);
|
||||
// Fl_Browser::add calls fl_height(), which requires the X display open.
|
||||
// Avoid this when compiling so it works w/o a display:
|
||||
|
@ -212,8 +212,8 @@ public:
|
|||
}
|
||||
return b;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Browser_Type();}
|
||||
int pixmapID() { return 31; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Browser_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 31; }
|
||||
};
|
||||
static Fl_Browser_Type Fl_Browser_type;
|
||||
|
||||
|
@ -230,10 +230,10 @@ int Fl_Browser_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
}
|
||||
|
||||
class Fl_Check_Browser_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Check_Browser *myo = (Fl_Check_Browser *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -244,9 +244,9 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Check_Browser";}
|
||||
virtual const char *alt_type_name() {return "fltk::CheckBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Check_Browser";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::CheckBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Check_Browser* b = new Fl_Check_Browser(x,y,w,h);
|
||||
// Fl_Check_Browser::add calls fl_height(), which requires the X display open.
|
||||
// Avoid this when compiling so it works w/o a display:
|
||||
|
@ -259,8 +259,8 @@ public:
|
|||
}
|
||||
return b;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Check_Browser_Type();}
|
||||
int pixmapID() { return 32; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Check_Browser_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 32; }
|
||||
};
|
||||
static Fl_Check_Browser_Type Fl_Check_Browser_type;
|
||||
|
||||
|
@ -278,13 +278,13 @@ int Fl_Check_Browser_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
class Fl_Tree_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
if (h < 60) h = 60;
|
||||
if (w < 80) w = 80;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Tree";}
|
||||
virtual const char *alt_type_name() {return "fltk::TreeBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Tree";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TreeBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Tree* b = new Fl_Tree(x,y,w,h);
|
||||
if (!batch_mode) {
|
||||
b->add("/A1/B1/C1");
|
||||
|
@ -298,16 +298,16 @@ public:
|
|||
}
|
||||
return b;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Tree_Type();}
|
||||
int pixmapID() { return 50; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Tree_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 50; }
|
||||
};
|
||||
static Fl_Tree_Type Fl_Tree_type;
|
||||
|
||||
class Fl_File_Browser_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return browser_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_File_Browser *myo = (Fl_File_Browser *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -318,9 +318,9 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_File_Browser";}
|
||||
virtual const char *alt_type_name() {return "fltk::FileBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_File_Browser";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::FileBrowser";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_File_Browser* b = new Fl_File_Browser(x,y,w,h);
|
||||
// Fl_File_Browser::add calls fl_height(), which requires the X display open.
|
||||
// Avoid this when compiling so it works w/o a display:
|
||||
|
@ -329,8 +329,8 @@ public:
|
|||
}
|
||||
return b;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_File_Browser_Type();}
|
||||
int pixmapID() { return 33; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Browser_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 33; }
|
||||
};
|
||||
static Fl_File_Browser_Type Fl_File_Browser_type;
|
||||
|
||||
|
@ -354,16 +354,16 @@ static Fl_Menu_Item counter_type_menu[] = {
|
|||
{"Simple",0,0,(void*)FL_SIMPLE_COUNTER},
|
||||
{0}};
|
||||
class Fl_Counter_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return counter_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int is_valuator() const {return 1;}
|
||||
int pixmapID() { return 41; }
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return counter_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
int pixmapID() FL_OVERRIDE { return 41; }
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Counter";}
|
||||
virtual const char *alt_type_name() {return "fltk::Counter";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Counter";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Counter";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Counter(x,y,w,h,"counter:");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Counter_Type();}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Counter_Type();}
|
||||
};
|
||||
static Fl_Counter_Type Fl_Counter_type;
|
||||
|
||||
|
@ -387,11 +387,11 @@ static Fl_Menu_Item spinner_type_menu[] = {
|
|||
{"Float", 0,0,(void*)FL_FLOAT_INPUT},
|
||||
{0}};
|
||||
class Fl_Spinner_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return spinner_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int pixmapID() { return 47; }
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return spinner_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
int pixmapID() FL_OVERRIDE { return 47; }
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Spinner *myo = (Fl_Spinner *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -401,13 +401,13 @@ public:
|
|||
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box()) + h / 2;
|
||||
if (w < 40) w = 40 ;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Spinner";}
|
||||
virtual const char *alt_type_name() {return "fltk::Spinner";}
|
||||
int is_spinner() const { return 1; }
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Spinner";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Spinner";}
|
||||
int is_spinner() const FL_OVERRIDE { return 1; }
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Spinner(x,y,w,h,"spinner:");
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Spinner_Type();}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Spinner_Type();}
|
||||
};
|
||||
static Fl_Spinner_Type Fl_Spinner_type;
|
||||
|
||||
|
@ -434,10 +434,10 @@ static Fl_Menu_Item input_type_menu[] = {
|
|||
{"Float",0,0,(void*)FL_FLOAT_INPUT},
|
||||
{0}};
|
||||
class Fl_Input_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return input_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return input_type_menu;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Input *myo = (Fl_Input *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -447,17 +447,17 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < 15) w = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Input";}
|
||||
virtual const char *alt_type_name() {return "fltk::Input";}
|
||||
int is_input() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Input";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Input";}
|
||||
int is_input() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Input *myo = new Fl_Input(x,y,w,h,"input:");
|
||||
myo->value("Text Input");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Input_Type();}
|
||||
int pixmapID() { return 14; }
|
||||
virtual void copy_properties() {
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Input_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 14; }
|
||||
void copy_properties() FL_OVERRIDE {
|
||||
Fl_Widget_Type::copy_properties();
|
||||
Fl_Input_ *d = (Fl_Input_*)live_widget, *s = (Fl_Input_*)o;
|
||||
d->textfont(s->textfont());
|
||||
|
@ -484,10 +484,10 @@ int Fl_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
#include <FL/Fl_File_Input.H>
|
||||
class Fl_File_Input_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return 0;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return 0;}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_File_Input *myo = (Fl_File_Input *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() + 4;
|
||||
|
@ -497,16 +497,16 @@ public:
|
|||
if (h < 20) h = 20;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_File_Input";}
|
||||
virtual const char *alt_type_name() {return "fltk::FileInput";}
|
||||
int is_input() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_File_Input";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::FileInput";}
|
||||
int is_input() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_File_Input *myo = new Fl_File_Input(x,y,w,h,"file:");
|
||||
myo->value("/now/is/the/time/for/a/filename.ext");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_File_Input_Type();}
|
||||
int pixmapID() { return 30; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_File_Input_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 30; }
|
||||
};
|
||||
static Fl_File_Input_Type Fl_File_Input_type;
|
||||
|
||||
|
@ -526,9 +526,9 @@ int Fl_File_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
class Fl_Text_Display_Type : public Fl_Widget_Type {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Text_Display *myo = (Fl_Text_Display *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -539,15 +539,15 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Text_Display";}
|
||||
virtual const char *alt_type_name() {return "fltk::TextDisplay";}
|
||||
int is_text_display() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Text_Display";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TextDisplay";}
|
||||
int is_text_display() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Text_Display *myo = new Fl_Text_Display(x,y,w,h);
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Text_Display_Type();}
|
||||
int pixmapID() { return 28; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Display_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 28; }
|
||||
};
|
||||
static Fl_Text_Display_Type Fl_Text_Display_type;
|
||||
|
||||
|
@ -567,9 +567,9 @@ int Fl_Text_Display_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
#include <FL/Fl_Text_Editor.H>
|
||||
class Fl_Text_Editor_Type : public Fl_Widget_Type {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Text_Editor *myo = (Fl_Text_Editor *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -580,15 +580,15 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Text_Editor";}
|
||||
virtual const char *alt_type_name() {return "fltk::TextEditor";}
|
||||
int is_text_display() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Text_Editor";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::TextEditor";}
|
||||
int is_text_display() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Text_Editor *myo = new Fl_Text_Editor(x,y,w,h);
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Text_Editor_Type();}
|
||||
int pixmapID() { return 29; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Text_Editor_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 29; }
|
||||
};
|
||||
static Fl_Text_Editor_Type Fl_Text_Editor_type;
|
||||
|
||||
|
@ -609,10 +609,10 @@ int Fl_Text_Editor_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
#include <FL/Fl_Simple_Terminal.H>
|
||||
class Fl_Simple_Terminal_Type : public Fl_Text_Editor_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Simple_Terminal";}
|
||||
virtual const char *alt_type_name() {return "fltk::SimpleTerminal";}
|
||||
int is_text_display() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Simple_Terminal";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::SimpleTerminal";}
|
||||
int is_text_display() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Widget *myo = 0L;
|
||||
if (batch_mode) {
|
||||
// The Fl_Simple_Terminal constructor attaches a buffer which in turn
|
||||
|
@ -624,8 +624,8 @@ public:
|
|||
}
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Simple_Terminal_Type();}
|
||||
int pixmapID() { return 52; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Simple_Terminal_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 52; }
|
||||
};
|
||||
static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type;
|
||||
|
||||
|
@ -634,12 +634,12 @@ static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type;
|
|||
#include <FL/Fl_Clock.H>
|
||||
class Fl_Clock_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Clock";}
|
||||
virtual const char *alt_type_name() {return "fltk::Clock";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Clock";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Clock";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Clock(x,y,w,h);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Clock_Type();}
|
||||
int pixmapID() { return 34; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Clock_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 34; }
|
||||
};
|
||||
static Fl_Clock_Type Fl_Clock_type;
|
||||
|
||||
|
@ -648,7 +648,7 @@ static Fl_Clock_Type Fl_Clock_type;
|
|||
#include <FL/Fl_Help_View.H>
|
||||
class Fl_Help_View_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Help_View *myo = (Fl_Help_View *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h -= Fl::box_dh(o->box());
|
||||
|
@ -659,17 +659,17 @@ public:
|
|||
if (h < 30) h = 30;
|
||||
if (w < 50) w = 50;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Help_View";}
|
||||
virtual const char *alt_type_name() {return "fltk::HelpView";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Help_View";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::HelpView";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Help_View *myo = new Fl_Help_View(x,y,w,h);
|
||||
if (!batch_mode) {
|
||||
myo->value("<HTML><BODY><H1>Fl_Help_View Widget</H1>"
|
||||
"<P>This is a Fl_Help_View widget.</P></BODY></HTML>");
|
||||
}
|
||||
return myo;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Help_View_Type();}
|
||||
int pixmapID() { return 35; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Help_View_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 35; }
|
||||
};
|
||||
static Fl_Help_View_Type Fl_Help_View_type;
|
||||
|
||||
|
@ -678,14 +678,14 @@ static Fl_Help_View_Type Fl_Help_View_type;
|
|||
#include <FL/Fl_Progress.H>
|
||||
class Fl_Progress_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Progress";}
|
||||
virtual const char *alt_type_name() {return "fltk::ProgressBar";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Progress";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ProgressBar";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Progress *myo = new Fl_Progress(x,y,w,h,"label");
|
||||
myo->value(50);
|
||||
return myo;}
|
||||
Fl_Widget_Type *_make() {return new Fl_Progress_Type();}
|
||||
int pixmapID() { return 36; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Progress_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 36; }
|
||||
};
|
||||
static Fl_Progress_Type Fl_Progress_type;
|
||||
|
||||
|
@ -693,14 +693,14 @@ static Fl_Progress_Type Fl_Progress_type;
|
|||
|
||||
#include <FL/Fl_Adjuster.H>
|
||||
class Fl_Adjuster_Type : public Fl_Widget_Type {
|
||||
int is_valuator() const {return 1;}
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Adjuster";}
|
||||
virtual const char *alt_type_name() {return "fltk::Adjuster";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Adjuster";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Adjuster";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Adjuster(x,y,w,h);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Adjuster_Type();}
|
||||
int pixmapID() { return 40; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Adjuster_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 40; }
|
||||
};
|
||||
static Fl_Adjuster_Type Fl_Adjuster_type;
|
||||
|
||||
|
@ -713,15 +713,15 @@ static Fl_Menu_Item dial_type_menu[] = {
|
|||
{"Fill",0,0,(void*)FL_FILL_DIAL},
|
||||
{0}};
|
||||
class Fl_Dial_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return dial_type_menu;}
|
||||
int is_valuator() const {return 1;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return dial_type_menu;}
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Dial";}
|
||||
virtual const char *alt_type_name() {return "fltk::Dial";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Dial";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Dial";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Dial(x,y,w,h);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Dial_Type();}
|
||||
int pixmapID() { return 42; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Dial_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 42; }
|
||||
};
|
||||
static Fl_Dial_Type Fl_Dial_type;
|
||||
|
||||
|
@ -733,15 +733,15 @@ static Fl_Menu_Item roller_type_menu[] = {
|
|||
{"Horizontal",0,0,(void*)FL_HORIZONTAL},
|
||||
{0}};
|
||||
class Fl_Roller_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return roller_type_menu;}
|
||||
int is_valuator() const {return 1;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return roller_type_menu;}
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Roller";}
|
||||
virtual const char *alt_type_name() {return "fltk::Roller";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Roller";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Roller";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Roller(x,y,w,h);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Roller_Type();}
|
||||
int pixmapID() { return 43; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Roller_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 43; }
|
||||
};
|
||||
static Fl_Roller_Type Fl_Roller_type;
|
||||
|
||||
|
@ -757,15 +757,15 @@ static Fl_Menu_Item slider_type_menu[] = {
|
|||
{"Horz Knob",0,0,(void*)FL_HOR_NICE_SLIDER},
|
||||
{0}};
|
||||
class Fl_Slider_Type : public Fl_Widget_Type {
|
||||
Fl_Menu_Item *subtypes() {return slider_type_menu;}
|
||||
int is_valuator() const {return 2;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return slider_type_menu;}
|
||||
int is_valuator() const FL_OVERRIDE {return 2;}
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Slider";}
|
||||
virtual const char *alt_type_name() {return "fltk::Slider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Slider";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Slider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Slider(x,y,w,h,"slider:");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Slider_Type();}
|
||||
int pixmapID() { return 37; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Slider_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 37; }
|
||||
};
|
||||
static Fl_Slider_Type Fl_Slider_type;
|
||||
|
||||
|
@ -774,15 +774,15 @@ static Fl_Menu_Item scrollbar_type_menu[] = {
|
|||
{"Horizontal",0,0,(void*)FL_HOR_SLIDER},
|
||||
{0}};
|
||||
class Fl_Scrollbar_Type : public Fl_Slider_Type {
|
||||
Fl_Menu_Item *subtypes() {return scrollbar_type_menu;}
|
||||
int is_valuator() const {return 3;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return scrollbar_type_menu;}
|
||||
int is_valuator() const FL_OVERRIDE {return 3;}
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Scrollbar";}
|
||||
virtual const char *alt_type_name() {return "fltk::Scrollbar";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Scrollbar";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Scrollbar";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Scrollbar(x,y,w,h);}
|
||||
Fl_Widget_Type *_make() {return new Fl_Scrollbar_Type();}
|
||||
int pixmapID() { return 38; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Scrollbar_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 38; }
|
||||
};
|
||||
static Fl_Scrollbar_Type Fl_Scrollbar_type;
|
||||
|
||||
|
@ -794,9 +794,9 @@ static Fl_Menu_Item output_type_menu[] = {
|
|||
{"Multiline",0,0,(void*)FL_MULTILINE_OUTPUT},
|
||||
{0}};
|
||||
class Fl_Output_Type : public Fl_Input_Type {
|
||||
Fl_Menu_Item *subtypes() {return output_type_menu;}
|
||||
Fl_Menu_Item *subtypes() FL_OVERRIDE {return output_type_menu;}
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Output *myo = (Fl_Output *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -806,15 +806,15 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < 15) w = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Output";}
|
||||
virtual const char *alt_type_name() {return "fltk::Output";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Output";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::Output";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Output *myo = new Fl_Output(x,y,w,h,"output:");
|
||||
myo->value("Text Output");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Output_Type();}
|
||||
int pixmapID() { return 27; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Output_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 27; }
|
||||
};
|
||||
static Fl_Output_Type Fl_Output_type;
|
||||
|
||||
|
@ -823,7 +823,7 @@ static Fl_Output_Type Fl_Output_type;
|
|||
#include <FL/Fl_Value_Input.H>
|
||||
class Fl_Value_Input_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Value_Input *myo = (Fl_Value_Input *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -833,17 +833,17 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < 15) w = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Value_Input";}
|
||||
virtual const char *alt_type_name() {return "fltk::ValueInput";}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int is_valuator() const {return 1;}
|
||||
int is_value_input() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Value_Input";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueInput";}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
int is_value_input() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Value_Input *myo = new Fl_Value_Input(x,y,w,h,"value:");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Value_Input_Type();}
|
||||
int pixmapID() { return 44; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Input_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 44; }
|
||||
};
|
||||
static Fl_Value_Input_Type Fl_Value_Input_type;
|
||||
|
||||
|
@ -864,7 +864,7 @@ int Fl_Value_Input_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
#include <FL/Fl_Value_Output.H>
|
||||
class Fl_Value_Output_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
virtual void ideal_size(int &w, int &h) {
|
||||
void ideal_size(int &w, int &h) FL_OVERRIDE {
|
||||
Fl_Value_Output *myo = (Fl_Value_Output *)o;
|
||||
fl_font(myo->textfont(), myo->textsize());
|
||||
h = fl_height() + myo->textsize() - 6;
|
||||
|
@ -874,16 +874,16 @@ public:
|
|||
if (h < 15) h = 15;
|
||||
if (w < 15) w = 15;
|
||||
}
|
||||
virtual const char *type_name() {return "Fl_Value_Output";}
|
||||
virtual const char *alt_type_name() {return "fltk::ValueOutput";}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int is_valuator() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Value_Output";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueOutput";}
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
int is_valuator() const FL_OVERRIDE {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
Fl_Value_Output *myo = new Fl_Value_Output(x,y,w,h,"value:");
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Value_Output_Type();}
|
||||
int pixmapID() { return 45; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Output_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 45; }
|
||||
};
|
||||
static Fl_Value_Output_Type Fl_Value_Output_type;
|
||||
|
||||
|
@ -903,14 +903,14 @@ int Fl_Value_Output_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
#include <FL/Fl_Value_Slider.H>
|
||||
class Fl_Value_Slider_Type : public Fl_Slider_Type {
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c);
|
||||
int textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) FL_OVERRIDE;
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Value_Slider";}
|
||||
virtual const char *alt_type_name() {return "fltk::ValueSlider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
const char *type_name() FL_OVERRIDE {return "Fl_Value_Slider";}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::ValueSlider";}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) FL_OVERRIDE {
|
||||
return new Fl_Value_Slider(x,y,w,h,"slider:");}
|
||||
Fl_Widget_Type *_make() {return new Fl_Value_Slider_Type();}
|
||||
int pixmapID() { return 39; }
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE {return new Fl_Value_Slider_Type();}
|
||||
int pixmapID() FL_OVERRIDE { return 39; }
|
||||
};
|
||||
static Fl_Value_Slider_Type Fl_Value_Slider_type;
|
||||
|
||||
|
|
|
@ -45,19 +45,19 @@ class Widget_Browser : public Fl_Browser_
|
|||
int saved_v_scroll_;
|
||||
|
||||
// required routines for Fl_Browser_ subclass:
|
||||
void *item_first() const ;
|
||||
void *item_next(void *) const ;
|
||||
void *item_prev(void *) const ;
|
||||
int item_selected(void *) const ;
|
||||
void item_select(void *,int);
|
||||
int item_width(void *) const ;
|
||||
int item_height(void *) const ;
|
||||
void item_draw(void *,int,int,int,int) const ;
|
||||
int incr_height() const ;
|
||||
void *item_first() const FL_OVERRIDE;
|
||||
void *item_next(void *) const FL_OVERRIDE;
|
||||
void *item_prev(void *) const FL_OVERRIDE;
|
||||
int item_selected(void *) const FL_OVERRIDE;
|
||||
void item_select(void *,int) FL_OVERRIDE;
|
||||
int item_width(void *) const FL_OVERRIDE;
|
||||
int item_height(void *) const FL_OVERRIDE;
|
||||
void item_draw(void *,int,int,int,int) const FL_OVERRIDE;
|
||||
int incr_height() const FL_OVERRIDE;
|
||||
|
||||
public:
|
||||
Widget_Browser(int,int,int,int,const char * =NULL);
|
||||
int handle(int);
|
||||
int handle(int) FL_OVERRIDE;
|
||||
void callback();
|
||||
void save_scroll_position();
|
||||
void restore_scroll_position();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue