1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
* st-table.h: Table layout widget
5
* Copyright 2008, 2009 Intel Corporation.
7
* This program is free software; you can redistribute it and/or modify it
8
* under the terms and conditions of the GNU Lesser General Public License,
9
* version 2.1, as published by the Free Software Foundation.
11
* This program is distributed in the hope it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19
* Boston, MA 02111-1307, USA.
21
* Written by: Thomas Wood <thomas@linux.intel.com>
25
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
26
#error "Only <st/st.h> can be included directly.h"
29
#ifndef __ST_TABLE_H__
30
#define __ST_TABLE_H__
32
#include <st/st-types.h>
33
#include <st/st-widget.h>
38
* StTableChildOptions:
39
* @ST_KEEP_ASPECT_RATIO: whether to respect the widget's aspect ratio
40
* @ST_X_EXPAND: whether to allocate extra space on the widget's x-axis
41
* @ST_Y_EXPAND: whether to allocate extra space on the widget's y-axis
42
* @ST_X_FILL: whether to stretch the child to fill the cell horizontally
43
* @ST_Y_FILL: whether to stretch the child to fill the cell vertically
45
* Denotes the child properties an StTable child will have.
49
ST_KEEP_ASPECT_RATIO = 1 << 0,
54
} StTableChildOptions;
56
#define ST_TYPE_TABLE (st_table_get_type ())
57
#define ST_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_TABLE, StTable))
58
#define ST_IS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_TABLE))
59
#define ST_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_TABLE, StTableClass))
60
#define ST_IS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_TABLE))
61
#define ST_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_TABLE, StTableClass))
63
typedef struct _StTable StTable;
64
typedef struct _StTablePrivate StTablePrivate;
65
typedef struct _StTableClass StTableClass;
70
* The contents of this structure is private and should only be accessed using
76
StWidget parent_instance;
83
StWidgetClass parent_class;
86
GType st_table_get_type (void) G_GNUC_CONST;
88
StWidget* st_table_new (void);
90
gint st_table_get_row_count (StTable *table);
91
gint st_table_get_column_count (StTable *table);
95
#endif /* __ST_TABLE_H__ */