From 581ad6041b77eb9a06a16f53ce5f8f21748e57f0 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 8 Oct 2020 13:50:14 -0400 Subject: [PATCH] Added new command option "box remove" that removes the cursor box from the layout window. The main reason for this is to keep the box out of the image when doing "plot svg". The "plot" command was also modified to always do a plot of the entire cell in the active layout window if the box is not present. --- VERSION | 2 +- commands/CmdAB.c | 25 +++++++++++++++++-------- plot/plotCmd.c | 10 +++++----- tcltk/wrapper.tcl | 4 ++++ 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/VERSION b/VERSION index 4d445a44..b941f982 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.63 +8.3.64 diff --git a/commands/CmdAB.c b/commands/CmdAB.c index 8878b8cc..4d662dc3 100644 --- a/commands/CmdAB.c +++ b/commands/CmdAB.c @@ -545,6 +545,7 @@ selGetArrayFunc(selUse, use, trans, arg) * box size [width height] * box position [llx lly] [-edit] * box values [llx lly urx ury] [-edit] + * box remove * box select * * box | cursor @@ -581,14 +582,15 @@ selGetArrayFunc(selUse, use, trans, arg) #define BOX_SIZE 2 #define BOX_POSITION 3 #define BOX_VALUES 4 -#define BOX_SELECT 5 -#define BOX_MOVE 6 -#define BOX_GROW 7 -#define BOX_SHRINK 8 -#define BOX_CORNER 9 -#define BOX_EXISTS 10 -#define BOX_HELP 11 -#define BOX_DEFAULT 12 +#define BOX_REMOVE 5 +#define BOX_SELECT 6 +#define BOX_MOVE 7 +#define BOX_GROW 8 +#define BOX_SHRINK 9 +#define BOX_CORNER 10 +#define BOX_EXISTS 11 +#define BOX_HELP 12 +#define BOX_DEFAULT 13 void CmdBox(w, cmd) @@ -601,6 +603,7 @@ CmdBox(w, cmd) "size [width height] set or return box size", "position [llx lly] [-edit] set or return box position", "values [llx lly urx ury] [-edit] set or return box coordinates", + "remove remove cursor box from display", "select set box to selection bounding box", "move move box position", "grow expand box size", @@ -661,6 +664,12 @@ CmdBox(w, cmd) windCheckOnlyWindow(&w, DBWclientID); + if (option == BOX_REMOVE) + { + DBWSetBox((CellDef *)NULL, &GeoNullRect); + return; + } + /*----------------------------------------------------------*/ /* Check for the command options which do not require a box */ /* to be present. */ diff --git a/plot/plotCmd.c b/plot/plotCmd.c index e77f2480..9d72f60f 100644 --- a/plot/plotCmd.c +++ b/plot/plotCmd.c @@ -176,11 +176,11 @@ CmdPlot(w, cmd) if ((!ToolGetBox(&boxRootDef, &scx.scx_area)) || (scx.scx_use->cu_def != boxRootDef)) { - TxError("The box and cursor must appear in the same window\n"); - TxError(" for plotting. The box indicates the area to\n"); - TxError(" plot, and the cursor's window tells which\n"); - TxError(" cells are expanded and unexpanded).\n"); - return; + /* If no box is specified, then use the cell in the layout */ + /* window, and plot the entire cell using the cell bounding */ + /* box as the area to plot. */ + + scx.scx_area = scx.scx_use->cu_def->cd_bbox; } scx.scx_trans = GeoIdentityTransform; mask = crec->dbw_visibleLayers; diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl index cacc5b27..5bba211a 100644 --- a/tcltk/wrapper.tcl +++ b/tcltk/wrapper.tcl @@ -614,6 +614,10 @@ proc magic::repaintwrapper { win } { proc magic::boxview {win {cmdstr ""}} { if {${cmdstr} == "exists" || ${cmdstr} == "help" || ${cmdstr} == ""} { # do nothing. . . informational only, no change to the box + } elseif {${cmdstr} == "remove"} { + set framename [winfo parent $win] + if {$framename == "."} {return} + ${framename}.titlebar.pos configure -text "no box" } elseif {[info level] <= 1} { # For NULL window, find all layout windows and apply update to each. if {$win == {}} {