File: lf_menu.h

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (40 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (3)
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