2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright (C) 1995 Matthias Ettrich
8 * Copyright (C) 1995-1998 The LyX Team.
10 * ====================================================== */
19 #include FORMS_H_LOCATION
20 #include "BackStack.h"
33 BufferView(LyXView * owner, int , int , int, int);
37 Buffer * buffer() const { return buffer_; }
39 FL_OBJECT * getWorkArea() { return work_area; }
41 void buffer(Buffer * b);
51 void update(signed char f);
53 void updateScrollbar();
55 void redoCurrentBuffer();
57 int resizeCurrentBuffer();
61 void cursorPrevious();
65 bool available() const;
67 LyXView * owner() const { return owner_; }
69 LyXScreen * getScreen() {
70 fl_set_timer(timer_cursor, 0.4);
76 void restorePosition();
77 /** This holds the mapping between buffer paragraphs and screen rows.
78 This should be private...but not yet. (Lgb)
82 /// Update pixmap of screen
87 void create_view(int, int, int, int);
89 Inset * checkInsetHit(int & x, int & y);
91 int ScrollUp(long time);
93 int ScrollDown(long time);
95 void ScrollUpOnePage(long /*time*/);
97 void ScrollDownOnePage(long /*time*/);
100 /// A callback for the up arrow in the scrollbar.
101 static void UpCB(FL_OBJECT * ob, long);
103 /// A callback for the slider in the scrollbar.
104 static void ScrollCB(FL_OBJECT * ob, long);
106 /// A callback for the down arrow in the scrollbar.
107 static void DownCB(FL_OBJECT * ob, long);
110 static void CursorToggleCB(FL_OBJECT * ob, long);
111 /** Work area free object handler
113 static int work_area_handler(FL_OBJECT *, int event,
114 FL_Coord, FL_Coord, int key, void *xev);
117 int WorkAreaMotionNotify(FL_OBJECT * ob,
120 XEvent * ev, void * d);
122 int WorkAreaSelectionNotify(FL_OBJECT *, Window win,
123 int /*w*/, int /*h*/,
124 XEvent * event, void * /*d*/);
126 int WorkAreaButtonPress(FL_OBJECT * ob,
129 XEvent * ev, void * d);
131 int WorkAreaButtonRelease(FL_OBJECT * ob,
134 XEvent * ev, void * d);
142 long current_scrollbar_value;
146 bool work_area_focus;
148 FL_OBJECT * work_area;
150 FL_OBJECT * figinset_canvas;
152 FL_OBJECT * scrollbar;
154 FL_OBJECT * button_down;
156 FL_OBJECT * button_up;
158 FL_OBJECT * timer_cursor;
162 int last_click_x, last_click_y;