Skip to content

Define a dialog library #81

@inexorabletash

Description

@inexorabletash

There are hints of this in the common dialogs in DeskTop (used for file copy/delete and selector entry add/edit), but it could be formalized.

Introduce a declarative format like the following:

dialog_resource := num_controls controls...
control := rect | label | push_button | check_box | radio_button | text_input 
rect := pen_mode, left, top, right, bottom
label := left, top, string
push_button := id, left, top, right, bottom, string
check_button := id, state, left, top
radio_button := id, state, left, top
text_input := id, max_length, left, top, right, bottom

A handful of calls would be needed:

  • GetTextInputString(id, pbuffer)
  • SetTextInputString(id, str)
  • GetButtonState(id, pstate)
  • SetButtonState(id, pstate)

... and a custom event loop that provides for clicks on buttons (reporting ids) and keys (Enter, Escape, Apple-x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    API requestNew API within MGTK or DeskTop itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions