|
NXWidgets
1.19
|
#include <chexcalculator.hxx>

Classes | |
| struct | SPendingOperation |
Public Member Functions | |
| CHexCalculator (CTaskbar *taskbar, CApplicationWindow *window) | |
| ~CHexCalculator (void) | |
| IApplicationWindow * | getWindow (void) const |
| NXWidgets::IBitmap * | getIcon (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 Attributes | |
| CTaskbar * | m_taskbar |
| CApplicationWindow * | m_window |
| NXWidgets::CButtonArray * | m_keypad |
| NXWidgets::CLabel * | m_text |
| NXWidgets::CNxFont * | m_font |
| struct nxgl_size_s | m_windowSize |
| struct nxgl_size_s | m_keypadSize |
| struct nxgl_size_s | m_buttonSize |
| struct nxgl_size_s | m_textSize |
| struct nxgl_point_s | m_keypadPos |
| struct nxgl_point_s | m_textPos |
| int64_t | m_accum |
| int64_t | m_memory |
| struct SPendingOperation | m_low |
| struct SPendingOperation | m_high |
| bool | m_hexMode |
| bool | m_result |
Additional Inherited Members | |
Protected Attributes inherited from NxWM::IApplication | |
| bool | m_minimized |
| bool | m_topapp |
This class implements the NxTerm application.
Definition at line 76 of file chexcalculator.hxx.
| CHexCalculator::CHexCalculator | ( | CTaskbar * | taskbar, |
| CApplicationWindow * | window | ||
| ) |
CHexCalculator constructor
| window. | The application window |
| taskbar. | A pointer to the parent task bar instance |
| window. | The window to be used by this application. |
CHexCalculator constructor
| window. | The application window |
Definition at line 204 of file chexcalculator.cxx.
| CHexCalculator::~CHexCalculator | ( | void | ) |
CHexCalculator destructor
CHexCalculator destructor
| window. | The application window |
Definition at line 248 of file chexcalculator.cxx.
|
privatevirtual |
Called when the window minimize close is pressed.
Called when the window close button is pressed.
Implements NxWM::IApplicationCallback.
Definition at line 701 of file chexcalculator.cxx.
|
inlineprivate |
Create the calculator keypad. Only start as part of the applicaiton start method.
Create the calculator widgets. Only start as part of the applicaiton start method.
Definition at line 499 of file chexcalculator.cxx.
|
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 361 of file chexcalculator.cxx.
|
private |
Evaluate a binary operation.
| value1. | The first value |
| value2. | The second value |
Evaluate a binary operation. The result is left in m_accum.
| value1. | The first value |
| value2. | The second value |
Definition at line 626 of file chexcalculator.cxx.
|
virtual |
Get the icon associated with the application
Implements NxWM::IApplication.
Definition at line 291 of file chexcalculator.cxx.
|
virtual |
Get the name string associated with the application
Implements NxWM::IApplication.
Definition at line 305 of file chexcalculator.cxx.
|
virtual |
Each implementation of IApplication must provide a method to recover the contained CApplicationWindow instance.
Implements NxWM::IApplication.
Definition at line 278 of file chexcalculator.cxx.
|
privatevirtual |
Handle a widget action event. For CImage, this is a button pre- release event.
| e | The event data. |
Handle a widget action event. For CButtonArray, this is a button pre- release event.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 713 of file chexcalculator.cxx.
|
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 377 of file chexcalculator.cxx.
|
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.
Implements NxWM::IApplication.
Definition at line 423 of file chexcalculator.cxx.
|
private |
Applies labels to the keys.
Definition at line 574 of file chexcalculator.cxx.
|
privatevirtual |
Called when the window minimize button is pressed.
Implements NxWM::IApplicationCallback.
Definition at line 692 of file chexcalculator.cxx.
|
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 390 of file chexcalculator.cxx.
|
virtual |
Start the application (perhaps in the minimized state).
Implements NxWM::IApplication.
Definition at line 316 of file chexcalculator.cxx.
|
inlineprivate |
Select the geometry of the calculator given the current window size. Only called as part of construction.
Select the geometry of the calculator given the current window size.
Definition at line 432 of file chexcalculator.cxx.
|
virtual |
Stop the application.
Implements NxWM::IApplication.
Definition at line 342 of file chexcalculator.cxx.
|
private |
Show the current value of the accumulator.
Definition at line 670 of file chexcalculator.cxx.
|
private |
Calculator computational data. Note: Since we do not support parentheses and support only two levels of operator precedence, it is not necessary to maintain a stack of operations. Within there limitations, there can be at most only one pending low prececence operation and one pending high precedence operation. If you want to support parentheses or more levels of precedence, they you will have to extend the design.The current accumulated value
Definition at line 132 of file chexcalculator.hxx.
|
private |
The size of one calculator button
Definition at line 117 of file chexcalculator.hxx.
|
private |
The font used in the calculator
Definition at line 108 of file chexcalculator.hxx.
|
private |
True if in hex mode
Definition at line 136 of file chexcalculator.hxx.
|
private |
Hight precedence pending operation
Definition at line 135 of file chexcalculator.hxx.
|
private |
WidgetsThe calculator keyboard
Definition at line 106 of file chexcalculator.hxx.
|
private |
The position the calculator keypad
Definition at line 119 of file chexcalculator.hxx.
|
private |
The size the calculator keypad
Definition at line 116 of file chexcalculator.hxx.
|
private |
Low precedence pending operation
Definition at line 134 of file chexcalculator.hxx.
|
private |
The current value saved in memory
Definition at line 133 of file chexcalculator.hxx.
|
private |
True if the accumulator holds a previoius result
Definition at line 137 of file chexcalculator.hxx.
|
private |
Calculator state data. Cached constructor parameters.Reference to the "parent" taskbar
Definition at line 99 of file chexcalculator.hxx.
|
private |
The accumulator text display
Definition at line 107 of file chexcalculator.hxx.
|
private |
The position of the calculator textbox
Definition at line 120 of file chexcalculator.hxx.
|
private |
The size of the calculator textbox
Definition at line 118 of file chexcalculator.hxx.
|
private |
Reference to the application window
Definition at line 100 of file chexcalculator.hxx.
|
private |
Calculator geometry. This stuff does not really have to be retained in memory. If you are pinched for memory, get rid of these.The size of the calculator window
Definition at line 115 of file chexcalculator.hxx.
1.8.13