mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 10:57:58 +08:00
Remove compiler warnings '-Wextra-semi' (see also PR #266)
I compiled with `-Wextra-semi -Werror=extra-semi` on Linux and Windows (cross-compiled on Linux) and removed all "extra semicolon" warnings I could find. I didn't check on macOS (yet). Note: Linux configured with and w/o Pango but not w/o Xft. Compilation with other options (e.g. Cairo) might still emit such warnings.
This commit is contained in:
+3
-3
@@ -73,19 +73,19 @@ protected:
|
|||||||
/** Constructor that sets the graphics driver to use for the created surface. */
|
/** Constructor that sets the graphics driver to use for the created surface. */
|
||||||
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
|
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver; }
|
||||||
/** Sets the graphics driver of this drawing surface. */
|
/** Sets the graphics driver of this drawing surface. */
|
||||||
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;};
|
inline void driver(Fl_Graphics_Driver *graphics_driver) {pGraphicsDriver = graphics_driver;}
|
||||||
public:
|
public:
|
||||||
virtual void set_current(void);
|
virtual void set_current(void);
|
||||||
virtual bool is_current();
|
virtual bool is_current();
|
||||||
/** \brief Returns the graphics driver of this drawing surface. */
|
/** \brief Returns the graphics driver of this drawing surface. */
|
||||||
inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; };
|
inline Fl_Graphics_Driver *driver() {return pGraphicsDriver; }
|
||||||
/** The current drawing surface.
|
/** The current drawing surface.
|
||||||
In other words, the Fl_Surface_Device object that currently receives all graphics requests.
|
In other words, the Fl_Surface_Device object that currently receives all graphics requests.
|
||||||
\note It's possible to transiently remove the GUI scaling factor in place in the current
|
\note It's possible to transiently remove the GUI scaling factor in place in the current
|
||||||
drawing surface with \ref fl_override_scale(). */
|
drawing surface with \ref fl_override_scale(). */
|
||||||
static inline Fl_Surface_Device *surface() {
|
static inline Fl_Surface_Device *surface() {
|
||||||
return surface_ ? surface_ : default_surface();
|
return surface_ ? surface_ : default_surface();
|
||||||
};
|
}
|
||||||
/** \brief The destructor. */
|
/** \brief The destructor. */
|
||||||
virtual ~Fl_Surface_Device();
|
virtual ~Fl_Surface_Device();
|
||||||
static void push_current(Fl_Surface_Device *new_current);
|
static void push_current(Fl_Surface_Device *new_current);
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ public:
|
|||||||
~Fl_File_Browser();
|
~Fl_File_Browser();
|
||||||
|
|
||||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||||
uchar iconsize() const { return (iconsize_); };
|
uchar iconsize() const { return (iconsize_); }
|
||||||
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
/** Sets or gets the size of the icons. The default size is 20 pixels. */
|
||||||
void iconsize(uchar s) { iconsize_ = s; redraw(); };
|
void iconsize(uchar s) { iconsize_ = s; redraw(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets or gets the filename filter. The pattern matching uses
|
Sets or gets the filename filter. The pattern matching uses
|
||||||
@@ -70,10 +70,10 @@ public:
|
|||||||
the fl_filename_match()
|
the fl_filename_match()
|
||||||
function in FLTK.
|
function in FLTK.
|
||||||
*/
|
*/
|
||||||
const char *filter() const { return (pattern_); };
|
const char *filter() const { return (pattern_); }
|
||||||
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
int load(const char *directory, Fl_File_Sort_F *sort = fl_numericsort);
|
||||||
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); };
|
Fl_Fontsize textsize() const { return Fl_Browser::textsize(); }
|
||||||
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); };
|
void textsize(Fl_Fontsize s) { Fl_Browser::textsize(s); iconsize_ = (uchar)(3 * s / 2); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets or gets the file browser type, FILES or
|
Sets or gets the file browser type, FILES or
|
||||||
@@ -81,14 +81,14 @@ public:
|
|||||||
files and directories are shown. Otherwise only directories are
|
files and directories are shown. Otherwise only directories are
|
||||||
shown.
|
shown.
|
||||||
*/
|
*/
|
||||||
int filetype() const { return (filetype_); };
|
int filetype() const { return (filetype_); }
|
||||||
/**
|
/**
|
||||||
Sets or gets the file browser type, FILES or
|
Sets or gets the file browser type, FILES or
|
||||||
DIRECTORIES. When set to FILES, both
|
DIRECTORIES. When set to FILES, both
|
||||||
files and directories are shown. Otherwise only directories are
|
files and directories are shown. Otherwise only directories are
|
||||||
shown.
|
shown.
|
||||||
*/
|
*/
|
||||||
void filetype(int t) { filetype_ = t; };
|
void filetype(int t) { filetype_ = t; }
|
||||||
void errmsg(const char *emsg);
|
void errmsg(const char *emsg);
|
||||||
/**
|
/**
|
||||||
Returns OS error messages, or NULL if none. Use when advised.
|
Returns OS error messages, or NULL if none. Use when advised.
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public:
|
|||||||
void ok_label(const char *l);
|
void ok_label(const char *l);
|
||||||
const char * ok_label();
|
const char * ok_label();
|
||||||
void preview(int e);
|
void preview(int e);
|
||||||
int preview() const { return previewButton->value(); };
|
int preview() const { return previewButton->value(); }
|
||||||
private:
|
private:
|
||||||
void showHidden(int e);
|
void showHidden(int e);
|
||||||
void remove_hidden_files();
|
void remove_hidden_files();
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
class FL_EXPORT Fl_Paged_Device : public Fl_Widget_Surface {
|
class FL_EXPORT Fl_Paged_Device : public Fl_Widget_Surface {
|
||||||
protected:
|
protected:
|
||||||
/** \brief The constructor */
|
/** \brief The constructor */
|
||||||
Fl_Paged_Device() : Fl_Widget_Surface(NULL) {};
|
Fl_Paged_Device() : Fl_Widget_Surface(NULL) {}
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Possible page formats.
|
Possible page formats.
|
||||||
@@ -99,7 +99,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static const page_format page_formats[NO_PAGE_FORMATS];
|
static const page_format page_formats[NO_PAGE_FORMATS];
|
||||||
/** \brief The destructor */
|
/** \brief The destructor */
|
||||||
virtual ~Fl_Paged_Device() {};
|
virtual ~Fl_Paged_Device() {}
|
||||||
virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL);
|
virtual int begin_job(int pagecount = 0, int *frompage = NULL, int *topage = NULL, char **perr_message = NULL);
|
||||||
/** Synonym of begin_job(int pagecount, int *frompage, int *topage, char **perr_message).
|
/** Synonym of begin_job(int pagecount, int *frompage, int *topage, char **perr_message).
|
||||||
For API compatibility with FLTK 1.3.x */
|
For API compatibility with FLTK 1.3.x */
|
||||||
|
|||||||
+1
-1
@@ -162,7 +162,7 @@ public:
|
|||||||
virtual void color_average(Fl_Color c, float i);
|
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);
|
virtual void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0);
|
||||||
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
|
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
|
||||||
virtual Fl_SVG_Image *as_svg_image() { return this; };
|
virtual Fl_SVG_Image *as_svg_image() { return this; }
|
||||||
virtual void normalize();
|
virtual void normalize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
class clipboard_viewer : public Fl_Tabs { // use tabs to display as appropriate the image or textual content of the clipboard
|
class clipboard_viewer : public Fl_Tabs { // use tabs to display as appropriate the image or textual content of the clipboard
|
||||||
public:
|
public:
|
||||||
clipboard_viewer(int x, int y, int w, int h) : Fl_Tabs(x,y,w,h) {};
|
clipboard_viewer(int x, int y, int w, int h) : Fl_Tabs(x,y,w,h) {}
|
||||||
virtual int handle(int event) {
|
virtual int handle(int event) {
|
||||||
if (event != FL_PASTE) return Fl_Tabs::handle(event);
|
if (event != FL_PASTE) return Fl_Tabs::handle(event);
|
||||||
if (strcmp(Fl::event_clipboard_type(), Fl::clipboard_image) == 0) { // an image is being pasted
|
if (strcmp(Fl::event_clipboard_type(), Fl::clipboard_image) == 0) { // an image is being pasted
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ void cb(Fl_Widget *w, void *) {
|
|||||||
|
|
||||||
class dragbox : public Fl_Box {
|
class dragbox : public Fl_Box {
|
||||||
public:
|
public:
|
||||||
dragbox(int x, int y, int w, int h, const char *t=0) : Fl_Box(x,y,w,h,t) {};
|
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) {
|
||||||
static int fromx, fromy, winx, winy;
|
static int fromx, fromy, winx, winy;
|
||||||
if (event == FL_PUSH) {
|
if (event == FL_PUSH) {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
// Read a 32-bit signed integer, LSB-first
|
// Read a 32-bit signed integer, LSB-first
|
||||||
int read_long() {
|
int read_long() {
|
||||||
return (int)read_dword();
|
return (int)read_dword();
|
||||||
};
|
}
|
||||||
|
|
||||||
// Move the current read position to a byte offset from the beginning
|
// Move the current read position to a byte offset from the beginning
|
||||||
// of the file or the original start address in memory
|
// of the file or the original start address in memory
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ private:
|
|||||||
pair(Fl_GTK_Native_File_Chooser_Driver* c, const char *f) {
|
pair(Fl_GTK_Native_File_Chooser_Driver* c, const char *f) {
|
||||||
running = c;
|
running = c;
|
||||||
filter = fl_strdup(f);
|
filter = fl_strdup(f);
|
||||||
};
|
}
|
||||||
~pair() {
|
~pair() {
|
||||||
free((char*)filter);
|
free((char*)filter);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
GtkWidget *gtkw_ptr; // used to hold a GtkWidget* without pulling GTK into everything...
|
GtkWidget *gtkw_ptr; // used to hold a GtkWidget* without pulling GTK into everything...
|
||||||
void *gtkw_slist; // used to hold a GLib GSList...
|
void *gtkw_slist; // used to hold a GLib GSList...
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
int gap_;
|
int gap_;
|
||||||
int pages_;
|
int pages_;
|
||||||
cairo_t *cr() { return cairo_; }
|
cairo_t *cr() { return cairo_; }
|
||||||
PangoLayout *pango_layout() {return pango_layout_;};
|
PangoLayout *pango_layout() {return pango_layout_;}
|
||||||
|
|
||||||
void check_status(void);
|
void check_status(void);
|
||||||
|
|
||||||
@@ -117,17 +117,17 @@ public:
|
|||||||
void end_line();
|
void end_line();
|
||||||
void end_loop();
|
void end_loop();
|
||||||
void end_polygon();
|
void end_polygon();
|
||||||
void begin_complex_polygon(){begin_polygon();};
|
void begin_complex_polygon() { begin_polygon(); }
|
||||||
void gap(){gap_=1;};
|
void gap() { gap_ = 1; }
|
||||||
void end_complex_polygon(){end_polygon();};
|
void end_complex_polygon() { end_polygon(); }
|
||||||
void transformed_vertex(double x, double y);
|
void transformed_vertex(double x, double y);
|
||||||
|
|
||||||
void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0);
|
void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0);
|
||||||
void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3);
|
void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3);
|
||||||
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1);
|
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1);
|
||||||
|
|
||||||
void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); };
|
void draw(const char* s, int nBytes, int x, int y) { transformed_draw(s,nBytes,x,y); }
|
||||||
void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); };
|
void draw(const char* s, int nBytes, float x, float y) { transformed_draw(s,nBytes,x,y); }
|
||||||
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);
|
||||||
void rtl_draw(const char* s, int n, int x, int y);
|
void rtl_draw(const char* s, int n, int x, int y);
|
||||||
void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy);
|
void draw_pixmap(Fl_Pixmap * pxm,int XP, int YP, int WP, int HP, int cx, int cy);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
int descent();
|
int descent();
|
||||||
// ---
|
// ---
|
||||||
Fl_Bitmask create_bitmask(int w, int h, const uchar *array) { return 0L; }
|
Fl_Bitmask create_bitmask(int w, int h, const uchar *array) { return 0L; }
|
||||||
void delete_bitmask(Fl_Bitmask bm) { };
|
void delete_bitmask(Fl_Bitmask bm) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FL_OPENGL_GRAPHICS_DRIVER_H
|
#endif // FL_OPENGL_GRAPHICS_DRIVER_H
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ public:
|
|||||||
|
|
||||||
Fl_PostScript_Graphics_Driver();
|
Fl_PostScript_Graphics_Driver();
|
||||||
~Fl_PostScript_Graphics_Driver();
|
~Fl_PostScript_Graphics_Driver();
|
||||||
void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;};
|
void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;}
|
||||||
FILE * file() {return output;};
|
FILE * file() {return output;}
|
||||||
void page(double pw, double ph, int media = 0);
|
void page(double pw, double ph, int media = 0);
|
||||||
void page(int format);
|
void page(int format);
|
||||||
int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout);
|
int start_postscript (int pagecount, enum Fl_Paged_Device::Page_Format format, enum Fl_Paged_Device::Page_Layout layout);
|
||||||
@@ -112,7 +112,7 @@ public:
|
|||||||
int my; // mask lines
|
int my; // mask lines
|
||||||
int page_policy_;
|
int page_policy_;
|
||||||
void page_policy(int p);
|
void page_policy(int p);
|
||||||
int page_policy(){return page_policy_;};
|
int page_policy() { return page_policy_; }
|
||||||
int alpha_mask(const uchar * data, int w, int h, int D, int LD=0);
|
int alpha_mask(const uchar * data, int w, int h, int D, int LD=0);
|
||||||
/** Shields output PostScript data from modifications of the current locale.
|
/** Shields output PostScript data from modifications of the current locale.
|
||||||
It typically avoids PostScript errors caused if the current locale uses comma instead of dot
|
It typically avoids PostScript errors caused if the current locale uses comma instead of dot
|
||||||
@@ -154,11 +154,11 @@ public:
|
|||||||
enum Fl_Paged_Device::Page_Format page_format_;
|
enum Fl_Paged_Device::Page_Format page_format_;
|
||||||
char *ps_filename_;
|
char *ps_filename_;
|
||||||
|
|
||||||
void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;};
|
void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;}
|
||||||
FILE * file() {return output;};
|
FILE * file() {return output;}
|
||||||
//void orientation (int o);
|
//void orientation (int o);
|
||||||
//Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor
|
//Fl_PostScript_Graphics_Driver(FILE *o, int lang_level, int pages = 0); // ps (also multi-page) constructor
|
||||||
//void interpolate(int i){interpolate_=i;};
|
//void interpolate(int i){interpolate_=i;}
|
||||||
//int interpolate(){return interpolate_;}
|
//int interpolate(){return interpolate_;}
|
||||||
|
|
||||||
void page(double pw, double ph, int media = 0);
|
void page(double pw, double ph, int media = 0);
|
||||||
@@ -211,9 +211,9 @@ public:
|
|||||||
void end_line();
|
void end_line();
|
||||||
void end_loop();
|
void end_loop();
|
||||||
void end_polygon();
|
void end_polygon();
|
||||||
void begin_complex_polygon(){begin_polygon();};
|
void begin_complex_polygon(){begin_polygon();}
|
||||||
void gap(){gap_=1;};
|
void gap(){gap_=1;}
|
||||||
void end_complex_polygon(){end_polygon();};
|
void end_complex_polygon(){end_polygon();}
|
||||||
void transformed_vertex(double x, double y);
|
void transformed_vertex(double x, double y);
|
||||||
|
|
||||||
void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0);
|
void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0);
|
||||||
@@ -221,8 +221,8 @@ public:
|
|||||||
void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3);
|
void draw_image(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=3);
|
||||||
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1);
|
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1);
|
||||||
|
|
||||||
void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); };
|
void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); }
|
||||||
void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); };
|
void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); }
|
||||||
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);
|
||||||
void rtl_draw(const char* s, int n, int x, int y);
|
void rtl_draw(const char* s, int n, int x, int y);
|
||||||
void font(int face, int size);
|
void font(int face, int size);
|
||||||
|
|||||||
+1
-1
@@ -273,7 +273,7 @@ private:
|
|||||||
int already_known(const char *str, int n);
|
int already_known(const char *str, int n);
|
||||||
public:
|
public:
|
||||||
gl_texture_fifo(int max = 100); // 100 = default height of texture pile
|
gl_texture_fifo(int max = 100); // 100 = default height of texture pile
|
||||||
inline int size(void) {return size_; };
|
inline int size(void) {return size_; }
|
||||||
~gl_texture_fifo(void);
|
~gl_texture_fifo(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ static const int inactive = 0; // deactivate boxes and use green background
|
|||||||
|
|
||||||
class BoxGroup : public Fl_Group {
|
class BoxGroup : public Fl_Group {
|
||||||
public:
|
public:
|
||||||
BoxGroup(int x, int y, int w, int h) : Fl_Group(x,y,w,h) {};
|
BoxGroup(int x, int y, int w, int h) : Fl_Group(x,y,w,h) {}
|
||||||
void draw() {
|
void draw() {
|
||||||
draw_box();
|
draw_box();
|
||||||
if (outline + box_bg) { // outline or box_bg or both
|
if (outline + box_bg) { // outline or box_bg or both
|
||||||
|
|||||||
+19
-19
@@ -61,12 +61,12 @@ public:
|
|||||||
MyWidget(int x, int y):Fl_Box(x,y,100,100, "Clipping and rect(f):\nYellow rect.framed\nby B-Y-G-R rect. 1 p.\nthick. Your printer may \nrender very thin lines\nsurrounding \"X\""){
|
MyWidget(int x, int y):Fl_Box(x,y,100,100, "Clipping and rect(f):\nYellow rect.framed\nby B-Y-G-R rect. 1 p.\nthick. Your printer may \nrender very thin lines\nsurrounding \"X\""){
|
||||||
align(FL_ALIGN_TOP);
|
align(FL_ALIGN_TOP);
|
||||||
labelsize(10);
|
labelsize(10);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyWidget2: public Fl_Box{
|
class MyWidget2: public Fl_Box {
|
||||||
protected:
|
protected:
|
||||||
void draw(){
|
void draw() {
|
||||||
Fl_Box::draw();
|
Fl_Box::draw();
|
||||||
int d;
|
int d;
|
||||||
// fl_line_style(0);
|
// fl_line_style(0);
|
||||||
@@ -160,18 +160,18 @@ protected:
|
|||||||
fl_line(x()+61,y()+65, x()+59, y()+63);
|
fl_line(x()+61,y()+65, x()+59, y()+63);
|
||||||
|
|
||||||
fl_color(FL_BLACK);
|
fl_color(FL_BLACK);
|
||||||
};
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MyWidget2(int x, int y):Fl_Box(x,y,100,100, "Integer primitives"){
|
MyWidget2(int x, int y):Fl_Box(x,y,100,100, "Integer primitives") {
|
||||||
labelsize(10);
|
labelsize(10);
|
||||||
align(FL_ALIGN_TOP);
|
align(FL_ALIGN_TOP);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyWidget3: public Fl_Box{
|
class MyWidget3: public Fl_Box {
|
||||||
protected:
|
protected:
|
||||||
void draw(){
|
void draw() {
|
||||||
Fl_Box::draw();
|
Fl_Box::draw();
|
||||||
double d;
|
double d;
|
||||||
// fl_line_style(0);
|
// fl_line_style(0);
|
||||||
@@ -193,12 +193,12 @@ protected:
|
|||||||
}
|
}
|
||||||
fl_pop_clip();
|
fl_pop_clip();
|
||||||
|
|
||||||
};
|
}
|
||||||
public:
|
public:
|
||||||
MyWidget3(int x, int y):Fl_Box(x,y,100,100, "Sub-pixel drawing of\nlines 1.63 points apart\nOn the screen you\ncan see aliasing, the\nprinter should render\nthem properly"){
|
MyWidget3(int x, int y):Fl_Box(x,y,100,100, "Sub-pixel drawing of\nlines 1.63 points apart\nOn the screen you\ncan see aliasing, the\nprinter should render\nthem properly") {
|
||||||
labelsize(10);
|
labelsize(10);
|
||||||
align(FL_ALIGN_TOP);
|
align(FL_ALIGN_TOP);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyWidget4: public Fl_Box{
|
class MyWidget4: public Fl_Box{
|
||||||
@@ -355,15 +355,15 @@ protected:
|
|||||||
fl_pop_matrix();
|
fl_pop_matrix();
|
||||||
|
|
||||||
fl_color(FL_BLACK);
|
fl_color(FL_BLACK);
|
||||||
};
|
}
|
||||||
public:
|
public:
|
||||||
MyWidget4(int x, int y):Fl_Box(x,y+10,150,150, "Line styles"){
|
MyWidget4(int x, int y):Fl_Box(x,y+10,150,150, "Line styles"){
|
||||||
labelsize(10);
|
labelsize(10);
|
||||||
align(FL_ALIGN_TOP);
|
align(FL_ALIGN_TOP);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyWidget5: public Fl_Box{
|
class MyWidget5: public Fl_Box {
|
||||||
protected:
|
protected:
|
||||||
void draw(){
|
void draw(){
|
||||||
Fl_Box::draw();
|
Fl_Box::draw();
|
||||||
@@ -430,12 +430,12 @@ protected:
|
|||||||
fl_end_complex_polygon();
|
fl_end_complex_polygon();
|
||||||
|
|
||||||
fl_pop_matrix();
|
fl_pop_matrix();
|
||||||
};
|
}
|
||||||
public:
|
public:
|
||||||
MyWidget5(int x, int y):Fl_Box(x,y,230,250, "Complex (double) drawings:\nBlue ellipse may not be\ncorrectly transformed\ndue to non-orthogonal\ntransformation"){
|
MyWidget5(int x, int y):Fl_Box(x,y,230,250, "Complex (double) drawings:\nBlue ellipse may not be\ncorrectly transformed\ndue to non-orthogonal\ntransformation"){
|
||||||
labelsize(10);
|
labelsize(10);
|
||||||
align(FL_ALIGN_TOP);
|
align(FL_ALIGN_TOP);
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
uchar *image;
|
uchar *image;
|
||||||
@@ -604,9 +604,9 @@ void copy(Fl_Widget *, void *data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class My_Button:public Fl_Button{
|
class My_Button:public Fl_Button {
|
||||||
protected:
|
protected:
|
||||||
void draw(){
|
void draw() {
|
||||||
if (type() == FL_HIDDEN_BUTTON) return;
|
if (type() == FL_HIDDEN_BUTTON) return;
|
||||||
Fl_Color col = value() ? selection_color() : color();
|
Fl_Color col = value() ? selection_color() : color();
|
||||||
draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col);
|
draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col);
|
||||||
@@ -617,7 +617,7 @@ protected:
|
|||||||
fl_line_style(0);
|
fl_line_style(0);
|
||||||
draw_label();
|
draw_label();
|
||||||
|
|
||||||
};
|
}
|
||||||
public:
|
public:
|
||||||
My_Button(int x, int y, int w, int h, const char * label = 0):Fl_Button(x,y,w,h,label){}
|
My_Button(int x, int y, int w, int h, const char * label = 0):Fl_Button(x,y,w,h,label){}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -97,9 +97,9 @@ class Rotated_Label_Box : public Fl_Widget{
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Rotated_Label_Box(int X, int Y, int W, int H, const char*L=0):
|
Rotated_Label_Box(int X, int Y, int W, int H, const char*L=0):
|
||||||
Fl_Widget(X,Y,W,H,L),rt_angle(0),rt_align((Fl_Align)0){
|
Fl_Widget(X,Y,W,H,L),rt_angle(0),rt_align((Fl_Align)0) {
|
||||||
rt_text=input->value();
|
rt_text=input->value();
|
||||||
};
|
}
|
||||||
int rt_angle;
|
int rt_angle;
|
||||||
const char* rt_text;
|
const char* rt_text;
|
||||||
Fl_Align rt_align;
|
Fl_Align rt_align;
|
||||||
|
|||||||
+1
-1
@@ -480,7 +480,7 @@ void box_cb(Fl_Widget* o, void*) {
|
|||||||
class right_left_input : public Fl_Input
|
class right_left_input : public Fl_Input
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
right_left_input (int x, int y, int w, int h) : Fl_Input(x, y, w, h) {};
|
right_left_input (int x, int y, int w, int h) : Fl_Input(x, y, w, h) {}
|
||||||
void draw() {
|
void draw() {
|
||||||
if (type() == FL_HIDDEN_INPUT) return;
|
if (type() == FL_HIDDEN_INPUT) return;
|
||||||
Fl_Boxtype b = box();
|
Fl_Boxtype b = box();
|
||||||
|
|||||||
Reference in New Issue
Block a user