home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tv20cpp.zip / tvision / msgbox.h < prev    next >
C/C++ Source or Header  |  1998-01-19  |  2KB  |  67 lines

  1. /*
  2.  * msgbox.h
  3.  *
  4.  * Turbo Vision - Version 2.0
  5.  *
  6.  * Copyright (c) 1994 by Borland International
  7.  * All Rights Reserved.
  8.  *
  9.  * Modified by Sergio Sigala <ssigala@globalnet.it>
  10.  */
  11.  
  12. #if defined( Uses_MsgBox ) && !defined( __MsgBox )
  13. #define __MsgBox
  14.  
  15. #include <stdarg.h>
  16.  
  17. class TRect;
  18.  
  19. ushort messageBox( const char *msg, ushort aOptions );
  20. ushort messageBox( unsigned aOptions, const char *msg, ... );
  21.  
  22. ushort messageBoxRect( const TRect &r, const char *msg, ushort aOptions );
  23. ushort messageBoxRect( const TRect &r, ushort aOptions, const char *msg, ... );
  24.  
  25. ushort inputBox( const char *Title, const char *aLabel, char *s, uchar limit );
  26.  
  27. ushort inputBoxRect( const TRect &bounds, const char *title,
  28.                      const char *aLabel, char *s, uchar limit );
  29.  
  30. const
  31.  
  32. //  Message box classes
  33.  
  34.     mfWarning      = 0x0000,       // Display a Warning box
  35.     mfError        = 0x0001,       // Dispaly a Error box
  36.     mfInformation  = 0x0002,       // Display an Information Box
  37.     mfConfirmation = 0x0003,       // Display a Confirmation Box
  38.  
  39. // Message box button flags
  40.  
  41.     mfYesButton    = 0x0100,       // Put a Yes button into the dialog
  42.     mfNoButton     = 0x0200,       // Put a No button into the dialog
  43.     mfOKButton     = 0x0400,       // Put an OK button into the dialog
  44.     mfCancelButton = 0x0800,       // Put a Cancel button into the dialog
  45.  
  46.     mfYesNoCancel  = mfYesButton | mfNoButton | mfCancelButton,
  47.                                     // Standard Yes, No, Cancel dialog
  48.     mfOKCancel     = mfOKButton | mfCancelButton;
  49.                                     // Standard OK, Cancel dialog
  50.  
  51. class MsgBoxText
  52. {
  53.  
  54. public:
  55.  
  56.     static const char * yesText;
  57.     static const char * noText;
  58.     static const char * okText;
  59.     static const char * cancelText;
  60.     static const char * warningText;
  61.     static const char * errorText;
  62.     static const char * informationText;
  63.     static const char * confirmText;
  64. };
  65.  
  66. #endif  // Uses_MsgBox
  67.