diff --git a/scripts/piped-work/docimages_oddments.py b/scripts/piped-work/docimages_oddments.py index e17ffcfec..d33cbc795 100644 --- a/scripts/piped-work/docimages_oddments.py +++ b/scripts/piped-work/docimages_oddments.py @@ -64,6 +64,14 @@ def oddments_imagesA(): do( "Drag: Id="+str( id) + " FromX=10 FromY=10" ) capture( "Button" + str(id) +"Hover.png", "Transport" ) do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" ) + for id in range( 11200, 11206 ): + do( "Drag: Id="+str( id) + " FromX=10 FromY=10" ) + capture( "Button" + str(id) +"Hover.png", "Tools" ) + do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" ) + for id in range( 11300, 11312 ): + do( "Drag: Id="+str( id) + " FromX=10 FromY=10" ) + capture( "Button" + str(id) +"Hover.png", "Edit" ) + do( "Drag: Id="+str( id) + " FromX=1000 FromY=10" ) def oddments_imagesB(): @@ -77,6 +85,6 @@ def oddments_imagesB(): #Disable bringing to top, so as not to destroy quick play. capture( "QuikPlay001.png", "First_Track_Plus ToTop=0" ) -#oddments_imagesA() -oddments_imagesB() +oddments_imagesA() +#oddments_imagesB() diff --git a/src/toolbars/ControlToolBar.h b/src/toolbars/ControlToolBar.h index 897871ee1..059bc6b0e 100644 --- a/src/toolbars/ControlToolBar.h +++ b/src/toolbars/ControlToolBar.h @@ -141,12 +141,12 @@ class ControlToolBar final : public ToolBar { enum { - ID_PLAY_BUTTON = 11000, - ID_RECORD_BUTTON, - ID_PAUSE_BUTTON, + ID_PAUSE_BUTTON = 11000, + ID_PLAY_BUTTON, ID_STOP_BUTTON, ID_FF_BUTTON, ID_REW_BUTTON, + ID_RECORD_BUTTON, BUTTON_COUNT, }; diff --git a/src/toolbars/EditToolBar.cpp b/src/toolbars/EditToolBar.cpp index a2ae1b27a..0c0024965 100644 --- a/src/toolbars/EditToolBar.cpp +++ b/src/toolbars/EditToolBar.cpp @@ -69,8 +69,8 @@ const int SEPARATOR_WIDTH = 14; //////////////////////////////////////////////////////////// BEGIN_EVENT_TABLE( EditToolBar, ToolBar ) - EVT_COMMAND_RANGE( ETBCutID, - ETBCutID + ETBNumButtons - 1, + EVT_COMMAND_RANGE( ETBCutID+first_ETB_ID, + ETBCutID+first_ETB_ID + ETBNumButtons - 1, wxEVT_COMMAND_BUTTON_CLICKED, EditToolBar::OnButton ) END_EVENT_TABLE() @@ -110,7 +110,7 @@ AButton *EditToolBar::AddButton( r = ToolBar::MakeButton(pBar, bmpRecoloredUpSmall, bmpRecoloredDownSmall, bmpRecoloredUpHiliteSmall, bmpRecoloredHiliteSmall, eEnabledUp, eEnabledDown, eDisabled, - wxWindowID(id), + wxWindowID(id+first_ETB_ID), wxDefaultPosition, toggle, theTheme.ImageSize( bmpRecoloredUpSmall )); @@ -291,7 +291,7 @@ void EditToolBar::ForAllButtons(int Action) void EditToolBar::OnButton(wxCommandEvent &event) { - int id = event.GetId(); + int id = event.GetId()-first_ETB_ID; // Be sure the pop-up happens even if there are exceptions, except for buttons which toggle. auto cleanup = finally( [&] { mButtons[id]->InteractionOver();}); diff --git a/src/toolbars/EditToolBar.h b/src/toolbars/EditToolBar.h index 8eba5a155..55dc854be 100644 --- a/src/toolbars/EditToolBar.h +++ b/src/toolbars/EditToolBar.h @@ -62,6 +62,8 @@ enum { ETBNumButtons }; +const int first_ETB_ID = 11300; + // flags so 1,2,4,8 etc. enum { ETBActTooltips = 1, diff --git a/src/toolbars/ToolsToolBar.cpp b/src/toolbars/ToolsToolBar.cpp index 9de3061fc..f59e73a5e 100644 --- a/src/toolbars/ToolsToolBar.cpp +++ b/src/toolbars/ToolsToolBar.cpp @@ -67,8 +67,8 @@ IMPLEMENT_CLASS(ToolsToolBar, ToolBar); //////////////////////////////////////////////////////////// BEGIN_EVENT_TABLE(ToolsToolBar, ToolBar) - EVT_COMMAND_RANGE(firstTool, - lastTool, + EVT_COMMAND_RANGE(firstTool+FirstToolID, + lastTool+FirstToolID, wxEVT_COMMAND_BUTTON_CLICKED, ToolsToolBar::OnTool) END_EVENT_TABLE() @@ -165,7 +165,7 @@ AButton * ToolsToolBar::MakeTool( bmpRecoloredUpHiliteSmall, bmpRecoloredDownSmall, // Not bmpRecoloredHiliteSmall as down is inactive. eTool, eTool, eTool, - wxWindowID(id), + wxWindowID(id + FirstToolID), wxDefaultPosition, true, theTheme.ImageSize( bmpRecoloredUpSmall )); button->SetLabel( label ); @@ -250,7 +250,7 @@ int ToolsToolBar::GetDownTool() void ToolsToolBar::OnTool(wxCommandEvent & evt) { - mCurrentTool = evt.GetId() - firstTool; + mCurrentTool = evt.GetId() - firstTool - FirstToolID; for (int i = 0; i < numTools; i++) if (i == mCurrentTool) mTool[i]->PushDown(); diff --git a/src/toolbars/ToolsToolBar.h b/src/toolbars/ToolsToolBar.h index 3a5a2b2dc..a50cab94a 100644 --- a/src/toolbars/ToolsToolBar.h +++ b/src/toolbars/ToolsToolBar.h @@ -41,9 +41,11 @@ enum { numTools, firstTool = selectTool, - lastTool = multiTool + lastTool = multiTool, }; +const int FirstToolID = 11200; + class ToolsToolBar final : public ToolBar { public: