/* CV_MS (CV) -- CAM View Mouse Action */ /* CV_MS (CV) -- CAM-View Mausaktion */ /* -- EXECUTED AFTER LEFT MOUSE BUTTON ACTIVATION IN WORK AREA -- */ /* // Copyright (c) 2001-2013 Bartels System GmbH, Muenchen // Author: Roman Ludwig // Changes History: // rl (131029) RELEASED FOR BAE V8.0. // rl (120427) RELEASED FOR BAE V7.8. // rl (101019) RELEASED FOR BAE V7.6. // rl (091020) 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 (040811) RELEASED FOR BAE V6.4. // rl (030904) RELEASED FOR BAE V6.2. // rl (021209) RELEASED FOR BAE V6.0. // rl (020618) RELEASED FOR BAE V5.4. // rl (010625) RELEASED FOR BAE V5.0. // rl (010111) ORIGINAL CODING. // // DESCRIPTION // // The cv_ms User Language program is automatically activated // when pressing the left mouse button in the work area while // the program is idle. Depending on the activated mouse mode // cv_ms lists a menu of functions for the element at the // given mouse position or performs the specified action for // the element. */ // Enforce CV caller type #pragma ULCALLERCV // Includes #include "std.ulh" // User Language standard include // Messages string UPRABORT = M_UPRABORT(); // Menu names string CV_2_0 = M("&Gerberdaten Laden","Load &Gerber Data"); string CV_2_2 = M("%Bl&enden laden" ,"%Load &Apert. Table"); string CV_2_4 = M("%Bo&hrdaten laden" ,"%Load &Drill Data"); string CV_2_6 = M("&Werkzeugtabelle laden","Load &Tool Table"); string CV_2_8 = M("%L&oeschen Speicher","%&Clear Memory"); string CV_BATL = M("%Batch &Laden","%&Load Batch"); string CV_BATS = M("%Batch &Speichern","%&Save Batch"); string MI_ZOOMPAN = M("%Fenster &Mitte" ,"%Center/&Pan Window"); string MI_PARAM = M("%&Einstellungen","%&Settings"); // INI file parameter name definitions #define PAR_MOUSEREP "MOUSEREP_STD" // Mouse command repeat mode int MOUSEREP = bae_iniintval(PAR_MOUSEREP,0) /* Mouse command repeat mode */; // Main program void main() { // Check environment if (uliptype()!=ULIPCV) return; // Query action switch (bae_askmenu(10,CV_2_0,CV_2_2,CV_2_4,CV_2_6,CV_2_8, CV_BATL,CV_BATS,MI_ZOOMPAN,MI_PARAM,UPRABORT)) { case 0 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#200",bae_plainmenutext(CV_2_0)); bae_callmenu(200); break; case 1 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#202",bae_plainmenutext(CV_2_2)); bae_callmenu(202); break; case 2 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#204",bae_plainmenutext(CV_2_4)); bae_callmenu(204); break; case 3 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#206",bae_plainmenutext(CV_2_6)); bae_callmenu(206); break; case 4 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#208",bae_plainmenutext(CV_2_8)); bae_callmenu(208); break; case 5 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "cvbatld:s0",bae_plainmenutext(CV_BATL)); ulsystem("cvbatld:s0",0); break; case 6 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "cvbatld:s1",bae_plainmenutext(CV_BATS)); ulsystem("cvbatld:s1",0); break; case 7 : if (MOUSEREP&0x02) bae_storecmdbuf(0, "#105_ml",bae_plainmenutext(MI_ZOOMPAN)); ulsystem("#105:ml",0); break; case 8 : bae_callmenu(5001); break; default : ; } } // User Language program end