gtk2/gtk/gtklabel.h

147 lines
4.5 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., 675 Mass Ave, Cambridge, MA 02139, 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/.
*/
1997-11-24 22:37:52 +00:00
#ifndef __GTK_LABEL_H__
#define __GTK_LABEL_H__
#include <gdk/gdk.h>
#include <gtk/gtkmisc.h>
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
#include <gtk/gtkwindow.h>
1997-11-24 22:37:52 +00:00
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_LABEL (gtk_label_get_type ())
#define GTK_LABEL(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_LABEL, GtkLabel))
#define GTK_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LABEL, GtkLabelClass))
#define GTK_IS_LABEL(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_LABEL))
#define GTK_IS_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LABEL))
#define GTK_LABEL_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_LABEL, GtkLabelClass))
1997-11-24 22:37:52 +00:00
typedef struct _GtkLabel GtkLabel;
typedef struct _GtkLabelClass GtkLabelClass;
typedef struct _GtkLabelSelectionInfo GtkLabelSelectionInfo;
1997-11-24 22:37:52 +00:00
struct _GtkLabel
{
GtkMisc misc;
/*< private >*/
gchar *label;
fixed an assertment. Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment. * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from, this should eventually be done by gentypeinfo.el somewhen. * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays. * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the enum values of an enum type. * gtk/gtk.defs: * gtk/gtkcurve.h: * gtk/gtkobject.h: * gtk/gtkprivate.h: * gtk/gtkwidget.h: * gtk/gtkenums.h: brought enum/flags definitions in sync, added a few more enum definitions for bindings and pattern matching. * some more macro and GtkType fixups in various places. * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used as a key-release modifier for the binding system. Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it was a stale list pointer that is already present in GtkMenuShell. * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal GtkMenuShell::selection_done which is emitted after the menu shell poped down again and all possible menu items have been activated. Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue before activation of the menuitem, so the menu is actually taken off the screen prior to any menu item activation. * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation for NULL nodes. * gtk/gtkwidget.h: * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop the emission of the "add-accelerator" signal on a widget. this is usefull to prevent accelerator installation on certain widgets. * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu labels left justified, by setting their alignment. stop accelerator installation for the menu items, since we use dynamic menus. Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org> * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people should *really* use GtkItemFactory. this is only for preserving source compatibility where possible, use of GtkMenuFactory is deprecated as of now. * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function to create user signals of type GTK_RUN_NO_RECURSE. don't know why i missed this possibility when i added gtk_object_class_add_user_signal in late january. * gtk/gtkmain.c (gtk_init): ignore subsequent function calls. Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org> * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c: new implementation of the accelerator concept. * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features display of the accelerators associated with a certain widget. * gtk/gtkitemfactory.h: * gtk/gtkitemfactory.c: new widget, item factory with automatic rc parsing and accelerator handling. * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for positioning a menu. (gtk_menu_map): removed the allocation code. (gtk_menu_size_allocate): care for redrawing of children and resize our widget->window correctly. (gtk_menu_key_press): feature the new accelerator groups. * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the submenu if neccessary. * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label() function variants. * gdk/gdk.c: (gdk_keyval_from_name): (gdk_keyval_name): new functions for keyval<->key-name associations. (gdk_keyval_to_upper): (gdk_keyval_to_lower): (gdk_keyval_is_upper): (gdk_keyval_is_lower): new functions to check/translate keyvalues with regards to their cases. Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org> * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a widget's class path. (gtk_widget_path): new function to calculate a widget's name path. * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
guint jtype : 2;
guint wrap : 1;
guint use_underline : 1;
guint use_markup : 1;
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
guint mnemonic_keyval;
gchar *text;
PangoAttrList *attrs;
PangoLayout *layout;
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
GtkWidget *mnemonic_widget;
GtkWindow *mnemonic_window;
GtkLabelSelectionInfo *select_info;
1997-11-24 22:37:52 +00:00
};
struct _GtkLabelClass
{
GtkMiscClass parent_class;
};
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
GtkType gtk_label_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_label_new (const char *str);
GtkWidget *gtk_label_new_with_mnemonic (const char *str);
Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat(). Fri Feb 2 12:26:50 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrc.c (gtk_rc_add_initial_default_files): Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat(). * gtk/gtkrc.c Makefile.am: Use $(libdir), not $(exe_prefix), since some people set $(libdir) separately. (#1290, David Kaelbling) Thu Feb 1 18:25:46 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkfilesel.c: If PATH_MAX and MAXPATHLEN are not defined, define MAXPATHLEN to 2048. (The Hurd doesn't have MAXPATHLEN, but the code here depends on a fixed value.) (#4524) Wed Jan 31 22:01:04 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkhandlebox.c (gtk_handle_box_button_changed): Handle the case where child == NULL and handle_position == RIGHT or BOTTOM. (#8041g) Wed Jan 31 21:20:39 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkctree.c (real_tree_move): If the node being moved isn't viewable there is no way that moving the node will cause the focus row to become not viewable, so omit check on the visibility of new_sibling, which is irrelevant. (Fixes #8002, David Helder) Wed Jan 31 20:38:17 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkentry.c (gtk_entry_commit_cb): Delete the current selection before inserting new text. Wed Jan 31 18:49:33 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkoptionmenu.c (gtk_option_menu_item_state_changed_cb): Make the sensitivity of the reparented child track that of the original parent menu item. (#34218, David Hodson) * gtk/gtkoptionmenu.c (gtk_option_menu_item_destroy_cb): Handle the case where the current item is destroyed properly. * gtk/gtkoptionmenu.c: Some additional code cleanups and fix some edge cases with child-less menuitems. Wed Jan 31 17:16:13 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkcombo.c (gtk_combo_window_key_press): Make Return key pop down window. (#12074, Jon K Hellan) Wed Jan 31 16:21:42 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtklist.c (gtk_list_signal_item_toggle): Don't allow toggling of rows off in BROWSE or EXTENDED mode. (#12072, Jon K Hellan) The solution here isn't perfect - you get an extraneous emission of "toggle", which could conceivably confuse an app, but better than the current situation. LXR search seems to indicate that no apps in GNOME CVS connect to "toggle". Wed Jan 31 15:46:13 2001 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am (libgtkinclude_HEADERS): Move gtkcompat.h from gtk_public_h_sources to directly here to avoid warning when building srcdir != builddir. (#9656) Tue Jan 30 19:49:02 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkrange.c: Patch from Kipp Hickman to make the event handlers in gtkrange.c return the proper values (TRUE == handled) (#10316). This is just the tip of the iceberg, but gtkrange.c is the most common place where the propagation is problematical, and also a place where it is almost certainly safe to change this in the stable branch. (You don't want right click popups on a range control or anything...) Tue Jan 30 18:57:59 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtktext.c (clear_focus_area): We need to clear the focus area on focus out, even if a background pixmap isn't set. (#13941) Tue Jan 30 18:24:10 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c (gtk_notebook_set_shape): Fix from Sean Cunningham to deal with setting the shape properly when scrolling arrows are turned on, but not visible because there is sufficient space. (#13432) Tue Jan 30 16:39:25 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkitemfactory.c (gtk_item_factory_delete_item): For menu items with submenus, destroy the item along with the submenu. (#7841, Brian Masney(?)) Also, handle paths of the form '<foo>/abcd...' properly. * gtk/testgtk.c (menu_items): Add a dummy branch that we delete later. Tue Jan 30 15:51:25 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_real_set_focus): Fix a problem where the focus widget sometimes wasn't drawn with the default if there was no default widget. * gtk/gtkstyle.c (gtk_style_real_unrealize): free colors, unreference pixmaps. * gtk/gtkstyle.c (gtk_style_realize): Reference colormap for some extra safety. Mon Jan 29 19:00:01 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtk{ctree.c,clist.c} (set_cell_contents): Handle setting the text of a cell to the old pointer value better, by copying the new text before freeing the old text. Some code cleanup. (#8079, Karl Nelson) Mon Jan 29 16:50:19 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.[ch] gtk/gtkframe.[ch]: Make gtk_label_get_text() gtk_frame_get_label() non strdup'ing, and G_CONST_RETURN. Mon Jan 29 15:22:51 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkmenu.c (gtk_menu_remove): When removing an item from a menu, check to see if it matches menu->old_active_menu_item, and if so, unref and clear old_active_menu_item (Patch from Pavel Cisler) * gtk/gtkmenushell.c (gtk_menu_shell_remove): Unset menu_shell->active_menu_item, if it is the child being removed. (Patch based on that of Gene Ragan, #50337)
2001-02-02 17:53:29 +00:00
void gtk_label_set_text (GtkLabel *label,
const char *str);
G_CONST_RETURN gchar *gtk_label_get_text (GtkLabel *label);
void gtk_label_set_attributes (GtkLabel *label,
PangoAttrList *attrs);
void gtk_label_set_markup (GtkLabel *label,
const gchar *str);
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
void gtk_label_set_markup_with_mnemonic (GtkLabel *label,
const gchar *str);
guint gtk_label_get_mnemonic_keyval (GtkLabel *label);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern);
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed 2001-03-21 Alexander Larsson <alexl@redhat.com> * gtk/gtkbutton.[ch]: * gtk/gtkdialog.c: Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed accel_group argument. Renamed gtk_button_new_accel() to gtk_button_new_with_mnemonic() and removed accel_group argument. * gtk/gtkcheckbutton.[ch]: New function gtk_check_button_new_with_mnemonic(). * gtk/gtkentry.c: Override activate_mnemonic and just grab focus. * gtk/gtkitemfactory.c: Don't add menu uline accel group, instead use mnemonics support. * gtk/gtklabel.[ch]: New support for mnemonics. * gtk/gtkmarshal.list: Needed BOOLEAN:BOOLEAN for activate_mnemonic. * gtk/gtkmenu.[c]: * gtkmenushell.c: Use mnemonics instead of accel groups for uline support in menu items. Removed gtk_menu_get_uline_accel_group() and gtk_menu_ensure_uline_accel_group(). * gtk/gtkmenuitem.c: Override activate_mnemonic to handle switching between menu items if there are collisions. * gtk/gtknotebook.c: Connect to activate_mnemonic on the tab_label, so that activating it switches to that notebook page. * gtk/gtkwidget.[ch]: Add activate_mnemonic signal. New function gtk_widget_activate_mnemonic() to emit it. Default implementation does activate/grab_focus. * gtk/gtkwindow.[ch]: Add support for mnemonics in windows. New functions: gtk_window_add_mnemonic, gtk_window_remove_mnemonic, gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier * gtk/testgtk.c: Update to function name changes.
2001-03-21 18:58:28 +00:00
void gtk_label_set_text_with_mnemonic (GtkLabel *label,
const gchar *string);
void gtk_label_set_mnemonic_widget (GtkLabel *label,
GtkWidget *widget);
Added gdk_text/string_extents() - too calculate all the metrics at once of Tue Jul 21 12:42:01 1998 Owen Taylor <otaylor@redhat.com> * gdk/gdk.h gdk/gdkfont.c: Added gdk_text/string_extents() - too calculate all the metrics at once of a string, including things which weren't calculated before. * gtk/Makefile.am gtk/gtk.h gtk/gtktearoffmenu.[ch]: New MenuItem type, that when put as the first thing in a menu, makes the menu tearoff. Currently drawn as a dashed line. * gtk/gtkmenuitem.h gtk/gtkcheckmenuitem.c: Added a flag "hide_on_activate" to the MenuItem class structure to allow check and radio buttons to be changed with <Space> without hiding the menu. * gtk/gtkaccellabel.[ch]: Added new capabilities to set a underline_group and underline_mods for the label - accelerators added in the underline group matching underline_mods will be displayed as an underline character. This doesn't work - Save As needs to be underlined as Save _As. * gtk/gtkitemfactory.c: - Create a AccelGroup for each MenuShell we create. - If an '&' appears before a character 'c' in the path, then make 'c' an accelerator in the menu's accel group, and if the menuitem is menubar <alt>C an accelerator in the itemfactory's accel group. * gtk/gtklabel.[ch]: Add support for a pattern arg - which is a string. If an '_' appears in this string, the corresponding position in the label is underlined. Add gtk_label_parse_uline() convenience function which takes a string with embedded underlines, sets the pattern and label, and returns the accelerator keyval. * gtk/gtkmenu.[ch]: Make menus no longer a toplevel widget. Instead, they create a GtkWindow and add themselves to that. (When torn off, another new feature, they create another GtkWindow to hold the torn off menu) New function gtk_menu_set_tearoff_state() * gtk/gtkenums.h gtk/gtkmenushell.[ch] gtk/gtkenums.h: Added action signals for keyboard navigation of menus. * gtk/gtkmenushell.c: Key press handler which activates bindings for navigation, and accelerators, for handling underline accelerators. Exported functions to select and activate menu items in a menushell. * gtk/testgtk.c: Added a new "Item Factory" test which tests GtkItemFactory and the new keyboard navigation of menus.
1998-08-12 16:49:13 +00:00
void gtk_label_set_selectable (GtkLabel *label,
gboolean setting);
gboolean gtk_label_get_selectable (GtkLabel *label);
void gtk_label_select_region (GtkLabel *label,
gint start_offset,
gint end_offset);
new function, turns off decorations for a window. 2001-03-07 Havoc Pennington <hp@redhat.com> * gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns off decorations for a window. * demos/gtk-demo/button_box.c (create_bbox): adapt to button box changes * gtk/gtklabel.c (gtk_label_get_layout_offsets): new function to get location of PangoLayout inside the label, closes #51198 * gtk/testgtk.c (create_bbox): fix up button box usage * gtk/testcalendar.c (create_calendar): fix up button box usage * gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage * gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage * gtk/gtkhbbox.h: deprecations * gtk/gtkvbbox.h: deprecations * gtk/gtkbox.c (gtk_box_get_spacing): new function, used to emulate deprecated gtk_button_box_get_spacing * gtk/gtkbbox.h: deprecate some useless functions, remove entirely the "set global default" functions (struct _GtkButtonBox): remove "spacing" field, use the one from GtkBox base class * gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore * gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to render the icon, return the missing image icon. * gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing image icon if the load fails. * gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use when no image is found; should be the Netscape "missing image" icon eventually but for now is a random image * gtk/gtkwindow.c (gtk_window_set_role): new function, sets the role for the session manager * gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG * gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL * gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
void gtk_label_get_layout_offsets (GtkLabel *label,
gint *x,
gint *y);
#ifndef GTK_DISABLE_COMPAT_H
# define gtk_label_set gtk_label_set_text
#endif /* GTK_DISABLE_COMPAT_H */
#ifndef GTK_DISABLE_DEPRECATED
/* Deprecated */
void gtk_label_get (GtkLabel *label,
char **str);
/* Convenience function to set the name and pattern by parsing
* a string with embedded underscores, and return the appropriate
* key symbol for the accelerator.
*/
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
#endif /* GTK_DISABLE_DEPRECATED */
1997-11-24 22:37:52 +00:00
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GTK_LABEL_H__ */