Commit e7e39565 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

A model-view separation for menus and toolbars, using the EggMenu code by

2003-08-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaction.[ch]:
	* gtk/gtktoggleaction.[ch]:
	* gtk/gtktoggleactionprivate.h:
	* gtk/gtkradioaction.[ch]:
	* gtk/gtkactiongroup.[ch]:
	* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
	toolbars, using the EggMenu code by James Henstridge.

	* gtk/gtk.h: Include new headers.
	* gtk/Makefile.am: Add new files.

	* tests/testactions.c: Test for actions.
	* tests/testmerge.c: Test for menu merging.
	* tests/merge-[123].ui: Test data for testmerge.
	* tests/Makefile.am: Add testactions and testmerge.

	* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
	menubar and toolbar.
parent 9897d659
2003-08-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.[ch]:
* gtk/gtktoggleaction.[ch]:
* gtk/gtktoggleactionprivate.h:
* gtk/gtkradioaction.[ch]:
* gtk/gtkactiongroup.[ch]:
* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
toolbars, using the EggMenu code by James Henstridge.
* gtk/gtk.h: Include new headers.
* gtk/Makefile.am: Add new files.
* tests/testactions.c: Test for actions.
* tests/testmerge.c: Test for menu merging.
* tests/merge-[123].ui: Test data for testmerge.
* tests/Makefile.am: Add testactions and testmerge.
* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
menubar and toolbar.
Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com> Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
......
2003-08-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.[ch]:
* gtk/gtktoggleaction.[ch]:
* gtk/gtktoggleactionprivate.h:
* gtk/gtkradioaction.[ch]:
* gtk/gtkactiongroup.[ch]:
* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
toolbars, using the EggMenu code by James Henstridge.
* gtk/gtk.h: Include new headers.
* gtk/Makefile.am: Add new files.
* tests/testactions.c: Test for actions.
* tests/testmerge.c: Test for menu merging.
* tests/merge-[123].ui: Test data for testmerge.
* tests/Makefile.am: Add testactions and testmerge.
* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
menubar and toolbar.
Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com> Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
......
2003-08-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.[ch]:
* gtk/gtktoggleaction.[ch]:
* gtk/gtktoggleactionprivate.h:
* gtk/gtkradioaction.[ch]:
* gtk/gtkactiongroup.[ch]:
* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
toolbars, using the EggMenu code by James Henstridge.
* gtk/gtk.h: Include new headers.
* gtk/Makefile.am: Add new files.
* tests/testactions.c: Test for actions.
* tests/testmerge.c: Test for menu merging.
* tests/merge-[123].ui: Test data for testmerge.
* tests/Makefile.am: Add testactions and testmerge.
* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
menubar and toolbar.
Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com> Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
......
2003-08-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.[ch]:
* gtk/gtktoggleaction.[ch]:
* gtk/gtktoggleactionprivate.h:
* gtk/gtkradioaction.[ch]:
* gtk/gtkactiongroup.[ch]:
* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
toolbars, using the EggMenu code by James Henstridge.
* gtk/gtk.h: Include new headers.
* gtk/Makefile.am: Add new files.
* tests/testactions.c: Test for actions.
* tests/testmerge.c: Test for menu merging.
* tests/merge-[123].ui: Test data for testmerge.
* tests/Makefile.am: Add testactions and testmerge.
* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
menubar and toolbar.
Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com> Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
......
2003-08-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaction.[ch]:
* gtk/gtktoggleaction.[ch]:
* gtk/gtktoggleactionprivate.h:
* gtk/gtkradioaction.[ch]:
* gtk/gtkactiongroup.[ch]:
* gtk/gtkmenumerge.[ch]: A model-view separation for menus and
toolbars, using the EggMenu code by James Henstridge.
* gtk/gtk.h: Include new headers.
* gtk/Makefile.am: Add new files.
* tests/testactions.c: Test for actions.
* tests/testmerge.c: Test for menu merging.
* tests/merge-[123].ui: Test data for testmerge.
* tests/Makefile.am: Add testactions and testmerge.
* demos/gtk-demo/appwindow.c: Use GtkMenuMerge to construct the
menubar and toolbar.
Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com> Sat Aug 23 21:40:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
......
...@@ -8,20 +8,20 @@ ...@@ -8,20 +8,20 @@
static GtkWidget *window = NULL; static GtkWidget *window = NULL;
static void static void
menuitem_cb (gpointer callback_data, activate_action (GtkAction *action)
guint callback_action,
GtkWidget *widget)
{ {
const gchar *name = gtk_action_get_name (action);
const gchar *typename = G_OBJECT_TYPE_NAME (action);
GtkWidget *dialog; GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (callback_data), dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO, GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE, GTK_BUTTONS_CLOSE,
"You selected or toggled the menu item: \"%s\"", "You activated action: \"%s\" of type \"%s\"",
gtk_item_factory_path_from_widget (widget)); name, typename);
/* Close dialog on user response */ /* Close dialog on user response */
g_signal_connect (dialog, g_signal_connect (dialog,
...@@ -33,53 +33,71 @@ menuitem_cb (gpointer callback_data, ...@@ -33,53 +33,71 @@ menuitem_cb (gpointer callback_data,
} }
static GtkItemFactoryEntry menu_items[] = #ifndef N_
{ #define N_(String) String
{ "/_File", NULL, 0, 0, "<Branch>" }, #endif
{ "/File/_New", "<control>N", menuitem_cb, 0, "<StockItem>", GTK_STOCK_NEW },
{ "/File/_Open", "<control>O", menuitem_cb, 0, "<StockItem>", GTK_STOCK_OPEN }, static GtkActionGroupEntry entries[] = {
{ "/File/_Save", "<control>S", menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE }, { "FileMenu", N_("_File"), NULL, NULL, NULL, NULL, NULL },
{ "/File/Save _As...", NULL, menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE }, { "PreferencesMenu", N_("_Preferences"), NULL, NULL, NULL, NULL, NULL },
{ "/File/sep1", NULL, menuitem_cb, 0, "<Separator>" }, { "ColorMenu", N_("_Color"), NULL, NULL, NULL, NULL, NULL },
{ "/File/_Quit", "<control>Q", menuitem_cb, 0, "<StockItem>", GTK_STOCK_QUIT }, { "ShapeMenu", N_("_Shape"), NULL, NULL, NULL, NULL, NULL },
{ "HelpMenu", N_("_Help"), NULL, NULL, NULL, NULL, NULL },
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" }, { "New", N_("_New"), GTK_STOCK_NEW, "<control>N", N_("Create a new file"), G_CALLBACK (activate_action), NULL },
{ "/_Preferences/Color/_Red", NULL, menuitem_cb, 0, "<RadioItem>" }, { "Open", N_("_Open"), GTK_STOCK_OPEN, "<control>O", N_("Open a file"), G_CALLBACK (activate_action), NULL },
{ "/_Preferences/Color/_Green", NULL, menuitem_cb, 0, "/Preferences/Color/Red" }, { "Save", N_("_Save"), GTK_STOCK_SAVE, "<control>S", N_("Save current file"), G_CALLBACK (activate_action), NULL },
{ "/_Preferences/Color/_Blue", NULL, menuitem_cb, 0, "/Preferences/Color/Red" }, { "SaveAs", N_("Save _As..."), GTK_STOCK_SAVE, NULL, N_("Save to a file"), G_CALLBACK (activate_action), NULL },
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" }, { "Quit", N_("_Quit"), GTK_STOCK_QUIT, "<control>Q", N_("Quit"), G_CALLBACK (activate_action), NULL },
{ "/_Preferences/Shape/_Square", NULL, menuitem_cb, 0, "<RadioItem>" },
{ "/_Preferences/Shape/_Rectangle", NULL, menuitem_cb, 0, "/Preferences/Shape/Square" }, { "Red", N_("_Red"), NULL, "<control>R", N_("Blood"), G_CALLBACK (activate_action), NULL, RADIO_ACTION },
{ "/_Preferences/Shape/_Oval", NULL, menuitem_cb, 0, "/Preferences/Shape/Rectangle" }, { "Green", N_("_Green"), NULL, "<control>G", N_("Grass"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Red" },
{ "Blue", N_("_Blue"), NULL, "<control>B", N_("Sky"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Red" },
/* If you wanted this to be right justified you would use "<LastBranch>", not "<Branch>".
* Right justified help menu items are generally considered a bad idea now days. { "Square", N_("_Square"), NULL, "<control>S", N_("Square"), G_CALLBACK (activate_action), NULL, RADIO_ACTION },
*/ { "Rectangle", N_("_Rectangle"), NULL, "<control>R", N_("Rectangle"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Square" },
{ "/_Help", NULL, 0, 0, "<Branch>" }, { "Oval", N_("_Oval"), NULL, "<control>O", N_("Egg"), G_CALLBACK (activate_action), NULL, RADIO_ACTION, "Square" },
{ "/Help/_About", NULL, menuitem_cb, 0 }, { "About", N_("_About"), NULL, "<control>A", N_("About"), G_CALLBACK (activate_action), NULL },
{ "Logo", NULL, "demo-gtk-logo", NULL, N_("GTK+"), G_CALLBACK (activate_action), NULL },
}; };
static guint n_entries = G_N_ELEMENTS (entries);
static const gchar *ui_info =
"<Root>\n"
" <menu>\n"
" <submenu name='FileMenu'>\n"
" <menuitem name='New'/>\n"
" <menuitem name='Open'/>\n"
" <menuitem name='Save'/>\n"
" <menuitem name='SaveAs'/>\n"
" <separator name='Sep1'/>\n"
" <menuitem name='Quit'/>\n"
" </submenu>\n"
" <submenu name='PreferencesMenu'>\n"
" <submenu name='ColorMenu'>\n"
" <menuitem name='Red'/>\n"
" <menuitem name='Green'/>\n"
" <menuitem name='Blue'/>\n"
" </submenu>\n"
" <submenu name='ShapeMenu'>\n"
" <menuitem name='Square'/>\n"
" <menuitem name='Rectangle'/>\n"
" <menuitem name='Oval'/>\n"
" </submenu>\n"
" </submenu>\n"
" <submenu name='HelpMenu'>\n"
" <menuitem name='About'/>\n"
" </submenu>\n"
" </menu>\n"
" <dockitem>\n"
" <toolitem name='Open'/>\n"
" <toolitem name='Quit'/>\n"
" <separator name='Sep1'/>\n"
" <toolitem name='Logo'/>\n"
" </dockitem>\n"
"</Root>\n";
static void
toolbar_cb (GtkWidget *button,
gpointer data)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (data),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
"You selected a toolbar button");
/* Close dialog on user response */
g_signal_connect (dialog,
"response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_widget_show (dialog);
}
/* This function registers our custom toolbar icons, so they can be themed. /* This function registers our custom toolbar icons, so they can be themed.
* *
...@@ -195,19 +213,47 @@ update_resize_grip (GtkWidget *widget, ...@@ -195,19 +213,47 @@ update_resize_grip (GtkWidget *widget,
} }
static void
add_widget (GtkMenuMerge *merge,
GtkWidget *widget,
GtkTable *table)
{
if (GTK_IS_MENU_BAR (widget))
{
gtk_table_attach (GTK_TABLE (table),
widget,
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
}
else if (GTK_IS_TOOLBAR (widget))
{
gtk_table_attach (GTK_TABLE (table),
widget,
/* X direction */ /* Y direction */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
}
gtk_widget_show (widget);
}
GtkWidget * GtkWidget *
do_appwindow (void) do_appwindow (void)
{ {
if (!window) if (!window)
{ {
GtkWidget *table; GtkWidget *table;
GtkWidget *toolbar;
GtkWidget *statusbar; GtkWidget *statusbar;
GtkWidget *contents; GtkWidget *contents;
GtkWidget *sw; GtkWidget *sw;
GtkTextBuffer *buffer; GtkTextBuffer *buffer;
GtkAccelGroup *accel_group; GtkActionGroup *action_group;
GtkItemFactory *item_factory; GtkAction *action;
GtkMenuMerge *merge;
GError *error = NULL;
register_stock_icons (); register_stock_icons ();
...@@ -226,70 +272,28 @@ do_appwindow (void) ...@@ -226,70 +272,28 @@ do_appwindow (void)
gtk_container_add (GTK_CONTAINER (window), table); gtk_container_add (GTK_CONTAINER (window), table);
/* Create the menubar /* Create the menubar and toolbar
*/ */
accel_group = gtk_accel_group_new (); action_group = gtk_action_group_new ("AppWindowActions");
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); gtk_action_group_add_actions (action_group, entries, n_entries);
g_object_unref (accel_group);
action = gtk_action_group_get_action (action_group, "red");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
action = gtk_action_group_get_action (action_group, "square");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
merge = gtk_menu_merge_new ();
gtk_menu_merge_insert_action_group (merge, action_group, 0);
g_signal_connect (merge, "add_widget", G_CALLBACK (add_widget), table);
gtk_window_add_accel_group (GTK_WINDOW (window),
gtk_menu_merge_get_accel_group (merge));
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group); if (!gtk_menu_merge_add_ui_from_string (merge, ui_info, -1, &error))
{
/* Set up item factory to go away with the window */ g_message ("building menus failed: %s", error->message);
g_object_ref (item_factory); g_error_free (error);
gtk_object_sink (GTK_OBJECT (item_factory)); }
g_object_set_data_full (G_OBJECT (window),
"<main>",
item_factory,
(GDestroyNotify) g_object_unref);
/* create menu items */
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
menu_items, window);
gtk_table_attach (GTK_TABLE (table),
gtk_item_factory_get_widget (item_factory, "<main>"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Create the toolbar
*/
toolbar = gtk_toolbar_new ();
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
GTK_STOCK_OPEN,
"This is a demo button with an 'open' icon",
NULL,
G_CALLBACK (toolbar_cb),
window, /* user data for callback */
-1); /* -1 means "append" */
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
GTK_STOCK_QUIT,
"This is a demo button with a 'quit' icon",
NULL,
G_CALLBACK (toolbar_cb),
window, /* user data for callback */
-1); /* -1 means "append" */
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
"demo-gtk-logo",
"This is a demo button with a 'gtk' icon",
NULL,
G_CALLBACK (toolbar_cb),
window, /* user data for callback */
-1); /* -1 means "append" */
gtk_table_attach (GTK_TABLE (table),
toolbar,
/* X direction */ /* Y direction */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Create document /* Create document
*/ */
......
...@@ -91,6 +91,8 @@ gtk_public_h_sources = \ ...@@ -91,6 +91,8 @@ gtk_public_h_sources = \
gtkaccellabel.h \ gtkaccellabel.h \
gtkaccelmap.h \ gtkaccelmap.h \
gtkaccessible.h \ gtkaccessible.h \
gtkaction.h \
gtkactiongroup.h \
gtkadjustment.h \ gtkadjustment.h \
gtkalignment.h \ gtkalignment.h \
gtkarrow.h \ gtkarrow.h \
...@@ -165,6 +167,7 @@ gtk_public_h_sources = \ ...@@ -165,6 +167,7 @@ gtk_public_h_sources = \
gtkmenu.h \ gtkmenu.h \
gtkmenubar.h \ gtkmenubar.h \
gtkmenuitem.h \ gtkmenuitem.h \
gtkmenumerge.h \
gtkmenushell.h \ gtkmenushell.h \
gtkmessagedialog.h \ gtkmessagedialog.h \
gtkmisc.h \ gtkmisc.h \
...@@ -179,11 +182,13 @@ gtk_public_h_sources = \ ...@@ -179,11 +182,13 @@ gtk_public_h_sources = \
gtkprivate.h \ gtkprivate.h \
gtkprogress.h \ gtkprogress.h \
gtkprogressbar.h \ gtkprogressbar.h \
gtkradioaction.h \
gtkradiobutton.h \ gtkradiobutton.h \
gtkradiomenuitem.h \ gtkradiomenuitem.h \
gtkradiotoolbutton.h \ gtkradiotoolbutton.h \
gtkrange.h \ gtkrange.h \
gtkrc.h \ gtkrc.h \
gtkresizegrip.h \
gtkruler.h \ gtkruler.h \
gtkscale.h \ gtkscale.h \
gtkscrollbar.h \ gtkscrollbar.h \
...@@ -213,6 +218,7 @@ gtk_public_h_sources = \ ...@@ -213,6 +218,7 @@ gtk_public_h_sources = \
gtktexttagtable.h \ gtktexttagtable.h \
gtktextview.h \ gtktextview.h \
gtktipsquery.h \ gtktipsquery.h \
gtktoggleaction.h \
gtktogglebutton.h \ gtktogglebutton.h \
gtktoggletoolbutton.h \ gtktoggletoolbutton.h \
gtktoolbar.h \ gtktoolbar.h \
...@@ -257,13 +263,16 @@ gtk_private_h_sources = \ ...@@ -257,13 +263,16 @@ gtk_private_h_sources = \
gtkthemes.h \ gtkthemes.h \
gtktreedatalist.h \ gtktreedatalist.h \
gtktreeprivate.h \ gtktreeprivate.h \
gtkwindow-decorate.h gtkwindow-decorate.h \
gtktoggleactionprivate.h
# GTK+ C sources to build the library from # GTK+ C sources to build the library from
gtk_c_sources = \ gtk_c_sources = \
gtkaccelgroup.c \ gtkaccelgroup.c \
gtkaccelmap.c \ gtkaccelmap.c \
gtkaccellabel.c \ gtkaccellabel.c \
gtkaction.c \
gtkactiongroup.c \
gtkradiotoolbutton.c \ gtkradiotoolbutton.c \
gtktoggletoolbutton.c \ gtktoggletoolbutton.c \
gtktoolbar.c \ gtktoolbar.c \
...@@ -350,6 +359,7 @@ gtk_c_sources = \ ...@@ -350,6 +359,7 @@ gtk_c_sources = \
gtkmarshalers.c \ gtkmarshalers.c \
gtkmarshal.c \ gtkmarshal.c \
gtkmenu.c \ gtkmenu.c \
gtkmenumerge.c \
gtkmenubar.c \ gtkmenubar.c \
gtkmenuitem.c \ gtkmenuitem.c \
gtkmenushell.c \ gtkmenushell.c \
...@@ -364,11 +374,13 @@ gtk_c_sources = \ ...@@ -364,11 +374,13 @@ gtk_c_sources = \
gtkpreview.c \ gtkpreview.c \
gtkprogress.c \ gtkprogress.c \
gtkprogressbar.c \ gtkprogressbar.c \
gtkradioaction.c \
gtkradiobutton.c \ gtkradiobutton.c \
gtkradiomenuitem.c \ gtkradiomenuitem.c \
gtkrange.c \ gtkrange.c \
gtkrbtree.c \ gtkrbtree.c \
gtkrc.c \ gtkrc.c \
gtkresizegrip.c \
gtkruler.c \ gtkruler.c \
gtkscale.c \ gtkscale.c \
gtkscrollbar.c \ gtkscrollbar.c \
...@@ -402,6 +414,7 @@ gtk_c_sources = \ ...@@ -402,6 +414,7 @@ gtk_c_sources = \
gtktextview.c \ gtktextview.c \
gtkthemes.c \ gtkthemes.c \
gtktipsquery.c \ gtktipsquery.c \
gtktoggleaction.c \
gtktogglebutton.c \ gtktogglebutton.c \
gtktooltips.c \ gtktooltips.c \
gtktree.c \ gtktree.c \
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include <gtk/gtkaccellabel.h> #include <gtk/gtkaccellabel.h>
#include <gtk/gtkaccelmap.h> #include <gtk/gtkaccelmap.h>
#include <gtk/gtkaccessible.h> #include <gtk/gtkaccessible.h>
#include <gtk/gtkaction.h>
#include <gtk/gtkactiongroup.h>
#include <gtk/gtkadjustment.h> #include <gtk/gtkadjustment.h>
#include <gtk/gtkalignment.h> #include <gtk/gtkalignment.h>
#include <gtk/gtkarrow.h> #include <gtk/gtkarrow.h>
...@@ -103,6 +105,7 @@ ...@@ -103,6 +105,7 @@
#include <gtk/gtkmenu.h> #include <gtk/gtkmenu.h>
#include <gtk/gtkmenubar.h> #include <gtk/gtkmenubar.h>
#include <gtk/gtkmenuitem.h> #include <gtk/gtkmenuitem.h>
#include <gtk/gtkmenumerge.h>
#include <gtk/gtkmenushell.h> #include <gtk/gtkmenushell.h>
#include <gtk/gtkmessagedialog.h> #include <gtk/gtkmessagedialog.h>
#include <gtk/gtkmisc.h> #include <gtk/gtkmisc.h>
...@@ -116,11 +119,13 @@ ...@@ -116,11 +119,13 @@
#include <gtk/gtkpreview.h> #include <gtk/gtkpreview.h>
#include <gtk/gtkprogress.h> #include <gtk/gtkprogress.h>
#include <gtk/gtkprogressbar.h> #include <gtk/gtkprogressbar.h>
#include <gtk/gtkradioaction.h>
#include <gtk/gtkradiobutton.h> #include <gtk/gtkradiobutton.h>
#include <gtk/gtkradiomenuitem.h> #include <gtk/gtkradiomenuitem.h>
#include <gtk/gtkradiotoolbutton.h> #include <gtk/gtkradiotoolbutton.h>
#include <gtk/gtkrange.h> #include <gtk/gtkrange.h>
#include <gtk/gtkrc.h> #include <gtk/gtkrc.h>
#include <gtk/gtkresizegrip.h>
#include <gtk/gtkruler.h> #include <gtk/gtkruler.h>
#include <gtk/gtkscale.h> #include <gtk/gtkscale.h>
#include <gtk/gtkscrollbar.h> #include <gtk/gtkscrollbar.h>
...@@ -143,6 +148,7 @@ ...@@ -143,6 +148,7 @@
#include <gtk/gtktextbuffer.h> #include <gtk/gtktextbuffer.h>
#include <gtk/gtktextview.h> #include <gtk/gtktextview.h>
#include <gtk/gtktipsquery.h> #include <gtk/gtktipsquery.h>
#include <gtk/gtktoggleaction.h>
#include <gtk/gtktogglebutton.h> #include <gtk/gtktogglebutton.h>
#include <gtk/gtktoggletoolbutton.h> #include <gtk/gtktoggletoolbutton.h>
#include <gtk/gtktoolbar.h> #include <gtk/gtktoolbar.h>
......
This diff is collapsed.
/*
* GTK - The GIMP Toolkit
* Copyright (C) 1998, 1999 Red Hat, Inc.
* All rights reserved.
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the Gnome Library; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Author: James Henstridge <james@daa.com.au>
*
* Modified by the GTK+ Team and others 2003. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __GTK_ACTION_H__
#define __GTK_ACTION_H__
#include <gtk/gtkwidget.h>
#include <glib-object.h>
#define GTK_TYPE_ACTION (gtk_action_get_type ())
#define GTK_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ACTION, GtkAction))
#define GTK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACTION, GtkActionClass))
#define GTK_IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ACTION))
#define GTK_IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GTK_TYPE_ACTION))
#define GTK_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_ACTION, GtkActionClass))
typedef struct _GtkAction GtkAction;
typedef struct _GtkActionClass GtkActionClass;
typedef struct _GtkActionPrivate GtkActionPrivate;
struct _GtkAction
{
GObject object;
/*< private >*/
GtkActionPrivate *private_data;
};
struct _GtkActionClass
{