~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/ui/dialog/tile.h

  • Committer: Ted Gould
  • Date: 2008-11-21 05:24:08 UTC
  • Revision ID: ted@canonical.com-20081121052408-tilucis2pjrrpzxx
MergeĀ fromĀ fe-moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
14
 
 
15
#ifndef SEEN_UI_DIALOG_TILE_H
 
16
#define SEEN_UI_DIALOG_TILE_H
 
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/widget/panel.h"
 
27
 
 
28
namespace Inkscape {
 
29
namespace UI {
 
30
namespace Dialog {
 
31
 
 
32
 
 
33
/**
 
34
 * Dialog for tiling an object
 
35
 */
 
36
class TileDialog : public UI::Widget::Panel {
 
37
public:
 
38
    TileDialog() ;
 
39
    virtual ~TileDialog() {};
 
40
 
 
41
    /**
 
42
     * Do the actual work
 
43
     */
 
44
    void Grid_Arrange();
 
45
 
 
46
    /**
 
47
     * Respond to selection change
 
48
     */
 
49
    void updateSelection();
 
50
 
 
51
    /**
 
52
     * Callback from Apply
 
53
     */
 
54
    virtual void _apply();
 
55
 
 
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();
 
68
 
 
69
    static TileDialog& getInstance() {
 
70
        static TileDialog instance;
 
71
        return instance;
 
72
    }
 
73
 
 
74
private:
 
75
    TileDialog(TileDialog const &d); // no copy
 
76
    void operator=(TileDialog const &d); // no assign
 
77
 
 
78
    bool userHidden;
 
79
    bool updating;
 
80
 
 
81
    Gtk::Notebook   notebook;
 
82
    Gtk::Tooltips   tips;
 
83
 
 
84
    Gtk::VBox             TileBox;
 
85
    Gtk::Button           *TileOkButton;
 
86
    Gtk::Button           *TileCancelButton;
 
87
 
 
88
    // Number selected label
 
89
    Gtk::Label            SelectionContentsLabel;
 
90
 
 
91
 
 
92
    Gtk::HBox             AlignHBox;
 
93
    Gtk::HBox             SpinsHBox;
 
94
    Gtk::HBox             SizesHBox;
 
95
 
 
96
    // Number per Row
 
97
    Gtk::VBox             NoOfColsBox;
 
98
    Gtk::Label            NoOfColsLabel;
 
99
    Gtk::SpinButton       NoOfColsSpinner;
 
100
    bool AutoRowSize;
 
101
    Gtk::CheckButton      RowHeightButton;
 
102
 
 
103
    Gtk::VBox             XByYLabelVBox;
 
104
    Gtk::Label            padXByYLabel;
 
105
    Gtk::Label            XByYLabel;
 
106
 
 
107
    // Number per Column
 
108
    Gtk::VBox             NoOfRowsBox;
 
109
    Gtk::Label            NoOfRowsLabel;
 
110
    Gtk::SpinButton       NoOfRowsSpinner;
 
111
    bool AutoColSize;
 
112
    Gtk::CheckButton      ColumnWidthButton;
 
113
 
 
114
    // Vertical align
 
115
    Gtk::Label            VertAlignLabel;
 
116
    Gtk::HBox             VertAlignHBox;
 
117
    Gtk::VBox             VertAlignVBox;
 
118
    Gtk::RadioButtonGroup VertAlignGroup;
 
119
    Gtk::RadioButton      VertCentreRadioButton;
 
120
    Gtk::RadioButton      VertTopRadioButton;
 
121
    Gtk::RadioButton      VertBotRadioButton;
 
122
    double VertAlign;
 
123
 
 
124
    // Horizontal align
 
125
    Gtk::Label            HorizAlignLabel;
 
126
    Gtk::VBox             HorizAlignVBox;
 
127
    Gtk::HBox             HorizAlignHBox;
 
128
    Gtk::RadioButtonGroup HorizAlignGroup;
 
129
    Gtk::RadioButton      HorizCentreRadioButton;
 
130
    Gtk::RadioButton      HorizLeftRadioButton;
 
131
    Gtk::RadioButton      HorizRightRadioButton;
 
132
    double HorizAlign;
 
133
 
 
134
    // padding in x
 
135
    Gtk::VBox             XPadBox;
 
136
    Gtk::Label            XPadLabel;
 
137
    Gtk::SpinButton       XPadSpinner;
 
138
 
 
139
    // padding in y
 
140
    Gtk::VBox             YPadBox;
 
141
    Gtk::Label            YPadLabel;
 
142
    Gtk::SpinButton       YPadSpinner;
 
143
 
 
144
    // BBox or manual spacing
 
145
    Gtk::VBox             SpacingVBox;
 
146
    Gtk::RadioButtonGroup SpacingGroup;
 
147
    Gtk::RadioButton      SpaceByBBoxRadioButton;
 
148
    Gtk::RadioButton      SpaceManualRadioButton;
 
149
    bool ManualSpacing;
 
150
 
 
151
 
 
152
 
 
153
    // Row height
 
154
    Gtk::VBox             RowHeightVBox;
 
155
    Gtk::HBox             RowHeightBox;
 
156
    Gtk::Label            RowHeightLabel;
 
157
    Gtk::SpinButton       RowHeightSpinner;
 
158
 
 
159
    // Column width
 
160
    Gtk::VBox             ColumnWidthVBox;
 
161
    Gtk::HBox             ColumnWidthBox;
 
162
    Gtk::Label            ColumnWidthLabel;
 
163
    Gtk::SpinButton       ColumnWidthSpinner;
 
164
};
 
165
 
 
166
 
 
167
} //namespace Dialog
 
168
} //namespace UI
 
169
} //namespace Inkscape
 
170
 
 
171
 
 
172
#endif /* __TILEDIALOG_H__ */
 
173
 
 
174
/*
 
175
  Local Variables:
 
176
  mode:c++
 
177
  c-file-style:"stroustrup"
 
178
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
179
  indent-tabs-mode:nil
 
180
  fill-column:99
 
181
  End:
 
182
*/
 
183
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :