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

Method switchHeaderRowCB

src/csvapplication.cpp:2779–2797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2777
2778
2779void CsvApplication::switchHeaderRowCB(Fl_Widget *, void *) {
2780 int winIndex = app.getTopWindow();
2781 if( windows[winIndex].table->getNumberRows() <= 1 && !windows[winIndex].table->customHeaderRowShown() ) {
2782 windows[winIndex].showHeaderCheckbox->clear();
2783 return;
2784 }
2785
2786 if( windows[winIndex].table->customHeaderRowShown() ) {
2787 windows[winIndex].grid->moveSelection(1,0);
2788 windows[winIndex].showHeaderCheckbox->clear();
2789 } else {
2790 windows[winIndex].grid->moveSelection(-1,0);
2791 windows[winIndex].showHeaderCheckbox->set();
2792 }
2793 windows[winIndex].table->switchHeader();
2794 windows[winIndex].grid->rows( windows[winIndex].table->getNumberRows() );
2795 windows[winIndex].grid->redraw();
2796 Fl::check();
2797}
2798
2799
2800void CsvApplication::arrangeColumnsCB(Fl_Widget *, void *) {

Callers 3

MyMenuCallbackMethod · 0.80
readWindowPreferencesMethod · 0.80
undoMethod · 0.80

Calls 9

checkFunction · 0.85
getTopWindowMethod · 0.80
getNumberRowsMethod · 0.80
customHeaderRowShownMethod · 0.80
moveSelectionMethod · 0.80
setMethod · 0.80
switchHeaderMethod · 0.80
rowsMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected