summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-28 11:40:26 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-28 11:40:26 +0000
commit081d369c114780af58b5be639ff3d431a8602705 (patch)
tree219d241de8df260fcef1bafbb42b6b9b075534cf
parent47b57655a0cf98513de50240fa335d8b46e68b61 (diff)
Support "using" keyword.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2122 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--fluid/Fl_Function_Type.cxx7
-rw-r--r--fluid/Fl_Widget_Type.cxx5
-rw-r--r--fluid/function_panel.cxx8
-rw-r--r--fluid/function_panel.fl12
4 files changed, 15 insertions, 17 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index 64d6dfb08..9927f860e 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/Fl_Function_Type.cxx
@@ -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 $".
//
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 6e294e392..d08da240b 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -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 $".
//
diff --git a/fluid/function_panel.cxx b/fluid/function_panel.cxx
index 0007f6f94..1e6a4d6b0 100644
--- a/fluid/function_panel.cxx
+++ b/fluid/function_panel.cxx
@@ -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);
}
diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl
index 369311164..1a2d1722a 100644
--- a/fluid/function_panel.fl
+++ b/fluid/function_panel.fl
@@ -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