summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-10-03 03:44:17 +0000
committerJon A. Cruz <jon@joncruz.org>2011-10-03 03:44:17 +0000
commit20097d47e6945bceb57d2335d23fe764f493ab59 (patch)
tree47a1f62624d42e0302c2c370c1c23b2670e814ed
parentNext pass of doxygen @brief cleanup. (diff)
downloadinkscape-20097d47e6945bceb57d2335d23fe764f493ab59.tar.gz
inkscape-20097d47e6945bceb57d2335d23fe764f493ab59.zip
Another minor pass of Doxygen cleanup.
(bzr r10659)
-rw-r--r--src/arc-context.cpp11
-rw-r--r--src/box3d-context.cpp6
-rw-r--r--src/desktop-events.cpp5
-rw-r--r--src/desktop.cpp46
-rw-r--r--src/doxygen-main.cpp33
-rw-r--r--src/event-context.cpp30
-rw-r--r--src/file.cpp5
-rw-r--r--src/flood-context.cpp137
-rw-r--r--src/gc.cpp2
-rw-r--r--src/gradient-drag.cpp308
-rw-r--r--src/graphlayout.cpp5
-rw-r--r--src/guide-snapper.cpp4
-rw-r--r--src/inkscape.cpp5
-rw-r--r--src/interface.cpp69
-rw-r--r--src/knotholder.cpp4
-rw-r--r--src/line-snapper.cpp2
-rw-r--r--src/lpe-tool-context.cpp9
-rw-r--r--src/object-snapper.cpp2
-rw-r--r--src/rdf.cpp21
-rw-r--r--src/rect-context.cpp6
-rw-r--r--src/rubberband.cpp2
-rw-r--r--src/selection-chemistry.cpp6
-rw-r--r--src/seltrans.cpp2
-rw-r--r--src/shape-editor.cpp2
-rw-r--r--src/snap-preferences.cpp10
-rw-r--r--src/snap.cpp264
-rw-r--r--src/snapped-curve.cpp2
-rw-r--r--src/snapped-line.cpp2
-rw-r--r--src/snapped-point.cpp2
-rw-r--r--src/snapper.cpp10
-rw-r--r--src/sp-desc.cpp9
-rw-r--r--src/sp-item-transform.cpp66
-rw-r--r--src/sp-item.cpp14
-rw-r--r--src/sp-metadata.cpp53
-rw-r--r--src/sp-title.cpp9
-rw-r--r--src/spiral-context.cpp9
-rw-r--r--src/star-context.cpp12
-rw-r--r--src/style.cpp5
-rw-r--r--src/unclump.cpp5
-rw-r--r--src/uri.cpp96
-rw-r--r--src/verbs.cpp748
-rw-r--r--src/winconsole.cpp5
42 files changed, 1015 insertions, 1028 deletions
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index 96f5e1cff..1f3e118fe 100644
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Ellipse drawing context
+/**
+ * @file
+ * Ellipse drawing context.
*/
/* Authors:
* Mitsuru Oka
@@ -153,9 +154,9 @@ static void sp_arc_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder.
-*/
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
void sp_arc_context_selection_changed(Inkscape::Selection * selection, gpointer data)
{
SPArcContext *ac = SP_ARC_CONTEXT(data);
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 87b182d10..9c144e927 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -168,9 +168,9 @@ static void sp_box3d_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-*/
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
Box3DContext *bc = SP_BOX3D_CONTEXT(data);
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index b886e884e..0565402a2 100644
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Event handlers for SPDesktop
+/**
+ * @file
+ * Event handlers for SPDesktop.
*/
/* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/desktop.cpp b/src/desktop.cpp
index dc06f773e..2bec9afec 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -736,11 +736,10 @@ SPItem *SPDesktop::getGroupAtPoint(Geom::Point const p) const
}
/**
- * \brief Returns the mouse point in document coordinates; if mouse is
- * outside the canvas, returns the center of canvas viewpoint
+ * Returns the mouse point in document coordinates; if mouse is
+ * outside the canvas, returns the center of canvas viewpoint.
*/
-Geom::Point
-SPDesktop::point() const
+Geom::Point SPDesktop::point() const
{
Geom::Point p = _widget->getPointer();
Geom::Point pw = sp_canvas_window_to_world (canvas, p);
@@ -882,8 +881,7 @@ SPDesktop::prev_zoom()
/**
* Set zoom to next in list.
*/
-void
-SPDesktop::next_zoom()
+void SPDesktop::next_zoom()
{
if (zooms_future.empty()) {
this->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("No next zoom."));
@@ -901,12 +899,12 @@ SPDesktop::next_zoom()
zooms_future.pop_front();
}
-/** \brief Performs a quick zoom into what the user is working on
- \param enable Whether we're going in or out of quick zoom
-
-*/
-void
-SPDesktop::zoom_quick (bool enable)
+/**
+ * Performs a quick zoom into what the user is working on.
+ *
+ * @param enable Whether we're going in or out of quick zoom.
+ */
+void SPDesktop::zoom_quick(bool enable)
{
if (enable == _quick_zoom_enabled) {
return;
@@ -1241,22 +1239,22 @@ SPDesktop::fullscreen()
_widget->setFullscreen();
}
-/** \brief Checks to see if the user is working in focused mode
-
- Returns the value of \c _focusMode
-*/
-bool
-SPDesktop::is_focusMode()
+/**
+ * Checks to see if the user is working in focused mode.
+ *
+ * @return the value of \c _focusMode.
+ */
+bool SPDesktop::is_focusMode()
{
return _focusMode;
}
-/** \brief Changes whether the user is in focus mode or not
- \param mode Which mode the view should be in
-
-*/
-void
-SPDesktop::focusMode (bool mode)
+/**
+ * Changes whether the user is in focus mode or not.
+ *
+ * @param mode Which mode the view should be in.
+ */
+void SPDesktop::focusMode(bool mode)
{
if (mode == _focusMode) { return; }
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index 58c2f3f9a..7b6148f7a 100644
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Doxygen documentation - main page and namespace documentation.
+/**
+ * @file
+ * Doxygen documentation - main page and namespace documentation.
*/
/* Authors:
* Ralf Stephan <ralf@ark.in-berlin.de>
@@ -13,14 +14,14 @@
// Note: % before a word prevents that word from being linkified
/**
- * @brief Main %Inkscape namespace
+ * Main %Inkscape namespace.
*
* This namespace contains all code internal to %Inkscape.
*/
namespace Inkscape {
/**
- * @brief Some STL-style algorithms
+ * Some STL-style algorithms.
*
* This namespace contains a few generic algorithms used with the %XML tree.
*/
@@ -28,7 +29,7 @@ namespace Algorithms {}
/**
- * @brief Debugging utilities
+ * Debugging utilities.
*
* This namespace contains various debugging code which can help developers
* to pinpoint problems with their (or others') code.
@@ -36,14 +37,14 @@ namespace Algorithms {}
namespace Debug {}
/**
- * @brief Rendering-related code
+ * Rendering-related code.
*
* This namespace contains code related to the renderer.
*/
namespace Display {}
/**
- * @brief Extension support
+ * Extension support.
*
* This namespace contains the extension subsystem and implementations
* of the internal extensions. This includes input and output filters, bitmap
@@ -52,7 +53,7 @@ namespace Display {}
namespace Extension {}
/**
- * @brief Boehm-GC based garbage collector
+ * Boehm-GC based garbage collector.
*
* This namespace contains code related to the garbage collector and base
* classes for %GC-managed objects.
@@ -60,7 +61,7 @@ namespace Extension {}
namespace GC {}
/**
- * @brief Low-level IO code
+ * Low-level IO code.
*
* This namespace contains low level IO-related code, including a homegrown
* streams implementation, routines for formatting SVG output, and some
@@ -69,7 +70,7 @@ namespace GC {}
namespace IO {}
/**
- * @brief Live Path Effects code
+ * Live Path Effects code.
*
* This namespace contains classes and functions related to the implementation
* of Live Path Effects, which apply arbitrary transformation to a path and
@@ -78,7 +79,7 @@ namespace IO {}
namespace LivePathEffect {}
/**
- * @brief Tracing backend
+ * Tracing backend.
*
* This namespace contains the integrated potrace-based tracing backend, used
* in the Trace Bitmap and Paint Bucket features.
@@ -86,21 +87,21 @@ namespace LivePathEffect {}
namespace Trace {}
/**
- * @brief User interface code
+ * User interface code.
*
* This namespace contains everything related to the user interface of Inkscape.
*/
namespace UI {
/**
- * @brief Dialog code
+ * Dialog code.
*
* This namespace contains all code related to dialogs.
*/
namespace Dialog {}
/**
- * @brief Custom widgets
+ * Custom widgets.
*
* This namespace contains custom user interface widgets used thorought
* Inkscape.
@@ -110,7 +111,7 @@ namespace Widget {}
} // namespace UI
/**
- * @brief Miscellaneous supporting code
+ * Miscellaneous supporting code.
*
* This namespace contains miscellaneous low-level code: an implementation of
* garbage-collected lists, tuples, generic pointer iterators and length unit
@@ -119,7 +120,7 @@ namespace Widget {}
namespace Util {}
/**
- * @brief %Inkscape %XML tree
+ * @Inkscape %XML tree.
*
* This namespace contains classes and functions that comprise the XML tree
* of Inkscape documents.
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 5a1c7130a..a92ab55e2 100644
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -1,4 +1,5 @@
-/** \file
+/**
+ * @file
* Main event handling, and related helper functions.
*
* Authors:
@@ -233,7 +234,7 @@ static void sp_event_context_private_setup(SPEventContext *ec) {
}
/**
- * \brief Gobbles next key events on the queue with the same keyval and mask. Returns the number of events consumed.
+ * Gobbles next key events on the queue with the same keyval and mask. Returns the number of events consumed.
*/
gint gobble_key_events(guint keyval, gint mask) {
GdkEvent *event_next;
@@ -259,7 +260,7 @@ gint gobble_key_events(guint keyval, gint mask) {
}
/**
- * \brief Gobbles next motion notify events on the queue with the same mask. Returns the number of events consumed.
+ * Gobbles next motion notify events on the queue with the same mask. Returns the number of events consumed.
*/
gint gobble_motion_events(gint mask) {
GdkEvent *event_next;
@@ -771,9 +772,8 @@ gint sp_event_context_private_item_handler(SPEventContext *ec, SPItem *item,
}
/**
- * @brief: Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case)
+ * Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case).
*/
-
bool sp_event_context_knot_mouseover(SPEventContext *ec)
{
if (ec->shape_editor) {
@@ -784,7 +784,7 @@ bool sp_event_context_knot_mouseover(SPEventContext *ec)
}
/**
- * @brief An observer that relays pref changes to the derived classes
+ * An observer that relays pref changes to the derived classes.
*/
class ToolPrefObserver: public Inkscape::Preferences::Observer {
public:
@@ -1184,15 +1184,15 @@ void event_context_print_event_info(GdkEvent *event, bool print_return) {
}
/**
- * \brief Analyses the current event, calculates the mouse speed, turns snapping off (temporarily) if the
+ * Analyses the current event, calculates the mouse speed, turns snapping off (temporarily) if the
* mouse speed is above a threshold, and stores the current event such that it can be re-triggered when needed
- * (re-triggering is controlled by a watchdog timer)
+ * (re-triggering is controlled by a watchdog timer).
*
- * \param ec Pointer to the event context
- * \param dse_item Pointer that store a reference to a canvas or to an item
- * \param dse_item2 Another pointer, storing a reference to a knot or controlpoint
- * \param event Pointer to the motion event
- * \param origin Identifier (enum) specifying where the delay (and the call to this method) were initiated
+ * @param ec Pointer to the event context.
+ * @param dse_item Pointer that store a reference to a canvas or to an item.
+ * @param dse_item2 Another pointer, storing a reference to a knot or controlpoint.
+ * @param event Pointer to the motion event.
+ * @param origin Identifier (enum) specifying where the delay (and the call to this method) were initiated.
*/
void sp_event_context_snap_delay_handler(SPEventContext *ec,
gpointer const dse_item, gpointer const dse_item2, GdkEventMotion *event,
@@ -1270,8 +1270,8 @@ void sp_event_context_snap_delay_handler(SPEventContext *ec,
}
/**
- * \brief When the snap delay watchdog timer barks, this method will be called and will re-inject the last motion
- * event in an appropriate place, with snapping being turned on again
+ * When the snap delay watchdog timer barks, this method will be called and will re-inject the last motion
+ * event in an appropriate place, with snapping being turned on again.
*/
gboolean sp_event_context_snap_watchdog_callback(gpointer data) {
// Snap NOW! For this the "postponed" flag will be reset and the last motion event will be repeated
diff --git a/src/file.cpp b/src/file.cpp
index 350281dee..e8901d306 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief File/Print operations
+/**
+ * @file
+ * File/Print operations.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 9e8705862..6d291a482 100644
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Bucket fill drawing context, works by bitmap filling an area on a rendered version
+/**
+ * @file
+ * Bucket fill drawing context, works by bitmap filling an area on a rendered version
* of the current display and then tracing the result using potrace.
*/
/* Author:
@@ -158,9 +159,9 @@ static void sp_flood_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-*/
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
void sp_flood_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPFloodContext *rc = SP_FLOOD_CONTEXT(data);
@@ -216,11 +217,11 @@ compose_onto (guint32 px, guint32 bg)
}
/**
- * \brief Get the pointer to a pixel in a pixel buffer.
- * \param px The pixel buffer.
- * \param x The X coordinate.
- * \param y The Y coordinate.
- * \param stride The rowstride of the pixel buffer.
+ * Get the pointer to a pixel in a pixel buffer.
+ * @param px The pixel buffer.
+ * @param x The X coordinate.
+ * @param y The Y coordinate.
+ * @param stride The rowstride of the pixel buffer.
*/
inline guint32 get_pixel(guchar *px, int x, int y, int stride) {
return *reinterpret_cast<guint32*>(px + y * stride + x * 4);
@@ -231,7 +232,7 @@ inline unsigned char * get_trace_pixel(guchar *trace_px, int x, int y, int width
}
/**
- * \brief Generate the list of trace channel selection entries.
+ * Generate the list of trace channel selection entries.
*/
GList * flood_channels_dropdown_items_list() {
GList *glist = NULL;
@@ -249,7 +250,7 @@ GList * flood_channels_dropdown_items_list() {
}
/**
- * \brief Generate the list of autogap selection entries.
+ * Generate the list of autogap selection entries.
*/
GList * flood_autogap_dropdown_items_list() {
GList *glist = NULL;
@@ -263,13 +264,13 @@ GList * flood_autogap_dropdown_items_list() {
}
/**
- * \brief Compare a pixel in a pixel buffer with another pixel to determine if a point should be included in the fill operation.
- * \param check The pixel in the pixel buffer to check.
- * \param orig The original selected pixel to use as the fill target color.
- * \param merged_orig_pixel The original pixel merged with the background.
- * \param dtc The desktop background color.
- * \param threshold The fill threshold.
- * \param method The fill method to use as defined in PaintBucketChannels.
+ * Compare a pixel in a pixel buffer with another pixel to determine if a point should be included in the fill operation.
+ * @param check The pixel in the pixel buffer to check.
+ * @param orig The original selected pixel to use as the fill target color.
+ * @param merged_orig_pixel The original pixel merged with the background.
+ * @param dtc The desktop background color.
+ * @param threshold The fill threshold.
+ * @param method The fill method to use as defined in PaintBucketChannels.
*/
static bool compare_pixels(guint32 check, guint32 orig, guint32 merged_orig_pixel, guint32 dtc, int threshold, PaintBucketChannels method)
{
@@ -367,13 +368,13 @@ struct bitmap_coords_info {
};
/**
- * \brief Check if a pixel can be included in the fill.
- * \param px The rendered pixel buffer to check.
- * \param trace_t The pixel in the trace pixel buffer to check or mark.
- * \param x The X coordinate.
- * \param y The y coordinate.
- * \param orig_color The original selected pixel to use as the fill target color.
- * \param bci The bitmap_coords_info structure.
+ * Check if a pixel can be included in the fill.
+ * @param px The rendered pixel buffer to check.
+ * @param trace_t The pixel in the trace pixel buffer to check or mark.
+ * @param x The X coordinate.
+ * @param y The y coordinate.
+ * @param orig_color The original selected pixel to use as the fill target color.
+ * @param bci The bitmap_coords_info structure.
*/
inline static bool check_if_pixel_is_paintable(guchar *px, unsigned char *trace_t, int x, int y, guint32 orig_color, bitmap_coords_info bci) {
if (is_pixel_paintability_checked(trace_t)) {
@@ -391,11 +392,11 @@ inline static bool check_if_pixel_is_paintable(guchar *px, unsigned char *trace_
}
/**
- * \brief Perform the bitmap-to-vector tracing and place the traced path onto the document.
- * \param px The trace pixel buffer to trace to SVG.
- * \param desktop The desktop on which to place the final SVG path.
- * \param transform The transform to apply to the final SVG path.
- * \param union_with_selection If true, merge the final SVG path with the current selection.
+ * Perform the bitmap-to-vector tracing and place the traced path onto the document.
+ * @param px The trace pixel buffer to trace to SVG.
+ * @param desktop The desktop on which to place the final SVG path.
+ * @param transform The transform to apply to the final SVG path.
+ * @param union_with_selection If true, merge the final SVG path with the current selection.
*/
static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *desktop, Geom::Affine transform, unsigned int min_x, unsigned int max_x, unsigned int min_y, unsigned int max_y, bool union_with_selection) {
SPDocument *document = sp_desktop_document(desktop);
@@ -526,7 +527,7 @@ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *deskto
}
/**
- * \brief The possible return states of perform_bitmap_scanline_check()
+ * The possible return states of perform_bitmap_scanline_check().
*/
enum ScanlineCheckResult {
SCANLINE_CHECK_OK,
@@ -535,10 +536,10 @@ enum ScanlineCheckResult {
};
/**
- * \brief Determine if the provided coordinates are within the pixel buffer limits.
- * \param x The X coordinate.
- * \param y The Y coordinate.
- * \param bci The bitmap_coords_info structure.
+ * Determine if the provided coordinates are within the pixel buffer limits.
+ * @param x The X coordinate.
+ * @param y The Y coordinate.
+ * @param bci The bitmap_coords_info structure.
*/
inline static bool coords_in_range(unsigned int x, unsigned int y, bitmap_coords_info bci) {
return (x < bci.width) &&
@@ -552,12 +553,12 @@ inline static bool coords_in_range(unsigned int x, unsigned int y, bitmap_coords
#define PAINT_DIRECTION_ALL 15
/**
- * \brief Paint a pixel or a square (if autogap is enabled) on the trace pixel buffer
- * \param px The rendered pixel buffer to check.
- * \param trace_px The trace pixel buffer.
- * \param orig_color The original selected pixel to use as the fill target color.
- * \param bci The bitmap_coords_info structure.
- * \param original_point_trace_t The original pixel in the trace pixel buffer to check.
+ * Paint a pixel or a square (if autogap is enabled) on the trace pixel buffer.
+ * @param px The rendered pixel buffer to check.
+ * @param trace_px The trace pixel buffer.
+ * @param orig_color The original selected pixel to use as the fill target color.
+ * @param bci The bitmap_coords_info structure.
+ * @param original_point_trace_t The original pixel in the trace pixel buffer to check.
*/
inline static unsigned int paint_pixel(guchar *px, guchar *trace_px, guint32 orig_color, bitmap_coords_info bci, unsigned char *original_point_trace_t) {
if (bci.radius == 0) {
@@ -600,12 +601,12 @@ inline static unsigned int paint_pixel(guchar *px, guchar *trace_px, guint32 ori
}
/**
- * \brief Push a point to be checked onto the bottom of the rendered pixel buffer check queue.
- * \param fill_queue The fill queue to add the point to.
- * \param max_queue_size The maximum size of the fill queue.
- * \param trace_t The trace pixel buffer pixel.
- * \param x The X coordinate.
- * \param y The Y coordinate.
+ * Push a point to be checked onto the bottom of the rendered pixel buffer check queue.
+ * @param fill_queue The fill queue to add the point to.
+ * @param max_queue_size The maximum size of the fill queue.
+ * @param trace_t The trace pixel buffer pixel.
+ * @param x The X coordinate.
+ * @param y The Y coordinate.
*/
static void push_point_onto_queue(std::deque<Geom::Point> *fill_queue, unsigned int max_queue_size, unsigned char *trace_t, unsigned int x, unsigned int y) {
if (!is_pixel_queued(trace_t)) {
@@ -617,12 +618,12 @@ static void push_point_onto_queue(std::deque<Geom::Point> *fill_queue, unsigned
}
/**
- * \brief Shift a point to be checked onto the top of the rendered pixel buffer check queue.
- * \param fill_queue The fill queue to add the point to.
- * \param max_queue_size The maximum size of the fill queue.
- * \param trace_t The trace pixel buffer pixel.
- * \param x The X coordinate.
- * \param y The Y coordinate.
+ * Shift a point to be checked onto the top of the rendered pixel buffer check queue.
+ * @param fill_queue The fill queue to add the point to.
+ * @param max_queue_size The maximum size of the fill queue.
+ * @param trace_t The trace pixel buffer pixel.
+ * @param x The X coordinate.
+ * @param y The Y coordinate.
*/
static void shift_point_onto_queue(std::deque<Geom::Point> *fill_queue, unsigned int max_queue_size, unsigned char *trace_t, unsigned int x, unsigned int y) {
if (!is_pixel_queued(trace_t)) {
@@ -634,12 +635,12 @@ static void shift_point_onto_queue(std::deque<Geom::Point> *fill_queue, unsigned
}
/**
- * \brief Scan a row in the rendered pixel buffer and add points to the fill queue as necessary.
- * \param fill_queue The fill queue to add the point to.
- * \param px The rendered pixel buffer.
- * \param trace_px The trace pixel buffer.
- * \param orig_color The original selected pixel to use as the fill target color.
- * \param bci The bitmap_coords_info structure.
+ * Scan a row in the rendered pixel buffer and add points to the fill queue as necessary.
+ * @param fill_queue The fill queue to add the point to.
+ * @param px The rendered pixel buffer.
+ * @param trace_px The trace pixel buffer.
+ * @param orig_color The original selected pixel to use as the fill target color.
+ * @param bci The bitmap_coords_info structure.
*/
static ScanlineCheckResult perform_bitmap_scanline_check(std::deque<Geom::Point> *fill_queue, guchar *px, guchar *trace_px, guint32 orig_color, bitmap_coords_info bci, unsigned int *min_x, unsigned int *max_x) {
bool aborted = false;
@@ -751,26 +752,26 @@ static ScanlineCheckResult perform_bitmap_scanline_check(std::deque<Geom::Point>
}
/**
- * \brief Sort the rendered pixel buffer check queue vertically.
+ * Sort the rendered pixel buffer check queue vertically.
*/
static bool sort_fill_queue_vertical(Geom::Point a, Geom::Point b) {
return a[Geom::Y] > b[Geom::Y];
}
/**
- * \brief Sort the rendered pixel buffer check queue horizontally.
+ * Sort the rendered pixel buffer check queue horizontally.
*/
static bool sort_fill_queue_horizontal(Geom::Point a, Geom::Point b) {
return a[Geom::X] > b[Geom::X];
}
/**
- * \brief Perform a flood fill operation.
- * \param event_context The event context for this tool.
- * \param event The details of this event.
- * \param union_with_selection If true, union the new fill with the current selection.
- * \param is_point_fill If false, use the Rubberband "touch selection" to get the initial points for the fill.
- * \param is_touch_fill If true, use only the initial contact point in the Rubberband "touch selection" as the fill target color.
+ * Perform a flood fill operation.
+ * @param event_context The event context for this tool.
+ * @param event The details of this event.
+ * @param union_with_selection If true, union the new fill with the current selection.
+ * @param is_point_fill If false, use the Rubberband "touch selection" to get the initial points for the fill.
+ * @param is_touch_fill If true, use only the initial contact point in the Rubberband "touch selection" as the fill target color.
*/
static void sp_flood_do_flood_fill(SPEventContext *event_context, GdkEvent *event, bool union_with_selection, bool is_point_fill, bool is_touch_fill) {
SPDesktop *desktop = event_context->desktop;
diff --git a/src/gc.cpp b/src/gc.cpp
index 6b904c05f..1ba0826ef 100644
--- a/src/gc.cpp
+++ b/src/gc.cpp
@@ -1,5 +1,5 @@
/** @file
- * @brief Wrapper for Boehm GC
+ * Wrapper for Boehm GC.
*/
/* Authors:
* MenTaLguY <mental@rydia.net>
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index afed09654..ad39382e5 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -95,8 +95,7 @@ gr_drag_sel_changed(Inkscape::Selection */*selection*/, gpointer data)
drag->updateLevels ();
}
-static void
-gr_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data)
+static void gr_drag_sel_modified(Inkscape::Selection */*selection*/, guint /*flags*/, gpointer data)
{
GrDrag *drag = (GrDrag *) data;
if (drag->local_change) {
@@ -109,12 +108,11 @@ gr_drag_sel_modified (Inkscape::Selection */*selection*/, guint /*flags*/, gpoin
}
/**
-When a _query_style_signal is received, check that \a property requests fill/stroke/opacity (otherwise
-skip), and fill the \a style with the averaged color of all draggables of the selected dragger, if
-any.
-*/
-int
-gr_drag_style_query (SPStyle *style, int property, gpointer data)
+ * When a _query_style_signal is received, check that \a property requests fill/stroke/opacity (otherwise
+ * skip), and fill the \a style with the averaged color of all draggables of the selected dragger, if
+ * any.
+ */
+int gr_drag_style_query(SPStyle *style, int property, gpointer data)
{
GrDrag *drag = (GrDrag *) data;
@@ -336,8 +334,7 @@ guint32 GrDrag::getColor()
return SP_RGBA32_F_COMPOSE(cf[0], cf[1], cf[2], cf[3]);
}
-SPStop *
-GrDrag::addStopNearPoint (SPItem *item, Geom::Point mouse_p, double tolerance)
+SPStop *GrDrag::addStopNearPoint(SPItem *item, Geom::Point mouse_p, double tolerance)
{
gfloat offset = 0; // type of SPStop.offset = gfloat
SPGradient *gradient;
@@ -413,8 +410,7 @@ GrDrag::addStopNearPoint (SPItem *item, Geom::Point mouse_p, double tolerance)
}
-bool
-GrDrag::dropColor(SPItem */*item*/, gchar const *c, Geom::Point p)
+bool GrDrag::dropColor(SPItem */*item*/, gchar const *c, Geom::Point p)
{
// Note: not sure if a null pointer can come in for the style, but handle that just in case
bool stopIsNull = false;
@@ -543,7 +539,7 @@ GrDrag::~GrDrag()
this->lines = NULL;
}
-GrDraggable::GrDraggable (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke)
+GrDraggable::GrDraggable(SPItem *item, guint point_type, guint point_i, bool fill_or_stroke)
{
this->item = item;
this->point_type = point_type;
@@ -553,7 +549,7 @@ GrDraggable::GrDraggable (SPItem *item, guint point_type, guint point_i, bool fi
g_object_ref (G_OBJECT (this->item));
}
-GrDraggable::~GrDraggable ()
+GrDraggable::~GrDraggable()
{
g_object_unref (G_OBJECT (this->item));
}
@@ -575,8 +571,7 @@ SPObject *GrDraggable::getServer()
return server;
}
-static void
-gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gpointer data)
+static void gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
GrDrag *drag = dragger->parent;
@@ -741,8 +736,7 @@ gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gp
}
-static void
-gr_midpoint_limits(GrDragger *dragger, SPObject *server, Geom::Point *begin, Geom::Point *end, Geom::Point *low_lim, Geom::Point *high_lim, GSList **moving)
+static void gr_midpoint_limits(GrDragger *dragger, SPObject *server, Geom::Point *begin, Geom::Point *end, Geom::Point *low_lim, Geom::Point *high_lim, GSList **moving)
{
GrDrag *drag = dragger->parent;
@@ -827,10 +821,9 @@ gr_midpoint_limits(GrDragger *dragger, SPObject *server, Geom::Point *begin, Geo
/**
-Called when a midpoint knot is dragged.
-*/
-static void
-gr_knot_moved_midpoint_handler(SPKnot */*knot*/, Geom::Point const &ppointer, guint state, gpointer data)
+ * Called when a midpoint knot is dragged.
+ */
+static void gr_knot_moved_midpoint_handler(SPKnot */*knot*/, Geom::Point const &ppointer, guint state, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
GrDrag *drag = dragger->parent;
@@ -894,8 +887,7 @@ gr_knot_moved_midpoint_handler(SPKnot */*knot*/, Geom::Point const &ppointer, gu
-static void
-gr_knot_grabbed_handler (SPKnot */*knot*/, unsigned int /*state*/, gpointer data)
+static void gr_knot_grabbed_handler(SPKnot */*knot*/, unsigned int /*state*/, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
@@ -903,10 +895,9 @@ gr_knot_grabbed_handler (SPKnot */*knot*/, unsigned int /*state*/, gpointer data
}
/**
-Called when the mouse releases a dragger knot; changes gradient writing to repr, updates other draggers if needed
-*/
-static void
-gr_knot_ungrabbed_handler (SPKnot *knot, unsigned int state, gpointer data)
+ * Called when the mouse releases a dragger knot; changes gradient writing to repr, updates other draggers if needed.
+ */
+static void gr_knot_ungrabbed_handler(SPKnot *knot, unsigned int state, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
@@ -941,11 +932,10 @@ gr_knot_ungrabbed_handler (SPKnot *knot, unsigned int state, gpointer data)
}
/**
-Called when a dragger knot is clicked; selects the dragger or deletes it depending on the
-state of the keyboard keys
-*/
-static void
-gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data)
+ * Called when a dragger knot is clicked; selects the dragger or deletes it depending on the
+ * state of the keyboard keys.
+ */
+static void gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
GrDraggable *draggable = (GrDraggable *) dragger->draggables->data;
@@ -1005,10 +995,9 @@ gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data)
}
/**
-Called when a dragger knot is doubleclicked; opens gradient editor with the stop from the first draggable
-*/
-static void
-gr_knot_doubleclicked_handler (SPKnot */*knot*/, guint /*state*/, gpointer data)
+ * Called when a dragger knot is doubleclicked; opens gradient editor with the stop from the first draggable.
+ */
+static void gr_knot_doubleclicked_handler(SPKnot */*knot*/, guint /*state*/, gpointer data)
{
GrDragger *dragger = (GrDragger *) data;
@@ -1022,10 +1011,9 @@ gr_knot_doubleclicked_handler (SPKnot */*knot*/, guint /*state*/, gpointer data)
}
/**
-Act upon all draggables of the dragger, setting them to the dragger's point
-*/
-void
-GrDragger::fireDraggables (bool write_repr, bool scale_radial, bool merging_focus)
+ * Act upon all draggables of the dragger, setting them to the dragger's point.
+ */
+void GrDragger::fireDraggables(bool write_repr, bool scale_radial, bool merging_focus)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) {
GrDraggable *draggable = (GrDraggable *) i->data;
@@ -1044,10 +1032,9 @@ GrDragger::fireDraggables (bool write_repr, bool scale_radial, bool merging_focu
}
/**
-Checks if the dragger has a draggable with this point_type
+ * Checks if the dragger has a draggable with this point_type.
*/
-bool
-GrDragger::isA (gint point_type)
+bool GrDragger::isA(gint point_type)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) {
GrDraggable *draggable = (GrDraggable *) i->data;
@@ -1059,10 +1046,9 @@ GrDragger::isA (gint point_type)
}
/**
-Checks if the dragger has a draggable with this item, point_type + point_i (number), fill_or_stroke
+ * Checks if the dragger has a draggable with this item, point_type + point_i (number), fill_or_stroke.
*/
-bool
-GrDragger::isA (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke)
+bool GrDragger::isA(SPItem *item, gint point_type, gint point_i, bool fill_or_stroke)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) {
GrDraggable *draggable = (GrDraggable *) i->data;
@@ -1074,10 +1060,9 @@ GrDragger::isA (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke
}
/**
-Checks if the dragger has a draggable with this item, point_type, fill_or_stroke
+ * Checks if the dragger has a draggable with this item, point_type, fill_or_stroke.
*/
-bool
-GrDragger::isA (SPItem *item, gint point_type, bool fill_or_stroke)
+bool GrDragger::isA(SPItem *item, gint point_type, bool fill_or_stroke)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) {
GrDraggable *draggable = (GrDraggable *) i->data;
@@ -1088,8 +1073,7 @@ GrDragger::isA (SPItem *item, gint point_type, bool fill_or_stroke)
return false;
}
-bool
-GrDraggable::mayMerge (GrDraggable *da2)
+bool GrDraggable::mayMerge(GrDraggable *da2)
{
if ((this->item == da2->item) && (this->fill_or_stroke == da2->fill_or_stroke)) {
// we must not merge the points of the same gradient!
@@ -1108,8 +1092,7 @@ GrDraggable::mayMerge (GrDraggable *da2)
return true;
}
-bool
-GrDragger::mayMerge (GrDragger *other)
+bool GrDragger::mayMerge(GrDragger *other)
{
if (this == other)
return false;
@@ -1125,8 +1108,7 @@ GrDragger::mayMerge (GrDragger *other)
return true;
}
-bool
-GrDragger::mayMerge (GrDraggable *da2)
+bool GrDragger::mayMerge(GrDraggable *da2)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) { // for all draggables of this
GrDraggable *da1 = (GrDraggable *) i->data;
@@ -1137,10 +1119,9 @@ GrDragger::mayMerge (GrDraggable *da2)
}
/**
-Updates the statusbar tip of the dragger knot, based on its draggables
+ * Updates the statusbar tip of the dragger knot, based on its draggables.
*/
-void
-GrDragger::updateTip ()
+void GrDragger::updateTip()
{
if (this->knot && this->knot->tip) {
g_free (this->knot->tip);
@@ -1181,10 +1162,9 @@ GrDragger::updateTip ()
}
/**
-Adds a draggable to the dragger
+ * Adds a draggable to the dragger.
*/
-void
-GrDragger::updateKnotShape ()
+void GrDragger::updateKnotShape()
{
if (!draggables)
return;
@@ -1193,10 +1173,9 @@ GrDragger::updateKnotShape ()
}
/**
-Adds a draggable to the dragger
+ * Adds a draggable to the dragger.
*/
-void
-GrDragger::addDraggable (GrDraggable *draggable)
+void GrDragger::addDraggable(GrDraggable *draggable)
{
this->draggables = g_slist_prepend (this->draggables, draggable);
@@ -1205,10 +1184,9 @@ GrDragger::addDraggable (GrDraggable *draggable)
/**
-Moves this dragger to the point of the given draggable, acting upon all other draggables
+ * Moves this dragger to the point of the given draggable, acting upon all other draggables.
*/
-void
-GrDragger::moveThisToDraggable (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, bool write_repr)
+void GrDragger::moveThisToDraggable(SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, bool write_repr)
{
GrDraggable *dr_first = (GrDraggable *) this->draggables->data;
if (!dr_first) return;
@@ -1233,10 +1211,10 @@ GrDragger::moveThisToDraggable (SPItem *item, gint point_type, gint point_i, boo
/**
-Moves all midstop draggables that depend on this one
+ * Moves all midstop draggables that depend on this one.
*/
-void
-GrDragger::updateMidstopDependencies (GrDraggable *draggable, bool write_repr) {
+void GrDragger::updateMidstopDependencies(GrDraggable *draggable, bool write_repr)
+{
SPObject *server = draggable->getServer();
if (!server)
return;
@@ -1257,10 +1235,9 @@ GrDragger::updateMidstopDependencies (GrDraggable *draggable, bool write_repr) {
/**
-Moves all draggables that depend on this one
+ * Moves all draggables that depend on this one.
*/
-void
-GrDragger::updateDependencies (bool write_repr)
+void GrDragger::updateDependencies(bool write_repr)
{
for (GSList const* i = this->draggables; i != NULL; i = i->next) {
GrDraggable *draggable = (GrDraggable *) i->data;
@@ -1317,7 +1294,7 @@ GrDragger::updateDependencies (bool write_repr)
-GrDragger::GrDragger (GrDrag *parent, Geom::Point p, GrDraggable *draggable)
+GrDragger::GrDragger(GrDrag *parent, Geom::Point p, GrDraggable *draggable)
: point(p),
point_original(p)
{
@@ -1358,7 +1335,7 @@ GrDragger::GrDragger (GrDrag *parent, Geom::Point p, GrDraggable *draggable)
updateKnotShape();
}
-GrDragger::~GrDragger ()
+GrDragger::~GrDragger()
{
// unselect if it was selected
this->parent->setDeselected(this);
@@ -1382,10 +1359,9 @@ GrDragger::~GrDragger ()
}
/**
-Select the dragger which has the given draggable.
-*/
-GrDragger *
-GrDrag::getDraggerFor (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke)
+ * Select the dragger which has the given draggable.
+ */
+GrDragger *GrDrag::getDraggerFor(SPItem *item, gint point_type, gint point_i, bool fill_or_stroke)
{
for (GList const* i = this->draggers; i != NULL; i = i->next) {
GrDragger *dragger = (GrDragger *) i->data;
@@ -1403,8 +1379,7 @@ GrDrag::getDraggerFor (SPItem *item, gint point_type, gint point_i, bool fill_or
}
-void
-GrDragger::moveOtherToDraggable (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, bool write_repr)
+void GrDragger::moveOtherToDraggable(SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, bool write_repr)
{
GrDragger *d = this->parent->getDraggerFor (item, point_type, point_i, fill_or_stroke);
if (d && d != this) {
@@ -1414,20 +1389,18 @@ GrDragger::moveOtherToDraggable (SPItem *item, gint point_type, gint point_i, bo
/**
- Draw this dragger as selected
-*/
-void
-GrDragger::select()
+ * Draw this dragger as selected.
+ */
+void GrDragger::select()
{
this->knot->fill [SP_KNOT_STATE_NORMAL] = GR_KNOT_COLOR_SELECTED;
g_object_set (G_OBJECT (this->knot->item), "fill_color", GR_KNOT_COLOR_SELECTED, NULL);
}
/**
- Draw this dragger as normal (deselected)
-*/
-void
-GrDragger::deselect()
+ * Draw this dragger as normal (deselected).
+ */
+void GrDragger::deselect()
{
this->knot->fill [SP_KNOT_STATE_NORMAL] = GR_KNOT_COLOR_NORMAL;
g_object_set (G_OBJECT (this->knot->item), "fill_color", GR_KNOT_COLOR_NORMAL, NULL);
@@ -1440,10 +1413,9 @@ GrDragger::isSelected()
}
/**
-\brief Deselect all stops/draggers (private)
-*/
-void
-GrDrag::deselect_all()
+ * Deselect all stops/draggers (private).
+ */
+void GrDrag::deselect_all()
{
while (selected) {
( (GrDragger*) selected->data)->deselect();
@@ -1452,20 +1424,18 @@ GrDrag::deselect_all()
}
/**
-\brief Deselect all stops/draggers (public; emits signal)
-*/
-void
-GrDrag::deselectAll()
+ * Deselect all stops/draggers (public; emits signal).
+ */
+void GrDrag::deselectAll()
{
deselect_all();
this->desktop->emitToolSubselectionChanged(NULL);
}
/**
-\brief Select all stops/draggers
-*/
-void
-GrDrag::selectAll()
+ * Select all stops/draggers.
+ */
+void GrDrag::selectAll()
{
for (GList *l = this->draggers; l != NULL; l = l->next) {
GrDragger *d = ((GrDragger *) l->data);
@@ -1474,10 +1444,9 @@ GrDrag::selectAll()
}
/**
-\brief Select all stops/draggers that match the coords
-*/
-void
-GrDrag::selectByCoords(std::vector<Geom::Point> coords)
+ * Select all stops/draggers that match the coords.
+ */
+void GrDrag::selectByCoords(std::vector<Geom::Point> coords)
{
for (GList *l = this->draggers; l != NULL; l = l->next) {
GrDragger *d = ((GrDragger *) l->data);
@@ -1491,10 +1460,9 @@ GrDrag::selectByCoords(std::vector<Geom::Point> coords)
/**
-\brief Select all stops/draggers that fall within the rect
-*/
-void
-GrDrag::selectRect(Geom::Rect const &r)
+ * Select all stops/draggers that fall within the rect.
+ */
+void GrDrag::selectRect(Geom::Rect const &r)
{
for (GList *l = this->draggers; l != NULL; l = l->next) {
GrDragger *d = ((GrDragger *) l->data);
@@ -1505,13 +1473,12 @@ GrDrag::selectRect(Geom::Rect const &r)
}
/**
-\brief Select a dragger
-\param dragger The dragger to select
-\param add_to_selection If true, add to selection, otherwise deselect others
-\param override If true, always select this node, otherwise toggle selected status
+ * Select a dragger.
+ * @param dragger The dragger to select.
+ * @param add_to_selection If true, add to selection, otherwise deselect others.
+ * @param override If true, always select this node, otherwise toggle selected status.
*/
-void
-GrDrag::setSelected (GrDragger *dragger, bool add_to_selection, bool override)
+void GrDrag::setSelected(GrDragger *dragger, bool add_to_selection, bool override)
{
GrDragger *seldragger = NULL;
@@ -1550,11 +1517,10 @@ GrDrag::setSelected (GrDragger *dragger, bool add_to_selection, bool override)
}
/**
-\brief Deselect a dragger
-\param dragger The dragger to deselect
-*/
-void
-GrDrag::setDeselected (GrDragger *dragger)
+ * Deselect a dragger.
+ * @param dragger The dragger to deselect.
+ */
+void GrDrag::setDeselected(GrDragger *dragger)
{
if (g_list_find(selected, dragger)) {
selected = g_list_remove(selected, dragger);
@@ -1566,10 +1532,9 @@ GrDrag::setDeselected (GrDragger *dragger)
/**
-Create a line from p1 to p2 and add it to the lines list
+ * Create a line from p1 to p2 and add it to the lines list.
*/
-void
-GrDrag::addLine (SPItem *item, Geom::Point p1, Geom::Point p2, guint32 rgba)
+void GrDrag::addLine(SPItem *item, Geom::Point p1, Geom::Point p2, guint32 rgba)
{
SPCanvasItem *line = sp_canvas_item_new(sp_desktop_controls(this->desktop),
SP_TYPE_CTRLLINE, NULL);
@@ -1583,11 +1548,10 @@ GrDrag::addLine (SPItem *item, Geom::Point p1, Geom::Point p2, guint32 rgba)
}
/**
-If there already exists a dragger within MERGE_DIST of p, add the draggable to it; otherwise create
-new dragger and add it to draggers list
+ * If there already exists a dragger within MERGE_DIST of p, add the draggable to it; otherwise create
+ * new dragger and add it to draggers list.
*/
-void
-GrDrag::addDragger (GrDraggable *draggable)
+void GrDrag::addDragger(GrDraggable *draggable)
{
Geom::Point p = sp_item_gradient_get_coords (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
@@ -1607,10 +1571,9 @@ GrDrag::addDragger (GrDraggable *draggable)
}
/**
-Add draggers for the radial gradient rg on item
-*/
-void
-GrDrag::addDraggersRadial (SPRadialGradient *rg, SPItem *item, bool fill_or_stroke)
+ * Add draggers for the radial gradient rg on item.
+ */
+void GrDrag::addDraggersRadial(SPRadialGradient *rg, SPItem *item, bool fill_or_stroke)
{
addDragger (new GrDraggable (item, POINT_RG_CENTER, 0, fill_or_stroke));
guint num = rg->vector.stops.size();
@@ -1630,10 +1593,9 @@ GrDrag::addDraggersRadial (SPRadialGradient *rg, SPItem *item, bool fill_or_stro
}
/**
-Add draggers for the linear gradient lg on item
-*/
-void
-GrDrag::addDraggersLinear (SPLinearGradient *lg, SPItem *item, bool fill_or_stroke)
+ * Add draggers for the linear gradient lg on item.
+ */
+void GrDrag::addDraggersLinear(SPLinearGradient *lg, SPItem *item, bool fill_or_stroke)
{
addDragger (new GrDraggable (item, POINT_LG_BEGIN, 0, fill_or_stroke));
guint num = lg->vector.stops.size();
@@ -1646,10 +1608,9 @@ GrDrag::addDraggersLinear (SPLinearGradient *lg, SPItem *item, bool fill_or_stro
}
/**
-Artificially grab the knot of this dragger; used by the gradient context
-*/
-void
-GrDrag::grabKnot (GrDragger *dragger, gint x, gint y, guint32 etime)
+ * Artificially grab the knot of this dragger; used by the gradient context.
+ */
+void GrDrag::grabKnot(GrDragger *dragger, gint x, gint y, guint32 etime)
{
if (dragger) {
sp_knot_start_dragging (dragger->knot, dragger->point, x, y, etime);
@@ -1657,10 +1618,9 @@ GrDrag::grabKnot (GrDragger *dragger, gint x, gint y, guint32 etime)
}
/**
-Artificially grab the knot of the dragger with this draggable; used by the gradient context
-*/
-void
-GrDrag::grabKnot (SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, gint x, gint y, guint32 etime)
+ * Artificially grab the knot of the dragger with this draggable; used by the gradient context.
+ */
+void GrDrag::grabKnot(SPItem *item, gint point_type, gint point_i, bool fill_or_stroke, gint x, gint y, guint32 etime)
{
GrDragger *dragger = getDraggerFor (item, point_type, point_i, fill_or_stroke);
if (dragger) {
@@ -1669,10 +1629,10 @@ GrDrag::grabKnot (SPItem *item, gint point_type, gint point_i, bool fill_or_stro
}
/**
-Regenerates the draggers list from the current selection; is called when selection is changed or
-modified, also when a radial dragger needs to update positions of other draggers in the gradient
-*/
-void GrDrag::updateDraggers ()
+ * Regenerates the draggers list from the current selection; is called when selection is changed or
+ * modified, also when a radial dragger needs to update positions of other draggers in the gradient.
+ */
+void GrDrag::updateDraggers()
{
while (selected) {
selected = g_list_remove(selected, selected->data);
@@ -1716,11 +1676,9 @@ void GrDrag::updateDraggers ()
/**
- * \brief Returns true if at least one of the draggers' knots has the mouse hovering above it
+ * Returns true if at least one of the draggers' knots has the mouse hovering above it.
*/
-
-bool
-GrDrag::mouseOver()
+bool GrDrag::mouseOver()
{
for (GList const* i = this->draggers; i != NULL; i = i->next) {
GrDragger *d = (GrDragger *) i->data;
@@ -1730,12 +1688,12 @@ GrDrag::mouseOver()
}
return false;
}
+
/**
-Regenerates the lines list from the current selection; is called on each move of a dragger, so that
-lines are always in sync with the actual gradient
-*/
-void
-GrDrag::updateLines ()
+ * Regenerates the lines list from the current selection; is called on each move of a dragger, so that
+ * lines are always in sync with the actual gradient.
+ */
+void GrDrag::updateLines()
{
// delete old lines
for (GSList const *i = this->lines; i != NULL; i = i->next) {
@@ -1781,10 +1739,9 @@ GrDrag::updateLines ()
}
/**
-Regenerates the levels list from the current selection
-*/
-void
-GrDrag::updateLevels ()
+ * Regenerates the levels list from the current selection.
+ */
+void GrDrag::updateLevels()
{
hor_levels.clear();
vert_levels.clear();
@@ -1806,8 +1763,7 @@ GrDrag::updateLevels ()
}
}
-void
-GrDrag::selected_reverse_vector ()
+void GrDrag::selected_reverse_vector()
{
if (selected == NULL)
return;
@@ -1819,14 +1775,12 @@ GrDrag::selected_reverse_vector ()
}
}
-void
-GrDrag::selected_move_nowrite (double x, double y, bool scale_radial)
+void GrDrag::selected_move_nowrite(double x, double y, bool scale_radial)
{
selected_move (x, y, false, scale_radial);
}
-void
-GrDrag::selected_move (double x, double y, bool write_repr, bool scale_radial)
+void GrDrag::selected_move(double x, double y, bool write_repr, bool scale_radial)
{
if (selected == NULL)
return;
@@ -1914,8 +1868,7 @@ GrDrag::selected_move (double x, double y, bool write_repr, bool scale_radial)
}
}
-void
-GrDrag::selected_move_screen (double x, double y)
+void GrDrag::selected_move_screen(double x, double y)
{
gdouble zoom = desktop->current_zoom();
gdouble zx = x / zoom;
@@ -1925,10 +1878,9 @@ GrDrag::selected_move_screen (double x, double y)
}
/**
-Select the knot next to the last selected one and deselect all other selected.
-*/
-GrDragger *
-GrDrag::select_next ()
+ * Select the knot next to the last selected one and deselect all other selected.
+ */
+GrDragger *GrDrag::select_next()
{
GrDragger *d = NULL;
if (selected == NULL || g_list_find(draggers, selected->data)->next == NULL) {
@@ -1943,10 +1895,9 @@ GrDrag::select_next ()
}
/**
-Select the knot previous from the last selected one and deselect all other selected.
-*/
-GrDragger *
-GrDrag::select_prev ()
+ * Select the knot previous from the last selected one and deselect all other selected.
+ */
+GrDragger *GrDrag::select_prev()
{
GrDragger *d = NULL;
if (selected == NULL || g_list_find(draggers, selected->data)->prev == NULL) {
@@ -1962,8 +1913,7 @@ GrDrag::select_prev ()
// FIXME: i.m.o. an ugly function that I just made to work, but... aargh! (Johan)
-void
-GrDrag::deleteSelected (bool just_one)
+void GrDrag::deleteSelected(bool just_one)
{
if (!selected) return;
diff --git a/src/graphlayout.cpp b/src/graphlayout.cpp
index 6197be9f7..b0e00211a 100644
--- a/src/graphlayout.cpp
+++ b/src/graphlayout.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Interface between Inkscape code (SPItem) and graphlayout functions.
+/**
+ * @file
+ * Interface between Inkscape code (SPItem) and graphlayout functions.
*/
/*
* Authors:
diff --git a/src/guide-snapper.cpp b/src/guide-snapper.cpp
index d2db13060..f772aad96 100644
--- a/src/guide-snapper.cpp
+++ b/src/guide-snapper.cpp
@@ -1,6 +1,6 @@
/**
- * \file guide-snapper.cpp
- * \brief Snapping things to guides.
+ * @file guide-snapper.cpp
+ * Snapping things to guides.
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 20084da54..fe59732a5 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Legacy interface to main application
+/**
+ * @file
+ * Legacy interface to main application.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/interface.cpp b/src/interface.cpp
index 8cb9698b7..646400dd6 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Main UI stuff
+/**
+ * @file
+ * Main UI stuff.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
@@ -628,11 +629,9 @@ static void taskToggled(GtkCheckMenuItem *menuitem, gpointer userData)
/**
- * \brief Callback function to update the status of the radio buttons in the View -> Display mode menu (Normal, No Filters, Outline) and Color display mode
+ * Callback function to update the status of the radio buttons in the View -> Display mode menu (Normal, No Filters, Outline) and Color display mode.
*/
-
-static gboolean
-update_view_menu(GtkWidget *widget, GdkEventExpose */*event*/, gpointer user_data)
+static gboolean update_view_menu(GtkWidget *widget, GdkEventExpose */*event*/, gpointer user_data)
{
SPAction *action = (SPAction *) user_data;
g_assert(action->id != NULL);
@@ -867,7 +866,9 @@ void addTaskMenuItems(GtkMenu *menu, Inkscape::UI::View::View *view)
}
-/** @brief Observer that updates the recent list's max document count */
+/**
+ * Observer that updates the recent list's max document count.
+ */
class MaxRecentObserver : public Inkscape::Preferences::Observer {
public:
MaxRecentObserver(GtkWidget *recent_menu) :
@@ -883,23 +884,24 @@ private:
GtkWidget *_rm;
};
-/** \brief This function turns XML into a menu
- \param menus This is the XML that defines the menu
- \param menu Menu to be added to
- \param view The View that this menu is being built for
-
- This function is realitively simple as it just goes through the XML
- and parses the individual elements. In the case of a submenu, it
- just calls itself recursively. Because it is only reasonable to have
- a couple of submenus, it is unlikely this will go more than two or
- three times.
-
- In the case of an unrecognized verb, a menu item is made to identify
- the verb that is missing, and display that. The menu item is also made
- insensitive.
-*/
-void
-sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, Inkscape::UI::View::View *view)
+/**
+ * This function turns XML into a menu.
+ *
+ * This function is realitively simple as it just goes through the XML
+ * and parses the individual elements. In the case of a submenu, it
+ * just calls itself recursively. Because it is only reasonable to have
+ * a couple of submenus, it is unlikely this will go more than two or
+ * three times.
+ *
+ * In the case of an unrecognized verb, a menu item is made to identify
+ * the verb that is missing, and display that. The menu item is also made
+ * insensitive.
+ *
+ * @param menus This is the XML that defines the menu
+ * @param menu Menu to be added to
+ * @param view The View that this menu is being built for
+ */
+void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, Inkscape::UI::View::View *view)
{
if (menus == NULL) return;
if (menu == NULL) return;
@@ -999,15 +1001,16 @@ sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, Inkscape::UI:
}
}
-/** \brief Build the main tool bar
- \param view View to build the bar for
-
- Currently the main tool bar is built as a dynamic XML menu using
- \c sp_ui_build_dyn_menus. This function builds the bar, and then
- pass it to get items attached to it.
-*/
-GtkWidget *
-sp_ui_main_menubar(Inkscape::UI::View::View *view)
+/**
+ * Build the main tool bar.
+ *
+ * Currently the main tool bar is built as a dynamic XML menu using
+ * \c sp_ui_build_dyn_menus. This function builds the bar, and then
+ * pass it to get items attached to it.
+ *
+ * @param view View to build the bar for
+ */
+GtkWidget *sp_ui_main_menubar(Inkscape::UI::View::View *view)
{
GtkWidget *mbar = gtk_menu_bar_new();
diff --git a/src/knotholder.cpp b/src/knotholder.cpp
index c26082baa..10d03982c 100644
--- a/src/knotholder.cpp
+++ b/src/knotholder.cpp
@@ -1,5 +1,5 @@
/*
- * Container for SPKnot visual handles
+ * Container for SPKnot visual handles.
*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
@@ -92,7 +92,7 @@ KnotHolder::update_knots()
}
/**
- * \brief Returns true if at least one of the KnotHolderEntities has the mouse hovering above it
+ * Returns true if at least one of the KnotHolderEntities has the mouse hovering above it.
*/
bool KnotHolder::knot_mouseover()
{
diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp
index d2f1193ff..66bc8c530 100644
--- a/src/line-snapper.cpp
+++ b/src/line-snapper.cpp
@@ -1,6 +1,6 @@
/**
* \file line-snapper.cpp
- * \brief LineSnapper class.
+ * LineSnapper class.
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp
index d4c795656..f49d082b6 100644
--- a/src/lpe-tool-context.cpp
+++ b/src/lpe-tool-context.cpp
@@ -182,11 +182,10 @@ sp_lpetool_context_setup(SPEventContext *ec)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new nodepath and reassigns listeners to the new selected item's repr
-*/
-void
-sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new nodepath and reassigns listeners to the new selected item's repr.
+ */
+void sp_lpetool_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPLPEToolContext *lc = SP_LPETOOL_CONTEXT(data);
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index c5b2b7cd7..7e0961c95 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -1,6 +1,6 @@
/**
* \file object-snapper.cpp
- * \brief Snapping things to objects.
+ * Snapping things to objects.
*
* Authors:
* Carl Hetherington <inkscape@carlh.net>
diff --git a/src/rdf.cpp b/src/rdf.cpp
index cabbaaed3..95f9fdd3b 100644
--- a/src/rdf.cpp
+++ b/src/rdf.cpp
@@ -1,5 +1,5 @@
/** @file
- * @brief RDF manipulation functions
+ * RDF manipulation functions.
*
* @todo move these to xml/ instead of dialogs/
*/
@@ -324,10 +324,11 @@ public:
static void setDefaults( SPDocument * doc );
/**
- * \brief Pull the text out of an RDF entity, depends on how it's stored
- * \return A pointer to the entity's static contents as a string
- * \param repr The XML element to extract from
- * \param entity The desired RDF/Work entity
+ * Pull the text out of an RDF entity, depends on how it's stored.
+ *
+ * @return A pointer to the entity's static contents as a string
+ * @param repr The XML element to extract from
+ * @param entity The desired RDF/Work entity
*
*/
static const gchar *getReprText( Inkscape::XML::Node const * repr, struct rdf_work_entity_t const & entity );
@@ -342,13 +343,13 @@ public:
};
/**
- * \brief Retrieves a known RDF/Work entity by name
- * \return A pointer to an RDF/Work entity
- * \param name The desired RDF/Work entity
+ * Retrieves a known RDF/Work entity by name.
+ *
+ * @return A pointer to an RDF/Work entity
+ * @param name The desired RDF/Work entity
*
*/
-struct rdf_work_entity_t *
-rdf_find_entity(gchar const * name)
+struct rdf_work_entity_t *rdf_find_entity(gchar const * name)
{
struct rdf_work_entity_t *entity;
for (entity=rdf_work_entities; entity->name; entity++) {
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index 188b5a9a3..8f0ec8763 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -163,9 +163,9 @@ static void sp_rect_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-*/
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
void sp_rect_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPRectContext *rc = SP_RECT_CONTEXT(data);
diff --git a/src/rubberband.cpp b/src/rubberband.cpp
index 398f01d3e..a59664092 100644
--- a/src/rubberband.cpp
+++ b/src/rubberband.cpp
@@ -1,6 +1,6 @@
/**
* \file src/rubberband.cpp
- * \brief Rubberbanding selector
+ * Rubberbanding selector.
*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 4c3c0f197..b5919dd71 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -1,5 +1,5 @@
/** @file
- * @brief Miscellanous operations on selected items
+ * Miscellanous operations on selected items.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
@@ -1554,7 +1554,7 @@ void sp_selection_move_relative(Inkscape::Selection *selection, double dx, doubl
}
/**
- * @brief Rotates selected objects 90 degrees, either clock-wise or counter-clockwise, depending on the value of ccw
+ * Rotates selected objects 90 degrees, either clock-wise or counter-clockwise, depending on the value of ccw.
*/
void sp_selection_rotate_90(SPDesktop *desktop, bool ccw)
{
@@ -2841,7 +2841,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
}
/**
- * \brief Creates a mask or clipPath from selection
+ * Creates a mask or clipPath from selection.
* Two different modes:
* if applyToLayer, all selection is moved to DEFS as mask/clippath
* and is applied to current layer
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index c6dd0a34d..2d09f393e 100644
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -1,5 +1,5 @@
/** @file
- * @brief Helper object for transforming selected items
+ * Helper object for transforming selected items.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp
index 1962b710c..1fe6e620b 100644
--- a/src/shape-editor.cpp
+++ b/src/shape-editor.cpp
@@ -227,7 +227,7 @@ bool ShapeEditor::has_selection() {
}
/**
- * \brief Returns true if this ShapeEditor has a knot above which the mouse currently hovers
+ * Returns true if this ShapeEditor has a knot above which the mouse currently hovers.
*/
bool ShapeEditor::knot_mouseover()
{
diff --git a/src/snap-preferences.cpp b/src/snap-preferences.cpp
index 25e00718c..250f38b90 100644
--- a/src/snap-preferences.cpp
+++ b/src/snap-preferences.cpp
@@ -1,6 +1,6 @@
/**
* \file snap-preferences.cpp
- * \brief Storing of snapping preferences
+ * Storing of snapping preferences.
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
@@ -120,7 +120,7 @@ bool Inkscape::SnapPreferences::getSnapFrom(Inkscape::SnapSourceType t) const
return (_snap_from & t);
}
/**
- * \brief Map snap target to array index.
+ * Map snap target to array index.
*
* The status of each snap toggle (in the snap toolbar) is stored as a boolean value in an array. This method returns the position
* of relevant boolean in that array, for any given type of snap target. For most snap targets, the enumerated value of that targets
@@ -131,9 +131,9 @@ bool Inkscape::SnapPreferences::getSnapFrom(Inkscape::SnapSourceType t) const
* - For snap sources, just pass the corresponding snap target instead (each snap source should have a twin snap target, but not vice versa)
* - All parameters are passed by reference, and will be overwritten
*
- * \param target Stores the enumerated snap target, which can be modified to correspond to the array index of this snap target
- * \param always_on If true, then this snap target is always active and cannot be toggled
- * \param group_on If true, then this snap target is in a snap group that has been enabled (e.g. bbox group, nodes/paths group, or "others" group
+ * @param target Stores the enumerated snap target, which can be modified to correspond to the array index of this snap target
+ * @param always_on If true, then this snap target is always active and cannot be toggled
+ * @param group_on If true, then this snap target is in a snap group that has been enabled (e.g. bbox group, nodes/paths group, or "others" group
*/
void Inkscape::SnapPreferences::_mapTargetToArrayIndex(Inkscape::SnapTargetType &target, bool &always_on, bool &group_on) const
{
diff --git a/src/snap.cpp b/src/snap.cpp
index b2c5a5a10..fb6f120ec 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -1,8 +1,6 @@
-#define __SP_DESKTOP_SNAP_C__
-
/**
* \file snap.cpp
- * \brief SnapManager class.
+ * SnapManager class.
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
@@ -58,7 +56,7 @@ SnapManager::SnapManager(SPNamedView const *v) :
}
/**
- * \brief Return a list of snappers
+ * Return a list of snappers.
*
* Inkscape snaps to objects, grids, and guides. For each of these snap targets a
* separate class is used, which has been derived from the base Snapper class. The
@@ -67,10 +65,9 @@ SnapManager::SnapManager(SPNamedView const *v) :
* class, but any number of grid snappers (because each grid has its own snapper
* instance)
*
- * \return List of snappers that we use.
+ * @return List of snappers that we use.
*/
-SnapManager::SnapperList
-SnapManager::getSnappers() const
+SnapManager::SnapperList SnapManager::getSnappers() const
{
SnapManager::SnapperList s;
s.push_back(&guide);
@@ -83,17 +80,16 @@ SnapManager::getSnappers() const
}
/**
- * \brief Return a list of gridsnappers
+ * Return a list of gridsnappers.
*
* Each grid has its own instance of the snapper class. This way snapping can
* be enabled per grid individually. A list will be returned containing the
* pointers to these instances, but only for grids that are being displayed
* and for which snapping is enabled.
*
- * \return List of gridsnappers that we use.
+ * @return List of gridsnappers that we use.
*/
-SnapManager::SnapperList
-SnapManager::getGridSnappers() const
+SnapManager::SnapperList SnapManager::getGridSnappers() const
{
SnapperList s;
@@ -108,14 +104,14 @@ SnapManager::getGridSnappers() const
}
/**
- * \brief Return true if any snapping might occur, whether its to grids, guides or objects
+ * Return true if any snapping might occur, whether its to grids, guides or objects.
*
* Each snapper instance handles its own snapping target, e.g. grids, guides or
* objects. This method iterates through all these snapper instances and returns
* true if any of the snappers might possible snap, considering only the relevant
* snapping preferences.
*
- * \return true if one of the snappers will try to snap to something.
+ * @return true if one of the snappers will try to snap to something.
*/
bool SnapManager::someSnapperMightSnap() const
@@ -153,7 +149,7 @@ bool SnapManager::gridSnapperMightSnap() const
}
/**
- * \brief Try to snap a point to grids, guides or objects.
+ * Try to snap a point to grids, guides or objects.
*
* Try to snap a point to grids, guides or objects, in two degrees-of-freedom,
* i.e. snap in any direction on the two dimensional canvas to the nearest
@@ -172,11 +168,10 @@ bool SnapManager::gridSnapperMightSnap() const
* 2) Only to be used when a single source point is to be snapped; it assumes
* that source_num = 0, which is inefficient when snapping sets our source points
*
- * \param p Current position of the snap source; will be overwritten by the position of the snap target if snapping has occurred
- * \param source_type Detailed description of the source type, will be used by the snap indicator
- * \param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
+ * @param p Current position of the snap source; will be overwritten by the position of the snap target if snapping has occurred
+ * @param source_type Detailed description of the source type, will be used by the snap indicator
+ * @param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
*/
-
void SnapManager::freeSnapReturnByRef(Geom::Point &p,
Inkscape::SnapSourceType const source_type,
Geom::OptRect const &bbox_to_snap) const
@@ -187,7 +182,7 @@ void SnapManager::freeSnapReturnByRef(Geom::Point &p,
/**
- * \brief Try to snap a point to grids, guides or objects.
+ * Try to snap a point to grids, guides or objects.
*
* Try to snap a point to grids, guides or objects, in two degrees-of-freedom,
* i.e. snap in any direction on the two dimensional canvas to the nearest
@@ -197,12 +192,10 @@ void SnapManager::freeSnapReturnByRef(Geom::Point &p,
* PS: SnapManager::setup() must have been called before calling this method,
* but only once for a set of points
*
- * \param p Source point to be snapped
- * \param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics
+ * @param p Source point to be snapped
+ * @param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics
*/
-
-
Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::SnapCandidatePoint const &p,
Geom::OptRect const &bbox_to_snap) const
{
@@ -238,7 +231,7 @@ void SnapManager::preSnap(Inkscape::SnapCandidatePoint const &p)
}
/**
- * \brief Snap to the closest multiple of a grid pitch
+ * Snap to the closest multiple of a grid pitch.
*
* When pasting, we would like to snap to the grid. Problem is that we don't know which
* nodes were aligned to the grid at the time of copying, so we don't know which nodes
@@ -252,10 +245,9 @@ void SnapManager::preSnap(Inkscape::SnapCandidatePoint const &p)
* PS2: When multiple grids are present then the result will become ambiguous. There is no
* way to control to which grid this method will snap.
*
- * \param t Vector that represents the offset of the pasted copy with respect to the original
- * \return Offset vector after snapping to the closest multiple of a grid pitch
+ * @param t Vector that represents the offset of the pasted copy with respect to the original
+ * @return Offset vector after snapping to the closest multiple of a grid pitch
*/
-
Geom::Point SnapManager::multipleOfGridPitch(Geom::Point const &t, Geom::Point const &origin)
{
if (!snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally())
@@ -312,7 +304,7 @@ Geom::Point SnapManager::multipleOfGridPitch(Geom::Point const &t, Geom::Point c
}
/**
- * \brief Try to snap a point along a constraint line to grids, guides or objects.
+ * Try to snap a point along a constraint line to grids, guides or objects.
*
* Try to snap a point to grids, guides or objects, in only one degree-of-freedom,
* i.e. snap in a specific direction on the two dimensional canvas to the nearest
@@ -335,12 +327,11 @@ Geom::Point SnapManager::multipleOfGridPitch(Geom::Point const &t, Geom::Point c
* that source_num = 0, which is inefficient when snapping sets our source points
*
- * \param p Current position of the snap source; will be overwritten by the position of the snap target if snapping has occurred
- * \param source_type Detailed description of the source type, will be used by the snap indicator
- * \param constraint The direction or line along which snapping must occur
- * \param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
+ * @param p Current position of the snap source; will be overwritten by the position of the snap target if snapping has occurred
+ * @param source_type Detailed description of the source type, will be used by the snap indicator
+ * @param constraint The direction or line along which snapping must occur
+ * @param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
*/
-
void SnapManager::constrainedSnapReturnByRef(Geom::Point &p,
Inkscape::SnapSourceType const source_type,
Inkscape::Snapper::SnapConstraint const &constraint,
@@ -351,7 +342,7 @@ void SnapManager::constrainedSnapReturnByRef(Geom::Point &p,
}
/**
- * \brief Try to snap a point along a constraint line to grids, guides or objects.
+ * Try to snap a point along a constraint line to grids, guides or objects.
*
* Try to snap a point to grids, guides or objects, in only one degree-of-freedom,
* i.e. snap in a specific direction on the two dimensional canvas to the nearest
@@ -363,11 +354,10 @@ void SnapManager::constrainedSnapReturnByRef(Geom::Point &p,
* PS: If there's nothing to snap to or if snapping has been disabled, then this
* method will still apply the constraint (but without snapping)
*
- * \param p Source point to be snapped
- * \param constraint The direction or line along which snapping must occur
- * \param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
+ * @param p Source point to be snapped
+ * @param constraint The direction or line along which snapping must occur
+ * @param bbox_to_snap Bounding box hulling the set of points, all from the same selection and having the same transformation
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::SnapCandidatePoint const &p,
Inkscape::Snapper::SnapConstraint const &constraint,
Geom::OptRect const &bbox_to_snap) const
@@ -512,18 +502,17 @@ Inkscape::SnappedPoint SnapManager::multipleConstrainedSnaps(Inkscape::SnapCandi
}
/**
- * \brief Try to snap a point to something at a specific angle
+ * Try to snap a point to something at a specific angle.
*
* When drawing a straight line or modifying a gradient, it will snap to specific angle increments
* if CTRL is being pressed. This method will enforce this angular constraint (even if there is nothing
* to snap to)
*
- * \param p Source point to be snapped
- * \param p_ref Optional original point, relative to which the angle should be calculated. If empty then
+ * @param p Source point to be snapped
+ * @param p_ref Optional original point, relative to which the angle should be calculated. If empty then
* the angle will be calculated relative to the y-axis
- * \param snaps Number of angular increments per PI radians; E.g. if snaps = 2 then we will snap every PI/2 = 90 degrees
+ * @param snaps Number of angular increments per PI radians; E.g. if snaps = 2 then we will snap every PI/2 = 90 degrees
*/
-
Inkscape::SnappedPoint SnapManager::constrainedAngularSnap(Inkscape::SnapCandidatePoint const &p,
boost::optional<Geom::Point> const &p_ref,
Geom::Point const &o,
@@ -561,12 +550,12 @@ Inkscape::SnappedPoint SnapManager::constrainedAngularSnap(Inkscape::SnapCandida
}
/**
- * \brief Wrapper method to make snapping of the guide origin a bit easier (i.e. simplifies the calling code)
+ * Wrapper method to make snapping of the guide origin a bit easier (i.e. simplifies the calling code).
*
* PS: SnapManager::setup() must have been called before calling this method,
*
- * \param p Current position of the point on the guide that is to be snapped; will be overwritten by the position of the snap target if snapping has occurred
- * \param guide_normal Vector normal to the guide line
+ * @param p Current position of the point on the guide that is to be snapped; will be overwritten by the position of the snap target if snapping has occurred
+ * @param guide_normal Vector normal to the guide line
*/
void SnapManager::guideFreeSnap(Geom::Point &p, Geom::Point const &/*guide_normal*/, SPGuideDragType drag_type) const
{
@@ -591,14 +580,13 @@ void SnapManager::guideFreeSnap(Geom::Point &p, Geom::Point const &/*guide_norma
}
/**
- * \brief Wrapper method to make snapping of the guide origin a bit easier (i.e. simplifies the calling code)
+ * Wrapper method to make snapping of the guide origin a bit easier (i.e. simplifies the calling code).
*
* PS: SnapManager::setup() must have been called before calling this method,
*
- * \param p Current position of the point on the guide that is to be snapped; will be overwritten by the position of the snap target if snapping has occurred
- * \param guide_normal Vector normal to the guide line
+ * @param p Current position of the point on the guide that is to be snapped; will be overwritten by the position of the snap target if snapping has occurred
+ * @param guide_normal Vector normal to the guide line
*/
-
void SnapManager::guideConstrainedSnap(Geom::Point &p, SPGuide const &guideline) const
{
if (!snapprefs.getSnapEnabledGlobally() || snapprefs.getSnapPostponedGlobally() || !snapprefs.isTargetSnappable(Inkscape::SNAPTARGET_GUIDE)) {
@@ -620,7 +608,7 @@ void SnapManager::guideConstrainedSnap(Geom::Point &p, SPGuide const &guideline)
}
/**
- * \brief Method for snapping sets of points while they are being transformed
+ * Method for snapping sets of points while they are being transformed.
*
* Method for snapping sets of points while they are being transformed, when using
* for example the selector tool. This method is for internal use only, and should
@@ -634,18 +622,17 @@ void SnapManager::guideConstrainedSnap(Geom::Point &p, SPGuide const &guideline)
* If no snap has occurred and we're asked for a constrained snap then the constraint
* will be applied nevertheless
*
- * \param points Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param constrained true if the snap is constrained, e.g. for stretching or for purely horizontal translation.
- * \param constraint The direction or line along which snapping must occur, if 'constrained' is true; otherwise undefined.
- * \param transformation_type Type of transformation to apply to points before trying to snap them.
- * \param transformation Description of the transformation; details depend on the type.
- * \param origin Origin of the transformation, if applicable.
- * \param dim Dimension to which the transformation applies, if applicable.
- * \param uniform true if the transformation should be uniform; only applicable for stretching and scaling.
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param points Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param constrained true if the snap is constrained, e.g. for stretching or for purely horizontal translation.
+ * @param constraint The direction or line along which snapping must occur, if 'constrained' is true; otherwise undefined.
+ * @param transformation_type Type of transformation to apply to points before trying to snap them.
+ * @param transformation Description of the transformation; details depend on the type.
+ * @param origin Origin of the transformation, if applicable.
+ * @param dim Dimension to which the transformation applies, if applicable.
+ * @param uniform true if the transformation should be uniform; only applicable for stretching and scaling.
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::_snapTransformed(
std::vector<Inkscape::SnapCandidatePoint> const &points,
Geom::Point const &pointer,
@@ -937,14 +924,13 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed(
/**
- * \brief Apply a translation to a set of points and try to snap freely in 2 degrees-of-freedom
+ * Apply a translation to a set of points and try to snap freely in 2 degrees-of-freedom.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param tr Proposed translation; the final translation can only be calculated after snapping has occurred
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param tr Proposed translation; the final translation can only be calculated after snapping has occurred
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::freeSnapTranslate(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Geom::Point const &tr)
@@ -959,15 +945,14 @@ Inkscape::SnappedPoint SnapManager::freeSnapTranslate(std::vector<Inkscape::Snap
}
/**
- * \brief Apply a translation to a set of points and try to snap along a constraint
+ * Apply a translation to a set of points and try to snap along a constraint.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param constraint The direction or line along which snapping must occur.
- * \param tr Proposed translation; the final translation can only be calculated after snapping has occurred.
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param constraint The direction or line along which snapping must occur.
+ * @param tr Proposed translation; the final translation can only be calculated after snapping has occurred.
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnapTranslate(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Inkscape::Snapper::SnapConstraint const &constraint,
@@ -984,15 +969,14 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapTranslate(std::vector<Inkscap
/**
- * \brief Apply a scaling to a set of points and try to snap freely in 2 degrees-of-freedom
+ * Apply a scaling to a set of points and try to snap freely in 2 degrees-of-freedom.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param s Proposed scaling; the final scaling can only be calculated after snapping has occurred
- * \param o Origin of the scaling
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param s Proposed scaling; the final scaling can only be calculated after snapping has occurred
+ * @param o Origin of the scaling
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::freeSnapScale(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Geom::Scale const &s,
@@ -1009,15 +993,14 @@ Inkscape::SnappedPoint SnapManager::freeSnapScale(std::vector<Inkscape::SnapCand
/**
- * \brief Apply a scaling to a set of points and snap such that the aspect ratio of the selection is preserved
+ * Apply a scaling to a set of points and snap such that the aspect ratio of the selection is preserved.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param s Proposed scaling; the final scaling can only be calculated after snapping has occurred
- * \param o Origin of the scaling
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param s Proposed scaling; the final scaling can only be calculated after snapping has occurred
+ * @param o Origin of the scaling
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnapScale(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Geom::Scale const &s,
@@ -1034,17 +1017,16 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapScale(std::vector<Inkscape::S
}
/**
- * \brief Apply a stretch to a set of points and snap such that the direction of the stretch is preserved
+ * Apply a stretch to a set of points and snap such that the direction of the stretch is preserved.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param s Proposed stretch; the final stretch can only be calculated after snapping has occurred
- * \param o Origin of the stretching
- * \param d Dimension in which to apply proposed stretch.
- * \param u true if the stretch should be uniform (i.e. to be applied equally in both dimensions)
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param s Proposed stretch; the final stretch can only be calculated after snapping has occurred
+ * @param o Origin of the stretching
+ * @param d Dimension in which to apply proposed stretch.
+ * @param u true if the stretch should be uniform (i.e. to be applied equally in both dimensions)
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnapStretch(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Geom::Coord const &s,
@@ -1062,17 +1044,16 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapStretch(std::vector<Inkscape:
}
/**
- * \brief Apply a skew to a set of points and snap such that the direction of the skew is preserved
+ * Apply a skew to a set of points and snap such that the direction of the skew is preserved.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param constraint The direction or line along which snapping must occur.
- * \param s Proposed skew; the final skew can only be calculated after snapping has occurred
- * \param o Origin of the proposed skew
- * \param d Dimension in which to apply proposed skew.
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param constraint The direction or line along which snapping must occur.
+ * @param s Proposed skew; the final skew can only be calculated after snapping has occurred
+ * @param o Origin of the proposed skew
+ * @param d Dimension in which to apply proposed skew.
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnapSkew(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Inkscape::Snapper::SnapConstraint const &constraint,
@@ -1101,15 +1082,14 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapSkew(std::vector<Inkscape::Sn
}
/**
- * \brief Apply a rotation to a set of points and snap, without scaling
+ * Apply a rotation to a set of points and snap, without scaling.
*
- * \param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
- * \param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
- * \param angle Proposed rotation (in radians); the final rotation can only be calculated after snapping has occurred
- * \param o Origin of the rotation
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
+ * @param p Collection of points to snap (snap sources), at their untransformed position, all points undergoing the same transformation. Paired with an identifier of the type of the snap source.
+ * @param pointer Location of the mouse pointer at the time dragging started (i.e. when the selection was still untransformed).
+ * @param angle Proposed rotation (in radians); the final rotation can only be calculated after snapping has occurred
+ * @param o Origin of the rotation
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics.
*/
-
Inkscape::SnappedPoint SnapManager::constrainedSnapRotate(std::vector<Inkscape::SnapCandidatePoint> const &p,
Geom::Point const &pointer,
Geom::Coord const &angle,
@@ -1132,16 +1112,15 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapRotate(std::vector<Inkscape::
}
/**
- * \brief Given a set of possible snap targets, find the best target (which is not necessarily
- * also the nearest target), and show the snap indicator if requested
+ * Given a set of possible snap targets, find the best target (which is not necessarily
+ * also the nearest target), and show the snap indicator if requested.
*
- * \param p Source point to be snapped
- * \param isr A structure holding all snap targets that have been found so far
- * \param constrained True if the snap is constrained, e.g. for stretching or for purely horizontal translation.
- * \param allowOffScreen If true, then snapping to points which are off the screen is allowed (needed for example when pasting to the grid)
- * \return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics
+ * @param p Source point to be snapped
+ * @param isr A structure holding all snap targets that have been found so far
+ * @param constrained True if the snap is constrained, e.g. for stretching or for purely horizontal translation.
+ * @param allowOffScreen If true, then snapping to points which are off the screen is allowed (needed for example when pasting to the grid)
+ * @return An instance of the SnappedPoint class, which holds data on the snap source, snap target, and various metrics
*/
-
Inkscape::SnappedPoint SnapManager::findBestSnap(Inkscape::SnapCandidatePoint const &p,
IntermSnapResults const &isr,
bool constrained,
@@ -1291,21 +1270,20 @@ void SnapManager::setup(SPDesktop const *desktop,
}
/**
- * \brief Prepare the snap manager for the actual snapping, which includes building a list of snap targets
- * to ignore and toggling the snap indicator
+ * Prepare the snap manager for the actual snapping, which includes building a list of snap targets
+ * to ignore and toggling the snap indicator.
*
* There are two overloaded setup() methods, of which the other one only allows for a single item to be ignored
* whereas this one will take a list of items to ignore
*
- * \param desktop Reference to the desktop to which this snap manager is attached
- * \param snapindicator If true then a snap indicator will be displayed automatically (when enabled in the preferences)
- * \param items_to_ignore These items will not be snapped to, e.g. the items that are currently being dragged. This avoids "self-snapping"
- * \param unselected_nodes Stationary nodes of the path that is currently being edited in the node tool and
+ * @param desktop Reference to the desktop to which this snap manager is attached
+ * @param snapindicator If true then a snap indicator will be displayed automatically (when enabled in the preferences)
+ * @param items_to_ignore These items will not be snapped to, e.g. the items that are currently being dragged. This avoids "self-snapping"
+ * @param unselected_nodes Stationary nodes of the path that is currently being edited in the node tool and
* that can be snapped too. Nodes not in this list will not be snapped to, to avoid "self-snapping". Of each
* unselected node both the position (Geom::Point) and the type (Inkscape::SnapTargetType) will be stored
- * \param guide_to_ignore Guide that is currently being dragged and should not be snapped to
+ * @param guide_to_ignore Guide that is currently being dragged and should not be snapped to
*/
-
void SnapManager::setup(SPDesktop const *desktop,
bool snapindicator,
std::vector<SPItem const *> &items_to_ignore,
@@ -1355,17 +1333,16 @@ SPDocument *SnapManager::getDocument() const
}
/**
- * \brief Takes an untransformed point, applies the given transformation, and returns the transformed point. Eliminates lots of duplicated code
+ * Takes an untransformed point, applies the given transformation, and returns the transformed point. Eliminates lots of duplicated code.
*
- * \param p The untransformed position of the point, paired with an identifier of the type of the snap source.
- * \param transformation_type Type of transformation to apply.
- * \param transformation Mathematical description of the transformation; details depend on the type.
- * \param origin Origin of the transformation, if applicable.
- * \param dim Dimension to which the transformation applies, if applicable.
- * \param uniform true if the transformation should be uniform; only applicable for stretching and scaling.
- * \return The position of the point after transformation
+ * @param p The untransformed position of the point, paired with an identifier of the type of the snap source.
+ * @param transformation_type Type of transformation to apply.
+ * @param transformation Mathematical description of the transformation; details depend on the type.
+ * @param origin Origin of the transformation, if applicable.
+ * @param dim Dimension to which the transformation applies, if applicable.
+ * @param uniform true if the transformation should be uniform; only applicable for stretching and scaling.
+ * @return The position of the point after transformation
*/
-
Geom::Point SnapManager::_transformPoint(Inkscape::SnapCandidatePoint const &p,
Transformation const transformation_type,
Geom::Point const &transformation,
@@ -1413,12 +1390,11 @@ Geom::Point SnapManager::_transformPoint(Inkscape::SnapCandidatePoint const &p,
}
/**
- * \brief Mark the location of the snap source (not the snap target!) on the canvas by drawing a symbol
+ * Mark the location of the snap source (not the snap target!) on the canvas by drawing a symbol.
*
- * \param point_type Category of points to which the source point belongs: node, guide or bounding box
- * \param p The transformed position of the source point, paired with an identifier of the type of the snap source.
+ * @param point_type Category of points to which the source point belongs: node, guide or bounding box
+ * @param p The transformed position of the source point, paired with an identifier of the type of the snap source.
*/
-
void SnapManager::_displaySnapsource(Inkscape::SnapCandidatePoint const &p) const {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/snapped-curve.cpp b/src/snapped-curve.cpp
index 9cb547609..493925d48 100644
--- a/src/snapped-curve.cpp
+++ b/src/snapped-curve.cpp
@@ -1,6 +1,6 @@
/**
* \file src/snapped-curve.cpp
- * \brief SnappedCurve class.
+ * SnappedCurve class.
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
diff --git a/src/snapped-line.cpp b/src/snapped-line.cpp
index 525208f06..d9cd48d5b 100644
--- a/src/snapped-line.cpp
+++ b/src/snapped-line.cpp
@@ -1,6 +1,6 @@
/**
* \file src/snapped-line.cpp
- * \brief SnappedLine class.
+ * SnappedLine class.
*
* Authors:
* Diederik van Lierop <mail@diedenrezi.nl>
diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp
index a777e4dc0..83c932539 100644
--- a/src/snapped-point.cpp
+++ b/src/snapped-point.cpp
@@ -1,6 +1,6 @@
/**
* \file src/snapped-point.cpp
- * \brief SnappedPoint class.
+ * SnappedPoint class.
*
* Authors:
* Mathieu Dimanche <mdimanche@free.fr>
diff --git a/src/snapper.cpp b/src/snapper.cpp
index fb7281c30..8c985b732 100644
--- a/src/snapper.cpp
+++ b/src/snapper.cpp
@@ -1,6 +1,6 @@
/**
- * \file src/snapper.cpp
- * \brief Snapper class.
+ * @file src/snapper.cpp
+ * Snapper class.
*
* Authors:
* Carl Hetherington <inkscape@carlh.net>
@@ -15,8 +15,8 @@
/**
* Construct new Snapper for named view.
- * \param nv Named view.
- * \param d Snap tolerance.
+ * @param nv Named view.
+ * @param d Snap tolerance.
*/
Inkscape::Snapper::Snapper(SnapManager *sm, Geom::Coord const /*t*/) :
_snapmanager(sm),
@@ -27,7 +27,7 @@ Inkscape::Snapper::Snapper(SnapManager *sm, Geom::Coord const /*t*/) :
}
/**
- * \param s true to enable this snapper, otherwise false.
+ * @param s true to enable this snapper, otherwise false.
*/
void Inkscape::Snapper::setEnabled(bool s)
diff --git a/src/sp-desc.cpp b/src/sp-desc.cpp
index 18b1a1cad..bc7f600ae 100644
--- a/src/sp-desc.cpp
+++ b/src/sp-desc.cpp
@@ -1,5 +1,3 @@
-#define __SP_DESC_C__
-
/*
* SVG <desc> implementation
*
@@ -59,11 +57,10 @@ sp_desc_init(SPDesc */*desc*/)
{
}
-/*
- * \brief Writes it's settings to an incoming repr object, if any
+/**
+ * Writes it's settings to an incoming repr object, if any.
*/
-static Inkscape::XML::Node *
-sp_desc_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *sp_desc_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
if (!repr) {
repr = object->getRepr()->duplicate(doc);
diff --git a/src/sp-item-transform.cpp b/src/sp-item-transform.cpp
index d1fe14f20..a8d553e9f 100644
--- a/src/sp-item-transform.cpp
+++ b/src/sp-item-transform.cpp
@@ -17,8 +17,7 @@
#include <2geom/transforms.h>
#include "sp-item.h"
-void
-sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation)
+void sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation)
{
Geom::Point center = item->getCenter();
Geom::Translate const s(item->getCenter());
@@ -36,8 +35,7 @@ sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation)
}
}
-void
-sp_item_scale_rel (SPItem *item, Geom::Scale const &scale)
+void sp_item_scale_rel(SPItem *item, Geom::Scale const &scale)
{
Geom::OptRect bbox = item->desktopVisualBounds();
if (bbox) {
@@ -47,8 +45,7 @@ sp_item_scale_rel (SPItem *item, Geom::Scale const &scale)
}
}
-void
-sp_item_skew_rel (SPItem *item, double skewX, double skewY)
+void sp_item_skew_rel(SPItem *item, double skewX, double skewY)
{
Geom::Point center = item->getCenter();
Geom::Translate const s(item->getCenter());
@@ -74,7 +71,7 @@ void sp_item_move_rel(SPItem *item, Geom::Translate const &tr)
}
/**
- * \brief Calculate the affine transformation required to transform one visual bounding box into another, accounting for a uniform strokewidth
+ * Calculate the affine transformation required to transform one visual bounding box into another, accounting for a uniform strokewidth.
*
* PS: This function will only return accurate results for the visual bounding box of a selection of one or more objects, all having
* the same strokewidth. If the stroke width varies from object to object in this selection, then the function
@@ -85,20 +82,18 @@ void sp_item_move_rel(SPItem *item, Geom::Translate const &tr)
* box this is very straightforward, but when using a visual bounding box this become more tricky as we need to account for
* the strokewidth, which is either constant or scales width the area of the object. This function takes care of the calculation
* of the affine transformation:
- * \param bbox_visual Current visual bounding box
- * \param strokewidth Strokewidth
- * \param transform_stroke If true then the stroke will be scaled proportional to the square root of the area of the geometric bounding box
- * \param x0 Coordinate of the target visual bounding box
- * \param y0 Coordinate of the target visual bounding box
- * \param x1 Coordinate of the target visual bounding box
- * \param y1 Coordinate of the target visual bounding box
+ * @param bbox_visual Current visual bounding box
+ * @param strokewidth Strokewidth
+ * @param transform_stroke If true then the stroke will be scaled proportional to the square root of the area of the geometric bounding box
+ * @param x0 Coordinate of the target visual bounding box
+ * @param y0 Coordinate of the target visual bounding box
+ * @param x1 Coordinate of the target visual bounding box
+ * @param y1 Coordinate of the target visual bounding box
* PS: we have to pass each coordinate individually, to find out if we are mirroring the object; Using a Geom::Rect() instead is
- not possible here because it will only allow for a positive width and height, and therefore cannot mirror
- * \return
-*/
-
-Geom::Affine
-get_scale_transform_for_uniform_stroke (Geom::Rect const &bbox_visual, gdouble strokewidth, bool transform_stroke, gdouble x0, gdouble y0, gdouble x1, gdouble y1)
+ * not possible here because it will only allow for a positive width and height, and therefore cannot mirror
+ * @return
+ */
+Geom::Affine get_scale_transform_for_uniform_stroke(Geom::Rect const &bbox_visual, gdouble strokewidth, bool transform_stroke, gdouble x0, gdouble y0, gdouble x1, gdouble y1)
{
Geom::Affine p2o = Geom::Translate (-bbox_visual.min());
Geom::Affine o2n = Geom::Translate (x0, y0);
@@ -208,7 +203,7 @@ get_scale_transform_for_uniform_stroke (Geom::Rect const &bbox_visual, gdouble s
}
/**
- * \brief Calculate the affine transformation required to transform one visual bounding box into another, accounting for a VARIABLE strokewidth
+ * Calculate the affine transformation required to transform one visual bounding box into another, accounting for a VARIABLE strokewidth.
*
* Note: Please try to understand get_scale_transform_for_uniform_stroke() first, and read all it's comments carefully. This function
* (get_scale_transform_for_variable_stroke) is a bit different because it will allow for a strokewidth that's different for each
@@ -223,20 +218,18 @@ get_scale_transform_for_uniform_stroke (Geom::Rect const &bbox_visual, gdouble s
* the strokewidth, which is either constant or scales width the area of the object. This function takes care of the calculation
* of the affine transformation:
*
- * \param bbox_visual Current visual bounding box
- * \param bbox_geometric Current geometric bounding box (allows for calculating the strokewidth of each edge)
- * \param transform_stroke If true then the stroke will be scaled proportional to the square root of the area of the geometric bounding box
- * \param x0 Coordinate of the target visual bounding box
- * \param y0 Coordinate of the target visual bounding box
- * \param x1 Coordinate of the target visual bounding box
- * \param y1 Coordinate of the target visual bounding box
- PS: we have to pass each coordinate individually, to find out if we are mirroring the object; Using a Geom::Rect() instead is
- not possible here because it will only allow for a positive width and height, and therefore cannot mirror
- * \return
-*/
-
-Geom::Affine
-get_scale_transform_for_variable_stroke (Geom::Rect const &bbox_visual, Geom::Rect const &bbox_geom, bool transform_stroke, gdouble x0, gdouble y0, gdouble x1, gdouble y1)
+ * @param bbox_visual Current visual bounding box
+ * @param bbox_geometric Current geometric bounding box (allows for calculating the strokewidth of each edge)
+ * @param transform_stroke If true then the stroke will be scaled proportional to the square root of the area of the geometric bounding box
+ * @param x0 Coordinate of the target visual bounding box
+ * @param y0 Coordinate of the target visual bounding box
+ * @param x1 Coordinate of the target visual bounding box
+ * @param y1 Coordinate of the target visual bounding box
+ * PS: we have to pass each coordinate individually, to find out if we are mirroring the object; Using a Geom::Rect() instead is
+ * not possible here because it will only allow for a positive width and height, and therefore cannot mirror
+ * @return
+ */
+Geom::Affine get_scale_transform_for_variable_stroke(Geom::Rect const &bbox_visual, Geom::Rect const &bbox_geom, bool transform_stroke, gdouble x0, gdouble y0, gdouble x1, gdouble y1)
{
Geom::Affine p2o = Geom::Translate (-bbox_visual.min());
Geom::Affine o2n = Geom::Translate (x0, y0);
@@ -376,8 +369,7 @@ get_scale_transform_for_variable_stroke (Geom::Rect const &bbox_visual, Geom::Re
return (p2o * scale * unbudge * o2n);
}
-Geom::Rect
-get_visual_bbox (Geom::OptRect const &initial_geom_bbox, Geom::Affine const &abs_affine, gdouble const initial_strokewidth, bool const transform_stroke)
+Geom::Rect get_visual_bbox(Geom::OptRect const &initial_geom_bbox, Geom::Affine const &abs_affine, gdouble const initial_strokewidth, bool const transform_stroke)
{
g_assert(initial_geom_bbox);
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index a4d66cf1a..89ff92035 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -678,8 +678,11 @@ Inkscape::XML::Node *SPItem::sp_item_write(SPObject *const object, Inkscape::XML
return repr;
}
-/** @brief Get item's geometric bounding box in this item's coordinate system.
- * The geometric bounding box includes only the path, disregarding all style attributes. */
+/**
+ * Get item's geometric bounding box in this item's coordinate system.
+ *
+ * The geometric bounding box includes only the path, disregarding all style attributes.
+ */
Geom::OptRect SPItem::geometricBounds(Geom::Affine const &transform) const
{
Geom::OptRect bbox;
@@ -690,8 +693,11 @@ Geom::OptRect SPItem::geometricBounds(Geom::Affine const &transform) const
return bbox;
}
-/** @brief Get item's visual bounding box in this item's coordinate system.
- * The visual bounding box includes the stroke and the filter region. */
+/**
+ * Get item's visual bounding box in this item's coordinate system.
+ *
+ * The visual bounding box includes the stroke and the filter region.
+ */
Geom::OptRect SPItem::visualBounds(Geom::Affine const &transform) const
{
using Geom::X;
diff --git a/src/sp-metadata.cpp b/src/sp-metadata.cpp
index 84dc114db..3f2d3b584 100644
--- a/src/sp-metadata.cpp
+++ b/src/sp-metadata.cpp
@@ -1,5 +1,3 @@
-#define __SP_METADATA_C__
-
/*
* SVG <metadata> implementation
*
@@ -103,14 +101,14 @@ void strip_ids_recursively(Inkscape::XML::Node *node) {
}
-/*
- * \brief Reads the Inkscape::XML::Node, and initializes SPMetadata variables.
- * For this to get called, our name must be associated with
- * a repr via "sp_object_type_register". Best done through
- * sp-object-repr.cpp's repr_name_entries array.
+/**
+ * Reads the Inkscape::XML::Node, and initializes SPMetadata variables.
+ *
+ * For this to get called, our name must be associated with
+ * a repr via "sp_object_type_register". Best done through
+ * sp-object-repr.cpp's repr_name_entries array.
*/
-static void
-sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
+static void sp_metadata_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
{
using Inkscape::XML::NodeSiblingIterator;
@@ -129,25 +127,23 @@ sp_metadata_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *
((SPObjectClass *) metadata_parent_class)->build (object, document, repr);
}
-/*
- * \brief Drops any allocated memory
+/**
+ * Drops any allocated memory.
*/
-static void
-sp_metadata_release (SPObject *object)
+static void sp_metadata_release(SPObject *object)
{
debug("0x%08x",(unsigned int)object);
- /* handle ourself */
+ // handle ourself
if (((SPObjectClass *) metadata_parent_class)->release)
((SPObjectClass *) metadata_parent_class)->release (object);
}
-/*
- * \brief Sets a specific value in the SPMetadata
+/**
+ * Sets a specific value in the SPMetadata.
*/
-static void
-sp_metadata_set (SPObject *object, unsigned int key, const gchar *value)
+static void sp_metadata_set(SPObject *object, unsigned int key, const gchar *value)
{
debug("0x%08x %s(%u): '%s'",(unsigned int)object,
sp_attribute_name(key),key,value);
@@ -160,11 +156,10 @@ sp_metadata_set (SPObject *object, unsigned int key, const gchar *value)
((SPObjectClass *) metadata_parent_class)->set (object, key, value);
}
-/*
- * \brief Receives update notifications
+/**
+ * Receives update notifications.
*/
-static void
-sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags)
+static void sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags)
{
debug("0x%08x",(unsigned int)object);
//SPMetadata *metadata = SP_METADATA(object);
@@ -180,11 +175,10 @@ sp_metadata_update(SPObject *object, SPCtx *ctx, guint flags)
((SPObjectClass *) metadata_parent_class)->update(object, ctx, flags);
}
-/*
- * \brief Writes it's settings to an incoming repr object, if any
+/**
+ * Writes it's settings to an incoming repr object, if any.
*/
-static Inkscape::XML::Node *
-sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
debug("0x%08x",(unsigned int)object);
//SPMetadata *metadata = SP_METADATA(object);
@@ -204,11 +198,10 @@ sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML:
return repr;
}
-/*
- * \brief Retrieves the metadata object associated with a document
+/**
+ * Retrieves the metadata object associated with a document.
*/
-SPMetadata *
-sp_document_metadata (SPDocument *document)
+SPMetadata *sp_document_metadata(SPDocument *document)
{
SPObject *nv;
diff --git a/src/sp-title.cpp b/src/sp-title.cpp
index d21c7b71e..ddeccede2 100644
--- a/src/sp-title.cpp
+++ b/src/sp-title.cpp
@@ -1,5 +1,3 @@
-#define __SP_TITLE_C__
-
/*
* SVG <title> implementation
*
@@ -59,11 +57,10 @@ sp_title_init(SPTitle */*desc*/)
{
}
-/*
- * \brief Writes it's settings to an incoming repr object, if any
+/**
+ * Writes it's settings to an incoming repr object, if any.
*/
-static Inkscape::XML::Node *
-sp_title_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
+static Inkscape::XML::Node *sp_title_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
if (!repr) {
repr = object->getRepr()->duplicate(doc);
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 93ff48c3e..64eedf3f9 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -157,11 +157,10 @@ sp_spiral_context_dispose(GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-*/
-void
-sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ */
+void sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPSpiralContext *sc = SP_SPIRAL_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(sc);
diff --git a/src/star-context.cpp b/src/star-context.cpp
index c954fd7d7..352bdfece 100644
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
@@ -163,12 +163,12 @@ sp_star_context_dispose (GObject *object)
}
/**
-\brief Callback that processes the "changed" signal on the selection;
-destroys old and creates new knotholder
-\param selection Should not be NULL.
-*/
-void
-sp_star_context_selection_changed (Inkscape::Selection * selection, gpointer data)
+ * Callback that processes the "changed" signal on the selection;
+ * destroys old and creates new knotholder.
+ *
+ * @param selection Should not be NULL.
+ */
+void sp_star_context_selection_changed (Inkscape::Selection * selection, gpointer data)
{
g_assert (selection != NULL);
diff --git a/src/style.cpp b/src/style.cpp
index ffb56dfa5..90c100f33 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief SVG stylesheets implementation.
+/**
+ * @file
+ * SVG stylesheets implementation.
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
diff --git a/src/unclump.cpp b/src/unclump.cpp
index 6b9a8c574..43bcf5005 100644
--- a/src/unclump.cpp
+++ b/src/unclump.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Unclumping objects
+/**
+ * @file
+ * Unclumping objects.
*/
/* Authors:
* bulia byak
diff --git a/src/uri.cpp b/src/uri.cpp
index 1e38c034a..a5aec6f2d 100644
--- a/src/uri.cpp
+++ b/src/uri.cpp
@@ -1,6 +1,6 @@
/**
* \file
- * \brief Classes for representing and manipulating URIs as per RFC 2396.
+ * Classes for representing and manipulating URIs as per RFC 2396.
*
* Authors:
* MenTaLguY <mental@rydia.net>
@@ -17,14 +17,18 @@
namespace Inkscape {
-/** \brief Copy constructor. */
+/**
+ * Copy constructor.
+ */
URI::URI(const URI &uri) {
uri._impl->reference();
_impl = uri._impl;
}
-/** \brief Constructor from a C-style ASCII string.
- \param preformed Properly quoted C-style string to be represented.
+/**
+ * Constructor from a C-style ASCII string.
+ *
+ * @param preformed Properly quoted C-style string to be represented.
*/
URI::URI(gchar const *preformed) throw(BadURIException) {
xmlURIPtr uri;
@@ -39,12 +43,16 @@ URI::URI(gchar const *preformed) throw(BadURIException) {
}
-/** \brief Destructor. */
+/**
+ * Destructor.
+ */
URI::~URI() {
_impl->unreference();
}
-/** \brief Assignment operator. */
+/**
+ * Assignment operator.
+ */
URI &URI::operator=(URI const &uri) {
// No check for self-assignment needed, as _impl refcounting increments first.
uri._impl->reference();
@@ -77,32 +85,35 @@ void URI::Impl::unreference() {
}
}
-/** \fn bool URI::isOpaque() const
- \brief Determines if the URI represented is an 'opaque' URI.
- \return \c true if the URI is opaque, \c false if hierarchial.
-*/
+/**
+ * Determines if the URI represented is an 'opaque' URI.
+ *
+ * @return \c true if the URI is opaque, \c false if hierarchial.
+ */
bool URI::Impl::isOpaque() const {
bool opq = !isRelative() && (getOpaque() != NULL);
return opq;
}
-/** \fn bool URI::isRelative() const
- \brief Determines if the URI represented is 'relative' as per RFC 2396.
- \return \c true if the URI is relative, \c false if it is absolute.
-
- Relative URI references are distinguished by not begining with a
- scheme name.
-*/
+/**
+ * Determines if the URI represented is 'relative' as per RFC 2396.
+ *
+ * Relative URI references are distinguished by not begining with a
+ * scheme name.
+ *
+ * @return \c true if the URI is relative, \c false if it is absolute.
+ */
bool URI::Impl::isRelative() const {
return !_uri->scheme;
}
-/** \fn bool URI::isNetPath() const
- \brief Determines if the relative URI represented is a 'net-path' as per RFC 2396.
- \return \c true if the URI is relative and a net-path, \c false otherwise.
-
- A net-path is one that starts with "\\".
-*/
+/**
+ * Determines if the relative URI represented is a 'net-path' as per RFC 2396.
+ *
+ * A net-path is one that starts with "\\".
+ *
+ * @return \c true if the URI is relative and a net-path, \c false otherwise.
+ */
bool URI::Impl::isNetPath() const {
bool isNet = false;
if ( isRelative() )
@@ -113,12 +124,13 @@ bool URI::Impl::isNetPath() const {
return isNet;
}
-/** \fn bool URI::isRelativePath() const
- \brief Determines if the relative URI represented is a 'relative-path' as per RFC 2396.
- \return \c true if the URI is relative and a relative-path, \c false otherwise.
-
- A relative-path is one that starts with no slashes.
-*/
+/**
+ * Determines if the relative URI represented is a 'relative-path' as per RFC 2396.
+ *
+ * A relative-path is one that starts with no slashes.
+ *
+ * @return \c true if the URI is relative and a relative-path, \c false otherwise.
+ */
bool URI::Impl::isRelativePath() const {
bool isRel = false;
if ( isRelative() )
@@ -129,12 +141,13 @@ bool URI::Impl::isRelativePath() const {
return isRel;
}
-/** \fn bool URI::isAbsolutePath() const
- \brief Determines if the relative URI represented is a 'absolute-path' as per RFC 2396.
- \return \c true if the URI is relative and an absolute-path, \c false otherwise.
-
- An absolute-path is one that starts with a single "\".
-*/
+/**
+ * Determines if the relative URI represented is a 'absolute-path' as per RFC 2396.
+ *
+ * An absolute-path is one that starts with a single "\".
+ *
+ * @return \c true if the URI is relative and an absolute-path, \c false otherwise.
+ */
bool URI::Impl::isAbsolutePath() const {
bool isAbs = false;
if ( isRelative() )
@@ -230,12 +243,13 @@ URI URI::from_native_filename(gchar const *path) throw(BadURIException) {
return result;
}
-/** \fn gchar *URI::toString() const
- \brief Returns a glib string version of this URI.
- \return a glib string version of this URI.
-
- The returned string must be freed with \c g_free().
-*/
+/**
+ * Returns a glib string version of this URI.
+ *
+ * The returned string must be freed with \c g_free().
+ *
+ * @return a glib string version of this URI.
+ */
gchar *URI::Impl::toString() const {
xmlChar *string = xmlSaveUri(_uri);
if (string) {
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 7de95b332..89e61d7a7 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -1,7 +1,7 @@
/**
* \file verbs.cpp
*
- * \brief Actions for inkscape
+ * Actions for inkscape.
*
* This file implements routines necessary to deal with verbs. A verb
* is a numeric identifier used to retrieve standard SPActions for particular
@@ -89,11 +89,10 @@ using Inkscape::DocumentUndo;
//#endif
/**
- * \brief Return the name without underscores and ellipsis, for use in dialog
+ * Return the name without underscores and ellipsis, for use in dialog
* titles, etc. Allocated memory must be freed by caller.
*/
-gchar *
-sp_action_get_title(SPAction const *action)
+gchar *sp_action_get_title(SPAction const *action)
{
char const *src = action->name;
gchar *ret = g_new(gchar, strlen(src) + 1);
@@ -114,15 +113,16 @@ sp_action_get_title(SPAction const *action)
namespace Inkscape {
-/** \brief A class to encompass all of the verbs which deal with
- file operations. */
+/**
+ * A class to encompass all of the verbs which deal with file operations.
+ */
class FileVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
FileVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -130,17 +130,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* FileVerb class */
+}; // FileVerb class
-/** \brief A class to encompass all of the verbs which deal with
- edit operations. */
+/**
+ * A class to encompass all of the verbs which deal with edit operations.
+ */
class EditVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
EditVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -148,17 +149,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* EditVerb class */
+}; // EditVerb class
-/** \brief A class to encompass all of the verbs which deal with
- selection operations. */
+/**
+ * A class to encompass all of the verbs which deal with selection operations.
+ */
class SelectionVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
SelectionVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -166,17 +168,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* SelectionVerb class */
+}; // SelectionVerb class
-/** \brief A class to encompass all of the verbs which deal with
- layer operations. */
+/**
+ * A class to encompass all of the verbs which deal with layer operations.
+ */
class LayerVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
LayerVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -184,17 +187,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* LayerVerb class */
+}; // LayerVerb class
-/** \brief A class to encompass all of the verbs which deal with
- operations related to objects. */
+/**
+ * A class to encompass all of the verbs which deal with operations related to objects.
+ */
class ObjectVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
ObjectVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -202,17 +206,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* ObjectVerb class */
+}; // ObjectVerb class
-/** \brief A class to encompass all of the verbs which deal with
- operations relative to context. */
+/**
+ * A class to encompass all of the verbs which deal with operations relative to context.
+ */
class ContextVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
ContextVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -220,17 +225,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* ContextVerb class */
+}; // ContextVerb class
-/** \brief A class to encompass all of the verbs which deal with
- zoom operations. */
+/**
+ * A class to encompass all of the verbs which deal with zoom operations.
+ */
class ZoomVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
ZoomVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -238,18 +244,19 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* ZoomVerb class */
+}; // ZoomVerb class
-/** \brief A class to encompass all of the verbs which deal with
- dialog operations. */
+/**
+ * A class to encompass all of the verbs which deal with dialog operations.
+ */
class DialogVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
DialogVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -257,17 +264,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* DialogVerb class */
+}; // DialogVerb class
-/** \brief A class to encompass all of the verbs which deal with
- help operations. */
+/**
+ * A class to encompass all of the verbs which deal with help operations.
+ */
class HelpVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
HelpVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -275,17 +283,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* HelpVerb class */
+}; // HelpVerb class
-/** \brief A class to encompass all of the verbs which deal with
- tutorial operations. */
+/**
+ * A class to encompass all of the verbs which deal with tutorial operations.
+ */
class TutorialVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
TutorialVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -293,17 +302,18 @@ public:
gchar const *image) :
Verb(code, id, name, tip, image)
{ }
-}; /* TutorialVerb class */
+}; // TutorialVerb class
-/** \brief A class to encompass all of the verbs which deal with
- text operations. */
+/**
+ * A class to encompass all of the verbs which deal with text operations.
+ */
class TextVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
TextVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -316,15 +326,16 @@ public:
Verb::VerbTable Verb::_verbs;
Verb::VerbIDTable Verb::_verb_ids;
-/** \brief Create a verb without a code.
-
- This function calls the other constructor for all of the parameters,
- but generates the code. It is important to READ THE OTHER DOCUMENTATION
- it has important details in it. To generate the code a static is
- used which starts at the last static value: \c SP_VERB_LAST. For
- each call it is incremented. The list of allocated verbs is kept
- in the \c _verbs hashtable which is indexed by the \c code.
-*/
+/**
+ * Create a verb without a code.
+ *
+ * This function calls the other constructor for all of the parameters,
+ * but generates the code. It is important to READ THE OTHER DOCUMENTATION
+ * it has important details in it. To generate the code a static is
+ * used which starts at the last static value: \c SP_VERB_LAST. For
+ * each call it is incremented. The list of allocated verbs is kept
+ * in the \c _verbs hashtable which is indexed by the \c code.
+ */
Verb::Verb(gchar const *id, gchar const *name, gchar const *tip, gchar const *image) :
_actions(0),
_id(id),
@@ -344,11 +355,12 @@ Verb::Verb(gchar const *id, gchar const *name, gchar const *tip, gchar const *im
_verb_ids.insert(VerbIDTable::value_type(_id, this));
}
-/** \brief Destroy a verb.
-
- The only allocated variable is the _actions variable. If it has
- been allocated it is deleted.
-*/
+/**
+ * Destroy a verb.
+ *
+ * The only allocated variable is the _actions variable. If it has
+ * been allocated it is deleted.
+ */
Verb::~Verb(void)
{
/// \todo all the actions need to be cleaned up first.
@@ -360,168 +372,180 @@ Verb::~Verb(void)
}
}
-/** \brief Verbs are no good without actions. This is a place holder
- for a function that every subclass should write. Most
- can be written using \c make_action_helper.
- \param view Which view the action should be created for.
- \return NULL to represent error (this function shouldn't ever be called)
-*/
-SPAction *
-Verb::make_action(Inkscape::UI::View::View */*view*/)
+/**
+ * Verbs are no good without actions. This is a place holder
+ * for a function that every subclass should write. Most
+ * can be written using \c make_action_helper.
+ *
+ * @param view Which view the action should be created for.
+ * @return NULL to represent error (this function shouldn't ever be called)
+ */
+SPAction *Verb::make_action(Inkscape::UI::View::View */*view*/)
{
//std::cout << "make_action" << std::endl;
return NULL;
}
-/** \brief Create an action for a \c FileVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-FileVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c FileVerb.
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *FileVerb::make_action(Inkscape::UI::View::View *view)
{
//std::cout << "fileverb: make_action: " << &perform << std::endl;
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c EditVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-EditVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c EditVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *EditVerb::make_action(Inkscape::UI::View::View *view)
{
//std::cout << "editverb: make_action: " << &perform << std::endl;
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c SelectionVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-SelectionVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c SelectionVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *SelectionVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c LayerVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-LayerVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c LayerVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *LayerVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c ObjectVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-ObjectVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c ObjectVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *ObjectVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c ContextVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-ContextVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c ContextVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *ContextVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c ZoomVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-ZoomVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c ZoomVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *ZoomVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c DialogVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-DialogVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c DialogVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *DialogVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c HelpVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-HelpVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c HelpVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *HelpVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c TutorialVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-TutorialVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c TutorialVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *TutorialVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Create an action for a \c TextVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-TextVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c TextVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *TextVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief A quick little convience function to make building actions
- a little bit easier.
- \param view Which view the action should be created for.
- \param vector The function vector for the verb.
- \return The created action.
-
- This function does a couple of things. The most obvious is that
- it allocates and creates the action. When it does this it
- translates the \c _name and \c _tip variables. This allows them
- to be staticly allocated easily, and get translated in the end. Then,
- if the action gets crated, a listener is added to the action with
- the vector that is passed in.
-*/
-SPAction *
-Verb::make_action_helper(Inkscape::UI::View::View *view, void (*perform_fun)(SPAction *, void *), void *in_pntr)
+/**
+ * A quick little convience function to make building actions
+ * a little bit easier.
+ *
+ * This function does a couple of things. The most obvious is that
+ * it allocates and creates the action. When it does this it
+ * translates the \c _name and \c _tip variables. This allows them
+ * to be staticly allocated easily, and get translated in the end. Then,
+ * if the action gets crated, a listener is added to the action with
+ * the vector that is passed in.
+ *
+ * @param view Which view the action should be created for.
+ * @param vector The function vector for the verb.
+ * @return The created action.
+ */
+SPAction *Verb::make_action_helper(Inkscape::UI::View::View *view, void (*perform_fun)(SPAction *, void *), void *in_pntr)
{
SPAction *action;
@@ -541,27 +565,27 @@ Verb::make_action_helper(Inkscape::UI::View::View *view, void (*perform_fun)(SPA
return action;
}
-/** \brief A function to get an action if it exists, or otherwise to
- build it.
- \param view The view which this action would relate to
- \return The action, or NULL if there is an error.
-
- This function will get the action for a given view for this verb. It
- will create the verb if it can't be found in the ActionTable. Also,
- if the \c ActionTable has not been created, it gets created by this
- function.
-
- If the action is created, it's sensitivity must be determined. The
- default for a new action is that it is sensitive. If the value in
- \c _default_sensitive is \c false, then the sensitivity must be
- removed. Also, if the view being created is based on the same
- document as a view already created, the sensitivity should be the
- same as views on that document. A view with the same document is
- looked for, and the sensitivity is matched. Unfortunately, this is
- currently a linear search.
-*/
-SPAction *
-Verb::get_action(Inkscape::UI::View::View *view)
+/**
+ * A function to get an action if it exists, or otherwise to build it.
+ *
+ * This function will get the action for a given view for this verb. It
+ * will create the verb if it can't be found in the ActionTable. Also,
+ * if the \c ActionTable has not been created, it gets created by this
+ * function.
+ *
+ * If the action is created, it's sensitivity must be determined. The
+ * default for a new action is that it is sensitive. If the value in
+ * \c _default_sensitive is \c false, then the sensitivity must be
+ * removed. Also, if the view being created is based on the same
+ * document as a view already created, the sensitivity should be the
+ * same as views on that document. A view with the same document is
+ * looked for, and the sensitivity is matched. Unfortunately, this is
+ * currently a linear search.
+ *
+ * @param view The view which this action would relate to.
+ * @return The action, or NULL if there is an error.
+ */
+SPAction *Verb::get_action(Inkscape::UI::View::View *view)
{
SPAction *action = NULL;
@@ -617,7 +641,9 @@ Verb::sensitive(SPDocument *in_doc, bool in_sensitive)
return;
}
-/** \brief Accessor to get the tooltip for verb as localised string */
+/**
+ * Accessor to get the tooltip for verb as localised string.
+ */
gchar const *Verb::get_tip(void)
{
gchar const *result = 0;
@@ -658,16 +684,17 @@ Verb::name(SPDocument *in_doc, Glib::ustring in_name)
}
}
-/** \brief A function to remove the action associated with a view.
- \param view Which view's actions should be removed.
- \return None
-
- This function looks for the action in \c _actions. If it is
- found then it is unreferenced and the entry in the action
- table is erased.
-*/
-void
-Verb::delete_view(Inkscape::UI::View::View *view)
+/**
+ * A function to remove the action associated with a view.
+ *
+ * This function looks for the action in \c _actions. If it is
+ * found then it is unreferenced and the entry in the action
+ * table is erased.
+ *
+ * @param view Which view's actions should be removed.
+ * @return None
+ */
+void Verb::delete_view(Inkscape::UI::View::View *view)
{
if (_actions == NULL) return;
if (_actions->empty()) return;
@@ -688,17 +715,18 @@ Verb::delete_view(Inkscape::UI::View::View *view)
return;
}
-/** \brief A function to delete a view from all verbs
- \param view Which view's actions should be removed.
- \return None
-
- This function first looks through _base_verbs and deteles
- the view from all of those views. If \c _verbs is not empty
- then all of the entries in that table have all of the views
- deleted also.
-*/
-void
-Verb::delete_all_view(Inkscape::UI::View::View *view)
+/**
+ * A function to delete a view from all verbs.
+ *
+ * This function first looks through _base_verbs and deteles
+ * the view from all of those views. If \c _verbs is not empty
+ * then all of the entries in that table have all of the views
+ * deleted also.
+ *
+ * @param view Which view's actions should be removed.
+ * @return None
+ */
+void Verb::delete_all_view(Inkscape::UI::View::View *view)
{
for (int i = 0; i <= SP_VERB_LAST; i++) {
if (_base_verbs[i])
@@ -717,16 +745,16 @@ Verb::delete_all_view(Inkscape::UI::View::View *view)
return;
}
-/** \brief A function to turn a \c code into a Verb for dynamically
- created Verbs.
- \param code What code is being looked for
- \return The found Verb of NULL if none is found.
-
- This function basically just looks through the \c _verbs hash
- table. STL does all the work.
-*/
-Verb *
-Verb::get_search(unsigned int code)
+/**
+ * A function to turn a \c code into a Verb for dynamically created Verbs.
+ *
+ * This function basically just looks through the \c _verbs hash
+ * table. STL does all the work.
+ *
+ * @param code What code is being looked for.
+ * @return The found Verb of NULL if none is found.
+ */
+Verb *Verb::get_search(unsigned int code)
{
Verb *verb = NULL;
VerbTable::iterator verb_found = _verbs.find(code);
@@ -738,15 +766,16 @@ Verb::get_search(unsigned int code)
return verb;
}
-/** \brief Find a Verb using it's ID
- \param id Which id to search for
-
- This function uses the \c _verb_ids has table to find the
- verb by it's id. Should be much faster than previous
- implementations.
-*/
-Verb *
-Verb::getbyid(gchar const *id)
+/**
+ * Find a Verb using it's ID.
+ *
+ * This function uses the \c _verb_ids has table to find the
+ * verb by it's id. Should be much faster than previous
+ * implementations.
+ *
+ * @param id Which id to search for.
+ */
+Verb *Verb::getbyid(gchar const *id)
{
Verb *verb = NULL;
VerbIDTable::iterator verb_found = _verb_ids.find(id);
@@ -761,13 +790,14 @@ Verb::getbyid(gchar const *id)
return verb;
}
-/** \brief Decode the verb code and take appropriate action */
-void
-FileVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void FileVerb::perform(SPAction *action, void *data)
{
#if 0
- /* These aren't used, but are here to remind people not to use
- the CURRENT_DOCUMENT macros unless they really have to. */
+ // These aren't used, but are here to remind people not to use
+ // the CURRENT_DOCUMENT macros unless they really have to.
Inkscape::UI::View::View *current_view = sp_action_get_view(action);
SPDocument *current_document = current_view->doc();
#endif
@@ -833,9 +863,10 @@ FileVerb::perform(SPAction *action, void *data)
} // end of sp_verb_action_file_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-EditVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void EditVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
@@ -964,9 +995,10 @@ EditVerb::perform(SPAction *action, void *data)
} // end of sp_verb_action_edit_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-SelectionVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void SelectionVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
@@ -1084,9 +1116,10 @@ SelectionVerb::perform(SPAction *action, void *data)
} // end of sp_verb_action_selection_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-LayerVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void LayerVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
size_t verb = reinterpret_cast<std::size_t>(data);
@@ -1253,11 +1286,11 @@ LayerVerb::perform(SPAction *action, void *data)
survivor = Inkscape::previous_layer(dt->currentRoot(), old_layer);
}
- /* Deleting the old layer before switching layers is a hack to trigger the
- * listeners of the deletion event (as happens when old_layer is deleted using the
- * xml editor). See
- * http://sourceforge.net/tracker/index.php?func=detail&aid=1339397&group_id=93438&atid=604306
- */
+ // Deleting the old layer before switching layers is a hack to trigger the
+ // listeners of the deletion event (as happens when old_layer is deleted using the
+ // xml editor). See
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1339397&group_id=93438&atid=604306
+ //
old_layer->deleteObject();
sp_object_unref(old_layer, NULL);
if (survivor) {
@@ -1288,9 +1321,10 @@ LayerVerb::perform(SPAction *action, void *data)
return;
} // end of sp_verb_action_layer_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-ObjectVerb::perform( SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void ObjectVerb::perform( SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
@@ -1371,9 +1405,10 @@ ObjectVerb::perform( SPAction *action, void *data)
} // end of sp_verb_action_object_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-ContextVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void ContextVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt;
sp_verb_t verb;
@@ -1555,9 +1590,10 @@ ContextVerb::perform(SPAction *action, void *data)
} // end of sp_verb_action_ctx_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-TextVerb::perform(SPAction *action, void */*data*/)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void TextVerb::perform(SPAction *action, void */*data*/)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
@@ -1569,9 +1605,10 @@ TextVerb::perform(SPAction *action, void */*data*/)
(void)repr;
}
-/** \brief Decode the verb code and take appropriate action */
-void
-ZoomVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void ZoomVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt)
@@ -1681,7 +1718,7 @@ ZoomVerb::perform(SPAction *action, void *data)
case SP_VERB_FULLSCREEN:
dt->fullscreen();
break;
-#endif /* HAVE_GTK_WINDOW_FULLSCREEN */
+#endif // HAVE_GTK_WINDOW_FULLSCREEN
case SP_VERB_FOCUSTOGGLE:
dt->focusMode(!dt->is_focusMode());
break;
@@ -1730,9 +1767,10 @@ ZoomVerb::perform(SPAction *action, void *data)
} // end of sp_verb_action_zoom_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-DialogVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void DialogVerb::perform(SPAction *action, void *data)
{
if (reinterpret_cast<std::size_t>(data) != SP_VERB_DIALOG_TOGGLE) {
// unhide all when opening a new dialog
@@ -1842,9 +1880,10 @@ DialogVerb::perform(SPAction *action, void *data)
}
} // end of sp_verb_action_dialog_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-HelpVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void HelpVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
g_assert(dt->_dlg_mgr != NULL);
@@ -1876,15 +1915,16 @@ HelpVerb::perform(SPAction *action, void *data)
}
} // end of sp_verb_action_help_perform()
-/** \brief Decode the verb code and take appropriate action */
-void
-TutorialVerb::perform(SPAction */*action*/, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void TutorialVerb::perform(SPAction */*action*/, void *data)
{
switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_TUTORIAL_BASIC:
- /* TRANSLATORS: If you have translated the tutorial-basic.en.svgz file to your language,
- then translate this string as "tutorial-basic.LANG.svgz" (where LANG is your language
- code); otherwise leave as "tutorial-basic.svg". */
+ // TRANSLATORS: If you have translated the tutorial-basic.en.svgz file to your language,
+ // then translate this string as "tutorial-basic.LANG.svgz" (where LANG is your language
+ // code); otherwise leave as "tutorial-basic.svg".
sp_help_open_tutorial(NULL, (gpointer)_("tutorial-basic.svg"));
break;
case SP_VERB_TUTORIAL_SHAPES:
@@ -1920,16 +1960,18 @@ TutorialVerb::perform(SPAction */*action*/, void *data)
}
} // end of sp_verb_action_tutorial_perform()
-/* *********** Effect Last ********** */
+// *********** Effect Last **********
-/** \brief A class to represent the last effect issued */
+/**
+ * A class to represent the last effect issued.
+ */
class EffectLastVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
EffectLastVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -1939,26 +1981,28 @@ public:
{
set_default_sensitive(false);
}
-}; /* EffectLastVerb class */
+}; // EffectLastVerb class
-/** \brief Create an action for a \c EffectLastVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-EffectLastVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c EffectLastVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *EffectLastVerb::make_action(Inkscape::UI::View::View *view)
{
return make_action_helper(view, &perform);
}
-/** \brief Decode the verb code and take appropriate action */
-void
-EffectLastVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void EffectLastVerb::perform(SPAction *action, void *data)
{
- /* These aren't used, but are here to remind people not to use
- the CURRENT_DOCUMENT macros unless they really have to. */
+ // These aren't used, but are here to remind people not to use
+ // the CURRENT_DOCUMENT macros unless they really have to.
Inkscape::UI::View::View *current_view = sp_action_get_view(action);
// SPDocument *current_document = SP_VIEW_DOCUMENT(current_view);
Inkscape::Extension::Effect *effect = Inkscape::Extension::Effect::get_last_effect();
@@ -1979,18 +2023,20 @@ EffectLastVerb::perform(SPAction *action, void *data)
return;
}
-/* *********** End Effect Last ********** */
+// *********** End Effect Last **********
-/* *********** Fit Canvas ********** */
+// *********** Fit Canvas **********
-/** \brief A class to represent the canvas fitting verbs */
+/**
+ * A class to represent the canvas fitting verbs.
+ */
class FitCanvasVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
FitCanvasVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -2000,24 +2046,26 @@ public:
{
set_default_sensitive(false);
}
-}; /* FitCanvasVerb class */
-
-/** \brief Create an action for a \c FitCanvasVerb
- \param view Which view the action should be created for
- \return The built action.
+}; // FitCanvasVerb class
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-FitCanvasVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c FitCanvasVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *FitCanvasVerb::make_action(Inkscape::UI::View::View *view)
{
SPAction *action = make_action_helper(view, &perform);
return action;
}
-/** \brief Decode the verb code and take appropriate action */
-void
-FitCanvasVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void FitCanvasVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;
@@ -2040,19 +2088,21 @@ FitCanvasVerb::perform(SPAction *action, void *data)
return;
}
-/* *********** End Fit Canvas ********** */
+// *********** End Fit Canvas **********
-/* *********** Lock'N'Hide ********** */
+// *********** Lock'N'Hide **********
-/** \brief A class to represent the object unlocking and unhiding verbs */
+/**
+ * A class to represent the object unlocking and unhiding verbs.
+ */
class LockAndHideVerb : public Verb {
private:
static void perform(SPAction *action, void *mydata);
protected:
virtual SPAction *make_action(Inkscape::UI::View::View *view);
public:
- /** \brief Use the Verb initializer with the same parameters. */
+ /** Use the Verb initializer with the same parameters. */
LockAndHideVerb(unsigned int const code,
gchar const *id,
gchar const *name,
@@ -2062,24 +2112,26 @@ public:
{
set_default_sensitive(true);
}
-}; /* LockAndHideVerb class */
+}; // LockAndHideVerb class
-/** \brief Create an action for a \c LockAndHideVerb
- \param view Which view the action should be created for
- \return The built action.
-
- Calls \c make_action_helper with the \c vector.
-*/
-SPAction *
-LockAndHideVerb::make_action(Inkscape::UI::View::View *view)
+/**
+ * Create an action for a \c LockAndHideVerb.
+ *
+ * Calls \c make_action_helper with the \c vector.
+ *
+ * @param view Which view the action should be created for.
+ * @return The built action.
+ */
+SPAction *LockAndHideVerb::make_action(Inkscape::UI::View::View *view)
{
SPAction *action = make_action_helper(view, &perform);
return action;
}
-/** \brief Decode the verb code and take appropriate action */
-void
-LockAndHideVerb::perform(SPAction *action, void *data)
+/**
+ * Decode the verb code and take appropriate action.
+ */
+void LockAndHideVerb::perform(SPAction *action, void *data)
{
SPDesktop *dt = static_cast<SPDesktop*>(sp_action_get_view(action));
if (!dt) return;
@@ -2109,16 +2161,16 @@ LockAndHideVerb::perform(SPAction *action, void *data)
return;
}
-/* *********** End Lock'N'Hide ********** */
+// *********** End Lock'N'Hide **********
-/* these must be in the same order as the SP_VERB_* enum in "verbs.h" */
+// these must be in the same order as the SP_VERB_* enum in "verbs.h"
Verb *Verb::_base_verbs[] = {
- /* Header */
+ // Header
new Verb(SP_VERB_INVALID, NULL, NULL, NULL, NULL),
new Verb(SP_VERB_NONE, "None", N_("None"), N_("Does nothing"), NULL),
- /* File */
+ // File
new FileVerb(SP_VERB_FILE_NEW, "FileNew", N_("Default"), N_("Create new document from the default template"),
GTK_STOCK_NEW ),
new FileVerb(SP_VERB_FILE_OPEN, "FileOpen", N_("_Open..."),
@@ -2150,7 +2202,7 @@ Verb *Verb::_base_verbs[] = {
N_("Close this document window"), GTK_STOCK_CLOSE),
new FileVerb(SP_VERB_FILE_QUIT, "FileQuit", N_("_Quit"), N_("Quit Inkscape"), GTK_STOCK_QUIT),
- /* Edit */
+ // Edit
new EditVerb(SP_VERB_EDIT_UNDO, "EditUndo", N_("_Undo"), N_("Undo last action"),
GTK_STOCK_UNDO),
new EditVerb(SP_VERB_EDIT_REDO, "EditRedo", N_("_Redo"),
@@ -2226,7 +2278,7 @@ Verb *Verb::_base_verbs[] = {
new EditVerb(SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER, "EditNextPathEffectParameter", N_("Next path effect parameter"),
N_("Show next editable path effect parameter"), INKSCAPE_ICON("path-effect-parameter-next")),
- /* Selection */
+ // Selection
new SelectionVerb(SP_VERB_SELECTION_TO_FRONT, "SelectionToFront", N_("Raise to _Top"),
N_("Raise selection to top"), INKSCAPE_ICON("selection-top")),
new SelectionVerb(SP_VERB_SELECTION_TO_BACK, "SelectionToBack", N_("Lower to _Bottom"),
@@ -2310,7 +2362,7 @@ Verb *Verb::_base_verbs[] = {
N_("Break selected paths into subpaths"), INKSCAPE_ICON("path-break-apart")),
new SelectionVerb(SP_VERB_SELECTION_GRIDTILE, "DialogGridArrange", N_("Ro_ws and Columns..."),
N_("Arrange selected objects in a table"), INKSCAPE_ICON("dialog-rows-and-columns")),
- /* Layer */
+ // Layer
new LayerVerb(SP_VERB_LAYER_NEW, "LayerNew", N_("_Add Layer..."),
N_("Create a new layer"), INKSCAPE_ICON("layer-new")),
new LayerVerb(SP_VERB_LAYER_RENAME, "LayerRename", N_("Re_name Layer..."),
@@ -2338,7 +2390,7 @@ Verb *Verb::_base_verbs[] = {
new LayerVerb(SP_VERB_LAYER_SOLO, "LayerSolo", N_("_Show/hide other layers"),
N_("Solo the current layer"), NULL),
- /* Object */
+ // Object
new ObjectVerb(SP_VERB_OBJECT_ROTATE_90_CW, "ObjectRotate90", N_("Rotate _90&#176; CW"),
// This is shared between tooltips and statusbar, so they
// must use UTF-8, not HTML entities for special characters.
@@ -2376,7 +2428,7 @@ Verb *Verb::_base_verbs[] = {
new ObjectVerb(SP_VERB_OBJECT_UNSET_CLIPPATH, "ObjectUnSetClipPath", N_("_Release"),
N_("Remove clipping path from selection"), NULL),
- /* Tools */
+ // Tools
new ContextVerb(SP_VERB_CONTEXT_SELECT, "ToolSelector", N_("Select"),
N_("Select and transform objects"), INKSCAPE_ICON("tool-pointer")),
new ContextVerb(SP_VERB_CONTEXT_NODE, "ToolNode", N_("Node Edit"),
@@ -2421,7 +2473,7 @@ Verb *Verb::_base_verbs[] = {
N_("Erase existing paths"), INKSCAPE_ICON("draw-eraser")),
new ContextVerb(SP_VERB_CONTEXT_LPETOOL, "ToolLPETool", N_("LPE Tool"),
N_("Do geometric constructions"), "draw-geometry"),
- /* Tool prefs */
+ // Tool prefs
new ContextVerb(SP_VERB_CONTEXT_SELECT_PREFS, "SelectPrefs", N_("Selector Preferences"),
N_("Open Preferences for the Selector tool"), NULL),
new ContextVerb(SP_VERB_CONTEXT_NODE_PREFS, "NodePrefs", N_("Node Tool Preferences"),
@@ -2465,7 +2517,7 @@ Verb *Verb::_base_verbs[] = {
new ContextVerb(SP_VERB_CONTEXT_LPETOOL_PREFS, "LPEToolPrefs", N_("LPE Tool Preferences"),
N_("Open Preferences for the LPETool tool"), NULL),
- /* Zoom/View */
+ // Zoom/View
new ZoomVerb(SP_VERB_ZOOM_IN, "ZoomIn", N_("Zoom In"), N_("Zoom in"), INKSCAPE_ICON("zoom-in")),
new ZoomVerb(SP_VERB_ZOOM_OUT, "ZoomOut", N_("Zoom Out"), N_("Zoom out"), INKSCAPE_ICON("zoom-out")),
new ZoomVerb(SP_VERB_TOGGLE_RULERS, "ToggleRulers", N_("_Rulers"), N_("Show or hide the canvas rulers"), NULL),
@@ -2486,7 +2538,7 @@ Verb *Verb::_base_verbs[] = {
#ifdef HAVE_GTK_WINDOW_FULLSCREEN
new ZoomVerb(SP_VERB_FULLSCREEN, "FullScreen", N_("_Fullscreen"), N_("Stretch this document window to full screen"),
INKSCAPE_ICON("view-fullscreen")),
-#endif /* HAVE_GTK_WINDOW_FULLSCREEN */
+#endif // HAVE_GTK_WINDOW_FULLSCREEN
new ZoomVerb(SP_VERB_FOCUSTOGGLE, "FocusToggle", N_("Toggle _Focus Mode"), N_("Remove excess toolbars to focus on drawing"),
NULL),
new ZoomVerb(SP_VERB_VIEW_NEW, "ViewNew", N_("Duplic_ate Window"), N_("Open a new window with the same document"),
@@ -2525,7 +2577,7 @@ Verb *Verb::_base_verbs[] = {
new ZoomVerb(SP_VERB_ZOOM_SELECTION, "ZoomSelection", N_("_Selection"),
N_("Zoom to fit selection in window"), INKSCAPE_ICON("zoom-fit-selection")),
- /* Dialogs */
+ // Dialogs
new DialogVerb(SP_VERB_DIALOG_DISPLAY, "DialogPreferences", N_("In_kscape Preferences..."),
N_("Edit global Inkscape preferences"), GTK_STOCK_PREFERENCES ),
new DialogVerb(SP_VERB_DIALOG_NAMEDVIEW, "DialogDocumentProperties", N_("_Document Properties..."),
@@ -2586,7 +2638,7 @@ Verb *Verb::_base_verbs[] = {
new DialogVerb(SP_VERB_DIALOG_PRINT_COLORS_PREVIEW, "DialogPrintColorsPreview", N_("Print Colors..."),
N_("Select which color separations to render in Print Colors Preview rendermode"), NULL),
- /* Help */
+ // Help
new HelpVerb(SP_VERB_HELP_ABOUT_EXTENSIONS, "HelpAboutExtensions", N_("About E_xtensions"),
N_("Information on Inkscape extensions"), NULL),
new HelpVerb(SP_VERB_HELP_MEMORY, "HelpAboutMemory", N_("About _Memory"),
@@ -2596,7 +2648,7 @@ Verb *Verb::_base_verbs[] = {
//new HelpVerb(SP_VERB_SHOW_LICENSE, "ShowLicense", N_("_License"),
// N_("Distribution terms"), /*"show_license"*/"inkscape_options"),
- /* Tutorials */
+ // Tutorials
new TutorialVerb(SP_VERB_TUTORIAL_BASIC, "TutorialsBasic", N_("Inkscape: _Basic"),
N_("Getting started with Inkscape"), NULL/*"tutorial_basic"*/),
new TutorialVerb(SP_VERB_TUTORIAL_SHAPES, "TutorialsShapes", N_("Inkscape: _Shapes"),
@@ -2615,20 +2667,20 @@ Verb *Verb::_base_verbs[] = {
new TutorialVerb(SP_VERB_TUTORIAL_TIPS, "TutorialsTips", N_("_Tips and Tricks"),
N_("Miscellaneous tips and tricks"), NULL/*"tutorial_tips"*/),
- /* Effect -- renamed Extension */
+ // Effect -- renamed Extension
new EffectLastVerb(SP_VERB_EFFECT_LAST, "EffectLast", N_("Previous Exte_nsion"),
N_("Repeat the last extension with the same settings"), NULL),
new EffectLastVerb(SP_VERB_EFFECT_LAST_PREF, "EffectLastPref", N_("_Previous Extension Settings..."),
N_("Repeat the last extension with new settings"), NULL),
- /* Fit Page */
+ // Fit Page
new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_SELECTION, "FitCanvasToSelection", N_("Fit Page to Selection"),
N_("Fit the page to the current selection"), NULL),
new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_DRAWING, "FitCanvasToDrawing", N_("Fit Page to Drawing"),
N_("Fit the page to the drawing"), NULL),
new FitCanvasVerb(SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING, "FitCanvasToSelectionOrDrawing", N_("Fit Page to Selection or Drawing"),
N_("Fit the page to the current selection or the drawing if there is no selection"), NULL),
- /* LockAndHide */
+ // LockAndHide
new LockAndHideVerb(SP_VERB_UNLOCK_ALL, "UnlockAll", N_("Unlock All"),
N_("Unlock all objects in the current layer"), NULL),
new LockAndHideVerb(SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS, "UnlockAllInAllLayers", N_("Unlock All in All Layers"),
@@ -2637,12 +2689,12 @@ Verb *Verb::_base_verbs[] = {
N_("Unhide all objects in the current layer"), NULL),
new LockAndHideVerb(SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS, "UnhideAllInAllLayers", N_("Unhide All in All Layers"),
N_("Unhide all objects in all layers"), NULL),
- /*Color Management*/
+ // Color Management
new EditVerb(SP_VERB_EDIT_LINK_COLOR_PROFILE, "LinkColorProfile", N_("Link Color Profile"),
N_("Link an ICC color profile"), NULL),
new EditVerb(SP_VERB_EDIT_REMOVE_COLOR_PROFILE, "RemoveColorProfile", N_("Remove Color Profile"),
N_("Remove a linked ICC color profile"), NULL),
- /* Footer */
+ // Footer
new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL)
};
@@ -2664,7 +2716,7 @@ Verb::list (void) {
return;
};
-} /* namespace Inkscape */
+} // namespace Inkscape
/*
Local Variables:
diff --git a/src/winconsole.cpp b/src/winconsole.cpp
index f6ee49e13..1515d2062 100644
--- a/src/winconsole.cpp
+++ b/src/winconsole.cpp
@@ -1,5 +1,6 @@
-/** \file
- * @brief Command-line wrapper for Windows.
+/**
+ * \file
+ * Command-line wrapper for Windows.
*
* Windows has two types of executables: GUI and console.
* The GUI executables detach immediately when run from the command