/* ZOOMOUT (STD) -- Zoom Out */ /* ZOOMOUT (STD) -- Zoom kleiner */ /* -- INTENDED FOR KEY-CALL USE -- */ /* // Copyright (c) 1997-2012 Oliver Bartels F+E, Muenchen // Author: Roman Ludwig // Changes History: // rl (120427) RELEASED FOR BAE V7.8. // rl (101019) RELEASED FOR BAE V7.6. // rl (091021) RELEASED FOR BAE V7.4. // rl (081014) RELEASED FOR BAE V7.2. // rl (071029) RELEASED FOR BAE V7.0. // rl (060829) RELEASED FOR BAE V6.8. // rl (050906) RELEASED FOR BAE V6.6. // rl (040831) RELEASED FOR BAE V6.4. // rl (030904) RELEASED FOR BAE V6.2. // rl (021209) RELEASED FOR BAE V6.0. // rl (020802) CHANGE: // Changed zoom destination window to preserve mouse position // in element to allow subsequent zooms without mouse move. // rl (020618) RELEASED FOR BAE V5.4. // rl (011023) BUGFIX: // Enabled call in CAM-View environment. // rl (010625) RELEASED FOR BAE V5.0. // rl (000509) RELEASED FOR BAE V4.6. // rl (990625) RELEASED FOR BAE V4.4. // rl (990623) BUGFIX: // Zoom to window center if mouse outside window // rl (980910) RELEASED FOR BAE V4.2. // rl (970929) RELEASED FOR BAE V4.0. // rl (970911) ORIGINAL CODING. // // DESCRIPTION // // The zoomout User Language program performs a // zoom out/zoom smaller display command. */ // Includes #include "std.ulh" // User Language standard include // Disable undo state request #pragma ULCALLERNOUNDO // INI file parameter name definitions #define PAR_ZOOMCENTER "ZOOMCENTER_STD" // Zoom center mode // Main program void main() { double msx, msy /* Mouse workspace coordinates */; double mxoff, myoff /* Mouse position offset */; double wlx, wux /* Window hor. boundary */; double wly, wuy /* Window ver. boundary */; double wcx, wcy /* Window center coordinates */; double xexpand, yexpand /* Expand values */; int warpmode = 0 /* Mouse coordinate warp mode */; int rangedis /* Range check disabled flag */; // Swallow right mouse button activation notification if (bae_peekiact() && bae_getactmenu()<0) askstr("",1024); // Abort if invalid plan class if (bae_planddbclass()==DDBCLUNDEF) error_class(); // Get current workspace window dimension wlx=bae_wswinlx(); wly=bae_wswinly(); wux=bae_wswinux(); wuy=bae_wswinuy(); // Check window size if (wlx==wux || wly==wuy) exit(0); // Get the mouse workspace position bae_wsmouse(msx,msy,0); // Check if mouse within workspace area if (msx>wlx && msxwly && msy