tile.cpp revision d5ad05ac17abfd7d2eae333a8c1233971e1c1a8f
2N/A#ifdef HAVE_CONFIG_H
2N/A#include "preferences.h"
2N/A#include "inkscape.h"
2N/A#include "desktop-handles.h"
2N/A#include "selection.h"
2N/A#include "document.h"
2N/A bool a_in_b_vert = false;
2N/A a_in_b_vert = true;
2N/A a_in_b_vert = true;
2N/A a_in_b_vert = true;
2N/A a_in_b_vert = false;
2N/A if (!a_in_b_vert) {
namespace Inkscape {
namespace UI {
namespace Dialog {
col_width = 0;
row_height = 0;
width = 0;
for (a=0;a<NoOfCols; a++){
height = 0;
for (a=0;a<NoOfRows; a++){
cnt=0;
cnt=0;
cnt++;
#ifdef DEBUG_GRID_ARRANGE
for (a=0;a<NoOfCols; a++){
for (a=0;a<NoOfRows; a++){
#ifdef DEBUG_GRID_ARRANGE
g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_height,total_col_width, b.extent(Geom::X), b.extent(Geom::Y));
Y position likewise, takes the top of the grid, adds the y to the current row then adds the padding in to align it.
// Calculate row and column x and y coords required to allow for columns and rows which are non uniformly sized.
for (a=0;a<NoOfCols; a++){
for (a=0;a<NoOfRows; a++){
cnt=0;
Grid_Arrange();
if (updating) {
updating = true;
updating=false;
if (updating) {
updating = true;
updating=false;
if (updating) {
updating = true;
updating=false;
if (updating) {
updating = true;
updating=false;
VertAlign = 0;
HorizAlign = 0;
if (updating) {
updating = true;
if (items) {
updating = false;
static void updateSelectionCallback(Inkscape::Application */*inkscape*/, Inkscape::Selection */*selection*/, TileDialog *dlg)
updating = false;
g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection", G_CALLBACK (updateSelectionCallback), this);
#ifdef DEBUG_GRID_ARRANGE
NoOfRowsSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_col_spinbutton_changed));
if (AutoRow>0)
AutoRowSize=true;
AutoRowSize=false;
tips.set_tip(RowHeightButton, _("If not set, each row has the height of the tallest object in it"));
RowHeightButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::on_RowSize_checkbutton_changed));
VertCentreRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::VertAlign_changed));
if (VertAlign == 0) {
NoOfColsSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_row_spinbutton_changed));
if (AutoCol>0)
AutoColSize=true;
AutoColSize=false;
tips.set_tip(ColumnWidthButton, _("If not set, each column has the width of the widest object in it"));
ColumnWidthButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::on_ColSize_checkbutton_changed));
HorizLeftRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::HorizAlign_changed));
HorizCentreRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::HorizAlign_changed));
HorizRightRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::HorizAlign_changed));
if (HorizAlign == 0) {
SpaceByBBoxRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::Spacing_button_changed));
SpaceManualRadioButton.signal_toggled().connect(sigc::mem_fun(*this, &TileDialog::Spacing_button_changed));
YPadSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_ypad_spinbutton_changed));
XPadSpinner.signal_changed().connect(sigc::mem_fun(*this, &TileDialog::on_xpad_spinbutton_changed));
if (SpacingType>0) {
ManualSpacing=true;
ManualSpacing=false;