|
C-Menu 0.2.9
A User Interface Toolkit
|
UI layout management. More...
#include "ui_backend.h"Go to the source code of this file.
Data Structures | |
| struct | UiFramedSurface |
Functions | |
| void | ui_framed_surface_destroy (UiFramedSurface *fs) |
| Destroys a framed surface and releases its resources. | |
| UiFramedSurface | ui_framed_surface_new (UiSurface *parent, UiRect rect) |
| Creates a new framed surface with the specified parent and rectangle. | |
UI layout management.
This module provides functions for creating and managing framed surfaces, which consist of an outer surface (the frame) and an inner surface (the content area).
Definition in file ui_layout.h.
| void ui_framed_surface_destroy | ( | UiFramedSurface * | fs | ) |
Destroys a framed surface and releases its resources.
Destroy a framed surface and release its resources.
| fs | The UiFramedSurface to destroy. |
| fs | Pointer to the UiFramedSurface to destroy. |
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 ) |
Creates a new framed surface with the specified parent and rectangle.
Create a framed surface (outer border + inner content area).
| ui | The UI runtime context. |
| parent | The parent surface to which the framed surface will be attached. |
| rect | The rectangle defining the position and size of the framed surface. |
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). |
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.