GdauiRawGrid

GdauiRawGrid — Grid widget to manipulate data in a GdaDataModel

Stability Level

Stable, unless otherwise indicated

Functions

Properties

gboolean info-cell-visible Read / Write
GdaDataModel * model Read / Write
gpointer xml-layout Write

Signals

void double-clicked Run First
void populate-popup Run First

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkTreeView
                    ╰── GdauiRawGrid

Implemented Interfaces

GdauiRawGrid implements AtkImplementorIface, GtkBuildable, GtkScrollable, GdauiDataProxy and GdauiDataSelector.

Description

The GdauiGrid widget which uses the GdauiRawGrid and adds decorations such as information about data model size, and features searching.

Functions

gdaui_raw_grid_new ()

GtkWidget *
gdaui_raw_grid_new (GdaDataModel *model);

Creates a new GdauiRawGrid widget suitable to display the data in model

Parameters

model

a GdaDataModel

 

Returns

the new widget.

[transfer full]

Since: 4.2


gdaui_raw_grid_set_sample_size ()

void
gdaui_raw_grid_set_sample_size (GdauiRawGrid *grid,
                                gint sample_size);

Sets the size of each chunk of data to display: the maximum number of rows which can be displayed at a time. See gdaui_grid_set_sample_size() and gda_data_proxy_set_sample_size()

Parameters

grid

a GdauiRawGrid

 

sample_size

the size of the sample displayed in grid

 

Since: 4.2


gdaui_raw_grid_set_sample_start ()

void
gdaui_raw_grid_set_sample_start (GdauiRawGrid *grid,
                                 gint sample_start);

Parameters

grid

a GdauiRawGrid

 

Since: 4.2


gdaui_raw_grid_set_layout_from_file ()

void
gdaui_raw_grid_set_layout_from_file (GdauiRawGrid *grid,
                                     const gchar *file_name,
                                     const gchar *grid_name);

Sets a grid's columns layout according an XML description contained in file_name , for the grid identified by the grid_name name (as an XML layout file can contain the descriptions of several forms and grids).

Parameters

grid

a GdauiRawGrid

 

file_name

XML file name to use

 

grid_name

the name of the grid to use, in file_name

 

Since: 4.2


GdauiRawGridFormatFunc ()

void
(*GdauiRawGridFormatFunc) (GtkCellRenderer *cell,
                           GtkTreeViewColumn *column,
                           gint column_pos,
                           GdaDataModel *model,
                           gint row,
                           gpointer data);

gdaui_raw_grid_add_formatting_function ()

void
gdaui_raw_grid_add_formatting_function
                               (GdauiRawGrid *grid,
                                GdauiRawGridFormatFunc func,
                                gpointer data,
                                GDestroyNotify dnotify);

This function allows you to specify that the func function needs to be called whenever the rendering of a cell in grid needs to be done. It is similar in purpose to the gtk_tree_view_column_set_cell_data_func() function.

Parameters

grid

a GdauiRawGrid widget

 

func

a GdauiRawGridFormatFunc function pointer

 

data

a pointer to pass to the func function when called.

[nullable]

dnotify

destroy notifier for data .

[nullable]

Since: 5.0.3


gdaui_raw_grid_remove_formatting_function ()

void
gdaui_raw_grid_remove_formatting_function
                               (GdauiRawGrid *grid,
                                GdauiRawGridFormatFunc func);

This function undoes what has been specified before by gdaui_raw_grid_add_formatting_function()

Parameters

grid

a GdauiRawGrid widget

 

func

a GdauiRawGridFormatFunc function pointer.

[scope notified]

Since: 5.0.3

Types and Values

GDAUI_TYPE_RAW_GRID

#define GDAUI_TYPE_RAW_GRID          (gdaui_raw_grid_get_type())

struct GdauiRawGridClass

struct GdauiRawGridClass {
	GtkTreeViewClass    parent_class;

	void             (* double_clicked)    (GdauiRawGrid *grid, gint row);
	void             (* populate_popup)    (GdauiRawGrid *grid, GtkMenu *menu);
};

GdauiRawGrid

typedef struct _GdauiRawGrid GdauiRawGrid;

Property Details

The “info-cell-visible” property

  “info-cell-visible”        gboolean

Info cell visible.

Owner: GdauiRawGrid

Flags: Read / Write

Default value: FALSE


The “model” property

  “model”                    GdaDataModel *

Owner: GdauiRawGrid

Flags: Read / Write


The “xml-layout” property

  “xml-layout”               gpointer

Owner: GdauiRawGrid

Flags: Write

Signal Details

The “double-clicked” signal

void
user_function (GdauiRawGrid *grid,
               int           row,
               gpointer      user_data)

Emitted when the user double clicks on a row

Parameters

grid

GdauiRawGrid

 

row

the row that was double clicked

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First


The “populate-popup” signal

void
user_function (GdauiRawGrid *grid,
               GtkMenu      *menu,
               gpointer      user_data)

Connect this signal and modify the popup menu.

Parameters

grid

GdauiRawGrid

 

menu

a GtkMenu to modify

 

user_data

user data set when the signal handler was connected.

 

Flags: Run First

See Also

the GdauiGrid widget which uses the GdauiRawGrid and adds decorations such as information about data model size, and features searching.