|
|
On 10/1/22 15:12, roger tunnicliffe
wrote:
FL_NORMAL_SIZE = 11;
‘FL_NORMAL_SIZE’ does
not name a type
Make sure you've got:
#include <FL/Fl.H>
..at the top of your program.
Fl_Fontsize FL_NORMAL_SIZE = 11;
Yea, no, don't do that. That just tries to /create/ another
global variable of the
same name as the one in FLTK, and fails at link time with the
conflict.
Here's a complete program showing where you should put what:
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Box.H>
int main(int argc, char **argv) {
FL_NORMAL_SIZE = 20;
Fl_Window *window = new Fl_Window(340, 180);
new Fl_Button(20, 40, 300, 50, "Hello World!");
new Fl_Box( 20, 100, 300, 50, "Some text.");
window->end();
window->show();
return Fl::run();
}
If you change the value for FL_NORMAL_SIZE to something else,
that should affect
the size of all fonts.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d0ebfc20-0954-08b5-f925-9b4c44bfaccb%40seriss.com.
[ Direct Link to Message ] | |
|
| |