transformation.h revision c69dba93c1bee1e6970628c04c2a45d3bb98638b
/** @file
* @brief Transform dialog
*/
/* Author:
* Bryce W. Harrington <bryce@bryceharrington.org>
*
* Copyright (C) 2004, 2005 Authors
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include <gtkmm/notebook.h>
#include "ui/widget/notebook-page.h"
#include "ui/widget/scalar-unit.h"
#include "ui/widget/imageicon.h"
/**
* Transformation dialog.
*
* The transformation dialog allows to modify Inkscape objects.
* 5 transformation operations are currently possible: move, scale,
* rotate, skew and matrix.
*/
{
/**
* Constructor for Transformation.
*
* This does the initialization
* and layout of the dialog used for transforming SVG objects. It
* consists of 5 pages for the 5 operations it handles:
* 'Move' allows x,y translation of SVG objects
* 'Scale' allows linear resizing of SVG objects
* 'Rotate' allows rotating SVG objects by a degree
* 'Skew' allows skewing SVG objects
* 'Matrix' allows applying a generic affine transform on SVG objects,
* with the user specifying the 6 degrees of freedom manually.
*
* The dialog is implemented as a Gtk::Notebook with five pages.
* The pages are implemented using Inkscape's NotebookPage which
* is used to help make sure all of Inkscape's notebooks follow
* the same style. We then populate the pages with our widgets,
* we use the ScalarUnit class for this.
*/
/**
* Cleanup
*/
/**
*/
static Transformation &getInstance()
{ return *new Transformation(); }
/**
* Show the Move panel
*/
void setPageMove()
{ presentPage(PAGE_MOVE); }
/**
* Show the Scale panel
*/
void setPageScale()
{ presentPage(PAGE_SCALE); }
/**
* Show the Rotate panel
*/
void setPageRotate()
{ presentPage(PAGE_ROTATE); }
/**
* Show the Skew panel
*/
void setPageSkew()
{ presentPage(PAGE_SKEW); }
/**
* Show the Transform panel
*/
void setPageTransform()
{ presentPage(PAGE_TRANSFORM); }
int getCurrentPage()
{ return _notebook.get_current_page(); }
typedef enum {
} PageType;
/**
* Layout the GUI components, and prepare for use
*/
void layoutPageMove();
void layoutPageScale();
void layoutPageRotate();
void layoutPageSkew();
void layoutPageTransform();
#if WITH_GTKMM_3_0
#else
#endif
/**
* Callbacks for when a user changes values on the panels
*/
void onMoveValueChanged();
void onMoveRelativeToggled();
void onScaleXValueChanged();
void onScaleYValueChanged();
void onRotateValueChanged();
void onSkewValueChanged();
void onTransformValueChanged();
void onReplaceMatrixToggled();
void onScaleProportionalToggled();
void onClear();
void onApplySeparatelyToggled();
/**
* Called when the selection is updated, to make
* the panel(s) show the new values.
* Editor---->dialog
*/
/**
* Called when the Apply button is pushed
* Dialog---->editor
*/
/**
* Copy constructor
*/
Transformation(Transformation const &d);
/**
* Assignment operator
*/
};
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
#endif //INKSCAPE_UI_DIALOG_TRANSFORMATION_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :