gtk2/gtk/gtkoptionmenu.h

91 lines
2.9 KiB
C
Raw Normal View History

1997-11-24 22:37:52 +00:00
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
1997-11-24 22:37:52 +00:00
* 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
* Lesser General Public License for more details.
1997-11-24 22:37:52 +00:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
1997-11-24 22:37:52 +00:00
*/
/*
* Modified by the GTK+ Team and others 1997-2000. 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_DISABLE_DEPRECATED
1997-11-24 22:37:52 +00:00
#ifndef __GTK_OPTION_MENU_H__
#define __GTK_OPTION_MENU_H__
#include <gdk/gdk.h>
#include <gtk/gtkbutton.h>
G_BEGIN_DECLS
1997-11-24 22:37:52 +00:00
#define GTK_TYPE_OPTION_MENU (gtk_option_menu_get_type ())
#define GTK_OPTION_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenu))
#define GTK_OPTION_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
#define GTK_IS_OPTION_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_OPTION_MENU))
#define GTK_IS_OPTION_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OPTION_MENU))
#define GTK_OPTION_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
1997-11-24 22:37:52 +00:00
typedef struct _GtkOptionMenu GtkOptionMenu;
typedef struct _GtkOptionMenuClass GtkOptionMenuClass;
struct _GtkOptionMenu
{
GtkButton button;
1997-11-24 22:37:52 +00:00
GtkWidget *menu;
GtkWidget *menu_item;
1997-11-24 22:37:52 +00:00
guint16 width;
guint16 height;
};
struct _GtkOptionMenuClass
{
GtkButtonClass parent_class;
Adapt to uscore-ification of gtktextiterprivate 2001-01-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c: Adapt to uscore-ification of gtktextiterprivate * gtk/gtktextdisplay.c (gtk_text_layout_draw): remove use of private functions; remove inclusion of private headers. * gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_line): Add this function, so we don't need private functions in gtktextdisplay.c * gtk/gtktextiterprivate.h: underscore-ification * gtk/gtkwidget.c: Clean up a bunch of docs that said "INTERNAL" to instead say "only useful to implement widgets" * gtk/gtkenums.h (GtkMovementStep): Rename GTK_MOVEMENT_CHARS, GTK_MOVEMENT_POSITIONS to GTK_MOVEMENT_LOGICAL_POSITIONS, GTK_MOVEMENT_VISUAL_POSITIONS. Resolves bug 40249. * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap): This function was completely broken * gtk/testtext.c (line_numbers_expose): use gtk_paint_layout * gtk/gtkvscale.c (gtk_vscale_draw_value): use gtk_paint_layout * gtk/gtkvruler.c (gtk_vruler_draw_ticks): use gtk_paint_layout * gtk/gtklabel.c (gtk_label_expose): use gtk_paint_layout * gtk/gtkhscale.c (gtk_hscale_draw_value): use gtk_paint_layout * gtk/gtkhruler.c (gtk_hruler_draw_ticks): use gtk_paint_layout * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): use gtk_paint_layout * gtk/gtkaccellabel.c (gtk_accel_label_expose_event): use gtk_paint_layout * gtk/gtkstyle.h: Add draw/paint expander to draw tree expanders. Progress on bug 40103. Add draw_layout to draw a PangoLayout. (struct _GtkStyleClass): Remove draw_cross, draw_oval, draw_ramp, which were not implemented. * gtk/gtktextbuffer.h (struct _GtkTextBufferClass): Add insert_pixbuf signal. Rename delete_text to delete_range since it also deletes pixbufs and child anchors. This almost closes bug 40245 (still need to deal with child anchors) * gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Add insert_pixbuf, change signal names as appropriate, change types of signals taking marks/tags to have the specific type, not just G_TYPE_OBJECT * gtk/gtkmain.c (gtk_get_current_event_state): Add this function; closes bug 40051 * gtk/gtkoptionmenu.c (gtk_option_menu_set_history): clean up unnecessary remove_contents() call (gtk_option_menu_class_init): add a "changed" signal, closes bug 40039 (gtk_option_menu_update_contents): emit "changed" if the active menu item changes * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done): fix bad cast to GtkObject, reported by Jonas Borgstrom (gdk_pixbuf_loader_finalize): don't close the loader on finalize; we can't do stuff with side effects in finalize. Instead, spew a warning if the loader isn't closed. * gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_finalize): free colormap in here, non-X ports probably need to sync to this change * gdk/x11/gdkdrawable-x11.c (gdk_x11_set_colormap): remove assertion that colormap != NULL, you can set the colormap to NULL if you like. * Makefile.am: remove gtk-config-2.0 * configure.in: Use pkg-config to locate GLib. Remove separated-out GMODULE_LIBS, GMODULE_CFLAGS; these were not used, and the gmodule libs/cflags were in GLIB_LIBS GLIB_CFLAGS anyhow. Use pkg-config to locate Pango. Output correct Pango libs to gdk-2.0.pc.in. Fix test for FREETYPE_CONFIG (typo fix). * Makefile.am (pkgconfig_DATA): install only target-specific pc files (install-data-local): symlink gtk+-2.0.pc and gdk-2.0.pc to the X11 pc files * gtk+-2.0.pc.in (Requires): require the GDK for the current target unref from here
2001-01-04 17:48:43 +00:00
void (*changed) (GtkOptionMenu *option_menu);
/* Padding for future expansion */
void (*_gtk_reserved1) (void);
void (*_gtk_reserved2) (void);
void (*_gtk_reserved3) (void);
void (*_gtk_reserved4) (void);
1997-11-24 22:37:52 +00:00
};
GType gtk_option_menu_get_type (void) G_GNUC_CONST;
1997-11-24 22:37:52 +00:00
GtkWidget* gtk_option_menu_new (void);
GtkWidget* gtk_option_menu_get_menu (GtkOptionMenu *option_menu);
void gtk_option_menu_set_menu (GtkOptionMenu *option_menu,
GtkWidget *menu);
void gtk_option_menu_remove_menu (GtkOptionMenu *option_menu);
gint gtk_option_menu_get_history (GtkOptionMenu *option_menu);
1997-11-24 22:37:52 +00:00
void gtk_option_menu_set_history (GtkOptionMenu *option_menu,
docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml Fri Nov 8 20:14:52 2002 Soeren Sandmann <sandmann@daimi.au.dk> * docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml docs/reference/gdk/tmpl/gdk-unused.sgml docs/reference/gdk/tmpl/gdkdisplay.sgml docs/reference/gdk/tmpl/general.sgml docs/reference/gdk/tmpl/input_devices.sgml docs/reference/gdk/tmpl/selections.sgml docs/reference/gtk/tmpl/gtkcellrenderer.sgml docs/reference/gtk/tmpl/gtkcurve.sgml docs/reference/gtk/tmpl/gtkdnd.sgml docs/reference/gtk/tmpl/gtkitemfactory.sgml docs/reference/gtk/tmpl/gtkmenu.sgml docs/reference/gtk/tmpl/gtkoldeditable.sgml docs/reference/gtk/tmpl/gtkoptionmenu.sgml docs/reference/gtk/tmpl/gtkpreview.sgml docs/reference/gtk/tmpl/gtkselection.sgml docs/reference/gtk/tmpl/gtksocket.sgml docs/reference/gtk/tmpl/gtkstyle.sgml docs/reference/gtk/tmpl/gtktextbuffer.sgml docs/reference/gtk/tmpl/gtktreemodel.sgml docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c gtk/gtktreemodel.h gtk/gtkwidget.h Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow without warnings. (#91680)
2002-11-08 19:41:50 +00:00
guint index_);
1997-11-24 22:37:52 +00:00
G_END_DECLS
1997-11-24 22:37:52 +00:00
#endif /* __GTK_OPTION_MENU_H__ */
#endif /* GTK_DISABLE_DEPRECATED */