summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/polar-arrange-tab.h
blob: 0c5acdee99ced0a7f8b1474160dbed6efe8970f2 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// SPDX-License-Identifier: GPL-2.0-or-later
/**
 * @brief Arranges Objects into a Circle/Ellipse
 */
/* Authors:
 *   Declara Denis
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

#ifndef INKSCAPE_UI_DIALOG_POLAR_ARRANGE_TAB_H
#define INKSCAPE_UI_DIALOG_POLAR_ARRANGE_TAB_H

#include "ui/widget/scalar-unit.h"
#include "ui/widget/anchor-selector.h"
#include "ui/dialog/arrange-tab.h"

#include <gtkmm/radiobutton.h>
#include <gtkmm/radiobuttongroup.h>
#include <gtkmm/grid.h>

namespace Inkscape {
namespace UI {
namespace Dialog {

class ArrangeDialog;

/**
 * PolarArrangeTab is a Tab displayed in the Arrange dialog and contains
 * enables the user to arrange objects on a circular or elliptical shape
 */
class PolarArrangeTab : public ArrangeTab {
public:
	PolarArrangeTab(ArrangeDialog *parent_);
    ~PolarArrangeTab() override = default;;

    /**
     * Do the actual arrangement
     */
    void arrange() override;

    /**
     * Respond to selection change
     */
    void updateSelection();

    void on_anchor_radio_changed();
    void on_arrange_radio_changed();

private:
    PolarArrangeTab(PolarArrangeTab const &d) = delete; // no copy
    void operator=(PolarArrangeTab const &d) = delete; // no assign

    ArrangeDialog         *parent;

    Gtk::Label             anchorPointLabel;

    Gtk::RadioButtonGroup  anchorRadioGroup;
    Gtk::RadioButton       anchorBoundingBoxRadio;
    Gtk::RadioButton       anchorObjectPivotRadio;
    Inkscape::UI::Widget::AnchorSelector anchorSelector;

    Gtk::Label             arrangeOnLabel;

    Gtk::RadioButtonGroup  arrangeRadioGroup;
    Gtk::RadioButton       arrangeOnFirstCircleRadio;
    Gtk::RadioButton       arrangeOnLastCircleRadio;
    Gtk::RadioButton       arrangeOnParametersRadio;

    Gtk::Grid              parametersTable;

    Gtk::Label             centerLabel;
    Inkscape::UI::Widget::ScalarUnit centerY;
    Inkscape::UI::Widget::ScalarUnit centerX;

    Gtk::Label             radiusLabel;
    Inkscape::UI::Widget::ScalarUnit radiusY;
    Inkscape::UI::Widget::ScalarUnit radiusX;

    Gtk::Label             angleLabel;
    Inkscape::UI::Widget::ScalarUnit angleY;
    Inkscape::UI::Widget::ScalarUnit angleX;

    Gtk::CheckButton       rotateObjectsCheckBox;


};

} //namespace Dialog
} //namespace UI
} //namespace Inkscape

#endif /* INKSCAPE_UI_DIALOG_POLAR_ARRANGE_TAB_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 :