Code

Renaming sp-marker.* to marker.*
[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/dialog/dialog.h"
28 namespace Inkscape {
29 namespace UI {
30 namespace Dialog {
33 /**
34  * A dialog that displays log messages
35  */
36 class TileDialog : public Dialog {
38 public:
40     /**
41      * Constructor
42      */
43     TileDialog() ;
46     /**
47      * Factory method
48      */
49     static TileDialog *create() { return new TileDialog(); }
51     /**
52      * Destructor
53      */
54     virtual ~TileDialog() {};
56     /**
57      * Do the actual work
58      */
59     void Grid_Arrange();
61     /**
62      * Respond to selection change
63      */
64     void updateSelection();
67     /**
68      * Callback from Apply
69      */
70     virtual void _apply();
72     /**
73      * Callback from spinbuttons
74      */
75     void on_row_spinbutton_changed();
76     void on_col_spinbutton_changed();
77     void on_xpad_spinbutton_changed();
78     void on_ypad_spinbutton_changed();
79     void on_RowSize_checkbutton_changed();
80     void on_ColSize_checkbutton_changed();
81     void on_rowSize_spinbutton_changed();
82     void on_colSize_spinbutton_changed();
83     void Spacing_button_changed();
84     void VertAlign_changed();
85     void HorizAlign_changed();
88 private:
89     TileDialog(TileDialog const &d); // no copy
90     void operator=(TileDialog const &d); // no assign
92     bool userHidden;
93     bool updating;
97     Gtk::Notebook   notebook;
98     Gtk::Tooltips   tips;
100     Gtk::VBox             TileBox;
101     Gtk::Button           *TileOkButton;
102     Gtk::Button           *TileCancelButton;
104     // Number selected label
105     Gtk::Label            SelectionContentsLabel;
108     Gtk::HBox             AlignHBox;
109     Gtk::HBox             SpinsHBox;
110     Gtk::HBox             SizesHBox;
112     // Number per Row
113     Gtk::VBox             NoOfColsBox;
114     Gtk::Label            NoOfColsLabel;
115     Gtk::SpinButton       NoOfColsSpinner;
116     bool AutoRowSize;
117     Gtk::CheckButton      RowHeightButton;
119     Gtk::VBox             XByYLabelVBox;
120     Gtk::Label            padXByYLabel;
121     Gtk::Label            XByYLabel;
123     // Number per Column
124     Gtk::VBox             NoOfRowsBox;
125     Gtk::Label            NoOfRowsLabel;
126     Gtk::SpinButton       NoOfRowsSpinner;
127     bool AutoColSize;
128     Gtk::CheckButton      ColumnWidthButton;
130     // Vertical align
131     Gtk::Label            VertAlignLabel;
132     Gtk::HBox             VertAlignHBox;
133     Gtk::VBox             VertAlignVBox;
134     Gtk::RadioButtonGroup VertAlignGroup;
135     Gtk::RadioButton      VertCentreRadioButton;
136     Gtk::RadioButton      VertTopRadioButton;
137     Gtk::RadioButton      VertBotRadioButton;
138     double VertAlign;
140     // Horizontal align
141     Gtk::Label            HorizAlignLabel;
142     Gtk::VBox             HorizAlignVBox;
143     Gtk::HBox             HorizAlignHBox;
144     Gtk::RadioButtonGroup HorizAlignGroup;
145     Gtk::RadioButton      HorizCentreRadioButton;
146     Gtk::RadioButton      HorizLeftRadioButton;
147     Gtk::RadioButton      HorizRightRadioButton;
148     double HorizAlign;
150     // padding in x
151     Gtk::VBox             XPadBox;
152     Gtk::Label            XPadLabel;
153     Gtk::SpinButton       XPadSpinner;
155     // padding in y
156     Gtk::VBox             YPadBox;
157     Gtk::Label            YPadLabel;
158     Gtk::SpinButton       YPadSpinner;
160     // BBox or manual spacing
161     Gtk::VBox             SpacingVBox;
162     Gtk::RadioButtonGroup SpacingGroup;
163     Gtk::RadioButton      SpaceByBBoxRadioButton;
164     Gtk::RadioButton      SpaceManualRadioButton;
165     bool ManualSpacing;
169     // Row height
170     Gtk::VBox             RowHeightVBox;
171     Gtk::HBox             RowHeightBox;
172     Gtk::Label            RowHeightLabel;
173     Gtk::SpinButton       RowHeightSpinner;
175     // Column width
176     Gtk::VBox             ColumnWidthVBox;
177     Gtk::HBox             ColumnWidthBox;
178     Gtk::Label            ColumnWidthLabel;
179     Gtk::SpinButton       ColumnWidthSpinner;
181 };
184 } //namespace Dialog
185 } //namespace UI
186 } //namespace Inkscape
189 #endif /* __TILEDIALOG_H__ */