TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
ContextMenuScreenController Class Referencefinal

Context menu screen controller. More...

#include <tdme/tools/editor/controllers/ContextMenuScreenController.h>

Inheritance diagram for ContextMenuScreenController:
Inheritance graph
Collaboration diagram for ContextMenuScreenController:
Collaboration graph

Public Member Functions

 ContextMenuScreenController ()
 Public constructor. More...
 
virtual ~ContextMenuScreenController ()
 Destructor. More...
 
void clear ()
 Clear. More...
 
void addMenuItem (const string &text, const string &id, Action *action=nullptr)
 Add menu item. More...
 
void addMenuSeparator ()
 Add menu separator. More...
 
GUIScreenNodegetScreenNode () override
 
void initialize () override
 Init. More...
 
void dispose () override
 Dispose. More...
 
void onActionPerformed (GUIActionListenerType type, GUIElementNode *node) override
 
void onFocus (GUIElementNode *node) override
 On focus. More...
 
void onUnfocus (GUIElementNode *node) override
 On unfocus. More...
 
void show (int mouseX, int mouseY)
 Shows the pop up. More...
 
void close ()
 Closes the pop up. More...
 
- Public Member Functions inherited from ScreenController
virtual ~ScreenController ()
 Destructor. More...
 
virtual GUIScreenNodegetScreenNode ()=0
 
virtual void initialize ()=0
 Init. More...
 
virtual void dispose ()=0
 Dispose. More...
 
- Public Member Functions inherited from GUIActionListener
virtual ~GUIActionListener ()
 Destructor. More...
 
virtual void onActionPerformed (GUIActionListenerType type, GUIElementNode *node)=0
 On action performed. More...
 
- Public Member Functions inherited from GUIFocusListener
virtual ~GUIFocusListener ()
 Destructor. More...
 
virtual void onFocus (GUIElementNode *node)=0
 On focus. More...
 
virtual void onUnfocus (GUIElementNode *node)=0
 On unfocus. More...
 

Private Attributes

GUIScreenNodescreenNode { nullptr }
 
GUIElementNodecontextMenuNode { nullptr }
 
unordered_map< string, Action * > actions
 

Detailed Description

Context menu screen controller.

Author
Andreas Drewke
Version
$Id$

Definition at line 30 of file ContextMenuScreenController.h.

Constructor & Destructor Documentation

◆ ContextMenuScreenController()

Public constructor.

Definition at line 47 of file ContextMenuScreenController.cpp.

◆ ~ContextMenuScreenController()

Destructor.

Definition at line 51 of file ContextMenuScreenController.cpp.

Member Function Documentation

◆ addMenuItem()

void addMenuItem ( const string &  text,
const string &  id,
Action action = nullptr 
)

Add menu item.

Parameters
texttext
idid
actionaction

Definition at line 122 of file ContextMenuScreenController.cpp.

◆ addMenuSeparator()

void addMenuSeparator ( )

Add menu separator.

Definition at line 132 of file ContextMenuScreenController.cpp.

◆ clear()

void clear ( )

Clear.

Definition at line 116 of file ContextMenuScreenController.cpp.

◆ close()

void close ( )

Closes the pop up.

Definition at line 96 of file ContextMenuScreenController.cpp.

◆ dispose()

void dispose ( )
overridevirtual

Dispose.

Implements ScreenController.

Definition at line 77 of file ContextMenuScreenController.cpp.

◆ getScreenNode()

GUIScreenNode * getScreenNode ( )
overridevirtual
Returns
screen node

Implements ScreenController.

Definition at line 58 of file ContextMenuScreenController.cpp.

◆ initialize()

void initialize ( )
overridevirtual

Init.

Implements ScreenController.

Definition at line 63 of file ContextMenuScreenController.cpp.

◆ onActionPerformed()

void onActionPerformed ( GUIActionListenerType  type,
GUIElementNode node 
)
override

Definition at line 101 of file ContextMenuScreenController.cpp.

◆ onFocus()

void onFocus ( GUIElementNode node)
overridevirtual

On focus.

Parameters
nodenode

Implements GUIFocusListener.

Definition at line 110 of file ContextMenuScreenController.cpp.

◆ onUnfocus()

void onUnfocus ( GUIElementNode node)
overridevirtual

On unfocus.

Parameters
nodenode

Implements GUIFocusListener.

Definition at line 113 of file ContextMenuScreenController.cpp.

◆ show()

void show ( int  mouseX,
int  mouseY 
)

Shows the pop up.

Parameters
mouseXmouse X
mouseYmouse Y

Definition at line 81 of file ContextMenuScreenController.cpp.

Member Data Documentation

◆ actions

unordered_map<string, Action*> actions
private

Definition at line 39 of file ContextMenuScreenController.h.

◆ contextMenuNode

GUIElementNode* contextMenuNode { nullptr }
private

Definition at line 38 of file ContextMenuScreenController.h.

◆ screenNode

GUIScreenNode* screenNode { nullptr }
private

Definition at line 37 of file ContextMenuScreenController.h.


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