Search:

Type: Posts; User: Smallz

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    963

    Great, seemed logical enough. Thanks.

    Great, seemed logical enough. Thanks.
  2. Replies
    3
    Views
    963

    Inherited syntax

    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) {
    ...
  3. Replies
    1
    Views
    1,835

    inherited static members

    I have a class, WIDGET.


    class WIDGET{
    public:
    WIDGET();//constructor
    ~WIDGET();//destructor

    int uid();//returns UID
  4. Thread: Singleton

    by Smallz
    Replies
    5
    Views
    1,491

    Bullseye, and if I had posted all relevant code...

    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...
  5. Thread: Singleton

    by Smallz
    Replies
    5
    Views
    1,491

    Yeah sorry I removed that code because I used 'x'...

    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...
  6. Thread: Singleton

    by Smallz
    Replies
    5
    Views
    1,491

    Singleton

    Given my code...

    widgetman.h


    class WIDGETMANAGER{
    public:
    ~WIDGETMANAGER();
    WIDGETMANAGER();
  7. Replies
    8
    Views
    1,962

    Yeah I see your point. Thanks for the input.

    Yeah I see your point. Thanks for the input.
  8. Replies
    8
    Views
    1,962

    But isn't forward declaration *bad* practice? I...

    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...
  9. Replies
    8
    Views
    1,962

    Function-pointer scope problem.

    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...
  10. Replies
    14
    Views
    1,879

    inline efficiency, or lack thereof

    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...
  11. Thread: Copying HFONT

    by Smallz
    Replies
    2
    Views
    1,334

    Ahh, GetObject! That's all I needed. I know where...

    Ahh, GetObject! That's all I needed. I know where to go from that.
    Thanks man.
  12. Thread: Copying HFONT

    by Smallz
    Replies
    2
    Views
    1,334

    Copying HFONT

    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?
  13. Replies
    1
    Views
    893

    Passing a templated function for WNDPROC

    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...
  14. Replies
    1
    Views
    1,257

    Keeping child windows in their place

    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...
  15. Thread: Pointers

    by Smallz
    Replies
    4
    Views
    880

    I see where you coming from, fair enough.

    I see where you coming from, fair enough.
  16. Thread: Pointers

    by Smallz
    Replies
    4
    Views
    880

    But how do I keep a reference to an object? I am...

    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...
  17. Thread: Pointers

    by Smallz
    Replies
    4
    Views
    880

    Pointers

    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...
  18. Replies
    2
    Views
    881

    Ahh, perfect. I've rewritten it using...

    Ahh, perfect. I've rewritten it using polymorphism, and it's a lot more suited to my purpose anyway..

    Thanks a lot! :)
  19. Replies
    2
    Views
    881

    Template confusion

    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;
Results 1 to 19 of 19