X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/22a67f92aba3f9c1f24b91f19ef7ed0361fb010b..62eb4c434ac30aa83ef05be78130cb42105f618c:/container.h/software/bife/bife++.git/blobdiff_plain/22a67f92aba3f9c1f24b91f19ef7ed0361fb010b..62eb4c434ac30aa83ef05be78130cb42105f618c:/container.h diff --git a/container.h b/container.h index 41ac0a6..eb2bb1f 100644 --- a/container.h +++ b/container.h @@ -9,73 +9,76 @@ #include #include -using std::string; +namespace bife { -/** - * Base Container Class. - * - * @todo - */ -class Container: public Widget { - // Typedefs - protected: - typedef std::vector Content; + using std::string; - // Attributes. - protected: - /// Content. - Content content; + /** + * Base Container Class. + * + * @todo + */ + class Container: public Widget { + // Typedefs + protected: + typedef std::vector Content; - // Methods. - public: - /** - * Constructor. - */ - Container(void); + // Attributes. + protected: + /// Content. + Content content; - /** - * Constructor. - * - * @param attrs Widget attributes. - */ - Container(Hash); + // Methods. + public: + /** + * Constructor. + */ + Container(void); - /** - * Constructor. - * - * @param attrs Widget attributes. - * @param content Content of the widget. - */ - Container(Hash, Widget&); + /** + * Constructor. + * + * @param attrs Widget attributes. + */ + Container(const Hash&); - /** - * Constructor. - * - * @param content Content of the widget. - * @param attrs Widget attributes. - */ - Container(Widget&, Hash); + /** + * Constructor. + * + * @param attrs Widget attributes. + * @param content Content of the widget. + */ + Container(const Hash&, Widget*); - /** - * Destructor. - */ - virtual ~Container(void); + /** + * Constructor. + * + * @param content Content of the widget. + * @param attrs Widget attributes. + */ + Container(Widget*, const Hash&); - /** - * Renders the widget using a HIT template. - * - * @param hit HIT template to use to render de widget. - * @return Rendered widget. - */ - virtual string render(HIT&) = 0; + /** + * Destructor. + */ + virtual ~Container(void); - /** - * Renders the widget using a HIT template. - * - * @param hit HIT template to use to render de widget. - * @return Rendered widget. - */ - string renderContent(HIT&); -}; + /** + * Renders the widget using a HIT template. + * + * @param hit HIT template to use to render de widget. + * @return Rendered widget. + */ + virtual string renderContent(HIT&); + + /** + * Appends a widget to the container. + * + * @param widget Widget to append. + */ + virtual void append(Widget*); + }; + +} #endif