PROP_QUICK_EDIT,
PROP_SELECTED,
PROP_SELECTABLE,
- PROP_ROW_HEAD
+ PROP_ROW_HEAD,
+ PROP_TABBABLE
};
enum
P_("If true, this column is a \"row head\", equivalent to a column head. If rectangular selection is enabled, then shift+click and control+click in the column select row ranges and toggle row selection, respectively. The column should ordinarily include a button cell; clicking on the button will select the row (and deselect all other rows)."),
FALSE,
GTK_PARAM_READWRITE));
+
+ g_object_class_install_property (object_class,
+ PROP_TABBABLE,
+ g_param_spec_boolean ("tabbable",
+ P_("Tabbable"),
+ P_("If true, Tab and Shift+Tab visit this column. If false, Tab and Shift+Tab skip this column."),
+ TRUE,
+ GTK_PARAM_READWRITE));
}
static void
tree_column->selected = FALSE;
tree_column->selectable = TRUE;
tree_column->row_head = FALSE;
+ tree_column->tabbable = TRUE;
tree_column->sort_order = GTK_SORT_ASCENDING;
tree_column->show_sort_indicator = FALSE;
tree_column->property_changed_signal = 0;
g_value_get_boolean (value));
break;
+ case PROP_TABBABLE:
+ pspp_sheet_view_column_set_tabbable (tree_column,
+ g_value_get_boolean (value));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
pspp_sheet_view_column_get_row_head (tree_column));
break;
+ case PROP_TABBABLE:
+ g_value_set_boolean (value,
+ pspp_sheet_view_column_get_tabbable (tree_column));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
* Return value: the title of the column. This string should not be
* modified or freed.
**/
-G_CONST_RETURN gchar *
+const gchar *
pspp_sheet_view_column_get_title (PsppSheetViewColumn *tree_column)
{
g_return_val_if_fail (PSPP_IS_SHEET_VIEW_COLUMN (tree_column), NULL);
}
+/**
+ * pspp_sheet_view_column_set_tabbable:
+ * @tree_column: A #PsppSheetViewColumn
+ * @tabbable: If true, the column is "tabbable", meaning that Tab and Shift+Tab
+ * in the sheet visit this column. If false, Tab and Shift+Tab skip this
+ * column.
+ **/
+void
+pspp_sheet_view_column_set_tabbable (PsppSheetViewColumn *tree_column,
+ gboolean tabbable)
+{
+ g_return_if_fail (PSPP_IS_SHEET_VIEW_COLUMN (tree_column));
+
+ tabbable = !!tabbable;
+ if (tree_column->tabbable != tabbable)
+ {
+ tree_column->tabbable = tabbable;
+ g_object_notify (G_OBJECT (tree_column), "tabbable");
+ }
+}
+
+/**
+ * pspp_sheet_view_column_get_tabbable:
+ * @tree_column: A #PsppSheetViewColumn
+ *
+ * Returns %TRUE if the column is tabbable.
+ *
+ * Return value: %TRUE if the column is tabbable.
+ **/
+gboolean
+pspp_sheet_view_column_get_tabbable (PsppSheetViewColumn *tree_column)
+{
+ g_return_val_if_fail (PSPP_IS_SHEET_VIEW_COLUMN (tree_column), FALSE);
+
+ return tree_column->tabbable;
+}
+
+
/**
* pspp_sheet_view_column_set_sort_column_id:
* @tree_column: a #PsppSheetViewColumn