summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorAntonio Fernandez <antonio.fernandez@aentos.es>2012-08-26 18:50:35 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:44 +0100
commitf39fff93a461e930fc61bde43db6df53508d4c8f (patch)
tree59cf12af7c081e70573a4704fe9635c4a567b034 /vcl/inc
parent73f0064fbcbe28ad8aecd1c41637cec18776908c (diff)
Menus are now working. HUD integration is broken.
Change-Id: I0f5fef169b2656a713416e28648a3260b22b43b0
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/unx/gtk/glomenu.h135
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx7
2 files changed, 63 insertions, 79 deletions
diff --git a/vcl/inc/unx/gtk/glomenu.h b/vcl/inc/unx/gtk/glomenu.h
index ab43897c3a84..9c4801f92fe7 100644
--- a/vcl/inc/unx/gtk/glomenu.h
+++ b/vcl/inc/unx/gtk/glomenu.h
@@ -36,86 +36,71 @@ G_BEGIN_DECLS
#define G_IS_LO_MENU(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_LO_MENU))
-typedef struct _GLOMenu GLOMenu;
+typedef struct _GLOMenu GLOMenu;
class GtkSalMenuItem;
GLIB_AVAILABLE_IN_2_32
-GType g_lo_menu_get_type (void) G_GNUC_CONST;
+GType g_lo_menu_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_2_32
-GLOMenu * g_lo_menu_new (void);
-
-void g_lo_menu_insert (GLOMenu *menu,
- gint position,
- const char *label);
-
-void g_lo_menu_insert_in_section (GLOMenu *menu,
- gint section,
- gint position,
- const gchar *label);
-
-void g_lo_menu_insert_section (GLOMenu *menu,
- gint position,
- const gchar *label);
-
-void g_lo_menu_remove (GLOMenu *menu,
- gint position);
-
-void g_lo_menu_remove_from_section (GLOMenu *menu,
- gint section,
- gint position);
-
-//void g_lo_menu_insert (GLOMenu *menu,
-// gint position,
-// const gchar *label);
-
-//void g_lo_menu_append (GLOMenu *menu,
-// const gchar *label,
-// const gchar *detailed_action);
-
-//void g_lo_menu_insert_submenu (GLOMenu *menu,
-// gint position,
-// const gchar *label,
-// GMenuModel *submenu);
-//void g_lo_menu_prepend_submenu (GLOMenu *menu,
-// const gchar *label,
-// GMenuModel *submenu);
-//void g_lo_menu_append_submenu (GLOMenu *menu,
-// const gchar *label,
-// GMenuModel *submenu);
-
-void g_lo_menu_set_label (GLOMenu *menu,
- gint position,
- const gchar *label);
-
-void g_lo_menu_set_label_in_section (GLOMenu *menu,
- gint section,
- gint position,
- const gchar *label);
-
-void g_lo_menu_set_action_and_target_value (GLOMenu *menu,
- gint position,
- const gchar *command,
- GVariant *target_value);
-
-void g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu *menu,
- gint section,
- gint position,
- const gchar *command,
- GVariant *target_value);
-
-void g_lo_menu_set_submenu (GLOMenu *menu,
- gint position,
- GMenuModel *submenu);
-
-void g_lo_menu_set_submenu_to_item_in_section (GLOMenu *menu,
- gint section,
- gint position,
- GMenuModel *submenu);
-
-gchar* g_lo_menu_get_action_value_from_item_in_section (GLOMenu *menu,
- gint section,
- gint position);
+GLOMenu * g_lo_menu_new (void);
+
+void g_lo_menu_insert (GLOMenu *menu,
+ gint position,
+ const char *label);
+
+void g_lo_menu_insert_in_section (GLOMenu *menu,
+ gint section,
+ gint position,
+ const gchar *label);
+
+void g_lo_menu_new_section (GLOMenu *menu,
+ gint position,
+ const gchar *label);
+
+void g_lo_menu_insert_section (GLOMenu *menu,
+ gint position,
+ const gchar *label,
+ GMenuModel *section);
+
+GLOMenu * g_lo_menu_get_section (GLOMenu *menu,
+ gint section);
+
+void g_lo_menu_remove (GLOMenu *menu,
+ gint position);
+
+void g_lo_menu_remove_from_section (GLOMenu *menu,
+ gint section,
+ gint position);
+
+void g_lo_menu_set_label (GLOMenu *menu,
+ gint position,
+ const gchar *label);
+
+void g_lo_menu_set_label_to_item_in_section (GLOMenu *menu,
+ gint section,
+ gint position,
+ const gchar *label);
+
+gchar * g_lo_menu_get_label_from_item_in_section (GLOMenu *menu,
+ gint section,
+ gint position);
+
+void g_lo_menu_set_action_and_target_value (GLOMenu *menu,
+ gint position,
+ const gchar *command,
+ GVariant *target_value);
+
+void g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu *menu,
+ gint section,
+ gint position,
+ const gchar *command,
+ GVariant *target_value);
+
+void g_lo_menu_set_submenu_to_item_in_section (GLOMenu *menu,
+ gint section,
+ gint position,
+ GMenuModel *submenu);
G_END_DECLS
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index a517c5eda9da..0e2131314bfa 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -52,9 +52,7 @@ private:
GMenuModel* mpMenuModel;
GActionGroup* mpActionGroup;
-
- sal_Int16 GetSectionNumber( GMenuModel* pSection );
- void GetInsertionData( unsigned nPos, unsigned *insertSection, unsigned *insertPos );
+ void GetItemSectionAndPosition( unsigned nPos, unsigned *insertSection, unsigned *insertPos );
public:
GtkSalMenu( sal_Bool bMenuBar );
@@ -84,7 +82,6 @@ public:
virtual unsigned GetItemCount() { return maItems.size(); }
virtual GtkSalMenuItem* GetItemAtPos( unsigned nPos ) { return maItems[ nPos ]; }
virtual GActionGroup* GetActionGroup() { return mpActionGroup; }
-// virtual GtkSalMenuItem* GetSalMenuItem( sal_uInt16 nId );
};
class GtkSalMenuItem : public SalMenuItem
@@ -96,6 +93,8 @@ public:
sal_uInt16 mnId; // Item ID
MenuItemBits mnBits; // Item bits
MenuItemType mnType; // Item type
+ gchar* maCommand; // Item command
+ gchar* maLabel; // Item label
Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted
GtkSalMenu* mpParentMenu; // The menu in which this menu item is inserted
GtkSalMenu* mpSubMenu; // Sub menu of this item (if defined)