#include "wx/bitmap.h"
#include "wx/colour.h"
#include "wx/font.h"
+ #include "wx/math.h"
#endif
const wxBrush* wxStockGDI::GetBrush(Item item)
{
- wxBrush* brush = wx_static_cast(wxBrush*, ms_stockObject[item]);
+ wxBrush* brush = static_cast<wxBrush*>(ms_stockObject[item]);
if (brush == NULL)
{
switch (item)
const wxColour* wxStockGDI::GetColour(Item item)
{
- wxColour* colour = wx_static_cast(wxColour*, ms_stockObject[item]);
+ wxColour* colour = static_cast<wxColour*>(ms_stockObject[item]);
if (colour == NULL)
{
switch (item)
const wxCursor* wxStockGDI::GetCursor(Item item)
{
- wxCursor* cursor = wx_static_cast(wxCursor*, ms_stockObject[item]);
+ wxCursor* cursor = static_cast<wxCursor*>(ms_stockObject[item]);
if (cursor == NULL)
{
switch (item)
const wxFont* wxStockGDI::GetFont(Item item)
{
- wxFont* font = wx_static_cast(wxFont*, ms_stockObject[item]);
+ wxFont* font = static_cast<wxFont*>(ms_stockObject[item]);
if (font == NULL)
{
switch (item)
const wxPen* wxStockGDI::GetPen(Item item)
{
- wxPen* pen = wx_static_cast(wxPen*, ms_stockObject[item]);
+ wxPen* pen = static_cast<wxPen*>(ms_stockObject[item]);
if (pen == NULL)
{
switch (item)
wxDELETE(wxTheBrushList);
wxDELETE(wxThePenList);
wxDELETE(wxTheFontList);
+
+ // wxTheColourDatabase is cleaned up by wxAppBase::CleanUp()
}
// ============================================================================
{
for (wxList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext())
{
- delete wx_static_cast(wxObject*, node->GetData());
+ delete static_cast<wxObject*>(node->GetData());
}
}
return wxSize(x, y);
}
+wxSize wxGetDisplayPPI()
+{
+ const wxSize pixels = wxGetDisplaySize();
+ const wxSize mm = wxGetDisplaySizeMM();
+
+ return wxSize((int)((pixels.x * inches2mm) / mm.x),
+ (int)((pixels.y * inches2mm) / mm.y));
+}
+
wxResourceCache::~wxResourceCache ()
{
wxList::compatibility_iterator node = GetFirst ();