summaryrefslogtreecommitdiff
path: root/NxWidgets/libnxwidgets/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-28 17:36:53 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-28 17:36:53 +0000
commitfbfd97c209f99cf1a9e8190ba835c1b3bef64c2a (patch)
treeab42679f8868bdeaa101f569dab7500e2206ddf7 /NxWidgets/libnxwidgets/include
parentdd5155bc0f4765ad35cb485fb4eb9930ae365a7d (diff)
downloadpx4-nuttx-fbfd97c209f99cf1a9e8190ba835c1b3bef64c2a.tar.gz
px4-nuttx-fbfd97c209f99cf1a9e8190ba835c1b3bef64c2a.tar.bz2
px4-nuttx-fbfd97c209f99cf1a9e8190ba835c1b3bef64c2a.zip
A few pieces of what may become an NX window manager
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4669 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/libnxwidgets/include')
-rw-r--r--NxWidgets/libnxwidgets/include/cbitmap.hxx9
-rw-r--r--NxWidgets/libnxwidgets/include/cbuttonarray.hxx2
-rw-r--r--NxWidgets/libnxwidgets/include/cimage.hxx16
-rw-r--r--NxWidgets/libnxwidgets/include/crlepalettebitmap.hxx14
-rw-r--r--NxWidgets/libnxwidgets/include/ibitmap.hxx11
5 files changed, 46 insertions, 6 deletions
diff --git a/NxWidgets/libnxwidgets/include/cbitmap.hxx b/NxWidgets/libnxwidgets/include/cbitmap.hxx
index 473403aa8..4828ca9cc 100644
--- a/NxWidgets/libnxwidgets/include/cbitmap.hxx
+++ b/NxWidgets/libnxwidgets/include/cbitmap.hxx
@@ -182,6 +182,15 @@ namespace NXWidgets
const nxgl_coord_t getStride(void) const;
/**
+ * Use the colors associated with a selected image.
+ *
+ * @param selected. true: Use colors for a selected widget,
+ * false: Use normal (default) colors.
+ */
+
+ inline void setSelected(bool selected) {}
+
+ /**
* Get one row from the bit map image.
*
* @param x The offset into the row to get
diff --git a/NxWidgets/libnxwidgets/include/cbuttonarray.hxx b/NxWidgets/libnxwidgets/include/cbuttonarray.hxx
index d5f8be449..487a6cb9f 100644
--- a/NxWidgets/libnxwidgets/include/cbuttonarray.hxx
+++ b/NxWidgets/libnxwidgets/include/cbuttonarray.hxx
@@ -80,7 +80,7 @@ namespace NXWidgets
uint8_t m_buttonColumns; /**< The number of columns in one row */
uint8_t m_buttonRows; /**< The number buttons in one column */
bool m_redrawButton; /**< True: Redraw button; False: redraw all */
- bool m_cursorOn; /**< Cursor on; hightlighted button displayed */
+ bool m_cursorOn; /**< Cursor on; highlighted button displayed */
bool m_cursorChange; /**< True: Redraw cursor button only */
nxgl_coord_t m_buttonWidth; /**< The width of one button in pixels */
nxgl_coord_t m_buttonHeight; /**< The height of one button in rows */
diff --git a/NxWidgets/libnxwidgets/include/cimage.hxx b/NxWidgets/libnxwidgets/include/cimage.hxx
index 47f4d557f..a1c282393 100644
--- a/NxWidgets/libnxwidgets/include/cimage.hxx
+++ b/NxWidgets/libnxwidgets/include/cimage.hxx
@@ -109,8 +109,9 @@ namespace NXWidgets
class CImage : public CNxWidget
{
protected:
- FAR IBitmap *m_bitmap; /**< Source bitmap image */
- struct nxgl_point_s m_origin; /**< Origin for offset image display position */
+ FAR IBitmap *m_bitmap; /**< Source bitmap image */
+ struct nxgl_point_s m_origin; /**< Origin for offset image display position */
+ bool m_highlighted; /**< Image is highlighted */
/**
* Draw the area of this widget that falls within the clipping region.
@@ -191,6 +192,17 @@ namespace NXWidgets
*/
void setImageTop(nxgl_coord_t row);
+
+ /**
+ * Control the highlight state.
+ *
+ * @param highlightOn True(1), the image will be highlighted
+ */
+
+ inline void highlight(bool highlightOn)
+ {
+ m_highlighted = highlightOn;
+ }
};
}
diff --git a/NxWidgets/libnxwidgets/include/crlepalettebitmap.hxx b/NxWidgets/libnxwidgets/include/crlepalettebitmap.hxx
index 2b1e4f065..451b472f4 100644
--- a/NxWidgets/libnxwidgets/include/crlepalettebitmap.hxx
+++ b/NxWidgets/libnxwidgets/include/crlepalettebitmap.hxx
@@ -84,7 +84,7 @@ namespace NXWidgets
uint8_t nlut; /**< Number of colors in the Look-Up Table (LUT) */
nxgl_coord_t width; /**< Width in pixels */
nxgl_coord_t height; /**< Height in rows */
- FAR const void *lut; /**< Pointer to the beginning of the Look-Up Table (LUT) */
+ FAR const void *lut[2]; /**< Pointers to the beginning of the Look-Up Tables (LUTs) */
/**
* The pointer to the beginning of the RLE data
@@ -113,6 +113,7 @@ namespace NXWidgets
nxgl_coord_t m_row; /**< Logical row number */
nxgl_coord_t m_col; /**< Logical column number */
uint8_t m_remaining; /**< Number of bytes remaining in current entry */
+ FAR const void *m_lut; /**< The selected LUT */
FAR const struct SRlePaletteBitmapEntry *m_rle; /**< RLE entry being processed */
/**
@@ -237,7 +238,16 @@ namespace NXWidgets
const nxgl_coord_t getStride(void) const;
/**
- * Get one row from the bit map image.
+ * Use the colors associated with a selected image.
+ *
+ * @param selected. true: Use colors for a selected widget,
+ * false: Use normal (default) colors.
+ */
+
+ void setSelected(bool selected);
+
+ /**
+ * Get one row from the bit map image using the selected colors.
*
* @param x The offset into the row to get
* @param y The row number to get
diff --git a/NxWidgets/libnxwidgets/include/ibitmap.hxx b/NxWidgets/libnxwidgets/include/ibitmap.hxx
index c4bb3b5ac..5eaa5b3c9 100644
--- a/NxWidgets/libnxwidgets/include/ibitmap.hxx
+++ b/NxWidgets/libnxwidgets/include/ibitmap.hxx
@@ -143,7 +143,16 @@ namespace NXWidgets
virtual const nxgl_coord_t getStride(void) const = 0;
/**
- * Get one row from the bit map image.
+ * Use the colors associated with a selected image.
+ *
+ * @param selected. true: Use colors for a selected widget,
+ * false: Use normal (default) colors.
+ */
+
+ virtual void setSelected(bool selected) = 0;
+
+ /**
+ * Get one row from the bit map image using the selected colors.
*
* @param x The offset into the row to get
* @param y The row number to get