libui-ng
A portable GUI library for C
uiArea Struct Reference

Custom drawing control that receives drawing and input events through a uiAreaHandler. More...

#include <ui.h>

Public Member Functions

void uiAreaSetSize (uiArea *a, int width, int height)
 Changes the size of a scrolling area's drawing space. More...
 
void uiAreaQueueRedrawAll (uiArea *a)
 Queues the entire area for redraw. More...
 
void uiAreaScrollTo (uiArea *a, double x, double y, double width, double height)
 Scrolls the minimum distance needed to make a rectangle visible. More...
 

Detailed Description

Custom drawing control that receives drawing and input events through a uiAreaHandler.

Member Function Documentation

◆ uiAreaQueueRedrawAll()

void uiAreaQueueRedrawAll ( uiArea a)

Queues the entire area for redraw.

Parameters
auiArea instance.

◆ uiAreaScrollTo()

void uiAreaScrollTo ( uiArea a,
double  x,
double  y,
double  width,
double  height 
)

Scrolls the minimum distance needed to make a rectangle visible.

Negative width and height values extend the rectangle in the opposite direction. For example, (110, 100, -100, -80) describes the same rectangle as (10, 20, 100, 80).

Parameters
aScrolling uiArea instance created with uiNewScrollingArea().
xRectangle origin in drawing space coordinates.
yRectangle origin in drawing space coordinates.
widthRectangle width in drawing space units.
heightRectangle height in drawing space units.
Warning
Calling this function on a non-scrolling uiArea is a user error.

◆ uiAreaSetSize()

void uiAreaSetSize ( uiArea a,
int  width,
int  height 
)

Changes the size of a scrolling area's drawing space.

Parameters
aScrolling uiArea instance created with uiNewScrollingArea().
widthWidth in drawing space units.
heightHeight in drawing space units.
Warning
Calling this function on a non-scrolling uiArea is a user error.

The documentation for this struct was generated from the following file: