Diol can save your theme preference in this browser using local storage.
void EsElementDraw(EsElement *element, EsPainter *painter);
Actually draw an element onto a painter.
void EsElementFocus(EsElement *element, EsElementFocusFlags flags = ES_FLAGS_DEFAULT);
Gives keyboard focus to the element. It sends the focus messages to the old and new focused elements. This must be done with the message mutex acquired.
bool EsElementIsFocused(EsElement *element);
Returns true if the element currently has focus.
void EsElementSetDisabled(EsElement *element, bool disabled = true);
Enables or disables the element and all of its children. It removes focus from a disabled element. This must be done with the message mutex acquired.
void EsElementSetHidden(EsElement *element, bool hidden = true);
Shows or hides the element. It updates the parent's content size. This must be done with the message mutex acquired.
bool EsElementIsHidden(EsElement *element);
Returns true if the element is hidden. This must be done with the message mutex acquired.
void EsElementSetCallback(EsElement *element, EsElementCallback callback);
Sets the element's user message handler. This must be done with the message mutex acquired.
void EsElementGetSize(EsElement *element, int *width, int *height);
Writes the element's width and height to the output parameters. This must be done with the message mutex acquired.
void EsElementRepaint(EsElement *element, const EsRectangle *region = ES_NULL);
Mark an element to be repainted. If region is null, then the whole element is repainted.
void EsElementRepaintForScroll(EsElement *element, EsMessage *message, EsRectangle border);
Minimal repaint for ES_MSG_SCROLL_X/Y.
void EsElementRelayout(EsElement *element);
Marks the element and its ancestors as needing relayout. The layout runs during the next window update.
void EsElementSetCellRange(EsElement *element, int xFrom, int yFrom, int xTo = -1, int yTo = -1);
Use only if the parent is a ES_PANEL_TABLE.
EsRectangle EsElementGetInsets(EsElement *element);
Returns the element's style insets. This must be done with the message mutex acquired.
EsRectangle EsElementGetInsetSize(EsElement *element);
Get the size of the element, minus the insets.
EsRectangle EsElementGetInsetBounds(EsElement *element);
Returns the element's bounds, shrunk by the insets. This must be done with the message mutex acquired.
EsThemeMetrics EsElementGetMetrics(EsElement *element);
Returns the *scaled* metrics; the metrics given in the EsStyle passed to element creation functions should *not* be scaled.
float EsElementGetScaleFactor(EsElement *element);
Returns the current UI scale factor.
EsRectangle EsElementGetPreferredSize(EsElement *element);
Returns the element's preferred size from its style. This must be done with the message mutex acquired.
void EsElementMove(EsElement *element, int x, int y, int width, int height, bool applyCellLayout = true);
x, y are given relative to the top-left of the parent.
EsElement *EsElementGetLayoutParent(EsElement *element);
Returns the element's parent. This must be done with the message mutex acquired.
void EsElementDestroy(EsElement *element);
Destroys the element and removes it from its parent. This must be done with the message mutex acquired.
void EsElementDestroyContents(EsElement *element);
Destroys all of the element's children, then sends ES_MSG_DESTROY_CONTENTS. This must be done with the message mutex acquired.
bool EsElementStartAnimating(EsElement *element);
Returns false if the element was already animating.
void EsElementStartTransition(EsElement *element, EsTransitionType transitionType, EsElementTransitionFlags flags = ES_FLAGS_DEFAULT, float timeMultiplier = 1);
Starts a visual transition on the element, such as a fade in or out. timeMultiplier scales the transition duration.
void EsElementInsertAfter(EsElement *element);
The next element created will be inserted after this element. They must have the same parent. Or, if this is the parent of the next element created, then it will be inserted at the start of the parent.
void EsElementUpdateContentSize(EsElement *element, EsElementUpdateContentFlags flags = ES_FLAGS_DEFAULT);
Invalidates the element's measurement cache and marks it for relayout. Call this after the element's content changes.
void EsElementGetTextStyle(EsElement *element, EsTextStyle *style);
Writes the element's current text style to the output parameter.
EsRectangle EsElementGetWindowBounds(EsElement *element, bool client = true);
Returns the element's bounds relative to the window. If client is true, the result excludes the element's internal offsets.
EsRectangle EsElementGetScreenBounds(EsElement *element, bool client = true);
Returns the element's bounds in screen coordinates.
EsElement *EsCustomElementCreate(EsElement *parent, EsElementFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0);
Creates a plain element with no class message handler. Use it for simple containers and custom drawing.
EsScrollView *EsCustomScrollViewCreate(EsElement *parent, EsElementFlags flags = ES_FLAGS_DEFAULT, EsStyleID style = 0);
Creates a scroll view element. Configure it with EsScrollViewSetup.
int EsScrollViewReceivedMessage(EsScrollView *view, EsMessage *message);
You *must* call this *before* handling any messages. If this returns non-zero, immediately return that value from your message handler.
void EsScrollViewSetup(EsScrollView *view, EsScrollViewMode xMode, EsScrollViewMode yMode, uint16_t flags);
Sets the scroll modes and flags for the view. It creates or destroys the scroll bars as needed.
void EsScrollViewSetPosition(EsScrollView *view, int axis, double newPosition, bool sendMovedMessage = true);
Sets the scroll position along the axis. It clamps the value to the scroll limit. If sendMovedMessage is true, it sends the scroll message.
void EsScrollViewRefresh(EsScrollView *view);
Recomputes the scroll limits and updates the scroll bars. Call this after the content size changes.
int64_t EsScrollViewGetPosition(EsScrollView *view, int axis);
Returns the current scroll position along the axis.
int64_t EsScrollViewGetLimit(EsScrollView *view, int axis);
Returns the maximum scroll position along the axis.
void EsScrollViewSetFixedViewport(EsScrollView *view, int axis, int32_t value);
Sets the fixed viewport size along the axis. The scroll bar measurements use this value instead of the content size.
bool EsScrollViewIsBarEnabled(EsScrollView *view, int axis);
Returns true if the scroll bar along the axis is enabled.
bool EsScrollViewIsInDragScroll(EsScrollView *view);
Returns true if the user is currently dragging to scroll.