NXWidgets  1.19
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
NxWM::CNxTerm Class Reference

#include <cnxterm.hxx>

Inheritance diagram for NxWM::CNxTerm:
Inheritance graph

Public Member Functions

 CNxTerm (CTaskbar *taskbar, CApplicationWindow *window)
 
 ~CNxTerm (void)
 
IApplicationWindowgetWindow (void) const
 
NXWidgets::IBitmapgetIcon (void)
 
NXWidgets::CNxString getName (void)
 
bool run (void)
 
void stop (void)
 
void destroy (void)
 
void hide (void)
 
void redraw (void)
 
bool isFullScreen (void) const
 
- Public Member Functions inherited from NxWM::IApplication
virtual ~IApplication (void)
 
void setMinimized (bool minimized)
 
void setTopApplication (bool topapp)
 
bool isMinimized (void) const
 
bool isTopApplication (void) const
 

Private Member Functions

void minimize (void)
 
void close (void)
 

Static Private Member Functions

static int nxterm (int argc, char *argv[])
 
static void exitHandler (int code, FAR void *arg)
 

Private Attributes

CTaskbarm_taskbar
 
CApplicationWindowm_window
 
NXTERM m_nxterm
 
pid_t m_pid
 

Additional Inherited Members

- Protected Attributes inherited from NxWM::IApplication
bool m_minimized
 
bool m_topapp
 

Detailed Description

This class implements the NxTerm application.

Definition at line 78 of file cnxterm.hxx.

Constructor & Destructor Documentation

◆ CNxTerm()

CNxTerm::CNxTerm ( CTaskbar taskbar,
CApplicationWindow window 
)

CNxTerm constructor

Parameters
window.The application window
taskbar.A pointer to the parent task bar instance
window.The window to be used by this application.

CNxTerm constructor

Parameters
window.The application window

Definition at line 129 of file cnxterm.cxx.

◆ ~CNxTerm()

CNxTerm::~CNxTerm ( void  )

CNxTerm destructor

CNxTerm destructor

Parameters
window.The application window

Definition at line 157 of file cnxterm.cxx.

Member Function Documentation

◆ close()

void CNxTerm::close ( void  )
privatevirtual

Called when the window close button is pressed.

Implements NxWM::IApplicationCallback.

Definition at line 575 of file cnxterm.cxx.

◆ destroy()

void CNxTerm::destroy ( void  )
virtual

Destroy the application and free all of its resources. This method will initiate blocking of messages from the NX server. The server will flush the window message queue and reply with the blocked message. When the block message is received by CWindowMessenger, it will send the destroy message to the start window task which will, finally, safely delete the application.

Implements NxWM::IApplication.

Definition at line 364 of file cnxterm.cxx.

◆ exitHandler()

void CNxTerm::exitHandler ( int  code,
FAR void *  arg 
)
staticprivate

This is the NxTerm task exit handler. It is registered with on_exit() and called automatically when the nxterm task exits.

This is the NxTerm task exit handler. It registered with on_exit() and called automatically when the nxterm task exits.

Definition at line 540 of file cnxterm.cxx.

◆ getIcon()

NXWidgets::IBitmap * CNxTerm::getIcon ( void  )
virtual

Get the icon associated with the application

Returns
An instance if IBitmap that may be used to rend the application's icon. This is an new IBitmap instance that must be deleted by the caller when it is no long needed.

Implements NxWM::IApplication.

Definition at line 188 of file cnxterm.cxx.

◆ getName()

NXWidgets::CNxString CNxTerm::getName ( void  )
virtual

Get the name string associated with the application

Returns
A copy if CNxString that contains the name of the application.

Implements NxWM::IApplication.

Definition at line 202 of file cnxterm.cxx.

◆ getWindow()

IApplicationWindow * CNxTerm::getWindow ( void  ) const
virtual

Each implementation of IApplication must provide a method to recover the contained CApplicationWindow instance.

Implements NxWM::IApplication.

Definition at line 175 of file cnxterm.cxx.

◆ hide()

void CNxTerm::hide ( void  )
virtual

The application window is hidden (either it is minimized or it is maximized, but not at the top of the hierarchy

Implements NxWM::IApplication.

Definition at line 380 of file cnxterm.cxx.

◆ isFullScreen()

bool CNxTerm::isFullScreen ( void  ) const
virtual

Report of this is a "normal" window or a full screen window. The primary purpose of this method is so that window manager will know whether or not it show draw the task bar.

Returns
True if this is a full screen window.

Implements NxWM::IApplication.

Definition at line 421 of file cnxterm.cxx.

◆ minimize()

void CNxTerm::minimize ( void  )
privatevirtual

Called when the window minimize button is pressed.

Implements NxWM::IApplicationCallback.

Definition at line 566 of file cnxterm.cxx.

◆ nxterm()

int CNxTerm::nxterm ( int  argc,
char *  argv[] 
)
staticprivate

This is the NxTerm task. This function first redirects output to the console window then calls to start the NSH logic.

Definition at line 431 of file cnxterm.cxx.

◆ redraw()

void CNxTerm::redraw ( void  )
virtual

Redraw the entire window. The application has been maximized or otherwise moved to the top of the hierarchy. This method is call from CTaskbar when the application window must be displayed

Implements NxWM::IApplication.

Definition at line 391 of file cnxterm.cxx.

◆ run()

bool CNxTerm::run ( void  )
virtual

Start the application (perhaps in the minimized state).

Returns
True if the application was successfully started.

Implements NxWM::IApplication.

Definition at line 213 of file cnxterm.cxx.

◆ stop()

void CNxTerm::stop ( void  )
virtual

Stop the application.

Implements NxWM::IApplication.

Definition at line 316 of file cnxterm.cxx.

Member Data Documentation

◆ m_nxterm

NXTERM NxWM::CNxTerm::m_nxterm
private

NxTerm handle

Definition at line 83 of file cnxterm.hxx.

◆ m_pid

pid_t NxWM::CNxTerm::m_pid
private

Task ID of the NxTerm thread

Definition at line 84 of file cnxterm.hxx.

◆ m_taskbar

CTaskbar* NxWM::CNxTerm::m_taskbar
private

Reference to the "parent" taskbar

Definition at line 81 of file cnxterm.hxx.

◆ m_window

CApplicationWindow* NxWM::CNxTerm::m_window
private

Reference to the application window

Definition at line 82 of file cnxterm.hxx.


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