summaryrefslogtreecommitdiffstats
path: root/src/ui/tool
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-10-03 07:24:15 +0000
committerJon A. Cruz <jon@joncruz.org>2011-10-03 07:24:15 +0000
commit6343a24c5cd0a998e00ae05fc6abe2081be21c71 (patch)
treea7dd4dab52017785c7fe15e79fb0b2836ff8e95a /src/ui/tool
parentAnother minor pass of Doxygen cleanup. (diff)
downloadinkscape-6343a24c5cd0a998e00ae05fc6abe2081be21c71.tar.gz
inkscape-6343a24c5cd0a998e00ae05fc6abe2081be21c71.zip
Doxygen cleanup.
(bzr r10660)
Diffstat (limited to 'src/ui/tool')
-rw-r--r--src/ui/tool/control-point-selection.cpp16
-rw-r--r--src/ui/tool/control-point.cpp9
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp23
-rw-r--r--src/ui/tool/node-tool.cpp5
-rw-r--r--src/ui/tool/node.cpp43
-rw-r--r--src/ui/tool/path-manipulator.cpp11
6 files changed, 63 insertions, 44 deletions
diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp
index fbcb337a5..1a1aee47c 100644
--- a/src/ui/tool/control-point-selection.cpp
+++ b/src/ui/tool/control-point-selection.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Node selection - implementation
+/**
+ * @file
+ * Node selection - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk.pl@gmail.com>
@@ -23,7 +24,7 @@ namespace UI {
/**
* @class ControlPointSelection
- * @brief Group of selected control points.
+ * Group of selected control points.
*
* Some operations can be performed on all selected points regardless of their type, therefore
* this class is also a Manipulator. It handles the transformations of points using
@@ -446,8 +447,10 @@ bool ControlPointSelection::_keyboardMove(GdkEventKey const &event, Geom::Point
return true;
}
-/** @brief Computes the distance to the farthest corner of the bounding box.
- * Used to determine what it means to "rotate by one pixel". */
+/**
+ * Computes the distance to the farthest corner of the bounding box.
+ * Used to determine what it means to "rotate by one pixel".
+ */
double ControlPointSelection::_rotationRadius(Geom::Point const &rc)
{
if (empty()) return 1.0; // some safe value
@@ -460,7 +463,8 @@ double ControlPointSelection::_rotationRadius(Geom::Point const &rc)
return maxlen;
}
-/** Rotates the selected points in the given direction according to the modifier state
+/**
+ * Rotates the selected points in the given direction according to the modifier state
* from the supplied event.
* @param event Key event to take modifier state from
* @param dir Direction of rotation (math convention: 1 = counterclockwise, -1 = clockwise)
diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp
index bece1324b..81cb53f6f 100644
--- a/src/ui/tool/control-point.cpp
+++ b/src/ui/tool/control-point.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Desktop-bound visual control object - implementation
+/**
+ * @file
+ * Desktop-bound visual control object - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk.pl@gmail.com>
@@ -29,7 +30,7 @@ namespace UI {
/**
* @class ControlPoint
- * @brief Draggable point, the workhorse of on-canvas editing.
+ * Draggable point, the workhorse of on-canvas editing.
*
* Control points (formerly known as knots) are graphical representations of some significant
* point in the drawing. The drawing can be changed by dragging the point and the things that are
@@ -537,7 +538,7 @@ void ControlPoint::transferGrab(ControlPoint *prev_point, GdkEventMotion *event)
}
/**
- * @brief Change the state of the knot
+ * Change the state of the knot.
* Alters the appearance of the knot to match one of the states: normal, mouseover
* or clicked.
*/
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 082ac194b..27418d302 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Multi path manipulator - implementation
+/**
+ * @file
+ * Multi path manipulator - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk.pl@gmail.com>
@@ -149,9 +150,11 @@ void MultiPathManipulator::cleanup()
}
}
-/** @brief Change the set of items to edit.
+/**
+ * Change the set of items to edit.
*
- * This method attempts to preserve as much of the state as possible. */
+ * This method attempts to preserve as much of the state as possible.
+ */
void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
{
std::set<ShapeRecord> shapes(s);
@@ -507,20 +510,24 @@ void MultiPathManipulator::showPathDirection(bool show)
_show_path_direction = show;
}
-/** @brief Set live outline update status
+/**
+ * Set live outline update status.
* When set to true, outline will be updated continuously when dragging
* or transforming nodes. Otherwise it will only update when changes are committed
- * to XML. */
+ * to XML.
+ */
void MultiPathManipulator::setLiveOutline(bool set)
{
invokeForAll(&PathManipulator::setLiveOutline, set);
_live_outline = set;
}
-/** @brief Set live object update status
+/**
+ * Set live object update status.
* When set to true, objects will be updated continuously when dragging
* or transforming nodes. Otherwise they will only update when changes are committed
- * to XML. */
+ * to XML.
+ */
void MultiPathManipulator::setLiveObjects(bool set)
{
invokeForAll(&PathManipulator::setLiveObjects, set);
diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp
index 6385fce0a..33020982e 100644
--- a/src/ui/tool/node-tool.cpp
+++ b/src/ui/tool/node-tool.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief New node tool - implementation
+/**
+ * @file
+ * New node tool - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk@gmail.com>
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index e254fb9b2..d268a9f14 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Editable node - implementation
+/**
+ * @file
+ * Editable node - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk.pl@gmail.com>
@@ -70,13 +71,11 @@ static Geom::Point direction(Geom::Point const &first, Geom::Point const &second
}
/**
- * @class Handle
- * @brief Control point of a cubic Bezier curve in a path.
+ * Control point of a cubic Bezier curve in a path.
*
* Handle keeps the node type invariant only for the opposite handle of the same node.
* Keeping the invariant on node moves is left to the %Node class.
*/
-
Geom::Point Handle::_saved_other_pos(0, 0);
double Handle::_saved_length = 0.0;
bool Handle::_drag_out = false;
@@ -467,12 +466,10 @@ Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/)
}
/**
- * @class Node
- * @brief Curve endpoint in an editable path.
+ * Curve endpoint in an editable path.
*
* The method move() keeps node type invariants during translations.
*/
-
Node::Node(NodeSharedData const &data, Geom::Point const &initial_pos)
: SelectableControlPoint(data.desktop, initial_pos, Gtk::ANCHOR_CENTER,
SP_CTRL_SHAPE_DIAMOND, 9.0, *data.selection, &node_colors, data.node_group)
@@ -1121,8 +1118,10 @@ Inkscape::SnapCandidatePoint Node::snapCandidatePoint()
return SnapCandidatePoint(position(), _snapSourceType(), _snapTargetType());
}
-/** @brief Gets the handle that faces the given adjacent node.
- * Will abort with error if the given node is not adjacent. */
+/**
+ * Gets the handle that faces the given adjacent node.
+ * Will abort with error if the given node is not adjacent.
+ */
Handle *Node::handleToward(Node *to)
{
if (_next() == to) {
@@ -1134,8 +1133,10 @@ Handle *Node::handleToward(Node *to)
g_error("Node::handleToward(): second node is not adjacent!");
}
-/** @brief Gets the node in the direction of the given handle.
- * Will abort with error if the handle doesn't belong to this node. */
+/**
+ * Gets the node in the direction of the given handle.
+ * Will abort with error if the handle doesn't belong to this node.
+ */
Node *Node::nodeToward(Handle *dir)
{
if (front() == dir) {
@@ -1147,8 +1148,10 @@ Node *Node::nodeToward(Handle *dir)
g_error("Node::nodeToward(): handle is not a child of this node!");
}
-/** @brief Gets the handle that goes in the direction opposite to the given adjacent node.
- * Will abort with error if the given node is not adjacent. */
+/**
+ * Gets the handle that goes in the direction opposite to the given adjacent node.
+ * Will abort with error if the given node is not adjacent.
+ */
Handle *Node::handleAwayFrom(Node *to)
{
if (_next() == to) {
@@ -1160,8 +1163,10 @@ Handle *Node::handleAwayFrom(Node *to)
g_error("Node::handleAwayFrom(): second node is not adjacent!");
}
-/** @brief Gets the node in the direction opposite to the given handle.
- * Will abort with error if the handle doesn't belong to this node. */
+/**
+ * Gets the node in the direction opposite to the given handle.
+ * Will abort with error if the handle doesn't belong to this node.
+ */
Node *Node::nodeAwayFrom(Handle *h)
{
if (front() == h) {
@@ -1262,14 +1267,12 @@ SPCtrlShapeType Node::_node_type_to_shape(NodeType type)
/**
- * @class NodeList
- * @brief An editable list of nodes representing a subpath.
+ * An editable list of nodes representing a subpath.
*
* It can optionally be cyclic to represent a closed path.
* The list has iterators that act like plain node iterators, but can also be used
* to obtain shared pointers to nodes.
*/
-
NodeList::NodeList(SubpathList &splist)
: _list(splist)
, _closed(false)
@@ -1430,7 +1433,7 @@ NodeList &NodeList::get(iterator const &i) {
/**
* @class SubpathList
- * @brief Editable path composed of one or more subpaths
+ * Editable path composed of one or more subpaths.
*/
} // namespace UI
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index 1310219a1..4be8df397 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1,5 +1,6 @@
-/** @file
- * Path manipulator - implementation
+/**
+ * @file
+ * Path manipulator - implementation.
*/
/* Authors:
* Krzysztof Kosiński <tweenk.pl@gmail.com>
@@ -534,13 +535,15 @@ void PathManipulator::deleteNodes(bool keep_shape)
}
}
-/** @brief Delete nodes between the two iterators.
+/**
+ * Delete nodes between the two iterators.
* The given range can cross the beginning of the subpath in closed subpaths.
* @param start Beginning of the range to delete
* @param end End of the range
* @param keep_shape Whether to fit the handles at surrounding nodes to approximate
* the shape before deletion
- * @return Number of deleted nodes */
+ * @return Number of deleted nodes
+ */
unsigned PathManipulator::_deleteStretch(NodeList::iterator start, NodeList::iterator end, bool keep_shape)
{
unsigned const samples_per_segment = 10;