Static displays

EsIconDisplayCreate

EsIconDisplay *EsIconDisplayCreate(EsElement *parent, EsIconDisplayFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0, uint32_t iconID = 0);

Creates a display that draws a single icon.

EsIconDisplaySetIcon

void EsIconDisplaySetIcon(EsIconDisplay *display, uint32_t iconID);

Changes the icon drawn by the display.

EsImageDisplayCreate

EsImageDisplay *EsImageDisplayCreate(EsElement *parent, EsImageDisplayFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0);

Creates a display for a decoded image.

EsImageDisplayLoadBits

void EsImageDisplayLoadBits(EsImageDisplay *display, const uint32_t *bits, size_t width, size_t height, size_t stride);

Loads raw bitmap data into the display. The bits are copied.

EsImageDisplayLoadFromMemory

void EsImageDisplayLoadFromMemory(EsImageDisplay *display, const void *buffer, size_t bufferBytes);

Loads an encoded image from memory and decodes it. The buffer is copied. With ES_IMAGE_DISPLAY_DECODE_WHEN_NEEDED, decoding is deferred until the image is painted.

EsImageDisplayPaint

void EsImageDisplayPaint(EsImageDisplay *display, EsPainter *painter, EsRectangle bounds);

Paints the image into the given painter and bounds. If the image has not been decoded yet, it is decoded now.

EsImageDisplayGetImageWidth

uint32_t EsImageDisplayGetImageWidth(EsImageDisplay *display);

Returns the width of the loaded image, in pixels.

EsImageDisplayGetImageHeight

uint32_t EsImageDisplayGetImageHeight(EsImageDisplay *display);

Returns the height of the loaded image, in pixels.

EsTextDisplayCreate

EsTextDisplay *EsTextDisplayCreate(EsElement *parent, EsTextDisplayFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0, STRING label = BLANK_STRING);

Creates a display that shows text the user cannot edit.

EsTextDisplaySetContents

void EsTextDisplaySetContents(EsTextDisplay *display, STRING contents = BLANK_STRING);

Replaces the displayed text. The string is copied.

EsTextDisplaySetStyledContents

void EsTextDisplaySetStyledContents(EsTextDisplay *display, const char *string, EsTextRun *runs, size_t runCount);

See EsTextPlanCreate for how runCount works.

EsTextDisplaySetupSyntaxHighlighting

void EsTextDisplaySetupSyntaxHighlighting(EsTextDisplay *display, EsSyntaxHighlightingLanguage language, const uint32_t *customColors = ES_NULL, size_t customColorCount = 0);

Enables syntax highlighting with the given language. customColors overrides the built-in colors; at most 8 colors are used.

EsListDisplayCreate

EsListDisplay *EsListDisplayCreate(EsElement *parent, EsListDisplayFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0);

Creates a display for a bulleted, numbered, or alphabetical list. The marker style is selected by the flags.

EsListDisplaySetCounterContinuation

void EsListDisplaySetCounterContinuation(EsListDisplay *display, EsListDisplay *previous);

Makes the counters of this list display continue from the last item of the previous list display.

EsListDisplaySetCounterStart

void EsListDisplaySetCounterStart(EsListDisplay *display, uintptr_t index);

If index = 0, then the first item will be "1." or "(a)".

EsAnnouncementShow

void EsAnnouncementShow(EsWindow *window, EsAnnouncementFlags flags, int32_t x, int32_t y, STRING text = BLANK_STRING);

Shows a transient announcement window anchored near the given point. If x and y are both -1, the announcement is centered at the top of the parent window. The window disappears by itself.