Curses:...g::Basic(3)

πŸ’– NAME πŸ’–

okay bestie, welcome to the Curses:...g::Basic(3) page in User Contributed Perl Documentation ✨ this whole thing is about Curses::UI::Dialog::Basic β€” literally Create and manipulate basic dialogs πŸ’…


🌈 CLASS HIERARCHY 🌈

here's the family tree, no cap 🌳

Curses::UI::Widget
   |
   +----Curses::UI::Container
           |
           +----Curses::UI::Window
           |
           +----Curses::UI::Dialog::Basic

πŸ¦‹ SYNOPSIS πŸ¦‹

grab the vibe from this code, bestie:

use Curses::UI;
my $cui = new Curses::UI;
my $win = $cui->add('window_id', 'Window');

# The hard way.
# -------------
my $dialog = $win->add(
    'mydialog', 'Dialog::Basic',
-message   => 'Hello, world!'
);
$dialog->focus;
$win->delete('mydialog');

# The easy way (see Curses::UI documentation).
# --------------------------------------------
my $buttonvalue = $cui->dialog(-message => 'Hello, world!');

# or even
$cui->dialog('Hello, world!');

πŸŽ€ DESCRIPTION πŸŽ€

Curses::UI::Dialog::Basic is a basic dialog, periodt. This type of dialog has a message on it and one or more buttons 🫢 It can be used to show a message to your program's user (β€œThe thingy has been updated”) or to get some kind of confirmation from the user (β€œAre you sure you want to update the thingy?”).

See exampes/demo-Curses::UI::Dialog::Basic in the distribution for a short demo πŸ‘‘


✨ OPTIONS ✨

  • -title < TEXT > β€” sets the title of the dialog window to TEXT πŸ’–
  • -message < TEXT > β€” sets the message to show to TEXT. the text may contain newline (\n) characters πŸŒ€
  • -buttons < ARRAYREF > β€” one of the button-setup options, explained right below πŸ‘‡
  • -selected < INDEX > β€” one of the button-setup options, explained right below πŸ‘‡
  • -buttonalignment < VALUE > β€” one of the button-setup options, explained right below πŸ‘‡

Together, these options set the buttons that have to be used. For an explanation of these options, see the Curses::UI::Buttonbox documentation πŸ“š


πŸ’œ METHODS πŸ’œ

  • new ( HASH ) β€” standard method, bestie
  • layout ( ) β€” standard method
  • draw ( BOOLEAN ) β€” standard method
  • focus ( ) β€” standard method

These are standard methods. See Curses::UI::Container for an explanation of these 🧚

  • get ( ) β€” this method will call get on the buttons object of the dialog and return its returnvalue. See Curses::UI::Buttonbox for more information on this πŸ”₯

🌸 SEE ALSO 🌸

Curses::UI, Curses::UI::Container, Curses::UI::Buttonbox πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (c) 2001-2002 Maurice Makaay. All rights reserved. πŸ’–

Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de) ✨

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the same terms as perl itself 🌈


mwah πŸ’‹ that's the whole page, bestie β€” it's from perl v5.42.2, dated 2023-07-03, and it's the Curses:...g::Basic(3) manual page. bye 🫢

πŸ“¦ where this page comes from