mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
168
src/slic3r/GUI/ParamsPanel.hpp
Normal file
168
src/slic3r/GUI/ParamsPanel.hpp
Normal file
|
@ -0,0 +1,168 @@
|
|||
#ifndef slic3r_params_panel_hpp_
|
||||
#define slic3r_params_panel_hpp_
|
||||
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/tglbtn.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
#include "wxExtensions.hpp"
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
|
||||
class SwitchButton;
|
||||
class StaticBox;
|
||||
|
||||
#define TIPS_DIALOG_BUTTON_SIZE wxSize(FromDIP(60), FromDIP(24))
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class TipsDialog : public DPIDialog
|
||||
{
|
||||
private:
|
||||
bool m_show_again{false};
|
||||
|
||||
public:
|
||||
TipsDialog(wxWindow *parent, const wxString &title);
|
||||
Button *m_confirm{nullptr};
|
||||
Button *m_cancel{nullptr};
|
||||
wxPanel *m_top_line{nullptr};
|
||||
wxStaticText *m_msg;
|
||||
|
||||
protected:
|
||||
void on_dpi_changed(const wxRect &suggested_rect) override;
|
||||
void on_ok(wxMouseEvent &event);
|
||||
wxBoxSizer *create_item_checkbox(wxString title, wxWindow *parent, wxString tooltip, std::string param);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class ParamsPanel
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class ParamsPanel : public wxPanel
|
||||
{
|
||||
#if __WXOSX__
|
||||
wxWindow* m_tmp_panel;
|
||||
int m_size_move = -1;
|
||||
#endif // __WXOSX__
|
||||
|
||||
private:
|
||||
void free_sizers();
|
||||
void delete_subwindows();
|
||||
void refresh_tabs();
|
||||
|
||||
protected:
|
||||
wxBoxSizer* m_top_sizer { nullptr };
|
||||
wxBoxSizer* m_left_sizer { nullptr };
|
||||
wxBoxSizer* m_mode_sizer { nullptr };
|
||||
// // BBS: new layout
|
||||
StaticBox* m_top_panel{ nullptr };
|
||||
ScalableButton* m_process_icon{ nullptr };
|
||||
wxStaticText* m_title_label { nullptr };
|
||||
SwitchButton* m_mode_region { nullptr };
|
||||
wxStaticBitmap* m_tips_arrow{ nullptr };
|
||||
bool m_tips_arror_blink{false};
|
||||
wxStaticText* m_title_view { nullptr };
|
||||
SwitchButton* m_mode_view { nullptr };
|
||||
//wxBitmapButton* m_search_button { nullptr };
|
||||
wxStaticLine* m_staticline_print { nullptr };
|
||||
//wxBoxSizer* m_print_sizer { nullptr };
|
||||
wxPanel* m_tab_print { nullptr };
|
||||
wxPanel* m_tab_print_object { nullptr };
|
||||
wxStaticLine* m_staticline_print_object { nullptr };
|
||||
wxPanel* m_tab_print_part { nullptr };
|
||||
wxStaticLine* m_staticline_print_part { nullptr };
|
||||
wxStaticLine* m_staticline_filament { nullptr };
|
||||
//wxBoxSizer* m_filament_sizer { nullptr };
|
||||
wxPanel* m_tab_filament { nullptr };
|
||||
wxStaticLine* m_staticline_printer { nullptr };
|
||||
//wxBoxSizer* m_printer_sizer { nullptr };
|
||||
wxPanel* m_tab_printer { nullptr };
|
||||
//wxStaticLine* m_staticline_buttons { nullptr };
|
||||
// BBS: new layout
|
||||
wxBoxSizer* m_button_sizer { nullptr };
|
||||
wxWindow* m_export_to_file { nullptr };
|
||||
wxWindow* m_import_from_file { nullptr };
|
||||
//wxStaticLine* m_staticline_middle{ nullptr };
|
||||
//wxBoxSizer* m_right_sizer { nullptr };
|
||||
wxScrolledWindow* m_page_view { nullptr };
|
||||
wxBoxSizer* m_page_sizer { nullptr };
|
||||
|
||||
ScalableButton* m_setting_btn { nullptr };
|
||||
ScalableButton* m_search_btn { nullptr };
|
||||
ScalableButton* m_compare_btn { nullptr };
|
||||
|
||||
wxBitmap m_toggle_on_icon;
|
||||
wxBitmap m_toggle_off_icon;
|
||||
wxBitmap m_tips_arrow_icon;
|
||||
|
||||
wxPanel* m_current_tab { nullptr };
|
||||
|
||||
struct Highlighter
|
||||
{
|
||||
void set_timer_owner(wxEvtHandler *owner, int timerid = wxID_ANY);
|
||||
void init(std::pair<wxStaticBitmap *, bool *>, wxWindow *parent = nullptr);
|
||||
void blink();
|
||||
void invalidate();
|
||||
|
||||
private:
|
||||
wxStaticBitmap *m_bitmap { nullptr };
|
||||
bool * m_show_blink_ptr{nullptr};
|
||||
int m_blink_counter{0};
|
||||
wxTimer m_timer;
|
||||
wxWindow * m_parent { nullptr };
|
||||
} m_highlighter;
|
||||
|
||||
void OnToggled(wxCommandEvent& event);
|
||||
|
||||
public:
|
||||
ParamsPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1800,1080 ), long style = wxTAB_TRAVERSAL, const wxString& type = wxEmptyString );
|
||||
~ParamsPanel();
|
||||
|
||||
void init_bitmaps();
|
||||
void rebuild_panels();
|
||||
void create_layout();
|
||||
//clear the right page
|
||||
void clear_page();
|
||||
void OnActivate();
|
||||
void set_active_tab(wxPanel*tab);
|
||||
bool is_active_and_shown_tab(wxPanel*tab);
|
||||
void update_mode();
|
||||
void msw_rescale();
|
||||
void switch_to_global();
|
||||
void switch_to_object(bool with_tips = false);
|
||||
|
||||
StaticBox* get_top_panel() { return m_top_panel; }
|
||||
|
||||
wxPanel* filament_panel() { return m_tab_filament; }
|
||||
|
||||
wxScrolledWindow* get_paged_view() { return m_page_view;}
|
||||
wxPanel* get_current_tab() { return m_current_tab; }
|
||||
|
||||
};
|
||||
|
||||
} // GUI
|
||||
} // Slic3r
|
||||
|
||||
#endif //slic3r_params_panel_hpp_
|
Loading…
Add table
Add a link
Reference in a new issue