planner-popup-entry.h 2.37 KB
Newer Older
Richard Hult's avatar
Richard Hult committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2001-2002 CodeFactory AB
 * Copyright (C) 2001-2002 Richard Hult <richard@imendio.com>
 * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

Richard Hult's avatar
Richard Hult committed
23 24
#ifndef __PLANNER_POPUP_ENTRY_H__
#define __PLANNER_POPUP_ENTRY_H__
Richard Hult's avatar
Richard Hult committed
25 26

#include <pango/pango.h>
27
#include <gtk/gtk.h>
Richard Hult's avatar
Richard Hult committed
28

Richard Hult's avatar
Richard Hult committed
29 30 31 32 33 34
#define PLANNER_TYPE_POPUP_ENTRY		(planner_popup_entry_get_type ())
#define PLANNER_POPUP_ENTRY(obj)		(GTK_CHECK_CAST ((obj), PLANNER_TYPE_POPUP_ENTRY, PlannerPopupEntry))
#define PLANNER_POPUP_ENTRY_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), PLANNER_TYPE_POPUP_ENTRY, PlannerPopupEntryClass))
#define PLANNER_IS_POPUP_ENTRY(obj)		(GTK_CHECK_TYPE ((obj), PLANNER_TYPE_POPUP_ENTRY))
#define PLANNER_IS_POPUP_ENTRY_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((obj), PLANNER_TYPE_POPUP_ENTRY))
#define PLANNER_POPUP_ENTRY_GET_CLASS(obj)	(GTK_CHECK_GET_CLASS ((obj), PLANNER_TYPE_POPUP_ENTRY, PlannerPopupEntryClass))
Richard Hult's avatar
Richard Hult committed
35

Richard Hult's avatar
Richard Hult committed
36 37
typedef struct _PlannerPopupEntry      PlannerPopupEntry;
typedef struct _PlannerPopupEntryClass PlannerPopupEntryClass;
Richard Hult's avatar
Richard Hult committed
38

Richard Hult's avatar
Richard Hult committed
39
struct _PlannerPopupEntry
Richard Hult's avatar
Richard Hult committed
40 41 42 43 44 45 46 47 48 49
{
	GtkEventBox  parent;

	GtkWidget   *hbox;
	GtkWidget   *button;
	GtkWidget   *entry;

	gboolean     editing_canceled;
};

Richard Hult's avatar
Richard Hult committed
50
struct _PlannerPopupEntryClass
Richard Hult's avatar
Richard Hult committed
51 52 53 54
{
	GtkEventBoxClass parent_class;
};

55
GtkType      planner_popup_entry_get_type   (void) G_GNUC_CONST;
Richard Hult's avatar
Richard Hult committed
56 57 58

GtkWidget   *planner_popup_entry_new        (void);

Richard Hult's avatar
Richard Hult committed
59
void         planner_popup_entry_set_text   (PlannerPopupEntry *popup,
Richard Hult's avatar
Richard Hult committed
60 61
					const gchar  *text);

Richard Hult's avatar
Richard Hult committed
62
const gchar *planner_popup_entry_get_text   (PlannerPopupEntry *popup);
Richard Hult's avatar
Richard Hult committed
63 64 65 66

gint         planner_popup_get_button_width (void);


Richard Hult's avatar
Richard Hult committed
67
#endif /* __PLANNER_POPUP_ENTRY_H__ */