~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/dialogs/tiledialog.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
16
 
 
17
 
 
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>
 
25
 
 
26
#include "ui/dialog/dialog.h"
 
27
 
 
28
namespace Inkscape {
 
29
namespace UI {
 
30
namespace Dialog {
 
31
 
 
32
 
 
33
/**
 
34
 * A dialog that displays log messages
 
35
 */
 
36
class TileDialog : public Dialog {
 
37
 
 
38
public:
 
39
 
 
40
    /**
 
41
     * Constructor
 
42
     */
 
43
    TileDialog() ;
 
44
 
 
45
 
 
46
    /**
 
47
     * Factory method
 
48
     */
 
49
    static TileDialog *create() { return new TileDialog(); }
 
50
 
 
51
    /**
 
52
     * Destructor
 
53
     */
 
54
    virtual ~TileDialog() {};
 
55
 
 
56
    /**
 
57
     * Do the actual work
 
58
     */
 
59
    void Grid_Arrange();
 
60
 
 
61
    /**
 
62
     * Respond to selection change
 
63
     */
 
64
    void updateSelection();
 
65
 
 
66
 
 
67
    /**
 
68
     * Callback from Apply
 
69
     */
 
70
    virtual void _apply();
 
71
 
 
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();
 
86
 
 
87
 
 
88
private:
 
89
    TileDialog(TileDialog const &d); // no copy
 
90
    void operator=(TileDialog const &d); // no assign
 
91
 
 
92
    bool userHidden;
 
93
    bool updating;
 
94
 
 
95
 
 
96
 
 
97
    Gtk::Notebook   notebook;
 
98
    Gtk::Tooltips   tips;
 
99
 
 
100
    Gtk::VBox             TileBox;
 
101
    Gtk::Button           *TileOkButton;
 
102
    Gtk::Button           *TileCancelButton;
 
103
 
 
104
    // Number selected label
 
105
    Gtk::Label            SelectionContentsLabel;
 
106
 
 
107
 
 
108
    Gtk::HBox             AlignHBox;
 
109
    Gtk::HBox             SpinsHBox;
 
110
    Gtk::HBox             SizesHBox;
 
111
 
 
112
    // Number per Row
 
113
    Gtk::VBox             NoOfColsBox;
 
114
    Gtk::Label            NoOfColsLabel;
 
115
    Gtk::SpinButton       NoOfColsSpinner;
 
116
    bool AutoRowSize;
 
117
    Gtk::CheckButton      RowHeightButton;
 
118
 
 
119
    Gtk::VBox             XByYLabelVBox;
 
120
    Gtk::Label            padXByYLabel;
 
121
    Gtk::Label            XByYLabel;
 
122
 
 
123
    // Number per Column
 
124
    Gtk::VBox             NoOfRowsBox;
 
125
    Gtk::Label            NoOfRowsLabel;
 
126
    Gtk::SpinButton       NoOfRowsSpinner;
 
127
    bool AutoColSize;
 
128
    Gtk::CheckButton      ColumnWidthButton;
 
129
 
 
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;
 
139
 
 
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;
 
149
 
 
150
    // padding in x
 
151
    Gtk::VBox             XPadBox;
 
152
    Gtk::Label            XPadLabel;
 
153
    Gtk::SpinButton       XPadSpinner;
 
154
 
 
155
    // padding in y
 
156
    Gtk::VBox             YPadBox;
 
157
    Gtk::Label            YPadLabel;
 
158
    Gtk::SpinButton       YPadSpinner;
 
159
 
 
160
    // BBox or manual spacing
 
161
    Gtk::VBox             SpacingVBox;
 
162
    Gtk::RadioButtonGroup SpacingGroup;
 
163
    Gtk::RadioButton      SpaceByBBoxRadioButton;
 
164
    Gtk::RadioButton      SpaceManualRadioButton;
 
165
    bool ManualSpacing;
 
166
 
 
167
 
 
168
 
 
169
    // Row height
 
170
    Gtk::VBox             RowHeightVBox;
 
171
    Gtk::HBox             RowHeightBox;
 
172
    Gtk::Label            RowHeightLabel;
 
173
    Gtk::SpinButton       RowHeightSpinner;
 
174
 
 
175
    // Column width
 
176
    Gtk::VBox             ColumnWidthVBox;
 
177
    Gtk::HBox             ColumnWidthBox;
 
178
    Gtk::Label            ColumnWidthLabel;
 
179
    Gtk::SpinButton       ColumnWidthSpinner;
 
180
 
 
181
};
 
182
 
 
183
 
 
184
} //namespace Dialog
 
185
} //namespace UI
 
186
} //namespace Inkscape
 
187
 
 
188
 
 
189
#endif /* __TILEDIALOG_H__ */
 
190