summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/menu_2.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/views/controls/menu/menu_2.h b/views/controls/menu/menu_2.h
index 4bfe9b9..416c949 100644
--- a/views/controls/menu/menu_2.h
+++ b/views/controls/menu/menu_2.h
@@ -20,6 +20,12 @@ class NativeMenuGtk;
// A menu. Populated from a model, and relies on a delegate to execute commands.
class Menu2 {
public:
+ // Creates a new menu populated with the contents of |model|.
+ // WARNING: this populates the menu on construction by invoking methods on
+ // the model. As such, it is typically not safe to use this as the model
+ // from the constructor. EG:
+ // MyClass : menu_(this) {}
+ // is likely to have problems.
explicit Menu2(menus::MenuModel* model);
virtual ~Menu2() {}