summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-attribute-widget.h
blob: bfa26e4f2a06a97b882e84e6d102db61e1c79b7a (plain)
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
/**
 * @file
 * Widget that listens and modifies repr attributes.
 */
/* Authors:
 *  Lauris Kaplinski <lauris@kaplinski.com>
 *  Kris De Gussem <Kris.DeGussem@gmail.com>
 *
 * Copyright (C) 2002,2011 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 <gtk/gtk.h>
#include <gtkmm.h>
#include <glib.h>
#include <stddef.h>
#include <sigc++/connection.h>

namespace Inkscape {
namespace XML {
class Node;
}
}

struct SPAttributeTable;
struct SPAttributeTableClass;
class  SPObject;

class SPAttributeTable : public Gtk::Widget {
public:
    SPAttributeTable ();
    SPAttributeTable (SPObject *object, std::vector<Glib::ustring> &labels, std::vector<Glib::ustring> &attributes, GtkWidget* ExpanderContainer);
    ~SPAttributeTable ();
    void set_object(SPObject *object, std::vector<Glib::ustring> &labels, std::vector<Glib::ustring> &attributes, GtkWidget* ExpanderContainer);
    void change_object(SPObject *object);
    // void set_repr(Inkscape::XML::Node *repr, std::vector<Glib::ustring> &labels, std::vector<Glib::ustring> &attributes, GtkWidget* ExpanderContainer);
    std::vector<Glib::ustring> get_attributes(void) {return _attributes;};
    std::vector<Gtk::Entry *> get_entries(void) {return _entries;};
    union {
        SPObject *object;
        Inkscape::XML::Node *repr;
    } src;
    guint blocked;
    guint hasobj;

private:
    Gtk::Table *table;
    std::vector<Glib::ustring> _attributes;
    std::vector<Gtk::Entry *> _entries;
    sigc::connection modified_connection;
    
    void clear(void);
};

#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 :