diff options
| author | Ted Gould <ted@gould.cx> | 2008-11-21 05:24:08 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-11-21 05:24:08 +0000 |
| commit | 44a3a78fb6a3863c0c7f3c1193837337e68a67e4 (patch) | |
| tree | 1722ee5ec6f88c881cd4124923354b3c1311501b /src/dialogs | |
| parent | Merge from trunk (diff) | |
| download | inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.tar.gz inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.zip | |
Merge from fe-moved
(bzr r6891)
Diffstat (limited to '')
49 files changed, 510 insertions, 664 deletions
diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt index 4087fbfe9..e9fa7c6fc 100644 --- a/src/dialogs/CMakeLists.txt +++ b/src/dialogs/CMakeLists.txt @@ -1,6 +1,5 @@ SET(dialogs_SRC clonetiler.cpp -debugdialog.cpp dialog-events.cpp eek-color-def.cpp eek-preview.cpp @@ -21,7 +20,6 @@ sp-attribute-widget.cpp stroke-style.cpp swatches.cpp text-edit.cpp -tiledialog.cpp unclump.cpp xml-tree.cpp ) diff --git a/src/dialogs/Makefile_insert b/src/dialogs/Makefile_insert index 4b1d42abb..5d5614668 100644 --- a/src/dialogs/Makefile_insert +++ b/src/dialogs/Makefile_insert @@ -13,57 +13,53 @@ dialogs/all: dialogs/libspdialogs.a dialogs/clean: rm -f dialogs/libspdialogs.a $(dialogs_libspdialogs_a_OBJECTS) -dialogs_libspdialogs_a_SOURCES = \ - dialogs/debugdialog.cpp \ - dialogs/debugdialog.h \ +dialogs_libspdialogs_a_SOURCES = \ + dialogs/clonetiler.cpp \ + dialogs/clonetiler.h \ dialogs/dialog-events.cpp \ - dialogs/dialog-events.h \ - dialogs/eek-color-def.h \ + dialogs/dialog-events.h \ dialogs/eek-color-def.cpp \ - dialogs/eek-preview.h \ - dialogs/eek-preview.cpp \ - dialogs/export.cpp \ - dialogs/export.h \ - dialogs/extensions.cpp \ - dialogs/extensions.h \ - dialogs/fill-style.cpp \ - dialogs/fill-style.h \ + dialogs/eek-color-def.h \ + dialogs/eek-preview.cpp \ + dialogs/eek-preview.h \ + dialogs/export.cpp \ + dialogs/export.h \ + dialogs/extensions.cpp \ + dialogs/extensions.h \ + dialogs/fill-style.cpp \ + dialogs/fill-style.h \ + dialogs/find.cpp \ + dialogs/find.h \ dialogs/guidelinedialog.cpp \ dialogs/guidelinedialog.h \ + dialogs/iconpreview.cpp \ + dialogs/iconpreview.h \ dialogs/in-dt-coordsys.cpp \ dialogs/in-dt-coordsys.h \ - dialogs/input.cpp \ - dialogs/input.h \ + dialogs/input.cpp \ + dialogs/input.h \ dialogs/item-properties.cpp \ dialogs/item-properties.h \ dialogs/layer-properties.cpp \ dialogs/layer-properties.h \ dialogs/layers-panel.cpp \ - dialogs/layers-panel.h \ + dialogs/layers-panel.h \ dialogs/object-attributes.cpp \ dialogs/object-attributes.h \ + dialogs/rdf.cpp \ + dialogs/rdf.h \ dialogs/sp-attribute-widget.cpp \ dialogs/sp-attribute-widget.h \ dialogs/stroke-style.cpp \ - dialogs/stroke-style.h \ - dialogs/swatches.cpp \ - dialogs/swatches.h \ - dialogs/text-edit.cpp \ - dialogs/text-edit.h \ - dialogs/tiledialog.cpp \ - dialogs/tiledialog.h \ - dialogs/xml-tree.cpp \ - dialogs/xml-tree.h \ - dialogs/rdf.cpp \ - dialogs/rdf.h \ - dialogs/find.cpp \ - dialogs/find.h \ - dialogs/clonetiler.cpp \ - dialogs/clonetiler.h \ - dialogs/unclump.cpp \ - dialogs/unclump.h \ - dialogs/iconpreview.cpp \ - dialogs/iconpreview.h + dialogs/stroke-style.h \ + dialogs/swatches.cpp \ + dialogs/swatches.h \ + dialogs/text-edit.cpp \ + dialogs/text-edit.h \ + dialogs/unclump.cpp \ + dialogs/unclump.h \ + dialogs/xml-tree.cpp \ + dialogs/xml-tree.h # dialogs/sp-widget.c \ # dialogs/sp-widget.h \ diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index ce0fc15df..d1074ef73 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -1,14 +1,12 @@ -#define __SP_CLONE_TILER_C__ - -/* +/** @file * Clone tiling dialog - * - * Authors: + */ +/* Authors: * bulia byak <buliabyak@users.sf.net> * Johan Engelen <goejendaagh@zonnet.nl> * * Copyright (C) 2004-2006 Authors - * Released under GNU GPL + * Released under GNU GPL, read the file 'COPYING' for more information */ #ifdef HAVE_CONFIG_H @@ -1246,7 +1244,7 @@ clonetiler_apply( GtkWidget */*widget*/, void * ) bool prefs_bbox = prefs->getBool("/tools/bounding_box", false); SPItem::BBoxType bbox_type = ( prefs_bbox ? SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX ); - boost::optional<Geom::Rect> r = SP_ITEM(obj)->getBounds(sp_item_i2doc_affine(SP_ITEM(obj)), + Geom::OptRect r = SP_ITEM(obj)->getBounds(sp_item_i2doc_affine(SP_ITEM(obj)), bbox_type); if (r) { w = r->dimensions()[Geom::X]; diff --git a/src/dialogs/clonetiler.h b/src/dialogs/clonetiler.h index 82206818c..6bfb257a4 100644 --- a/src/dialogs/clonetiler.h +++ b/src/dialogs/clonetiler.h @@ -1,15 +1,14 @@ -#ifndef __SP_CLONE_TILER_H__ -#define __SP_CLONE_TILER_H__ - -/** - * \brief Clone tiling dialog - * - * Authors: - * bulia byak +/** @file + * @brief Clone tiling dialog + */ +/* Authors: + * bulia byak <buliabyak@users.sf.net> * * Copyright (C) 2004 Authors - * + * Released under the GNU GPL, read the file 'COPYING' for more information */ +#ifndef __SP_CLONE_TILER_H__ +#define __SP_CLONE_TILER_H__ #include <glib.h> diff --git a/src/dialogs/dialog-events.cpp b/src/dialogs/dialog-events.cpp index b306e42d6..da55936ce 100644 --- a/src/dialogs/dialog-events.cpp +++ b/src/dialogs/dialog-events.cpp @@ -1,9 +1,7 @@ -#define __DIALOG_EVENTS_C__ - -/** - * \brief Event handler for dialog windows - * - * Authors: +/** @file + * @brief Event handler for dialog windows + */ +/* Authors: * bulia byak <bulia@dr.com> * Johan Engelen <j.b.c.engelen@ewi.utwente.nl> * @@ -31,9 +29,9 @@ /** -* \brief This function is called to zero the transientize semaphore by a -* timeout. -*/ + * \brief This function is called to zero the transientize semaphore by a + * timeout. + */ gboolean sp_allow_again (gpointer *wd) { diff --git a/src/dialogs/dialog-events.h b/src/dialogs/dialog-events.h index 46cbc7a67..2fca84ad2 100644 --- a/src/dialogs/dialog-events.h +++ b/src/dialogs/dialog-events.h @@ -1,10 +1,7 @@ -#ifndef __DIALOG_EVENTS_H__ -#define __DIALOG_EVENTS_H__ - -/** - * \brief Event handler for dialog windows - * - * Authors: +/** @file + * @brief Event handler for dialog windows + */ +/* Authors: * bulia byak <bulia@dr.com> * * Copyright (C) 2003 authors @@ -12,6 +9,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef __DIALOG_EVENTS_H__ +#define __DIALOG_EVENTS_H__ + #include <gtk/gtkstyle.h> #include <gtk/gtkwindow.h> #include <forward.h> @@ -31,8 +31,8 @@ class Entry; } typedef struct { - GtkWidget *win; - guint stop; + GtkWidget *win; + guint stop; } win_data; diff --git a/src/dialogs/eek-color-def.cpp b/src/dialogs/eek-color-def.cpp index 9a079b68f..85b00b251 100644 --- a/src/dialogs/eek-color-def.cpp +++ b/src/dialogs/eek-color-def.cpp @@ -1,5 +1,5 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * +/** @file + * @brief EEK color definition */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -133,5 +133,15 @@ void ColorDef::removeCallback( ColorCallback cb, void* data ) (void)data; } - } // namespace eek + +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/eek-color-def.h b/src/dialogs/eek-color-def.h index e17e8a596..63cd096be 100644 --- a/src/dialogs/eek-color-def.h +++ b/src/dialogs/eek-color-def.h @@ -1,7 +1,5 @@ -#ifndef SEEN_EEK_COLOR_DEF_H -#define SEEN_EEK_COLOR_DEF_H -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * +/** @file + * @brief EEK color definition */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -39,6 +37,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifndef SEEN_EEK_COLOR_DEF_H +#define SEEN_EEK_COLOR_DEF_H + #include <string> #include <vector> @@ -87,5 +88,15 @@ private: } // namespace eek - #endif // SEEN_EEK_COLOR_DEF_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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/eek-preview.cpp b/src/dialogs/eek-preview.cpp index 145346af3..f9aadc561 100644 --- a/src/dialogs/eek-preview.cpp +++ b/src/dialogs/eek-preview.cpp @@ -1,5 +1,5 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * +/** @file + * @brief EEK preview stuff */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -655,27 +655,27 @@ static void eek_preview_init( EekPreview *preview ) /* GTK_STATE_SELECTED, */ /* GTK_STATE_INSENSITIVE */ - if ( 0 ) { - GdkColor color = {0,0,0,0}; - - color.red = 0xffff; - color.green = 0; - color.blue = 0xffff; - gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); - gtk_widget_modify_bg(widg, GTK_STATE_ACTIVE, &color); - - color.red = 0; - color.green = 0xffff; - color.blue = 0; - gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); - gtk_widget_modify_bg(widg, GTK_STATE_SELECTED, &color); - - color.red = 0xffff; - color.green = 0; - color.blue = 0; - gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); - gtk_widget_modify_bg( widg, GTK_STATE_PRELIGHT, &color ); - } + if ( 0 ) { + GdkColor color = {0,0,0,0}; + + color.red = 0xffff; + color.green = 0; + color.blue = 0xffff; + gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); + gtk_widget_modify_bg(widg, GTK_STATE_ACTIVE, &color); + + color.red = 0; + color.green = 0xffff; + color.blue = 0; + gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); + gtk_widget_modify_bg(widg, GTK_STATE_SELECTED, &color); + + color.red = 0xffff; + color.green = 0; + color.blue = 0; + gdk_colormap_alloc_color( gdk_colormap_get_system(), &color, FALSE, TRUE ); + gtk_widget_modify_bg( widg, GTK_STATE_PRELIGHT, &color ); + } } @@ -684,3 +684,13 @@ GtkWidget* eek_preview_new(void) return GTK_WIDGET( g_object_new( EEK_PREVIEW_TYPE, NULL ) ); } +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/eek-preview.h b/src/dialogs/eek-preview.h index ee99125af..40597eb48 100644 --- a/src/dialogs/eek-preview.h +++ b/src/dialogs/eek-preview.h @@ -1,7 +1,5 @@ -#ifndef SEEN_EEK_PREVIEW_H -#define SEEN_EEK_PREVIEW_H -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * +/** @file + * @brief EEK preview stuff */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -39,6 +37,9 @@ * * ***** END LICENSE BLOCK ***** */ +#ifndef SEEN_EEK_PREVIEW_H +#define SEEN_EEK_PREVIEW_H + #include <gtk/gtkdrawingarea.h> G_BEGIN_DECLS @@ -131,5 +132,15 @@ void eek_preview_set_size_mappings( guint count, GtkIconSize const* sizes ); G_END_DECLS - #endif /* SEEN_EEK_PREVIEW_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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index dc337ef8e..f1a68c999 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -1,11 +1,7 @@ -#define __SP_EXPORT_C__ - -/** \file - * \brief PNG export dialog +/** @file + * @brief PNG export dialog */ - -/* - * Authors: +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * bulia byak <buliabyak@users.sf.net> * Johan Engelen <j.b.c.engelen@ewi.utwente.nl> @@ -317,7 +313,7 @@ sp_export_dialog_area_box (GtkWidget * dlg) dlg ); sp_export_spinbutton_new ( "width", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, - us->gobj(), GTK_WIDGET(t->gobj()), 4, 0, _("Width:"), NULL, EXPORT_COORD_PRECISION, 1, + us->gobj(), GTK_WIDGET(t->gobj()), 4, 0, _("Wid_th:"), NULL, EXPORT_COORD_PRECISION, 1, G_CALLBACK (sp_export_area_width_value_changed), dlg ); @@ -333,7 +329,7 @@ sp_export_dialog_area_box (GtkWidget * dlg) dlg ); sp_export_spinbutton_new ( "height", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, - us->gobj(), GTK_WIDGET(t->gobj()), 4, 1, _("Height:"), NULL, EXPORT_COORD_PRECISION, 1, + us->gobj(), GTK_WIDGET(t->gobj()), 4, 1, _("Hei_ght:"), NULL, EXPORT_COORD_PRECISION, 1, G_CALLBACK (sp_export_area_height_value_changed), dlg ); @@ -492,7 +488,7 @@ sp_export_dialog (void) sp_export_spinbutton_new ( "bmheight", 16.0, 1.0, 1000000.0, 1.0, 10.0, NULL, GTK_WIDGET(t->gobj()), 0, 1, - _("Height:"), _("pixels at"), 0, 1, + _("_Height:"), _("pixels at"), 0, 1, G_CALLBACK (sp_export_bitmap_height_value_changed), dlg ); @@ -626,7 +622,7 @@ sp_export_dialog (void) { Gtk::HBox* hide_box = new Gtk::HBox(FALSE, 5); - GtkWidget *he = gtk_check_button_new_with_label(_("Hide all except selected")); + GtkWidget *he = gtk_check_button_new_with_label(_("Hide _all except selected")); gtk_widget_set_sensitive(GTK_WIDGET(he), TRUE); gtk_object_set_data(GTK_OBJECT(dlg), "hide_checkbox", he); hide_box->pack_start(*Glib::wrap(he), false, false); @@ -778,7 +774,7 @@ sp_export_selection_modified ( Inkscape::Application */*inkscape*/, if ( SP_ACTIVE_DESKTOP ) { SPDocument *doc; doc = sp_desktop_document (SP_ACTIVE_DESKTOP); - boost::optional<Geom::Rect> bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); + Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); if (bbox) { sp_export_set_area (base, bbox->min()[Geom::X], bbox->min()[Geom::Y], @@ -837,7 +833,7 @@ sp_export_area_toggled (GtkToggleButton *tb, GtkObject *base) if ( SP_ACTIVE_DESKTOP ) { SPDocument *doc; - boost::optional<Geom::Rect> bbox; + Geom::OptRect bbox; doc = sp_desktop_document (SP_ACTIVE_DESKTOP); /* Notice how the switch is used to 'fall through' here to get @@ -1102,26 +1098,27 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) dpi = DPI_BASE; } - NRRect area; - sp_item_invoke_bbox(item, &area, sp_item_i2r_affine((SPItem *) item), TRUE); - - gint width = (gint) ((area.x1 - area.x0) * dpi / PX_PER_IN + 0.5); - gint height = (gint) ((area.y1 - area.y0) * dpi / PX_PER_IN + 0.5); - - if (width > 1 && height > 1) { - /* Do export */ - if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), fn, - area.x0, area.y0, area.x1, area.y1, width, height, dpi, dpi, - nv->pagecolor, - NULL, NULL, TRUE, // overwrite without asking - hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL - )) { - gchar * error; - gchar * safeFile = Inkscape::IO::sanitizeString(fn); - error = g_strdup_printf(_("Could not export to filename %s.\n"), safeFile); - sp_ui_error_dialog(error); - g_free(safeFile); - g_free(error); + Geom::OptRect area; + sp_item_invoke_bbox(item, area, sp_item_i2r_affine((SPItem *) item), TRUE); + if (area) { + gint width = (gint) (area->width() * dpi / PX_PER_IN + 0.5); + gint height = (gint) (area->height() * dpi / PX_PER_IN + 0.5); + + if (width > 1 && height > 1) { + /* Do export */ + if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), fn, + *area, width, height, dpi, dpi, + nv->pagecolor, + NULL, NULL, TRUE, // overwrite without asking + hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL + )) { + gchar * error; + gchar * safeFile = Inkscape::IO::sanitizeString(fn); + error = g_strdup_printf(_("Could not export to filename %s.\n"), safeFile); + sp_ui_error_dialog(error); + g_free(safeFile); + g_free(error); + } } } n++; @@ -1183,7 +1180,7 @@ sp_export_export_clicked (GtkButton */*button*/, GtkObject *base) /* Do export */ if (!sp_export_png_file (sp_desktop_document (SP_ACTIVE_DESKTOP), filename_ext, - x0, y0, x1, y1, width, height, xdpi, ydpi, + Geom::Rect(Geom::Point(x0, y0), Geom::Point(x1, y1)), width, height, xdpi, ydpi, nv->pagecolor, sp_export_progress_callback, base, FALSE, hide ? (GSList *) sp_desktop_selection(SP_ACTIVE_DESKTOP)->itemList() : NULL @@ -1407,7 +1404,7 @@ sp_export_detect_size(GtkObject * base) { switch (this_test[i]) { case SELECTION_SELECTION: if ((sp_desktop_selection(SP_ACTIVE_DESKTOP))->isEmpty() == false) { - boost::optional<Geom::Rect> bbox = (sp_desktop_selection (SP_ACTIVE_DESKTOP))->bounds(); + Geom::OptRect bbox = (sp_desktop_selection (SP_ACTIVE_DESKTOP))->bounds(); //std::cout << "Selection " << bbox; if ( bbox && sp_export_bbox_equal(*bbox,current_bbox)) { @@ -1418,7 +1415,7 @@ sp_export_detect_size(GtkObject * base) { case SELECTION_DRAWING: { SPDocument *doc = sp_desktop_document (SP_ACTIVE_DESKTOP); - boost::optional<Geom::Rect> bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); + Geom::OptRect bbox = sp_item_bbox_desktop (SP_ITEM (SP_DOCUMENT_ROOT (doc))); // std::cout << "Drawing " << bbox2; if ( bbox && sp_export_bbox_equal(*bbox,current_bbox) ) { @@ -1969,9 +1966,9 @@ sp_export_filename_modified (GtkObject * object, gpointer data) Local Variables: mode:c++ c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)) + 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 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/export.h b/src/dialogs/export.h index 3bb0a1375..801ddc91a 100644 --- a/src/dialogs/export.h +++ b/src/dialogs/export.h @@ -1,14 +1,24 @@ +/** @file + * @brief export to bitmap dialog + */ +/* Authors: + * Lauris Kaplinski <lauris@kaplinski.com> + * bulia byak <buliabyak@users.sf.net> + * Johan Engelen <j.b.c.engelen@ewi.utwente.nl> + * + * Copyright (C) 1999-2007 Authors + * Copyright (C) 2001-2002 Ximian, Inc. + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + #ifndef SP_EXPORT_H #define SP_EXPORT_H /** - * \brief export to bitmap dialog - * * Creates a dialog window for exporting an image to a bitmap if one doesn't already exist and - * shows it to the user. If the dialog has already been created, it simply shows the window. - * + * shows it to the user. If the dialog has already been created, it simply shows the window. */ - void sp_export_dialog (void); #endif diff --git a/src/dialogs/extensions.cpp b/src/dialogs/extensions.cpp index e363df607..f168da33a 100644 --- a/src/dialogs/extensions.cpp +++ b/src/dialogs/extensions.cpp @@ -1,16 +1,13 @@ -/* - * A simple dialog for previewing icon representation. - * - * Authors: +/** @file + * @brief A simple dialog with information about extensions + */ +/* Authors: * Jon A. Cruz * * Copyright (C) 2005 Jon A. Cruz * * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif #include <gtk/gtkdialog.h> //for GTK_RESPONSE* types #include <gtkmm/scrolledwindow.h> @@ -116,8 +113,17 @@ void ExtensionsPanel::rescan() // g_message("\\------------------"); } - - } //namespace Dialogs } //namespace UI } //namespace Inkscape + +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/extensions.h b/src/dialogs/extensions.h index e253ab849..8b0fc2780 100644 --- a/src/dialogs/extensions.h +++ b/src/dialogs/extensions.h @@ -1,24 +1,23 @@ - -#ifndef SEEN_EXTENSIONS_H -#define SEEN_EXTENSIONS_H -/* - * A simple dialog for previewing icon representation. - * - * Authors: +/** @file + * A simple dialog with information about extensions + */ +/* Authors: * Jon A. Cruz * * Copyright (C) 2005 The Inkscape Organization - * * Released under GNU GPL, read the file 'COPYING' for more information */ + +#ifndef SEEN_EXTENSIONS_H +#define SEEN_EXTENSIONS_H #include <gtkmm/textview.h> #include "ui/widget/panel.h" namespace Inkscape { - namespace Extension { - class Extension; - } +namespace Extension { +class Extension; +} } namespace Inkscape { @@ -54,6 +53,4 @@ private: } //namespace UI } //namespace Inkscape - - #endif // SEEN_EXTENSIONS_H diff --git a/src/dialogs/fill-style.cpp b/src/dialogs/fill-style.cpp index e095425a9..e1c30e7ae 100644 --- a/src/dialogs/fill-style.cpp +++ b/src/dialogs/fill-style.cpp @@ -1,9 +1,7 @@ -#define __SP_FILL_STYLE_C__ - -/** - * \brief Fill style widget - * - * Authors: +/** @file + * @brief Fill style widget + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * Frank Felfe <innerspace@iname.com> * bulia byak <buliabyak@users.sf.net> diff --git a/src/dialogs/fill-style.h b/src/dialogs/fill-style.h index 96cb06987..3924412ec 100644 --- a/src/dialogs/fill-style.h +++ b/src/dialogs/fill-style.h @@ -1,10 +1,7 @@ -#ifndef __SP_FILL_STYLE_H__ -#define __SP_FILL_STYLE_H__ - -/** - * \brief Fill style configuration - * - * Authors: +/** @file + * @brief Fill style configuration + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * * Copyright (C) 2002 Lauris Kaplinski @@ -12,10 +9,11 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <glib.h> +#ifndef SEEN_DIALOGS_SP_FILL_STYLE_H +#define SEEN_DIALOGS_SP_FILL_STYLE_H +#include <glib.h> #include <gtk/gtkwidget.h> - #include "forward.h" diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp index 96a630553..29a0fe7e8 100644 --- a/src/dialogs/find.cpp +++ b/src/dialogs/find.cpp @@ -1,9 +1,7 @@ -#define __SP_TRANSFORMATION_C__ - -/** - * \brief Find dialog - * - * Authors: +/** @file + * @brief Find dialog + */ +/* Authors: * bulia byak <bulia@users.sf.net> * * Copyright (C) 2004 Authors @@ -11,13 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - - #include "widgets/icon.h" - #include "message-stack.h" //TODO : delete this @@ -69,9 +61,6 @@ sp_find_dialog(){ #define MIN_ONSCREEN_DISTANCE 50 -using NR::X; -using NR::Y; - static GtkWidget *dlg = NULL; static win_data wd; diff --git a/src/dialogs/find.h b/src/dialogs/find.h index 38200d532..fe5861a73 100644 --- a/src/dialogs/find.h +++ b/src/dialogs/find.h @@ -1,10 +1,7 @@ -#ifndef SEEN_FIND_H -#define SEEN_FIND_H - -/** - * \brief Find dialog - * - * Authors: +/** @file + * @brief Find dialog + */ +/* Authors: * bulia byak <bulia@users.sf.net> * * Copyright (C) 2004 Authors @@ -12,6 +9,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_FIND_H +#define SEEN_FIND_H + #include <gtk/gtkstyle.h> void sp_find_dialog(); diff --git a/src/dialogs/guidelinedialog.cpp b/src/dialogs/guidelinedialog.cpp index 1dc23cb2b..f0115ee91 100644 --- a/src/dialogs/guidelinedialog.cpp +++ b/src/dialogs/guidelinedialog.cpp @@ -1,9 +1,7 @@ -#define __GUIDELINE_CPP__ - -/* - * simple guideline dialog - * - * Authors: +/** @file + * @brief Simple guideline dialog + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * Andrius R. <knutux@gmail.com> * Johan Engelen @@ -285,4 +283,3 @@ void GuidelinePropertiesDialog::_setup() { End: */ // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : - diff --git a/src/dialogs/iconpreview.cpp b/src/dialogs/iconpreview.cpp index f31914e3e..4d402d235 100644 --- a/src/dialogs/iconpreview.cpp +++ b/src/dialogs/iconpreview.cpp @@ -1,7 +1,7 @@ -/* - * A simple dialog for previewing icon representation. - * - * Authors: +/** @file + * @brief A simple dialog for previewing icon representation. + */ +/* Authors: * Jon A. Cruz * Bob Jamison * Other dudes from The Inkscape Organization diff --git a/src/dialogs/iconpreview.h b/src/dialogs/iconpreview.h index 3a3652334..8f143725d 100644 --- a/src/dialogs/iconpreview.h +++ b/src/dialogs/iconpreview.h @@ -1,9 +1,7 @@ -#ifndef SEEN_ICON_PREVIEW_H -#define SEEN_ICON_PREVIEW_H -/* - * A simple dialog for previewing icon representation. - * - * Authors: +/** @file + * @brief A simple dialog for previewing icon representation. + */ +/* Authors: * Jon A. Cruz * Bob Jamison * Other dudes from The Inkscape Organization @@ -13,6 +11,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_ICON_PREVIEW_H +#define SEEN_ICON_PREVIEW_H + #include <gtkmm/box.h> #include <gtkmm/button.h> #include <gtkmm/label.h> diff --git a/src/dialogs/in-dt-coordsys.h b/src/dialogs/in-dt-coordsys.h index 6078f9b41..c2ec96d8e 100644 --- a/src/dialogs/in-dt-coordsys.h +++ b/src/dialogs/in-dt-coordsys.h @@ -4,7 +4,6 @@ bool in_dt_coordsys(SPObject const &item); - #endif /* !SEEN_IN_DT_COORDSYS */ /* diff --git a/src/dialogs/input.cpp b/src/dialogs/input.cpp index e23fcc848..0b4587f55 100644 --- a/src/dialogs/input.cpp +++ b/src/dialogs/input.cpp @@ -1,5 +1,3 @@ -#define __SP_INPUT_C__ - /** @file * @brief Extended input devices dialog */ @@ -13,8 +11,9 @@ */ #ifdef HAVE_CONFIG_H -# include "config.h" +# include <config.h> #endif + #include <gtk/gtksignal.h> #include <gtk/gtkinputdialog.h> #include <glibmm/ustring.h> diff --git a/src/dialogs/input.h b/src/dialogs/input.h index 70e68774e..0996d06ca 100644 --- a/src/dialogs/input.h +++ b/src/dialogs/input.h @@ -1,10 +1,7 @@ -#ifndef __SP_INPUT_H__ -#define __SP_INPUT_H__ - -/** - * \brief Extended input device dialog - * - * Author: +/** @file + * @brief Extended input device dialog + */ +/* Author: * Nicklas Lindgren <nili@lysator.liu.se> * * Copyright (C) 2005 Authors @@ -12,6 +9,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_DIALOGS_INPUT_H +#define SEEN_DIALOGS_INPUT_H void sp_input_load_from_preferences (void); void sp_input_save_to_preferences (void); diff --git a/src/dialogs/item-properties.cpp b/src/dialogs/item-properties.cpp index 808775786..d1992b158 100644 --- a/src/dialogs/item-properties.cpp +++ b/src/dialogs/item-properties.cpp @@ -1,9 +1,7 @@ -#define __SP_ITEM_PROPERTIES_C__ - -/* - * Object properties dialog - * - * Authors: +/** @file + * @brief Object properties dialog + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * bulia byak <buliabyak@users.sf.net> * Johan Engelen <goejendaagh@zonnet.nl> diff --git a/src/dialogs/item-properties.h b/src/dialogs/item-properties.h index a81034aae..9815a1fc5 100644 --- a/src/dialogs/item-properties.h +++ b/src/dialogs/item-properties.h @@ -1,20 +1,17 @@ -#ifndef __SP_ITEM_PROPERTIES_H__ -#define __SP_ITEM_PROPERTIES_H__ - -/** +/** @file * \brief Display settings dialog - * - * Author: + */ +/* Author: * Lauris Kaplinski <lauris@ximian.com> * * Copyright (C) 2001 Ximian, Inc. - * + * Released under GNU GPL, read the file 'COPYING' for more information */ -#include <glib.h> - - +#ifndef SEEN_DIALOGS_ITEM_PROPERTIES_H +#define SEEN_DIALOGS_ITEM_PROPERTIES_H +#include <glib.h> #include <gtk/gtkwidget.h> #include "../forward.h" @@ -22,8 +19,6 @@ GtkWidget *sp_item_widget_new (void); void sp_item_dialog (void); - - #endif /* diff --git a/src/dialogs/layer-properties.cpp b/src/dialogs/layer-properties.cpp index bd95fbc71..ccd91fa2e 100644 --- a/src/dialogs/layer-properties.cpp +++ b/src/dialogs/layer-properties.cpp @@ -1,8 +1,7 @@ -/** - * - * \brief Dialog for renaming layers - * - * Author: +/** @file + * @brief Dialog for renaming layers + */ +/* Author: * Bryce W. Harrington <bryce@bryceharrington.com> * Andrius R. <knutux@gmail.com> * @@ -12,12 +11,7 @@ * Released under GNU GPL. Read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - #include <gtkmm/stock.h> - #include <glibmm/i18n.h> #include "inkscape.h" #include "desktop.h" diff --git a/src/dialogs/layer-properties.h b/src/dialogs/layer-properties.h index 58bed141d..807967e8d 100644 --- a/src/dialogs/layer-properties.h +++ b/src/dialogs/layer-properties.h @@ -1,8 +1,7 @@ -/** - * - * \brief Dialog for renaming layers - * - * Author: +/** @file + * @brief Dialog for renaming layers + */ +/* Author: * Bryce W. Harrington <bryce@bryceharrington.com> * * Copyright (C) 2004 Bryce Harrington diff --git a/src/dialogs/layers-panel.h b/src/dialogs/layers-panel.h index 62596e407..1f593b9c6 100644 --- a/src/dialogs/layers-panel.h +++ b/src/dialogs/layers-panel.h @@ -1,5 +1,3 @@ -#ifndef SEEN_LAYERS_PANEL_H -#define SEEN_LAYERS_PANEL_H /* * A simple dialog for layer UI. * @@ -11,6 +9,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_LAYERS_PANEL_H +#define SEEN_LAYERS_PANEL_H + #include <gtkmm/treeview.h> #include <gtkmm/treestore.h> #include <gtkmm/tooltips.h> diff --git a/src/dialogs/object-attributes.cpp b/src/dialogs/object-attributes.cpp index e0c891ea1..d9bcf1489 100644 --- a/src/dialogs/object-attributes.cpp +++ b/src/dialogs/object-attributes.cpp @@ -1,9 +1,7 @@ -#define __SP_OBJECT_ATTRIBUTES_C__ - -/** - * \brief Generic properties editor - * - * Authors: +/** @file + * @brief Generic properties editor + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * bulia byak <buliabyak@users.sf.net> * @@ -12,10 +10,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include <glibmm/i18n.h> #include <string> #include <cstring> @@ -149,11 +143,8 @@ sp_object_attributes_dialog (SPObject *object, const gchar *tag) sp_object_attr_show_dialog (object, image_desc, tag); } } - } // end of sp_object_attributes_dialog() - - /* Local Variables: mode:c++ diff --git a/src/dialogs/object-attributes.h b/src/dialogs/object-attributes.h index 2fc562e16..726d8e43b 100644 --- a/src/dialogs/object-attributes.h +++ b/src/dialogs/object-attributes.h @@ -1,10 +1,7 @@ -#ifndef __SP_OBJECT_ATTRIBUTES_H__ -#define __SP_OBJECT_ATTRIBUTES_H__ - -/** - * \brief Generic object attribute editor - * - * Author: +/** @file + * @brief Generic object attribute editor + */ +/* Author: * Lauris Kaplinski <lauris@ximian.com> * * Copyright (C) 2001 Ximian, Inc. @@ -12,17 +9,15 @@ * Licensed under GNU GPL */ -#include <glib.h> - - +#ifndef SEEN_DIALOGS_OBJECT_ATTRIBUTES_H +#define SEEN_DIALOGS_OBJECT_ATTRIBUTES_H +#include <glib.h> #include <gtk/gtkwidget.h> #include "../forward.h" void sp_object_attributes_dialog (SPObject *object, const gchar *tag); - - #endif /* diff --git a/src/dialogs/rdf.cpp b/src/dialogs/rdf.cpp index 70cac4e1f..f0b174922 100644 --- a/src/dialogs/rdf.cpp +++ b/src/dialogs/rdf.cpp @@ -1,9 +1,9 @@ -/** - * \brief RDF manipulation functions - * - * FIXME: move these to xml/ instead of dialogs/ +/** @file + * @brief RDF manipulation functions * - * Authors: + * @todo move these to xml/ instead of dialogs/ + */ +/* Authors: * Kees Cook <kees@outflux.net> * Jon Phillips <jon@rejon.org> * @@ -11,22 +11,14 @@ * Copyright (C) 2006 Jon Phillips <jon@rejon.org> * * Released under GNU GPL, read the file 'COPYING' for more information - * */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - - - #include "xml/repr.h" #include "rdf.h" #include "sp-item-group.h" #include "inkscape.h" /* - Example RDF XML from various places... <rdf:RDF xmlns="http://creativecommons.org/ns#" @@ -83,8 +75,6 @@ Bag example: <rdf:li>filetype</rdf:li> </rdf:Bag> </dc:subject> - - */ struct rdf_double_t rdf_license_empty [] = { @@ -1021,7 +1011,6 @@ rdf_set_defaults ( SPDocument * doc ) } } - /* Local Variables: mode:c++ @@ -1031,4 +1020,4 @@ rdf_set_defaults ( SPDocument * doc ) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/rdf.h b/src/dialogs/rdf.h index 4c907e7aa..a98f5a1e4 100644 --- a/src/dialogs/rdf.h +++ b/src/dialogs/rdf.h @@ -1,20 +1,16 @@ -/** - * - * \brief headers for RDF types - * - * Authors: +/** @file + * @brief headers for RDF types + */ +/* Authors: * Kees Cook <kees@outflux.net> * - * Copyright (C) 2004 Kees Cook <kees@outflux.net> - * + * Copyright (C) 2004 Authors * Released under GNU GPL, read the file 'COPYING' for more information - * */ #ifndef _RDF_H_ #define _RDF_H_ #include <glib.h> - #include <glibmm/i18n.h> #include "document.h" @@ -121,4 +117,4 @@ void rdf_set_defaults ( SPDocument * doc ); fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/sp-attribute-widget.cpp b/src/dialogs/sp-attribute-widget.cpp index 9848d9f26..de14fc173 100644 --- a/src/dialogs/sp-attribute-widget.cpp +++ b/src/dialogs/sp-attribute-widget.cpp @@ -1,20 +1,12 @@ -#define __SP_ATTRIBUTE_WIDGET_C__ - -/** - * \brief SPAttributeWidget - * - * Widget, that listens and modifies repr attributes - * - * Authors: +/** @file + * @brief Widget that listens and modifies repr attributes + */ +/* Authors: * Lauris Kaplinski <lauris@ximian.com> * * Copyright (C) 2001 Ximian, Inc. - * - * Licensed under GNU GPL + * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif #include <gtk/gtktable.h> #include <gtk/gtklabel.h> diff --git a/src/dialogs/sp-attribute-widget.h b/src/dialogs/sp-attribute-widget.h index dc27c5a24..01da29bed 100644 --- a/src/dialogs/sp-attribute-widget.h +++ b/src/dialogs/sp-attribute-widget.h @@ -1,12 +1,7 @@ -#ifndef __SP_ATTRIBUTE_WIDGET_H__ -#define __SP_ATTRIBUTE_WIDGET_H__ - -/** - * \brief SPAttributeWidget - * - * Widget, that listens and modifies repr attributes - * - * Authors: +/** @file + * @brief Widget that listens and modifies repr attributes + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * * Copyright (C) 2002 authors @@ -15,8 +10,10 @@ * Licensed under GNU GPL, read the file 'COPYING' for more information */ -#include <glib.h> +#ifndef SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H +#define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H +#include <glib.h> #include <sigc++/connection.h> #define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ()) @@ -119,7 +116,6 @@ void sp_attribute_table_set_repr ( SPAttributeTable *spw, const gchar **labels, const gchar **attrs ); - #endif /* diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index c7173ad1e..b0375f755 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -1,9 +1,7 @@ -#define __SP_STROKE_STYLE_C__ - -/** - * \brief Stroke style dialog - * - * Authors: +/** @file + * @brief Stroke style dialog + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * Bryce Harrington <brycehar@bryceharrington.org> * bulia byak <buliabyak@users.sf.net> @@ -20,12 +18,6 @@ #define noSP_SS_VERBOSE -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - - - #include <glib/gmem.h> #include <gtk/gtk.h> @@ -594,7 +586,7 @@ sp_marker_prev_new(unsigned psize, gchar const *mname, // Find object's bbox in document Geom::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object))); - boost::optional<Geom::Rect> dbox = SP_ITEM(object)->getBounds(i2doc); + Geom::OptRect dbox = SP_ITEM(object)->getBounds(i2doc); if (!dbox) { return NULL; @@ -1834,7 +1826,6 @@ ink_extract_marker_name(gchar const *n, SPDocument *doc) return marker; } - /* Local Variables: mode:c++ @@ -1844,4 +1835,4 @@ ink_extract_marker_name(gchar const *n, SPDocument *doc) fill-column:99 End: */ -// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/stroke-style.h b/src/dialogs/stroke-style.h index 475a2d388..b947209e3 100644 --- a/src/dialogs/stroke-style.h +++ b/src/dialogs/stroke-style.h @@ -1,16 +1,16 @@ -#ifndef __SP_STROKE_STYLE_H__ -#define __SP_STROKE_STYLE_H__ - -/** - * \brief Stroke style dialog - * - * Author: +/** @file + * @brief Stroke style dialog + */ +/* Author: * Lauris Kaplinski <lauris@ximian.com> * * Copyright (C) 2001 Ximian, Inc. - * + * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_DIALOGS_STROKE_STYLE_H +#define SEEN_DIALOGS_STROKE_STYLE_H + #include <glib.h> #include <gtk/gtkwidget.h> diff --git a/src/dialogs/swatches.cpp b/src/dialogs/swatches.cpp index 71c16d87a..2eb30f27c 100644 --- a/src/dialogs/swatches.cpp +++ b/src/dialogs/swatches.cpp @@ -1,7 +1,7 @@ -/* - * A simple panel for color swatches - * - * Authors: +/** @file + * @brief Color swatches dialog + */ +/* Authors: * Jon A. Cruz * John Bintz * @@ -10,9 +10,6 @@ * * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif #include <errno.h> diff --git a/src/dialogs/swatches.h b/src/dialogs/swatches.h index 630fada7c..fc3c772b8 100644 --- a/src/dialogs/swatches.h +++ b/src/dialogs/swatches.h @@ -1,16 +1,14 @@ - -#ifndef SEEN_SWATCHES_H -#define SEEN_SWATCHES_H -/* - * A simple dialog for previewing icon representation. - * - * Authors: +/** @file + * @brief Color swatches dialog + */ +/* Authors: * Jon A. Cruz * * Copyright (C) 2005 Jon A. Cruz - * * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_DIALOGS_SWATCHES_H +#define SEEN_DIALOGS_SWATCHES_H #include <gtkmm/textview.h> #include <gtkmm/tooltips.h> diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index 1f8395c95..e213a8aba 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -1,9 +1,7 @@ -#define __SP_TEXT_EDIT_C__ - -/** - * \brief Text editing dialog - * - * Authors: +/** @file + * @brief Text editing dialog + */ +/* Authors: * Lauris Kaplinski <lauris@ximian.com> * bulia byak <buliabyak@users.sf.net> * Johan Engelen <goejendaagh@zonnet.nl> @@ -19,7 +17,6 @@ #endif #include <libnrtype/font-instance.h> - #include <gtk/gtk.h> #ifdef WITH_GTKSPELL diff --git a/src/dialogs/text-edit.h b/src/dialogs/text-edit.h index 1fa60c457..1e5cdc77d 100644 --- a/src/dialogs/text-edit.h +++ b/src/dialogs/text-edit.h @@ -1,12 +1,18 @@ -#ifndef SP_TEXT_EDIT_H -#define SP_TEXT_EDIT_H - -/** - * \brief text-edit +/** @file + * @brief Text-edit + */ +/* Authors: + * Lauris Kaplinski <lauris@ximian.com> + * bulia byak <buliabyak@users.sf.net> + * Johan Engelen <goejendaagh@zonnet.nl> * - * Text editing and font changes + * Copyright (C) 1999-2007 Authors + * Copyright (C) 2000-2001 Ximian, Inc. * + * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_DIALOGS_TEXT_EDIT_H +#define SEEN_DIALOGS_TEXT_EDIT_H void sp_text_edit_dialog (void); void sp_text_edit_dialog_default_set_insensitive (); //FIXME: Replace trough a verb diff --git a/src/dialogs/unclump.cpp b/src/dialogs/unclump.cpp index 1329fdb5f..2190bf77e 100644 --- a/src/dialogs/unclump.cpp +++ b/src/dialogs/unclump.cpp @@ -1,16 +1,13 @@ -#define __UNCLUMP_C__ - -/* - * Unclumping objects - * - * Authors: +/** @file + * @brief Unclumping objects + */ +/* Authors: * bulia byak * * Copyright (C) 2005 Authors - * Released under GNU GPL + * Released under GNU GPL, read the file 'COPYING' for more information */ - #include <algorithm> #include <map> #include "libnr/nr-matrix-ops.h" @@ -35,7 +32,7 @@ unclump_center (SPItem *item) return i->second; } - boost::optional<Geom::Rect> r = item->getBounds(sp_item_i2d_affine(item)); + Geom::OptRect r = item->getBounds(sp_item_i2d_affine(item)); if (r) { Geom::Point const c = r->midpoint(); c_cache[SP_OBJECT_ID(item)] = c; @@ -54,7 +51,7 @@ unclump_wh (SPItem *item) if ( i != wh_cache.end() ) { wh = i->second; } else { - boost::optional<Geom::Rect> r = item->getBounds(sp_item_i2d_affine(item)); + Geom::OptRect r = item->getBounds(sp_item_i2d_affine(item)); if (r) { wh = r->dimensions(); wh_cache[SP_OBJECT_ID(item)] = wh; @@ -379,3 +376,14 @@ unclump (GSList *items) } } } + +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/unclump.h b/src/dialogs/unclump.h index 6cebc0caf..c5a8bf7d7 100644 --- a/src/dialogs/unclump.h +++ b/src/dialogs/unclump.h @@ -1,20 +1,29 @@ -#ifndef UNCLUMP_H_SEEN -#define UNCLUMP_H_SEEN - -/** \file - * Unclumping objects +/** @file + * @brief Unclumping objects */ -/* - * Authors: +/* Authors: * bulia byak * * Copyright (C) 2005 Authors - * Released under GNU GPL + * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_DIALOGS_UNCLUMP_H +#define SEEN_DIALOGS_UNCLUMP_H + #include <glib/gslist.h> void unclump(GSList *items); - #endif /* !UNCLUMP_H_SEEN */ + +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index 2c596bc0e..78a5aa3a7 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -1,36 +1,18 @@ -#define __SP_XMLVIEW_TREE_C__ - -/** - * \brief XML View - * - * Authors: +/** @file + * @brief XML editor + */ +/* Authors: * Lauris Kaplinski <lauris@kaplinski.com> * MenTaLguY <mental@rydia.net> * bulia byak <buliabyak@users.sf.net> * Johan Engelen <goejendaagh@zonnet.nl> + * David Turner * * Copyright (C) 1999-2006 Authors - * Copyright (C) 2004 David Turner - * * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include <gtk/gtkmain.h> -#include <gtk/gtkhbox.h> -#include <gtk/gtkvbox.h> -#include <gtk/gtkhpaned.h> -#include <gtk/gtkvpaned.h> -#include <gtk/gtkhseparator.h> -#include <gtk/gtkhbbox.h> -#include <gtk/gtktoolbar.h> -#include <gtk/gtkscrolledwindow.h> -#include <gtk/gtkentry.h> -#include <gtk/gtkarrow.h> - +#include <gtk/gtk.h> #include <glibmm/i18n.h> #include "helper/window.h" #include "macros.h" diff --git a/src/dialogs/xml-tree.h b/src/dialogs/xml-tree.h index 6d0d44a7d..0edea8f4d 100644 --- a/src/dialogs/xml-tree.h +++ b/src/dialogs/xml-tree.h @@ -1,10 +1,7 @@ -#ifndef SP_XML_TREE_H -#define SP_XML_TREE_H - -/** - * \brief XML tree editing dialog for Inkscape - * - * Copyright Lauris Kaplinski, 2000 +/** @file + * @brief XML tree editing dialog for Inkscape + */ +/* Copyright Lauris Kaplinski, 2000 * * Released under GNU General Public License. * @@ -13,6 +10,9 @@ * */ +#ifndef SEEN_DIALOGS_XML_TREE_H +#define SEEN_DIALOGS_XML_TREE_H + void sp_xml_tree_dialog (void); #endif diff --git a/src/dialogs/debugdialog.cpp b/src/ui/dialog/debug.cpp index 42bf96050..b40796627 100644 --- a/src/dialogs/debugdialog.cpp +++ b/src/ui/dialog/debug.cpp @@ -1,14 +1,11 @@ -/* - * A very simple dialog for displaying Inkscape messages. Messages - * sent to g_log(), g_warning(), g_message(), ets, are routed here, - * in order to avoid messing with the startup console. - * - * Authors: +/** @file + * @brief A dialog that displays log messages + */ +/* Authors: * Bob Jamison * Other dudes from The Inkscape Organization * * Copyright (C) 2004 The Inkscape Organization - * * Released under GNU GPL, read the file 'COPYING' for more information */ #ifdef HAVE_CONFIG_H @@ -23,78 +20,32 @@ #include <gtkmm/menubar.h> #include <gtkmm/scrolledwindow.h> -#include "debugdialog.h" +#include "debug.h" namespace Inkscape { namespace UI { -namespace Dialogs { - - -//######################################################################### -//## I M P L E M E N T A T I O N -//######################################################################### +namespace Dialog { /** - * A dialog that displays log messages + * @brief A very simple dialog for displaying Inkscape messages - implementation */ class DebugDialogImpl : public DebugDialog, public Gtk::Dialog { - - public: - - - /** - * Constructor - */ +public: DebugDialogImpl(); - - /** - * Destructor - */ ~DebugDialogImpl(); - - /** - * Show the dialog - */ void show(); - - /** - * Do not show the dialog - */ void hide(); - - /** - * Clear all information from the dialog - */ void clear(); - - /** - * Display a message - */ void message(char const *msg); - - /** - * Redirect g_log() messages to this widget - */ void captureLogMessages(); - - /** - * Return g_log() messages to normal handling - */ void releaseLogMessages(); - - - private: - - +private: Gtk::MenuBar menuBar; - Gtk::Menu fileMenu; - Gtk::ScrolledWindow textScroll; - Gtk::TextView messageText; //Handler ID's @@ -104,32 +55,14 @@ class DebugDialogImpl : public DebugDialog, public Gtk::Dialog guint handlerPangomm; guint handlerGdkmm; guint handlerGtkmm; - }; - - - -//######################################################################### -//## E V E N T S -//######################################################################### - -/** - * Also a public method. Remove all text from the dialog - */ void DebugDialogImpl::clear() { Glib::RefPtr<Gtk::TextBuffer> buffer = messageText.get_buffer(); buffer->erase(buffer->begin(), buffer->end()); } - -//######################################################################### -//## C O N S T R U C T O R / D E S T R U C T O R -//######################################################################### -/** - * Constructor - */ DebugDialogImpl::DebugDialogImpl() { set_title(_("Messages")); @@ -168,30 +101,17 @@ DebugDialogImpl::DebugDialogImpl() handlerGtkmm = 0; } -/** - * Factory method. Use this to create a new DebugDialog - */ + DebugDialog *DebugDialog::create() { DebugDialog *dialog = new DebugDialogImpl(); return dialog; } - -/** - * Constructor - */ DebugDialogImpl::~DebugDialogImpl() { - - } - -//######################################################################### -//## M E T H O D S -//######################################################################### - void DebugDialogImpl::show() { //call super() @@ -201,16 +121,12 @@ void DebugDialogImpl::show() Gtk::Dialog::present(); } - - void DebugDialogImpl::hide() { - //call super() + // call super Gtk::Dialog::hide(); } - - void DebugDialogImpl::message(char const *msg) { Glib::RefPtr<Gtk::TextBuffer> buffer = messageText.get_buffer(); @@ -220,16 +136,14 @@ void DebugDialogImpl::message(char const *msg) buffer->insert (buffer->end(), uMsg); } - /* static instance, to reduce dependencies */ static DebugDialog *debugDialogInstance = NULL; DebugDialog *DebugDialog::getInstance() { - if ( !debugDialogInstance ) - { + if (!debugDialogInstance) { debugDialogInstance = new DebugDialogImpl(); - } + } return debugDialogInstance; } @@ -251,9 +165,7 @@ void dialogLoggingFunction(const gchar */*log_domain*/, gpointer user_data) { DebugDialogImpl *dlg = (DebugDialogImpl *)user_data; - dlg->message(messageText); - } @@ -263,74 +175,62 @@ void DebugDialogImpl::captureLogMessages() This might likely need more code, to capture Gtkmm and Glibmm warnings, or maybe just simply grab stdout/stderr */ - GLogLevelFlags flags = (GLogLevelFlags) (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | + GLogLevelFlags flags = (GLogLevelFlags) (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG); - if ( !handlerDefault ) - { + if ( !handlerDefault ) { handlerDefault = g_log_set_handler(NULL, flags, dialogLoggingFunction, (gpointer)this); - } - if ( !handlerGlibmm ) - { + } + if ( !handlerGlibmm ) { handlerGlibmm = g_log_set_handler("glibmm", flags, dialogLoggingFunction, (gpointer)this); - } - if ( !handlerAtkmm ) - { + } + if ( !handlerAtkmm ) { handlerAtkmm = g_log_set_handler("atkmm", flags, dialogLoggingFunction, (gpointer)this); - } - if ( !handlerPangomm ) - { + } + if ( !handlerPangomm ) { handlerPangomm = g_log_set_handler("pangomm", flags, dialogLoggingFunction, (gpointer)this); - } - if ( !handlerGdkmm ) - { + } + if ( !handlerGdkmm ) { handlerGdkmm = g_log_set_handler("gdkmm", flags, dialogLoggingFunction, (gpointer)this); - } - if ( !handlerGtkmm ) - { + } + if ( !handlerGtkmm ) { handlerGtkmm = g_log_set_handler("gtkmm", flags, dialogLoggingFunction, (gpointer)this); - } + } message("log capture started"); } void DebugDialogImpl::releaseLogMessages() { - if ( handlerDefault ) - { + if ( handlerDefault ) { g_log_remove_handler(NULL, handlerDefault); handlerDefault = 0; - } - if ( handlerGlibmm ) - { + } + if ( handlerGlibmm ) { g_log_remove_handler("glibmm", handlerGlibmm); handlerGlibmm = 0; - } - if ( handlerAtkmm ) - { + } + if ( handlerAtkmm ) { g_log_remove_handler("atkmm", handlerAtkmm); handlerAtkmm = 0; - } - if ( handlerPangomm ) - { + } + if ( handlerPangomm ) { g_log_remove_handler("pangomm", handlerPangomm); handlerPangomm = 0; - } - if ( handlerGdkmm ) - { + } + if ( handlerGdkmm ) { g_log_remove_handler("gdkmm", handlerGdkmm); handlerGdkmm = 0; - } - if ( handlerGtkmm ) - { + } + if ( handlerGtkmm ) { g_log_remove_handler("gtkmm", handlerGtkmm); handlerGtkmm = 0; - } + } message("log capture discontinued"); } @@ -340,9 +240,13 @@ void DebugDialogImpl::releaseLogMessages() } //namespace UI } //namespace Inkscape -//######################################################################### -//## E N D O F F I L E -//######################################################################### - - - +/* + 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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/debugdialog.h b/src/ui/dialog/debug.h index 1a4a036fd..f2ad61dd4 100644 --- a/src/dialogs/debugdialog.h +++ b/src/ui/dialog/debug.h @@ -1,11 +1,7 @@ -#ifndef __DEBUGDIALOG_H__ -#define __DEBUGDIALOG_H__ -/* - * A very simple dialog for displaying Inkscape messages. Messages - * sent to g_log(), g_warning(), g_message(), ets, are routed here, - * in order to avoid messing with the startup console. - * - * Authors: +/** @file + * @brief Dialog for displaying Inkscape messages + */ +/* Authors: * Bob Jamison * Other dudes from The Inkscape Organization * @@ -14,28 +10,24 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ - +#ifndef SEEN_UI_DIALOGS_DEBUGDIALOG_H +#define SEEN_UI_DIALOGS_DEBUGDIALOG_H namespace Inkscape { namespace UI { -namespace Dialogs { +namespace Dialog { /** - * A dialog that displays log messages + * @brief A very simple dialog for displaying Inkscape messages. + * + * Messages sent to g_log(), g_warning(), g_message(), ets, are routed here, + * in order to avoid messing with the startup console. */ class DebugDialog { - - public: - - - /** - * Constructor - */ +public: DebugDialog() {}; - - /** * Factory method */ @@ -58,7 +50,9 @@ class DebugDialog virtual void hide() = 0; /** - * Clear all information from the dialog + * @brief Clear all information from the dialog + * + * Also a public method. Remove all text from the dialog */ virtual void clear() = 0; @@ -78,27 +72,29 @@ class DebugDialog virtual void releaseLogMessages() = 0; /** - * Get a shared singleton instance - */ + * Factory method. Use this to create a new DebugDialog + */ static DebugDialog *getInstance(); /** * Show the instance above */ static void showInstance(); - - - - }; - } //namespace Dialogs } //namespace UI } //namespace Inkscape - - - #endif /* __DEBUGDIALOG_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:encoding=utf-8:textwidth=99 : diff --git a/src/dialogs/tiledialog.cpp b/src/ui/dialog/tile.cpp index f597c601b..7f45901c3 100644 --- a/src/dialogs/tiledialog.cpp +++ b/src/ui/dialog/tile.cpp @@ -17,7 +17,6 @@ # include <config.h> #endif - #include <gtk/gtkdialog.h> //for GTK_RESPONSE* types #include <gtk/gtksizegroup.h> #include <glibmm/i18n.h> @@ -31,9 +30,7 @@ #include "document.h" #include "sp-item.h" #include "widgets/icon.h" -#include "tiledialog.h" - - +#include "tile.h" /* * Sort items by their x co-ordinates, taking account of y (keeps rows intact) @@ -48,8 +45,8 @@ sp_compare_x_position(SPItem *first, SPItem *second) using Geom::X; using Geom::Y; - boost::optional<Geom::Rect> a = first->getBounds(sp_item_i2doc_affine(first)); - boost::optional<Geom::Rect> b = second->getBounds(sp_item_i2doc_affine(second)); + Geom::OptRect a = first->getBounds(sp_item_i2doc_affine(first)); + Geom::OptRect b = second->getBounds(sp_item_i2doc_affine(second)); if ( !a || !b ) { // FIXME? @@ -88,8 +85,8 @@ sp_compare_x_position(SPItem *first, SPItem *second) int sp_compare_y_position(SPItem *first, SPItem *second) { - boost::optional<Geom::Rect> a = first->getBounds(sp_item_i2doc_affine(first)); - boost::optional<Geom::Rect> b = second->getBounds(sp_item_i2doc_affine(second)); + Geom::OptRect a = first->getBounds(sp_item_i2doc_affine(first)); + Geom::OptRect b = second->getBounds(sp_item_i2doc_affine(second)); if ( !a || !b ) { // FIXME? @@ -168,7 +165,7 @@ void TileDialog::Grid_Arrange () cnt=0; for (; items != NULL; items = items->next) { SPItem *item = SP_ITEM(items->data); - boost::optional<Geom::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + Geom::OptRect b = item->getBounds(sp_item_i2doc_affine(item)); if (!b) { continue; } @@ -210,7 +207,7 @@ void TileDialog::Grid_Arrange () const GSList *sizes = sorted; for (; sizes != NULL; sizes = sizes->next) { SPItem *item = SP_ITEM(sizes->data); - boost::optional<Geom::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + Geom::OptRect b = item->getBounds(sp_item_i2doc_affine(item)); if (b) { width = b->dimensions()[Geom::X]; height = b->dimensions()[Geom::Y]; @@ -267,7 +264,7 @@ void TileDialog::Grid_Arrange () } - boost::optional<Geom::Rect> sel_bbox = selection->bounds(); + Geom::OptRect sel_bbox = selection->bounds(); // Fit to bbox, calculate padding between rows accordingly. if ( sel_bbox && !SpaceManualRadioButton.get_active() ){ #ifdef DEBUG_GRID_ARRANGE @@ -317,7 +314,7 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h for (; current_row != NULL; current_row = current_row->next) { SPItem *item=SP_ITEM(current_row->data); Inkscape::XML::Node *repr = SP_OBJECT_REPR(item); - boost::optional<Geom::Rect> b = item->getBounds(sp_item_i2doc_affine(item)); + Geom::OptRect b = item->getBounds(sp_item_i2doc_affine(item)); Geom::Point min; if (b) { width = b->dimensions()[Geom::X]; diff --git a/src/dialogs/tiledialog.h b/src/ui/dialog/tile.h index a1201956a..075b2b33f 100644 --- a/src/dialogs/tiledialog.h +++ b/src/ui/dialog/tile.h @@ -1,9 +1,7 @@ -#ifndef __TILEDIALOG_H__ -#define __TILEDIALOG_H__ -/* - * A simple dialog for creating grid type arrangements of selected objects - * - * Authors: +/** @file + * @brief Dialog for creating grid type arrangements of selected objects + */ +/* Authors: * Bob Jamison ( based off trace dialog) * John Cliff * Other dudes from The Inkscape Organization @@ -14,6 +12,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#ifndef SEEN_UI_DIALOG_TILE_H +#define SEEN_UI_DIALOG_TILE_H #include <gtkmm/box.h> #include <gtkmm/notebook.h> @@ -31,25 +31,11 @@ namespace Dialog { /** - * A dialog that displays log messages + * Dialog for tiling an object */ class TileDialog : public UI::Widget::Panel { - public: - - /** - * Constructor - */ TileDialog() ; - - /** - * Factory method - */ - static TileDialog& getInstance() { return *new TileDialog(); } - - /** - * Destructor - */ virtual ~TileDialog() {}; /** @@ -62,15 +48,12 @@ public: */ void updateSelection(); - /** * Callback from Apply */ virtual void _apply(); - /** - * Callback from spinbuttons - */ + // Callbacks from spinbuttons void on_row_spinbutton_changed(); void on_col_spinbutton_changed(); void on_xpad_spinbutton_changed(); @@ -83,6 +66,10 @@ public: void VertAlign_changed(); void HorizAlign_changed(); + static TileDialog& getInstance() { + static TileDialog instance; + return instance; + } private: TileDialog(TileDialog const &d); // no copy @@ -91,8 +78,6 @@ private: bool userHidden; bool updating; - - Gtk::Notebook notebook; Gtk::Tooltips tips; @@ -176,7 +161,6 @@ private: Gtk::HBox ColumnWidthBox; Gtk::Label ColumnWidthLabel; Gtk::SpinButton ColumnWidthSpinner; - }; @@ -187,3 +171,13 @@ private: #endif /* __TILEDIALOG_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:encoding=utf-8:textwidth=99 : |
