MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / swap

Function swap

src/dialog_export.cpp:86–98  ·  view source on GitHub ↗

Swap the items at idx and idx + 1

Source from the content-addressed store, hash-verified

84
85// Swap the items at idx and idx + 1
86void swap(wxCheckListBox *list, int idx, int sel_dir) {
87 if (idx < 0 || idx + 1 == (int)list->GetCount()) return;
88
89 list->Freeze();
90 wxString tempname = list->GetString(idx);
91 bool tempval = list->IsChecked(idx);
92 list->SetString(idx, list->GetString(idx + 1));
93 list->Check(idx, list->IsChecked(idx + 1));
94 list->SetString(idx + 1, tempname);
95 list->Check(idx + 1, tempval);
96 list->SetSelection(idx + sel_dir);
97 list->Thaw();
98}
99
100DialogExport::DialogExport(agi::Context *c)
101: d(c->parent, -1, _("Export"), wxDefaultPosition, wxSize(200, 100), wxCAPTION | wxCLOSE_BOX)

Callers 15

OnMouseEventMethod · 0.85
OnKeyDownMethod · 0.85
OnUseSuggestionMethod · 0.85
swapMethod · 0.85
ass_file.cppFile · 0.85
LoadSettingsMethod · 0.85
DrawRingMethod · 0.85
SwapStylesMethod · 0.85
CheckMarkersMethod · 0.85
GetFrameMethod · 0.85
UpdateDragMethod · 0.85
UpdateSpectrumDisplayMethod · 0.85

Calls 3

FreezeMethod · 0.80
ThawMethod · 0.80
SetSelectionMethod · 0.45

Tested by

no test coverage detected