source: filezilla/trunk/fuentes/src/interface/themeprovider.h @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 1.3 KB
Line 
1#ifndef __THEMEPROVIDER_H__
2#define __THEMEPROVIDER_H__
3
4#include <option_change_event_handler.h>
5#include <memory>
6
7enum iconSize
8{
9        iconSizeSmall,
10        iconSize24,
11        iconSizeNormal,
12        iconSizeLarge
13};
14
15class CThemeProvider : public wxArtProvider, protected COptionChangeEventHandler
16{
17public:
18        CThemeProvider();
19        virtual ~CThemeProvider();
20
21        static std::vector<wxString> GetThemes();
22        static std::vector<std::unique_ptr<wxBitmap>> GetAllImages(const wxString& theme, const wxSize& size);
23        static bool GetThemeData(const wxString& themePath, wxString& name, wxString& author, wxString& email);
24        static std::vector<wxString> GetThemeSizes(const wxString& themePath);
25        static wxIconBundle GetIconBundle(const wxArtID& id, const wxArtClient& client = wxART_OTHER);
26        static bool ThemeHasSize(const wxString& themePath, const wxString& size);
27
28        static wxSize GetIconSize(wxString const& str);
29        static wxSize GetIconSize(enum iconSize size);
30
31        static CThemeProvider* Get();
32
33        wxAnimation CreateAnimation(const wxArtID& id, const wxSize& size);
34protected:
35        static wxString GetThemePath();
36
37        wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& /*client*/, const wxSize& size);
38
39        std::list<wxString> GetSearchDirs(const wxSize& size);
40
41        virtual void OnOptionsChanged(changed_options_t const& options);
42
43        wxString m_themePath;
44};
45
46#endif //__THEMEPROVIDER_H__
Note: See TracBrowser for help on using the repository browser.