PrusaSlicer-NonPlainar/src/slic3r/GUI/KBShortcutsDialog.hpp

47 lines
1.1 KiB
C++
Raw Normal View History

2018-12-19 12:06:24 +00:00
#ifndef slic3r_GUI_KBShortcutsDialog_hpp_
#define slic3r_GUI_KBShortcutsDialog_hpp_
#include <wx/wx.h>
#include <map>
#include <vector>
2018-12-19 12:06:24 +00:00
#include "GUI_Utils.hpp"
#include "wxExtensions.hpp"
#define ENABLE_SCROLLABLE 1
2018-12-19 12:06:24 +00:00
namespace Slic3r {
namespace GUI {
class KBShortcutsDialog : public DPIDialog
2018-12-19 12:06:24 +00:00
{
typedef std::pair<std::string, std::string> Shortcut;
typedef std::vector<Shortcut> Shortcuts;
typedef std::vector<std::pair<wxString, Shortcuts>> ShortcutsVec;
2018-12-19 12:06:24 +00:00
ShortcutsVec m_full_shortcuts;
ScalableBitmap m_logo_bmp;
wxStaticBitmap* m_header_bitmap;
#if ENABLE_SCROLLABLE
std::vector<wxPanel*> m_pages;
#endif // ENABLE_SCROLLABLE
2018-12-19 12:06:24 +00:00
public:
KBShortcutsDialog();
protected:
void on_dpi_changed(const wxRect &suggested_rect) override;
2018-12-19 12:06:24 +00:00
private:
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);
2018-12-19 12:06:24 +00:00
};
} // namespace GUI
} // namespace Slic3r
#endif