Copy / Cut / Paste
(p *tree.Plan)
| 628 | // Copy / Cut / Paste |
| 629 | |
| 630 | func (tb *Table) MakeToolbar(p *tree.Plan) { |
| 631 | if tb.Table == nil || tb.Table.Table == nil { |
| 632 | return |
| 633 | } |
| 634 | tree.Add(p, func(w *core.FuncButton) { |
| 635 | w.SetFunc(tb.Table.AddRows).SetIcon(icons.Add) |
| 636 | w.SetAfterFunc(func() { tb.Update() }) |
| 637 | }) |
| 638 | tree.Add(p, func(w *core.FuncButton) { |
| 639 | w.SetFunc(tb.Table.SortColumnName).SetText("Sort").SetIcon(icons.Sort) |
| 640 | w.SetAfterFunc(func() { tb.Update() }) |
| 641 | }) |
| 642 | tree.Add(p, func(w *core.FuncButton) { |
| 643 | w.SetFunc(tb.Table.FilterColumnName).SetText("Filter").SetIcon(icons.FilterAlt) |
| 644 | w.SetAfterFunc(func() { tb.Update() }) |
| 645 | }) |
| 646 | tree.Add(p, func(w *core.FuncButton) { |
| 647 | w.SetFunc(tb.Table.Sequential).SetText("Unfilter").SetIcon(icons.FilterAltOff) |
| 648 | w.SetAfterFunc(func() { tb.Update() }) |
| 649 | }) |
| 650 | tree.Add(p, func(w *core.FuncButton) { |
| 651 | w.SetFunc(tb.Table.OpenCSV).SetIcon(icons.Open) |
| 652 | w.SetAfterFunc(func() { tb.Update() }) |
| 653 | }) |
| 654 | tree.Add(p, func(w *core.FuncButton) { |
| 655 | w.SetFunc(tb.Table.SaveCSV).SetIcon(icons.Save) |
| 656 | w.SetAfterFunc(func() { tb.Update() }) |
| 657 | }) |
| 658 | } |
| 659 | |
| 660 | func (tb *Table) MimeDataType() string { |
| 661 | return fileinfo.DataCsv |
nothing calls this directly
no test coverage detected