|
NXWidgets
1.19
|
#include <inxwindow.hxx>

Public Types | |
| enum | ELineCaps { LINECAP_NONE = NX_LINECAP_NONE, LINECAP_PT1 = NX_LINECAP_PT1, LINECAP_PT2 = NX_LINECAP_PT2, LINECAP_BOTH = NX_LINECAP_BOTH } |
Public Member Functions | |
| virtual | ~INxWindow (void) |
| virtual bool | open (void)=0 |
| virtual CWidgetControl * | getWidgetControl (void) const =0 |
| virtual bool | requestPosition (void)=0 |
| virtual bool | getPosition (FAR struct nxgl_point_s *pPos)=0 |
| virtual bool | getSize (FAR struct nxgl_size_s *pSize)=0 |
| virtual bool | setPosition (FAR const struct nxgl_point_s *pPos)=0 |
| virtual bool | setSize (FAR const struct nxgl_size_s *pSize)=0 |
| virtual bool | raise (void)=0 |
| virtual bool | lower (void)=0 |
| virtual void | redirectNxTerm (NXTERM handle)=0 |
| virtual bool | setPixel (FAR const struct nxgl_point_s *pPos, nxgl_mxpixel_t color)=0 |
| virtual bool | fill (FAR const struct nxgl_rect_s *pRect, nxgl_mxpixel_t color)=0 |
| virtual void | getRectangle (FAR const struct nxgl_rect_s *rect, struct SBitmap *dest)=0 |
| virtual bool | fillTrapezoid (FAR const struct nxgl_rect_s *pClip, FAR const struct nxgl_trapezoid_s *pTrap, nxgl_mxpixel_t color)=0 |
| virtual bool | drawLine (FAR struct nxgl_vector_s *vector, nxgl_coord_t width, nxgl_mxpixel_t color, enum ELineCaps caps)=0 |
| virtual bool | drawFilledCircle (struct nxgl_point_s *center, nxgl_coord_t radius, nxgl_mxpixel_t color)=0 |
| virtual bool | move (FAR const struct nxgl_rect_s *pRect, FAR const struct nxgl_point_s *pOffset)=0 |
| virtual bool | bitmap (FAR const struct nxgl_rect_s *pDest, FAR const void *pSrc, FAR const struct nxgl_point_s *pOrigin, unsigned int stride)=0 |
This class defines common operations on a any NX 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 83 of file inxwindow.hxx.
| enum NXWidgets::INxWindow::ELineCaps |
| Enumerator | |
|---|---|
| LINECAP_NONE | |
| LINECAP_PT1 | |
| LINECAP_PT2 | |
| LINECAP_BOTH | |
Definition at line 86 of file inxwindow.hxx.
|
inlinevirtual |
A virtual destructor is required in order to override the INxWindow destructor. We do this because if we delete INxWindow, we want the destructor of the class that inherits from INxWindow to run, not this one.
Definition at line 101 of file inxwindow.hxx.
|
pure virtual |
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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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 |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Get the position of the window (as reported by the NX callback).
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Get the size of the window (as reported by the NX callback).
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Each implementation of INxWindow must provide a method to recover the contained CWidgetControl instance.
Implemented in NXWidgets::CBgWindow, NXWidgets::CNxTkWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Lower the window to the bottom of the display.
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Move a rectangular region within the window.
| pRect | Describes the rectangular region to move. |
| pOffset | The offset to move the region. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Creates a new window. Window creation is separate from object instantiation so that window creation failures can be properly reported.
Implemented in NXWidgets::CBgWindow, NXWidgets::CNxTkWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Bring the window to the top of the display.
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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.
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure 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. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Set the position and size of the window.
| pPos | The new position of the window. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
|
pure virtual |
Set the size of the selected window.
| pSize | The new size of the window. |
Implemented in NXWidgets::CNxTkWindow, NXWidgets::CBgWindow, NXWidgets::CNxWindow, and NXWidgets::CNxToolbar.
1.8.13