You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.3 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Turbo Vision - Version 2.0
  3. *
  4. * Copyright (c) 1994 by Borland International
  5. * All Rights Reserved.
  6. *
  7. Modified by Robert H�hne to be used for RHIDE.
  8. Modified by Salvador E. Tropea.
  9. *
  10. *
  11. */
  12. #if defined( Uses_MsgBox ) && !defined( __MsgBox )
  13. #define __MsgBox
  14. #if !defined( __STDARG_H )
  15. #include <stdarg.h>
  16. #endif // __STDARG_H
  17. class TRect;
  18. ushort messageBox( const char *msg, ushort aOptions );
  19. ushort messageBox( ushort aOptions, const char *msg, ... )
  20. __attribute__ ((format (printf, 2, 3)));
  21. ushort messageBoxRect( const TRect &r, const char *msg, ushort aOptions );
  22. ushort messageBoxRect( const TRect &r, ushort aOptions, const char *msg, ... )
  23. __attribute__ ((format (printf, 3, 4)));
  24. ushort inputBox( const char *Title, const char *aLabel, char *s, int limit );
  25. ushort inputBoxRect( const TRect &bounds, const char *title,
  26. const char *aLabel, char *s, int limit );
  27. const ushort
  28. // Message box classes
  29. mfWarning = 0x0000, // Display a Warning box
  30. mfError = 0x0001, // Dispaly a Error box
  31. mfInformation = 0x0002, // Display an Information Box
  32. mfConfirmation = 0x0003, // Display a Confirmation Box
  33. // Message box button flags
  34. mfYesButton = 0x0100, // Put a Yes button into the dialog
  35. mfNoButton = 0x0200, // Put a No button into the dialog
  36. mfOKButton = 0x0400, // Put an OK button into the dialog
  37. mfCancelButton = 0x0800, // Put a Cancel button into the dialog
  38. // Special flag: Avoid translating this message, is already translated.
  39. mfDontTranslate = 0x4000,
  40. // Special flag: For the "Don't show it next time" field
  41. mfDontShowAgain = 0x8000,
  42. mfYesNoCancel = mfYesButton | mfNoButton | mfCancelButton,
  43. // Standard Yes, No, Cancel dialog
  44. mfOKCancel = mfOKButton | mfCancelButton;
  45. // Standard OK, Cancel dialog
  46. class MsgBoxText
  47. {
  48. public:
  49. // static const char * yesText;
  50. // static const char * noText;
  51. // static const char * okText;
  52. // static const char * cancelText;
  53. // static const char * warningText;
  54. // static const char * errorText;
  55. // static const char * informationText;
  56. // static const char * confirmText;
  57. };
  58. #endif // Uses_MsgBox