mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Custom control: first implementation
This commit is contained in:
parent
e6ddcbab0c
commit
74d6aea4d4
8 changed files with 645 additions and 84 deletions
|
@ -168,7 +168,7 @@ public:
|
|||
bool set_undo_bitmap(const ScalableBitmap *bmp) {
|
||||
if (m_undo_bitmap != bmp) {
|
||||
m_undo_bitmap = bmp;
|
||||
m_Undo_btn->SetBitmap_(*bmp);
|
||||
// m_Undo_btn->SetBitmap_(*bmp);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -177,33 +177,33 @@ public:
|
|||
bool set_undo_to_sys_bitmap(const ScalableBitmap *bmp) {
|
||||
if (m_undo_to_sys_bitmap != bmp) {
|
||||
m_undo_to_sys_bitmap = bmp;
|
||||
m_Undo_to_sys_btn->SetBitmap_(*bmp);
|
||||
// m_Undo_to_sys_btn->SetBitmap_(*bmp);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool set_label_colour(const wxColour *clr) {
|
||||
if (m_Label == nullptr) return false;
|
||||
// if (m_Label == nullptr) return false;
|
||||
if (m_label_color != clr) {
|
||||
m_label_color = clr;
|
||||
m_Label->SetForegroundColour(*clr);
|
||||
m_Label->Refresh(true);
|
||||
// m_Label->SetForegroundColour(*clr);
|
||||
// m_Label->Refresh(true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool set_label_colour_force(const wxColour *clr) {
|
||||
if (m_Label == nullptr) return false;
|
||||
m_Label->SetForegroundColour(*clr);
|
||||
m_Label->Refresh(true);
|
||||
// m_Label->SetForegroundColour(*clr);
|
||||
// m_Label->Refresh(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool set_undo_tooltip(const wxString *tip) {
|
||||
if (m_undo_tooltip != tip) {
|
||||
m_undo_tooltip = tip;
|
||||
m_Undo_btn->SetToolTip(*tip);
|
||||
// m_Undo_btn->SetToolTip(*tip);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -212,7 +212,7 @@ public:
|
|||
bool set_undo_to_sys_tooltip(const wxString *tip) {
|
||||
if (m_undo_to_sys_tooltip != tip) {
|
||||
m_undo_to_sys_tooltip = tip;
|
||||
m_Undo_to_sys_btn->SetToolTip(*tip);
|
||||
// m_Undo_to_sys_btn->SetToolTip(*tip);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -235,6 +235,12 @@ public:
|
|||
|
||||
BlinkingBitmap* blinking_bitmap() const { return m_blinking_bmp;}
|
||||
|
||||
const ScalableBitmap* undo_bitmap() { return m_undo_bitmap; }
|
||||
const wxString* undo_tooltip() { return m_undo_tooltip; }
|
||||
const ScalableBitmap* undo_to_sys_bitmap() { return m_undo_to_sys_bitmap; }
|
||||
const wxString* undo_to_sys_tooltip() { return m_undo_to_sys_tooltip; }
|
||||
const wxColour* label_color() { return m_label_color; }
|
||||
|
||||
protected:
|
||||
RevertButton* m_Undo_btn = nullptr;
|
||||
// Bitmap and Tooltip text for m_Undo_btn. The wxButton will be updated only if the new wxBitmap pointer differs from the currently rendered one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue