TableEditor.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef _TableEditor_h_
  2. #define _TableEditor_h_
  3. /* TableEditor.h
  4. *
  5. * Copyright (C) 2006,2007,2010-2012,2015-2018 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "Editor.h"
  21. #include "Table.h"
  22. #define kTableEditor_MAXNUM_VISIBLE_COLUMNS 100
  23. Thing_define (TableEditor, Editor) {
  24. integer topRow, leftColumn, selectedRow, selectedColumn;
  25. GuiText text;
  26. GuiDrawingArea drawingArea;
  27. GuiScrollBar horizontalScrollBar, verticalScrollBar;
  28. double columnLeft [kTableEditor_MAXNUM_VISIBLE_COLUMNS], columnRight [kTableEditor_MAXNUM_VISIBLE_COLUMNS];
  29. autoGraphics graphics;
  30. void v_destroy () noexcept
  31. override;
  32. void v_info ()
  33. override;
  34. void v_createChildren ()
  35. override;
  36. void v_createMenus ()
  37. override;
  38. void v_createHelpMenuItems (EditorMenu menu)
  39. override;
  40. void v_dataChanged ()
  41. override;
  42. virtual void v_draw ();
  43. virtual bool v_clickCell (integer row, integer column, bool shiftKeyPressed);
  44. #include "TableEditor_prefs.h"
  45. };
  46. autoTableEditor TableEditor_create (conststring32 title, Table table);
  47. /* End of file TableEditor.h */
  48. #endif