]> git.lyx.org Git - features.git/commitdiff
toggleInset improvement; make lyxpreview work out of the box (?); apply aspect ratio...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 19 Jul 2002 21:44:14 +0000 (21:44 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 19 Jul 2002 21:44:14 +0000 (21:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4714 a592a061-630c-0410-9148-cb99ea01b6c8

13 files changed:
lib/ChangeLog
lib/configure.m4
po/POTFILES.in
src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/forms/form_graphics.fd
src/graphics/ChangeLog
src/graphics/PreviewLoader.C
src/insets/ChangeLog
src/insets/insetgraphicsParams.C
src/insets/insetgraphicsParams.h
src/text2.C

index f55c6a4ff3529eb75b3e4591e58dbb2ddebb2f71..e0f006b377e4f755dc97f4ed489191fe7b303a06 100644 (file)
@@ -1,6 +1,13 @@
+2002-07-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * configure.m4: fix definition of the lyxpreview2ppm converter;
+       add ppm format. All should work out of the box now, even though
+       all may not be pretty
+
 2002-07-18  Angus Leeming  <leeming@lyx.org>
 
-       * lyxpreview2ppm.sh: clean-up. Get it to work with scary_eqns.lyx.
+       * scripts/lyxpreview2ppm.sh: clean-up. Get it to work with
+       scary_eqns.lyx. 
 
 2002-07-17  André Pönitz <poenitz@gmx.net>
        
index 974808a33e5ce7551689fd764add322446c208f1..b0c7a2b1fb6d45d22bf79b7dc6a9f020018c5631 100644 (file)
@@ -270,9 +270,8 @@ test $dvi_to_ps_command = "dvips" && dvi_to_ps_command="dvips -o \$\$o \$\$i"
 SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command,dvipdfm)
 test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i"
 
-# Search for a program to convert previewlyx to eps
-SEARCH_PROG([for a LyX preview converter],lyxpreview_to_xpm_command,lyxpreview2xpm.sh)
-test $lyxpreview_to_xpm_command = "lyxpreview2xpm.sh" && lyxpreview_to_xpm_command="lyxpreview2xpm.sh \$\$i \$\$o"
+# We have a script to convert previewlyx to ppm
+lyxpreview_to_ppm_command="lyxpreview2ppm.sh"
 
 # Search a *roff program (used to translate tables in ASCII export)
 LYXRC_PROG([for a *roff formatter], \ascii_roff_command, dnl
@@ -449,13 +448,14 @@ cat >$outfile <<EOF
 \\Format pdf2    pdf  "PDF (pdflatex)" F
 \\Format pdf3    pdf  "PDF (dvipdfm)"  m
 \\Format png     png   PNG             ""
+\\Format ppm     ppm   PPM             ""
 \\Format ps      ps    Postscript      t
 \\Format program  ""   Program         ""
 \\Format tgif     obj  TGIF            ""
 \\Format tiff     tif  TIFF            ""
 \\Format word    doc   Word            W
 \\Format xpm     xpm   XPM             ""
-\\Format lyxpreview      lyxpreview    LYXPREVIEW              ""
+\\Format lyxpreview    lyxpreview      "LyX Preview"           ""
 
 \\converter latex dvi "$latex_to_dvi" "latex"
 \\converter latex pdf2 "$latex_to_pdf" "latex"
@@ -471,7 +471,7 @@ cat >$outfile <<EOF
 \\converter linuxdoc html "$linuxdoc_to_html_command" ""
 \\converter docbook dvi "$docbook_to_dvi_command" ""
 \\converter docbook html "$docbook_to_html_command" ""
-\\converter lyxpreview xpm "$lyxpreview_to_xpm_command" ""
+\\converter lyxpreview ppm "$lyxpreview_to_ppm_command" ""
 
 \\converter latex lyx "$tex_to_lyx_command" ""
 \\converter literate lyx "$literate_to_lyx_command" ""
index 4f857af22fd99bdaa42a1ef5176afa77a57540fb..b32f886323e99a08ea5fc268c50a3eee614e7eea 100644 (file)
@@ -113,7 +113,6 @@ src/frontends/xforms/FormUrl.C
 src/frontends/xforms/FormVCLog.C
 src/frontends/xforms/input_validators.C
 src/frontends/xforms/Menubar_pimpl.C
-src/frontends/xforms/xfont_loader.C
 src/frontends/xforms/xforms_helpers.C
 src/frontends/xforms/XMiniBuffer.C
 src/gettext.h
index 4c1a25c06b196249759dd12e062d4cee60a70b8d..605af3f4037e0588d01b744772ec1d160a1ae8da 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * text2.C (toggleInset): if cursor is inside an inset, close the
+       inset and leave cursor _after_ it
+
 2002-07-19  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyxfunc.C: move minibuffer completion handling out of here
index 3ec1c34e3baba94c1fb93f5bedfcc2a955259c13..15c172027041c4337ff6499563f564c2de7fc41f 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-28  Herbert Voss  <voss@perce.de>
+
+       * FormGraphics.C:
+       * forms/form_graphics.fd: add a new check button for LyXAspectRatio.
+
 2002-07-19  John Levon  <moz@compsoc.man.ac.uk>
 
        * DropDown.h:
index af7451faea33720e659b71d2b8f151383e117e5c..22d9e46ab5144741a883e6bc235f419fa31e7f18 100644 (file)
@@ -132,6 +132,7 @@ void FormGraphics::build()
        bc().addReadOnly(lyxview_->radio_gray);
        bc().addReadOnly(lyxview_->radio_color);
        bc().addReadOnly(lyxview_->radio_nodisplay);
+       bc().addReadOnly(lyxview_->check_lyxaspectratio);
 
        // the size section
        size_.reset(build_graphics_size(this));
@@ -252,6 +253,7 @@ void FormGraphics::apply()
                                                lyxview_->choice_lyxheight);
 
        igp.lyxscale = strToInt(getStringFromInput(lyxview_->input_lyxscale));
+       igp.keepLyXAspectRatio = fl_get_button(lyxview_->check_lyxaspectratio);
 
        // the size section
        if (fl_get_button(size_->radio_asis))
@@ -361,6 +363,7 @@ void FormGraphics::update() {
                setEnabled(lyxview_->choice_lyxwidth, 0);
                setEnabled(lyxview_->input_lyxheight, 0);
                setEnabled(lyxview_->choice_lyxheight, 0);
+               setEnabled(lyxview_->check_lyxaspectratio, 0);
                setEnabled(lyxview_->input_lyxscale, 0);
                break;
        }
@@ -370,6 +373,7 @@ void FormGraphics::update() {
                setEnabled(lyxview_->choice_lyxwidth, 1);
                setEnabled(lyxview_->input_lyxheight, 1);
                setEnabled(lyxview_->choice_lyxheight, 1);
+               setEnabled(lyxview_->check_lyxaspectratio, 1);
                setEnabled(lyxview_->input_lyxscale, 0);
                break;
        }
@@ -379,11 +383,14 @@ void FormGraphics::update() {
                setEnabled(lyxview_->choice_lyxwidth, 0);
                setEnabled(lyxview_->input_lyxheight, 0);
                setEnabled(lyxview_->choice_lyxheight, 0);
+               setEnabled(lyxview_->check_lyxaspectratio, 0);
                setEnabled(lyxview_->input_lyxscale, 1);
                break;
        }
        }
 
