diff options
| author | Geoff Lankow <geoff@darktrojan.net> | 2018-04-13 03:46:26 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-05-09 12:23:00 +0000 |
| commit | cca246da00beb707a032340f2b2f36e8da093194 (patch) | |
| tree | bd51357f4c9afddb1e2071ced98e71ab4da7a2ce /src/ui/widget/alignment-selector.h | |
| parent | Add buttons to align grids to page (diff) | |
| download | inkscape-cca246da00beb707a032340f2b2f36e8da093194.tar.gz inkscape-cca246da00beb707a032340f2b2f36e8da093194.zip | |
Create stateless alignment selector and use it instead
Diffstat (limited to 'src/ui/widget/alignment-selector.h')
| -rw-r--r-- | src/ui/widget/alignment-selector.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/ui/widget/alignment-selector.h b/src/ui/widget/alignment-selector.h new file mode 100644 index 000000000..43cd100ef --- /dev/null +++ b/src/ui/widget/alignment-selector.h @@ -0,0 +1,56 @@ +/* + * anchor-selector.h + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#ifndef ANCHOR_SELECTOR_H_ +#define ANCHOR_SELECTOR_H_ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <gtkmm/bin.h> +#include <gtkmm/button.h> +#include <gtkmm/grid.h> + +namespace Inkscape { +namespace UI { +namespace Widget { + +class AlignmentSelector : public Gtk::Bin +{ +private: + Gtk::Button _buttons[9]; + Gtk::Grid _container; + + sigc::signal<void, int> _alignmentClicked; + + void setupButton(const Glib::ustring &icon, Gtk::Button &button); + void btn_activated(int index); + +public: + + sigc::signal<void, int> &on_alignmentClicked() { return _alignmentClicked; } + + AlignmentSelector(); + virtual ~AlignmentSelector(); +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif /* ANCHOR_SELECTOR_H_ */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
