Top |
GtkSheetColumnGtkSheetColumn — A spreadsheet column widget for GtkSheet |
gchar * | dataformat | Read / Write |
gchar * | datatype | Read / Write |
gchar * | description | Read / Write |
GtkSheetEntryType | entry-type | Read / Write |
gboolean | iskey | Read / Write |
GtkJustification | justification | Read / Write |
gchar * | label | Read / Write |
gint | max-length | Read / Write |
gint | max-length-bytes | Read / Write |
gint | position | Read / Write |
gboolean | readonly | Read / Write |
gboolean | visible | Read / Write |
GtkSheetVerticalJustification | vjust | Read / Write |
gint | width | Read / Write |
GtkWrapMode | wrap-mode | Read / Write |
GtkSheetColumn | |
#define | GTK_SHEET_COLUMN_MIN_WIDTH |
#define | GTK_SHEET_COLUMN_DEFAULT_WIDTH |
#define | GTK_SHEET_COLUMN_DEFAULT_JUSTIFICATION |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkSheetColumn
GtkSheetColumn * gtk_sheet_column_get (GtkSheet *sheet
,gint col
);
Get a GtkSheetColumn
gint
gtk_sheet_column_get_index (GtkSheetColumn *colobj
);
find index of colobj
in GtkSheet
void gtk_sheet_set_column_width (GtkSheet *sheet
,gint column
,guint width
);
Set column width.
const gint gtk_sheet_get_column_width (GtkSheet *sheet
,gint column
);
Get column width.
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.
sheet |
a GtkSheet. |
|
col |
column number |
|
just |
a GtkJustification : GTK_JUSTIFY_LEFT, RIGHT, CENTER |
GtkJustification gtk_sheet_column_get_justification (GtkSheet *sheet
,gint col
);
Get the column justification.
void gtk_sheet_column_set_vjustification (GtkSheet *sheet
,gint col
,GtkSheetVerticalJustification vjust
);
Set vertical cell text jjustification
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.
gboolean gtk_sheet_column_get_iskey (GtkSheet *sheet
,const gint col
);
Gets the column 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.
gboolean gtk_sheet_column_get_readonly (GtkSheet *sheet
,const gint col
);
Gets the column 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.
gchar * gtk_sheet_column_get_format (GtkSheet *sheet
,const gint col
);
Gets the column data formatting pattern
the formatting pattern or NULL, You should free the
returned string with g_free()
when done.
void gtk_sheet_column_set_format (GtkSheet *sheet
,const gint col
,const gchar *format
);
Sets the column data formatting pattern.
gchar * gtk_sheet_column_get_datatype (GtkSheet *sheet
,const gint col
);
Gets the column data_type for application use
void gtk_sheet_column_set_datatype (GtkSheet *sheet
,const gint col
,const gchar *data_type
);
Sets the column data data_type for application use
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.
GType gtk_sheet_column_get_entry_type (GtkSheet *sheet
,const gint col
);
Gets the column entry type if known
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.
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.
sheet |
a GtkSheet. |
|
col |
column index |
|
markup |
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.
gboolean gtk_sheet_column_sensitive (GtkSheet *sheet
,gint column
);
Get column button sensitivity.
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.
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.
gboolean
gtk_sheet_columns_resizable (GtkSheet *sheet
);
Get columns resizable status.
void gtk_sheet_columns_set_resizable (GtkSheet *sheet
,gboolean resizable
);
Set columns resizable status.
gboolean gtk_sheet_column_visible (GtkSheet *sheet
,gint column
);
Get column visible property.
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.
void gtk_sheet_column_button_justify (GtkSheet *sheet
,gint col
,GtkJustification justification
);
gtk_sheet_column_button_justify
has been deprecated since version 4.1.3 and should not be used in newly-written code.
Use widget properties instead
Set the justification(alignment) of the column buttons.
This function does nothing, it is kept for backward-compatibility.
sheet |
a GtkSheet. |
|
col |
column number |
|
justification |
a GtkJustification :GTK_JUSTIFY_LEFT, RIGHT, CENTER |
const gchar * gtk_sheet_column_button_get_label (GtkSheet *sheet
,gint col
);
Get column button label.
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.
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.
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.
void gtk_sheet_set_column_titles_height (GtkSheet *sheet
,guint height
);
Resize column titles area .
void
gtk_sheet_show_column_titles (GtkSheet *sheet
);
Show column title area.
void
gtk_sheet_hide_column_titles (GtkSheet *sheet
);
Hide column title area.
gboolean
gtk_sheet_column_titles_visible (GtkSheet *sheet
);
Get the visibility of sheet column titles .
const gchar * gtk_sheet_get_column_title (GtkSheet *sheet
,gint column
);
Get column title.
typedef struct _GtkSheetColumn GtkSheetColumn;
The GtkSheetColumn struct contains only private data. It should only be accessed through the functions described below.
“dataformat”
property“dataformat” gchar *
a formatting string that controls what you see when the widget doesn't contain input focus
Flags: Read / Write
Default value: ""
“datatype”
property“datatype” gchar *
no functionality, a datatype hint for the application because any widget content is text
Flags: Read / Write
Default value: ""
“description”
property“description” gchar *
Description of column contents
Flags: Read / Write
Default value: ""
“entry-type”
property“entry-type” GtkSheetEntryType
Column cell entry widget type
Flags: Read / Write
Default value: GTK_SHEET_ENTRY_TYPE_DEFAULT
“justification”
property“justification” GtkJustification
Justification of the column
Flags: Read / Write
Default value: GTK_JUSTIFY_LEFT
“label”
property“label” gchar *
Label of the column button
Flags: Read / Write
Default value: ""
“max-length”
property“max-length” gint
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
Flags: Read / Write
Allowed values: [0,1073741823]
Default value: 0
Since: 3.0.6
“max-length-bytes”
property“max-length-bytes” gint
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.
Flags: Read / Write
Allowed values: [0,1073741823]
Default value: 0
Since: 3.0.6
“position”
property“position” gint
The packing position of the column
Flags: Read / Write
Allowed values: [0,1024]
Default value: 0
“readonly”
property“readonly” gboolean
Lock column contents for editing.
Flags: Read / Write
Default value: FALSE
“visible”
property“visible” gboolean
Visible property for columns
Flags: Read / Write
Default value: FALSE
“vjust”
property“vjust” GtkSheetVerticalJustification
Column vertical cell text justification
Flags: Read / Write
Default value: GTK_SHEET_VERTICAL_JUSTIFICATION_DEFAULT
“width”
property“width” gint
Width of the column
Flags: Read / Write
Allowed values: [-1,8192]
Default value: -1
“wrap-mode”
property“wrap-mode” GtkWrapMode
This property is passed to the sheet entry editor. It is supported for the following editors: GtkTextView, GtkDataTextView.
Flags: Read / Write
Default value: GTK_WRAP_NONE
Since: 3.0.6