|
C-Menu 0.2.9
A User Interface Toolkit
|
Backend-agnostic layout helpers. More...
Go to the source code of this file.
Functions | |
| void | ui_framed_surface_destroy (UiFramedSurface *fs) |
| Destroy a framed surface and release its resources. | |
| UiFramedSurface | ui_framed_surface_new (UiSurface *parent, UiRect rect) |
| Create a framed surface (outer border + inner content area). | |
Backend-agnostic layout helpers.
Implements utility functions that build higher-level layout concepts (framed surfaces, etc.) entirely through the portable UALUI API so they work with any compiled-in backend.
Definition in file ui_layout.c.
| void ui_framed_surface_destroy | ( | UiFramedSurface * | fs | ) |
Destroy a framed surface and release its resources.
Destroys a framed surface and releases its resources.
| fs | Pointer to the UiFramedSurface to destroy. |
Definition at line 54 of file ui_layout.c.
References UiFramedSurface::inner, UiFramedSurface::outer, and ui_surface_destroy().
| UiFramedSurface ui_framed_surface_new | ( | UiSurface * | parent, |
| UiRect | rect ) |
Create a framed surface (outer border + inner content area).
Creates a new framed surface with the specified parent and rectangle.
The returned UiFramedSurface.outer is the frame panel; .inner is one row and one column smaller on each side (the drawable content area). The caller is responsible for destroying the framed surface with ui_framed_surface_destroy() when it is no longer needed.
| ui | The UiRuntime context. |
| parent | Parent surface, or NULL to make the frame a top-level panel. |
| rect | Position and size of the outer frame (including the border). |
Definition at line 26 of file ui_layout.c.
References UiRect::cols, UiFramedSurface::inner, UiRect::lines, UiFramedSurface::outer, ui, ui_surface_destroy(), ui_surface_new(), UiRect::x, and UiRect::y.