aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gcontainer.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-08-16 23:35:50 +1000
committerinmarket <andrewh@inmarket.com.au>2014-08-16 23:35:50 +1000
commit362c25f9673f96ade74b9316b3db356c28e66aa6 (patch)
treeb919a2d611c8f410a13d41c64ec4ce4ef3817f79 /src/gwin/gcontainer.h
parent045140a1338cbff569081ad89c06c09ffa216534 (diff)
downloaduGFX-362c25f9673f96ade74b9316b3db356c28e66aa6.tar.gz
uGFX-362c25f9673f96ade74b9316b3db356c28e66aa6.tar.bz2
uGFX-362c25f9673f96ade74b9316b3db356c28e66aa6.zip
Update the simple container to support custom draws such as transparent client area or tiled image client area.
Diffstat (limited to 'src/gwin/gcontainer.h')
-rw-r--r--src/gwin/gcontainer.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/gwin/gcontainer.h b/src/gwin/gcontainer.h
index 942cf8c0..98707ede 100644
--- a/src/gwin/gcontainer.h
+++ b/src/gwin/gcontainer.h
@@ -105,7 +105,6 @@ extern "C" {
* @{
*/
#define GWIN_CONTAINER_BORDER 0x00000001
- #define GWIN_CONTAINER_TRANSPARENT 0x00000002
/** @} */
/**
@@ -122,6 +121,33 @@ extern "C" {
GHandle gwinGContainerCreate(GDisplay *g, GContainerObject *gw, const GWidgetInit *pInit, uint32_t flags);
#define gwinContainerCreate(gc, pInit, flags) gwinGContainerCreate(GDISP, gc, pInit, flags)
+ /**
+ * @brief The custom draw routines for a simple container
+ * @details These function may be passed to @p gwinSetCustomDraw() to get different frame drawing styles
+ *
+ * @param[in] gw The widget object (in this case a frame)
+ * @param[in] param A parameter passed in from the user
+ *
+ * @note In your own custom drawing function you may optionally call these
+ * standard functions and then draw your extra details on top.
+ *
+ * @note gwinContainerDraw_Std() will fill the client area with the background color.<br/>
+ * gwinContainerDraw_Transparent() will not fill the client area at all.<br/>
+ * gwinContainerDraw_Image() will tile the image throughout the client area.<br/>
+ * All these drawing functions draw the frame itself the same way.
+ *
+ * @note The standard functions below ignore the param parameter except for @p gwinContainerDraw_Image().
+ * @note The image custom draw function @p gwinContainerDraw_Image() uses param to pass in the gdispImage pointer.
+ * The image must be already opened before calling @p gwinSetCustomDraw().
+ *
+ * @api
+ * @{
+ */
+ void gwinContainerDraw_Std(GWidgetObject *gw, void *param);
+ void gwinContainerDraw_Transparent(GWidgetObject *gw, void *param);
+ void gwinContainerDraw_Image(GWidgetObject *gw, void *param);
+ /** @} */
+
#ifdef __cplusplus
}
#endif