+       fl_set_button(lyxview_->check_lyxaspectratio, igp.keepLyXAspectRatio);
+
        // the size section
        // Update the draft and clip mode
        updateWidgetsFromLength(size_->input_width,
@@ -530,18 +537,21 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                setEnabled(lyxview_->choice_lyxwidth, 0);
                setEnabled(lyxview_->input_lyxheight, 0);
                setEnabled(lyxview_->choice_lyxheight, 0);
+               setEnabled(lyxview_->check_lyxaspectratio, 0);
                setEnabled(lyxview_->input_lyxscale, 0);
        } else if (ob == lyxview_->radio_lyxwh) {
                setEnabled(lyxview_->input_lyxwidth, 1);
                setEnabled(lyxview_->choice_lyxwidth, 1);
                setEnabled(lyxview_->input_lyxheight, 1);
                setEnabled(lyxview_->choice_lyxheight, 1);
+               setEnabled(lyxview_->check_lyxaspectratio, 1);
                setEnabled(lyxview_->input_lyxscale, 0);
        } else if (ob == lyxview_->radio_lyxscale) {
                setEnabled(lyxview_->input_lyxwidth, 0);
                setEnabled(lyxview_->choice_lyxwidth, 0);
                setEnabled(lyxview_->input_lyxheight, 0);
                setEnabled(lyxview_->choice_lyxheight, 0);
+               setEnabled(lyxview_->check_lyxaspectratio, 0);
                setEnabled(lyxview_->input_lyxscale, 1);
        } else if (ob == lyxview_->button_latex_values) {
                if (contains(fl_get_choice_text(size_->choice_width),'%') || 
@@ -570,6 +580,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                                setEnabled(lyxview_->choice_lyxwidth, 0);
                                setEnabled(lyxview_->input_lyxheight, 0);
                                setEnabled(lyxview_->choice_lyxheight, 0);
+                               setEnabled(lyxview_->check_lyxaspectratio, 0);
                                setEnabled(lyxview_->input_lyxscale, 0);
                        } else if (fl_get_button (size_->radio_wh) == 1) {
                                fl_set_button (lyxview_->radio_lyxwh, 1);
@@ -577,6 +588,7 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                                setEnabled(lyxview_->choice_lyxwidth, 1);
                                setEnabled(lyxview_->input_lyxheight, 1);
                                setEnabled(lyxview_->choice_lyxheight, 1);
+                               setEnabled(lyxview_->check_lyxaspectratio, 1);
                                setEnabled(lyxview_->input_lyxscale, 0);
                        } else if (fl_get_button (size_->radio_scale) ==1) {
                                fl_set_button (lyxview_->radio_lyxscale, 1);
@@ -584,9 +596,12 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                                setEnabled(lyxview_->choice_lyxwidth, 0);
                                setEnabled(lyxview_->input_lyxheight, 0);
                                setEnabled(lyxview_->choice_lyxheight, 0);
+                               setEnabled(lyxview_->check_lyxaspectratio, 0);
                                setEnabled(lyxview_->input_lyxscale, 1);
                        }
                }
+               fl_set_button(lyxview_->check_lyxaspectratio,
+                       fl_get_button(size_->check_aspectratio));
 
                // the bb section
        } else if (!controller().bbChanged &&
@@ -675,6 +690,8 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                        setEnabled(size_->check_aspectratio, 0);
                        setEnabled(size_->input_scale, 1);
                }
+               fl_set_button(size_->check_aspectratio,
+                             fl_get_button(lyxview_->check_lyxaspectratio));
        }
 
        // check if the input is valid
index 09e39a39a749d425c5bef85e175dfec7f592d412..73e58f028233e44853335e6bdf4ce5be110a6cc4 100644 (file)
@@ -442,7 +442,7 @@ argument:
 --------------------
 class: FL_BEGIN_GROUP
 type: 0
-box: 0 0 0
+box: 0 10 10 0
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER
@@ -453,7 +453,7 @@ label:
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name:
+name: 
 callback: 
 argument: 
 
@@ -923,7 +923,7 @@ argument: 0
 Name: form_graphics_lyxview
 Width: 500
 Height: 245
-Number of Objects: 23
+Number of Objects: 24
 
 --------------------
 class: FL_BOX
@@ -1000,7 +1000,7 @@ argument:
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 350 95 70 30
+box: 350 75 70 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -1018,7 +1018,7 @@ argument: 0
 --------------------
 class: FL_BEGIN_GROUP
 type: 0
