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"
31 BufferView(LyXView
*owner
, int ,int ,int, int);
33 Buffer
*currentBuffer() { return _buffer
; }
35 FL_OBJECT
*getWorkArea() { return work_area
; }
37 void setBuffer(Buffer
*b
);
47 void updateScrollbar();
49 void redoCurrentBuffer();
51 int resizeCurrentBuffer();
55 void cursorPrevious();
59 bool available() const;
61 LyXView
*getOwner() { return _owner
; }
63 LyXScreen
*getScreen()
65 fl_set_timer(timer_cursor
, 0.4);
71 void restorePosition();
73 /// Update pixmap of screen
78 void create_view(int, int, int, int);
80 Inset
* checkInsetHit(int &x
, int &y
);
82 int ScrollUp(long time
);
84 int ScrollDown(long time
);
86 void ScrollUpOnePage(long /*time*/);
88 void ScrollDownOnePage(long /*time*/);
91 /// A callback for the up arrow in the scrollbar.
92 static void UpCB(FL_OBJECT
*ob
, long);
94 /// A callback for the slider in the scrollbar.
95 static void ScrollCB(FL_OBJECT
*ob
, long);
97 /// A callback for the down arrow in the scrollbar.
98 static void DownCB(FL_OBJECT
*ob
, long);
101 static void CursorToggleCB(FL_OBJECT
*ob
, long);
102 /** Work area free object handler
104 static int work_area_handler(FL_OBJECT
*, int event
,
105 FL_Coord
, FL_Coord
, int key
, void *xev
);
108 int WorkAreaMotionNotify(FL_OBJECT
*ob
,
111 XEvent
*ev
, void *d
);
113 int WorkAreaSelectionNotify(FL_OBJECT
*, Window win
,
114 int /*w*/, int /*h*/,
115 XEvent
*event
, void */
*d*/
);
117 int WorkAreaButtonPress(FL_OBJECT
*ob
,
120 XEvent
*ev
, void *d
);
122 int WorkAreaButtonRelease(FL_OBJECT
*ob
,
125 XEvent
*ev
, void *d
);
133 long current_scrollbar_value
;
139 bool work_area_focus
;
141 FL_OBJECT
*work_area
;
143 FL_OBJECT
*figinset_canvas
;
145 FL_OBJECT
*scrollbar
;
147 FL_OBJECT
*button_down
;
149 FL_OBJECT
*button_up
;
151 FL_OBJECT
*timer_cursor
;
155 int last_click_x
, last_click_y
;