Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / ui / dialog / tile.h
1 /** @file
2  * @brief Dialog for creating grid type arrangements of selected objects
3  */
4 /* Authors:
5  *   Bob Jamison ( based off trace dialog)
6  *   John Cliff
7  *   Other dudes from The Inkscape Organization
8  *
9  * Copyright (C) 2004 Bob Jamison
10  * Copyright (C) 2004 John Cliff
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #ifndef SEEN_UI_DIALOG_TILE_H
16 #define SEEN_UI_DIALOG_TILE_H
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  * Dialog for tiling an object
35  */
36 class TileDialog : public UI::Widget::Panel {
37 public:
38     TileDialog() ;
39     virtual ~TileDialog() {};
41     /**
42      * Do the actual work
43      */
44     void Grid_Arrange();
46     /**
47      * Respond to selection change
48      */
49     void updateSelection();
51     /**
52      * Callback from Apply
53      */
54     virtual void _apply();
56     // Callbacks from spinbuttons
57     void on_row_spinbutton_changed();
58     void on_col_spinbutton_changed();
59     void on_xpad_spinbutton_changed();
60     void on_ypad_spinbutton_changed();
61     void on_RowSize_checkbutton_changed();
62     void on_ColSize_checkbutton_changed();
63     void on_rowSize_spinbutton_changed();
64     void on_colSize_spinbutton_changed();
65     void Spacing_button_changed();
66     void VertAlign_changed();
67     void HorizAlign_changed();
69     static TileDialog& getInstance() { return *new TileDialog(); }
71 private:
72     TileDialog(TileDialog const &d); // no copy
73     void operator=(TileDialog const &d); // no assign
75     bool userHidden;
76     bool updating;
78     Gtk::Notebook   notebook;
79     Gtk::Tooltips   tips;
81     Gtk::VBox             TileBox;
82     Gtk::Button           *TileOkButton;
83     Gtk::Button           *TileCancelButton;
85     // Number selected label
86     Gtk::Label            SelectionContentsLabel;
89     Gtk::HBox             AlignHBox;
90     Gtk::HBox             SpinsHBox;
91     Gtk::HBox             SizesHBox;
93     // Number per Row
94     Gtk::VBox             NoOfColsBox;
95     Gtk::Label            NoOfColsLabel;
96     Gtk::SpinButton       NoOfColsSpinner;
97     bool AutoRowSize;
98     Gtk::CheckButton      RowHeightButton;
100     Gtk::VBox             XByYLabelVBox;
101     Gtk::Label            padXByYLabel;
102     Gtk::Label            XByYLabel;
104     // Number per Column
105     Gtk::VBox             NoOfRowsBox;
106     Gtk::Label            NoOfRowsLabel;
107     Gtk::SpinButton       NoOfRowsSpinner;
108     bool AutoColSize;
109     Gtk::CheckButton      ColumnWidthButton;
111     // Vertical align
112     Gtk::Label            VertAlignLabel;
113     Gtk::HBox             VertAlignHBox;
114     Gtk::VBox             VertAlignVBox;
115     Gtk::RadioButtonGroup VertAlignGroup;
116     Gtk::RadioButton      VertCentreRadioButton;
117     Gtk::RadioButton      VertTopRadioButton;
118     Gtk::RadioButton      VertBotRadioButton;
119     double VertAlign;
121     // Horizontal align
122     Gtk::Label            HorizAlignLabel;
123     Gtk::VBox             HorizAlignVBox;
124     Gtk::HBox             HorizAlignHBox;
125     Gtk::RadioButtonGroup HorizAlignGroup;
126     Gtk::RadioButton      HorizCentreRadioButton;
127     Gtk::RadioButton      HorizLeftRadioButton;
128     Gtk::RadioButton      HorizRightRadioButton;
129     double HorizAlign;
131     // padding in x
132     Gtk::VBox             XPadBox;
133     Gtk::Label            XPadLabel;
134     Gtk::SpinButton       XPadSpinner;
136     // padding in y
137     Gtk::VBox             YPadBox;
138     Gtk::Label            YPadLabel;
139     Gtk::SpinButton       YPadSpinner;
141     // BBox or manual spacing
142     Gtk::VBox             SpacingVBox;
143     Gtk::RadioButtonGroup SpacingGroup;
144     Gtk::RadioButton      SpaceByBBoxRadioButton;
145     Gtk::RadioButton      SpaceManualRadioButton;
146     bool ManualSpacing;
150     // Row height
151     Gtk::VBox             RowHeightVBox;
152     Gtk::HBox             RowHeightBox;
153     Gtk::Label            RowHeightLabel;
154     Gtk::SpinButton       RowHeightSpinner;
156     // Column width
157     Gtk::VBox             ColumnWidthVBox;
158     Gtk::HBox             ColumnWidthBox;
159     Gtk::Label            ColumnWidthLabel;
160     Gtk::SpinButton       ColumnWidthSpinner;
161 };
164 } //namespace Dialog
165 } //namespace UI
166 } //namespace Inkscape
169 #endif /* __TILEDIALOG_H__ */
171 /*
172   Local Variables:
173   mode:c++
174   c-file-style:"stroustrup"
175   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
176   indent-tabs-mode:nil
177   fill-column:99
178   End:
179 */
180 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :