mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-21 14:50:06 +02:00
Highlighting; click (either mouse button) on the right area opens menus
Menu triangle appears in bushbutton when pointer is near bottom; ... Highlight around pushbuttons for mouse-over Fit both height and width when choosing the font size Improve the logic for tool tips Put the scrub bar enabling item back in the menu, topmost, before a separator
This commit is contained in:
commit
5629fb8233
@ -1774,6 +1774,9 @@ BEGIN_EVENT_TABLE(AdornedRulerPanel, wxPanel)
|
|||||||
EVT_MENU(OnAutoScrollID, AdornedRulerPanel::OnAutoScroll)
|
EVT_MENU(OnAutoScrollID, AdornedRulerPanel::OnAutoScroll)
|
||||||
EVT_MENU(OnLockPlayRegionID, AdornedRulerPanel::OnLockPlayRegion)
|
EVT_MENU(OnLockPlayRegionID, AdornedRulerPanel::OnLockPlayRegion)
|
||||||
|
|
||||||
|
// Scrub bar menu commands
|
||||||
|
EVT_MENU(OnShowHideScrubbingID, AdornedRulerPanel::OnToggleScrubbing)
|
||||||
|
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent,
|
AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent,
|
||||||
@ -1895,11 +1898,35 @@ void AdornedRulerPanel::UpdatePrefs()
|
|||||||
// Affected by the last
|
// Affected by the last
|
||||||
UpdateRects();
|
UpdateRects();
|
||||||
|
|
||||||
RegenerateTooltips();
|
RegenerateTooltips(mPrevZone);
|
||||||
|
|
||||||
mButtonFontSize = -1;
|
mButtonFontSize = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
enum { ArrowWidth = 8, ArrowSpacing = 1, ArrowHeight = ArrowWidth / 2 };
|
||||||
|
|
||||||
|
// Find the part of the button rectangle in which you can click the arrow.
|
||||||
|
// It includes the lower right corner.
|
||||||
|
wxRect GetArrowRect(const wxRect &buttonRect)
|
||||||
|
{
|
||||||
|
// Change the following lines to change the size of the hot zone.
|
||||||
|
// Make the hot zone as wide as the button
|
||||||
|
auto width = buttonRect.GetWidth();
|
||||||
|
// Make the hot zone taller than the little arrow
|
||||||
|
auto height = std::min(
|
||||||
|
std::max(1, buttonRect.GetHeight()) - 1,
|
||||||
|
2 * ArrowHeight + ArrowSpacing + 1 // 1 for the bevel
|
||||||
|
);
|
||||||
|
|
||||||
|
return wxRect {
|
||||||
|
buttonRect.GetRight() + 1 - width,
|
||||||
|
buttonRect.GetBottom() + 1 - height,
|
||||||
|
width, height
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wxFont &AdornedRulerPanel::GetButtonFont() const
|
wxFont &AdornedRulerPanel::GetButtonFont() const
|
||||||
{
|
{
|
||||||
if (mButtonFontSize < 0) {
|
if (mButtonFontSize < 0) {
|
||||||
@ -1911,12 +1938,19 @@ wxFont &AdornedRulerPanel::GetButtonFont() const
|
|||||||
mButtonFont.SetPointSize(mButtonFontSize);
|
mButtonFont.SetPointSize(mButtonFontSize);
|
||||||
wxCoord width, height;
|
wxCoord width, height;
|
||||||
for (auto button = StatusChoice::FirstButton; done && IsButton(button); ++button) {
|
for (auto button = StatusChoice::FirstButton; done && IsButton(button); ++button) {
|
||||||
auto allowableWidth = GetButtonRect(button).GetWidth() - 2;
|
auto rect = GetButtonRect(button);
|
||||||
// 2 corresponds with the Inflate(-1, -1)
|
auto availableWidth = rect.GetWidth() - 2; // Corresponds to Inflate(-1, -1)
|
||||||
|
auto availableHeight = rect.GetHeight() - 2 // Corresponds to Inflate(-1, -1)
|
||||||
|
// Also leave enough room not to impinge on the menu arrow,
|
||||||
|
// (and what explains the 2 * ), centering the text vertically
|
||||||
|
- 2 * (ArrowHeight + ArrowSpacing);
|
||||||
|
|
||||||
GetParent()->GetTextExtent(
|
GetParent()->GetTextExtent(
|
||||||
wxGetTranslation(GetPushButtonStrings(button)->label),
|
wxGetTranslation(GetPushButtonStrings(button)->label),
|
||||||
&width, &height, NULL, NULL, &mButtonFont);
|
&width, &height, NULL, NULL, &mButtonFont);
|
||||||
done = width < allowableWidth;
|
|
||||||
|
// Yes, < not <= ! Leave at least some room.
|
||||||
|
done = width < availableWidth && height < availableHeight;
|
||||||
}
|
}
|
||||||
mButtonFontSize--;
|
mButtonFontSize--;
|
||||||
} while (mButtonFontSize > 0 && !done);
|
} while (mButtonFontSize > 0 && !done);
|
||||||
@ -1930,7 +1964,7 @@ void AdornedRulerPanel::InvalidateRuler()
|
|||||||
mRuler.Invalidate();
|
mRuler.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::RegenerateTooltips()
|
void AdornedRulerPanel::RegenerateTooltips(StatusChoice choice)
|
||||||
{
|
{
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
if (mTimelineToolTip) {
|
if (mTimelineToolTip) {
|
||||||
@ -1938,7 +1972,7 @@ void AdornedRulerPanel::RegenerateTooltips()
|
|||||||
this->SetToolTip(_("Timeline actions disabled during recording"));
|
this->SetToolTip(_("Timeline actions disabled during recording"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch(mPrevZone) {
|
switch(choice) {
|
||||||
case StatusChoice::QuickPlayButton :
|
case StatusChoice::QuickPlayButton :
|
||||||
case StatusChoice::EnteringQP :
|
case StatusChoice::EnteringQP :
|
||||||
if (!mQuickPlayEnabled) {
|
if (!mQuickPlayEnabled) {
|
||||||
@ -1993,7 +2027,7 @@ void AdornedRulerPanel::OnCapture(wxCommandEvent & evt)
|
|||||||
SetCursor(mCursorHand);
|
SetCursor(mCursorHand);
|
||||||
mIsRecording = false;
|
mIsRecording = false;
|
||||||
}
|
}
|
||||||
RegenerateTooltips();
|
RegenerateTooltips(mPrevZone);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum : int {
|
enum : int {
|
||||||
@ -2181,7 +2215,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
|||||||
? StatusChoice::EnteringScrubZone
|
? StatusChoice::EnteringScrubZone
|
||||||
: StatusChoice::EnteringQP;
|
: StatusChoice::EnteringQP;
|
||||||
const bool changeInZone = (zone != mPrevZone);
|
const bool changeInZone = (zone != mPrevZone);
|
||||||
mPrevZone = zone;
|
const bool changing = evt.Leaving() || evt.Entering() || changeInZone;
|
||||||
|
|
||||||
wxCoord xx = evt.GetX();
|
wxCoord xx = evt.GetX();
|
||||||
wxCoord mousePosX = xx;
|
wxCoord mousePosX = xx;
|
||||||
@ -2195,11 +2229,14 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle status bar messages
|
// Handle status bar messages
|
||||||
UpdateStatusBarAndTooltips (
|
UpdateStatusBarAndTooltips (changing ? zone : StatusChoice::NoChange);
|
||||||
evt.Leaving() || evt.Entering() || changeInZone
|
|
||||||
? zone
|
if ((IsButton(zone) || IsButton(mPrevZone)) &&
|
||||||
: StatusChoice::NoChange
|
(changing || evt.Moving() || evt.Dragging()))
|
||||||
);
|
// So that the highlights in pushbuttons can update
|
||||||
|
Refresh(false);
|
||||||
|
|
||||||
|
mPrevZone = zone;
|
||||||
|
|
||||||
auto &scrubber = mProject->GetScrubber();
|
auto &scrubber = mProject->GetScrubber();
|
||||||
if (scrubber.HasStartedScrubbing()) {
|
if (scrubber.HasStartedScrubbing()) {
|
||||||
@ -2603,10 +2640,10 @@ void AdornedRulerPanel::UpdateStatusBarAndTooltips(StatusChoice choice)
|
|||||||
// Display a message, or empty message
|
// Display a message, or empty message
|
||||||
mProject->TP_DisplayStatusMessage(message);
|
mProject->TP_DisplayStatusMessage(message);
|
||||||
|
|
||||||
RegenerateTooltips();
|
RegenerateTooltips(choice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::OnToggleScrubbing()
|
void AdornedRulerPanel::OnToggleScrubbing(wxCommandEvent&)
|
||||||
{
|
{
|
||||||
mShowScrubbing = !mShowScrubbing;
|
mShowScrubbing = !mShowScrubbing;
|
||||||
WriteScrubEnabledPref(mShowScrubbing);
|
WriteScrubEnabledPref(mShowScrubbing);
|
||||||
@ -2686,6 +2723,15 @@ void AdornedRulerPanel::ShowScrubMenu(const wxPoint & pos)
|
|||||||
auto cleanup = finally([this]{ PopEventHandler(); });
|
auto cleanup = finally([this]{ PopEventHandler(); });
|
||||||
|
|
||||||
wxMenu rulerMenu;
|
wxMenu rulerMenu;
|
||||||
|
auto label = wxGetTranslation(
|
||||||
|
AdornedRulerPanel::PushbuttonLabels
|
||||||
|
[static_cast<int>(StatusChoice::ScrubBarButton)].label);
|
||||||
|
rulerMenu.AppendCheckItem(OnShowHideScrubbingID, _("Scrub Bar"));
|
||||||
|
if(GetButtonState(StatusChoice::ScrubBarButton))
|
||||||
|
rulerMenu.FindItem(OnShowHideScrubbingID)->Check();
|
||||||
|
|
||||||
|
rulerMenu.AppendSeparator();
|
||||||
|
|
||||||
mProject->GetScrubber().PopulateMenu(rulerMenu);
|
mProject->GetScrubber().PopulateMenu(rulerMenu);
|
||||||
PopupMenu(&rulerMenu, pos);
|
PopupMenu(&rulerMenu, pos);
|
||||||
}
|
}
|
||||||
@ -2695,7 +2741,7 @@ void AdornedRulerPanel::OnToggleQuickPlay(wxCommandEvent&)
|
|||||||
mQuickPlayEnabled = (mQuickPlayEnabled)? false : true;
|
mQuickPlayEnabled = (mQuickPlayEnabled)? false : true;
|
||||||
gPrefs->Write(wxT("/QuickPlay/QuickPlayEnabled"), mQuickPlayEnabled);
|
gPrefs->Write(wxT("/QuickPlay/QuickPlayEnabled"), mQuickPlayEnabled);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
RegenerateTooltips();
|
RegenerateTooltips(mPrevZone);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::OnSyncSelToQuickPlay(wxCommandEvent&)
|
void AdornedRulerPanel::OnSyncSelToQuickPlay(wxCommandEvent&)
|
||||||
@ -2736,7 +2782,7 @@ void AdornedRulerPanel::OnTimelineToolTips(wxCommandEvent&)
|
|||||||
gPrefs->Write(wxT("/QuickPlay/ToolTips"), mTimelineToolTip);
|
gPrefs->Write(wxT("/QuickPlay/ToolTips"), mTimelineToolTip);
|
||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
RegenerateTooltips();
|
RegenerateTooltips(mPrevZone);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2860,9 +2906,16 @@ wxRect AdornedRulerPanel::GetButtonRect( StatusChoice button ) const
|
|||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AdornedRulerPanel::InButtonRect( StatusChoice button ) const
|
auto AdornedRulerPanel::InButtonRect( StatusChoice button ) const -> PointerState
|
||||||
{
|
{
|
||||||
return GetButtonRect(button).Contains(ScreenToClient(::wxGetMousePosition()));
|
auto rect = GetButtonRect(button);
|
||||||
|
auto point = ScreenToClient(::wxGetMousePosition());
|
||||||
|
if(!rect.Contains(point))
|
||||||
|
return PointerState::Out;
|
||||||
|
else if(GetArrowRect(rect).Contains(point))
|
||||||
|
return PointerState::InArrow;
|
||||||
|
else
|
||||||
|
return PointerState::In;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto AdornedRulerPanel::FindButton( wxPoint position ) const -> StatusChoice
|
auto AdornedRulerPanel::FindButton( wxPoint position ) const -> StatusChoice
|
||||||
@ -2890,18 +2943,18 @@ bool AdornedRulerPanel::GetButtonState( StatusChoice button ) const
|
|||||||
|
|
||||||
void AdornedRulerPanel::ToggleButtonState( StatusChoice button )
|
void AdornedRulerPanel::ToggleButtonState( StatusChoice button )
|
||||||
{
|
{
|
||||||
|
wxCommandEvent dummy;
|
||||||
switch(button) {
|
switch(button) {
|
||||||
case StatusChoice::QuickPlayButton: {
|
case StatusChoice::QuickPlayButton:
|
||||||
wxCommandEvent dummy;
|
|
||||||
OnToggleQuickPlay(dummy);
|
OnToggleQuickPlay(dummy);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case StatusChoice::ScrubBarButton:
|
case StatusChoice::ScrubBarButton:
|
||||||
OnToggleScrubbing();
|
OnToggleScrubbing(dummy);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wxASSERT(false);
|
wxASSERT(false);
|
||||||
}
|
}
|
||||||
|
UpdateStatusBarAndTooltips(mCaptureState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdornedRulerPanel::ShowButtonMenu( StatusChoice button, wxPoint position)
|
void AdornedRulerPanel::ShowButtonMenu( StatusChoice button, wxPoint position)
|
||||||
@ -2924,23 +2977,55 @@ const AdornedRulerPanel::ButtonStrings AdornedRulerPanel::PushbuttonLabels
|
|||||||
{ XO("Scrub Bar"), XO("Show Scrub Bar"), XO("Hide Scrub Bar") },
|
{ XO("Scrub Bar"), XO("Show Scrub Bar"), XO("Hide Scrub Bar") },
|
||||||
};
|
};
|
||||||
|
|
||||||
void AdornedRulerPanel::DoDrawPushbutton(wxDC *dc, StatusChoice button, bool down) const
|
void AdornedRulerPanel::DoDrawPushbutton
|
||||||
|
(wxDC *dc, StatusChoice button, bool down, PointerState pointerState) const
|
||||||
{
|
{
|
||||||
// Adapted from TrackInfo::DrawMuteSolo()
|
// Adapted from TrackInfo::DrawMuteSolo()
|
||||||
|
|
||||||
auto bev = GetButtonRect( button );
|
const auto rect = GetButtonRect( button );
|
||||||
|
|
||||||
// This part corresponds to part of TrackInfo::DrawBordersWithin() :
|
if (pointerState == PointerState::Out)
|
||||||
AColor::Dark(dc, false);
|
// This part corresponds to part of TrackInfo::DrawBordersWithin() :
|
||||||
dc->DrawRectangle(bev);
|
AColor::Dark(dc, false);
|
||||||
|
else
|
||||||
|
// Make a mouse-over highlight
|
||||||
|
AColor::Light(dc, false);
|
||||||
|
dc->DrawRectangle(rect);
|
||||||
|
|
||||||
bev.Inflate(-1, -1);
|
auto bev = rect.Inflate(-1, -1);
|
||||||
if (down)
|
if (down)
|
||||||
AColor::Solo(dc, true, false);
|
AColor::Solo(dc, true, false);
|
||||||
else
|
else
|
||||||
AColor::MediumTrackInfo(dc, false);
|
AColor::MediumTrackInfo(dc, false);
|
||||||
dc->SetPen( *wxTRANSPARENT_PEN );//No border!
|
|
||||||
dc->DrawRectangle(bev);
|
{
|
||||||
|
wxDCPenChanger changer(*dc, *wxTRANSPARENT_PEN); // No border!
|
||||||
|
dc->DrawRectangle(bev);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pointerState == PointerState::InArrow)
|
||||||
|
// if (pointerState != PointerState::Out) // Alternative for hollow triangle when in
|
||||||
|
// the pushbutton but not in the menu hot zone
|
||||||
|
{
|
||||||
|
// Pop-up triangle
|
||||||
|
|
||||||
|
auto x = bev.GetRight() - ArrowWidth - ArrowSpacing;
|
||||||
|
auto y = bev.GetBottom() - ArrowWidth / 2 - ArrowSpacing;
|
||||||
|
|
||||||
|
// Color it as in TrackInfo::DrawTitleBar
|
||||||
|
#ifdef EXPERIMENTAL_THEMING
|
||||||
|
wxColour c = theTheme.Colour( clrTrackPanelText );
|
||||||
|
#else
|
||||||
|
wxColour c = *wxBLACK;
|
||||||
|
#endif
|
||||||
|
wxDCBrushChanger brushChanger{ *dc,
|
||||||
|
pointerState == PointerState::InArrow ? wxBrush{ c } : *wxTRANSPARENT_BRUSH
|
||||||
|
};
|
||||||
|
wxDCPenChanger penChanger{ *dc, wxPen{ c } };
|
||||||
|
|
||||||
|
// This function draws an arrow half as tall as wide:
|
||||||
|
AColor::Arrow(*dc, x, y, ArrowWidth);
|
||||||
|
}
|
||||||
|
|
||||||
dc->SetTextForeground(theTheme.Colour(clrTrackPanelText));
|
dc->SetTextForeground(theTheme.Colour(clrTrackPanelText));
|
||||||
|
|
||||||
@ -2957,15 +3042,11 @@ void AdornedRulerPanel::HandlePushbuttonClick(wxMouseEvent &evt)
|
|||||||
{
|
{
|
||||||
auto button = FindButton(evt.GetPosition());
|
auto button = FindButton(evt.GetPosition());
|
||||||
if (IsButton(button)) {
|
if (IsButton(button)) {
|
||||||
if (evt.LeftDown()) {
|
if (evt.ButtonDown()) {
|
||||||
CaptureMouse();
|
CaptureMouse();
|
||||||
mCaptureState = button;
|
mCaptureState = button;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
else if (evt.RightDown()) {
|
|
||||||
auto rect = GetButtonRect(button);
|
|
||||||
ShowButtonMenu( button, wxPoint{ rect.GetX() + 1, rect.GetBottom() + 1 } );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2974,10 +3055,17 @@ void AdornedRulerPanel::HandlePushbuttonEvent(wxMouseEvent &evt)
|
|||||||
if(evt.ButtonUp()) {
|
if(evt.ButtonUp()) {
|
||||||
if(HasCapture())
|
if(HasCapture())
|
||||||
ReleaseMouse();
|
ReleaseMouse();
|
||||||
if(InButtonRect(mCaptureState)) {
|
|
||||||
|
auto in = InButtonRect(mCaptureState);
|
||||||
|
if (in == PointerState::In) {
|
||||||
ToggleButtonState(mCaptureState);
|
ToggleButtonState(mCaptureState);
|
||||||
UpdateStatusBarAndTooltips(mCaptureState);
|
|
||||||
}
|
}
|
||||||
|
else if (in == PointerState::InArrow) {
|
||||||
|
auto rect = GetArrowRect(GetButtonRect(mCaptureState));
|
||||||
|
wxPoint point { rect.GetLeft() + 1, rect.GetBottom() + 1 };
|
||||||
|
ShowButtonMenu(mCaptureState, point);
|
||||||
|
}
|
||||||
|
|
||||||
mCaptureState = StatusChoice::NoButton;
|
mCaptureState = StatusChoice::NoButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2993,9 +3081,10 @@ void AdornedRulerPanel::DoDrawPushbuttons(wxDC *dc) const
|
|||||||
|
|
||||||
for (auto button = StatusChoice::FirstButton; IsButton(button); ++button) {
|
for (auto button = StatusChoice::FirstButton; IsButton(button); ++button) {
|
||||||
auto state = GetButtonState(button);
|
auto state = GetButtonState(button);
|
||||||
auto toggle = (button == mCaptureState && InButtonRect(button));
|
auto in = InButtonRect(button);
|
||||||
|
auto toggle = (button == mCaptureState && in == PointerState::In);
|
||||||
auto down = (state != toggle);
|
auto down = (state != toggle);
|
||||||
DoDrawPushbutton(dc, button, down);
|
DoDrawPushbutton(dc, button, down, in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,20 +312,6 @@ public:
|
|||||||
void InvalidateRuler();
|
void InvalidateRuler();
|
||||||
|
|
||||||
void UpdatePrefs();
|
void UpdatePrefs();
|
||||||
void RegenerateTooltips();
|
|
||||||
void HideQuickPlayIndicator();
|
|
||||||
|
|
||||||
void UpdateQuickPlayPos(wxCoord &mousPosX);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void OnCapture(wxCommandEvent & evt);
|
|
||||||
void OnPaint(wxPaintEvent &evt);
|
|
||||||
void OnSize(wxSizeEvent &evt);
|
|
||||||
void UpdateRects();
|
|
||||||
void OnMouseEvents(wxMouseEvent &evt);
|
|
||||||
void HandleQPClick(wxMouseEvent &event, wxCoord mousePosX);
|
|
||||||
void HandleQPDrag(wxMouseEvent &event, wxCoord mousePosX);
|
|
||||||
void HandleQPRelease(wxMouseEvent &event);
|
|
||||||
|
|
||||||
enum class StatusChoice {
|
enum class StatusChoice {
|
||||||
FirstButton = 0,
|
FirstButton = 0,
|
||||||
@ -344,6 +330,22 @@ private:
|
|||||||
choice = static_cast<StatusChoice>(1 + static_cast<int>(choice));
|
choice = static_cast<StatusChoice>(1 + static_cast<int>(choice));
|
||||||
return choice;
|
return choice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RegenerateTooltips(StatusChoice choice);
|
||||||
|
void HideQuickPlayIndicator();
|
||||||
|
|
||||||
|
void UpdateQuickPlayPos(wxCoord &mousPosX);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void OnCapture(wxCommandEvent & evt);
|
||||||
|
void OnPaint(wxPaintEvent &evt);
|
||||||
|
void OnSize(wxSizeEvent &evt);
|
||||||
|
void UpdateRects();
|
||||||
|
void OnMouseEvents(wxMouseEvent &evt);
|
||||||
|
void HandleQPClick(wxMouseEvent &event, wxCoord mousePosX);
|
||||||
|
void HandleQPDrag(wxMouseEvent &event, wxCoord mousePosX);
|
||||||
|
void HandleQPRelease(wxMouseEvent &event);
|
||||||
|
|
||||||
static inline bool IsButton(StatusChoice choice)
|
static inline bool IsButton(StatusChoice choice)
|
||||||
{
|
{
|
||||||
auto integer = static_cast<int>(choice);
|
auto integer = static_cast<int>(choice);
|
||||||
@ -381,12 +383,14 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxRect GetButtonRect( StatusChoice button ) const;
|
wxRect GetButtonRect( StatusChoice button ) const;
|
||||||
bool InButtonRect( StatusChoice button ) const;
|
enum PointerState { Out = 0, In, InArrow };
|
||||||
|
PointerState InButtonRect( StatusChoice button ) const;
|
||||||
StatusChoice FindButton( wxPoint position ) const;
|
StatusChoice FindButton( wxPoint position ) const;
|
||||||
bool GetButtonState( StatusChoice button ) const;
|
bool GetButtonState( StatusChoice button ) const;
|
||||||
void ToggleButtonState( StatusChoice button );
|
void ToggleButtonState( StatusChoice button );
|
||||||
void ShowButtonMenu( StatusChoice button, wxPoint position);
|
void ShowButtonMenu( StatusChoice button, wxPoint position);
|
||||||
void DoDrawPushbutton(wxDC *dc, StatusChoice button, bool down) const;
|
void DoDrawPushbutton(wxDC *dc, StatusChoice button, bool down,
|
||||||
|
PointerState pointerState) const;
|
||||||
void DoDrawPushbuttons(wxDC *dc) const;
|
void DoDrawPushbuttons(wxDC *dc) const;
|
||||||
void HandlePushbuttonClick(wxMouseEvent &evt);
|
void HandlePushbuttonClick(wxMouseEvent &evt);
|
||||||
void HandlePushbuttonEvent(wxMouseEvent &evt);
|
void HandlePushbuttonEvent(wxMouseEvent &evt);
|
||||||
@ -453,7 +457,7 @@ private:
|
|||||||
void OnAutoScroll(wxCommandEvent &evt);
|
void OnAutoScroll(wxCommandEvent &evt);
|
||||||
void OnLockPlayRegion(wxCommandEvent &evt);
|
void OnLockPlayRegion(wxCommandEvent &evt);
|
||||||
|
|
||||||
void OnToggleScrubbing();
|
void OnToggleScrubbing(wxCommandEvent&);
|
||||||
|
|
||||||
bool mPlayRegionDragsSelection;
|
bool mPlayRegionDragsSelection;
|
||||||
bool mTimelineToolTip;
|
bool mTimelineToolTip;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user