Logo Search packages:      
Sourcecode: inkscape version File versions

export.cpp File Reference


Detailed Description

PNG export dialog.

Definition in file export.cpp.

#include <png.h>
#include <gtk/gtk.h>
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
#include <gtkmm/label.h>
#include <gtkmm/widget.h>
#include <gtkmm/togglebutton.h>
#include <gtkmm/entry.h>
#include <gtkmm/image.h>
#include <gtkmm/stockid.h>
#include <gtkmm/stock.h>
#include <glibmm/i18n.h>
#include "helper/unit-menu.h"
#include "helper/units.h"
#include "unit-constants.h"
#include "helper/window.h"
#include "inkscape-private.h"
#include "document.h"
#include "desktop-handles.h"
#include "sp-item.h"
#include "selection.h"
#include "file.h"
#include "macros.h"
#include "sp-namedview.h"
#include "selection-chemistry.h"
#include "dialog-events.h"
#include "preferences.h"
#include "verbs.h"
#include "interface.h"
#include "extension/output.h"
#include "extension/db.h"
#include "io/sys.h"
#include "helper/png-write.h"

Go to the source code of this file.

Defines

#define DPI_BASE   PX_PER_IN
#define EXPORT_COORD_PRECISION   3
#define MIN_ONSCREEN_DISTANCE   50
#define SP_EXPORT_MIN_SIZE   1.0

Enumerations

enum  selection_type {
  SELECTION_PAGE = 0, SELECTION_DRAWING, SELECTION_SELECTION, SELECTION_CUSTOM,
  SELECTION_NUMBER_OF
}

Functions

gchar * absolutize_path_from_document_location (SPDocument *doc, const gchar *filename)
static void batch_export_clicked (GtkWidget *widget, GtkObject *base)
gchar * create_filepath_from_id (const gchar *id, const gchar *file_entry_text)
GtkWidget * create_progress_dialog (GtkObject *base, gchar *progress_text)
static gchar * filename_add_extension (const gchar *filename, const gchar *extension)
static void sp_export_area_height_value_changed (GtkAdjustment *, GtkObject *base)
 Called when y1-y0 or area height is changed.
static void sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base)
 Called when one of the selection buttons was toggled.
static void sp_export_area_width_value_changed (GtkAdjustment *, GtkObject *base)
 Called when x1-x0 or area width is changed.
static void sp_export_area_x_value_changed (GtkAdjustment *adj, GtkObject *base)
 Called when area x0 value is changed.
static void sp_export_area_y_value_changed (GtkAdjustment *adj, GtkObject *base)
 Called when area y0 value is changed.
static bool sp_export_bbox_equal (Geom::Rect const &one, Geom::Rect const &two)
static void sp_export_bitmap_height_value_changed (GtkAdjustment *, GtkObject *base)
 Called when pixel height is changed.
static void sp_export_bitmap_width_value_changed (GtkAdjustment *, GtkObject *base)
 Called when pixel width is changed.
static void sp_export_browse_clicked (GtkButton *button, gpointer userdata)
static void sp_export_detect_size (GtkObject *base)
 This function is used to detect the current selection setting based on the values in the x0, y0, x1 and y0 fields.
void sp_export_dialog (void)
static Gtk::VBox * sp_export_dialog_area_box (GtkWidget *dlg)
static bool sp_export_dialog_delete (GtkObject *, GdkEvent *, gpointer)
 Called when dialog is closed or inkscape is shut down.
static void sp_export_dialog_destroy (GtkObject *, gpointer)
static void sp_export_export_clicked (GtkButton *, GtkObject *base)
 Called when export button is clicked.
static void sp_export_filename_modified (GtkObject *object, gpointer data)
 This function is called when the filename is changed by anyone. It resets the virgin bit.
static void sp_export_find_default_selection (GtkWidget *dlg)
static unsigned int sp_export_progress_callback (float value, void *data)
 Called for every progress iteration.
static void sp_export_progress_cancel (GtkWidget *, GObject *base)
 Called when progress is cancelled.
static gint sp_export_progress_delete (GtkWidget *, GdkEvent *, GObject *base)
 Called when dialog is deleted.
static void sp_export_selection_changed (Inkscape::Application *inkscape, Inkscape::Selection *selection, GtkObject *base)
 If selection changed or a different document activated, we must recalculate any chosen areas.
static void sp_export_selection_modified (Inkscape::Application *inkscape, Inkscape::Selection *selection, guint flags, GtkObject *base)
static void sp_export_set_area (GtkObject *base, double x0, double y0, double x1, double y1)
 A function to change the area that is used for the exported bitmap.
static void sp_export_set_image_x (GtkObject *base)
 A function to set the xdpi.
static void sp_export_set_image_y (GtkObject *base)
 A function to set the ydpi.
static void sp_export_spinbutton_new (gchar const *key, float val, float min, float max, float step, float page, GtkWidget *us, GtkWidget *t, int x, int y, const gchar *ll, const gchar *lr, int digits, unsigned int sensitive, GCallback cb, GtkWidget *dlg)
 Creates a new spin button for the export dialog.
static void sp_export_update_checkbuttons (GtkObject *base)
static float sp_export_value_get (GtkObject *base, const gchar *key)
 Get the value of an adjustment in the export dialog.
static float sp_export_value_get_px (GtkObject *base, const gchar *key)
 Grabs a value in the export dialog and converts the unit to points.
static void sp_export_value_set (GtkObject *base, const gchar *key, double val)
 Sets the value of an adjustment.
static void sp_export_value_set_px (GtkObject *base, const gchar *key, double val)
 A function to set a value using the units points.
static void sp_export_xdpi_value_changed (GtkAdjustment *, GtkObject *base)
 A function to adjust the bitmap width when the xdpi value changes.

Variables

static GtkWidget * dlg = NULL
static gchar * doc_export_name = NULL
static gint h = 0
static gchar * original_name = NULL
static Glib::ustring const prefs_path = "/dialogs/export/"
static const char * selection_labels [SELECTION_NUMBER_OF]
static const char * selection_names [SELECTION_NUMBER_OF]
static gint w = 0
static bool was_empty = TRUE
static win_data wd
static gint x = -1000
static gint y = -1000


Generated by  Doxygen 1.6.0   Back to index