| 2777 | |
| 2778 | |
| 2779 | void 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 | |
| 2800 | void CsvApplication::arrangeColumnsCB(Fl_Widget *, void *) { |
no test coverage detected