Use a messagebox to display the error when -server is provided without providing...
[novacoin.git] / src / noui.h
index d108184..0bbf45a 100644 (file)
@@ -1,7 +1,13 @@
 // Copyright (c) 2010 Satoshi Nakamoto
+// Copyright (c) 2011 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file license.txt or http://www.opensource.org/licenses/mit-license.php.
+#ifndef BITCOIN_NOUI_H
+#define BITCOIN_NOUI_H
 
+#include <string>
+#include <boost/function.hpp>
+#include "wallet.h"
 
 typedef void wxWindow;
 #define wxYES                   0x00000002
@@ -30,8 +36,10 @@ typedef void wxWindow;
 #define wxHELP                  0x00008000
 #define wxMORE                  0x00010000
 #define wxSETUP                 0x00020000
+// Force blocking, modal message box dialog (not just notification)
+#define wxMODAL                 0x00040000
 
-inline int MyMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
+inline int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
 {
     printf("%s: %s\n", caption.c_str(), message.c_str());
     fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str());
@@ -39,17 +47,17 @@ inline int MyMessageBox(const string& message, const string& caption="Message",
 }
 #define wxMessageBox  MyMessageBox
 
-inline int ThreadSafeMessageBox(const string& message, const string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
+inline int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
 {
     return MyMessageBox(message, caption, style, parent, x, y);
 }
 
-inline bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent)
+inline bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
 {
     return true;
 }
 
-inline void CalledSetStatusBar(const string& strText, int nField)
+inline void CalledSetStatusBar(const std::string& strText, int nField)
 {
 }
 
@@ -60,3 +68,9 @@ inline void UIThreadCall(boost::function0<void> fn)
 inline void MainFrameRepaint()
 {
 }
+
+inline void InitMessage(const std::string &message)
+{
+}
+
+#endif