• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • ConfirmController
  • construct::ui::ConfirmController Class

    class construct::ui::ConfirmController

    The seam through which construct widgets ask the user to confirm, without blocking. More...

    Header: #include <ConfirmController>
    Inherits: QObject
    Inherited By:

    octomy::standalone::StandaloneConfirmController

    Detailed Description

    The construct editor widgets live below the activity layer and cannot push an activity. They ask through this class instead. A widget calls request() with its own request id and the positional argument list of a MessagePromptActivity, which buildPrompt() assembles. It then waits for resolved() with that id, which carries the token of the chosen button. No callback crosses the request.

    This base class has no host. It resolves every request on the next event-loop turn with an empty token, which means cancel, so the widgets still work in the widget catalog, in tests and headless. A host installs a subclass that shows the prompt: ActivityConfirmController on the activity stack, or octomy::standalone::StandaloneConfirmController in a standalone window. The host owns the controller; ConstructShell and its editor widgets only hold a pointer to it.

    See also octomy::standalone::StandaloneConfirmController.