JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
JNamedTreeNode Class Reference

#include <JNamedTreeNode.h>

Inheritance diagram for JNamedTreeNode:
[legend]

Public Member Functions

 JNamedTreeNode (JTree *tree, const JString &name, const bool isOpenable=true)
 
 ~JNamedTreeNode () override
 
const JStringGetName () const
 
void SetName (const JString &name)
 
bool FindNamedChild (const JString &name, JNamedTreeNode **node)
 
bool FindNamedChild (const JString &name, const JNamedTreeNode **node) const
 
JNamedTreeNodeGetNamedParent ()
 
const JNamedTreeNodeGetNamedParent () const
 
bool GetNamedParent (JNamedTreeNode **parent)
 
bool GetNamedParent (const JNamedTreeNode **parent) const
 
JNamedTreeNodeGetNamedChild (const JIndex index)
 
const JNamedTreeNodeGetNamedChild (const JIndex index) const
 
- Public Member Functions inherited from JTreeNode
 JTreeNode (JTree *tree, const bool isOpenable=true)
 
 ~JTreeNode () override
 
bool IsRoot () const
 
JSize GetDepth () const
 
JTreeGetTree ()
 
const JTreeGetTree () const
 
bool HasTree () const
 
bool GetTree (JTree **tree)
 
bool GetTree (const JTree **tree) const
 
JTreeNodeGetParent ()
 
const JTreeNodeGetParent () const
 
bool HasParent () const
 
bool GetParent (JTreeNode **parent)
 
bool GetParent (const JTreeNode **parent) const
 
JIndex GetIndexInParent () const
 
bool GetIndexInParent (JIndex *index) const
 
void DisconnectFromParent ()
 
bool IsOpenable () const
 
virtual bool OKToOpen () const
 
bool HasChildren () const
 
JSize GetChildCount () const
 
JTreeNodeGetChild (const JIndex index)
 
const JTreeNodeGetChild (const JIndex index) const
 
JSize GetDescendantCount () const
 
void CollectDescendants (JPtrArray< JTreeNode > *list)
 
bool FindChild (const JTreeNode *child, JIndex *index) const
 
bool ChildIndexValid (const JIndex index) const
 
void InsertAtIndex (const JIndex index, JTreeNode *child)
 
void Prepend (JTreeNode *child)
 
void Append (JTreeNode *child)
 
void InsertBefore (const JTreeNode *before, JTreeNode *child)
 
void InsertAfter (const JTreeNode *after, JTreeNode *child)
 
void Remove (JTreeNode *child)
 
void DeleteAllChildren ()
 
void InsertSorted (JTreeNode *child)
 
bool GetChildCompareFunction (std::function< std::weak_ordering(JTreeNode *const &, JTreeNode *const &)> **compare, JListT::SortOrder *order)
 
void SetChildCompareFunction (const std::function< std::weak_ordering(JTreeNode *const &, JTreeNode *const &)> compare, const JListT::SortOrder order, const bool propagate)
 
void SortChildren (const bool propagate=false)
 
void MoveToIndex (JTreeNode *child, const JIndex index)
 
void MoveBefore (const JTreeNode *before, JTreeNode *child)
 
void MoveAfter (const JTreeNode *after, JTreeNode *child)
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (const JBroadcaster &source)
 
bool HasSenders () const
 
JSize GetSenderCount () const
 
bool HasRecipients () const
 
JSize GetRecipientCount () const
 
virtual JString ToString () const
 
template<class T >
void ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f)
 

Static Public Member Functions

static std::weak_ordering CompareNames (JNamedTreeNode *const &e1, JNamedTreeNode *const &e2)
 
static std::weak_ordering CompareNamesForIncrSearch (JNamedTreeNode *const &e1, JNamedTreeNode *const &e2)
 

Protected Member Functions

virtual void NameChanged ()
 
- Protected Member Functions inherited from JTreeNode
void ShouldBeOpenable (const bool openable)
 
void Receive (JBroadcaster *sender, const Message &message) override
 
