NXWidgets  1.19
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
NxWM::CStartWindow Class Reference

#include <cstartwindow.hxx>

Inheritance diagram for NxWM::CStartWindow:
Inheritance graph

Classes

struct  SStartWindowSlot
 

Public Member Functions

 CStartWindow (CTaskbar *taskbar, CApplicationWindow *window)
 
 ~CStartWindow (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
 
bool addApplication (IApplicationFactory *app)
 
void clickIcon (int index, bool click)
 
- 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
 

Protected Member Functions

void minimize (void)
 
void close (void)
 
void getIconBounds (void)
 
void removeAllApplications (void)
 
void handleActionEvent (const NXWidgets::CWidgetEventArgs &e)
 
- Protected Member Functions inherited from NXWidgets::CWidgetEventHandler
 CWidgetEventHandler ()
 
virtual ~CWidgetEventHandler ()
 
virtual void handleClickEvent (const CWidgetEventArgs &e)
 
virtual void handleDragEvent (const CWidgetEventArgs &e)
 
virtual void handleDropEvent (const CWidgetEventArgs &e)
 
virtual void handleReleaseEvent (const CWidgetEventArgs &e)
 
virtual void handleReleaseOutsideEvent (const CWidgetEventArgs &e)
 
virtual void handleKeyPressEvent (const CWidgetEventArgs &e)
 
virtual void handleCursorControlEvent (const CWidgetEventArgs &e)
 
virtual void handleFocusEvent (const CWidgetEventArgs &e)
 
virtual void handleBlurEvent (const CWidgetEventArgs &e)
 
virtual void handleCloseEvent (const CWidgetEventArgs &e)
 
virtual void handleHideEvent (const CWidgetEventArgs &e)
 
virtual void handleShowEvent (const CWidgetEventArgs &e)
 
virtual void handleEnableEvent (const CWidgetEventArgs &e)
 
virtual void handleDisableEvent (const CWidgetEventArgs &e)
 
virtual void handleValueChangeEvent (const CWidgetEventArgs &e)
 
virtual void handleResizeEvent (const CWidgetEventArgs &e)
 
virtual void handleMoveEvent (const CWidgetEventArgs &e)
 
virtual void handleScrollEvent (const CWidgetEventArgs &e)
 
virtual void handleDoubleClickEvent (const CWidgetEventArgs &e)
 

Static Protected Member Functions

static int startWindow (int argc, char *argv[])
 

Protected Attributes

CTaskbarm_taskbar
 
CApplicationWindowm_window
 
TNxArray< struct SStartWindowSlotm_slots
 
struct nxgl_size_s m_iconSize
 
- Protected Attributes inherited from NxWM::IApplication
bool m_minimized
 
bool m_topapp
 

Detailed Description

This class is the the start window application.

Definition at line 99 of file cstartwindow.hxx.

Constructor & Destructor Documentation

◆ CStartWindow()

CStartWindow::CStartWindow ( CTaskbar taskbar,
CApplicationWindow window 
)

CStartWindow Constructor

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

Definition at line 83 of file cstartwindow.cxx.

◆ ~CStartWindow()

CStartWindow::~CStartWindow ( void  )

CStartWindow Constructor

Definition at line 104 of file cstartwindow.cxx.

Member Function Documentation

◆ addApplication()

bool CStartWindow::addApplication ( IApplicationFactory app)

Add the application to the start window. The general sequence for setting up the start window is:

  1. Call IAppicationFactory::create to a new instance of the application
  2. Call CStartWindow::addApplication to add the application to the start window.
Parameters
app.The new application to add to the start window
Returns
true on success

Add the application to the start window. The general sequence is:

  1. Call IAppicationFactory::create to a new instance of the application
  2. Call CStartWindow::addApplication to add the application to the start window.
Parameters
app.The new application to add to the start window
Returns
true on success

Definition at line 345 of file cstartwindow.cxx.

◆ clickIcon()

void CStartWindow::clickIcon ( int  index,
bool  click 
)

Simulate a mouse click or release on the icon at index. This method is only available during automated testing of NxWM.

Parameters
index.Selects the icon in the start window
click.True to click and false to release

Definition at line 401 of file cstartwindow.cxx.

◆ close()

void CStartWindow::close ( void  )
protectedvirtual

Called when the window close button is pressed.

Called when the window minimize close is pressed.

Implements NxWM::IApplicationCallback.

Definition at line 446 of file cstartwindow.cxx.

◆ destroy()

void CStartWindow::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 186 of file cstartwindow.cxx.

◆ getIcon()

NXWidgets::IBitmap * CStartWindow::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 139 of file cstartwindow.cxx.

◆ getIconBounds()

void CStartWindow::getIconBounds ( void  )
protected

Calculate the icon bounding box

Definition at line 455 of file cstartwindow.cxx.

◆ getName()

NXWidgets::CNxString CStartWindow::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 153 of file cstartwindow.cxx.

◆ getWindow()

IApplicationWindow * CStartWindow::getWindow ( void  ) const
virtual

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

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

Implements NxWM::IApplication.

Definition at line 126 of file cstartwindow.cxx.

◆ handleActionEvent()

void CStartWindow::handleActionEvent ( const NXWidgets::CWidgetEventArgs e)
protectedvirtual

Handle a widget action event. For CButtonArray, this is a mouse button pre-release event.

Parameters
eThe event data.

Handle a widget action event. For CImage, this is a mouse button pre-release event.

Parameters
eThe event data.

Reimplemented from NXWidgets::CWidgetEventHandler.

Definition at line 526 of file cstartwindow.cxx.

◆ hide()

void CStartWindow::hide ( void  )
virtual

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

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 205 of file cstartwindow.cxx.

◆ isFullScreen()

bool CStartWindow::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 329 of file cstartwindow.cxx.

◆ minimize()

void CStartWindow::minimize ( void  )
protectedvirtual

Called when the window minimize button is pressed.

Implements NxWM::IApplicationCallback.

Definition at line 437 of file cstartwindow.cxx.

◆ redraw()

void CStartWindow::redraw ( void  )
virtual

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

Redraw the entire window. The application has been maximized or otherwise moved to the top of the hiearchy

Implements NxWM::IApplication.

Definition at line 222 of file cstartwindow.cxx.

◆ removeAllApplications()

void CStartWindow::removeAllApplications ( void  )
protected

Stop all applications

Definition at line 497 of file cstartwindow.cxx.

◆ run()

bool CStartWindow::run ( void  )
virtual

Start the application.

Returns
True if the application was successfully started.

Implements NxWM::IApplication.

Definition at line 164 of file cstartwindow.cxx.

◆ startWindow()

static int NxWM::CStartWindow::startWindow ( int  argc,
char *  argv[] 
)
staticprotected

This is the start window task. This function receives window events from the NX listener threads indirectly through this sequence:

  1. The NX listener thread receives a windows event. The NX listener thread which is part of CTaskBar and was created when NX server connection was established). This event may be a positional change notification, a redraw request, or mouse or keyboard input.
  2. The NX listener thread handles the message by calling nx_eventhandler(). nx_eventhandler() dispatches the message by calling a method in the NXWidgets::CCallback instance associated with the window. NXWidgets::CCallback is a part of the CWidgetControl.
  3. NXWidgets::CCallback calls into NXWidgets::CWidgetControl to process the event.
  4. NXWidgets::CWidgetControl records the new state data and raises a window event.
  5. NXWidgets::CWindowEventHandlerList will give the event to NxWM::CWindowMessenger.
  6. NxWM::CWindowMessenger will send the a message on a well-known message queue.
  7. This CStartWindow::startWindow task will receive and process that message.

◆ stop()

void CStartWindow::stop ( void  )
virtual

Stop the application.

Implements NxWM::IApplication.

Definition at line 173 of file cstartwindow.cxx.

Member Data Documentation

◆ m_iconSize

struct nxgl_size_s NxWM::CStartWindow::m_iconSize
protected

A box big enough to hold the largest icon

Definition at line 121 of file cstartwindow.hxx.

◆ m_slots

TNxArray<struct SStartWindowSlot> NxWM::CStartWindow::m_slots
protected

List of apps in the start window

Definition at line 120 of file cstartwindow.hxx.

◆ m_taskbar

CTaskbar* NxWM::CStartWindow::m_taskbar
protected

CStartWindow state dataReference to the "parent" taskbar

Definition at line 118 of file cstartwindow.hxx.

◆ m_window

CApplicationWindow* NxWM::CStartWindow::m_window
protected

Reference to the application window

Definition at line 119 of file cstartwindow.hxx.


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