tbx  0.7.5
reporterror.h
1 /*
2  * tbx RISC OS toolbox library
3  *
4  * Copyright (C) 2010 Alan Buckley All Rights Reserved.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 
25 /*
26  * reporterror.h
27  *
28  * Created on: 10-Sep-2008
29  * Author: alanb
30  */
31 
32 #ifndef REPORTERROR_H_
33 #define REPORTERROR_H_
34 
35 #include "kernel.h"
36 #include <string>
37 
38 namespace tbx
39 {
43  enum ReportErrorReply {NONE, OK, CANCEL};
48  {
55  REF_CLOSE = 64
56  };
57 
58  ReportErrorReply report_error(_kernel_oserror *err, const char *title, int flags = 0);
59  ReportErrorReply report_error(_kernel_oserror *err, int flags = 0);
60  ReportErrorReply report_error(const char* msg, int flags = 0);
61  ReportErrorReply report_error(const char* msg, const char *title, int flags = 0);
62  ReportErrorReply report_error(const std::string &msg, int flags = 0);
63  ReportErrorReply report_error(const std::string &msg, const std::string &title, int flags = 0);
64 
66 }
67 
68 #endif /* REPORTERROR_H_ */
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
ReportErrorReply report_error(_kernel_oserror *err, const char *title, int flags)
Report an error using Wimp_ReportError to give the standard WIMP error reporting dialogue.
Definition: reporterror.cc:49
void report_error_close(ReportErrorReply reply)
Close the report error dialogue.
Definition: reporterror.cc:196
Provide a Cancel button.
Definition: reporterror.h:50
ReportErrorReply
Values returned from report error.
Definition: reporterror.h:43
Highlight the cancel button.
Definition: reporterror.h:51
Provide an OK button.
Definition: reporterror.h:49
Select one box depending on bit 0 and 1 and close window.
Definition: reporterror.h:55
ReportErrorFlags
Flags for report error.
Definition: reporterror.h:47
Don&#39;t prefix application name with error from title bar.
Definition: reporterror.h:53
In a text-style window do not prompt to continue.
Definition: reporterror.h:52
Return immediately leaving window open - Note you must close the box before the next WIMP poll...
Definition: reporterror.h:54