MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / updateMacroBrowserList

Method updateMacroBrowserList

src/csvapplication.cpp:2294–2305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2292
2293
2294void CsvApplication::updateMacroBrowserList(Fl_Browser *macroList, int selected) {
2295 macroList->clear();
2296 for(int i=0; i < macros.entries(); ++i) {
2297 macroList->add(macros.entry(i));
2298 }
2299 if( selected > 0 ) {
2300 if( selected > macroList->size() ) {
2301 selected = macroList->size();
2302 }
2303 macroList->select(selected);
2304 }
2305}
2306
2307// Returns Fl_Browser index of entryName or 0 – Fl_Browser is 1-based!
2308int CsvApplication::selectMacroBrowserEntry(Fl_Browser *macroList, std::string ) {

Callers

nothing calls this directly

Calls 3

clearMethod · 0.45
addMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected