#ifndef EMBEDDED_VIEW_H #define EMBEDDED_VIEW_H #include enum { wmTypeTop = 1, wmTypeChart = 2, wmTypeTree = 3, wmTypeAVM = 4, wmTypeXText = 5, wmTypeTreebank= 6, wmTypeGenChart= 7, wmTypeHierarchy=8, }; typedef struct embedded_view_t { int (*init)(struct embedded_view_t*, ...); void (*update)(struct embedded_view_t*, int,int,int,int); void (*event)(struct embedded_view_t*, event_t); void (*postscript)(struct embedded_view_t*); void (*latex)(struct embedded_view_t*); void (*close)(struct embedded_view_t*); void (*mouse_moved)(struct embedded_view_t*, int,int); scrollarea_t *scroll_area; scrollbar_t *hscroll, *vscroll; int width, height; // size of data inside view int vis_width, vis_height; // amount showing through int use_width, use_height; // view size including scroll bars int w_x1, w_y1; int m_x, m_y; int capture_all_keys; void *private; } embedded_view_t; void close_view(embedded_view_t *view); void resize_view(embedded_view_t *view, int width, int height); struct window_manager { window_t *w; void (*event)(event_t ev); // data of 'type' is being dragged at x, y // return 1 if it will be accepted // x=y=-1 if the drag left the window int (*drag)(char *type, int x, int y); int type; }; extern struct window_manager *wms; extern int nwm, awm; #endif