summaryrefslogtreecommitdiff
path: root/tvision/include/tv/msgbox.h
blob: 70829a74a05cfa5e90ac497a34d08da2cce4b492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
 *      Turbo Vision - Version 2.0
 *
 *      Copyright (c) 1994 by Borland International
 *      All Rights Reserved.
 *

Modified by Robert H”hne to be used for RHIDE.
Modified by Salvador E. Tropea.

 *
 *
 */

#if defined( Uses_MsgBox ) && !defined( __MsgBox )
#define __MsgBox

#if !defined( __STDARG_H )
#include <stdarg.h>
#endif  // __STDARG_H

class TRect;
class TValidator;

ushort CLY_EXPORT messageBox( const char *msg, ushort aOptions );
ushort CLY_EXPORT messageBox( ushort aOptions, const char *msg, ... )
                __attribute__ ((format (printf, 2, 3)));

ushort CLY_EXPORT messageBoxRect( const TRect &r, const char *msg, ushort aOptions );
ushort CLY_EXPORT messageBoxRect( const TRect &r, ushort aOptions, const char *msg, ... )
                __attribute__ ((format (printf, 3, 4)));

ushort CLY_EXPORT inputBox( const char *Title, const char *aLabel, char *s, int limit,
                            TValidator *aVal=NULL);

ushort CLY_EXPORT inputBoxRect( const TRect &bounds, const char *title,
                                const char *aLabel, char *s, int limit,
                                TValidator *aVal=NULL);

const ushort

//  Message box classes

    mfWarning      = 0x0000,       // Display a Warning box
    mfError        = 0x0001,       // Dispaly a Error box
    mfInformation  = 0x0002,       // Display an Information Box
    mfConfirmation = 0x0003,       // Display a Confirmation Box

// Message box button flags

    mfYesButton    = 0x0100,       // Put a Yes button into the dialog
    mfNoButton     = 0x0200,       // Put a No button into the dialog
    mfOKButton     = 0x0400,       // Put an OK button into the dialog
    mfCancelButton = 0x0800,       // Put a Cancel button into the dialog

// Special flag: Avoid translating this message, is already translated.
    mfDontTranslate = 0x4000,
// Special flag: For the "Don't show it next time" field
    mfDontShowAgain = 0x8000,

    mfYesNoCancel  = mfYesButton | mfNoButton | mfCancelButton,
                                    // Standard Yes, No, Cancel dialog
    mfOKCancel     = mfOKButton | mfCancelButton;
                                    // Standard OK, Cancel dialog

class CLY_EXPORT MsgBoxText
{

public:

//    static const char * yesText;
//    static const char * noText;
//    static const char * okText;
//    static const char * cancelText;
//    static const char * warningText;
//    static const char * errorText;
//    static const char * informationText;
//    static const char * confirmText;
};

#endif  // Uses_MsgBox