Code

Fix change in revision 9947 to be consistent with rest of the codebase.
[inkscape.git] / src / widgets / dash-selector.h
1 #ifndef __SP_DASH_SELECTOR_NEW_H__
2 #define __SP_DASH_SELECTOR_NEW_H__
4 /** @file
5  * @brief Option menu for selecting dash patterns
6  */
7 /* Authors:
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 <glibmm/ustring.h>
17 #include <gtkmm/box.h>
18 #include <sigc++/signal.h>
20 namespace Gtk {
21 class Container;
22 class OptionMenu;
23 class MenuItem;
24 class Adjustment;
25 }
27 // TODO: should we rather derive this from OptionMenu and add the spinbutton somehow else?
28 class SPDashSelector : public Gtk::HBox {
29 public:
30     SPDashSelector();
31     ~SPDashSelector();
33     void set_dash(int ndash, double *dash, double offset);
34     void get_dash(int *ndash, double **dash, double *offset);
36     sigc::signal<void> changed_signal;
38 private:
39     static void init_dashes();
40     void dash_activate(Gtk::MenuItem *mi);
41     void offset_value_changed();
42     Gtk::MenuItem *menu_item_new(double *pattern);
44     Gtk::OptionMenu *dash;
45     Gtk::Adjustment *offset;
46     
47     static gchar const *const _prefs_path;
48 };
50 #endif
52 /*
53   Local Variables:
54   mode:c++
55   c-file-style:"stroustrup"
56   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57   indent-tabs-mode:nil
58   fill-column:99
59   End:
60 */
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :