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.
This commit is contained in:
parent
dc99e382dd
commit
581ad6041b
|
|
@ -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 <direction> <distance> | 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 <direction> <distance> move box position",
|
||||
"grow <direction> <distance> 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. */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 == {}} {
|
||||
|
|
|
|||
Loading…
Reference in New Issue