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 smallUpdate(signed char f);
55 void updateScrollbar();
57 void redoCurrentBuffer();
59 int resizeCurrentBuffer();
63 void cursorPrevious();
67 bool available() const;
69 LyXView * owner() const { return owner_; }
71 LyXScreen * getScreen() {
72 fl_set_timer(timer_cursor, 0.4);
80 void restorePosition();
81 /** This holds the mapping between buffer paragraphs and screen rows.
82 This should be private...but not yet. (Lgb)
86 UpdatableInset * the_locking_inset;
100 /// Update pixmap of screen
103 int workAreaExpose();
105 void create_view(int, int, int, int);
107 Inset * checkInsetHit(int & x, int & y);
109 int ScrollUp(long time);
111 int ScrollDown(long time);
113 void ScrollUpOnePage(long /*time*/);
115 void ScrollDownOnePage(long /*time*/);
118 /// A callback for the up arrow in the scrollbar.
119 static void UpCB(FL_OBJECT * ob, long);
121 /// A callback for the slider in the scrollbar.
122 static void ScrollCB(FL_OBJECT * ob, long);
124 /// A callback for the down arrow in the scrollbar.
125 static void DownCB(FL_OBJECT * ob, long);
128 static void CursorToggleCB(FL_OBJECT * ob, long);
129 /** Work area free object handler
131 static int work_area_handler(FL_OBJECT *, int event,
132 FL_Coord, FL_Coord, int key, void *xev);
135 int WorkAreaMotionNotify(FL_OBJECT * ob,
138 XEvent * ev, void * d);
140 int WorkAreaSelectionNotify(FL_OBJECT *, Window win,
141 int /*w*/, int /*h*/,
142 XEvent * event, void * /*d*/);
144 int WorkAreaButtonPress(FL_OBJECT * ob,
147 XEvent * ev, void * d);
149 int WorkAreaButtonRelease(FL_OBJECT * ob,
152 XEvent * ev, void * d);
160 long current_scrollbar_value;
164 bool work_area_focus;
166 FL_OBJECT * work_area;
168 FL_OBJECT * figinset_canvas;
170 FL_OBJECT * scrollbar;
172 FL_OBJECT * button_down;
174 FL_OBJECT * button_up;
176 FL_OBJECT * timer_cursor;
180 int last_click_x, last_click_y;