1 /*---------------------------------------------------------------------------- 2 cui.h (cui interface definitions) 3 This file is a part of topaz systems 4 Copyright: Hisao Kawaura, All rights reserved 5 1997 - 99 6 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 22 ----------------------------------------------------------------------------*/ 23 24 #if !defined(__cui_h) 25 #define __cui_h 26 27 #include <string> 28 #include "topazcurses.h" 29 #include "buffarray.h" 30 31 /* 32 menu id definition 33 */ 34 35 #define M_SEP -1 36 #define M_MAIN 0 37 38 #define M_FILE 1 39 #define M_AXIS 2 40 #define M_DATA 3 41 #define M_PARTS 4 42 #define M_WINDOW 5 43 #define M_MACRO 6 44 45 #define M_QUIT 11 46 #define M_GRAPHOPEN 12 47 #define M_GRAPHSAVE 13 48 #define M_GRAPHSAVEOV 14 49 #define M_CHANGEDIR 15 50 #define M_PRINT 16 51 #define M_GRAPHNEW 17 52 #define M_GRAPHAPPEND 18 53 #define M_EXPORT 19 54 #define M_ABOUT 80 55 #define M_SHELL 81 56 #define M_HISTORY 82 57 58 #define M_FRAME 20 59 #define M_FRAME_X 21 60 #define M_FRAME_Y 22 61 #define M_FRAME_COLOR 23 62 #define M_FRAMEBODY_COLOR 24 63 #define M_FRAME_LENGTH_X 25 64 #define M_FRAME_LENGTH_Y 26 65 #define M_FRAMELINE_WIDTH 27 66 #define M_FRAMELINE_STYLE 28 67 #define M_FRAMEBODY_STYLE 29 68 #define M_FRAMETYPE 30 69 #define M_FRAMEDEL 31 70 #define M_FRAMENEW 32 71 #define M_FRAMEMOVE 33 72 #define M_FRAMECURRENT 34 73 #define M_FRAMESTRETCH 35 74 #define M_FRAMELIST 36 75 #define M_FRAMEORDER 37 76 #define M_FRAMEORDERUP 38 77 #define M_FRAMEORDERTOP 39 78 #define M_FRAMEORDERBOTTOM 40 79 #define M_FRAMEORDERDOWN 41 80 #define M_FRAMECLONE 42 81 #define M_FRAMEWITHDATA 43 82 #define M_AUTOSCALE 44 83 #define M_AUTOSCALE_ALL 45 84 #define M_AUTOSCALE_X 46 85 #define M_AUTOSCALE_Y 47 86 #define M_AUTOSCALE_T 48 87 #define M_AUTOSCALE_R 49 88 #define M_TRIMMING 50 89 #define M_WATCH 51 90 #define M_FRAMEEDIT 52 91 #define M_FRAMPAINTORDER 53 92 93 94 /*axis X*/ 95 #define M_X 100 96 #define M_X_RANGE 101 97 #define M_X_MAJORTICK 102 98 #define M_X_MINORTICK 103 99 #define M_X_LABEL 104 100 #define M_X_BASE 105 101 #define M_X_DISP 121 102 #define M_X_COMMONSET 122 103 #define M_X_SCALING 123 104 #define M_X_INVERT 124 105 #define M_X_ORIGINX 125 106 #define M_X_ORIGINY 126 107 #define M_X_LENGTH 127 108 #define M_X_ANGLE 128 109 #define M_X_BASELINEWIDTH 129 110 #define M_X_BASELINECAP 130 111 #define M_X_BASELINEJOIN 131 112 #define M_X_BASELINESTYLE 132 113 #define M_X_BASELINECOLOR 133 114 #define M_X_START 134 115 #define M_X_END 135 116 #define M_X_UNIT 136 117 #define M_X_CROSSPOINT 137 118 #define M_X_AUTOCROSSPOINT 138 119 #define M_X_TICKPARITY 139 120 #define M_X_TICKWIDTH 140 121 #define M_X_TICKLENGTH 141 122 #define M_X_DIVISION 142 123 #define M_X_MAJORTICKLINECOLOR 143 124 #define M_X_MINORTICKLINECOLOR 144 125 #define M_X_MAJORTICKLINEWIDTH 145 126 #define M_X_MAJORTICKLINECAP 146 127 #define M_X_MAJORTICKLINEJOIN 147 128 #define M_X_MAJORTICKLINESTYLE 148 129 #define M_X_MINORTICKLINEWIDTH 149 130 #define M_X_MINORTICKLINECAP 150 131 #define M_X_MINORTICKLINEJOIN 151 132 #define M_X_MINORTICKLINESTYLE 152 133 #define M_X_LABELFONTFACE 160 134 #define M_X_LABELFONTSIZE 161 135 #define M_X_LABELFONTANGLE 162 136 #define M_X_LABELFORMAT 163 137 #define M_X_LABELADDPLUS 164 138 #define M_X_LABELPOSITION 165 139 #define M_X_LABELSKIP 166 140 #define M_X_LABELAUTOPRECISION 168 141 #define M_X_LABELINTPRECISION 169 142 #define M_X_LABELDECIMALPRECISION 170 143 #define M_X_LABELCOLOR 171 144 #define M_X_LABELPARITY 172 145 #define M_X_CROSSPOINTPARITY 173 146 #define M_X_BASETICKAREA_START 174 147 #define M_X_BASETICKAREA_END 175 148 #define M_X_CROSSPOINTOFFSET 176 149 150 /*axis Y*/ 151 #define M_Y 200 152 #define M_Y_RANGE 201 153 #define M_Y_MAJORTICK 202 154 #define M_Y_MINORTICK 203 155 #define M_Y_LABEL 204 156 #define M_Y_BASE 205 157 #define M_Y_DISP 221 158 #define M_Y_COMMONSET 222 159 #define M_Y_SCALING 223 160 #define M_Y_INVERT 224 161 #define M_Y_ORIGINX 225 162 #define M_Y_ORIGINY 226 163 #define M_Y_LENGTH 227 164 #define M_Y_ANGLE 228 165 #define M_Y_BASELINEWIDTH 229 166 #define M_Y_BASELINECAP 230 167 #define M_Y_BASELINEJOIN 231 168 #define M_Y_BASELINESTYLE 232 169 #define M_Y_BASELINECOLOR 233 170 #define M_Y_START 234 171 #define M_Y_END 235 172 #define M_Y_UNIT 236 173 #define M_Y_CROSSPOINT 237 174 #define M_Y_AUTOCROSSPOINT 238 175 #define M_Y_TICKPARITY 239 176 #define M_Y_TICKWIDTH 240 177 #define M_Y_TICKLENGTH 241 178 #define M_Y_DIVISION 242 179 #define M_Y_MAJORTICKLINECOLOR 243 180 #define M_Y_MINORTICKLINECOLOR 244 181 #define M_Y_MAJORTICKLINEWIDTH 245 182 #define M_Y_MAJORTICKLINECAP 246 183 #define M_Y_MAJORTICKLINEJOIN 247 184 #define M_Y_MAJORTICKLINESTYLE 248 185 #define M_Y_MINORTICKLINEWIDTH 249 186 #define M_Y_MINORTICKLINECAP 250 187 #define M_Y_MINORTICKLINEJOIN 251 188 #define M_Y_MINORTICKLINESTYLE 252 189 #define M_Y_LABELFONTFACE 260 190 #define M_Y_LABELFONTSIZE 261 191 #define M_Y_LABELFONTANGLE 262 192 #define M_Y_LABELFORMAT 263 193 #define M_Y_LABELADDPLUS 264 194 #define M_Y_LABELPOSITION 265 195 #define M_Y_LABELSKIP 266 196 #define M_Y_LABELAUTOPRECISION 268 197 #define M_Y_LABELINTPRECISION 269 198 #define M_Y_LABELDECIMALPRECISION 270 199 #define M_Y_LABELCOLOR 271 200 #define M_Y_LABELPARITY 272 201 #define M_Y_CROSSPOINTPARITY 273 202 #define M_Y_BASETICKAREA_START 274 203 #define M_Y_BASETICKAREA_END 275 204 #define M_Y_CROSSPOINTOFFSET 276 205 206 /*axis T*/ 207 #define M_T 300 208 #define M_T_RANGE 301 209 #define M_T_MAJORTICK 302 210 #define M_T_MINORTICK 303 211 #define M_T_LABEL 304 212 #define M_T_BASE 305 213 #define M_T_DISP 321 214 #define M_T_COMMONSET 322 215 #define M_T_SCALING 323 216 #define M_T_INVERT 324 217 #define M_T_ORIGINX 325 218 #define M_T_ORIGINY 326 219 #define M_T_LENGTH 327 220 #define M_T_ANGLE 328 221 #define M_T_BASELINEWIDTH 329 222 #define M_T_BASELINECAP 330 223 #define M_T_BASELINEJOIN 331 224 #define M_T_BASELINESTYLE 332 225 #define M_T_BASELINECOLOR 333 226 #define M_T_START 334 227 #define M_T_END 335 228 #define M_T_UNIT 336 229 #define M_T_CROSSPOINT 337 230 #define M_T_AUTOCROSSPOINT 338 231 #define M_T_TICKPARITY 339 232 #define M_T_TICKWIDTH 340 233 #define M_T_TICKLENGTH 341 234 #define M_T_DIVISION 342 235 #define M_T_MAJORTICKLINECOLOR 343 236 #define M_T_MINORTICKLINECOLOR 344 237 #define M_T_MAJORTICKLINEWIDTH 345 238 #define M_T_MAJORTICKLINECAP 346 239 #define M_T_MAJORTICKLINEJOIN 347 240 #define M_T_MAJORTICKLINESTYLE 348 241 #define M_T_MINORTICKLINEWIDTH 349 242 #define M_T_MINORTICKLINECAP 350 243 #define M_T_MINORTICKLINEJOIN 351 244 #define M_T_MINORTICKLINESTYLE 352 245 #define M_T_LABELFONTFACE 360 246 #define M_T_LABELFONTSIZE 361 247 #define M_T_LABELFONTANGLE 362 248 #define M_T_LABELFORMAT 363 249 #define M_T_LABELADDPLUS 364 250 #define M_T_LABELPOSITION 365 251 #define M_T_LABELSKIP 366 252 #define M_T_LABELAUTOPRECISION 368 253 #define M_T_LABELINTPRECISION 369 254 #define M_T_LABELDECIMALPRECISION 370 255 #define M_T_LABELCOLOR 371 256 #define M_T_LABELPARITY 372 257 #define M_T_CROSSPOINTPARITY 373 258 #define M_T_BASETICKAREA_START 374 259 #define M_T_BASETICKAREA_END 375 260 #define M_T_CROSSPOINTOFFSET 376 261 262 /*axis R*/ 263 #define M_R 400 264 #define M_R_RANGE 401 265 #define M_R_MAJORTICK 402 266 #define M_R_MINORTICK 403 267 #define M_R_LABEL 404 268 #define M_R_BASE 405 269 #define M_R_DISP 421 270 #define M_R_COMMONSET 422 271 #define M_R_SCALING 423 272 #define M_R_INVERT 424 273 #define M_R_ORIGINX 425 274 #define M_R_ORIGINY 426 275 #define M_R_LENGTH 427 276 #define M_R_ANGLE 428 277 #define M_R_BASELINEWIDTH 429 278 #define M_R_BASELINECAP 430 279 #define M_R_BASELINEJOIN 431 280 #define M_R_BASELINESTYLE 432 281 #define M_R_BASELINECOLOR 433 282 #define M_R_START 434 283 #define M_R_END 435 284 #define M_R_UNIT 436 285 #define M_R_CROSSPOINT 437 286 #define M_R_AUTOCROSSPOINT 438 287 #define M_R_TICKPARITY 439 288 #define M_R_TICKWIDTH 440 289 #define M_R_TICKLENGTH 441 290 #define M_R_DIVISION 442 291 #define M_R_MAJORTICKLINECOLOR 443 292 #define M_R_MINORTICKLINECOLOR 444 293 #define M_R_MAJORTICKLINEWIDTH 445 294 #define M_R_MAJORTICKLINECAP 446 295 #define M_R_MAJORTICKLINEJOIN 447 296 #define M_R_MAJORTICKLINESTYLE 448 297 #define M_R_MINORTICKLINEWIDTH 449 298 #define M_R_MINORTICKLINECAP 450 299 #define M_R_MINORTICKLINEJOIN 451 300 #define M_R_MINORTICKLINESTYLE 452 301 #define M_R_LABELFONTFACE 460 302 #define M_R_LABELFONTSIZE 461 303 #define M_R_LABELFONTANGLE 462 304 #define M_R_LABELFORMAT 463 305 #define M_R_LABELADDPLUS 464 306 #define M_R_LABELPOSITION 465 307 #define M_R_LABELSKIP 466 308 #define M_R_LABELAUTOPRECISION 468 309 #define M_R_LABELINTPRECISION 469 310 #define M_R_LABELDECIMALPRECISION 470 311 #define M_R_LABELCOLOR 471 312 #define M_R_LABELPARITY 472 313 #define M_R_CROSSPOINTPARITY 473 314 #define M_R_BASETICKAREA_START 474 315 #define M_R_BASETICKAREA_END 475 316 #define M_R_CROSSPOINTOFFSET 476 317 318 319 /* macro */ 320 #define M_MACROEXEC 600 321 #define M_MACROEXECFROMFILE 601 322 #define M_MACRORESISTERED 602 323 324 325 /* data */ 326 #define M_DATAOPEN 700 327 #define M_PLOTMAPPING 701 328 #define M_PLOTMAPPING_DISPLAY 702 329 #define M_PLOTMAPPING_TRANSX 703 330 #define M_PLOTMAPPING_TRANSFORMX 704 331 #define M_PLOTMAPPING_TRANSY 705 332 #define M_PLOTMAPPING_TRANSFORMY 706 333 #define M_PLOTMAPPING_REFAXISX 707 334 #define M_PLOTMAPPING_REFAXISY 708 335 #define M_PLOTMAPPING_CLIPPING 709 336 #define M_PLOTLINE 720 337 #define M_PLOTLINE_STYLE 721 338 #define M_PLOTLINE_WIDTH 722 339 #define M_PLOTLINE_JOIN 723 340 #define M_PLOTLINE_CAP 724 341 #define M_PLOTLINE_COLOR 725 342 #define M_PLOTLINE_INTERPOLATE 726 343 #define M_PLOTLINE_INTERPOLATEDIV 727 344 #define M_PLOTMARKER 740 345 #define M_PLOTMARKER_STYLE 741 346 #define M_PLOTMARKER_CENTERDOT 742 347 #define M_PLOTMARKER_SIZE 743 348 #define M_PLOTMARKER_EDGELINESTYLE 744 349 #define M_PLOTMARKER_EDGECOLOR 745 350 #define M_PLOTMARKER_BODYCOLOR 746 351 #define M_PLOTMARKER_BODYSTYLE 747 352 #define M_PLOTMARKER_BASEVALUE 748 353 #define M_PLOTMEMSET_MSTART 750 354 #define M_PLOTMEMSET_MEND 751 355 #define M_PLOTMEMSET_MDIV 752 356 #define M_PLOTMEMSET_MSCALING 753 357 #define M_PLOTMEMDATA 754 358 #define M_LOADDATA 760 359 #define M_LOADDATA_COLX 761 360 #define M_LOADDATA_COLXMIN 762 361 #define M_LOADDATA_COLXMAX 763 362 #define M_LOADDATA_COLY 764 363 #define M_LOADDATA_COLYMIN 765 364 #define M_LOADDATA_COLYMAX 766 365 #define M_LOADDATA_READSTART 767 366 #define M_LOADDATA_READEND 768 367 #define M_LOADDATA_READSKIP 769 368 #define M_LOADDATA_COMMENTLINEACTION 770 369 #define M_LOADDATA_BARXON 771 370 #define M_LOADDATA_BARYON 772 371 #define M_LOADDATA_SEARCHPATH 773 372 #define M_LOADDATA_EXTRADATA 774 373 #define M_DATALIST 780 374 #define M_DATADELETE 781 375 #define M_DATACORDER 782 376 #define M_DATACLONE 783 377 #define M_PLOTMARKER_EDGEWIDTH 784 378 #define M_DATAINFO 785 379 #define M_DATATRACE 786 380 #define M_LOADDATA_FILENAME 787 381 #define M_DATAEDIT 788 382 383 /* parts */ 384 #define M_PARTS_STYLE 800 385 #define M_PARTS_TYPE 801 386 #define M_PARTS_TEXT 802 387 #define M_PARTS_FONTFACE 803 388 #define M_PARTS_FONTSIZE 804 389 #define M_PARTS_FONTANGLE 805 390 #define M_PARTS_LINESPACE 806 391 #define M_PARTS_LINECOLOR 807 392 #define M_PARTS_BODYCOLOR 808 393 #define M_PARTS_LINEWIDTH 809 394 #define M_PARTS_LINECAP 810 395 #define M_PARTS_LINEJOIN 811 396 #define M_PARTS_LINESTYLE 812 397 #define M_PARTS_BODYFILLRULE 813 398 #define M_PARTS_BODYFILLSTYLE 814 399 #define M_PARTS_LEGENDLENGTH 815 400 #define M_PARTS_INTERPORATE 816 401 #define M_PARTS_INTERPORATEDIV 817 402 #define M_PARTS_P1ARROW 818 403 #define M_PARTS_P2ARROW 819 404 #define M_PARTS_P1_X 820 405 #define M_PARTS_P1_Y 821 406 #define M_PARTS_P2_X 822 407 #define M_PARTS_P2_Y 823 408 #define M_PARTS_NODES 824 409 #define M_PARTS_NEW 840 410 #define M_PARTS_DEL 841 411 #define M_PARTS_MOVE 842 412 #define M_PARTS_MOVENODES 843 413 #define M_PARTS_INPUT 844 414 #define M_PARTS_FONTCOLOR 845 415 #define M_PARTSLIST 846 416 #define M_PARTSORDER 847 417 #define M_PARTSCLONE 848 418 #define M_PARTS_ARROWLENGTH 849 419 #define M_PARTS_ARROWHALFANGLE 850 420 #define M_PARTS_JPFONTFACE 851 421 #define M_PARTSEDIT 852 422 423 #define M_DATA_CREATE 900 424 #define M_DATA_CREATE_FUNC 901 425 #define M_DATA_CREATE_LINEAR 902 426 #define M_DATA_CREATE_NONLINEAR 903 427 #define M_DATA_CREATE_FUNC_START 910 428 #define M_DATA_CREATE_FUNC_END 911 429 #define M_DATA_CREATE_FUNC_DIV 912 430 #define M_DATA_CREATE_FUNC_SCALING 913 431 #define M_DATA_CREATE_FUNC_FUNCTION 914 432 #define M_DATA_CREATE_LINEAR_START 920 433 #define M_DATA_CREATE_LINEAR_END 921 434 #define M_DATA_CREATE_LINEAR_DIV 922 435 #define M_DATA_CREATE_LINEAR_SCALING 923 436 #define M_DATA_CREATE_LINEAR_FUNCTION 924 437 #define M_DATA_CREATE_LINEAR_STARTL 925 438 #define M_DATA_CREATE_LINEAR_ENDL 926 439 #define M_DATA_CREATE_LINEAR_FIXED 927 440 #define M_DATA_CREATE_LINEAR_FIXEDX 928 441 #define M_DATA_CREATE_LINEAR_FIXEDY 929 442 #define M_DATA_CREATE_NONLINEAR_START 940 443 #define M_DATA_CREATE_NONLINEAR_END 941 444 #define M_DATA_CREATE_NONLINEAR_DIV 942 445 #define M_DATA_CREATE_NONLINEAR_SCALING 943 446 #define M_DATA_CREATE_NONLINEAR_FUNCTION 944 447 #define M_DATA_CREATE_NONLINEAR_STARTL 945 448 #define M_DATA_CREATE_NONLINEAR_ENDL 946 449 #define M_DATA_CREATE_NONLINEAR_ALLOW 947 450 #define M_DATA_CREATE_NONLINEAR_INI_A 950 451 #define M_DATA_CREATE_NONLINEAR_INI_B 951 452 #define M_DATA_CREATE_NONLINEAR_INI_C 952 453 #define M_DATA_CREATE_NONLINEAR_INI_D 953 454 #define M_DATA_CREATE_NONLINEAR_INI_E 954 455 #define M_DATA_CREATE_NONLINEAR_INI_F 955 456 #define M_DATA_CREATE_NONLINEAR_INI_G 956 457 #define M_DATA_CREATE_NONLINEAR_INI_H 957 458 #define M_DATA_CREATE_NONLINEAR_INI_I 958 459 #define M_DATA_CREATE_NONLINEAR_FUN_A 960 460 #define M_DATA_CREATE_NONLINEAR_FUN_B 961 461 #define M_DATA_CREATE_NONLINEAR_FUN_C 962 462 #define M_DATA_CREATE_NONLINEAR_FUN_D 963 463 #define M_DATA_CREATE_NONLINEAR_FUN_E 964 464 #define M_DATA_CREATE_NONLINEAR_FUN_F 965 465 #define M_DATA_CREATE_NONLINEAR_FUN_G 966 466 #define M_DATA_CREATE_NONLINEAR_FUN_H 967 467 #define M_DATA_CREATE_NONLINEAR_FUN_I 968 468 469 470 /* color id definition */ 471 #define C_OTHERS 1000 472 #define C_BLACK 1001 473 #define C_WHITE 1002 474 #define C_RED 1003 475 #define C_GREEN 1004 476 #define C_BLUE 1005 477 478 /* mag */ 479 #define M_MAG 1200 480 #define MAG_OTHERS 1201 481 #define MAG_10 1202 482 #define MAG_20 1203 483 #define MAG_30 1204 484 #define MAG_40 1205 485 #define MAG_50 1206 486 #define MAG_60 1207 487 #define MAG_70 1208 488 #define MAG_80 1209 489 #define MAG_90 1210 490 #define MAG_100 1211 491 #define MAG_125 1212 492 #define MAG_150 1213 493 #define MAG_175 1214 494 #define MAG_200 1215 495 #define MAG_300 1216 496 #define MAG_400 1217 497 498 499 #define M_VIEWER_DRAW 1300 500 #define M_VIEWER_SHIFT 1301 501 #define M_MSGWIN_CLEAR 1302 502 #define M_WIN_HOME 1303 503 504 505 /* yes / no */ 506 #define A_YES 2000 507 #define A_NO 2001 508 509 /* frame type */ 510 #define FRAMETYPE_BOX 3000 511 #define FRAMETYPE_XY 3001 512 #define FRAMETYPE_IND 3002 513 514 /*tick direction */ 515 #define TICK_NULL 3100 516 #define TICK_IN 3101 517 #define TICK_OUT 3102 518 #define TICK_BOTH 3103 519 520 /* scaling */ 521 #define SCALING_LINEAR 3200 522 #define SCALING_LOG 3201 523 #define SCALING_INV 3202 524 #define SCALING_LOGLINEAR 3203 525 #define SCALING_INVLINEAR 3204 526 527 /* linecap */ 528 #define LINECAP_BUTT 3300 529 #define LINECAP_ROUND 3301 530 #define LINECAP_PROJECTING 3302 531 532 /* linejoin */ 533 #define LINEJOIN_MITER 3400 534 #define LINEJOIN_ROUND 3401 535 #define LINEJOIN_BEVEL 3402 536 537 /* linestyle */ 538 #define LINESTYLE_SOLID 3500 539 #define LINESTYLE_DASH 3501 540 #define LINESTYLE_LONGDASH 3502 541 #define LINESTYLE_SHORTDASH 3503 542 #define LINESTYLE_DASHDOTDASH 3504 543 #define LINESTYLE_DASHDOTDOTDASH 3505 544 #define LINESTYLE_DOT 3506 545 #define LINESTYLE_NULL 3507 546 547 /* fillstyle */ 548 #define FILLSTYLE_SOLID 3600 549 #define FILLSTYLE_NULL 3601 550 551 /* fillrule */ 552 #define FILLRULE_EVENODD 3700 553 #define FILLRULE_WINDING 3701 554 555 /* commentline action */ 556 #define M_COMMENT_ABORT 3800 557 #define M_COMMENT_IGNORE 3801 558 #define M_COMMENT_SEPARTION 3802 559 560 /* data search path */ 561 #define M_PATH_ABSOLUTE 3810 562 #define M_PATH_RELATIVE 3811 563 564 /* parts type */ 565 #define M_PARTS_TYPE_TEXT 3830 566 #define M_PARTS_TYPE_LINE 3831 567 #define M_PARTS_TYPE_POLYLINE 3832 568 #define M_PARTS_TYPE_RECTANGLE 3833 569 #define M_PARTS_TYPE_ELLIPSE 3834 570 #define M_PARTS_TYPE_CUT 3835 571 #define M_PARTS_TYPE_LEGEND 3836 572 573 /* font face */ 574 #define M_FONT_TIMESROMAN 3850 575 #define M_FONT_TIMESBOLD 3851 576 #define M_FONT_TIMESITALIC 3852 577 #define M_FONT_TIMESBOLDITALIC 3853 578 #define M_FONT_HELVETICA 3854 579 #define M_FONT_HELVETICABOLD 3855 580 #define M_FONT_HELVETICAOBLIQUE 3856 581 #define M_FONT_HELVETICABOLDOBLIQUE 3857 582 #define M_FONT_COURIER 3858 583 #define M_FONT_COURIERBOLD 3859 584 #define M_FONT_COURIEROBLIQUE 3860 585 #define M_FONT_COURIERBOLDOBLIQUE 3861 586 #define M_FONT_SYMBOL 3862 587 588 /* jp-font face */ 589 #define M_FONT_MINCHO 3910 590 #define M_FONT_GOTHIC 3914 591 592 /* label parity */ 593 #define LABEL_PARITY_PLUS 3900 594 #define LABEL_PARITY_MINUS 3901 595 596 /* label crosspoint parity */ 597 #define LABEL_CPPARITY_ZERO 3920 598 #define LABEL_CPPARITY_PLUS 3921 599 #define LABEL_CPPARITY_MINUS 3922 600 #define LABEL_CPPARITY_NULL 3923 601 602 /* order list */ 603 #define ORDERLIST_TOP 4000 604 #define ORDERLIST_UP 4001 605 #define ORDERLIST_DOWN 4002 606 #define ORDERLIST_BOTTOM 4003 607 608 /* order list */ 609 #define M_PAPERSIZE 1304 610 #define PAPERSIZE_A4P 4101 611 #define PAPERSIZE_A4L 4102 612 #define PAPERSIZE_A3P 4103 613 #define PAPERSIZE_A3L 4104 614 #define PAPERSIZE_A5P 4105 615 #define PAPERSIZE_A5L 4106 616 #define PAPERSIZE_B4P 4107 617 #define PAPERSIZE_B4L 4108 618 #define PAPERSIZE_B5P 4109 619 #define PAPERSIZE_B5L 4110 620 #define PAPERSIZE_LETTERP 4111 621 #define PAPERSIZE_LETTERL 4112 622 623 /* memory data scaling */ 624 #define M_MSCALING_LINEAR 4300 625 #define M_MSCALING_LOG 4301 626 #define M_MSCALING_INV 4302 627 628 /* linear fit function */ 629 #define M_LINEARFIT_POLY0 4400 630 #define M_LINEARFIT_POLY1 4401 631 #define M_LINEARFIT_POLY2 4402 632 #define M_LINEARFIT_POLY3 4403 633 #define M_LINEARFIT_POLY4 4404 634 #define M_LINEARFIT_POLY5 4405 635 #define M_LINEARFIT_POLY6 4406 636 #define M_LINEARFIT_POLY7 4407 637 #define M_LINEARFIT_POLY8 4408 638 #define M_LINEARFIT_POLY9 4409 639 #define M_LINEARFIT_POLY10 4410 640 #define M_LINEARFIT_EXP 4411 641 #define M_LINEARFIT_LOG 4412 642 #define M_LINEARFIT_POW1 4413 643 #define M_LINEARFIT_POW2 4414 644 645 646 647 648 #define WINDOWCOL 78 649 650 typedef struct cuimenu 651 { 652 int id; /* menu id */ 653 struct cuimenu *submenu; /* pointer to submenu*/ 654 char *item; /* caption */ 655 int ismacro; /* macro or execute */ 656 char *macroscript; /* macroscript */ 657 char *getvalue; /* macroscript to show value*/ 658 }CUIMENU; 659 660 /* execute menu item */ 661 void execitem(CUIMENU *menu, int *selectedkey); 662 663 /* window for editing text */ 664 int edittextwindow(WINDOW *win, std::string *input, std::string *caption, bool editfilename); 665 int textlineedit(WINDOW *win, std::string *input, int y, int x, int displength, bool editfilename); 666 667 /* selection window */ 668 int execselect(CUIMENU *menu, std::string *input, std::string *otherscaption); 669 int execcolorselect(std::string *input, std::string *otherscaption); 670 int exec_yesno_select(std::string *input, std::string *otherscaption); 671 int frametype_select(std::string *input, std::string *otherscaption); 672 int tickdirection_select(std::string *input, std::string *otherscaption); 673 int scaling_select(std::string *input, std::string *otherscaption); 674 int mscaling_select(std::string *input, std::string *otherscaption); 675 int linecap_select(std::string *input, std::string *otherscaption); 676 int linejoin_select(std::string *input, std::string *otherscaption); 677 int linestyle_select(std::string *input, std::string *otherscaption); 678 int fillstyle_select(std::string *input, std::string *otherscaption); 679 int fillrule_select(std::string *input, std::string *otherscaption); 680 int mag_select(std::string *input, std::string *otherscaption); 681 int interpolate_select(std::string *input, std::string *otherscaption); 682 int markerstyle_select(std::string *input, std::string *otherscaption); 683 int commentlineaction_select(std::string *input, std::string *otherscaption); 684 int datasearchpath_select(std::string *input, std::string *otherscaption); 685 int partstype_select(std::string *input, std::string *otherscaption); 686 int fontface_select(std::string *input, std::string *otherscaption); 687 int jpfontface_select(std::string *input, std::string *otherscaption); 688 int partsinterpolation_select(std::string *input, std::string *otherscaption); 689 int labelparity_select(std::string *input, std::string *otherscaption); 690 int labelCPparity_select(std::string *input, std::string *otherscaption); 691 int labelformat_select(std::string *input, std::string *otherscaption); 692 int orderlist_select(std::string *input, std::string *otherscaption); 693 int papersizelist_select(std::string *input, std::string *otherscaption); 694 int linearfitfunction_select(std::string *input, std::string *otherscaption); 695 int framemenu(); 696 int xbasemenu(); 697 int xrangemenu(); 698 int xtickmenu(); 699 int xsubtickmenu(); 700 int xlabelmenu(); 701 int ybasemenu(); 702 int yrangemenu(); 703 int ytickmenu(); 704 int ysubtickmenu(); 705 int ylabelmenu(); 706 int tbasemenu(); 707 int trangemenu(); 708 int ttickmenu(); 709 int tsubtickmenu(); 710 int tlabelmenu(); 711 int rbasemenu(); 712 int rrangemenu(); 713 int rtickmenu(); 714 int rsubtickmenu(); 715 int rlabelmenu(); 716 717 int plotmappingmenu(); 718 int plotlinemenu(); 719 int plotmarkermenu(); 720 int plotmemdatamenu(); 721 int loaddatamenu(); 722 int partsstylemenu(); 723 int textstylemenu(); 724 int functionmenu(); 725 int linearfitmenu(); 726 int nonlinearfitmenu(); 727 728 729 730 731 int movewindow(WINDOW *win, buffarray *input, std::string *caption); 732 int stretchwindow(WINDOW *win, buffarray *input, std::string *caption); 733 void printtext(WINDOW *win, char *input); 734 int changenodeswindow(WINDOW *win, buffarray *input, std::string *caption); 735 int inputpartswindow(WINDOW *win, buffarray *input, std::string *caption); 736 int trimmingwindow(WINDOW *win, buffarray *input, std::string *caption); 737 int watchwindow(WINDOW *win, buffarray *input, std::string *caption); 738 int tracewindow(WINDOW *win, buffarray *input, std::string *caption, int datano); 739 void messagewindow(WINDOW *win, std::string *caption); 740 int selectitem(WINDOW *win, buffarray *input); 741 int selectlistitem(WINDOW *win, buffarray *input); 742 743 #define CTRL(ch) ((ch)&0x1F) 744 745 /* 746 #define LOCAL_ESCAPE_KEY KEY_BACKSPACE //27 747 */ 748 /* 749 #define LOCAL_ESCAPE_KEY 0411 750 */ 751 #define LOCAL_ESCAPE_KEY 27 752 #define LOCAL_LF_KEY 10 753 754 #define MENU_LEFT 1000 755 #define MENU_RIGHT 1001 756 #define MENU_UP 1002 757 #define MENU_DOWN 1003 758 759 #endif 760 761 762