ENH: Add label if the button can not be used

jira: [STUDIO-12929]
Change-Id: Ia4026282a44fd1a83a4292d7a7d11d43ed035db6
(cherry picked from commit e65755a474bc36bee0f22b7a6fb9c7eb5f86be65)
This commit is contained in:
xin.zhang
2025-07-01 16:50:21 +08:00
committed by Noisyfox
parent d4115e0837
commit 0bbd563a79
5 changed files with 120 additions and 25 deletions

View File

@@ -26,6 +26,7 @@ enum class ButtonType{
Expanded , // Font14 Semi-Rounded For full length buttons. ex. buttons in static box
};
class wxTipWindow;
class Button : public StaticBox
{
wxRect textSize;
@@ -42,6 +43,8 @@ class Button : public StaticBox
bool isCenter = true;
bool vertical = false;
wxTipWindow* tipWindow = nullptr;
static const int buttonWidth = 200;
static const int buttonHeight = 50;
@@ -74,6 +77,7 @@ public:
void SetSelected(bool selected = true) { m_selected = selected; }
bool Enable(bool enable = true) override;
void EnableTooltipEvenDisabled();// The tip will be shown even if the button is disabled
void SetCanFocus(bool canFocus) override;
@@ -111,8 +115,13 @@ private:
void mouseCaptureLost(wxMouseCaptureLostEvent &event);
void keyDownUp(wxKeyEvent &event);
//
void sendButtonEvent();
// parent motion
void OnParentMotion(wxMouseEvent& event);
void OnParentLeave(wxMouseEvent& event);
DECLARE_EVENT_TABLE()
};