Hello,
I tried generating code from FLUID to use a custom widget.
From internet sources, the custom widget has been specified as in this image.

The resulting code is:
// -------------------------- HEADER ---------------------------------
// generated by Fast Light User Interface Designer (fluid) version 1.0405
#ifndef TestFluidCustomWidget_h
#define TestFluidCustomWidget_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
class Test_UI {
public:
Fl_Double_Window* make_window();
};
#endif
// ---------------------------- CXX -----------------------------------
// generated by Fast Light User Interface Designer (fluid) version 1.0405
#include "TestFluidCustomWidget.h"
Fl_Double_Window* Test_UI::make_window() {
Fl_Double_Window* w;
{ Fl_Double_Window* o = new Fl_Double_Window(480, 320);
w = o; (void)w;
o->user_data((void*)(this));
{ TestWidget* o = new TestWidget(25, 25, 64, 22, "Button");
o->box(FL_UP_BOX);
o->color(FL_BACKGROUND_COLOR);
o->selection_color(FL_BACKGROUND_COLOR);
o->labeltype(FL_NORMAL_LABEL);
o->labelfont(0);
o->labelsize(14);
o->labelcolor(FL_FOREGROUND_COLOR);
o->align(Fl_Align(FL_ALIGN_CENTER));
o->when(FL_WHEN_RELEASE);
TestWidget.h
} // TestWidget* o
o->end();
} // Fl_Double_Window* o
return w;
}
The line "TestWidget.h" should probably have been an include in the header file.
As such, nothing builds; it succeeds if this line is removed and
#include "TestWidget.h"is added to the header file. It gets obviously overwritten the next time FLUID code is generated.
It could be that I am not using FLUID rightly.
Please instruct about the right way to do that.
Thank you.