2022-02-16 00:53:01 -05:00
|
|
|
|
// stdafx.h : include file for standard system include files,
|
|
|
|
|
// or project specific include files that are used frequently, but
|
|
|
|
|
// are changed infrequently
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#ifdef _NDEBUG
|
|
|
|
|
constexpr bool debug_mode = false;
|
|
|
|
|
#else
|
|
|
|
|
constexpr bool debug_mode = true;
|
|
|
|
|
#endif
|
|
|
|
|
static_assert(__cplusplus >= 201703L, "Out of date C syntax");
|
|
|
|
|
#ifdef _WIN64
|
|
|
|
|
constexpr bool b_WINDOWS = true;
|
|
|
|
|
#else
|
|
|
|
|
constexpr bool b_WINDOWS = false;
|
|
|
|
|
#endif
|
|
|
|
|
#define wxUSE_STATUSBAR 1
|
|
|
|
|
// For compilers that support precompilation, includes "wx/wx.h".
|
|
|
|
|
#include <wx/wxprec.h>
|
|
|
|
|
#include <wx/cmdline.h>
|
|
|
|
|
#ifndef WX_PRECOMP
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
|
#endif
|
|
|
|
|
#include <wx/filename.h>
|
|
|
|
|
#include <wx/modalhook.h>
|
|
|
|
|
#include <cstddef>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <array>
|
|
|
|
|
#include <algorithm> // for copy_n
|
|
|
|
|
#include <chrono>
|
|
|
|
|
#include <cstddef> // for ptrdiff_t
|
|
|
|
|
#include <cstdint> // for PTRDIFF_MAX
|
|
|
|
|
#include <bit>
|
|
|
|
|
#include <system_error> // for hash
|
|
|
|
|
#include <iterator> // for reverse_iterator, distance, random_access_...
|
|
|
|
|
#include <cstring>
|
|
|
|
|
#include <string> // for basic_string, allocator, char_traits
|
|
|
|
|
#include <initializer_list> // for initializer_list
|
2022-02-18 15:59:12 -05:00
|
|
|
|
#include <type_traits>
|
2022-02-16 00:53:01 -05:00
|
|
|
|
#include <memory> // for shared_ptr, unique_ptr
|
|
|
|
|
#include <span>
|
|
|
|
|
#include <string_view>
|
2022-02-18 15:59:12 -05:00
|
|
|
|
#include <utility>
|
2022-02-16 00:53:01 -05:00
|
|
|
|
|
|
|
|
|
//#include "wx/log.h"
|
|
|
|
|
#include "wx/config.h"
|
|
|
|
|
#include <wx/stdpaths.h>
|
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
|
//#include <wx/generic/stattextg.h>
|
|
|
|
|
//#include <wx/stc/stc.h>
|
|
|
|
|
//#include <wx/richtext/richtextctrl.h>
|
|
|
|
|
//#include <wx/commandlinkbutton.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#ifndef __STDCPP_THREADS__
|
|
|
|
|
//static_assert(false, "need threads and C++");
|
|
|
|
|
//#endif
|
|
|
|
|
//*#ifdef __STDC_NO_ATOMICS__
|
|
|
|
|
//static_assert(false, "want atomics");
|
|
|
|
|
//#endif
|
|
|
|
|
static_assert(wxUSE_UNSAFE_WXSTRING_CONV == 1,
|
|
|
|
|
R"(In fully utf environment, (wallet.manifest plus
|
|
|
|
|
/utf-8 compile option) all string conversions are safe.)");
|
2022-06-10 02:31:33 -04:00
|
|
|
|
static_assert(wxMAJOR_VERSION == 3 && wxMINOR_VERSION == 1 && wxRELEASE_NUMBER == 7 && wxSUBRELEASE_NUMBER == 0, "expecting wxWidgets 3.1.7");
|
2022-02-16 00:53:01 -05:00
|
|
|
|
static_assert(wxUSE_IPV6 == 1, "IP6 unavailable in wxWidgets");
|
|
|
|
|
static_assert(WXWIN_COMPATIBILITY_3_0 == 0, "wxWidgets api out of date");
|
|
|
|
|
static_assert(wxUSE_COMPILER_TLS == (b_WINDOWS ? 2 : 1), "out of date workarounds in wxWidgets for windows bugs");
|
|
|
|
|
static_assert(wxUSE_STD_CONTAINERS_COMPATIBLY == 1, "interoperability between stl and wxWidgets broken");
|
|
|
|
|
static_assert(wxUSE_STD_CONTAINERS == 1, "wxWidgets api out of date");
|
|
|
|
|
//static_assert(wxUSE_THREADS == 1, "want threads");
|
|
|
|
|
static_assert(wxUSE_STD_STRING_CONV_IN_WXSTRING == 1, "want wxString to conform to std::string");
|
|
|
|
|
static_assert(wxUSE_SECRETSTORE >0, "need wxSecretStore to actually work");
|
|
|
|
|
// The api may be there, but will always return false if wxUSE_SECRETSTORE is zero
|
|
|
|
|
std::span<uint8_t>& operator^=(std::span<byte>&, byte *);
|
|
|
|
|
#ifndef wxHAS_IMAGES_IN_RESOURCES
|
|
|
|
|
#include "rho.xpm" //Defines the icon AAArho on linux
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef __WXMSW__
|
|
|
|
|
#include <wx/msw/msvcrt.h> // redefines the new() operator
|
|
|
|
|
#endif
|
|
|
|
|
#define SODIUM_STATIC
|
|
|
|
|
#include <sodium.h>
|
|
|
|
|
#include <mpir.h>
|
|
|
|
|
#pragma comment(lib, "libsodium.lib")
|
|
|
|
|
inline wxString _wx(const char* sz) { return wxString::FromUTF8Unchecked(sz); }
|
|
|
|
|
#include "introspection_of_standard_C_types.h"
|
|
|
|
|
#include "rotime.h"
|
|
|
|
|
#include "slash6.h"
|
|
|
|
|
#include "ISqlite3.h"
|
|
|
|
|
#include "ristretto255.h"
|
|
|
|
|
#include "secrets.h"
|
|
|
|
|
#include "mpir_and_base58.h"
|
|
|
|
|
namespace testbed { extern void testbed(); }
|
|
|
|
|
enum MyIDs {
|
|
|
|
|
myID_DELETECONFIG = wxID_HIGHEST + 1, myID_ERRORMESSAGE, myID_Hello,
|
2022-04-02 22:07:41 -04:00
|
|
|
|
myID_MAINFRAME,
|
|
|
|
|
myID_MAINFRAME_PANEL, myID_TESTWINDOW, myID_WELCOME_TO_ROCOIN, myID_WALLET_UI,
|
|
|
|
|
mID_CLOSE_WALLET, myID_MYEXIT
|
2022-02-16 00:53:01 -05:00
|
|
|
|
};
|
2022-04-02 22:07:41 -04:00
|
|
|
|
#include "localization.h"
|
2022-02-16 00:53:01 -05:00
|
|
|
|
#include "db_accessors.h"
|
|
|
|
|
#include "app.h"
|
2022-04-02 22:07:41 -04:00
|
|
|
|
#include "frame.h"
|
2022-02-16 00:53:01 -05:00
|
|
|
|
#include "welcome_to_rhocoin.h"
|
|
|
|
|
#include "display_wallet.h"
|