MD::ListItem

Search for usage in LXR

MD::ListItem< Trait > Class Template Referencefinal

#include <doc.h>

Inheritance diagram for MD::ListItem< Trait >:

Public Types

enum  ListType { Ordered , Unordered }
 
enum  OrderedListPreState { Start , Continue }
 
- Public Types inherited from MD::Block< Trait >
using Items = typename Trait::template Vector<ItemSharedPointer>
 
using ItemSharedPointer = std::shared_ptr<Item<Trait>>
 

Public Member Functions

 ListItem ()=default
 
 ~ListItem () override=default
 
std::shared_ptr< Item< Trait > > clone (Document< Trait > *doc=nullptr) const override
 
const WithPositiondelim () const
 
bool isChecked () const
 
bool isTaskList () const
 
ListType listType () const
 
OrderedListPreState orderedListPreState () const
 
void setChecked (bool on=true)
 
void setDelim (const WithPosition &d)
 
void setListType (ListType t)
 
void setOrderedListPreState (OrderedListPreState s)
 
void setStartNumber (int n)
 
void setTaskDelim (const WithPosition &d)
 
void setTaskList (bool on=true)
 
int startNumber () const
 
const WithPositiontaskDelim () const
 
ItemType type () const override
 
- Public Member Functions inherited from MD::Block< Trait >
 ~Block () override=default
 
void appendItem (ItemSharedPointer i)
 
void applyBlock (const Block< Trait > &other, Document< Trait > *doc=nullptr)
 
ItemSharedPointer getItemAt (long long int idx) const
 
void insertItem (long long int idx, ItemSharedPointer i)
 
bool isEmpty () const
 
const Itemsitems () const
 
void removeItemAt (long long int idx)
 
- Public Member Functions inherited from MD::Item< Trait >
 ~Item () override=default
 
- Public Member Functions inherited from MD::WithPosition
 WithPosition ()=default
 
 WithPosition (long long int startColumn, long long int startLine, long long int endColumn, long long int endLine)
 
virtual ~WithPosition ()=default
 
void applyPositions (const WithPosition &other)
 
long long int endColumn () const
 
long long int endLine () const
 
void setEndColumn (long long int c)
 
void setEndLine (long long int l)
 
void setStartColumn (long long int c)
 
void setStartLine (long long int l)
 
long long int startColumn () const
 
long long int startLine () const
 

Additional Inherited Members

- Protected Member Functions inherited from MD::Block< Trait >
 Block ()=default
 
- Protected Member Functions inherited from MD::Item< Trait >
 Item ()=default
 

Detailed Description

template<class Trait>
class MD::ListItem< Trait >

List item in a list.

Definition at line 885 of file doc.h.

Member Enumeration Documentation

◆ ListType

template<class Trait >
enum MD::ListItem::ListType

Type of the list.

Enumerator
Ordered 

Ordered.

Unordered 

Unordered.

Definition at line 914 of file doc.h.

◆ OrderedListPreState

template<class Trait >
enum MD::ListItem::OrderedListPreState

Preliminary state of the ordered list.

Enumerator
Start 

Start item.

Continue 

Continue of the list.

Definition at line 922 of file doc.h.

Constructor & Destructor Documentation

◆ ListItem()

template<class Trait >
MD::ListItem< Trait >::ListItem ( )
default

◆ ~ListItem()

template<class Trait >
MD::ListItem< Trait >::~ListItem ( )
overridedefault

Member Function Documentation

◆ clone()

template<class Trait >
std::shared_ptr< Item< Trait > > MD::ListItem< Trait >::clone ( Document< Trait > * doc = nullptr) const
inlineoverridevirtual

Clone this list item.

Implements MD::Item< Trait >.

Definition at line 892 of file doc.h.

◆ delim()

template<class Trait >
const WithPosition & MD::ListItem< Trait >::delim ( ) const
inline
Returns
Service character position.

Definition at line 990 of file doc.h.

◆ isChecked()

template<class Trait >
bool MD::ListItem< Trait >::isChecked ( ) const
inline
Returns
Is this task list item checked?

Definition at line 978 of file doc.h.

◆ isTaskList()

template<class Trait >
bool MD::ListItem< Trait >::isTaskList ( ) const
inline
Returns
Is this list item a task list item?

Definition at line 966 of file doc.h.

◆ listType()

template<class Trait >
ListType MD::ListItem< Trait >::listType ( ) const
inline
Returns
Type of the list.

Definition at line 930 of file doc.h.

◆ orderedListPreState()

template<class Trait >
OrderedListPreState MD::ListItem< Trait >::orderedListPreState ( ) const
inline
Returns
Preliminary state of the ordered list.

Definition at line 942 of file doc.h.

◆ setChecked()

template<class Trait >
void MD::ListItem< Trait >::setChecked ( bool on = true)
inline

Set this task list item to be checked.

Definition at line 984 of file doc.h.

◆ setDelim()

template<class Trait >
void MD::ListItem< Trait >::setDelim ( const WithPosition & d)
inline

Set service character position.

Definition at line 996 of file doc.h.

◆ setListType()

template<class Trait >
void MD::ListItem< Trait >::setListType ( ListType t)
inline

Set type of the list.

Definition at line 936 of file doc.h.

◆ setOrderedListPreState()

template<class Trait >
void MD::ListItem< Trait >::setOrderedListPreState ( OrderedListPreState s)
inline

Set preliminary state of the ordered list.

Definition at line 948 of file doc.h.

◆ setStartNumber()

template<class Trait >
void MD::ListItem< Trait >::setStartNumber ( int n)
inline

Set start number of the ordered list.

Definition at line 960 of file doc.h.

◆ setTaskDelim()

template<class Trait >
void MD::ListItem< Trait >::setTaskDelim ( const WithPosition & d)
inline

Set position of the task list "checkbox" in Markdown.

Definition at line 1008 of file doc.h.

◆ setTaskList()

template<class Trait >
void MD::ListItem< Trait >::setTaskList ( bool on = true)
inline

Set this list item to be a tsk list item.

Definition at line 972 of file doc.h.

◆ startNumber()

template<class Trait >
int MD::ListItem< Trait >::startNumber ( ) const
inline
Returns
Start number of the ordered list

Definition at line 954 of file doc.h.

◆ taskDelim()

template<class Trait >
const WithPosition & MD::ListItem< Trait >::taskDelim ( ) const
inline
Returns
Position of the task list "checkbox" in Markdown.

Definition at line 1002 of file doc.h.

◆ type()

template<class Trait >
ItemType MD::ListItem< Trait >::type ( ) const
inlineoverridevirtual
Returns
Type of the item.

Implements MD::Item< Trait >.

Definition at line 908 of file doc.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Nov 6 2024 12:12:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.