2008-08-30 13:53:46 -05:00
|
|
|
/*
|
|
|
|
* mooprefspage.h
|
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2008-08-30 13:53:46 -05:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit is free software; you can
|
|
|
|
* redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2008-08-30 13:53:46 -05:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2008-08-30 13:53:46 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MOO_PREFS_PAGE_H
|
|
|
|
#define MOO_PREFS_PAGE_H
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <mooutils/mooglade.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#define MOO_TYPE_PREFS_PAGE (moo_prefs_page_get_type ())
|
|
|
|
#define MOO_PREFS_PAGE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_PREFS_PAGE, MooPrefsPage))
|
|
|
|
#define MOO_PREFS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_PREFS_PAGE, MooPrefsPageClass))
|
|
|
|
#define MOO_IS_PREFS_PAGE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_PREFS_PAGE))
|
|
|
|
#define MOO_IS_PREFS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_PREFS_PAGE))
|
|
|
|
#define MOO_PREFS_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_PREFS_PAGE, MooPrefsPageClass))
|
|
|
|
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
typedef struct _MooPrefsPage MooPrefsPage;
|
|
|
|
typedef struct _MooPrefsPagePrivate MooPrefsPagePrivate;
|
|
|
|
typedef struct _MooPrefsPageClass MooPrefsPageClass;
|
2008-08-30 13:53:46 -05:00
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooPrefsPage
|
2008-08-30 13:53:46 -05:00
|
|
|
{
|
|
|
|
GtkVBox base;
|
|
|
|
MooPrefsPagePrivate *priv;
|
|
|
|
gboolean auto_apply;
|
|
|
|
char *label;
|
|
|
|
};
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooPrefsPageClass
|
2008-08-30 13:53:46 -05:00
|
|
|
{
|
|
|
|
GtkVBoxClass base_class;
|
2010-12-10 03:10:22 -08:00
|
|
|
/**vtable:MooPrefsPage**/
|
2008-08-30 13:53:46 -05:00
|
|
|
void (*init) (MooPrefsPage *page);
|
2010-12-10 03:10:22 -08:00
|
|
|
/**vtable:MooPrefsPage**/
|
2008-08-30 13:53:46 -05:00
|
|
|
void (*apply) (MooPrefsPage *page);
|
|
|
|
};
|
|
|
|
|
|
|
|
GType moo_prefs_page_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GtkWidget *moo_prefs_page_new (const char *label,
|
|
|
|
const char *icon_stock_id);
|
|
|
|
|
|
|
|
typedef void (*MooPrefsPageInitUi) (MooPrefsPage *page);
|
|
|
|
typedef void (*MooPrefsPageInit) (MooPrefsPage *page);
|
|
|
|
typedef void (*MooPrefsPageApply) (MooPrefsPage *page);
|
|
|
|
void moo_prefs_page_set_callbacks(MooPrefsPage *page,
|
|
|
|
MooPrefsPageInitUi init_ui,
|
|
|
|
MooPrefsPageInit init,
|
|
|
|
MooPrefsPageApply apply);
|
|
|
|
|
|
|
|
void moo_prefs_page_bind_setting (MooPrefsPage *page,
|
|
|
|
GtkWidget *widget,
|
|
|
|
const char *setting);
|
|
|
|
|
|
|
|
void moo_prefs_page_add_page (MooPrefsPage *page,
|
|
|
|
MooPrefsPage *child_page);
|
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* MOO_PREFS_PAGE_H */
|