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()
71 fl_set_timer(timer_cursor, 0.4);
77 void restorePosition();
78 /** This holds the mapping between buffer paragraphs and screen rows.
79 This should be private...but not yet. (Lgb)
83 /// Update pixmap of screen
88 void create_view(int, int, int, int);
90 Inset * checkInsetHit(int & x, int & y);
92 int ScrollUp(long time);
94 int ScrollDown(long time);
96 void ScrollUpOnePage(long /*time*/);
98 void ScrollDownOnePage(long /*time*/);
101 /// A callback for the up arrow in the scrollbar.
102 static void UpCB(FL_OBJECT * ob, long);
104 /// A callback for the slider in the scrollbar.
105 static void ScrollCB(FL_OBJECT * ob, long);
107 /// A callback for the down arrow in the scrollbar.
108 static void DownCB(FL_OBJECT * ob, long);
111 static void CursorToggleCB(FL_OBJECT * ob, long);
112 /** Work area free object handler
114 static int work_area_handler(FL_OBJECT *, int event,
115 FL_Coord, FL_Coord, int key, void *xev);
118 int WorkAreaMotionNotify(FL_OBJECT * ob,
121 XEvent * ev, void * d);
123 int WorkAreaSelectionNotify(FL_OBJECT *, Window win,
124 int /*w*/, int /*h*/,
125 XEvent * event, void * /*d*/);
127 int WorkAreaButtonPress(FL_OBJECT * ob,
130 XEvent * ev, void * d);
132 int WorkAreaButtonRelease(FL_OBJECT * ob,
135 XEvent * ev, void * d);
143 long current_scrollbar_value;
149 bool work_area_focus;
151 FL_OBJECT * work_area;
153 FL_OBJECT * figinset_canvas;
155 FL_OBJECT * scrollbar;
157 FL_OBJECT * button_down;
159 FL_OBJECT * button_up;
161 FL_OBJECT * timer_cursor;
165 int last_click_x, last_click_y;