|
NXWidgets
1.19
|
#include <ctaskbar.hxx>

Classes | |
| struct | STaskbarSlot |
Public Member Functions | |
| CTaskbar (void) | |
| ~CTaskbar (void) | |
| bool | connect (void) |
| void | disconnect (void) |
| bool | initWindowManager (void) |
| bool | startWindowManager (void) |
| CApplicationWindow * | openApplicationWindow (uint8_t flags=0) |
| CFullScreenWindow * | openFullScreenWindow (void) |
| bool | startApplication (IApplication *app, bool minimized) |
| bool | topApplication (IApplication *app) |
| bool | maximizeApplication (IApplication *app) |
| bool | minimizeApplication (IApplication *app) |
| bool | stopApplication (IApplication *app) |
| void | getDisplaySize (FAR struct nxgl_size_s &size) |
| void | redraw () |
| void | clickIcon (int index, bool click) |
Public Member Functions inherited from NXWidgets::CNxServer | |
| CNxServer (void) | |
| ~CNxServer (void) | |
| NXHANDLE | getServer (void) |
| bool | connected (void) |
| bool | setBackgroundColor (nxgl_mxpixel_t color) |
| CNxWindow * | createRawWindow (CWidgetControl *widgetControl) |
| CNxTkWindow * | createFramedWindow (CWidgetControl *widgetControl) |
| CBgWindow * | getBgWindow (CWidgetControl *widgetControl) |
Protected Attributes | |
| NXWidgets::CNxWindow * | m_taskbar |
| NXWidgets::CNxWindow * | m_background |
| NXWidgets::CImage * | m_backImage |
| IApplication * | m_topApp |
| TNxArray< struct STaskbarSlot > | m_slots |
| bool | m_started |
This class describes the NX window manager's task bar. That task bar is, of course, used to dock active applications. But in NxWM, it is also the heart of the window manager: It inherits for CNxServer and, hence, represents the NX server itself. It also then serves as the NxWM window factory.
Why do it this way? The only reason is so that if you have an instance of CTaskbar, you have everything you need to manage new applications. It might have been a better decision to separate the window factory into a separate class instead of making the task bar of such central importance (and I may still do that someday)
Definition at line 85 of file ctaskbar.hxx.
| CTaskbar::CTaskbar | ( | void | ) |
| CTaskbar::~CTaskbar | ( | void | ) |
CTaskbar Destructor
Definition at line 83 of file ctaskbar.cxx.
| void CTaskbar::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.
| index. | Selects the icon in the start window |
| click. | True to click and false to release |
Definition at line 758 of file ctaskbar.cxx.
|
virtual |
Connect to the server
Reimplemented from NXWidgets::CNxServer.
Definition at line 95 of file ctaskbar.cxx.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Disconnect from the server
Disconnect from the server. This method restores the taskbar to the same state that it was in when it was constructed.
Reimplemented from NXWidgets::CNxServer.
Definition at line 118 of file ctaskbar.cxx.
| void CTaskbar::getDisplaySize | ( | FAR struct nxgl_size_s & | size | ) |
Get the size of the physical display device as it is known to the task bar.
Definition at line 733 of file ctaskbar.cxx.
|
protectedvirtual |
Handle a widget action event. For CImage, this is a mouse button pre-release event.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 1452 of file ctaskbar.cxx.
|
protected |
The application window is hidden (either it is minimized or it is maximized, but not at the top of the hierarchy)
| app. | The application to hide |
Definition at line 1415 of file ctaskbar.cxx.
| bool CTaskbar::initWindowManager | ( | void | ) |
Initialize task bar. Task bar initialization is separate from object instantiation so that failures can be reported. The window manager start-up sequence is:
CTaskbar::initWindowManager() prepares the task bar to receive applications. CTaskBar::startWindowManager() brings the window manager up with those applications in place.
Initialize task bar. Task bar initialization is separate from object instantiation so that failures can be reported. The window manager start-up sequence is:
CTaskbar::initWindowManager() prepares the task bar to receive applications. CTaskBar::startWindowManager() brings the window manager up with those applications in place.
Definition at line 206 of file ctaskbar.cxx.
| bool CTaskbar::maximizeApplication | ( | IApplication * | app | ) |
Maximize an application by moving its window to the top of the hierarchy and re-drawing it. If the application was already maximized, then this method is equivalent to topApplication().
| app. | The new application to add to the task bar |
Definition at line 620 of file ctaskbar.cxx.
| bool CTaskbar::minimizeApplication | ( | IApplication * | app | ) |
Minimize an application by moving its window to the bottom of the and redrawing the next visible appliation.
| app. | The new application to add to the task bar |
Definition at line 639 of file ctaskbar.cxx.
| CApplicationWindow * CTaskbar::openApplicationWindow | ( | uint8_t | flags = 0 | ) |
Create an normal application window. Creating a normal application in the start window requires three steps:
When the application is selected from the start window:
| flags. | CApplicationWindow flugs for window customization. |
Definition at line 365 of file ctaskbar.cxx.
|
protected |
Create a framed application window
This may be used to provide the window parater to the IApplication constructor
Definition at line 845 of file ctaskbar.cxx.
| CFullScreenWindow * CTaskbar::openFullScreenWindow | ( | void | ) |
Create a full screen application window. Creating a new full screen application requires three steps:
When the application is selected from the start window:
Definition at line 406 of file ctaskbar.cxx.
|
protected |
Create a raw window.
1) Create a dumb NXWidgets::CWidgetControl instance (See not). 2) Pass the dumb NXWidgets::CWindowMessenger instance to the window constructor that inherits from INxWindow. This will "smarten" the NXWidgets::CWidgetControl instance with some window knowlede 3) Call the open() method on the window to display the window. 4) After that, the fully smartened NXWidgets::CWidgetControl instance can be used to generate additional widgets by passing it to the widget constructor
NOTE: Actually, NxWM uses the CWindowMessenger class that inherits from CWidgetControl. That class just adds some unrelated messaging capability; It cohabitates with CWidgetControl only becuase it needs the CWidgetControl this point.
Create a raw window.
1) Create a dumb CWigetControl instance (see note below) 2) Pass the dumb CWidgetControl instance to the window constructor that inherits from INxWindow. This will "smarten" the CWidgetControl instance with some window knowlede 3) Call the open() method on the window to display the window. 4) After that, the fully smartened CWidgetControl instance can be used to generate additional widgets by passing it to the widget constructor
NOTE: Actually, NxWM uses the CWindowMessenger class that inherits from CWidgetControl. That class just adds some unrelated messaging capability; It cohabitates with CWidgetControl only becuase it needs the CWidgetControl this point.
Definition at line 808 of file ctaskbar.cxx.
|
protected |
Raise the top window to the top of the NXheirarchy.
Definition at line 1299 of file ctaskbar.cxx.
|
inline |
Force a redraw of the taskbar and current application. This should only be necessary if the display loses state due to e.g. powerdown or other manual intervention.
Definition at line 419 of file ctaskbar.hxx.
|
protected |
Redraw the last application in the list of application maintained by the task bar.
| app. | The new top application to draw |
Definition at line 1375 of file ctaskbar.cxx.
|
protectedvirtual |
(Re-)draw the background window.
Definition at line 1323 of file ctaskbar.cxx.
|
protectedvirtual |
|
protectedvirtual |
Redraw the window at the top of the heirarchy.
Definition at line 1255 of file ctaskbar.cxx.
|
protected |
Set size and position of a window in the application area.
| window. | The window to be resized and repositioned |
| fullscreen. | True: Use full screen |
Set size and position of a window in the application area.
| window. | The window to be resized and repositioned |
| fullscreen. | True: Use full screen |
Definition at line 882 of file ctaskbar.cxx.
| bool CTaskbar::startApplication | ( | IApplication * | app, |
| bool | minimized | ||
| ) |
Start an application and add its icon to the taskbar. The applications's window is brought to the top. Creating a new application in the start window requires three steps:
When the application is selected from the start window:
| app. | The new application to add to the task bar |
| minimized. | The new application starts in the minimized state |
Start an application and add its icon to the taskbar. The applications's window is brought to the top. Creating a new application in the start window requires three steps:
When the application is selected from the start window:
| app. | The new application to add to the task bar |
| minimized. | The new application starts in the minimized state |
Definition at line 450 of file ctaskbar.cxx.
| bool CTaskbar::startWindowManager | ( | void | ) |
Start the window manager and present the initial displays. The window manager start-up sequence is:
CTaskbar::initWindowManager() prepares the task bar to receive applications. CTaskBar::startWindowManager() brings the window manager up with those applications in place.
CTaskBar::startWindowManager() will present the task bar and the background image. The The initial taskbar will contain only the start window icon.
Start the window manager and present the initial displays. The window manager start-up sequence is:
CTaskbar::initWindowManager() prepares the task bar to receive applications. CTaskBar::startWindowManager() brings the window manager up with those applications in place.
startWindowManager will present the task bar and the background image. The initial taskbar will contain only the start window icon.
Definition at line 250 of file ctaskbar.cxx.
| bool CTaskbar::stopApplication | ( | IApplication * | app | ) |
Destroy an application. Move its window to the bottom and remove its icon from the task bar.
| app. | The new application to remove from the task bar |
Definition at line 667 of file ctaskbar.cxx.
| bool CTaskbar::topApplication | ( | IApplication * | app | ) |
Move window to the top of the hierarchy and re-draw it. This method does nothing if the application is minimized.
| app. | The new application to show |
Definition at line 586 of file ctaskbar.cxx.
|
protected |
The background window
Definition at line 104 of file ctaskbar.hxx.
|
protected |
The background image
Definition at line 105 of file ctaskbar.hxx.
|
protected |
List of application slots in the task bar
Definition at line 107 of file ctaskbar.hxx.
|
protected |
True if window manager has been started
Definition at line 108 of file ctaskbar.hxx.
|
protected |
Taskbar stateThe task bar window
Definition at line 103 of file ctaskbar.hxx.
|
protected |
The top application in the hierarchy
Definition at line 106 of file ctaskbar.hxx.
1.8.13