Classes | Typedefs
core/vgui/vgui_dialog.h File Reference

Abstract dialog class. More...

#include <vcl_string.h>
#include <vcl_vector.h>
#include <vgui/vgui_tableau.h>
#include <vgui/vgui_command_sptr.h>

Go to the source code of this file.

Classes

class  vgui_dialog

Typedefs

typedef void(* vgui_dialog_callback )(void const *client_data)
 Abstract dialog class.
typedef void(* vgui_dialog_callback_no_client_data )()

Detailed Description

Abstract dialog class.

Author:
Philip C. Pritchett, Robotics Research Group, University of Oxford
Date:
23 Oct 1999
    Modifications
     23-OCT-1999 P.Pritchett - Initial version.
     25-JAN-2000 K.Y.McGaul - Added message() to allow text messages in dialogs.
     27-JAN-2000 K.Y.McGaul - Added set_modal() to allow non-modal dialogs.
     24-FEB-2000 K.Y.McGaul - Added file browser and color chooser.
     11-JUL-2000 Marko Bacic - Added inline file browser
     12-JUL-2000 Marko Bacic - Added inline color chooser
     26-APR-2002 K.Y.McGaul - Converted to doxygen style comments.
     02-JAN-2010 Lianqing Yu - Added controls including push button.
   

Definition in file vgui_dialog.h.


Typedef Documentation

typedef void(* vgui_dialog_callback)(void const *client_data)

Abstract dialog class.

vgui_dialog allows the user to build a dialog from a collection of fields. A field in this context consists of a vcl_string label and a variable. The dialog is then posted using the ask() method. If ask returns true then any changes to the fields in the dialog are used to update the variables. Each vgui_dialog contains an instance of a concrete subclass of vgui_dialog_impl. The type of the subclass will be determined by the GUI being used.

Example
   vgui_dialog params("My params");
   params.field("Table number", the_table);
   params.choice("Dressing", "French", "Thousand Island", the_dressing);
   params.checkbox("Mayo?", has_mayo);
   params.message("No smoking is allowed in the restaurant!");
   if (!params.ask())
     return; // cancelled
   send_order(the_table, the_dressing, has_mayo);

Definition at line 54 of file vgui_dialog.h.

Definition at line 55 of file vgui_dialog.h.