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"
34 BufferView(LyXView *owner, int , int , int, int);
38 Buffer * buffer() const { return buffer_; }
40 FL_OBJECT * getWorkArea() { return work_area; }
42 void buffer(Buffer * b);
53 void update(signed char f);
56 void updateScrollbar();
58 void redoCurrentBuffer();
60 int resizeCurrentBuffer();
64 void cursorPrevious();
68 bool available() const;
70 LyXView * owner() const { return owner_; }
72 LyXScreen * getScreen()
74 fl_set_timer(timer_cursor, 0.4);
80 void restorePosition();
82 /** This holds the mapping between buffer paragraphs and screen rows.
83 This should be private...but not yet. (Lgb)
88 /// Update pixmap of screen
93 void create_view(int, int, int, int);
95 Inset * checkInsetHit(int & x, int & y);
97 int ScrollUp(long time);
99 int ScrollDown(long time);
101 void ScrollUpOnePage(long /*time*/);
103 void ScrollDownOnePage(long /*time*/);
106 /// A callback for the up arrow in the scrollbar.
107 static void UpCB(FL_OBJECT * ob, long);
109 /// A callback for the slider in the scrollbar.
110 static void ScrollCB(FL_OBJECT * ob, long);
112 /// A callback for the down arrow in the scrollbar.
113 static void DownCB(FL_OBJECT * ob, long);
116 static void CursorToggleCB(FL_OBJECT * ob, long);
117 /** Work area free object handler
119 static int work_area_handler(FL_OBJECT *, int event,
120 FL_Coord, FL_Coord, int key, void *xev);
123 int WorkAreaMotionNotify(FL_OBJECT * ob,
126 XEvent * ev, void * d);
128 int WorkAreaSelectionNotify(FL_OBJECT *, Window win,
129 int /*w*/, int /*h*/,
130 XEvent * event, void * /*d*/);
132 int WorkAreaButtonPress(FL_OBJECT * ob,
135 XEvent * ev, void * d);
137 int WorkAreaButtonRelease(FL_OBJECT * ob,
140 XEvent * ev, void * d);
148 long current_scrollbar_value;
154 bool work_area_focus;
156 FL_OBJECT * work_area;
158 FL_OBJECT * figinset_canvas;
160 FL_OBJECT * scrollbar;
162 FL_OBJECT * button_down;
164 FL_OBJECT * button_up;
166 FL_OBJECT * timer_cursor;
170 int last_click_x, last_click_y;