2018-12-19 12:06:24 +00:00
|
|
|
#ifndef slic3r_GUI_KBShortcutsDialog_hpp_
|
|
|
|
#define slic3r_GUI_KBShortcutsDialog_hpp_
|
|
|
|
|
|
|
|
#include <wx/wx.h>
|
|
|
|
#include <map>
|
2019-03-02 06:40:24 +00:00
|
|
|
#include <vector>
|
2018-12-19 12:06:24 +00:00
|
|
|
|
2019-04-18 00:03:40 +00:00
|
|
|
#include "GUI_Utils.hpp"
|
|
|
|
#include "wxExtensions.hpp"
|
|
|
|
|
2020-02-12 10:25:36 +00:00
|
|
|
#define ENABLE_SCROLLABLE 1
|
|
|
|
|
2018-12-19 12:06:24 +00:00
|
|
|
namespace Slic3r {
|
|
|
|
namespace GUI {
|
|
|
|
|
2019-04-24 23:45:00 +00:00
|
|
|
class KBShortcutsDialog : public DPIDialog
|
2018-12-19 12:06:24 +00:00
|
|
|
{
|
|
|
|
typedef std::pair<std::string, std::string> Shortcut;
|
2020-02-12 07:49:56 +00:00
|
|
|
typedef std::vector<Shortcut> Shortcuts;
|
|
|
|
typedef std::vector<std::pair<wxString, Shortcuts>> ShortcutsVec;
|
2018-12-19 12:06:24 +00:00
|
|
|
|
2020-02-12 07:49:56 +00:00
|
|
|
ShortcutsVec m_full_shortcuts;
|
|
|
|
ScalableBitmap m_logo_bmp;
|
|
|
|
wxStaticBitmap* m_header_bitmap;
|
2020-02-12 10:25:36 +00:00
|
|
|
#if ENABLE_SCROLLABLE
|
|
|
|
std::vector<wxPanel*> m_pages;
|
|
|
|
#endif // ENABLE_SCROLLABLE
|
2018-12-19 12:06:24 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
KBShortcutsDialog();
|
|
|
|
|
2019-04-18 00:03:40 +00:00
|
|
|
protected:
|
|
|
|
void on_dpi_changed(const wxRect &suggested_rect) override;
|
|
|
|
|
2018-12-19 12:06:24 +00:00
|
|
|
private:
|
2020-02-11 13:27:44 +00:00
|
|
|
void fill_shortcuts();
|
|
|
|
|
|
|
|
wxPanel* create_header(wxWindow* parent, const wxFont& bold_font);
|
|
|
|
wxPanel* create_page(wxWindow* parent, const std::pair<wxString, Shortcuts>& shortcuts, const wxFont& font, const wxFont& bold_font);
|
2020-02-12 10:25:36 +00:00
|
|
|
|
2018-12-19 12:06:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace GUI
|
|
|
|
} // namespace Slic3r
|
|
|
|
|
|
|
|
#endif
|