summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/lpe-selector.cpp
blob: 5a2f39db43a5d2c3f667e8f9e957134b1c6375c1 (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
// SPDX-License-Identifier: GPL-2.0-or-later
/**
 * @file
 * Filter Effects dialog.
 */
/* Authors:
 *   Marc Jeanmougin
 *
 * Copyright (C) 2017 Authors
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

#include <glibmm/convert.h>
#include <glibmm/error.h>
#include <glibmm/i18n.h>
#include <glibmm/main.h>
#include <glibmm/stringutils.h>
#include "io/sys.h"
#include "io/resource.h"

namespace Inkscape {
namespace UI {

LPESelector::LPESelector() : Gtk::Box()
{
     
    const std::string req_widgets[] = {"LPESelector", "FilterList", "FilterFERX", "FilterFERY", "FilterFERH", "FilterFERW", "FilterPreview", "FilterPrimitiveDescImage", "FilterPrimitiveList", "FilterPrimitiveDescText", "FilterPrimitiveAdd"};
    Glib::ustring gladefile = get_filename(UIS, "lpe-selector.glade");
    try {
        builder = Gtk::Builder::create_from_file(gladefile);
    } catch(const Glib::Error& ex) {
        g_warning("Glade file loading failed for filter effect dialog");
        return;
    }

    Gtk::Object* test;
    for(std::string w:req_widgets) {
        builder->get_widget(w,test);
        if(!test){
            g_warning("Required widget %s does not exist", w.c_str());
            return;
            }
    }

    builder->get_widget("LPESelector", LPESelector);
    _getContents()->add(*LPESelector);

}
LPESelector::~LPESelector()= default;






} // Never put these namespaces together unless you are using gcc 6+
}

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