summaryrefslogtreecommitdiff
path: root/fluid/Fl_Function_Type.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-03-11 05:17:12 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-03-11 05:17:12 +0000
commit70ca1d156ba8bb0aa1b3a925b89f935fe4dccfbe (patch)
tree6c01d1849e98d53e54ba99af45425ab5cf3ea62e /fluid/Fl_Function_Type.cxx
parentc5d30baf60c5b8acd81a6fa5dd5ea0b2392de10e (diff)
Fl_Value_Slider::draw_bg() didn't always apply the clipping
rectangle (STR #235) fl_filename_relative() returned the wrong string if the absolute pathname was equal to the current working directory (STR #224) Fl_Help_Dialog didn't correctly restore the scroll position when going forward/back in the link history if the file changed (STR #218) glutGetModifiers() did not mask off extra state bits, confusing some GLUT-based applications (STR #213) Fixed mouse capture problems on MacOS X (STR #209, STR #229) Fl_Sys_Menu_Bar is now built into the library for MacOS X (STR #229) Fl_Menu_ now provides item_pathname() methods to get the "pathname" of a menu item, e.g. "File/Quit" (STR #283) Fl_Text_Display now provides cursor_color() methods to get and set the cursor color (STR #271) Fl_Scroll didn't honor FL_NO_BOX (STR #305) FLUID declaration blocks didn't support public/private definitions (STR #301) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Function_Type.cxx')
-rw-r--r--fluid/Fl_Function_Type.cxx33
1 files changed, 27 insertions, 6 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index d9c0aeeec..79007988f 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.13 2003/08/02 21:17:30 easysw Exp $"
+// "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.14 2004/03/11 05:17:11 easysw Exp $"
//
// C function type code for the Fast Light Tool Kit (FLTK).
//
@@ -433,7 +433,16 @@ void Fl_CodeBlock_Type::write_code2() {
////////////////////////////////////////////////////////////////
-int Fl_Decl_Type::is_public() const {return public_;}
+int Fl_Decl_Type::is_public() const
+{
+ Fl_Type *p = Fl_Type::current;
+ while (p && !p->is_decl_block()) p = p->parent;
+ if(p && p->is_public() && public_)
+ return public_;
+ else if(!p)
+ return public_;
+ return 0;
+}
Fl_Type *Fl_Decl_Type::make() {
Fl_Type *p = Fl_Type::current;
@@ -525,11 +534,14 @@ void Fl_Decl_Type::write_code2() {}
////////////////////////////////////////////////////////////////
+int Fl_DeclBlock_Type::is_public() const {return public_;}
+
Fl_Type *Fl_DeclBlock_Type::make() {
Fl_Type *p = Fl_Type::current;
while (p && !p->is_decl_block()) p = p->parent;
Fl_DeclBlock_Type *o = new Fl_DeclBlock_Type();
o->name("#if 1");
+ o->public_ = 0;
o->after = strdup("#endif");
o->add(p);
o->factory = this;
@@ -538,12 +550,15 @@ Fl_Type *Fl_DeclBlock_Type::make() {
void Fl_DeclBlock_Type::write_properties() {
Fl_Type::write_properties();
+ if (public_) write_string("public");
write_string("after");
write_word(after);
}
void Fl_DeclBlock_Type::read_property(const char *c) {
- if (!strcmp(c,"after")) {
+ if(!strcmp(c,"public")) {
+ public_ = 1;
+ } else if (!strcmp(c,"after")) {
storestring(read_word(),after);
} else {
Fl_Type::read_property(c);
@@ -553,6 +568,7 @@ void Fl_DeclBlock_Type::read_property(const char *c) {
void Fl_DeclBlock_Type::open() {
if (!declblock_panel) make_declblock_panel();
decl_before_input->static_value(name());
+ declblock_public_button->value(public_);
decl_after_input->static_value(after);
declblock_panel->show();
const char* message = 0;
@@ -574,6 +590,7 @@ void Fl_DeclBlock_Type::open() {
message = c_check(c&&c[0]=='#' ? c+1 : c);
if (message) continue;
storestring(c,after);
+ public_ = declblock_public_button->value();
break;
}
BREAK2:
@@ -584,12 +601,16 @@ Fl_DeclBlock_Type Fl_DeclBlock_type;
void Fl_DeclBlock_Type::write_code1() {
const char* c = name();
- if (c) write_c("%s\n", c);
+ if (public_)
+ write_h("%s\n", c);
+ write_c("%s\n", c);
}
void Fl_DeclBlock_Type::write_code2() {
const char* c = after;
- if (c) write_c("%s\n", c);
+ if (public_)
+ write_h("%s\n", c);
+ write_c("%s\n", c);
}
////////////////////////////////////////////////////////////////
@@ -740,5 +761,5 @@ void Fl_Class_Type::write_code2() {
}
//
-// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.13 2003/08/02 21:17:30 easysw Exp $".
+// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.16.2.14 2004/03/11 05:17:11 easysw Exp $".
//