- Protected Member Functions inherited from JBroadcaster
 JBroadcaster (const JBroadcaster &source)
 
void ListenTo (const JBroadcaster *sender)
 
void StopListening (const JBroadcaster *sender)
 
void ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember)
 
void StopListening (const JBroadcaster *sender, const std::type_info &messageType)
 
template<class T >
void Send (JBroadcaster *recipient, const T &message)
 
template<class T >
void Broadcast (const T &message)
 
void SendWithFeedback (JBroadcaster *recipient, Message *message)
 
void BroadcastWithFeedback (Message *message)
 
virtual void ReceiveWithFeedback (JBroadcaster *sender, Message *message)
 
virtual void ReceiveGoingAway (JBroadcaster *sender)
 

Static Protected Member Functions

static std::weak_ordering DynamicCastCompareNames (JTreeNode *const &e1, JTreeNode *const &e2)
 
static std::weak_ordering DynamicCastCompareNamesForIncrSearch (JTreeNode *const &e1, JTreeNode *const &e2)
 

Friends

class JNamedTreeList
 

Detailed Description

JTreeNode that includes a name.

Constructor & Destructor Documentation

◆ JNamedTreeNode()

JNamedTreeNode::JNamedTreeNode ( JTree tree,
const JString name,
const bool  isOpenable = true 
)

tree can be nullptr. By not providing a constructor that takes a parent, we allow tree to be nullptr, and we allow JNamedTreeList to keep a sorted list of nodes.

◆ ~JNamedTreeNode()

JNamedTreeNode::~JNamedTreeNode ( )
override

Member Function Documentation

◆ CompareNames()

std::weak_ordering JNamedTreeNode::CompareNames ( JNamedTreeNode *const &  e1,
JNamedTreeNode *const &  e2 
)
static

◆ CompareNamesForIncrSearch()

std::weak_ordering JNamedTreeNode::CompareNamesForIncrSearch ( JNamedTreeNode *const &  e1,
JNamedTreeNode *const &  e2 
)
static

◆ DynamicCastCompareNames()

std::weak_ordering JNamedTreeNode::DynamicCastCompareNames ( JTreeNode *const &  e1,
JTreeNode *const &  e2 
)
staticprotected

◆ DynamicCastCompareNamesForIncrSearch()

std::weak_ordering JNamedTreeNode::DynamicCastCompareNamesForIncrSearch ( JTreeNode *const &  e1,
JTreeNode *const &  e2 
)
staticprotected

◆ FindNamedChild() [1/2]

bool JNamedTreeNode::FindNamedChild ( const JString name,
const JNamedTreeNode **  node 
) const

◆ FindNamedChild() [2/2]

bool JNamedTreeNode::FindNamedChild ( const JString name,
JNamedTreeNode **  node 
)

◆ GetName()

const JString & JNamedTreeNode::GetName ( ) const
inline

◆ GetNamedChild() [1/2]

JNamedTreeNode * JNamedTreeNode::GetNamedChild ( const JIndex  index)

◆ GetNamedChild() [2/2]

const JNamedTreeNode * JNamedTreeNode::GetNamedChild ( const JIndex  index) const

◆ GetNamedParent() [1/4]

JNamedTreeNode * JNamedTreeNode::GetNamedParent ( )

◆ GetNamedParent() [2/4]

const JNamedTreeNode * JNamedTreeNode::GetNamedParent ( ) const

◆ GetNamedParent() [3/4]

bool JNamedTreeNode::GetNamedParent ( const JNamedTreeNode **  parent) const

◆ GetNamedParent() [4/4]

bool JNamedTreeNode::GetNamedParent ( JNamedTreeNode **  parent)

◆ NameChanged()

void JNamedTreeNode::NameChanged ( )
protectedvirtual

Derived classes can override this to update themselves. This provides a more efficient way than listening to itsTree (which may not exist!).

◆ SetName()

void JNamedTreeNode::SetName ( const JString name)

Friends And Related Symbol Documentation

◆ JNamedTreeList

friend class JNamedTreeList
friend

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