-box: 0 0 0
+box: 0 10 10 0
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER
@@ -1036,10 +1036,10 @@ argument:
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 255 25 30 30
+box: 170 25 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_LEFT
+alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
@@ -1054,10 +1054,10 @@ argument: 0
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 255 90 30 30
+box: 170 75 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_LEFT
+alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
@@ -1072,10 +1072,10 @@ argument: 0
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 255 155 30 30
+box: 170 140 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_LEFT
+alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
@@ -1108,7 +1108,7 @@ argument:
 --------------------
 class: FL_TEXT
 type: NORMAL_TEXT
-box: 420 95 25 30
+box: 420 75 25 30
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
@@ -1126,7 +1126,7 @@ argument:
 --------------------
 class: FL_BEGIN_GROUP
 type: 0
-box: 0 0 0
+box: 0 10 10 0
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER
@@ -1137,7 +1137,7 @@ label:
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name:
+name: 
 callback: 
 argument: 
 
@@ -1252,7 +1252,7 @@ argument:
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 350 155 70 30
+box: 350 135 70 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -1270,7 +1270,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 425 155 50 30
+box: 425 135 50 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -1288,7 +1288,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 350 190 70 30
+box: 350 170 70 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -1306,7 +1306,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 425 190 50 30
+box: 425 170 50 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -1339,5 +1339,23 @@ name: button_latex_values
 callback: C_FormBaseInputCB
 argument: 0
 
+--------------------
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 210 200 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_RIGHT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: keep Aspect ratio|#A
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: check_lyxaspectratio
+callback: C_FormBaseInputCB
+argument: 0
+
 ==============================
 --------------------
index bb99b481187e4b30a56f4951e2ef8dd3d9ee000a..ddf0b89cea84ec94cd0462cc7202433565d4c018 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * PreviewLoader.C (startLoading): use LibScriptSearch to find the
+       preview converter script
+
 2002-07-18  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * GraphicsCacheItem.C (reset): use erase() instead of clear() for
index a78005fe0a3adbda9a57998504fda23ceeaffbe4..ccdbaaca82d93404974bad51d45592cde280bc8f 100644 (file)
@@ -467,7 +467,7 @@ void PreviewLoader::Impl::startLoading()
        cs << pconverter_->command << " " << latexfile << " "
           << font_scaling_factor_;
 
-       string const command = cs.str().c_str();
+       string const command = LibScriptSearch(cs.str().c_str());
 
        // Initiate the conversion from LaTeX to bitmap images files.
        Forkedcall::SignalTypePtr convert_ptr;
index f0f953a2de22a7ab33de81a1ded1ab287ac2aa9e..2cbf2e0fac654a06726992e80a3565a0ce086fdb 100644 (file)
@@ -1,3 +1,14 @@
+2002-07-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * insetgraphicsParams.C (as_grfxParams): use the new
+       keepLyXAspectRatio parameter. Note that this is an adaptation of a
+       1.2.0 patch, and I do not really know how to adapt it to the new
+       grfx::Cache world. Angus, please could you have a look? 
+
+2002-05-01  Herbert Voss  <voss@lyx.org>
+
+       * insetgraphicsParams.[Ch]: define a new keepLyXAspectRatio parameter.
+
 2002-07-18  Angus Leeming  <leeming@lyx.org>
 
        * insetgraphics.C: clean-up comments (from Herbert).
index 13952b2bd78dfcdeb33e881f01a51c2e170767c6..c9d31047f97b39ef61e88d876697b9dc728a3b46 100644 (file)
@@ -19,6 +19,7 @@
 #include "insetgraphicsParams.h"
 
 #include "graphics/GraphicsParams.h"
+#include "graphics/GraphicsCache.h"
 
 #include "support/translator.h"
 #include "support/filetools.h"
@@ -98,6 +99,7 @@ void InsetGraphicsParams::init()
        lyxscale = 0;                   // same for lyxview
        size_type = DEFAULT_SIZE;       // do nothing
        lyxsize_type = DEFAULT_SIZE;    // do nothing
+       keepLyXAspectRatio = false;     // only for LyXview
        keepAspectRatio = false;        // only for latex
        rotate = false;                 // Rotating
        rotateOrigin = "center";        // Origin
@@ -123,6 +125,7 @@ void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
        lyxsize_type = igp.lyxsize_type;
        lyxwidth = igp.lyxwidth;
        lyxheight = igp.lyxheight;
+       keepLyXAspectRatio = igp.keepLyXAspectRatio;
        lyxscale = igp.lyxscale;
        rotate = igp.rotate;
        rotateOrigin = igp.rotateOrigin;
@@ -149,6 +152,7 @@ bool operator==(InsetGraphicsParams const & left,
            left.lyxsize_type == right.lyxsize_type &&
            left.lyxwidth == right.lyxwidth &&
            left.lyxheight == right.lyxheight &&
+           left.keepLyXAspectRatio == right.keepLyXAspectRatio &&
            left.lyxscale == right.lyxscale &&
            left.rotate == right.rotate &&
            left.rotateOrigin == right.rotateOrigin &&
@@ -215,6 +219,8 @@ void InsetGraphicsParams::Write(ostream & os) const
                os << "\tlyxwidth " << lyxwidth.asString() << '\n';
        if (!lyxheight.zero())
                os << "\tlyxheight " << lyxheight.asString();
+       if (keepLyXAspectRatio)
+               os << "\tkeepLyXAspectRatio\n";
        if (lyxscale != 0)
                os << "\tlyxscale " << lyxscale << '\n';
 }
@@ -296,6 +302,8 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
        } else if (token == "lyxheight") {
                lex.next();
                lyxheight = LyXLength(lex.getString());
+       } else if (token == "keepLyXAspectRatio") {
+               keepLyXAspectRatio = true;
        } else if (token == "lyxscale") {
                lex.next();
                lyxscale = lex.getInteger();
@@ -401,6 +409,30 @@ grfx::Params InsetGraphicsParams::as_grfxParams(string const & filepath) const
                double const scaling_factor = 100.0 / double(lyxrc.zoom);
                pars.width  = uint(scaling_factor * pars.width);
                pars.height = uint(scaling_factor * pars.height);
+
+#if 0
+#warning Angus, could you please adapt this code? (JMarc)
+               if (keepLyXAspectRatio) {
+                       // get the imagesize from the cache
+                       grfx::Cache & gc = grfx::Cache::get();
+                       float const rw = gc.raw_width(filename);
+                       float const rh = gc.raw_height(filename);
+                       float const ratio = (rw > 0.001) ? rh/rw : 1.0;
+                       lyxerr[Debug::GRAPHICS]
+                               << "Value of LyXAspectRatio: "
+                               << ratio << std::endl;
+                       if (!lyxwidth.zero() && !lyxheight.zero()) {
+                               if (width < height)
+                                       height = int(ratio * width);
+                               else
+                                       width = int(ratio * height);
+                       } else if (lyxwidth.zero())
+                               width = int(ratio * height);
+                       else if (lyxheight.zero())
+                               height = int(ratio * width);
+               }
+#endif
        }
+       
        return pars;
 }
index 1591b5980b809f452274a245e4713dd7ef8a8f1f..3fae9694e2cbffbe62aa5530228c60b47c308a7e 100644 (file)
@@ -83,6 +83,8 @@ struct InsetGraphicsParams
        LyXLength lyxwidth;
        ///
        LyXLength lyxheight;
+       /// Keep the ratio between lyxheight and lyxwidth when resizing.
+       bool keepLyXAspectRatio;
        /// Typ of rescaling the Screen inside lyx
        int lyxscale;
        ///
index 80c9a487cbc29ac6306d6b529599a0e53879d3a4..896e2a97ddeeebc68f174473a10ad2136a38d33b 100644 (file)
@@ -431,6 +431,7 @@ void LyXText::toggleInset(BufferView * bview)
                    && inset_owner->owner()->isOpen()) {
                        bview->unlockInset(static_cast<UpdatableInset *>(inset_owner->owner()));
                        inset_owner->owner()->close(bview);
+                       bview->getLyXText()->cursorRight(bview);
                }
                return;
        }