Code

NR:: => Geom:: for much of src/ui and src/widgets
[inkscape.git] / src / dialogs / tiledialog.h
1 #ifndef __TILEDIALOG_H__
2 #define __TILEDIALOG_H__
3 /*
4  * A simple dialog for creating grid type arrangements of selected objects
5  *
6  * Authors:
7  *   Bob Jamison ( based off trace dialog)
8  *   John Cliff
9  *   Other dudes from The Inkscape Organization
10  *
11  * Copyright (C) 2004 Bob Jamison
12  * Copyright (C) 2004 John Cliff
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
18 #include <gtkmm/box.h>
19 #include <gtkmm/notebook.h>
20 #include <gtkmm/tooltips.h>
21 #include <gtkmm/button.h>
22 #include <gtkmm/spinbutton.h>
23 #include <gtkmm/checkbutton.h>
24 #include <gtkmm/radiobutton.h>
26 #include "ui/widget/panel.h"
28 namespace Inkscape {
29 namespace UI {
30 namespace Dialog {
33 /**
34  * A dialog that displays log messages
35  */
36 class TileDialog : public UI::Widget::Panel {
38 public:
40     /**
41      * Constructor
42      */
43     TileDialog() ;
45     /**
46      * Factory method
47      */
48     static TileDialog& getInstance() { return *new TileDialog(); }
50     /**
51      * Destructor
52      */
53     virtual ~TileDialog() {};
55     /**
56      * Do the actual work
57      */
58     void Grid_Arrange();
60     /**
61      * Respond to selection change
62      */
63     void updateSelection();
66     /**
67      * Callback from Apply
68      */
69     virtual void _apply();
71     /**
72      * Callback from spinbuttons
73      */
74     void on_row_spinbutton_changed();
75     void on_col_spinbutton_changed();
76     void on_xpad_spinbutton_changed();
77     void on_ypad_spinbutton_changed();
78     void on_RowSize_checkbutton_changed();
79     void on_ColSize_checkbutton_changed();
80     void on_rowSize_spinbutton_changed();
81     void on_colSize_spinbutton_changed();
82     void Spacing_button_changed();
83     void VertAlign_changed();
84     void HorizAlign_changed();
87 private:
88     TileDialog(TileDialog const &d); // no copy
89     void operator=(TileDialog const &d); // no assign
91     bool userHidden;
92     bool updating;
96     Gtk::Notebook   notebook;
97     Gtk::Tooltips   tips;
99     Gtk::VBox             TileBox;
100     Gtk::Button           *TileOkButton;
101     Gtk::Button           *TileCancelButton;
103     // Number selected label
104     Gtk::Label            SelectionContentsLabel;
107     Gtk::HBox             AlignHBox;
108     Gtk::HBox             SpinsHBox;
109     Gtk::HBox             SizesHBox;
111     // Number per Row
112     Gtk::VBox             NoOfColsBox;
113     Gtk::Label            NoOfColsLabel;
114     Gtk::SpinButton       NoOfColsSpinner;
115     bool AutoRowSize;
116     Gtk::CheckButton      RowHeightButton;
118     Gtk::VBox             XByYLabelVBox;
119     Gtk::Label            padXByYLabel;
120     Gtk::Label            XByYLabel;
122     // Number per Column
123     Gtk::VBox             NoOfRowsBox;
124     Gtk::Label            NoOfRowsLabel;
125     Gtk::SpinButton       NoOfRowsSpinner;
126     bool AutoColSize;
127     Gtk::CheckButton      ColumnWidthButton;
129     // Vertical align
130     Gtk::Label            VertAlignLabel;
131     Gtk::HBox             VertAlignHBox;
132     Gtk::VBox             VertAlignVBox;
133     Gtk::RadioButtonGroup VertAlignGroup;
134     Gtk::RadioButton      VertCentreRadioButton;
135     Gtk::RadioButton      VertTopRadioButton;
136     Gtk::RadioButton      VertBotRadioButton;
137     double VertAlign;
139     // Horizontal align
140     Gtk::Label            HorizAlignLabel;
141     Gtk::VBox             HorizAlignVBox;
142     Gtk::HBox             HorizAlignHBox;
143     Gtk::RadioButtonGroup HorizAlignGroup;
144     Gtk::RadioButton      HorizCentreRadioButton;
145     Gtk::RadioButton      HorizLeftRadioButton;
146     Gtk::RadioButton      HorizRightRadioButton;
147     double HorizAlign;
149     // padding in x
150     Gtk::VBox             XPadBox;
151     Gtk::Label            XPadLabel;
152     Gtk::SpinButton       XPadSpinner;
154     // padding in y
155     Gtk::VBox             YPadBox;
156     Gtk::Label            YPadLabel;
157     Gtk::SpinButton       YPadSpinner;
159     // BBox or manual spacing
160     Gtk::VBox             SpacingVBox;
161     Gtk::RadioButtonGroup SpacingGroup;
162     Gtk::RadioButton      SpaceByBBoxRadioButton;
163     Gtk::RadioButton      SpaceManualRadioButton;
164     bool ManualSpacing;
168     // Row height
169     Gtk::VBox             RowHeightVBox;
170     Gtk::HBox             RowHeightBox;
171     Gtk::Label            RowHeightLabel;
172     Gtk::SpinButton       RowHeightSpinner;
174     // Column width
175     Gtk::VBox             ColumnWidthVBox;
176     Gtk::HBox             ColumnWidthBox;
177     Gtk::Label            ColumnWidthLabel;
178     Gtk::SpinButton       ColumnWidthSpinner;
180 };
183 } //namespace Dialog
184 } //namespace UI
185 } //namespace Inkscape
188 #endif /* __TILEDIALOG_H__ */