|
JX Application Framework
|
#include <JXMenuData.h>
Public Member Functions | |
| JXMenuData () | |
| ~JXMenuData () override | |
| bool | HasCheckboxes () const |
| bool | HasSubmenus () const |
| bool | IsEnabled (const JIndex index) const |
| JXMenu::ItemType | GetType (const JIndex index) const |
| bool | IsChecked (const JIndex index) const |
| bool | HasSubmenu (const JIndex index) const |
| bool | GetSubmenu (const JIndex index, JXMenu **menu) const |
| bool | ShortcutToIndex (const JUtf8Character &c, JIndex *index) const |
Public Member Functions inherited from JContainer | |
| JContainer () | |
| JContainer (const JContainer &source) | |
| JContainer & | operator= (const JContainer &source) |
Public Member Functions inherited from JCollection | |
| 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 |
Public Member Functions inherited from JBroadcaster | |
| 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 | InsertItem (const JIndex index, const JXMenu::ItemType type=JXMenu::kPlainType, const JString &shortcuts=JString::empty, const JString &id=JString::empty) |
| void | PrependItem (const JXMenu::ItemType type=JXMenu::kPlainType, const JString &shortcuts=JString::empty, const JString &id=JString::empty) |
| void | AppendItem (const JXMenu::ItemType type=JXMenu::kPlainType, const JString &shortcuts=JString::empty, const JString &id=JString::empty) |
| virtual void | DeleteItem (const JIndex index) |
| virtual void | DeleteAll () |
| bool | GetItemShortcuts (const JIndex index, const JString **shortcuts) const |
| void | SetItemShortcuts (const JIndex index, const JString &shortcuts) |
| virtual void | ItemShortcutsChanged (const JIndex index, const JString *shortcuts) |
| bool | GetItemID (const JIndex index, const JString **id) const |
| void | SetItemID (const JIndex index, const JString &id) |
| void | EnableItem (const JIndex index) |
| void | EnableAll () |
| void | DisableItem (const JIndex index) |
| void | DisableAll () |
| void | SetItemEnabled (const JIndex index, const bool enabled) |
| virtual void | PrepareToOpenMenu (const JXMenu::UpdateAction updateAction) |
Protected Member Functions inherited from JContainer | |
| void | InstallCollection (JCollection *list) |
| const JCollection * | GetList () const |
| void | Receive (JBroadcaster *sender, const Message &message) override |
Protected Member Functions inherited from JCollection | |
| void | ItemAdded () |
| void | ItemRemoved () |
| void | SetItemCount (const JSize newItemCount) |
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) |
Friends | |
| class | JXMenu |
Stores the item information that all menus need. Shortcuts can only be characters, because nothing else can be easily indicated. (and because it would be overkill)
| JXMenuData::JXMenuData | ( | ) |
|
override |
DeleteAll() must be called in the derived class dtor.
|
inlineprotected |
|
protectedvirtual |
Reimplemented in JXImageMenuData, and JXTextMenuData.
|
protectedvirtual |
Reimplemented in JXImageMenuData, and JXTextMenuData.
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
inline |
| bool JXMenuData::HasCheckboxes | ( | ) | const |
| bool JXMenuData::HasSubmenus | ( | ) | const |
|
protected |
|
protectedvirtual |
Derived classes can override this to update underlining, etc.
Note that shortcuts can be nullptr.
Reimplemented in JXTextMenuData.
|
protectedvirtual |
|
inlineprotected |
| bool JXMenuData::ShortcutToIndex | ( | const JUtf8Character & | c, |
| JIndex * | index | ||
| ) | const |
Returns true if the given character is a shortcut for one of our menu items.
|
friend |