21 #ifndef GNUCASH_ITEM_EDIT_H
22 #define GNUCASH_ITEM_EDIT_H
25 #include "gnucash-date-picker.h"
26 #include "gnucash-item-list.h"
27 #include "gnucash-sheet.h"
29 #define GNC_TYPE_ITEM_EDIT (gnc_item_edit_get_type ())
30 #define GNC_ITEM_EDIT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_EDIT, GncItemEdit))
31 #define GNC_ITEM_EDIT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_EDIT, GncItemEditClass))
32 #define GNC_IS_ITEM_EDIT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_EDIT))
35 typedef int (*GetPopupHeight) (GnomeCanvasItem *item,
40 typedef int (*PopupAutosize) (GnomeCanvasItem *item,
44 typedef void (*PopupSetFocus) (GnomeCanvasItem *item,
47 typedef void (*PopupPostShow) (GnomeCanvasItem *item,
50 typedef int (*PopupGetWidth) (GnomeCanvasItem *item,
56 GtkToggleButton *toggle_button;
57 GnomeCanvasItem *toggle_button_item;
63 gboolean signals_connected;
69 GnomeCanvasItem canvas_item;
71 GnomeCanvasGroup *parent;
78 gboolean has_selection;
85 GnomeCanvasItem *popup_item;
86 GetPopupHeight get_popup_height;
87 PopupAutosize popup_autosize;
88 PopupSetFocus popup_set_focus;
89 PopupPostShow popup_post_show;
90 PopupGetWidth popup_get_width;
91 gpointer popup_user_data;
107 GnomeCanvasItemClass parent_class;
111 GType gnc_item_edit_get_type (
void);
113 void gnc_item_edit_configure (
GncItemEdit *item_edit);
115 void gnc_item_edit_get_pixel_coords (
GncItemEdit *item_edit,
119 GnomeCanvasItem *gnc_item_edit_new (GnomeCanvasGroup *parent,
125 void gnc_item_edit_set_popup (
GncItemEdit *item_edit,
126 GnomeCanvasItem *popup_item,
127 GetPopupHeight get_popup_height,
128 PopupAutosize popup_autosize,
129 PopupSetFocus popup_set_focus,
130 PopupPostShow popup_post_show,
131 PopupGetWidth popup_get_width,
132 gpointer popup_user_data);
134 void gnc_item_edit_show_popup (
GncItemEdit *item_edit);
135 void gnc_item_edit_hide_popup (
GncItemEdit *item_edit);
137 int gnc_item_edit_get_toggle_offset (
int row_height);
139 gboolean gnc_item_edit_set_cursor_pos (
GncItemEdit *item_edit,
141 gboolean changed_cells,
142 gboolean extend_selection);
144 void gnc_item_edit_redraw (
GncItemEdit *item_edit);
146 void gnc_item_edit_cut_clipboard (
GncItemEdit *item_edit, guint32 time);
147 void gnc_item_edit_copy_clipboard (
GncItemEdit *item_edit, guint32 time);
148 void gnc_item_edit_paste_selection (
GncItemEdit *item_edit, GdkAtom selection,
151 void gnc_item_edit_set_has_selection (
GncItemEdit *item_edit, gboolean has_selection);
152 gboolean gnc_item_edit_get_has_selection (
GncItemEdit *item_edit);
153 void gnc_item_edit_focus_in (
GncItemEdit *item_edit);
154 void gnc_item_edit_focus_out (
GncItemEdit *item_edit);
156 void gnc_item_edit_reset_offset (
GncItemEdit *item_edit);