1. 08 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Today it probably does not compile, but I have to leave now. · 6b09bc61
      Arturo Espinosa authored
      
      
      Today it probably does not compile, but I have to leave now.
      
      This is basically the framework for getting computations working.
      
      My current approach is to register areas of interest for a cell.
      This is not perfect, but good enough:
      
      	The idea is to walk the expression tree and look for
      	cell references (cell references or ranges) and register
      	those areas of "interest" for a cell.
      
      	When a new text is entered into a cell, the "regions" of
      	interest list is checked and if a match is found, then
      	the cells on that region of interest are queued for
      	recomputation.
      
      Of course, I do not know yet how to handle the recursive references.
      
      One option is to keep a counter (that starts at zero) during
      recomputation, ie something like:
      
      eval_cell (Cell *cell)
      {
      	cell->use_count++;
      	if (cell->use_count > threshold)
      		return "Cycle too depth";
      	...
      	on value lookup:
      		eval_cell (cell);
      	...
      	cell->use_count--;
      }
      6b09bc61
  2. 07 Aug, 1998 4 commits
  3. 06 Aug, 1998 1 commit
    • Arturo Espinosa's avatar
      Lots of things today: · b261e986
      Arturo Espinosa authored
      
      
      Lots of things today:
      
      - New functions implemented:
      	SELECTION(),  SUM(),  IF()
      
      - Autocompute of an expression that applies to the selection.
      
      - Added comparission to the expression grammar.
      
      - Added array values.
      
      Bug fixes as usual and lots other thingies I forget.
      
      Miguel
      b261e986
  4. 05 Aug, 1998 4 commits
  5. 04 Aug, 1998 1 commit
  6. 31 Jul, 1998 1 commit
    • Federico Mena Quintero's avatar
      Neat X hack: set the window backing pixmap to NULL, so that the window · a0190b68
      Federico Mena Quintero authored
      1998-07-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>
      
      	* src/sheet.c (canvas_bar_realized):
      	* src/gnumeric-sheet.c (gnumeric_sheet_realize): Neat X hack:  set
      	the window backing pixmap to NULL, so that the window does not get
      	cleared when it receives an exposure event.  It will just leave
      	whatever bits were on the window when the expose happened.  This
      	allows us to avoid flicker.  *** MIGUEL, LOOK AT THIS ***
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Fixed
      	width/height confusion (cut&paste bug).
      
      	* src/sheet.c (new_canvas_bar): Set outrageously big scrolling
      	limits.  This has to be fixed to use the real sheet's dimensions.
      	(sheet_new): Use correct table expansion parameters.
      a0190b68
  7. 30 Jul, 1998 3 commits
    • Federico Mena Quintero's avatar
      Use gnome_canvas_scroll_to(). · 83801a54
      Federico Mena Quintero authored
      1998-07-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>
      
      	* src/sheet.c (sheet_set_zoom_factor): Use gnome_canvas_scroll_to().
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_set_top_row): Scroll using
      	gnome_canvas_scroll_to().
      	(gnumeric_sheet_set_top_col): Likewise.
      	(gnumeric_sheet_make_cell_visible): Get the offsets using
      	gnome_canvas_get_scroll_offsets().
      	(gnumeric_sheet_make_cell_visible): Use gnome_canvas_scroll_to().
      83801a54
    • Federico Mena Quintero's avatar
      Query the colormap with gtkdget_get_colormap(), because the canvas · ed5aa7d4
      Federico Mena Quintero authored
      1998-07-30  Federico Mena Quintero  <federico@nuclecu.unam.mx>
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_color_alloc): Query the
      	colormap with gtkdget_get_colormap(), because the canvas structure
      	no longer has a colormap field in it.
      	(gnumeric_sheet_set_top_row): Use the canvas layout adjustment to
      	scroll.
      	(gnumeric_sheet_set_top_col): Use the canvas layout adjustment to
      	scroll.
      	(gnumeric_sheet_make_cell_visible): Get the values from the canvas
      	adjustments.
      
      	* src/sheet.c (new_canvas_bar): Call gnome_canvas_new() correctly.
      	(scroll_to): New helper function to scroll a canvas.
      	(sheet_set_zoom_factor): Use scroll_to().
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_create): Do not call
      	gnome_canvas_construct() at is does not exist anymore.
      	(gnumeric_sheet_new): Use outrageously big values for the canvas
      	scrolling region, for now.  This needs to be fixed.
      	(gnumeric_sheet_make_cell_visible): Use the canvas layout
      	adjustment to scroll.
      ed5aa7d4
    • 0's avatar
      Free the record that tracks the allocation records. (alloc_clean): Handle · 69def31c
      0 authored
      1998-07-30    <miguel@nuclecu.unam.mx>
      
      	* src/parser.y (alloc_clean): Free the record that tracks the
      	allocation records.
      	(alloc_clean): Handle Strings.
      	(alloc_list_free): New function: cleans up the allocation list.
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_load_cell_val): Fix to use
      	the new Strings.
      
      	* src/cell.h: Use the new Strings instead of the Symbols.  That
      	was just a stupid idea.
      
      	* src/str.c (string_ref): New file:  Implements string sharing.
      
      	* src/symbol.c (symbol_install): Use our copy of the allocated key
      	when installing the symbol.
      
      1998-07-29    <miguel@nuclecu.unam.mx>
      
      	* src/symbol.c (symbol_unref_ptr): New function that does symbol
      	unreferencing and if the reference count reaches zero, it also
      	sets the value pointed to NULL.
      
      	* src/sheet.c (cell_set_text): Release evaluation tree after
      	entering new contents in a cell.
      
      	* src/sheet.h (Cell): We now keep all of the character information
      	as refcounted Symbols.
      
      	* src/expr.c (eval_node_release): Renamed and made static.  New
      	allocation strategy: EvalTree's top node are now refcounted to
      	simplify cell duplication.
      	(eval_expr): Now it takes column and row arguments for evaluating
      	the expression in that context.
      	(expr_parse_string): Same.
      
      	* src/parser.y: Renamed EvalNode to EvalTree.
      	(return_cellref): CellRefs now contain offsets relative to the
      	current column/row if the references are not absolute.
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_make_cell_visible): Use new
      	helper routines for doing the scrolling.  Scroll vertically.
      	(gnumeric_sheet_set_top_row, gnumeric_sheet_set_top_col): New
      	routines for keeping the contents of the canvas and the bars in
      	sync.
      	(gnumeric_sheet_new): Take the ItemBars for the columns and rows
      	as a parameter now.
      
      	* src/sheet.c (sheet_select_all): New routine: select the complete spreadsheet.
      
      	* src/item-bar.c (item_bar_class_init): Signal now takes an extra
      	argument which indicates the beginning of a column selection.
      
      	* src/sheet.c (sheet_selection_col_extend_to,
      	sheet_selection_row_extend_to): New methods for implementing the
      	extending column and row selection.
      	(sheet_row_selection_changed, sheet_col_selection_changed): Now
      	they use the new parameter to start the selection.
      69def31c
  8. 28 Jul, 1998 1 commit
  9. 27 Jul, 1998 2 commits
    • Arturo Espinosa's avatar
      902312b2
    • Miguel de Icaza's avatar
      Rename currentWorkbook to current_workbook, so that it follows the style · 474c8eaa
      Miguel de Icaza authored
      
      1998-07-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/main.c (main): Rename currentWorkbook to current_workbook,
      	so that it follows the style of the rest of my code ;-)
      
      	* src/item-cursor.c (item_cursor_init): Add a timeout handler for
      	drawing the anted animation.
      	(item_cursor_set_bounds): Setup the Canvas Item bounding box when
      	the bounds of the cursor change.
      
      	* src/gnumeric-sheet.c (start_cell_selection): Create the
      	selection cursor at the same position the regular cursor is.
      
      	(gnumeric_sheet_init): Share colors between items and the canvas.
      474c8eaa
  10. 26 Jul, 1998 1 commit
  11. 25 Jul, 1998 3 commits
    • Arturo Espinosa's avatar
      Weee! Regular strings are now treated as values (so they can be used in · a30e70c3
      Arturo Espinosa authored
      
      
      Weee!  Regular strings are now treated as values (so they
      can be used in cell expressions).  This means you can actually
      start typing expressions and they will actually make sense
      (note that no recalc is yet supported).
      
      The code to do interactive selections is there, but for some
      reason the cursor is not paying much attention to me.
      
      This feature lets you select a cell for an expression if you
      type in a formula in the spreadsheet (just type '=' and use
      the arrow keys to see my buggy code).
      a30e70c3
    • Tom Tromey's avatar
      Added INTLLIBS. (test_format_LDADD): Likewise. (check_PROGRAMS): Renamed · c27cd73e
      Tom Tromey authored
      Sat Jul 25 14:10:23 1998  Tom Tromey  <tromey@cygnus.com>
      
      	* src/Makefile.am (test_parser_LDADD): Added INTLLIBS.
      	(test_format_LDADD): Likewise.
      	(check_PROGRAMS): Renamed from noinst_PROGRAMS.
      
      	* src/format.c (do_roundup): Renamed from roundup (my Linux
      	install has a 2-argument `roundup' macro in sys/types.h).  Now
      	static.
      c27cd73e
    • Nuno Ferreira's avatar
      Added Portuguese translation. · aa2e8216
      Nuno Ferreira authored
      Don't know why it thinks stamp-h.in is changed. Oh well...
      aa2e8216
  12. 22 Jul, 1998 1 commit
    • Miguel de Icaza's avatar
      Numbers are parsed correctly. Bits of Oleo number parsing plugged in. · ef28d5f2
      Miguel de Icaza authored
      1998-07-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/parser.y (yylex): Numbers are parsed correctly.  Bits of
      	Oleo number parsing plugged in.
      
      	* src/util.c, src/util.h: New files with assorted number utilities.
      
      	* src/numbers.h: New file: takes care of using gmp or regular
      	double/int.
      
      	* src/expr.c (eval_release_node): Implement.
      	(eval_release_value): New function.
      
      	* src/sheet.c (sheet_col_selection_changed,
      	sheet_row_selection_changed): Implement.
      	(sheet_selection_clear, sheet_selection_clear_only): Splitted
      	functionality into two routines.
      	(sheet_selection_clear_only): Remove any marks from the bars.
      	(sheet_row_set_selection, sheet_col_set_selection): Implement.
      
      	* src/item-bar.c (is_pointer_on_division): Return the column
      	changed.
      
      	* src/item-grid.c (item_grid_draw_cell): Fix the computation for
      	right indentation.
      ef28d5f2
  13. 21 Jul, 1998 1 commit
  14. 19 Jul, 1998 1 commit
  15. 18 Jul, 1998 1 commit
  16. 17 Jul, 1998 1 commit
  17. 15 Jul, 1998 2 commits
  18. 14 Jul, 1998 2 commits
    • Arturo Espinosa's avatar
      Typing text into cells feels almost like Excel (modulo the fact that my · 03e48980
      Arturo Espinosa authored
      
      
      Typing text into cells feels almost like Excel (modulo the fact that
      my input line is not as cute).  No Cell manager yet, so everthing yuo
      type is gratiously dropped.  Very baboon like.
      
      Also, some notes from one hour figuring Excel.
      03e48980
    • Federico Mena Quintero's avatar
      Use gnome_canvas_construct() to initialize the canvas. · 6590a4f1
      Federico Mena Quintero authored
      1998-07-14  Federico Mena Quintero  <federico@nuclecu.unam.mx>
      
      	* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
      	gnome_canvas_construct() to initialize the canvas.
      
      	* src/item-bar.c (get_col_name): Fixed generation of column names.
      	(get_row_name): Rows are numbered from 1, not 0.  Also, assert
      	that the row number is less than 65536.
      	(item_bar_event): Grab/ungrab the mouse on button press/release.
      	(item_bar_event): On motion_notify, only call set_cursor() if we
      	are not resizing.
      	(item_bar_event): Only take care of enter_notify events if we are
      	not resizing.
      
      	* po/es.po configure.in: Added Spanish translation.
      6590a4f1
  19. 12 Jul, 1998 1 commit
  20. 11 Jul, 1998 2 commits
    • Arturo Espinosa's avatar
      Lots of stuff. · 02fbd7f8
      Arturo Espinosa authored
      
      
      Lots of stuff.
      
      Mouse resizing columns and rows is fully working.  Other random
      internal goodies, the engine is nicer, the code is nicer, the stuff is
      starting to make sense, etc.
      
      It is nice to `see' what it does right now.
      
      Miguel.
      02fbd7f8
    • Miguel de Icaza's avatar
      New file. Implement the style manager for the spreadsheet. · 3cad2420
      Miguel de Icaza authored
      1998-07-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/style.c: New file.  Implement the style manager for the
      	spreadsheet.
      3cad2420
  21. 09 Jul, 1998 2 commits
    • Miguel de Icaza's avatar
      Dropped the ColInfo and RowInfo structures, they are now unified into a · 491136d7
      Miguel de Icaza authored
      1998-07-09  Miguel de Icaza  <miguel@nuclecu.unam.mx>
      
      	* src/*: Dropped the ColInfo and RowInfo structures, they are now
      	unified into a single ColRowInfo structure, they were really the
      	same thing.  Thanks to Federico for the suggestion.
      491136d7
    • Arturo Espinosa's avatar
      Total excitement! (take two, as the previous ChangeLog message was · 2d356b1d
      Arturo Espinosa authored
      
      
      Total excitement! (take two, as the previous ChangeLog message was
      discarded because someone commited before me).
      
      Cool stuff today: we got the columns and rows displayed, with nice
      cursor change working; New canvas paint item strategy works very
      nicely (much better than the previous stuff); got a region-cursor
      working with various of selection modes (still have to figure out how
      to draw selected stuff though); basic cursor movement works for now;
      sample demo of the toy is included.
      
      Miguel.
      2d356b1d
  22. 06 Jul, 1998 1 commit
  23. 04 Jul, 1998 2 commits
  24. 03 Jul, 1998 1 commit