summaryrefslogtreecommitdiffstats
path: root/src/event.h
blob: 65a128da9fb1c33d3e6a8347fee0b07e8712879b (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
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef INKSCAPE_EVENT_H
#define INKSCAPE_EVENT_H

/*
 * Inkscape::Event -- Container for an XML::Event along with some additional information
 *                     describing it.
 *
 * Author:
 *   Gustav Broberg <broberg@kth.se>
 *
 * Copyright (c) 2006 Authors
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */


#include <glibmm/ustring.h>

#include <utility>

#include "xml/event-fns.h"
#include "verbs.h"

namespace Inkscape {
namespace XML {
class Event;
}
}

namespace Inkscape {

struct Event {
     
    Event(XML::Event *_event, unsigned int _type=SP_VERB_NONE, Glib::ustring _description="")
        : event (_event), type (_type), description (std::move(_description))  { }

    virtual ~Event() { sp_repr_free_log (event); }

    XML::Event *event;
    const unsigned int type;
    Glib::ustring description;
};

} // namespace Inkscape

#endif // INKSCAPE_EVENT_H

/*
  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 :