ergtklistview.h
Go to the documentation of this file.00001 #ifndef __ERGTK_LIST_VIEW_H__
00002 #define __ERGTK_LIST_VIEW_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 G_BEGIN_DECLS
00032
00033 #ifdef ENABLE_NLS
00034 #define P_(String) dgettext(GETTEXT_PACKAGE "-properties",String)
00035 #else
00036 #define P_(String) (String)
00037 #endif
00038
00039
00040 #define I_(string) g_intern_static_string (string)
00041
00042
00043 #define ERGTK_TYPE_LIST_VIEW (ergtk_list_view_get_type())
00044 #define ERGTK_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ERGTK_TYPE_LIST_VIEW, erGtkListView))
00045 #define ERGTK_IS_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ERGTK_TYPE_LIST_VIEW))
00046
00047 #define ERGTK_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ERGTK_TYPE_LIST_VIEW, erGtkListViewClass))
00048 #define ERGTK_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ERGTK_TYPE_LIST_VIEW, erGtkListViewClass))
00049 #define ERGTK_IS_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ERGTK_TYPE_LIST_VIEW))
00050
00051 typedef enum
00052 {
00053 ERGTK_LIST_VIEW_PRESS_SHORT_UP,
00054 ERGTK_LIST_VIEW_PRESS_SHORT_DOWN,
00055 ERGTK_LIST_VIEW_PRESS_LONG_UP,
00056 ERGTK_LIST_VIEW_PRESS_LONG_DOWN,
00057 ERGTK_LIST_VIEW_PRESS_ACTIVATE
00058 } erGtkListViewKeyPress;
00059
00060 typedef struct _erGtkListView erGtkListView;
00061 typedef struct _erGtkListViewClass erGtkListViewClass;
00062
00063 struct _erGtkListView
00064 {
00065 GtkTreeView parent;
00066
00067
00068
00069 gint row_height;
00070 gboolean is_forced_height;
00071
00072 gboolean is_button_down;
00073 guint press_event_button;
00074 gint press_event_state;
00075 gint press_event_x;
00076 gint press_event_y;
00077 gint press_item_idx;
00078 };
00079
00080 struct _erGtkListViewClass
00081 {
00082 GtkTreeViewClass parent_class;
00083
00084
00085
00086
00087 gboolean (*pre_move_cursor) ( erGtkListView *list_view,
00088 erGtkListViewKeyPress navigate );
00089 };
00090
00091
00092
00093 GtkWidget *ergtk_list_view_new ( void );
00094
00095 GtkWidget *ergtk_list_view_new_with_model ( GtkTreeModel *model );
00096
00097 gint ergtk_list_view_append_column ( erGtkListView *er_listview,
00098 GtkTreeViewColumn *column );
00099
00100 void ergtk_list_view_get_view_size ( erGtkListView *er_listview,
00101 gint *num_rows,
00102 gint *num_items );
00103
00104 void ergtk_list_view_get_cursor ( erGtkListView *er_listview,
00105 gint *row );
00106
00107 void ergtk_list_view_set_cursor ( erGtkListView *er_listview,
00108 gint row );
00109
00110 void ergtk_list_view_set_focus_mode ( erGtkListView *er_listview,
00111 gboolean focus_in,
00112 gboolean focus_out );
00113
00114 void ergtk_list_view_set_row_height ( erGtkListView *er_listview,
00115 gint row_height );
00116
00117
00118
00119
00120
00121
00122
00123 GType ergtk_list_view_get_type(void);
00124
00125
00126 G_END_DECLS
00127
00128 #endif // __ERGTK_LIST_VIEW_H__