Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gnumeric
Commits
902312b2
Commit
902312b2
authored
Jul 27, 1998
by
Arturo Espinosa
Browse files
quick sync before cp trough cvs to laptop :-)
parent
474c8eaa
Changes
8
Hide whitespace changes
Inline
Side-by-side
ChangeLog-1999-07-09
View file @
902312b2
1998-07-27 <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_new): Cells are born with their propper
width.
(cell_set_text): Width should include the margins.
* src/main.c (main): Rename currentWorkbook to current_workbook,
so that it follows the style of the rest of my code ;-)
...
...
ChangeLog-2000-02-23
View file @
902312b2
1998-07-27 <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_new): Cells are born with their propper
width.
(cell_set_text): Width should include the margins.
* src/main.c (main): Rename currentWorkbook to current_workbook,
so that it follows the style of the rest of my code ;-)
...
...
OChangeLog-1999-07-09
View file @
902312b2
1998-07-27 <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_new): Cells are born with their propper
width.
(cell_set_text): Width should include the margins.
* src/main.c (main): Rename currentWorkbook to current_workbook,
so that it follows the style of the rest of my code ;-)
...
...
OChangeLog-2000-02-23
View file @
902312b2
1998-07-27 <miguel@nuclecu.unam.mx>
* src/sheet.c (sheet_cell_new): Cells are born with their propper
width.
(cell_set_text): Width should include the margins.
* src/main.c (main): Rename currentWorkbook to current_workbook,
so that it follows the style of the rest of my code ;-)
...
...
TODO
View file @
902312b2
...
...
@@ -2,15 +2,11 @@
GNOME Spread Sheet task list
*
Cell content drawing
*
New TODO:
It should support all of the drawing ways a cell can be drawn in
Excel. The Style * support is already there, it is just a matter of
painting with the set of things that are currently defined.
1. Multiple column selection.
2. Scrolling.
This should be implemented in the draw method in item-grid.c.
*
* Drawing
A routine based on the GnumericSheet widget (just a derivative of
...
...
src/gnumeric-canvas.c
View file @
902312b2
...
...
@@ -19,6 +19,8 @@ static GnomeCanvasClass *sheet_parent_class;
GdkColor
gs_white
,
gs_black
,
gs_light_gray
,
gs_dark_gray
;
static
void
stop_cell_selection
(
GnumericSheet
*
gsheet
);
static
void
gnumeric_sheet_destroy
(
GtkObject
*
object
)
{
...
...
@@ -77,6 +79,8 @@ gnumeric_sheet_set_current_value (GnumericSheet *sheet)
cell
=
sheet_cell_new
(
sheet
->
sheet
,
sheet
->
cursor_col
,
sheet
->
cursor_row
);
cell_set_text
(
sheet
->
sheet
,
cell
,
gtk_entry_get_text
(
GTK_ENTRY
(
sheet
->
entry
)));
if
(
sheet
->
selection
)
stop_cell_selection
(
sheet
);
sheet_redraw_all
(
sheet
->
sheet
);
}
...
...
@@ -477,11 +481,8 @@ gnumeric_sheet_key (GtkWidget *widget, GdkEventKey *event)
void
(
*
movefn_vertical
)
(
GnumericSheet
*
,
int
);
int
cursor_move
=
gnumeric_sheet_can_move_cursor
(
sheet
);
printf
(
"cursor_moving=%d
\n
"
,
cursor_move
);
if
((
event
->
state
&
GDK_SHIFT_MASK
)
!=
0
){
printf
(
"SHIFT!
\n
"
);
if
(
cursor_move
){
printf
(
"Selection exand!
\n
"
);
movefn_horizontal
=
selection_expand_horizontal
;
movefn_vertical
=
selection_expand_vertical
;
}
else
{
...
...
src/gnumeric-sheet.c
View file @
902312b2
...
...
@@ -19,6 +19,8 @@ static GnomeCanvasClass *sheet_parent_class;
GdkColor
gs_white
,
gs_black
,
gs_light_gray
,
gs_dark_gray
;
static
void
stop_cell_selection
(
GnumericSheet
*
gsheet
);
static
void
gnumeric_sheet_destroy
(
GtkObject
*
object
)
{
...
...
@@ -77,6 +79,8 @@ gnumeric_sheet_set_current_value (GnumericSheet *sheet)
cell
=
sheet_cell_new
(
sheet
->
sheet
,
sheet
->
cursor_col
,
sheet
->
cursor_row
);
cell_set_text
(
sheet
->
sheet
,
cell
,
gtk_entry_get_text
(
GTK_ENTRY
(
sheet
->
entry
)));
if
(
sheet
->
selection
)
stop_cell_selection
(
sheet
);
sheet_redraw_all
(
sheet
->
sheet
);
}
...
...
@@ -477,11 +481,8 @@ gnumeric_sheet_key (GtkWidget *widget, GdkEventKey *event)
void
(
*
movefn_vertical
)
(
GnumericSheet
*
,
int
);
int
cursor_move
=
gnumeric_sheet_can_move_cursor
(
sheet
);
printf
(
"cursor_moving=%d
\n
"
,
cursor_move
);
if
((
event
->
state
&
GDK_SHIFT_MASK
)
!=
0
){
printf
(
"SHIFT!
\n
"
);
if
(
cursor_move
){
printf
(
"Selection exand!
\n
"
);
movefn_horizontal
=
selection_expand_horizontal
;
movefn_vertical
=
selection_expand_vertical
;
}
else
{
...
...
src/sheet.c
View file @
902312b2
...
...
@@ -20,6 +20,20 @@ sheet_redraw_all (Sheet *sheet)
0
,
0
,
INT_MAX
,
INT_MAX
);
}
static
void
recompute_one_cell
(
Sheet
*
sheet
,
int
col
,
int
row
,
Cell
*
cell
,
void
*
closure
)
{
}
void
sheet_brute_force_recompute
(
Sheet
*
sheet
)
{
sheet_cell_foreach_range
(
sheet
,
1
,
0
,
0
,
SHEET_MAX_COL
,
SHEET_MAX_ROW
,
recompute_one_cell
,
NULL
);
}
static
void
sheet_init_default_styles
(
Sheet
*
sheet
)
{
...
...
@@ -1087,6 +1101,8 @@ sheet_cell_new (Sheet *sheet, int col, int row)
cell
->
row
=
sheet_row_get
(
sheet
,
row
);
cell
->
style
=
sheet_style_compute
(
sheet
,
col
,
row
);
cell
->
width
=
cell
->
col
->
margin_a
+
cell
->
col
->
margin_b
;
cellref
=
g_new0
(
CellPos
,
1
);
cellref
->
col
=
col
;
cellref
->
row
=
row
;
...
...
@@ -1201,7 +1217,8 @@ cell_set_text (Sheet *sheet, Cell *cell, char *text)
cell
->
flags
=
0
;
font
=
cell
->
style
->
font
->
font
;
cell
->
width
=
gdk_text_width
(
font
,
cell
->
text
,
strlen
(
cell
->
text
));
cell
->
width
=
cell
->
col
->
margin_a
+
cell
->
col
->
margin_b
+
gdk_text_width
(
font
,
cell
->
text
,
strlen
(
cell
->
text
));
cell
->
height
=
font
->
ascent
+
font
->
descent
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment