wallet/stdafx.h
Cheng 137a78735b
Fixing window switches within the frame
Painfully discovered that wxWidgets does not like it
if you do not handle the close event.  Default
handling is broken, perhaps unavoidably because the base
object does not know about the derived object.
2022-04-03 12:07:41 +10:00

107 lines
3.6 KiB
C++

// 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
#include <type_traits>
#include <memory> // for shared_ptr, unique_ptr
#include <span>
#include <string_view>
#include <utility>
//#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.)");
static_assert(wxMAJOR_VERSION == 3 && wxMINOR_VERSION == 1 && wxRELEASE_NUMBER == 5 && wxSUBRELEASE_NUMBER == 0, "expecting wxWidgets 3.1.5");
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,
myID_MAINFRAME,
myID_MAINFRAME_PANEL, myID_TESTWINDOW, myID_WELCOME_TO_ROCOIN, myID_WALLET_UI,
mID_CLOSE_WALLET, myID_MYEXIT
};
#include "localization.h"
#include "db_accessors.h"
#include "app.h"
#include "frame.h"
#include "welcome_to_rhocoin.h"
#include "display_wallet.h"