![]() |
![]() |
![]() |
GtkExtra Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GtkSheetColumnGtkSheetColumn — A spreadsheet column widget for GtkSheet |
#include <gtkextra.h> GtkSheetColumn; void gtk_sheet_add_column (GtkSheet *sheet, guint ncols); void gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols); void gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols); guint gtk_sheet_get_columns_count (GtkSheet *sheet); GtkSheetColumn * gtk_sheet_column_get (GtkSheet *sheet, gint col); gint gtk_sheet_column_get_index (GtkSheetColumn *colobj); void gtk_sheet_select_column (GtkSheet *sheet, gint column); gboolean gtk_sheet_column_titles_visible (GtkSheet *sheet); void gtk_sheet_show_column_titles (GtkSheet *sheet); void gtk_sheet_hide_column_titles (GtkSheet *sheet); const gchar * gtk_sheet_get_column_title (GtkSheet *sheet, gint column); void gtk_sheet_set_column_title (GtkSheet *sheet, gint column, const gchar *title); void gtk_sheet_set_column_titles_height (GtkSheet *sheet, guint height); gboolean gtk_sheet_column_sensitive (GtkSheet *sheet, gint column); void gtk_sheet_column_set_sensitivity (GtkSheet *sheet, gint column, gboolean sensitive); void gtk_sheet_columns_set_sensitivity (GtkSheet *sheet, gboolean sensitive); gboolean gtk_sheet_columns_resizable (GtkSheet *sheet); void gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable); gboolean gtk_sheet_column_visible (GtkSheet *sheet, gint column); void gtk_sheet_column_set_visibility (GtkSheet *sheet, gint column, gboolean visible); void gtk_sheet_column_label_set_visibility (GtkSheet *sheet, gint col, gboolean visible); void gtk_sheet_columns_labels_set_visibility (GtkSheet *sheet, gboolean visible); const gint gtk_sheet_get_column_width (GtkSheet *sheet, gint column); void gtk_sheet_set_column_width (GtkSheet *sheet, gint column, guint width); GtkJustification gtk_sheet_column_get_justification (GtkSheet *sheet, gint col); void gtk_sheet_column_set_justification (GtkSheet *sheet, gint col, GtkJustification just); GtkSheetVerticalJustification gtk_sheet_column_get_vjustification (GtkSheet *sheet, gint col); void gtk_sheet_column_set_vjustification (GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust); const gchar * gtk_sheet_column_button_get_label (GtkSheet *sheet, gint col); void gtk_sheet_column_button_add_label (GtkSheet *sheet, gint col, const gchar *label); void gtk_sheet_column_button_justify (GtkSheet *sheet, gint col, GtkJustification justification); gchar * gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet, const gint col, const gchar *markup); gchar * gtk_sheet_column_get_tooltip_text (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_tooltip_text (GtkSheet *sheet, const gint col, const gchar *text); gchar * gtk_sheet_column_get_datatype (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_datatype (GtkSheet *sheet, const gint col, const gchar *data_type); gchar * gtk_sheet_column_get_description (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_description (GtkSheet *sheet, const gint col, const gchar *description); gchar * gtk_sheet_column_get_format (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_format (GtkSheet *sheet, const gint col, const gchar *format); gboolean gtk_sheet_column_get_iskey (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_iskey (GtkSheet *sheet, const gint col, const gboolean is_key); GType gtk_sheet_column_get_entry_type (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_entry_type (GtkSheet *sheet, const gint col, const GType entry_type); gboolean gtk_sheet_column_get_readonly (GtkSheet *sheet, const gint col); void gtk_sheet_column_set_readonly (GtkSheet *sheet, const gint col, const gboolean is_readonly);
"dataformat" gchar* : Read / Write "datatype" gchar* : Read / Write "description" gchar* : Read / Write "entry-type" GtkSheetEntryType : Read / Write "iskey" gboolean : Read / Write "justification" GtkJustification : Read / Write "label" gchar* : Read / Write "max-length" gint : Read / Write "max-length-bytes" gint : Read / Write "position" gint : Read / Write "readonly" gboolean : Read / Write "visible" gboolean : Read / Write "vjust" GtkSheetVerticalJustification : Read / Write "width" gint : Read / Write "wrap-mode" GtkWrapMode : Read / Write
typedef struct _GtkSheetColumn GtkSheetColumn;
The GtkSheetColumn struct contains only private data. It should only be accessed through the functions described below.
void gtk_sheet_add_column (GtkSheet *sheet, guint ncols);
Append ncols
columns to the right of the sheet.
|
a GtkSheet. |
|
number of columns to be appended. |
void gtk_sheet_insert_columns (GtkSheet *sheet, guint col, guint ncols);
Insert ncols
columns before the given row and pull right.
|
a GtkSheet. |
|
column number. |
|
number of columns to be inserted. |
void gtk_sheet_delete_columns (GtkSheet *sheet, guint col, guint ncols);
Delete ncols
columns starting from col
.
|
a GtkSheet. |
|
column number. |
|
number of columns to be deleted. |
guint gtk_sheet_get_columns_count (GtkSheet *sheet);
Get the number of the columns of the GtkSheet.
|
a GtkSheet |
Returns : |
number of columns. |
GtkSheetColumn * gtk_sheet_column_get (GtkSheet *sheet, gint col);
Get a GtkSheetColumn
|
a GtkSheet. |
|
column index |
Returns : |
(transfer none) the requested GtkSheetColumn or NULL |
gint gtk_sheet_column_get_index (GtkSheetColumn *colobj);
find index of colobj
in GtkSheet
|
GtkSheetColumn to find |
Returns : |
column index or -1 |
void gtk_sheet_select_column (GtkSheet *sheet, gint column);
Select the column. The range is then highlighted, and the bounds are stored in sheet->range.
|
a GtkSheet. |
|
column number |
gboolean gtk_sheet_column_titles_visible (GtkSheet *sheet);
Get the visibility of sheet column titles .
|
a GtkSheet |
Returns : |
TRUE or FALSE |
void gtk_sheet_show_column_titles (GtkSheet *sheet);
Show column titles .
|
a GtkSheet |
void gtk_sheet_hide_column_titles (GtkSheet *sheet);
Hide column titles .
|
a GtkSheet |
const gchar * gtk_sheet_get_column_title (GtkSheet *sheet, gint column);
Get column title.
|
a GtkSheet |
|
column number |
Returns : |
column title, do not modify or free it. |
void gtk_sheet_set_column_title (GtkSheet *sheet, gint column, const gchar *title);
Set column title.
|
a GtkSheet |
|
column number |
|
column title |
void gtk_sheet_set_column_titles_height (GtkSheet *sheet, guint height);
Resize column titles area .
|
a GtkSheet |
|
column title height. |
gboolean gtk_sheet_column_sensitive (GtkSheet *sheet, gint column);
Get column button sensitivity.
|
a GtkSheet. |
|
column number |
Returns : |
TRUE - the column is sensitive, FALSE - insensitive or not existant |
void gtk_sheet_column_set_sensitivity (GtkSheet *sheet, gint column, gboolean sensitive);
Set column button sensitivity. If sensitivity is TRUE it can be toggled, otherwise it acts as a title.
|
a GtkSheet. |
|
column number |
|
TRUE or FALSE |
void gtk_sheet_columns_set_sensitivity (GtkSheet *sheet, gboolean sensitive);
Set all columns buttons sensitivity. If sensitivity is TRUE button can be toggled, otherwise act as titles. The sheet itself has no such property, it is a convenience function to set the property for all existing columns.
|
a GtkSheet. |
|
TRUE or FALSE |
gboolean gtk_sheet_columns_resizable (GtkSheet *sheet);
Get columns resizable status.
|
a GtkSheet. |
Returns : |
TRUE or FALSE |
void gtk_sheet_columns_set_resizable (GtkSheet *sheet, gboolean resizable);
Set columns resizable status.
|
a GtkSheet. |
|
TRUE or FALSE |
gboolean gtk_sheet_column_visible (GtkSheet *sheet, gint column);
Get column visible property.
|
a GtkSheet. |
|
column number |
Returns : |
TRUE - visible, FALSE - hidden or not existant |
void gtk_sheet_column_set_visibility (GtkSheet *sheet, gint column, gboolean visible);
Set column visible property.
Default value is TRUE. When set to FALSE, the column is hidden.
|
a GtkSheet. |
|
column number |
|
TRUE or FALSE |
void gtk_sheet_column_label_set_visibility (GtkSheet *sheet, gint col, gboolean visible);
Set column label visibility. The default value is TRUE. If FALSE, the column label is hidden.
|
a GtkSheet. |
|
column number. |
|
TRUE or FALSE |
void gtk_sheet_columns_labels_set_visibility (GtkSheet *sheet, gboolean visible);
Set all columns labels visibility. The default value is TRUE. If FALSE, the columns labels are hidden. The sheet itself has no such property, it is a convenience function to set the property for all existing columns.
|
a GtkSheet. |
|
TRUE or FALSE |
const gint gtk_sheet_get_column_width (GtkSheet *sheet, gint column);
Get column width.
|
a GtkSheet |
|
column number |
Returns : |
column width |
void gtk_sheet_set_column_width (GtkSheet *sheet, gint column, guint width);
Set column width.
|
a GtkSheet. |
|
column number. |
|
the width of the column. |
GtkJustification gtk_sheet_column_get_justification (GtkSheet *sheet, gint col);
Get the column justification.
|
a GtkSheet. |
|
column number |
Returns : |
a GtkJustification |
void gtk_sheet_column_set_justification (GtkSheet *sheet, gint col, GtkJustification just);
Set column justification (GTK_JUSTIFY_LEFT, RIGHT, CENTER). The default value is GTK_JUSTIFY_LEFT. If autoformat is on, the default justification for numbers is GTK_JUSTIFY_RIGHT.
|
a GtkSheet. |
|
column number |
|
a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER |
GtkSheetVerticalJustification gtk_sheet_column_get_vjustification (GtkSheet *sheet, gint col);
Get the vertical cell text justification. This overrides the default vertical cell text justification of the GtkSheet.
|
a GtkSheet. |
|
column number |
Returns : |
a GtkSheetVerticalJustification |
void gtk_sheet_column_set_vjustification (GtkSheet *sheet, gint col, GtkSheetVerticalJustification vjust);
Set vertical cell text jjustification
|
a GtkSheet. |
|
column number |
|
a GtkSheetVerticalJustification |
const gchar * gtk_sheet_column_button_get_label (GtkSheet *sheet, gint col);
Get column button label.
|
a GtkSheet. |
|
column number. |
Returns : |
Column button label. |
void gtk_sheet_column_button_add_label (GtkSheet *sheet, gint col, const gchar *label);
Set button label.It is used to set a column title.
|
a GtkSheet |
|
column number |
|
text label |
void gtk_sheet_column_button_justify (GtkSheet *sheet, gint col, GtkJustification justification);
Set the justification(alignment) of the column buttons.
|
a GtkSheet. |
|
column number |
|
a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER |
gchar * gtk_sheet_column_get_tooltip_markup (GtkSheet *sheet, const gint col);
Gets the contents of the tooltip (markup) for the column
void gtk_sheet_column_set_tooltip_markup (GtkSheet *sheet, const gint col, const gchar *markup);
Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language.
|
a GtkSheet. |
|
column index |
|
the contents of the tooltip for widget, or NULL. |
gchar * gtk_sheet_column_get_tooltip_text (GtkSheet *sheet, const gint col);
Gets the contents of the tooltip for the column
void gtk_sheet_column_set_tooltip_text (GtkSheet *sheet, const gint col, const gchar *text);
Sets text as the contents of the tooltip.
|
a GtkSheet. |
|
column index |
|
the contents of the tooltip for widget |
gchar * gtk_sheet_column_get_datatype (GtkSheet *sheet, const gint col);
Gets the column data_type for application use
|
a GtkSheet. |
|
column index |
Returns : |
the datatype or NULL |
void gtk_sheet_column_set_datatype (GtkSheet *sheet, const gint col, const gchar *data_type);
Sets the column data data_type for application use
|
a GtkSheet. |
|
column index |
|
the datatype |
gchar * gtk_sheet_column_get_description (GtkSheet *sheet, const gint col);
Gets the column description
void gtk_sheet_column_set_description (GtkSheet *sheet, const gint col, const gchar *description);
Sets the column description.
|
a GtkSheet. |
|
column index |
|
the description or NULL |
gchar * gtk_sheet_column_get_format (GtkSheet *sheet, const gint col);
Gets the column data formatting pattern
void gtk_sheet_column_set_format (GtkSheet *sheet, const gint col, const gchar *format);
Sets the column data formatting pattern.
|
a GtkSheet. |
|
column index |
|
the data_format pattern or NULL |
gboolean gtk_sheet_column_get_iskey (GtkSheet *sheet, const gint col);
Gets the column is_key flag
|
a GtkSheet. |
|
column index |
Returns : |
the is_key flag |
void gtk_sheet_column_set_iskey (GtkSheet *sheet, const gint col, const gboolean is_key);
Sets the column is_key flag. This flag has no effect on calculation or presentation, it is reserved for application usage.
|
a GtkSheet. |
|
column index |
|
the column is_key flag |
GType gtk_sheet_column_get_entry_type (GtkSheet *sheet, const gint col);
Gets the column entry type if known
|
a GtkSheet. |
|
column index |
Returns : |
the entry type or GTK_SHEET_ENTRY_TYPE_DEFAULT |
void gtk_sheet_column_set_entry_type (GtkSheet *sheet, const gint col, const GType entry_type);
Supersedes the sheet entry type for this column. Pass G_TYPE_NONE to reset the column to the sheet entry type.
|
a GtkSheet. |
|
column index |
|
the entry type or G_TYPE_NONE |
gboolean gtk_sheet_column_get_readonly (GtkSheet *sheet, const gint col);
Gets the column readonly flag
|
a GtkSheet. |
|
column index |
Returns : |
the readonly flag |
void gtk_sheet_column_set_readonly (GtkSheet *sheet, const gint col, const gboolean is_readonly);
Sets the column readonly flag. A cell is editable if the sheet is not locked, the column is not readonly and the cell (-range) was set to editable.
|
a GtkSheet. |
|
column index |
|
the column is_readonly flag |
"dataformat"
property"dataformat" gchar* : Read / Write
a formatting string that controls what you see when the widget doesn't contain input focus
Default value: ""
"datatype"
property"datatype" gchar* : Read / Write
no functionality, a datatype hint for the application because any widget content is text
Default value: ""
"description"
property"description" gchar* : Read / Write
Description of column contents
Default value: ""
"entry-type"
property"entry-type" GtkSheetEntryType : Read / Write
Column cell entry widget type
Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT
"justification"
property"justification" GtkJustification : Read / Write
Justification of the column
Default value: GTK_JUSTIFY_LEFT
"max-length"
property"max-length" gint : Read / Write
Maximum number orf characters in this column, Zero if no maximum.
This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkEntry, GtkDataTextView
Allowed values: [0,1073741823]
Default value: 0
Since 3.0.6
"max-length-bytes"
property"max-length-bytes" gint : Read / Write
Set the maximum length in bytes for the GtkDataEntry. For details see gtk_data_entry_set_max_length_bytes.
This property is passed to the sheet entry editor. It is supported for the following editors: GtkItemEntry, GtkDataTextView.
Sometimes, systems cannot handle UTF-8 string length correctly, to overcome this problem, you can use the maximum string length in bytes. When setting both limits, max-length and max-length-bytes, both must be fulfilled.
Allowed values: [0,1073741823]
Default value: 0
Since 3.0.6
"position"
property"position" gint : Read / Write
The packing position of the column
Allowed values: [0,1024]
Default value: 0
"readonly"
property"readonly" gboolean : Read / Write
Lock column contents for editing.
Default value: FALSE
"visible"
property"visible" gboolean : Read / Write
Visible property for columns
Default value: FALSE
"vjust"
property"vjust" GtkSheetVerticalJustification : Read / Write
Column vertical cell text justification
Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT
"width"
property"width" gint : Read / Write
Width of the column
Allowed values: [G_MAXULONG,8192]
Default value: -1
"wrap-mode"
property"wrap-mode" GtkWrapMode : Read / Write
This property is passed to the sheet entry editor. It is supported for the following editors: GtkTextView, GtkDataTextView.
Default value: GTK_WRAP_NONE
Since 3.0.6