1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#ifndef __LF_MENU_H__
#define __LF_MENU_H__
#include "mforms/base.h"
#include "mforms/menu.h"
#include <gtkmm/menu.h>
#include "lf_base.h"
namespace mforms
{
namespace gtk
{
class MenuImpl : public ObjectImpl
{
Gtk::Menu _menu;
Gtk::MenuItem* item_at(const int index);
static bool create(Menu* self);
static void remove_item(Menu *self, int i);
static int add_item(Menu *self, const std::string &caption, const std::string &action);
static int add_separator(Menu *self);
static int add_submenu(Menu *self, const std::string &caption, Menu *submenu);
static void clear(Menu *self);
static void set_item_enabled(Menu *self, int i, bool flag);
static void popup_at(Menu *self, Object *control, int x, int y);
public:
MenuImpl(Menu* self);
static void init();
}; // class MenuImpl
} // namespace gtk
} // namespace mforms
#endif
|