You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

100 line
3.9 KiB

  1. /* gtktoolbutton.h
  2. *
  3. * Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
  4. * Copyright (C) 2002 James Henstridge <james@daa.com.au>
  5. * Copyright (C) 2003 Soeren Sandmann <sandmann@daimi.au.dk>
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the
  19. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20. * Boston, MA 02111-1307, USA.
  21. */
  22. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  23. #error "Only <gtk/gtk.h> can be included directly."
  24. #endif
  25. #ifndef __GTK_TOOL_BUTTON_H__
  26. #define __GTK_TOOL_BUTTON_H__
  27. #include <gtk/gtktoolitem.h>
  28. G_BEGIN_DECLS
  29. #define GTK_TYPE_TOOL_BUTTON (gtk_tool_button_get_type ())
  30. #define GTK_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButton))
  31. #define GTK_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_BUTTON, GtkToolButtonClass))
  32. #define GTK_IS_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOL_BUTTON))
  33. #define GTK_IS_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOL_BUTTON))
  34. #define GTK_TOOL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonClass))
  35. typedef struct _GtkToolButton GtkToolButton;
  36. typedef struct _GtkToolButtonClass GtkToolButtonClass;
  37. typedef struct _GtkToolButtonPrivate GtkToolButtonPrivate;
  38. struct _GtkToolButton
  39. {
  40. GtkToolItem parent;
  41. /*< private >*/
  42. GtkToolButtonPrivate *GSEAL (priv);
  43. };
  44. struct _GtkToolButtonClass
  45. {
  46. GtkToolItemClass parent_class;
  47. GType button_type;
  48. /* signal */
  49. void (* clicked) (GtkToolButton *tool_item);
  50. /* Padding for future expansion */
  51. void (* _gtk_reserved1) (void);
  52. void (* _gtk_reserved2) (void);
  53. void (* _gtk_reserved3) (void);
  54. void (* _gtk_reserved4) (void);
  55. };
  56. GType gtk_tool_button_get_type (void) G_GNUC_CONST;
  57. GtkToolItem *gtk_tool_button_new (GtkWidget *icon_widget,
  58. const gchar *label);
  59. GtkToolItem *gtk_tool_button_new_from_stock (const gchar *stock_id);
  60. void gtk_tool_button_set_label (GtkToolButton *button,
  61. const gchar *label);
  62. G_CONST_RETURN gchar *gtk_tool_button_get_label (GtkToolButton *button);
  63. void gtk_tool_button_set_use_underline (GtkToolButton *button,
  64. gboolean use_underline);
  65. gboolean gtk_tool_button_get_use_underline (GtkToolButton *button);
  66. void gtk_tool_button_set_stock_id (GtkToolButton *button,
  67. const gchar *stock_id);
  68. G_CONST_RETURN gchar *gtk_tool_button_get_stock_id (GtkToolButton *button);
  69. void gtk_tool_button_set_icon_name (GtkToolButton *button,
  70. const gchar *icon_name);
  71. G_CONST_RETURN gchar *gtk_tool_button_get_icon_name (GtkToolButton *button);
  72. void gtk_tool_button_set_icon_widget (GtkToolButton *button,
  73. GtkWidget *icon_widget);
  74. GtkWidget * gtk_tool_button_get_icon_widget (GtkToolButton *button);
  75. void gtk_tool_button_set_label_widget (GtkToolButton *button,
  76. GtkWidget *label_widget);
  77. GtkWidget * gtk_tool_button_get_label_widget (GtkToolButton *button);
  78. /* internal function */
  79. GtkWidget *_gtk_tool_button_get_button (GtkToolButton *button);
  80. G_END_DECLS
  81. #endif /* __GTK_TOOL_BUTTON_H__ */