OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ProximClearConsoleCmd Class Reference

#include <ProximClearConsoleCmd.hh>

Inheritance diagram for ProximClearConsoleCmd:
Inheritance graph
Collaboration diagram for ProximClearConsoleCmd:
Collaboration graph

Public Member Functions

 ProximClearConsoleCmd ()
 
virtual ~ProximClearConsoleCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximClearConsoleCmdcreate () const
 
virtual std::string icon () const
 
virtual bool isEnabled ()
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Detailed Description

Command for clearing the console window in Proxim.

Definition at line 41 of file ProximClearConsoleCmd.hh.

Constructor & Destructor Documentation

◆ ProximClearConsoleCmd()

ProximClearConsoleCmd::ProximClearConsoleCmd ( )

The Constructor.

Definition at line 42 of file ProximClearConsoleCmd.cc.

42 :
43 GUICommand("Clear Console", NULL) {
44
45 }

Referenced by create().

◆ ~ProximClearConsoleCmd()

ProximClearConsoleCmd::~ProximClearConsoleCmd ( )
virtual

The Destructor.

Definition at line 50 of file ProximClearConsoleCmd.cc.

50 {
51}

Member Function Documentation

◆ create()

ProximClearConsoleCmd * ProximClearConsoleCmd::create ( ) const
virtual

Creates and returns a new isntance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 95 of file ProximClearConsoleCmd.cc.

95 {
96 return new ProximClearConsoleCmd();
97}

References ProximClearConsoleCmd().

Here is the call graph for this function:

◆ Do()

bool ProximClearConsoleCmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 58 of file ProximClearConsoleCmd.cc.

58 {
59 wxWindow* window = wxGetApp().GetTopWindow()->FindWindow(
61 assert(window != NULL);
62 ConsoleWindow* console = dynamic_cast<ConsoleWindow*>(window);
63 assert(console != NULL);
64 console->clear();
65 return true;
66}
#define assert(condition)

References assert, ConsoleWindow::clear(), and ProximConstants::ID_CONSOLE_WINDOW.

Here is the call graph for this function:

◆ icon()

std::string ProximClearConsoleCmd::icon ( ) const
virtual

Returns full path to the command icon file.

Returns
Full path to the command icon file.

Implements GUICommand.

Definition at line 75 of file ProximClearConsoleCmd.cc.

75 {
76 return "clear_console.png";
77}

◆ id()

int ProximClearConsoleCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 84 of file ProximClearConsoleCmd.cc.

References ProximConstants::COMMAND_CLEAR_CONSOLE.

◆ isEnabled()

bool ProximClearConsoleCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
True if the console window exists.

Implements GUICommand.

Definition at line 106 of file ProximClearConsoleCmd.cc.

106 {
107
108 wxWindow* window = wxGetApp().GetTopWindow()->FindWindow(
110
111 if (window == NULL) {
112 return false;
113 } else {
114 return true;
115 }
116}

References ProximConstants::ID_CONSOLE_WINDOW.


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