Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/src/PreferencesUtils.h
${CMAKE_CURRENT_SOURCE_DIR}/src/PrintContinuityEditor.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/PrintContinuityEditor.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SetupInstruments.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SetupInstruments.h
${CMAKE_CURRENT_SOURCE_DIR}/src/SetupMarchers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/SetupMarchers.h
${CMAKE_CURRENT_SOURCE_DIR}/src/TopFrame.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/TopFrame.h
${CMAKE_CURRENT_SOURCE_DIR}/src/TransitionSolverFrame.cpp
Expand Down Expand Up @@ -280,8 +284,6 @@ add_executable (
${CMAKE_CURRENT_SOURCE_DIR}/src/print_ps_dialog.h
${CMAKE_CURRENT_SOURCE_DIR}/src/setup_wizards.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/setup_wizards.h
${CMAKE_CURRENT_SOURCE_DIR}/src/show_ui.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/show_ui.h
${CMAKE_CURRENT_SOURCE_DIR}/src/single_instance_ipc.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/single_instance_ipc.h
${CMAKE_CURRENT_SOURCE_DIR}/src/ui_enums.h
Expand Down
16 changes: 11 additions & 5 deletions src/CalChartDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ CalChartDoc::GetAnimation() const
return mAnimation ? mAnimation.get() : nullptr;
}

void CalChartDoc::WizardSetupNewShow(std::vector<std::string> const& labels, int columns, ShowMode const& newmode)
void CalChartDoc::WizardSetupNewShow(std::vector<std::pair<std::string, std::string>> const& labelsAndInstruments, int columns, ShowMode const& newmode)
{
mShow = Show::Create_CC_show(newmode, labels, columns);
mShow = Show::Create_CC_show(newmode, labelsAndInstruments, columns);
UpdateAllViews();
}

Expand Down Expand Up @@ -425,13 +425,19 @@ std::unique_ptr<wxCommand> CalChartDoc::Create_SetShowModeCommand(CalChart::Show
return std::make_unique<CalChartDocCommand>(*this, wxT("Set Mode"), cmds);
}

std::unique_ptr<wxCommand> CalChartDoc::Create_SetShowInfoCommand(std::vector<wxString> const& labels, int numColumns)
std::unique_ptr<wxCommand> CalChartDoc::Create_SetupMarchersCommand(std::vector<std::pair<std::string, std::string>> const& labelsAndInstruments, int numColumns)
{
auto tlabels = std::vector<std::string>(labels.begin(), labels.end());
auto show_cmds = Inject_CalChartDocArg(mShow->Create_SetShowInfoCommand(tlabels, numColumns, GetShowMode().FieldOffset()));
auto tlabels = std::vector(labelsAndInstruments.begin(), labelsAndInstruments.end());
auto show_cmds = Inject_CalChartDocArg(mShow->Create_SetupMarchersCommand(tlabels, numColumns, GetShowMode().FieldOffset()));
return std::make_unique<CalChartDocCommand>(*this, wxT("Set show info"), show_cmds);
}

std::unique_ptr<wxCommand> CalChartDoc::Create_SetInstrumentsCommand(std::map<int, std::string> const& dotToInstrument)
{
auto show_cmds = Inject_CalChartDocArg(mShow->Create_SetInstrumentsCommand(dotToInstrument));
return std::make_unique<CalChartDocCommand>(*this, wxT("Set instruments"), show_cmds);
}

std::unique_ptr<wxCommand> CalChartDoc::Create_SetSheetTitleCommand(const wxString& newname)
{
auto cmds = Create_SetSheetPair();
Expand Down
15 changes: 11 additions & 4 deletions src/CalChartDoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class CalChartDoc : public wxDocument {

void FlushAllTextWindows();

void WizardSetupNewShow(std::vector<std::string> const& labels, int columns, CalChart::ShowMode const& newmode);
void WizardSetupNewShow(std::vector<std::pair<std::string, std::string>> const& labelsAndInstruments, int columns, CalChart::ShowMode const& newmode);

auto GetNumSheets() const { return mShow ? mShow->GetNumSheets() : 0; }

Expand All @@ -136,8 +136,11 @@ class CalChartDoc : public wxDocument {
std::pair<bool, std::vector<size_t>> GetRelabelMapping(CalChart::Show::const_Sheet_iterator_t source_sheet, CalChart::Show::const_Sheet_iterator_t target_sheets, CalChart::Coord::units tolerance) const;

auto GetPointLabel(int i) const { return mShow->GetPointLabel(i); }

auto GetPointLabels() const { return mShow->GetPointLabels(); }
auto GetPointsLabel() const { return mShow->GetPointsLabel(); }
auto GetPointInstrument(int i) const { return mShow->GetPointInstrument(i); }
auto GetPointsInstrument() const { return mShow->GetPointsInstrument(); }
auto GetPointSymbol(int i) const { return mShow->GetPointSymbol(i); }
auto GetPointsSymbol() const { return mShow->GetPointsSymbol(); }

// how to select points
// Utility functions for constructing new selection lists
Expand All @@ -148,6 +151,9 @@ class CalChartDoc : public wxDocument {
auto MakeRemoveFromSelection(const SelectionList& sl) const { return mShow->MakeRemoveFromSelection(sl); }
auto MakeToggleSelection(const SelectionList& sl) const { return mShow->MakeToggleSelection(sl); }
auto MakeSelectWithLasso(const CalChart::Lasso& lasso, int ref) const { return mShow->MakeSelectWithLasso(lasso, ref); }
auto MakeSelectBySymbol(SYMBOL_TYPE symbol) const { return mShow->MakeSelectBySymbol(symbol); }
auto MakeSelectByInstrument(std::string const& instrument) const { return mShow->MakeSelectByInstrument(instrument); }
auto MakeSelectByLabel(std::string const& label) const { return mShow->MakeSelectByLabel(label); }

void SetSelection(const SelectionList& sl);

Expand All @@ -167,7 +173,8 @@ class CalChartDoc : public wxDocument {
std::unique_ptr<wxCommand> Create_SetSelectionCommand(const SelectionList& sl);
std::unique_ptr<wxCommand> Create_SetCurrentSheetAndSelectionCommand(int n, const SelectionList& sl);
std::unique_ptr<wxCommand> Create_SetShowModeCommand(CalChart::ShowMode const& newmode);
std::unique_ptr<wxCommand> Create_SetShowInfoCommand(std::vector<wxString> const& labels, int numColumns);
std::unique_ptr<wxCommand> Create_SetupMarchersCommand(std::vector<std::pair<std::string, std::string>> const& labels, int numColumns);
std::unique_ptr<wxCommand> Create_SetInstrumentsCommand(std::map<int, std::string> const& dotToInstrument);
std::unique_ptr<wxCommand> Create_SetSheetTitleCommand(const wxString& newname);
std::unique_ptr<wxCommand> Create_SetSheetBeatsCommand(int beats);
std::unique_ptr<wxCommand> Create_AddSheetsCommand(const CalChart::Show::Sheet_container_t& sheets, int where);
Expand Down
2 changes: 0 additions & 2 deletions src/CalChartDocCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "CalChartDocCommand.h"
#include "CalChartDoc.h"

// SetDescriptionCommand
// Set the description of this show
CalChartDocCommand::CalChartDocCommand(CalChartDoc& doc, const wxString& cmd_descr, CC_doc_command_pair const& cmds)
: CalChartDocCommand(doc, cmd_descr, std::vector<CC_doc_command_pair>{ cmds })
{
Expand Down
Loading