|
Boost : |
From: Andy Little (andy_at_[hidden])
Date: 2004-12-31 07:17:12
"Alan Gutierrez" <alan-boost_at_[hidden]> wrote
> Are we talking about the same thing? Interface and implentation
> are overloaded terms.
// interface (ABC)
struct graphics_element{
virtual void draw(Context c) =0;
};
// gui object..
struct my_wnd
: graphics_element,
size_handler,move_handler,draw_handler
{ void draw(Context c); ...};
//simple line definition...
template <typename Units> //
struct simple_line{ point<Units> start,end;}
// dumb drawable line
template <typename Units>
struct drawable_line
: simple_line<Units>, graphics_element{
void draw(Context c);
Units thickness;
Color color;
};
template <typename Units>
struct active_line
: drawable_line<Units>, user_action_handler,
draw_handler{..};
// text
struct text_element : graphics_element {..}
// edit box
struct active_text : text_element,user_action_handler,
draw_handler{..};
regards
Andy Little
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk