gattrib

x_gtksheet.c File Reference

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"
Include dependency graph for x_gtksheet.c:

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.

Detailed Description

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.


Function Documentation

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.

Parameters:
widget
data

Definition at line 387 of file x_gtksheet.c.

Here is the call graph for this function:

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.

Here is the call graph for this function:

void x_gtksheet_add_row_labels ( GtkSheet sheet,
int  count,
STRING_LIST list_head 
)

Add row labels to GtkSheet

Parameters:
sheetPointer to the GtkSheet object
countNumber of row labels to add
list_headTop of the string list

Definition at line 166 of file x_gtksheet.c.

Here is the call graph for this function:

void x_gtksheet_add_col_labels ( GtkSheet sheet,
int  count,
STRING_LIST list_head 
)

Add column labels to GtkSheet.

Parameters:
sheetGtkSheet to add columns to
count
list_headpointer to top of STRING_LIST

Definition at line 212 of file x_gtksheet.c.

Here is the call graph for this function:

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

Parameters:
sheetGtkSheet to add the cell item to
i
j
text
visibility
show_name_value

Definition at line 245 of file x_gtksheet.c.

Here is the call graph for this function:

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.

Parameters:
sheetGtkSheet to query
Returns:
index of the first column selected, or -1 if no column is selected.

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

Parameters:
GtkSheetto query
Returns:
the index of the last column selected, or -1 if no column is selected.

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.

Parameters:
sheetGtkSheet to operate on
rowRow of cell to set
colColumn of cell to set
color_nameColor to set text to

Definition at line 322 of file x_gtksheet.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines