1
#ifndef __SP_UNIT_MENU_H__
2
#define __SP_UNIT_MENU_H__
7
* Generic (and quite unintelligent) grid item for gnome canvas
9
* Copyright (C) Lauris Kaplinski 2000
13
#include <glib/gtypes.h>
14
#include <gtk/gtkoptionmenu.h>
16
#include <helper/helper-forward.h>
19
/* Unit selector Widget */
21
#define SP_TYPE_UNIT_SELECTOR (sp_unit_selector_get_type())
22
#define SP_UNIT_SELECTOR(o) (GTK_CHECK_CAST((o), SP_TYPE_UNIT_SELECTOR, SPUnitSelector))
23
#define SP_UNIT_SELECTOR_CLASS(k) (GTK_CHECK_CLASS_CAST((k), SP_TYPE_UNIT_SELECTOR, SPUnitSelectorClass))
24
#define SP_IS_UNIT_SELECTOR(o) (GTK_CHECK_TYPE((o), SP_TYPE_UNIT_SELECTOR))
25
#define SP_IS_UNIT_SELECTOR_CLASS(k) (GTK_CHECK_CLASS_TYPE((k), SP_TYPE_UNIT_SELECTOR))
27
GType sp_unit_selector_get_type(void);
29
GtkWidget *sp_unit_selector_new(guint bases);
30
void sp_unit_selector_setsize(GtkWidget *us, guint w, guint h);
32
SPUnit const *sp_unit_selector_get_unit(SPUnitSelector const *selector);
34
void sp_unit_selector_set_bases(SPUnitSelector *selector, guint bases);
35
void sp_unit_selector_add_unit(SPUnitSelector *selector, SPUnit const *unit, int position);
37
void sp_unit_selector_set_unit(SPUnitSelector *selector, SPUnit const *unit);
38
void sp_unit_selector_add_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment);
39
void sp_unit_selector_remove_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment);
41
gboolean sp_unit_selector_update_test(SPUnitSelector const *selector);
43
double sp_unit_selector_get_value_in_pixels(SPUnitSelector const *selector, GtkAdjustment *adj);
44
void sp_unit_selector_set_value_in_pixels(SPUnitSelector *selector, GtkAdjustment *adj, double value);
53
c-file-style:"stroustrup"
54
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
59
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :