page-sizer.h revision 10ec56de88c98f688f610730c5a67f2705d6ed61
/** \file
* \brief Widget for specifying page size; part of Document Preferences dialog.
*
* Author:
* Ralf Stephan <ralf@ark.in-berlin.de>
*
* Copyright (C) 2005-2006 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_UI_WIDGET_PAGE_SIZER__H
#define INKSCAPE_UI_WIDGET_PAGE_SIZER__H
#include <gtkmm.h>
#include "ui/widget/registry.h"
#include "ui/widget/registered-widget.h"
/**
* Data class used to store common paper dimensions. Used to make
* PageSizer's _paperSizeTable.
*/
{
/**
* Default constructor
*/
{ init(); }
/**
* Main constructor. Use this one.
*/
double smallerArg,
double largerArg,
{
}
/**
* Copy constructor
*/
/**
* Assignment operator
*/
/**
* Destructor
*/
{}
/**
* Name of this paper specification
*/
/**
* The lesser of the two dimensions
*/
double smaller;
/**
* The greater of the two dimensions
*/
double larger;
/**
* The units (px, pt, mm, etc) of this specification
*/
void init()
{
name = "";
smaller = 0.0;
larger = 0.0;
unit = SP_UNIT_PX;
}
{
}
};
/**
* A compound widget that allows the user to select the desired
* page size. This widget is used in DocumentPreferences
*/
{
/**
* Constructor
*/
PageSizer();
/**
* Destructor
*/
/**
* Set up or reset this widget
*/
/**
* Set the page size to the given dimensions. If 'changeList' is
* true, then reset the paper size list to the closest match
*/
void setDim (double w, double h, bool changeList=true);
/**
* Our handy table of all 'standard' paper sizes.
*/
/**
* Find the closest standard paper size in the table, to the
*/
int find_paper_size (double w, double h) const;
//### Dimension spinboxes
//callback
void on_value_changed();
//### The Paper Size selection list
{
};
//callback
void on_paper_size_list_changed();
//### Button to select 'portrait' orientation
//callback
void on_portrait();
//### Button to select 'landscape' orientation
//callback
void on_landscape();
//### state - whether we are currently landscape or portrait
bool _landscape;
};
} // namespace Widget
} // namespace UI
} // namespace Inkscape
#endif /* INKSCAPE_UI_WIDGET_PAGE_SIZER__H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :