97e0b7379235bdeff207e2b10c455108a566d13b
1 #ifndef __SP_DASH_SELECTOR_NEW_H__
2 #define __SP_DASH_SELECTOR_NEW_H__
4 /*
5 * Optionmenu for selecting dash patterns
6 *
7 * Author:
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * Maximilian Albert <maximilian.albert> (gtkmm-ification)
10 *
11 * Copyright (C) 2002 Lauris Kaplinski
12 *
13 * Released under GNU GPL, read the file 'COPYING' for more information
14 */
16 #include "xml/repr.h"
18 #include <gtkmm/box.h>
19 #include <sigc++/signal.h>
21 namespace Gtk {
22 class Container;
23 class OptionMenu;
24 class MenuItem;
25 class Adjustment;
26 }
28 // TODO: should we rather derive this from OptionMenu and add the spinbutton somehow else?
29 class SPDashSelector : public Gtk::HBox {
30 public:
31 SPDashSelector(Inkscape::XML::Node *drepr);
32 ~SPDashSelector();
34 void set_dash(int ndash, double *dash, double offset);
35 void get_dash(int *ndash, double **dash, double *offset);
37 sigc::signal<void> changed_signal;
39 private:
40 static void init_dashes(Inkscape::XML::Node *drepr);
41 void dash_activate(Gtk::MenuItem *mi);
42 void offset_value_changed();
43 Gtk::MenuItem *menu_item_new(double *pattern);
45 Gtk::OptionMenu *dash;
46 Gtk::Adjustment *offset;
47 };
49 #endif
51 /*
52 Local Variables:
53 mode:c++
54 c-file-style:"stroustrup"
55 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
56 indent-tabs-mode:nil
57 fill-column:99
58 End:
59 */
60 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :