Boost logo

Boost :

From: Alan Gutierrez (alan-boost_at_[hidden])
Date: 2004-12-31 10:03:48


* Andy Little <andy_at_[hidden]> [2004-12-31 07:37]:
>
> "Alan Gutierrez" <alan-boost_at_[hidden]> wrote

> > Are we talking about the same thing? Interface and implentation
> > are overloaded terms.

> // text
> struct text_element : graphics_element {..}

> // edit box
> struct active_text : text_element,user_action_handler,
> draw_handler{..};

    Except that on PlamOS, when using resource files, I don't need a
    draw function for my text boxes. I know they are draw somehow,
    but not by the Boost.GUI library.

    Could this be what I'm saying?

    struct graphics_element{
        virtual void draw(Context c) =0;
    };

    struct text_element {
        virtual void display(std::string s);
    }

    template <typename IdType>
    struct resource_binder {
        IdType resource_id;
    }

    // PalmOS edit box.
    struct resource_edit_box : text_element,
                               resource_binder,
                               user_action_handler,
                               draw_handler{..};

    // Drawn edit box.
    struct graphic_edit_box : text_element,
                              graphics_element,
                              user_action_handler,
                              draw_handler{..};

--
Alan Gutierrez - alan_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk