dolphin/Source/Core/DolphinWX/WxUtils.h
JosJuice 81466d7fa3 DolphinWX: Stop using XPM images
Using the XPM format for images has become a maintenance problem because
people don't know how to create them. This commit removes all XPM images
and all C files that contain PNG images. DolphinWX now uses the PNGs
in the Resources folder instead, just like DolphinQt and DolphinQt2 do.
2016-01-05 19:11:58 +01:00

39 lines
1.1 KiB
C++

// Copyright 2009 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <string>
#include <wx/string.h>
class wxBitmap;
class wxSize;
class wxToolBar;
namespace WxUtils
{
// Launch a file according to its mime type
void Launch(const std::string& filename);
// Launch an file explorer window on a certain path
void Explore(const std::string& path);
// Displays a wxMessageBox geared for errors
void ShowErrorDialog(const wxString& error_msg);
// Reads a PNG from the Resources folder
wxBitmap LoadResourceBitmap(const std::string& name, bool allow_2x = false);
wxBitmap LoadResourceBitmapPadded(const std::string& name, const wxSize& size);
// From a wxBitmap, creates the corresponding disabled version for toolbar buttons
wxBitmap CreateDisabledButtonBitmap(const wxBitmap& original);
// Helper function to add a button to a toolbar
void AddToolbarButton(wxToolBar* toolbar, int toolID, const wxString& label, const wxBitmap& bitmap, const wxString& shortHelp);
} // namespace
std::string WxStrToStr(const wxString& str);
wxString StrToWxStr(const std::string& str);