|
NXWidgets
1.19
|
#include <cbgwindow.hxx>

Public Member Functions | |
| CBgWindow (NXHANDLE hNxServer, CWidgetControl *widgetControl) | |
| virtual | ~CBgWindow (void) |
| bool | open (void) |
| CWidgetControl * | getWidgetControl (void) const |
| bool | requestPosition (void) |
| bool | getPosition (FAR struct nxgl_point_s *pPos) |
| bool | getSize (FAR struct nxgl_size_s *pSize) |
| bool | setPosition (FAR const struct nxgl_point_s *pPos) |
| bool | setSize (FAR const struct nxgl_size_s *pSize) |
| bool | raise (void) |
| bool | lower (void) |
| void | redirectNxTerm (NXTERM handle) |
| bool | setPixel (FAR const struct nxgl_point_s *pPos, nxgl_mxpixel_t color) |
| bool | fill (FAR const struct nxgl_rect_s *pRect, nxgl_mxpixel_t color) |
| void | getRectangle (FAR const struct nxgl_rect_s *rect, struct SBitmap *dest) |
| bool | fillTrapezoid (FAR const struct nxgl_rect_s *pClip, FAR const struct nxgl_trapezoid_s *pTrap, nxgl_mxpixel_t color) |
| bool | drawLine (FAR struct nxgl_vector_s *vector, nxgl_coord_t width, nxgl_mxpixel_t color, enum ELineCaps caps) |
| bool | drawFilledCircle (struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color) |
| bool | move (FAR const struct nxgl_rect_s *pRect, FAR const struct nxgl_point_s *pOffset) |
| bool | bitmap (FAR const struct nxgl_rect_s *pDest, FAR const void *pSrc, FAR const struct nxgl_point_s *pOrigin, unsigned int stride) |
Public Member Functions inherited from NXWidgets::INxWindow | |
| virtual | ~INxWindow (void) |
Private Attributes | |
| NXHANDLE | m_hNxServer |
| NXWINDOW | m_hWindow |
| CWidgetControl * | m_widgetControl |
Additional Inherited Members | |
Public Types inherited from NXWidgets::INxWindow | |
| enum | ELineCaps { LINECAP_NONE = NX_LINECAP_NONE, LINECAP_PT1 = NX_LINECAP_PT1, LINECAP_PT2 = NX_LINECAP_PT2, LINECAP_BOTH = NX_LINECAP_BOTH } |
Protected Types inherited from NXWidgets::INxWindow | |
| enum | ELineCaps { LINECAP_NONE = NX_LINECAP_NONE, LINECAP_PT1 = NX_LINECAP_PT1, LINECAP_PT2 = NX_LINECAP_PT2, LINECAP_BOTH = NX_LINECAP_BOTH } |
Protected Member Functions inherited from NXWidgets::CCallback | |
| CCallback (CWidgetControl *widgetControl) | |
| ~CCallback (void) | |
| FAR struct nx_callback_s * | getCallbackVTable (void) |
| void | setNxTerm (NXTERM handle) |
Protected Member Functions inherited from NXWidgets::INxWindow | |
| virtual | ~INxWindow (void) |
This class defines operations on a the NX background window. There are three instances that represent an NX window from the perspective of NXWidgets.
There a various kinds of of window instances, but each inherits (1) CCallback and dispatches the Windows callbacks and (2) INxWindow that describes the common window behavior.
Definition at line 84 of file cbgwindow.hxx.
| CBgWindow::CBgWindow | ( | NXHANDLE | hNxServer, |
| CWidgetControl * | pWidgetControl | ||
| ) |
Constructor. Obtains the background window from server and wraps the window as CBgWindow. Creates an uninitialized instance of the CBgWindow object. The open() method must be called to initialize the instance.
The general steps to create any window include: 1) Create a dumb CWigetControl instance 2) Pass the dumb CWidgetControl instance to the window constructor that inherits from INxWindow. 3) The window constructor call CWidgetControl methods to "smarten" the CWidgetControl instance with window-specific knowledge. 4) Call the open() method on the window to display the window. 5) After that, the fully smartend CWidgetControl instance can be used to generate additional widgets. 6) After that, the fully smartened CWidgetControl instance can be used to generate additional widgets by passing it to the widget constructor
| hNxServer | Handle to the NX server. |
| widgetControl | Controlling widget for this window. |
Constructor. Obtains the background window from server and wraps the window as CBgWindow.
| hNxServer | Handle to the NX server. |
| widgetControl | Controlling widget for this window. |
Definition at line 67 of file cbgwindow.cxx.
|
virtual |
Destructor. Returns the background window to the server.
Definition at line 80 of file cbgwindow.cxx.
|
virtual |
Copy a rectangular region of a larger image into the rectangle in the specified window.
| pDest | Describes the rectangular on the display that will receive the bitmap. |
| pSrc | The start of the source image. |
| pOrigin | the pOrigin of the upper, left-most corner of the full bitmap. Both pDest and pOrigin are in window coordinates, however, pOrigin may lie outside of the display. |
| stride | The width of the full source image in bytes. |
Copy a rectangular region of a larger image into the rectangle in the specified window. The source image is treated as an opaque image.
| pDest | Describes the rectangular on the display that will receive the bitmap. |
| pSrc | The start of the source image. |
| pOrigin | the pOrigin of the upper, left-most corner of the full bitmap. Both pDest and pOrigin are in window coordinates, however, pOrigin may lie outside of the display. |
| stride | The width of the full source image in bytes. |
Implements NXWidgets::INxWindow.
Definition at line 372 of file cbgwindow.cxx.
|
virtual |
Draw a filled circle at the specified position, size, and color.
| center | The window-relative coordinates of the circle center. |
| radius | The radius of the rectangle in pixels. |
| color | The color of the rectangle. |
Implements NXWidgets::INxWindow.
Definition at line 334 of file cbgwindow.cxx.
|
virtual |
Fill the specified line in the window with the specified color.
| vector | - Describes the line to be drawn |
| width | - The width of the line |
| color | - The color to use to fill the line |
| caps | - Draw a circular cap on the ends of the line to support better line joins |
Implements NXWidgets::INxWindow.
Definition at line 317 of file cbgwindow.cxx.
|
virtual |
Fill the specified rectangle in the window with the specified color.
| pRect | The location to be filled. |
| color | The color to use in the fill. |
Implements NXWidgets::INxWindow.
Definition at line 259 of file cbgwindow.cxx.
|
virtual |
Fill the specified trapezoidal region in the window with the specified color.
| pClip | Clipping rectangle relative to window (may be null). |
| pTrap | The trapezoidal region to be filled. |
| color | The color to use in the fill. |
Implements NXWidgets::INxWindow.
Definition at line 296 of file cbgwindow.cxx.
|
virtual |
Get the position of the window (as reported by the NX callback). NOTE: The background window is always positioned at {0,0}
Implements NXWidgets::INxWindow.
Definition at line 152 of file cbgwindow.cxx.
|
virtual |
Get the raw contents of graphic memory within a rectangular region. NOTE: Since raw graphic memory is returned, the returned memory content may be the memory of windows above this one and may not necessarily belong to this window unless you assure that this is the top window.
| rect | The location to be copied |
| dest | - The describes the destination bitmap to receive the graphics data. |
Implements NXWidgets::INxWindow.
Definition at line 278 of file cbgwindow.cxx.
|
virtual |
Get the size of the window (as reported by the NX callback). NOTE: The size of the background window is always the entire display.
Implements NXWidgets::INxWindow.
Definition at line 168 of file cbgwindow.cxx.
|
virtual |
Each implementation of INxWindow must provide a method to recover the contained CWidgetControl instance.
Implements NXWidgets::INxWindow.
Definition at line 124 of file cbgwindow.cxx.
|
virtual |
Lower the window to the bottom of the display. NOTE: The background window is always at the bottom of the window hierarchy.
Lower the window to the bottom of the display. NOTE: The background window is always at the bottom of the window hierarchy.
Implements NXWidgets::INxWindow.
Definition at line 226 of file cbgwindow.cxx.
|
virtual |
Move a rectangular region within the window.
| pRect | Describes the rectangular region to move. |
| pOffset | The offset to move the region. |
Implements NXWidgets::INxWindow.
Definition at line 349 of file cbgwindow.cxx.
|
virtual |
Creates a the new window. Window creation is separate from object instantiation so that failures can be reported.
Creates a new window. Window creation is separate from object instantiation so that failures can be reported.
Implements NXWidgets::INxWindow.
Definition at line 96 of file cbgwindow.cxx.
|
virtual |
Bring the window to the top of the display. NOTE: The background window cannot be raised.
Bring the window to the top of the display. NOTE: The background window cannot be raised.
Implements NXWidgets::INxWindow.
Definition at line 212 of file cbgwindow.cxx.
|
inlinevirtual |
Each window implementation also inherits from CCallback. CCallback, by default, forwards NX keyboard input to the various widgets residing in the window. But NxTerm is a different usage model; In this case, keyboard input needs to be directed to the NxTerm character driver. This method can be used to enable (or disable) redirection of NX keyboard input from the window widgets to the NxTerm
| handle. | The NXTERM handle. If non-NULL, NX keyboard input will be directed to the NxTerm driver using this handle; If NULL (the default), NX keyboard input will be directed to the widgets within the window. |
Implements NXWidgets::INxWindow.
Definition at line 224 of file cbgwindow.hxx.
|
virtual |
Request the position and size information of the window. The values will be returned asynchronously through the client callback method. The GetPosition() method may than be called to obtain the positional data as provided by the callback.
Request the position and size information of the window. The values will be returned asynchronously through the client callback method. The GetPosition() method may than be called to obtain the positional data as provided by the callback.
Implements NXWidgets::INxWindow.
Definition at line 138 of file cbgwindow.cxx.
|
virtual |
Set an individual pixel in the window with the specified color.
| pPos | The location of the pixel to be filled. |
| color | The color to use in the fill. |
Implements NXWidgets::INxWindow.
Definition at line 242 of file cbgwindow.cxx.
|
virtual |
Set the position and size of the window.
| pPos | The new position of the window. |
Set the position and size of the window.
| pPos | The new position of the window. |
Implements NXWidgets::INxWindow.
Definition at line 182 of file cbgwindow.cxx.
|
virtual |
Set the size of the selected window. NOTE: The size of the background window is always the entire display and cannot be changed.
| pSize | The new size of the window. |
Set the size of the selected window. NOTE: The size of the background window is always the entire display and cannot be changed.
| pSize | The new size of the window. |
Implements NXWidgets::INxWindow.
Definition at line 198 of file cbgwindow.cxx.
|
private |
Handle to the NX server.
Definition at line 87 of file cbgwindow.hxx.
|
private |
Handle to the NX background window
Definition at line 88 of file cbgwindow.hxx.
|
private |
The controlling widget for the window
Definition at line 89 of file cbgwindow.hxx.
1.8.13