Back to home page

Bitcoin sources

 
 

    


0001 // Copyright (c) 2010 Satoshi Nakamoto
0002 // Copyright (c) 2011 The Bitcoin developers
0003 // Distributed under the MIT/X11 software license, see the accompanying
0004 // file license.txt or http://www.opensource.org/licenses/mit-license.php.
0005 #ifndef BITCOIN_NOUI_H
0006 #define BITCOIN_NOUI_H
0007 
0008 #include <string>
0009 #include <boost/function.hpp>
0010 #include "wallet.h"
0011 
0012 typedef void wxWindow;
0013 #define wxYES                   0x00000002
0014 #define wxOK                    0x00000004
0015 #define wxNO                    0x00000008
0016 #define wxYES_NO                (wxYES|wxNO)
0017 #define wxCANCEL                0x00000010
0018 #define wxAPPLY                 0x00000020
0019 #define wxCLOSE                 0x00000040
0020 #define wxOK_DEFAULT            0x00000000
0021 #define wxYES_DEFAULT           0x00000000
0022 #define wxNO_DEFAULT            0x00000080
0023 #define wxCANCEL_DEFAULT        0x80000000
0024 #define wxICON_EXCLAMATION      0x00000100
0025 #define wxICON_HAND             0x00000200
0026 #define wxICON_WARNING          wxICON_EXCLAMATION
0027 #define wxICON_ERROR            wxICON_HAND
0028 #define wxICON_QUESTION         0x00000400
0029 #define wxICON_INFORMATION      0x00000800
0030 #define wxICON_STOP             wxICON_HAND
0031 #define wxICON_ASTERISK         wxICON_INFORMATION
0032 #define wxICON_MASK             (0x00000100|0x00000200|0x00000400|0x00000800)
0033 #define wxFORWARD               0x00001000
0034 #define wxBACKWARD              0x00002000
0035 #define wxRESET                 0x00004000
0036 #define wxHELP                  0x00008000
0037 #define wxMORE                  0x00010000
0038 #define wxSETUP                 0x00020000
0039 
0040 inline int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
0041 {
0042     printf("%s: %s\n", caption.c_str(), message.c_str());
0043     fprintf(stderr, "%s: %s\n", caption.c_str(), message.c_str());
0044     return 4;
0045 }
0046 #define wxMessageBox  MyMessageBox
0047 
0048 inline int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1)
0049 {
0050     return MyMessageBox(message, caption, style, parent, x, y);
0051 }
0052 
0053 inline bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent)
0054 {
0055     return true;
0056 }
0057 
0058 inline void CalledSetStatusBar(const std::string& strText, int nField)
0059 {
0060 }
0061 
0062 inline void UIThreadCall(boost::function0<void> fn)
0063 {
0064 }
0065 
0066 inline void MainFrameRepaint()
0067 {
0068 }
0069 
0070 inline void InitMessage(const std::string &message)
0071 {
0072 }
0073 
0074 #endif