mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-01 06:16:58 +00:00
build: clear 54 dead private fields 54 of the 161 -Wunused-private-field warnings, across 31 files. These are the ones needing no judgment. Each member is declared once and appears nowhere else in src/, counting the .mm and .c sources as well as .cpp and .hpp, so nothing writes them and nothing reads them. Every removal is a whole line, and no declaration shares a line with another member. The remaining 107 are left alone. Those members are mentioned elsewhere, usually assigned and never read, where the fix might be deleting the member or might be restoring a read that went missing.
115 lines
3.1 KiB
C++
115 lines
3.1 KiB
C++
#pragma once
|
|
|
|
#include "wx/wxprec.h"
|
|
#include "wx/aui/auibar.h"
|
|
|
|
#include "SelectMachine.hpp"
|
|
#include "DeviceManager.hpp"
|
|
|
|
#include <wx/control.h>
|
|
|
|
using namespace Slic3r::GUI;
|
|
|
|
class CenteredTitle : public wxControl
|
|
{
|
|
public:
|
|
CenteredTitle(wxWindow* parent);
|
|
void SetTitle(const wxString& title);
|
|
|
|
wxSize DoGetBestSize() const override;
|
|
|
|
protected:
|
|
#ifdef __WXMSW__
|
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) override;
|
|
#endif
|
|
|
|
private:
|
|
wxString m_title;
|
|
};
|
|
|
|
class BBLTopbar : public wxAuiToolBar
|
|
{
|
|
public:
|
|
BBLTopbar(wxWindow* pwin, wxFrame* parent);
|
|
BBLTopbar(wxFrame* parent);
|
|
void Init(wxFrame *parent);
|
|
~BBLTopbar();
|
|
void UpdateToolbarWidth(int width);
|
|
void Rescale();
|
|
void OnIconize(wxAuiToolBarEvent& event);
|
|
void OnFullScreen(wxAuiToolBarEvent& event);
|
|
void OnCloseFrame(wxAuiToolBarEvent& event);
|
|
void OnFileToolItem(wxAuiToolBarEvent& evt);
|
|
void OnDropdownToolItem(wxAuiToolBarEvent& evt);
|
|
void OnCalibToolItem(wxAuiToolBarEvent &evt);
|
|
void OnMouseLeftDClock(wxMouseEvent& mouse);
|
|
void OnMouseLeftDown(wxMouseEvent& event);
|
|
void OnMouseLeftUp(wxMouseEvent& event);
|
|
void OnMouseMotion(wxMouseEvent& event);
|
|
void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
|
|
void OnMenuClose(wxMenuEvent& event);
|
|
void OnOpenProject(wxAuiToolBarEvent& event);
|
|
//void show_publish_button(bool show);
|
|
void OnSaveProject(wxAuiToolBarEvent& event);
|
|
void OnUndo(wxAuiToolBarEvent& event);
|
|
void OnRedo(wxAuiToolBarEvent& event);
|
|
void OnModelStoreClicked(wxAuiToolBarEvent& event);
|
|
void OnPublishClicked(wxAuiToolBarEvent &event);
|
|
|
|
wxAuiToolBarItem* FindToolByCurrentPosition();
|
|
|
|
void SetFileMenu(wxMenu* file_menu);
|
|
void AddDropDownSubMenu(wxMenu* sub_menu, const wxString& title);
|
|
void AddDropDownMenuItem(wxMenuItem* menu_item);
|
|
wxMenu *GetTopMenu();
|
|
wxMenu *GetCalibMenu();
|
|
void SetTitle(wxString title);
|
|
void SetMaximizedSize();
|
|
void SetWindowSize();
|
|
|
|
void EnableUndoRedoItems();
|
|
void DisableUndoRedoItems();
|
|
|
|
void SaveNormalRect();
|
|
|
|
void ShowCalibrationButton(bool show = true);
|
|
|
|
protected:
|
|
#ifdef __WXMSW__
|
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) override;
|
|
#endif
|
|
|
|
private:
|
|
wxFrame* m_frame;
|
|
wxAuiToolBarItem* m_file_menu_item;
|
|
wxAuiToolBarItem* m_dropdown_menu_item;
|
|
wxRect m_normalRect;
|
|
wxPoint m_delta;
|
|
wxPoint m_last_mouse_position{wxDefaultPosition};
|
|
wxMenu m_top_menu;
|
|
wxMenu* m_file_menu;
|
|
wxMenu m_calib_menu;
|
|
|
|
CenteredTitle* m_title_ctrl { nullptr };
|
|
wxString m_titleText;
|
|
|
|
wxAuiToolBarItem* m_model_store_item;
|
|
|
|
//wxAuiToolBarItem *m_publish_item;
|
|
wxAuiToolBarItem* m_undo_item;
|
|
wxAuiToolBarItem* m_redo_item;
|
|
wxAuiToolBarItem* m_calib_item;
|
|
wxAuiToolBarItem* maximize_btn;
|
|
|
|
wxBitmap m_publish_bitmap;
|
|
wxBitmap m_publish_disable_bitmap;
|
|
|
|
wxBitmap maximize_bitmap;
|
|
wxBitmap window_bitmap;
|
|
|
|
int m_toolbar_h;
|
|
bool m_skip_popup_file_menu;
|
|
bool m_skip_popup_dropdown_menu;
|
|
bool m_skip_popup_calib_menu;
|
|
};
|