From 58d2f05db49f774ea96a3dcb5bc5c76fb1df34d5 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Fri, 26 Dec 2008 18:14:45 +0000 Subject: [PATCH] Added some documentation to menu-bbutton.hpp --- src/gui/widgets/menu-button.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/gui/widgets/menu-button.hpp b/src/gui/widgets/menu-button.hpp index 86f180564..38c21cdfc 100644 --- a/src/gui/widgets/menu-button.hpp +++ b/src/gui/widgets/menu-button.hpp @@ -71,15 +71,37 @@ public: **/ Gtk::Menu& get_menu(); + /** + * Pops up the menu. + **/ void popup(); protected: + + /** + * An event handler for when the button is pressed. + **/ virtual void on_pressed(); private: + + /** + * A callback function used to determine the correct position for the + * popup menu. + * @param x The x-coordinate to display the menu in root window + * coordinates. + * @param y The y-coordinate to display the menu in root window + * coordinates. + * @param push_in This value is set to true if the menu should be + * pushed in if it collides with the edge of the screen. + **/ void on_menu_position(int& x, int& y, bool& push_in); private: + + /** + * The internal menu object which is the popup menu of this widget. + **/ Gtk::Menu menu; };