Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::NodeList Class Reference

#include <node.h>

Inheritance diagram for Inkscape::UI::NodeList:
Inkscape::UI::ListNode

Public Types

using size_type = std::size_t
 
using reference = Node &
 
using const_reference = Node const &
 
using pointer = Node *
 
using const_pointer = Node const *
 
using value_type = Node
 
using iterator = NodeIterator< value_type >
 
using const_iterator = NodeIterator< value_type const >
 

Public Member Functions

 NodeList (SubpathList &_list)
 An editable list of nodes representing a subpath.
 
 ~NodeList ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool empty () const
 
size_type size () const
 
bool closed () const
 
bool degenerate () const
 A subpath is degenerate if it has no segments - either one node in an open path or no nodes in a closed path.
 
void setClosed (bool c)
 
iterator before (double t, double *fracpart=nullptr)
 
iterator before (Geom::PathTime const &pvp)
 
const_iterator before (double t, double *fracpart=nullptr) const
 
const_iterator before (Geom::PathTime const &pvp) const
 
iterator insert (iterator pos, Node *x)
 insert a node before pos.
 
template<class InputIterator >
void insert (iterator pos, InputIterator first, InputIterator last)
 
void splice (iterator pos, NodeList &list)
 
void splice (iterator pos, NodeList &list, iterator i)
 
void splice (iterator pos, NodeList &list, iterator first, iterator last)
 
void reverse ()
 
void shift (int n)
 
void push_front (Node *x)
 
void pop_front ()
 
void push_back (Node *x)
 
void pop_back ()
 
void clear ()
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
Nodefront ()
 
Nodeback ()
 
void kill ()
 
SubpathList const & subpathList () const
 
SubpathListsubpathList ()
 

Static Public Member Functions

static iterator get_iterator (Node *n)
 
static const_iterator get_iterator (Node const *n)
 
static NodeListget (Node *n)
 
static NodeListget (iterator const &i)
 

Private Attributes

SubpathList_list
 
bool _closed = false
 
- Private Attributes inherited from Inkscape::UI::ListNode
ListNodeln_next
 
ListNodeln_prev
 
NodeListln_list
 

Friends

class Node
 
class Handle
 
class NodeIterator< Node >
 
class NodeIterator< Node const >
 

Detailed Description

Definition at line 332 of file node.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 344 of file node.h.

◆ const_pointer

Definition at line 341 of file node.h.

◆ const_reference

Definition at line 339 of file node.h.

◆ iterator

Definition at line 343 of file node.h.

◆ pointer

Definition at line 340 of file node.h.

◆ reference

Definition at line 338 of file node.h.

◆ size_type

using Inkscape::UI::NodeList::size_type = std::size_t

Definition at line 337 of file node.h.

◆ value_type

Definition at line 342 of file node.h.

Constructor & Destructor Documentation

◆ NodeList()

Inkscape::UI::NodeList::NodeList ( SubpathList _list)

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.

Definition at line 1736 of file node.cpp.

References Inkscape::UI::ListNode::ln_list, Inkscape::UI::ListNode::ln_next, and Inkscape::UI::ListNode::ln_prev.

◆ ~NodeList()

Inkscape::UI::NodeList::~NodeList ( )

Definition at line 1744 of file node.cpp.

References clear().

Member Function Documentation

◆ back()

Node & Inkscape::UI::NodeList::back ( )
inline

Definition at line 414 of file node.h.

References Inkscape::UI::ListNode::ln_prev.

◆ before() [1/4]

NodeList::iterator Inkscape::UI::NodeList::before ( double  t,
double *  fracpart = nullptr 
)

Definition at line 1767 of file node.cpp.

References begin(), and index.

Referenced by before(), and before().

◆ before() [2/4]

const_iterator Inkscape::UI::NodeList::before ( double  t,
double *  fracpart = nullptr 
) const
inline

Definition at line 379 of file node.h.

References Inkscape::UI::NodeIterator< N >::_node, and before().

◆ before() [3/4]

NodeList::iterator Inkscape::UI::NodeList::before ( Geom::PathTime const &  pvp)

Definition at line 1778 of file node.cpp.

References begin(), and Geom::PathTime::curve_index.

◆ before() [4/4]

const_iterator Inkscape::UI::NodeList::before ( Geom::PathTime const &  pvp) const
inline

Definition at line 382 of file node.h.

References Inkscape::UI::NodeIterator< N >::_node, and before().

◆ begin() [1/2]

iterator Inkscape::UI::NodeList::begin ( )
inline

Definition at line 358 of file node.h.

References Inkscape::UI::ListNode::ln_next.

Referenced by before(), before(), clear(), degenerate(), pop_front(), push_front(), and splice().

◆ begin() [2/2]

const_iterator Inkscape::UI::NodeList::begin ( ) const
inline

Definition at line 360 of file node.h.

References Inkscape::UI::ListNode::ln_next.

◆ clear()

void Inkscape::UI::NodeList::clear ( )

Definition at line 1857 of file node.cpp.

