gtkexpander.h

00001 /* GTK - The GIMP Toolkit
00002  *
00003  * Copyright (C) 2003 Sun Microsystems, Inc.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public
00016  * License along with this library; if not, write to the
00017  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02111-1301, USA.
00019  *
00020  * Authors:
00021  *  Mark McLoughlin <mark@skynet.ie>
00022  */
00023 
00024 #ifndef __GTK_EXPANDER_H__
00025 #define __GTK_EXPANDER_H__
00026 
00027 #include <gtk/gtkbin.h>
00028 
00029 G_BEGIN_DECLS
00030 
00031 #define GTK_TYPE_EXPANDER            (gtk_expander_get_type ())
00032 #define GTK_EXPANDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_EXPANDER, GtkExpander))
00033 #define GTK_EXPANDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_EXPANDER, GtkExpanderClass))
00034 #define GTK_IS_EXPANDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_EXPANDER))
00035 #define GTK_IS_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EXPANDER))
00036 #define GTK_EXPANDER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_EXPANDER, GtkExpanderClass))
00037 
00038 typedef struct _GtkExpander        GtkExpander;
00039 typedef struct _GtkExpanderClass   GtkExpanderClass;
00040 typedef struct _GtkExpanderPrivate GtkExpanderPrivate;
00041 
00042 struct _GtkExpander
00043 {
00044   GtkBin              bin;
00045 
00046   GtkExpanderPrivate *priv;
00047 };
00048 
00049 struct _GtkExpanderClass
00050 {
00051   GtkBinClass    parent_class;
00052 
00053   /* Key binding signal; to get notification on the expansion
00054    * state connect to notify:expanded.
00055    */
00056   void        (* activate) (GtkExpander *expander);
00057 };
00058 
00059 GType                 gtk_expander_get_type          (void) G_GNUC_CONST;
00060 
00061 GtkWidget            *gtk_expander_new               (const gchar *label);
00062 GtkWidget            *gtk_expander_new_with_mnemonic (const gchar *label);
00063 
00064 void                  gtk_expander_set_expanded      (GtkExpander *expander,
00065                               gboolean     expanded);
00066 gboolean              gtk_expander_get_expanded      (GtkExpander *expander);
00067 
00068 /* Spacing between the expander/label and the child */
00069 void                  gtk_expander_set_spacing       (GtkExpander *expander,
00070                               gint         spacing);
00071 gint                  gtk_expander_get_spacing       (GtkExpander *expander);
00072 
00073 void                  gtk_expander_set_label         (GtkExpander *expander,
00074                               const gchar *label);
00075 G_CONST_RETURN gchar *gtk_expander_get_label         (GtkExpander *expander);
00076 
00077 void                  gtk_expander_set_use_underline (GtkExpander *expander,
00078                               gboolean     use_underline);
00079 gboolean              gtk_expander_get_use_underline (GtkExpander *expander);
00080 
00081 void                  gtk_expander_set_use_markup    (GtkExpander *expander,
00082                               gboolean    use_markup);
00083 gboolean              gtk_expander_get_use_markup    (GtkExpander *expander);
00084 
00085 void                  gtk_expander_set_label_widget  (GtkExpander *expander,
00086                               GtkWidget   *label_widget);
00087 GtkWidget            *gtk_expander_get_label_widget  (GtkExpander *expander);
00088 
00089 G_END_DECLS
00090 
00091 #endif /* __GTK_EXPANDER_H__ */