ru.po: Corrections from Evgeny Bulgakov <bgav@netvision.net.il>
[midnight-commander.git] / gnome / gtkflist.h
blob64359d29a78ab9bb6a4f7b554f8b5f493743fc55
1 /* File list widget for the Midnight Commander
3 * Copyright (C) 1999 The Free Software Foundation
5 * Author: Federico Mena <federico@nuclecu.unam.mx>
6 */
8 #ifndef GTKFLIST_H
9 #define GTKFLIST_H
11 #include "panel.h"
12 #include <gtk/gtkclist.h>
15 /* It is sad that we have to do this. GtkCList's behavior is so broken that we
16 * have to override all the event handlers and implement our own selection
17 * behavior. Sigh.
20 #define TYPE_GTK_FLIST (gtk_flist_get_type ())
21 #define GTK_FLIST(obj) (GTK_CHECK_CAST ((obj), TYPE_GTK_FLIST, GtkFList))
22 #define GTK_FLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_GTK_FLIST, GtkFListClass))
23 #define GTK_IS_FLIST(obj) (GTK_CHECK_TYPE ((obj), TYPE_GTK_FLIST))
24 #define GTK_IS_FLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_GTK_FLIST))
27 typedef struct _GtkFList GtkFList;
28 typedef struct _GtkFListClass GtkFListClass;
30 struct _GtkFList {
31 GtkCList clist;
33 /* The panel we are associated to */
34 WPanel *panel;
36 /* The anchor row for range selections */
37 int anchor_row;
39 /* Mouse button and position saved on button press */
40 int dnd_press_button;
41 int dnd_press_x, dnd_press_y;
43 /* Delayed selection information */
44 int dnd_select_pending;
45 guint dnd_select_pending_state;
46 int dnd_select_pending_row;
49 struct _GtkFListClass {
50 GtkCListClass parent_class;
52 /* Signal: invoke the popup menu for rows */
53 void (* row_popup_menu) (GtkFList *flist, GdkEventButton *event);
55 /* Signal: invoke the popup menu for empty areas */
56 void (* empty_popup_menu) (GtkFList *flist, GdkEventButton *event);
58 /* Signal: open the file in the selected row */
59 void (* open_row) (GtkFList *flist);
61 /* Signal: initiate a drag and drop operation */
62 void (* start_drag) (GtkFList *flist, gint button, GdkEvent *event);
66 GtkType gtk_flist_get_type (void);
67 GtkWidget *gtk_flist_new_with_titles (WPanel *panel, int columns, char **titles);
70 #endif