diff options
Diffstat (limited to 'src/ui/dialog/filedialogimpl-gtkmm.h')
| -rw-r--r-- | src/ui/dialog/filedialogimpl-gtkmm.h | 231 |
1 files changed, 2 insertions, 229 deletions
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h index 7a1061bb8..430f6b6eb 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.h +++ b/src/ui/dialog/filedialogimpl-gtkmm.h @@ -21,18 +21,13 @@ //Gtk includes #include <gtkmm/filechooserdialog.h> #include <glib/gstdio.h> -#include <gtkmm/comboboxtext.h> -#include <gtkmm/checkbutton.h> - -//General includes -#include <unistd.h> -#include <sys/stat.h> -#include <cerrno> #include "filedialog.h" #include "svg-preview.h" namespace Gtk { +class CheckButton; +class ComboBoxText; class Expander; } @@ -300,228 +295,6 @@ private: }; - - -#ifdef NEW_EXPORT_DIALOG - -//######################################################################## -//# F I L E E X P O R T -//######################################################################## - -/** - * Our implementation of the FileExportDialog interface. - */ -class FileExportDialogImpl : public FileExportDialog, public FileDialogBaseGtk -{ - -public: - FileExportDialogImpl(Gtk::Window& parentWindow, - const Glib::ustring &dir, - FileDialogType fileTypes, - const Glib::ustring &title, - const Glib::ustring &default_key); - - virtual ~FileExportDialogImpl(); - - bool show(); - - Inkscape::Extension::Extension *getSelectionType(); - - Glib::ustring getFilename(); - - - /** - * Return the scope of the export. One of the enumerated types - * in ScopeType - */ - ScopeType getScope() - { - if (pageButton.get_active()) - return SCOPE_PAGE; - else if (selectionButton.get_active()) - return SCOPE_SELECTION; - else if (customButton.get_active()) - return SCOPE_CUSTOM; - else - return SCOPE_DOCUMENT; - - } - - /** - * Return left side of the exported region - */ - double getSourceX() - { return sourceX0Spinner.getValue(); } - - /** - * Return the top of the exported region - */ - double getSourceY() - { return sourceY1Spinner.getValue(); } - - /** - * Return the width of the exported region - */ - double getSourceWidth() - { return sourceWidthSpinner.getValue(); } - - /** - * Return the height of the exported region - */ - double getSourceHeight() - { return sourceHeightSpinner.getValue(); } - - /** - * Return the units of the coordinates of exported region - */ - Glib::ustring getSourceUnits() - { return sourceUnitsSpinner.getUnitAbbr(); } - - /** - * Return the width of the destination document - */ - double getDestinationWidth() - { return destWidthSpinner.getValue(); } - - /** - * Return the height of the destination document - */ - double getDestinationHeight() - { return destHeightSpinner.getValue(); } - - /** - * Return the height of the exported region - */ - Glib::ustring getDestinationUnits() - { return destUnitsSpinner.getUnitAbbr(); } - - /** - * Return the destination DPI image resolution, if bitmap - */ - double getDestinationDPI() - { return destDPISpinner.getValue(); } - - /** - * Return whether we should use Cairo for rendering - */ - bool getUseCairo() - { return cairoButton.get_active(); } - - /** - * Return whether we should use antialiasing - */ - bool getUseAntialias() - { return antiAliasButton.get_active(); } - - /** - * Return the background color for exporting - */ - unsigned long getBackground() - { return backgroundButton.get_color().get_pixel(); } - -private: - - /** - * Fix to allow the user to type the file name - */ - Gtk::Entry *fileNameEntry; - - //########################################## - //# EXTRA WIDGET -- SOURCE SIDE - //########################################## - - Gtk::Frame sourceFrame; - Gtk::VBox sourceBox; - - Gtk::HBox scopeBox; - Gtk::RadioButtonGroup scopeGroup; - Gtk::RadioButton documentButton; - Gtk::RadioButton pageButton; - Gtk::RadioButton selectionButton; - Gtk::RadioButton customButton; - - Gtk::Table sourceTable; - Inkscape::UI::Widget::Scalar sourceX0Spinner; - Inkscape::UI::Widget::Scalar sourceY0Spinner; - Inkscape::UI::Widget::Scalar sourceX1Spinner; - Inkscape::UI::Widget::Scalar sourceY1Spinner; - Inkscape::UI::Widget::Scalar sourceWidthSpinner; - Inkscape::UI::Widget::Scalar sourceHeightSpinner; - Inkscape::UI::Widget::UnitMenu sourceUnitsSpinner; - - - //########################################## - //# EXTRA WIDGET -- DESTINATION SIDE - //########################################## - - Gtk::Frame destFrame; - Gtk::VBox destBox; - - Gtk::Table destTable; - Inkscape::UI::Widget::Scalar destWidthSpinner; - Inkscape::UI::Widget::Scalar destHeightSpinner; - Inkscape::UI::Widget::Scalar destDPISpinner; - Inkscape::UI::Widget::UnitMenu destUnitsSpinner; - - Gtk::HBox otherOptionBox; - Gtk::CheckButton cairoButton; - Gtk::CheckButton antiAliasButton; - Gtk::ColorButton backgroundButton; - - - /** - * 'Extra' widget that holds two boxes above - */ - Gtk::HBox exportOptionsBox; - - - //# Child widgets - Gtk::CheckButton fileTypeCheckbox; - - /** - * Allow the specification of the output file type - */ - Gtk::ComboBoxText fileTypeComboBox; - - - /** - * Data mirror of the combo box - */ - std::vector<FileType> fileTypes; - - - - /** - * Callback for user input into fileNameEntry - */ - void fileTypeChangedCallback(); - - /** - * Create a filter menu for this type of dialog - */ - void createFileTypeMenu(); - - - bool append_extension; - - /** - * The extension to use to write this file - */ - Inkscape::Extension::Extension *extension; - - /** - * Callback for user input into fileNameEntry - */ - void fileNameEntryChangedCallback(); - - /** - * Filename that was given - */ - Glib::ustring myFilename; -}; - -#endif // NEW_EXPORT_DIALOG - } // namespace Dialog } // namespace UI } // namespace Inkscape |
