void BufferView::create_view(int xpos, int ypos, int width, int height)
{
FL_OBJECT * obj;
- const int bw = abs(fl_get_border_width());
+ int const bw = abs(fl_get_border_width());
// a hack for the figinsets (Matthias)
// This one first, then it will probably be invisible. (Lgb)
// the free object
work_area = obj = fl_add_free(FL_INPUT_FREE,
- xpos +bw, ypos+bw,
- width-15-2*bw /* scrollbarwidth */,
- height-2*bw, "",
+ xpos + bw, ypos + bw,
+ width - 15 - 2 * bw /* scrollbarwidth */,
+ height - 2 * bw, "",
C_BufferView_work_area_handler);
obj->wantkey = FL_KEY_TAB;
obj->u_vdata = this; /* This is how we pass the BufferView
fl_set_border_width(-2); // to get visible feedback
#endif
button_up = obj = fl_add_pixmapbutton(FL_TOUCH_BUTTON,
- width-15+4*bw,
+ width - 15 + 4 * bw,
ypos,
15, 15, "");
fl_set_object_boxtype(obj, FL_UP_BOX);
// the scrollbar slider
fl_set_border_width(-bw);
scrollbar = obj = fl_add_slider(FL_VERT_SLIDER,
- width-15+4*bw,
+ width - 15 + 4 * bw,
ypos + 15,
- 15, height-30, "");
+ 15, height - 30, "");
fl_set_object_color(obj, FL_COL1, FL_MCOL);
fl_set_object_boxtype(obj, FL_UP_BOX);
fl_set_object_resize(obj, FL_RESIZE_ALL);
return 1;
}
-int BufferView::WorkAreaMotionNotify(FL_OBJECT *ob, Window,
+int BufferView::WorkAreaMotionNotify(FL_OBJECT * ob, Window,
int /*w*/, int /*h*/,
- XEvent * ev, void */*d*/)
+ XEvent * ev, void * /*d*/)
{
-
if (buffer_ == 0) return 0;
if (!screen) return 0;
{
BufferView * view = static_cast<BufferView*>(ob->u_vdata);
- /* quite a nice place for asyncron Inset updating, isn't it? */
- // actually no! This is run even if no buffer exist... so (Lgb)
+ // Quite a nice place for asyncron Inset updating, isn't it?
+ // Actually no! This is run even if no buffer exist... so (Lgb)
if (view && !view->buffer_) {
goto set_timer_and_return;
}
// NOTE:
- // On my quest to solve the gs rendre hangups I am now
+ // On my quest to solve the gs render hangups I am now
// disabling the SIGHUP completely, and will do a wait
// now and then instead. If the guess that xforms somehow
// destroys something is true, this is likely (hopefully)
}
if (view->lyx_focus && view->work_area_focus) {
- if (!view->buffer_->the_locking_inset){
+ if (!view->buffer_->the_locking_inset) {
view->screen->CursorToggle();
} else {
view->buffer_->the_locking_inset->
goto set_timer_and_return;
} else {
// Make sure that the cursor is visible.
- if (!view->buffer_->the_locking_inset){
+ if (!view->buffer_->the_locking_inset) {
view->screen->ShowCursor();
} else {
if (!view->buffer_->the_locking_inset->isCursorVisible())
}
XFlush(fl_display);
- if (uc){
+ if (uc) {
free(uc);
uc = 0;
}
Row * cursorrow = text->cursor.row;
text->SetCursorFromCoordinates(text->cursor.x_fix, y);
text->FinishUndo();
- // this is to allow jumping over large insets
+ // This is to allow jumping over large insets
if ((cursorrow == text->cursor.row))
text->CursorUp();
Row * cursorrow = text->cursor.row;
text->SetCursorFromCoordinates(text->cursor.x_fix, y + work_area->h);
text->FinishUndo();
- /* this is to allow jumping over large insets */
+ // This is to allow jumping over large insets
if ((cursorrow == text->cursor.row))
text->CursorDown();
}
-// candidate for move to BufferView
void BufferView::update(signed char f)
{
owner()->updateLayoutChoice();