core/vgui/internals/vgui_dialog_field.h
Go to the documentation of this file.
00001 // This is core/vgui/internals/vgui_dialog_field.h
00002 #ifndef vgui_dialog_field_h_
00003 #define vgui_dialog_field_h_
00004 //:
00005 // \file
00006 // \author Philip C. Pritchett, Robotics Research Group, University of Oxford
00007 // \date   23 Oct 99
00008 // \brief  Represents a field in a dialog.
00009 //
00010 // \verbatim
00011 //  Modifications
00012 //   23-OCT-1999 P.Pritchett - Initial version.
00013 //   10-SEP-2004 Peter Vanroose  Inlined all 1-line methods in class decl
00014 // \endverbatim
00015 
00016 #include <vcl_string.h>
00017 
00018 //: Represents a field in a dialog.
00019 //
00020 //  vgui_dialog_field represents a field in a vgui_dialog. It is the base class for
00021 //  all dialog fields so far. It has abstract functions for synchronising its
00022 //  stored value with a vcl_string
00023 class vgui_dialog_field
00024 {
00025  public:
00026   vcl_string label;
00027 
00028   // Constructors/Destructors--------------------------------------------------
00029   vgui_dialog_field(const char* text) : label(text) {}
00030   virtual ~vgui_dialog_field() {}
00031 
00032   virtual vcl_string current_value() const = 0;
00033   virtual bool update_value(const vcl_string& s) = 0;
00034 };
00035 
00036 #endif // vgui_dialog_field_h_