fltk
1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Fossies Dox: fltk-1.3.5-source.tar.bz2 ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 26 #include "../src/flstring.h" 38 if (!s) {
fout = stdout;
return 1;}
61 if (!w || !*w) {fprintf(
fout,
"{}");
return;}
65 if (!*
p) {fprintf(
fout,
"%s",w);
return;}
68 for (
p = w; *
p;
p++) {
70 else if (*
p ==
'}') {n--;
if (n<0)
break;}
72 int mismatched = (n != 0);
79 if (!mismatched)
break;
95 va_start(args, format);
97 vfprintf(
fout, format, args);
99 needspace = !isspace(format[strlen(format)-1] & 255);
105 while (n--) {fputc(
' ',
fout); fputc(
' ',
fout);}
132 if (!s) {
fin = stdin;
fname =
"stdin";
return 1;}
153 va_start(args, format);
160 vfprintf(stderr, format, args);
161 fprintf(stderr,
"\n");
167 if (isdigit(
x))
return x-
'0';
168 if (isupper(
x))
return x-
'A'+10;
169 if (islower(
x))
return x-
'a'+10;
176 switch(c = fgetc(
fin)) {
177 case '\n':
lineno++;
return -1;
178 case 'a' :
return(
'\a');
179 case 'b' :
return(
'\b');
180 case 'f' :
return(
'\f');
181 case 'n' :
return(
'\n');
182 case 'r' :
return(
'\r');
183 case 't' :
return(
'\t');
184 case 'v' :
return(
'\v');
186 for (c=
x=0;
x<3;
x++) {
189 if (d > 15) {ungetc(ch,
fin);
break;}
194 if (c<'0' || c>
'7')
break;
196 for (
x=0;
x<2;
x++) {
199 if (d>7) {ungetc(ch,
fin);
break;}
236 if (
x < 0 && feof(
fin)) {
238 }
else if (
x ==
'#') {
239 do x = getc(
fin);
while (
x >= 0 &&
x !=
'\n');
242 }
else if (
x ==
'\n') {
244 }
else if (!isspace(
x & 255)) {
251 if (
x ==
'{' && !wantbrace) {
260 do x = getc(
fin);
while (
x >= 0 &&
x !=
'\n');
263 }
else if (
x ==
'\n')
lineno++;
265 else if (
x ==
'{') nesting++;
266 else if (
x ==
'}') {
if (!nesting--)
break;}
273 }
else if (
x ==
'{' ||
x ==
'}') {
285 else if (
x<0 || isspace(
x & 255) ||
x==
'{' ||
x==
'}' ||
x==
'#')
break;
314 write_string(
"# data file for the Fltk User Interface Designer (fluid)\n" 333 if (!selected_only) {
338 if (!selected_only ||
p->selected) {
342 for (
p =
p->next;
p &&
p->level > q;
p =
p->next) {}
369 if (!strcmp(c,
"}")) {
375 if (!strcmp(c,
"Magic:")) {
380 if (!strcmp(c,
"version")) {
383 if (read_version<=0 || read_version>
double(
FL_VERSION+0.00001))
389 if (!
p && !strcmp(c,
"define_in_struct")) {
397 if (!strcmp(c,
"do_not_include_H_from_C")) {
401 if (!strcmp(c,
"use_FL_COMMAND")) {
405 if (!strcmp(c,
"i18n_type")) {
409 if (!strcmp(c,
"i18n_function")) {
413 if (!strcmp(c,
"i18n_file")) {
417 if (!strcmp(c,
"i18n_set")) {
421 if (!strcmp(c,
"i18n_include")) {
425 if (!strcmp(c,
"i18n_type"))
430 if (!strcmp(c,
"i18n_type"))
435 if (!strcmp(c,
"header_name")) {
441 if (!strcmp(c,
"code_name")) {
447 if (!strcmp(c,
"snap") || !strcmp(c,
"gridx") || !strcmp(c,
"gridy")) {
461 if (strcmp(c,
"{") && t->
is_class()) {
475 if (!cc || !strcmp(cc,
"}"))
break;
519 if (
x < 0 && feof(
fin))
return 0;
520 if (
x ==
'\n') {
length = 0;
continue;}
521 if (!isspace(
x & 255)) {
533 if ((
x < 0 && feof(
fin)) ||
x ==
'\n' || !isspace(
x & 255))
break;
539 else if (
x ==
'\n')
break;
546 value =
buffer+valueoffset;
555 "FL_CHECKBUTTON",
"Fl_Check_Button",
556 "FL_ROUNDBUTTON",
"Fl_Round_Button",
557 "FL_ROUND3DBUTTON",
"Fl_Round_Button",
558 "FL_LIGHTBUTTON",
"Fl_Light_Button",
559 "FL_FRAME",
"Fl_Box",
560 "FL_LABELFRAME",
"Fl_Box",
562 "FL_VALSLIDER",
"Fl_Value_Slider",
563 "FL_MENU",
"Fl_Menu_Button",
575 "12",
"Fl_Light_Button",
577 "23",
"FL_POSITIONER",
578 "13",
"Fl_Round_Button",
582 "24",
"Fl_Value_Slider",
593 t->
name(
"create_the_forms()");
601 if (!strcmp(
name,
"Name")) {
608 }
else if (!strcmp(
name,
"class")) {
610 if (!strcmp(value,
"FL_BEGIN_GROUP")) {
613 }
else if (!strcmp(value,
"FL_END_GROUP")) {
628 printf(
"class %s not found, using Fl_Button\n", value);
635 printf(
"Ignoring \"%s: %s\"\n",
name, value);
virtual const char * title()
void fl_message(const char *,...)
virtual int is_parent() const
void read_error(const char *format,...)
static void expand_buffer(int length)
int read_file(const char *filename, int merge)
const char * i18n_include
FILE * fl_fopen(const char *f, const char *mode)
virtual void add_child(Fl_Type *, Fl_Type *beforethis)
int read_fdesign_line(const char *&name, const char *&value)
virtual int is_class() const
static const char * fname
static const char * filename
void write_string(const char *format,...)
static void read_children(Fl_Type *p, int paste)
static Fl_Group * current()
void write_word(const char *w)
void delete_all(int selected_only)
const char * header_file_name
virtual int is_menu_button() const
static const char * class_matcher[]
virtual void read_property(const char *)
const char * label() const
const char * code_file_name
int open_read(const char *s)
int write_file(const char *filename, int selected_only)
const char * read_word(int wantbrace)
const char * name() const
void selection_changed(Fl_Type *new_current)
const char * i18n_function
static int hexdigit(int x)
int open_write(const char *s)
Fl_Type * Fl_Type_make(const char *tn)