References Inkscape::UI::SelectableControlPoint::_selection, begin(), end(), erase(), and node.

Referenced by ~NodeList().

◆ closed()

bool Inkscape::UI::NodeList::closed ( ) const
inline

Definition at line 368 of file node.h.

References _closed.

Referenced by Inkscape::UI::PathManipulator::_nodeClicked(), and degenerate().

◆ degenerate()

bool Inkscape::UI::NodeList::degenerate ( ) const

A subpath is degenerate if it has no segments - either one node in an open path or no nodes in a closed path.

Definition at line 1762 of file node.cpp.

References begin(), closed(), empty(), and end().

◆ empty()

bool Inkscape::UI::NodeList::empty ( ) const

Definition at line 1749 of file node.cpp.

References Inkscape::UI::ListNode::ln_next.

Referenced by degenerate().

◆ end() [1/2]

◆ end() [2/2]

const_iterator Inkscape::UI::NodeList::end ( ) const
inline

Definition at line 361 of file node.h.

◆ erase() [1/2]

iterator Inkscape::UI::NodeList::erase ( iterator  first,
iterator  last 
)
inline

Definition at line 406 of file node.h.

References erase().

◆ erase() [2/2]

◆ front()

Node & Inkscape::UI::NodeList::front ( )
inline

Definition at line 413 of file node.h.

References Inkscape::UI::ListNode::ln_next.

◆ get() [1/2]

NodeList & Inkscape::UI::NodeList::get ( iterator const &  i)
static

◆ get() [2/2]

◆ get_iterator() [1/2]

◆ get_iterator() [2/2]

static const_iterator Inkscape::UI::NodeList::get_iterator ( Node const *  n)
inlinestatic

Definition at line 423 of file node.h.

◆ insert() [1/2]

template<class InputIterator >
void Inkscape::UI::NodeList::insert ( iterator  pos,
InputIterator  first,
InputIterator  last 
)
inline

Definition at line 392 of file node.h.

References insert().

◆ insert() [2/2]

◆ kill()

void Inkscape::UI::NodeList::kill ( )

◆ pop_back()

void Inkscape::UI::NodeList::pop_back ( )
inline

Definition at line 403 of file node.h.

References end(), and erase().

◆ pop_front()

void Inkscape::UI::NodeList::pop_front ( )
inline

Definition at line 401 of file node.h.

References begin(), and erase().

◆ push_back()

void Inkscape::UI::NodeList::push_back ( Node x)
inline

Definition at line 402 of file node.h.

References end(), and insert().

◆ push_front()

void Inkscape::UI::NodeList::push_front ( Node x)
inline

Definition at line 400 of file node.h.

References begin(), and insert().

◆ reverse()

void Inkscape::UI::NodeList::reverse ( )

◆ setClosed()

void Inkscape::UI::NodeList::setClosed ( bool  c)
inline

◆ shift()

void Inkscape::UI::NodeList::shift ( int  n)

Definition at line 1824 of file node.cpp.

References Inkscape::UI::ListNode::ln_next, and Inkscape::UI::ListNode::ln_prev.

◆ size()

NodeList::size_type Inkscape::UI::NodeList::size ( ) const

Definition at line 1754 of file node.cpp.

References Inkscape::UI::ListNode::ln_next.

Referenced by Inkscape::UI::PathManipulator::_nodeClicked().

◆ splice() [1/3]

void Inkscape::UI::NodeList::splice ( iterator  pos,
NodeList list 
)

◆ splice() [2/3]

void Inkscape::UI::NodeList::splice ( iterator  pos,
NodeList list,
iterator  first,
iterator  last 
)

◆ splice() [3/3]

void Inkscape::UI::NodeList::splice ( iterator  pos,
NodeList list,
iterator  i 
)

Definition at line 1801 of file node.cpp.

References splice().

◆ subpathList() [1/2]

SubpathList & Inkscape::UI::NodeList::subpathList ( )
inline

Definition at line 420 of file node.h.

References _list.

◆ subpathList() [2/2]

SubpathList const & Inkscape::UI::NodeList::subpathList ( ) const
inline

Definition at line 419 of file node.h.

References _list.

Referenced by Inkscape::UI::Node::_pm(), and Inkscape::UI::Node::_pm().

Friends And Related Symbol Documentation

◆ Handle

friend class Handle
friend

Definition at line 432 of file node.h.

◆ Node

friend class Node
friend

Definition at line 431 of file node.h.

◆ NodeIterator< Node >

friend class NodeIterator< Node >
friend

Definition at line 432 of file node.h.

◆ NodeIterator< Node const >

friend class NodeIterator< Node const >
friend

Definition at line 432 of file node.h.

Member Data Documentation

◆ _closed

bool Inkscape::UI::NodeList::_closed = false
private

Definition at line 429 of file node.h.

Referenced by closed(), and setClosed().

◆ _list

SubpathList& Inkscape::UI::NodeList::_list
private

Definition at line 428 of file node.h.

Referenced by kill(), subpathList(), and subpathList().


The documentation for this class was generated from the following files: