Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / vcl / inc / unx / gtk / glomenu.h
blob427a0a8ba79cd28449e891210d1358120007e9bd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4 * This file is part of the LibreOffice project.
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #pragma once
13 #include <gio/gio.h>
15 #define G_LO_MENU_ATTRIBUTE_ACCELERATOR "accel"
16 #define G_LO_MENU_ATTRIBUTE_COMMAND "command"
17 #define G_LO_MENU_ATTRIBUTE_SUBMENU_ACTION "submenu-action"
19 G_BEGIN_DECLS
21 #define G_TYPE_LO_MENU (g_lo_menu_get_type ())
22 #define G_LO_MENU(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
23 G_TYPE_LO_MENU, GLOMenu))
24 #define G_IS_LO_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
25 G_TYPE_LO_MENU))
27 struct GLOMenu;
29 class GtkSalMenuItem;
31 GLIB_AVAILABLE_IN_2_32
32 GType g_lo_menu_get_type (void) G_GNUC_CONST;
33 GLIB_AVAILABLE_IN_2_32
34 GLOMenu * g_lo_menu_new (void);
36 gint g_lo_menu_get_n_items_from_section (GLOMenu *menu,
37 gint section);
39 void g_lo_menu_insert (GLOMenu *menu,
40 gint position,
41 const gchar *label);
43 void g_lo_menu_insert_in_section (GLOMenu *menu,
44 gint section,
45 gint position,
46 const gchar *label);
48 void g_lo_menu_new_section (GLOMenu *menu,
49 gint position,
50 const gchar *label);
52 void g_lo_menu_insert_section (GLOMenu *menu,
53 gint position,
54 const gchar *label,
55 GMenuModel *section);
57 GLOMenu * g_lo_menu_get_section (GLOMenu *menu,
58 gint section);
60 void g_lo_menu_remove (GLOMenu *menu,
61 gint position);
63 void g_lo_menu_remove_from_section (GLOMenu *menu,
64 gint section,
65 gint position);
67 void g_lo_menu_set_label (GLOMenu *menu,
68 gint position,
69 const gchar *label);
71 void g_lo_menu_set_icon (GLOMenu *menu,
72 gint position,
73 const GIcon *icon);
76 void g_lo_menu_set_label_to_item_in_section (GLOMenu *menu,
77 gint section,
78 gint position,
79 const gchar *label,
80 bool fire_event = true);
82 void g_lo_menu_set_icon_to_item_in_section (GLOMenu *menu,
83 gint section,
84 gint position,
85 const GIcon *icon);
87 gchar * g_lo_menu_get_label_from_item_in_section (GLOMenu *menu,
88 gint section,
89 gint position);
91 void g_lo_menu_set_action_and_target_value (GLOMenu *menu,
92 gint position,
93 const gchar *command,
94 GVariant *target_value);
96 void g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu *menu,
97 gint section,
98 gint position,
99 const gchar *command,
100 GVariant *target_value);
102 void g_lo_menu_set_command_to_item_in_section (GLOMenu *menu,
103 gint section,
104 gint position,
105 const gchar *command,
106 bool fire_event = true);
108 gchar * g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
109 gint section,
110 gint position);
112 void g_lo_menu_set_accelerator_to_item_in_section (GLOMenu *menu,
113 gint section,
114 gint position,
115 const gchar *accelerator);
117 gchar * g_lo_menu_get_accelerator_from_item_in_section (GLOMenu *menu,
118 gint section,
119 gint position);
121 void g_lo_menu_new_submenu_in_item_in_section (GLOMenu *menu,
122 gint section,
123 gint position);
125 GLOMenu * g_lo_menu_get_submenu_from_item_in_section (GLOMenu *menu,
126 gint section,
127 gint position);
129 void g_lo_menu_set_submenu_action_to_item_in_section (GLOMenu *menu,
130 gint section,
131 gint position,
132 const gchar *action);
134 G_END_DECLS
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */