JX Application Framework
|
#include <JNamedTreeList.h>
Public Member Functions | |
JNamedTreeList (JTree *tree) | |
~JNamedTreeList () override | |
JNamedTreeNode * | GetNamedNode (const JIndex index) |
const JNamedTreeNode * | GetNamedNode (const JIndex index) const |
const JString & | GetNodeName (const JIndex index) const |
void | SetNodeName (const JIndex index, const JString &name) |
bool | Find (const JString &name, JIndex *index) const |
bool | ClosestMatch (const JString &prefixStr, JIndex *index) const |
![]() | |
JTreeList (JTree *tree) | |
~JTreeList () override | |
JTree * | GetTree () |
const JTree * | GetTree () const |
bool | IndexValid (const JIndex index) const |
JTreeNode * | GetNode (const JIndex index) |
const JTreeNode * | GetNode (const JIndex index) const |
bool | FindNode (const JTreeNode *node, JIndex *index) const |
bool | IsVisible (const JTreeNode *node) const |
void | MakeVisible (const JTreeNode *node) |
bool | IsOpen (const JIndex index) const |
bool | IsOpen (const JTreeNode *node) const |
bool | Open (const JIndex index) |
bool | Open (const JTreeNode *node) |
void | Close (const JIndex index) |
void | Close (const JTreeNode *node) |
void | Toggle (const JIndex index) |
void | Toggle (const JTreeNode *node) |
void | OpenSiblings (const JIndex index) |
void | OpenSiblings (const JTreeNode *node) |
void | CloseSiblings (const JIndex index) |
void | CloseSiblings (const JTreeNode *node) |
bool | OpenDescendants (const JIndex index, const JSize maxDepth) |
bool | OpenDescendants (const JTreeNode *node, const JSize maxDepth) |
void | CloseDescendants (const JIndex index) |
void | CloseDescendants (const JTreeNode *node) |
![]() | |
JContainer () | |
JContainer (const JContainer &source) | |
JContainer & | operator= (const JContainer &source) |
![]() | |
JCollection () | |
JCollection (const JCollection &source) | |
~JCollection () override | |
JCollection & | operator= (const JCollection &source) |
JSize | GetItemCount () const |
bool | IsEmpty () const |
bool | IndexValid (const JIndex index) const |
JIndex | GetIndexFromEnd (const JIndex index) const |
JString | ToString () const override |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
void | Receive (JBroadcaster *sender, const Message &message) override |
![]() | |
virtual bool | ShouldOpenSibling (const JTreeNode *node) |
virtual bool | ShouldOpenDescendant (const JTreeNode *node) |
void | Receive (JBroadcaster *sender, const Message &message) override |
![]() | |
void | InstallCollection (JCollection *list) |
const JCollection * | GetList () const |
![]() | |
void | ItemAdded () |
void | ItemRemoved () |
void | SetItemCount (const JSize newItemCount) |
![]() | |
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) |
Additional Inherited Members | |
![]() | |
static const JUtf8Byte * | kNodeInserted = "NodeInserted::JTreeList" |
static const JUtf8Byte * | kNodeRemoved = "NodeRemoved::JTreeList" |
static const JUtf8Byte * | kNodeChanged = "NodeChanged::JTreeList" |
static const JUtf8Byte * | kNodeOpened = "NodeOpened::JTreeList" |
static const JUtf8Byte * | kNodeClosed = "NodeClosed::JTreeList" |
Adds useful functions for JNamedTreeNodes.
JNamedTreeList::JNamedTreeList | ( | JTree * | tree | ) |
|
override |
Returns the index of the closest match for the given name prefix. Returns false if the list is empty.
Returns the index of the node with the given name. Returns false if the item does not exist or is not visible.
JNamedTreeNode * JNamedTreeList::GetNamedNode | ( | const JIndex | index | ) |
We assert if the dynamic_cast fails because all nodes are required to be JNamedTreeNodes.
const JNamedTreeNode * JNamedTreeList::GetNamedNode | ( | const JIndex | index | ) | const |
|
overrideprotectedvirtual |
Keep the number of items up to date.
Reimplemented from JContainer.