~ubuntu-branches/debian/sid/gnome-main-menu/sid

« back to all changes in this revision

Viewing changes to libslab/slab-section.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2009-11-08 21:22:49 UTC
  • mto: (5.1.3 squeeze)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20091108212249-9cql8cptajeua2eh
Tags: upstream-0.9.13
ImportĀ upstreamĀ versionĀ 0.9.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This file is part of libslab.
3
 
 *
4
 
 * Copyright (c) 2006 Novell, Inc.
5
 
 *
6
 
 * Libslab is free software; you can redistribute it and/or modify it under the
7
 
 * terms of the GNU Lesser General Public License as published by the Free
8
 
 * Software Foundation; either version 2 of the License, or (at your option)
9
 
 * any later version.
10
 
 *
11
 
 * Libslab is distributed in the hope that it will be useful, but WITHOUT ANY
12
 
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
 
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
14
 
 * more details.
15
 
 *
16
 
 * You should have received a copy of the GNU Lesser General Public License
17
 
 * along with libslab; if not, write to the Free Software Foundation, Inc., 51
18
 
 * Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
#ifndef __SLAB_SECTION_H__
22
 
#define __SLAB_SECTION_H__
23
 
 
24
 
#include <glib.h>
25
 
#include <gtk/gtkvbox.h>
26
 
 
27
 
G_BEGIN_DECLS
28
 
 
29
 
#define SLAB_SECTION_TYPE (slab_section_get_type ())
30
 
#define SLAB_SECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SLAB_SECTION_TYPE,    SlabSection))
31
 
#define SLAB_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SLAB_SECTION_TYPE, SlabSectionClass))
32
 
#define IS_SLAB_SECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SLAB_SECTION_TYPE ))
33
 
#define IS_SLAB_SECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SLAB_SECTION_TYPE ))
34
 
#define SLAB_SECTION_GET_CLASS(obj) (G_TYPE_CHECK_GET_CLASS ((obj), SLAB_SECTION_TYPE, SlabSectionClass))
35
 
 
36
 
#define SLAB_TOP_PADDING  5
37
 
#define SLAB_BOTTOM_PADDING  5
38
 
#define SLAB_LEFT_PADDING 10
39
 
 
40
 
typedef enum
41
 
{
42
 
        Style1,         /* SlabSections in left pane - no padding */
43
 
        Style2          /* SlabSections in right pane - padding, label text changes as group is selected */
44
 
} SlabStyle;
45
 
 
46
 
typedef struct
47
 
{
48
 
        GtkVBox parent_vbox;
49
 
 
50
 
        GtkWidget *title;
51
 
        GtkWidget *contents;
52
 
        SlabStyle style;
53
 
        gulong expose_handler_id;
54
 
        GtkBox *childbox;
55
 
        gboolean selected;
56
 
} SlabSection;
57
 
 
58
 
typedef struct
59
 
{
60
 
        GtkVBoxClass parent_class;
61
 
} SlabSectionClass;
62
 
 
63
 
GType slab_section_get_type (void);
64
 
GtkWidget *slab_section_new (const gchar * title, SlabStyle style);
65
 
GtkWidget *slab_section_new_with_markup (const gchar * title_markup, SlabStyle style);
66
 
void slab_section_set_title (SlabSection * section, const gchar * title);
67
 
void slab_section_set_contents (SlabSection * section, GtkWidget * contents);
68
 
void slab_section_set_selected (SlabSection * section, gboolean selected);
69
 
 
70
 
G_END_DECLS
71
 
#endif /* __SLAB_SECTION_H__ */