Tyro/src/wx_common.h

55 lines
1.0 KiB
C
Raw Normal View History

2015-04-07 20:19:05 -04:00
/**
* Common header for widget classes
*/
2016-01-13 09:29:09 -05:00
#pragma once
#include "common.h"
// Disable annoying warning
#ifndef __WXMAC__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
#endif
#ifdef WX_PRECOMP
#include "wx_pch.h"
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
// Common helpers/functionality
#include <wx/debug.h>
#include <wx/utils.h>
#include <wx/version.h>
#include <wx/cmdline.h>
#include <wx/config.h>
2019-05-16 15:21:32 -04:00
#include <wx/display.h>
#include <wx/font.h>
2015-04-10 15:11:15 -04:00
#include <wx/stdpaths.h>
#include <wx/platinfo.h>
2015-04-10 15:11:15 -04:00
#include <wx/filename.h>
2015-04-16 09:37:20 -04:00
#include <wx/artprov.h>
2015-04-10 15:11:15 -04:00
#ifndef __WXMAC__
#pragma clang diagnostic pop
#endif
2019-05-16 15:21:32 -04:00
/**
* Calculate original window size based on size of the current monitor
*/
wxSize static CalculateWindowSize()
{
2019-05-16 15:21:32 -04:00
wxDisplay display;
wxVideoMode mode = display.GetCurrentMode();
wxLogDebug("Current display: %ix%i", mode.w, mode.h);
wxSize base((int)((float)mode.w * 0.9), (int)((float)mode.h * 0.9));
return base;
}
// Tyro-specific variables
2019-05-16 15:21:32 -04:00
#include "definitions.h"