// Copyright (c) 2009-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_UI_H
+#define BITCOIN_UI_H
+
+#include <boost/function.hpp>
+#include "wallet.h"
DECLARE_EVENT_TYPE(wxEVT_UITHREADCALL, -1)
void HandleCtrlA(wxKeyEvent& event);
void UIThreadCall(boost::function0<void>);
-int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
-bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent);
-void CalledSetStatusBar(const string& strText, int nField);
+int ThreadSafeMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
+bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent);
+void CalledSetStatusBar(const std::string& strText, int nField);
void MainFrameRepaint();
void CreateMainWindow();
void SetStartOnSystemStartup(bool fAutoStart);
if (!fDaemon)
return wxMessageBox(message, caption, style, parent, x, y);
#endif
- printf("wxMessageBox %s: %s\n", string(caption).c_str(), string(message).c_str());
- fprintf(stderr, "%s: %s\n", string(caption).c_str(), string(message).c_str());
+ printf("wxMessageBox %s: %s\n", std::string(caption).c_str(), std::string(message).c_str());
+ fprintf(stderr, "%s: %s\n", std::string(caption).c_str(), std::string(message).c_str());
return wxOK;
}
#define wxMessageBox MyMessageBox
void OnMenuFileExit(wxCommandEvent& event);
void OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event);
void OnMenuOptionsChangeYourAddress(wxCommandEvent& event);
+ void OnMenuOptionsEncryptWallet(wxCommandEvent& event);
+ void OnMenuOptionsChangeWalletPassphrase(wxCommandEvent& event);
void OnMenuOptionsOptions(wxCommandEvent& event);
void OnMenuHelpAbout(wxCommandEvent& event);
void OnButtonSend(wxCommandEvent& event);
bool fRefresh;
void OnUIThreadCall(wxCommandEvent& event);
- int GetSortIndex(const string& strSort);
- void InsertLine(bool fNew, int nIndex, uint256 hashKey, string strSort, const wxColour& colour, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4, const wxString& str5);
+ int GetSortIndex(const std::string& strSort);
+ void InsertLine(bool fNew, int nIndex, uint256 hashKey, std::string strSort, const wxColour& colour, const wxString& str1, const wxString& str2, const wxString& str3, const wxString& str4, const wxString& str5);
bool DeleteLine(uint256 hashKey);
bool InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex=-1);
void RefreshListCtrl();
// Custom
bool fEnabledPrev;
- string strFromSave;
- string strMessageSave;
+ std::string strFromSave;
+ std::string strMessageSave;
};
void Close();
void Repaint();
bool Status();
- bool Status(const string& str);
- bool Error(const string& str);
+ bool Status(const std::string& str);
+ bool Error(const std::string& str);
void StartTransfer();
void OnReply2(CDataStream& vRecv);
void OnReply3(CDataStream& vRecv);
wxString GetSelectedAddress();
wxString GetSelectedSendingAddress();
wxString GetSelectedReceivingAddress();
- bool CheckIfMine(const string& strAddress, const string& strTitle);
+ bool CheckIfMine(const std::string& strAddress, const std::string& strTitle);
};
public:
/** Constructor */
CGetTextFromUserDialog(wxWindow* parent,
- const string& strCaption,
- const string& strMessage1,
- const string& strValue1="",
- const string& strMessage2="",
- const string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption)
+ const std::string& strCaption,
+ const std::string& strMessage1,
+ const std::string& strValue1="",
+ const std::string& strMessage2="",
+ const std::string& strValue2="") : CGetTextFromUserDialogBase(parent, wxID_ANY, strCaption)
{
int x = GetSize().GetWidth();
int y = GetSize().GetHeight();
}
// Custom
- string GetValue() { return (string)m_textCtrl1->GetValue(); }
- string GetValue1() { return (string)m_textCtrl1->GetValue(); }
- string GetValue2() { return (string)m_textCtrl2->GetValue(); }
+ std::string GetValue() { return (std::string)m_textCtrl1->GetValue(); }
+ std::string GetValue1() { return (std::string)m_textCtrl1->GetValue(); }
+ std::string GetValue2() { return (std::string)m_textCtrl2->GetValue(); }
};
DECLARE_EVENT_TABLE()
};
+
+#endif