diff options
author | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-11-03 20:39:16 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@seriouslyembedded.com> | 2015-11-03 20:39:16 +0100 |
commit | 86aef5990a702cc10c99d41c8aa7cc15b3338cae (patch) | |
tree | bc49b57f90581c88214f07ef9e29c8d6cdb55884 /src/gwin/gwin_frame.h | |
parent | de149299ae02d36c8393cbe52ba9025f3ed2de21 (diff) | |
download | uGFX-86aef5990a702cc10c99d41c8aa7cc15b3338cae.tar.gz uGFX-86aef5990a702cc10c99d41c8aa7cc15b3338cae.tar.bz2 uGFX-86aef5990a702cc10c99d41c8aa7cc15b3338cae.zip |
Doxygen (documenting each built-in rendering function for widgets)
Diffstat (limited to 'src/gwin/gwin_frame.h')
-rw-r--r-- | src/gwin/gwin_frame.h | 124 |
1 files changed, 78 insertions, 46 deletions
diff --git a/src/gwin/gwin_frame.h b/src/gwin/gwin_frame.h index f71a88a5..2e0cc1b2 100644 --- a/src/gwin/gwin_frame.h +++ b/src/gwin/gwin_frame.h @@ -40,53 +40,85 @@ typedef GContainerObject GFrameObject; extern "C" { #endif - /** - * @brief Create a frame widget - * - * @details This widget provides a window like we know it from desktop systems. - * - * @param[in] g The GDisplay to display this window on - * @param[in] fo The GFrameObject structure to initialize. If this is NULL the structure is dynamically allocated. - * @param[in] pInit The initialization parameters - * @param[in] flags Some flags, see notes. - * - * @note Possible flags are: GWIN_FRAME_CLOSE_BTN, GWIN_FRAME_MINMAX_BTN. - * @note These frame buttons are processed internally. The close button will invoke a gwinDestroy() which will - * destroy the window itself and EVERY child it contains (also children of children). - * - * @return NULL if there is no resulting widget. A valid GHandle otherwise. - * - * @api - */ - GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint32_t flags); - #define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags); +/** + * @brief Create a frame widget + * + * @details This widget provides a window like we know it from desktop systems. + * + * @param[in] g The GDisplay to display this window on + * @param[in] fo The GFrameObject structure to initialize. If this is NULL the structure is dynamically allocated. + * @param[in] pInit The initialization parameters + * @param[in] flags Some flags, see notes. + * + * @note Possible flags are: GWIN_FRAME_CLOSE_BTN, GWIN_FRAME_MINMAX_BTN. + * @note These frame buttons are processed internally. The close button will invoke a gwinDestroy() which will + * destroy the window itself and EVERY child it contains (also children of children). + * + * @return NULL if there is no resulting widget. A valid GHandle otherwise. + * + * @api + */ +GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint32_t flags); +#define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags); + +/** + * @defgroup Renderings_Frame Frame rendering functions + * + * @brief Built-in rendering functions for the frame widget. + * + * @details These function may be passed to @p gwinSetCustomDraw() to get different frame drawing styles. + * + * @note In your custom frame drawing function you may optionally call these + * standard functions and then draw your extra details on top. + * @note These custom drawing routines don't have to worry about setting clipping as the framework + * sets clipping to the object window prior to calling these routines. + * + * @{ + */ - /** - * @brief The custom draw routines for a frame window - * @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 gwinFrameDraw_Std() will fill the client area with the background color.<br/> - * gwinFrameDraw_Transparent() will not fill the client area at all.<br/> - * gwinFrameDraw_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 gwinFrameDraw_Image(). - * @note The image custom draw function @p gwinFrameDraw_Image() uses param to pass in the gdispImage pointer. - * The image must be already opened before calling @p gwinSetCustomDraw(). - * - * @api - * @{ - */ - void gwinFrameDraw_Std(GWidgetObject *gw, void *param); - void gwinFrameDraw_Transparent(GWidgetObject *gw, void *param); - void gwinFrameDraw_Image(GWidgetObject *gw, void *param); - /** @} */ +/** + * @brief The default rendering function for the frame widget. + * + * @details Fills the client area with the background color. + * + * @param[in] gw The widget object (must be a frame widget). + * @param[in] param A parameter passed in from the user. Ignored by this function. + * + * @api + */ +void gwinFrameDraw_Std(GWidgetObject *gw, void *param); + +/** + * @brief Renders the frame widget with a transparent client area. + * + * @details Will not fill the client area at all. + * + * @param[in] gw The widget object (must be a frame object). + * @param[in] param A parameter passed in from the user. Ignored by this function. + * + * @note The image custom draw function @p gwinFrameDraw_Image() uses param to pass in the gdispImage pointer. + * The image must be already opened before calling @p gwinSetCustomDraw(). + * + * @api + */ +void gwinFrameDraw_Transparent(GWidgetObject *gw, void *param); + +/** + * @brief Renders the frame widget and uses the specified image for the client area. + * + * @details The image will be tiled throghout the client area. Therefore, to archive the best looking result the + * supplied image needs to be of the same size as the client area size of the frame widget (inner size). + * + * @param[in] gw The widget object (must be a frame object). + * @param[in] param A parameter passed in from the user. Must be an image handle. See note below. + * + * @note The image must be already opened before calling @p gwinSetCustomDraw(). The handle is passed as the parameter + * to this function. + * + * @api + */ +void gwinFrameDraw_Image(GWidgetObject *gw, void *param); +/** @} */ #ifdef __cplusplus } |