mirror of https://github.com/fltk/fltk
Support "using" keyword.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2122 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
47b57655a0
commit
081d369c11
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.2 2002/04/26 11:51:52 easysw Exp $"
|
||||
// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.3 2002/04/28 11:40:25 easysw Exp $"
|
||||
//
|
||||
// C function type code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -463,11 +463,12 @@ Fl_Decl_Type Fl_Decl_type;
|
|||
void Fl_Decl_Type::write_code1() {
|
||||
const char* c = name();
|
||||
if (!c) return;
|
||||
// handle putting #include or extern or typedef into decl:
|
||||
// handle putting #include, extern, using or typedef into decl:
|
||||
if (!isalpha(*c) && *c != '~'
|
||||
|| !strncmp(c,"extern",6) && isspace(c[6])
|
||||
|| !strncmp(c,"class",5) && isspace(c[5])
|
||||
|| !strncmp(c,"typedef",7) && isspace(c[7])
|
||||
|| !strncmp(c,"using",5) && isspace(c[5])
|
||||
// || !strncmp(c,"struct",6) && isspace(c[6])
|
||||
) {
|
||||
if (public_)
|
||||
|
@ -678,5 +679,5 @@ void Fl_Class_Type::write_code2() {
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.2 2002/04/26 11:51:52 easysw Exp $".
|
||||
// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.3 2002/04/28 11:40:25 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.13 2002/04/26 11:51:53 easysw Exp $"
|
||||
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.14 2002/04/28 11:40:25 easysw Exp $"
|
||||
//
|
||||
// Widget type code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -1384,6 +1384,7 @@ int isdeclare(const char *c) {
|
|||
if (*c == '#') return 1;
|
||||
if (!strncmp(c,"extern",6)) return 1;
|
||||
if (!strncmp(c,"typedef",7)) return 1;
|
||||
if (!strncmp(c,"using",5)) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1975,5 +1976,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) {
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.13 2002/04/26 11:51:53 easysw Exp $".
|
||||
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.14 2002/04/28 11:40:25 easysw Exp $".
|
||||
//
|
||||
|
|
|
@ -198,13 +198,13 @@ Fl_Window* make_decl_panel() {
|
|||
o->labelsize(10);
|
||||
o->when(FL_WHEN_NEVER);
|
||||
}
|
||||
{ Fl_Input* o = decl_input = new Fl_Input(10, 40, 270, 25, "Can be any declaration, like \"int x;\",\nan external symbol like \"extern in\
|
||||
t foo();\",\na #directive like \"#include <foo.h>\",\nor a comment like \"//fo\
|
||||
o\" or \"/*foo*/\",\nor typedef like \"typedef char byte;\"");
|
||||
{ Fl_Input* o = decl_input = new Fl_Input(10, 40, 270, 25, "Can be any declaration, like \"int x;\", an external symbol like \"extern int\
|
||||
foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo\" or\
|
||||
\"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list;\".");
|
||||
o->tooltip("Declaration text.");
|
||||
o->labelsize(12);
|
||||
o->textfont(4);
|
||||
o->align(FL_ALIGN_BOTTOM_LEFT);
|
||||
o->align(134);
|
||||
o->when(FL_WHEN_NEVER);
|
||||
Fl_Group::current()->resizable(o);
|
||||
}
|
||||
|
|
|
@ -48,11 +48,11 @@ Function {make_code_panel()} {open
|
|||
tooltip {C/C++ code.} xywh {10 10 525 120} type Multiline labelsize 12 align 0 when 0 textfont 4 resizable
|
||||
}
|
||||
Fl_Return_Button code_panel_ok {
|
||||
label OK selected
|
||||
label OK
|
||||
xywh {370 140 80 25} hotspot
|
||||
}
|
||||
Fl_Button code_panel_cancel {
|
||||
label Cancel selected
|
||||
label Cancel
|
||||
xywh {455 140 80 25} shortcut 0xff1b
|
||||
}
|
||||
}
|
||||
|
@ -123,12 +123,8 @@ Function {make_decl_panel()} {open
|
|||
tooltip {Make the declaration publicly accessible.} xywh {10 10 65 25} labelsize 10 when 0
|
||||
}
|
||||
Fl_Input decl_input {
|
||||
label {Can be any declaration, like "int x;",
|
||||
an external symbol like "extern int foo();",
|
||||
a \#directive like "\#include <foo.h>",
|
||||
or a comment like "//foo" or "/*foo*/",
|
||||
or typedef like "typedef char byte;"}
|
||||
tooltip {Declaration text.} xywh {10 40 270 25} labelsize 12 align 6 when 0 textfont 4 resizable
|
||||
label {Can be any declaration, like "int x;", an external symbol like "extern int foo();", a \#directive like "\#include <foo.h>", a comment like "//foo" or "/*foo*/", or typedef like "typedef char byte;" or "using std::list;".} selected
|
||||
tooltip {Declaration text.} xywh {10 40 270 25} labelsize 12 align 134 when 0 textfont 4 resizable
|
||||
}
|
||||
Fl_Return_Button decl_panel_ok {
|
||||
label OK
|
||||
|
|
Loading…
Reference in New Issue