2013-04-18 03:43:35 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:43:35 +00:00
|
|
|
// Refer to the license.txt file included.
|
2009-03-20 19:12:04 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2009-02-24 19:31:32 +00:00
|
|
|
|
2013-02-28 04:37:38 +00:00
|
|
|
#include <string>
|
|
|
|
#include <wx/string.h>
|
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
class wxBitmap;
|
2014-08-16 04:16:14 +00:00
|
|
|
class wxToolBar;
|
2014-02-22 22:36:30 +00:00
|
|
|
|
|
|
|
// A shortcut to access the bitmaps
|
|
|
|
#define wxGetBitmapFromMemory(name) WxUtils::_wxGetBitmapFromMemory(name, sizeof(name))
|
|
|
|
|
2013-02-28 04:37:38 +00:00
|
|
|
namespace WxUtils
|
|
|
|
{
|
2009-03-20 19:12:04 +00:00
|
|
|
|
|
|
|
// Launch a file according to its mime type
|
2014-03-12 19:33:41 +00:00
|
|
|
void Launch(const std::string& filename);
|
2009-03-20 19:12:04 +00:00
|
|
|
|
|
|
|
// Launch an file explorer window on a certain path
|
2014-03-12 19:33:41 +00:00
|
|
|
void Explore(const std::string& path);
|
2009-08-07 08:52:04 +00:00
|
|
|
|
2014-07-25 01:46:46 +00:00
|
|
|
// Displays a wxMessageBox geared for errors
|
|
|
|
void ShowErrorDialog(const wxString& error_msg);
|
|
|
|
|
2014-02-22 22:36:30 +00:00
|
|
|
wxBitmap _wxGetBitmapFromMemory(const unsigned char* data, int length);
|
|
|
|
|
2014-08-16 04:16:14 +00:00
|
|
|
// 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);
|
|
|
|
|
2009-03-20 19:12:04 +00:00
|
|
|
} // namespace
|
|
|
|
|
2013-02-28 04:37:38 +00:00
|
|
|
std::string WxStrToStr(const wxString& str);
|
|
|
|
wxString StrToWxStr(const std::string& str);
|