static void g_sheet_model_base_init (gpointer g_class);
-inline GType
+GType
g_sheet_model_get_type (void)
{
static GType sheet_model_type = 0;
* Returns: True if strings obtained with get_string should be freed by the
* sheet when no longer required.
**/
-inline gboolean
+gboolean
g_sheet_model_free_strings (const GSheetModel *sheet_model)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
* Retrieves the datum at location ROW, COLUMN in the form of a string.
* Returns: The string representation of the datum, or NULL on error.
**/
-inline gchar *
+gchar *
g_sheet_model_get_string (const GSheetModel *sheet_model,
glong row, glong column)
{
*
* Returns: TRUE if the cell is editable, FALSE otherwise
**/
-inline gboolean
+gboolean
g_sheet_model_is_editable (const GSheetModel *model,
glong row, glong column)
{
*
* Returns: TRUE if the cell is visible, FALSE otherwise
**/
-inline gboolean
+gboolean
g_sheet_model_is_visible (const GSheetModel *model,
glong row, glong column)
{
* @column: The column
*
* Returns the foreground colour of the cell at @row, @column
- * Returns: the foreground colour, or NULL on error.
+ * The color is unallocated. It will be allocated by the viewing object.
**/
-inline const GdkColor *
+GdkColor *
g_sheet_model_get_foreground (const GSheetModel *model,
glong row, glong column)
{
* @column: The column
*
* Returns the background colour of the cell at @row, @column
- * Returns: the background colour, or NULL on error.
+ * The color is unallocated. It will be allocated by the viewing object.
**/
-inline const GdkColor *
+GdkColor *
g_sheet_model_get_background (const GSheetModel *model,
glong row, glong column)
{
* Returns the justification of the cell at @row, @column
* Returns: the justification, or NULL on error.
**/
-inline const GtkJustification *
+const GtkJustification *
g_sheet_model_get_justification (const GSheetModel *model,
glong row, glong column)
{
* Returns the font description of the cell at @row, @column
* Returns: the font description, or NULL on error.
**/
-inline const PangoFontDescription *
+const PangoFontDescription *
g_sheet_model_get_font_desc(const GSheetModel *model,
glong row, glong column)
{
* Returns the cell border of the cell at @row, @column
* Returns: the cell border, or NULL on error.
**/
-inline const GtkSheetCellBorder *
+const GtkSheetCellBorder *
g_sheet_model_get_cell_border (const GSheetModel *model,
glong row, glong column)
{
*
* Returns the total number of columns represented by the model
**/
-inline glong
+glong
g_sheet_model_get_column_count (const GSheetModel *model)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1);
*
* Returns the total number of rows represented by the model
**/
-inline gint
+gint
g_sheet_model_get_row_count(const GSheetModel *model)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1);
return G_SHEET_MODEL_GET_IFACE (model)->get_row_count (model);
}
+
+\f
+
+/* Column related functions */
+gboolean
+g_sheet_model_get_column_sensitivity (const GSheetModel *model, gint col)
+{
+ if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_column_sensitivity)
+ return TRUE;
+
+ return G_SHEET_MODEL_GET_IFACE (model)->get_column_sensitivity (model, col);
+}
+
+
+gchar *
+g_sheet_model_get_column_subtitle (const GSheetModel *model,
+ gint col)
+{
+ g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
+
+ if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_column_subtitle)
+ return NULL;
+
+ return G_SHEET_MODEL_GET_IFACE (model)->get_column_subtitle (model, col);
+}
+
+
+GtkSheetButton *
+g_sheet_model_get_column_button (const GSheetModel *model,
+ gint col)
+{
+ GtkSheetButton *button = gtk_sheet_button_new ();
+
+ g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
+
+ if ( G_SHEET_MODEL_GET_IFACE (model)->get_column_title)
+ button->label = G_SHEET_MODEL_GET_IFACE (model)->get_column_title (model, col);
+
+ return button;
+}
+
+GtkJustification
+g_sheet_model_get_column_justification (const GSheetModel *model,
+ gint col)
+{
+ if ( G_SHEET_MODEL_GET_IFACE (model)->get_column_justification)
+ return G_SHEET_MODEL_GET_IFACE (model)->get_column_justification (model, col);
+
+ return GTK_JUSTIFY_LEFT;
+}
+
+\f
+
+gboolean
+g_sheet_model_get_row_sensitivity (const GSheetModel *model, gint row)
+{
+ if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_row_sensitivity)
+ return TRUE;
+
+ return G_SHEET_MODEL_GET_IFACE (model)->get_row_sensitivity (model, row);
+}
+
+
+
+gchar *
+g_sheet_model_get_row_subtitle (const GSheetModel *model,
+ gint row)
+{
+ g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
+
+ if ( NULL == G_SHEET_MODEL_GET_IFACE (model)->get_row_subtitle)
+ return NULL;
+
+ return G_SHEET_MODEL_GET_IFACE (model)->get_row_subtitle (model, row);
+}
+
+
+GtkSheetButton *
+g_sheet_model_get_row_button (const GSheetModel *model,
+ gint row)
+{
+ GtkSheetButton *button = gtk_sheet_button_new ();
+
+ g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
+
+ if ( G_SHEET_MODEL_GET_IFACE (model)->get_row_title)
+ button->label = G_SHEET_MODEL_GET_IFACE (model)->get_row_title (model, row);
+
+ return button;
+}
+