Great, seemed logical enough. Thanks.
Type: Posts; User: Smallz
Great, seemed logical enough. Thanks.
I have been studying the source code for FLTK and I've noticed syntax I've never come across before.
Fl_Button::Fl_Button(int X, int Y, int W, int H, const char *l)
: Fl_Widget(X,Y,W,H,l) {
...
I have a class, WIDGET.
class WIDGET{
public:
WIDGET();//constructor
~WIDGET();//destructor
int uid();//returns UID
Bullseye, and if I had posted all relevant code this probably would have been solved earlier. That makes absolutely perfect sense but at the time I just didn't really see what was taking place, it's...
Yeah sorry I removed that code because I used 'x' to test the instance by setting it in the widget constructor and in the first instance I made to determine they were in fact different instances. I...
Given my code...
widgetman.h
class WIDGETMANAGER{
public:
~WIDGETMANAGER();
WIDGETMANAGER();
Yeah I see your point. Thanks for the input.
But isn't forward declaration *bad* practice? I for some reason always try to steer away from it and ignore that it is at all possible. I think I read it somewhere a long time ago when I was...
I would like to define a function pointer;
typedef long (*EventCallback)(Widget*,int);
However the Widget class contains a member variable function pointer of type EventCallback (or at least...
Can anyone provide me with an example of an inline function that actually hinders or helps? I was just implimenting a function, which I deemed worthy of being inline but I was then thinking, "does...
Ahh, GetObject! That's all I needed. I know where to go from that.
Thanks man.
I would like to create a bold version of the DEFAULT_GUI_FONT, however, how do I get the information of the DEFAULT_GUI_FONT to create the new font to begin with?
Hi, I'm trying to create a generic callback to use for my custom widgets, seeing as I pass control out to a class to keep it object oriented I need to create a callback for each individual widget...
I've created a bunch of custom widgets for my latest application.
Now I have a thought of expanding them to include setting child windows within these widgets, however before I attempt it I have a...
I see where you coming from, fair enough.
But how do I keep a reference to an object?
I am trying to create something to keep all of my objects of a type, or derived type, in one place. New objects get created and deleted all the time. Now...
I have a bit of a design problem. I need to have an array of objects, however this array gets resized and elements moved. I need a way to keep a reference to each element without knowing where it is...
Ahh, perfect. I've rewritten it using polymorphism, and it's a lot more suited to my purpose anyway..
Thanks a lot! :)
Heya,
How, or indeed can, I create a class containing an array of templated classes with different types?
Umm, like maybe this-
template <class T> item{
public:
T data;