This repository has been archived on 2024-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
hedera/vn/vn-column.h

72 lines
2.8 KiB
C

/*
* Copyright (C) 2012 - Juan Ferrer Toribio
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VN_COLUMN_H
#define VN_COLUMN_H
#include <db/db.h>
#include <gtk/gtk.h>
#define VN_TYPE_COLUMN (vn_column_get_type ())
#define VN_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, VN_TYPE_COLUMN, VnColumn))
#define VN_IS_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, VN_TYPE_COLUMN))
#define VN_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, VN_TYPE_COLUMN, VnColumnClass))
#define VN_IS_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE (klass, VN_TYPE_COLUMN))
#define VN_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, VN_TYPE_COLUMN, VnColumnClass))
typedef struct _VnColumn VnColumn;
typedef struct _VnColumnClass VnColumnClass;
typedef void (*VnColumnSetValueFunc) (VnColumn * obj, GtkTreeModel * model, GtkTreeIter * iter,
GtkCellRenderer * cell, const GValue * value);
typedef void (*VnColumnValuechangedFunc) (VnColumn * obj, const gchar * path, const GValue * value);
typedef void (*VnColumnSetRendererFunc) (VnColumn * obj, GtkCellRenderer * cell);
typedef void (*VnColumnSetEditableFunc) (VnColumn * obj, gboolean editable);
typedef void (*VnColumnModelChangedFunc) (VnColumn * obj);
struct _VnColumn
{
GtkTreeViewColumn parent;
GtkCellRenderer * cell;
gint column_index;
gchar * column_name;
gboolean editable;
VnColumnSetValueFunc set_value;
};
struct _VnColumnClass
{
GtkTreeViewColumnClass parent;
VnColumnSetValueFunc set_value;
VnColumnValuechangedFunc value_changed;
VnColumnSetRendererFunc set_renderer;
VnColumnSetEditableFunc set_editable;
VnColumnModelChangedFunc model_changed;
};
GType vn_column_get_type ();
const gchar * vn_column_get_column_name (VnColumn * obj);
void vn_column_set_column_name (VnColumn * obj, const gchar * name);
gint vn_column_get_column_index (VnColumn * obj);
void vn_column_set_column_index (VnColumn * obj, gint index);
gboolean vn_column_get_editable (VnColumn * obj);
void vn_column_set_editable (VnColumn * obj, gboolean editable);
DbModel * vn_column_get_model (VnColumn * obj);
gboolean vn_column_get_iter (VnColumn * obj, const gchar * path, DbIter * iter);
void vn_column_model_changed (VnColumn * obj);
#endif