GFrame code cleanup - buttons need to be implemented

ugfx_release_2.6
Joel Bodenmann 2014-01-07 00:29:56 +01:00
parent bb91a78156
commit f3cbb02c3a
2 changed files with 16 additions and 27 deletions

View File

@ -39,15 +39,25 @@ typedef struct GFrameObject {
GHandle btnMax;
} GFrameObject;
/**
* @brief Create a frame widget
*
* @details This widget provides a window like we know it from desktop systems. You usually use this together with
* gwinAddChild().
*
* @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_BORDER, GWIN_FRAME_CLOSE_BTN, GWIN_FRAME_MINMAX_BTN.
* Whether the close or the minimize maximize buttons are used, the boarder is automatically invoked.
*
* @api
*/
GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint16_t flags);
#define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags);
GHandle gwinFrameGetClose(GHandle gh);
GHandle gwinFrameGetMin(GHandle gh);
GHandle gwinFrameGetMax(GHandle gh);
#endif /* _GWIN_FRAME_H */
/** @} */

View File

@ -148,27 +148,6 @@ GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint
return (GHandle)fo;
}
GHandle gwinFrameGetClose(GHandle gh) {
if (gh->vmt != (gwinVMT *)&frameVMT)
return;
return gh2obj->btnClose;
}
GHandle gwinFrameGetMin(GHandle gh) {
if (gh->vmt != (gwinVMT *)&frameVMT)
return;
return gh2obj->btnMin;
}
GHandle gwinFrameGetMax(GHandle gh) {
if (gh->vmt != (gwinVMT *)&frameVMT)
return;
return gh2obj->btnMax;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Default render routines //
///////////////////////////////////////////////////////////////////////////////////////////////////