gattrib
|
Functions to interface to the spreadsheet widget. More...
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <glib.h>
#include <glib-object.h>
#include <libgeda/libgeda.h>
#include "../include/struct.h"
#include "../include/prototype.h"
#include "../include/globals.h"
Go to the source code of this file.
Functions | |
static void | show_entry (GtkWidget *widget, gpointer data) |
Show text entry box. | |
void | x_gtksheet_init () |
Create the GtkSheet. | |
void | x_gtksheet_add_row_labels (GtkSheet *sheet, int count, STRING_LIST *list_head) |
Add row labels to GtkSheet. | |
void | x_gtksheet_add_col_labels (GtkSheet *sheet, int count, STRING_LIST *list_head) |
Add column labels to GtkSheet. | |
void | x_gtksheet_add_cell_item (GtkSheet *sheet, gint i, gint j, gchar *text, gint visibility, gint show_name_value) |
Add a cell item to the GtkSheet. | |
int | x_gtksheet_get_min_col (GtkSheet *sheet) |
Get the first column selected in the GtkSheet. | |
int | x_gtksheet_get_max_col (GtkSheet *sheet) |
Get the last column selected in the GtkSheet. | |
void | x_gtksheet_set_cell_text_color (GtkSheet *sheet, gint row, gint col, gint color_name) |
Set the text color of a cell. |
This file holds functions used to handle the spreadsheet widget. Much of this was hacked from testgtksheet.c starting in Jan 2004 by SDB.
Definition in file x_gtksheet.c.
static void show_entry | ( | GtkWidget * | widget, |
gpointer | data | ||
) | [static] |
Displays a text entry box at the top of the working area. It is removed since it is not needed now, but may come in handy later. Therefore I keep the code around.
widget | |
data |
Definition at line 387 of file x_gtksheet.c.
void x_gtksheet_init | ( | ) |
Creates and initializes the GtkSheet widget, which is the spreadsheet widget used for displaying the data.
Definition at line 71 of file x_gtksheet.c.
void x_gtksheet_add_row_labels | ( | GtkSheet * | sheet, |
int | count, | ||
STRING_LIST * | list_head | ||
) |
Add row labels to GtkSheet
sheet | Pointer to the GtkSheet object |
count | Number of row labels to add |
list_head | Top of the string list |
Definition at line 166 of file x_gtksheet.c.
void x_gtksheet_add_col_labels | ( | GtkSheet * | sheet, |
int | count, | ||
STRING_LIST * | list_head | ||
) |
Add column labels to GtkSheet.
sheet | GtkSheet to add columns to |
count | |
list_head | pointer to top of STRING_LIST |
Definition at line 212 of file x_gtksheet.c.
void x_gtksheet_add_cell_item | ( | GtkSheet * | sheet, |
gint | i, | ||
gint | j, | ||
gchar * | text, | ||
gint | visibility, | ||
gint | show_name_value | ||
) |
Add a cell item to the GtkSheet
sheet | GtkSheet to add the cell item to |
i | |
j | |
text | |
visibility | |
show_name_value |
Definition at line 245 of file x_gtksheet.c.
int x_gtksheet_get_min_col | ( | GtkSheet * | sheet | ) |
Get the first column selected in the GtkSheet Returns the index of the first column selected, or -1 if no column is selected.
sheet | GtkSheet to query |
Definition at line 289 of file x_gtksheet.c.
int x_gtksheet_get_max_col | ( | GtkSheet * | sheet | ) |
Get the last column selected in the GtkSheet
GtkSheet | to query |
Definition at line 305 of file x_gtksheet.c.
void x_gtksheet_set_cell_text_color | ( | GtkSheet * | sheet, |
gint | row, | ||
gint | col, | ||
gint | color_name | ||
) |
Sets the color of a cell identified by row, col.
sheet | GtkSheet to operate on |
row | Row of cell to set |
col | Column of cell to set |
color_name | Color to set text to |
Definition at line 322 of file x_gtksheet.c.