| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #2017
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fix for clip_children in Fl_Group.H |
Version: | 1.1.9 |
Created By: | markcw |
Assigned To: | AlbrechtS |
Fix Version: | 1.1.10 (SVN: v6468) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | markcw 15:48 Aug 03, 2008 |
| A fix added to Fl_Group.H not by me but by Sebastian Hollington. It makes the two clip_children functions public instead of protected to remove a compile error.
The relevant lines are shown below and the modified Fl_Group.H is attached.
// Line 53 in Fl_Group class void clip_children(int c) { if (c) set_flag(CLIP_CHILDREN); else clear_flag(CLIP_CHILDREN); } int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
I have tested this fix with the following code in Ubuntu 8.04 but it should apply to all OS's.
// "clip_children.cxx"
#include <FL/Fl.H> #include <FL/Fl_Double_Window.H> #include <FL/Fl_Box.H> #include <FL/fl_draw.H>
class Application : public Fl_Double_Window { Fl_Box *bx; // Child box widget
public: Application(int w, int h, const char *l, int argc, char *argv[]); };
Application::Application(int w, int h, const char *l, int argc, char *argv[]) : Fl_Double_Window(w, h, l) {
box(FL_DOWN_BOX); // Add 2 pixels border color(FL_WHITE);
begin(); bx = new Fl_Box(0,0,100, 400); bx->box(FL_FLAT_BOX); bx->color((Fl_Color) FL_RED); end();
resizable(this); show(argc, argv); }
int main (int argc, char ** argv) { Application myApp(500, 300, "My App", argc, argv);
// Fl_Group.H:53: error: ‘void Fl_Group::clip_children(int)’ is protected myApp.clip_children(true);
return(Fl::run()); } | |
|
#2 | AlbrechtS 00:09 Oct 19, 2008 |
| I think that both clip_children() methods should even be public, because they belong to the public interface of Fl_Group.
Any chance that this change breaks binary compatibility?
If not, I'd like to do the update for FLTK 1.1 and FLTK 1.3 as well.
Comments, please...
Albrecht | |
|
#3 | matt 01:26 Oct 19, 2008 |
| I think that is fine. None of the compilers I know encodes "public" in the ABI. | |
|
#4 | AlbrechtS 02:50 Oct 19, 2008 |
| okay, I'll fix this for 1.1.10 and 1.3.0 | |
|
#5 | AlbrechtS 03:37 Oct 19, 2008 |
| Fixed in Subversion repository.
Fixed for FLTK 1.3 as well (svn -r 6467). | |
[ Return to Bugs & Features ]
|
| |