00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PAPYRUSBOXED_H
00020 #define PAPYRUSBOXED_H
00021
00022 #include <papyrus/group.h>
00023 #include <papyrus/rectangle.h>
00024
00043 namespace Papyrus {
00044
00048 class Boxed : public Group {
00049 public:
00050 typedef PapyrusSmartPointer<Boxed> pointer;
00051
00052 Boxed();
00053
00054 static Boxed::pointer create();
00055
00056 ~Boxed();
00057
00058 Rectangle::pointer get_box();
00059
00060 virtual bool add( Drawable::pointer item, int layer=0, bool drawing_only=true );
00061
00062 PAPYRUS_CLASS_NAME("Boxed Group");
00063
00064 PAPYRUS_CLONE_METHOD( Boxed );
00065
00066 protected:
00067 Rectangle::pointer m_box;
00068
00073 virtual void rebuild_extents();
00074
00075 virtual void on_child_added( Drawable::pointer child );
00076
00077 virtual void on_child_removed( Drawable::pointer child );
00078
00079 private:
00080
00081 virtual void on_child_added_proxy( Drawable::pointer child );
00082
00083 virtual void on_child_removed_proxy( Drawable::pointer child );
00084
00085 };
00086
00087 }
00088
00089 #endif