]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
fixes because of SUN CC warnings, bmtable now compiled with C compilator, countChar...
[lyx.git] / src / BufferView.C
index 02da89151f695de55fb727428ff8d2491d1d5c10..c6ab81144be94ff7c440c77d47d32fa159d5c916 100644 (file)
@@ -402,7 +402,7 @@ extern "C" {
 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)
@@ -423,9 +423,9 @@ void BufferView::create_view(int xpos, int ypos, int width, int height)
 
        // 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
@@ -445,7 +445,7 @@ void BufferView::create_view(int xpos, int ypos, int width, int height)
        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);
@@ -464,9 +464,9 @@ void BufferView::create_view(int xpos, int ypos, int width, int height)
        // 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);
@@ -824,11 +824,10 @@ int BufferView::work_area_handler(FL_OBJECT * ob, int event,
        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;
 
@@ -1300,14 +1299,14 @@ void BufferView::CursorToggleCB(FL_OBJECT * ob, long)
 {
        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)
@@ -1350,7 +1349,7 @@ void BufferView::CursorToggleCB(FL_OBJECT * ob, long)
        }
 
        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->
@@ -1359,7 +1358,7 @@ void BufferView::CursorToggleCB(FL_OBJECT * ob, long)
                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())
@@ -1433,7 +1432,7 @@ int BufferView::WorkAreaSelectionNotify(FL_OBJECT *, Window win,
                }
                XFlush(fl_display);
 
-               if (uc){
+               if (uc) {
                        free(uc);
                        uc = 0;
                }
@@ -1480,7 +1479,7 @@ void BufferView::cursorPrevious()
        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();
        
@@ -1501,7 +1500,7 @@ void BufferView::cursorNext()
        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();
        
@@ -1543,7 +1542,6 @@ void BufferView::restorePosition()
 } 
 
 
-// candidate for move to BufferView
 void BufferView::update(signed char f)
 {
        owner()->updateLayoutChoice();