1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
/** @file
* @brief Widget that listens and modifies repr attributes
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2002 authors
* Copyright (C) 2001 Ximian, Inc.
*
* Licensed under GNU GPL, read the file 'COPYING' for more information
*/
#ifndef SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H
#define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H
#include <glib.h>
#include <stddef.h>
#include <sigc++/connection.h>
#define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ())
#define SP_ATTRIBUTE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_ATTRIBUTE_WIDGET, SPAttributeWidget))
#define SP_ATTRIBUTE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_ATTRIBUTE_WIDGET, SPAttributeWidgetClass))
#define SP_IS_ATTRIBUTE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_ATTRIBUTE_WIDGET))
#define SP_IS_ATTRIBUTE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_ATTRIBUTE_WIDGET))
#define SP_TYPE_ATTRIBUTE_TABLE (sp_attribute_table_get_type ())
#define SP_ATTRIBUTE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_ATTRIBUTE_TABLE, SPAttributeTable))
#define SP_ATTRIBUTE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_ATTRIBUTE_TABLE, SPAttributeTableClass))
#define SP_IS_ATTRIBUTE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_ATTRIBUTE_TABLE))
#define SP_IS_ATTRIBUTE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_ATTRIBUTE_TABLE))
namespace Inkscape {
namespace XML {
class Node;
}
}
struct SPAttributeWidget;
struct SPAttributeWidgetClass;
struct SPAttributeTable;
struct SPAttributeTableClass;
#include <gtk/gtk.h>
#include <forward.h>
struct SPAttributeWidget {
GtkEntry entry;
guint blocked : 1;
guint hasobj : 1;
union {
SPObject *object;
Inkscape::XML::Node *repr;
} src;
gchar *attribute;
sigc::connection modified_connection;
sigc::connection release_connection;
};
struct SPAttributeWidgetClass {
GtkEntryClass entry_class;
};
GType sp_attribute_widget_get_type (void);
GtkWidget *sp_attribute_widget_new (SPObject *object, const gchar *attribute);
GtkWidget *sp_attribute_widget_new_repr (Inkscape::XML::Node *repr, const gchar *attribute);
void sp_attribute_widget_set_object ( SPAttributeWidget *spw,
SPObject *object,
const gchar *attribute );
void sp_attribute_widget_set_repr ( SPAttributeWidget *spw,
Inkscape::XML::Node *repr,
const gchar *attribute );
/* SPAttributeTable */
struct SPAttributeTable {
GtkVBox vbox;
guint blocked : 1;
guint hasobj : 1;
GtkWidget *table;
union {
SPObject *object;
Inkscape::XML::Node *repr;
} src;
gint num_attr;
gchar **attributes;
GtkWidget **entries;
sigc::connection modified_connection;
sigc::connection release_connection;
};
struct SPAttributeTableClass {
GtkEntryClass entry_class;
};
GType sp_attribute_table_get_type (void);
GtkWidget *sp_attribute_table_new ( SPObject *object, gint num_attr,
const gchar **labels,
const gchar **attributes );
GtkWidget *sp_attribute_table_new_repr ( Inkscape::XML::Node *repr, gint num_attr,
const gchar **labels,
const gchar **attributes );
void sp_attribute_table_set_object ( SPAttributeTable *spw,
SPObject *object, gint num_attr,
const gchar **labels,
const gchar **attrs );
void sp_attribute_table_set_repr ( SPAttributeTable *spw,
Inkscape::XML::Node *repr, gint num_attr,
const gchar **labels,
const gchar **attrs );
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
|