Skip to content

Alternative version of callback-taking functions for making API bindings #1004

Open
@danielkeller

Description

@danielkeller

I'm working out how to wrap egui's API for my scripting language. Something that would make this a lot easier is if there was an alternative API to the functions that take callbacks (like SidePanel::show, Window::show, and Ui::horizontal) which could be written in straight-line code. For example, an object that exposes a &mut UI to draw widgets, and has a finish method which drops it.

It looks like I can emulate this with some pairs of Ui::new and Ui::allocate_rect, but I'll have to rewrite all the useful stuff those functions do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions