Dialog(3I)

πŸ’– Dialog(3I) πŸ’–

okay bestie, we're in the InterViews Reference Manual and this is THE page for Dialog β€” the popup dialog interactor. yes she's giving main character energy. yes she handles your dialog box input. let's get into it 🫢


✨ NAME ✨

Dialog β€” popup dialog interactor πŸ’…


🌸 SYNOPSIS 🌸

#include <InterViews/dialog.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. a dialog is an interactor that handles input for a dialog box. that's her whole job and she does it beautifully πŸ’–

the dialog layout? that's not her business. it's specified by a separate interactor that you pass to the dialog constructor. very much "you bring the vibes, she brings the event loop" ✨

and here's the moment β€” the dialog completes when the value of an associated button state becomes non-zero. no cap. that button state is typically set by one or more buttons over in the component interactor. iconic behavior honestly πŸ‘‘


πŸ‘‘ PUBLIC OPERATIONS πŸ‘‘

  • Dialog(ButtonState*, Interactor*, Alignment = Center) β€” construct a new dialog with the given button state and interactor. the alignment is used by the Popup operation. so like, it matters, keep it in mind πŸ’«
  • virtual boolean Accept() β€” set the dialog button state to zero, then loop reading events until the button state's value becomes non-zero. every event gets passed to its target's Handle operation. she returns true if the value is one, and false otherwise. that's the whole ritual, bestie πŸ•―οΈ
  • virtual boolean Popup(Event&, boolean placed = true) β€” insert the dialog into the world associated with the given event. if placed is true, align the dialog around the event's (x, y) coordinate. otherwise, the dialog is inserted without specifying a position. then Popup calls the Accept operation and returns its value. she's a whole pipeline fr fr 🌈

πŸ”₯ SEE ALSO πŸ”₯

  • Button(3I)
  • Interactor(3I)
  • World(3I)

okay that's the page!! this was InterViews, dated 11 August 1988 β€” yeah she's vintage and she still ate πŸ’€βœ¨ go build something cute with your popup dialog bestie, mwah πŸŽ€πŸ’œ