From babb46a4ad23c51764c9ae7c47c680eb90fa7dbb Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 14 Mar 2009 14:29:59 +0000 Subject: [PATCH] Improved ButtonBar documentation --- src/gui/widgets/button-bar.hpp | 15 ++++++++++++++- src/gui/widgets/mini-button.hpp | 10 ++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/button-bar.hpp b/src/gui/widgets/button-bar.hpp index 91068ac44..cdb3bc090 100644 --- a/src/gui/widgets/button-bar.hpp +++ b/src/gui/widgets/button-bar.hpp @@ -42,11 +42,24 @@ public: **/ ButtonBar(); + /** + * Append a button to the button bar. + * @param button The button to append. + **/ void append(MiniButton& button); - + + /** + * Append a button to the button bar, and connect a click event. + * @param button The button to append. + * @param clicked_slot The slot to connect. + **/ void append(MiniButton& button, const sigc::slot& clicked_slot); + /** + * Append a sererator item. + * @param seperator The seperator to append. + **/ void append(Gtk::SeparatorToolItem &seperator); }; diff --git a/src/gui/widgets/mini-button.hpp b/src/gui/widgets/mini-button.hpp index 0327d35d8..7805528c5 100644 --- a/src/gui/widgets/mini-button.hpp +++ b/src/gui/widgets/mini-button.hpp @@ -41,17 +41,27 @@ public: /** * Creates a new Button containing the image and text from a stock * item. + * @param stock_id The stock_id of the image. + * @param icon_size The size of the image to show. * @remarks Stock ids have identifiers like Gtk::Stock::OK and * Gtk::Stock::APPLY. **/ MiniButton(const Gtk::StockID& stock_id, const Gtk::IconSize icon_size = Gtk::ICON_SIZE_LARGE_TOOLBAR); + /** + * Sets a new image from a stock-id for this button. + * @param stock_id The stock_id of the image. + * @param icon_size The size of the image to show. + **/ void set_stock_id(const Gtk::StockID& stock_id, const Gtk::IconSize icon_size = Gtk::ICON_SIZE_LARGE_TOOLBAR); private: + /** + * The image widget for the button. + **/ Gtk::Image image; };