~carsten-munk/m-r/libhildon-2.1.24

« back to all changes in this revision

Viewing changes to src/hildon-caption.h

  • Committer: Carsten V. Munk
  • Date: 2008-12-08 15:00:57 UTC
  • Revision ID: cvm@cs.au.dk-20081208150057-7e0a50c8zdupbzar
initial commit of 2.1.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is a part of hildon
 
3
 *
 
4
 * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
 
5
 *
 
6
 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public License
 
10
 * as published by the Free Software Foundation; version 2.1 of
 
11
 * the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful, but
 
14
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
21
 * 02110-1301 USA
 
22
 *
 
23
 */
 
24
 
 
25
#ifndef                                         __HILDON_CAPTION_H__
 
26
#define                                         __HILDON_CAPTION_H__
 
27
 
 
28
#include                                        <gtk/gtk.h>
 
29
 
 
30
#include                                        "hildon-enum-types.h"
 
31
 
 
32
G_BEGIN_DECLS
 
33
 
 
34
typedef struct                                  _HildonCaption HildonCaption;
 
35
 
 
36
typedef struct                                  _HildonCaptionClass HildonCaptionClass;
 
37
 
 
38
#define                                         HILDON_TYPE_CAPTION (hildon_caption_get_type())
 
39
 
 
40
#define                                         HILDON_CAPTION(obj) \
 
41
                                                (GTK_CHECK_CAST (obj, HILDON_TYPE_CAPTION, HildonCaption))
 
42
 
 
43
#define                                         HILDON_CAPTION_CLASS(klass) \
 
44
                                                (GTK_CHECK_CLASS_CAST ((klass),\
 
45
                                                HILDON_TYPE_CAPTION, HildonCaptionClass))
 
46
 
 
47
#define                                         HILDON_IS_CAPTION(obj) \
 
48
                                                (GTK_CHECK_TYPE (obj, HILDON_TYPE_CAPTION))
 
49
 
 
50
#define                                         HILDON_IS_CAPTION_CLASS(klass) \
 
51
                                                (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_CAPTION))
 
52
    
 
53
/**
 
54
 * HildonCaptionStatus:
 
55
 * @HILDON_CAPTION_OPTIONAL: Optional.
 
56
 * @HILDON_CAPTION_MANDATORY: Mandatory.
 
57
 *
 
58
 * Keys to set the #HildonCaption to be optional or mandatory.
 
59
 */
 
60
typedef enum
 
61
{
 
62
    HILDON_CAPTION_OPTIONAL = 0,
 
63
    HILDON_CAPTION_MANDATORY
 
64
}                                               HildonCaptionStatus;
 
65
 
 
66
/**
 
67
 * HildonCaptionIconPosition:
 
68
 * @HILDON_CAPTION_POSITION_LEFT: Show the icon on the left side.
 
69
 * @HILDON_CAPTION_POSITION_RIGHT: Show the icon on the right side.
 
70
 *
 
71
 * Keys to set the icon placement in #HildonCaption.
 
72
 *
 
73
 */
 
74
typedef enum
 
75
{
 
76
    HILDON_CAPTION_POSITION_LEFT = 0,
 
77
    HILDON_CAPTION_POSITION_RIGHT
 
78
}                                               HildonCaptionIconPosition;
 
79
 
 
80
 
 
81
struct                                          _HildonCaption
 
82
{
 
83
    GtkEventBox parent;
 
84
};
 
85
 
 
86
 
 
87
struct                                          _HildonCaptionClass
 
88
{
 
89
    GtkEventBoxClass parent_class;
 
90
    void (*activate) (HildonCaption *widget);
 
91
};
 
92
 
 
93
GType G_GNUC_CONST
 
94
hildon_caption_get_type                         (void);
 
95
 
 
96
GtkWidget* 
 
97
hildon_caption_new                              (GtkSizeGroup *group, 
 
98
                                                 const gchar *value,
 
99
                                                 GtkWidget *control, 
 
100
                                                 GtkWidget *icon,
 
101
                                                 HildonCaptionStatus flag);
 
102
 
 
103
GtkSizeGroup*
 
104
hildon_caption_get_size_group                   (const HildonCaption *caption);
 
105
 
 
106
void 
 
107
hildon_caption_set_size_group                   (const HildonCaption *caption,
 
108
                                                 GtkSizeGroup *new_group );
 
109
 
 
110
gboolean 
 
111
hildon_caption_is_mandatory                     (const HildonCaption *caption);
 
112
 
 
113
void 
 
114
hildon_caption_set_status                       (HildonCaption *caption,
 
115
                                                 HildonCaptionStatus flag);
 
116
 
 
117
HildonCaptionStatus
 
118
hildon_caption_get_status                       (const HildonCaption *caption);
 
119
 
 
120
void 
 
121
hildon_caption_set_icon_position                (HildonCaption *caption,
 
122
                                                 HildonCaptionIconPosition pos );
 
123
 
 
124
HildonCaptionIconPosition
 
125
hildon_caption_get_icon_position                (const HildonCaption *caption);
 
126
 
 
127
void
 
128
hildon_caption_set_icon_image                   (HildonCaption *caption, 
 
129
                                                 GtkWidget *icon);
 
130
 
 
131
GtkWidget*
 
132
hildon_caption_get_icon_image                   (const HildonCaption *caption);
 
133
 
 
134
void
 
135
hildon_caption_set_label                        (HildonCaption *caption, 
 
136
                                                 const gchar *label );
 
137
 
 
138
gchar*
 
139
hildon_caption_get_label                        (const HildonCaption *caption);
 
140
 
 
141
void 
 
142
hildon_caption_set_separator                    (HildonCaption *caption, 
 
143
                                                 const gchar *separator);
 
144
 
 
145
gchar*
 
146
hildon_caption_get_separator                    (const HildonCaption *caption);
 
147
 
 
148
void 
 
149
hildon_caption_set_label_alignment              (HildonCaption *caption, 
 
150
                                                 gfloat alignment);
 
151
 
 
152
gfloat 
 
153
hildon_caption_get_label_alignment              (HildonCaption *caption);
 
154
 
 
155
void 
 
156
hildon_caption_set_child_expand                 (HildonCaption *caption, 
 
157
                                                 gboolean expand);
 
158
 
 
159
gboolean 
 
160
hildon_caption_get_child_expand                 (const HildonCaption *caption);
 
161
 
 
162
void
 
163
hildon_caption_set_label_markup                 (HildonCaption *caption,
 
164
                                                 const gchar *markup);
 
165
 
 
166
G_END_DECLS
 
167
 
 
168
#endif                                          /* __HILDON_CAPTION_H__ */