JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

Provide API to write custom TextInputControls #173

Open FlorianKirmaier opened 8 months ago

FlorianKirmaier commented 8 months ago

Some Controls can't implement the public TextInputControl interface. But it would still like to be handled like TextInputControls from JPro.

We could provide an interface that the Control could implement to achieve this.

interface JProTextInputControl {
    void setText(String)
    IntegerProperty selectionStartProperty()
    IntegerProperty selectionEndProperty()
    IntegerProperty caretPosition()
}

class CustomTextInputControl implements JProTextInputControl {
    if(!WebAPI.isBrowser) {
        < add TextInput Shortcuts>
    }
}