diff options
author | JΓΆrg Frings-FΓΌrst <debian@jff-webhosting.net> | 2022-02-06 16:04:57 +0100 |
---|---|---|
committer | JΓΆrg Frings-FΓΌrst <debian@jff-webhosting.net> | 2022-02-06 16:04:57 +0100 |
commit | 59dccf358523dfc7679d1d8c120452a71e42243c (patch) | |
tree | f0f3cc006e8157d6bd699bd644b7dd7b35387ac2 /app/bin | |
parent | fd6639655b399a79fb72f494786a4f57da9c90e7 (diff) | |
parent | d0ca838c7ab297036b4a7c45351761a48fe05efd (diff) |
Merge branch 'feature/upstrem' into develop
Diffstat (limited to 'app/bin')
572 files changed, 54256 insertions, 13422 deletions
diff --git a/app/bin/CMakeLists.txt b/app/bin/CMakeLists.txt index 2dea1bc..8d28205 100644 --- a/app/bin/CMakeLists.txt +++ b/app/bin/CMakeLists.txt @@ -1,6 +1,7 @@ include( CheckSymbolExists ) ADD_EXECUTABLE(cnvdsgn cnvdsgn.c utility.c) + IF(NOT WIN32) TARGET_LINK_LIBRARIES(cnvdsgn m) ENDIF(NOT WIN32) @@ -53,15 +54,24 @@ ADD_CUSTOM_COMMAND( COMMAND genhelp ${GENHELP_OPTS} ${help_SOURCE_DIR}/genhelp.json ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c ) +ADD_EXECUTABLE(xtrkcad WIN32 + misc.c + xtrkcad.rc +) + SET(SOURCES ${LIN_SOURCES} appdefaults.c archive.c + archive.h bllnhlp.c cbezier.c + cbezier.h cblock.c ccornu.c + ccornu.h ccurve.c + ccurve.h ccontrol.c cdraw.c celev.c @@ -69,21 +79,27 @@ SET(SOURCES chndldto.c chotbar.c cjoin.c + cjoin.h cmisc.c cmodify.c cnote.c + common.h + common-ui.h compound.c + compound.h cparalle.c cprint.c cprofile.c cpull.c cruler.c cselect.c + cselect.h csensor.c csnap.c csplit.c csignal.c cstraigh.c + cstraigh.h cstruct.c cswitchmotor.c ctext.c @@ -93,6 +109,7 @@ SET(SOURCES cturntbl.c cundo.c custom.c + custom.h dbench.c dbitmap.c dcar.c @@ -107,8 +124,10 @@ SET(SOURCES dpricels.c dprmfile.c draw.c + draw.h drawgeom.c dxfformat.c + dxfformat.h dxfoutput.c elev.c file2uri.c @@ -117,10 +136,14 @@ SET(SOURCES filenoteui.c i18n.c layout.c + layout.h + levenshtein.c linknoteui.c lprintf.c macro.c manifest.c + misc.c + misc.h misc2.c param.c paramfile.c @@ -138,10 +161,13 @@ SET(SOURCES tease.c textnoteui.c track.c + track.h + trackx.h trknote.c trkseg.c tstraigh.c utility.c + utility.h validator.c cJSON.c archive.h @@ -162,10 +188,38 @@ endif(WIN32) set (SOURCES ${SOURCES} include/dirent.h + include/levenshtein.h include/paramfile.h include/paramfilelist.h + include/partcatalog.h + include/stringxtc.h + include/utlist.h ) +if(XTRKCAD_CREATE_SVG) + set (SOURCES + ${SOURCES} + svgformat.c + svgoutput.c + ) + include_directories(${MINIXML_INCLUDE_PATH}) + if(WIN32) + + add_custom_command( + TARGET xtrkcad POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${MINIXML_SHAREDLIB} + ${CMAKE_CURRENT_BINARY_DIR} + ) + + # add dll to install package + install(FILES ${MINIXML_SHAREDLIB} + DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} + ) + endif(WIN32) + +endif(XTRKCAD_CREATE_SVG) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR}) INCLUDE_DIRECTORIES(${help_BINARY_DIR}) @@ -183,15 +237,28 @@ ADD_LIBRARY(xtrkcad-lib ${SOURCES}) # This ensures that messages.h has been generated before we build xtrkcad-lib ADD_DEPENDENCIES(xtrkcad-lib Help) -ADD_EXECUTABLE(xtrkcad WIN32 - misc.c - xtrkcad.rc - ) TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-lib) TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-wlib) TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-cornu) TARGET_LINK_LIBRARIES(xtrkcad dynstring) +if(XTRKCAD_CREATE_SVG) +IF(UNIX) + if (NOT APPLE) + target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY}) + target_link_libraries(xtrkcad "pthread") + else(NOT APPLE) + target_link_libraries(xtrkcad ${MINIXML_LIBRARY}) + endif(NOT APPLE) +ELSE(UNIX) + target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY}) +ENDIF(UNIX) +endif(XTRKCAD_CREATE_SVG) + +IF(UNIX AND NOT APPLE) +target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES} ${ZLIB_LIBRARY}) +ELSE(UNIX AND NOT APPLE) target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES}) +ENDIF(UNIX AND NOT APPLE) ADD_EXECUTABLE(mkturnout ${LIN_SOURCES} @@ -238,13 +305,20 @@ ELSE(NOT WIN32) ) # add dll to install package - install(FILES - ${LIBZIP_SHAREDLIB} - DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} + INSTALL( + FILES + ${LIBZIP_SHAREDLIB} + DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} ) - install(FILES - ${ZLIB_SHAREDLIB} - DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} + INSTALL(FILES + ${ZLIB_SHAREDLIB} + DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} + ) + + # Copy program PDB file + INSTALL( + FILES $<TARGET_PDB_FILE:xtrkcad> + DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} OPTIONAL ) ENDIF(NOT WIN32) diff --git a/app/bin/acclkeys.h b/app/bin/acclkeys.h index 4dd80fc..d8c59d3 100644 --- a/app/bin/acclkeys.h +++ b/app/bin/acclkeys.h @@ -55,6 +55,8 @@ #define ACCL_CONNECT (WCTL+WSHIFT+'j') #define ACCL_HELIX (WCTL+WSHIFT+'h') #define ACCL_SPLIT (WCTL+WSHIFT+'s') +#define ACCL_SPLITDRAW (0) +#define ACCL_TRIMDRAW (0) #define ACCL_ELEVATION (WCTL+WSHIFT+'e') #define ACCL_PROFILE (WCTL+WSHIFT+'f') #define ACCL_DELETE (WCTL+'d') @@ -89,6 +91,7 @@ #define ACCL_ABOVE (WCTL+WSHIFT+'b') #define ACCL_BELOW (WCTL+WSHIFT+'w') #define ACCL_RULER (0) +#define ACCL_ANGLE (0) /* fileM */ #define ACCL_NEW (WCTL+'n') diff --git a/app/bin/appdefaults.c b/app/bin/appdefaults.c index 55a2201..e5cff8b 100644 --- a/app/bin/appdefaults.c +++ b/app/bin/appdefaults.c @@ -20,22 +20,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <locale.h> -#include <stdbool.h> -#include <stdio.h> -#include <string.h> #include <wchar.h> -#ifdef WINDOWS -#include <Windows.h> -#include <malloc.h> -#endif - #include "common.h" #include "custom.h" #include "fileio.h" #include "paths.h" -#include "wlib.h" enum defaultTypes { INTEGERCONSTANT, @@ -114,7 +104,7 @@ struct appDefault xtcDefaults[] = { { "misc.scale", 0, STRINGFUNCTION, { .stringFunction = GetLocalPopularScale}}, /**< the (probably) most popular scale for a region */ }; -#define DEFAULTCOUNT (sizeof(xtcDefaults)/sizeof(xtcDefaults[0])) +#define DEFAULTCOUNT COUNT(xtcDefaults) static long bFirstRun; /**< TRUE if appl is run the first time */ @@ -203,6 +193,7 @@ InitializeRegionCode(void) { strcpy(regionCode, "US"); +// TODO Move this to wlib #ifdef WINDOWS { LCID lcid; @@ -301,7 +292,7 @@ static char * GetParamFullPath(struct appDefault *ptrDefault, void *additionalData) { char *str; - MakeFullpath(&str, libDir, PARAM_SUBDIR, (char*)additionalData, (void *)0); + MakeFullpath(&str, libDir, PARAM_SUBDIR, (char*)additionalData, I2VP(0)); return str; } diff --git a/app/bin/archive.c b/app/bin/archive.c index 4e82bd3..430db49 100644 --- a/app/bin/archive.c +++ b/app/bin/archive.c @@ -20,42 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <errno.h> #include <fcntl.h> -#include <string.h> -#include <stdint.h> -#include <sys/types.h> -#include <sys/stat.h> - #include <zip.h> -#ifdef WINDOWS - #include "include/dirent.h" - #include <direct.h> - #include <io.h> - #include <process.h> - #define unlink(a) _unlink((a)) - #define rmdir(a) _rmdir((a)) - #define open(name, flag, mode) _open((name), (flag), (mode)) - #define write(file, buffer, count) _write((file),(buffer), (count)) - #define close(file) _close((file)) - #define getpid() _getpid() -#else - #include <dirent.h> - #include <unistd.h> -#endif - -#include <wlib.h> #include "archive.h" #include "directory.h" #include "dynstring.h" -#include "i18n.h" -#include "messages.h" #include "misc.h" #include "misc2.h" #include "paths.h" #include "include/utf8convert.h" +#include "common-ui.h" int log_zip = 0; @@ -63,7 +39,7 @@ int log_zip = 0; //NativeToUtf8(const char *nativeString) //{ // -//#ifdef WINDOWS +//#ifdef XINDOWS // // int cnt = 2 * (strlen(nativeString) + 1); // char *tempBuffer = MyMalloc( cnt ); @@ -227,11 +203,11 @@ BOOL_T AddDirectoryToArchive( } else { char *archPathUtf8 = MyStrdup(arch_path); char *fullPathUtf8 = MyStrdup(full_path); -#ifdef WINDOWS +#ifdef UTFCONVERT archPathUtf8 = Convert2UTF8(archPathUtf8); fullPathUtf8 = Convert2UTF8(fullPathUtf8); ConvertPathForward(archPathUtf8); -#endif // WINDOWS +#endif // UTFCONVERT zt = zip_source_file(za, fullPathUtf8, 0, -1); if (zip_file_add(za, archPathUtf8, zt, ZIP_FL_ENC_UTF_8) == -1) { zip_error_t *ziperr = zip_get_error(za); @@ -283,9 +259,9 @@ BOOL_T CreateArchive( MakeFullpath(&archive_path, workingDir, archive_name, NULL); archiveUtf8 = MyStrdup(archive_path); -#ifdef WINDOWS +#ifdef UTFCONVERT archiveUtf8 = Convert2UTF8(archiveUtf8); -#endif // WINDOWS +#endif // UTFCONVERT MyFree(archive); @@ -355,9 +331,9 @@ BOOL_T UnpackArchiveFor( long long sum; char *destBuffer = MyStrdup(pathName); -#ifdef WINDOWS +#ifdef UTFCONVERT destBuffer = Convert2UTF8(destBuffer); -#endif // WINDOWS +#endif // UTFCONVERT if ((za = zip_open(destBuffer, 0, &err)) == NULL) { @@ -408,9 +384,9 @@ BOOL_T UnpackArchiveFor( } } MakeFullpath(&dirName, tempDir, &sb.name[0], NULL); -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(dirName); -#endif // WINDOWS +#endif // UTFCONVERT fd = fopen(dirName, "wb"); if (!fd) { NoticeMessage(MSG_ZIP_FILE_OPEN_FAIL, _("Continue"), NULL, dirName, diff --git a/app/bin/archive.h b/app/bin/archive.h index cfbb642..7977bc6 100644 --- a/app/bin/archive.h +++ b/app/bin/archive.h @@ -1,12 +1,12 @@ #ifndef HAVE_ARCHIVE_H #define HAVE_ARCHIVE_H -#include <zip.h> #include "common.h" enum ArchiveOps { ARCHIVE_READ, ARCHIVE_WRITE }; // has to be contiguous, see CleanupFiles()! extern int log_zip; extern const char *workingDir; +struct zip; char *GetZipDirectoryName(enum ArchiveOps op); BOOL_T AddDirectoryToArchive(struct zip * za, const char * dir_path, const char * prefix); diff --git a/app/bin/bdf2xtp.c b/app/bin/bdf2xtp.c index c979aa3..f19ceb8 100644 --- a/app/bin/bdf2xtp.c +++ b/app/bin/bdf2xtp.c @@ -1096,7 +1096,7 @@ void parse( void ) inch++; continue; } - for ( tp=tokens; tp<&tokens[ sizeof tokens / sizeof *tp ]; tp++ ){ + for ( tp=tokens; tp<&tokens[COUNT( tokens )]; tp++ ){ tlen = strlen(tp->name); if ( strncasecmp( cp, tp->name, tlen) != 0 ) continue; diff --git a/app/bin/bitmaps/16pix/bridge.png b/app/bin/bitmaps/16pix/bridge.png Binary files differnew file mode 100644 index 0000000..ebcde0a --- /dev/null +++ b/app/bin/bitmaps/16pix/bridge.png diff --git a/app/bin/bitmaps/16pix/circle-center.png b/app/bin/bitmaps/16pix/circle-center.png Binary files differnew file mode 100644 index 0000000..062560d --- /dev/null +++ b/app/bin/bitmaps/16pix/circle-center.png diff --git a/app/bin/bitmaps/16pix/circle-tangent.png b/app/bin/bitmaps/16pix/circle-tangent.png Binary files differnew file mode 100644 index 0000000..0dc831b --- /dev/null +++ b/app/bin/bitmaps/16pix/circle-tangent.png diff --git a/app/bin/bitmaps/16pix/circle.png b/app/bin/bitmaps/16pix/circle.png Binary files differnew file mode 100644 index 0000000..eaecd31 --- /dev/null +++ b/app/bin/bitmaps/16pix/circle.png diff --git a/app/bin/bitmaps/16pix/curved-chord.png b/app/bin/bitmaps/16pix/curved-chord.png Binary files differnew file mode 100644 index 0000000..0068d1a --- /dev/null +++ b/app/bin/bitmaps/16pix/curved-chord.png diff --git a/app/bin/bitmaps/16pix/curved-end.png b/app/bin/bitmaps/16pix/curved-end.png Binary files differnew file mode 100644 index 0000000..49dcee3 --- /dev/null +++ b/app/bin/bitmaps/16pix/curved-end.png diff --git a/app/bin/bitmaps/16pix/curved-middle.png b/app/bin/bitmaps/16pix/curved-middle.png Binary files differnew file mode 100644 index 0000000..d23a6a2 --- /dev/null +++ b/app/bin/bitmaps/16pix/curved-middle.png diff --git a/app/bin/bitmaps/16pix/curved-tangent.png b/app/bin/bitmaps/16pix/curved-tangent.png Binary files differnew file mode 100644 index 0000000..6d8fcfe --- /dev/null +++ b/app/bin/bitmaps/16pix/curved-tangent.png diff --git a/app/bin/bitmaps/16pix/description.png b/app/bin/bitmaps/16pix/description.png Binary files differnew file mode 100644 index 0000000..9bd679c --- /dev/null +++ b/app/bin/bitmaps/16pix/description.png diff --git a/app/bin/bitmaps/16pix/elevation.png b/app/bin/bitmaps/16pix/elevation.png Binary files differnew file mode 100644 index 0000000..9121d56 --- /dev/null +++ b/app/bin/bitmaps/16pix/elevation.png diff --git a/app/bin/bitmaps/16pix/exit.png b/app/bin/bitmaps/16pix/exit.png Binary files differnew file mode 100644 index 0000000..ba227c3 --- /dev/null +++ b/app/bin/bitmaps/16pix/exit.png diff --git a/app/bin/bitmaps/16pix/palette.png b/app/bin/bitmaps/16pix/palette.png Binary files differnew file mode 100644 index 0000000..efcf3d3 --- /dev/null +++ b/app/bin/bitmaps/16pix/palette.png diff --git a/app/bin/bitmaps/16pix/pan-zoom.png b/app/bin/bitmaps/16pix/pan-zoom.png Binary files differnew file mode 100644 index 0000000..04d18f7 --- /dev/null +++ b/app/bin/bitmaps/16pix/pan-zoom.png diff --git a/app/bin/bitmaps/16pix/select.png b/app/bin/bitmaps/16pix/select.png Binary files differnew file mode 100644 index 0000000..39605d1 --- /dev/null +++ b/app/bin/bitmaps/16pix/select.png diff --git a/app/bin/bitmaps/16pix/snap-curs.png b/app/bin/bitmaps/16pix/snap-curs.png Binary files differnew file mode 100644 index 0000000..acf8f66 --- /dev/null +++ b/app/bin/bitmaps/16pix/snap-curs.png diff --git a/app/bin/bitmaps/16pix/snap-grid.png b/app/bin/bitmaps/16pix/snap-grid.png Binary files differnew file mode 100644 index 0000000..381b451 --- /dev/null +++ b/app/bin/bitmaps/16pix/snap-grid.png diff --git a/app/bin/bitmaps/24pix/description.png b/app/bin/bitmaps/24pix/description.png Binary files differnew file mode 100644 index 0000000..e273ed5 --- /dev/null +++ b/app/bin/bitmaps/24pix/description.png diff --git a/app/bin/bitmaps/24pix/exit.png b/app/bin/bitmaps/24pix/exit.png Binary files differnew file mode 100644 index 0000000..d3ebf2f --- /dev/null +++ b/app/bin/bitmaps/24pix/exit.png diff --git a/app/bin/bitmaps/24pix/pan-zoom.png b/app/bin/bitmaps/24pix/pan-zoom.png Binary files differnew file mode 100644 index 0000000..67ab631 --- /dev/null +++ b/app/bin/bitmaps/24pix/pan-zoom.png diff --git a/app/bin/bitmaps/24pix/snap-curs.png b/app/bin/bitmaps/24pix/snap-curs.png Binary files differnew file mode 100644 index 0000000..15154a2 --- /dev/null +++ b/app/bin/bitmaps/24pix/snap-curs.png diff --git a/app/bin/bitmaps/24pix/snap-grid.png b/app/bin/bitmaps/24pix/snap-grid.png Binary files differnew file mode 100644 index 0000000..3073985 --- /dev/null +++ b/app/bin/bitmaps/24pix/snap-grid.png diff --git a/app/bin/bitmaps/Info.xpm b/app/bin/bitmaps/Info.xpm new file mode 100644 index 0000000..c4fa897 --- /dev/null +++ b/app/bin/bitmaps/Info.xpm @@ -0,0 +1,116 @@ +static char *Info_x16[] = {
+ "16 16 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366FF",
+ "3 c #6666FF",
+ "4 c #6699FF",
+ "5 c #9999FF",
+ "6 c #99CCFF",
+ "7 c #CCCCFF",
+ "8 c #CCFFFF",
+ "9 c #FFFFFF",
+ " ",
+ " 122221 ",
+ " 25799763 ",
+ " 3899999994 ",
+ " 289994299993 ",
+ " 15999922999973 ",
+ " 27999912999992 ",
+ " 29999942999992 ",
+ " 29999954999992 ",
+ " 27999976999992 ",
+ " 26999999999972 ",
+ " 299994299994 ",
+ " 149997699952 ",
+ " 2379999833 ",
+ " 223312 ",
+ " "};
+
+static char *Info_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366FF",
+ "3 c #6666FF",
+ "4 c #6699FF",
+ "5 c #9999FF",
+ "6 c #99CCFF",
+ "7 c #CCCCFF",
+ "8 c #CCFFFF",
+ "9 c #FFFFFF",
+ " ",
+ " 111111 ",
+ " 1111111111 ",
+ " 11115777762111 ",
+ " 1114999999995111 ",
+ " 11799994499997211 ",
+ " 116999971179999811 ",
+ " 11499999611599999511 ",
+ " 119999995114999999211 ",
+ " 1159999996114999999611 ",
+ " 1179999996114999999711 ",
+ " 1179999997115999999911 ",
+ " 1179999999117999999911 ",
+ " 1179999999117999999811 ",
+ " 1159999999529999999711 ",
+ " 129999999779999999511 ",
+ " 11599999711599999711 ",
+ " 1179999211199999211 ",
+ " 114999971149999511 ",
+ " 1127999779997311 ",
+ " 11157999975111 ",
+ " 111111111111 ",
+ " 11111111 ",
+ " "};
+
+static char *Info_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366FF",
+ "3 c #6666FF",
+ "4 c #6699FF",
+ "5 c #9999FF",
+ "6 c #99CCFF",
+ "7 c #CCCCFF",
+ "8 c #CCFFFF",
+ "9 c #FFFFFF",
+ " ",
+ " 11 ",
+ " 111111111111 ",
+ " 1111111111111111 ",
+ " 111111577775211111 ",
+ " 11114799999999751111 ",
+ " 1111799999779999972111 ",
+ " 111279999971179999994111 ",
+ " 1117999999411299999992111 ",
+ " 11179999999111199999997111 ",
+ " 113999999971111799999994111 ",
+ " 1117999999971111799999997111 ",
+ " 1119999999991111799999999411 ",
+ " 11499999999911117999999996111 ",
+ " 11599999999911117999999997111 ",
+ " 111799999999931119999999997111 ",
+ " 11799999999951119999999999111 ",
+ " 11699999999971149999999997111 ",
+ " 11599999999971159999999997111 ",
+ " 1129999999999317999999999511 ",
+ " 1117999999999979999999999111 ",
+ " 1114999999995114999999997111 ",
+ " 11179999997111179999999211 ",
+ " 11139999997111159999995111 ",
+ " 111499999911117999996111 ",
+ " 1114999997557999995111 ",
+ " 111279999999999731111 ",
+ " 111126799998731111 ",
+ " 1111111111111111 ",
+ " 111111111111 ",
+ " 11111111 ",
+ " "};
+
+static char **Info_xpm[3] = { Info_x16, Info_x24, Info_x32 };
+
diff --git a/app/bin/bitmaps/SVG/Info.svg b/app/bin/bitmaps/SVG/Info.svg new file mode 100644 index 0000000..979601d --- /dev/null +++ b/app/bin/bitmaps/SVG/Info.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 24 24" + style="enable-background:new 0 0 24 24;" + xml:space="preserve" + sodipodi:docname="Info.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata15"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs13" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1225" + inkscape:window-height="900" + id="namedview11" + showgrid="false" + inkscape:zoom="18.981108" + inkscape:cx="12.697376" + inkscape:cy="12" + inkscape:window-x="509" + inkscape:window-y="7" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FFFFFF;stroke:#005CFE;stroke-miterlimit:10;} + .st1{fill:#00BEFC;stroke:#005CFE;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:#00AFFD;stroke:#005CFE;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<ellipse + transform="matrix(0.03517289,-0.99938124,0.99934733,0.03612357,0,0)" + class="st0" + cx="-11.55869" + cy="12.414656" + id="ellipse4" + style="stroke-width:2.09873;stroke-miterlimit:10;stroke-dasharray:none" + rx="9.9303188" + ry="9.7989435" /> +<path + class="st1" + d="m 13,17.344792 c 0,0.468616 -0.4,0.937232 -1,0.937232 -0.5,0 -1,-0.374893 -1,-0.937232 0,-0.562339 0.4,-0.937232 1,-0.937232 0.5,0.09372 1,0.468616 1,0.937232 z" + id="path6" /> +<path + class="st2" + d="m 12.01408,14.088782 c 0,0 -0.480201,-1.868907 -0.761396,-3.822605 -0.529551,-3.6792392 0.661396,-4.5482251 0.661396,-4.5482251 0,0 1.226159,0.9594783 0.796656,4.5532561 -0.255236,2.135635 -0.696656,3.817574 -0.696656,3.817574 z" + id="path8" + sodipodi:nodetypes="cscsc" + style="stroke-linejoin:round" /> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg new file mode 100644 index 0000000..fadc6df --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="ease-broad.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata15"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs13" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1555" + inkscape:window-height="828" + id="namedview11" + showgrid="false" + inkscape:zoom="7.6695312" + inkscape:cx="41.461112" + inkscape:cy="27.685221" + inkscape:window-x="166" + inkscape:window-y="170" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.0348781,0.96629742)" + id="text8" + x="-0.08601547" + y="19.259062" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.9881px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.03629"><tspan + x="-0.08601547" + y="19.259062" + class="st0 st1 st2" + id="tspan4" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.9881px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="16.575085" + y="43.812256" + class="st0 st1 st2" + id="tspan6" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.9881px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Broad</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg b/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg new file mode 100644 index 0000000..df906a9 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="ease-cornu.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata876"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs874" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1398" + inkscape:window-height="732" + id="namedview872" + showgrid="false" + inkscape:zoom="3.8254353" + inkscape:cx="40.172441" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style859"> + .st0{fill:none;stroke:#F7931E;stroke-miterlimit:10;} + .st1{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st2{font-family:'MyriadPro-Regular';} + .st3{font-size:14px;} + .st4{fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="M13.2,28.5c-0.8,0.4-1.1,1.3-0.7,2.1c0.5,1,1.7,1.4,2.7,0.9c1.2-0.6,1.7-2.1,1.1-3.3c-0.8-1.5-2.6-2.1-4.2-1.4 c-1.9,1-2.7,3.3-1.7,5.2c1.2,2.4,4.1,3.3,6.5,2.1c3-1.5,4.2-5.1,2.7-8.1c-1.9-3.7-6.4-5.2-10.1-3.3c-4.7,2.3-6.5,9-4.2,13.7 c2.9,5.8,10.6,5.4,15.9,4.2c4.1-1.1,22.6-6.1,22.6-6.1l8.1-2.4c0,0,18-5.1,22.1-6.4c5.2-1.5,12.9-1.3,16.1,4.4 c2.6,4.5,1,10.3-3.5,12.9c-3.6,2.1-8.2,0.8-10.3-2.8c-1.7-2.9-0.6-6.6,2.3-8.2c2.3-1.3,5.3-0.5,6.6,1.8c1.1,1.9,0.4,4.2-1.4,5.3 c-1.5,0.8-3.4,0.3-4.2-1.2c-0.7-1.2-0.3-2.7,0.9-3.4c0.9-0.5,2.2-0.2,2.7,0.7c0.4,0.8,0.2,1.7-0.6,2.2" + id="path861" /> + +<path + class="st4" + d="M73.8,28.6" + id="path869" /> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg new file mode 100644 index 0000000..9b2f26d --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="ease-gt-broad.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata15"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs13" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1561" + inkscape:window-height="828" + id="namedview11" + showgrid="false" + inkscape:zoom="7.6695312" + inkscape:cx="46.310737" + inkscape:cy="32.900664" + inkscape:window-x="219" + inkscape:window-y="132" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> + +<text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.3333px;line-height:1.25;font-family:Tahoma;-inkscape-font-specification:'Tahoma, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" + x="8.6054811" + y="42.636246" + id="text1429"><tspan + sodipodi:role="line" + id="tspan1427" + x="8.6054811" + y="42.636246">> Broad</tspan></text><text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.3333px;line-height:1.25;font-family:Tahoma;-inkscape-font-specification:'Tahoma, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal" + x="1.434247" + y="20.079454" + id="text1433"><tspan + sodipodi:role="line" + id="tspan1431" + x="1.434247" + y="20.079454">Easement</tspan></text></svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg new file mode 100644 index 0000000..77031f6 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="Easement-Sharp.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2655"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2653" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1540" + inkscape:window-height="857" + id="namedview2651" + showgrid="false" + inkscape:zoom="8.2200207" + inkscape:cx="42.464734" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2642"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.1867603,0.84263014)" + id="text2648" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.18676" + x="3.2132704" + y="23.310022"><tspan + x="3.2132704" + y="23.310022" + class="st0 st1 st2" + id="tspan2644" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="17.098368" + y="43.247597" + class="st0 st1 st2" + id="tspan2646" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Sharp</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg new file mode 100644 index 0000000..3022616 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="ease-lt-broad.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata15"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs13" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1557" + inkscape:window-height="828" + id="namedview11" + showgrid="false" + inkscape:zoom="8.5185912" + inkscape:cx="47.999985" + inkscape:cy="23.061186" + inkscape:window-x="219" + inkscape:window-y="132" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> + +<text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.4906px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke:none;stroke-width:1.09316;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + x="8.7710075" + y="16.856054" + id="text848" + transform="scale(0.91477909,1.0931601)"><tspan + sodipodi:role="line" + id="tspan846" + x="8.7710075" + y="16.856054" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:1.09316">Easement</tspan><tspan + sodipodi:role="line" + x="8.7710075" + y="38.719307" + id="tspan850" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:1.09316"> < Broad</tspan></text></svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg new file mode 100644 index 0000000..77031f6 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="Easement-Sharp.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2655"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2653" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1540" + inkscape:window-height="857" + id="namedview2651" + showgrid="false" + inkscape:zoom="8.2200207" + inkscape:cx="42.464734" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2642"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.1867603,0.84263014)" + id="text2648" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.18676" + x="3.2132704" + y="23.310022"><tspan + x="3.2132704" + y="23.310022" + class="st0 st1 st2" + id="tspan2644" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="17.098368" + y="43.247597" + class="st0 st1 st2" + id="tspan2646" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Sharp</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-none.svg b/app/bin/bitmaps/SVG/NotUsed/ease-none.svg new file mode 100644 index 0000000..75fa776 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-none.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="Easement-None.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1473"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1471" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1600" + inkscape:window-height="784" + id="namedview1469" + showgrid="false" + inkscape:zoom="8.2200207" + inkscape:cx="48" + inkscape:cy="27.685221" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style1460"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.1867603,0.84263015)" + id="text1466" + x="4.3408761" + y="24.176271" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;font-family:Arial;-inkscape-font-specification:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.18676"><tspan + x="4.3408761" + y="24.176271" + class="st0 st1 st2" + id="tspan1462" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;font-family:Arial;-inkscape-font-specification:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="19.531406" + y="44.113842" + class="st0 st1 st2" + id="tspan1464" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;font-family:Arial;-inkscape-font-specification:Arial;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">None</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg b/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg new file mode 100644 index 0000000..3e94707 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="Easement-Normal.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2064"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2062" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1538" + inkscape:window-height="857" + id="namedview2060" + showgrid="false" + inkscape:zoom="7.6695312" + inkscape:cx="42.464734" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2051"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.1867603,0.84263014)" + id="text2057" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.18676" + x="2.7634513" + y="24.342073"><tspan + x="2.7634513" + y="24.342073" + class="st0 st1 st2" + id="tspan2053" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="11.070774" + y="44.27964" + class="st0 st1 st2" + id="tspan2055" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Normal</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg new file mode 100644 index 0000000..77031f6 --- /dev/null +++ b/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 96 48" + style="enable-background:new 0 0 96 48;" + xml:space="preserve" + sodipodi:docname="Easement-Sharp.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2655"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2653" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1540" + inkscape:window-height="857" + id="namedview2651" + showgrid="false" + inkscape:zoom="8.2200207" + inkscape:cx="42.464734" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2642"> + .st0{fill:#0090FC;stroke:#000000;stroke-width:0.5;stroke-miterlimit:10;} + .st1{font-family:'MyriadPro-Regular';} + .st2{font-size:14px;} +</style> +<text + transform="scale(1.1867603,0.84263014)" + id="text2648" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:1.18676" + x="3.2132704" + y="23.310022"><tspan + x="3.2132704" + y="23.310022" + class="st0 st1 st2" + id="tspan2644" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Easement </tspan><tspan + x="17.098368" + y="43.247597" + class="st0 st1 st2" + id="tspan2646" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:18.6667px;font-family:Calibri;-inkscape-font-specification:'Calibri, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal">Sharp</tspan></text> +</svg> diff --git a/app/bin/bitmaps/SVG/background.svg b/app/bin/bitmaps/SVG/background.svg new file mode 100644 index 0000000..4856eac --- /dev/null +++ b/app/bin/bitmaps/SVG/background.svg @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="background.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata23"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs21" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1391" + inkscape:window-height="949" + id="namedview19" + showgrid="false" + inkscape:snap-nodes="false" + inkscape:zoom="10.897825" + inkscape:cx="23.903852" + inkscape:cy="23.995614" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FF8200;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:#FF8200;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;} +</style> + + + + + + + +<rect + style="fill:#c3a88f;fill-opacity:1;stroke:#000000;stroke-width:1.35834;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none" + id="rect838" + width="44.851173" + height="44.803501" + x="1.5744133" + y="1.5982494" + ry="0.17218179" /><path + style="fill:#dbba97;fill-opacity:1;stroke:none;stroke-width:1.52011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 32.777013,18.174801 c -4.157865,0.903053 -7.696832,2.631511 -10.739238,5.022215 -4.639351,3.822421 -4.528826,7.116944 -6.136711,10.602452 -0.780291,3.794007 0.03684,6.389656 2.231529,7.951842 4.251402,1.505827 8.952585,1.886909 13.947067,1.534565 5.358135,-1.22642 6.897492,-4.362714 8.64718,-7.393815 1.69377,-4.003568 3.15454,-8.045977 2.649944,-12.416033 -2.302846,-2.690118 -5.339428,-4.829793 -10.599771,-5.301226 z" + id="path842" + sodipodi:nodetypes="cccccccc" /><path + style="fill:#56c3f5;fill-opacity:1;stroke:none;stroke-width:1.37152px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 2.1564527,25.837385 V 2.5176282 L 27.76259,2.3858789 l -1.803248,8.5637491 -7.693863,6.192253 -8.8960277,2.50325 -3.4862828,4.874752 z" + id="path844" /><path + style="fill:#e8d2bc;fill-opacity:1;stroke:none;stroke-width:1.3392px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 32.210606,25.083687 c -4.263344,2.518472 -5.063624,3.679963 -6.972564,5.275878 -1.696817,2.010047 -1.986404,3.38991 -1.442598,4.396562 1.270215,2.935761 3.010079,2.436341 4.568231,3.266019 2.510399,-0.677969 4.771475,-1.681583 6.010831,-4.019716 0.814054,-1.508562 1.38896,-3.391959 1.562814,-5.903956 -0.557331,-1.60132 -1.277486,-3.060858 -3.726714,-3.014787 z" + id="path846" + sodipodi:nodetypes="ccccccc" /><path + sodipodi:type="star" + style="fill:#2f8e42;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path848-6" + sodipodi:sides="8" + sodipodi:cx="-6.4232998" + sodipodi:cy="-6.5150614" + sodipodi:r1="2.8626306" + sodipodi:r2="3.6571999" + sodipodi:arg1="0.69302282" + sodipodi:arg2="1.085722" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + transform="matrix(1.5067484,0,0,1.4293975,17.484929,49.907452)" + d="m -4.2210255,-4.6862251 c -0.1905998,0.2295192 -0.2330922,1.2673614 -0.4970167,1.4064701 -0.2639243,0.1391086 -1.1441281,-0.4124009 -1.441197,-0.3848808 -0.297069,0.02752 -1.0609809,0.7313388 -1.3459684,0.6430807 -0.2849874,-0.088258 -0.5174093,-1.1006322 -0.7469284,-1.291232 -0.2295192,-0.1905998 -1.2673614,-0.2330922 -1.4064702,-0.4970167 -0.1391086,-0.2639243 0.412401,-1.1441281 0.3848808,-1.441197 -0.02752,-0.297069 -0.7313386,-1.0609809 -0.6430807,-1.3459684 0.088258,-0.2849874 1.1006323,-0.5174093 1.291232,-0.7469284 0.1905999,-0.2295192 0.2330922,-1.2673614 0.4970167,-1.4064701 0.2639243,-0.1391087 1.1441282,0.4124009 1.441197,0.3848807 0.297069,-0.02752 1.060981,-0.731339 1.3459685,-0.643081 0.2849873,0.088258 0.5174092,1.1006326 0.7469284,1.2912323 0.2295191,0.1905999 1.2673614,0.2330922 1.4064701,0.4970167 0.1391086,0.2639244 -0.4124009,1.1441282 -0.3848808,1.4411971 0.02752,0.297069 0.7313388,1.0609809 0.6430807,1.3459684 -0.088258,0.2849873 -1.1006323,0.5174093 -1.291232,0.7469284 z" /><path + sodipodi:type="star" + style="fill:#35a559;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path848-6-3" + sodipodi:sides="8" + sodipodi:cx="-6.4232998" + sodipodi:cy="-6.5150614" + sodipodi:r1="2.8626306" + sodipodi:r2="3.6571999" + sodipodi:arg1="0.69302282" + sodipodi:arg2="1.085722" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + transform="matrix(1.2663948,0,0,1.4473368,20.46062,35.996562)" + d="m -4.2210255,-4.6862251 c -0.1905998,0.2295192 -0.2330922,1.2673614 -0.4970167,1.4064701 -0.2639243,0.1391086 -1.1441281,-0.4124009 -1.441197,-0.3848808 -0.297069,0.02752 -1.0609809,0.7313388 -1.3459684,0.6430807 -0.2849874,-0.088258 -0.5174093,-1.1006322 -0.7469284,-1.291232 -0.2295192,-0.1905998 -1.2673614,-0.2330922 -1.4064702,-0.4970167 -0.1391086,-0.2639243 0.412401,-1.1441281 0.3848808,-1.441197 -0.02752,-0.297069 -0.7313386,-1.0609809 -0.6430807,-1.3459684 0.088258,-0.2849874 1.1006323,-0.5174093 1.291232,-0.7469284 0.1905999,-0.2295192 0.2330922,-1.2673614 0.4970167,-1.4064701 0.2639243,-0.1391087 1.1441282,0.4124009 1.441197,0.3848807 0.297069,-0.02752 1.060981,-0.731339 1.3459685,-0.643081 0.2849873,0.088258 0.5174092,1.1006326 0.7469284,1.2912323 0.2295191,0.1905999 1.2673614,0.2330922 1.4064701,0.4970167 0.1391086,0.2639244 -0.4124009,1.1441282 -0.3848808,1.4411971 0.02752,0.297069 0.7313388,1.0609809 0.6430807,1.3459684 -0.088258,0.2849873 -1.1006323,0.5174093 -1.291232,0.7469284 z" /><path + sodipodi:type="star" + style="fill:#2bbf4a;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path848-6-8" + sodipodi:sides="8" + sodipodi:cx="-6.4232998" + sodipodi:cy="-6.5150614" + sodipodi:r1="2.8626306" + sodipodi:r2="3.6571999" + sodipodi:arg1="0.69302282" + sodipodi:arg2="1.085722" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + transform="matrix(1.4380759,0,0,1.5370329,27.091592,46.182324)" + d="m -4.2210255,-4.6862251 c -0.1905998,0.2295192 -0.2330922,1.2673614 -0.4970167,1.4064701 -0.2639243,0.1391086 -1.1441281,-0.4124009 -1.441197,-0.3848808 -0.297069,0.02752 -1.0609809,0.7313388 -1.3459684,0.6430807 -0.2849874,-0.088258 -0.5174093,-1.1006322 -0.7469284,-1.291232 -0.2295192,-0.1905998 -1.2673614,-0.2330922 -1.4064702,-0.4970167 -0.1391086,-0.2639243 0.412401,-1.1441281 0.3848808,-1.441197 -0.02752,-0.297069 -0.7313386,-1.0609809 -0.6430807,-1.3459684 0.088258,-0.2849874 1.1006323,-0.5174093 1.291232,-0.7469284 0.1905999,-0.2295192 0.2330922,-1.2673614 0.4970167,-1.4064701 0.2639243,-0.1391087 1.1441282,0.4124009 1.441197,0.3848807 0.297069,-0.02752 1.060981,-0.731339 1.3459685,-0.643081 0.2849873,0.088258 0.5174092,1.1006326 0.7469284,1.2912323 0.2295191,0.1905999 1.2673614,0.2330922 1.4064701,0.4970167 0.1391086,0.2639244 -0.4124009,1.1441282 -0.3848808,1.4411971 0.02752,0.297069 0.7313388,1.0609809 0.6430807,1.3459684 -0.088258,0.2849873 -1.1006323,0.5174093 -1.291232,0.7469284 z" /><path + sodipodi:type="star" + style="opacity:1;fill:#2f9043;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path848-6-2" + sodipodi:sides="8" + sodipodi:cx="-6.4232998" + sodipodi:cy="-6.5150614" + sodipodi:r1="2.8626306" + sodipodi:r2="3.6571999" + sodipodi:arg1="0.69302282" + sodipodi:arg2="1.085722" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + transform="matrix(1.4552441,0,0,1.4473369,44.576027,19.07371)" + d="m -4.2210255,-4.6862251 c -0.1905998,0.2295192 -0.2330922,1.2673614 -0.4970167,1.4064701 -0.2639243,0.1391086 -1.1441281,-0.4124009 -1.441197,-0.3848808 -0.297069,0.02752 -1.0609809,0.7313388 -1.3459684,0.6430807 -0.2849874,-0.088258 -0.5174093,-1.1006322 -0.7469284,-1.291232 -0.2295192,-0.1905998 -1.2673614,-0.2330922 -1.4064702,-0.4970167 -0.1391086,-0.2639243 0.412401,-1.1441281 0.3848808,-1.441197 -0.02752,-0.297069 -0.7313386,-1.0609809 -0.6430807,-1.3459684 0.088258,-0.2849874 1.1006323,-0.5174093 1.291232,-0.7469284 0.1905999,-0.2295192 0.2330922,-1.2673614 0.4970167,-1.4064701 0.2639243,-0.1391087 1.1441282,0.4124009 1.441197,0.3848807 0.297069,-0.02752 1.060981,-0.731339 1.3459685,-0.643081 0.2849873,0.088258 0.5174092,1.1006326 0.7469284,1.2912323 0.2295191,0.1905999 1.2673614,0.2330922 1.4064701,0.4970167 0.1391086,0.2639244 -0.4124009,1.1441282 -0.3848808,1.4411971 0.02752,0.297069 0.7313388,1.0609809 0.6430807,1.3459684 -0.088258,0.2849873 -1.1006323,0.5174093 -1.291232,0.7469284 z" /><path + sodipodi:type="star" + style="fill:#2bbf4a;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path848-6-1" + sodipodi:sides="8" + sodipodi:cx="-6.4232998" + sodipodi:cy="-6.5150614" + sodipodi:r1="2.8626306" + sodipodi:r2="3.6571999" + sodipodi:arg1="0.69302282" + sodipodi:arg2="1.085722" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + transform="matrix(1.5067484,0,0,1.4293975,37.145326,26.702193)" + d="m -4.2210255,-4.6862251 c -0.1905998,0.2295192 -0.2330922,1.2673614 -0.4970167,1.4064701 -0.2639243,0.1391086 -1.1441281,-0.4124009 -1.441197,-0.3848808 -0.297069,0.02752 -1.0609809,0.7313388 -1.3459684,0.6430807 -0.2849874,-0.088258 -0.5174093,-1.1006322 -0.7469284,-1.291232 -0.2295192,-0.1905998 -1.2673614,-0.2330922 -1.4064702,-0.4970167 -0.1391086,-0.2639243 0.412401,-1.1441281 0.3848808,-1.441197 -0.02752,-0.297069 -0.7313386,-1.0609809 -0.6430807,-1.3459684 0.088258,-0.2849874 1.1006323,-0.5174093 1.291232,-0.7469284 0.1905999,-0.2295192 0.2330922,-1.2673614 0.4970167,-1.4064701 0.2639243,-0.1391087 1.1441282,0.4124009 1.441197,0.3848807 0.297069,-0.02752 1.060981,-0.731339 1.3459685,-0.643081 0.2849873,0.088258 0.5174092,1.1006326 0.7469284,1.2912323 0.2295191,0.1905999 1.2673614,0.2330922 1.4064701,0.4970167 0.1391086,0.2639244 -0.4124009,1.1441282 -0.3848808,1.4411971 0.02752,0.297069 0.7313388,1.0609809 0.6430807,1.3459684 -0.088258,0.2849873 -1.1006323,0.5174093 -1.291232,0.7469284 z" /></svg> diff --git a/app/bin/bitmaps/SVG/benchwork.svg b/app/bin/bitmaps/SVG/benchwork.svg new file mode 100644 index 0000000..1562ae3 --- /dev/null +++ b/app/bin/bitmaps/SVG/benchwork.svg @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="benchwork.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata23"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs21" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1352" + inkscape:window-height="949" + id="namedview19" + showgrid="false" + inkscape:snap-nodes="false" + inkscape:zoom="12.521303" + inkscape:cx="23.879304" + inkscape:cy="24.478283" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FF8200;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:#FF8200;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;} +</style> +<path + style="fill:#ff8200;fill-opacity:1;stroke:none;stroke-width:1.404px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 8.5262885,15.440457 28.146087,1.6811615 38.776901,1.7919341 19.758367,15.440457 H 8.5262885" + id="path2655" + sodipodi:nodetypes="ccccc" /><rect + x="8.526289" + y="15.440457" + class="st0" + width="11.232078" + height="30.888212" + id="rect4" + style="stroke-width:1.55649;stroke-miterlimit:10;stroke-dasharray:none" /> +<polygon + class="st1" + points="37,29.4 24,39.5 24,17.8 37,8.1 " + id="polygon6" + transform="matrix(1.4040097,0,0,1.4040097,-13.23586,-9.1297125)" /> +<line + class="st2" + x1="19.758366" + y1="15.440457" + x2="38.712502" + y2="2.2427664" + id="line8" + style="stroke-width:1.55649;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st3" + d="M 40.256907,31.586568" + id="path10" + style="stroke-width:1.404" /> +<path + class="st3" + d="M 19.758367,46.890273" + id="path12" + style="stroke-width:1.404" /> +<line + class="st2" + x1="8.5213375" + y1="15.013557" + x2="28.155918" + y2="1.6713308" + id="line14" + style="stroke-width:1.55649;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none" /> + +<path + style="fill:none;stroke:#000000;stroke-width:1.55649;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 20.106958,46.262547 38.702489,31.854252" + id="path848" /></svg> diff --git a/app/bin/bitmaps/SVG/bezier-line.svg b/app/bin/bitmaps/SVG/bezier-line.svg new file mode 100644 index 0000000..df4232b --- /dev/null +++ b/app/bin/bitmaps/SVG/bezier-line.svg @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="bezier-line.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1498"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1496" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1447" + inkscape:window-height="957" + id="namedview1494" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.959168" + inkscape:cy="28.551342" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style1477"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FE0000;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 2.5330556,42.626221 c 25.6476684,0 22.1392604,-36.7937448 42.9477454,-36.7937448" + id="path1479" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st1" + d="M 11.848483,31.072088" + id="path1481" + style="stroke-width:1.16495" /> +<path + class="st1" + d="M 18.502359,38.251356" + id="path1483" + style="stroke-width:1.16495" /> +<line + class="st2" + x1="45.480801" + y1="5.8324766" + x2="16.445704" + y2="5.8324766" + id="line1485" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<line + class="st2" + x1="2.5330553" + y1="42.649242" + x2="29.21492" + y2="42.378853" + id="line1487" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st2" + d="m 16.445704,5.8324767 c 0,1.9535366 -1.692253,3.6279968 -3.807572,3.6279968 -2.115318,0 -3.8075738,-1.6744602 -3.8075738,-3.6279968 0,-1.9535361 1.6922558,-3.6279958 3.8075738,-3.6279958 2.115319,0.1395386 3.807572,1.6744597 3.807572,3.6279958 z" + id="path1489" + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st2" + d="m 37.501558,42.136003 c 0,1.970509 -1.670072,3.659516 -3.757664,3.659516 -2.087592,0 -3.757665,-1.689007 -3.757665,-3.659516 0,-1.970511 1.670073,-3.659519 3.757665,-3.659519 2.087592,0 3.757664,1.548259 3.757664,3.659519 z" + id="path1491" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/bezier-track.svg b/app/bin/bitmaps/SVG/bezier-track.svg new file mode 100644 index 0000000..4f3cf33 --- /dev/null +++ b/app/bin/bitmaps/SVG/bezier-track.svg @@ -0,0 +1,424 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="bezier-track.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata878"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs876"><inkscape:path-effect + effect="powerclip" + id="path-effect1638" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1634" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1630" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1626" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1622" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1564" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1560" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1556" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1552" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1548" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1544" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1540" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1536" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1532" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1528" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1524" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1520" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1516" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1512" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1508" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1456"><rect + style="display:block;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1458" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1460"><rect + style="display:block;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1462" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1464"><rect + style="display:none;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1466" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" + d="m 27.27773,6.6178784 h 18.967552 c 0.04424,0 0.07986,0.035619 0.07986,0.079864 v 3.7948587 c 0,0.04424 -0.03562,0.07986 -0.07986,0.07986 H 27.27773 c -0.04424,0 -0.07986,-0.03562 -0.07986,-0.07986 V 6.6977423 c 0,-0.044245 0.03562,-0.079864 0.07986,-0.079864 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1468"><rect + style="display:none;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1470" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" + d="m 27.27773,6.6178784 h 18.967552 c 0.04424,0 0.07986,0.035619 0.07986,0.079864 v 3.7948587 c 0,0.04424 -0.03562,0.07986 -0.07986,0.07986 H 27.27773 c -0.04424,0 -0.07986,-0.03562 -0.07986,-0.07986 V 6.6977423 c 0,-0.044245 0.03562,-0.079864 0.07986,-0.079864 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1472"><rect + style="display:none;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1474" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" + d="m 27.27773,6.6178784 h 18.967552 c 0.04424,0 0.07986,0.035619 0.07986,0.079864 v 3.7948587 c 0,0.04424 -0.03562,0.07986 -0.07986,0.07986 H 27.27773 c -0.04424,0 -0.07986,-0.03562 -0.07986,-0.07986 V 6.6977423 c 0,-0.044245 0.03562,-0.079864 0.07986,-0.079864 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1476"><rect + style="display:none;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1478" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" + d="m 27.27773,6.6178784 h 18.967552 c 0.04424,0 0.07986,0.035619 0.07986,0.079864 v 3.7948587 c 0,0.04424 -0.03562,0.07986 -0.07986,0.07986 H 27.27773 c -0.04424,0 -0.07986,-0.03562 -0.07986,-0.07986 V 6.6977423 c 0,-0.044245 0.03562,-0.079864 0.07986,-0.079864 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1504"><rect + style="display:none;opacity:1;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none" + id="rect1506" + width="19.127279" + height="3.9545863" + x="27.197866" + y="6.6178784" + ry="0.079863898" + d="m 27.27773,6.6178784 h 18.967552 c 0.04424,0 0.07986,0.035619 0.07986,0.079864 v 3.7948587 c 0,0.04424 -0.03562,0.07986 -0.07986,0.07986 H 27.27773 c -0.04424,0 -0.07986,-0.03562 -0.07986,-0.07986 V 6.6977423 c 0,-0.044245 0.03562,-0.079864 0.07986,-0.079864 z" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1504" + inkscape:window-height="972" + id="namedview874" + showgrid="false" + inkscape:zoom="12.390678" + inkscape:cx="23.92928" + inkscape:cy="21.225634" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style833"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FE0000;stroke-miterlimit:10;} +</style> + + + + + + + + + + +<g + id="g906" + inkscape:label="ties" + transform="matrix(1.0591506,0,0,1.0591506,-1.4196144,-1.3413732)"><line + class="st0" + x1="4.1279888" + y1="34.576862" + x2="4.6168704" + y2="45.168163" + id="line835" + style="stroke:#dab16f;stroke-opacity:1;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="none" + d="M 4.1279888,34.576862 4.6168704,45.168163" /><line + class="st0" + x1="42.886402" + y1="2.6856358" + x2="43.408516" + y2="13.62998" + id="line837" + style="fill:#f29a0d;fill-opacity:1;stroke:#dab16f;stroke-opacity:1;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="none" /><line + class="st0" + x1="34.10844" + y1="5.7627635" + x2="39.163727" + y2="14.855262" + id="line841" + style="fill:#fbb03b;fill-opacity:1;stroke:#dab16f;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="35.005325" + y1="17.727415" + x2="27.096411" + y2="11.148679" + id="line843" + style="stroke:#dab16f;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="19.002396" + y1="21.82789" + x2="28.405186" + y2="27.61499" + id="line845" + style="stroke:#dab16f;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="22.733572" + y1="16.710386" + x2="31.354567" + y2="22.478386" + id="line847" + style="stroke:#dab16f;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="15.614336" + y1="26.927553" + x2="24.364897" + y2="33.04113" + id="line849" + style="stroke:#dab16f;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="11.880663" + y1="30.71059" + x2="20.037558" + y2="38.954033" + id="line851" + style="stroke:#dab16f;stroke-opacity:1;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="none" + d="m 11.880663,30.71059 8.156895,8.243443" /><line + class="st0" + x1="8.2077017" + y1="33.453312" + x2="12.669186" + y2="43.218498" + id="line855" + style="stroke:#dab16f;stroke-opacity:1;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="none" + d="m 8.2077017,33.453312 4.4614843,9.765186" /></g> + +<g + id="g910" + inkscape:label="rails" + transform="matrix(1.0591506,0,0,1.0591506,-1.4196144,-1.3413732)"><path + class="st1" + d="m 2.169398,37.254044 c 19.921904,0 19.094929,-31.9056952 43.661204,-31.9056952" + id="path857" + style="stroke-width:1.88830559;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" + clip-path="none" /><path + class="st1" + d="m 2.4505108,42.567322 c 25.9106962,0 22.1552802,-31.807439 43.2993872,-31.219033" + id="path859" + style="stroke-width:1.88830559;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" + clip-path="none" /></g> + + + + +<g + id="g922" + inkscape:label="uhandle" + transform="matrix(1.0591506,0,0,1.0591506,-1.4196144,-1.3413732)"><line + class="st2" + x1="45.715103" + y1="8.5967131" + x2="16.382238" + y2="8.5967131" + id="line865" + style="stroke:#cc0000;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><path + class="st2" + d="m 15.445121,8.6158886 c 0,1.8694864 -1.5274,3.4719024 -3.436654,3.4719024 -1.909251,0 -3.4366529,-1.602416 -3.4366529,-3.4719024 0,-1.8694855 1.5274019,-3.4719017 3.4366529,-3.4719017 1.909254,0.1335346 3.436654,1.6024162 3.436654,3.4719017 z" + id="path869" + style="stroke:#cc0000;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /></g> +<g + id="g914" + inkscape:label="bhandle" + transform="matrix(1.0591506,0,0,1.0591506,-1.4196144,-1.3413732)"><line + class="st2" + x1="2.6384158" + y1="39.785053" + x2="30.46909" + y2="39.785053" + id="line867" + style="stroke:#cc0000;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /><path + class="st2" + d="m 38.117928,39.798562 c 0,1.791916 -1.509641,3.327846 -3.396691,3.327846 -1.887051,0 -3.396691,-1.53593 -3.396691,-3.327846 0,-1.791917 1.50964,-3.327846 3.396691,-3.327846 1.88705,0 3.396691,1.407935 3.396691,3.327846 z" + id="path871" + style="stroke:#cc0000;stroke-width:2.36038199;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/block.svg b/app/bin/bitmaps/SVG/block.svg index 221d631..9d306d7 100755 --- a/app/bin/bitmaps/SVG/block.svg +++ b/app/bin/bitmaps/SVG/block.svg @@ -1,150 +1,95 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> <svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16px" - height="16px" - id="svg2160" - sodipodi:version="0.32" - inkscape:version="0.45.1" - sodipodi:docbase="C:\Dokumente und Einstellungen\MF\Eigene Dateien\xtc\source\xtrkcad\app\bin\bitmaps\SVG" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg39" sodipodi:docname="block.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <defs - id="defs2162"> - <linearGradient - id="linearGradient3240"> - <stop - style="stop-color:#c6ffc7;stop-opacity:1;" - offset="0" - id="stop3242" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3244" /> - </linearGradient> - <filter - inkscape:collect="always" - x="-0.40165289" - width="1.8033058" - y="-0.40165289" - height="1.8033058" - id="filter4024"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="0.34075874" - id="feGaussianBlur4026" /> - </filter> - </defs> - <sodipodi:namedview - id="base" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata43"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="22.197802" - inkscape:cx="8" - inkscape:cy="8" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="797" - inkscape:window-height="573" - inkscape:window-x="43" - inkscape:window-y="33" /> - <metadata - id="metadata2165"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.39860046px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 1.6993002,4.8001142 C 1.6993002,4.0323881 1.6993002,6.1874076 1.6993002,7.1314013 C 1.6993002,8.3269519 1.6993002,9.5225027 1.6993002,10.718053" - id="path3197" - inkscape:transform-center-x="-0.69930023" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.30206299px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 16.340038,7.9045778 C 16.170995,7.9045778 15.782267,7.9045778 15.510057,7.9045778 C 15.332995,7.9045778 15.155932,7.9045778 14.97887,7.9045778 C 14.646878,7.9045778 14.314885,7.9045778 13.982894,7.9045778 C 13.756061,7.9045778 14.109982,7.9045778 14.182089,7.9045778" - id="path3204" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#00c3ff;stroke-width:1.39256012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 4.8935538,8.0622511 C 5.3383788,8.0622511 6.3612827,8.0622511 7.0775815,8.0622511 C 7.5435072,8.0622511 8.0094329,8.0622511 8.4753585,8.0622511 C 9.3489697,8.0622511 10.22258,8.0622511 11.096191,8.0622511 C 11.693085,8.0622511 10.761766,8.0622511 10.572024,8.0622511" - id="path3214" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#00c3ff;stroke-width:1.38903475px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 11.694517,4.8941729 C 11.694517,4.1226995 11.694517,6.2882379 11.694517,7.2368393 C 11.694517,8.4382256 11.694517,9.639612 11.694517,10.840998" - id="path3216" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#00c3ff;stroke-width:1.3360846px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 4.2655817,10.718063 C 4.2569707,11.44917 4.2811417,9.396941 4.2917297,8.4979743 C 4.305139,7.3594493 4.3185482,6.2209242 4.3319577,5.0823988" - id="path3220" - inkscape:transform-center-x="2.6989442" - inkscape:transform-center-y="1.5477264" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.34471488px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 14.327643,4.8345845 C 14.327643,4.0668584 14.327643,6.2218779 14.327643,7.1658716 C 14.327643,8.3614222 14.327643,9.5569733 14.327643,10.752524" - id="path3222" /> - <path - sodipodi:type="arc" - style="fill:#00cb05;fill-opacity:1;fill-rule:nonzero;stroke:#00cb05;stroke-linejoin:round;stroke-opacity:1" - id="path3224" - sodipodi:cx="8.1990099" - sodipodi:cy="3.1608911" - sodipodi:rx="1.5316832" - sodipodi:ry="1.5316832" - d="M 9.7306931 3.1608911 A 1.5316832 1.5316832 0 1 1 6.6673267,3.1608911 A 1.5316832 1.5316832 0 1 1 9.7306931 3.1608911 z" - transform="matrix(1.3326023,0,0,1.3326023,-3.0745345,-1.504785)" /> - <path - sodipodi:type="arc" - style="fill:#8bf68e;fill-opacity:1;fill-rule:nonzero;stroke:#d3fcd3;stroke-linejoin:round;stroke-opacity:1;filter:url(#filter4024)" - id="path3250" - sodipodi:cx="7.5007424" - sodipodi:cy="2.4626236" - sodipodi:rx="0.51806933" - sodipodi:ry="0.51806933" - d="M 8.0188118 2.4626236 A 0.51806933 0.51806933 0 1 1 6.9826731,2.4626236 A 0.51806933 0.51806933 0 1 1 8.0188118 2.4626236 z" - transform="matrix(1.2433747,0,0,1.2433747,-2.0603915,-0.8322608)" /> - <path - sodipodi:type="arc" - style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-linejoin:round;stroke-opacity:1" - id="path4034" - sodipodi:cx="8.1990099" - sodipodi:cy="3.1608911" - sodipodi:rx="1.5316832" - sodipodi:ry="1.5316832" - d="M 9.7306931 3.1608911 A 1.5316832 1.5316832 0 1 1 6.6673267,3.1608911 A 1.5316832 1.5316832 0 1 1 9.7306931 3.1608911 z" - transform="matrix(1.3326023,0,0,1.3326023,-3.0379006,8.949671)" /> - <path - sodipodi:type="arc" - style="fill:#ed0202;fill-opacity:0.9766355;fill-rule:nonzero;stroke:#fff6f6;stroke-linejoin:round;stroke-opacity:1;filter:url(#filter4024)" - id="path4036" - sodipodi:cx="7.5007424" - sodipodi:cy="2.4626236" - sodipodi:rx="0.51806933" - sodipodi:ry="0.51806933" - d="M 8.0188118 2.4626236 A 0.51806933 0.51806933 0 1 1 6.9826731,2.4626236 A 0.51806933 0.51806933 0 1 1 8.0188118 2.4626236 z" - transform="matrix(1.3434079,0,0,1.3868861,-2.6614572,9.403929)" /> - <path - style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.30206299px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 2.3873088,7.8910891 C 2.2182658,7.8910891 1.8295378,7.8910891 1.5573278,7.8910891 C 1.3802658,7.8910891 1.2032028,7.8910891 1.0261408,7.8910891 C 0.69414879,7.8910891 0.36215579,7.8910891 0.030164793,7.8910891 C -0.19666821,7.8910891 0.15725279,7.8910891 0.22935979,7.8910891" - id="path4052" /> - </g> -</svg> + inkscape:window-width="1578" + inkscape:window-height="996" + id="namedview41" + showgrid="false" + inkscape:zoom="8.7705101" + inkscape:cx="31.982176" + inkscape:cy="37.968145" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g37" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath3629"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(1.3333,0,0,-1.3333,0,64)" + id="g37"><g + transform="matrix(1.2967909,0,0,1.2967909,2.1246308,45.683498)" + id="g9" + style="stroke-width:2.7112;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 9.091,-9.014" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path7" + style="stroke-width:2.7112;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.4132365,0,0,1.3859063,34.452001,13.107736)" + id="g13" + style="stroke-width:2.51221;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 8.089,-7.781" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path11" + style="stroke-width:2.51221;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.2967909,0,0,1.2967909,12.971957,34.587781)" + id="g17" + style="stroke-width:2.7112;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 16.564,-16.564" + fill="none" + stroke="#11d9f4" + stroke-miterlimit="10" + id="path15" + style="stroke:#009199;stroke-width:2.7112;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g + clip-path="url(#clipPath3629)" + id="g35" + transform="matrix(1.5187104,0,0,1.5187104,-13.299409,-11.938881)"><g + transform="matrix(1.6641602,0,0,1.6641602,23.655168,17.693415)" + id="g29" + style="stroke:#000000;stroke-width:0.49871;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + d="m 0,0 c 0,-1.681 -1.346,-3.043 -3.005,-3.043 -1.659,0 -3.005,1.362 -3.005,3.043 0,1.681 1.346,3.043 3.005,3.043 C -1.346,3.043 0,1.681 0,0" + fill="#f21434" + id="path27" + style="stroke:#000000;stroke-width:0.781659;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.6663611,0,0,1.6663611,35.459199,29.364105)" + id="g33" + style="stroke-width:0.498051;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 0,0 c 0,-1.766 -1.397,-3.197 -3.121,-3.197 -1.723,0 -3.12,1.431 -3.12,3.197 0,1.766 1.397,3.197 3.12,3.197 C -1.397,3.197 0,1.766 0,0" + fill="#16ef16" + id="path31" + style="stroke:#000000;stroke-width:0.780626;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g><path + style="fill:none;stroke:#009199;stroke-width:3.51586;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 8.9911407,28.141226 19.792915,38.943" + id="path871" /><path + style="fill:none;stroke:#009199;stroke-width:3.51586;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 28.19633,9.0458839 38.998106,19.847659" + id="path871-4" /></g></svg> diff --git a/app/bin/bitmaps/SVG/bottom.svg b/app/bin/bitmaps/SVG/bottom.svg new file mode 100644 index 0000000..e529c66 --- /dev/null +++ b/app/bin/bitmaps/SVG/bottom.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="bottom.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata13"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs11" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1391" + inkscape:window-height="982" + id="namedview9" + showgrid="false" + inkscape:zoom="13.418604" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FF0603;} + .st1{fill:#808080;} +</style> +<path + class="st0" + d="m 29.039558,24.250588 c 0,7.267052 -6.073314,13.030574 -13.438823,13.030574 -7.4947277,0 -13.4388221,-5.888816 -13.4388221,-13.030574 0,-7.267051 6.0733144,-13.030575 13.4388221,-13.030575 7.365509,-0.125294 13.438823,5.763524 13.438823,13.030575 z" + id="path4" + style="stroke-width:1.27241;stroke:#990000;stroke-opacity:1" /> +<rect + x="17.409807" + y="8.3382511" + class="st1" + width="28.42828" + height="31.323498" + id="rect6" + style="stroke-width:1.27241;stroke:#000000;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/box.svg b/app/bin/bitmaps/SVG/box.svg new file mode 100644 index 0000000..e936fa4 --- /dev/null +++ b/app/bin/bitmaps/SVG/box.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="box.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata910"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs908" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1288" + inkscape:window-height="878" + id="namedview906" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style897"> + .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st1{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<rect + x="3.7880173" + y="5.0129852" + class="st0" + width="40.423965" + height="37.97403" + id="rect899" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="7.0859327" + y1="39.584835" + x2="40.014923" + y2="9.0605688" + id="line901" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" /> +<polyline + class="st2" + points="39.9,18.3 39.4,11.4 32.7,11.4 " + id="polyline903" + transform="matrix(1.4025875,0,0,1.3570092,-15.557291,-6.2439345)" + style="stroke-width:2.17452736;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/bridge.svg b/app/bin/bitmaps/SVG/bridge.svg new file mode 100644 index 0000000..af55093 --- /dev/null +++ b/app/bin/bitmaps/SVG/bridge.svg @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="bridge.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><g + id="parapet" + style="display:inline;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.4366046,0,0,1.7036947,-13.366682,-16.698783)"><path + d="M 15.9996,38.6673 H 46.6655" + fill="none" + stroke="#ff6700" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1633" + style="fill:#000000;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="m 46.53217,38.709966 5.334533,5.145205" + fill="none" + stroke="#ff6700" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1637" + style="fill:#000000;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 15.928935,38.645967 11.357049,43.85517" + fill="none" + stroke="#ff6700" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1641" + style="fill:#000000;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 46.6655,18.6678 H 15.9996" + fill="none" + stroke="#ff6700" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1645" + style="fill:none;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 16.886244,18.657134 11.358382,13.313268" + fill="none" + stroke="#ff6700" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1649" + style="fill:none;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="m 45.913519,18.657134 5.954518,-5.343866" + fill="none" + stroke="#ff6700" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1653" + style="fill:none;fill-opacity:1;stroke:#917c6f;stroke-width:2.56211;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1393" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.3956422" + inkscape:cx="36.186989" + inkscape:cy="32.036128" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + id="track" + style="display:inline" + transform="matrix(1.0504573,0,0,1.0504573,-1.6146336,-1.5690294)"><g + id="ties" + inkscape:label="#ties" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3028702,0,0,1.3028702,-9.6908041,-5.2415278)"><path + d="M 11.9997,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1597" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path1601" + transform="matrix(1.3333,0,0,-1.3333,18.6662,21.3344)" + style="stroke:#d88b0d;stroke-width:2.0003;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 25.3327,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1605" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 31.9992,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1609" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 38.6657,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1613" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 45.3322,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1617" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 51.9987,21.3344 V 36.0007" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path1621" + style="stroke:#d88b0d;stroke-width:2.667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g + id="rails" + inkscape:label="#rails" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" + transform="matrix(1.3028702,0,0,1.3028702,-9.6908041,-5.2415278)"><path + d="M 9.3331,24.185806 H 54.6653" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path1625" + style="stroke-width:2.30261;stroke-miterlimit:10;stroke-dasharray:none" /><path + d="M 9.3331,33.149294 H 54.6653" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path1629" + style="stroke-width:2.30261;stroke-miterlimit:10;stroke-dasharray:none" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/building.svg b/app/bin/bitmaps/SVG/building.svg new file mode 100644 index 0000000..4b63286 --- /dev/null +++ b/app/bin/bitmaps/SVG/building.svg @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="building.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata19"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs17" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1579" + inkscape:window-height="975" + id="namedview15" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="23.999379" + inkscape:cy="24.036645" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} +</style> +<polygon + class="st0" + points="39.5,37.5 39.5,29.5 34.5,29.3 29,19.5 17,19.5 10.5,29.3 5.5,29.5 5.5,37.5 " + id="polygon8" + style="fill:#cccccc;fill-opacity:1" + transform="matrix(1.3413882,0,0,1.3436174,-6.1812345,-6.1642108)" /><path + class="st0" + d="M 40.767352,3.1067495" + id="path4" + style="stroke-width:1.3425" /> +<rect + x="7.9033418" + y="5.2565374" + class="st0" + width="32.193317" + height="28.215967" + id="rect6" + style="stroke-width:1.3425" /> + + + +<path + style="fill:none;stroke:#000000;stroke-width:1.3425px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 7.9033409,5.2565374 16.622364,20.036329" + id="path844" /><path + style="fill:none;stroke:#000000;stroke-width:1.3425px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 32.719023,20.036329 40.096659,5.2565374" + id="path846" /><path + style="fill:#b2b2b2;fill-opacity:1;stroke:#665900;stroke-width:0.0759312" + d="M 13.134754,12.71703 C 10.989166,9.0805473 9.2223194,6.0761113 9.2084336,6.0405055 9.1945466,6.0048995 15.867084,5.9757675 24.036296,5.9757675 c 8.169211,0 14.853113,0.017022 14.853113,0.037823 0,0.020802 -1.491218,3.0254477 -3.313816,6.6769895 l -3.313815,6.639165 -7.612975,-4.65e-4 -7.612975,-4.65e-4 z" + id="path848" /><path + style="fill:#cccccc;fill-opacity:1;stroke:#665900;stroke-width:0.0759312" + d="m 36.484379,25.297924 c -1.59357,-2.849671 -2.895525,-5.230247 -2.893235,-5.290169 0.0022,-0.05992 1.312768,-2.720941 2.912171,-5.913376 l 2.908008,-5.8044275 0.0042,11.0967005 c 0.0022,6.103184 -0.0043,11.095752 -0.01476,11.094597 -0.01056,-0.0012 -1.322766,-2.333652 -2.916335,-5.183325 z" + id="path850" /><path + style="fill:#b2b2b2;fill-opacity:1;stroke:#665900;stroke-width:0.0759312" + d="m 8.5921196,19.325952 c 0.00171,-8.408703 0.024691,-11.4526151 0.085796,-11.3472267 0.045906,0.079205 1.6620084,2.8197237 3.5913084,6.0900237 l 3.507818,5.946001 -3.526133,5.329145 c -1.939371,2.931029 -3.5564976,5.361579 -3.5936104,5.401224 -0.039496,0.04218 -0.066512,-4.693848 -0.065179,-11.419167 z" + id="path852" /></svg> diff --git a/app/bin/bitmaps/SVG/car-inventory.svg b/app/bin/bitmaps/SVG/car-inventory.svg new file mode 100644 index 0000000..27d805d --- /dev/null +++ b/app/bin/bitmaps/SVG/car-inventory.svg @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="car-inventory.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata50"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs48" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1583" + inkscape:window-height="965" + id="namedview46" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24.039032" + inkscape:cy="26.235289" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#808080;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000401;stroke-miterlimit:10;} + .st2{fill:#000401;} + .st3{fill:url(#SVGID_1_);} + .st4{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st5{fill:#006837;} + .st6{fill:#FFE53F;} + .st7{font-family:'MyriadPro-Regular';} + .st8{font-size:6px;} +</style> + + + + + + + + + + + +<linearGradient + id="SVGID_1_" + gradientUnits="userSpaceOnUse" + x1="24.5506" + y1="21.5" + x2="30.4868" + y2="21.5" + gradientTransform="matrix(0,1.0571338,-1.0571338,0,51.676842,-1.8693808)"> + <stop + offset="2.455360e-02" + style="stop-color:#006837" + id="stop26" /> + <stop + offset="0.4355" + style="stop-color:#22B573" + id="stop28" /> + <stop + offset="1" + style="stop-color:#006837" + id="stop30" /> +</linearGradient> + + +<rect + x="1.0481793" + y="1.453462" + class="st5" + width="32.050381" + height="12.064563" + id="body" + style="fill:#682b00;fill-opacity:1;stroke:#d9d9d9;stroke-width:0.913228;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + + +<g + id="wheels" + transform="matrix(1.1266654,0,0,1.1266654,-5.5483902,-27.757493)"><path + class="st2" + d="m 11.136232,39.118101 c 0,1.134615 -0.882478,2.143161 -2.1431611,2.143161 -1.1346136,0 -2.1431594,-0.882478 -2.1431594,-2.143161 0,-1.260681 0.8824776,-2.143159 2.1431594,-2.143159 1.2606831,0.126067 2.1431611,1.008545 2.1431611,2.143159 z" + id="path39" + style="stroke-width:1.26068" /></g> +<rect + x="8.0319376" + y="15.51599" + class="st5" + width="32.050381" + height="12.064563" + id="body-1" + style="fill:#004c68;fill-opacity:1;stroke:#d9d9d9;stroke-width:0.913228;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><g + id="wheels-5" + transform="matrix(1.1490837,0,0,1.1490837,1.0035607,-14.65363)"><path + class="st2" + d="m 11.344738,39.187603 c 0,1.134615 -0.882478,2.143161 -2.1431605,2.143161 -1.1346136,0 -2.1431594,-0.882478 -2.1431594,-2.143161 0,-1.260681 0.8824776,-2.143159 2.1431594,-2.143159 1.2606825,0.126067 2.1431605,1.008545 2.1431605,2.143159 z" + id="path39-0" + style="stroke-width:1.26068" /></g><rect + x="14.90144" + y="29.569271" + class="st5" + width="32.050381" + height="12.064563" + id="body-1-5" + style="fill:#006806;fill-opacity:1;stroke:#d9d9d9;stroke-width:0.913228;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><g + id="wheels-5-4" + transform="matrix(1.1643725,0,0,1.1643725,1.2420809,-1.0403268)"><path + class="st2" + d="m 33.655476,39.118101 c 0,1.134615 -0.882478,2.143161 -2.143161,2.143161 -1.260682,0 -2.143159,-0.882478 -2.143159,-2.143161 0,-1.260681 0.882477,-2.143159 2.143159,-2.143159 1.260683,0 2.143161,1.008546 2.143161,2.143159 z" + id="path43-6-1-4" + style="fill:#000401;stroke-width:1.26068" /><path + class="st2" + d="m 38.282412,39.118101 c 0,1.134615 -0.882478,2.143161 -2.14316,2.143161 -1.260683,0 -2.14316,-0.882478 -2.14316,-2.143161 0,-1.260681 0.882477,-2.143159 2.14316,-2.143159 1.260682,0 2.14316,1.008546 2.14316,2.143159 z" + id="path20-6-1" + style="stroke-width:1.26068" /><path + class="st2" + d="m 16.748068,39.118101 c 0,1.134615 -0.882478,2.143161 -2.143161,2.143161 -1.134614,0 -2.14316,-0.882478 -2.14316,-2.143161 0,-1.260681 0.882478,-2.143159 2.14316,-2.143159 1.260683,0.126067 2.143161,1.008545 2.143161,2.143159 z" + id="path39-0-8" + style="stroke-width:1.26068" /><path + class="st2" + d="m 21.527695,39.118101 c 0,1.134615 -0.882478,2.143161 -2.14316,2.143161 -1.260683,0 -2.14316,-0.882478 -2.14316,-2.143161 0,-1.260681 0.882477,-2.143159 2.14316,-2.143159 1.260682,0 2.14316,1.008545 2.14316,2.143159 z" + id="path43-68-8" + style="stroke-width:1.26068" /></g></svg> diff --git a/app/bin/bitmaps/SVG/change-grid.svg b/app/bin/bitmaps/SVG/change-grid.svg new file mode 100644 index 0000000..0962f5f --- /dev/null +++ b/app/bin/bitmaps/SVG/change-grid.svg @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="change-grid.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata73"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs71" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1524" + inkscape:window-height="969" + id="namedview69" + showgrid="false" + inkscape:zoom="12.260054" + inkscape:cx="19.942816" + inkscape:cy="21.981959" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g66" + inkscape:snap-nodes="false" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FFFFFF;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:none;} + .st2{fill:#231F20;} +</style> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<g + id="g66"> + + +<g + id="g927" + transform="matrix(1.2365151,0,0,1.2365151,-0.45780653,-10.909155)"><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 37.67926,36.998679 H 1.6603668" + id="path906-0" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 10.957925,10.259045 v 35.36001" + id="path900" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 19.779626,10.259045 V 45.985102" + id="path904" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 28.601326,10.259045 V 46.277938" + id="path906" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 37.75247,19.465092 H 1.6603668" + id="path902-1" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 37.825679,28.231886 H 1.6603668" + id="path904-7" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 37.423027,10.259045 V 46.277937" + id="path906-06" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 2.1362255,10.259045 V 46.277938" + id="path906-01" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 38.281206,10.763375 1.2699144,10.6983" + id="path900-5-5" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:1.83335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 38.281207,45.765474 H 1.3349898" + id="path900-5-8" + sodipodi:nodetypes="cc" /></g><g + id="g6458" + transform="translate(-4.3292157,4.0470317)"><path + style="fill:#f1b76f;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 21.519231,26.538462 V 21.461538 L 38.798077,4.2403846 43.701923,9.2596154 26.798077,26.451923 Z" + id="path1780" + sodipodi:nodetypes="cccccc" /><path + style="fill:none;stroke:#666666;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 24.346154,18.461538 c 5.134615,5.134616 5.134615,5.134616 5.134615,5.134616" + id="path4988" /></g></g> +</svg> diff --git a/app/bin/bitmaps/SVG/circle-center.svg b/app/bin/bitmaps/SVG/circle-center.svg new file mode 100644 index 0000000..dc1b0fc --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-center.svg @@ -0,0 +1,283 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-center.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata3349"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs3347"><inkscape:path-effect + effect="powerclip" + id="path-effect868" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect864" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath856"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.27456px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 37.481595,37.263175 1.203443,-8.895802 -3.93469,-1.125417 -8.186482,7.583889 1.789451,3.620637 z" + id="path858" + sodipodi:nodetypes="cccccc" /><path + id="lpe_path-effect864" + style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.27456px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -0.81667071,-1.0453595 H 49.139391 V 48.910703 H -0.81667071 Z M 37.481595,37.263175 l 1.203443,-8.895802 -3.93469,-1.125417 -8.186482,7.583889 1.789451,3.620637 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath860"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.27456px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 37.481595,37.263175 1.203443,-8.895802 -3.93469,-1.125417 -8.186482,7.583889 1.789452,3.620637 z" + id="path862" + sodipodi:nodetypes="cccccc" /><path + id="lpe_path-effect868" + style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.27456px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -2,-2.5284135 H 50.322721 V 50.393757 H -2 Z m 39.481595,39.7915885 1.203443,-8.895802 -3.93469,-1.125417 -8.186482,7.583889 1.789452,3.620637 z" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1429" + inkscape:window-height="935" + id="namedview3345" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="23.999379" + inkscape:cy="24.036645" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style3300"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + + + + + + + + + + + + + + + + + + +<style + type="text/css" + id="style2554"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st4{fill:#FB0000;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style><g + id="g2669" + inkscape:label="ties" + transform="matrix(1.0980006,0,0,1.0732591,-2.5664524,-1.7232245)" + clip-path="url(#clipPath860)" + inkscape:path-effect="#path-effect868"><line + class="st0" + x1="32" + y1="43.900002" + x2="28.799999" + y2="35.900002" + id="line2586" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 32,43.900002 -3.200001,-8" /><line + class="st0" + x1="23.9" + y1="2.482697" + x2="24" + y2="11.482697" + id="line2556" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 23.9,2.482697 0.1,9" /><line + class="st0" + x1="23.900255" + y1="36.408672" + x2="23.999744" + y2="45.382671" + id="line2558" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 23.900255,36.408672 0.09949,8.973999" /><line + class="st0" + x1="36.5" + y1="24" + x2="45.299999" + y2="24.200001" + id="line2560" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 36.5,24 8.799999,0.200001" /><line + class="st0" + x1="3" + y1="25" + x2="12" + y2="25" + id="line2562" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 3,25 h 9" /><line + class="st0" + x1="8.3002796" + y1="9.5427513" + x2="14.785051" + y2="15.379046" + id="line2564" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 8.3002796,9.5427513 14.785051,15.379046" /><line + class="st0" + x1="38.767326" + y1="8.2077475" + x2="32.819508" + y2="15.283601" + id="line2566" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 38.767326,8.2077475 32.819508,15.283601" /><line + class="st0" + x1="32.130051" + y1="4.2333679" + x2="28.829287" + y2="12.58843" + id="line2568" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 32.130051,4.2333679 28.829287,12.58843" /><line + class="st0" + x1="43.626308" + y1="14.811062" + x2="35.262169" + y2="19.377419" + id="line2570" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 43.626308,14.811062 -8.364139,4.566357" /><line + class="st0" + x1="14.7" + y1="4.9000001" + x2="18.6" + y2="12.6" + id="line2572" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 14.7,4.9000001 18.6,12.6" /><line + class="st0" + x1="4.0999999" + y1="16.9" + x2="12.4" + y2="19.700001" + id="line2574" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 4.0999999,16.9 12.4,19.700001" /><line + class="st0" + x1="8.6999998" + y1="39" + x2="15.3" + y2="32.799999" + id="line2576" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 8.6999998,39 15.3,32.799999" /><line + class="st0" + x1="4.5999999" + y1="32.799999" + x2="12.8" + y2="28.9" + id="line2578" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 4.5999999,32.799999 12.8,28.9" /><line + class="st0" + x1="15.3" + y1="43.900002" + x2="19.4" + y2="35.400002" + id="line2580" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 15.3,43.900002 4.1,-8.5" /><line + class="st0" + x1="39.200001" + y1="39.599998" + x2="32.400002" + y2="33.5" + id="line2582" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 39.200001,39.599998 32.400002,33.5" /><line + class="st0" + x1="43.900002" + y1="32.799999" + x2="34.700001" + y2="29.6" + id="line2584" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 43.900002,32.799999 34.700001,29.6" /></g><g + id="g2682" + inkscape:label="rail" + transform="matrix(1.0980006,0,0,1.0732591,-2.5664522,-1.7232244)" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="url(#clipPath856)" + inkscape:path-effect="#path-effect864"><path + class="st1" + d="m 43.203111,23.932672 c 0,10.53579 -8.50596,19.041751 -19.041752,19.041751 -10.53579,0 -19.0417497,-8.505961 -19.0417497,-19.041751 0,-10.535792 8.5059597,-19.0417515 19.0417497,-19.0417515 10.535792,0 19.041752,8.5059595 19.041752,19.0417515 z" + id="path2588" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 43.203111,23.932672 c 0,10.53579 -8.50596,19.041751 -19.041752,19.041751 -10.53579,0 -19.0417497,-8.505961 -19.0417497,-19.041751 0,-10.535792 8.5059597,-19.0417515 19.0417497,-19.0417515 10.535792,0 19.041752,8.5059595 19.041752,19.0417515 z" /><path + class="st1" + d="m 38.997085,23.932672 c 0,8.230037 -6.605687,14.835726 -14.835725,14.835726 -8.230037,0 -14.8357248,-6.605689 -14.8357248,-14.835726 0,-8.230038 6.6056878,-14.8357262 14.8357248,-14.8357262 8.121748,0 14.835725,6.6056882 14.835725,14.8357262 z" + id="path2590" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 38.997085,23.932672 c 0,8.230037 -6.605687,14.835726 -14.835725,14.835726 -8.230037,0 -14.8357248,-6.605689 -14.8357248,-14.835726 0,-8.230038 6.6056878,-14.8357262 14.8357248,-14.8357262 8.121748,0 14.835725,6.6056882 14.835725,14.8357262 z" /></g><g + id="g3424" + inkscape:label="arrow" + transform="matrix(1.0504397,0,0,1.0504397,-1.5029059,-2.1739336)"><line + class="st2" + x1="35.225948" + y1="35.590187" + x2="24.211658" + y2="24.43399" + id="line876" + style="fill:none;stroke:#cc0000;stroke-width:2.61571;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="32.3,37.8 36.9,37.2 37.5,32.7 " + id="polyline878" + transform="matrix(1.2491748,0,0,1.2491748,-10.868603,-10.879114)" + style="fill:none;stroke:#cc0000;stroke-width:2.22802;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/circle-filled-center.svg b/app/bin/bitmaps/SVG/circle-filled-center.svg new file mode 100644 index 0000000..252ce43 --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-filled-center.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-filled-center.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1478"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1476" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1421" + inkscape:window-height="922" + id="namedview1474" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24.039032" + inkscape:cy="24.039032" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style1463"> + .st0{fill:#00C9FF;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="M 45.714152,24 C 45.714152,36.014429 36.014429,45.714152 24,45.714152 11.98557,45.714152 2.2858483,36.014429 2.2858483,24 2.2858483,11.98557 11.98557,2.2858481 24,2.2858481 36.014429,2.2858481 45.714152,11.98557 45.714152,24 Z" + id="path1465" + style="fill:#80e2ff;fill-opacity:1" /> + + + +<line + class="st2" + x1="36.442284" + y1="36.748508" + x2="22.401169" + y2="22.70739" + id="line876" + style="fill:none;stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="32.3,37.8 36.9,37.2 37.5,32.7 " + id="polyline878" + transform="matrix(1.6532977,0,0,1.6532977,-24.564402,-24.754165)" + style="fill:none;stroke:#cc0000;stroke-width:1.81456;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></svg> diff --git a/app/bin/bitmaps/SVG/circle-filled-tangent.svg b/app/bin/bitmaps/SVG/circle-filled-tangent.svg new file mode 100644 index 0000000..afbf7ea --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-filled-tangent.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-filled-tangent.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata3982"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs3980" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1426" + inkscape:window-height="903" + id="namedview3978" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24.036645" + inkscape:cy="24.036645" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style3967"> + .st0{fill:#3FD1FF;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 46.005278,23.999999 c 0,12.17551 -9.829769,22.005279 -22.005279,22.005279 -12.175509,0 -22.0052775,-9.829769 -22.0052775,-22.005279 0,-12.175509 9.8297685,-22.0052775 22.0052775,-22.0052775 12.17551,0 22.005279,9.8297685 22.005279,22.0052775 z" + id="path3969" + style="fill:#80e1ff;fill-opacity:1" /> +<line + class="st1" + x1="43.5" + y1="45" + x2="43.5" + y2="45" + id="line3971" /> + + +<line + class="st2" + x1="24.167141" + y1="23.9102" + x2="38.231514" + y2="37.811775" + id="line4088" + style="fill:none;stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="28.8,24 24.4,24.7 23.7,29.1 " + id="polyline4090" + transform="matrix(1.6700933,0,0,1.6023948,-16.583136,-15.668951)" + style="fill:none;stroke:#cc0000;stroke-width:1.83385977;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></svg> diff --git a/app/bin/bitmaps/SVG/circle-line-center.svg b/app/bin/bitmaps/SVG/circle-line-center.svg new file mode 100644 index 0000000..18e05df --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-line-center.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-line-center.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata885"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs883" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1460" + inkscape:window-height="897" + id="namedview881" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24.012177" + inkscape:cy="24.012177" + inkscape:window-x="115" + inkscape:window-y="26" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style870"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 45.672182,24.000001 c 0,11.991207 -9.680974,21.672181 -21.672181,21.672181 -11.991208,0 -21.6721826,-9.680974 -21.6721826,-21.672181 0,-11.991208 9.6809746,-21.6721826 21.6721826,-21.6721826 11.991207,0 21.672181,9.6809746 21.672181,21.6721826 z" + id="path872" + style="stroke-width:2.75028;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="43.5" + y1="45" + x2="43.5" + y2="45" + id="line874" /> +<line + class="st2" + x1="36.391674" + y1="36.691673" + x2="23.238926" + y2="23.538925" + id="line876" + style="stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st3" + points="32.3,37.8 36.9,37.2 37.5,32.7 " + id="polyline878" + transform="matrix(1.3660384,0,0,1.3660384,-13.920935,-14.030747)" + style="stroke:#cc0000;stroke-width:2.19613153;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/circle-line-tangent.svg b/app/bin/bitmaps/SVG/circle-line-tangent.svg new file mode 100644 index 0000000..02f8c39 --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-line-tangent.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-line-tangent.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata3363"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs3361" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1346" + inkscape:window-height="914" + id="namedview3359" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="23.995613" + inkscape:cy="24.041494" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style3348"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 45.560452,24.091762 c 0,11.878615 -9.590075,21.468691 -21.46869,21.468691 -11.878617,0 -21.4686915,-9.590076 -21.4686915,-21.468691 0,-11.878617 9.5900745,-21.4686919 21.4686915,-21.4686919 11.878615,0 21.46869,9.5900749 21.46869,21.4686919 z" + id="path3350" + style="stroke-width:2.72446;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="43.5" + y1="45" + x2="43.5" + y2="45" + id="line3352" /> + + +<line + class="st2" + x1="23.34251" + y1="22.752092" + x2="37.761456" + y2="37.004139" + id="line4088" + style="fill:none;stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="28.8,24 24.4,24.7 23.7,29.1 " + id="polyline4090" + transform="matrix(1.6557924,0,0,1.5886737,-17.058824,-16.488148)" + style="fill:none;stroke:#cc0000;stroke-width:1.84969856;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></svg> diff --git a/app/bin/bitmaps/SVG/circle-line.svg b/app/bin/bitmaps/SVG/circle-line.svg new file mode 100644 index 0000000..2aa4811 --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-line.svg @@ -0,0 +1,228 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-line.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1023"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1021" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1316" + inkscape:window-height="850" + id="namedview1019" + showgrid="false" + inkscape:zoom="10.889218" + inkscape:cx="24.01458" + inkscape:cy="23.968663" + inkscape:window-x="362" + inkscape:window-y="40" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style940"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st5{fill:#FB0000;} + .st6{font-family:'MyriadPro-Regular';} + .st7{font-size:12px;} +</style> +<path + class="st0" + d="M24,11.9" + id="path942" /> +<path + class="st0" + d="M23.9,2.9" + id="path944" /> +<path + class="st0" + d="M24,45.1" + id="path946" /> +<path + class="st0" + d="M23.9,36.9" + id="path948" /> +<path + class="st0" + d="M45.3,24.2" + id="path950" /> +<path + class="st0" + d="M36.5,24" + id="path952" /> +<path + class="st0" + d="M12,25" + id="path954" /> +<path + class="st0" + d="M3,25" + id="path956" /> +<path + class="st0" + d="M14.7,15.3" + id="path958" /> +<path + class="st0" + d="M8.7,9.9" + id="path960" /> +<path + class="st0" + d="M32.8,15.3" + id="path962" /> +<path + class="st0" + d="M38.6,8.4" + id="path964" /> +<path + class="st0" + d="M28.8,12.6" + id="path966" /> +<path + class="st0" + d="M32,4.5" + id="path968" /> +<path + class="st0" + d="M35.1,19" + id="path970" /> +<path + class="st0" + d="M43.3,14.7" + id="path972" /> +<path + class="st0" + d="M18.6,12.6" + id="path974" /> +<path + class="st0" + d="M14.7,4.9" + id="path976" /> +<path + class="st0" + d="M12.4,19.7" + id="path978" /> +<path + class="st0" + d="M4.1,16.9" + id="path980" /> +<path + class="st0" + d="M15.3,32.8" + id="path982" /> +<path + class="st0" + d="M8.7,39" + id="path984" /> +<path + class="st0" + d="M12.8,28.9" + id="path986" /> +<path + class="st0" + d="M4.6,32.8" + id="path988" /> +<path + class="st0" + d="M19.4,35.4" + id="path990" /> +<path + class="st0" + d="M15.3,43.9" + id="path992" /> +<path + class="st0" + d="M32.4,33.5" + id="path994" /> +<path + class="st0" + d="M39.2,39.6" + id="path996" /> +<path + class="st0" + d="M34.7,29.6" + id="path998" /> +<path + class="st0" + d="M43.9,32.8" + id="path1000" /> +<path + class="st0" + d="M28.8,35.9" + id="path1002" /> +<path + class="st0" + d="M32,43.9" + id="path1004" /> +<path + class="st1" + d="M 45.599801,24 C 45.599801,35.951159 35.951158,45.599801 24,45.599801 12.048841,45.599801 2.4001988,35.951159 2.4001988,24 2.4001988,12.048842 12.048841,2.4001989 24,2.4001989 35.951158,2.4001989 45.599801,12.048842 45.599801,24 Z" + id="path1006" + style="stroke-width:2.74109;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="43.5" + y1="45" + x2="43.5" + y2="45" + id="line1008" /> +<line + class="st3" + x1="6.2269526" + y1="24.224487" + x2="41.573009" + y2="24.275513" + id="line1010" + style="stroke:#cc0000;stroke-width:2.44399;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st4" + points="8.6,20.9 5.6,24.5 8.6,28.1 " + id="polyline1012" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.1988158,0,0,1.1988158,-0.48641593,-5.1464998)" /> +<polyline + class="st4" + points="39.2,27.7 42.6,24.2 39.2,20.9 " + id="polyline1014" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.1777431,0,0,1.1777431,-8.5988466,-4.2258703)" /> + +<text + xml:space="preserve" + style="font-weight:bold;font-size:17.0194px;line-height:0;font-family:Arial;-inkscape-font-specification:'Arial Bold';fill:#cc0000;fill-opacity:1;stroke-width:1.41828" + x="12.717101" + y="21.812561" + id="text1608" + transform="scale(1.0582049,0.94499656)"><tspan + sodipodi:role="line" + id="tspan1606" + x="12.717101" + y="21.812561" + style="fill:#cc0000;fill-opacity:1;stroke-width:1.41828">36</tspan></text></svg> diff --git a/app/bin/bitmaps/SVG/circle-tangent.svg b/app/bin/bitmaps/SVG/circle-tangent.svg new file mode 100644 index 0000000..3e970c6 --- /dev/null +++ b/app/bin/bitmaps/SVG/circle-tangent.svg @@ -0,0 +1,272 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle-tangent.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata4097"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs4095"><inkscape:path-effect + effect="powerclip" + id="path-effect890" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect886" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath878"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.07687px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 30.578006,35.073034 3.682037,4.464428 4.595747,-4.216244 -3.946461,-4.268054 z" + id="path880" + sodipodi:nodetypes="ccccc" /><path + id="lpe_path-effect886" + style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.07687px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -0.929284,-0.7316369 H 48.929284 V 49.126931 H -0.929284 Z m 31.50729,35.8046709 3.682037,4.464428 4.595747,-4.216244 -3.946461,-4.268054 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath882"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.07687px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 30.578006,35.073034 3.682037,4.464428 4.595747,-4.216244 -3.946461,-4.268054 z" + id="path884" + sodipodi:nodetypes="ccccc" /><path + id="lpe_path-effect890" + style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.07687px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -2,-2.1111104 H 50.322721 V 50.112193 H -2 Z m 32.578006,37.1841444 3.682037,4.464428 4.595747,-4.216244 -3.946461,-4.268054 z" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1545" + inkscape:window-height="922" + id="namedview4093" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24.039032" + inkscape:cy="28.51141" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style4048"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + + + + + + + + + + + + +<g + id="g872" + inkscape:label="ties" + transform="matrix(1.0865725,0,0,1.0985893,-2.2578819,-2.3618824)" + clip-path="url(#clipPath882)" + inkscape:path-effect="#path-effect890"><line + class="st0" + x1="23.9" + y1="2.9000001" + x2="24" + y2="11.9" + id="line4050" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 23.9,2.9000001 24,11.9" /><line + class="st0" + x1="23.9" + y1="36.900002" + x2="24" + y2="45.099998" + id="line4052" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 23.9,36.900002 24,45.099998" /><line + class="st0" + x1="36.5" + y1="24" + x2="45.299999" + y2="24.200001" + id="line4054" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 36.5,24 8.799999,0.200001" /><line + class="st0" + x1="3" + y1="25" + x2="12" + y2="25" + id="line4056" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 3,25 h 9" /><line + class="st0" + x1="8.6179476" + y1="9.9343204" + x2="14.894994" + y2="15.583662" + id="line4058" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 8.6179476,9.9343204 14.894994,15.583662" /><line + class="st0" + x1="38.599998" + y1="8.3999996" + x2="32.799999" + y2="15.3" + id="line4060" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 38.599998,8.3999996 32.799999,15.3" /><line + class="st0" + x1="32" + y1="4.5" + x2="28.799999" + y2="12.6" + id="line4062" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 32,4.5 -3.200001,8.1" /><line + class="st0" + x1="43.299999" + y1="14.7" + x2="35.099998" + y2="19" + id="line4064" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 43.299999,14.7 35.099998,19" /><line + class="st0" + x1="14.7" + y1="4.9000001" + x2="18.6" + y2="12.6" + id="line4066" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 14.7,4.9000001 18.6,12.6" /><line + class="st0" + x1="4.0999999" + y1="16.9" + x2="12.4" + y2="19.700001" + id="line4068" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 4.0999999,16.9 12.4,19.700001" /><line + class="st0" + x1="8.6999998" + y1="39" + x2="15.3" + y2="32.799999" + id="line4070" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 8.6999998,39 15.3,32.799999" /><line + class="st0" + x1="4.5999999" + y1="32.799999" + x2="12.8" + y2="28.9" + id="line4072" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 4.5999999,32.799999 12.8,28.9" /><line + class="st0" + x1="15.3" + y1="43.900002" + x2="19.4" + y2="35.400002" + id="line4074" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 15.3,43.900002 4.1,-8.5" /><line + class="st0" + x1="39.200001" + y1="39.599998" + x2="32.799999" + y2="33.099998" + id="line4076" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 39.200001,39.599998 -6.400002,-6.5" /><line + class="st0" + x1="43.900002" + y1="32.799999" + x2="34.700001" + y2="29.6" + id="line4078" + style="stroke:#d98b0d;stroke-opacity:1" + d="M 43.900002,32.799999 34.700001,29.6" /><line + class="st0" + x1="32" + y1="43.900002" + x2="28.799999" + y2="35.900002" + id="line4080" + style="stroke:#d98b0d;stroke-opacity:1" + d="m 32,43.900002 -3.200001,-8" /></g> + +<g + id="g854" + inkscape:label="rails" + transform="matrix(1.0865725,0,0,1.0985893,-2.2578819,-2.3618824)" + clip-path="url(#clipPath878)" + inkscape:path-effect="#path-effect886"><path + class="st1" + d="m 43.179284,24.197647 c 0,10.611888 -8.567397,19.179284 -19.179285,19.179284 -10.611888,0 -19.179283,-8.567396 -19.179283,-19.179284 0,-10.611888 8.567395,-19.1792839 19.179283,-19.1792839 10.611888,0 19.179285,8.5673959 19.179285,19.1792839 z" + id="path4082" + style="stroke-width:1.83055574;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 43.179284,24.197647 c 0,10.611888 -8.567397,19.179284 -19.179285,19.179284 -10.611888,0 -19.179283,-8.567396 -19.179283,-19.179284 0,-10.611888 8.567395,-19.1792839 19.179283,-19.1792839 10.611888,0 19.179285,8.5673959 19.179285,19.1792839 z" /><path + class="st1" + d="m 38.685289,24 c 0,8.021276 -6.43813,14.459406 -14.459407,14.459406 -8.021276,0 -14.459406,-6.43813 -14.459406,-14.459406 0,-8.021277 6.43813,-14.4594063 14.459406,-14.4594063 7.915734,0 14.459407,6.4381293 14.459407,14.4594063 z" + id="path4084" + style="stroke-width:1.83055574;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 38.685289,24 c 0,8.021276 -6.43813,14.459406 -14.459407,14.459406 -8.021276,0 -14.459406,-6.43813 -14.459406,-14.459406 0,-8.021277 6.43813,-14.4594063 14.459406,-14.4594063 7.915734,0 14.459407,6.4381293 14.459407,14.4594063 z" /></g> + + +<g + id="g876" + inkscape:label="arrow" + transform="matrix(1.065425,0,0,1.1038274,-2.1546271,-3.2465836)"><line + class="st2" + x1="24.711523" + y1="25.142181" + x2="36" + y2="36.299999" + id="line4088" + style="stroke:#cc0000;stroke-width:2.76636;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="28.8,24 24.4,24.7 23.7,29.1 " + id="polyline4090" + transform="matrix(1.3657905,0,0,1.3104272,-8.6137653,-7.225371)" + style="stroke:#cc0000;stroke-width:2.06781049;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/circle.svg b/app/bin/bitmaps/SVG/circle.svg new file mode 100644 index 0000000..660e7fd --- /dev/null +++ b/app/bin/bitmaps/SVG/circle.svg @@ -0,0 +1,301 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="circle.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata2607"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2605"><inkscape:path-effect + effect="powerclip" + id="path-effect1130" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1126" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1118"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:#fefefe;stroke-width:0.93628px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 4.7756386,23.899697 5.5479404,-6.428566 28.268076,0.264187 5.636002,6.340504 -6.340502,6.60469 -28.0038892,-0.176125 z" + id="path1120" /><path + id="lpe_path-effect1126" + style="fill:#ffffff;fill-opacity:1;stroke:#fefefe;stroke-width:0.93628px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -0.81667071,-1.0453595 H 49.139391 V 48.910703 H -0.81667071 Z m 5.59230931,24.9450565 5.1076272,6.60469 28.0038892,0.176125 6.340502,-6.60469 -5.636002,-6.340504 -28.268076,-0.264187 z" /></clipPath><clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath1122"><path + style="display:none;fill:#ffffff;fill-opacity:1;stroke:#fefefe;stroke-width:0.93628px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 4.7756386,23.899697 5.5479404,-6.428566 28.268076,0.264187 5.636002,6.340504 -6.340502,6.60469 -28.0038892,-0.176125 z" + id="path1124" /><path + id="lpe_path-effect1130" + style="fill:#ffffff;fill-opacity:1;stroke:#fefefe;stroke-width:0.93628px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + class="powerclip" + d="M -2,-2.5284135 H 50.322721 V 50.393757 H -2 Z m 6.7756386,26.4281105 5.1076272,6.60469 28.0038892,0.176125 6.340502,-6.60469 -5.636002,-6.340504 -28.268076,-0.264187 z" /></clipPath></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1594" + inkscape:window-height="933" + id="namedview2603" + showgrid="false" + inkscape:zoom="10.631993" + inkscape:cx="24.031242" + inkscape:cy="23.843131" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2554"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st4{fill:#FB0000;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> + + + + + + + + + + + + + + + + +<g + id="g2669" + inkscape:label="ties" + transform="matrix(1.1036179,0,0,1.0877739,-2.4767987,-1.9863076)" + clip-path="url(#clipPath1122)" + inkscape:path-effect="#path-effect1130"><line + class="st0" + x1="32" + y1="43.900002" + x2="28.799999" + y2="35.900002" + id="line2586" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 32,43.900002 -3.200001,-8" /><line + class="st0" + x1="23.9" + y1="2.482697" + x2="24" + y2="11.482697" + id="line2556" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 23.9,2.482697 0.1,9" /><line + class="st0" + x1="23.900255" + y1="36.408672" + x2="23.999744" + y2="45.382671" + id="line2558" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 23.900255,36.408672 0.09949,8.973999" /><line + class="st0" + x1="36.5" + y1="24" + x2="45.299999" + y2="24.200001" + id="line2560" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 36.5,24 8.799999,0.200001" /><line + class="st0" + x1="3" + y1="25" + x2="12" + y2="25" + id="line2562" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 3,25 h 9" /><line + class="st0" + x1="8.3002796" + y1="9.5427513" + x2="14.785051" + y2="15.379046" + id="line2564" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 8.3002796,9.5427513 14.785051,15.379046" /><line + class="st0" + x1="38.767326" + y1="8.2077475" + x2="32.819508" + y2="15.283601" + id="line2566" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 38.767326,8.2077475 32.819508,15.283601" /><line + class="st0" + x1="32.130051" + y1="4.2333679" + x2="28.829287" + y2="12.58843" + id="line2568" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 32.130051,4.2333679 28.829287,12.58843" /><line + class="st0" + x1="43.299999" + y1="14.7" + x2="35.099998" + y2="19" + id="line2570" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 43.299999,14.7 35.099998,19" /><line + class="st0" + x1="14.7" + y1="4.9000001" + x2="18.6" + y2="12.6" + id="line2572" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 14.7,4.9000001 18.6,12.6" /><line + class="st0" + x1="4.0999999" + y1="16.9" + x2="12.4" + y2="19.700001" + id="line2574" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 4.0999999,16.9 12.4,19.700001" /><line + class="st0" + x1="8.6999998" + y1="39" + x2="15.3" + y2="32.799999" + id="line2576" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 8.6999998,39 15.3,32.799999" /><line + class="st0" + x1="4.5999999" + y1="32.799999" + x2="12.8" + y2="28.9" + id="line2578" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 4.5999999,32.799999 12.8,28.9" /><line + class="st0" + x1="15.3" + y1="43.900002" + x2="19.4" + y2="35.400002" + id="line2580" + style="stroke:#d98a0d;stroke-opacity:1" + d="m 15.3,43.900002 4.1,-8.5" /><line + class="st0" + x1="39.200001" + y1="39.599998" + x2="32.400002" + y2="33.5" + id="line2582" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 39.200001,39.599998 32.400002,33.5" /><line + class="st0" + x1="43.900002" + y1="32.799999" + x2="34.700001" + y2="29.6" + id="line2584" + style="stroke:#d98a0d;stroke-opacity:1" + d="M 43.900002,32.799999 34.700001,29.6" /></g> +<g + id="g2682" + inkscape:label="rail" + transform="matrix(1.1036179,0,0,1.0877739,-2.4767987,-1.9863076)" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + clip-path="url(#clipPath1118)" + inkscape:path-effect="#path-effect1126"><path + class="st1" + d="m 43.203111,23.932672 c 0,10.53579 -8.50596,19.041751 -19.041752,19.041751 -10.53579,0 -19.0417497,-8.505961 -19.0417497,-19.041751 0,-10.535792 8.5059597,-19.0417515 19.0417497,-19.0417515 10.535792,0 19.041752,8.5059595 19.041752,19.0417515 z" + id="path2588" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 43.203111,23.932672 c 0,10.53579 -8.50596,19.041751 -19.041752,19.041751 -10.53579,0 -19.0417497,-8.505961 -19.0417497,-19.041751 0,-10.535792 8.5059597,-19.0417515 19.0417497,-19.0417515 10.535792,0 19.041752,8.5059595 19.041752,19.0417515 z" /><path + class="st1" + d="m 38.997085,23.932672 c 0,8.230037 -6.605687,14.835726 -14.835725,14.835726 -8.230037,0 -14.8357248,-6.605689 -14.8357248,-14.835726 0,-8.230038 6.6056878,-14.8357262 14.8357248,-14.8357262 8.121748,0 14.835725,6.6056882 14.835725,14.8357262 z" + id="path2590" + style="stroke-width:1.87256;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:original-d="m 38.997085,23.932672 c 0,8.230037 -6.605687,14.835726 -14.835725,14.835726 -8.230037,0 -14.8357248,-6.605689 -14.8357248,-14.835726 0,-8.230038 6.6056878,-14.8357262 14.8357248,-14.8357262 8.121748,0 14.835725,6.6056882 14.835725,14.8357262 z" /></g> + + + + + +<text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:18.6667px;line-height:1.25;font-family:Calibri;-inkscape-font-specification:'Calibri Bold'" + x="14.594995" + y="29.897146" + id="text2688"><tspan + sodipodi:role="line" + id="tspan2686" + x="14.594995" + y="29.897146">30</tspan></text><g + id="g2674" + inkscape:label="larrow" + transform="translate(-0.94356603,-0.07462151)"><line + class="st2" + x1="7.8782554" + y1="24.262081" + x2="14.726001" + y2="24.237926" + id="line2594" + style="stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st3" + points="10.2,20.9 7.5,24.5 10.2,28.1 " + id="polyline2596" + transform="matrix(1.3546522,0,0,1.2105618,-2.4320948,-5.5707793)" + style="stroke:#cc0000;stroke-width:2.34268;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + id="g2679" + inkscape:label="rarrow" + transform="translate(1.5967442,-0.1432525)"><polyline + class="st3" + points="37.4,27.7 40.4,24.2 37.4,20.9 " + id="polyline2598" + transform="matrix(1.3089049,0,0,1.3063324,-12.571103,-7.6491877)" + style="stroke:#cc0000;stroke-width:2.29425;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><line + class="st2" + x1="32.984512" + y1="23.985939" + x2="39.342487" + y2="23.961742" + id="line2594-8" + style="fill:none;stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/connect.svg b/app/bin/bitmaps/SVG/connect.svg new file mode 100644 index 0000000..91578a6 --- /dev/null +++ b/app/bin/bitmaps/SVG/connect.svg @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="connect.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata39"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs37" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1436" + inkscape:window-height="950" + id="namedview35" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#5494FF;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#003794;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FB0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FB0000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FB0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="4.3307743" + y1="9.274683" + x2="4.3307743" + y2="23.698782" + id="line4" /> +<line + class="st0" + x1="10.887182" + y1="9.274683" + x2="10.887182" + y2="23.698782" + id="line6" /> +<line + class="st0" + x1="17.44359" + y1="9.274683" + x2="17.44359" + y2="23.698782" + id="line8" /> +<line + class="st0" + x1="30.556406" + y1="9.274683" + x2="30.556406" + y2="23.698782" + id="line10" /> +<line + class="st0" + x1="37.112816" + y1="9.274683" + x2="37.112816" + y2="23.698782" + id="line12" /> +<line + class="st0" + x1="43.669224" + y1="9.274683" + x2="43.669224" + y2="23.698782" + id="line14" /> +<line + class="st1" + x1="27.249117" + y1="12.130193" + x2="46.29179" + y2="12.130193" + id="line16" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="1.7082114" + y1="12.130193" + x2="20.750879" + y2="12.130193" + id="line18" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="27.249117" + y1="20.76922" + x2="46.29179" + y2="20.76922" + id="line20" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="1.7082114" + y1="20.76922" + x2="20.750879" + y2="20.76922" + id="line22" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="25.311279" + y1="31.447706" + x2="46.29179" + y2="31.447706" + id="line24" + style="stroke:#cc0000;stroke-width:3.27821;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st3" + d="M 26.229179,29.861805" + id="path26" + style="stroke-width:1.31128" /> +<polyline + class="st4" + points="28.5,33.3 24.2,29 28.5,24.8 " + id="polyline28" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3112816,0,0,1.3112816,-6.1594786,-6.5794627)" /> +<line + class="st2" + x1="21.503935" + y1="31.447706" + x2="1.8347114" + y2="31.447706" + id="line30" + style="stroke:#cc0000;stroke-width:3.27821;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st4" + points="18.3,33.3 21.8,29 18.3,24.8 " + id="polyline32" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3112816,0,0,1.3112816,-7.3442601,-6.5794627)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/control.svg b/app/bin/bitmaps/SVG/control.svg new file mode 100644 index 0000000..051e57f --- /dev/null +++ b/app/bin/bitmaps/SVG/control.svg @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg31" + sodipodi:docname="control.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata35"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1322" + inkscape:window-height="814" + id="namedview33" + showgrid="false" + inkscape:zoom="6.6431949" + inkscape:cx="31.987621" + inkscape:cy="32.062886" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg31" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath4350"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(2.0501569,0,0,-2.0501569,-18.313258,76.783813)" + id="g29"><g + transform="translate(11.888,33.208)" + id="g9"><path + d="M -1.406431,2.5974208 26.856335,-25.32524" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path7" + style="stroke-width:2.00867;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="translate(11.425,9.4795)" + id="g13"><path + d="M -1.0910131,-1.3970219 27.226401,26.266849" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path11" + style="stroke-width:2.00867;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + clip-path="url(#clipPath4350)" + id="g27"><path + d="m 31.918,21.701 c 0,4.148 -3.363,7.511 -7.512,7.511 -4.148,0 -7.511,-3.363 -7.511,-7.511 0,-4.148 3.363,-7.512 7.511,-7.512 4.149,0 7.512,3.364 7.512,7.512 z" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path15" + style="stroke-width:2.29562;stroke-miterlimit:10;stroke-dasharray:none" + inkscape:label="circle" /><path + d="m 19.343502,27.02497 c 0,0 5.776086,4.650897 10.170815,-0.415086 4.573168,-5.272793 -0.02944,-10.123552 -0.02944,-10.123552 z" + fill="#f40f0f" + id="path19" + style="stroke-width:0.993037" + inkscape:label="red" /><path + d="m 29.65346,16.520082 c 0,0 -5.706152,-4.856377 -10.361581,0.407837 -4.65536,5.265211 0.108718,9.878092 0.108718,9.878092" + fill="#1cf211" + id="path23" + inkscape:label="green" /><path + style="fill:none;stroke:#000000;stroke-width:0.777716;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 19.343502,27.02497 29.65346,16.520082" + id="path860" + sodipodi:nodetypes="cc" + inkscape:label="divide" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/convert-from.svg b/app/bin/bitmaps/SVG/convert-from.svg new file mode 100644 index 0000000..259abd8 --- /dev/null +++ b/app/bin/bitmaps/SVG/convert-from.svg @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg5557" + sodipodi:docname="convert-from.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata5561"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1623" + inkscape:window-height="905" + id="namedview5559" + showgrid="false" + inkscape:zoom="9.3956422" + inkscape:cx="32" + inkscape:cy="35.011765" + inkscape:window-x="210" + inkscape:window-y="45" + inkscape:window-maximized="0" + inkscape:current-layer="arrow" + inkscape:document-rotation="0" /><defs + id="defs5523"><clipPath + id="clipPath3916"><path + d="m0 48h48v-48h-48z" + id="path5520" /></clipPath></defs><g + id="arrow" + transform="matrix(2.0520076,0,0,-2.195505,-30.0162,95.07383)"><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,34.6674)" + id="g4851"><path + d="M 0,0 V 6" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4849" + style="stroke:#c4082d;stroke-width:1.23675;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,26.6676)" + id="g4855" + style="stroke-width:1.06008;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 -3.352,-2.71" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4853" + style="stroke:#c4082d;stroke-width:1.23675;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,26.6676)" + id="g4859" + style="stroke-width:1.06008;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 2.889,-2.479" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4857" + style="stroke:#c4082d;stroke-width:1.23675;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></g><g + id="f" + transform="matrix(1.4137631,0,0,1.3410122,-11.127876,-9.7695704)" + style="stroke-width:1.00007;stroke-miterlimit:4;stroke-dasharray:none"><g + transform="matrix(1.3333,0,0,-1.3333,35.654587,38.167384)" + id="g4839" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 -7.911,0.006" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4837" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.3333,0,0,-1.3333,25.99935,38.6673)" + id="g4843" + style="stroke-width:1.36178154;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 V -10" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4841" + style="stroke-width:1.36178154;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.3333,0,0,-1.3333,26.590717,44.286256)" + id="g4847" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 H 5" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4845" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none" /></g></g><g + transform="matrix(1.799285,0,0,-2.0116395,10.651964,14.444271)" + id="cornu" + style="stroke-width:1.31406;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 C 1.185,-0.401 2.471,0.235 2.872,1.42 3.373,2.901 2.578,4.508 1.097,5.009 -0.755,5.636 -2.764,4.643 -3.39,2.791 c -0.783,-2.315 0.459,-4.826 2.773,-5.609 1.645,-0.556 4.729,0.566 4.729,0.566 0,0 6.054,3.132 8.366,4.21 2.311,1.079 7.842,2.739 7.842,2.739 0,0 2.679,0.676 4.067,0.207 2.314,-0.782 3.555,-3.294 2.773,-5.609 -0.627,-1.852 -2.636,-2.845 -4.487,-2.218 -1.482,0.501 -2.277,2.107 -1.775,3.589 0.401,1.185 1.686,1.821 2.872,1.42" + fill="none" + stroke="#000202" + stroke-linecap="round" + stroke-miterlimit="10" + id="path4833" + style="stroke-width:1.31406;stroke-miterlimit:4;stroke-dasharray:none" /></g></svg> diff --git a/app/bin/bitmaps/SVG/convert-to.svg b/app/bin/bitmaps/SVG/convert-to.svg new file mode 100644 index 0000000..5876444 --- /dev/null +++ b/app/bin/bitmaps/SVG/convert-to.svg @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg4865" + sodipodi:docname="convert-to.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><g + id="g5467" + transform="matrix(1.4137631,0,0,1.3410122,-10.478931,-46.220575)" + style="stroke-width:1.00007;stroke-miterlimit:4;stroke-dasharray:none"><g + transform="matrix(1.3333,0,0,-1.3333,35.654587,38.167384)" + id="g4839" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 -7.911,0.006" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4837" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.3333,0,0,-1.3333,25.99935,38.6673)" + id="g4843" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 V -10" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4841" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.3333,0,0,-1.3333,26.590717,44.286256)" + id="g4847" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 H 5" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path4845" + style="stroke-width:1.36178;stroke-miterlimit:4;stroke-dasharray:none" /></g></g><metadata + id="metadata4869"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1669" + inkscape:window-height="967" + id="namedview4867" + showgrid="false" + inkscape:zoom="9.3956422" + inkscape:cx="35.831564" + inkscape:cy="27.742707" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g4855" + inkscape:document-rotation="0" /><defs + id="defs4831"><clipPath + id="clipPath3691"><path + d="m0 48h48v-48h-48z" + id="path4828" /></clipPath></defs><g + transform="matrix(1.799285,0,0,-2.0116395,10.947264,53.336766)" + id="g4835"><path + d="m -0.35491538,-0.05290825 c 1.185,-0.401 2.47099998,0.235 2.87199998,1.42000005 0.501,1.481 -0.294,3.088 -1.77499998,3.589 -1.85200002,0.627 -3.86100002,-0.366 -4.48700002,-2.218 -0.783,-2.31500005 0.459,-4.826 2.77300002,-5.609 1.645,-0.556 4.72899998,0.566 4.72899998,0.566 0,0 6.054,3.13199995 8.3659994,4.21 2.311,1.079 7.842,2.739 7.842,2.739 0,0 2.679,0.676 4.067,0.207 2.314,-0.782 3.555,-3.294 2.773,-5.60900005 -0.627,-1.85199995 -2.636,-2.84499995 -4.487,-2.21799995 -1.482,0.501 -2.277,2.10699995 -1.775,3.58899995 0.401,1.18500005 1.686,1.82100005 2.872,1.42000005" + fill="none" + stroke="#000202" + stroke-linecap="round" + stroke-miterlimit="10" + id="path4833" + style="stroke-width:1.31406;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + id="g5475" + transform="matrix(2.0520076,0,0,-2.195505,-29.734387,99.778597)"><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,34.6674)" + id="g4851"><path + d="M 0,0 V 6" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4849" + style="stroke:#c4082d;stroke-width:1.23675;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,26.6676)" + id="g4855"><path + d="M 0,0 -3.352,-2.71" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4853" + style="stroke:#c4082d;stroke-width:1.23675;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,30.307242,26.6676)" + id="g4859"><path + d="M 1.6008594e-7,0 2.8890002,-2.479" + fill="none" + stroke="#f7113e" + stroke-miterlimit="10" + id="path4857" + style="stroke:#c4082d;stroke-width:1.23675441;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/copy.svg b/app/bin/bitmaps/SVG/copy.svg new file mode 100644 index 0000000..a865437 --- /dev/null +++ b/app/bin/bitmaps/SVG/copy.svg @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="copy.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2.00172;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="49.334457" + height="45.780003" + x="2.1271074" + y="-48.169491" + transform="rotate(90)" /><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2.00172;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900-2" + width="49.334457" + height="45.780003" + x="12.440801" + y="-61.699257" + transform="rotate(90)" /><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="25.305762" + inkscape:cy="32.961287" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export" /></svg> diff --git a/app/bin/bitmaps/SVG/cornu.svg b/app/bin/bitmaps/SVG/cornu.svg new file mode 100644 index 0000000..be91077 --- /dev/null +++ b/app/bin/bitmaps/SVG/cornu.svg @@ -0,0 +1,275 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg6443" + sodipodi:docname="cornu.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1507" + inkscape:window-height="985" + id="namedview6445" + showgrid="false" + inkscape:zoom="10.785861" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg6443" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" /><metadata + id="metadata6308"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs6325"><clipPath + id="clipPath1912"><path + d="m0 48h48v-48h-48z" + id="path6310" /></clipPath><clipPath + id="clipPath1936"><path + d="m0 48h48v-48h-48z" + id="path6313" /></clipPath><clipPath + id="clipPath1964"><path + d="m0 48h48v-48h-48z" + id="path6316" /></clipPath><clipPath + id="clipPath1996"><path + d="m0 48h48v-48h-48z" + id="path6319" /></clipPath><clipPath + id="clipPath2020"><path + d="m0 48h48v-48h-48z" + id="path6322" /></clipPath></defs><g + transform="matrix(1.4051383,0.1207861,0.1207861,-1.4051383,52.653185,59.584292)" + id="g6329" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M -0.53043187,-0.32477071 -4.1384319,7.4052293" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6327" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + clip-path="url(#clipPath1912)" + id="g6335" + transform="matrix(1.3333,0,0,-1.3333,0,64)" + style="stroke:#da8b0d;stroke-opacity:1"><g + transform="translate(23.421,3.4521)" + id="g6333" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4103202,0,0,-1.4103202,26.835818,59.959223)" + id="g6339" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M 0.43863234,-0.15445476 2.8143677,7.9924548" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6337" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,20.002167,54.772364)" + id="g6343" + style="stroke:#da8b0d;stroke-opacity:1" /><g + transform="matrix(1.3961819,-0.199196,-0.199196,-1.3961819,18.606956,56.393024)" + id="g6347" + style="stroke:#da8b0d;stroke-opacity:1" + inkscape:transform-center-x="-0.58841826" + inkscape:transform-center-y="-0.19613932"><path + d="M 0,0 5.955,6.266" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6345" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + clip-path="url(#clipPath1936)" + id="g6361" + transform="matrix(1.4103202,0,0,-1.4103202,-2.756989,65.624888)" + style="stroke:#da8b0d;stroke-opacity:1"><g + transform="translate(37.121,3.6514)" + id="g6351" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M -4.1461428,-0.66416076 -5.0396534,7.7465653" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6349" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="translate(32.61,3.1055)" + id="g6355" + style="stroke:#da8b0d;stroke-opacity:1" /><g + transform="translate(28.022,2.8711)" + id="g6359" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="m -0.97125371,0 0.79568866,8.345" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6357" + style="stroke:#da8b0d;stroke-opacity:1" /></g></g><g + transform="matrix(1.4075989,-0.08756851,-0.08756851,-1.4075989,11.637587,51.494181)" + id="g6365" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 7.415,5.462" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6363" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4081934,-0.07742166,-0.07742166,-1.4081934,6.2032358,44.084047)" + id="g6369" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 8.257,3.587" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6367" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4103202,0,0,-1.4103202,3.0355272,35.271384)" + id="g6373" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 8.792,1.248" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6371" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4039347,-0.13405287,-0.13405287,-1.4039347,2.3960496,26.427677)" + id="g6381" + style="stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 8.792,-1.482" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6379" + style="stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4103202,0,0,-1.4103202,38.869264,3.0702429)" + id="g6385" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 -2.576,-8.066" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6383" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.3739992,0.02466772,0.02412428,-1.3437294,11.230952,9.1341216)" + id="g6391" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 6.117,-6.317" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6389" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4726035,0.09971061,0.09767207,-1.4424968,46.983641,7.6869091)" + id="g6395" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 -4.663,-6.551" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6393" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g><g + clip-path="url(#clipPath1996)" + id="g6401" + transform="matrix(1.4103202,0,-0.09291026,-1.4103202,-0.3046177,66.311376)" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><g + transform="translate(23.871,45.375)" + id="g6399" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 -0.165,-8.405" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6397" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g></g><g + transform="matrix(1.4017562,0.15518603,0.15518603,-1.4017562,19.744526,4.1692554)" + id="g6405" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" + inkscape:transform-center-x="-0.098070038" + inkscape:transform-center-y="0.29420937"><path + d="M 0,0 4.052,-7.409" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6403" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.4055377,-0.11604642,-0.11604642,-1.4055377,5.3000909,16.561813)" + id="g6409" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1"><path + d="M 0,0 7.263,-4.523" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6407" + style="fill:#000000;fill-opacity:1;stroke:#da8b0d;stroke-opacity:1" /></g><g + transform="matrix(1.3333,0,0,-1.3333,55.595943,54.600502)" + id="g6417" /><g + id="g7089" + transform="matrix(1.0440666,0,0,1.0440666,-1.9914136,-1.4628919)" + style="stroke-width:2.02624;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M -0.42269799,0.07044967 C -13.122597,-5.531302 -28.031,-1.495 -34.561,9.957 c -3.953906,9.303899 -0.254255,21.297396 8.737,25.215 8.531148,2.893154 16.037859,1.590047 21.061255,-5.246805" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path6415" + transform="matrix(1.3333,0,0,-1.3333,55.595943,54.600502)" + style="stroke-width:1.51972;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cccc" /><g + transform="matrix(1.3333,0,0,-1.3333,52.142696,47.797738)" + id="g6421" + style="stroke-width:1.51972;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0.40159691,-0.79662787 C -9.968697,-5.7615966 -22.124981,-2.6274606 -26.983513,6.223499 c -3.88599,7.083272 -2.647838,15.389633 4.828833,19.071098 5.980293,2.944754 13.8382692,1.482331 16.8805774,-3.902071" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path6419" + style="stroke-width:1.51972;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cccc" /></g></g><g + transform="matrix(1.2168566,0,0,-1.2168566,52.523609,17.239565)" + id="g6425" + style="stroke-width:2.12718;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 0,0 c 0,-1.831 -1.455,-3.315 -3.248,-3.315 -1.796,0 -3.251,1.484 -3.251,3.315 0,1.831 1.455,3.314 3.251,3.314 C -1.455,3.314 0,1.831 0,0 Z" + fill="none" + stroke="#ff0000" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path6423" + style="stroke:#cc0000;stroke-width:2.12718;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.2061086,0,0,-1.2061086,60.422316,51.690421)" + id="g6429" + style="stroke-width:2.12718;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 0,0 c 0,-1.83 -1.454,-3.314 -3.249,-3.314 -1.795,0 -3.25,1.484 -3.25,3.314 0,1.83 1.455,3.314 3.25,3.314 C -1.454,3.314 0,1.83 0,0 Z" + fill="none" + stroke="#ff0000" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path6427" + style="stroke:#cc0000;stroke-width:2.12718;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/curved-chord.svg b/app/bin/bitmaps/SVG/curved-chord.svg new file mode 100644 index 0000000..5db0f01 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-chord.svg @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-chord.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata7187"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs7185" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1490" + inkscape:window-height="975" + id="namedview7183" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.9991" + inkscape:cy="24.717875" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style7140"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + + + + + +<g + id="g1493" + transform="matrix(1.1059459,0,0,1.1059459,-1.3574074,-1.8908062)"><line + class="st0" + x1="40.118973" + y1="1.8465961" + x2="41.373394" + y2="11.88195" + id="line7142" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="1.8591815" + y1="42.364338" + x2="13.023514" + y2="42.866108" + id="line7144" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="25.19138" + y1="6.8642731" + x2="31.087151" + y2="16.021534" + id="line7146" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="5.2461133" + y1="27.562191" + x2="16.159559" + y2="31.576334" + id="line7148" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="32.341572" + y1="3.4773419" + x2="36.355713" + y2="13.136369" + id="line7150" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="18.417515" + y1="11.003859" + x2="26.069473" + y2="19.408464" + id="line7152" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="8.8839293" + y1="21.164652" + x2="19.044725" + y2="26.558657" + id="line7154" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="2.862716" + y1="34.837818" + x2="14.027048" + y2="37.095776" + id="line7156" + style="stroke:#db8b0b;stroke-opacity:1" /><line + class="st0" + x1="13.458588" + y1="15.277812" + x2="21.817545" + y2="23.181286" + id="line2709" + style="stroke:#db8b0b;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g> +<g + id="g1497" + transform="matrix(1.1059459,0,0,1.1059459,-1.3574074,-1.8908062)"><path + class="st1" + d="M 4.2120581,44.280211 C 4.2120581,21.700663 24.56417,4.0360619 43.380459,4.0360619" + id="path7158" + style="stroke-width:2.2605084;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /><path + class="st1" + d="m 10.476705,44.352425 c 0,-16.432893 17.276742,-34.933535 32.831541,-34.933535" + id="path7160" + style="stroke-width:2.2605084;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /></g> + + + + + + + + + +<g + id="g1799" + transform="translate(0.23959168,0.39931946)"><line + class="st3" + x1="23.655668" + y1="25.22048" + x2="39.666615" + y2="39.675983" + id="line7174" + style="stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st5" + points="18.4,25.3 18.2,20.3 22.8,20.4 " + id="polyline7178" + style="stroke:#cc0000;stroke-width:1.59116;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.8962586,0,0,1.8746343,-10.856238,-12.834596)" /><line + class="st3" + x1="45.968658" + y1="33.376415" + x2="33.764027" + y2="45.851318" + id="line7180" + style="stroke:#cc0000;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-end.svg b/app/bin/bitmaps/SVG/curved-end.svg new file mode 100644 index 0000000..4c76cb4 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-end.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 48 48" + xml:space="preserve" + id="svg7888" + sodipodi:docname="curved-end.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + width="48" + height="48" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1395" + inkscape:window-height="914" + id="namedview7890" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="34.462955" + inkscape:cy="28.230293" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg7888" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><metadata + id="metadata7821"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs7826"><clipPath + id="clipPath1727"><path + d="M 0,48 H 48 V 0 H 0 Z" + id="path7823" /></clipPath></defs><g + id="g8500" + style="stroke:#d98b0d;stroke-opacity:1" + transform="matrix(0.8692292,0,0,0.8692292,-6.7606978,-1.3620069)" + inkscape:label="ties"><path + d="m 21.586127,24.580985 9.447217,9.122165" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7828" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="M 8.6820496,53.493729 21.126063,54.043783" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7832" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 34.24023,15.374714 5.791335,11.37158" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7836" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 12.133163,36.783347 12.305351,5.82105" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7840" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 41.608402,12.254396 4.134977,12.213093" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.76092" + id="path7844" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 27.582419,19.225126 7.784728,10.504797" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7848" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 16.448922,30.578169 10.642725,7.318346" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7852" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="M 9.4353641,44.787147 22.080108,47.785739" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2.6666" + id="path7856" + style="stroke:#d98b0d;stroke-opacity:1" + sodipodi:nodetypes="cc" /></g><g + id="g1503" + inkscape:label="rails" + transform="matrix(1.2781936,0,0,-1.2781936,-2.2194528,64.491016)" + style="stroke-width:1.86098;stroke-miterlimit:10;stroke-dasharray:none"><path + d="m 4.0384022,13.324335 c 0,16.356939 11.8763738,25.429747 23.5178358,28.703908" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path7864" + style="stroke-width:1.59502;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /><path + d="M 8.9184235,13.479289 C 8.5091535,25.096957 18.605799,34.573361 28.746871,37.156338" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path7868" + style="stroke-width:1.59502;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /></g><g + id="g1511" + inkscape:label="arrow" + transform="matrix(1.1307026,0,0,-1.1307026,-5.699386,54.663387)"><path + d="m 38.000997,46.245811 4.610186,-16.6826" + fill="none" + stroke="#ff0000" + stroke-miterlimit="10" + stroke-width="2" + id="path7872" + style="stroke:#cc0000;stroke-width:2.34037;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /><path + d="m 34.988266,41.74949 3.012731,4.496321 4.770156,-2.523132" + fill="none" + stroke="#ff0000" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path7876" + style="stroke:#cc0000;stroke-width:2.34037;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="ccc" /><path + d="m 45.584906,34.274145 -2.973723,-4.710934 -5.024264,2.58388" + fill="none" + stroke="#ff0000" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path7880" + style="stroke:#cc0000;stroke-width:2.34037;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="ccc" /></g></svg> diff --git a/app/bin/bitmaps/SVG/curved-line-chord.svg b/app/bin/bitmaps/SVG/curved-line-chord.svg new file mode 100644 index 0000000..b1cc041 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-line-chord.svg @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-line-chord.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2200"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2198" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1351" + inkscape:window-height="907" + id="namedview2196" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2171"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="M 3.5220297,43.111597 C 3.5220297,21.615075 23.58545,4.1790071 41.499219,4.1790071" + id="path2173" + style="stroke-width:2.57;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st1" + d="M 38.315236,-0.27323563" + id="path2175" + style="stroke-width:1.16155" /> +<path + class="st1" + d="M 43.095812,2.5733838" + id="path2177" + style="stroke-width:1.16155" /> +<path + class="st1" + d="M 38.315236,-0.27323563" + id="path2179" + style="stroke-width:1.16155" /> +<path + class="st1" + d="M 35.894182,15.118161" + id="path2181" + style="stroke-width:1.16155" /> +<path + class="st1" + d="M 39.611153,16.744336" + id="path2183" + style="stroke-width:1.16155" /> +<path + class="st1" + d="M 43.095812,14.88585" + id="path2185" + style="stroke-width:1.16155" /> +<line + class="st2" + x1="17.087498" + y1="19.028881" + x2="38.513435" + y2="38.767605" + id="line2187" + style="stroke:#cc0000;stroke-width:2.36307;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st3" + d="M 39.611153,25.455986" + id="path2189" + style="stroke-width:1.16155" /> +<polyline + class="st4" + points="18.4,25.3 18.2,20.3 22.8,20.4 " + id="polyline2191" + style="stroke:#cc0000;stroke-width:1.34728;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.855595,0,0,1.855595,-16.684331,-18.639697)" /> +<line + class="st2" + x1="44.85672" + y1="30.743393" + x2="31.731171" + y2="44.56588" + id="line2193" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-line-end.svg b/app/bin/bitmaps/SVG/curved-line-end.svg new file mode 100644 index 0000000..365e1bd --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-line-end.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-line-end.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2891"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2889" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1378" + inkscape:window-height="904" + id="namedview2887" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2828"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FC1500;stroke-width:2;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FC1500;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + + + + + + + + + + + + + +<path + class="st1" + d="m 4.8384113,46.012013 c 0,-23.034633 15.2509007,-30.767254 31.7708447,-33.565002" + id="path2862" + style="stroke-width:2.57544;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /> + + + + + + + + + + +<g + id="g1523" + inkscape:label="arrow" + transform="matrix(0.99329824,-0.11557947,0.10755047,0.99423249,-1.8346051,4.0269541)" + inkscape:transform-center-x="-0.51362946" + inkscape:transform-center-y="0.29967713"><line + class="st4" + x1="39.305443" + y1="22.109104" + x2="38.916668" + y2="4.0958133" + id="line2874" + style="stroke:#cc1400;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st5" + points="35.6,7.8 38.5,5.4 41.4,7.8 " + id="polyline2882" + style="stroke:#cc1400;stroke-width:1.62975;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.5339802,0,0,1.5339802,-20.141572,-4.1876794)" /><polyline + class="st5" + points="41.4,17 38.8,19.1 35.6,17 " + id="polyline2884" + style="stroke:#cc1400;stroke-width:1.62975;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.5339802,0,0,1.5339802,-20.21299,-7.1899163)" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-line-middle.svg b/app/bin/bitmaps/SVG/curved-line-middle.svg new file mode 100644 index 0000000..237b453 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-line-middle.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-line-middle.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata3510"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs3508" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1293" + inkscape:window-height="809" + id="namedview3506" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style3483"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 4.2736318,45.488353 c 0,-23.039286 21.5033322,-41.7267057 40.7027362,-41.7267057" + id="path3485" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st1" + d="M 38.28716,5.3096567" + id="path3487" /> +<path + class="st1" + d="M 41.58716,7.0096567" + id="path3489" /> +<path + class="st1" + d="M 38.28716,5.3096567" + id="path3491" /> +<path + class="st1" + d="M 35.38716,17.809657" + id="path3493" /> +<path + class="st1" + d="M 38.58716,19.209657" + id="path3495" /> +<path + class="st1" + d="M 41.58716,17.609657" + id="path3497" /> +<line + class="st2" + x1="17.988567" + y1="20.386417" + x2="42.018471" + y2="42.110428" + id="line3499" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st3" + d="M 38.58716,26.709657" + id="path3501" /> +<polyline + class="st4" + points="18,26 18,20.3 23.4,20.7 " + id="polyline3503" + style="stroke:#cc0000;stroke-width:1.99118;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.2541677,-0.05864525,0.05864525,1.2541677,-5.956031,-4.2156616)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-line-tangent.svg b/app/bin/bitmaps/SVG/curved-line-tangent.svg new file mode 100644 index 0000000..dbac2e2 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-line-tangent.svg @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-line-tangent.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata4209"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs4207" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1231" + inkscape:window-height="814" + id="namedview4205" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style4142"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st4{fill:#BF8700;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st6{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="M 12.078246,44.927861" + id="path4144" /> +<path + class="st0" + d="M 1.0635811,44.409525" + id="path4146" /> +<path + class="st0" + d="M 30.738383,17.196825" + id="path4148" /> +<path + class="st0" + d="M 25.555012,7.2188348" + id="path4150" /> +<path + class="st0" + d="M 14.799516,33.265276" + id="path4152" /> +<path + class="st0" + d="M 4.8215252,28.341074" + id="path4154" /> +<path + class="st0" + d="M 25.166258,20.306848" + id="path4156" /> +<path + class="st0" + d="M 18.168707,11.495116" + id="path4158" /> +<path + class="st0" + d="M 18.168707,28.081905" + id="path4160" /> +<path + class="st0" + d="M 8.9682223,21.991444" + id="path4162" /> +<path + class="st0" + d="M 13.114921,38.966985" + id="path4164" /> +<path + class="st0" + d="M 1.5819182,36.634468" + id="path4166" /> +<path + class="st0" + d="M 41.364295,12.920544" + id="path4168" /> +<path + class="st0" + d="M 40.068452,2.5538006" + id="path4170" /> +<path + class="st0" + d="M 35.662586,14.34597" + id="path4172" /> +<path + class="st0" + d="M 32.682147,4.2383963" + id="path4174" /> +<path + class="st0" + d="M 21.667483,24.194376" + id="path4176" /> +<path + class="st0" + d="M 12.726167,16.419319" + id="path4178" /> +<path + class="st1" + d="m 3.1707748,45.065034 c 0,-22.568039 22.1983802,-40.8732267 42.0183602,-40.8732267" + id="path4180" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st2" + d="M 43.437643,11.495116" + id="path4182" + style="stroke-width:1.29584" /> +<path + class="st2" + d="M 9.7457276,46.612458" + id="path4184" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 43.913924,-1.2068227" + id="path4186" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 46.418082,1.3875421" + id="path4188" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 43.913924,-1.2068227" + id="path4190" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 38.383856,15.382645" + id="path4192" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 42.530553,17.196825" + id="path4194" + style="stroke-width:1.29584" /> +<path + class="st3" + d="M 46.418082,15.123476" + id="path4196" + style="stroke-width:1.29584" /> +<line + class="st4" + x1="42.983685" + y1="43.366608" + x2="16.089582" + y2="18.271143" + id="line4198" + style="stroke:#cc0000;stroke-width:2.47961;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st5" + d="M 42.530553,26.915646" + id="path4200" + style="stroke-width:1.29584" /> +<polyline + class="st6" + points="38,34 38,39 33,39 " + id="polyline4202" + style="stroke:#cc0000;stroke-width:1.43697;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.7397675,0,0,1.7397675,-23.134377,-24.49174)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-middle.svg b/app/bin/bitmaps/SVG/curved-middle.svg new file mode 100644 index 0000000..011b402 --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-middle.svg @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-middle.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata8594"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs8592"><inkscape:path-effect + effect="powerclip" + id="path-effect895" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect891" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect887" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect883" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1432" + inkscape:window-height="931" + id="namedview8590" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.9991" + inkscape:cy="23.9991" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style8549"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + + + + + +<g + id="g2961" + transform="matrix(1.0375641,0,0,1.0375641,-0.76566984,-0.77459533)" + clip-path="none"><line + class="st0" + x1="1.2915986" + y1="43.841686" + x2="13.326716" + y2="44.362141" + id="line8551" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="26.443645" + y1="7.0198193" + x2="32.799274" + y2="16.51804" + id="line8553" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="4.9427028" + y1="28.4884" + x2="16.707367" + y2="32.652" + id="line8555" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="34.151535" + y1="3.506778" + x2="38.478771" + y2="13.525451" + id="line8557" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="19.141439" + y1="11.313536" + x2="27.39023" + y2="20.03108" + id="line8559" + style="stroke:#d98a0d;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="8.8642578" + y1="21.852655" + x2="19.81757" + y2="27.4475" + id="line8561" + style="stroke:#d98a0d;stroke-opacity:1" + clip-path="none" /><line + class="st0" + x1="2.3734066" + y1="36.034924" + x2="14.408527" + y2="38.376953" + id="line8563" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="42.535553" + y1="1.8153136" + x2="43.887806" + y2="12.224323" + id="line8565" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="14.26063" + y1="15.951141" + x2="22.961445" + y2="23.591101" + id="line2092" + style="stroke:#d98a0d;stroke-width:2.56562462;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + clip-path="none" /></g> +<g + id="g2946" + transform="matrix(1.0375641,0,0,1.0375641,-0.76566984,-0.77459533)" + clip-path="none"><path + class="st1" + d="m 4.0790933,46.133467 c 0,-23.42027 22.0049877,-41.5439928 42.1291687,-42.10304" + id="path8567" + style="stroke-width:1.92759175;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /><path + class="st1" + d="m 9.8063606,46.204656 c 0,-17.044752 19.4799254,-37.2195265 36.2479574,-37.2195265" + id="path8569" + style="stroke-width:1.92759175;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" + clip-path="none" /></g> + + + + + + + + +<g + id="g2950" + transform="matrix(0.85711663,0,0,0.85711663,6.9828261,7.7567279)"><line + class="st3" + x1="20.775936" + y1="20.909582" + x2="45.645229" + y2="44.291237" + id="line8583" + style="stroke:#cc0000;stroke-width:3.5001071;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st5" + points="18,26 18,20.3 23.4,20.7 " + id="polyline8587" + style="stroke:#cc0000;stroke-width:2.22328741;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.6049305,0,0,1.5442415,-8.1128129,-10.43852)" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/curved-tangent.svg b/app/bin/bitmaps/SVG/curved-tangent.svg new file mode 100644 index 0000000..e9aee6b --- /dev/null +++ b/app/bin/bitmaps/SVG/curved-tangent.svg @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="curved-tangent.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata9253"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs9251" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1417" + inkscape:window-height="972" + id="namedview9249" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style9206"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FC1500;stroke-miterlimit:10;} + .st3{fill:#BF8700;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FF0000;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="1.7949519" + y1="43.925362" + x2="13.456883" + y2="44.449497" + id="line9208" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="27.084311" + y1="6.3189082" + x2="32.32563" + y2="16.408443" + id="line9210" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="6.1190376" + y1="27.677277" + x2="16.208576" + y2="32.656528" + id="line9212" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="19.615433" + y1="10.642995" + x2="26.691212" + y2="19.553236" + id="line9214" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="10.312092" + y1="21.256664" + x2="19.615433" + y2="27.415213" + id="line9216" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="2.8432145" + y1="36.063385" + x2="14.505148" + y2="38.421978" + id="line9218" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="41.760006" + y1="1.6017218" + x2="43.070328" + y2="12.084357" + id="line9220" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="34.291126" + y1="3.3051503" + x2="37.304882" + y2="13.525721" + id="line9222" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="14.112048" + y1="15.622247" + x2="23.153322" + y2="23.484222" + id="line9224" + style="stroke:#d98b0d;stroke-opacity:1" /> +<path + class="st1" + d="m 3.4983796,46.152922 c 0,-23.58593 22.0135354,-42.716739 41.6684764,-42.716739" + id="path9226" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st1" + d="m 11.098291,46.152922 c 0,-17.165315 17.820479,-35.509928 34.068565,-35.509928" + id="path9228" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st2" + d="M 43.195559,-1.4682949" + id="path9230" + style="stroke-width:1.30331" /> +<path + class="st2" + d="M 47.496477,0.74732904" + id="path9232" + style="stroke-width:1.30331" /> +<path + class="st2" + d="M 43.195559,-1.4682949" + id="path9234" + style="stroke-width:1.30331" /> +<path + class="st2" + d="M 40.056571,14.573983" + id="path9236" + style="stroke-width:1.31033" /> +<path + class="st2" + d="M 44.249625,16.408445" + id="path9238" + style="stroke-width:1.31033" /> +<path + class="st2" + d="M 48.180614,14.311918" + id="path9240" + style="stroke-width:1.31033" /> +<rect + style="opacity:1;fill:#ebebeb;stroke:#ffffff;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;fill-opacity:1" + id="rect2707" + width="6.7369518" + height="5.6268826" + x="26.763359" + y="-0.49409166" + transform="matrix(0.75078063,0.66055162,-0.68047575,0.7327706,0,0)" /><line + class="st3" + x1="44.249977" + y1="43.668476" + x2="19.586525" + y2="19.91222" + id="line9242" + style="stroke:#cc0000;stroke-width:3.18605;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st4" + d="M 44.249625,26.235915" + id="path9244" + style="stroke-width:1.31033" /> +<polyline + class="st5" + points="40,36 40,41 35,41 " + id="polyline9246" + style="stroke:#cc0000;stroke-width:2.20162;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.436209,0,0,1.4581584,-13.19838,-16.116015)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/cut.svg b/app/bin/bitmaps/SVG/cut.svg new file mode 100644 index 0000000..8b8d9f0 --- /dev/null +++ b/app/bin/bitmaps/SVG/cut.svg @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="cut.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="25.305762" + inkscape:cy="33.492921" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export" /><path + style="fill:none;stroke:#404040;stroke-width:3.64621;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 24.366275,17.817103 c -0.216559,-2.583731 -2.637624,-5.586626 -7.305886,-6.813095 -3.724698,0.679851 -10.2494995,4.973226 -8.4980529,6.619454 l 7.7248489,5.748191 c 2.883549,0.704931 5.350618,-2.382586 8.07909,-5.55455 z" + id="path1208" + sodipodi:nodetypes="ccccc" /><path + style="fill:none;stroke:#404040;stroke-width:3.6332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 5.4748051,36.029254 c -2.7151332,0.433054 -0.1962835,7.037401 3.9655015,9.447893 3.7582774,0.32979 7.4204664,0.187587 9.8059744,-2.735214 -0.349439,-2.94556 -0.1757,-6.819736 -3.306541,-7.756504 z" + id="path1208-1" + sodipodi:nodetypes="ccccc" /><path + style="fill:none;stroke:#404040;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 8.5623361,17.623462 29.746591,34.057704 5.4748051,36.029254" + id="path1718" + sodipodi:nodetypes="ccc" /><path + style="fill:#404040;fill-opacity:1;stroke:#404040;stroke-width:1.15889;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 32.967253,35.68144 59.33674,33.709891 53.175645,30.629342 29.763484,32.600893 Z" + id="path3015" /><path + style="fill:#404040;fill-opacity:1;stroke:#404040;stroke-width:1.14488;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.637458,37.491514 55.088511,53.974054 48.31229,52.934405 30.168362,38.01363 Z" + id="path3015-0" + inkscape:transform-center-x="-0.043751259" + inkscape:transform-center-y="-0.14231423" + sodipodi:nodetypes="ccccc" /></svg> diff --git a/app/bin/bitmaps/SVG/delete.svg b/app/bin/bitmaps/SVG/delete.svg new file mode 100644 index 0000000..55d6471 --- /dev/null +++ b/app/bin/bitmaps/SVG/delete.svg @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="delete.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata31"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs29" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1438" + inkscape:window-height="878" + id="namedview27" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="22.56245" + inkscape:cy="24" + inkscape:window-x="3" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} +</style> + + + + + + +<g + id="ties" + inkscape:label="ties" + transform="matrix(1.3006641,0,0,1.3006641,-7.3756654,-4.111636)"><line + class="st0" + x1="9" + y1="16" + x2="9" + y2="27" + id="line4" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="14" + y1="16" + x2="14" + y2="27" + id="line6" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="19" + y1="16" + x2="19" + y2="27" + id="line8" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="24" + y1="16" + x2="24" + y2="27" + id="line10" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="29" + y1="16" + x2="29" + y2="27" + id="line12" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="34" + y1="16" + x2="34" + y2="27" + id="line14" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="39" + y1="16" + x2="39" + y2="27" + id="line16" + style="stroke:#d98a0d;stroke-opacity:1" /></g> + +<g + id="rail" + inkscape:label="rail" + transform="matrix(1.3006641,0,0,1.1040829,-7.3756654,0.10254712)" + style="stroke-width:1.47801;stroke-miterlimit:10;stroke-dasharray:none"><line + class="st1" + x1="7" + y1="17.5" + x2="41" + y2="17.5" + id="line18" + style="stroke-width:1.47801;stroke-miterlimit:10;stroke-dasharray:none" /><line + class="st1" + x1="7" + y1="25.5" + x2="41" + y2="25.5" + id="line20" + style="stroke-width:1.47801;stroke-miterlimit:10;stroke-dasharray:none" /></g> + +<g + id="x" + inkscape:label="x" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none" + transform="matrix(1.2833014,0,0,1.2251804,-6.9372327,-2.6670144)"><path + class="st2" + d="M 14.106487,7.2987516 C 26.983061,20.825658 26.983061,20.825658 15.277084,36.30356" + id="path22" + style="stroke:#cc0000;stroke-width:3.8281;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + class="st2" + d="m 34.006647,36.30356 c -12.096176,-14.047171 -12.096176,-14.047171 0,-29.0048084" + id="path24" + style="stroke:#cc0000;stroke-width:3.8281;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/describe.svg b/app/bin/bitmaps/SVG/describe.svg new file mode 100644 index 0000000..495a3b8 --- /dev/null +++ b/app/bin/bitmaps/SVG/describe.svg @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="describe.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata928"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs926" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1580" + inkscape:window-height="966" + id="namedview924" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="19.482353" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style893"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FB0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FB0000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FB0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FB0000;stroke-width:2;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;} +</style> + + + + + + +<g + id="ties" + inkscape:label="ties" + transform="matrix(1.3046527,0,0,1.3046527,-5.9214072,-2.9615326)"><line + class="st0" + x1="8" + y1="16" + x2="8" + y2="27" + id="line895" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="13" + y1="16" + x2="13" + y2="27" + id="line897" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="18" + y1="16" + x2="18" + y2="27" + id="line899" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="28" + y1="16" + x2="28" + y2="27" + id="line903" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="33" + y1="16" + x2="33" + y2="27" + id="line905" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="38" + y1="16" + x2="38" + y2="27" + id="line907" + style="stroke:#d98b0d;stroke-opacity:1" /></g> + +<g + id="rail" + inkscape:label="rail" + transform="matrix(1.3046527,0,0,1.1147635,-6.0070121,1.1958036)" + style="stroke-width:1.49671;stroke-miterlimit:10;stroke-dasharray:none"><line + class="st1" + x1="6" + y1="17.5" + x2="40" + y2="17.5" + id="line909" + style="stroke-width:1.49671;stroke-miterlimit:10;stroke-dasharray:none" /><line + class="st1" + x1="6" + y1="25.5" + x2="40" + y2="25.5" + id="line911" + style="stroke-width:1.49671;stroke-miterlimit:10;stroke-dasharray:none" /></g> + + + + +<g + id="question" + inkscape:label="question" + transform="matrix(1.8239805,0,0,1.6303501,-18.297728,-12.564437)"><path + class="st4" + d="M 18.825677,15.7 C 17.914059,11.7 27.6,11.1 27.6,15.3 c 0,3.9 -1.937188,5.6 -4.672042,5.7 v 7.5" + id="path919" + style="stroke:#cc0000;stroke-width:3.20245;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><rect + x="22.491764" + y="31.943529" + class="st5" + width="1" + height="1.1" + id="rect921" + style="stroke:#cc0000;stroke-opacity:1" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/description.svg b/app/bin/bitmaps/SVG/description.svg new file mode 100644 index 0000000..15f43e2 --- /dev/null +++ b/app/bin/bitmaps/SVG/description.svg @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="description.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata2191"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2189" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1578" + inkscape:window-height="889" + id="namedview2187" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="22.641414" + inkscape:cy="24.158828" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2160"> + .st0{fill:none;stroke:#07ABFB;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000CBF;stroke-miterlimit:10;} + .st2{font-family:'MyriadPro-Regular';} + .st3{font-size:12px;} + .st4{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st5{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="4.4900389" + y1="31.815163" + x2="4.4900389" + y2="46.122471" + id="line2162" /> +<line + class="st0" + x1="10.993358" + y1="31.815163" + x2="10.993358" + y2="46.122471" + id="line2164" /> +<line + class="st0" + x1="17.496681" + y1="31.815163" + x2="17.496681" + y2="46.122471" + id="line2166" /> +<line + class="st0" + x1="24" + y1="31.815163" + x2="24" + y2="46.122471" + id="line2168" /> +<line + class="st0" + x1="30.503323" + y1="31.815163" + x2="30.503323" + y2="46.122471" + id="line2170" /> +<line + class="st0" + x1="37.006641" + y1="31.815163" + x2="37.006641" + y2="46.122471" + id="line2172" /> +<line + class="st0" + x1="43.509964" + y1="31.815163" + x2="43.509964" + y2="46.122471" + id="line2174" /> +<line + class="st1" + x1="1.8887103" + y1="35.076363" + x2="46.11129" + y2="35.076363" + id="line2176" + style="stroke-width:2.4;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="1.8887103" + y1="42.861271" + x2="46.11129" + y2="42.861271" + id="line2178" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> + +<line + class="st4" + x1="24.15" + y1="30.152931" + x2="24.15" + y2="15.152927" + id="line2182" + style="stroke:#cc0e00;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st5" + points="27.9,19.7 24,16 19.8,19.7 " + id="polyline2184" + transform="translate(0.14999976,-0.84707096)" + style="stroke:#cc0e00;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.6667px;line-height:1.25;font-family:'Gill Sans MT';-inkscape-font-specification:'Gill Sans MT Bold'" + x="3.2639496" + y="12.011017" + id="text2756"><tspan + sodipodi:role="line" + id="tspan2754" + x="3.2639496" + y="12.011017">DESC</tspan></text></svg> diff --git a/app/bin/bitmaps/SVG/dimension.svg b/app/bin/bitmaps/SVG/dimension.svg new file mode 100644 index 0000000..7443b8a --- /dev/null +++ b/app/bin/bitmaps/SVG/dimension.svg @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="dimension.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1539"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1537" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1346" + inkscape:window-height="842" + id="namedview1535" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="24.695735" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style1492"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st3{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> +<path + class="st0" + d="M5.9,35.8" + id="path1494" /> +<path + class="st0" + d="M9.2,32.3" + id="path1496" /> +<path + class="st0" + d="M12.5,28.8" + id="path1498" /> +<path + class="st0" + d="M15.8,25.3" + id="path1500" /> +<path + class="st0" + d="M19.1,21.8" + id="path1502" /> +<path + class="st0" + d="M22.4,18.3" + id="path1504" /> +<path + class="st0" + d="M25.7,14.7" + id="path1506" /> +<path + class="st0" + d="M37.2,19.2" + id="path1508" /> +<path + class="st0" + d="M29,11.2" + id="path1510" /> +<path + class="st0" + d="M40.6,15.7" + id="path1512" /> +<path + class="st0" + d="M32.3,7.7" + id="path1514" /> +<path + class="st1" + d="M36.5,6.9" + id="path1516" /> +<path + class="st1" + d="M5.6,39.5" + id="path1518" /> +<path + class="st2" + d="M24.6,23.8" + id="path1520" /> +<path + class="st2" + d="M6,43.1" + id="path1522" /> +<line + class="st3" + x1="32.164993" + y1="15.832255" + x2="44.44154" + y2="3.2073443" + id="line1524" + style="stroke:#cc0e00;stroke-width:3.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st4" + points="42.6,12.6 42.1,5.8 35.5,5.8 " + id="polyline1526" + style="stroke:#cc0e00;stroke-width:2.94445055;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.1864868,0,0,1.1908708,-5.5442267,-3.6659913)" /> +<line + class="st3" + x1="15.726236" + y1="32.24678" + x2="4.0029783" + y2="44.370842" + id="line1528" + style="stroke:#cc0e00;stroke-width:3.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st4" + points="8,34 8.5,40.9 15.1,40.9 " + id="polyline1530" + style="stroke:#cc0e00;stroke-width:2.68761367;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3022705,0,0,1.3022705,-6.8028116,-9.1468245)" /> +<text + class="st5 st6" + id="text1532" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:17.3333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'" + x="12.357784" + y="30.296465">36</text> +</svg> diff --git a/app/bin/bitmaps/SVG/doc-export-bmap.svg b/app/bin/bitmaps/SVG/doc-export-bmap.svg new file mode 100644 index 0000000..90a88b0 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-export-bmap.svg @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-export-bmap.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + inkscape:export-filename="C:\Users\Russell\OneDrive\Desktop\XTC-Ribbon\svg\doc-export-bmap-64.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1331" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="7.6322099" + inkscape:cx="34.721267" + inkscape:cy="38.914024" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer2" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Export DXF"><path + style="fill:#e5d0bc;fill-opacity:1;stroke:#000000;stroke-width:1.08845;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 45.81776,41.744039 3.150401,4.442557 -0.337543,17.068768 H 0.92453011 V 0.82575003 L 48.74313,0.94265931 48.968158,17.076152 46.549182,20.088854" + id="path849" + sodipodi:nodetypes="cccccccc" /><path + style="opacity:0.999;fill:#54a7d6;fill-opacity:1;stroke:#000000;stroke-width:0.348134;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 1.488555,32.04338 7.6505091,3.398841 3.3862919,3.398843 1.505019,6.069362 0.627092,6.312136 1.25418,6.554908 2.006693,4.855492 -16.429785,0.121386 z" + id="lake" + sodipodi:nodetypes="ccccccccc" /><g + id="arrow" + transform="matrix(0.99468395,0,0,0.97646706,3.2675238,0.70437977)" + inkscape:label="arrow" + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.46101;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.622099" + id="path1706" /></g><path + style="fill:none;stroke:#000000;stroke-width:2.17239;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 17.73639,35.772982 0.356685,-15.69413 c 1.305829,-5.853103 2.125288,-5.497379 4.874693,-9.987174" + id="path922" + sodipodi:nodetypes="ccc" /><rect + style="fill:#d58e5d;fill-opacity:1;stroke:#784521;stroke-width:0.536317;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect924-2-7" + width="12.223145" + height="8.0698709" + x="-39.133907" + y="-51.56028" + ry="0.11891395" + transform="matrix(-0.99999989,-4.716658e-4,0.00537433,-0.99998556,0,0)" + inkscape:transform-center-x="20.953983" + inkscape:transform-center-y="0.72420852" /><path + sodipodi:type="star" + style="fill:#488825;fill-opacity:1;stroke:#488825;stroke-width:0.560074;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path992-2" + sodipodi:sides="6" + sodipodi:cx="11.855275" + sodipodi:cy="15.882116" + sodipodi:r1="3.846628" + sodipodi:r2="3.0109019" + sodipodi:arg1="0.84914148" + sodipodi:arg2="1.3727403" + inkscape:flatsided="false" + inkscape:rounded="0.2" + inkscape:randomized="0" + d="m 14.396465,18.769832 c -0.292751,0.25762 -1.566414,-0.01241 -1.948754,0.06433 -0.382339,0.07673 -1.453195,0.81727 -1.822676,0.692551 C 10.255554,19.40199 9.8525707,18.163952 9.5949503,17.871202 9.3373299,17.578452 8.1605758,17.021333 8.0838452,16.638993 8.0071147,16.256654 8.8777948,15.288641 9.002514,14.91916 c 0.1247191,-0.369481 0.018821,-1.667139 0.3115714,-1.924759 0.2927505,-0.257621 1.5664136,0.0124 1.9487536,-0.06433 0.382339,-0.07673 1.453195,-0.81727 1.822676,-0.692551 0.369481,0.124719 0.772465,1.362756 1.030085,1.655507 0.25762,0.29275 1.434375,0.849869 1.511105,1.232208 0.07673,0.38234 -0.79395,1.350352 -0.918669,1.719833 -0.124719,0.369481 -0.01882,1.66714 -0.311571,1.92476 z" /><path + style="opacity:0.998;fill:none;stroke:#000000;stroke-width:2.11841;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 45.772104,42.452438 0.01591,4.896454 C 45.426458,53.678042 43.785788,57.38601 36.32066,58.414645 L 29.558257,58.291694 C 22.244079,57.158368 18.761734,53.151166 18.000693,47.102987 L 17.877741,36.406092 C 17.586359,28.846724 11.453325,27.410748 6.0742709,23.741953 5.1148889,21.906907 4.1108952,20.205698 4.1070261,15.504114 5.7689541,8.76985 9.6724691,7.159212 13.574394,5.5449374 L 33.12389,5.2990318 c 7.305654,0.2514013 12.330785,3.466217 12.418233,11.0657502 l 0.114988,4.535242" + id="track" + sodipodi:nodetypes="cccccccccccc" /></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-export-dxf.svg b/app/bin/bitmaps/SVG/doc-export-dxf.svg new file mode 100644 index 0000000..30e6e79 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-export-dxf.svg @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-export-dxf.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1443" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="32.004346" + inkscape:cy="32.961287" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer2" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" + inkscape:snap-bbox="true"><inkscape:grid + type="xygrid" + id="grid849" /></sodipodi:namedview><g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Export DXF"><g + id="grid" + transform="matrix(1.160237,0,0,1.0808223,-1.5115895,-2.4478775)" + inkscape:label="grid" + style="stroke:#666666;stroke-width:1.89694;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><g + id="g1735" + style="stroke:#666666;stroke-width:1.89694;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.141179,15.31105 H 44.70585" + id="path855" /><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.141179,48.484986 H 44.705851" + id="path855-1" /><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.141179,37.427011 H 40.909775" + id="path855-2" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.141179,26.369029 H 40.81244" + id="path855-4" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.141179,4.2530693 H 44.70585" + id="path855-91" /><path + style="fill:none;stroke:#666666;stroke-width:1.89694;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.3519333,59.542966 44.432822,59.44459" + id="path855-40" + sodipodi:nodetypes="cc" /></g><g + id="g1721" + transform="matrix(1.0000001,0,0,1.0070684,-4.0552238e-7,-0.02780768)" + style="stroke:#666666;stroke-width:1.89027;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13.691837,3.93409 V 59.542971" + id="path949-0" /><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 24.02984,3.93409 V 59.542971" + id="path949-7" /><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.367842,35.060202 V 59.542971" + id="path949-9" + clip-path="none" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#666666;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.166366,3.5704399 V 28.660365" + id="path949-9-6" + clip-path="none" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 44.436613,43.120547 0.0019,16.965895" + id="path949-2-3" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 3.3538333,3.3828771 V 59.542971" + id="path949-2-8" /><path + style="fill:none;stroke:#666666;stroke-width:1.89027;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 44.437406,3.280868 0.0019,16.965896" + id="path949-2-3-4" + sodipodi:nodetypes="cc" /></g></g><g + id="arrow" + transform="translate(1.8075544,0.21265346)" + inkscape:label="arrow" + style="stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.749266" + id="path1484" + sodipodi:nodetypes="ccc" /><path + style="fill:none;stroke:#cc0000;stroke-width:4.46101;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.622099" + id="path1706" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-export-svg.svg b/app/bin/bitmaps/SVG/doc-export-svg.svg new file mode 100644 index 0000000..fcde438 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-export-svg.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-export-svg.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1532" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="33.439757" + inkscape:cy="32.961287" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer2" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Export DXF"><path + sodipodi:type="star" + style="opacity:1;fill:none;fill-opacity:1;stroke:#008000;stroke-width:6.80619;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path2519" + inkscape:flatsided="false" + sodipodi:sides="8" + sodipodi:cx="27.432297" + sodipodi:cy="27.113317" + sodipodi:r1="24.592754" + sodipodi:r2="24.592754" + sodipodi:arg1="0.67204007" + sodipodi:arg2="1.0647392" + inkscape:rounded="0.2" + inkscape:randomized="0" + d="m 46.677435,42.424367 c -1.194815,1.501816 -5.645649,5.26905 -7.324235,6.199311 -1.678585,0.930262 -7.232276,2.707471 -9.139082,2.924554 -1.906807,0.217082 -7.717858,-0.266296 -9.562592,-0.795441 -1.844733,-0.529145 -7.028463,-3.19952 -8.530278,-4.394335 C 10.619431,45.16364 6.8521971,40.712806 5.9219358,39.034221 4.9916746,37.355636 3.2144648,31.801944 2.9973824,29.895139 2.7802999,27.988332 3.263678,22.17728 3.792823,20.332547 4.3219679,18.487814 6.9923437,13.304084 8.1871586,11.802268 9.3819738,10.300452 13.832808,6.5332178 15.511393,5.6029565 17.189978,4.6726954 22.74367,2.8954856 24.650476,2.6784031 c 1.906806,-0.2170824 7.717858,0.2662956 9.562591,0.7954407 1.844733,0.5291449 7.028463,3.1995206 8.530279,4.3943355 1.501816,1.1948153 5.26905,5.6456497 6.199312,7.3242347 0.930261,1.678585 2.707471,7.232277 2.924553,9.139082 0.217083,1.906807 -0.266295,7.717859 -0.795441,9.562592 -0.529144,1.844733 -3.19952,7.028463 -4.394335,8.530279 z" + transform="matrix(0.59879059,0,0,0.57681546,1.2240368,1.2665708)" /><g + id="arrow" + inkscape:label="arrow" + style="stroke:#cc0000;stroke-width:5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="translate(3.296128,0.10188103)"><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;stroke:#cc0000;stroke-width:5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.622099" + id="path1706" /></g><path + style="fill:none;stroke:#1a66e5;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 4.3166078,61.082184 20.880646,38.63199 37.365489,61.229149 Z" + id="path851" + sodipodi:nodetypes="cccc" /><path + style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 50.110141,5.2235118 C 40.279181,5.3434014 34.524473,6.4224094 28.769764,8.5804247 20.377481,11.937336 12.824425,17.092597 8.7481732,24.285983 c 0,0 -5.155259,11.149748 0.2397801,18.582913 4.7955897,7.792835 16.1251727,10.190629 16.1251727,10.190629 10.43041,3.956362 24.757235,2.517685 24.757235,2.517685" + id="path853" + sodipodi:nodetypes="cccccc" /></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-export-xtc.svg b/app/bin/bitmaps/SVG/doc-export-xtc.svg new file mode 100644 index 0000000..dab12aa --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-export-xtc.svg @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-export-xtc.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.9309;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="59.649868" + height="42.871033" + x="2.1262496" + y="-45.047009" + transform="rotate(90)" /><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="25.305762" + inkscape:cy="32.961287" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export"><g + id="arrow" + transform="translate(2.5460266,-0.85071321)" + inkscape:label="arrow" + style="stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;stroke:#cc0000;stroke-width:4.44353;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.834752" + id="path1706" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-export.svg b/app/bin/bitmaps/SVG/doc-export.svg new file mode 100644 index 0000000..6954caf --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-export.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-export.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.91414;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="59.480015" + height="42.939346" + x="2.3393428" + y="-45.517216" + transform="rotate(90)" /><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1583" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="29.984138" + inkscape:cy="31.366386" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><rect + style="fill:#d0d0d0;fill-opacity:1;stroke:#9c9c9c;stroke-width:1.10215;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect36" + width="29.763172" + height="30.887873" + x="9.1128759" + y="15.885306" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export"><g + id="arrow" + transform="translate(2.4397,-0.74438648)" + inkscape:label="arrow" + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;fill-opacity:1;stroke:#cc0000;stroke-width:4.39951;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 31.366386" + id="path1706" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-import-xtc.svg b/app/bin/bitmaps/SVG/doc-import-xtc.svg new file mode 100644 index 0000000..01f2275 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-import-xtc.svg @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-import-xtc.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="60.646675" + height="46.762989" + x="1.8175089" + y="-62.21909" + transform="rotate(90)" /><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="12.227574" + inkscape:cy="32.961287" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export"><g + id="arrow" + transform="translate(-29.564658,-0.31907955)" + inkscape:label="arrow" + style="stroke:#02833c;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#02833c;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;stroke:#02833c;stroke-width:4.44353;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.834752" + id="path1706" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-import.svg b/app/bin/bitmaps/SVG/doc-import.svg new file mode 100644 index 0000000..e2bfc72 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-import.svg @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-import.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="60.646675" + height="46.762989" + x="1.8175089" + y="-62.325417" + transform="rotate(90)" /><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="12.227574" + inkscape:cy="32.961287" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export"><rect + style="fill:#d0d0d0;fill-opacity:1;stroke:#9c9c9c;stroke-width:1.17;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect36" + width="32.256348" + height="31.92165" + x="22.810884" + y="16.09137" /><g + id="arrow" + transform="translate(-29.458331,-0.31907955)" + inkscape:label="arrow" + style="stroke:#02833c;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + style="fill:none;fill-opacity:1;stroke:#02833c;stroke-width:4.7811;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.398031,40.401712 11.404136,-8.5769 -11.209194,-8.430286" + id="path1484" /><path + style="fill:none;stroke:#02833c;stroke-width:4.44353;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.802167,31.824812 H 30.834752" + id="path1706" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-new.svg b/app/bin/bitmaps/SVG/doc-new.svg new file mode 100644 index 0000000..6aac25e --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-new.svg @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-new.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1688" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="32.079879" + inkscape:cy="27.558143" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="60.915188" + height="46.970028" + x="0.63025844" + y="-55.713051" + transform="rotate(90)" /><g + id="plus" + transform="matrix(1.6740309,0,0,1.6334616,-51.092795,-24.413751)" + inkscape:label="plus"><path + style="display:inline;fill:#005a20;fill-opacity:1;stroke:#00993d;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.809533,31.077554 v -4.700241 h 4.630089 v -3.086726 l -4.559936,0.07015 -0.07015,-4.559936 h -3.016572 l 0.140305,4.559936 -4.840547,0.07015 0.07015,3.086726 4.489783,-0.07015 0.140306,4.630088 z" + id="path1718" /><path + style="fill:none;fill-opacity:1;stroke:#00e552;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 45.350068,18.723791 V 31.070694" + id="path1702" /><path + style="fill:none;fill-opacity:1;stroke:#00e552;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 51.516636,24.897242 H 39.169733" + id="path1708" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-open.svg b/app/bin/bitmaps/SVG/doc-open.svg new file mode 100644 index 0000000..ede9909 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-open.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-open.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663"><marker + style="overflow:visible" + id="Arrow1Lstart" + refX="0.0" + refY="0.0" + orient="auto" + inkscape:stockid="Arrow1Lstart" + inkscape:isstock="true"><path + transform="scale(0.8) translate(12.5,0)" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + id="path875" /></marker></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1581" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="26.519366" + inkscape:cy="32.446506" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><g + id="g1480" + transform="matrix(1.0113034,0,0,-2.2164172,-2.7819274,137.03913)" + style="stroke-width:1.4036;stroke-miterlimit:10;stroke-dasharray:none"><path + style="fill:#f6db93;fill-opacity:1;stroke:#674d09;stroke-width:0.741175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 4.9612505,58.671862 23.1549845,-0.06124 c 3.509047,-0.280952 3.845853,-1.595448 5.296087,-2.143264 l 24.386632,0.06124 V 36.933048 H 5.0844153 Z" + id="path1147" + sodipodi:nodetypes="ccccccc" /></g><path + id="path898" + style="fill:#f5f5f5;fill-opacity:1;stroke:#9e9e9e;stroke-width:0.771915;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + inkscape:transform-center-x="-0.086408966" + inkscape:transform-center-y="-2.125661" + d="m 50.078287,40.375329 -40.355118,0.05576 -0.1334945,-30.28419 31.4443435,0.07855 8.923599,8.061481 z" + sodipodi:nodetypes="cccccc" /><path + style="fill:#f6db93;fill-opacity:1;stroke:#674d09;stroke-width:1.10194px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 2.3773227,55.056954 10.246792,24.974007 h 51.861103 l -6.579394,30.082947 z" + id="path1149" /></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-print.svg b/app/bin/bitmaps/SVG/doc-print.svg new file mode 100644 index 0000000..1926edf --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-print.svg @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-print.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1694" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.7705101" + inkscape:cx="31.982176" + inkscape:cy="38.025154" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.74846;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900-3" + width="21.686026" + height="43.641754" + x="1.2954774" + y="-54.048908" + transform="rotate(90)" /><g + id="g882" + transform="matrix(1.3128287,0,0,1.1627519,-9.9792225,-5.0700017)" + style="stroke-width:1.00005;stroke-miterlimit:4;stroke-dasharray:none"><rect + style="fill:#d9d9d9;fill-opacity:1;stroke:#797979;stroke-width:1.00005;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect884" + width="45.182987" + height="24.276136" + x="9.5583668" + y="24.055124" + ry="0.13436399" /></g><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.74846;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="20.560341" + height="43.58411" + x="40.319885" + y="-54.020088" + transform="rotate(90)" /><path + style="fill:none;stroke:#333333;stroke-width:1.16565px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.25529,43.106167 H 42.861672" + id="path886" /><path + style="fill:none;stroke:#333333;stroke-width:1.16565px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.25529,46.681085 H 48.198877" + id="path888" /><path + style="fill:none;stroke:#333333;stroke-width:1.16565px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.25529,50.256011 H 45.077114" + id="path890" /><path + style="fill:none;stroke:#333333;stroke-width:1.16565px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.25529,53.830931 H 49.910812" + id="path892" /><path + style="fill:none;stroke:#333333;stroke-width:1.16565px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.25529,57.405849 H 42.257459" + id="path894" /><circle + style="fill:#d9d9d9;fill-opacity:1;stroke:#797979;stroke-width:2.04343;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path896" + sodipodi:type="arc" + sodipodi:cx="11.140548" + sodipodi:cy="28.202278" + sodipodi:rx="0.89170206" + sodipodi:ry="0.89170206" + sodipodi:start="1.5742817" + sodipodi:end="1.5686094" + sodipodi:arc-type="slice" + d="m 11.13744,29.093975 a 0.89170206,0.89170206 0 0 1 -0.888592,-0.89354 0.89170206,0.89170206 0 0 1 0.892279,-0.889859 0.89170206,0.89170206 0 0 1 0.891123,0.891017 0.89170206,0.89170206 0 0 1 -0.889752,0.892385 l -0.0019,-0.8917 z" /></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-revert.svg b/app/bin/bitmaps/SVG/doc-revert.svg new file mode 100644 index 0000000..f5b6290 --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-revert.svg @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-revert.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1688" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="32.079879" + inkscape:cy="27.558143" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.2515;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="60.915188" + height="46.970032" + x="0.64903259" + y="-55.527374" + transform="rotate(90)" /><path + class="st0" + d="m 46.746873,49.389829 c 1.100724,0.102144 0.963134,0.102144 3.164588,0.102144 0,-11.746454 -3.577362,-30.030067 -21.876939,-30.336495 -0.275181,-2.96215 -0.137592,-5.617871 -0.137592,-5.617871 l -12.658353,8.375733 13.071127,9.499308 c 0,0 -0.275182,-2.349291 -0.275182,-5.720013 12.933536,-0.102143 18.161987,15.321463 18.712351,23.697194 z" + id="path4" + style="fill:#ffd000;fill-opacity:1;stroke:#a5690d;stroke-width:1.84077;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-save-as.svg b/app/bin/bitmaps/SVG/doc-save-as.svg new file mode 100644 index 0000000..cf9244d --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-save-as.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-save-as.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1582" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="38.756094" + inkscape:cy="32.961287" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Save"><g + id="g1480" + transform="matrix(1.1058567,0,0,1.1058567,-3.4510105,-2.7972238)"><rect + style="fill:#97c6dd;fill-opacity:1;stroke:#3b3b3b;stroke-width:1.05972;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1447" + width="55.608879" + height="18.713505" + x="4.2530689" + y="36.789047" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 8.0023498,39.872525 V 52.206426" + id="path1449" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 29.447147,39.872525 V 52.206426" + id="path1451" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 24.085947,39.872525 V 52.206426" + id="path1453" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 18.72475,39.872525 V 52.206426" + id="path1455" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.36355,39.872525 V 52.206426" + id="path1457" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 56.253142,39.872525 V 52.206426" + id="path1459" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 50.891944,39.872525 V 52.206426" + id="path1461" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 45.530746,39.872525 V 52.206426" + id="path1463" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 40.169551,39.872525 V 52.206426" + id="path1465" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 34.808346,39.872525 V 52.206426" + id="path1467" /></g><g + id="g1488" + transform="matrix(1.0806052,0,0,1.0806052,-3.5200239,-1.5422888)"><path + style="fill:none;stroke:#0078ff;stroke-width:7.55906;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 4.4608021,9.6803465 C 10.957255,9.6711193 10.684816,9.7556021 20.50994,9.7866732 30.747015,10.118781 32.138765,14.439738 32.840598,20.628278 v 11.158588" + id="path1482" + sodipodi:nodetypes="cccc" /><path + style="fill:none;fill-opacity:1;stroke:#0078ff;stroke-width:6.00947;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 24.263698,20.382729 8.5769,11.404137 8.430286,-11.209195" + id="path1484" /></g><g + id="g6458" + transform="matrix(1.2768147,0,0,1.2768147,5.6348825,14.0807)"><path + style="fill:#f1b76f;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 21.519231,26.538462 V 21.461538 L 38.798077,4.2403846 43.701923,9.2596154 26.798077,26.451923 Z" + id="path1780" + sodipodi:nodetypes="cccccc" /><path + style="fill:none;stroke:#666666;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 24.346154,18.461538 c 5.134615,5.134616 5.134615,5.134616 5.134615,5.134616" + id="path4988" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-save.svg b/app/bin/bitmaps/SVG/doc-save.svg new file mode 100644 index 0000000..3a553dd --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-save.svg @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-save.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1582" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="38.756094" + inkscape:cy="32.961287" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Save"><g + id="g1480" + transform="matrix(1.1058567,0,0,1.1058567,-3.4510105,-2.7972238)"><rect + style="fill:#97c6dd;fill-opacity:1;stroke:#3b3b3b;stroke-width:1.05972;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect1447" + width="55.608879" + height="18.713505" + x="4.2530689" + y="36.789047" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 8.0023498,39.872525 V 52.206426" + id="path1449" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 29.447147,39.872525 V 52.206426" + id="path1451" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 24.085947,39.872525 V 52.206426" + id="path1453" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 18.72475,39.872525 V 52.206426" + id="path1455" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 13.36355,39.872525 V 52.206426" + id="path1457" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 56.253142,39.872525 V 52.206426" + id="path1459" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 50.891944,39.872525 V 52.206426" + id="path1461" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 45.530746,39.872525 V 52.206426" + id="path1463" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 40.169551,39.872525 V 52.206426" + id="path1465" /><path + style="fill:none;stroke:#000000;stroke-width:1.10301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 34.808346,39.872525 V 52.206426" + id="path1467" /></g><g + id="g1488" + transform="matrix(1.0806052,0,0,1.0806052,-3.5200239,-1.5422888)"><path + style="fill:none;stroke:#0078ff;stroke-width:7.55906;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 4.4608021,9.6803465 C 10.957255,9.6711193 10.684816,9.7556021 20.50994,9.7866732 30.747015,10.118781 32.138765,14.439738 32.840598,20.628278 v 11.158588" + id="path1482" + sodipodi:nodetypes="cccc" /><path + style="fill:none;fill-opacity:1;stroke:#0078ff;stroke-width:6.00947;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 24.263698,20.382729 8.5769,11.404137 8.430286,-11.209195" + id="path1484" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/doc-setup.svg b/app/bin/bitmaps/SVG/doc-setup.svg new file mode 100644 index 0000000..1219b1e --- /dev/null +++ b/app/bin/bitmaps/SVG/doc-setup.svg @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="doc-setup.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1697" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="32.018774" + inkscape:cy="27.558143" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.81321;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="53.023766" + height="40.88517" + x="0.59824014" + y="-42.753574" + transform="rotate(90)" /><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.20881;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900-3" + width="12.982697" + height="26.126856" + x="25.675159" + y="-58.653503" + transform="rotate(90)" /><g + id="g882" + transform="matrix(0.78594653,0,0,0.69610055,20.322029,21.864359)" + style="stroke-width:1.00005;stroke-miterlimit:4;stroke-dasharray:none"><rect + style="fill:#d9d9d9;fill-opacity:1;stroke:#797979;stroke-width:1.00005;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect884" + width="45.182987" + height="24.276136" + x="9.5583668" + y="24.055124" + ry="0.13436399" /></g><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.20881;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900-7" + width="12.872938" + height="26.065588" + x="49.05114" + y="-58.622875" + transform="rotate(90)" /><path + style="fill:none;stroke:#333333;stroke-width:0.906604;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.231752,51.148999 H 51.956101" + id="path886" /><path + style="fill:none;stroke:#333333;stroke-width:0.906604;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.231752,53.289181 H 55.151307" + id="path888" /><path + style="fill:none;stroke:#333333;stroke-width:0.906604;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.231752,55.42937 H 53.282414" + id="path890" /><path + style="fill:none;stroke:#333333;stroke-width:0.906604;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.231752,57.569555 H 56.176185" + id="path892" /><path + style="fill:none;stroke:#333333;stroke-width:0.906604;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.231752,59.70974 H 51.594381" + id="path894" /><circle + style="fill:#d9d9d9;fill-opacity:1;stroke:#797979;stroke-width:1.17965;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path896" + sodipodi:type="arc" + sodipodi:cx="32.965714" + sodipodi:cy="41.783356" + sodipodi:rx="0.53383213" + sodipodi:ry="0.53383213" + sodipodi:start="1.5742817" + sodipodi:end="1.5686094" + sodipodi:arc-type="slice" + d="m 32.963853,42.317185 a 0.53383213,0.53383213 0 0 1 -0.53197,-0.534933 0.53383213,0.53383213 0 0 1 0.534177,-0.532728 0.53383213,0.53383213 0 0 1 0.533485,0.533421 0.53383213,0.53383213 0 0 1 -0.532664,0.534242 l -0.0012,-0.533831 z" /></g></svg> diff --git a/app/bin/bitmaps/SVG/down.svg b/app/bin/bitmaps/SVG/down.svg new file mode 100644 index 0000000..41f83fb --- /dev/null +++ b/app/bin/bitmaps/SVG/down.svg @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 24 48" + style="enable-background:new 0 0 24 48;" + xml:space="preserve" + sodipodi:docname="down.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata13"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs11" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1647" + inkscape:window-height="933" + id="namedview9" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="10.715926" + inkscape:cy="22.589078" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{stroke:#000000;stroke-miterlimit:10;} +</style> + + +<path + id="path838" + style="fill:#000000;fill-opacity:1;stroke-width:0.542529;stroke-linecap:square" + inkscape:transform-center-x="0.02977867" + inkscape:transform-center-y="-0.65983518" + d="m 21.394513,16.625061 -18.8746311,0.01685 0.1253841,3.396706 9.422005,11.319468 9.386564,-11.355799 z" + sodipodi:nodetypes="cccccc" /></svg> diff --git a/app/bin/bitmaps/SVG/elevation.svg b/app/bin/bitmaps/SVG/elevation.svg new file mode 100644 index 0000000..b6f9813 --- /dev/null +++ b/app/bin/bitmaps/SVG/elevation.svg @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="elevation.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata33"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs31" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1194" + inkscape:window-height="666" + id="namedview29" + showgrid="false" + inkscape:zoom="6.7085072" + inkscape:cx="21.31684" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st4{fill:none;stroke:#F80E00;stroke-miterlimit:10;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> +<line + class="st0" + x1="5.7602229" + y1="29.971048" + x2="5.7602229" + y2="43.648643" + id="line4" /> +<line + class="st0" + x1="11.977306" + y1="29.971048" + x2="11.977306" + y2="43.648643" + id="line6" /> +<line + class="st0" + x1="18.194395" + y1="29.971048" + x2="18.194395" + y2="43.648643" + id="line8" /> +<line + class="st0" + x1="24.411482" + y1="29.971048" + x2="24.411482" + y2="43.648643" + id="line10" /> +<line + class="st0" + x1="30.628567" + y1="29.971048" + x2="30.628567" + y2="43.648643" + id="line12" /> +<line + class="st0" + x1="36.84565" + y1="29.971048" + x2="36.84565" + y2="43.648643" + id="line14" /> +<line + class="st0" + x1="43.062733" + y1="29.971048" + x2="43.062733" + y2="43.648643" + id="line16" /> +<line + class="st1" + x1="3.2733886" + y1="31.836174" + x2="45.549568" + y2="31.836174" + id="line18" + style="stroke-width:1.24342" /> +<line + class="st1" + x1="3.2733886" + y1="41.783516" + x2="45.549568" + y2="41.783516" + id="line20" + style="stroke-width:1.24342" /> +<line + class="st2" + x1="21.44589" + y1="36.504807" + x2="21.44589" + y2="12.933911" + id="line22" + style="stroke:#cc0e00;stroke-width:3.10854;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st3" + points="28.5,15.8 24,11.4 19.8,15.6 " + id="polyline24" + transform="matrix(1.2434171,0,0,1.2434171,-8.3961197,-2.041122)" + style="stroke:#cc0e00;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<text + class="st4 st5 st6" + id="text26" + x="30.474941" + y="21.261095" + style="font-size:23.2105px;fill:#cc0e00;fill-opacity:1;stroke:#cc0e00;stroke-width:1.24342;stroke-opacity:1">Z</text> +</svg> diff --git a/app/bin/bitmaps/SVG/exit.svg b/app/bin/bitmaps/SVG/exit.svg new file mode 100644 index 0000000..210bdb9 --- /dev/null +++ b/app/bin/bitmaps/SVG/exit.svg @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="exit.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata33"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs31" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1475" + inkscape:window-height="929" + id="namedview29" + showgrid="false" + inkscape:zoom="10.160412" + inkscape:cx="21.357402" + inkscape:cy="34.496633" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st4{fill:none;stroke:#F80E00;stroke-miterlimit:10;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> + + + + + + + + + +<line + class="st2" + x1="23.713451" + y1="26.070175" + x2="23.713451" + y2="3.7465641" + id="line22" + style="stroke:#cc0e00;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st3" + points="28.5,15.8 24,11.4 19.8,15.6 " + id="polyline24" + transform="matrix(1.9103283,0,0,1.8174965,-22.134428,-16.972896)" + style="stroke:#cc0e00;stroke-width:2.41503;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + +<text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:21.3333px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold'" + x="-0.028499108" + y="46.119984" + id="text844"><tspan + sodipodi:role="line" + x="-0.028499108" + y="46.119984" + id="tspan1266">EXIT</tspan></text></svg> diff --git a/app/bin/bitmaps/SVG/extend.svg b/app/bin/bitmaps/SVG/extend.svg new file mode 100644 index 0000000..eac7840 --- /dev/null +++ b/app/bin/bitmaps/SVG/extend.svg @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="extend.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata39"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs37" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1501" + inkscape:window-height="979" + id="namedview35" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="22.802042" + inkscape:cy="25.410264" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="true" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#6AC2FF;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#CCCCCC;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#666666;stroke-miterlimit:10;} + .st3{fill:none;stroke:#2A73FF;stroke-miterlimit:10;} + .st4{fill:none;stroke:#005EFF;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF3515;stroke-width:2;stroke-miterlimit:10;} + .st6{fill:none;stroke:#FF3515;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="8.0488663" + y1="46.883717" + x2="7.7823558" + y2="35.003647" + id="line4" /> +<line + class="st0" + x1="32.46632" + y1="33.972927" + x2="23.902817" + y2="27.012367" + id="line6" /> +<line + class="st1" + x1="43.030769" + y1="9.9180746" + x2="31.705139" + y2="9.3531666" + id="line8" /> +<line + class="st0" + x1="21.559429" + y1="42.421944" + x2="15.962461" + y2="32.486633" + id="line10" /> +<line + class="st1" + x1="39.806316" + y1="23.599007" + x2="29.234509" + y2="19.125751" + id="line12" /> +<line + class="st0" + x1="15.522112" + y1="45.15593" + x2="11.712162" + y2="34.346085" + id="line14" /> +<line + class="st0" + x1="27.655085" + y1="38.615269" + x2="20.143089" + y2="29.865065" + id="line16" /> +<line + class="st1" + x1="36.311913" + y1="29.410093" + x2="26.634504" + y2="23.426489" + id="line18" /> +<line + class="st1" + x1="42.116776" + y1="16.602833" + x2="30.827339" + y2="14.766017" + id="line20" /> +<path + class="st2" + d="m 41.023581,7.9807585 c 0,8.6737585 -2.714909,15.9041265 -7.964815,22.2953165" + id="path22" + sodipodi:nodetypes="cc" + style="stroke-width:1.82605;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st3" + d="M 27.139223,26.464154 C 21.448838,33.020546 12.504364,37.904414 4.9171842,37.904414" + id="path24" + sodipodi:nodetypes="cc" + style="stroke-width:1.82605;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st2" + d="M 33.914475,7.8666305 C 33.572089,15.170848 32.617385,19.844707 27.139223,26.464154" + id="path26" + sodipodi:nodetypes="cc" + style="stroke-width:1.826;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st4" + d="M 33.058766,30.276075 C 25.868678,39.07873 15.954277,44.437137 5.3752468,44.694932" + id="path28" + sodipodi:nodetypes="cc" + style="stroke-width:1.82605;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st5" + d="M 30.495417,28.297573 C 36.264116,21.614347 38.199674,10.242642 37.674486,2.4997028" + id="path30" + style="stroke:#cc1b00;stroke-width:2.28257;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /> +<polyline + class="st6" + points="33.8,8.5 37.6,6.4 40.7,8.5 " + id="polyline32" + style="stroke:#cc1b00;stroke-width:1.56957;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3817155,0,0,1.5306208,-14.278017,-7.2962703)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/filled-box.svg b/app/bin/bitmaps/SVG/filled-box.svg new file mode 100644 index 0000000..2d8e2dd --- /dev/null +++ b/app/bin/bitmaps/SVG/filled-box.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="filled-box.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata15"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs13" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1502" + inkscape:window-height="991" + id="namedview11" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#00C9FF;stroke:#000000;stroke-miterlimit:10;} + .st1{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<rect + x="3.4919739" + y="4.7348843" + class="st0" + width="41.016052" + height="38.530231" + id="rect4" + style="fill:#80e2ff;fill-opacity:1;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="6.4384027" + y1="40.359879" + x2="40.216499" + y2="8.7573147" + id="line6" + style="stroke:#cc0e00;stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st2" + points="39.9,18.3 39.4,11.4 32.7,11.4 " + id="polyline8" + style="stroke:#cc0e00;stroke-width:2.48773465;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.1910839,0,0,1.2209336,-6.7122048,-5.1613282)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/filled-polygon.svg b/app/bin/bitmaps/SVG/filled-polygon.svg new file mode 100644 index 0000000..6fe8cce --- /dev/null +++ b/app/bin/bitmaps/SVG/filled-polygon.svg @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="filled-polygon.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata857"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs855" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1330" + inkscape:window-height="961" + id="namedview853" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style846"> + .st0{fill:#15C7FF;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} +</style> +<polygon + class="st0" + points="10.9,10 28.2,7.8 39.7,20.1 40,36.5 24.7,39.8 11.8,32.9 7.4,19.8 " + id="polygon848" + style="fill:#80e1ff;fill-opacity:1" + transform="matrix(1.3119381,0,0,1.3037001,-7.0644654,-7.0270096)" /> +<path + class="st1" + d="M3.5,28.2" + id="path850" /> +</svg> diff --git a/app/bin/bitmaps/SVG/go.svg b/app/bin/bitmaps/SVG/go.svg new file mode 100644 index 0000000..943e561 --- /dev/null +++ b/app/bin/bitmaps/SVG/go.svg @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="go.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata42"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs40"><radialGradient + inkscape:collect="always" + xlink:href="#SVGID_1_" + id="radialGradient867" + cx="23.599313" + cy="23.299802" + fx="23.599313" + fy="23.299802" + r="18.802058" + gradientTransform="matrix(1,0,0,1.1475892,0,-3.4387987)" + gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1523" + inkscape:window-height="918" + id="namedview38" + showgrid="false" + inkscape:zoom="14.378038" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:url(#SVGID_1_);stroke:#000000;stroke-miterlimit:10;} +</style> +<linearGradient + id="SVGID_1_" + gradientUnits="userSpaceOnUse" + x1="2.3596" + y1="25.2837" + x2="44.5404" + y2="25.2837" + gradientTransform="matrix(5.000000e-03 1 -1 5.000000e-03 48.7725 -0.2285)"> + + + + + + + + + <stop + offset="0.08821" + style="stop-color:#b1e7ba;stop-opacity:1" + id="stop20" /> + <stop + offset="0.3086791" + style="stop-color:#a0deac;stop-opacity:1" + id="stop22" /> + <stop + offset="0.54394364" + style="stop-color:#6ece7c;stop-opacity:1" + id="stop24" /> + <stop + offset="0.75441277" + style="stop-color:#36c450;stop-opacity:1" + id="stop26" /> + + <stop + offset="0.9501" + style="stop-color:#06ab21;stop-opacity:1" + id="stop30" /> + <stop + offset="0.9992" + style="stop-color:#00a91a;stop-opacity:1" + id="stop32" /> +</linearGradient> +<polygon + class="st0" + points="23.5,44.3 5.3,33.7 5.5,12.7 23.7,2.3 41.9,12.9 41.8,33.9 " + id="polygon35" + style="fill-opacity:1;fill:url(#radialGradient867)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/grid.svg b/app/bin/bitmaps/SVG/grid.svg new file mode 100644 index 0000000..23b9b93 --- /dev/null +++ b/app/bin/bitmaps/SVG/grid.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve"> +<style type="text/css"> + .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} +</style> +<line class="st0" x1="4.9" y1="10.2" x2="42" y2="10.4"/> +<line class="st0" x1="5" y1="17.5" x2="42" y2="17.5"/> +<line class="st0" x1="5" y1="24.5" x2="42" y2="24.5"/> +<line class="st0" x1="5" y1="31.5" x2="42" y2="31.5"/> +<line class="st0" x1="5" y1="38.5" x2="42" y2="38.5"/> +<line class="st0" x1="9.5" y1="7" x2="9.5" y2="42"/> +<line class="st0" x1="16.5" y1="7" x2="16.5" y2="42"/> +<line class="st0" x1="23.5" y1="7" x2="23.5" y2="42"/> +<line class="st0" x1="30.5" y1="7" x2="30.5" y2="42"/> +<line class="st0" x1="37.5" y1="7" x2="37.5" y2="42"/> +</svg> diff --git a/app/bin/bitmaps/SVG/helix.svg b/app/bin/bitmaps/SVG/helix.svg new file mode 100644 index 0000000..c88f470 --- /dev/null +++ b/app/bin/bitmaps/SVG/helix.svg @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="helix.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata2607"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2605"><inkscape:path-effect + effect="powerclip" + id="path-effect1130" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /><inkscape:path-effect + effect="powerclip" + id="path-effect1126" + is_visible="true" + lpeversion="1" + inverse="true" + flatten="false" + hide_clip="false" + message="Use fill-rule evenodd on <b>fill and stroke</b> dialog if no flatten result after convert clip to paths." /></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1440" + inkscape:window-height="741" + id="namedview2603" + showgrid="false" + inkscape:zoom="10.631993" + inkscape:cx="24.031242" + inkscape:cy="23.843131" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="true" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2554"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FF0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FF0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st4{fill:#FB0000;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> + + + + + + + + + + + + + + + + + + + + + + + +<path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#666666;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188" + sodipodi:type="arc" + sodipodi:cx="24.133484" + sodipodi:cy="30.883982" + sodipodi:rx="21.415539" + sodipodi:ry="14.88994" + sodipodi:start="1.5677882" + sodipodi:end="4.7181141" + sodipodi:arc-type="arc" + d="M 24.197904,45.773855 A 21.415539,14.88994 0 0 1 5.5881225,38.330203 21.415539,14.88994 0 0 1 5.6172887,23.402754 21.415539,14.88994 0 0 1 24.25609,15.994285" + sodipodi:open="true" /><path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#595959;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188-2" + sodipodi:type="arc" + sodipodi:cx="-24.210531" + sodipodi:cy="27.442301" + sodipodi:rx="21.415539" + sodipodi:ry="11.448045" + sodipodi:start="1.5617363" + sodipodi:end="4.744592" + sodipodi:arc-type="arc" + sodipodi:open="true" + d="m -24.016509,38.889876 a 21.415539,11.448045 0 0 1 -18.790484,-5.770157 21.415539,11.448045 0 0 1 0.25075,-11.583362 21.415539,11.448045 0 0 1 19.035238,-5.536165" + transform="scale(-1,1)" /><path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188-25" + sodipodi:type="arc" + sodipodi:cx="23.952087" + sodipodi:cy="24.000002" + sodipodi:rx="21.415539" + sodipodi:ry="14.88994" + sodipodi:start="1.5677882" + sodipodi:end="4.7181141" + sodipodi:arc-type="arc" + sodipodi:open="true" + d="M 24.016508,38.889875 A 21.415539,14.88994 0 0 1 5.406726,31.446223 21.415539,14.88994 0 0 1 5.4358922,16.518774 21.415539,14.88994 0 0 1 24.074693,9.1103057" /><path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#404040;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188-2-6" + sodipodi:type="arc" + sodipodi:cx="-24.029137" + sodipodi:cy="20.558321" + sodipodi:rx="21.415539" + sodipodi:ry="11.448045" + sodipodi:start="1.5617363" + sodipodi:end="4.744592" + sodipodi:arc-type="arc" + sodipodi:open="true" + transform="scale(-1,1)" + d="m -23.835114,32.005896 a 21.415539,11.448045 0 0 1 -18.790484,-5.770156 21.415539,11.448045 0 0 1 0.25075,-11.583363 21.415539,11.448045 0 0 1 19.035237,-5.5361653" /><path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#333333;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188-5" + sodipodi:type="arc" + sodipodi:cx="23.770693" + sodipodi:cy="17.116022" + sodipodi:rx="21.415539" + sodipodi:ry="14.88994" + sodipodi:start="1.5677882" + sodipodi:end="4.7181141" + sodipodi:arc-type="arc" + sodipodi:open="true" + d="M 23.835113,32.005895 A 21.415539,14.88994 0 0 1 5.2253314,24.562244 21.415539,14.88994 0 0 1 5.2544977,9.6347943 21.415539,14.88994 0 0 1 23.893299,2.2263259" /><path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#262626;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="path6188-2-96" + sodipodi:type="arc" + sodipodi:cx="-23.847742" + sodipodi:cy="13.674341" + sodipodi:rx="21.415539" + sodipodi:ry="11.448045" + sodipodi:start="1.5617363" + sodipodi:end="4.744592" + sodipodi:arc-type="arc" + sodipodi:open="true" + transform="scale(-1,1)" + d="M -23.653719,25.121916 A 21.415539,11.448045 0 0 1 -42.444204,19.35176 21.415539,11.448045 0 0 1 -42.193454,7.7683976 21.415539,11.448045 0 0 1 -23.158216,2.2322319" /></svg> diff --git a/app/bin/bitmaps/SVG/join-line.svg b/app/bin/bitmaps/SVG/join-line.svg new file mode 100644 index 0000000..feb8a93 --- /dev/null +++ b/app/bin/bitmaps/SVG/join-line.svg @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1519" + sodipodi:docname="join-line.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1523"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1454" + inkscape:window-height="888" + id="namedview1521" + showgrid="false" + inkscape:zoom="8.7705101" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g1515" + inkscape:document-rotation="0" /><defs + id="defs1493"><clipPath + id="clipPath2821"><path + d="m0 48h48v-48h-48z" + id="path1490" /></clipPath></defs><g + transform="matrix(1.3333,0,0,-1.3333,0,64)" + id="g1517"><g + clip-path="url(#clipPath2821)" + id="g1515"><g + transform="matrix(1.3145504,0,0,1.3145504,44.440574,45.894188)" + id="g1497" + style="stroke-width:1.42638;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 C -0.224,-3.8 -0.994,-8.962 -2.938,-12.877" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path1495" + style="stroke-width:1.42638;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(1.3145504,0,0,1.3145504,20.707682,7.9609974)" + id="g1501" + style="stroke-width:1.42638;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 C -4.396,-2.414 -9.159,-3.782 -13.756,-3.782" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path1499" + style="stroke-width:1.42638;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="translate(20.860044,9.2266046)" + id="g1505"><path + d="M -1.3643768,-1.428611 C 7.6547534,2.8134428 16.617357,12.690975 20.206079,20.918744" + fill="none" + stroke="#ff3515" + stroke-miterlimit="10" + stroke-width="2" + id="path1503" + style="stroke:#cc1a00;stroke-width:2.46485;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3145504,0,0,1.3145504,35.788203,30.460053)" + id="g1509" + style="stroke-width:0.999775;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 4.322,0.468 6.307,-2.751" + fill="none" + stroke="#ff3515" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path1507" + style="stroke:#cc1a00;stroke-width:1.87505;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.3145504,0,0,1.3145504,24.610582,5.2201604)" + id="g1513"><path + d="m 0,0 -3.818,2.082 0.207,3.776" + fill="none" + stroke="#ff3515" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path1511" + style="stroke:#cc1a00;stroke-width:1.87505;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></g></g></svg> diff --git a/app/bin/bitmaps/SVG/join.svg b/app/bin/bitmaps/SVG/join.svg new file mode 100644 index 0000000..c441656 --- /dev/null +++ b/app/bin/bitmaps/SVG/join.svg @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="join.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata962"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs960" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1364" + inkscape:window-height="842" + id="namedview958" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" /> +<style + type="text/css" + id="style911"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#CCCCCC;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#B3B3B3;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#808080;stroke-linecap:round;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FF3515;stroke-width:2;stroke-miterlimit:10;} + .st6{fill:none;stroke:#FF3515;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="4.7765999" + y1="46.437527" + x2="4.25386" + y2="34.322994" + id="line913" + style="stroke:#d98a0d;stroke-opacity:1" /> + +<line + class="st0" + x1="45.788837" + y1="3.8463986" + x2="33.064186" + y2="3.1967058" + id="line917" + style="stroke:#d98a0d;stroke-opacity:1" /> +<path + class="st2" + d="M 15.061216,31.402502" + id="path919" /> +<path + class="st2" + d="M 21.125158,41.15754" + id="path921" /> +<path + class="st2" + d="M 30.616547,15.188049" + id="path923" /> +<path + class="st2" + d="M 42.217131,19.406444" + id="path925" /> +<line + class="st0" + x1="13.55937" + y1="45.097534" + x2="9.8468332" + y2="33.243919" + id="line927" + style="stroke:#d98a0d;stroke-opacity:1" /> + + +<line + class="st0" + x1="44.724155" + y1="11.753452" + x2="32.387802" + y2="9.2630863" + id="line933" + style="stroke:#d98a0d;stroke-opacity:1" /> +<path + class="st3" + d="M 43.37784,1.6100916 C 43.114189,6.6194351 42.059591,13.474326 39.554918,18.615495" + id="path935" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st3" + d="M 16.115816,32.773806 C 11.633771,35.410302 6.7562524,36.860375 2.1423833,36.860375" + id="path937" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st3" + d="M 35.942594,1.4782669 C 36.074418,6.2239605 34.756171,11.628778 32.646973,15.978998" + id="path939" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st3" + d="M 20.202385,38.890802 C 14.402092,42.054599 8.0745012,43.900146 2.1423833,43.900146" + id="path941" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> + +<path + class="st4" + d="M 18.333961,46.5495" + id="path945" /> +<path + class="st4" + d="M 20.333961,46.5495" + id="path947" /> + +<path + class="st5" + d="M 14.948598,37.230225 C 24.078207,33.30287 33.464632,24.34554 36.647664,15.972193" + id="path951" + style="stroke:#cc1a00;stroke-width:3.46926;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /> +<polyline + class="st6" + points="30.9,20.2 35.2,19.9 37.1,23.2 " + id="polyline953" + style="stroke:#cc1a00;stroke-width:1.91786;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.8215816,-0.10780836,0.10780836,1.8215816,-28.758825,-17.280872)" /> +<polyline + class="st6" + points="21.8,39.1 18,37 18.4,33.2 " + id="polyline955" + style="stroke:#cc1a00;stroke-width:1.93219;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.8040301,0,0,1.8040301,-16.833582,-29.960531)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/layers.svg b/app/bin/bitmaps/SVG/layers.svg new file mode 100644 index 0000000..b261d30 --- /dev/null +++ b/app/bin/bitmaps/SVG/layers.svg @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="layers.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1539"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs1537" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1338" + inkscape:window-height="936" + id="namedview1535" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24.722465" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style1492"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st3{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st5{font-family:'MyriadPro-Regular';} + .st6{font-size:12px;} +</style> + + + + + + + + + + + + + + + + + + + + +<rect + style="fill:#999999;fill-opacity:1;stroke:#000000;stroke-width:2.00793;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98" + id="rect860-7" + width="33.315411" + height="15.514964" + x="25.02117" + y="30.31708" + ry="0.29794645" + transform="matrix(1,0,-0.45844986,0.88872027,0,0)" /><rect + style="fill:#bfbfbf;fill-opacity:1;stroke:#000000;stroke-width:2.00793;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98" + id="rect860-8" + width="33.315411" + height="15.514964" + x="19.462948" + y="18.680857" + ry="0.29794645" + transform="matrix(1,0,-0.45844986,0.88872027,0,0)" /><rect + style="opacity:1;fill:#e5e5e5;fill-opacity:1;stroke:#000000;stroke-width:2.00793;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98" + id="rect860" + width="33.315411" + height="15.514964" + x="14.359009" + y="7.5478206" + ry="0.29794645" + transform="matrix(1,0,-0.45844986,0.88872027,0,0)" /></svg> diff --git a/app/bin/bitmaps/SVG/magnet.svg b/app/bin/bitmaps/SVG/magnet.svg new file mode 100644 index 0000000..9d0b3a6 --- /dev/null +++ b/app/bin/bitmaps/SVG/magnet.svg @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg23" + sodipodi:docname="magnet.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata27"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1446" + inkscape:window-height="937" + id="namedview25" + showgrid="false" + inkscape:zoom="7.9847123" + inkscape:cx="32.123888" + inkscape:cy="32.123888" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g925" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" + inkscape:snap-nodes="true" + inkscape:snap-others="true" /><defs + id="defs5"><clipPath + id="clipPath1505"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + id="g880" + transform="matrix(1.3226362,0,0,1.3226362,-8.1164854,-11.85842)"><path + d="m 14.435367,34.575808 c 0,0 14.228208,-19.311121 19.633295,-19.660002 5.403604,-0.348882 14.272694,6.170391 14.272694,11.69849 -0.591669,5.412776 -17.564682,22.176623 -17.564682,22.176623" + fill="none" + stroke="#f80e00" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="8.82763" + id="path7" + style="stroke-width:8.97904;stroke-miterlimit:10;stroke-dasharray:none" /><path + style="fill:none;stroke:#000000;stroke-width:1.51213;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 11.330754,30.48781 c 5.957485,-7.27871 12.690173,-17.209345 21.393032,-20.040332 5.117394,-0.344091 9.646675,1.097298 13.772433,4.543503 4.922997,3.906705 6.190886,6.874275 6.767488,11.533505 -0.721479,7.262755 -11.340738,17.177757 -18.740785,25.161964" + id="path870" + sodipodi:nodetypes="ccccc" /><path + style="fill:none;stroke:#000000;stroke-width:1.65482;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 18.475636,36.915263 c 8.069478,-11.086752 9.916753,-12.484666 15.946619,-17.8605 5.171653,1.210228 7.461614,3.144793 10.176073,7.550811 -5.574625,8.638889 -9.088159,10.653142 -17.119996,18.472961" + id="path872" + sodipodi:nodetypes="cccc" /></g><g + id="g930" + transform="matrix(1.4474381,0,0,1.4474381,-11.767259,-16.212821)" + style="stroke-width:1.51213;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 30.476571,54.014516 -6.441172,-5.87452 3.59591,-3.939901 6.439839,5.873186 z" + fill="#ffe003" + id="path11" + style="stroke-width:1.51214;stroke-miterlimit:4;stroke-dasharray:none" /><path + style="fill:none;stroke:#332c00;stroke-width:1.38175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 27.631309,44.200095 -3.59591,3.939901 6.441172,5.87452 3.594577,-3.941235" + id="path867" /></g><g + id="g925" + transform="matrix(1.4474381,0,0,1.4474381,-11.767259,-16.212821)" + style="stroke-width:1.51213;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 15.810271,40.681916 -6.4411723,-5.87452 3.5959103,-3.939901 6.439839,5.873186 z" + fill="#ffe003" + id="path15" + style="stroke-width:1.51214;stroke-miterlimit:4;stroke-dasharray:none" /><path + style="fill:none;stroke:#332d00;stroke-width:1.38175;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 12.965009,30.867495 -3.5959103,3.939901 6.4411723,5.87452 3.594577,-3.941235" + id="path865" /></g></svg> diff --git a/app/bin/bitmaps/SVG/manage.svg b/app/bin/bitmaps/SVG/manage.svg new file mode 100644 index 0000000..2791e15 --- /dev/null +++ b/app/bin/bitmaps/SVG/manage.svg @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg75" + sodipodi:docname="manage.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata79"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1532" + inkscape:window-height="913" + id="namedview77" + showgrid="false" + inkscape:zoom="5.3929307" + inkscape:cx="31.986319" + inkscape:cy="21.046071" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g73" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath4002"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(2.2443875,0,0,-2.2010601,-22.872113,82.32556)" + id="g73"><g + transform="translate(12.5,35)" + id="g21" /><path + sodipodi:type="star" + style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:4.30787;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path3469" + inkscape:flatsided="false" + sodipodi:sides="8" + sodipodi:cx="3.0788169" + sodipodi:cy="2.956532" + sodipodi:r1="42.981846" + sodipodi:r2="30.087292" + sodipodi:arg1="0.76729149" + sodipodi:arg2="1.1599906" + inkscape:rounded="0.7" + inkscape:randomized="0" + d="m 34.016871,32.794023 c -9.260139,9.601701 -6.693085,-7.580595 -18.92275,-2.253481 -12.2296636,5.327113 2.100246,15.149269 -11.2370884,15.39079 -13.337335,0.241521 0.6275641,-10.093016 -11.7869529,-14.973857 -12.4145157,-4.88084 -9.2270537,12.19725 -18.8287537,2.937111 -9.601701,-9.260139 7.580595,-6.693085 2.253481,-18.92275 -5.327113,-12.2296635 -15.14927,2.100246 -15.39079,-11.2370883 -0.241521,-13.337335 10.093016,0.6275641 14.973857,-11.7869529 4.88084,-12.4145158 -12.19725,-9.2270538 -2.937111,-18.8287538 9.260139,-9.601701 6.693085,7.580595 18.9227497,2.253481 12.2296637,-5.327113 -2.1002457,-15.149269 11.2370885,-15.39079 13.3373348,-0.241521 -0.6275641,10.093016 11.7869528,14.973857 12.414516,4.88084 9.227054,-12.19725 18.828754,-2.937111 9.601701,9.260139 -7.580595,6.693085 -2.253481,18.9227498 C 35.98994,3.1708915 45.812096,-11.159018 46.053617,2.1783163 46.295138,15.515651 35.960601,1.5507522 31.07976,13.965269 c -4.88084,12.414516 12.197249,9.227054 2.937111,18.828754 z" + transform="matrix(0.31028492,0,0,-0.31639281,23.493281,23.799663)" /><path + sodipodi:type="star" + style="opacity:1;fill:#e5e5e5;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.65588;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path5664" + inkscape:flatsided="false" + sodipodi:sides="10" + sodipodi:cx="32.635319" + sodipodi:cy="31.522749" + sodipodi:r1="12.211524" + sodipodi:r2="12.211524" + sodipodi:arg1="0.73168643" + sodipodi:arg2="1.0458457" + inkscape:rounded="1" + inkscape:randomized="0" + d="m 41.721287,39.681578 c -2.552644,2.842717 0.340241,0.493623 -2.965915,2.408397 -3.306157,1.914775 0.17105,0.574604 -3.564989,1.374004 -3.73604,0.7994 -0.01488,0.599338 -3.815097,0.205112 -3.800213,-0.394225 -0.199361,0.565405 -3.691756,-0.983855 -3.492395,-1.549261 -0.364323,0.476126 -3.20704,-2.076518 -2.842718,-2.552644 -0.493623,0.340241 -2.408397,-2.965916 -1.914775,-3.306157 -0.574604,0.17105 -1.374004,-3.564989 -0.7994,-3.73604 -0.599338,-0.01488 -0.205113,-3.815097 0.394225,-3.800213 -0.565405,-0.199361 0.983856,-3.691756 1.549261,-3.492395 -0.476126,-0.364323 2.076518,-3.20704 2.552644,-2.842717 -0.340241,-0.493623 2.965916,-2.408397 3.306157,-1.914775 -0.171051,-0.574604 3.564989,-1.374004 3.73604,-0.7994 0.01488,-0.599338 3.815097,-0.205113 3.800213,0.394226 0.19936,-0.565404 3.691755,0.983856 3.492396,1.549261 0.364323,-0.476126 3.207041,2.076518 2.842717,2.552644 0.493623,-0.340241 2.408397,2.965916 1.914774,3.306157 0.574603,-0.171051 1.374004,3.564989 0.7994,3.73604 0.599337,0.01488 0.205112,3.815097 -0.394225,3.800213 0.565405,0.19936 -0.983856,3.691756 -1.54926,3.492395 0.476127,0.364323 -2.076518,3.20704 z" + transform="matrix(0.36562159,0,0,-0.37281877,12.516414,34.61651)" /></g></svg> diff --git a/app/bin/bitmaps/SVG/map.svg b/app/bin/bitmaps/SVG/map.svg new file mode 100644 index 0000000..69686be --- /dev/null +++ b/app/bin/bitmaps/SVG/map.svg @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg75" + sodipodi:docname="map.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata79"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1532" + inkscape:window-height="913" + id="namedview77" + showgrid="false" + inkscape:zoom="8.1776315" + inkscape:cx="31.977474" + inkscape:cy="20.971843" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g73" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath4002"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(2.2443875,0,0,-2.2010601,-22.872113,82.32556)" + id="g73"><g + transform="matrix(1.1604879,0,0,-1.2603903,11.985406,19.218785)" + id="g9" + inkscape:label="Blue" + style="stroke-width:1.39564;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 5.547,1.772 7.165,1.541 9.63,3.39 l 3.775,-2.388 1.696,-1.079 2.003,-2.85 4.622,4.083" + fill="none" + stroke="#0dc7f9" + stroke-miterlimit="10" + id="path7" + style="stroke-width:1.39564;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.0718729,0,0,1.0718729,19.14911,19.235271)" + id="g13" + inkscape:label="Yellow" + style="stroke-width:1.57472;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m -7.2464661,7.5557829 4.4623989,1.683774 3.8630671,-2.483018 4.6657906,1.0624365 3.4740871,3.9357916 4.4085404,-2.4503968 1.053245,-4.7487168 2.235,-0.077" + fill="none" + stroke="#f79e0f" + stroke-miterlimit="10" + id="path11" + style="stroke-width:1.57472;stroke-miterlimit:4;stroke-dasharray:none" + sodipodi:nodetypes="cccccccc" /></g><g + transform="matrix(1.332436,0,0,1.0673884,12.044914,20.992887)" + id="g17" + inkscape:label="Magenta" + style="stroke-width:1.41534;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 0,0 c 2.157,1.079 4.227,1.31 4.227,1.31 h 1.254 l 3.137,2.544 3.39,-4.083 0.848,-2.621 1.771,-1.386 4.238,2.773" + fill="none" + stroke="#f411b4" + stroke-miterlimit="10" + id="path15" + style="stroke-width:1.41534;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="translate(12.5,35)" + id="g21" /><g + transform="matrix(1.0718729,0,0,1.0718729,20.304589,9.7384755)" + id="Map" + inkscape:label="Map" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M -8.166,24.422 V 4.1442139" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path19" + style="stroke-width:1.04937774;stroke:#333333;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="m -0.154,20.031 v -20" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path27" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="m 8.012,24.423 v -20" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path31" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="m 15.87,20.186 v -20" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path35" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="m -8.166,24.422 8.012,-4.391" + fill="none" + stroke="#050001" + stroke-linecap="round" + stroke-miterlimit="10" + id="path39" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="m -0.154,20.031 8.166,4.392" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path43" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="M 7.935,24.5 15.87,20.186" + fill="none" + stroke="#050001" + stroke-linecap="round" + stroke-miterlimit="10" + id="path47" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="M 0,0 -8.166,4.1442139" + fill="none" + stroke="#050001" + stroke-linecap="round" + stroke-miterlimit="10" + id="path51" + style="stroke-width:1.04937774;stroke:#333333;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="M 8.09,4.623 -0.154,0.031" + fill="none" + stroke="#050001" + stroke-miterlimit="10" + id="path55" + style="stroke-width:1.04937774;stroke:#333333;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="M 15.907,0.366 7.895,4.68" + fill="none" + stroke="#050001" + stroke-linecap="round" + stroke-miterlimit="10" + id="path59" + style="stroke:#333333;stroke-opacity:1;stroke-width:1.04937774;stroke-miterlimit:4;stroke-dasharray:none" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/move.svg b/app/bin/bitmaps/SVG/move.svg new file mode 100644 index 0000000..9c1e906 --- /dev/null +++ b/app/bin/bitmaps/SVG/move.svg @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="move.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata57"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs55" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1250" + inkscape:window-height="856" + id="namedview53" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#CCCCCC;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#00FFFF;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#808080;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FB0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#808080;stroke-width:2;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FB0000;stroke-miterlimit:10;} + .st6{fill:none;stroke:#007CBF;stroke-miterlimit:10;} + .st7{fill:none;stroke:#007CBF;stroke-width:2;stroke-miterlimit:10;} + .st8{fill:none;stroke:#FF0B00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="44.622711" + y1="4.6662092" + x2="30.444595" + y2="4.6662092" + id="line4" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="11.110806" + x2="30.444595" + y2="11.110806" + id="line6" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="17.555403" + x2="30.444595" + y2="17.555403" + id="line8" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="24" + x2="30.444595" + y2="24" + id="line10" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="30.444595" + x2="30.444595" + y2="30.444595" + id="line12" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="36.889191" + x2="30.444595" + y2="36.889191" + id="line14" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="44.622711" + y1="43.33379" + x2="30.444595" + y2="43.33379" + id="line16" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="4.6662092" + x2="3.3772895" + y2="4.6662092" + id="line18" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="11.110806" + x2="3.3772895" + y2="11.110806" + id="line20" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="17.555403" + x2="3.3772895" + y2="17.555403" + id="line22" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="24" + x2="3.3772895" + y2="24" + id="line24" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="30.444595" + x2="3.3772895" + y2="30.444595" + id="line26" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="36.889191" + x2="3.3772895" + y2="36.889191" + id="line28" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st1" + x1="17.555403" + y1="43.33379" + x2="3.3772895" + y2="43.33379" + id="line30" + style="stroke:#00cccc;stroke-opacity:1" /> +<line + class="st2" + x1="41.411499" + y1="2.0883698" + x2="41.411499" + y2="45.911629" + id="line32" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<line + class="st2" + x1="33.655811" + y1="2.0883698" + x2="33.655811" + y2="45.911629" + id="line34" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<path + class="st3" + d="M 41.271518,38.04922" + id="path36" /> +<path + class="st4" + d="M 38.822572,24.773351" + id="path38" /> +<path + class="st5" + d="M 24.902243,36.502517" + id="path40" + style="stroke-width:1.28891" /> +<line + class="st6" + x1="14.344203" + y1="2.0883698" + x2="14.344203" + y2="45.911629" + id="line42" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#006699;stroke-opacity:1" /> +<line + class="st6" + x1="6.5884933" + y1="2.0883698" + x2="6.5884933" + y2="45.911629" + id="line44" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#006699;stroke-opacity:1" /> +<path + class="st7" + d="M 11.755265,24.773351" + id="path46" /> +<line + class="st8" + x1="11.05998" + y1="24" + x2="35.821922" + y2="24" + id="line48" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" /> +<polyline + class="st8" + points="30.5,18.7 34,23 30.5,27.2 " + id="polyline50" + transform="matrix(1.2889194,0,0,1.2889194,-6.9340656,-5.6451464)" + style="stroke:#cc0000;stroke-opacity:1;stroke-width:2.32753111;stroke-miterlimit:10;stroke-dasharray:none" /> +</svg> diff --git a/app/bin/bitmaps/SVG/new-car.svg b/app/bin/bitmaps/SVG/new-car.svg new file mode 100644 index 0000000..6b0d579 --- /dev/null +++ b/app/bin/bitmaps/SVG/new-car.svg @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="new-car.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><path + class="st2" + d="m 38.526196,43.498826 c 0,1.548439 -1.204339,2.924827 -2.924825,2.924827 -1.720486,0 -2.924824,-1.20434 -2.924824,-2.924827 0,-1.720483 1.204338,-2.924823 2.924824,-2.924823 1.720486,0 2.924825,1.376388 2.924825,2.924823 z" + id="path43-6" + style="fill:#000401;stroke-width:1.72048" /><metadata + id="metadata50"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs48" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1572" + inkscape:window-height="965" + id="namedview46" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.9991" + inkscape:cy="26.235289" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#808080;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000401;stroke-miterlimit:10;} + .st2{fill:#000401;} + .st3{fill:url(#SVGID_1_);} + .st4{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st5{fill:#006837;} + .st6{fill:#FFE53F;} + .st7{font-family:'MyriadPro-Regular';} + .st8{font-size:6px;} +</style> + + + + + + + + +<path + class="st2" + d="m 45.2912,43.597656 c 0,1.548438 -1.204341,2.924826 -2.924824,2.924826 -1.720486,0 -2.924826,-1.20434 -2.924826,-2.924826 0,-1.720484 1.20434,-2.924824 2.924826,-2.924824 1.720483,0 2.924824,1.376389 2.924824,2.924824 z" + id="path20" + style="stroke-width:1.72048" /> +<path + class="st0" + d="M 24,38.962932" + id="path22" /> +<path + class="st0" + d="M 25.382386,39.617018" + id="path24" /> +<linearGradient + id="SVGID_1_" + gradientUnits="userSpaceOnUse" + x1="24.5506" + y1="21.5" + x2="30.4868" + y2="21.5" + gradientTransform="matrix(0,1.0571338,-1.0571338,0,51.676842,-1.8693808)"> + <stop + offset="2.455360e-02" + style="stop-color:#006837" + id="stop26" /> + <stop + offset="0.4355" + style="stop-color:#22B573" + id="stop28" /> + <stop + offset="1" + style="stop-color:#006837" + id="stop30" /> +</linearGradient> + + +<rect + x="0.73099327" + y="22.401167" + class="st5" + width="46.538013" + height="17.518068" + id="rect37" + style="fill:#682b00;fill-opacity:1;stroke-width:4.12121" /> +<path + class="st2" + d="m 8.5584483,43.498826 c 0,1.548439 -1.2043403,2.924827 -2.9248258,2.924827 -1.5484359,0 -2.924824,-1.20434 -2.924824,-2.924827 0,-1.720483 1.2043395,-2.924823 2.924824,-2.924823 1.7204855,0.172046 2.9248258,1.376387 2.9248258,2.924823 z" + id="path39" + style="stroke-width:1.72048" /> + +<path + class="st2" + d="m 15.30658,43.498826 c 0,1.548439 -1.204339,2.924827 -2.924825,2.924827 -1.720486,0 -2.9248239,-1.20434 -2.9248239,-2.924827 0,-1.720483 1.2043379,-2.924823 2.9248239,-2.924823 1.720486,0 2.924825,1.376387 2.924825,2.924823 z" + id="path43" + style="stroke-width:1.72048" /> +<g + id="plus" + transform="matrix(1.2462413,0,0,1.2160392,-46.375085,-20.168954)" + inkscape:label="plus"><path + style="display:inline;fill:#005a20;fill-opacity:1;stroke:#00993d;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 46.809533,31.077554 v -4.700241 h 4.630089 v -3.086726 l -4.559936,0.07015 -0.07015,-4.559936 h -3.016572 l 0.140305,4.559936 -4.840547,0.07015 0.07015,3.086726 4.489783,-0.07015 0.140306,4.630088 z" + id="path1718" /><path + style="fill:none;fill-opacity:1;stroke:#00e552;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 45.350068,18.723791 V 31.070694" + id="path1702" /><path + style="fill:none;fill-opacity:1;stroke:#00e552;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 51.516636,24.897242 H 39.169733" + id="path1708" /></g></svg> diff --git a/app/bin/bitmaps/SVG/ok.svg b/app/bin/bitmaps/SVG/ok.svg new file mode 100644 index 0000000..21e0640 --- /dev/null +++ b/app/bin/bitmaps/SVG/ok.svg @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + xml:space="preserve" + sodipodi:docname="ok.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + width="48" + height="48" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata11"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs9" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1401" + inkscape:window-height="811" + id="namedview7" + showgrid="false" + inkscape:zoom="9.7408644" + inkscape:cx="22.174623" + inkscape:cy="23.355217" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#097F00;stroke-width:2;stroke-miterlimit:10;} +</style> + +<path + style="fill:#008000;fill-opacity:1;stroke:#008000;stroke-width:1.30233px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 3.0826295,28.723525 10.666902,43.233332 C 22.340221,30.869786 34.794469,17.623547 44.780402,6.3860722 L 42.743187,4.5399005 11.781047,33.436651 5.2533982,26.115272 Z" + id="path831" + sodipodi:nodetypes="ccccccc" /></svg> diff --git a/app/bin/bitmaps/SVG/pan-zoom.svg b/app/bin/bitmaps/SVG/pan-zoom.svg new file mode 100644 index 0000000..7597072 --- /dev/null +++ b/app/bin/bitmaps/SVG/pan-zoom.svg @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="pan-zoom.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata21"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs19" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1716" + inkscape:window-height="966" + id="namedview17" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FC0000;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#FC0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="24.187614" + y1="4.7648048" + x2="24.333876" + y2="43.122051" + id="line4" + style="stroke-width:3.48405;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" /> +<polyline + class="st1" + points="19.1,13.9 24,11 29,13.9 " + id="polyline6" + style="stroke-width:2.40355;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" + transform="matrix(1.4625985,0,0,1.4497843,-10.91475,-11.182822)" /> +<polyline + class="st1" + points="29,34.4 24.1,37.7 19.1,34 " + id="polyline8" + style="stroke-width:2.40355;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" + transform="matrix(1.4625985,0,0,1.4497843,-10.914749,-11.534816)" /> +<line + class="st0" + x1="43.640171" + y1="23.26" + x2="4.2990675" + y2="23.26" + id="line10" + style="stroke-width:3.49339;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" /> +<polyline + class="st1" + points="33.8,18.9 37.3,24 33.8,28.7 " + id="polyline12" + style="stroke-width:2.40355;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" + transform="matrix(1.4625985,0,0,1.4497843,-10.914754,-11.534822)" /> +<polyline + class="st1" + points="13.2,28.7 10,24 13.2,18.9 " + id="polyline14" + style="stroke-width:2.40355;stroke-miterlimit:10;stroke-dasharray:none;stroke:#cc0000;stroke-opacity:1" + transform="matrix(1.4625985,0,0,1.4497843,-10.326917,-11.534822)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/parallel-line.svg b/app/bin/bitmaps/SVG/parallel-line.svg new file mode 100644 index 0000000..ad96c16 --- /dev/null +++ b/app/bin/bitmaps/SVG/parallel-line.svg @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg984" + sodipodi:docname="parallel-line.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><defs + id="defs988" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1370" + inkscape:window-height="912" + id="namedview986" + showgrid="false" + inkscape:zoom="10.067426" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg984" + inkscape:document-rotation="0" + inkscape:snap-nodes="true" /><metadata + id="metadata932"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><g + transform="matrix(1.6925211,0,0,-1.6925211,6.6484707,37.41986)" + id="g936" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path934" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,15.111076,37.41986)" + id="g940" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path938" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,23.573681,37.41986)" + id="g944" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path942" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,32.036287,37.41986)" + id="g948" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path946" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,40.498892,37.41986)" + id="g952" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path950" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,48.961496,37.41986)" + id="g956" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path954" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,57.424102,37.41986)" + id="g960" + style="stroke:#d98b0d;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path958" + style="stroke:#d98b0d;stroke-opacity:1" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,3.2634283,40.967375)" + id="g964" + style="stroke-width:1.47709;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 H 34" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path962" + style="stroke-width:1.47709;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,3.2634283,52.490076)" + id="g968" + style="stroke-width:1.47709;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 H 34" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path966" + style="stroke-width:1.47709;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(1.7072491,0,0,-1.6925211,2.9767653,9.2070031)" + id="g972" + style="stroke-width:1.4707;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 H 34" + fill="none" + stroke="#666666" + stroke-miterlimit="10" + id="path970" + style="stroke-width:1.4707;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(1.6925211,0,0,-1.6925211,32.462802,31.754138)" + id="g980" + style="stroke:#cc0000;stroke-width:1.7725;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"><path + d="m -3.748,6.996 3.589,3.031 3.907,-3.031" + fill="none" + stroke="#666666" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path974" + style="stroke:#cc0000;stroke-width:1.7725;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="M -0.11709878,-1.600565 -0.159,10.027" + fill="none" + stroke="#666666" + stroke-miterlimit="10" + stroke-width="2" + id="path978" + style="stroke:#cc0000;stroke-width:1.7725;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/parallel.svg b/app/bin/bitmaps/SVG/parallel.svg new file mode 100644 index 0000000..9ff2898 --- /dev/null +++ b/app/bin/bitmaps/SVG/parallel.svg @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="parallel.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata49"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs47" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1377" + inkscape:window-height="908" + id="namedview45" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#B3B3B3;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#666666;stroke-miterlimit:10;} + .st4{fill:none;stroke:#666666;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} + .st5{fill:none;stroke:#666666;stroke-width:2;stroke-miterlimit:10;} +</style> + + + + + + +<g + id="g3886" + inkscape:label="ties" + transform="matrix(1.3222423,0,0,1.3222423,-6.4115729,-7.7338152)"><line + class="st0" + x1="8" + y1="30" + x2="8" + y2="41" + id="line4" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="13" + y1="30" + x2="13" + y2="41" + id="line6" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="18" + y1="30" + x2="18" + y2="41" + id="line8" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="23" + y1="30" + x2="23" + y2="41" + id="line10" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="28" + y1="30" + x2="28" + y2="41" + id="line12" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="33" + y1="30" + x2="33" + y2="41" + id="line14" + style="stroke:#d98b0d;stroke-opacity:1" /><line + class="st0" + x1="38" + y1="30" + x2="38" + y2="41" + id="line16" + style="stroke:#d98b0d;stroke-opacity:1" /></g> + + + + + + +<g + id="g3877" + inkscape:label="newties" + transform="matrix(1.3222423,0,0,1.3222423,-6.4115729,-7.7338152)"><line + class="st1" + x1="8" + y1="7" + x2="8" + y2="18" + id="line18" /><line + class="st1" + x1="13" + y1="7" + x2="13" + y2="18" + id="line20" /><line + class="st1" + x1="18" + y1="7" + x2="18" + y2="18" + id="line22" /><line + class="st1" + x1="23" + y1="7" + x2="23" + y2="18" + id="line24" /><line + class="st1" + x1="28" + y1="7" + x2="28" + y2="18" + id="line26" /><line + class="st1" + x1="33" + y1="7" + x2="33" + y2="18" + id="line28" /><line + class="st1" + x1="38" + y1="7" + x2="38" + y2="18" + id="line30" /></g> + +<g + id="g3868" + inkscape:label="rails" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" + transform="matrix(1.3222423,0,0,1.3222423,-6.4115729,-7.7338152)"><line + class="st2" + x1="6" + y1="32.096252" + x2="40" + y2="32.096252" + id="line32" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" /><line + class="st2" + x1="6" + y1="38.903748" + x2="40" + y2="38.903748" + id="line34" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" /></g> + +<g + id="g3864" + inkscape:label="newrails" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" + transform="matrix(1.3222423,0,0,1.3222423,-6.4115729,-7.7338152)"><line + class="st3" + x1="6" + y1="9.0962601" + x2="40" + y2="9.0962601" + id="line36" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" /><line + class="st3" + x1="6" + y1="15.903746" + x2="40" + y2="15.903746" + id="line38" + style="stroke-width:1.51258207;stroke-miterlimit:4;stroke-dasharray:none" /></g> + +<g + id="g3860" + inkscape:label="arrow" + transform="matrix(1.3222423,0,0,1.2064572,-9.2563108,-4.2091511)" + style="stroke-width:2.37525243;stroke-miterlimit:4;stroke-dasharray:none"><polyline + class="st4" + points="21.5,22 25.1,19 29,22 " + id="polyline40" + style="stroke:#cc0000;stroke-width:2.37525243;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><line + class="st5" + x1="25.18976" + y1="28.910158" + x2="25.210243" + y2="19.008156" + id="line42" + style="stroke:#cc0000;stroke-width:2.37525243;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/parameter.svg b/app/bin/bitmaps/SVG/parameter.svg new file mode 100644 index 0000000..b686804 --- /dev/null +++ b/app/bin/bitmaps/SVG/parameter.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="parameter.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1583" + inkscape:window-height="943" + id="namedview1661" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="26.519366" + inkscape:cy="32.446506" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layout" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /><g + id="Layout" + inkscape:label="#layout" + transform="translate(-0.22803691,0.91214765)" + style="opacity:1"><path + id="path898" + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + inkscape:transform-center-x="-0.1143859" + inkscape:transform-center-y="-4.2708698" + d="M 59.32533,61.337659 5.9038154,61.449698 5.7270967,0.60270433 46.825508,0.61736905 59.16559,16.95766 Z" + sodipodi:nodetypes="cccccc" /><g + id="turnout" + transform="matrix(2.1121492,0,0,2.2798074,-12.340801,-30.573867)" + style="stroke-width:1.59499;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000000;stroke-opacity:1"><path + style="fill:none;stroke:#000000;stroke-width:1.59499;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 12.81557,34.039644 H 28.091703" + id="path845" /><path + style="fill:none;stroke:#000000;stroke-width:1.59499;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 17.337306,33.917434 10.265561,4.399527" + id="path847" /></g><g + id="crossing" + transform="matrix(2.3270806,0,0,1.9276329,-15.980833,-17.606493)" + style="stroke-width:1.6525331;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000000;stroke-opacity:1"><path + style="fill:none;stroke:#000000;stroke-width:1.6525331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13.163424,23.712979 26.60642,30.312268" + id="path849" /><path + style="fill:none;stroke:#000000;stroke-width:1.6525331;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13.163424,30.312268 26.60642,23.712979" + id="path849-6" /></g><path + style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 14.173579,8.3757435 H 46.722598" + id="path871" /><path + style="fill:none;stroke:#000000;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 14.812247,21.881628 c 4.935235,-0.244284 9.400841,0.209247 16.447704,-1.442779 6.721987,-1.517667 11.358856,-3.77303 15.004917,-6.059679" + id="path873" + sodipodi:nodetypes="ccc" /></g></svg> diff --git a/app/bin/bitmaps/SVG/paste.svg b/app/bin/bitmaps/SVG/paste.svg new file mode 100644 index 0000000..7d089d6 --- /dev/null +++ b/app/bin/bitmaps/SVG/paste.svg @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1659" + sodipodi:docname="paste.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1665"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1663" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1571" + inkscape:window-height="866" + id="namedview1661" + showgrid="false" + inkscape:zoom="9.4049726" + inkscape:cx="25.305762" + inkscape:cy="32.961287" + inkscape:window-x="18" + inkscape:window-y="57" + inkscape:window-maximized="0" + inkscape:current-layer="svg1659" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Export" /><g + id="g4827" + transform="translate(-2.6581678)"><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900" + width="53.616257" + height="49.753304" + x="6.1005993" + y="-54.885616" + transform="rotate(90)" + ry="4.0444236" /><path + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 21.602,5.9844217 4.044423,-4.5066434 10.399946,0.1155549 3.582205,4.3910885 -4.391089,2.4266544 h -9.128841 z" + id="path1105" + sodipodi:nodetypes="ccccccc" /></g><rect + style="fill:#f5f5f5;fill-opacity:1;stroke:#666666;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect900-2" + width="46.623814" + height="43.264656" + x="15.452703" + y="-61.785542" + transform="rotate(90)" /></svg> diff --git a/app/bin/bitmaps/SVG/polygon.svg b/app/bin/bitmaps/SVG/polygon.svg new file mode 100644 index 0000000..f8aa925 --- /dev/null +++ b/app/bin/bitmaps/SVG/polygon.svg @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="polygon.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata13"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs11" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1240" + inkscape:window-height="757" + id="namedview9" + showgrid="false" + inkscape:zoom="10.17006" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} +</style> +<polygon + class="st0" + points="24.7,39.8 11.8,32.9 7.4,19.8 10.9,10 28.2,7.8 39.7,20.1 40,36.5 " + id="polygon4" + transform="matrix(1.3091076,0,0,1.3091076,-6.997444,-7.1557037)" + style="stroke-width:1.90969787;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st0" + d="M3.5,28.2" + id="path6" /> +</svg> diff --git a/app/bin/bitmaps/SVG/polyline.svg b/app/bin/bitmaps/SVG/polyline.svg new file mode 100644 index 0000000..695bad9 --- /dev/null +++ b/app/bin/bitmaps/SVG/polyline.svg @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg872" + sodipodi:docname="polyline.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1429" + inkscape:window-height="896" + id="namedview874" + showgrid="false" + inkscape:zoom="8.7705101" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg872" /><metadata + id="metadata857"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs862"><clipPath + id="clipPath2763"><path + d="m0 48h48v-48h-48z" + id="path859" /></clipPath></defs><g + transform="matrix(1.8687667,0,0,-1.8687667,-15.81141,77.501638)" + id="g870" + style="stroke-width:1.60533682;stroke-miterlimit:4;stroke-dasharray:none"><g + clip-path="url(#clipPath2763)" + id="g868" + style="stroke-width:1.60533682;stroke-miterlimit:4;stroke-dasharray:none"><g + transform="translate(25.224,30.046)" + id="g866" + style="stroke-width:1.60533682;stroke-miterlimit:4;stroke-dasharray:none"><path + d="m 0,0 -14.638,5.47 2.619,-14.176 8.783,-10.554 12.481,2.003 c 0,0 6.626,11.402 6.24,12.943 C 15.1,-2.773 12.635,6.24 10.4,8.012" + fill="none" + stroke="#0c0cf2" + stroke-miterlimit="10" + id="path864" + style="stroke-width:1.60533682;stroke-miterlimit:4;stroke-dasharray:none" /></g></g></g></svg> diff --git a/app/bin/bitmaps/SVG/profile.svg b/app/bin/bitmaps/SVG/profile.svg new file mode 100644 index 0000000..9f76546 --- /dev/null +++ b/app/bin/bitmaps/SVG/profile.svg @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="profile.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata41"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs39" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1372" + inkscape:window-height="907" + id="namedview37" + showgrid="false" + inkscape:zoom="8.8544831" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:#0080FA;} + .st2{fill:none;stroke:#000402;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="5.0116086" + y1="37.121544" + x2="42.718517" + y2="37.121544" + id="line4" + style="stroke-width:2.25366;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st0" + x1="6.185358" + y1="37.208576" + x2="6.185358" + y2="8.1140652" + id="line6" + style="stroke-width:2.15515;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st0" + x1="41.571243" + y1="14.579512" + x2="41.571243" + y2="37.208576" + id="line8" + style="stroke-width:2.15515;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st0" + x1="46.507366" + y1="26.432833" + x2="46.507366" + y2="26.432833" + id="line10" + style="stroke-width:1.07757" /> +<polygon + class="st1" + points="12,10 9,12 9,38 40,38 40,18 30.3,16 20.7,21.2 14.4,10 " + id="polygon12" + style="fill:#80deff;fill-opacity:1;stroke:#000000;stroke-opacity:1" + transform="matrix(1.1414801,0,0,1.1160593,-4.0879632,-5.2016771)" /> +<line + class="st2" + x1="17.673576" + y1="38.11208" + x2="17.673576" + y2="40.771732" + id="line14" + style="stroke-width:2.15515;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="24.50412" + y1="38.11208" + x2="24.50412" + y2="42.944588" + id="line16" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="31.31695" + y1="38.11208" + x2="31.31695" + y2="40.771732" + id="line18" + style="stroke-width:2.15515;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="37.538998" + y1="38.11208" + x2="37.538998" + y2="42.944588" + id="line20" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="10.599646" + y1="38.11208" + x2="10.599646" + y2="42.944588" + id="line22" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="5.6115265" + y1="23.738895" + x2="1.2658093" + y2="23.738895" + id="line24" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="5.6115265" + y1="15.848494" + x2="1.2658093" + y2="15.848494" + id="line26" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="5.6115265" + y1="31.281918" + x2="1.2658093" + y2="31.281918" + id="line28" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="41.919395" + y1="23.738895" + x2="46.734192" + y2="23.738895" + id="line30" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="41.919395" + y1="15.848494" + x2="46.734192" + y2="15.848494" + id="line32" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="41.919395" + y1="31.281918" + x2="46.734192" + y2="31.281918" + id="line34" + style="stroke-width:2.69394;stroke-miterlimit:10;stroke-dasharray:none" /> +</svg> diff --git a/app/bin/bitmaps/SVG/protractor.svg b/app/bin/bitmaps/SVG/protractor.svg new file mode 100644 index 0000000..6e7d141 --- /dev/null +++ b/app/bin/bitmaps/SVG/protractor.svg @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg23" + sodipodi:docname="protractor.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata27"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1435" + inkscape:window-height="889" + id="namedview25" + showgrid="false" + inkscape:zoom="10.074671" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g21" + inkscape:document-rotation="0" /><defs + id="defs5"><clipPath + id="clipPath3087"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(1.7785911,0,0,-1.6794204,-11.160353,74.070498)" + id="g21" + style="stroke-width:1.87505;stroke-miterlimit:10;stroke-dasharray:none"><path + d="m 23.226933,28.885907 c 3.173396,-4.144399 4.632596,-9.927034 3.505034,-15.812632" + fill="none" + stroke="#000202" + stroke-miterlimit="10" + id="path15" + style="stroke:#cc0000;stroke-width:1.96532;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><g + transform="matrix(1.1322171,0,0,1.1322171,9.0014797,17.025451)" + id="g13" + style="stroke-width:2.02512;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 24.037,21.417" + fill="none" + stroke="#000202" + stroke-linecap="round" + stroke-miterlimit="10" + id="path7" + style="stroke-width:2.02512;stroke-miterlimit:4;stroke-dasharray:none" /><path + d="M 0,0 26.965,-7.241" + fill="none" + stroke="#000202" + stroke-linecap="round" + stroke-miterlimit="10" + id="path11" + style="stroke-width:2.02512;stroke-miterlimit:4;stroke-dasharray:none" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/redo.svg b/app/bin/bitmaps/SVG/redo.svg new file mode 100644 index 0000000..77c8cb8 --- /dev/null +++ b/app/bin/bitmaps/SVG/redo.svg @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="redo.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1493"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1491" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1306" + inkscape:window-height="882" + id="namedview1489" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" /> +<style + type="text/css" + id="style1484"> + .st0{fill:#05FB08;stroke:#05B70D;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 8.2406449,43.164807 c -1.2578731,0.107338 -1.1320851,0.107338 -3.522044,0.107338 0,-12.343861 3.8994068,-31.55735 23.8995881,-31.879363 0.251575,-3.0054618 0.125788,-5.9035856 0.125788,-5.9035856 L 42.58058,14.290906 28.240827,24.273333 c 0,0 0.251575,-2.468773 0.251575,-6.010924 C 14.655799,18.155071 8.8695815,34.363097 8.2406449,43.164807 Z" + id="path1486" + style="stroke:#05610a;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/reflect.svg b/app/bin/bitmaps/SVG/reflect.svg new file mode 100644 index 0000000..837743c --- /dev/null +++ b/app/bin/bitmaps/SVG/reflect.svg @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="reflect.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata17"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs15" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1482" + inkscape:window-height="919" + id="namedview13" + showgrid="false" + inkscape:zoom="13.407886" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:#009DFC;stroke:#00A2FF;stroke-miterlimit:10;} + .st2{fill:#000302;stroke:#000301;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="23.787764" + y1="4.1941996" + x2="23.787764" + y2="43.805801" + id="line4" + style="stroke-width:2.67646;stroke-miterlimit:10;stroke-dasharray:none" /> +<polygon + class="st1" + points="12.5,14.3 22.4,22.2 12.5,31.2 " + id="polygon6" + transform="matrix(1.7907987,0,0,1.6722454,-19.336302,-14.284334)" + style="fill:#80ddff;fill-opacity:1;stroke:#009ccc;stroke-width:1.23731;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + + +<polygon + class="st1" + points="12.5,31.2 12.5,14.3 22.4,22.2 " + id="polygon6-1" + transform="matrix(-1.8394632,0,0,1.6722454,67.929658,-14.366529)" + style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:1.2207342;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></svg> diff --git a/app/bin/bitmaps/SVG/rotate.svg b/app/bin/bitmaps/SVG/rotate.svg new file mode 100644 index 0000000..2c788f2 --- /dev/null +++ b/app/bin/bitmaps/SVG/rotate.svg @@ -0,0 +1,222 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="rotate.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata2761"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs2759"><marker + style="overflow:visible" + id="Arrow1Lstart" + refX="0.0" + refY="0.0" + orient="auto" + inkscape:stockid="Arrow1Lstart" + inkscape:isstock="true"><path + transform="scale(0.8) translate(12.5,0)" + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + id="path3324" /></marker></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1233" + inkscape:window-height="778" + id="namedview2757" + showgrid="false" + inkscape:zoom="10.149695" + inkscape:cx="24" + inkscape:cy="24.868298" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2696"> + .st0{fill:none;stroke:#00FFFF;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#B3B3B3;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#808080;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FB0000;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#808080;stroke-width:2;stroke-miterlimit:10;} + .st5{fill:none;stroke:#FB0000;stroke-miterlimit:10;} + .st6{fill:none;stroke:#007CBF;stroke-miterlimit:10;} + .st7{fill:none;stroke:#007CBF;stroke-width:2;stroke-miterlimit:10;} + .st8{fill:none;stroke:#FF0B00;stroke-miterlimit:10;} + .st9{fill:none;stroke:#FF0B00;stroke-miterlimit:10;stroke-dasharray:3.0709,1.0236;} +</style> + + +<line + class="st1" + x1="9.1349277" + y1="33.106369" + x2="9.1349277" + y2="45.627636" + id="line2702" /><line + class="st1" + x1="14.82641" + y1="33.106369" + x2="14.82641" + y2="45.627636" + id="line2704" /><line + class="st0" + x1="14.82641" + y1="33.106369" + x2="2.3051486" + y2="33.106369" + id="line2698" /><line + class="st0" + x1="14.82641" + y1="38.797855" + x2="2.3051486" + y2="38.797855" + id="line2700" /> + +<line + class="st1" + x1="20.517897" + y1="33.106369" + x2="20.517897" + y2="45.627636" + id="line2706" /> +<line + class="st1" + x1="26.209379" + y1="33.106369" + x2="26.209379" + y2="45.627636" + id="line2708" /> +<line + class="st1" + x1="31.90086" + y1="33.106369" + x2="31.90086" + y2="45.627636" + id="line2710" /> +<line + class="st1" + x1="37.592346" + y1="33.106369" + x2="37.592346" + y2="45.627636" + id="line2712" /> +<line + class="st1" + x1="43.283829" + y1="33.106369" + x2="43.283829" + y2="45.627636" + id="line2714" /> +<line + class="st0" + x1="14.82641" + y1="4.6489568" + x2="2.3051486" + y2="4.6489568" + id="line2716" /> +<line + class="st0" + x1="14.82641" + y1="10.340441" + x2="2.3051486" + y2="10.340441" + id="line2718" /> +<line + class="st0" + x1="14.82641" + y1="16.031925" + x2="2.3051486" + y2="16.031925" + id="line2720" /> +<line + class="st0" + x1="14.82641" + y1="21.723406" + x2="2.3051486" + y2="21.723406" + id="line2722" /> +<line + class="st0" + x1="14.82641" + y1="27.41489" + x2="2.3051486" + y2="27.41489" + id="line2724" /> +<line + class="st2" + x1="6.736856" + y1="35.694492" + x2="45.438927" + y2="35.694492" + id="line2726" + style="stroke-width:2.13106;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="6.736856" + y1="43.039513" + x2="45.438927" + y2="43.039513" + id="line2728" + style="stroke-width:2.13106;stroke-miterlimit:10;stroke-dasharray:none" /> + + + +<line + class="st6" + x1="12.336152" + y1="2.3723636" + x2="12.336152" + y2="41.074448" + id="line2736" + style="stroke-width:2.13106;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st6" + x1="4.7954087" + y1="2.3723636" + x2="4.7954087" + y2="41.074448" + id="line2738" + style="stroke-width:2.13106;stroke-miterlimit:10;stroke-dasharray:none" /> + +<polyline + class="st8" + points="41.5,29.4 38.7,32.7 35.5,30.3 " + id="polyline2742" + transform="matrix(1.8851067,0,0,1.8883999,-33.551788,-29.337542)" + style="stroke:#cc0b00;stroke-width:1.41186;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<g + id="g2752" + transform="matrix(1.1779068,0,0,1.1779068,5.2536547,-23.041577)" + style="stroke-width:1.80919;stroke-miterlimit:10;stroke-dasharray:none"> + +<path + style="fill:none;stroke:#cc0b00;stroke-width:1.80919;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:1.80919, 3.61838;stroke-dashoffset:0;stroke-opacity:1" + d="M 3.3893843,52.169989 21.828525,33.73085 Z" + id="path3594" /></g> +<path + class="st8" + d="m 39.448981,32.460276 c 0,-13.400725 -10.544803,-24.1671205 -23.620358,-24.1671205" + id="path2754" + style="stroke:#cc0b00;stroke-width:2.57224;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/ruler.svg b/app/bin/bitmaps/SVG/ruler.svg new file mode 100644 index 0000000..8cb140b --- /dev/null +++ b/app/bin/bitmaps/SVG/ruler.svg @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg23" + sodipodi:docname="ruler.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata27"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1418" + inkscape:window-height="889" + id="namedview25" + showgrid="false" + inkscape:zoom="5.3929307" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g21" + inkscape:document-rotation="0" /><defs + id="defs5"><clipPath + id="clipPath3087"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + transform="matrix(1.7785911,0,0,-1.6794204,-11.160353,74.070498)" + id="g21" + style="stroke-width:1.87505;stroke-miterlimit:10;stroke-dasharray:none"><g + transform="matrix(1.0365883,0,0,1.0433909,8.8192947,19.603103)" + id="g13" + style="stroke:#000000;stroke-width:1.73582;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"><path + d="M 0,0 26.965,-7.241" + fill="none" + stroke="#000202" + stroke-linecap="round" + stroke-miterlimit="10" + id="path11" + style="stroke:#000000;stroke-width:1.73582;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><path + style="fill:none;stroke:#000000;stroke-width:2.02245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="M 8.8192947,19.603103 11.884169,31.716802" + id="path839" /><path + style="fill:none;stroke:#000000;stroke-width:1.3483;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 16.074124,18.233402 1.816694,7.180356" + id="path843" /><path + style="fill:none;stroke:#000000;stroke-width:1.3483;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 23.140586,16.315597 1.816694,7.180357" + id="path843-1" /><path + style="fill:none;stroke:#000000;stroke-width:1.3483;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 30.106721,14.643225 1.816694,7.180355" + id="path843-3" /><path + style="fill:none;stroke:#000000;stroke-width:2.02245;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 36.770897,12.047909 3.064874,12.113699" + id="path839-0" /><text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.3819px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold';stroke-width:1.26406" + x="34.666809" + y="-27.718275" + id="text905" + transform="scale(0.97172116,-1.0291018)"><tspan + sodipodi:role="line" + id="tspan903" + x="34.666809" + y="-27.718275" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.3819px;font-family:Arial;-inkscape-font-specification:'Arial Bold';stroke-width:1.26406">1</tspan></text></g></svg> diff --git a/app/bin/bitmaps/SVG/select.svg b/app/bin/bitmaps/SVG/select.svg new file mode 100644 index 0000000..bb81e69 --- /dev/null +++ b/app/bin/bitmaps/SVG/select.svg @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="select.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata33"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs31" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1386" + inkscape:window-height="955" + id="namedview29" + showgrid="false" + inkscape:zoom="10.17006" + inkscape:cx="24.041157" + inkscape:cy="24.82778" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#FB0000;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#FB0000;stroke-miterlimit:10;} + .st4{fill:none;stroke:#FB0000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="3.8428819" + y1="9.4009237" + x2="3.8428819" + y2="24.094875" + id="line4" + style="stroke:#d98a0d;stroke-opacity:1" /> +<line + class="st0" + x1="10.521953" + y1="9.4009237" + x2="10.521953" + y2="24.094875" + id="line6" + style="stroke:#d98a0d;stroke-opacity:1" /> +<line + class="st0" + x1="17.201021" + y1="9.4009237" + x2="17.201021" + y2="24.094875" + id="line8" + style="stroke:#d98a0d;stroke-opacity:1" /> +<line + class="st0" + x1="23.880093" + y1="9.4009237" + x2="23.880093" + y2="15.831297" + id="line10" + style="stroke:#d98a0d;stroke-width:2.67163;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<line + class="st0" + x1="30.55916" + y1="9.4009237" + x2="30.55916" + y2="15.930859" + id="line12" + style="stroke:#d98a0d;stroke-width:2.67163;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<line + class="st0" + x1="37.238239" + y1="9.4009237" + x2="37.238239" + y2="24.094875" + id="line14" + style="stroke:#d98a0d;stroke-opacity:1" /> +<line + class="st0" + x1="43.917309" + y1="9.4009237" + x2="43.917309" + y2="24.094875" + id="line16" + style="stroke:#d98a0d;stroke-opacity:1" /> +<line + class="st1" + x1="1.1712544" + y1="12.300144" + x2="46.588936" + y2="12.300144" + id="line18" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="1.1712544" + y1="21.195667" + x2="19.110044" + y2="21.195667" + id="line20" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> + +<path + class="st3" + d="M 26.150977,30.3732" + id="path24" + style="stroke-width:1.33581" /> +<g + id="g837" + style="stroke-width:3.5;stroke-miterlimit:10;stroke-dasharray:none"><line + class="st2" + x1="22.168528" + y1="19.00256" + x2="41.137093" + y2="37.436787" + id="line22" + style="stroke:#cc0000;stroke-width:3.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><polyline + class="st4" + points="25,27 25,21 31,21 " + id="polyline26" + transform="matrix(1.6296104,0,0,1.6296104,-18.571732,-15.219259)" + style="stroke:#cc0000;stroke-width:2.14775262;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g> +<line + class="st1" + x1="34.266258" + y1="21.381462" + x2="46.828747" + y2="21.381462" + id="line20-0" + style="fill:none;stroke:#000000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /></svg> diff --git a/app/bin/bitmaps/SVG/sensor.svg b/app/bin/bitmaps/SVG/sensor.svg new file mode 100644 index 0000000..4188f0e --- /dev/null +++ b/app/bin/bitmaps/SVG/sensor.svg @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg23" + sodipodi:docname="sensor.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata27"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1373" + inkscape:window-height="946" + id="namedview25" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="32.018774" + inkscape:cy="32.018774" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg23" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath3145"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + id="g871" + transform="matrix(1.8592806,0,0,1.8552804,-25.548253,-31.252843)" + style="stroke-width:2.02496;stroke-miterlimit:4;stroke-dasharray:none"><g + transform="matrix(1.3333,0,0,-1.3333,46.462838,34.094081)" + id="g9" + style="stroke:#689b90;stroke-width:1.51876;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path + d="m 0,0 c 0,6.425 -5.208,11.634 -11.633,11.634 -6.425,0 -11.634,-5.209 -11.634,-11.634 0,-6.425 5.209,-11.633 11.634,-11.633 C -5.208,-11.633 0,-6.425 0,0" + fill="#11f2e7" + id="path7" + style="fill:#0ac1b8;fill-opacity:1;stroke:#527a70;stroke-width:1.51876;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(1.1442058,0,0,-1.4775492,20.568595,23.358673)" + id="g13" + style="stroke-width:1.55738;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 18.259,-14.407" + fill="none" + stroke="#ffffff" + stroke-miterlimit="10" + id="path11" + style="stroke-width:1.55738;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.3611188,0,0,-1.2178976,20.89688,45.032578)" + id="g17" + style="stroke-width:1.57277;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 14.946,17.951" + fill="none" + stroke="#ffffff" + stroke-miterlimit="10" + id="path15" + style="stroke-width:1.57277;stroke-miterlimit:4;stroke-dasharray:none" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/signal.svg b/app/bin/bitmaps/SVG/signal.svg new file mode 100644 index 0000000..ad01427 --- /dev/null +++ b/app/bin/bitmaps/SVG/signal.svg @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg27" + sodipodi:docname="signal.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata31"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1380" + inkscape:window-height="872" + id="namedview29" + showgrid="false" + inkscape:zoom="9.3956422" + inkscape:cx="31.982912" + inkscape:cy="35.016233" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g874" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs5"><clipPath + id="clipPath3381"><path + d="m0 48h48v-48h-48z" + id="path2" /></clipPath></defs><g + id="g874" + transform="matrix(1.7022641,0,0,1.5657944,-23.33414,-16.680089)"><g + transform="matrix(1.4338911,0,0,-1.6744946,21.752018,49.515943)" + id="g9" + style="stroke-width:1.50004;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 0,0 H 15" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path7" + style="stroke-width:1.50004;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + transform="matrix(1.6744946,0,0,-1.486785,32.699606,21.389291)" + id="g13" + style="stroke-width:1.50004;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M -0.14054799,-2.5566826 -0.09045201,-19.03" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path11" + style="stroke-width:1.47008;stroke-miterlimit:4;stroke-dasharray:none" /></g><g + clip-path="url(#clipPath3381)" + id="g23" + transform="matrix(2.1918574,0,0,-2.4227971,-21.664458,94.940764)"><g + transform="translate(27.604,31.282)" + id="g17"><path + d="m 0,0 c 0,-1.489 -1.294,-2.697 -2.89,-2.697 -1.595,0 -2.889,1.208 -2.889,2.697 0,1.489 1.294,2.696 2.889,2.696 C -1.294,2.696 0,1.489 0,0" + fill="#f40f3b" + id="path15" /></g><g + transform="translate(27.604,31.282)" + id="g21"><path + d="m 0,0 c 0,-1.489 -1.294,-2.697 -2.89,-2.697 -1.595,0 -2.889,1.208 -2.889,2.697 0,1.489 1.294,2.696 2.889,2.696 C -1.294,2.696 0,1.489 0,0 Z" + fill="none" + stroke="#020000" + stroke-miterlimit="10" + id="path19" /></g></g></g></svg> diff --git a/app/bin/bitmaps/SVG/snap-curs.svg b/app/bin/bitmaps/SVG/snap-curs.svg new file mode 100644 index 0000000..fa700ce --- /dev/null +++ b/app/bin/bitmaps/SVG/snap-curs.svg @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="snap-curs.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata73"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs71" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1525" + inkscape:window-height="969" + id="namedview69" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="23.969375" + inkscape:cy="24.012177" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:snap-nodes="true" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FFFFFF;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:none;} + .st2{fill:#231F20;} +</style> +<path + class="st0" + d="m 28.485161,24.116161 c 0,2.446994 -1.922639,4.544418 -4.54442,4.544418 -2.446995,0 -4.544418,-1.922639 -4.544418,-4.544418 0,-2.446995 1.922639,-4.544418 4.544418,-4.544418 2.446995,0.174783 4.54442,2.097423 4.54442,4.544418 z" + id="path1012" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + + + + + + + + + + + + +<path + class="st0" + d="m 11.125143,40.945382 c 0,2.446995 -1.9226384,4.544418 -4.5444195,4.544418 -2.4469957,0 -4.544418,-1.922638 -4.544418,-4.544418 0,-2.446994 1.9226384,-4.544418 4.544418,-4.544418 2.4469944,0.174784 4.5444195,2.097424 4.5444195,4.544418 z" + id="path30" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st0" + d="m 28.603676,40.945382 c 0,2.446995 -1.922638,4.544418 -4.544419,4.544418 -2.446996,0 -4.544418,-1.922638 -4.544418,-4.544418 0,-2.446994 1.922638,-4.544418 4.544418,-4.544418 2.446994,0.174784 4.544419,2.097424 4.544419,4.544418 z" + id="path32" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st0" + d="m 46.08221,40.945382 c 0,2.446995 -1.922638,4.544418 -4.544419,4.544418 -2.446996,0 -4.544418,-1.922638 -4.544418,-4.544418 0,-2.446994 1.922638,-4.544418 4.544418,-4.544418 2.446994,0.174784 4.544419,2.097424 4.544419,4.544418 z" + id="path34" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + + + + + + + + + +<path + class="st0" + d="m 11.125143,7.054619 c 0,2.4469958 -1.9226384,4.544419 -4.5444195,4.544419 -2.4469957,0 -4.544418,-1.9226393 -4.544418,-4.544419 0,-2.4469943 1.9226384,-4.5444194 4.544418,-4.5444194 2.4469944,0.1747867 4.5444195,2.0974251 4.5444195,4.5444194 z" + id="path54" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st0" + d="m 28.603676,7.054619 c 0,2.4469958 -1.922638,4.544419 -4.544419,4.544419 -2.446996,0 -4.544418,-1.9226393 -4.544418,-4.544419 0,-2.4469943 1.922638,-4.5444194 4.544418,-4.5444194 2.446994,0.1747867 4.544419,2.0974251 4.544419,4.5444194 z" + id="path56" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<path + class="st0" + d="m 46.08221,7.054619 c 0,2.4469958 -1.922638,4.544419 -4.544419,4.544419 -2.446996,0 -4.544418,-1.9226393 -4.544418,-4.544419 0,-2.4469943 1.922638,-4.5444194 4.544418,-4.5444194 2.446994,0.1747867 4.544419,2.0974251 4.544419,4.5444194 z" + id="path58" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> + +<path + class="st0" + d="m 11.006627,24.17424 c 0,2.446994 -1.9226382,4.544418 -4.5444192,4.544418 -2.4469957,0 -4.5444181,-1.922639 -4.5444181,-4.544418 0,-2.446995 1.9226384,-4.544418 4.5444181,-4.544418 2.4469943,0.174783 4.5444192,2.097423 4.5444192,4.544418 z" + id="path1010" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + class="st0" + d="m 45.963694,24.17424 c 0,2.446994 -1.922638,4.544418 -4.544419,4.544418 -2.446996,0 -4.544418,-1.922639 -4.544418,-4.544418 0,-2.446995 1.922638,-4.544418 4.544418,-4.544418 2.446994,0.174783 4.544419,2.097423 4.544419,4.544418 z" + id="path1014" + style="fill:none;fill-opacity:1;stroke:#00cc10;stroke-width:2.07667;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><g + id="g66" + transform="matrix(1.3844491,0,0,1.3844491,-0.84053536,-0.98876425)"> + + +<g + id="g64" + transform="translate(-5.5643192,-5.3931099)"> + <polygon + class="st2" + points="25.6,11.7 10.7,10.9 13.2,25.5 18.2,20 34.2,34.2 36.6,31.5 20.6,17.2 " + id="polygon62" + transform="matrix(0.90211734,0,0,0.90211734,1.0473445,1.066921)" /> + </g></g></svg> diff --git a/app/bin/bitmaps/SVG/snap-grid.svg b/app/bin/bitmaps/SVG/snap-grid.svg new file mode 100644 index 0000000..f6650a7 --- /dev/null +++ b/app/bin/bitmaps/SVG/snap-grid.svg @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="snap-grid.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata73"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs71" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1524" + inkscape:window-height="969" + id="namedview69" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.9991" + inkscape:cy="23.9991" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g66" + inkscape:snap-nodes="false" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FFFFFF;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:none;} + .st2{fill:#231F20;} +</style> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<g + id="g66"><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 45.964794,34.798093 H 1.7605429" + id="path906-0" + sodipodi:nodetypes="cc" /> + + <g + id="g64"> + + </g> +<path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 13.170988,1.9818299 V 45.377465" + id="path900" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 23.997436,1.9818299 V 45.826697" + id="path904" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 34.823883,1.9818299 V 46.18608" + id="path906" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 46.05464,13.279968 H 1.7605429" + id="path902-1" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 46.144486,24.039031 H 1.7605429" + id="path904-7" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 45.650331,1.9818299 V 46.186079" + id="path906-06" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 2.3445413,1.9818299 V 46.18608" + id="path906-01" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 46.703533,2.6007706 1.2813595,2.5209067" + id="path900-5-5" + sodipodi:nodetypes="cc" /><path + style="fill:none;stroke:#00cc0d;stroke-width:2.24998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 46.703534,45.557158 H 1.3612234" + id="path900-5-8" + sodipodi:nodetypes="cc" /></g> +</svg> diff --git a/app/bin/bitmaps/SVG/split-draw.svg b/app/bin/bitmaps/SVG/split-draw.svg new file mode 100644 index 0000000..d74ee25 --- /dev/null +++ b/app/bin/bitmaps/SVG/split-draw.svg @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="split-draw.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata41"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs39" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1420" + inkscape:window-height="920" + id="namedview37" + showgrid="false" + inkscape:zoom="14.378038" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#B3B3B3;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#808080;stroke-miterlimit:10;} + .st3{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> + + + + +<path + class="st1" + d="M 31.116412,30.780019" + id="path12" /> +<path + class="st1" + d="M 20.670772,20.837783" + id="path14" /> + + + + +<line + class="st2" + x1="25.950863" + y1="21.986561" + x2="43.444164" + y2="3.4864542" + id="line24" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="4.5561771" + y1="44.513905" + x2="21.797777" + y2="26.265497" + id="line26" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> + + +<polyline + class="st3" + points="13.4,23.5 20.2,23.1 20.3,16.4 " + id="polyline32" + transform="matrix(1.2585109,0,0,1.2585109,-4.4171454,-7.6481128)" + style="stroke:#cc0000;stroke-width:2.38377;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st3" + points="33.7,28.5 26.8,28.9 26.8,35.6 " + id="polyline34" + transform="matrix(1.2585109,0,0,1.2585109,-6.955518,-9.5737753)" + style="stroke:#cc0000;stroke-width:2.38377;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/split.svg b/app/bin/bitmaps/SVG/split.svg new file mode 100644 index 0000000..2bc28cb --- /dev/null +++ b/app/bin/bitmaps/SVG/split.svg @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="split.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1566"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1564" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1468" + inkscape:window-height="951" + id="namedview1562" + showgrid="false" + inkscape:zoom="14.378038" + inkscape:cx="24" + inkscape:cy="23.74054" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style1527"> + .st0{fill:none;stroke:#B3B3B3;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st2{fill:none;stroke:#808080;stroke-miterlimit:10;} + .st3{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="3.8516407" + y1="35.657555" + x2="13.378208" + y2="44.725014" + id="line1529" /> +<line + class="st0" + x1="7.6393127" + y1="31.640329" + x2="17.051104" + y2="40.707787" + id="line1531" /> +<line + class="st0" + x1="11.426984" + y1="27.623102" + x2="20.953552" + y2="36.690559" + id="line1533" /> +<line + class="st0" + x1="15.214656" + y1="23.605873" + x2="24.626448" + y2="32.673332" + id="line1535" /> + + +<line + class="st0" + x1="22.789999" + y1="15.57142" + x2="32.20179" + y2="24.638878" + id="line1541" /> +<line + class="st0" + x1="26.577673" + y1="11.439415" + x2="36.10424" + y2="20.621649" + id="line1543" /> +<line + class="st0" + x1="30.365345" + y1="7.4221864" + x2="39.777134" + y2="16.604422" + id="line1545" /> +<line + class="st0" + x1="34.153015" + y1="3.404959" + x2="43.679581" + y2="12.587194" + id="line1547" /> +<line + class="st2" + x1="23.084372" + y1="19.683172" + x2="39.038502" + y2="2.8108137" + id="line1549" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<line + class="st2" + x1="3.7665691" + y1="40.163593" + x2="19.491148" + y2="23.520805" + id="line1551" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<line + class="st2" + x1="28.054932" + y1="24.509245" + x2="44.238625" + y2="7.6368885" + id="line1553" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<line + class="st2" + x1="8.5575352" + y1="45.184124" + x2="24.626448" + y2="28.426548" + id="line1555" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke:#666666;stroke-opacity:1" /> +<polyline + class="st3" + points="13.4,23.5 20.2,23.1 20.3,16.4 " + id="polyline1557" + style="stroke:#cc0000;stroke-width:2.10972;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.3866205,0,0,1.4582594,-8.7657785,-14.110431)" /> +<polyline + class="st3" + points="33.7,28.5 26.8,28.9 26.8,35.6 " + id="polyline1559" + style="stroke:#cc0000;stroke-width:2.19817;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.4082952,0,0,1.32259,-9.2134144,-9.5667462)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/sticky-doc.svg b/app/bin/bitmaps/SVG/sticky-doc.svg new file mode 100644 index 0000000..20ea76f --- /dev/null +++ b/app/bin/bitmaps/SVG/sticky-doc.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1556" + sodipodi:docname="sticky-doc.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1560"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1680" + inkscape:window-height="931" + id="namedview1558" + showgrid="false" + inkscape:zoom="10.803477" + inkscape:cx="31.980445" + inkscape:cy="33.461449" + inkscape:window-x="6" + inkscape:window-y="3" + inkscape:window-maximized="0" + inkscape:current-layer="svg1556" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /><defs + id="defs1538"><clipPath + id="clipPath4490"><path + d="m0 48h48v-48h-48z" + id="path1535" /></clipPath><clipPath + id="clipPath4424"><path + d="M 0,48 H 48 V 0 H 0 Z" + id="path920" /></clipPath></defs><path + style="fill:#a0592c;fill-opacity:1;stroke:#a0592c;stroke-width:1.1707px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 2.7671622,8.6432915 44.7300768,0.04069 13.734325,9.8289935 0.0034,36.843687 -58.5931253,-0.05776 z" + id="path2772" + sodipodi:nodetypes="cccccc" + inkscape:label="outline" /><g + transform="matrix(2.2387733,0,0,-2.564431,-15.300851,92.664659)" + id="g1554"><path + d="M 8.6186891,32.247551 8.6032755,15.12224 33.479571,15.100555 33.473002,28.64877 27.806013,32.19633 Z" + fill="#ffce00" + id="path1540" + sodipodi:nodetypes="cccccc" + style="stroke-width:0.987122" /><path + d="m 27.904611,32.195585 0.0194,-3.615578 5.713343,0.01661 z" + fill="#c19d05" + id="path1544" + sodipodi:nodetypes="cccc" + style="stroke-width:1.12315" /></g><path + d="m 36.567695,32.072291 c 0,0 -12.08789,-10.690569 -15.998423,-13.665449 C 16.656547,15.435575 9.6075626,22.76642 14.383329,26.263145 19.159803,29.762777 32.203378,41.2321 37.617602,44.33056 44.866707,49.927132 54.702434,40.109053 49.998452,33.279763 43.565297,28.002312 30.39473,16.563864 30.39473,16.563864" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path1548" + inkscape:label="clippy" + style="stroke:#1566b7;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cccccc" /></svg> diff --git a/app/bin/bitmaps/SVG/sticky-link.svg b/app/bin/bitmaps/SVG/sticky-link.svg new file mode 100644 index 0000000..f403661 --- /dev/null +++ b/app/bin/bitmaps/SVG/sticky-link.svg @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1556" + sodipodi:docname="sticky-link.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1560"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1675" + inkscape:window-height="931" + id="namedview1558" + showgrid="false" + inkscape:zoom="10.803477" + inkscape:cx="32.026726" + inkscape:cy="31.980445" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg1556" + inkscape:document-rotation="0" + inkscape:snap-nodes="true" + inkscape:pagecheckerboard="0" /><defs + id="defs1538"><clipPath + id="clipPath4490"><path + d="m0 48h48v-48h-48z" + id="path1535" /></clipPath><clipPath + id="clipPath4424"><path + d="M 0,48 H 48 V 0 H 0 Z" + id="path920" /></clipPath></defs><path + style="fill:#a0592c;fill-opacity:1;stroke:#a0592c;stroke-width:1.1707px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 2.8295204,8.6432918 44.7300766,0.04069 13.734325,9.8289932 0.0034,36.843687 -58.5931251,-0.05776 z" + id="path2772" + sodipodi:nodetypes="cccccc" + inkscape:label="outline" /><g + transform="matrix(2.2387733,0,0,-2.564431,-15.238493,92.664659)" + id="g1554"><path + d="M 8.6186891,32.247551 8.6032755,15.12224 33.479571,15.100555 33.473002,28.64877 27.806013,32.19633 Z" + fill="#ffce00" + id="path1540" + sodipodi:nodetypes="cccccc" + style="stroke-width:0.987122" /><path + d="m 27.904611,32.195585 0.0194,-3.615578 5.713343,0.01661 z" + fill="#c19d05" + id="path1544" + sodipodi:nodetypes="cccc" + style="stroke-width:1.12315" /></g><g + clip-path="url(#clipPath4424)" + id="g937" + transform="matrix(2.1657938,0,0,-2.4808357,-13.543802,95.073373)" + style="stroke-width:1.72565;stroke-miterlimit:4;stroke-dasharray:none"><path + d="M 13.494482,28.880566 C 9.7704502,28.323132 9.8028707,22.521573 13.526902,21.948 c 4.856167,-0.500202 10.724216,7.551068 14.825918,6.906165 3.753827,-0.544879 4.139651,-6.106432 0.186631,-6.911199 -4.922663,-0.559203 -10.533859,7.730685 -15.044964,6.9376 z" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path933" + sodipodi:nodetypes="cccccc" + style="stroke:#1467b8;stroke-width:1.72565;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:label="link" /></g></svg> diff --git a/app/bin/bitmaps/SVG/sticky-note.svg b/app/bin/bitmaps/SVG/sticky-note.svg new file mode 100644 index 0000000..1fe3d30 --- /dev/null +++ b/app/bin/bitmaps/SVG/sticky-note.svg @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1556" + sodipodi:docname="sticky-note.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1560"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1669" + inkscape:window-height="931" + id="namedview1558" + showgrid="false" + inkscape:zoom="10.803477" + inkscape:cx="31.887882" + inkscape:cy="31.980445" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg1556" + inkscape:document-rotation="0" + inkscape:snap-nodes="false" + inkscape:pagecheckerboard="0" /><defs + id="defs1538"><clipPath + id="clipPath4490"><path + d="m0 48h48v-48h-48z" + id="path1535" /></clipPath></defs><path + style="fill:#a0592c;fill-opacity:1;stroke:#a0592c;stroke-width:1.1707px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 2.8295202,8.6432916 44.7300768,0.04069 13.734325,9.8289934 0.0034,36.843687 -58.5931248,-0.05776 z" + id="path2772" + sodipodi:nodetypes="cccccc" + inkscape:label="outline" /><g + transform="matrix(2.2387733,0,0,-2.564431,-15.238493,92.664659)" + id="g1554"><path + d="M 8.6186891,32.247551 8.6032755,15.12224 33.479571,15.100555 33.473002,28.64877 27.806013,32.19633 Z" + fill="#ffce00" + id="path1540" + sodipodi:nodetypes="cccccc" + style="stroke-width:0.987122" /><path + d="m 27.904611,32.195585 0.0194,-3.615578 5.713343,0.01661 z" + fill="#c19d05" + id="path1544" + sodipodi:nodetypes="cccc" + style="stroke-width:1.12315" /></g><g + id="g2121" + inkscape:label="note" + transform="translate(-1.0226106,2.4522374)"><path + d="M 8.5459993,43.73594 H 56.888648" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path875" + style="stroke:#1467b8;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 8.4899312,34.31052 H 50.299766" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path879" + style="stroke:#1467b8;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 8.638554,24.945673 H 53.463813" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path1812" + style="stroke:#1467b8;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="M 8.582494,15.765913 H 45.4865" + fill="none" + stroke="#0679bf" + stroke-miterlimit="10" + id="path871" + style="stroke:#1467b8;stroke-width:4.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/stop.svg b/app/bin/bitmaps/SVG/stop.svg new file mode 100644 index 0000000..4bd5fa0 --- /dev/null +++ b/app/bin/bitmaps/SVG/stop.svg @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="stop.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata42"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs40"><radialGradient + inkscape:collect="always" + xlink:href="#SVGID_1_" + id="radialGradient867" + cx="23.599313" + cy="23.299802" + fx="23.599313" + fy="23.299802" + r="18.802058" + gradientTransform="matrix(1,0,0,1.1475892,0,-3.4387987)" + gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1528" + inkscape:window-height="918" + id="namedview38" + showgrid="false" + inkscape:zoom="14.378038" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:url(#SVGID_1_);stroke:#000000;stroke-miterlimit:10;} +</style> +<linearGradient + id="SVGID_1_" + gradientUnits="userSpaceOnUse" + x1="2.3596" + y1="25.2837" + x2="44.5404" + y2="25.2837" + gradientTransform="matrix(5.000000e-03 1 -1 5.000000e-03 48.7725 -0.2285)"> + + + + + + + + + <stop + offset="0.08821" + style="stop-color:#e4a9a5;stop-opacity:1" + id="stop20" /> + <stop + offset="0.3086791" + style="stop-color:#db9b94;stop-opacity:1" + id="stop22" /> + <stop + offset="0.54394364" + style="stop-color:#cb7167;stop-opacity:1" + id="stop24" /> + <stop + offset="0.75441277" + style="stop-color:#c84337;stop-opacity:1" + id="stop26" /> + + <stop + offset="0.9501" + style="stop-color:#b21506;stop-opacity:1" + id="stop30" /> + <stop + offset="0.9992" + style="stop-color:#a80e00;stop-opacity:1" + id="stop32" /> +</linearGradient> +<polygon + class="st0" + points="23.5,44.3 5.3,33.7 5.5,12.7 23.7,2.3 41.9,12.9 41.8,33.9 " + id="polygon35" + style="fill-opacity:1;fill:url(#radialGradient867)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/straight-line.svg b/app/bin/bitmaps/SVG/straight-line.svg new file mode 100644 index 0000000..32a01a3 --- /dev/null +++ b/app/bin/bitmaps/SVG/straight-line.svg @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="straight-line.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata923"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs921" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1418" + inkscape:window-height="1008" + id="namedview919" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="24" + inkscape:cy="26.258824" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style884"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st3{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st4{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="M 6.6931374,34.732799" + id="path886" /> +<path + class="st0" + d="M 9.9931374,31.232799" + id="path888" /> +<path + class="st0" + d="M 13.293137,27.732799" + id="path890" /> +<path + class="st0" + d="M 16.593137,24.232799" + id="path892" /> +<path + class="st0" + d="M 19.893137,20.732799" + id="path894" /> +<path + class="st0" + d="M 23.193137,17.232799" + id="path896" /> +<path + class="st0" + d="M 26.493137,13.632799" + id="path898" /> +<path + class="st0" + d="M 37.993137,18.132799" + id="path900" /> +<path + class="st0" + d="M 29.793137,10.132799" + id="path902" /> +<path + class="st0" + d="M 41.393137,14.632799" + id="path904" /> +<path + class="st0" + d="M 33.093137,6.6327991" + id="path906" /> +<path + class="st1" + d="M 37.293137,5.8327991" + id="path908" /> +<path + class="st1" + d="M 6.3931374,38.432799" + id="path910" /> +<line + class="st2" + x1="4.237493" + y1="43.630077" + x2="28.515442" + y2="19.529856" + id="line912" + style="stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st3" + x1="28.515442" + y1="19.529856" + x2="43.04525" + y2="4.5849099" + id="line914" + style="stroke:#cc0e00;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st4" + points="42.6,12.6 42.1,5.8 35.5,5.8 " + id="polyline916" + style="stroke:#cc0e00;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="translate(0.79313743,-1.0672009)" /> +</svg> diff --git a/app/bin/bitmaps/SVG/straight.svg b/app/bin/bitmaps/SVG/straight.svg new file mode 100644 index 0000000..6c5f37b --- /dev/null +++ b/app/bin/bitmaps/SVG/straight.svg @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="straight.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata926"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs924" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1413" + inkscape:window-height="937" + id="namedview922" + showgrid="false" + inkscape:zoom="14.378038" + inkscape:cx="19.826969" + inkscape:cy="24.347753" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style893"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{stroke:#F80E00;stroke-width:2;stroke-miterlimit:10;} + .st3{fill:none;stroke:#F80E00;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="2.9930582" + y1="36.148373" + x2="12.837148" + y2="45.518051" + id="line895" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="6.9069719" + y1="31.997252" + x2="16.632456" + y2="41.366932" + id="line897" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="10.820889" + y1="27.846128" + x2="20.664972" + y2="37.215809" + id="line899" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="14.734805" + y1="23.695007" + x2="24.460285" + y2="33.064686" + id="line901" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="18.648714" + y1="19.543886" + x2="28.492802" + y2="28.913563" + id="line903" + style="stroke:#d98b0d;stroke-opacity:1" /> +<line + class="st0" + x1="22.562628" + y1="15.392764" + x2="32.288116" + y2="24.762442" + id="line905" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="26.476543" + y1="11.123041" + x2="36.320637" + y2="20.611319" + id="line907" + style="stroke:#b2b2b2;stroke-opacity:1" /> +<line + class="st0" + x1="30.390459" + y1="6.9719186" + x2="40.115948" + y2="16.460197" + id="line909" + style="stroke:#b2b2b2;stroke-opacity:1" /> + +<line + class="st1" + x1="2.9146755" + y1="40.860981" + x2="22.544384" + y2="19.917923" + id="line913" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="7.8975964" + y1="46.260185" + x2="28.092888" + y2="24.918444" + id="line915" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="25.125404" + y1="22.338005" + x2="43.922752" + y2="2.8828921" + id="line917" + style="stroke:#cc0000;stroke-width:2.5;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +<polyline + class="st3" + points="42.6,12.6 42.1,5.8 35.5,5.8 " + id="polyline919" + style="stroke:#cc0000;stroke-width:2.21487;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(1.1287352,0,0,1.1287352,-3.6377413,-3.6244135)" /> +<line + class="st1" + x1="22.544384" + y1="19.917923" + x2="35.261513" + y2="6.3368797" + id="line842" + style="stroke:#666666;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><line + class="st1" + x1="28.092888" + y1="24.918444" + x2="40.843689" + y2="11.432371" + id="line844" + style="stroke:#666666;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></svg> diff --git a/app/bin/bitmaps/SVG/switch-ai.svg b/app/bin/bitmaps/SVG/switch-ai.svg new file mode 100644 index 0000000..9c842e3 --- /dev/null +++ b/app/bin/bitmaps/SVG/switch-ai.svg @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg1549" + sodipodi:docname="switch-ai.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata1553"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1458" + inkscape:window-height="878" + id="namedview1551" + showgrid="false" + inkscape:zoom="8.1826993" + inkscape:cx="31.95767" + inkscape:cy="31.774356" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g1547" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /><defs + id="defs1519"><clipPath + id="clipPath3486"><path + d="m0 48h48v-48h-48z" + id="path1516" /></clipPath></defs><g + transform="matrix(1.8360071,0,0,-1.8360071,-16.771693,72.460272)" + id="g1547"><g + transform="matrix(1.1130994,0,0,1.1130994,19.813412,26.914954)" + id="g1523"><path + d="M 0.4671437,0.44608624 17.714856,-18.551086" + fill="none" + stroke="#000200" + stroke-miterlimit="10" + id="path1521" + style="stroke-width:2.17864;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(1.1119872,-0.04974395,0.04974395,1.1119872,10.086494,37.386378)" + id="g1527"><path + d="m 12.853899,-8.0334513 c 0,-2.1766187 -1.763768,-3.9391237 -3.9391231,-3.9391237 -2.1766184,0 -3.9403864,1.762505 -3.9403864,3.9391237 0,2.1753559 1.763768,3.939124 3.9403864,3.939124 2.1753551,0 3.9391231,-1.7637681 3.9391231,-3.939124" + fill="#f70f31" + id="path1529" + style="fill:#c40808;fill-opacity:1;stroke-width:1.26254" /><path + d="M 0.95477497,0.17808758 8.273775,-7.2949125" + fill="none" + stroke="#f70f31" + stroke-linecap="round" + stroke-miterlimit="10" + id="path1525" + style="stroke:#c40808;stroke-width:2.17864;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + clip-path="url(#clipPath3486)" + id="g1545" + transform="matrix(1.1130994,0,0,1.1130994,-1.6562092,-3.8556612)"><path + d="m 27.768603,8.8691045 c 0,5.3601645 4.49539,9.6982505 10.051937,9.6982505" + fill="none" + stroke="#000700" + stroke-miterlimit="10" + id="path1533" + style="stroke-width:1.92381;stroke-miterlimit:10;stroke-dasharray:none" /><path + d="M 36.880028,18.752028 37.003,9.093" + fill="none" + stroke="#000700" + stroke-miterlimit="10" + id="path1537" + style="stroke-width:1.90631;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /><path + d="M 25.664478,9.257914 39.456307,9.238486" + fill="none" + stroke="#020000" + stroke-linecap="round" + stroke-miterlimit="10" + id="path1541" + style="stroke-width:1.90631;stroke-miterlimit:10;stroke-dasharray:none" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/table-edge.svg b/app/bin/bitmaps/SVG/table-edge.svg new file mode 100644 index 0000000..e2663ac --- /dev/null +++ b/app/bin/bitmaps/SVG/table-edge.svg @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="table-edge.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata23"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs21" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1349" + inkscape:window-height="949" + id="namedview19" + showgrid="false" + inkscape:snap-nodes="false" + inkscape:zoom="12.521303" + inkscape:cx="22.553895" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FF8200;stroke:#000000;stroke-miterlimit:10;} + .st1{fill:#FF8200;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st3{fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:10;} +</style> +<rect + x="2.4431601" + y="25.12504" + class="st0" + width="23.912262" + height="17.330696" + id="rect4" + style="fill:#afaeac;fill-opacity:1;stroke:none;stroke-width:1.48566;stroke-miterlimit:10;stroke-dasharray:none" /> + + + + + + +<path + style="fill:none;stroke:#000000;stroke-width:1.46954px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 26.464217,25.078666 2.3930621,25.147382" + id="path838" /><path + id="path842" + style="fill:#42b743;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:square;stroke-miterlimit:10;stroke-dasharray:none" + d="M 26.210618,24.581025 2.3201056,24.49001 2.4322676,5.1036417 H 45.510328 Z" + sodipodi:nodetypes="ccccc" /><path + id="path845" + style="fill:#898785;fill-opacity:1;stroke:#000000;stroke-width:1.46954;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" + d="M 44.945132,22.315034 26.491789,42.39923 26.63883,25.321877 44.873396,5.7958747 Z" + sodipodi:nodetypes="ccccc" /><path + style="fill:none;stroke:#000000;stroke-width:1.46954px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 26.571012,42.088198 2.4998566,42.156916" + id="path838-1" /></svg> diff --git a/app/bin/bitmaps/SVG/text.svg b/app/bin/bitmaps/SVG/text.svg new file mode 100644 index 0000000..c5e5c32 --- /dev/null +++ b/app/bin/bitmaps/SVG/text.svg @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="text.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata3660"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs3658" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1516" + inkscape:window-height="799" + id="namedview3656" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="23.995614" + inkscape:cy="22.986238" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style3651"> + .st0{font-family:'MyriadPro-Regular';} + .st1{font-size:48px;} +</style> +<text + class="st0 st1" + id="text3653" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:64px;font-family:Arial;-inkscape-font-specification:'Arial Bold';stroke-width:1.12882" + x="0.54810065" + y="47.383064" + transform="scale(1.0198672,0.98051982)">A</text> +</svg> diff --git a/app/bin/bitmaps/SVG/top.svg b/app/bin/bitmaps/SVG/top.svg new file mode 100644 index 0000000..ccf60ad --- /dev/null +++ b/app/bin/bitmaps/SVG/top.svg @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="top.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata862"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs860" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1396" + inkscape:window-height="976" + id="namedview858" + showgrid="false" + inkscape:zoom="13.417014" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style851"> + .st0{fill:#808080;} + .st1{fill:#FF0603;} +</style> +<rect + x="17.38179" + y="8.2811852" + class="st0" + width="28.549133" + height="31.43763" + id="rect853" + style="stroke:#000000;stroke-width:1.27743;stroke-opacity:1" /> +<path + class="st1" + d="m 29.060985,24.251499 c 0,7.29353 -6.099134,13.078054 -13.495954,13.078054 -7.5265895,0 -13.4959548,-5.910275 -13.4959548,-13.078054 0,-7.293529 6.0991333,-13.078052 13.4959548,-13.078052 7.39682,-0.125751 13.495954,5.784523 13.495954,13.078052 z" + id="path855" + style="stroke:#990000;stroke-width:1.27743;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/train.svg b/app/bin/bitmaps/SVG/train.svg new file mode 100644 index 0000000..e2d2a71 --- /dev/null +++ b/app/bin/bitmaps/SVG/train.svg @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="train.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata50"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs48" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1575" + inkscape:window-height="965" + id="namedview46" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="21.577618" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#808080;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000401;stroke-miterlimit:10;} + .st2{fill:#000401;} + .st3{fill:url(#SVGID_1_);} + .st4{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st5{fill:#006837;} + .st6{fill:#FFE53F;} + .st7{font-family:'MyriadPro-Regular';} + .st8{font-size:6px;} +</style> +<path + class="st0" + d="M 37.515004,20.476714 C 37.180948,16.574746 38.079405,5.8084729 27.166937,4.1938653 18.481504,2.8483593 3.0440743,4.6124338 2.9428781,8.7564972 c 0.099158,3.8779088 8.7130179,6.4619188 15.6168239,6.1754338 7.341985,-1.130253 13.06101,-4.35213 17.552741,-3.288219" + id="path4" + sodipodi:nodetypes="ccccc" + style="fill:#808080;fill-opacity:1;stroke-width:3.14825;stroke-miterlimit:10;stroke-dasharray:none" /> + +<line + class="st1" + x1="13.017804" + y1="20.804539" + x2="13.276731" + y2="27.45532" + id="line8" + style="stroke-width:2.44934;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st1" + x1="3.5502384" + y1="21.384453" + x2="14.173705" + y2="21.356592" + id="line10" + style="stroke-width:1.837;stroke-miterlimit:10;stroke-dasharray:none" /> +<path + class="st2" + d="m 27.647211,28.620494 h -3.883914 c 0,0 -0.388392,-1.941957 0,-3.883914 0.906246,-2.07142 2.718739,-1.941956 3.883914,0 0.129462,2.977667 0,3.883914 0,3.883914 z" + id="path12" + style="stroke-width:1.29463" /> + + + +<path + class="st2" + d="m 41.836717,43.209271 c 0,1.165174 -0.906246,2.200883 -2.200884,2.200883 -1.294638,0 -2.200884,-0.906246 -2.200884,-2.200883 0,-1.294638 0.906246,-2.200884 2.200884,-2.200884 1.294638,0 2.200884,1.03571 2.200884,2.200884 z" + id="path20" + style="stroke-width:1.29463" /> +<path + class="st0" + d="M 14.57137,35.223145" + id="path22" /> +<path + class="st0" + d="M 24.022224,35.870465" + id="path24" /> +<linearGradient + id="SVGID_1_" + gradientUnits="userSpaceOnUse" + x1="24.5506" + y1="21.5" + x2="30.4868" + y2="21.5" + gradientTransform="matrix(0,2.0281882,-1.2946377,0,55.481923,-22.363742)"> + <stop + offset="2.455360e-02" + style="stop-color:#000000;stop-opacity:1" + id="stop26" /> + <stop + offset="0.4355" + style="stop-color:#22B573" + id="stop28" /> + <stop + offset="1" + style="stop-color:#000201;stop-opacity:1" + id="stop30" /> +</linearGradient> +<rect + x="13.406194" + y="27.325857" + class="st3" + width="28.482027" + height="12.169129" + id="rect33" + style="fill:url(#SVGID_1_);stroke-width:1.62042" /><path + class="st2" + d="m 35.3229,41.816826 c 0,2.200884 -1.812492,4.013376 -4.013377,4.013376 -2.200884,0 -4.013376,-1.812492 -4.013376,-4.013376 0,-2.200885 1.812492,-4.013377 4.013376,-4.013377 2.200885,0 4.013377,1.812492 4.013377,4.013377 z" + id="path14" + style="stroke-width:1.29463" /> +<line + class="st4" + x1="41.013638" + y1="38.614727" + x2="46.192184" + y2="43.404884" + id="line35" + style="stroke-width:1.29463" /> +<rect + x="3.0490949" + y="27.325857" + class="st5" + width="10.3571" + height="12.169129" + id="rect37" + style="stroke-width:1.62042" /><path + class="st2" + d="m 26.260436,41.816826 c 0,2.200884 -1.812493,4.013376 -4.013377,4.013376 -2.200883,0 -4.013376,-1.812492 -4.013376,-4.013376 0,-2.200885 1.812493,-4.013377 4.013376,-4.013377 2.200884,0 4.013377,1.812492 4.013377,4.013377 z" + id="path16" + style="stroke-width:1.29463" /> +<path + class="st2" + d="m 7.6176546,43.111463 c 0,1.165175 -0.906246,2.200885 -2.2008849,2.200885 -1.165173,0 -2.2008831,-0.906246 -2.2008831,-2.200885 0,-1.294637 0.9062464,-2.200883 2.2008831,-2.200883 1.2946389,0.129463 2.2008849,1.03571 2.2008849,2.200883 z" + id="path39" + style="stroke-width:1.29463" /> +<path + class="st2" + d="m 17.197973,41.816826 c 0,2.200884 -1.812492,4.013376 -4.013376,4.013376 -2.200885,0 -4.0133769,-1.812492 -4.0133769,-4.013376 0,-2.200885 1.8124919,-4.013377 4.0133769,-4.013377 2.200884,0 4.013376,1.812492 4.013376,4.013377 z" + id="path18" + style="stroke-width:1.29463" /> + +<rect + style="opacity:1;fill:#000201;fill-opacity:1;stroke:none;stroke-width:3.3644;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" + id="rect858" + width="4.7189298" + height="7.1085119" + x="35.176659" + y="20.289568" /><path + style="fill:none;stroke:#fffd46;stroke-width:2.44934;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 8.4060186,29.235334 v 8.072492" + id="path862" /></svg> diff --git a/app/bin/bitmaps/SVG/trim.svg b/app/bin/bitmaps/SVG/trim.svg new file mode 100644 index 0000000..553d08f --- /dev/null +++ b/app/bin/bitmaps/SVG/trim.svg @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 48 48" + xml:space="preserve" + id="svg2766" + sodipodi:docname="trim.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)" + width="48" + height="48"><defs + id="defs2770" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1416" + inkscape:window-height="920" + id="namedview2768" + showgrid="false" + inkscape:zoom="9.3994533" + inkscape:cx="26.121774" + inkscape:cy="28.182354" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g2764" + inkscape:document-rotation="0" + units="mm" /><metadata + id="metadata2742"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><g + transform="matrix(1.3333,0,0,-1.3333,0,64)" + id="g2764"><g + transform="matrix(0.96624008,0,0,0.96624008,3.1679953,14.357371)" + id="g2746"><path + d="M 0.23938161,0.55855709 15.141382,16.484557" + fill="none" + stroke="#020202" + stroke-miterlimit="10" + id="path2744" + style="stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="matrix(0.95746776,0,0,0.95746776,19.792787,32.050838)" + id="g2750" + style="stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 13.405,13.62" + fill="none" + stroke="#808080" + stroke-miterlimit="10" + id="path2748" + style="stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none" /></g><g + transform="translate(8.3968901,31.726403)" + id="g2754" + style="stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none"><path + d="m -0.23938161,0.07979387 6.84200001,0.454 0.008,6.64600003" + fill="none" + stroke="#f80e00" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path2752" + style="stroke:#cc0e00;stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="translate(26.65689,28.801403)" + id="g2758" + style="stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none"><path + d="m -0.15958774,-0.47876322 -6.84199996,-0.453 -0.008,-6.64799998" + fill="none" + stroke="#f80e00" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path2756" + style="stroke:#cc0e00;stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g><g + transform="matrix(0.93151426,0,0,0.93151426,8.2375086,35.706608)" + id="g2762"><path + d="M -4.9635328,7.7479537 26.126467,-21.199046" + fill="none" + stroke="#f6130b" + stroke-miterlimit="10" + id="path2760" + style="stroke:#cc0e00;stroke-width:2.25006;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></g></svg> diff --git a/app/bin/bitmaps/SVG/tunnel.svg b/app/bin/bitmaps/SVG/tunnel.svg new file mode 100644 index 0000000..c31fabe --- /dev/null +++ b/app/bin/bitmaps/SVG/tunnel.svg @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + viewBox="0 0 64 64" + xml:space="preserve" + id="svg60" + sodipodi:docname="tunnel.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata66"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs64" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1435" + inkscape:window-height="846" + id="namedview62" + showgrid="false" + inkscape:zoom="9.96875" + inkscape:cx="32" + inkscape:cy="32" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="g24" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" + inkscape:snap-global="false" /><g + transform="matrix(1.7658994,0,0,-1.7658994,5.511509,22.161291)" + id="g4" + style="stroke:#c67206;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path2" + style="stroke:#c67206;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,14.341007,22.161291)" + id="g8" + style="stroke:#c67206;stroke-opacity:1"><path + d="M 0,0 V -11" + fill="none" + stroke="#fbb03b" + stroke-miterlimit="10" + stroke-width="2" + id="path6" + style="stroke:#c67206;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,49.658995,22.161291)" + id="g24"><path + d="M 0,0 V -11" + fill="none" + stroke="#919090" + stroke-miterlimit="10" + stroke-width="2" + id="path22" + style="stroke:#a6a6a6;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,40.598556,22.287553)" + id="g24-9"><path + d="M 0,0 V -11" + fill="none" + stroke="#919090" + stroke-miterlimit="10" + stroke-width="2" + id="path22-6" + style="stroke:#a6a6a6;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,31.671763,22.203885)" + id="g24-9-8"><path + d="M 0,0 V -11" + fill="none" + stroke="#919090" + stroke-miterlimit="10" + stroke-width="2" + id="path22-6-4" + style="stroke:#a6a6a6;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,58.488492,22.161291)" + id="g28"><path + d="M 0,0 V -11" + fill="none" + stroke="#8e8e8e" + stroke-miterlimit="10" + stroke-width="2" + id="path26" + style="stroke:#a6a6a6;stroke-opacity:1" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,40.829497,26.174233)" + id="g32" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M -9.556208,0 H 12" + fill="none" + stroke="#706f6e" + stroke-miterlimit="10" + id="path30" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,1.9797102,26.174233)" + id="g36" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none" /><g + transform="matrix(1.7658994,0,0,-1.7658994,40.829497,37.573244)" + id="g40" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M -9.8331995,0 H 12" + fill="none" + stroke="#6d6d6d" + stroke-miterlimit="10" + id="path38" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /></g><g + transform="matrix(1.7658994,0,0,-1.7658994,1.9797102,37.573244)" + id="g44" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none"><path + d="M 0,0 H 12.236048" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path34" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /><path + d="M 0,6.448039 H 12.1668" + fill="none" + stroke="#000000" + stroke-miterlimit="10" + id="path42" + style="stroke-width:1.41571;stroke-miterlimit:10;stroke-dasharray:none" + sodipodi:nodetypes="cc" /></g><g + id="g863" + inkscape:label="portal" + transform="matrix(1.4321834,0,0,1.429365,-83.006246,-13.241149)" + style="stroke:#000000;stroke-width:2.09677;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"><path + d="m 74.171174,39.310722 v -15" + fill="none" + stroke="#f99108" + stroke-miterlimit="10" + stroke-width="2" + id="path46" + style="stroke:#000000;stroke-width:2.09677;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="m 69.307174,42.580722 4.864,-3.27" + fill="none" + stroke="#f99108" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path50" + style="stroke:#000000;stroke-width:2.09677;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /><path + d="m 74.171174,24.310722 -4.465,-3.589" + fill="none" + stroke="#f99108" + stroke-linecap="round" + stroke-miterlimit="10" + stroke-width="2" + id="path54" + style="stroke:#000000;stroke-width:2.09677;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /></g></svg> diff --git a/app/bin/bitmaps/SVG/turnout-designer.svg b/app/bin/bitmaps/SVG/turnout-designer.svg new file mode 100644 index 0000000..f11cbf6 --- /dev/null +++ b/app/bin/bitmaps/SVG/turnout-designer.svg @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="turnout-designer.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata992"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs990" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1491" + inkscape:window-height="1008" + id="namedview988" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24.041495" + inkscape:cy="16.70058" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style937"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} + .st2{stroke:#FFFFFF;stroke-miterlimit:10;} +</style> + + + + + + + + + +<g + id="ties" + inkscape:label="ties" + transform="matrix(1.1169958,0,0,1.1169958,-1.7103261,3.8486509)"><line + class="st0" + x1="5" + y1="22" + x2="5" + y2="33" + id="line939" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="10" + y1="22" + x2="10" + y2="33" + id="line941" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="15" + y1="21" + x2="15" + y2="33" + id="line943" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="20" + y1="19" + x2="20" + y2="33" + id="line945" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="25.299999" + y1="17.200001" + x2="25.5" + y2="33" + id="line947" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="30" + y1="15" + x2="30" + y2="33" + id="line949" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="35.299999" + y1="23.5" + x2="35.5" + y2="33" + id="line951" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="40.410748" + y1="22" + x2="40.410748" + y2="33" + id="line953" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="36.321495" + y1="12.471398" + x2="41.321495" + y2="21.971401" + id="line955" + style="stroke:#d98a0d;stroke-opacity:1" /><line + class="st0" + x1="36.696541" + y1="23.907103" + x2="31.896542" + y2="14.507097" + id="line957" + style="stroke:#d98a0d;stroke-opacity:1" /></g> + + + +<g + id="rail" + inkscape:label="rail" + transform="matrix(1.1169958,0,0,1.1169958,-1.7103261,3.8486509)" + style="stroke-width:1.79052;stroke-miterlimit:4;stroke-dasharray:none"><line + class="st1" + x1="3" + y1="24.234085" + x2="43" + y2="24.234085" + id="line959" + style="stroke-width:1.79052;stroke-miterlimit:4;stroke-dasharray:none" /><line + class="st1" + x1="3" + y1="30.765915" + x2="43" + y2="30.765915" + id="line961" + style="stroke-width:1.79052;stroke-miterlimit:4;stroke-dasharray:none" /><path + class="st1" + d="m 39.693798,13.304091 -3.512035,1.835613 c 0,0 -20.452437,9.076091 -24.584243,9.076091" + id="path963" + style="stroke-width:1.79052;stroke-miterlimit:4;stroke-dasharray:none" /><path + class="st1" + d="m 42.6,19.265912 -3.6,2 c -5,2.8 -23.1,9.5 -27.4,9.5" + id="path965" + style="stroke-width:1.79052;stroke-miterlimit:4;stroke-dasharray:none" /></g> + + + + + + + + + +<polygon + class="st2" + points="24.8,29.5 24.9,39.5 21.5,39.5 21.5,29.5 17,29.5 18.5,25.5 28.5,25.5 28.5,29.5 " + id="polygon985" + transform="matrix(2.1634384,0,0,1.7702694,-25.884336,-36.87808)" + style="stroke:#cccccc;stroke-width:1.12617;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/turnout.svg b/app/bin/bitmaps/SVG/turnout.svg new file mode 100644 index 0000000..35b8260 --- /dev/null +++ b/app/bin/bitmaps/SVG/turnout.svg @@ -0,0 +1,168 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="turnout.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata55"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs53" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1545" + inkscape:window-height="884" + id="namedview51" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:none;stroke:#000000;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="4.0856333" + y1="23.468363" + x2="4.0856333" + y2="35.572159" + id="line4" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="9.5873594" + y1="23.468363" + x2="9.5873594" + y2="35.572159" + id="line6" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="15.089085" + y1="22.368017" + x2="15.089085" + y2="35.572159" + id="line8" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="20.590809" + y1="20.167328" + x2="20.590809" + y2="35.572159" + id="line10" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="26.080217" + y1="18.186707" + x2="26.300287" + y2="35.572159" + id="line12" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="31.594261" + y1="15.765947" + x2="31.594261" + y2="35.572159" + id="line14" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="37.42609" + y1="25.118881" + x2="37.64616" + y2="35.572159" + id="line16" + style="stroke:#db8a0b;stroke-opacity:1" /> +<line + class="st0" + x1="43.282558" + y1="23.468363" + x2="43.282558" + y2="35.572159" + id="line18" + style="stroke:#db8a0b;stroke-opacity:1" /> + + +<line + class="st0" + x1="38.844639" + y1="12.917164" + x2="44.346363" + y2="23.370438" + id="line24" + style="stroke:#db8a0b;stroke-opacity:1" /> + + + + + + + +<line + class="st0" + x1="39.406921" + y1="25.302202" + x2="34.125263" + y2="14.958961" + id="line40" + style="stroke:#db8a0b;stroke-opacity:1" /> + + + + +<g + id="g5462" + inkscape:label="rails" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" + transform="translate(0.66936163,-0.63009306)"><line + class="st1" + x1="0.94624782" + y1="26.433819" + x2="45.229389" + y2="26.433819" + id="line42" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /><line + class="st1" + x1="0.94624782" + y1="33.86689" + x2="45.229389" + y2="33.86689" + id="line44" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /><path + class="st1" + d="m 45.229386,20.882821 -3.961242,2.20069 C 35.656383,26.274512 15.630102,33.866893 10.678549,33.866893" + id="path46" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /><path + class="st1" + d="m 41.048075,14.550085 -3.741174,1.980621 c 0,0 -22.116937,9.903106 -26.628352,9.903106" + id="path48" + style="stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none" /></g></svg> diff --git a/app/bin/bitmaps/SVG/turntable.svg b/app/bin/bitmaps/SVG/turntable.svg new file mode 100644 index 0000000..8dbb510 --- /dev/null +++ b/app/bin/bitmaps/SVG/turntable.svg @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="turntable.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata + id="metadata39"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs37" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1480" + inkscape:window-height="963" + id="namedview35" + showgrid="false" + inkscape:zoom="12.521303" + inkscape:cx="23.9991" + inkscape:cy="24.398419" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:none;stroke:#FBB03B;stroke-width:2;stroke-miterlimit:10;} + .st1{fill:#E6E6E6;stroke:#000000;stroke-miterlimit:10;} + .st2{fill:none;stroke:#000000;stroke-miterlimit:10;} +</style> +<line + class="st0" + x1="6.7533612" + y1="38.311905" + x2="15.04305" + y2="46.830223" + id="line4" + style="stroke:#d88b0d;stroke-opacity:1" /> +<line + class="st0" + x1="8.178153" + y1="18.746393" + x2="8.178153" + y2="30.725275" + id="line6" + style="stroke:#d88b0d;stroke-opacity:1" /> +<line + class="st0" + x1="2.9970963" + y1="18.746393" + x2="2.9970963" + y2="30.725275" + id="line8" + style="stroke:#d88b0d;stroke-opacity:1" /> +<line + class="st0" + x1="19.582573" + y1="4.7600694" + x2="10.904302" + y2="12.745992" + id="line10" + style="stroke:#d88b0d;stroke-opacity:1" /> +<line + class="st0" + x1="16.45108" + y1="1.2180778" + x2="7.7728114" + y2="9.2040005" + id="line12" + style="stroke:#d88b0d;stroke-opacity:1" /> +<line + class="st0" + x1="10.380101" + y1="34.58514" + x2="18.669794" + y2="43.103458" + id="line14" + style="stroke:#d88b0d;stroke-opacity:1" /> +<path + class="st1" + d="m 46.517967,24.203441 c 0,9.982403 -7.90111,18.500721 -18.004169,18.500721 -9.973534,0 -18.00417,-8.252121 -18.00417,-18.500721 0,-10.248599 8.030636,-18.5007199 18.00417,-18.5007199 9.973532,0.1330987 18.004169,8.3852179 18.004169,18.5007199 z" + id="path16" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="10.768679" + y1="21.344675" + x2="0.40656796" + y2="21.344675" + id="line18" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="10.940621" + y1="28.126999" + x2="0.5785107" + y2="28.126999" + id="line20" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="19.363255" + y1="8.8333969" + x2="12.627881" + y2="1.1136714" + id="line22" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="14.652196" + y1="12.867775" + x2="7.9168205" + y2="5.1480484" + id="line24" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="13.745509" + y1="35.100971" + x2="6.6215572" + y2="42.288296" + id="line26" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="18.067993" + y1="39.831398" + x2="11.203092" + y2="46.885635" + id="line28" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<rect + style="opacity:1;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.703957;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + id="rect859" + width="9.630374" + height="35.045143" + x="23.639217" + y="6.6410065" + ry="0.080878146" /><line + class="st2" + x1="23.63274" + y1="6.7675104" + x2="23.63274" + y2="41.373177" + id="line30" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +<line + class="st2" + x1="33.276073" + y1="6.7675104" + x2="33.276073" + y2="41.373177" + id="line32" + style="stroke-width:2.15294;stroke-miterlimit:10;stroke-dasharray:none" /> +</svg> diff --git a/app/bin/bitmaps/SVG/undo.svg b/app/bin/bitmaps/SVG/undo.svg new file mode 100644 index 0000000..290e251 --- /dev/null +++ b/app/bin/bitmaps/SVG/undo.svg @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="undo.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata11"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs9" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1460" + inkscape:window-height="1008" + id="namedview7" + showgrid="false" + inkscape:zoom="11.681573" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style2"> + .st0{fill:#FFFB08;stroke:#FFB70D;stroke-miterlimit:10;} +</style> +<path + class="st0" + d="m 39.482834,43.517164 c 1.173815,0.108926 1.027088,0.108926 3.374724,0.108926 0,-12.526448 -3.814907,-32.024137 -23.329622,-32.350913 C 19.234483,8.1163325 19.381208,5.2842659 19.381208,5.2842659 L 5.8823095,14.216167 19.821391,24.346253 c 0,0 -0.293455,-2.50529 -0.293455,-6.099836 13.792355,-0.108926 19.367988,16.338846 19.954898,25.270747 z" + id="path4" + style="fill:#ffd000;fill-opacity:1;stroke:#a5690d;stroke-width:1.963;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" /> +</svg> diff --git a/app/bin/bitmaps/SVG/zoom-choose.svg b/app/bin/bitmaps/SVG/zoom-choose.svg new file mode 100644 index 0000000..1f41ba8 --- /dev/null +++ b/app/bin/bitmaps/SVG/zoom-choose.svg @@ -0,0 +1,359 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="zoom-choose.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1134"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1132"> + + <defs + id="defs999"> + <filter + id="Adobe_OpacityMaskFilter" + filterUnits="userSpaceOnUse" + x="24.3" + y="25" + width="17.5" + height="19.2"> + <feFlood + style="flood-color:white;flood-opacity:1" + result="back" + id="feFlood994" /> + <feBlend + in="SourceGraphic" + in2="back" + mode="normal" + id="feBlend996" /> + </filter> + </defs> + <mask + maskUnits="userSpaceOnUse" + x="24.3" + y="25" + width="17.5" + height="19.2" + id="SVGID_1_"> + <g + class="st2" + id="g1003"> + + <image + style="overflow:visible;" + width="22" + height="25" + xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA EAMCAwYAAAGKAAABqwAAAe7/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIABkAFgMBIgACEQEDEQH/ xAB3AAEAAwEBAAAAAAAAAAAAAAAAAwQFAgYBAQAAAAAAAAAAAAAAAAAAAAAQAAICAwEBAAAAAAAA AAAAAAMEAQIAIBEQFBEBAAEDAwQDAAAAAAAAAAAAAQIAITEQEVEgQTIDEiIEEgEAAAAAAAAAAAAA AAAAAAAg/9oADAMBAAIRAxEAAADw8HegZYE8Asqw/9oACAECAAEFANP/2gAIAQMAAQUA0//aAAgB AQABBQBZSWK2rNbYA1wEbCJsPJ7ijNlySwL6/f/aAAgBAgIGPwAf/9oACAEDAgY/AB//2gAIAQEB Bj8AkxlsmCmMjZLOhOLjJyUfo9F5nkFbd+NPlmL5FHuI/QunNuj/2Q==" + transform="matrix(1 0 0 1 22 22)" + id="image1001"> + </image> + </g> + </mask> + +</defs><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1518" + inkscape:window-height="932" + id="namedview1130" + showgrid="false" + inkscape:zoom="10.897825" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style986"> + .st0{fill:#FFFFFF;} + .st1{fill:none;stroke:#945F00;stroke-width:5;stroke-miterlimit:10;} + .st2{filter:url(#Adobe_OpacityMaskFilter);} + .st3{opacity:0.8;mask:url(#SVGID_1_);} + .st4{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;} + .st5{fill:url(#SVGID_2_);stroke:#000000;stroke-miterlimit:10;} + .st6{fill:url(#SVGID_3_);stroke:#000000;stroke-miterlimit:10;} + .st7{fill:url(#SVGID_4_);stroke:#000000;stroke-miterlimit:10;} + .st8{fill:url(#SVGID_5_);stroke:#000000;stroke-miterlimit:10;} + .st9{fill:url(#SVGID_6_);stroke:#000000;stroke-miterlimit:10;} +</style> +<path + style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:2.07382;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 30.469189,26.52856 C 43.087232,41.302187 43.087232,41.302187 43.087232,41.302187 L 39.30182,44.456699 26.788926,29.735647 Z" + id="path1710" /> +<linearGradient + id="SVGID_2_" + gradientUnits="userSpaceOnUse" + x1="6.6809001" + y1="17.7167" + x2="30.5739" + y2="17.7167" + gradientTransform="matrix(1.0390529,-0.51836526,0.51836526,1.0390529,-8.1831443,10.762406)" + xlink:href="#SVGID_3_"> + <stop + offset="1.572120e-02" + style="stop-color:#52bdea;stop-opacity:1" + id="stop1014" /> + <stop + offset="4.911487e-02" + style="stop-color:#51c3f0;stop-opacity:1" + id="stop1016" /> + <stop + offset="0.1047" + style="stop-color:#75cbf0;stop-opacity:1" + id="stop1018" /> + <stop + offset="0.1756" + style="stop-color:#9fdbf4;stop-opacity:1" + id="stop1020" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1022" /> + + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1026" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1028" /> + <stop + offset="0.84" + style="stop-color:#1fbdff;stop-opacity:1" + id="stop1030" /> + <stop + offset="0.9944" + style="stop-color:#007dd1;stop-opacity:1" + id="stop1032" /> +</linearGradient> +<path + class="st5" + d="m 31.915477,11.108565 c 1.92652,3.85304 1.92652,8.308118 0.48163,12.04075 -1.324482,3.130595 -3.612225,5.779559 -6.983635,7.465265 C 18.189022,34.226804 9.5196818,31.337024 6.0278649,24.112575 2.4156399,16.888125 5.3054199,8.218786 12.529871,4.6065612 19.633912,1.1147437 28.423659,4.0045236 31.915477,11.108565 Z" + id="path1035" + style="fill:#b3edff;fill-opacity:1;stroke-width:2.07382;stroke-miterlimit:10;stroke-dasharray:none" /> +<linearGradient + id="SVGID_3_" + gradientUnits="userSpaceOnUse" + x1="7.7722" + y1="22.7895" + x2="28.6004" + y2="12.3985"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1037" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1039" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1041" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1043" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1045" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1047" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1049" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1051" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1053" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1055" /> +</linearGradient> + +<linearGradient + id="SVGID_4_" + gradientUnits="userSpaceOnUse" + x1="13.1204" + y1="13.1883" + x2="15.8946" + y2="11.8043"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1060" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1062" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1064" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1066" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1068" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1070" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1072" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1074" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1076" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1078" /> +</linearGradient> + +<linearGradient + id="SVGID_5_" + gradientUnits="userSpaceOnUse" + x1="11.7347" + y1="13.8796" + x2="17.2953" + y2="11.1054" + xlink:href="#SVGID_4_"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1083" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1085" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1087" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1089" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1091" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1093" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1095" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1097" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1099" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1101" /> +</linearGradient> + +<linearGradient + id="SVGID_6_" + gradientUnits="userSpaceOnUse" + x1="19.6297" + y1="23.6825" + x2="24.396" + y2="21.3047"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1106" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1108" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1110" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1112" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1114" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1116" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1118" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1120" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1122" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1124" /> +</linearGradient> + +<path + style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 10.600075,13.283643 16.841287,-0.09515 -8.322107,11.700035 -8.51918,-11.604886" + id="path2931" + sodipodi:nodetypes="cccc" /></svg> diff --git a/app/bin/bitmaps/SVG/zoom-extent.svg b/app/bin/bitmaps/SVG/zoom-extent.svg new file mode 100644 index 0000000..9ee2521 --- /dev/null +++ b/app/bin/bitmaps/SVG/zoom-extent.svg @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="zoom-extent.svg" + inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><g + id="Arrow" + transform="translate(1.5215336,-2.0964614)" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none"><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 33.382137,5.0600292 h 9.979502 v 9.9795018" + id="path1844" /><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="M 43.361639,5.0600292 32.011712,16.409956" + id="path1846" /></g><metadata + id="metadata1039"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1037" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1438" + inkscape:window-height="939" + id="namedview1035" + showgrid="false" + inkscape:zoom="10.785861" + inkscape:cx="23.966561" + inkscape:cy="23.966561" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" + inkscape:pagecheckerboard="0" /> +<style + type="text/css" + id="style937"> + .st0{fill:#FFFFFF;} + .st1{fill:none;stroke:#945F00;stroke-width:5;stroke-miterlimit:10;} + .st2{filter:url(#Adobe_OpacityMaskFilter);} + .st3{opacity:0.8;mask:url(#SVGID_1_);} + .st4{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;} + .st5{fill:url(#SVGID_2_);stroke:#000000;stroke-miterlimit:10;} + .st6{fill:url(#SVGID_3_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st7{fill:url(#SVGID_4_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} +</style> +<path + style="fill:#666666;fill-opacity:1;stroke:#000000;stroke-width:1.38314;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 26.807491,30.152391 3.639939,9.748731 -2.389668,0.880794 -3.660943,-9.793294 z" + id="path2383" + inkscape:transform-center-x="0.27963193" + inkscape:transform-center-y="0.33444225" /> +<linearGradient + id="SVGID_2_" + gradientUnits="userSpaceOnUse" + x1="6.6809" + y1="17.7167" + x2="30.5739" + y2="17.7167" + gradientTransform="matrix(0.35443348,-0.50978148,0.50978148,0.35443348,8.5305438,27.058238)"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop965" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop967" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop969" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop971" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop973" /> + + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop977" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop979" /> + <stop + offset="0.84" + style="stop-color:#3db3ff;stop-opacity:1" + id="stop981" /> + <stop + offset="0.9944" + style="stop-color:#006bb2;stop-opacity:1" + id="stop983" /> +</linearGradient> +<path + class="st5" + d="m 27.200894,16.579117 c 1.875189,1.301268 3.007906,3.372217 3.285275,5.474703 0.180276,1.792015 -0.20968,3.605055 -1.34829,5.245847 -2.43988,3.515982 -7.204566,4.376865 -10.664579,1.906373 -3.515982,-2.43988 -4.376864,-7.204569 -1.936984,-10.720551 2.414522,-3.429398 7.235182,-4.320893 10.664578,-1.906372 z" + id="path986" + style="fill:#b3edff;fill-opacity:1;stroke-width:1.23298;stroke-miterlimit:10;stroke-dasharray:none" /> +<linearGradient + id="SVGID_3_" + gradientUnits="userSpaceOnUse" + x1="14.8466" + y1="18.5732" + x2="21.1876" + y2="15.4097"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop988" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop990" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop992" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop994" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop996" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop998" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1000" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1002" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1004" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1006" /> +</linearGradient> + +<linearGradient + id="SVGID_4_" + gradientUnits="userSpaceOnUse" + x1="11.6793" + y1="20.1534" + x2="24.3893" + y2="13.8124"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1011" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1013" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1015" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1017" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1019" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1021" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1023" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1025" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1027" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1029" /> +</linearGradient> + +<g + id="Arrow-9" + transform="matrix(-1,0,0,1,46.70979,-1.957852)" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none"><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 33.382137,5.0600292 h 9.979502 v 9.9795018" + id="path1844-3" /><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="M 43.361639,5.0600292 32.011712,16.409956" + id="path1846-2" /></g><g + id="Arrow-9-0" + transform="rotate(180,23.135813,25.105294)" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none"><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 33.382137,5.0600292 h 9.979502 v 9.9795018" + id="path1844-3-1" /><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="M 43.361639,5.0600292 32.011712,16.409956" + id="path1846-2-6" /></g><g + id="Arrow-9-9" + transform="matrix(1,0,0,-1,1.7537799,50.14328)" + style="stroke-width:3;stroke-miterlimit:10;stroke-dasharray:none"><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="m 33.382137,5.0600292 h 9.979502 v 9.9795018" + id="path1844-3-9" /><path + style="fill:none;stroke:#ca0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" + d="M 43.361639,5.0600292 32.011712,16.409956" + id="path1846-2-9" /></g></svg> diff --git a/app/bin/bitmaps/SVG/zoom-in.svg b/app/bin/bitmaps/SVG/zoom-in.svg new file mode 100644 index 0000000..8c9a883 --- /dev/null +++ b/app/bin/bitmaps/SVG/zoom-in.svg @@ -0,0 +1,222 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="zoom-in.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1039"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs + id="defs1037" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1440" + inkscape:window-height="939" + id="namedview1035" + showgrid="false" + inkscape:zoom="14.229167" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style937"> + .st0{fill:#FFFFFF;} + .st1{fill:none;stroke:#945F00;stroke-width:5;stroke-miterlimit:10;} + .st2{filter:url(#Adobe_OpacityMaskFilter);} + .st3{opacity:0.8;mask:url(#SVGID_1_);} + .st4{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;} + .st5{fill:url(#SVGID_2_);stroke:#000000;stroke-miterlimit:10;} + .st6{fill:url(#SVGID_3_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st7{fill:url(#SVGID_4_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} +</style> +<path + style="fill:#666666;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" + d="M 30.073634,26.309814 43.199281,41.81576 39.390804,45.01216 26.197147,29.438204 Z" + id="path2383" /> +<linearGradient + id="SVGID_2_" + gradientUnits="userSpaceOnUse" + x1="6.6809" + y1="17.7167" + x2="30.5739" + y2="17.7167" + gradientTransform="matrix(0.8948 -0.4464 0.4464 0.8948 -6.2541 9.9583)"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop965" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop967" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop969" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop971" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop973" /> + + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop977" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop979" /> + <stop + offset="0.84" + style="stop-color:#3db3ff;stop-opacity:1" + id="stop981" /> + <stop + offset="0.9944" + style="stop-color:#006bb2;stop-opacity:1" + id="stop983" /> +</linearGradient> +<path + class="st5" + d="m 31.708262,10.530367 c 1.91834,3.836679 1.91834,8.27284 0.479585,11.989623 -1.318858,3.117302 -3.596887,5.755019 -6.953981,7.433566 C 18.040093,33.550442 9.4075646,30.672933 5.9305742,23.47916 2.3336874,16.285386 5.2111968,7.652858 12.40497,4.0559712 19.478848,0.57898069 28.231272,3.4564902 31.708262,10.530367 Z" + id="path986" + style="fill:#b3edff;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;fill-opacity:1" /> +<linearGradient + id="SVGID_3_" + gradientUnits="userSpaceOnUse" + x1="14.8466" + y1="18.5732" + x2="21.1876" + y2="15.4097"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop988" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop990" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop992" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop994" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop996" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop998" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1000" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1002" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1004" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1006" /> +</linearGradient> +<line + class="st6" + x1="19.011627" + y1="7.305531" + x2="19.011627" + y2="26.488928" + id="line1009" + style="fill:url(#SVGID_3_);stroke-width:4.532;stroke-miterlimit:10;stroke-dasharray:none" /> +<linearGradient + id="SVGID_4_" + gradientUnits="userSpaceOnUse" + x1="11.6793" + y1="20.1534" + x2="24.3893" + y2="13.8124"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1011" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1013" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1015" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1017" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1019" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1021" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1023" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1025" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1027" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1029" /> +</linearGradient> +<line + class="st7" + x1="9.4199266" + y1="17.192142" + x2="28.603325" + y2="17.192142" + id="line1032" + style="fill:url(#SVGID_4_);stroke-width:4.53151;stroke-miterlimit:10;stroke-dasharray:none" /> +</svg> diff --git a/app/bin/bitmaps/SVG/zoom-out.svg b/app/bin/bitmaps/SVG/zoom-out.svg new file mode 100644 index 0000000..a476985 --- /dev/null +++ b/app/bin/bitmaps/SVG/zoom-out.svg @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + viewBox="0 0 48 48" + style="enable-background:new 0 0 48 48;" + xml:space="preserve" + sodipodi:docname="zoom-out.svg" + inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"><metadata + id="metadata1039"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs1037" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1443" + inkscape:window-height="939" + id="namedview1035" + showgrid="false" + inkscape:zoom="14.229167" + inkscape:cx="24" + inkscape:cy="24" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" + inkscape:document-rotation="0" /> +<style + type="text/css" + id="style937"> + .st0{fill:#FFFFFF;} + .st1{fill:none;stroke:#945F00;stroke-width:5;stroke-miterlimit:10;} + .st2{filter:url(#Adobe_OpacityMaskFilter);} + .st3{opacity:0.8;mask:url(#SVGID_1_);} + .st4{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;} + .st5{fill:url(#SVGID_2_);stroke:#000000;stroke-miterlimit:10;} + .st6{fill:url(#SVGID_3_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} + .st7{fill:url(#SVGID_4_);stroke:#000000;stroke-width:2;stroke-miterlimit:10;} +</style> +<path + style="fill:#666666;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" + d="M 30.073634,26.309814 43.199281,41.81576 39.390804,45.01216 26.197147,29.438204 Z" + id="path2383" /> +<linearGradient + id="SVGID_2_" + gradientUnits="userSpaceOnUse" + x1="6.6809" + y1="17.7167" + x2="30.5739" + y2="17.7167" + gradientTransform="matrix(0.8948 -0.4464 0.4464 0.8948 -6.2541 9.9583)"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop965" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop967" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop969" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop971" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop973" /> + + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop977" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop979" /> + <stop + offset="0.84" + style="stop-color:#3db3ff;stop-opacity:1" + id="stop981" /> + <stop + offset="0.9944" + style="stop-color:#006bb2;stop-opacity:1" + id="stop983" /> +</linearGradient> +<path + class="st5" + d="m 31.708262,10.530367 c 1.91834,3.836679 1.91834,8.27284 0.479585,11.989623 -1.318858,3.117302 -3.596887,5.755019 -6.953981,7.433566 C 18.040093,33.550442 9.4075646,30.672933 5.9305742,23.47916 2.3336874,16.285386 5.2111968,7.652858 12.40497,4.0559712 19.478848,0.57898069 28.231272,3.4564902 31.708262,10.530367 Z" + id="path986" + style="fill:#b3edff;stroke-width:2;stroke-miterlimit:10;stroke-dasharray:none;fill-opacity:1" /> +<linearGradient + id="SVGID_3_" + gradientUnits="userSpaceOnUse" + x1="14.8466" + y1="18.5732" + x2="21.1876" + y2="15.4097"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop988" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop990" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop992" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop994" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop996" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop998" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1000" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1002" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1004" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1006" /> +</linearGradient> + +<linearGradient + id="SVGID_4_" + gradientUnits="userSpaceOnUse" + x1="11.6793" + y1="20.1534" + x2="24.3893" + y2="13.8124"> + <stop + offset="1.572120e-02" + style="stop-color:#29ABE2" + id="stop1011" /> + <stop + offset="4.911487e-02" + style="stop-color:#32AFE3" + id="stop1013" /> + <stop + offset="0.1047" + style="stop-color:#4CB9E7" + id="stop1015" /> + <stop + offset="0.1756" + style="stop-color:#75C9EC" + id="stop1017" /> + <stop + offset="0.259" + style="stop-color:#AFE0F4" + id="stop1019" /> + <stop + offset="0.352" + style="stop-color:#F8FCFE" + id="stop1021" /> + <stop + offset="0.3609" + style="stop-color:#FFFFFF" + id="stop1023" /> + <stop + offset="0.5079" + style="stop-color:#FFFFFF" + id="stop1025" /> + <stop + offset="0.84" + style="stop-color:#0075BE" + id="stop1027" /> + <stop + offset="0.9944" + style="stop-color:#005B97" + id="stop1029" /> +</linearGradient> +<line + class="st7" + x1="9.4199266" + y1="17.192142" + x2="28.603325" + y2="17.192142" + id="line1032" + style="fill:url(#SVGID_4_);stroke-width:4.53151;stroke-miterlimit:10;stroke-dasharray:none" /> +</svg> diff --git a/app/bin/bitmaps/above.xpm b/app/bin/bitmaps/above.xpm deleted file mode 100644 index 07f5daf..0000000 --- a/app/bin/bitmaps/above.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * above_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ..........", -" ..... . . . .", -" ..XXX... . . ..", -" .XXXXXX.. . . .", -".XXXXXXX. . . ..", -".XXXXXXXX. . . .", -".XXXXXXXX.. . ..", -".XXXXXXXX. . . .", -".XXXXXXX. . . ..", -" .XXXXXX.. . . .", -" ..XXX... . . ..", -" ..... . . . .", -" ..........", -" ", -" "}; diff --git a/app/bin/bitmaps/background.xpm b/app/bin/bitmaps/background.xpm index 4859734..2e8a141 100644 --- a/app/bin/bitmaps/background.xpm +++ b/app/bin/bitmaps/background.xpm @@ -1,155 +1,157 @@ -/* XPM */
-static char *background[] = {
-/* columns rows colors chars-per-pixel */
-"16 16 133 2 ",
-" c #0B2B2B",
-". c #183A3A",
-"X c #789757",
-"o c #799358",
-"O c #7E9068",
-"+ c #86A068",
-"@ c #9BA77A",
-"# c #99B073",
-"$ c #9DB777",
-"% c #98B67E",
-"& c #A6BD7F",
-"* c #A4BE7E",
-"= c #77AAA8",
-"- c #5FA7D7",
-"; c #58A1DB",
-": c #59A2DB",
-"> c #5AA3DA",
-", c #5BA4DB",
-"< c #5CA4D9",
-"1 c #5DA5DB",
-"2 c #66ACD3",
-"3 c #62A9D5",
-"4 c #69AED1",
-"5 c #60A9DB",
-"6 c #63ACDB",
-"7 c #64ACDA",
-"8 c #66AFDB",
-"9 c #62ACDE",
-"0 c #67B0DC",
-"q c #67B0DE",
-"w c #68B1DB",
-"e c #6BB4DB",
-"r c #6EB7DB",
-"t c #6FBADF",
-"y c #71B9DB",
-"u c #71BADB",
-"i c #74BEDE",
-"p c #6FBAE0",
-"a c #6EB9E3",
-"s c #73BEE3",
-"d c #74BEE0",
-"f c #72BEE4",
-"g c #70BCE7",
-"h c #6BBFFF",
-"j c #7CC9E9",
-"k c #7CCAEC",
-"l c #6EC2FF",
-"z c #6FC4FF",
-"x c #73C8FF",
-"c c #74C9FF",
-"v c #78CDFF",
-"b c #79CEFF",
-"n c #7DD2FF",
-"m c #7ED3FF",
-"M c #809786",
-"N c #84AC98",
-"B c #93A492",
-"V c #A1AD8E",
-"C c #A3B587",
-"Z c #A7B787",
-"A c #ABB584",
-"S c #A2B389",
-"D c #A3B988",
-"F c #A8BA94",
-"G c #ACBD97",
-"H c #B5BC90",
-"J c #8EA8A8",
-"K c #97BEAB",
-"L c #8BADB7",
-"P c #80B2B8",
-"I c #91B5B6",
-"U c #AFBFA9",
-"Y c #A4C182",
-"T c #B5C987",
-"R c #B2C088",
-"E c #BAD08E",
-"W c #AFC491",
-"Q c #B6CB97",
-"! c #BED190",
-"~ c #AFCEAA",
-"^ c #BBCAA0",
-"/ c #BECFA1",
-"( c #BDCEA7",
-") c #B5C7A9",
-"_ c #BFD0AE",
-"` c #BFD1AF",
-"' c #A8CDBF",
-"] c #C2CC95",
-"[ c #C7D798",
-"{ c #C3D19D",
-"} c #C6D898",
-"| c #CDD8A6",
-" . c #D0DDA6",
-".. c #C4DCB6",
-"X. c #D3E0A2",
-"o. c #D0E4B9",
-"O. c #DBE5B9",
-"+. c #D9E5BD",
-"@. c #E2ECB3",
-"#. c #E4EDB0",
-"$. c #87B8C5",
-"%. c #96CFDB",
-"&. c #9CD1D5",
-"*. c #98D1DF",
-"=. c #A4CDC4",
-"-. c #ADD7D0",
-";. c #B0D1D5",
-":. c #82D6FF",
-">. c #83D7FF",
-",. c #83D8FF",
-"<. c #8CDEFF",
-"1. c #95DEFC",
-"2. c #99E1F6",
-"3. c #A8E4ED",
-"4. c #B6E6E2",
-"5. c #BDEAE6",
-"6. c #ADE7F8",
-"7. c #E2EBCA",
-"8. c #E2F3F3",
-"9. c #E4F4F4",
-"0. c #E6F5F5",
-"q. c #E9F6F6",
-"w. c #EBF7F7",
-"e. c #E9F9F9",
-"r. c #EEF8F8",
-"t. c #F1F9F9",
-"y. c #F4FBFB",
-"u. c #F7FCFC",
-"i. c #F9FDFD",
-"p. c #FCFEFE",
-"a. c #FEFFFF",
-"s. c #FFFFFF",
-"d. c None",
-/* pixels */
-"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.",
-"d.s.s.s.s.s.s.s.s.s.s.s.s.s.d.d.",
-"d.s.; ; , < 5 6 7 w e r r s.d.d.",
-"d.s.; l l 9 x v a m ,.1.k s.d.d.",
-"d.i.< z x q b m j ,.3.5.-.i.d.d.",
-"d.u.- 7 q g p s %.*.%.=.{ u.d.d.",
-"d.y.3 b m t :.5.| @.o...K u.d.d.",
-"d.t.2 m :.i 2.#._ .} ! = t.d.d.",
-"d.w.4 u i k ' ] / W * $ = w.d.d.",
-"d.q.$.<.6.;.7.+.^ ~ D % N q.d.d.",
-"d.w.H O. .R T * D _ ) F I q.d.d.",
-"d.q.A [ ! # Q ( F F ) V L 0.d.d.",
-"d.0.@ Z C S + X o O B M J 0.d.d.",
-". e.8.8.8.8.8.8.8.8.8.8.8.e.. d.",
-"d. d.d.",
-"d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d."
-};
+static char *background_x16[] = {
+ "16 16 23 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339933",
+ "7 c #339966",
+ "8 c #33CC33",
+ "9 c #669966",
+ "A c #66CC66",
+ "B c #66CCFF",
+ "C c #999966",
+ "D c #999999",
+ "E c #99CC66",
+ "F c #99CC99",
+ "G c #99CCCC",
+ "H c #CC9999",
+ "I c #CCCC99",
+ "J c #FFCC99",
+ "K c #FFCCCC",
+ "L c #C0C0C0",
+ "3333333333333333",
+ "5BBBBBBBBDCCCCC0",
+ "5BBBBBBBBHC69HH0",
+ "5BBBBBBBBH966CH0",
+ "5BBBBBBBFED99HH0",
+ "5BBBBBGD88AHHHH0",
+ "5BBGLHHD88AIHHH0",
+ "5BGDCHHHIEIIIIH0",
+ "4GH77CHIIIIIIII0",
+ "2HH77CIIIJKKIII0",
+ "2HHDCFIIKKKKIIH0",
+ "2HHHE88EKKKJIIH0",
+ "2C9CE88EIKJIIIH0",
+ "2666CAAIIIIIIHH0",
+ "2969HHHHIIIHHHH0",
+ "2011000000000000"};
+
+static char *background_x24[] = {
+ "24 24 23 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333333",
+ "3 c #339933",
+ "4 c #339966",
+ "5 c #33CC33",
+ "6 c #666666",
+ "7 c #669966",
+ "8 c #6699CC",
+ "9 c #66CC66",
+ "A c #66CCFF",
+ "B c #996666",
+ "C c #999966",
+ "D c #999999",
+ "E c #99CC66",
+ "F c #99CC99",
+ "G c #99CCCC",
+ "H c #CC9999",
+ "I c #CCCC99",
+ "J c #FFCC99",
+ "K c #FFCCCC",
+ "L c #C0C0C0",
+ " 0000000000000000000000 ",
+ "28888888888888BBBBBBBB62",
+ "2AAAAAAAAAAAAAHHHHCHHHC2",
+ "2AAAAAAAAAAAAGHH733CHHC2",
+ "2AAAAAAAAAAAALH73337HHC2",
+ "2AAAAAAAAAAAAHHC3333HHC2",
+ "2AAAAAAAAAAAFDEH733CHHC2",
+ "2AAAAAAAAAGH9559HDHHHHC2",
+ "2AAAAAAAAGHE5555HHHHHHC2",
+ "2AAAAAGHHHHE5555IIHHHHC2",
+ "2AAAGHHHHHHHE55IIIIIHHC2",
+ "2AAGH77HHHHIIIIIIIIIIHC2",
+ "2AGH7444HHIIIIIIIIIIIIC2",
+ "2CHH7444HHIIIIIKKKIIIIC2",
+ "2CHHC447HIIIIJKKKKIIIIC2",
+ "2CHHHCCCHIIIJKKKKKIIIIC2",
+ "2CHHHHHE55EIKKKKKJIIIHC2",
+ "2CHHHHE5555IKKKKKIIIIHC2",
+ "2CC73HH5555IIKKKIIIIHHC2",
+ "2C3333C9559IIIIIIIIIHHC2",
+ "2C3333CH9EIIIIIIIIIHHHC2",
+ "2C3337DHHHHIIIIIIHHHHHC2",
+ "2BC77CCCCCCCCCCCCCCCCCC2",
+ "122222222222222222222222"};
+
+static char *background_x32[] = {
+ "32 32 28 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #336666",
+ "3 c #339933",
+ "4 c #339966",
+ "5 c #33CC33",
+ "6 c #33CC66",
+ "7 c #663333",
+ "8 c #666633",
+ "9 c #666666",
+ "A c #666699",
+ "B c #669966",
+ "C c #6699CC",
+ "D c #66CC66",
+ "E c #66CCFF",
+ "F c #996666",
+ "G c #999966",
+ "H c #999999",
+ "I c #99CC66",
+ "J c #99CC99",
+ "K c #99CCCC",
+ "L c #CC9999",
+ "M c #CCCC99",
+ "N c #FFCC99",
+ "O c #FFCCCC",
+ "P c #C0C0C0",
+ "Q c #808080",
+ " ",
+ "02AAAAAAAAAAAAAAAA97777777777710",
+ "0CEEEEEEEEEEEEEEEEKLLLLLLLLLLLF0",
+ "0CEEEEEEEEEEEEEEEELLLLGGGLLLLLF0",
+ "0CEEEEEEEEEEEEEEEELLLG333GLLLLF0",
+ "0CEEEEEEEEEEEEEEEELLG33333GLLLF0",
+ "0CEEEEEEEEEEEEEEEKLLG33333GLLLF0",
+ "0CEEEEEEEEEEEEEEELLLG33333BLLLF0",
+ "0CEEEEEEEEEEEEEEJLLILB333BLLLLF0",
+ "0CEEEEEEEEEEEEELI555ILBGGGLLLLF0",
+ "0CEEEEEEEEEEEKLI55555ILLLLLLLLF0",
+ "0CEEEEEEEEEEPLLD55555ILLLLLLLLF0",
+ "0CEEEEEEKPLLLLLI55555DMMLLLLLLF0",
+ "0CEEEELLLLLLLLLID555DMMMMMLLLLF0",
+ "0CEEEKLLLLLLLLLLM6IIMMMMMMMLLLF0",
+ "0CEEKLG44BLLLLLMMMMMMMMMMMMMMLF0",
+ "0CEKLHB4444LLLMMMMMMMMMMMMMMMLF0",
+ "0QLLLG4444BLLMMMMMMMNOOMMMMMMLF0",
+ "09LLLH44444LMMMMMMMOOOOOMMMMMLF0",
+ "09LLLLB444GLMMMMMMOOOOOOMMMMMLF0",
+ "09LLLLL4BBLMMMMMMOOOOOOOMMMMMLF0",
+ "09LLLLLLLLDD5IMMOOOOOOONMMMMLLF0",
+ "09LLLLLLLI5555IMOOOOOOOMMMMMLLF0",
+ "09LLLLLLL55555DMOOOOOONMMMMMLLF0",
+ "09LGBBBLLD5555DMMOOOOMMMMMMLLLF0",
+ "09H3333BH55555DMMMMMMMMMMMMLLLF0",
+ "09333333GHD555MMMMMMMMMMMMLLLLF0",
+ "09B33333GLHIMMMMMMMMMMMMMLLLLLF0",
+ "09B33333GLLLLLMMMMMMMMMLLLLLLLF0",
+ "09LG333GLLLLLLLLLLLLLLLLLLLLLLF0",
+ "07FFBFFFFFFFFFFFFFFFFFFFFFFFFF80",
+ " 000000000000000000000000000000 "};
+
+static char **background_xpm[3] = { background_x16, background_x24, background_x32 };
+
diff --git a/app/bin/bitmaps/below.xpm b/app/bin/bitmaps/below.xpm deleted file mode 100644 index 43bc22a..0000000 --- a/app/bin/bitmaps/below.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * below_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ...........", -" ... . . . . .", -" ..XX.. . . . ..", -" .XXX. . . . . .", -".XXXX.. . . . ..", -".XXXX. . . . . .", -".XXXX.. . . . ..", -".XXXX. . . . . .", -".XXXX.. . . . ..", -" .XXX. . . . . .", -" ..XX.. . . . ..", -" ... . . . . .", -" ...........", -" ", -" "}; diff --git a/app/bin/bitmaps/benchwork.xpm b/app/bin/bitmaps/benchwork.xpm new file mode 100644 index 0000000..a94b1fa --- /dev/null +++ b/app/bin/bitmaps/benchwork.xpm @@ -0,0 +1,112 @@ +static char *benchwork_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #663300",
+ "3 c #993300",
+ "4 c #996600",
+ "5 c #CC6600",
+ "6 c #FF6600",
+ "7 c #FF9900",
+ " 2 3 ",
+ " 126743 ",
+ " 1476257 ",
+ " 026752677 ",
+ " 1366247777 ",
+ " 00001677777 ",
+ " 07772777777 ",
+ " 07772777777 ",
+ " 07772777777 ",
+ " 07772777777 ",
+ " 07772777775 ",
+ " 07772777742 ",
+ " 0777277622 ",
+ " 07772762 ",
+ " 0777252 ",
+ " 000012 "};
+
+static char *benchwork_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC6600",
+ "7 c #FF6600",
+ "8 c #FF9900",
+ " ",
+ " 03788843 ",
+ " 147887368 ",
+ " 02688863788 ",
+ " 147887358888 ",
+ " 01688863788888 ",
+ " 137887447888888 ",
+ " 0000003688888888 ",
+ " 0888807888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888888 ",
+ " 0888808888888886 ",
+ " 0888808888888743 ",
+ " 088880888888733 ",
+ " 0888808888863 ",
+ " 088880888853 ",
+ " 08888088733 ",
+ " 088880873 ",
+ " 08888053 ",
+ " 0000001 "};
+
+static char *benchwork_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC6600",
+ "7 c #FF6600",
+ "8 c #FF9900",
+ " ",
+ " 027888874 ",
+ " 3478888736 ",
+ " 026888885378 ",
+ " 1478888736888 ",
+ " 16888886378888 ",
+ " 1378888734888888 ",
+ " 16888886268888888 ",
+ " 0378888743788888888 ",
+ " 16888887368888888888 ",
+ " 000000001788888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888888 ",
+ " 088888884888888888873 ",
+ " 08888888488888888863 ",
+ " 0888888848888888863 ",
+ " 088888884888888743 ",
+ " 08888888488888733 ",
+ " 088888884888863 ",
+ " 08888888488853 ",
+ " 0888888848733 ",
+ " 08888888463 ",
+ " 0000000033 ",
+ " 0 "};
+
+static char **benchwork_xpm[3] = { benchwork_x16, benchwork_x24, benchwork_x32 };
+
diff --git a/app/bin/bitmaps/bezier-line.xpm b/app/bin/bitmaps/bezier-line.xpm new file mode 100644 index 0000000..2aea754 --- /dev/null +++ b/app/bin/bitmaps/bezier-line.xpm @@ -0,0 +1,98 @@ +static char *bezier_line_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " 2 ",
+ " 2222222222221",
+ " 22222222221111",
+ " 22 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 2 ",
+ " 13331 2222 ",
+ "12222222222 2 ",
+ " 222 "};
+
+static char *bezier_line_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " 222 ",
+ " 22 2222222222222221 ",
+ " 2 2222222222221111 ",
+ " 2222 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 00 2222 ",
+ " 000 22 2 ",
+ " 222222222222222 2 ",
+ " 2222 ",
+ " 22 "};
+
+static char *bezier_line_x32[] = {
+ "32 32 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #990000",
+ "3 c #CC0000",
+ "4 c #800000",
+ " ",
+ " 33333 ",
+ " 3333333 ",
+ " 33 333333333333333333332 ",
+ " 33 333333333333333333334 ",
+ " 3333333 0000 ",
+ " 33333 0000 ",
+ " 00 ",
+ " 00 ",
+ " 000 ",
+ " 000 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 3333 ",
+ " 0000 333333 ",
+ " 24441142 33333333 33 ",
+ " 23333333333333333333 33 ",
+ " 233333 333 333 ",
+ " 33333 ",
+ " 333 "};
+
+static char **bezier_line_xpm[3] = { bezier_line_x16, bezier_line_x24, bezier_line_x32 };
+
diff --git a/app/bin/bitmaps/bezier-track.xpm b/app/bin/bitmaps/bezier-track.xpm new file mode 100644 index 0000000..a8b7d92 --- /dev/null +++ b/app/bin/bitmaps/bezier-track.xpm @@ -0,0 +1,130 @@ +static char *bezier_track_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #996666",
+ "2 c #999999",
+ "3 c #CC0000",
+ "4 c #CC6666",
+ "5 c #CC9966",
+ "6 c #FFCCCC",
+ "7 c #808080",
+ " ",
+ " 434 200",
+ " 3 33333333333",
+ " 434 07 5 5",
+ " 0 5 700",
+ " 05 602 ",
+ " 06 50 ",
+ " 06160 ",
+ " 05 60 ",
+ " 06 50 ",
+ " 206160 ",
+ "0075 60 ",
+ " 5 570 434 ",
+ "3333333333 3 ",
+ "002 434 ",
+ " "};
+
+static char *bezier_track_x24[] = {
+ "24 24 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663333",
+ "5 c #666633",
+ "6 c #990000",
+ "7 c #993300",
+ "8 c #996633",
+ "9 c #999933",
+ "A c #999966",
+ "B c #CC0000",
+ "C c #CC3300",
+ "D c #CC3333",
+ "E c #CC6633",
+ "F c #CC9966",
+ "G c #CCCC66",
+ " ",
+ " FF ",
+ " BBBB G 00000",
+ " BB BBBBBBBBBBD76BEEB",
+ " BB BBBBBBBBB66ECBEEB",
+ " BBBB GF0 FF0100",
+ " 4F 244 G ",
+ " 0 GF20FF ",
+ " G4 2F ",
+ " 18G 00 ",
+ " 0 A5 ",
+ " F48 0F ",
+ " 05GG10 ",
+ " F50 A5 ",
+ " A5F 0 F ",
+ " F 0 GG20 ",
+ " 854 58G ",
+ " G G808G 00 ",
+ " 9218 F0 BB ",
+ "084 GF 02F BBBB ",
+ "BBBBBBBBBBBBBBBBB B ",
+ "083008 BBBB ",
+ "088 FF BBB ",
+ " G "};
+
+static char *bezier_track_x32[] = {
+ "32 32 20 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663333",
+ "5 c #666633",
+ "6 c #990000",
+ "7 c #993300",
+ "8 c #996633",
+ "9 c #999933",
+ "A c #999966",
+ "B c #CC0000",
+ "C c #CC3300",
+ "D c #CC3333",
+ "E c #CC6633",
+ "F c #CC9933",
+ "G c #CC9966",
+ "H c #CCCC66",
+ "I c #800000",
+ " ",
+ " HH ",
+ " BBB AG80",
+ " BBBBBB H 0002540",
+ " BBB BBBBBBBBBBBBBCE76BBEFE ",
+ " BB BBBBBBBBBBBBBBBBBBBBBBB",
+ " BBB BBB EDBI6CGGC EGE ",
+ " BBBBB HG2 GH800340",
+ " BBB G5GH 484 HH ",
+ " 0GHHG00AH ",
+ " H 0 H95 ",
+ " H88 35H ",
+ " 85HH 0 ",
+ " 0 HHG3 ",
+ " HH2 H5GH ",
+ " HA8H 02H ",
+ " 2GHHG0 ",
+ " 0 HH8A ",
+ " H84 45HH ",
+ " 88HH 0 ",
+ " 0 HHH10 ",
+ " HG2 HG8H ",
+ " H 85GH 2GH ",
+ " HG20GHHH 0 ",
+ " HG0448 HG2 BBB ",
+ "00400GH 85GH BBBBB ",
+ " EFBBEFEB66DEEBBBBBBBBB BBB ",
+ " BBBBBBBBBBBBBBBBBBBBB BB ",
+ " EG7III8E BBB BBB ",
+ "04520 HH BBBBB ",
+ " HH BB ",
+ " "};
+
+static char **bezier_track_xpm[3] = { bezier_track_x16, bezier_track_x24, bezier_track_x32 };
+
diff --git a/app/bin/bitmaps/bezier.xpm b/app/bin/bitmaps/bezier.xpm deleted file mode 100644 index 6c592ed..0000000 --- a/app/bin/bitmaps/bezier.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */
-static char * bezier_xpm[] = {
-"16 16 4 1",
-" c None",
-"! c #000000000000",
-"# c #FFFF00000000",
-"$ c #808080000000",
-" ### !!!!",
-" # #########",
-" ### !! !",
-" $!! $!!!",
-" !!$$ !! !",
-" !! $!$ !",
-" $$ !! !! $ ",
-" !!!!!!! ",
-" !! ! $$ ",
-" $!! !! ",
-"! !$$!! ",
-"! ! $! ",
-"!!!$ !!$ ",
-"! !! ### ",
-"######### # ",
-"!!!! ### "};
\ No newline at end of file diff --git a/app/bin/bitmaps/block.xpm b/app/bin/bitmaps/block.xpm index 232d859..e3a6937 100644 --- a/app/bin/bitmaps/block.xpm +++ b/app/bin/bitmaps/block.xpm @@ -1,24 +1,138 @@ -/* XPM */
-static char * block_xpm[] = {
-"16 16 5 1",
-" c None",
-". c #2E3436",
-"+ c #00FFFF",
-"@ c #25E100",
-"# c #EF2929",
-".. . ",
-"... ... ",
-" .....++ @@@ ",
-" ...+++ @@@@@ ",
-" ...+++ @@@@@ ",
-"...++++ @@@@@ ",
-" .++++++ @@@ ",
-" ++ +++ ",
-" +++ + ",
-" ### +++ +++ ",
-" ##### +++++..",
-" ##### +++...",
-" ##### +++... ",
-" ### +++.... ",
-" +......",
-" .. ..."};
+static char *block_x16[] = {
+ "16 16 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006600",
+ "4 c #006666",
+ "5 c #009900",
+ "6 c #009999",
+ "7 c #00CC00",
+ "8 c #00FF00",
+ "9 c #330000",
+ "A c #660000",
+ "B c #990000",
+ "C c #990033",
+ "D c #CC0033",
+ "E c #FF0033",
+ "F c #008000",
+ "G c #008080",
+ " ",
+ " 0 ",
+ " 0 1111 ",
+ " 0 6 1577F1 ",
+ " G6 088880 ",
+ " 66 188881 ",
+ " 6 66 178871 ",
+ " 66 1FF3 ",
+ " 099966 00 ",
+ " 0ADDB966 66 ",
+ " 9DEEE9 6666 ",
+ " 9EEEE9 66 ",
+ " 9CEED9 6640 ",
+ " 99A9 6 0 ",
+ " 0 ",
+ " 0"};
+
+static char *block_x24[] = {
+ "24 24 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #006666",
+ "4 c #009900",
+ "5 c #009999",
+ "6 c #00CC00",
+ "7 c #00FF00",
+ "8 c #330000",
+ "9 c #660000",
+ "A c #990000",
+ "B c #990033",
+ "C c #CC0033",
+ "D c #FF0033",
+ "E c #800000",
+ "F c #008000",
+ "G c #008080",
+ " ",
+ " 00 ",
+ " 000 ",
+ " 000 110 ",
+ " 000 5 1266421 ",
+ " 000 555 2777772 ",
+ " 03555 167777761 ",
+ " 555 177777761 ",
+ " 55555 177777761 ",
+ " 555 555 167777741 ",
+ " 5 555 2677761 ",
+ " 555 12F21 ",
+ " 080 555 ",
+ " 8BCC98 555 ",
+ " 8DDDDD9 555 55 ",
+ " 0BDDDDDC8 555555 ",
+ " 8CDDDDDC8 5555 ",
+ " 8CDDDDDC8 55G0 ",
+ " 9DDDDDA8 555000 ",
+ " 9ECDDB9 55 000 ",
+ " 08088 000 ",
+ " 000 ",
+ " 000",
+ " 0 "};
+
+static char *block_x32[] = {
+ "32 32 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006600",
+ "4 c #006666",
+ "5 c #009900",
+ "6 c #009999",
+ "7 c #00CC00",
+ "8 c #00FF00",
+ "9 c #330000",
+ "A c #660000",
+ "B c #990000",
+ "C c #990033",
+ "D c #CC0033",
+ "E c #FF0033",
+ "F c #800000",
+ "G c #008000",
+ "H c #008080",
+ " ",
+ " 00 ",
+ " 000 ",
+ " 0000 ",
+ " 0000 00 ",
+ " 0000 6 135531 ",
+ " 0000 666 137888871 ",
+ " 0000 6666 1888888871 ",
+ " 000H666 1588888888G ",
+ " 26666 178888888850 ",
+ " 66666 178888888871 ",
+ " 6666666 178888888850 ",
+ " 6666 6666 05888888883 ",
+ " 66 6666 1788888851 ",
+ " 6666 17888851 ",
+ " 6666 103111 ",
+ " 00 6666 ",
+ " 99FBA9 6666 ",
+ " 9DEEEEDA 6666 6 ",
+ " 9DEEEEEED9 6666 666 ",
+ " 9EEEEEEEEB0 6666 666 ",
+ " 0FEEEEEEEED9 666666 ",
+ " 0FEEEEEEEED9 6666 ",
+ " AEEEEEEEEC0 66640 ",
+ " 9DEEEEEEEA 6664000 ",
+ " AEEEEEEB9 666 0000 ",
+ " 9DDDDA9 6 0000 ",
+ " 0999 0000 ",
+ " 0000 ",
+ " 000 ",
+ " 00 ",
+ " "};
+
+static char **block_xpm[3] = { block_x16, block_x24, block_x32 };
+
diff --git a/app/bin/bitmaps/bottom.xpm b/app/bin/bitmaps/bottom.xpm new file mode 100644 index 0000000..dd50a6c --- /dev/null +++ b/app/bin/bitmaps/bottom.xpm @@ -0,0 +1,101 @@ +static char *bottom_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #FF0000",
+ "4 c #808080",
+ " ",
+ " ",
+ " 000000000 ",
+ " 104444444440",
+ " 11204444444440",
+ " 123304444444440",
+ " 233304444444440",
+ "1233304444444440",
+ "1233304444444440",
+ "1233304444444440",
+ " 133304444444440",
+ " 13304444444440",
+ " 1104444444440",
+ " 0000000000",
+ " ",
+ " "};
+
+static char *bottom_x24[] = {
+ "24 24 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #FF0000",
+ "4 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 000000000000000 ",
+ " 111044444444444440 ",
+ " 1223044444444444440 ",
+ " 13333044444444444440 ",
+ " 133333044444444444440 ",
+ " 1333333044444444444440 ",
+ " 1333333044444444444440 ",
+ " 1333333044444444444440 ",
+ " 2333333044444444444440 ",
+ " 1333333044444444444440 ",
+ " 1333333044444444444440 ",
+ " 1233333044444444444440 ",
+ " 123333044444444444440 ",
+ " 12333044444444444440 ",
+ " 1112044444444444440 ",
+ " 000000000000000 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *bottom_x32[] = {
+ "32 32 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #FF0000",
+ "4 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00000000000000000000 ",
+ " 04444444444444444440 ",
+ " 11104444444444444444440 ",
+ " 1223304444444444444444440 ",
+ " 113333304444444444444444440 ",
+ " 1233333304444444444444444440 ",
+ " 2333333304444444444444444440 ",
+ " 13333333304444444444444444440 ",
+ " 123333333304444444444444444440 ",
+ " 123333333304444444444444444440 ",
+ " 133333333304444444444444444440 ",
+ " 133333333304444444444444444440 ",
+ " 133333333304444444444444444440 ",
+ " 123333333304444444444444444440 ",
+ " 123333333304444444444444444440 ",
+ " 13333333304444444444444444440 ",
+ " 1333333304444444444444444440 ",
+ " 133333304444444444444444440 ",
+ " 12333304444444444444444440 ",
+ " 1112204444444444444444440 ",
+ " 1104444444444444444440 ",
+ " 00000000000000000000 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **bottom_xpm[3] = { bottom_x16, bottom_x24, bottom_x32 };
+
diff --git a/app/bin/bitmaps/box.xpm b/app/bin/bitmaps/box.xpm new file mode 100644 index 0000000..610fb5a --- /dev/null +++ b/app/bin/bitmaps/box.xpm @@ -0,0 +1,93 @@ +static char *box_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ " 00000000000000 ",
+ " 0 0 ",
+ " 0 22220 ",
+ " 0 2220 ",
+ " 0 22 20 ",
+ " 0 22 20 ",
+ " 0 22 0 ",
+ " 0 22 0 ",
+ " 0 2 0 ",
+ " 0 2 0 ",
+ " 0 2 0 ",
+ " 0 2 0 ",
+ " 12 0 ",
+ " 00000000000000 ",
+ " "};
+
+static char *box_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " ",
+ " 000000000000000000000 ",
+ " 0 0 ",
+ " 0 1111111 0 ",
+ " 0 111111 0 ",
+ " 0 1111 0 ",
+ " 0 11 11 0 ",
+ " 0 11 11 0 ",
+ " 0 11 11 0 ",
+ " 0 11 0 ",
+ " 0 11 0 ",
+ " 0 11 0 ",
+ " 0 1 0 ",
+ " 0 1 0 ",
+ " 0 1 0 ",
+ " 0 1 0 ",
+ " 0 11 0 ",
+ " 0 11 0 ",
+ " 0 11 0 ",
+ " 0 0 ",
+ " 0000000000000000000000 ",
+ " ",
+ " "};
+
+static char *box_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " ",
+ " ",
+ " 0000000000000000000000000000 ",
+ " 0 0 ",
+ " 0 11111111 0 ",
+ " 0 111111111 0 ",
+ " 0 11111 0 ",
+ " 0 111111 0 ",
+ " 0 1111111 0 ",
+ " 0 1111 11 0 ",
+ " 0 1111 11 0 ",
+ " 0 1111 11 0 ",
+ " 0 1111 11 0 ",
+ " 0 1111 0 ",
+ " 0 111 0 ",
+ " 0 111 0 ",
+ " 0 111 0 ",
+ " 0 111 0 ",
+ " 0 111 0 ",
+ " 0 111 0 ",
+ " 0 1111 0 ",
+ " 0 1111 0 ",
+ " 0 1111 0 ",
+ " 0 1111 0 ",
+ " 0 1111 0 ",
+ " 0 111 0 ",
+ " 0 0 ",
+ " 0000000000000000000000000000 ",
+ " ",
+ " ",
+ " "};
+
+static char **box_xpm[3] = { box_x16, box_x24, box_x32 };
+
diff --git a/app/bin/bitmaps/bridge.xbm b/app/bin/bitmaps/bridge.xbm deleted file mode 100644 index fd5857b..0000000 --- a/app/bin/bitmaps/bridge.xbm +++ /dev/null @@ -1,7 +0,0 @@ -#define bridge_width 16 -#define bridge_height 16 -// static unsigned char bridge_bits[] = { -static char bridge_bits[] = { - 0x01, 0x80, 0x01, 0x80, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x82, 0x20, - 0xff, 0xff, 0x82, 0x20, 0x82, 0x20, 0xff, 0xff, 0x82, 0x20, 0x00, 0x00, - 0x00, 0x00, 0xfe, 0x7f, 0x01, 0x80, 0x01, 0x80}; diff --git a/app/bin/bitmaps/bridge.xpm b/app/bin/bitmaps/bridge.xpm index 446f055..089542d 100644 --- a/app/bin/bitmaps/bridge.xpm +++ b/app/bin/bitmaps/bridge.xpm @@ -1,22 +1,105 @@ -/* XPM */ -static char * bridge_xpm[] = { -"16 16 3 1", -" c None", -". c #00FFFF", -"+ c #000000", -".. ..", -" .. .. ", -" ............ ", -" .......... ", -"+ + + + ", -"+++++++++++++++ ", -"+ + + + ", -"+ + + + ", -"+ + + + ", -"+++++++++++++++ ", -"+ + + + ", -" .......... ", -" ............ ", -" .. .. ", -".. ..", -" "}; +static char *bridge_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #CC6600",
+ " ",
+ " ",
+ "2 2 ",
+ "22 22 ",
+ " 2222222222222 ",
+ " 3 3 3 3 3 3 3 ",
+ "000000000000000 ",
+ " 3 3 3 3 3 3 3 ",
+ "010000000000000 ",
+ " 3 3 3 3 3 3 3 ",
+ " 2222222222222 ",
+ "22 22 ",
+ "2 2 ",
+ " ",
+ " ",
+ " "};
+
+static char *bridge_x24[] = {
+ "24 24 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #996600",
+ "4 c #996666",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ " ",
+ " ",
+ "444 44",
+ " 44 44 ",
+ " 44 44 ",
+ " 444444444444444444 ",
+ " 444444444444444444 ",
+ " ",
+ " 6 6 6 66 6 66 6 ",
+ "032023003103300300320130",
+ "032023003103300300320130",
+ " 6 6 6 66 6 66 6 ",
+ " 6 6 6 66 6 66 6 ",
+ " 6 6 6 66 6 66 6 ",
+ "000000000000000000000000",
+ " 6 6 6 66 6 66 6 ",
+ " ",
+ " ",
+ " 444444444444444444 ",
+ " 44444444444444444444 ",
+ " 44 44 ",
+ "444 444",
+ " 4 44",
+ " "};
+
+static char *bridge_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #996666",
+ "6 c #CC6600",
+ "7 c #CC9900",
+ " ",
+ " ",
+ " 55 55",
+ " 55 555",
+ " 555 555 ",
+ " 555 555 ",
+ " 55555555555555555555555555 ",
+ " 555555555555555555555555 ",
+ " 55555555555555555555555 ",
+ " ",
+ " ",
+ " 77 77 777 77 77 77 77 ",
+ "03320033002320033002330033101330",
+ "00000000000000000000000000000000",
+ " 77 77 777 77 77 77 77 ",
+ " 77 77 777 77 77 77 77 ",
+ " 77 77 777 77 77 77 77 ",
+ " 77 77 777 77 77 77 77 ",
+ " 4430044003430044003440044202440",
+ "00000000000000000000000000000000",
+ " 77 77 777 77 77 77 77 ",
+ " ",
+ " ",
+ " 5555555555555555555555 ",
+ " 555555555555555555555555 ",
+ " 55555555555555555555555555 ",
+ " 555 555 ",
+ " 555 555 ",
+ " 55 5555",
+ "555 555",
+ " ",
+ " "};
+
+static char **bridge_xpm[3] = { bridge_x16, bridge_x24, bridge_x32 };
+
diff --git a/app/bin/bitmaps/building.xpm b/app/bin/bitmaps/building.xpm new file mode 100644 index 0000000..044e3f8 --- /dev/null +++ b/app/bin/bitmaps/building.xpm @@ -0,0 +1,125 @@ +static char *building_x16[] = {
+ "16 16 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #666600",
+ "4 c #666633",
+ "5 c #666666",
+ "6 c #996666",
+ "7 c #999966",
+ "8 c #999999",
+ "9 c #CCCCCC",
+ "A c #C0C0C0",
+ "B c #808080",
+ " ",
+ " 011111111110 ",
+ " 137888888841 ",
+ " 448AAAAAA844 ",
+ " 4448AAAAA634 ",
+ " 4846AAAA84B4 ",
+ " 4884333334A4 ",
+ " 48B5AAAA8484 ",
+ " 4B4999999B44 ",
+ " 448999999944 ",
+ " 159999999981 ",
+ "0550000000000050",
+ "0999999999999992",
+ "0999999999999992",
+ "0555555555555550",
+ " "};
+
+static char *building_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663333",
+ "5 c #666600",
+ "6 c #666633",
+ "7 c #666666",
+ "8 c #996666",
+ "9 c #999966",
+ "A c #999999",
+ "B c #CCCCCC",
+ "C c #C0C0C0",
+ "D c #808080",
+ " ",
+ " ",
+ " 12222222222222220 ",
+ " 066777DAAAAAAAAD50 ",
+ " 156CCCCCCCCCCCCD62 ",
+ " 156DCCCCCCCCCCA652 ",
+ " 1686ACCCCCCCCCD662 ",
+ " 16A66CCCCCCCCA6982 ",
+ " 16CA6ACCCCCCCD6C82 ",
+ " 16CC66777777769B82 ",
+ " 16CC7377777774AB82 ",
+ " 16CA6BBBBBBBBA6B82 ",
+ " 16A6ABBBBBBBBB6D82 ",
+ " 1677BBBBBBBBBBC662 ",
+ " 156BBBBBBBBBBBB752 ",
+ " 06ABBBBBBBBBBBBB41 ",
+ "333000000000000000000333",
+ "3ACCBBBBBBBBBBBBBBBBCCC0",
+ "3BBBBBBBBBBBBBBBBBBBBBB0",
+ "3BBBBBBBBBBBBBBBBBBBBBB0",
+ "3BBBBBBBBBBBBBBBBBBBBBB0",
+ "3ACCCCCCCCCCCCCCCCCCCCC0",
+ "333333333333333333333333",
+ " "};
+
+static char *building_x32[] = {
+ "32 32 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #663333",
+ "4 c #666600",
+ "5 c #666633",
+ "6 c #666666",
+ "7 c #996666",
+ "8 c #999966",
+ "9 c #999999",
+ "A c #CCCCCC",
+ "B c #C0C0C0",
+ "C c #808080",
+ " ",
+ " ",
+ " ",
+ " 0111111111111111111110 ",
+ " 0456666C99999999999951 ",
+ " 358BBBBBBBBBBBBBBBB951 ",
+ " 5559BBBBBBBBBBBBBBB655 ",
+ " 5756BBBBBBBBBBBBBB9555 ",
+ " 59559BBBBBBBBBBBBB7595 ",
+ " 59955BBBBBBBBBBBB955A5 ",
+ " 59B649BBBBBBBBBBBC59A5 ",
+ " 59B9559BBBBBBBBB955AA5 ",
+ " 59BB956999999999659AA5 ",
+ " 59BB94111111111115AAA5 ",
+ " 59BBC5AAAAAAAAAAA59AA5 ",
+ " 59B959AAAAAAAAAAA95AA5 ",
+ " 59B56AAAAAAAAAAAAA2CA5 ",
+ " 59C5AAAAAAAAAAAAAA95B5 ",
+ " 5959AAAAAAAAAAAAAAA555 ",
+ " 556AAAAAAAAAAAAAAAAB55 ",
+ " 33AAAAAAAAAAAAAAAAAA65 ",
+ " 09AAAAAAAAAAAAAAAAAAB0 ",
+ "20006000000000000000000000062002",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2",
+ "20000000000000000000000000000002",
+ " ",
+ " "};
+
+static char **building_xpm[3] = { building_x16, building_x24, building_x32 };
+
diff --git a/app/bin/bitmaps/car-inventory.xpm b/app/bin/bitmaps/car-inventory.xpm new file mode 100644 index 0000000..45ceb2c --- /dev/null +++ b/app/bin/bitmaps/car-inventory.xpm @@ -0,0 +1,103 @@ +static char *car_inventory_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003366",
+ "2 c #006600",
+ "3 c #663300",
+ "4 c #999999",
+ " ",
+ " 33333333 ",
+ " 33333333 ",
+ " 33333333 ",
+ " 4 ",
+ " 0411111111 ",
+ " 11111111 ",
+ " 11111111 ",
+ " 4 ",
+ " 0422222222 ",
+ " 22222222 ",
+ " 22222222 ",
+ " 4 4 4 4 ",
+ " 040 040 ",
+ " ",
+ " "};
+
+static char *car_inventory_x24[] = {
+ "24 24 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003366",
+ "2 c #006600",
+ "3 c #663300",
+ "4 c #CCCCCC",
+ "44444444444444444 ",
+ "43333333333333334 ",
+ "43333333333333334 ",
+ "43333333333333334 ",
+ "43333333333333334 ",
+ "43333333333333334 ",
+ "44444444444444444 ",
+ " 00 4444444444444444 ",
+ " 00041111111111111114 ",
+ " 0 41111111111111114 ",
+ " 41111111111111114 ",
+ " 41111111111111114 ",
+ " 41111111111111114 ",
+ " 44444444444444444 ",
+ " 0044444444444444444",
+ " 0042222222222222224",
+ " 0042222222222222224",
+ " 42222222222222224",
+ " 42222222222222224",
+ " 42222222222222224",
+ " 44444444444444444",
+ " 00 00 00 00 ",
+ " 00000 00000 ",
+ " 00 00 00 00 "};
+
+static char *car_inventory_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003366",
+ "2 c #006600",
+ "3 c #663300",
+ "4 c #999999",
+ "5 c #CCCCCC",
+ "6 c #C0C0C0",
+ " 555555555555555555555 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ "53333333333333333333335 ",
+ " 564555555555555555555 ",
+ " 0005555555555555555555555 ",
+ " 0005111111111111111111115 ",
+ " 00 5111111111111111111115 ",
+ " 5111111111111111111115 ",
+ " 5111111111111111111115 ",
+ " 5111111111111111111115 ",
+ " 5111111111111111111115 ",
+ " 5111111111111111111115 ",
+ " 5555555555555555555555 ",
+ " 000 5555555555555555555555",
+ " 00052222222222222222222225",
+ " 00052222222222222222222225",
+ " 52222222222222222222225",
+ " 52222222222222222222225",
+ " 52222222222222222222225",
+ " 52222222222222222222225",
+ " 52222222222222222222225",
+ " 55555555555555555555555",
+ " 00 00 000 00 ",
+ " 00000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0 00 0 00 "};
+
+static char **car_inventory_xpm[3] = { car_inventory_x16, car_inventory_x24, car_inventory_x32 };
+
diff --git a/app/bin/bitmaps/change-grid.xpm b/app/bin/bitmaps/change-grid.xpm new file mode 100644 index 0000000..0287f34 --- /dev/null +++ b/app/bin/bitmaps/change-grid.xpm @@ -0,0 +1,118 @@ +static char *change_grid_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ "2 c #00CC33",
+ "3 c #339933",
+ "4 c #666666",
+ "5 c #669933",
+ "6 c #669966",
+ "7 c #996666",
+ "8 c #999966",
+ "9 c #CC9966",
+ "A c #FFCC66",
+ "1111111111111111",
+ "1111111111111111",
+ "1 1 11 3 1",
+ "1 1 11 484 1",
+ "11111111159A8311",
+ "1 1 169A94 1",
+ "1 1 69A962 1",
+ "11111148A9411111",
+ "1111168794211111",
+ "1 14994 1 1",
+ "1 14462 1 1",
+ "1111111111111111",
+ "11 11 11 11 11",
+ "1 1 11 1 1",
+ "11 11 11 11 11",
+ "1111111111111111"};
+
+static char *change_grid_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ "2 c #33CC33",
+ "3 c #666666",
+ "4 c #669933",
+ "5 c #669966",
+ "6 c #996666",
+ "7 c #999966",
+ "8 c #CC9966",
+ "9 c #FF9966",
+ "A c #FFCC66",
+ " 1 1 11 1 1 ",
+ "111111111111111111111111",
+ "11 1 11 1 11",
+ "11 1 11 1 11",
+ "11 1 11 33 11",
+ "11 1 11 3796 11",
+ "1111111111111147AA932111",
+ "11 11 1157AAA83 11",
+ "11 1 147AAA83 11",
+ "11 1 47AAA85 11",
+ "11 1 37AAA831 11",
+ "11111111156AAA8511111111",
+ "111111114787A85111111111",
+ "11 1 39A863 1 11",
+ "11 1 39A83 1 11",
+ "11 1 33351 1 11",
+ "11 1 11 1 11",
+ "111111111111111111111111",
+ "11 1 11 1 11",
+ "11 1 11 1 11",
+ "11 1 11 1 11",
+ "11 1 11 1 11",
+ "111111111111111111111111",
+ "111111111111111111111111"};
+
+static char *change_grid_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ "2 c #33CC33",
+ "3 c #666666",
+ "4 c #669933",
+ "5 c #669966",
+ "6 c #996666",
+ "7 c #999966",
+ "8 c #CC9966",
+ "9 c #FFCC66",
+ " ",
+ "11111111111111111111111111111111",
+ "11111111111111111111111111111111",
+ " 1 11 11 11 11",
+ " 1 11 11 11 11",
+ " 1 11 11 44 11",
+ " 1 11 11 3775 11",
+ " 1 11 11 379973 11",
+ " 1111111111111111112799997411111",
+ " 1111111111111111127999997411111",
+ " 1 11 11379999973 11",
+ " 1 11 1279999975 11",
+ " 1 11 279999974 11",
+ " 1 11 3799999751 11",
+ " 1 11 37999997311 11",
+ " 1111111111123899998511111111111",
+ " 1111111111279789984111111111111",
+ " 1 11 39997883 11 11",
+ " 1 11 3999963 11 11",
+ " 1 11 399985 11 11",
+ " 1 11 333351 11 11",
+ " 1 11 11 11 11",
+ " 1111111111111111111111111111111",
+ " 1111111111111111111111111111111",
+ " 1 11 11 11 11",
+ " 1 11 11 11 11",
+ " 1 11 11 11 11",
+ " 1 11 11 11 11",
+ " 1 11 11 11 11",
+ "111 11 11 111 111",
+ "11111111111111111111111111111111",
+ " "};
+
+static char **change_grid_xpm[3] = { change_grid_x16, change_grid_x24, change_grid_x32 };
+
diff --git a/app/bin/bitmaps/circle-center.xpm b/app/bin/bitmaps/circle-center.xpm new file mode 100644 index 0000000..e58036a --- /dev/null +++ b/app/bin/bitmaps/circle-center.xpm @@ -0,0 +1,114 @@ +static char *circle_center_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF0000",
+ "4 c #808080",
+ " 000000 ",
+ " 40 2 2 04 ",
+ " 0 2 0000 2 0 ",
+ " 4 00 00 4 ",
+ " 020 020 ",
+ "0 0 0 0",
+ "020 020",
+ "0 0 0 0",
+ "0 0 3 0 0",
+ "020 3 020",
+ "0 3 1 0",
+ " 020 31 0 ",
+ " 4 00 111 4 ",
+ " 0 2 0000 0 ",
+ " 40 2 2 04 ",
+ " 000000 "};
+
+static char *circle_center_x24[] = {
+ "24 24 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666600",
+ "5 c #990000",
+ "6 c #993300",
+ "7 c #996600",
+ "8 c #CC0000",
+ "9 c #CC3300",
+ "A c #CC6600",
+ "B c #CC9900",
+ " B ",
+ " 07700 B ",
+ " B7000770017 ",
+ " 07A A7 B30 BB ",
+ " B30 B70033017 17 ",
+ " 33 077 BB A303B10 ",
+ " 0 A2 B 36 0 ",
+ " 00 0A BA0 33B ",
+ " A2B00 23B30 ",
+ " 13B1B B2 00 ",
+ " 0 0 00 0 ",
+ " 0 00 33A0 ",
+ "B3A77B 8 B77B1B",
+ " 2772 8 00 0 ",
+ " 00 0B 8 90 00 ",
+ " 1B37 8 A93B10 ",
+ " B37 0 8857A3B ",
+ " 0 33 8985 0 ",
+ " 02B307B A856B00 ",
+ " 31 31077022 33 ",
+ " B 007B 0770 B 00BB ",
+ " 320 77 032 ",
+ " B 0033007B ",
+ " BB "};
+
+static char *circle_center_x32[] = {
+ "32 32 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #993300",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC3300",
+ "9 c #CC6600",
+ "A c #CC9900",
+ " A ",
+ " AA ",
+ " A 00000000 A ",
+ " 6100 AA 0220 ",
+ " 039 AA A900 A ",
+ " A 0 A 00000001A 06A ",
+ " A60 6200 AA 0320 31 ",
+ " 2A 00A A A 00 A 00 ",
+ " 0 A10 336 0 ",
+ " 00 19 A60 00AA ",
+ " 0 00 00 A39 ",
+ " A66A 0 29A20 ",
+ " 06A66 A91 0 ",
+ " 0 09A 0 0 ",
+ " 0 0 0 00 ",
+ " 00 0 7 33 33 ",
+ "A63A93AA 777 A36A66A",
+ " 62 61 777 00 00 ",
+ " 0 0 777 0 0 ",
+ " 0 03A 777 7740 0 ",
+ " 00A93A 777 8756 00 ",
+ " 63A 00 777773AA36 ",
+ " AA20 06A 7777 2AA ",
+ " 0 636 777777 00 ",
+ " 00 A300 A 777789 00 ",
+ " 36 036 AA 620 A60 ",
+ " AA10 9000320039 03A ",
+ " 000AA 96 A 000 AA ",
+ " 022 AA 520 ",
+ " A900003200029 ",
+ " A 96 A ",
+ " A "};
+
+static char **circle_center_xpm[3] = { circle_center_x16, circle_center_x24, circle_center_x32 };
+
diff --git a/app/bin/bitmaps/circle-filled-center.xpm b/app/bin/bitmaps/circle-filled-center.xpm new file mode 100644 index 0000000..91f7764 --- /dev/null +++ b/app/bin/bitmaps/circle-filled-center.xpm @@ -0,0 +1,145 @@ +static char *circle_filled_center_x16[] = {
+ "16 16 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339999",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #66CCCC",
+ "A c #66CCFF",
+ "B c #9999CC",
+ "C c #99CCCC",
+ "D c #99CCFF",
+ "E c #99FFFF",
+ "F c #CC0000",
+ "G c #CC6666",
+ "H c #CC6699",
+ " 00 ",
+ " 11488413 ",
+ " 28AEEEEE93 ",
+ " 3AEEEEEEEEA3 ",
+ " 38EEEEEEEEEE93 ",
+ " 2AEEEEEEEEEEE4 ",
+ "05EEEEEEEEEEEE80",
+ "18EEEEEBDEEEEE92",
+ "18EEEEEDHDEEEE92",
+ "06EEEEEEDHDECE81",
+ " 4EEEEEEEDHDFE60",
+ " 29EEEEEEEDHGA2 ",
+ " 3AEEEEEBGFH4 ",
+ " 14AEEEEDDA43 ",
+ " 268AA973 ",
+ " 012210 "};
+
+static char *circle_filled_center_x24[] = {
+ "24 24 20 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339999",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #66CCCC",
+ "A c #66CCFF",
+ "B c #9999CC",
+ "C c #99CCCC",
+ "D c #99CCFF",
+ "E c #99FFFF",
+ "F c #CC0000",
+ "G c #CC6666",
+ "H c #CC6699",
+ "I c #CC9999",
+ " ",
+ " 11044011 ",
+ " 238AEEEEA942 ",
+ " 26AEEEEEEEEE83 ",
+ " 29EEEEEEEEEEEEA4 ",
+ " 2AEEEEEEEEEEEEEEA3 ",
+ " 27EEEEEEEEEEEEEEEE93 ",
+ " 4AEEEEEEEEEEEEEEEEE50 ",
+ " 19EEEEEEEEEEEEEEEEEEA2 ",
+ " 1AEEEEEEEEEEEEEEEEEEE1 ",
+ " 3EEEEEEEEEEEEEEEEEEEE50",
+ " 4EEEEEEEEDIDEEEEEEEEE60",
+ " 4EEEEEEEEECIDEEEEEEEE60",
+ " 3EEEEEEEEEECIDEEEEEEE50",
+ " 1AEEEEEEEEEECIDEEHCEE4 ",
+ " 29EEEEEEEEEEECIDDFBEA1 ",
+ " 05EEEEEEEEEEEECIDFCE71 ",
+ " 39EEEEEEEEEEEECHFDA2 ",
+ " 2AEEEEEEEEDIGFFFD4 ",
+ " 04AEEEEEEEDHIBCC62 ",
+ " 139EEEEEEEEEEA42 ",
+ " 26AEEEEEEA82 ",
+ " 2146886411 ",
+ " 0000 "};
+
+static char *circle_filled_center_x32[] = {
+ "32 32 23 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #336699",
+ "7 c #339999",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66CCCC",
+ "B c #66CCFF",
+ "C c #9999CC",
+ "D c #99CCCC",
+ "E c #99CCFF",
+ "F c #99FFFF",
+ "G c #CC0000",
+ "H c #CC3333",
+ "I c #CC3366",
+ "J c #CC6666",
+ "K c #CC6699",
+ "L c #CC9999",
+ " ",
+ " 00333300 ",
+ " 3169ABBA97230 ",
+ " 35AFFFFFFFFFFB63 ",
+ " 4AFFFFFFFFFFFFFFB52 ",
+ " 5BFFFFFFFFFFFFFFFFB64 ",
+ " 5BFFFFFFFFFFFFFFFFFFF62 ",
+ " 5BFFFFFFFFFFFFFFFFFFFFB5 ",
+ " 3AFFFFFFFFFFFFFFFFFFFFFFB3 ",
+ " 5FFFFFFFFFFFFFFFFFFFFFFFF82 ",
+ " 3AFFFFFFFFFFFFFFFFFFFFFFFFB2 ",
+ " 2FFFFFFFFFFFFFFFFFFFFFFFFFF5 ",
+ " 07FFFFFFFFFFFFFFFFFFFFFFFFFF92 ",
+ " 2AFFFFFFFFFFFFFFFFFFFFFFFFFFB3 ",
+ " 3AFFFFFFFFFFFFEFFFFFFFFFFFFFB2 ",
+ " 3BFFFFFFFFFFFDHLFFFFFFFFFFFFF0 ",
+ " 2BFFFFFFFFFFFDHGLFFFFFFFFFFFF0 ",
+ " 3BFFFFFFFFFFFFDHGLFFFFFFFFFFB2 ",
+ " 3AFFFFFFFFFFFFFDHGLFFFFEEFFFB3 ",
+ " 08FFFFFFFFFFFFFFDHGLFFFIHFFFA3 ",
+ " 4FFFFFFFFFFFFFFFDHGLFEGHFFF60 ",
+ " 2BFFFFFFFFFFFFFFFDHGLEGJFFB2 ",
+ " 28FFFFFFFFFFFFFFFFDHGKGLFF92 ",
+ " 3BFFFFFFFFFFFFFFFFDHGGCFB3 ",
+ " 6BFFFFFFFFFFFFEKJGGGGDF73 ",
+ " 47FFFFFFFFFFFFLGGGHKLE94 ",
+ " 57FFFFFFFFFFFEEEFFFF94 ",
+ " 36BFFFFFFFFFFFFFFB74 ",
+ " 239BFFFFFFFFFFFA33 ",
+ " 227ABFFFFBA723 ",
+ " 0330000230 ",
+ " "};
+
+static char **circle_filled_center_xpm[3] = { circle_filled_center_x16, circle_filled_center_x24, circle_filled_center_x32 };
+
diff --git a/app/bin/bitmaps/circle-filled-tangent.xpm b/app/bin/bitmaps/circle-filled-tangent.xpm new file mode 100644 index 0000000..f20856e --- /dev/null +++ b/app/bin/bitmaps/circle-filled-tangent.xpm @@ -0,0 +1,148 @@ +static char *circle_filled_tangent_x16[] = {
+ "16 16 20 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339999",
+ "7 c #666699",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66CCCC",
+ "B c #66CCFF",
+ "C c #9999CC",
+ "D c #99CCFF",
+ "E c #99FFFF",
+ "F c #CC3333",
+ "G c #CC6699",
+ "H c #CC9999",
+ "I c #CC99CC",
+ " 0110 ",
+ " 3469A842 ",
+ " 3AEEEEEEA31 ",
+ " 2BEEEEEEEEB4 ",
+ " 3AEEEEEEEEEEB3 ",
+ " 4EEEEEEEEEEEE60",
+ "08EEEEEEEEEEEEA1",
+ "2AEEEEEDCIHEEEB2",
+ "2AEEEEECFCDEEEB1",
+ "09EEEEEHCGDEEEA2",
+ "05EEEEEHDDGDEE90",
+ " 3BEEEEEEEDGDB3 ",
+ " 4BEEEEEEEDG71 ",
+ " 34BEEEEEEB74 ",
+ " 39ABBB931 ",
+ " 021120 "};
+
+static char *circle_filled_tangent_x24[] = {
+ "24 24 22 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #336699",
+ "7 c #339999",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66CCCC",
+ "B c #66CCFF",
+ "C c #9999CC",
+ "D c #99CCCC",
+ "E c #99CCFF",
+ "F c #99FFFF",
+ "G c #CC0000",
+ "H c #CC6666",
+ "I c #CC6699",
+ "J c #CC9999",
+ "K c #CC99CC",
+ " ",
+ " 0315555230 ",
+ " 46AFFFFFFB73 ",
+ " 03AFFFFFFFFFFA42 ",
+ " 05BFFFFFFFFFFFFB73 ",
+ " 3BFFFFFFFFFFFFFFB5 ",
+ " 4AFFFFFFFFFFFFFFFFB4 ",
+ " 26FFFFFFFFFFFFFFFFFF94 ",
+ " 3BFFFFFFFFFFFFFFFFFFB2 ",
+ " 2FFFFFFFFFFFFFFFFFFFF5 ",
+ " 5FFFFFFFFFFFFFEFFFFFF80",
+ "07FFFFFFFFFDIHGGCFFFFF92",
+ "08FFFFFFFFFIGJCDEFFFFFA2",
+ "06FFFFFFFFFHIIEFFFFFFF90",
+ " 5FFFFFFFFEGKEIEFFFFFF60",
+ " 2BFFFFFFFEGDFEIEFFFFB2 ",
+ " 29FFFFFFFFEEFFEIEFFFA3 ",
+ " 4BFFFFFFFFFFFFEIEFB4 ",
+ " 5BFFFFFFFFFFFFEIE72 ",
+ " 48FFFFFFFFFFFFFEC4 ",
+ " 35BFFFFFFFFFFB74 ",
+ " 3AFFFFFFFFA42 ",
+ " 3179AA9723 ",
+ " 003300 "};
+
+static char *circle_filled_tangent_x32[] = {
+ "32 32 23 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #336699",
+ "7 c #339999",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66CCCC",
+ "B c #66CCFF",
+ "C c #9999CC",
+ "D c #99CCCC",
+ "E c #99CCFF",
+ "F c #99FFFF",
+ "G c #CC0000",
+ "H c #CC3333",
+ "I c #CC6666",
+ "J c #CC6699",
+ "K c #CC9999",
+ "L c #CC99CC",
+ " ",
+ " 233003320 ",
+ " 2259BBFFBB9622 ",
+ " 28BFFFFFFFFFFB920 ",
+ " 25BFFFFFFFFFFFFFFB63 ",
+ " 37BFFFFFFFFFFFFFFFFF84 ",
+ " 27FFFFFFFFFFFFFFFFFFFF94 ",
+ " 5BFFFFFFFFFFFFFFFFFFFFF74 ",
+ " 4BFFFFFFFFFFFFFFFFFFFFFFB3 ",
+ " 28FFFFFFFFFFFFFFFFFFFFFFFFA3 ",
+ " 2BFFFFFFFFFFFFFFFFFFFFFFFFF4 ",
+ " 5FFFFFFFFFFFFFFFFFFFFFFFFFF80 ",
+ " 29FFFFFFFFFFFFFFFFFFFFFFFFFFB3 ",
+ " 3BFFFFFFFFFFFFFFFFFFFFFFFFFFB1 ",
+ " 2BFFFFFFFFFFFFFFEEDCDFFFFFFFF2 ",
+ " 0FFFFFFFFFFFFFLHGGGGGEFFFFFFF5 ",
+ " 1FFFFFFFFFFFFFHGGJLCEFFFFFFFF5 ",
+ " 2BFFFFFFFFFFFEGGGIEFFFFFFFFFF4 ",
+ " 3BFFFFFFFFFFFEGIJGIEFFFFFFFFF0 ",
+ " 3AFFFFFFFFFFFDGKEJGHEFFFFFFFB3 ",
+ " 07FFFFFFFFFFFCGCFEJGHEFFFFFF92 ",
+ " 2FFFFFFFFFFFEJEFFEJGHEFFFFF5 ",
+ " 29FFFFFFFFFFFFFFFFEJGHEFFFB3 ",
+ " 4BFFFFFFFFFFFFFFFFEJGHEFF5 ",
+ " 27FFFFFFFFFFFFFFFFFEJGHEA4 ",
+ " 49FFFFFFFFFFFFFFFFFEJDB4 ",
+ " 4AFFFFFFFFFFFFFFFFFFB5 ",
+ " 49FFFFFFFFFFFFFFFFA4 ",
+ " 45AFFFFFFFFFFFFB54 ",
+ " 359BFFFFFFB953 ",
+ " 2305555022 ",
+ " "};
+
+static char **circle_filled_tangent_xpm[3] = { circle_filled_tangent_x16, circle_filled_tangent_x24, circle_filled_tangent_x32 };
+
diff --git a/app/bin/bitmaps/circle-line-center.xpm b/app/bin/bitmaps/circle-line-center.xpm new file mode 100644 index 0000000..24a41f6 --- /dev/null +++ b/app/bin/bitmaps/circle-line-center.xpm @@ -0,0 +1,93 @@ +static char *circle_line_center_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " 00 ",
+ " 00000000 ",
+ " 00 00 ",
+ " 0 0 ",
+ " 00 00 ",
+ " 0 0 ",
+ "00 00",
+ "00 00",
+ "00 1 00",
+ "00 1 00",
+ " 0 1 1 00",
+ " 00 11 0 ",
+ " 0 1110 ",
+ " 00 00 ",
+ " 000 000 ",
+ " 000000 "};
+
+static char *circle_line_center_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 00000000 ",
+ " 000 000 ",
+ " 00 00 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 00 00 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 0 1 00",
+ " 0 11 00",
+ " 0 11 00",
+ " 0 11 0 ",
+ " 00 11 1 0 ",
+ " 00 11 1 00 ",
+ " 00 111 0 ",
+ " 0 1111 0 ",
+ " 00 1 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 0000000000 ",
+ " 000 "};
+
+static char *circle_line_center_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " 0000000000 ",
+ " 00000000000000 ",
+ " 00000 00000 ",
+ " 0000 0000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 00 000 ",
+ " 000 00 ",
+ " 00 000 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 00 00 ",
+ " 00 000",
+ " 00 2 000",
+ " 00 222 000",
+ " 00 2222 000",
+ " 00 2222 00 ",
+ " 00 2222 00 ",
+ " 000 2222 22 00 ",
+ " 00 2222 22 000 ",
+ " 00 222222 00 ",
+ " 000 22222 000 ",
+ " 000 2222222000 ",
+ " 000 2222221000 ",
+ " 000 0000 ",
+ " 0000 0000 ",
+ " 0000 00000 ",
+ " 0000000 0000000 ",
+ " 000000000000 ",
+ " 0000 "};
+
+static char **circle_line_center_xpm[3] = { circle_line_center_x16, circle_line_center_x24, circle_line_center_x32 };
+
diff --git a/app/bin/bitmaps/circle-line-tangent.xpm b/app/bin/bitmaps/circle-line-tangent.xpm new file mode 100644 index 0000000..0a5a52d --- /dev/null +++ b/app/bin/bitmaps/circle-line-tangent.xpm @@ -0,0 +1,93 @@ +static char *circle_line_tangent_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " 00 ",
+ " 00000000 ",
+ " 00 00 ",
+ " 00 0 ",
+ " 00 00 ",
+ " 0 0 ",
+ " 0 00",
+ "00 1111 00",
+ "00 11 00",
+ "00 1 1 00",
+ " 0 1 1 00",
+ " 00 1 0 ",
+ " 0 10 ",
+ " 00 00 ",
+ " 0000 000 ",
+ " 00000 "};
+
+static char *circle_line_tangent_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " 00000000 ",
+ " 000 000 ",
+ " 00 00 ",
+ " 00 0 ",
+ " 00 0 ",
+ " 0 00 ",
+ " 0 0 ",
+ " 00 00 ",
+ " 0 0 ",
+ " 0 2222 0 ",
+ " 0 22222 00",
+ " 0 222 00",
+ " 0 22 22 0 ",
+ " 0 22 22 0 ",
+ " 00 22 22 0 ",
+ " 0 22 00 ",
+ " 00 22 0 ",
+ " 0 2 0 ",
+ " 0 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 0000000000 ",
+ " 00 "};
+
+static char *circle_line_tangent_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 000000000 ",
+ " 00000000000000 ",
+ " 000000 000000 ",
+ " 0000 0000 ",
+ " 0000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 00 ",
+ " 000 000 ",
+ " 00 00 ",
+ " 00 000 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 00 1111111 00 ",
+ " 00 1111111 000",
+ " 00 11111 000",
+ " 00 111111 00 ",
+ " 00 11 1111 00 ",
+ " 00 11 1111 00 ",
+ " 000 11 1111 00 ",
+ " 00 1111 000 ",
+ " 000 1111 00 ",
+ " 00 1111 000 ",
+ " 000 111000 ",
+ " 000 1000 ",
+ " 000 0000 ",
+ " 000 0000 ",
+ " 0000 0000 ",
+ " 0000000000000000 ",
+ " 000000000000 ",
+ " 00 "};
+
+static char **circle_line_tangent_xpm[3] = { circle_line_tangent_x16, circle_line_tangent_x24, circle_line_tangent_x32 };
+
diff --git a/app/bin/bitmaps/circle-line.xpm b/app/bin/bitmaps/circle-line.xpm new file mode 100644 index 0000000..1f6de11 --- /dev/null +++ b/app/bin/bitmaps/circle-line.xpm @@ -0,0 +1,95 @@ +static char *circle_line_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " 00 ",
+ " 00000000 ",
+ " 00 00 ",
+ " 0 22 22 0 ",
+ " 00 2 222 00 ",
+ " 0 22222 0 ",
+ "00 2 222222 2 00",
+ "0022 2200",
+ "0322222222222210",
+ "0022 2 00",
+ " 0 00",
+ " 00 0 ",
+ " 0 0 ",
+ " 00 00 ",
+ " 000 000 ",
+ " 000000 "};
+
+static char *circle_line_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 00000000 ",
+ " 000 000 ",
+ " 00 00 ",
+ " 00 0 ",
+ " 00 1111 111 0 ",
+ " 00 11 11 00 ",
+ " 0 11 1111 0 ",
+ " 00 1111 11 00 ",
+ " 0 1111 1111 0 ",
+ " 0 1 11 1 11 0 ",
+ " 0 11 11 00",
+ " 0 111111111111111111 00",
+ " 0 11 11 0 ",
+ " 0 1 1 0 ",
+ " 00 0 ",
+ " 0 00 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 0 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 0000000000 ",
+ " 00 "};
+
+static char *circle_line_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ " 0000000000 ",
+ " 00000000000000 ",
+ " 00000 00000 ",
+ " 0000 0000 ",
+ " 000 000 ",
+ " 000 222 222 000 ",
+ " 000 22222 22222 000 ",
+ " 00 2 22 22 000 ",
+ " 000 22 22222 00 ",
+ " 00 222 222 22 000 ",
+ " 000 22 22 22 000 ",
+ " 00 2 22222 222222 00 ",
+ " 00 222 2222 2222 222 00 ",
+ " 00 222 2222 00 ",
+ " 0022222222222222222222222222000",
+ " 0022222222222222222222222222100",
+ " 00 222 222 000",
+ " 00 222 222 00 ",
+ " 00 222 22 00 ",
+ " 000 00 ",
+ " 00 000 ",
+ " 00 00 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 0000 ",
+ " 0000 0000 ",
+ " 0000 00000 ",
+ " 0000000000000000 ",
+ " 000000000000 ",
+ " 0000 "};
+
+static char **circle_line_xpm[3] = { circle_line_x16, circle_line_x24, circle_line_x32 };
+
diff --git a/app/bin/bitmaps/circle-tangent.xpm b/app/bin/bitmaps/circle-tangent.xpm new file mode 100644 index 0000000..4ae8c69 --- /dev/null +++ b/app/bin/bitmaps/circle-tangent.xpm @@ -0,0 +1,110 @@ +static char *circle_tangent_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #808080",
+ " 000000 ",
+ " 30 2 2 03 ",
+ " 0 2 0000 2 0 ",
+ " 3 00 00 3 ",
+ " 020 020 ",
+ "0 0 0 0",
+ "020 020",
+ "0 0 0 0",
+ "0 0 111 0 0",
+ "020 11 020",
+ "0 0 1 1 0",
+ " 020 1 20 ",
+ " 3 00 1 3 ",
+ " 0 2 0000 2 0 ",
+ " 30 2 2 03 ",
+ " 000000 "};
+
+static char *circle_tangent_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ " 99 ",
+ " 9 00330059 ",
+ " 5000550023 ",
+ " 0059 85 93009 ",
+ " 930 80023025 25 ",
+ " 139 035 99 8305900 ",
+ " 0 920 335 0 ",
+ " 00 059 950 539 ",
+ " 83930 3591 ",
+ " 03938 90 00 ",
+ " 0 0 0 0 ",
+ " 0 0 6666 2551 ",
+ "928839 66666 955829",
+ " 15 0 6666 0 0 ",
+ " 00 05 66666 0 00 ",
+ " 01953 66 666983900 ",
+ " 839 0 66608939 ",
+ " 920 38 764 029 ",
+ " 0395029 9316800 ",
+ " 35 31053022 82 ",
+ " 9500 9 055059 0089 ",
+ " 025 99 520 ",
+ " 8100330038 ",
+ " 55 9 "};
+
+static char *circle_tangent_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ "9 c #800000",
+ " 8 ",
+ " 75 8 ",
+ " 8 00003200018 ",
+ " 3200 88 0320 ",
+ " 0028 88 8 00 8 ",
+ " 8 00 88000100038 058 ",
+ " 52 300 78 032 830 ",
+ " 018 0058 8 8 0088 0 ",
+ " 0 830 23 0 ",
+ " 00 138 830 038 ",
+ " 850 0 0 8835 ",
+ " 8558 00 538 00 ",
+ " 058828 830 0 ",
+ " 0 028 0 0 ",
+ " 0 00 0 0 ",
+ " 00 0 6666666 07 25 ",
+ "85488378 666666 8278458",
+ " 52 25 6666 0 0 ",
+ " 0 00 66666 0 0 ",
+ " 0 18 6666666 00 0 ",
+ " 00 837 666 6666 8835 00 ",
+ " 3388 0 6 6666 138833 ",
+ " 881 018 66660 288 ",
+ " 00 35 6666 00 ",
+ " 0 8700 8 8 0967 00 ",
+ " 17 015 8 510 870 ",
+ " 71 8200320037 37 ",
+ " 00 88 75 8 00 8 ",
+ " 005 88 8500 ",
+ " 53000 55 0003 ",
+ " 88 00033000 8 ",
+ " 88 "};
+
+static char **circle_tangent_xpm[3] = { circle_tangent_x16, circle_tangent_x24, circle_tangent_x32 };
+
diff --git a/app/bin/bitmaps/circle.xpm b/app/bin/bitmaps/circle.xpm new file mode 100644 index 0000000..0be3fe9 --- /dev/null +++ b/app/bin/bitmaps/circle.xpm @@ -0,0 +1,115 @@ +static char *circle_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #808080",
+ " 000000 ",
+ " 30 2 2 03 ",
+ " 0 2 0000 2 0 ",
+ " 3 00 00 3 ",
+ " 020 020 ",
+ "0 0 0 0",
+ "0 00 303 0",
+ "0 1 0 0 0 1 0",
+ "311110 0 011113",
+ "0 1 00 303 1 0",
+ "0 0",
+ " 020 020 ",
+ " 3 00 00 3 ",
+ " 0 2 0000 2 0 ",
+ " 30 2 2 03 ",
+ " 000000 "};
+
+static char *circle_x24[] = {
+ "24 24 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #990000",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC3300",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #800000",
+ " AA ",
+ " 004400 A ",
+ " 6000660014 ",
+ " 06A 69 A600 A ",
+ " A40 60024006 24 ",
+ " 44A 066 A A601A40 ",
+ " 0 92 44 0 ",
+ " 00 09 AA0 64A ",
+ " A2A00 64A40 ",
+ " 14AB8 000 000 971 0 ",
+ " 00577 0 0000 00 777 0 ",
+ " 03777 000 00 007777816",
+ "A497787 000000 017887829",
+ " 26878 0000 00 77 0 ",
+ " 00 57 0000 000 773 0 ",
+ " 0A46 A4920 ",
+ " A49 0 04A49 ",
+ " A 0 24A A60 00A ",
+ " 01A40 A A 04A 0 ",
+ " 44 240660420 64 ",
+ " A 00 A404404A 006A ",
+ " 240 AA 620 ",
+ " A40000004A ",
+ " A AA A "};
+
+static char *circle_x32[] = {
+ "32 32 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #990000",
+ "6 c #993300",
+ "7 c #996600",
+ "8 c #CC0000",
+ "9 c #CC3300",
+ "A c #CC6600",
+ "B c #CC9900",
+ "C c #800000",
+ " BB ",
+ " BB ",
+ " B 0000000000AB ",
+ " 7100 BB 0240 ",
+ " 02B BB BB000 B ",
+ " B 0 BA00000000A 04B ",
+ " A1 4400 BB 420 72 ",
+ " 1B 00BB B BB00 B 00 ",
+ " 0 B10 47 00 ",
+ " 00 17B BB0 0BB ",
+ " B 0 00 0 B77 ",
+ " B77B 0 47B 0 ",
+ " 07B799 0000 000 A93 0 ",
+ " 0 588 00000 00000 888C 00 ",
+ " 0 8888 00 00 00 888 00 ",
+ " 0 88888 0000 00 00 88888862 ",
+ "B74A88888 0000 00 00 888889A4B",
+ "BA2B9889 00000 00 888 00 ",
+ " 0 888 0 000 00 00 8885 00 ",
+ " 0 189 00000 0000 88C 00 ",
+ " 00 A4B BB74 0 ",
+ " 74BB00 2BB74 ",
+ " BB40 0 B 00 2AB ",
+ " 0 44A B40 00 ",
+ " 00 B700 B B 07B 0 ",
+ " 27 02A BB A40 BA0 ",
+ " B20 A100440017 2A ",
+ " B 00 BB 77 B 00 BB ",
+ " 044 BB 7700 ",
+ " A00004700007 ",
+ " BB 0470 BB ",
+ " BB "};
+
+static char **circle_xpm[3] = { circle_x16, circle_x24, circle_x32 };
+
diff --git a/app/bin/bitmaps/circle1.xpm b/app/bin/bitmaps/circle1.xpm deleted file mode 100644 index 03426f0..0000000 --- a/app/bin/bitmaps/circle1.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * circle1_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -"o c #FFFFFFFFFFFF", -" ...... ", -" . . ", -" .. .... .. ", -" .XXXXXXXXXXX . ", -" .XoooooooooX . ", -". XoXXXoXXXoX .", -". XoXoXoXoooX. .", -". XoXXXoXXooX. .", -". XoooXoooXoX. .", -". XoooXoooXoX. .", -". XoooXoXXooX .", -" .XoooooooooX . ", -" .XXXXXXXXXXX . ", -" .. .... .. ", -" . . ", -" ...... "}; diff --git a/app/bin/bitmaps/circle2.xpm b/app/bin/bitmaps/circle2.xpm deleted file mode 100644 index 343f29b..0000000 --- a/app/bin/bitmaps/circle2.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * circle2_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" . . . . . ", -" .. .... .. ", -" . ... . ... . ", -" . .. .. . ", -". . . .", -". . . .", -". . XXXX ....", -".... XX . .", -". . X X . .", -". . X X . .", -" . .. X. . ", -" . ... . ..X . ", -" .. .... .X ", -" . . . . ", -" ...... "}; diff --git a/app/bin/bitmaps/circle3.xpm b/app/bin/bitmaps/circle3.xpm deleted file mode 100644 index 3a7c9ab..0000000 --- a/app/bin/bitmaps/circle3.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * circle3_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" . . . . . ", -" .. .... .. ", -" . ... . ... . ", -" . .. .. . ", -". . . .", -". . . .", -". . XX ....", -".... XX . .", -". . X X. .", -". . X X .", -" . .. XX . ", -" . ... .XXXX . ", -" .. .... .. ", -" . . . . . ", -" ...... "}; diff --git a/app/bin/bitmaps/cnote.xpm b/app/bin/bitmaps/cnote.xpm deleted file mode 100644 index c008c24..0000000 --- a/app/bin/bitmaps/cnote.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * cnote_xpm[] = { -"16 16 3 1", -". c None", -" c #000000000000", -"X c #FFFFFFFF0000", -" ......", -" XXXXXXXX .....", -" XXXXXX X X ....", -" XXXXXX X XX ...", -" XXXXXX X XXX ..", -" XXXXXX X .", -" XXXXXX XXXXXX .", -" XXXXXX XXXXXX .", -" XXXXXX XXXXXX .", -" XXXXXX XXXXXX .", -" XXXXXX XXXXXX .", -" XXXXXXXXXXXXX .", -" XXXXXX XXXXXX .", -" XXXXXXXXXXXXX .", -" XXXXXXXXXXXXX .", -" ."}; diff --git a/app/bin/bitmaps/connect.xpm b/app/bin/bitmaps/connect.xpm new file mode 100644 index 0000000..3853635 --- /dev/null +++ b/app/bin/bitmaps/connect.xpm @@ -0,0 +1,116 @@ +static char *connect_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003399",
+ "2 c #336699",
+ "3 c #3366CC",
+ "4 c #3366FF",
+ "5 c #3399FF",
+ "6 c #6699FF",
+ "7 c #9966CC",
+ "8 c #CC0000",
+ "9 c #CC3366",
+ "A c #CC3399",
+ " ",
+ " ",
+ " ",
+ " 5 4333 3435 5 ",
+ "1313121 1313131",
+ " 6 6 66 6 6 6 ",
+ " 313233 3313133",
+ "1313233 2313132",
+ " 6 6 9 A 6 6 ",
+ " 88 88 ",
+ "8888888888888888",
+ " 8 8 ",
+ " 8 8 ",
+ " ",
+ " ",
+ " "};
+
+static char *connect_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003399",
+ "2 c #336699",
+ "3 c #3366CC",
+ "4 c #3366FF",
+ "5 c #3399FF",
+ "6 c #6699FF",
+ "7 c #CC0000",
+ "8 c #CC3366",
+ "9 c #CC6699",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 6 6 6 6 6 6 ",
+ " 35 5 53 35 53 43 ",
+ "11311311311 11311311211",
+ " 6 6 6 6 6 66 ",
+ " 6 6 6 6 6 66 ",
+ " 6 6 6 6 6 66 ",
+ "11111111111 11111111111",
+ " 6 6 6 6 6 66 ",
+ " 8 8 ",
+ " 77 777 ",
+ " 777 777 ",
+ " 7777777777777777777777 ",
+ " 7777777777 77777777777 ",
+ " 777 777 ",
+ " 777 777 ",
+ " 7 7 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *connect_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003399",
+ "2 c #336699",
+ "3 c #3366CC",
+ "4 c #3366FF",
+ "5 c #3399FF",
+ "6 c #6699FF",
+ "7 c #CC0000",
+ "8 c #CC3366",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 66 6 6 6 6 66 ",
+ " 33 35 53 35 53 34 ",
+ " 1111113111311 1131113111121 ",
+ " 66 6 6 6 6 66 ",
+ " 66 6 6 6 6 66 ",
+ " 66 6 6 6 6 66 ",
+ " 66 6 6 6 6 66 ",
+ " 1331113111321 1131113211331 ",
+ " 1331113111321 1131113211331 ",
+ " 66 6 6 6 6 66 ",
+ " 78 87 ",
+ " 777 777 ",
+ " 7777 7777 ",
+ " 7777 7777 ",
+ " 77777777777777 777777777777777 ",
+ " 777777777777777777777777777777 ",
+ " 7777 7777 ",
+ " 777 777 ",
+ " 777 777 ",
+ " 77 77 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **connect_xpm[3] = { connect_x16, connect_x24, connect_x32 };
+
diff --git a/app/bin/bitmaps/control.xpm b/app/bin/bitmaps/control.xpm index bc73a57..45d1f9b 100644 --- a/app/bin/bitmaps/control.xpm +++ b/app/bin/bitmaps/control.xpm @@ -1,24 +1,129 @@ -/* XPM */
-static char * control_xpm[] = {
-"16 16 5 1",
-" c None",
-". c #05FB0B",
-"+ c #000000",
-"@ c #EF2929",
-"# c #25E100",
-".+ + ",
-"+++ +++",
-" +++ +++ ",
-" +++ +++ +++ ",
-" ++++++++++ ",
-" +++@@@+++ ",
-" ++@@@@@++ ",
-" ++###@@@@++ ",
-" ++####@@@++ ",
-" ++#####@@++ ",
-" ++####@++ ",
-" +++###++++ ",
-" ++++++++++++ ",
-" +++ +++ +++ ",
-"+++ +++",
-"++ ++"};
+static char *control_x16[] = {
+ "16 16 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #009900",
+ "4 c #00CC00",
+ "5 c #00FF00",
+ "6 c #330000",
+ "7 c #333300",
+ "8 c #660000",
+ "9 c #663300",
+ "A c #990000",
+ "B c #CC0000",
+ "C c #FF0000",
+ "D c #800000",
+ "E c #008000",
+ " ",
+ " 0 00",
+ " 0 00 ",
+ " 0 00 ",
+ " 0 8ABD 00 ",
+ " 07CCCCA0 ",
+ " E49CCCCD ",
+ " 4549CCCB ",
+ " 45549CCB0 ",
+ " 355549CA ",
+ " 04555496 ",
+ " 01455420 ",
+ " 0 00 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ "0 0"};
+
+static char *control_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006600",
+ "2 c #009900",
+ "3 c #00CC00",
+ "4 c #00FF00",
+ "5 c #330000",
+ "6 c #339900",
+ "7 c #660000",
+ "8 c #663300",
+ "9 c #990000",
+ "A c #CC0000",
+ "B c #FF0000",
+ "C c #800000",
+ "D c #008000",
+ " ",
+ " 00 00 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000005CC700000 ",
+ " 007ABBBBA500 ",
+ " 018BBBBBBA50 ",
+ " 0338BBBBBBA0 ",
+ " 014438BBBBBB70 ",
+ " 0244438BBBBB90 ",
+ " 03444438BBBB90 ",
+ " 0D4444438BBB90 ",
+ " 0044444438BB5 ",
+ " 0D4444443890 ",
+ " 002444444600 ",
+ " 00001333310000 ",
+ " 000 000000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 00 000",
+ " "};
+
+static char *control_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #009900",
+ "4 c #00CC00",
+ "5 c #00FF00",
+ "6 c #330000",
+ "7 c #660000",
+ "8 c #663300",
+ "9 c #990000",
+ "A c #CC0000",
+ "B c #FF0000",
+ "C c #800000",
+ "D c #008000",
+ " ",
+ " 0 0 ",
+ " 000 000 ",
+ " 000 0000 ",
+ " 000 0000 ",
+ " 000 0000 ",
+ " 000 0000 ",
+ " 000 00 0000 ",
+ " 000 00077000 0000 ",
+ " 0000CABBBBAC00000 ",
+ " 06ABBBBBBBB9000 ",
+ " 0038BBBBBBBBB90 ",
+ " 0D548BBBBBBBBB70 ",
+ " 0045548BBBBBBBBA0 ",
+ " 02555548BBBBBBBB60 ",
+ " 035555548BBBBBBBC0 ",
+ " 0355555548BBBBBBC0 ",
+ " 0D555555548BBBBB70 ",
+ " 005555555548BBBB00 ",
+ " 035555555548BB90 ",
+ " 0045555555548B60 ",
+ " 02455555555480 ",
+ " 000145555554D000 ",
+ " 00000024444200 000 ",
+ " 000 00000000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 000 000 ",
+ " 00 00 ",
+ " "};
+
+static char **control_xpm[3] = { control_x16, control_x24, control_x32 };
+
diff --git a/app/bin/bitmaps/convert-from.xpm b/app/bin/bitmaps/convert-from.xpm new file mode 100644 index 0000000..ed72d8a --- /dev/null +++ b/app/bin/bitmaps/convert-from.xpm @@ -0,0 +1,99 @@ +static char *convert_from_x16[] = {
+ "16 16 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #999999",
+ "2 c #CC0000",
+ "3 c #CCCCCC",
+ "4 c #FF0000",
+ "5 c #FFFFFF",
+ "6 c #808080",
+ " 363 363 ",
+ "5060 10601 ",
+ "36 1 6006 03",
+ "30 101 1 63",
+ " 10601 060 ",
+ " 363 2 363 ",
+ " 2 ",
+ " 2 ",
+ " 42224 ",
+ " 424 ",
+ " 4 ",
+ " 00000 ",
+ " 00 ",
+ " 0000 ",
+ " 00 ",
+ " 00 "};
+
+static char *convert_from_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC0033",
+ " ",
+ " 00 0000 ",
+ " 0000 00000 00 ",
+ " 00 00 0000 0 00 ",
+ " 0 00 000 00 0 ",
+ " 00 00 00 0 0 ",
+ " 0 000 0 00 ",
+ " 000000 22 0000 ",
+ " 22 ",
+ " 22 ",
+ " 2 22 ",
+ " 2 22 22 ",
+ " 2222 ",
+ " 22 ",
+ " 2 ",
+ " 000000 ",
+ " 00 ",
+ " 0 ",
+ " 00000 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " "};
+
+static char *convert_from_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC0033",
+ " ",
+ " ",
+ " 00000 0000000 ",
+ " 00 0 0000 00 ",
+ " 0 00 0000 0 ",
+ " 0 00 000 000 00 ",
+ " 0 0 000 0 00 ",
+ " 0 000 00 00 00 ",
+ " 00 00 0 0 ",
+ " 00 0000 22 00 00 ",
+ " 00000 22 0000 ",
+ " 22 ",
+ " 22 ",
+ " 2 22 ",
+ " 22 22 22 ",
+ " 222 22 222 ",
+ " 22222222 ",
+ " 222222 ",
+ " 222 ",
+ " 2 ",
+ " 00000000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 000000 ",
+ " 000000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " ",
+ " "};
+
+static char **convert_from_xpm[3] = { convert_from_x16, convert_from_x24, convert_from_x32 };
+
diff --git a/app/bin/bitmaps/convert-to.xpm b/app/bin/bitmaps/convert-to.xpm new file mode 100644 index 0000000..5f5c94e --- /dev/null +++ b/app/bin/bitmaps/convert-to.xpm @@ -0,0 +1,99 @@ +static char *convert_to_x16[] = {
+ "16 16 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #999999",
+ "2 c #CC0000",
+ "3 c #CCCCCC",
+ "4 c #FF0000",
+ "5 c #FFFFFF",
+ "6 c #808080",
+ " 00000 ",
+ " 00 ",
+ " 0000 ",
+ " 00 ",
+ " 00 ",
+ " 2 ",
+ " 2 ",
+ " 2 ",
+ " 42224 ",
+ " 424 ",
+ " 363 4 363 ",
+ "5060 10601 ",
+ "36 1 6006 03",
+ "30 101 1 63",
+ " 10601 060 ",
+ " 363 363 "};
+
+static char *convert_to_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC0033",
+ " ",
+ " 000000 ",
+ " 000000 ",
+ " 00 ",
+ " 00000 ",
+ " 00000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 2 ",
+ " 2 ",
+ " 2 ",
+ " 22 2 2 ",
+ " 22 2 2 ",
+ " 2222 ",
+ " 22 ",
+ " 0000 00000 ",
+ " 00 0 0000 0 ",
+ " 0 00 0000 00 00 ",
+ " 0 0 00 0 0 ",
+ " 00 00 00 00 0 ",
+ " 00 000 0 0 ",
+ " 0000 000 ",
+ " "};
+
+static char *convert_to_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC0033",
+ " ",
+ " ",
+ " 00000000 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 000000 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 22 22 ",
+ " 222 22 222 ",
+ " 22222222 ",
+ " 222222 ",
+ " 2222 ",
+ " 000 22 00000 ",
+ " 000 00 00000 000 ",
+ " 0 0 0000 00 ",
+ " 00 00 000 00 0 ",
+ " 00 0 000 00 00 ",
+ " 00 000 000 00 00 ",
+ " 0 00 00 0 ",
+ " 00 00 0 00 ",
+ " 0000000 00000 ",
+ " 00 ",
+ " "};
+
+static char **convert_to_xpm[3] = { convert_to_x16, convert_to_x24, convert_to_x32 };
+
diff --git a/app/bin/bitmaps/convertfr.xpm b/app/bin/bitmaps/convertfr.xpm deleted file mode 100644 index 7f141c8..0000000 --- a/app/bin/bitmaps/convertfr.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * convertfr_xpm[] = { -"16 16 4 1", -" c None", -"! c #000000000000", -"# c #FFFF00000000", -"$ c #808080000000", -" !!! !!!! ", -" !! !!! !!", -" !! !! !! ", -" !!!! # !!! ", -" # ", -" ## # ## ", -" ####### ", -" ### ", -" # ", -" ", -" !!!!!! ", -" !! ", -" !!!! ", -" !! ", -" !! ", -" "};
\ No newline at end of file diff --git a/app/bin/bitmaps/convertto.xpm b/app/bin/bitmaps/convertto.xpm deleted file mode 100644 index f0fead2..0000000 --- a/app/bin/bitmaps/convertto.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * convertto_xpm[] = { -"16 16 4 1", -" c None", -"! c #000000000000", -"# c #FFFF00000000", -"$ c #808080000000", -" !!! !!!! ", -" !! !!! !!", -" !! !! !! ", -" !!!! # !!! ", -" ### ", -" ####### ", -" ## # ## ", -" # ", -" # ", -" ", -" !!!!!! ", -" !! ", -" !!!! ", -" !! ", -" !! ", -" "};
\ No newline at end of file diff --git a/app/bin/bitmaps/copy.xpm b/app/bin/bitmaps/copy.xpm new file mode 100644 index 0000000..1812343 --- /dev/null +++ b/app/bin/bitmaps/copy.xpm @@ -0,0 +1,95 @@ +static char *copy_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #FFFFFF",
+ "111111111111 ",
+ "1222222222221 ",
+ "1222222222221 ",
+ "1221111111111111",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1221222222222221",
+ "1111222222222221",
+ " 1222222222221",
+ " 1222222222221",
+ " 1111111111111"};
+
+static char *copy_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #FFFFFF",
+ " 11111111111111111 ",
+ "1222222222222222221 ",
+ "1222222222222222221 ",
+ "1222222222222222221 ",
+ "12222211111111111111111 ",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ "122221222222222222222221",
+ " 11111222222222222222221",
+ " 1222222222222222221",
+ " 1222222222222222221",
+ " 1222222222222222221",
+ " 11111111111111111 "};
+
+static char *copy_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #FFFFFF",
+ " ",
+ " 111111111111111111111111 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222111111111111111111111111 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 122222122222222222222222222221 ",
+ " 111111122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 122222222222222222222221 ",
+ " 111111111111111111111111 ",
+ " "};
+
+static char **copy_xpm[3] = { copy_x16, copy_x24, copy_x32 };
+
diff --git a/app/bin/bitmaps/cornu.xpm b/app/bin/bitmaps/cornu.xpm index bd3a2ed..d1bffcb 100644 --- a/app/bin/bitmaps/cornu.xpm +++ b/app/bin/bitmaps/cornu.xpm @@ -1,23 +1,117 @@ -/* XPM */ -static char * cornu_xpm[] = { -"16 16 4 1", -" c None", -"! c #000000000000", -"# c #FFFF00000000", -"$ c #808080000000", -" !!$!!!! ", -" !! $ !! ", -" !! $!!! $$$", -" $! !!$ $$ !!", -" !! $! ! !!", -"!! !! !! !! ", -"! !! $###$ ", -"$$$$ # # ", -"! !! ### ", -"! !! ", -"! !$ ", -"!!$$! ", -"!$ !! ", -"$! $!!!$!!$###", -" !! $ $ # #", -" $!!!!!$!!$###"}; +static char *cornu_x16[] = {
+ "16 16 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " 5 ",
+ " 5303022 ",
+ " 8307353733 ",
+ " 03523552566 ",
+ " 8233 84666 ",
+ " 0327 66 ",
+ "8353 ",
+ " 153 ",
+ " 253 ",
+ " 3518 ",
+ " 34528 ",
+ " 832538 6 ",
+ " 3552555753666",
+ " 232523335666",
+ " 85301331246 ",
+ " 7557 "};
+
+static char *cornu_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666600",
+ "5 c #990000",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ "A c #800000",
+ " ",
+ " 9 66009 ",
+ " 300360320 ",
+ " 91069 99 99018 ",
+ " 36 6100023 915 ",
+ " 099038 9 8138777 ",
+ " 92 28 9657 7 ",
+ " 3392 5777 ",
+ " 00339 77 ",
+ " 91826 ",
+ " 91928 ",
+ " 0 0 ",
+ " 61938 ",
+ " 91963 ",
+ " 00 19 ",
+ " 03962 ",
+ " 93 069 ",
+ " 0 9309 7 ",
+ " 33 3209 9 98A777 ",
+ " 93049 32032330377 7 ",
+ " 32099 8368 98777 ",
+ " 9002308166022A7 ",
+ " 90130160 9 ",
+ " 9 9 "};
+
+static char *cornu_x32[] = {
+ "32 32 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #993300",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ "A c #800000",
+ " ",
+ " 9 9 ",
+ " 98000000038 ",
+ " 1300 9 6300 ",
+ " 9 00099 99 9 039 ",
+ " 61 9 033039 60 ",
+ " 029 021086062039 47 ",
+ " 0 80089 9 9 13577477 ",
+ " 9920 28 9917 7 ",
+ " 639 0 7 77 ",
+ " 00966 777 ",
+ " 0 08 ",
+ " 0 0 ",
+ " 9869839 ",
+ " 00 62 ",
+ " 00 0 ",
+ " 00 629 ",
+ " 9669928 ",
+ " 60 00 ",
+ " 0 19 ",
+ " 019932 ",
+ " 839 0 9 ",
+ " 930 38 ",
+ " 00 98009 7 ",
+ " 26 33 9 9 99 4777 ",
+ " 9920 93016 69 903317 77 ",
+ " 008 85010002008 7 77 ",
+ " 8300 9 99 9 997777 ",
+ " 9 00060 99 960220A7 ",
+ " 96000000020089 ",
+ " 9 99 99 ",
+ " "};
+
+static char **cornu_xpm[3] = { cornu_x16, cornu_x24, cornu_x32 };
+
diff --git a/app/bin/bitmaps/curve1.xpm b/app/bin/bitmaps/curve1.xpm deleted file mode 100644 index dd1a295..0000000 --- a/app/bin/bitmaps/curve1.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * curve1_xpm[] = { -"16 16 4 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -"o c #861782078617", -" . ", -" ... ", -" . . . ", -" . .X .", -" X XX.XX ", -" oXXX .X ", -" X XXX XX.XX ", -" X X. .X .", -" XooX X. . . ", -" X X ... ", -" XoX X X . ", -" XoX ", -" X XX ", -" X X ", -"XXXXX ", -" X X "}; diff --git a/app/bin/bitmaps/curve2.xpm b/app/bin/bitmaps/curve2.xpm deleted file mode 100644 index e1ff0c6..0000000 --- a/app/bin/bitmaps/curve2.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * curve2_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #861782078617", -"o c #FFFF00000000", -" . X", -" ......", -" . .. . .", -" .. ..... ", -" . X.. . ..", -" . .o .. . ", -" X. o . ", -" . X. o ", -" . .X o ", -" . . X o ", -" . . o ", -"..... o o", -" . . o o", -" . . ooo", -" . . ooo", -" .... ooooo"}; diff --git a/app/bin/bitmaps/curve3.xpm b/app/bin/bitmaps/curve3.xpm deleted file mode 100644 index 97c447b..0000000 --- a/app/bin/bitmaps/curve3.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * curve3_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #861782078617", -"o c #FFFF00000000", -" . X", -" ......", -" . .. . .", -" ..X ..... ", -" . .. . ..", -" . .ooooo . ", -" .Xooo . ", -" . .ooo ", -" . .o. o ", -" . .o o ", -" . . o ", -" . . o ", -"..... o ", -" . . o ", -" . . o ", -" .... o"}; diff --git a/app/bin/bitmaps/curve4.xpm b/app/bin/bitmaps/curve4.xpm deleted file mode 100644 index 0d26396..0000000 --- a/app/bin/bitmaps/curve4.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * curve4_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #861782078617", -"o c #FFFF00000000", -" . X", -" ......", -" . .. . .", -" ..X ..... ", -" . .. . ..", -" . .ooooo . ", -" .Xooo . ", -" . .ooo ", -" . .o. o o", -" . .o o o ", -" . . o o ", -" . . oo ", -"..... oo ", -" . . o ", -" . . o ", -" .... o "}; diff --git a/app/bin/bitmaps/curved-chord.xpm b/app/bin/bitmaps/curved-chord.xpm new file mode 100644 index 0000000..b8c1d9d --- /dev/null +++ b/app/bin/bitmaps/curved-chord.xpm @@ -0,0 +1,109 @@ +static char *curved_chord_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF6666",
+ " 2 2 ",
+ " 2 0000 ",
+ " 2 00 2 2 ",
+ " 2 00 2 000 ",
+ " 0 2 002 2 ",
+ " 2 0 2002 ",
+ " 0 ",
+ " 20 2 1111 ",
+ " 020 113 ",
+ " 20 0 1313 ",
+ " 0202 1 313 1 ",
+ " 0 0 31311 ",
+ "20202 311 ",
+ " 0 0 11 ",
+ "20202 11 ",
+ " "};
+
+static char *curved_chord_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ " 9 ",
+ " 9100300",
+ " 0130 89 ",
+ " 820089 99 ",
+ " 018 930200",
+ " 9500 99 013059 ",
+ " 135 500 9 ",
+ " 9900 9 039 ",
+ " 53 81 9 ",
+ " 099 019 ",
+ " 9 0 950 ",
+ " 938 39 ",
+ " 029990 766666 ",
+ " 0 38 666666 ",
+ " 953 00 6666 ",
+ " 19990 66 66 ",
+ " 00 559 66 66 ",
+ " 00 0 66 66 66",
+ " 929930 66 66 ",
+ " 3299559 6666 ",
+ " 00 0 66 ",
+ " 00 0 66 ",
+ "9459829 66 ",
+ " 25 539 6 "};
+
+static char *curved_chord_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " 8 ",
+ " 88 000330 ",
+ " 250000000 ",
+ " 8 000020 88 ",
+ " 85000058 8 ",
+ " 00010 8 00130 ",
+ " 00038 3200000 ",
+ " 87000 88 00022 8 ",
+ " 0000 5000088 ",
+ " 00078 003 ",
+ " 8500 88000088 ",
+ " 503 500 ",
+ " 0288 0037 ",
+ " 00 888100 8 ",
+ " 88000 8501 ",
+ " 405 0038 ",
+ " 00888 0076666666 ",
+ " 00 820 66666666 ",
+ " 00 0058 66666 ",
+ " 830 00 66666 ",
+ " 0388800 66 666 ",
+ " 00 8703 66 6666 ",
+ " 00 007 66 6666 66 ",
+ " 00 00 66 6666 6666",
+ " 8505 000 6 6666 6666 ",
+ " 1188831 6666666 ",
+ " 00 5038 66666 ",
+ " 00 000 666 ",
+ " 00 00 666 ",
+ " 503 00 666 ",
+ "850788318 666 ",
+ " 0 00 6 "};
+
+static char **curved_chord_xpm[3] = { curved_chord_x16, curved_chord_x24, curved_chord_x32 };
+
diff --git a/app/bin/bitmaps/curved-end.xpm b/app/bin/bitmaps/curved-end.xpm new file mode 100644 index 0000000..6c91543 --- /dev/null +++ b/app/bin/bitmaps/curved-end.xpm @@ -0,0 +1,107 @@ +static char *curved_end_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF6666",
+ " 111 ",
+ " 11 ",
+ " 2 133 ",
+ " 2 0 1 ",
+ " 2 00 2 331",
+ " 0 2 00 11",
+ " 2 0 2002 111",
+ " 0 02 ",
+ " 20 20 ",
+ " 0202 ",
+ " 20 0 ",
+ " 0202 ",
+ " 0 0 ",
+ "20202 ",
+ " 0 0 ",
+ "20202 "};
+
+static char *curved_end_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666600",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " ",
+ " 66 ",
+ " 66666 ",
+ " 6 6 ",
+ " 8 6 ",
+ " 750 66 ",
+ " 85005 66 ",
+ " 8 0130 8 6 ",
+ " 730 88 530 6 6 ",
+ " 058 7015 66666 ",
+ " 70 87035 8 666 ",
+ " 18 532 ",
+ " 870 83078 ",
+ " 35 33 ",
+ " 008850 ",
+ " 881 38 ",
+ " 35880 ",
+ " 0 53 ",
+ " 71 05 ",
+ " 55871 ",
+ " 00 338 ",
+ " 0 00 ",
+ "837835 ",
+ " 17 35 "};
+
+static char *curved_end_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC0000",
+ "6 c #CC6600",
+ "7 c #CC9900",
+ " ",
+ " 555 ",
+ " 555555 ",
+ " 55555555 ",
+ " 55555 5 ",
+ " 55 55 ",
+ " 77 55 ",
+ " 6400 555 ",
+ " 7700367 55 ",
+ " 420 77 55 ",
+ " 7700377 77 55 55",
+ " 743 77 64215 55555 ",
+ " 047 760046 5555555 ",
+ " 740 77 333 77 55555 ",
+ " 636 774037 5555 ",
+ " 1777 347 ",
+ " 7 0 777017 ",
+ " 734 734 ",
+ " 3477 077 ",
+ " 0 7772 ",
+ " 7730 447 ",
+ " 6377 007 ",
+ " 047772 ",
+ " 0 447 ",
+ " 740 067 ",
+ " 7447740 ",
+ " 1677447 ",
+ " 0 16 ",
+ " 0 0 ",
+ " 437 41 ",
+ "76477637 ",
+ " 00 42 "};
+
+static char **curved_end_xpm[3] = { curved_end_x16, curved_end_x24, curved_end_x32 };
+
diff --git a/app/bin/bitmaps/curved-line-chord.xpm b/app/bin/bitmaps/curved-line-chord.xpm new file mode 100644 index 0000000..779cc67 --- /dev/null +++ b/app/bin/bitmaps/curved-line-chord.xpm @@ -0,0 +1,92 @@ +static char *curved_line_chord_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 0000 ",
+ " 0000 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 01111 ",
+ " 0 111 ",
+ " 00 1111 ",
+ " 0 1 11 ",
+ " 00 11 11",
+ " 0 11 11 ",
+ " 0 111 ",
+ " 0 11 ",
+ " 0 11 ",
+ " "};
+
+static char *curved_line_chord_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " ",
+ " 00000 ",
+ " 0000 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 0 11111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 0 1 11 ",
+ " 00 1 11 ",
+ " 0 1 11 ",
+ " 00 11 1 ",
+ " 0 11 1 ",
+ " 0 11 1 ",
+ " 00 111 ",
+ " 00 11 ",
+ " 00 11 ",
+ " 00 11 ",
+ " 11 ",
+ " "};
+
+static char *curved_line_chord_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " ",
+ " 00000 ",
+ " 00000000 ",
+ " 000000 ",
+ " 00000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 0011111111 ",
+ " 00011111111 ",
+ " 000 1111 ",
+ " 000 11111 ",
+ " 00 11 111 ",
+ " 000 11 111 ",
+ " 00 11 111 ",
+ " 000 11 111 ",
+ " 00 111 1 ",
+ " 00 111 111 ",
+ " 000 11 111 ",
+ " 00 111 111 ",
+ " 00 11111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 11 ",
+ " ",
+ " "};
+
+static char **curved_line_chord_xpm[3] = { curved_line_chord_x16, curved_line_chord_x24, curved_line_chord_x32 };
+
diff --git a/app/bin/bitmaps/curved-line-end.xpm b/app/bin/bitmaps/curved-line-end.xpm new file mode 100644 index 0000000..0e967ab --- /dev/null +++ b/app/bin/bitmaps/curved-line-end.xpm @@ -0,0 +1,94 @@ +static char *curved_line_end_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 11 ",
+ " 1111 ",
+ " 11 ",
+ " 00011 ",
+ " 0000 11 ",
+ " 000 1111 ",
+ " 00 11 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0 "};
+
+static char *curved_line_end_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #CC0000",
+ " ",
+ " 2 ",
+ " 2222 ",
+ " 222222 ",
+ " 22 ",
+ " 22 ",
+ " 00012 ",
+ " 00000 2 ",
+ " 000 2 ",
+ " 000 22222 ",
+ " 00 222 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 0 "};
+
+static char *curved_line_end_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #CC0000",
+ " ",
+ " ",
+ " 222 ",
+ " 22222 ",
+ " 2222222 ",
+ " 22222 22 ",
+ " 222 ",
+ " 222 ",
+ " 0000122 ",
+ " 0000000 22 ",
+ " 000000 22 ",
+ " 00000 22 22 ",
+ " 0000 22222222 ",
+ " 000 2222222 ",
+ " 0000 2222 ",
+ " 000 2 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 000 ",
+ " 000 ",
+ " 00 ",
+ " "};
+
+static char **curved_line_end_xpm[3] = { curved_line_end_x16, curved_line_end_x24, curved_line_end_x32 };
+
diff --git a/app/bin/bitmaps/curved-line-middle.xpm b/app/bin/bitmaps/curved-line-middle.xpm new file mode 100644 index 0000000..fceb7d6 --- /dev/null +++ b/app/bin/bitmaps/curved-line-middle.xpm @@ -0,0 +1,95 @@ +static char *curved_line_middle_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #800000",
+ " ",
+ " 00000",
+ " 0000 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 02111 ",
+ " 00111 ",
+ " 0 1111 ",
+ " 00 11 ",
+ " 0 11 ",
+ " 00 11 ",
+ " 00 11 ",
+ " 0 1 ",
+ " 0 ",
+ " 0 "};
+
+static char *curved_line_middle_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ " 0 ",
+ " 000000 ",
+ " 0000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 0022222 ",
+ " 00 222 ",
+ " 0 22 2 ",
+ " 00 22 2 ",
+ " 00 22 ",
+ " 00 22 ",
+ " 0 22 ",
+ " 00 22 ",
+ " 00 22 ",
+ " 0 22 ",
+ " 0 2 ",
+ " 0 ",
+ " 0 ",
+ " "};
+
+static char *curved_line_middle_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #800000",
+ " ",
+ " ",
+ " 000000 ",
+ " 000000000 ",
+ " 000000 ",
+ " 00000 ",
+ " 00000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 002 ",
+ " 000111111 ",
+ " 000 111111 ",
+ " 00 11111 ",
+ " 00 11 111 ",
+ " 000 11 111 ",
+ " 00 11 111 ",
+ " 000 111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 000 111 ",
+ " 00 111 ",
+ " 00 1111 ",
+ " 000 111 ",
+ " 00 111 ",
+ " 00 111 ",
+ " 00 1 ",
+ " 00 ",
+ " 00 ",
+ " "};
+
+static char **curved_line_middle_xpm[3] = { curved_line_middle_x16, curved_line_middle_x24, curved_line_middle_x32 };
+
diff --git a/app/bin/bitmaps/curved-line-tangent.xpm b/app/bin/bitmaps/curved-line-tangent.xpm new file mode 100644 index 0000000..e184d3a --- /dev/null +++ b/app/bin/bitmaps/curved-line-tangent.xpm @@ -0,0 +1,98 @@ +static char *curved_line_tangent_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ " 00000",
+ " 0000 ",
+ " 000 ",
+ " 00 ",
+ " 10 ",
+ " 022 ",
+ " 00 22 ",
+ " 00 22 ",
+ " 0 22 ",
+ " 00 22 ",
+ " 00 22 2 ",
+ " 0 22 2 ",
+ " 0 222 ",
+ "00 2222 ",
+ " 0 "};
+
+static char *curved_line_tangent_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #CC0000",
+ " ",
+ " ",
+ " 000000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 00 ",
+ " 00 ",
+ " 01 ",
+ " 23 ",
+ " 0 3 ",
+ " 0 3 ",
+ " 00 3 ",
+ " 0 3 ",
+ " 0 33 ",
+ " 0 33 ",
+ " 00 33 ",
+ " 0 33 3 ",
+ " 00 33 3 ",
+ " 00 33 3 ",
+ " 00 333 ",
+ " 00 33333 ",
+ " 0 3 ",
+ " "};
+
+static char *curved_line_tangent_x32[] = {
+ "32 32 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #990000",
+ "3 c #CC0000",
+ "4 c #800000",
+ " ",
+ " ",
+ " 00000 ",
+ " 00000000 ",
+ " 0000000 ",
+ " 00000 ",
+ " 00000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 0000 ",
+ " 001 ",
+ " 0043 ",
+ " 002333 ",
+ " 00 333 ",
+ " 000 333 ",
+ " 000 333 ",
+ " 00 333 ",
+ " 000 333 ",
+ " 00 333 ",
+ " 000 333 ",
+ " 00 333 ",
+ " 00 333 3 ",
+ " 00 333 33 ",
+ " 00 333 33 ",
+ " 00 333 33 ",
+ " 00 333333 ",
+ " 000 3333 ",
+ " 000 33333333 ",
+ " 00 33333333 ",
+ " ",
+ " "};
+
+static char **curved_line_tangent_xpm[3] = { curved_line_tangent_x16, curved_line_tangent_x24, curved_line_tangent_x32 };
+
diff --git a/app/bin/bitmaps/curved-middle.xpm b/app/bin/bitmaps/curved-middle.xpm new file mode 100644 index 0000000..70fc4de --- /dev/null +++ b/app/bin/bitmaps/curved-middle.xpm @@ -0,0 +1,108 @@ +static char *curved_middle_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF6666",
+ " 2 2 ",
+ " 2 0000 ",
+ " 2 00 2 2 ",
+ " 2 00 2 000 ",
+ " 0 2 002 2 ",
+ " 2 0 2 ",
+ " 0 1111 ",
+ " 20 113 ",
+ " 02 1313 ",
+ " 20 1 313 ",
+ " 0202 313 ",
+ " 0 0 313 ",
+ "20202 313 ",
+ " 0 0 313 ",
+ "20202 31 ",
+ " "};
+
+static char *curved_middle_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC0000",
+ "6 c #CC6600",
+ "7 c #CC9900",
+ " 7 ",
+ " 7 430",
+ " 4300340",
+ " 7 0026 77 ",
+ " 320 730210",
+ " 7 00077 013037 ",
+ " 41 400 7 7 ",
+ " 037 037 ",
+ " 720 60 7 ",
+ " 167 027 ",
+ " 00 740 7 ",
+ " 743 37 ",
+ " 17740 655555 ",
+ " 00 736 55555 ",
+ " 742 00 555 ",
+ " 26760 5 55 ",
+ " 0 367 5 55 ",
+ " 00 0 5 55 ",
+ "7726720 5 ",
+ " 277277 5 ",
+ " 00 0 5 ",
+ " 00 00 5 ",
+ "7447447 5 ",
+ " 01 34 "};
+
+static char *curved_middle_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666600",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ " ",
+ " 99 ",
+ " 9 002300",
+ " 5200038 ",
+ " 99 00038 9 ",
+ " 810 9 820",
+ " 028 8500033 ",
+ " 99 000 99 005 99 ",
+ " 930 9200 99 ",
+ " 059 015 ",
+ " 99 0 9 00 99 ",
+ " 983 920 ",
+ " 399 08 ",
+ " 0 99950 9 ",
+ " 99 0 9938 ",
+ " 935 299 ",
+ " 02999 0 97666666 ",
+ " 0 953 66666666 ",
+ " 00 0299 6666666 ",
+ " 9991 0 666666 ",
+ " 3599 00 6666666 ",
+ " 0 9839 666 6666 ",
+ " 00 0399 666 6666 ",
+ " 00 0 6666 ",
+ " 9919 00 666 ",
+ " 5399928 666 ",
+ " 00 3299 666 ",
+ " 00 00 666 ",
+ " 0 00 666 ",
+ "99289 15 666 ",
+ "990999199 66 ",
+ " 0 0 "};
+
+static char **curved_middle_xpm[3] = { curved_middle_x16, curved_middle_x24, curved_middle_x32 };
+
diff --git a/app/bin/bitmaps/curved-tangent.xpm b/app/bin/bitmaps/curved-tangent.xpm new file mode 100644 index 0000000..6332785 --- /dev/null +++ b/app/bin/bitmaps/curved-tangent.xpm @@ -0,0 +1,116 @@ +static char *curved_tangent_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF6666",
+ " 2 2 ",
+ " 2 0000 ",
+ " 2 00 2 2 ",
+ " 2 00 2 000 ",
+ " 0 2 002 2 ",
+ " 2 0 002 ",
+ " 0 13 ",
+ " 20 313 ",
+ " 020 313 ",
+ " 20 0 313 ",
+ " 0202 313 ",
+ " 0 0 313 1 ",
+ "20202 3131 ",
+ " 0 0 311 ",
+ "20202 1111 ",
+ " "};
+
+static char *curved_tangent_x24[] = {
+ "24 24 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC0000",
+ "6 c #CC6600",
+ "7 c #CC6666",
+ "8 c #CC9900",
+ "9 c #CCCCCC",
+ "A c #FFCCCC",
+ "B c #FFFFFF",
+ " ",
+ " 8 440 ",
+ " 2400340 ",
+ " 830048 8 ",
+ " 014 88 8 ",
+ " 8600 88 80030 ",
+ " 34 80022 4 ",
+ " 00 8 33 ",
+ " 63 81048 ",
+ " 08BA 34 ",
+ " 60 95A0 ",
+ " 26 B755 ",
+ " 00 880B555 ",
+ " 60 43 555 ",
+ " 448 0 555 ",
+ " 0 8830 555 ",
+ " 00 438 555 ",
+ " 10 00 555 5 ",
+ " 828881 555 55 ",
+ " 0 8438 55555 ",
+ " 00 00 5555 ",
+ " 33 23 55555 ",
+ " 448836 55555 ",
+ " 0 0 "};
+
+static char *curved_tangent_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3333",
+ "8 c #CC6600",
+ "9 c #CC6666",
+ "A c #CC9900",
+ "B c #CC9999",
+ "C c #FFCCCC",
+ "D c #FFFFFF",
+ " ",
+ " AA ",
+ " AA 003200 ",
+ " 320005A ",
+ " A0000A A ",
+ " 32 AA A ",
+ " 005A AA A3 ",
+ " A 00 AA A000010 ",
+ " 33 A 0023 A ",
+ " 00AA 8200A ",
+ " A 00 A 018 ",
+ " 33 A500 A ",
+ " 02AADD 53 ",
+ " 00 D9BD08 ",
+ " A82 DC76BD ",
+ " 1AA DC766 ",
+ " 00 AA 0C666 ",
+ " 0 A3 666 ",
+ " A1 05A 666 ",
+ " 54A 00 666 ",
+ " 0 AAA0 666 ",
+ " 0 55 666 ",
+ " 00 0 666 ",
+ " 0 00 666 6 ",
+ " A3AAA 00 666 666 ",
+ " 00 AAA2A 6666666 ",
+ " 00 00 666666 ",
+ " 00 00 66666 ",
+ " 0 00 6666666 ",
+ " A3AAAA38 6666666 ",
+ " 0 08 ",
+ " "};
+
+static char **curved_tangent_xpm[3] = { curved_tangent_x16, curved_tangent_x24, curved_tangent_x32 };
+
diff --git a/app/bin/bitmaps/cut.xpm b/app/bin/bitmaps/cut.xpm new file mode 100644 index 0000000..6dcae39 --- /dev/null +++ b/app/bin/bitmaps/cut.xpm @@ -0,0 +1,92 @@ +static char *cut_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ " ",
+ " ",
+ " 1 ",
+ " 1111 ",
+ " 11 11 ",
+ " 1111 ",
+ " 11 ",
+ " 11 11111 ",
+ " 11111111111111 ",
+ " 11111 1111 ",
+ " 1 11 111 ",
+ " 111 111 ",
+ " 111 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char *cut_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 1111 ",
+ " 11 11 ",
+ " 111 11 ",
+ " 111 1 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 1111111 ",
+ " 11111111111111111111 ",
+ " 111111111111111111111 ",
+ " 1111111 111 ",
+ " 11 11 1111 ",
+ " 11 111 1111 ",
+ " 111 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 111 ",
+ " ",
+ " ",
+ " "};
+
+static char *cut_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 11111 ",
+ " 1111111 ",
+ " 111 111 ",
+ " 111 11 ",
+ " 1111 111 ",
+ " 111111111 ",
+ " 1111111 ",
+ " 1111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 1111111111 ",
+ " 111111111111111111111111 ",
+ " 1111111111111111111111111111 ",
+ " 111111111111111111 ",
+ " 111 111 1111 ",
+ " 11 111 1111 ",
+ " 111 111 11111 ",
+ " 1111111 11111 ",
+ " 11111 1111 ",
+ " 1111 ",
+ " 11111 ",
+ " 11111 ",
+ " 111 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **cut_xpm[3] = { cut_x16, cut_x24, cut_x32 };
+
diff --git a/app/bin/bitmaps/dbench.xpm b/app/bin/bitmaps/dbench.xpm deleted file mode 100644 index a880329..0000000 --- a/app/bin/bitmaps/dbench.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dbench_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF9A691861", -" .XXXX.XX", -" .XXXX.XXX", -" ..XXX..XXXX", -" .XXXX.XXXXXX", -" .XXXX.XXXXXXX", -" ......XXXXXXXX", -" .XXXX.XXXXXXXX", -" .XXXX.XXXXXXXX", -" .XXXX.XXXXXXX.", -" .XXXX.XXXXXX. ", -" .XXXX.XXXXX. ", -" .XXXX.XXXX. ", -" .XXXX.XX.. ", -" .XXXX.X. ", -" .XXXX.. ", -" ...... "}; diff --git a/app/bin/bitmaps/dbezier.xpm b/app/bin/bitmaps/dbezier.xpm deleted file mode 100644 index 1bf366f..0000000 --- a/app/bin/bitmaps/dbezier.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */
-static char * dbezier_xpm[] = {
-"16 16 3 1",
-" c None",
-"! c #000000000000",
-"# c #FFFF00000000",
-" ### ",
-" # ########",
-" ### !!!!",
-" !!!! ",
-" !!!! ",
-" !!! ",
-" !!! ",
-" !! ",
-" !!! ",
-" !! ",
-" !!! ",
-" !!! ",
-" !!! ",
-"!!!! ### ",
-"######## # ",
-" ### "};
\ No newline at end of file diff --git a/app/bin/bitmaps/dbox.xpm b/app/bin/bitmaps/dbox.xpm deleted file mode 100644 index 83dbeec..0000000 --- a/app/bin/bitmaps/dbox.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dbox_xpm[] = { -"16 16 3 1", -"X c None", -" c #000000000000", -". c #FFFF00000000", -" .....", -" XX..", -" XXXXXXXXXXX.X.", -" XXXXXXXXXX.XX.", -" XXXXXXXXX.XX .", -" XXXXXXXX.XXX ", -" XXXXXXX.XXXX ", -" XXXXXX.XXXXX ", -" XXXXX.XXXXXX ", -" XXXX.XXXXXXX ", -" XXX.XXXXXXXX ", -" XX.XXXXXXXXX ", -" X.XXXXXXXXXX ", -" .XXXXXXXXXXX ", -".. ", -".. "}; diff --git a/app/bin/bitmaps/dcircle1.xpm b/app/bin/bitmaps/dcircle1.xpm deleted file mode 100644 index a17a56a..0000000 --- a/app/bin/bitmaps/dcircle1.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcircle1_xpm[] = { -"16 16 3 1", -" c #None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" ........ ", -" ... ... ", -" .XXXXXXXXXXX.. ", -" .X X.. ", -"..X XXX XXX X ..", -". X X X X X ..", -". X XXX XX X ..", -". X X X X ..", -". X X X X ..", -"..X X XX X ..", -" .X X.. ", -" .XXXXXXXXXXX.. ", -" ... ... ", -" ........ ", -" ...... "}; diff --git a/app/bin/bitmaps/dcircle2.xpm b/app/bin/bitmaps/dcircle2.xpm deleted file mode 100644 index 36e4763..0000000 --- a/app/bin/bitmaps/dcircle2.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcircle2_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" ........ ", -" ... ... ", -" ... .. ", -" .. . ", -".. ..", -".. ..", -".. XXXXX ..", -".. XX ..", -".. X X ..", -".. X X ..", -" .. X X . ", -" ... X.. ", -" ... .X ", -" ......... ", -" ...... "}; diff --git a/app/bin/bitmaps/dcircle3.xpm b/app/bin/bitmaps/dcircle3.xpm deleted file mode 100644 index ec0dc1f..0000000 --- a/app/bin/bitmaps/dcircle3.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcircle3_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" ........ ", -" ... ... ", -" .. .. ", -" .. . ", -".. ..", -".. ..", -".. XX ..", -".. XX X ..", -".. X X ..", -".. X X ..", -" . XX . ", -" .. XXXXX.. ", -" ... ... ", -" ........ ", -" ...... "}; diff --git a/app/bin/bitmaps/dcurve1.xpm b/app/bin/bitmaps/dcurve1.xpm deleted file mode 100644 index 286e8bc..0000000 --- a/app/bin/bitmaps/dcurve1.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcurve1_xpm[] = { -"16 16 3 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -" . ", -" ... ", -" . . . ", -" . . .", -" XXX.X ", -" XXXX.X ", -" XXX . ", -" XXX . . ", -" XXX . . . ", -" XXX ... ", -" XXX . ", -" XX ", -" XXX ", -" XX ", -" XX ", -" XX "}; diff --git a/app/bin/bitmaps/dcurve2.xpm b/app/bin/bitmaps/dcurve2.xpm deleted file mode 100644 index 2714d5e..0000000 --- a/app/bin/bitmaps/dcurve2.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcurve2_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ..... ", -" ........", -" .... ..", -" ... .", -" .X. ", -" ...X ", -" ... X ", -" .. X ", -" ... X ", -" .. X ", -" .. X X", -" .. X X", -" .. X X", -" .. XX", -" .. XXXXX"}; diff --git a/app/bin/bitmaps/dcurve3.xpm b/app/bin/bitmaps/dcurve3.xpm deleted file mode 100644 index c452ffd..0000000 --- a/app/bin/bitmaps/dcurve3.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcurve3_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ..... ", -" ........", -" .... .", -" ... ", -" .XXXXXX ", -" ..XXX ", -" .. XXX ", -" .. X X ", -" ... X X ", -" .. X X ", -" .. X ", -" .. X ", -" .. X ", -" .. XX", -" .. XX"}; diff --git a/app/bin/bitmaps/dcurve4.xpm b/app/bin/bitmaps/dcurve4.xpm deleted file mode 100644 index 2474481..0000000 --- a/app/bin/bitmaps/dcurve4.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dcurve4_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ..... ", -" ........", -" .... ..", -" ... ", -" .XXXXXX ", -" ..XXX ", -" .. XXX ", -" .. X X .", -" .. X X . ", -" .. X X . ", -" .. X. ", -" .. .X ", -" .. . ", -" .. . ", -" .. . "}; diff --git a/app/bin/bitmaps/ddimlin.xpm b/app/bin/bitmaps/ddimlin.xpm deleted file mode 100644 index 3980e44..0000000 --- a/app/bin/bitmaps/ddimlin.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * ddimlin_xpm[] = { -"16 16 3 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -" .....", -" ..", -" . .", -" . .", -" . .", -" X XXX ", -" X X X ", -" XX XX ", -" X X ", -" XX XX ", -" . ", -". . ", -". . ", -". . ", -".. ", -"..... "}; diff --git a/app/bin/bitmaps/delete.xpm b/app/bin/bitmaps/delete.xpm index 63b875a..9002046 100644 --- a/app/bin/bitmaps/delete.xpm +++ b/app/bin/bitmaps/delete.xpm @@ -1,22 +1,114 @@ -/* XPM */ -static char * delete_xpm[] = { -"16 16 3 1", -" c None", -". c #FF0000", -"+ c #000000", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" + .. .. + ", -"++++++....++++++", -" + +..+ + ", -" + +..+ + ", -" + .... + ", -"+++++..++..+++++", -" + .. .. + ", -" .. .. ", -" .. .. ", -" .. .. ", -".. ..", -" "}; +static char *delete_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #990000",
+ "3 c #CC0000",
+ "4 c #CC3300",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ "7 c #800000",
+ " ",
+ " ",
+ " 33 33 ",
+ " 33 333 ",
+ " 33 333 ",
+ " 6 6 533534 6 6 ",
+ "0000007333100000",
+ " 6 6 663346 6 6 ",
+ " 6 6 663356 6 6 ",
+ "0000007332000000",
+ " 6 6 633435 6 6 ",
+ " 333 33 ",
+ " 333 33 ",
+ " 33 333 ",
+ " 3 ",
+ " "};
+
+static char *delete_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #993300",
+ "4 c #996600",
+ "5 c #CC0000",
+ "6 c #CC3300",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ "9 c #800000",
+ " ",
+ " ",
+ " ",
+ " 555 555 ",
+ " 5555 555 ",
+ " 5555 555 ",
+ " 5555 5555 ",
+ " 555 5555 ",
+ " 8 8 75557556 8 8 ",
+ "01200200295555520020021 ",
+ " 47 7 74555567 7 74 ",
+ " 8 8 8 555578 8 8 ",
+ " 8 8 8 5555 8 8 8 ",
+ " 47 7 74555537 7 74 ",
+ "012002002255555200200210",
+ " 8 8 85556557 8 8 ",
+ " 5555 555 ",
+ " 555 555 ",
+ " 555 5555 ",
+ " 555 5555 ",
+ " 555 555 ",
+ " 5 5 ",
+ " ",
+ " "};
+
+static char *delete_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #990000",
+ "4 c #993300",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " 6 6 ",
+ " 666 666 ",
+ " 66666 66666 ",
+ " 66666 66666 ",
+ " 66666 6666 ",
+ " 66666 6666 ",
+ " 66666 66666 ",
+ " 66666 66666 ",
+ " 99 99 9766686667 99 99 ",
+ " 055005510254666666651025500550 ",
+ " 055005510255366666751025500550 ",
+ " 99 99 99 6666699 99 99 ",
+ " 99 99 99 6666699 99 99 ",
+ " 99 99 99 6666699 99 99 ",
+ " 99 99 99 6666699 99 99 ",
+ " 055005510255666666551025500550 ",
+ " 055005510254666666751025500550 ",
+ " 99 99 9766686668 99 99 ",
+ " 66666 6666 ",
+ " 6666 6666 ",
+ " 6666 66666 ",
+ " 66666 66666 ",
+ " 66666 66666 ",
+ " 6666 66666 ",
+ " 6666 666 ",
+ " 66 6 ",
+ " ",
+ " ",
+ " "};
+
+static char **delete_xpm[3] = { delete_x16, delete_x24, delete_x32 };
+
diff --git a/app/bin/bitmaps/describe.xpm b/app/bin/bitmaps/describe.xpm index e5506a5..1cbeb20 100644 --- a/app/bin/bitmaps/describe.xpm +++ b/app/bin/bitmaps/describe.xpm @@ -1,22 +1,111 @@ -/* XPM */ -static char * describe_xpm[] = { -"16 16 3 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -" ...... ", -" ... ... ", -" ... ... ", -" ... ... ", -" ... ... ", -" X X ... X ", -"XXXXXXXX ... XX", -" X X ... X ", -" X .... X ", -" X ... X ", -"XXXX ... XXXXXX", -" X ... X X ", -" ... ", -" ", -" ... ", -" ... "}; +static char *describe_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #FF6666",
+ " ",
+ " 331133 ",
+ " 31111113 ",
+ " 113 311 ",
+ " 11 ",
+ " 2 2 2 3113 2 ",
+ "000000 3113 0000",
+ " 2 2 2 113 2 2 ",
+ " 2 2 2 11 2 2 2 ",
+ "000000 11 000000",
+ " 2 2 2 11 2 2 2 ",
+ " ",
+ " 11 ",
+ " 11 ",
+ " ",
+ " "};
+
+static char *describe_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #660000",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " 66666666 ",
+ " 6666666666 ",
+ " 66666666666 ",
+ " 6666 6666 ",
+ " 66 6666 ",
+ " 6666 ",
+ " 8 8 88 66666 8 88 ",
+ " 00000000046666620000000",
+ " 8 8 88666667 8 88 ",
+ " 8 8 886666 8 8 88 ",
+ " 8 8 886666 8 8 88 ",
+ " 1500510536664150051053 ",
+ " 1500510536664150051053 ",
+ " 8 8 8 6666 8 8 8 ",
+ " 666 ",
+ " 6 ",
+ " 66 ",
+ " 666 ",
+ " ",
+ " ",
+ " "};
+
+static char *describe_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #993300",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC3300",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #800000",
+ " ",
+ " ",
+ " ",
+ " 7777 ",
+ " 7777777777 ",
+ " 777777777777 ",
+ " 77777777777777 ",
+ " 77777 77777 ",
+ " 7777 77777 ",
+ " 7777 77777 ",
+ " 77 7777 ",
+ " 77777 ",
+ " AA AA AA 777777 AA AA ",
+ " 066006630266B77777777106600660 ",
+ " 066006630266B77777785006600660 ",
+ " AA AA AA 777778AA AA AA ",
+ " AA AA AA 7777 AAA AA AA ",
+ " AA AA AA 7777 AAA AA AA ",
+ " AA AA AA 7777 AAA AA AA ",
+ " 033003320133B77770232003300330 ",
+ " 99 696 39947777 696 99 99 ",
+ " AA AA AA 7777 AAA AA AA ",
+ " 7777 ",
+ " 7777 ",
+ " 7 ",
+ " 77 ",
+ " 7777 ",
+ " 7777 ",
+ " 77 ",
+ " ",
+ " ",
+ " "};
+
+static char **describe_xpm[3] = { describe_x16, describe_x24, describe_x32 };
+
diff --git a/app/bin/bitmaps/description.xpm b/app/bin/bitmaps/description.xpm new file mode 100644 index 0000000..47941b0 --- /dev/null +++ b/app/bin/bitmaps/description.xpm @@ -0,0 +1,101 @@ +static char *description_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099FF",
+ "3 c #FF0000",
+ " ",
+ "00 000 00 00 ",
+ "0 0 0 0 0 ",
+ "0 0 00 0 0 ",
+ "0 0 0 0 0 ",
+ "00 000 00 00 ",
+ " 3 ",
+ " 333 ",
+ " 33333 ",
+ " 3 ",
+ " 2 2 2 3 2 2 2 ",
+ " 11111 3 11111 ",
+ " 2 2 2 2 2 2 ",
+ " 1111111111111 ",
+ " 2 2 2 2 2 2 2 ",
+ " "};
+
+static char *description_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099FF",
+ "3 c #FF0000",
+ " ",
+ " ",
+ " ",
+ " 000 0000 000 00 ",
+ " 0 0 0 0 0 0 ",
+ " 0 0 000 00 0 ",
+ " 0 0 0 0 0 0 ",
+ " 000 0000 000 00 ",
+ " ",
+ " 33 ",
+ " 3333 ",
+ " 333333 ",
+ " 33 ",
+ " 33 ",
+ " 2 2 2 33 2 2 2 ",
+ " 111111111 33 11111111 ",
+ " 2 2 2 33 2 2 2 ",
+ " 2 2 2 33 2 2 2 ",
+ " 2 2 2 2 2 2 ",
+ " 111111111111111111111 ",
+ " 2 2 2 2 2 2 2 ",
+ " ",
+ " ",
+ " "};
+
+static char *description_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0000CC",
+ "2 c #0033CC",
+ "3 c #0066CC",
+ "4 c #0066FF",
+ "5 c #0099FF",
+ "6 c #CC0000",
+ " ",
+ " 0000 00000 000 000 ",
+ " 000000 00000 00000 00000 ",
+ " 00 000 00 00 00 ",
+ " 00 00 00000 0000 00 ",
+ " 00 000 00 0000 00 ",
+ " 00 000 00 0 00 000 0 ",
+ " 000000 00000 00000 00000 ",
+ " ",
+ " 66 ",
+ " 6666 ",
+ " 666666 ",
+ " 66666666 ",
+ " 6 66 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " ",
+ " 55 5 5 55 5 5 55 ",
+ " 55 35 53 55 35 53 45 ",
+ " 111111111111111111111111111111 ",
+ " 55 35 53 55 35 53 45 ",
+ " 55 5 5 55 5 5 55 ",
+ " 55 5 5 55 5 5 55 ",
+ " 55 35 53 55 35 53 45 ",
+ " 111111111111111111111111111111 ",
+ " 133112311133113311231113311331 ",
+ " 55 5 5 55 5 5 55 ",
+ " "};
+
+static char **description_xpm[3] = { description_x16, description_x24, description_x32 };
+
diff --git a/app/bin/bitmaps/dfilbox.xpm b/app/bin/bitmaps/dfilbox.xpm deleted file mode 100644 index 4d78c26..0000000 --- a/app/bin/bitmaps/dfilbox.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dfilbox_xpm[] = { -"16 16 4 1", -"o c None", -" c #000000000000", -". c #FFFF00000000", -"X c #0000FFFFFFFF", -" .....", -" XXXXXXXXXXXXX..", -" XXXXXXXXXXXX.X.", -" XXXXXXXXXXX.XX.", -" XXXXXXXXXX.XXX.", -" XXXXXXXXX.XXXX ", -" XXXXXXXX.XXXXX ", -" XXXXXXX.XXXXXX ", -" XXXXXX.XXXXXXX ", -" XXXXX.XXXXXXXX ", -" XXXX.XXXXXXXXX ", -" XXX.XXXXXXXXXX ", -" XX.XXXXXXXXXXX ", -" X.XXXXXXXXXXXX ", -"..XXXXXXXXXXXXX ", -".. "}; diff --git a/app/bin/bitmaps/dfilpoly.xpm b/app/bin/bitmaps/dfilpoly.xpm deleted file mode 100644 index 56a62ee..0000000 --- a/app/bin/bitmaps/dfilpoly.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dfilpoly_xpm[] = { -"16 16 4 1", -"X c None", -" c #FFFF00000000", -". c #000000000000", -"o c #0000FFFFFFFF", -" ..... XXXXXXXXX", -".oooooo..... XXX", -".ooooooooo..XXXX", -".oooooooo.XXXXXX", -".oooooo..XXXXXXX", -".ooooo.XXXXXXXXX", -".oooo.XXXXXXXXXX", -".oooo .XXXXXXXXX", -".oooooo..... XXX", -" oooooooooooo.. ", -"X.oooooooooooo.X", -"X.oooooooooo..XX", -"XX.oooooooo.XXXX", -"XXX.oooooo.XXXXX", -"XXX.oooo..XXXXXX", -"XXXX .. XXXXXXXX"}; diff --git a/app/bin/bitmaps/dflcrcl1.xpm b/app/bin/bitmaps/dflcrcl1.xpm deleted file mode 100644 index 404660d..0000000 --- a/app/bin/bitmaps/dflcrcl1.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dflcrcl1_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ...... ", -" .. . . . ", -" . . . . . .. ", -" .XXXXXXXXXXX.. ", -" .X X . ", -". X XXX XXX X. .", -"..X X X X X ..", -". X XXX XX X. .", -"..X X X X ..", -". X X X X. .", -"..X X XX X ..", -". X X.. ", -" .XXXXXXXXXXX . ", -" .. . . . ... ", -" . . . .. ", -" ...... "}; diff --git a/app/bin/bitmaps/dflcrcl2.xpm b/app/bin/bitmaps/dflcrcl2.xpm deleted file mode 100644 index c02d1ea..0000000 --- a/app/bin/bitmaps/dflcrcl2.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dflcrcl2_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #0000FFFFFFFF", -"o c #FFFF00000000", -" ...... ", -" .XXXXXX. ", -" ..XXXXXXXX.. ", -" .XXXXXXXXXXXX. ", -" .XXXXXXXXXXXX. ", -".XXXXXXXXXXXXXX.", -".XXXXXXXXXXXXXX.", -".XXXXXXoooooXXX.", -".XXXXXXooXXXXXX.", -".XXXXXXoXoXXXXX.", -".XXXXXXoXXoXXXX.", -" .XXXXXoXXXoXX. ", -" .XXXXXXXXXXoX. ", -" ..XXXXXXXXXo ", -" .XXXXXX.. ", -" ...... "}; diff --git a/app/bin/bitmaps/dflcrcl3.xpm b/app/bin/bitmaps/dflcrcl3.xpm deleted file mode 100644 index e1bd80a..0000000 --- a/app/bin/bitmaps/dflcrcl3.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dflcrcl3_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #0000FFFFFFFF", -"o c #FFFF00000000", -" ...... ", -" .XXXXXX. ", -" ..XXXXXXXX.. ", -" .XXXXXXXXXXXX. ", -" .XXXXXXXXXXXX. ", -".XXXXXXXXXXXXXX.", -".XXXXXXXXXXXXXX.", -".XXXXXXooXXXXXX.", -".XXXXXXooXXXoXX.", -".XXXXXXXXoXXoXX.", -".XXXXXXXXXoXoXX.", -" .XXXXXXXXXooX. ", -" .XXXXXXoooooX. ", -" ..XXXXXXXX.. ", -" .XXXXXX. ", -" ...... "}; diff --git a/app/bin/bitmaps/dimension.xpm b/app/bin/bitmaps/dimension.xpm new file mode 100644 index 0000000..faceac6 --- /dev/null +++ b/app/bin/bitmaps/dimension.xpm @@ -0,0 +1,94 @@ +static char *dimension_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #999999",
+ " 1111",
+ " 111",
+ " 1111",
+ " 111 1",
+ " 11 ",
+ " 002 200 ",
+ " 0 0 ",
+ " 02 002 ",
+ " 0 0 0 ",
+ " 002 202 ",
+ " ",
+ " 11 ",
+ "1 111 ",
+ "1111 ",
+ "111 ",
+ "1111 "};
+
+static char *dimension_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " 222222 ",
+ " 22222 ",
+ " 22222",
+ " 222222",
+ " 222 22",
+ " 222 2 ",
+ " 22 ",
+ " 2 ",
+ " 000 0000 ",
+ " 0 00 0 0 ",
+ " 00 0000 ",
+ " 0000 00 ",
+ " 0 0 0 0 ",
+ " 0000 0000 ",
+ " 0 0 ",
+ " 22 ",
+ " 22 222 ",
+ " 22 222 ",
+ " 22222 ",
+ " 2222 ",
+ " 222222 ",
+ " 222222 ",
+ " "};
+
+static char *dimension_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 1111111 ",
+ " 11111111 ",
+ " 1111111 ",
+ " 11111 ",
+ " 111111 ",
+ " 1111 11 ",
+ " 1111 11 ",
+ " 1111 11 ",
+ " 1111 ",
+ " 111 ",
+ " ",
+ " 00000 00000 ",
+ " 00 00 00 00 ",
+ " 00 00 ",
+ " 000 000000 ",
+ " 000 00 00 ",
+ " 0000 00 ",
+ " 00 00 0 00 ",
+ " 00000 00000 ",
+ " 0 00 ",
+ " 11 ",
+ " 1 111 ",
+ " 111 1111 ",
+ " 111 1111 ",
+ " 111 1111 ",
+ " 1111111 ",
+ " 111111 ",
+ " 11111111 ",
+ " 11111111 ",
+ " 11111111 ",
+ " "};
+
+static char **dimension_xpm[3] = { dimension_x16, dimension_x24, dimension_x32 };
+
diff --git a/app/bin/bitmaps/dline.xpm b/app/bin/bitmaps/dline.xpm deleted file mode 100644 index 2105dad..0000000 --- a/app/bin/bitmaps/dline.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dline_xpm[] = { -"16 16 3 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -" .....", -" ..", -" . .", -" . .", -" . .", -" . ", -" X. ", -" XXX ", -" XXX ", -" XXX ", -" XXX ", -" XXX ", -" XXX ", -" XXX ", -"XXX ", -"XX "}; diff --git a/app/bin/bitmaps/doc-export-bmap.xpm b/app/bin/bitmaps/doc-export-bmap.xpm new file mode 100644 index 0000000..543cc1a --- /dev/null +++ b/app/bin/bitmaps/doc-export-bmap.xpm @@ -0,0 +1,162 @@ +static char *doc_export_bmap_x16[] = {
+ "16 16 23 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #336666",
+ "4 c #336699",
+ "5 c #3399CC",
+ "6 c #663333",
+ "7 c #666633",
+ "8 c #666666",
+ "9 c #669933",
+ "A c #6699CC",
+ "B c #996633",
+ "C c #996666",
+ "D c #999966",
+ "E c #999999",
+ "F c #CC0000",
+ "G c #CC9966",
+ "H c #CC9999",
+ "I c #CCCC99",
+ "J c #CCCCCC",
+ "K c #FFCCCC",
+ "L c #808080",
+ "2888888888872 ",
+ "8KH2788881JI2 ",
+ "8DIJKEJKKKHI2 ",
+ "8E99I8KKKKK82 ",
+ "8I99DHKKKKK22 ",
+ "8CII7JKKKKKHF ",
+ "8J2K7JKKKKKKFF ",
+ "8KKD2KKKIHHGFFFF",
+ "4LKK0KKKHHHGFFFF",
+ "4AAK2KKKKKKKFF ",
+ "4AAH2KIHHHK8F ",
+ "4AA32KCBBBI02 ",
+ "4AA4LKCBBBI62 ",
+ "4AAAKDIHHHKH2 ",
+ "4AAAKK88C2EI2 ",
+ "45558EEEEEED2 "};
+
+static char *doc_export_bmap_x24[] = {
+ "24 24 30 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #330000",
+ "4 c #333300",
+ "5 c #333333",
+ "6 c #336699",
+ "7 c #339933",
+ "8 c #3399CC",
+ "9 c #663333",
+ "A c #666633",
+ "B c #666666",
+ "C c #666699",
+ "D c #669933",
+ "E c #6699CC",
+ "F c #996633",
+ "G c #996666",
+ "H c #999966",
+ "I c #999999",
+ "J c #CC0000",
+ "K c #CC3333",
+ "L c #CC6666",
+ "M c #CC9966",
+ "N c #CC9999",
+ "O c #CCCC99",
+ "P c #CCCCCC",
+ "Q c #FFCC99",
+ "R c #FFCCCC",
+ "S c #808080",
+ "3000000000000000005 ",
+ "5RRRROOOOOOOOPRRRP5 ",
+ "5RRN5SSNNNNNNB5IRP5 ",
+ "5RGNRRRRORRRRRROBP5 ",
+ "5OSOHOROBRRRRRRRGO5 ",
+ "5BR77DOBORRRRRRROI5 ",
+ "5AOD7DOBRRRRRRRROS5 ",
+ "5BRODHINRRRRRRRRP5 ",
+ "5OHRRRHNRRRRRRRRRP J ",
+ "5RI9PRHNRRRRRRRRRRJJJ ",
+ "5RRRAIGORRRRRRRRRR JJJJ ",
+ "5RRRRHBORRRRQLLLLKJJJJJJ",
+ "5SORRR0ORRRRQLLLLKJJJJJJ",
+ "5EEBRR4ORRRRRRRRRR JJJJ ",
+ "5EEECRBPRRRRRRRRRRJJJ ",
+ "5EEE8RBPRRRRRRRRPG J ",
+ "5EEEENGPRO9999FRR5 ",
+ "5EEEEHGPRNFMMMFPRB5 ",
+ "5EEEESONRNFMMMFPOH5 ",
+ "5EEEECR9RO9999FRIN5 ",
+ "5EEEE6RIBRRRRRRR4P5 ",
+ "5EEEE8RRO3BNNNB0PP5 ",
+ "5EEEEEIRRRROOOPRRP5 ",
+ "2111110BBBBBBBBBBB5 "};
+
+static char *doc_export_bmap_x32[] = {
+ "32 32 26 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #336666",
+ "4 c #336699",
+ "5 c #339933",
+ "6 c #339999",
+ "7 c #3399CC",
+ "8 c #663333",
+ "9 c #666633",
+ "A c #666666",
+ "B c #669933",
+ "C c #669966",
+ "D c #6699CC",
+ "E c #996633",
+ "F c #996666",
+ "G c #999966",
+ "H c #999999",
+ "I c #CC0000",
+ "J c #CC9966",
+ "K c #CC9999",
+ "L c #CCCC99",
+ "M c #CCCCCC",
+ "N c #FFCCCC",
+ "O c #808080",
+ "2000000000000000000000002 ",
+ "0NNNNNNNNNNNNNNNNNNNNNNN0 ",
+ "0NNNNMHFFFFFFFFFFOHLNNNN0 ",
+ "0NNNH2GKKKLLLLLLLKH9ALNN0 ",
+ "0NNFAMNNNNNMNNNNNNNNK2LN0 ",
+ "0NHANNLNNNLANNNNNNNNNHAN0 ",
+ "0N2LG5BLNNALNNNNNNNNNN2M0 ",
+ "0KANB55BMKHNNNNNNNNNNNAL0 ",
+ "0KOLB55BN9MNNNNNNNNNNNFK0 ",
+ "0LANLBBCL9NNNNNNNNNNNNFA2 ",
+ "0M2MNLMNKGNNNNNNNNNNNNKA ",
+ "0NAHNNNNKGNNNNNNNNNNNNNN II ",
+ "0NLAALNNKGNNNNNNNNNNNNN IIII ",
+ "0NNNK2HNHHNNNNNNNNNNNNN IIII ",
+ "0NNNNMFAHHNNNNNNNNNNNNN IIIII ",
+ "0NNNNNNGAHNNNNNNNIIIIIIIIIIIIIII",
+ "13LNNNNN2GNNNNNNNIIIIIIIIIIIIIII",
+ "1DD3KNNNAFNNNNNNNNNNNNN IIIII ",
+ "1DDDDHNNGHNNNNNNNNNNNNN IIII ",
+ "1DDDDDKNHHNNNNNNNNNNNNN IIII ",
+ "1DDDDDANHHNNNNNNNNNNNNM II ",
+ "1DDDDD4MHHNNNKKKKKKKNNH2 ",
+ "1DDDDD7LHHNNMEEEEEE8NNGF2 ",
+ "1DDDDDDLHGNNMEJJJJJ8NNGK0 ",
+ "1DDDDDDKL8NNMEJJJJJ8NNFK0 ",
+ "1DDDDDDHN2LNMEEEEEE8NNAL0 ",
+ "1DDDDDDANHANNKKKKKKLNL2M0 ",
+ "1DDDDDD3NNAFMNNNNNNNMAHN0 ",
+ "1DDDDDD6LNNH2FKLLLLH2ONN0 ",
+ "1DDDDDDDKNNNMKFAAAAGLNNN0 ",
+ "1DDDDDDD3NNNNNNNNNNNNNNN0 ",
+ "122222222AAAAAAAAAAAAAAA0 "};
+
+static char **doc_export_bmap_xpm[3] = { doc_export_bmap_x16, doc_export_bmap_x24, doc_export_bmap_x32 };
+
diff --git a/app/bin/bitmaps/doc-export-dxf.xpm b/app/bin/bitmaps/doc-export-dxf.xpm new file mode 100644 index 0000000..7ac2c54 --- /dev/null +++ b/app/bin/bitmaps/doc-export-dxf.xpm @@ -0,0 +1,100 @@ +static char *doc_export_dxf_x16[] = {
+ "16 16 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #996666",
+ "4 c #CC0000",
+ "5 c #CC3333",
+ "1111111111111 ",
+ "11 11 11 11 1 ",
+ "1 1 1 1 1 ",
+ "1111111111111 ",
+ "11 11 11 11 1 ",
+ "1 1 1 1 2 ",
+ "11111111111144 ",
+ "11 11 112325 44 ",
+ "1 1 1 44444444",
+ "11111111111144 ",
+ "1 1 1 1 4 ",
+ "1 1 1 1 1 ",
+ "1111111111111 ",
+ "1 1 1 1 1 ",
+ "1 1 1 1 1 ",
+ "1111111111111 "};
+
+static char *doc_export_dxf_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996666",
+ "3 c #CC0000",
+ "11111111111111111111 ",
+ "11111111111111111111 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 11 ",
+ "11111111111111111111 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 1 ",
+ "11 1 11 1 33 ",
+ "111111111111111112333 ",
+ "11111111111111111 333 ",
+ "11 1 11 33333333333 ",
+ "11 1 11 33333333333 ",
+ "11 1 11 1 333 ",
+ "111111111111111112333 ",
+ "11 1 11 1 33 ",
+ "11 1 11 1 1 ",
+ "11 1 11 1 11 ",
+ "11111111111111111111 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 11 ",
+ "11 1 11 1 11 ",
+ "11111111111111111111 "};
+
+static char *doc_export_dxf_x32[] = {
+ "32 32 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #CC0000",
+ " 1 11 11 11 11 ",
+ "11111111111111111111111111 ",
+ " 1 1 1 11 11 ",
+ " 1 1 1 11 11 ",
+ " 1 1 1 11 11 ",
+ " 1 1 1 11 11 ",
+ " 1 11 11 11 11 ",
+ "11111111111111111111111111 ",
+ " 1 1 1 11 11 ",
+ " 1 1 1 11 11 ",
+ " 1 1 1 11 ",
+ " 1 1 1 11 33 ",
+ " 1 11 11 11 333 ",
+ "11111111111111111111111 33333 ",
+ " 1 1 1 1 3333 ",
+ " 1 1 1 333333333333333 ",
+ " 1 1 1 333333333333333 ",
+ " 1 1 1 32 33333 ",
+ " 1 11 11 11 3333 ",
+ "1111111111111111111111123333 ",
+ " 1 1 1 1 33 ",
+ " 1 1 1 1 ",
+ " 1 1 1 1 11 ",
+ " 1 1 1 1 11 ",
+ "11111111111111111111111111 ",
+ "11111111111111111111111111 ",
+ " 1 1 1 1 11 ",
+ " 1 1 1 1 11 ",
+ " 1 1 1 1 11 ",
+ " 1 1 1 1 11 ",
+ " 1111111111111111111111111 ",
+ " 1111111111111111111111111 "};
+
+static char **doc_export_dxf_xpm[3] = { doc_export_dxf_x16, doc_export_dxf_x24, doc_export_dxf_x32 };
+
diff --git a/app/bin/bitmaps/doc-export-svg.xpm b/app/bin/bitmaps/doc-export-svg.xpm new file mode 100644 index 0000000..72c85d3 --- /dev/null +++ b/app/bin/bitmaps/doc-export-svg.xpm @@ -0,0 +1,114 @@ +static char *doc_export_svg_x16[] = {
+ "16 16 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003366",
+ "3 c #003399",
+ "4 c #006600",
+ "5 c #0066CC",
+ "6 c #0066FF",
+ "7 c #CC0000",
+ "8 c #008000",
+ " 888 ",
+ " 888888400000 ",
+ " 8 011 ",
+ "88 00 88 ",
+ "88 00 88 ",
+ "8800 88 7 ",
+ " 41 8 77 ",
+ " 048888 77777777",
+ " 0 77777777",
+ " 00 6 77 ",
+ " 00 666 7 ",
+ " 036 6 ",
+ " 300 6 ",
+ " 6 00230000 ",
+ " 66 32000 ",
+ " 666666666 "};
+
+static char *doc_export_svg_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003366",
+ "3 c #003399",
+ "4 c #006600",
+ "5 c #0066CC",
+ "6 c #0066FF",
+ "7 c #CC0000",
+ "8 c #008000",
+ " 888 ",
+ " 88888888 ",
+ " 888 88840000000 ",
+ " 888 0111 ",
+ " 88 000 88 ",
+ "88 00 88 ",
+ "88 00 88 ",
+ "88 0 88 ",
+ " 8800 88 7 ",
+ " 880 88 777 ",
+ " 448 888 7777 ",
+ " 048888888 77777777777",
+ " 0 8888 77777777777",
+ " 0 7777 ",
+ " 0 66 7777 ",
+ " 00 66 7 ",
+ " 0 6 6 ",
+ " 056 66 ",
+ " 520 6 ",
+ " 6 000026 ",
+ " 6 00002000000 ",
+ " 66 5300000 ",
+ " 6666666666666 ",
+ " 6666666666666 "};
+
+static char *doc_export_svg_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003300",
+ "3 c #003366",
+ "4 c #003399",
+ "5 c #006600",
+ "6 c #0066CC",
+ "7 c #0066FF",
+ "8 c #CC0000",
+ "9 c #008000",
+ " 99 ",
+ " 99999999 ",
+ " 999999999999 00000000 ",
+ " 9999 9950000000000 ",
+ " 999 0000000 ",
+ " 999 0000299 ",
+ " 99 00000 99 ",
+ "999 0000 99 ",
+ "999 0000 99 ",
+ "999 000 99 ",
+ " 99 000 99 ",
+ " 995000 999 88 ",
+ " 99200 999 8888 ",
+ " 9005 9999 88888 ",
+ " 029999999999 88888 ",
+ " 002999999999 888888888888888",
+ " 000 99999 888888888888888",
+ " 000 88888 ",
+ " 000 7 88888 ",
+ " 000 777 88888 ",
+ " 00 77777 88 ",
+ " 000 777777 ",
+ " 000677 777 ",
+ " 0036 777 ",
+ " 63000 777 ",
+ " 76300000677 ",
+ " 777 00000146 ",
+ " 777 00000000000000 ",
+ " 777 3431000000 ",
+ " 777 777 ",
+ " 7777777777777777777 ",
+ "777777777777777777777 "};
+
+static char **doc_export_svg_xpm[3] = { doc_export_svg_x16, doc_export_svg_x24, doc_export_svg_x32 };
+
diff --git a/app/bin/bitmaps/doc-export-xtc.xpm b/app/bin/bitmaps/doc-export-xtc.xpm new file mode 100644 index 0000000..6afb7c7 --- /dev/null +++ b/app/bin/bitmaps/doc-export-xtc.xpm @@ -0,0 +1,108 @@ +static char *doc_export_xtc_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996666",
+ "3 c #CC0000",
+ "4 c #CC3333",
+ "5 c #CC9999",
+ "6 c #FFCCCC",
+ "7 c #FFFFFF",
+ "111111111111 ",
+ "177777777771 ",
+ "177777777771 ",
+ "177777777771 ",
+ "177777777771 ",
+ "1777777777713 ",
+ "17777777777133 ",
+ "1777777755543333",
+ "177777776662 33 ",
+ "17777777777133 ",
+ "1777777777713 ",
+ "177777777771 ",
+ "177777777771 ",
+ "177777777771 ",
+ "177777777771 ",
+ "111111111111 "};
+
+static char *doc_export_xtc_x24[] = {
+ "24 24 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #CC0000",
+ "4 c #FFCCCC",
+ "5 c #FFFFFF",
+ " 1111111111111111 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 33 ",
+ "15555555555555551 3333 ",
+ "15555555555555551 3333 ",
+ "155555555555433333333333",
+ "15555555555544442333333 ",
+ "15555555555555551 333 ",
+ "15555555555555551 333 ",
+ "15555555555555551 3 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ "15555555555555551 ",
+ " 1111111111111111 "};
+
+static char *doc_export_xtc_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #CC0000",
+ "4 c #CC3333",
+ "5 c #CC9999",
+ "6 c #FFCCCC",
+ "7 c #FFFFFF",
+ " ",
+ " 1111111111111111111111 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 333 ",
+ " 1777777777777777777771 3333 ",
+ " 1777777777777777777771 33333 ",
+ " 177777777777777766666233333333 ",
+ " 1777777777777776333333333333333",
+ " 177777777777777655555433333333 ",
+ " 1777777777777777777771 3333 ",
+ " 1777777777777777777771 33333 ",
+ " 1777777777777777777771 333 ",
+ " 1777777777777777777771 3 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1777777777777777777771 ",
+ " 1111111111111111111111 ",
+ " "};
+
+static char **doc_export_xtc_xpm[3] = { doc_export_xtc_x16, doc_export_xtc_x24, doc_export_xtc_x32 };
+
diff --git a/app/bin/bitmaps/doc-export.xpm b/app/bin/bitmaps/doc-export.xpm new file mode 100644 index 0000000..e594e38 --- /dev/null +++ b/app/bin/bitmaps/doc-export.xpm @@ -0,0 +1,119 @@ +static char *doc_export_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #999999",
+ "4 c #CC0000",
+ "5 c #CC6666",
+ "6 c #CC9999",
+ "7 c #CCCCCC",
+ "8 c #FFCCCC",
+ "9 c #FFFFFF",
+ "A c #C0C0C0",
+ "111111111111 ",
+ "199999999991 ",
+ "199999999991 ",
+ "193333333391 ",
+ "193777777391 ",
+ "1937777773914 ",
+ "19377777739144 ",
+ "1937777765824444",
+ "19377777A582444 ",
+ "19377777739144 ",
+ "1937777773914 ",
+ "193333333391 ",
+ "199999999991 ",
+ "199999999991 ",
+ "199999999991 ",
+ "111111111111 "};
+
+static char *doc_export_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #999999",
+ "4 c #CC0000",
+ "5 c #CC6666",
+ "6 c #CC9999",
+ "7 c #CCCCCC",
+ "8 c #FFCCCC",
+ "9 c #FFFFFF",
+ "A c #C0C0C0",
+ " 1111111111111111 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199333333333333991 ",
+ "199377777777773991 ",
+ "199377777777773991 ",
+ "19937777777777399144 ",
+ "199377777777773991444 ",
+ "199377777777773991 4444 ",
+ "199377777777A44444444444",
+ "19937777777776588244444 ",
+ "199377777777773991 444 ",
+ "199377777777773991444 ",
+ "199377777777773991 4 ",
+ "199377777777773991 ",
+ "199333333333333991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ "199999999999999991 ",
+ " 1111111111111111 "};
+
+static char *doc_export_x32[] = {
+ "32 32 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #993333",
+ "3 c #999999",
+ "4 c #CC0000",
+ "5 c #CC3333",
+ "6 c #CC6666",
+ "7 c #CC9999",
+ "8 c #CCCCCC",
+ "9 c #FFCCCC",
+ "A c #FFFFFF",
+ " ",
+ " 1111111111111111111111 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAA33333333333333AAA1 ",
+ " 1AA3888888888888883AA1 ",
+ " 1AA3888888888888883AA1 ",
+ " 1AA3888888888888883AA1 ",
+ " 1AA3888888888888883AA1 444 ",
+ " 1AA3888888888888883AA1 4444 ",
+ " 1AA3888888888888883AA1 44444 ",
+ " 1AA388888888888877699244444444 ",
+ " 1AA3888888888888444444444444444",
+ " 1AA388888888888866677544444444 ",
+ " 1AA3888888888888883AA1 4444 ",
+ " 1AA3888888888888883AA1 44444 ",
+ " 1AA3888888888888883AA1 444 ",
+ " 1AA3888888888888883AA1 4 ",
+ " 1AA3888888888888883AA1 ",
+ " 1AA3888888888888883AA1 ",
+ " 1AA3333333333333333AA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1AAAAAAAAAAAAAAAAAAAA1 ",
+ " 1111111111111111111111 ",
+ " "};
+
+static char **doc_export_xpm[3] = { doc_export_x16, doc_export_x24, doc_export_x32 };
+
diff --git a/app/bin/bitmaps/doc-import-xtc.xpm b/app/bin/bitmaps/doc-import-xtc.xpm new file mode 100644 index 0000000..4b00631 --- /dev/null +++ b/app/bin/bitmaps/doc-import-xtc.xpm @@ -0,0 +1,123 @@ +static char *doc_import_xtc_x16[] = {
+ "16 16 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #336666",
+ "3 c #339966",
+ "4 c #666666",
+ "5 c #669966",
+ "6 c #999999",
+ "7 c #99CC99",
+ "8 c #99CCCC",
+ "9 c #CCCCCC",
+ "A c #FFFFFF",
+ "B c #C0C0C0",
+ " 4444444444444",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 49AAAAAAAAAA4",
+ " 486AAAAAAAAA4",
+ "1112B739AAAAAAA4",
+ "1112B759AAAAAAA4",
+ " 496AAAAAAAAA4",
+ " 4BAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4444444444444"};
+
+static char *doc_import_xtc_x24[] = {
+ "24 24 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #336633",
+ "3 c #339966",
+ "4 c #666666",
+ "5 c #669966",
+ "6 c #669999",
+ "7 c #999999",
+ "8 c #99CC99",
+ "9 c #CCCCCC",
+ "A c #FFFFFF",
+ "B c #C0C0C0",
+ " 444444444444444444",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 498AAAAAAAAAAAAAAA4",
+ " 4516AAAAAAAAAAAAAA4",
+ " 4A8139AAAAAAAAAAAA4",
+ "111111111119AAAAAAAAAAA4",
+ "111112775119AAAAAAAAAAA4",
+ " 4A7159AAAAAAAAAAAA4",
+ " 4517AAAAAAAAAAAAAA4",
+ " 49BAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4AAAAAAAAAAAAAAAAA4",
+ " 4444444444444444444"};
+
+static char *doc_import_xtc_x32[] = {
+ "32 32 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006633",
+ "2 c #009933",
+ "3 c #339933",
+ "4 c #339966",
+ "5 c #666666",
+ "6 c #669966",
+ "7 c #669999",
+ "8 c #99CC99",
+ "9 c #CCCCCC",
+ "A c #CCFFCC",
+ "B c #CCFFFF",
+ "C c #FFFFFF",
+ " 55555555555555555555555 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5939CCCCCCCCCCCCCCCCCCCC5",
+ " 56228CCCCCCCCCCCCCCCCCCC5",
+ " 5C6226CCCCCCCCCCCCCCCCCC5",
+ " 59982239CCCCCCCCCCCCCCCC5",
+ " 22222222222222BCCCCCCCCCCCCCCC5",
+ " 22222222222223CCCCCCCCCCCCCCCC5",
+ " 5CC7226ACCCCCCCCCCCCCCCC5",
+ " 594228CCCCCCCCCCCCCCCCCC5",
+ " 56239CCCCCCCCCCCCCCCCCCC5",
+ " 596ACCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 55555555555555555555555 "};
+
+static char **doc_import_xtc_xpm[3] = { doc_import_xtc_x16, doc_import_xtc_x24, doc_import_xtc_x32 };
+
diff --git a/app/bin/bitmaps/doc-import.xpm b/app/bin/bitmaps/doc-import.xpm new file mode 100644 index 0000000..0b10537 --- /dev/null +++ b/app/bin/bitmaps/doc-import.xpm @@ -0,0 +1,123 @@ +static char *doc_import_x16[] = {
+ "16 16 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #336666",
+ "3 c #339966",
+ "4 c #666666",
+ "5 c #669966",
+ "6 c #999999",
+ "7 c #99CC99",
+ "8 c #99CCCC",
+ "9 c #CCCCCC",
+ "A c #FFFFFF",
+ "B c #C0C0C0",
+ " 4444444444444",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4A666666666A4",
+ " 49699999996A4",
+ " 48599999996A4",
+ "1112B537999996A4",
+ "1112B537999996A4",
+ " 49399999996A4",
+ " 4B699999996A4",
+ " 4A699999996A4",
+ " 4AA66666666A4",
+ " 4AAAAAAAAAAA4",
+ " 4AAAAAAAAAAA4",
+ " 4444444444444"};
+
+static char *doc_import_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #336633",
+ "3 c #339966",
+ "4 c #666666",
+ "5 c #669966",
+ "6 c #999999",
+ "7 c #99CC99",
+ "8 c #CCCCCC",
+ "9 c #FFFFFF",
+ "A c #C0C0C0",
+ " 444444444444444444",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4996666666666666994",
+ " 4996888888888886994",
+ " 4876888888888886994",
+ " 4613888888888886994",
+ " 49713A8888888886994",
+ "11111111111A888888886994",
+ "11111266311A888888886994",
+ " 49613A8888888886994",
+ " 4515888888888886994",
+ " 48A6888888888886994",
+ " 4996888888888886994",
+ " 4996888888888886994",
+ " 4999666666666666994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4999999999999999994",
+ " 4444444444444444444"};
+
+static char *doc_import_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006633",
+ "2 c #009933",
+ "3 c #339933",
+ "4 c #339966",
+ "5 c #666666",
+ "6 c #669966",
+ "7 c #669999",
+ "8 c #999999",
+ "9 c #99CC99",
+ "A c #CCCCCC",
+ "B c #CCFFCC",
+ "C c #FFFFFF",
+ "D c #C0C0C0",
+ " 55555555555555555555555 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCC88888888888888888CCC5",
+ " 5CCC8AAAAAAAAAAAAAAA8CCC5",
+ " 5CCC8AAAAAAAAAAAAAAA8CCC5",
+ " 5B4A8AAAAAAAAAAAAAAA8CCC5",
+ " 56226AAAAAAAAAAAAAAA8CCC5",
+ " 5C7226DAAAAAAAAAAAAA8CCC5",
+ " 5AA92239AAAAAAAAAAAA8CCC5",
+ " 22222222222222DAAAAAAAAAAA8CCC5",
+ " 22222222222222DAAAAAAAAAAA8CCC5",
+ " 5CC7224DAAAAAAAAAAAA8CCC5",
+ " 5A4226AAAAAAAAAAAAAA8CCC5",
+ " 56226AAAAAAAAAAAAAAA8CCC5",
+ " 5A6B8AAAAAAAAAAAAAAA8CCC5",
+ " 5CCC8AAAAAAAAAAAAAAA8CCC5",
+ " 5CCC8AAAAAAAAAAAAAAA8CCC5",
+ " 5CCC8AAAAAAAAAAAAAAA8CCC5",
+ " 5CCC88888888888888888CCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 5CCCCCCCCCCCCCCCCCCCCCCC5",
+ " 55555555555555555555555 "};
+
+static char **doc_import_xpm[3] = { doc_import_x16, doc_import_x24, doc_import_x32 };
+
diff --git a/app/bin/bitmaps/doc-new.xpm b/app/bin/bitmaps/doc-new.xpm new file mode 100644 index 0000000..cd4dbc1 --- /dev/null +++ b/app/bin/bitmaps/doc-new.xpm @@ -0,0 +1,127 @@ +static char *doc_new_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #00CC33",
+ "3 c #00CC66",
+ "4 c #00FF66",
+ "5 c #33CC66",
+ "6 c #666666",
+ "7 c #669966",
+ "8 c #66CC99",
+ "9 c #99CC99",
+ "A c #CCCCCC",
+ "B c #CCFFCC",
+ "C c #FFFFFF",
+ "D c #C0C0C0",
+ " 666666666666 ",
+ " 6CCA9CCCCCC6 ",
+ " 6CC52ACCCCC6 ",
+ " 6D71278CCCC6 ",
+ " 6544444BCCC6 ",
+ " 6AD139DCCCC6 ",
+ " 6CC12ACCCCC6 ",
+ " 6CCA9CCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 6CCCCCCCCCC6 ",
+ " 666666666666 "};
+
+static char *doc_new_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #00CC33",
+ "3 c #00CC66",
+ "4 c #00FF66",
+ "5 c #33CC66",
+ "6 c #666666",
+ "7 c #66CC66",
+ "8 c #66CC99",
+ "9 c #99CC99",
+ "A c #CCCCCC",
+ "B c #CCFFCC",
+ "C c #FFFFFF",
+ " 666666666666666666 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCC87ACCCCCCCCC6 ",
+ " 6CCCC347CCCCCCCCC6 ",
+ " 6CCCC547CCCCCCCCC6 ",
+ " 6C87734211ACCCCCC6 ",
+ " 6C344444449CCCCCC6 ",
+ " 6C522342229CCCCCC6 ",
+ " 6CCCB547CCCCCCCCC6 ",
+ " 6CCCB547CCCCCCCCC6 ",
+ " 6CCCC779CCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 6CCCCCCCCCCCCCCCC6 ",
+ " 666666666666666666 "};
+
+static char *doc_new_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #00CC33",
+ "3 c #00FF66",
+ "4 c #339933",
+ "5 c #666666",
+ "6 c #669966",
+ "7 c #66CC99",
+ "8 c #99CC99",
+ "9 c #CCCCCC",
+ "A c #CCFFCC",
+ "B c #CCFFFF",
+ "C c #FFFFFF",
+ "D c #C0C0C0",
+ " 555555555555555555555555 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCC8111DCCCCCCCCCCCC5 ",
+ " 5CCCCC8232DCCCCCCCCCCCC5 ",
+ " 5CCCCC8232DCCCCCCCCCCCC5 ",
+ " 5CCAAA82328AAACCCCCCCCC5 ",
+ " 5C822223322221ACCCCCCCC5 ",
+ " 5C823333333332ACCCCCCCC5 ",
+ " 5C823333333332ACCCCCCCC5 ",
+ " 5C988842326888BCCCCCCCC5 ",
+ " 5CCCCC62329CCCCCCCCCCCC5 ",
+ " 5CCCCC72329CCCCCCCCCCCC5 ",
+ " 5CCCCC82229CCCCCCCCCCCC5 ",
+ " 5CCCCC9DDDBCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 5CCCCCCCCCCCCCCCCCCCCCC5 ",
+ " 555555555555555555555555 "};
+
+static char **doc_new_xpm[3] = { doc_new_x16, doc_new_x24, doc_new_x32 };
+
diff --git a/app/bin/bitmaps/doc-open.xpm b/app/bin/bitmaps/doc-open.xpm new file mode 100644 index 0000000..992c9bf --- /dev/null +++ b/app/bin/bitmaps/doc-open.xpm @@ -0,0 +1,136 @@ +static char *doc_open_x16[] = {
+ "16 16 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #663300",
+ "2 c #666600",
+ "3 c #666633",
+ "4 c #996633",
+ "5 c #996666",
+ "6 c #999966",
+ "7 c #999999",
+ "8 c #CC9966",
+ "9 c #CCCC66",
+ "A c #CCCC99",
+ "B c #CCCCCC",
+ "C c #FFCC99",
+ "D c #FFFFFF",
+ "E c #C0C0C0",
+ "F c #808080",
+ " ",
+ " ",
+ "2466666677F ",
+ "3C7BBBBBBBE7431 ",
+ "3C7DDDDDDDDBA61 ",
+ "3C7DDDDDDDDD761 ",
+ "3C51111111111113",
+ "3A3CCCCCCCCCCCC3",
+ "386CCCCCCCCCCC93",
+ "369CCCCCCCCCCC81",
+ "33CCCCCCCCCCCC4 ",
+ "24CCCCCCCCCCCC2 ",
+ "28CCCCCCCCCCCC3 ",
+ "368888888888862 ",
+ "222222222222221 ",
+ " "};
+
+static char *doc_open_x24[] = {
+ "24 24 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #663300",
+ "2 c #666600",
+ "3 c #666633",
+ "4 c #666666",
+ "5 c #996633",
+ "6 c #996666",
+ "7 c #999933",
+ "8 c #999966",
+ "9 c #999999",
+ "A c #CC9966",
+ "B c #CC9999",
+ "C c #CCCC66",
+ "D c #CCCC99",
+ "E c #FFCC99",
+ "F c #FFFFFF",
+ "G c #C0C0C0",
+ " ",
+ " ",
+ " ",
+ "355888888869 ",
+ "3CE9GGGGGGGGGGG941111 ",
+ "3CE9FFFFFFFFFFFFBBAA51 ",
+ "3CE9FFFFFFFFFFFFFGDE81 ",
+ "3CE9FFFFFFFFFFFFFFGE81 ",
+ "3CE9FFFFFFFFFFFFFFGE81 ",
+ "3CE988888888888888675333",
+ "3CE5CDDDDDDDDDDDDDDDDDA3",
+ "3CE3EEEEEEEEEEEEEEEEEEA1",
+ "3CC8EEEEEEEEEEEEEEEEEE5 ",
+ "3CACEEEEEEEEEEEEEEEEEE2 ",
+ "3C5EEEEEEEEEEEEEEEEEEE3 ",
+ "3A5EEEEEEEEEEEEEEEEEEA3 ",
+ "3A8EEEEEEEEEEEEEEEEEE71 ",
+ "37CEEEEEEEEEEEEEEEEEE3 ",
+ "33EEEEEEEEEEEEEEEEEEE3 ",
+ "35EEEEEEEEEEEEEEEEEEC3 ",
+ "25AAAAAAAAAAAAAAAAAA71 ",
+ "222222222222222222222 ",
+ " ",
+ " "};
+
+static char *doc_open_x32[] = {
+ "32 32 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #663300",
+ "2 c #666600",
+ "3 c #666633",
+ "4 c #996633",
+ "5 c #996666",
+ "6 c #999933",
+ "7 c #999966",
+ "8 c #999999",
+ "9 c #CC9966",
+ "A c #CC9999",
+ "B c #CCCC66",
+ "C c #CCCC99",
+ "D c #CCCCCC",
+ "E c #FFCC99",
+ "F c #FFFFFF",
+ "G c #C0C0C0",
+ " ",
+ " ",
+ " ",
+ " ",
+ "134444444444433 ",
+ "17EECGGGGGGGGG8888888 ",
+ "17EEGDFFFFFFFFFFFFFFD8311112 ",
+ "17EEGFFFFFFFFFFFFFFFFFAEEEE4 ",
+ "17EEGFFFFFFFFFFFFFFFFFFAEEE4 ",
+ "17EEGFFFFFFFFFFFFFFFFFFFGEE4 ",
+ "17EEGFFFFFFFFFFFFFFFFFFFDCE4 ",
+ "17EEGFFFFFFFFFFFFFFFFFFFDCE4 ",
+ "17EEGGGGGGGGGGGGGGGGGGGG8793111 ",
+ "17EE7799999999999999999999999941",
+ "17EE5CEEEEEEEEEEEEEEEEEEEEEEEE4 ",
+ "17EE3EEEEEEEEEEEEEEEEEEEEEEEEE2 ",
+ "17EC6EEEEEEEEEEEEEEEEEEEEEEEEE3 ",
+ "17E99EEEEEEEEEEEEEEEEEEEEEEEEB3 ",
+ "17E4EEEEEEEEEEEEEEEEEEEEEEEEE71 ",
+ "17E3EEEEEEEEEEEEEEEEEEEEEEEEE4 ",
+ "17B7EEEEEEEEEEEEEEEEEEEEEEEEE2 ",
+ "1799EEEEEEEEEEEEEEEEEEEEEEEEB3 ",
+ "174EEEEEEEEEEEEEEEEEEEEEEEEE92 ",
+ "174EEEEEEEEEEEEEEEEEEEEEEEEE61 ",
+ "147EEEEEEEEEEEEEEEEEEEEEEEEE2 ",
+ "14BEEEEEEEEEEEEEEEEEEEEEEEEE3 ",
+ "13EEEEEEEEEEEEEEEEEEEEEEEEEB3 ",
+ "12999999999999999999999999941 ",
+ " 222222222222222222222222222 ",
+ " ",
+ " ",
+ " "};
+
+static char **doc_open_xpm[3] = { doc_open_x16, doc_open_x24, doc_open_x32 };
+
diff --git a/app/bin/bitmaps/doc-print.xpm b/app/bin/bitmaps/doc-print.xpm new file mode 100644 index 0000000..853014f --- /dev/null +++ b/app/bin/bitmaps/doc-print.xpm @@ -0,0 +1,108 @@ +static char *doc_print_x16[] = {
+ "16 16 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CCCCCC",
+ "4 c #FFFFFF",
+ "5 c #C0C0C0",
+ "6 c #808080",
+ " 111111111111 ",
+ " 144444444441 ",
+ " 144444444441 ",
+ " 144444444441 ",
+ " 144444444441 ",
+ " 666666666666666",
+ "6255555555555556",
+ "6333333333333336",
+ "6333333333333336",
+ "6333333333333336",
+ "6311111111111136",
+ "6316111111654136",
+ "6512666666624136",
+ "6616111111165166",
+ " 166666666341 ",
+ " 111111111111 "};
+
+static char *doc_print_x24[] = {
+ "24 24 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CCCCCC",
+ "4 c #FFFFFF",
+ "5 c #C0C0C0",
+ "6 c #808080",
+ " 1111111111111111 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 144444444444444441 ",
+ " 6666666666666666666666 ",
+ "625555555555555555555526",
+ "653333333333333333333356",
+ "653333333333333333333356",
+ "653333333333333333333356",
+ "653333333333333333333356",
+ "653333333333333333333356",
+ "653111111111111111111356",
+ "653136666666666634441356",
+ "653142222222222255441356",
+ "653142222222222225441356",
+ "662136666666666664441266",
+ " 136666666666666241 ",
+ " 142222222222233441 ",
+ " 145555555555544441 ",
+ " 1111111111111111 "};
+
+static char *doc_print_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " ",
+ " 2222222222222222222222 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 2555555555555555555552 ",
+ " 777777777777777777777777777777 ",
+ " 7666666666666666666666666666677",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444444444444444444444444444437",
+ " 3444222222222222222222222244437",
+ " 3444254444444444444455555244437",
+ " 3444267777777777777765555244437",
+ " 3444246666666666666666655244437",
+ " 3444246666666666666666655244437",
+ " 7444267777777777777773555244437",
+ " 777725444444444444444555527777 ",
+ " 2311111111111111111152 ",
+ " 2544444444444444555552 ",
+ " 2377777777777777455552 ",
+ " 2222222222222222222222 ",
+ " "};
+
+static char **doc_print_xpm[3] = { doc_print_x16, doc_print_x24, doc_print_x32 };
+
diff --git a/app/bin/bitmaps/doc-revert.xpm b/app/bin/bitmaps/doc-revert.xpm new file mode 100644 index 0000000..4af778a --- /dev/null +++ b/app/bin/bitmaps/doc-revert.xpm @@ -0,0 +1,134 @@ +static char *doc_revert_x16[] = {
+ "16 16 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996633",
+ "3 c #CC6633",
+ "4 c #CC9900",
+ "5 c #CC9933",
+ "6 c #CC9966",
+ "7 c #CC9999",
+ "8 c #CCCC33",
+ "9 c #CCCC99",
+ "A c #CCCCCC",
+ "B c #FFCC00",
+ "C c #FFCC33",
+ "D c #FFCCCC",
+ "E c #FFFFCC",
+ "F c #FFFFFF",
+ " 111111111111 ",
+ " 1FFFFFFFFFF1 ",
+ " 1FFFFFFFFFF1 ",
+ " 1FFFADFFFFF1 ",
+ " 1FF639FFFFF1 ",
+ " 1D5BB529FFF1 ",
+ " 1F65B5B86FF1 ",
+ " 1FF93665C7F1 ",
+ " 1FFFDAFA55E1 ",
+ " 1FFFFFFF7491 ",
+ " 1FFFFFFFD561 ",
+ " 1FFFFFFFF251 ",
+ " 1FFFFFFFF621 ",
+ " 1FFFFFFFFFF1 ",
+ " 1FFFFFFFFFF1 ",
+ " 111111111111 "};
+
+static char *doc_revert_x24[] = {
+ "24 24 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996600",
+ "3 c #996633",
+ "4 c #CC6633",
+ "5 c #CC9900",
+ "6 c #CC9933",
+ "7 c #CC9966",
+ "8 c #CC9999",
+ "9 c #CCCC99",
+ "A c #CCCCCC",
+ "B c #FFCC00",
+ "C c #FFCC33",
+ "D c #FFCCCC",
+ "E c #FFFFCC",
+ "F c #FFFFFF",
+ " 111111111111111111 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFD8FFFFFFFFF1 ",
+ " 1FFFF863FFFFFFFFF1 ",
+ " 1FFD6CB37AFFFFFFF1 ",
+ " 1FA6BBBBB568FFFFF1 ",
+ " 1FF76BBBBBBB7FFFF1 ",
+ " 1FFFA6B2736BB7FFF1 ",
+ " 1FFFFE72FF96B69FF1 ",
+ " 1FFFFFF9FFF96B3FF1 ",
+ " 1FFFFFFFFFFF7B6DF1 ",
+ " 1FFFFFFFFFFFD6B8F1 ",
+ " 1FFFFFFFFFFFF7B3F1 ",
+ " 1FFFFFFFFFFFFA62F1 ",
+ " 1FFFFFFFFFFFFE66F1 ",
+ " 1FFFFFFFFFFFFF34E1 ",
+ " 1FFFFFFFFFFFFFAAF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFF1 ",
+ " 111111111111111111 "};
+
+static char *doc_revert_x32[] = {
+ "32 32 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996600",
+ "3 c #996633",
+ "4 c #CC6633",
+ "5 c #CC9900",
+ "6 c #CC9933",
+ "7 c #CC9966",
+ "8 c #CC9999",
+ "9 c #CCCC99",
+ "A c #CCCCCC",
+ "B c #FFCC00",
+ "C c #FFCC33",
+ "D c #FFCCCC",
+ "E c #FFFFCC",
+ "F c #FFFFFF",
+ " 111111111111111111111111 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFE7DFFFFFFFFFFFF1 ",
+ " 1FFFFFF965AFFFFFFFFFFFF1 ",
+ " 1FFFFE76B59FFFFFFFFFFFF1 ",
+ " 1FFF96BBBB6328FFFFFFFFF1 ",
+ " 1FF86BBBBBBBBB68FFFFFFF1 ",
+ " 1FFF76BBBBBBBBBC7FFFFFF1 ",
+ " 1FFFFA6BB5266BBBB7FFFFF1 ",
+ " 1FFFFFF7C5AFA66BBC8FFFF1 ",
+ " 1FFFFFFF849FFF96BB6DFFF1 ",
+ " 1FFFFFFFFAAFFFF96BB7FFF1 ",
+ " 1FFFFFFFFFFFFFFF7BB6FFF1 ",
+ " 1FFFFFFFFFFFFFFFF6B6AFF1 ",
+ " 1FFFFFFFFFFFFFFFF7BB7FF1 ",
+ " 1FFFFFFFFFFFFFFFFD6B3FF1 ",
+ " 1FFFFFFFFFFFFFFFFF3B3FF1 ",
+ " 1FFFFFFFFFFFFFFFFF8B6FF1 ",
+ " 1FFFFFFFFFFFFFFFFFA66DF1 ",
+ " 1FFFFFFFFFFFFFFFFFD66AF1 ",
+ " 1FFFFFFFFFFFFFFFFFF87EF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 1FFFFFFFFFFFFFFFFFFFFFF1 ",
+ " 111111111111111111111111 "};
+
+static char **doc_revert_xpm[3] = { doc_revert_x16, doc_revert_x24, doc_revert_x32 };
+
diff --git a/app/bin/bitmaps/doc-save-as.xpm b/app/bin/bitmaps/doc-save-as.xpm new file mode 100644 index 0000000..2ded960 --- /dev/null +++ b/app/bin/bitmaps/doc-save-as.xpm @@ -0,0 +1,135 @@ +static char *doc_save_as_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #996666",
+ "A c #999966",
+ "B c #9999CC",
+ "C c #CC9966",
+ "D c #FFCC66",
+ " ",
+ "111111 ",
+ "11111111 ",
+ "111111111 ",
+ " 1111 1 ",
+ " 111111 95 ",
+ " 111111 9DC5",
+ " 1111 9DD9 ",
+ " 1169DD9 ",
+ "2222222235DD9222",
+ "267B67B65CA98772",
+ "236736735C557442",
+ "2367367356547442",
+ "2367367367447442",
+ "2222222222222222",
+ " "};
+
+static char *doc_save_as_x24[] = {
+ "24 24 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #996666",
+ "A c #999966",
+ "B c #9999CC",
+ "C c #99CCCC",
+ "D c #CC9966",
+ "E c #FF9966",
+ "F c #FFCC66",
+ "G c #808080",
+ " ",
+ " ",
+ "11111111111 ",
+ "111111111111 ",
+ "1111111111111 ",
+ " 11111 ",
+ " 1111 ",
+ " 1111111111 55 ",
+ " 1111111111 5DA5 ",
+ " 11111111 5DFFA5",
+ " 111111 5DFFE9 ",
+ " 11111 5DFFE9 ",
+ " 1111 5DFFF9 ",
+ " 11 5DFFF9 ",
+ "22222222222225AFFF922222",
+ "2C7C7C6C7C88GDDAF9C7CC72",
+ "286B4C0C4B775FFDG4C68862",
+ "286B4C0C4B775DD9C3C68862",
+ "286B4C0C4B777574C3C68862",
+ "286B4C0C4B77B4C3C3C68862",
+ "287C5C2C5C77C5C4C4C78872",
+ "222222222222222222222222",
+ " ",
+ " "};
+
+static char *doc_save_as_x32[] = {
+ "32 32 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #996666",
+ "A c #999966",
+ "B c #999999",
+ "C c #9999CC",
+ "D c #99CCCC",
+ "E c #CC9966",
+ "F c #FF9966",
+ "G c #FFCC66",
+ "H c #808080",
+ " ",
+ " ",
+ " 111111 ",
+ " 1111111111111 ",
+ " 111111111111111 ",
+ " 1111111111111111 ",
+ " 1111111111111111 ",
+ " 111111 ",
+ " 11111 ",
+ " 111 1111 111 5 ",
+ " 111111111111 5A5 ",
+ " 111111111111 5EGE5 ",
+ " 1111111111 5EGGGE5 ",
+ " 1111111111 5EGGGGF9 ",
+ " 11111111 5EGGGGF9 ",
+ " 111111 5EGGGGF9 ",
+ " 11111 5EGGGGF9 ",
+ " 1111 5EGGGGF9 ",
+ " 222222222222222325EGGGGF922222 ",
+ "2DDDDDDDDDDDDDDDDB9EGGGFHDDDDDD2",
+ "2D8DD8DD8DD7DD7DBEGEEGFHDD7DD7D2",
+ "2D4CD4CD4CD3DD3DHFGGEEH2DD0DD0D2",
+ "2D4CD4CD4CD3DD3DHFGGFHD0DD0DD0D2",
+ "2D4CD4CD4CD3DD3DHEEE5DD0DD0DD0D2",
+ "2D4CD4CD4CD3DD3DC57B2DD0DD0DD0D2",
+ "2D4CD4CD4CD3DD3DD3DD0DD0DD0DD0D2",
+ "2D4CD4CD4CD3DD3DD3DD0DD0DD0DD0D2",
+ "2D6DD6DD6DD4DD4DD4DD3DD3DD3DD3D2",
+ "2DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD2",
+ "22222222222222222222222222222222",
+ " ",
+ " "};
+
+static char **doc_save_as_xpm[3] = { doc_save_as_x16, doc_save_as_x24, doc_save_as_x32 };
+
diff --git a/app/bin/bitmaps/doc-save.xpm b/app/bin/bitmaps/doc-save.xpm new file mode 100644 index 0000000..f775f95 --- /dev/null +++ b/app/bin/bitmaps/doc-save.xpm @@ -0,0 +1,116 @@ +static char *doc_save_x16[] = {
+ "16 16 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666699",
+ "6 c #669999",
+ "7 c #6699CC",
+ "8 c #9999CC",
+ " ",
+ "111111 ",
+ "11111111 ",
+ "111111111 ",
+ " 1111 1 ",
+ " 111111 ",
+ " 111111 ",
+ " 1111 ",
+ " 11 ",
+ "2222222232222222",
+ "2568568567668662",
+ "2356356356446442",
+ "2356356356446442",
+ "2356356356446442",
+ "2222222222222222",
+ " "};
+
+static char *doc_save_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #9999CC",
+ "A c #99CCCC",
+ " ",
+ " ",
+ "11111111111 ",
+ "111111111111 ",
+ "1111111111111 ",
+ " 11111 ",
+ " 1111 ",
+ " 1111111111 ",
+ " 1111111111 ",
+ " 11111111 ",
+ " 111111 ",
+ " 11111 ",
+ " 1111 ",
+ " 11 ",
+ "222222222222222222222222",
+ "2A7A7A6A7A88A7A7A7A7AA72",
+ "28694A0A497794A3A3A68862",
+ "28694A0A497794A3A3A68862",
+ "28694A0A497794A3A3A68862",
+ "28694A0A497794A3A3A68862",
+ "287A5A2A5A77A5A4A4A78872",
+ "222222222222222222222222",
+ " ",
+ " "};
+
+static char *doc_save_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666699",
+ "6 c #669999",
+ "7 c #6699CC",
+ "8 c #9999CC",
+ "9 c #99CCCC",
+ " ",
+ " ",
+ " 111111 ",
+ " 1111111111111 ",
+ " 111111111111111 ",
+ " 1111111111111111 ",
+ " 1111111111111111 ",
+ " 111111 ",
+ " 11111 ",
+ " 111 1111 111 ",
+ " 111111111111 ",
+ " 111111111111 ",
+ " 1111111111 ",
+ " 1111111111 ",
+ " 11111111 ",
+ " 111111 ",
+ " 11111 ",
+ " 1111 ",
+ " 222222222222222322222222222222 ",
+ "29999999999999999999999999999992",
+ "29799799799699699699699699699692",
+ "29489489489399399399099099099092",
+ "29489489489399399399099099099092",
+ "29489489489399399399099099099092",
+ "29489489489399399399099099099092",
+ "29489489489399399399099099099092",
+ "29489489489399399399099099099092",
+ "29599599599499499499399399399392",
+ "29999999999999999999999999999992",
+ "22222222222222222222222222222222",
+ " ",
+ " "};
+
+static char **doc_save_xpm[3] = { doc_save_x16, doc_save_x24, doc_save_x32 };
+
diff --git a/app/bin/bitmaps/doc-setup.xpm b/app/bin/bitmaps/doc-setup.xpm new file mode 100644 index 0000000..c6c8e48 --- /dev/null +++ b/app/bin/bitmaps/doc-setup.xpm @@ -0,0 +1,110 @@ +static char *doc_setup_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ "22222222222 ",
+ "25555555552 ",
+ "25555555552 ",
+ "25555555552 ",
+ "25555555552 ",
+ "25555555552 ",
+ "255555552222222 ",
+ "255555552555552 ",
+ "255555552555552 ",
+ "2555555477777777",
+ "2555554366666667",
+ "2555554644444443",
+ "2555554622222223",
+ "2222227311111723",
+ " 711111227",
+ " 1111122 "};
+
+static char *doc_setup_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ "2222222222222222 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555555552 ",
+ "2555555555552222222222 ",
+ "2555555555552555555552 ",
+ "2555555555552555555552 ",
+ "2555555555552555555552 ",
+ "2555555555552555555552 ",
+ "255555555544777777777777",
+ "255555555576666666666667",
+ "255555555574444444444443",
+ "255555555574444444444443",
+ "255555555574222222222243",
+ "255555555574277777735243",
+ "222222222274111111112247",
+ " 77222222223277",
+ " 1222222762 ",
+ " 2222222222 "};
+
+static char *doc_setup_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " 22222222222222222222 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "2555555555555555555552 ",
+ "255555555555555522222222222222 ",
+ "255555555555555525555555555552 ",
+ "255555555555555525555555555552 ",
+ "255555555555555525555555555552 ",
+ "255555555555555525555555555552 ",
+ "255555555555555525555555555552 ",
+ "25555555555554447777777777777777",
+ "25555555555556366666666666666667",
+ "25555555555556644444444444444447",
+ "25555555555556644444444444444447",
+ "25555555555556644444444444444447",
+ "25555555555556642222222222222447",
+ "25555555555556642444444444555247",
+ "25555555555556642777777777455247",
+ " 2222222222227342777777777735247",
+ " 7772777777777745277",
+ " 27777777777742 ",
+ " 21111111125552 ",
+ " 22222222222222 "};
+
+static char **doc_setup_xpm[3] = { doc_setup_x16, doc_setup_x24, doc_setup_x32 };
+
diff --git a/app/bin/bitmaps/document-export.xpm b/app/bin/bitmaps/document-export.xpm deleted file mode 100644 index 8d632de..0000000 --- a/app/bin/bitmaps/document-export.xpm +++ /dev/null @@ -1,90 +0,0 @@ -/* XPM */
-static char * export_xpm[] = {
-"16 16 71 1",
-" c None",
-". c #406C98",
-"+ c #DDF0FB",
-"@ c #D4E9F7",
-"# c #D1E7F5",
-"$ c #CEE4F4",
-"% c #CCE2F3",
-"& c #CCE1F2",
-"* c #A7C2DC",
-"= c #D6EBF7",
-"- c #C5DFEF",
-"; c #C1DBED",
-"> c #BCD6EA",
-", c #B6D0E8",
-"' c #B3CDE6",
-") c #B2CCE5",
-"! c #9AB6D2",
-"~ c #E5F6FF",
-"{ c #D7ECF8",
-"] c #C7E1EF",
-"^ c #85A4C2",
-"/ c #D7EDF8",
-"( c #C8E2F0",
-"_ c #D8EEF8",
-": c #CAE4F1",
-"< c #D9EEF9",
-"[ c #CBE5F2",
-"} c #8FAFCF",
-"| c #83A5C7",
-"1 c #DAEFF9",
-"2 c #CDE7F2",
-"3 c #81A3C5",
-"4 c #105293",
-"5 c #DAF0F9",
-"6 c #CEE8F3",
-"7 c #C0DAEB",
-"8 c #AFCCE0",
-"9 c #9AB9D4",
-"0 c #88A9C9",
-"a c #7FA1C3",
-"b c #CCE1F0",
-"c c #155493",
-"d c #DBF0FA",
-"e c #D0EAF4",
-"f c #CFE8F3",
-"g c #D4EAF6",
-"h c #E1F3FD",
-"i c #195793",
-"j c #DBF1FA",
-"k c #D1EBF4",
-"l c #C1DCEB",
-"m c #AFCBE0",
-"n c #98B7D1",
-"o c #84A4C4",
-"p c #799BBD",
-"q c #CBE0EF",
-"r c #1E5993",
-"s c #DCF1FA",
-"t c #D2ECF5",
-"u c #7597B9",
-"v c #275D94",
-"w c #DCF2FB",
-"x c #D3EDF5",
-"y c #84A4C0",
-"z c #6B8DAF",
-"A c #3D71A5",
-"B c #DDF2FB",
-"C c #D4EEF6",
-"D c #D8EDF8",
-"E c #E1F4FD",
-"F c #DFF2FC",
-" ......... ",
-" .+@#$%&&*. ",
-" .=-;>,')!~. ",
-" .{]-;>,'^^^. ",
-" ./(]-;>,')&. ",
-" ._:(]-;>,'&. ",
-" .<[:(]-;>}| ",
-" .12[:(]-;3~4 ",
-" .562[7890ab~c ",
-" .de62fg1h~~~~i",
-" .jke6lmnopq~r ",
-" .stke62[:u~v ",
-" .wxtke62[yzA ",
-" .BCxtke62[D. ",
-" .EBwsjd51<F. ",
-" ............ "};
diff --git a/app/bin/bitmaps/document-exportdxf.xpm b/app/bin/bitmaps/document-exportdxf.xpm deleted file mode 100644 index fc4071b..0000000 --- a/app/bin/bitmaps/document-exportdxf.xpm +++ /dev/null @@ -1,84 +0,0 @@ -/* XPM */
-static char * export_dxf_xpm[] = {
-"16 16 65 1",
-" c None",
-". c #406C98",
-"+ c #DDF0FB",
-"@ c #D4E9F7",
-"# c #11CC22",
-"$ c #CEE4F4",
-"% c #CCE2F3",
-"& c #CCE1F2",
-"* c #A7C2DC",
-"= c #D6EBF7",
-"- c #C5DFEF",
-"; c #BCD6EA",
-"> c #B6D0E8",
-", c #B3CDE6",
-"' c #9AB6D2",
-") c #E5F6FF",
-"! c #D7ECF8",
-"~ c #C7E1EF",
-"{ c #C1DBED",
-"] c #85A4C2",
-"^ c #D8EEF8",
-"/ c #CAE4F1",
-"( c #D9EEF9",
-"_ c #CBE5F2",
-": c #C8E2F0",
-"< c #8FAFCF",
-"[ c #83A5C7",
-"} c #DAEFF9",
-"| c #CDE7F2",
-"1 c #81A3C5",
-"2 c #105293",
-"3 c #AFCCE0",
-"4 c #9AB9D4",
-"5 c #88A9C9",
-"6 c #7FA1C3",
-"7 c #CCE1F0",
-"8 c #155493",
-"9 c #DBF0FA",
-"0 c #D0EAF4",
-"a c #CFE8F3",
-"b c #D4EAF6",
-"c c #E1F3FD",
-"d c #195793",
-"e c #DBF1FA",
-"f c #D1EBF4",
-"g c #CEE8F3",
-"h c #C1DCEB",
-"i c #AFCBE0",
-"j c #98B7D1",
-"k c #84A4C4",
-"l c #799BBD",
-"m c #CBE0EF",
-"n c #1E5993",
-"o c #DCF1FA",
-"p c #D2ECF5",
-"q c #7597B9",
-"r c #275D94",
-"s c #84A4C0",
-"t c #6B8DAF",
-"u c #3D71A5",
-"v c #DDF2FB",
-"w c #D4EEF6",
-"x c #D8EDF8",
-"y c #E1F4FD",
-"z c #DFF2FC",
-" ......... ",
-" .+@#$%&#*. ",
-" .=-#;>,#'). ",
-" .!~#{;>#]]]. ",
-" .##########. ",
-" .^/#~-{#>,&. ",
-" .(_#:~-#;<[ ",
-" .}|#/:~#{1)2 ",
-" .#####34567)8 ",
-" .90#|ab}c))))d",
-" .ef#ghijklm)n ",
-" .op#0g|#/q)r ",
-" .########stu ",
-" .vw#pf0#|_x. ",
-" .yv#oe9#}(z. ",
-" ............ "};
diff --git a/app/bin/bitmaps/document-import.xpm b/app/bin/bitmaps/document-import.xpm deleted file mode 100644 index 28dc3c8..0000000 --- a/app/bin/bitmaps/document-import.xpm +++ /dev/null @@ -1,92 +0,0 @@ -/* XPM */
-static char * import_xpm[] = {
-"16 16 73 1",
-" c None",
-". c #406C98",
-"+ c #DDF0FB",
-"@ c #D4E9F7",
-"# c #D1E7F5",
-"$ c #CEE4F4",
-"% c #CCE2F3",
-"& c #CCE1F2",
-"* c #A7C2DC",
-"= c #D6EBF7",
-"- c #C5DFEF",
-"; c #C1DBED",
-"> c #BCD6EA",
-", c #B6D0E8",
-"' c #B3CDE6",
-") c #B2CCE5",
-"! c #9AB6D2",
-"~ c #E5F6FF",
-"{ c #D7ECF8",
-"] c #C7E1EF",
-"^ c #85A4C2",
-"/ c #D7EDF8",
-"( c #C8E2F0",
-"_ c #D8EEF8",
-": c #94B4D1",
-"< c #86A7C9",
-"[ c #AECBE1",
-"} c #D9EEF9",
-"| c #81A3C5",
-"1 c #E4F6FF",
-"2 c #93B2D0",
-"3 c #B6D2E6",
-"4 c #155493",
-"5 c #7FA1C3",
-"6 c #CBE1F0",
-"7 c #DEF2FC",
-"8 c #A5C3DA",
-"9 c #BED9EA",
-"0 c #195793",
-"a c #DFF2FC",
-"b c #CFE7F4",
-"c c #1E5993",
-"d c #799BBD",
-"e c #CAE0EF",
-"f c #A4C2D9",
-"g c #C0DBEB",
-"h c #D4EAF7",
-"i c #DBF1FA",
-"j c #7597B9",
-"k c #8BABC7",
-"l c #B8D4E6",
-"m c #CBE5F2",
-"n c #CAE4F1",
-"o c #D5EBF7",
-"p c #DCF1FA",
-"q c #86A6C1",
-"r c #6F91B2",
-"s c #ACC9DC",
-"t c #CEE8F3",
-"u c #CDE7F2",
-"v c #D6ECF7",
-"w c #DCF2FB",
-"x c #D3EDF5",
-"y c #D2ECF5",
-"z c #D1EBF4",
-"A c #D0EAF4",
-"B c #DDF2FB",
-"C c #D4EEF6",
-"D c #D8EDF8",
-"E c #E1F4FD",
-"F c #DBF0FA",
-"G c #DAF0F9",
-"H c #DAEFF9",
-" ......... ",
-" .+@#$%&&* ",
-" .=-;>,')!~ ",
-" .{]-;>,'^^^. ",
-" ./(]-;>,')&. ",
-" ._:<[-;>,'&. ",
-" .}|123-;>,%. ",
-" 44556789-;>$. ",
-"0~~~~1a/b]-;#. ",
-" ccddeafg(]-h. ",
-" .ij1klmn(]o. ",
-" .pqrstumn(v. ",
-" .wxyzAtumn{. ",
-" .BCxyzAtumD. ",
-" .EBwpiFGH}a. ",
-" ............ "};
diff --git a/app/bin/bitmaps/document-importmod.xpm b/app/bin/bitmaps/document-importmod.xpm deleted file mode 100644 index d0efd02..0000000 --- a/app/bin/bitmaps/document-importmod.xpm +++ /dev/null @@ -1,71 +0,0 @@ -/* XPM */ -static char *importmod_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 49 1 ", -" c #27795F", -". c #305173", -"X c #1A6878", -"o c #07900F", -"O c #0E8E14", -"+ c #0B9C17", -"@ c #10971E", -"# c #0BA619", -"$ c #10A51D", -"% c #0DB61C", -"& c #159E22", -"* c #209E2D", -"= c #18A727", -"- c #16B627", -"; c #27AB35", -": c #30AF3B", -"> c #2AB437", -", c #31B63E", -"< c #36BD46", -"1 c #3CC44C", -"2 c #40C94E", -"3 c #44CB54", -"4 c #54DB64", -"5 c #195793", -"6 c #3B6D8D", -"7 c #39798B", -"8 c #3F6E9C", -"9 c #377C97", -"0 c #3D77A6", -"q c #3F7FBC", -"w c #37878B", -"e c #38938E", -"r c #378399", -"t c #3983A7", -"y c #6F91B2", -"u c #789ABC", -"i c #7FA1C3", -"p c #86A6C4", -"a c #96B4D1", -"s c #A7C4DB", -"d c #AECBE1", -"f c #B9D5E7", -"g c #C0DBEB", -"h c #C9E1EF", -"j c #CDE4F2", -"k c #D7EDF8", -"l c #DFF2FC", -"z c #E5F6FF", -"x c None", -/* pixels */ -"xxqqqqqqqqqxxxxx", -"xxt3111;<>sqxxxx", -"xxq1<<:O;<a;qxxx", -"xxq<;;&x=2pppqxx", -"xxq===$o+;>#xxxx", -"xxq=aid=$=,1>txx", -"xxq=ilaf->44>txx", -"x5qiijlsg-31=0xx", -"5zzzzzzkjh1,#rxx", -"x5Xuuhlsf1111exx", -"xxw<uzpf211;:exx", -"xx9;pys1<<;$+9xx", -"xx0@&@=<;;=%#9xx", -"xx8;<;;===$##7xx", -"xx8*<<==+@++#7xx", -"xx.677776667w xx" -}; diff --git a/app/bin/bitmaps/document-new.xpm b/app/bin/bitmaps/document-new.xpm deleted file mode 100644 index df4790d..0000000 --- a/app/bin/bitmaps/document-new.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static char *document_new[] = { -/* columns rows colors chars-per-pixel */ -"16 16 16 1", -" c #578757875787", -". c #D8CCC69C0972", -"X c #F68EE212077A", -"o c #4DB24DB22F3A", -"O c #6DBE6C5B24E5", -"+ c #F4FCE3151187", -"@ c #F755E8202525", -"# c #EC82D7FE0467", -"$ c #383338333833", -"% c #E683DCF75128", -"& c #F190EA107861", -"* c #E462E45CE3EB", -"= c #FFFDE56F00EE", -"- c #E1C4CC690469", -"; c None", -": c #FFFFE5710000", -/* pixels */ -" $$$$$$$$$oo.=;;", -"$********%@++#-;", -"$*******&@+@++#:", -"$*******%+@&&@X=", -"$*******%+@&&@X=", -"$*****o*&@+@@+#:", -"$***&****%@++@-;", -"$*********%%%o;;", -"$************$;;", -"$************$;;", -"$*&**********$;;", -"$*******&****$;;", -"$************$;;", -"$************$;;", -" $$$$$$$$$$$$ ;;", -";;;;;;;;;;;;;;;;" -}; diff --git a/app/bin/bitmaps/document-open.xpm b/app/bin/bitmaps/document-open.xpm deleted file mode 100644 index be91cd7..0000000 --- a/app/bin/bitmaps/document-open.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char * document_open[] = { -"16 16 16 1", -" c None", -". c #181917", -"+ c #292928", -"@ c #DBDBDB", -"# c #5E5F5E", -"$ c #181919", -"% c #A6A6A5", -"& c #09215F", -"* c #092260", -"= c #88ABD2", -"- c #779BCA", -"; c #4A76B5", -"> c #265299", -", c #243F67", -"' c #0F2D6C", -") c #082160", -" ...+.++. ", -" +.@@@@@@#. ", -"++++.@@@@@@@#$ ", -"+%%#.@#####@@#$ ", -"+%%#+@@@@@@@@%. ", -".%%#.@######@%. ", -".%%#.@@@@@@@@%. ", -".%&&&&&&&&&&&&&*", -"+%&=====-======&", -".%&=;;;;;;;;;;-&", -".%&=;;-;;;-;;;-&", -"$%&=;;;-;;;;;;-&", -".%*;;;>>;>;>>>;&", -"$%&;>>>;>;>>;>;&", -".,&,'>'>>>>''>'*", -"$&&&&&&&&&&&&&*)"}; diff --git a/app/bin/bitmaps/document-print.xpm b/app/bin/bitmaps/document-print.xpm deleted file mode 100644 index 69802d6..0000000 --- a/app/bin/bitmaps/document-print.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * document_print_xpm[] = { -"16 16 5 1", -" c None", -". c #BABDB6", -"+ c #EEEEEC", -"@ c #888A85", -"# c #D3D7CF", -" ", -" ........... ", -" .++++@++++. ", -" .+..@@@..+. ", -" .++@@@@@++. ", -" .+...@...+. ", -" .++++@++++. ", -" .+++++++++. ", -" @@@.........@@@", -" @+++++++++++++@", -" @+#+.+#+#+#+#+@", -" @+###########+@", -" @+.@@@@@@@@@.+@", -" @+...........+@", -" @+###########+@", -" @@@@@@@@@@@@@@@"}; diff --git a/app/bin/bitmaps/document-save.xpm b/app/bin/bitmaps/document-save.xpm deleted file mode 100644 index afc2ce6..0000000 --- a/app/bin/bitmaps/document-save.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char * document_save[] = { -"16 16 16 1", -" c None", -". c #193A55", -"+ c #192933", -"@ c #0A2342", -"# c #122735", -"$ c #536974", -"% c #A7BDC6", -"& c #5180AA", -"* c #244E77", -"= c #272925", -"- c #102C4B", -"; c #E6E6E6", -"> c #7095AB", -", c #2D5C8D", -"' c #6E6E6E", -") c #9B9C9B", -".+..@@@#. ", -"...$%%&*@ ", -"+=#---&%*#=====.", -"=%;%>,@>&-%;;;;=", -"=;;%%$@,&-'%;;;=", -"=;;@@@@,*@@@@;;=", -"=;;)@&***,&@$%;=", -"=;;;)@&,,>@$;;;=", -"=;;;%)@>&@$%;;;=", -"=;;;;;)#@$;;;;;=", -"=;;;;;;;;;;;;;;=", -"=))))))))))))))=", -"=))')')')')')')=", -"=))')')')')')')=", -"=))))))))))))))=", -"+==============+"}; diff --git a/app/bin/bitmaps/down.xpm b/app/bin/bitmaps/down.xpm new file mode 100644 index 0000000..8edaca4 --- /dev/null +++ b/app/bin/bitmaps/down.xpm @@ -0,0 +1,89 @@ +static char *down_x16[] = {
+ "8 16 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 000000 ",
+ " 000000 ",
+ " 0000 ",
+ " 00 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *down_x24[] = {
+ "12 24 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 0000000000 ",
+ " 0000000000 ",
+ " 0000000000 ",
+ " 00000000 ",
+ " 000000 ",
+ " 0000 ",
+ " 00 ",
+ " 0 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *down_x32[] = {
+ "16 32 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 0000000000000 ",
+ " 0000000000000 ",
+ " 0000000000000 ",
+ " 000000000000 ",
+ " 0000000000 ",
+ " 00000000 ",
+ " 000000 ",
+ " 0000 ",
+ " 000 ",
+ " 00 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **down_xpm[3] = { down_x16, down_x24, down_x32 };
+
diff --git a/app/bin/bitmaps/dpoly.xpm b/app/bin/bitmaps/dpoly.xpm deleted file mode 100644 index b46993e..0000000 --- a/app/bin/bitmaps/dpoly.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * dpoly_xpm[] = { -"16 16 3 1", -"X c None", -" c #FFFF00000000", -". c #000000000000", -" ..... XXXXXXXXX", -".XXXXXX..... XXX", -".XXXXXXXXX..XXXX", -".XXXXXXXX.XXXXXX", -".XXXXXX..XXXXXXX", -".XXXXX.XXXXXXXXX", -".XXX..XXXXXXXXXX", -".XX ...XXXXXXXXX", -".XXXXXX......XXX", -" XXXXXXXXXXXX.. ", -"X.XXXXXXXXXXXX.X", -"X.XXXXXXXXXX..XX", -"XX.XXXXXXXX.XXXX", -"XXX.XXXXXX.XXXXX", -"XXX.XXXX..XXXXXX", -"XXXX .. XXXXXXXX"}; diff --git a/app/bin/bitmaps/dpolyline.xpm b/app/bin/bitmaps/dpolyline.xpm deleted file mode 100644 index 7f01bda..0000000 --- a/app/bin/bitmaps/dpolyline.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dpolyline_xpm[] = { -"16 16 3 1", -"X c None", -" c #FFFF00000000", -". c #000000000000", -"XXXXXXXXXXXXXXXX", -"XXXXXXX .... XXX", -"XXXXXXXXXX..XXXX", -"XXXXXXXXX.XXXXXX", -"XXXXXXX..XXXXXXX", -"XXXXXX.XXXXXXXXX", -"XXXX..XXXXXXXXXX", -"XXX ...XXXXXXXXX", -"XXXXXXX......XXX", -" XXXXXXXXXXXX.. ", -"X.XXXXXXXXXXXX.X", -"X.XXXXXXXXXX..XX", -"XX.XXXXXXXX.XXXX", -"XXX.XXXXXX.XXXXX", -"XXX.XXXX..XXXXXX", -"XXXX .. XXXXXXXX"}; - diff --git a/app/bin/bitmaps/dtbledge.xpm b/app/bin/bitmaps/dtbledge.xpm deleted file mode 100644 index 7772d10..0000000 --- a/app/bin/bitmaps/dtbledge.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * dtbledge_xpm[] = { -"16 16 4 1", -"o c None", -". c #000000000000", -" c #0000FFFF0000", -"X c #861782078617", -" .", -" ..", -" .X", -" ..X", -" ..XX", -" .XXX", -" ..XXX", -" ..XXXX", -" .XXXXo", -" ..XXXXo", -" .XXXXoo", -"..........XXXooo", -"..........XXXooo", -"XXXXXXXX..XXoooo", -"XXXXXXXX..Xooooo", -"XXXXXXXX..Xooooo"}; diff --git a/app/bin/bitmaps/ease-broad.xpm b/app/bin/bitmaps/ease-broad.xpm new file mode 100644 index 0000000..646791e --- /dev/null +++ b/app/bin/bitmaps/ease-broad.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_broad_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" xxxx x ", +" x x x ", +" x x xxx xx xx xxx ", +" xxxx x x x x x x x x ", +" x x x x x x x x x ", +" x x x x x x xx x x ", +" xxxx x xx x x xxx ", +" "}; + +static char* ease_broad_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", +" xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xxxxxx xx xxxxx xxxx x xxxxxx ", +" ", +" "}; + +static char* ease_broad_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xx xx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xxxxxxx xx ", +" xxxxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", +" xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", +" xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", +" xxxxxxx xx xxxxxx xxxx xx xxxxxx ", +" ", +" ", +" ", +" "}; + +static char **ease_broad_xpm[3] = { ease_broad_x16, ease_broad_x24, ease_broad_x32 }; diff --git a/app/bin/bitmaps/ease-cornu.xpm b/app/bin/bitmaps/ease-cornu.xpm new file mode 100644 index 0000000..745f436 --- /dev/null +++ b/app/bin/bitmaps/ease-cornu.xpm @@ -0,0 +1,96 @@ +/* XPM */ +static char * ease_cornu_x16[] = { +"41 16 4 1", +" c None", +"x c #000000", +"# c #009999", +"$ c #FF9900", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x x x x x x x x x x x ", +"xxxxx xxx xxx xxx x x x xxx x x x", +" ", +" $$$ ### $$$$$ ", +" $ $ # # $$$$ $ ", +" $ $ $# ## ### ###$$# # $$$ $ ", +"$ $ $ # # # #$$#$# # # #$ $ $", +"$ $ $# #$$#$# # # # # $ $ $", +" $ $$$ # $#$# # # # # # #$ $ $ ", +" $ $### ## # # # ## $ $ ", +" $$$$$ $$$ "}; + +static char* ease_cornu_x24[] = { +"56 24 4 1", +" c None", +"x c #000000", +"# c #009999", +"- c #FF9900", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" --- ", +" ------ ##### ", +" --- -## ## ----- ", +" -- --- ## ----------- ", +" -- ---- ## ------ --- ", +" -- ---- ## ##### ## ### -##-### ## ## - -- ", +" -- ---- ## ## ## ###--##-### ## ## ## -- -- ", +" --- --- ## ## -##-##-- ## ## ## ## --- -- ", +" --- ## ## ##---## ## ## ## ## ## -- -- ", +" ----- #####---##### ## ## ## #### # --- ", +" ----- ------- ", +" ----- ", +" "}; + +static char* ease_cornu_x32[] = { +"66 32 4 1", +" c None", +"x c #000000", +"# c #009999", +"- c #FF9900", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" ----- ###### ", +" ------ ######## ", +" -- ## ## -------- ", +" -- ----## ------------- ", +" -- ----##-- ###### ## ### ## #### ## ## ---- ", +" -- -----## -- ######## ######## ######## ## ## --- ", +" -- -----## -- ## ## ### ## ### - ## ## ##-- -- ", +" -- -----## - ## ## ## -- ## -- ## ## ##--- -- ", +" -- ----## ## ## ## ----- ## ## ## ##---- -- ", +" -- ---## ## ## ## ## --- ## ## ## -##---- -- ", +" -- ######## ######## ## ## ## ########---- -- ", +" --- ###### - ###### ## ## ## ##### #---- --- ", +" ---- -------- -- ---- -- ", +" ------------ --- --- ", +" --- ---- ---- ", +" ------ ", +" "}; + +static char **ease_cornu_xpm[3] = { ease_cornu_x16, ease_cornu_x24, ease_cornu_x32 }; + diff --git a/app/bin/bitmaps/ease-gt-broad.xpm b/app/bin/bitmaps/ease-gt-broad.xpm new file mode 100644 index 0000000..b2dc1cc --- /dev/null +++ b/app/bin/bitmaps/ease-gt-broad.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_gtbroad_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" ", +" x xxxx x ", +" x x x x ", +" x x x xxx xx xx xxx ", +" x xxxx x x x x x x x x ", +" x x x x x x x x x x ", +" x x x x x x x xx x x ", +" x xxxx x xx xx x xx "}; + +static char* ease_gtbroad_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xxxxxx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", +" xx xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xxxxxx xx xxxxx xxxx x xxxxxx ", +" ", +" "}; + +static char* ease_gtbroad_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xxxxxxx xx ", +" xx xxxxxxxx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", +" xx xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", +" xx xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", +" xx xxxxxxx xx xxxxxx xxxx xx xxxxxx ", +" ", +" ", +" ", +" "}; + +static char **ease_gtbroad_xpm[3] = { ease_gtbroad_x16, ease_gtbroad_x24, ease_gtbroad_x32 }; diff --git a/app/bin/bitmaps/ease-gt-sharp.xpm b/app/bin/bitmaps/ease-gt-sharp.xpm new file mode 100644 index 0000000..bd12492 --- /dev/null +++ b/app/bin/bitmaps/ease-gt-sharp.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_gtsharp_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" x xxxxx x ", +" x x x ", +" x x xxx xx xxx xxx ", +" x xxxxx x x x x x x x x ", +" x x x x x x x x x ", +" x x x x x xx x xxx ", +" x xxxxx x x x x x x ", +" x "}; + +static char* ease_gtsharp_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xxxxx xx xxx xxxxxx xx xxx xxxxxx ", +" xx xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xxx xx ", +" xx xxxxxx xx xx xxxx x xx xx xxx ", +" xx ", +" xx "}; + +static char* ease_gtsharp_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xxxxxxx xx ", +" xx xxxxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", +" xx xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", +" xx xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", +" xx xxxxxxx xx xx xxxx xx xx xxxxxxx ", +" xx ", +" xx ", +" xx ", +" "}; + +static char **ease_gtsharp_xpm[3] = { ease_gtsharp_x16, ease_gtsharp_x24, ease_gtsharp_x32 }; diff --git a/app/bin/bitmaps/ease-lt-broad.xpm b/app/bin/bitmaps/ease-lt-broad.xpm new file mode 100644 index 0000000..ab043ee --- /dev/null +++ b/app/bin/bitmaps/ease-lt-broad.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_ltbroad_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" ", +" x xxxx x ", +" x x x x ", +" x x x xxx xx xx xxx ", +" x xxxx x x x x x x x x ", +" x x x x x x x x x x ", +" x x x x x x x xx x x ", +" x xxxx x xx xx x xx "}; + +static char* ease_ltbroad_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xxxxxx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", +" xx xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xxxxxx xx xxxxx xxxx x xxxxxx ", +" ", +" "}; + +static char* ease_ltbroad_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xxxxxxx xx ", +" xx xxxxxxxx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xx xx xx ", +" xx xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", +" xx xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", +" xx xx xx xxx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", +" xx xxxxxxx xx xxxxxx xxxx xx xxxxxx ", +" ", +" ", +" ", +" "}; + +static char **ease_ltbroad_xpm[3] = { ease_ltbroad_x16, ease_ltbroad_x24, ease_ltbroad_x32 }; diff --git a/app/bin/bitmaps/ease-lt-sharp.xpm b/app/bin/bitmaps/ease-lt-sharp.xpm new file mode 100644 index 0000000..93faf60 --- /dev/null +++ b/app/bin/bitmaps/ease-lt-sharp.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_ltsharp_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" x xxxxx x ", +" x x x ", +" x x xxx xx xxx xxx ", +" x xxxxx x x x x x x x x ", +" x x x x x x x x x ", +" x x x x x xx x xxx ", +" x xxxxx x x x x x x ", +" x "}; + +static char* ease_ltsharp_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xxxxx xx xxx xxxxxx xx xxx xxxxxx ", +" xx xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xxx xx ", +" xx xxxxxx xx xx xxxx x xx xx xxx ", +" xx ", +" xx "}; + +static char* ease_ltsharp_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xxxxxxx xx ", +" xx xxxxxxxx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xx xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", +" xx xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", +" xx xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", +" xx xxxxxxx xx xx xxxx xx xx xxxxxxx ", +" xx ", +" xx ", +" xx ", +" "}; + +static char **ease_ltsharp_xpm[3] = { ease_ltsharp_x16, ease_ltsharp_x24, ease_ltsharp_x32 }; diff --git a/app/bin/bitmaps/ease-none.xpm b/app/bin/bitmaps/ease-none.xpm new file mode 100644 index 0000000..b2fe985 --- /dev/null +++ b/app/bin/bitmaps/ease-none.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_none_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x x x x x x x x x x x ", +"xxxxx xxx xxx xxx x x x xxx x x x", +" ", +" x x ", +" xx x ", +" xxx x xx xxx xx ", +" x x x x x x x x x ", +" x xxx x x x x xxx ", +" x xx x x x x x ", +" x x xx x x xxx ", +" "}; + +static char* ease_none_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xx ", +" xx xx ", +" xxx xx ", +" xxxx xx ", +" xxxxxxx xxxxx xx xxx xxxxx ", +" xx xxxx xx xx xxx xx xx xx ", +" xx xxx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xxxxxxx ", +" xx xx xx xx xx xx xx ", +" xx xx xxxxx xx xx xxxxxx ", +" ", +" "}; + +static char* ease_none_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xx ", +" xx xx ", +" xx xx ", +" xxx xx ", +" xxxx xx ", +" xxxxx xx xxxxxx xx xxxx xxxxxx ", +" xx xxx xx xxxxxxxx xxxxxxxx xxxxxxxx ", +" xx xxxxx xx xx xxx xx xx xx ", +" xx xxxx xx xx xx xx xxxxxxxx ", +" xx xxx xx xx xx xx xxxxxxxx ", +" xx xx xx xx xx xx xx ", +" xx xx xxxxxxxx xx xx xxxxxxxx ", +" xx xx xxxxxx xx xx xxxxxxx ", +" ", +" ", +" ", +" "}; + +static char **ease_none_xpm[3] = { ease_none_x16, ease_none_x24, ease_none_x32 }; diff --git a/app/bin/bitmaps/ease-normal.xpm b/app/bin/bitmaps/ease-normal.xpm new file mode 100644 index 0000000..411a036 --- /dev/null +++ b/app/bin/bitmaps/ease-normal.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_normal_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x x x x x x x x x x x ", +"xxxxx xxx xxx xxx x x x xxx x x x", +" ", +" x x x ", +" xx x x ", +" xxx x xx xxx xxx xx xx x ", +" x x x x x x x x x x x x x ", +" x xxx x x x x x x x x x ", +" x xx x x x x x x x x x ", +" x x xx x x x x xxx x ", +" "}; + +static char* ease_normal_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xx xx xx ", +" xx xx xx ", +" xxx xx xx ", +" xxxx xx xx ", +" xxxxxxx xxxxx xx xxx xx xx xx xxxxxx xx ", +" xx xxxx xx xx xxx xx xxxxxxxx xx xx xx ", +" xx xxx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xxxxx xx xx xx xx xxxx x xx ", +" ", +" "}; + +static char* ease_normal_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xx xx xx ", +" xx xx xx ", +" xx xx xx ", +" xxx xx xx ", +" xxxx xx xx ", +" xxxxx xx xxxxxx xx xxx xx xx xx xxxxxxx xx ", +" xx xxx xx xxxxxxxx xxxxxxx xxxxxxxxxx xxxxxxxx xx ", +" xx xxxxx xx xx xxx xx xx xxx xxx xx xx xx ", +" xx xxxx xx xx xx xx xx xx xx xx xx ", +" xx xxx xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx xx xx xx ", +" xx xx xxxxxxxx xx xx xx xx xxxxxxxx xxx ", +" xx xx xxxxxx xx xx xx xx xxxx xx xxx ", +" ", +" ", +" ", +" "}; + +static char **ease_normal_xpm[3] = { ease_normal_x16, ease_normal_x24, ease_normal_x32 }; diff --git a/app/bin/bitmaps/ease-sharp.xpm b/app/bin/bitmaps/ease-sharp.xpm new file mode 100644 index 0000000..05c5c3b --- /dev/null +++ b/app/bin/bitmaps/ease-sharp.xpm @@ -0,0 +1,89 @@ +/* XPM */ +static char * ease_sharp_x16[] = { +"41 16 2 1", +" c None", +"x c #000000000000", +"xxxxx x ", +"x xxx", +"x xx xxx xx xxx xx xx xxx x ", +"xxxx x x x x x x x x x x x x x ", +"x x x xx xxxx x x x xxxx x x x ", +"x x xx x x x x x x x x x ", +"xxxxx x x xxx xxx x x x xxx x x x", +" ", +" xxxxx x ", +" x x ", +" x xxx xx xxx xxx ", +" xxxx x x x x x x x x ", +" x x x x x x x x ", +" x x x x xx x xxx ", +" xxxxx x x x x x x ", +" x "}; + +static char* ease_sharp_x24[] = { +"56 24 2 1", +" c None", +"x c #000000", +" ", +"xxxxxx ", +"xx ", +"xx x ", +"xx xx ", +"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", +"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", +"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", +"xx xx xx xx xx xx xx xx xx xx xx xx ", +"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", +" ", +" xxxxxx xx ", +" xx xx ", +" xx xx ", +" xx xx ", +" xxxxx xx xxx xxxxxx xx xxx xxxxxx ", +" xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xxx xx ", +" xxxxxx xx xx xxxx x xx xx xxx ", +" xx ", +" xx "}; + +static char* ease_sharp_x32[] = { +"66 32 2 1", +" c None", +"x c #000000", +" ", +"xxxxxxx ", +"xxxxxxx ", +"xx x ", +"xx xx ", +"xx xx ", +"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", +"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", +"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", +"xx xx xx xxx xx xx xx xx xx xx xx xx ", +"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", +"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", +" ", +" xxxxxxx xx ", +" xxxxxxxx xx ", +" xx xx ", +" xx xx ", +" xx xx ", +" xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", +" xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", +" xx xxx xx xx xx xxx xx xx xx ", +" xx xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx ", +" xx xx xx xx xx xx xx xx ", +" xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", +" xxxxxxx xx xx xxxx xx xx xxxxxxx ", +" xx ", +" xx ", +" xx ", +" "}; + +static char **ease_sharp_xpm[3] = { ease_sharp_x16, ease_sharp_x24, ease_sharp_x32 }; diff --git a/app/bin/bitmaps/ebroad.xpm b/app/bin/bitmaps/ebroad.xpm deleted file mode 100644 index 11bc4d6..0000000 --- a/app/bin/bitmaps/ebroad.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * ebroad_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -".........................................", -"........ .................... ........", -"........ ... ................... ........", -"........ ... . ... ... ... ........", -"........ .. .. . .. . .. . .. ........", -"........ ... . .... .. . .. . .. ........", -"........ ... . .... .. . . . .. ........", -"........ .. ..... ... . .. ........"}; diff --git a/app/bin/bitmaps/ecornu.xpm b/app/bin/bitmaps/ecornu.xpm deleted file mode 100644 index e32e56a..0000000 --- a/app/bin/bitmaps/ecornu.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * ecornu_xpm[] = { -"41 16 4 1", -". c None", -" c #000000000000", -"# c #FFFF00000000", -"$ c #808080000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... .. .... . .... .. .. . .... .. . .", -" .. . ... . .. .. .. . .. .. ", -".........................................", -"...$$$...###.....................$$$$$...", -"..$...$.#...#................$$$$.....$..", -".$..$..$#......##..###..###$$#..#.$$$..$.", -"$..$.$..#.....#..#.#$$#$#..#.#..#$...$..$", -"$..$...$#.....#$$#$#....#..#.#..#..$.$..$", -".$..$$$.#..$#$#..#.#....#..#.#..#$..$..$.", -"..$.....$###...##..#....#..#..##..$...$..", -"...$$$$$...........................$$$..."}; diff --git a/app/bin/bitmaps/edit-redo.xpm b/app/bin/bitmaps/edit-redo.xpm deleted file mode 100644 index 3d3a70c..0000000 --- a/app/bin/bitmaps/edit-redo.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char *edit_redo[] = { -/* columns rows colors chars-per-pixel */ -"16 16 7 1", -" c #4EE29B270680", -". c #73EAD2BE1616", -"X c #94FB9F050707", -"o c #A20EDAEE280A", -"O c #CC4BD6801D9D", -"+ c #AEC8ED136114", -"@ c None", -/* pixels */ -"@@@@@@@@@ @@@@@@", -"@@@@@@@@@ @@@@@", -"@@@@@@@@@ + @@@@", -"@@@@@@ ++ @@@", -"@@@@ X+++++.+ @@", -"@@@ ++ooooo..+ @", -"@@ o+ooooo....+ ", -"@ o+oooO.....+ @", -"@.+OOoooooO.o @@", -"@ +OX oo @@@", -"@ +X @@@@ o @@@@", -"@ o @@@@@ @@@@@", -"@ + @@@@@ @@@@@@", -"@ oX@@@@@@@@@@@@", -"@@ OX@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@" -}; diff --git a/app/bin/bitmaps/edit-undo.xpm b/app/bin/bitmaps/edit-undo.xpm deleted file mode 100644 index 4840284..0000000 --- a/app/bin/bitmaps/edit-undo.xpm +++ /dev/null @@ -1,28 +0,0 @@ -/* XPM */ -static char *edit_undo[] = { -/* columns rows colors chars-per-pixel */ -"16 16 6 1", -" c #BD4FA17C1684", -". c #C482A29B05D3", -"X c #ECB0D6B82037", -"o c #F318E3AA67FF", -"O c #FA79F1F1A77C", -"+ c None", -/* pixels */ -"++++++.+++++++++", -"+++++..+++++++++", -"++++.O.+++++++++", -"+++.OX.. +++++", -"++.OXXoooo ++++", -"+.OXXoXXXXoo +++", -".OXXXXXXXXXXX ++", -"+.OXXXXXXXXXo +", -"++.oXoooooXX.o.+", -"+++.oo.....oXo +", -"++++.o.++++.oo +", -"+++++..+++++.O +", -"++++++.+++++.o +", -"++++++++++++Xo++", -"++++++++++++o ++", -"++++++++++++++++" -}; diff --git a/app/bin/bitmaps/egtbroad.xpm b/app/bin/bitmaps/egtbroad.xpm deleted file mode 100644 index 1a6ca6d..0000000 --- a/app/bin/bitmaps/egtbroad.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * egtbroad_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -".........................................", -"..... ..... .................... .....", -"...... .... ... ................... .....", -"....... ... ... . ... ... ... .....", -"........ .. .. .. . .. . .. . .. .....", -"....... ... ... . .... .. . .. . .. .....", -"...... .... ... . .... .. . . . .. .....", -"..... ..... .. ..... .. . .. ......"}; diff --git a/app/bin/bitmaps/egtsharp.xpm b/app/bin/bitmaps/egtsharp.xpm deleted file mode 100644 index 63212a0..0000000 --- a/app/bin/bitmaps/egtsharp.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * egtsharp_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -"..... ...... . ......................", -"...... .... ...... ......................", -"....... ... ...... ... .. .. .....", -"........ ... . .. . .. . .. . .. ....", -"....... ........ . .. . .. . .... .. ....", -"...... ......... . .. . . . .... .....", -"..... ..... .. .. .. . . .... .......", -"................................. ......."}; diff --git a/app/bin/bitmaps/elev.xpm b/app/bin/bitmaps/elev.xpm deleted file mode 100644 index de8cd96..0000000 --- a/app/bin/bitmaps/elev.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * elev_xpm[] = { -"16 16 4 1", -" c None", -". c #FFFF00000000", -"X c #FFFF0000FFFF", -"o c #000000000000", -" . ", -" ... ", -" . . . XXXXX", -" . . . X", -" . X ", -" . X ", -" . X ", -" . X ", -" . XXXXX", -" o o o o ", -"ooooooooooooooo ", -" o o o o ", -" o o o o ", -" o o o o ", -"ooooooooooooooo ", -" o o o o "}; diff --git a/app/bin/bitmaps/elevation.xpm b/app/bin/bitmaps/elevation.xpm new file mode 100644 index 0000000..ab65147 --- /dev/null +++ b/app/bin/bitmaps/elevation.xpm @@ -0,0 +1,117 @@ +static char *elevation_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC6600",
+ "3 c #FF0000",
+ " ",
+ " 1 11111 ",
+ " 131 33 ",
+ " 13331 33 ",
+ " 1 33 ",
+ " 1 33 ",
+ " 1 11111 ",
+ " 1 ",
+ " ",
+ " 2 2 2 2 2 2 2 ",
+ " 00000000000000 ",
+ " 2 2 2 2 2 2 2 ",
+ " 00000000000000 ",
+ " 2 2 2 2 2 2 2 ",
+ " ",
+ " "};
+
+static char *elevation_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #663300",
+ "2 c #666600",
+ "3 c #996600",
+ "4 c #996633",
+ "5 c #CC0000",
+ "6 c #CC3300",
+ "7 c #CC6600",
+ "8 c #CC6633",
+ "9 c #CC9933",
+ "A c #FF6633",
+ "B c #FF9933",
+ "C c #FFCC33",
+ " ",
+ " ",
+ " 5555555 ",
+ " 55555555 ",
+ " 555 ",
+ " 55 555 ",
+ " 5555 555 ",
+ " 555555 55 ",
+ " 5555555 555 ",
+ " 5 55 5 55555555 ",
+ " 55 55555555 ",
+ " 55 ",
+ " 55 ",
+ " 55 ",
+ " 55 ",
+ " 440440345640180090081 ",
+ " 0440440345640180090081 ",
+ " BB BB BC57C C C C ",
+ " BB BB BC5AC C C C ",
+ " BB BB BC C C C C ",
+ " 440440340240180090081 ",
+ " 0440440340240180090081 ",
+ " ",
+ " "};
+
+static char *elevation_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #666600",
+ "4 c #990000",
+ "5 c #996600",
+ "6 c #996633",
+ "7 c #CC0000",
+ "8 c #CC3300",
+ "9 c #CC6600",
+ "A c #CC6633",
+ "B c #CC9933",
+ "C c #FF9933",
+ "D c #FFCC33",
+ " ",
+ " ",
+ " ",
+ " 777777777 ",
+ " 777777777 ",
+ " 777 ",
+ " 777 ",
+ " 77 7777 ",
+ " 7777 777 ",
+ " 777777 777 ",
+ " 77777777 777 ",
+ " 777777777 777 ",
+ " 77 777 77 7777777777 ",
+ " 777 7777777777 ",
+ " 777 7777777777 ",
+ " 777 ",
+ " 777 ",
+ " 777 ",
+ " 777 ",
+ " 777 ",
+ " BB BB 6B778B B B5 B6 ",
+ " 02200220013474500050005100310 ",
+ " DC CC D778D D D D ",
+ " DC CC D778D D D D ",
+ " DC CC D779D D D D ",
+ " DC CC D D D D D ",
+ " DC CC D D D D D ",
+ " 06500660036002A000B000A200630 ",
+ " 06500660036002A000B000A200630 ",
+ " D D D C D D ",
+ " ",
+ " "};
+
+static char **elevation_xpm[3] = { elevation_x16, elevation_x24, elevation_x32 };
+
diff --git a/app/bin/bitmaps/eltbroad.xpm b/app/bin/bitmaps/eltbroad.xpm deleted file mode 100644 index a2fb83a..0000000 --- a/app/bin/bitmaps/eltbroad.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * eltbroad_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -".........................................", -"........ .. .................... .....", -"....... ... ... ................... .....", -"...... .... ... . ... ... ... .....", -"..... ..... .. .. . .. . .. . .. .....", -"...... .... ... . .... .. . .. . .. .....", -"....... ... ... . .... .. . . . .. .....", -"........ .. .. ..... .. . .. ......"}; diff --git a/app/bin/bitmaps/eltsharp.xpm b/app/bin/bitmaps/eltsharp.xpm deleted file mode 100644 index 70985c1..0000000 --- a/app/bin/bitmaps/eltsharp.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * eltsharp_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -"..... ...... . ......................", -".... ...... ...... ......................", -"... ....... ...... ... .. .. .....", -".. ......... . .. . .. . .. . .. ....", -"... ............ . .. . .. . .... .. ....", -".... ........... . .. . . . .... .....", -"..... ..... .. .. .. . . .... .......", -"................................. ......."}; diff --git a/app/bin/bitmaps/enone.xpm b/app/bin/bitmaps/enone.xpm deleted file mode 100644 index bcc479e..0000000 --- a/app/bin/bitmaps/enone.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * enone_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... .. .... . .... .. .. . .... .. . .", -" .. . ... . .. .. .. . .. .. ", -".........................................", -".......... ... ..........................", -".......... .. ..........................", -".......... . .. .. ... ............", -".......... . . . .. . .. . .. ...........", -".......... . . .. . .. . ............", -".......... .. . .. . .. . ..............", -".......... ... .. .. .. .. ...........", -"........................................."}; diff --git a/app/bin/bitmaps/enormal.xpm b/app/bin/bitmaps/enormal.xpm deleted file mode 100644 index fa5890a..0000000 --- a/app/bin/bitmaps/enormal.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * enormal_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... .. .... . .... .. .. . .... .. . .", -" .. . ... . .. .. .. . .. .. ", -".........................................", -"..... ... ........................ ......", -"..... .. ........................ ......", -"..... . .. .. .. . ... .. ......", -"..... . . . .. . .. . .. .. . .. . ......", -"..... . . .. . .... .. .. . .. . ......", -"..... .. . .. . .... .. .. . .. . ......", -"..... ... .. .. .... .. .. .. .. .....", -"........................................."}; diff --git a/app/bin/bitmaps/esharp.xpm b/app/bin/bitmaps/esharp.xpm deleted file mode 100644 index b7129f0..0000000 --- a/app/bin/bitmaps/esharp.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * esharp_xpm[] = { -"41 16 2 1", -". c None", -" c #000000000000", -" .................................. .", -" ..................................... ", -" ...... ... .. .. . ... .. .. .", -" .. .. . .... .. . .. .. . .. . .. . .", -" ..... .. .. .. . .. .. . . .. . .", -" ..... . .... . .... .. .. . .... .. . .", -" .. . . ... . .. .. .. . .. .. ", -".........................................", -"........ . ..........................", -"....... ...... ..........................", -"....... ...... ... .. .. .........", -"........ . .. . .. . .. . .. ........", -"............ . .. . .. . .... .. ........", -"............ . .. . . . .... .........", -"....... .. .. .. . . .... ...........", -"............................. ..........."}; diff --git a/app/bin/bitmaps/exit.xpm b/app/bin/bitmaps/exit.xpm index ab8c191..7daf3ab 100644 --- a/app/bin/bitmaps/exit.xpm +++ b/app/bin/bitmaps/exit.xpm @@ -1,21 +1,94 @@ -/* XPM */ -static char*exit_xpm[]={ -"16 16 2 1", -". c None", -"# c #000000000000", -"................", -"................", -".###.#.#.#.###..", -".#...#.#.#..#...", -".#...#.#.#..#...", -".#...#.#.#..#...", -".#....#..#..#...", -".###..#..#..#...", -".#....#..#..#...", -".#...#.#.#..#...", -".#...#.#.#..#...", -".#...#.#.#..#...", -".###.#.#.#..#...", -"................", -"................", -"................"}; +static char *exit_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #FF0000",
+ " ",
+ " 1 ",
+ " 111 ",
+ " 11111 ",
+ " 1 ",
+ " 1 ",
+ " 1 ",
+ " 1 ",
+ " ",
+ " ",
+ " 000 0 0 0 000 ",
+ " 0 0 0 0 0 ",
+ " 00 0 0 0 ",
+ " 0 0 0 0 0 ",
+ " 000 0 0 0 0 ",
+ " "};
+
+static char *exit_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #CC0000",
+ "3 c #808080",
+ " ",
+ " ",
+ " 22 ",
+ " 2222 ",
+ " 222222 ",
+ " 22222222 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " ",
+ " ",
+ " 00000 0 0 00 000000 ",
+ " 00 01 10 00 00 ",
+ " 00 030 00 00 ",
+ " 0000 303 00 00 ",
+ " 00 030 00 00 ",
+ " 00 01 10 00 00 ",
+ " 00000 0 0 00 00 ",
+ " ",
+ " ",
+ " "};
+
+static char *exit_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " 11 ",
+ " 1111 ",
+ " 111111 ",
+ " 111111111 ",
+ " 11111111111 ",
+ " 11111111111111 ",
+ " 1111 1111 1111 ",
+ " 111 1111 111 ",
+ " 1111 1 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 111 ",
+ " ",
+ " ",
+ " ",
+ " 00000000 000 00 00 000000000",
+ " 00000000 000 000 00 00000000 ",
+ " 00 000000 00 000 ",
+ " 000 00000 00 000 ",
+ " 0000000 000 00 000 ",
+ " 0000000 0000 00 000 ",
+ " 00 00000 00 000 ",
+ " 00 000 000 00 000 ",
+ " 00000000 000 000 00 000 ",
+ " 00000000 00 000 00 000 ",
+ " "};
+
+static char **exit_xpm[3] = { exit_x16, exit_x24, exit_x32 };
+
diff --git a/app/bin/bitmaps/extend.xpm b/app/bin/bitmaps/extend.xpm index 4fb45d1..43490a0 100644 --- a/app/bin/bitmaps/extend.xpm +++ b/app/bin/bitmaps/extend.xpm @@ -1,23 +1,143 @@ -/* XPM */ -static char * extend_xpm[] = { -"16 16 4 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -"o c #0000FFFFFFFF", -" ", -" . ", -" ... ", -" . . . ", -" .X . X.", -" XXX.XXX", -" X . X ", -" X X . X ", -" X . X ", -"o o X X X. X ", -"oooooXX .X X ", -"o o X .. X ", -"o o... XX X ", -"o o X XX ", -"oooooXX ", -"o o X "}; +static char *extend_x16[] = {
+ "16 16 21 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366CC",
+ "3 c #3366FF",
+ "4 c #3399FF",
+ "5 c #666666",
+ "6 c #6666CC",
+ "7 c #6699FF",
+ "8 c #66CCFF",
+ "9 c #993333",
+ "A c #996666",
+ "B c #999999",
+ "C c #9999CC",
+ "D c #CC0000",
+ "E c #CC3333",
+ "F c #CC6633",
+ "G c #CC6666",
+ "H c #CCCCCC",
+ "I c #C0C0C0",
+ "J c #808080",
+ " D ",
+ " DDD ",
+ " GAE9 ",
+ " BJEJI ",
+ " BJD5 ",
+ " BBGJH ",
+ " HJFE5 ",
+ " BJEJB ",
+ " CJGEJH ",
+ " 46FJI ",
+ " 734832 ",
+ " 884438814 ",
+ " 343448 34 ",
+ " 8 8441 ",
+ " 411338 ",
+ " 44 8 "};
+
+static char *extend_x24[] = {
+ "24 24 21 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366FF",
+ "3 c #3399FF",
+ "4 c #666666",
+ "5 c #6666CC",
+ "6 c #6699FF",
+ "7 c #66CCFF",
+ "8 c #993333",
+ "9 c #999999",
+ "A c #CC0000",
+ "B c #CC3300",
+ "C c #CC3333",
+ "D c #CC6633",
+ "E c #CC6666",
+ "F c #CC6699",
+ "G c #CC9999",
+ "H c #CCCCCC",
+ "I c #C0C0C0",
+ "J c #808080",
+ " ",
+ " AA ",
+ " AAAAA ",
+ " B AA ",
+ " 99EGJI ",
+ " J9DG4H ",
+ " 44A 4 ",
+ " HJIC94 ",
+ " 4GE99H ",
+ " H94AA44 ",
+ " JICG4 ",
+ " H44CE99 ",
+ " 9JGA 4I ",
+ " 75 EGJ4 ",
+ " 37 A9JH ",
+ " 62 7732 ",
+ " 77227 32 ",
+ " 7776223 7 1 7 ",
+ " 23323277 32 ",
+ " 236 7 76117 ",
+ " 77 77112 ",
+ " 76111117 ",
+ " 112117 ",
+ " 77 "};
+
+static char *extend_x32[] = {
+ "32 32 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066FF",
+ "2 c #3366CC",
+ "3 c #3366FF",
+ "4 c #3399FF",
+ "5 c #666666",
+ "6 c #6699FF",
+ "7 c #66CCFF",
+ "8 c #999999",
+ "9 c #CC0000",
+ "A c #CC3300",
+ "B c #CC3333",
+ "C c #CC6666",
+ "D c #CC9999",
+ "E c #CCCCCC",
+ "F c #C0C0C0",
+ "G c #808080",
+ " ",
+ " 99 ",
+ " 999999 ",
+ " 99999999 ",
+ " 99 99 99 ",
+ " 5 99 5 ",
+ " EGECBEGE ",
+ " 5 998G ",
+ " 5 9955 ",
+ " E8G 9955 ",
+ " E88D9FG8 ",
+ " 559AEGFE ",
+ " EF5 99 5 ",
+ " E88D9 55 ",
+ " 5 CBE5 ",
+ " EE55 9B8GE ",
+ " 8G 99 5 ",
+ " 5ED9B55 ",
+ " 73 9CF5 ",
+ " 377 5FE ",
+ " 763 77 12 ",
+ " 7 347 741 ",
+ " 7633 7 147 ",
+ " 7 77334 7 11 ",
+ " 463333 7 431 ",
+ " 334337 77 1147 ",
+ " 7 77 711 ",
+ " 7 7 1136 ",
+ " 7 411 7 ",
+ " 11311147 ",
+ " 37 7 ",
+ " 7 "};
+
+static char **extend_xpm[3] = { extend_x16, extend_x24, extend_x32 };
+
diff --git a/app/bin/bitmaps/filled-box.xpm b/app/bin/bitmaps/filled-box.xpm new file mode 100644 index 0000000..cd85179 --- /dev/null +++ b/app/bin/bitmaps/filled-box.xpm @@ -0,0 +1,120 @@ +static char *filled_box_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #9999CC",
+ "3 c #99CCCC",
+ "4 c #99CCFF",
+ "5 c #99FFFF",
+ "6 c #CC0000",
+ "7 c #CC6666",
+ "8 c #CC6699",
+ "9 c #CC9999",
+ "A c #CC99CC",
+ " ",
+ " 00000000000000 ",
+ " 05555555542220 ",
+ " 05555555542860 ",
+ " 0555555555A271 ",
+ " 05555555592581 ",
+ " 05555554935540 ",
+ " 05555549355550 ",
+ " 05555483555550 ",
+ " 05554845555550 ",
+ " 05548455555550 ",
+ " 05484555555550 ",
+ " 04845555555550 ",
+ " 18455555555550 ",
+ " 00000000000000 ",
+ " "};
+
+static char *filled_box_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #9999CC",
+ "2 c #99CCCC",
+ "3 c #99CCFF",
+ "4 c #99FFFF",
+ "5 c #CC0000",
+ "6 c #CC3333",
+ "7 c #CC6666",
+ "8 c #CC6699",
+ "9 c #CC9999",
+ "A c #CC99CC",
+ " ",
+ " ",
+ " 0000000000000000000000 ",
+ " 0444444444444433333340 ",
+ " 0444444444444415555640 ",
+ " 0444444444444433317540 ",
+ " 0444444444444444292530 ",
+ " 0444444444444441942530 ",
+ " 04444444444444A1443530 ",
+ " 0444444444444914443230 ",
+ " 0444444444439244444440 ",
+ " 0444444444392444444440 ",
+ " 0444444443824444444440 ",
+ " 0444444438344444444440 ",
+ " 0444444383444444444440 ",
+ " 0444443834444444444440 ",
+ " 0444438344444444444440 ",
+ " 0444283444444444444440 ",
+ " 0442934444444444444440 ",
+ " 0429344444444444444440 ",
+ " 0314444444444444444440 ",
+ " 0000000000000000000000 ",
+ " ",
+ " "};
+
+static char *filled_box_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #9999CC",
+ "2 c #99CCCC",
+ "3 c #99CCFF",
+ "4 c #99FFFF",
+ "5 c #CC0000",
+ "6 c #CC3333",
+ "7 c #CC3366",
+ "8 c #CC6666",
+ "9 c #CC6699",
+ "A c #CC9999",
+ "B c #CC99CC",
+ " ",
+ " ",
+ " 000000000000000000000000000000 ",
+ " 000000000000000000000000000000 ",
+ " 004444444444444444444444444400 ",
+ " 004444444444444444436555558400 ",
+ " 004444444444444444436555556400 ",
+ " 004444444444444444444436555400 ",
+ " 004444444444444444444265A85300 ",
+ " 00444444444444444444265A485300 ",
+ " 0044444444444444444255B4495300 ",
+ " 0044444444444444441551444A5300 ",
+ " 004444444444444441552444431300 ",
+ " 0044444444444444A5524444444400 ",
+ " 004444444444444A56244444444400 ",
+ " 00444444444443A562444444444400 ",
+ " 0044444444443A5634444444444400 ",
+ " 004444444443857344444444444400 ",
+ " 004444444438583444444444444400 ",
+ " 004444444385834444444444444400 ",
+ " 004444443758344444444444444400 ",
+ " 004444436593444444444444444400 ",
+ " 004444265A34444444444444444400 ",
+ " 00444265A344444444444444444400 ",
+ " 0044255A4444444444444444444400 ",
+ " 004155144444444444444444444400 ",
+ " 003651444444444444444444444400 ",
+ " 004224444444444444444444444400 ",
+ " 000000000000000000000000000000 ",
+ " 000000000000000000000000000000 ",
+ " ",
+ " "};
+
+static char **filled_box_xpm[3] = { filled_box_x16, filled_box_x24, filled_box_x32 };
+
diff --git a/app/bin/bitmaps/filled-polygon.xpm b/app/bin/bitmaps/filled-polygon.xpm new file mode 100644 index 0000000..2620b74 --- /dev/null +++ b/app/bin/bitmaps/filled-polygon.xpm @@ -0,0 +1,121 @@ +static char *filled_polygon_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #669999",
+ "7 c #6699CC",
+ "8 c #66CCCC",
+ "9 c #66CCFF",
+ "A c #99FFFF",
+ " ",
+ " 01220144 ",
+ " 17799AAA93 ",
+ " 17AAAAAAAA84 ",
+ " 29AAAAAAAAA83 ",
+ " 4AAAAAAAAAAA83 ",
+ "06AAAAAAAAAAAA71",
+ " 4AAAAAAAAAAAA82",
+ " 19AAAAAAAAAAA82",
+ " 17AAAAAAAAAAA82",
+ " 4AAAAAAAAAAA82",
+ " 19AAAAAAAAAA92",
+ " 1179AAAAAAAA92",
+ " 1279AAAA9752",
+ " 227640210 ",
+ " 00 "};
+
+static char *filled_polygon_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #336699",
+ "7 c #339999",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66CCCC",
+ "B c #66CCFF",
+ "C c #99FFFF",
+ " ",
+ " 0032 ",
+ " 0033105599A62 ",
+ " 299ABBCCCCCCB62 ",
+ " 06CCCCCCCCCCCCB5 ",
+ " 3ACCCCCCCCCCCCCB5 ",
+ " 2BCCCCCCCCCCCCCCB5 ",
+ " 07CCCCCCCCCCCCCCCCB5 ",
+ " 3ACCCCCCCCCCCCCCCCCB4 ",
+ " 1BCCCCCCCCCCCCCCCCCCB4 ",
+ " 3BCCCCCCCCCCCCCCCCCCC4 ",
+ " 08CCCCCCCCCCCCCCCCCCC4 ",
+ " 2CCCCCCCCCCCCCCCCCCC4 ",
+ " 3BCCCCCCCCCCCCCCCCCC5 ",
+ " 07CCCCCCCCCCCCCCCCCC5 ",
+ " 2BCCCCCCCCCCCCCCCCC5 ",
+ " 3ACCCCCCCCCCCCCCCCC5 ",
+ " 07CCCCCCCCCCCCCCCCC5 ",
+ " 45BCCCCCCCCCCCCCCC5 ",
+ " 35BCCCCCCCCCCCCC5 ",
+ " 36BCCCCCCCBA850 ",
+ " 028BBA952230 ",
+ " 22230 ",
+ " "};
+
+static char *filled_polygon_x32[] = {
+ "32 32 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333366",
+ "3 c #336666",
+ "4 c #336699",
+ "5 c #339999",
+ "6 c #669999",
+ "7 c #6699CC",
+ "8 c #66CCCC",
+ "9 c #66CCFF",
+ "A c #99FFFF",
+ " ",
+ " 0000 ",
+ " 000000000000 ",
+ " 0000000000447789300 ",
+ " 004477999AAAAAAA9300 ",
+ " 008AAAAAAAAAAAAAAA9100 ",
+ " 019AAAAAAAAAAAAAAAA9100 ",
+ " 05AAAAAAAAAAAAAAAAAA9100 ",
+ " 008AAAAAAAAAAAAAAAAAAA810 ",
+ " 029AAAAAAAAAAAAAAAAAAAA800 ",
+ " 006AAAAAAAAAAAAAAAAAAAAAA800 ",
+ " 009AAAAAAAAAAAAAAAAAAAAAAA700 ",
+ " 02AAAAAAAAAAAAAAAAAAAAAAAAA700 ",
+ " 009AAAAAAAAAAAAAAAAAAAAAAAAA30 ",
+ " 008AAAAAAAAAAAAAAAAAAAAAAAAA40 ",
+ " 04AAAAAAAAAAAAAAAAAAAAAAAAA40 ",
+ " 009AAAAAAAAAAAAAAAAAAAAAAAA50 ",
+ " 008AAAAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 04AAAAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 009AAAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 007AAAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 04AAAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 009AAAAAAAAAAAAAAAAAAAAAA60 ",
+ " 0069AAAAAAAAAAAAAAAAAAAAA60 ",
+ " 0027AAAAAAAAAAAAAAAAAAAA70 ",
+ " 00038AAAAAAAAAAAAAAAAAA70 ",
+ " 00038AAAAAAAAAAAAAA9840 ",
+ " 00049AAAAAAA997520000 ",
+ " 00059A98630000000 ",
+ " 00010000000 ",
+ " 0000 ",
+ " "};
+
+static char **filled_polygon_xpm[3] = { filled_polygon_x16, filled_polygon_x24, filled_polygon_x32 };
+
diff --git a/app/bin/bitmaps/flip.xpm b/app/bin/bitmaps/flip.xpm deleted file mode 100644 index 03966eb..0000000 --- a/app/bin/bitmaps/flip.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * flip_xpm[] = { -"16 16 4 1", -"# c None", -". c #0000ffffffff", -"b c #000000000000", -"a c #ffff00000000", -".######a#######b", -"..#####a######bb", -"...####a#####bbb", -"....###a####bbbb", -".....##a###bbbbb", -"......#a##bbbbbb", -".......a#bbbbbbb", -".......abbbbbbbb", -".......abbbbbbbb", -".......a#bbbbbbb", -"......#a##bbbbbb", -".....##a###bbbbb", -"....###a####bbbb", -"...####a#####bbb", -"..#####a######bb", -".######a#######b"}; diff --git a/app/bin/bitmaps/funnel.xpm b/app/bin/bitmaps/funnel.xpm new file mode 100644 index 0000000..ef7cd23 --- /dev/null +++ b/app/bin/bitmaps/funnel.xpm @@ -0,0 +1,62 @@ +/* XPM */ +static char *funnel_xpm[] = { +"16 16 43 1", +" c None", +". c #216262", +"+ c #123737", +"@ c #030A0A", +"# c #000000", +"$ c #010303", +"% c #050E0E", +"& c #091C1C", +"* c #0F2E2E", +"= c #164242", +"- c #1C5353", +"; c #76D1D1", +"> c #82D5D5", +", c #79D2D2", +"' c #62CBCB", +") c #65CCCC", +"! c #75D1D1", +"~ c #80D5D5", +"{ c #5FCACA", +"] c #52C5C5", +"^ c #42C0C0", +"/ c #39ACAC", +"( c #3BB1B1", +"_ c #57C7C7", +": c #7BD3D3", +"< c #89D8D8", +"[ c #7ED4D4", +"} c #60CACA", +"| c #43C0C0", +"1 c #4BC3C3", +"2 c #86D7D7", +"3 c #71D0D0", +"4 c #46C1C1", +"5 c #50C5C5", +"6 c #49C2C2", +"7 c #4CC3C3", +"8 c #5EC9C9", +"9 c #000101", +"0 c #040B0B", +"a c #020606", +"b c #72D0D0", +"c c #010404", +"d c #313333", +" ", +" .+@###$%&*=-. ", +" .;;;>,')!~;;. ", +" .+;{]^/(^_:-. ", +" +<;[}|1:;2- ", +" +@;;345;;=- ", +" @#;;6_;*= ", +" ##;78&* ", +" ##'%& ", +" #'% ", +" #'% ", +" #'% ", +" 9'0 ", +" $'a ", +" #bc ", +" ##d "}; diff --git a/app/bin/bitmaps/funnelclear.xpm b/app/bin/bitmaps/funnelclear.xpm new file mode 100644 index 0000000..45d948f --- /dev/null +++ b/app/bin/bitmaps/funnelclear.xpm @@ -0,0 +1,124 @@ +/* XPM */ +static char * funnelclear_xpm[] = { +"16 16 105 2", +" c None", +". c #216262", +"+ c #123737", +"@ c #030A0A", +"# c #000000", +"$ c #010303", +"% c #050E0E", +"& c #091C1C", +"* c #0F2E2E", +"= c #164242", +"- c #1C5353", +"; c #76D1D1", +"> c #82D5D5", +", c #79D2D2", +"' c #62CBCB", +") c #65CCCC", +"! c #75D1D1", +"~ c #80D5D5", +"{ c #7AAEAE", +"] c #9D5E5E", +"^ c #6DA5A5", +"/ c #39ACAC", +"( c #3BB1B1", +"_ c #42C0C0", +": c #57C7C7", +"< c #8AB6B6", +"[ c #A21717", +"} c #7D4747", +"| c #92BABA", +"1 c #9F6464", +"2 c #FF7777", +"3 c #9C6060", +"4 c #6CA5A5", +"5 c #4BC3C3", +"6 c #7BD3D3", +"7 c #86B4B4", +"8 c #A16767", +"9 c #F87070", +"0 c #A70000", +"a c #9C0101", +"b c #FE7676", +"c c #D44C4C", +"d c #FA7272", +"e c #965C5C", +"f c #70AAAA", +"g c #85B4B4", +"h c #9B6464", +"i c #EA6262", +"j c #E45C5C", +"k c #A30000", +"l c #8C0303", +"m c #990000", +"n c #EF6767", +"o c #BE3636", +"p c #E65E5E", +"q c #955F5F", +"r c #996464", +"s c #D74F4F", +"t c #CD4545", +"u c #A00000", +"v c #A10000", +"w c #880000", +"x c #940000", +"y c #DB5353", +"z c #B72E2E", +"A c #C63D3D", +"B c #BA3131", +"C c #9F1515", +"D c #A81E1E", +"E c #9B0000", +"F c #9C0000", +"G c #830000", +"H c #8F0000", +"I c #B42525", +"J c #A21111", +"K c #A51414", +"L c #970000", +"M c #980000", +"N c #910000", +"O c #8B0000", +"P c #AF1515", +"Q c #AC1111", +"R c #920000", +"S c #8C0000", +"T c #8D0000", +"U c #B81111", +"V c #870000", +"W c #C41111", +"X c #800202", +"Y c #820000", +"Z c #D01111", +"` c #7C6161", +" . c #5A0606", +".. c #570000", +"+. c #720000", +"@. c #D81111", +"#. c #6C0000", +"$. c #5FAFAF", +"%. c #020606", +"&. c #340000", +"*. c #5F0000", +"=. c #270000", +"-. c #6AC2C2", +";. c #360000", +">. c #313333", +" ", +" . + @ # # # $ % & * = - . ", +" . ; ; ; > , ' ) ! ~ ; ; . ", +" . + ; { ] ^ / ( _ : < [ } ", +" + | 1 2 3 4 5 6 7 8 9 0 0 ", +" + a b c d e f g h i c j k ", +" l m n o p q r s o t u v ", +" w x y z A B C D E F ", +" G H I J J K L M ", +" N O P Q Q Q R N ", +" S T U U U U U U T S ", +" V V W W W X V W W W V V ", +" Y Z Z Z ` .G Y Z Z Z Y ", +" ..+.@.#.$.%. ..+.@.+... ", +" # &.*.=.-.$ # # ;.*.&.# ", +" # # >. "}; diff --git a/app/bin/bitmaps/go.xpm b/app/bin/bitmaps/go.xpm index b8a5478..deb8a81 100644 --- a/app/bin/bitmaps/go.xpm +++ b/app/bin/bitmaps/go.xpm @@ -1,22 +1,135 @@ -/* XPM */ -static char * go_xpm[] = { -"16 16 3 1", -" c None", -"X c #000000000000", -"o c #0000FFFF0000", -" XXXXX ", -" XXXXXXXXX ", -" XXoooooooXX ", -" XXoooooooooXX ", -" XoooooooooooX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -" XoooooooooooX ", -" XXoooooooooXX ", -" XXoooooooXX ", -" XXXXXXXXX ", -" XXXXX ", -" "}; +static char *go_x16[] = {
+ "16 16 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #006633",
+ "4 c #009933",
+ "5 c #339933",
+ "6 c #33CC33",
+ "7 c #33CC66",
+ "8 c #66CC66",
+ "9 c #66CC99",
+ "A c #99CC99",
+ "B c #99FF99",
+ "C c #99FFCC",
+ "D c #CCFFCC",
+ "E c #008000",
+ " 00 ",
+ " 1221 ",
+ " 11577511 ",
+ " 015788887510 ",
+ " 12678898887620 ",
+ " 14788AAAA877E0 ",
+ " 1478AACCA98740 ",
+ " 1478ACDDB98740 ",
+ " 1478ABCCA98740 ",
+ " 14789ABBA887E0 ",
+ " 147789AA9876E0 ",
+ " 11578888877410 ",
+ " 1377777631 ",
+ " 01476410 ",
+ " 1111 ",
+ " "};
+
+static char *go_x24[] = {
+ "24 24 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #006633",
+ "4 c #009900",
+ "5 c #009933",
+ "6 c #00CC33",
+ "7 c #339933",
+ "8 c #33CC33",
+ "9 c #33CC66",
+ "A c #66CC66",
+ "B c #66CC99",
+ "C c #99CC99",
+ "D c #99FF99",
+ "E c #99FFCC",
+ "F c #CCFFCC",
+ "G c #008000",
+ " ",
+ " 0110 ",
+ " 138721 ",
+ " 1279999711 ",
+ " 11799999999510 ",
+ " 015899AAAAAA99821 ",
+ " 125899AAABBAAA998510 ",
+ " 15899AABCCCBBAA986G0 ",
+ " 1589AABCCCCCCAA998G0 ",
+ " 1589AACCEEECCBAA98G0 ",
+ " 1599ABCCEFEECCAA9850 ",
+ " 1599ABCEEFFECCAA9850 ",
+ " 1599ABCDEFFECCAA9850 ",
+ " 1599AACCEEEECBAA9850 ",
+ " 1589AABCCCCCCBAA98G0 ",
+ " 15899AABCCCCBAA996G0 ",
+ " 14689AAABBBBAA9986G0 ",
+ " 1G899AAAAAAA9986G1 ",
+ " 117999AAAA998511 ",
+ " 128999999711 ",
+ " 015888821 ",
+ " 115G10 ",
+ " 10 ",
+ " "};
+
+static char *go_x32[] = {
+ "32 32 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #006633",
+ "4 c #009900",
+ "5 c #009933",
+ "6 c #00CC33",
+ "7 c #339933",
+ "8 c #33CC33",
+ "9 c #33CC66",
+ "A c #66CC66",
+ "B c #66CC99",
+ "C c #99CC99",
+ "D c #99FF99",
+ "E c #99FFCC",
+ "F c #CCFFCC",
+ "G c #008000",
+ " ",
+ " 11 ",
+ " 115310 ",
+ " 015888721 ",
+ " 138999998711 ",
+ " 1179999999998511 ",
+ " 1158999AAAAA9999831 ",
+ " 01G8899AAAAAAAAA9998511 ",
+ " 1258899AAAAAAAAAAA99986G1 ",
+ " 146899AAAABCCCBBAAA99886G0 ",
+ " 156899AAABCCCCCCBAAA9986G0 ",
+ " 15899AAABCCCCCCCCBAA9986G0 ",
+ " 15899AABCCCEEEDCCBAAA988G0 ",
+ " 15899AABCCEEEEEDCCBAA998G0 ",
+ " 1589AAACCCEEFFEECCBAA998G0 ",
+ " 1589AAACCDEFFFEECCBAA99850 ",
+ " 1589AAACCCEFFFEECCBAA998G0 ",
+ " 15899AABCCEEEEEDCCBAA998G0 ",
+ " 15899AABCCCEEEECCCAAA988G0 ",
+ " 15899AAABCCCCCCCCBAA9986G0 ",
+ " 156899AABCCCCCCCBAAA9986G0 ",
+ " 156899AAAABCCCBBAAA99886G0 ",
+ " 1G68899AAAAABAAAAAA9986520 ",
+ " 1158899AAAAAAAAA99986511 ",
+ " 1G88999AAAAAA9998711 ",
+ " 11589999999999821 ",
+ " 11789999998510 ",
+ " 1278888511 ",
+ " 0136511 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char **go_xpm[3] = { go_x16, go_x24, go_x32 };
+
diff --git a/app/bin/bitmaps/helix.xpm b/app/bin/bitmaps/helix.xpm new file mode 100644 index 0000000..d02bb29 --- /dev/null +++ b/app/bin/bitmaps/helix.xpm @@ -0,0 +1,95 @@ +static char *helix_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ " 1111 ",
+ " 1111111111 ",
+ " 11 11 11 ",
+ " 11 111111111 1 ",
+ "11111 1111",
+ "111 2222222 11",
+ "11 2222 22111",
+ "112 11111",
+ "111 1111 12",
+ "22111 1112",
+ "221 111111111 22",
+ "2211 1 22 ",
+ " 2 11111222222 ",
+ " 22 1122 ",
+ " 2222 ",
+ " 2222 "};
+
+static char *helix_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ " 11 ",
+ " 11111111111 ",
+ " 111 1111 ",
+ " 11 11 ",
+ " 11 11111111 1 ",
+ " 1 1111 11 11111 1 ",
+ " 11 111 111 1 ",
+ " 1 11 22 111 ",
+ " 111 22222222222 11 ",
+ " 11 222 222111 ",
+ " 11 22 1111 ",
+ " 112 1111 21 ",
+ " 111 1111111 11 ",
+ " 1211 1122",
+ " 22 111 111 2 ",
+ " 21 1111111111111 2 ",
+ " 221 1111111 2 ",
+ " 22 11 22 ",
+ " 2 1111 2222 ",
+ " 22 11111222222 ",
+ " 22 ",
+ " 22 ",
+ " 222222 ",
+ " 22 "};
+
+static char *helix_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ " 1 ",
+ " 1111111111111 ",
+ " 111111111111111111 ",
+ " 11111 11111 ",
+ " 111 1111 ",
+ " 111 1111111 111 ",
+ " 111 111111111111111 11 ",
+ " 11 1111111 11 11111111 11 ",
+ " 111 11111 11111 11 ",
+ " 11 111 11111 ",
+ " 11111 22222222222 1111 ",
+ " 1111 22222222222222222 111 ",
+ " 111 222222 2222221111 ",
+ " 111 2222 211111 ",
+ " 111222 1111211 ",
+ " 11122 1111111 211 ",
+ " 1111 1111111111 111 ",
+ " 12111 111111 1112 ",
+ " 2121111 111122 ",
+ " 211 11111 11111 22 ",
+ " 2211 1111111111111111111 22 ",
+ " 22111 111111111111111 222 ",
+ " 22 111 11 222 ",
+ " 222 1111 22222 ",
+ " 22 111111 222222 ",
+ " 22 11111111222222222 ",
+ " 222 11111222222 ",
+ " 2222 ",
+ " 22222 ",
+ " 2222222 ",
+ " 22222222 ",
+ " 2222 "};
+
+static char **helix_xpm[3] = { helix_x16, helix_x24, helix_x32 };
+
diff --git a/app/bin/bitmaps/hndldto.xpm b/app/bin/bitmaps/hndldto.xpm deleted file mode 100644 index f49fef6..0000000 --- a/app/bin/bitmaps/hndldto.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * hndldto_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" . . ", -" .. ", -" . ... ", -" .. . . ", -" . .. ", -" . ...... . ", -"... ....... ... ", -" . ........ . ", -" . .. . ", -"..... .. ...... ", -" . .. . . ", -" .. ", -" .. ", -" .. ", -" .. ", -" "}; diff --git a/app/bin/bitmaps/join-line.xpm b/app/bin/bitmaps/join-line.xpm new file mode 100644 index 0000000..1912e9a --- /dev/null +++ b/app/bin/bitmaps/join-line.xpm @@ -0,0 +1,99 @@ +static char *join_line_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " ",
+ " 00",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 223 ",
+ " 222 ",
+ " 222 ",
+ " 2 ",
+ " 2 ",
+ " 2 ",
+ " 2 2 ",
+ " 222 ",
+ " 022 ",
+ " 00000 22 ",
+ " 000 "};
+
+static char *join_line_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " ",
+ " 0 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 00 ",
+ " 2223 ",
+ " 2222 ",
+ " 2222 ",
+ " 22 ",
+ " 2 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 2 22 ",
+ " 22222 ",
+ " 222 ",
+ " 0122 ",
+ " 0000 22 ",
+ " 000000 ",
+ " "};
+
+static char *join_line_x32[] = {
+ "32 32 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #990000",
+ "3 c #CC0000",
+ "4 c #800000",
+ " ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 0 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 21 ",
+ " 333333 ",
+ " 3333333 ",
+ " 33333 ",
+ " 33 33 ",
+ " 333 ",
+ " 33 ",
+ " 33 ",
+ " 333 ",
+ " 333 ",
+ " 333 ",
+ " 333 ",
+ " 333 ",
+ " 33 333 ",
+ " 33 3333 ",
+ " 33333 ",
+ " 3333 ",
+ " 04333 ",
+ " 0000 333 ",
+ " 0000000 3 ",
+ " 00000 ",
+ " "};
+
+static char **join_line_xpm[3] = { join_line_x16, join_line_x24, join_line_x32 };
+
diff --git a/app/bin/bitmaps/join.xpm b/app/bin/bitmaps/join.xpm index b42f2cb..944e443 100644 --- a/app/bin/bitmaps/join.xpm +++ b/app/bin/bitmaps/join.xpm @@ -1,22 +1,117 @@ -/* XPM */ -static char * join_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ", -" . .", -" . ", -" . . .", -" . ", -" . . .", -" . ", -" XXX . .", -". . XX ", -"..... X X X ", -". . X X ", -". .XXXX ", -". . X ", -"..... X ", -". . "}; +static char *join_x16[] = {
+ "16 16 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #990000",
+ "6 c #996600",
+ "7 c #CC0000",
+ "8 c #CC3300",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #800000",
+ " 66 0 ",
+ " 66A2A",
+ " 20 0 ",
+ " A4964 ",
+ " 3 46 ",
+ " 7777B ",
+ " 777 ",
+ " 77 ",
+ " 7 ",
+ " 7 ",
+ " 7 77 ",
+ " 9161777 ",
+ "0406977 ",
+ " A A6157 ",
+ "04006 ",
+ " 9 A "};
+
+static char *join_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " 0 ",
+ " 8558827 ",
+ " 338818 ",
+ " 00 0 ",
+ " 825 0 ",
+ " 7288538 ",
+ " 00 158 ",
+ " 6666660 ",
+ " 6666664 ",
+ " 66666 ",
+ " 66 666 ",
+ " 666 6 ",
+ " 666 ",
+ " 666 ",
+ " 6 666 ",
+ " 66 666 ",
+ " 666666 ",
+ " 7 33066666 ",
+ " 02007 666 ",
+ " 8 8866666 ",
+ " 8 8500466 ",
+ " 350005 ",
+ " 15 8 ",
+ " 8 "};
+
+static char *join_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #990000",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ "9 c #800000",
+ " ",
+ " 20 00 ",
+ " 855888558 ",
+ " 00 05 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 88388 0 ",
+ " 03888758 ",
+ " 0 038 ",
+ " 64666 0 ",
+ " 666666660 ",
+ " 666666664 ",
+ " 666666 ",
+ " 666 666 ",
+ " 666 666 ",
+ " 6666 ",
+ " 6666 ",
+ " 6666 ",
+ " 6666 ",
+ " 66 6666 ",
+ " 66 6666 ",
+ " 666 66666 ",
+ " 87096666666 ",
+ " 88 0320666666 ",
+ " 0100038 66666 ",
+ " 78 8 666666 ",
+ " 88 88 46666 ",
+ " 88 7000 666 ",
+ " 57000033 ",
+ " 02300 88 ",
+ " 8 8 ",
+ " 8 "};
+
+static char **join_xpm[3] = { join_x16, join_x24, join_x32 };
+
diff --git a/app/bin/bitmaps/joinline.xpm b/app/bin/bitmaps/joinline.xpm deleted file mode 100644 index 06e22f8..0000000 --- a/app/bin/bitmaps/joinline.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * joinline_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ", -" ", -" .", -" ..", -" ...", -" ... ", -" ... ", -" XXX ", -" X X ", -" X X X ", -".....X X ", -".....XXXX ", -"..... X ", -" X ", -" "};
\ No newline at end of file diff --git a/app/bin/bitmaps/l1.xbm b/app/bin/bitmaps/l1.xbm index e332794..031edd1 100644 --- a/app/bin/bitmaps/l1.xbm +++ b/app/bin/bitmaps/l1.xbm @@ -1,6 +1,78 @@ -#define l1_width 14 -#define l1_height 16 -static char l1_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x50, 0x00, - 0x48, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l1_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x80, 0x03,
+ 0xC0, 0x03,
+ 0xE0, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l1_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1E, 0x00,
+ 0x00, 0x1E, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x1D, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l1_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xF0, 0x00, 0x00,
+ 0x00, 0xF8, 0x00, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0xFE, 0x00, 0x00,
+ 0x00, 0xE6, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0xE0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l10.xbm b/app/bin/bitmaps/l10.xbm index 0cf7dc8..10920b9 100644 --- a/app/bin/bitmaps/l10.xbm +++ b/app/bin/bitmaps/l10.xbm @@ -1,6 +1,78 @@ -#define l10_width 14 -#define l10_height 16 -static char l10_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x18, - 0x89, 0x14, 0x88, 0x12, 0x88, 0x11, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l10_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3F,
+ 0x7C, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l10_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xF0, 0x39, 0x06,
+ 0xD8, 0x39, 0x06,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x31, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l10_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0xC0, 0x03, 0xEF, 0x01,
+ 0xE0, 0x83, 0xC7, 0x01,
+ 0xF0, 0x83, 0xC3, 0x03,
+ 0xF8, 0x83, 0xC3, 0x03,
+ 0x98, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xC7, 0x01,
+ 0x80, 0x03, 0xEF, 0x01,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l11.xbm b/app/bin/bitmaps/l11.xbm index c38f98b..ce82cfe 100644 --- a/app/bin/bitmaps/l11.xbm +++ b/app/bin/bitmaps/l11.xbm @@ -1,6 +1,78 @@ -#define l11_width 14 -#define l11_height 16 -static char l11_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x0C, 0x06, 0x0A, 0x05, - 0x89, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l11_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1C,
+ 0x78, 0x1E,
+ 0x7C, 0x1F,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l11_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xF0, 0xE1, 0x03,
+ 0xD8, 0xB1, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l11_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0xC0, 0x03, 0x78, 0x00,
+ 0xE0, 0x03, 0x7C, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x03, 0x7F, 0x00,
+ 0x98, 0x03, 0x73, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x80, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l12.xbm b/app/bin/bitmaps/l12.xbm index 19b8726..e660ef3 100644 --- a/app/bin/bitmaps/l12.xbm +++ b/app/bin/bitmaps/l12.xbm @@ -1,6 +1,78 @@ -#define l12_width 14 -#define l12_height 16 -static char l12_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10, - 0x09, 0x08, 0x08, 0x04, 0x08, 0x02, 0x08, 0x01, 0x88, 0x00, 0x88, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l12_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3F,
+ 0x7C, 0x33,
+ 0x70, 0x30,
+ 0x70, 0x38,
+ 0x70, 0x1C,
+ 0x70, 0x0E,
+ 0x70, 0x07,
+ 0x70, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l12_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x39, 0x06,
+ 0xF0, 0x39, 0x0E,
+ 0xD8, 0x01, 0x0E,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x01, 0x07,
+ 0xC0, 0x81, 0x07,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0xC1, 0x01,
+ 0xC0, 0xE1, 0x01,
+ 0xC0, 0xF1, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x79, 0x00,
+ 0xC0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l12_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0xFE, 0x00,
+ 0x80, 0x03, 0xFF, 0x01,
+ 0xC0, 0x83, 0xE7, 0x03,
+ 0xE0, 0x83, 0xC3, 0x03,
+ 0xF0, 0xC3, 0x83, 0x03,
+ 0xF8, 0xC3, 0x83, 0x03,
+ 0x98, 0x03, 0x80, 0x03,
+ 0x80, 0x03, 0xC0, 0x03,
+ 0x80, 0x03, 0xC0, 0x03,
+ 0x80, 0x03, 0xE0, 0x01,
+ 0x80, 0x03, 0xF0, 0x01,
+ 0x80, 0x03, 0xF8, 0x00,
+ 0x80, 0x03, 0x78, 0x00,
+ 0x80, 0x03, 0x3C, 0x00,
+ 0x80, 0x03, 0x1E, 0x00,
+ 0x80, 0x03, 0x0F, 0x00,
+ 0x80, 0x83, 0x07, 0x00,
+ 0x80, 0x83, 0x07, 0x00,
+ 0x80, 0xC3, 0xFF, 0x03,
+ 0x80, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l13.xbm b/app/bin/bitmaps/l13.xbm index 812bbe3..a11c7f7 100644 --- a/app/bin/bitmaps/l13.xbm +++ b/app/bin/bitmaps/l13.xbm @@ -1,6 +1,78 @@ -#define l13_width 14 -#define l13_height 16 -static char l13_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x0A, 0x10, - 0x09, 0x10, 0x08, 0x0E, 0x08, 0x10, 0x08, 0x10, 0x88, 0x10, 0x08, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l13_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3B,
+ 0x7C, 0x38,
+ 0x70, 0x18,
+ 0x70, 0x3C,
+ 0x70, 0x38,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l13_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x39, 0x07,
+ 0xF0, 0x01, 0x07,
+ 0xD8, 0x01, 0x07,
+ 0xC0, 0x01, 0x07,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0xC1, 0x07,
+ 0xC0, 0x01, 0x07,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l13_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0xC0, 0x83, 0xE7, 0x01,
+ 0xE0, 0x83, 0xC7, 0x01,
+ 0xF0, 0x83, 0xC3, 0x03,
+ 0xF8, 0x03, 0xC0, 0x03,
+ 0x98, 0x03, 0xC0, 0x01,
+ 0x80, 0x03, 0xE0, 0x01,
+ 0x80, 0x03, 0xFC, 0x00,
+ 0x80, 0x03, 0xFC, 0x00,
+ 0x80, 0x03, 0xE0, 0x01,
+ 0x80, 0x03, 0xC0, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0x83, 0xC7, 0x03,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x03, 0xFF, 0x01,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l14.xbm b/app/bin/bitmaps/l14.xbm index 63f2e44..765ca93 100644 --- a/app/bin/bitmaps/l14.xbm +++ b/app/bin/bitmaps/l14.xbm @@ -1,6 +1,78 @@ -#define l14_width 14 -#define l14_height 16 -static char l14_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x0C, 0x0C, 0x0A, 0x0A, - 0x09, 0x09, 0x88, 0x08, 0x88, 0x1F, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l14_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1C,
+ 0x78, 0x1C,
+ 0x7C, 0x1E,
+ 0x70, 0x1E,
+ 0x70, 0x1F,
+ 0x70, 0x1B,
+ 0xF0, 0x3F,
+ 0x70, 0x18,
+ 0x70, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l14_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0x81, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xF0, 0xC1, 0x03,
+ 0xD8, 0xE1, 0x03,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0xF1, 0x03,
+ 0xC0, 0xB1, 0x03,
+ 0xC0, 0xB9, 0x03,
+ 0xC0, 0x99, 0x03,
+ 0xC0, 0xFD, 0x0F,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l14_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0xF0, 0x00,
+ 0x80, 0x03, 0xF0, 0x00,
+ 0xC0, 0x03, 0xF8, 0x00,
+ 0xE0, 0x03, 0xF8, 0x00,
+ 0xF0, 0x03, 0xFC, 0x00,
+ 0xF8, 0x03, 0xFC, 0x00,
+ 0x98, 0x03, 0xFE, 0x00,
+ 0x80, 0x03, 0xEE, 0x00,
+ 0x80, 0x03, 0xEF, 0x00,
+ 0x80, 0x83, 0xE7, 0x00,
+ 0x80, 0x83, 0xE7, 0x00,
+ 0x80, 0xC3, 0xE3, 0x00,
+ 0x80, 0xC3, 0xE1, 0x00,
+ 0x80, 0xE3, 0xFF, 0x03,
+ 0x80, 0xE3, 0xFF, 0x03,
+ 0x80, 0x03, 0xE0, 0x00,
+ 0x80, 0x03, 0xE0, 0x00,
+ 0x80, 0x03, 0xE0, 0x00,
+ 0x80, 0x03, 0xE0, 0x00,
+ 0x80, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l15.xbm b/app/bin/bitmaps/l15.xbm index 4d66f1b..7850754 100644 --- a/app/bin/bitmaps/l15.xbm +++ b/app/bin/bitmaps/l15.xbm @@ -1,6 +1,78 @@ -#define l15_width 14 -#define l15_height 16 -static char l15_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x1F, 0x8C, 0x00, 0x8A, 0x00, - 0x89, 0x0F, 0x08, 0x10, 0x08, 0x10, 0x08, 0x10, 0x88, 0x10, 0x08, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l15_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x3F,
+ 0x78, 0x07,
+ 0x7C, 0x07,
+ 0x70, 0x1F,
+ 0x70, 0x3B,
+ 0x70, 0x30,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l15_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xF1, 0x07,
+ 0xE0, 0x71, 0x00,
+ 0xE0, 0x71, 0x00,
+ 0xF0, 0x31, 0x00,
+ 0xD8, 0x31, 0x00,
+ 0xC0, 0xF9, 0x03,
+ 0xC0, 0x79, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l15_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0xFF, 0x03,
+ 0x80, 0x03, 0xFF, 0x03,
+ 0xC0, 0x03, 0x07, 0x00,
+ 0xE0, 0x03, 0x07, 0x00,
+ 0xF0, 0x83, 0x07, 0x00,
+ 0xF8, 0x83, 0x07, 0x00,
+ 0x98, 0x83, 0x7F, 0x00,
+ 0x80, 0x83, 0xFF, 0x01,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x03, 0xC0, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0xC3, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l16.xbm b/app/bin/bitmaps/l16.xbm index 84366d3..88e94f6 100644 --- a/app/bin/bitmaps/l16.xbm +++ b/app/bin/bitmaps/l16.xbm @@ -1,6 +1,78 @@ -#define l16_width 14 -#define l16_height 16 -static char l16_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x00, 0x8A, 0x00, - 0x89, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l16_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3F,
+ 0x7C, 0x03,
+ 0x70, 0x1F,
+ 0x70, 0x3F,
+ 0x70, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l16_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xF0, 0x39, 0x00,
+ 0xD8, 0x39, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0xF9, 0x03,
+ 0xC0, 0x79, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x31, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l16_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0xFC, 0x00,
+ 0x80, 0x03, 0xFF, 0x01,
+ 0xC0, 0x03, 0xEF, 0x01,
+ 0xE0, 0x83, 0xC7, 0x03,
+ 0xF0, 0x83, 0xC3, 0x03,
+ 0xF8, 0x83, 0x03, 0x00,
+ 0x98, 0xC3, 0x03, 0x00,
+ 0x80, 0xC3, 0x7F, 0x00,
+ 0x80, 0xC3, 0xFF, 0x01,
+ 0x80, 0xC3, 0xEF, 0x01,
+ 0x80, 0xC3, 0xC7, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0x83, 0x83, 0x03,
+ 0x80, 0x83, 0xC7, 0x03,
+ 0x80, 0x83, 0xEF, 0x01,
+ 0x80, 0x03, 0xFF, 0x01,
+ 0x80, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l17.xbm b/app/bin/bitmaps/l17.xbm index 0881871..df3fb94 100644 --- a/app/bin/bitmaps/l17.xbm +++ b/app/bin/bitmaps/l17.xbm @@ -1,6 +1,78 @@ -#define l17_width 14 -#define l17_height 16 -static char l17_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x1F, 0x0C, 0x10, 0x0A, 0x08, - 0x09, 0x08, 0x08, 0x04, 0x08, 0x04, 0x08, 0x02, 0x08, 0x02, 0x08, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l17_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x3F,
+ 0x78, 0x38,
+ 0x7C, 0x18,
+ 0x70, 0x1C,
+ 0x70, 0x0C,
+ 0x70, 0x0E,
+ 0x70, 0x0E,
+ 0x70, 0x06,
+ 0x70, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l17_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xF9, 0x0F,
+ 0xE0, 0x01, 0x0F,
+ 0xE0, 0x01, 0x07,
+ 0xF0, 0x81, 0x03,
+ 0xD8, 0x81, 0x03,
+ 0xC0, 0xC1, 0x01,
+ 0xC0, 0xC1, 0x01,
+ 0xC0, 0xC1, 0x01,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l17_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xC3, 0xFF, 0x03,
+ 0x80, 0xC3, 0xFF, 0x03,
+ 0xC0, 0x03, 0xC0, 0x03,
+ 0xE0, 0x03, 0xE0, 0x01,
+ 0xF0, 0x03, 0xE0, 0x01,
+ 0xF8, 0x03, 0xF0, 0x00,
+ 0x98, 0x03, 0xF0, 0x00,
+ 0x80, 0x03, 0x78, 0x00,
+ 0x80, 0x03, 0x78, 0x00,
+ 0x80, 0x03, 0x38, 0x00,
+ 0x80, 0x03, 0x3C, 0x00,
+ 0x80, 0x03, 0x3C, 0x00,
+ 0x80, 0x03, 0x1C, 0x00,
+ 0x80, 0x03, 0x1E, 0x00,
+ 0x80, 0x03, 0x1E, 0x00,
+ 0x80, 0x03, 0x1E, 0x00,
+ 0x80, 0x03, 0x1E, 0x00,
+ 0x80, 0x03, 0x0E, 0x00,
+ 0x80, 0x03, 0x0E, 0x00,
+ 0x80, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l18.xbm b/app/bin/bitmaps/l18.xbm index 3e9074c..7ab0b30 100644 --- a/app/bin/bitmaps/l18.xbm +++ b/app/bin/bitmaps/l18.xbm @@ -1,6 +1,78 @@ -#define l18_width 14 -#define l18_height 16 -static char l18_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10, - 0x89, 0x10, 0x08, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x88, 0x10, 0x08, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l18_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3F,
+ 0x7C, 0x3B,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l18_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xF0, 0x39, 0x07,
+ 0xD8, 0x39, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l18_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0xC0, 0x83, 0xEF, 0x01,
+ 0xE0, 0x83, 0xC7, 0x01,
+ 0xF0, 0x83, 0xC3, 0x03,
+ 0xF8, 0x83, 0xC3, 0x03,
+ 0x98, 0x83, 0xC7, 0x01,
+ 0x80, 0x03, 0xEF, 0x01,
+ 0x80, 0x03, 0xFE, 0x00,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x03, 0xFF, 0x01,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l19.xbm b/app/bin/bitmaps/l19.xbm index 71beff5..08aee34 100644 --- a/app/bin/bitmaps/l19.xbm +++ b/app/bin/bitmaps/l19.xbm @@ -1,6 +1,78 @@ -#define l19_width 14 -#define l19_height 16 -static char l19_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0F, 0x8C, 0x10, 0x8A, 0x10, - 0x89, 0x10, 0x08, 0x1F, 0x08, 0x10, 0x08, 0x10, 0x08, 0x08, 0x08, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l19_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x78, 0x3F,
+ 0x7C, 0x33,
+ 0x70, 0x33,
+ 0x70, 0x3F,
+ 0x70, 0x3E,
+ 0x70, 0x30,
+ 0x70, 0x3B,
+ 0x70, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l19_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x01,
+ 0xE0, 0x71, 0x07,
+ 0xE0, 0x39, 0x07,
+ 0xF0, 0x39, 0x06,
+ 0xD8, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x0F,
+ 0xC0, 0x71, 0x0F,
+ 0xC0, 0xE1, 0x0F,
+ 0xC0, 0x01, 0x0E,
+ 0xC0, 0x01, 0x06,
+ 0xC0, 0x01, 0x06,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x03,
+ 0xC0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l19_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0xC0, 0x83, 0xEF, 0x01,
+ 0xE0, 0x83, 0xC7, 0x01,
+ 0xF0, 0xC3, 0x83, 0x03,
+ 0xF8, 0xC3, 0x83, 0x03,
+ 0x98, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0xC3, 0x83, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xE7, 0x03,
+ 0x80, 0x03, 0xFF, 0x03,
+ 0x80, 0x03, 0xFE, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0x03, 0x80, 0x03,
+ 0x80, 0x83, 0xC3, 0x03,
+ 0x80, 0x83, 0xC3, 0x01,
+ 0x80, 0x83, 0xE7, 0x01,
+ 0x80, 0x03, 0xFF, 0x00,
+ 0x80, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l2.xbm b/app/bin/bitmaps/l2.xbm index 5efcb45..4ab709c 100644 --- a/app/bin/bitmaps/l2.xbm +++ b/app/bin/bitmaps/l2.xbm @@ -1,6 +1,78 @@ -#define l2_width 14 -#define l2_height 16 -static char l2_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, - 0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0xF8, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l2_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xC0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x06,
+ 0x00, 0x06,
+ 0x00, 0x07,
+ 0x80, 0x03,
+ 0xC0, 0x01,
+ 0xE0, 0x00,
+ 0xE0, 0x07,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l2_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x3C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x0E, 0x00,
+ 0x00, 0x0F, 0x00,
+ 0x80, 0x07, 0x00,
+ 0x80, 0x03, 0x00,
+ 0xC0, 0x03, 0x00,
+ 0xC0, 0x7F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l2_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0x01, 0x00,
+ 0x00, 0xFE, 0x03, 0x00,
+ 0x00, 0xCF, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0xC0, 0x03, 0x00,
+ 0x00, 0xE0, 0x03, 0x00,
+ 0x00, 0xF0, 0x01, 0x00,
+ 0x00, 0xF0, 0x00, 0x00,
+ 0x00, 0x78, 0x00, 0x00,
+ 0x00, 0x3C, 0x00, 0x00,
+ 0x00, 0x1E, 0x00, 0x00,
+ 0x00, 0x0F, 0x00, 0x00,
+ 0x00, 0x0F, 0x00, 0x00,
+ 0x80, 0xFF, 0x07, 0x00,
+ 0x80, 0xFF, 0x07, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l20.xbm b/app/bin/bitmaps/l20.xbm index 3b89521..9da3bef 100644 --- a/app/bin/bitmaps/l20.xbm +++ b/app/bin/bitmaps/l20.xbm @@ -1,6 +1,78 @@ -#define l20_width 14 -#define l20_height 16 -static char l20_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18, - 0x90, 0x14, 0x88, 0x12, 0x84, 0x11, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l20_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xC0, 0x33,
+ 0xE0, 0x33,
+ 0x70, 0x33,
+ 0x38, 0x33,
+ 0x1C, 0x3F,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l20_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x33, 0x07,
+ 0x1C, 0x3F, 0x06,
+ 0x00, 0x3F, 0x06,
+ 0x00, 0x3F, 0x0E,
+ 0x80, 0x3B, 0x0E,
+ 0xC0, 0x3B, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xE0, 0x38, 0x0E,
+ 0xF0, 0x38, 0x06,
+ 0x78, 0x38, 0x06,
+ 0x38, 0x30, 0x07,
+ 0x3C, 0x70, 0x07,
+ 0xFC, 0xE7, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l20_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x3C, 0x1F, 0xEF, 0x01,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0x80, 0xCF, 0x83, 0x03,
+ 0xC0, 0xC7, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0x78, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xC7, 0x01,
+ 0x3C, 0x00, 0xEF, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l21.xbm b/app/bin/bitmaps/l21.xbm index 4c21534..32d81cc 100644 --- a/app/bin/bitmaps/l21.xbm +++ b/app/bin/bitmaps/l21.xbm @@ -1,6 +1,78 @@ -#define l21_width 14 -#define l21_height 16 -static char l21_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05, - 0x90, 0x04, 0x08, 0x04, 0x04, 0x04, 0x02, 0x04, 0x01, 0x04, 0x3F, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l21_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1E,
+ 0xCC, 0x1F,
+ 0xC0, 0x1C,
+ 0xE0, 0x1C,
+ 0x70, 0x1C,
+ 0x38, 0x1C,
+ 0x1C, 0x1C,
+ 0xFC, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l21_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0xC3, 0x03,
+ 0x1C, 0xC3, 0x03,
+ 0x1C, 0xE7, 0x03,
+ 0x00, 0xB7, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x80, 0x83, 0x03,
+ 0xC0, 0x83, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0x80, 0x03,
+ 0xF0, 0x80, 0x03,
+ 0x78, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x3C, 0x80, 0x03,
+ 0xFC, 0x87, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l21_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0x70, 0x00,
+ 0xF8, 0x0F, 0x70, 0x00,
+ 0x3C, 0x1F, 0x78, 0x00,
+ 0x1C, 0x1E, 0x7C, 0x00,
+ 0x1E, 0x1C, 0x7E, 0x00,
+ 0x1E, 0x1C, 0x7F, 0x00,
+ 0x00, 0x1C, 0x73, 0x00,
+ 0x00, 0x1E, 0x70, 0x00,
+ 0x00, 0x1E, 0x70, 0x00,
+ 0x00, 0x0F, 0x70, 0x00,
+ 0x80, 0x0F, 0x70, 0x00,
+ 0xC0, 0x07, 0x70, 0x00,
+ 0xC0, 0x03, 0x70, 0x00,
+ 0xE0, 0x01, 0x70, 0x00,
+ 0xF0, 0x00, 0x70, 0x00,
+ 0x78, 0x00, 0x70, 0x00,
+ 0x3C, 0x00, 0x70, 0x00,
+ 0x3C, 0x00, 0x70, 0x00,
+ 0xFE, 0x1F, 0x70, 0x00,
+ 0xFE, 0x1F, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l22.xbm b/app/bin/bitmaps/l22.xbm index 1d3d0b8..9cfc394 100644 --- a/app/bin/bitmaps/l22.xbm +++ b/app/bin/bitmaps/l22.xbm @@ -1,6 +1,78 @@ -#define l22_width 14 -#define l22_height 16 -static char l22_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x81, 0x00, 0xBF, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l22_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xC0, 0x30,
+ 0xE0, 0x38,
+ 0x70, 0x1C,
+ 0x38, 0x0E,
+ 0x1C, 0x07,
+ 0xFC, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l22_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x3B, 0x06,
+ 0x1C, 0x3F, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x80, 0x03, 0x07,
+ 0xC0, 0x83, 0x07,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0xC0, 0x01,
+ 0xF0, 0xE0, 0x01,
+ 0x78, 0xF0, 0x00,
+ 0x38, 0x70, 0x00,
+ 0x3C, 0x78, 0x00,
+ 0xFC, 0xFF, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l22_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0xFE, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0x3C, 0x9F, 0xE7, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x0F, 0xE0, 0x01,
+ 0x80, 0x0F, 0xF0, 0x01,
+ 0xC0, 0x07, 0xF8, 0x00,
+ 0xC0, 0x03, 0x78, 0x00,
+ 0xE0, 0x01, 0x3C, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0x78, 0x00, 0x0F, 0x00,
+ 0x3C, 0x80, 0x07, 0x00,
+ 0x3C, 0x80, 0x07, 0x00,
+ 0xFE, 0xDF, 0xFF, 0x03,
+ 0xFE, 0xDF, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l23.xbm b/app/bin/bitmaps/l23.xbm index 27bb4ad..efb4ac4 100644 --- a/app/bin/bitmaps/l23.xbm +++ b/app/bin/bitmaps/l23.xbm @@ -1,6 +1,78 @@ -#define l23_width 14 -#define l23_height 16 -static char l23_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10, - 0x10, 0x10, 0x08, 0x0E, 0x04, 0x10, 0x02, 0x10, 0x81, 0x10, 0x3F, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l23_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3B,
+ 0xCC, 0x38,
+ 0xC0, 0x18,
+ 0xE0, 0x3C,
+ 0x70, 0x38,
+ 0x38, 0x33,
+ 0x1C, 0x3F,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l23_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x3B, 0x07,
+ 0x1C, 0x07, 0x07,
+ 0x00, 0x07, 0x07,
+ 0x00, 0x07, 0x07,
+ 0x80, 0x83, 0x03,
+ 0xC0, 0xC3, 0x07,
+ 0xC0, 0x01, 0x07,
+ 0xE0, 0x00, 0x0E,
+ 0xF0, 0x00, 0x0E,
+ 0x78, 0x38, 0x0E,
+ 0x38, 0x38, 0x07,
+ 0x3C, 0x70, 0x07,
+ 0xFC, 0xE7, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l23_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x3C, 0x9F, 0xE7, 0x01,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x1C, 0xC0, 0x03,
+ 0x00, 0x1C, 0xC0, 0x01,
+ 0x00, 0x1E, 0xE0, 0x01,
+ 0x00, 0x1E, 0xFC, 0x00,
+ 0x00, 0x0F, 0xFC, 0x00,
+ 0x80, 0x0F, 0xE0, 0x01,
+ 0xC0, 0x07, 0xC0, 0x03,
+ 0xC0, 0x03, 0x80, 0x03,
+ 0xE0, 0x01, 0x80, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0x78, 0xC0, 0x83, 0x03,
+ 0x3C, 0x80, 0xC7, 0x03,
+ 0x3C, 0x80, 0xE7, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x01,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l24.xbm b/app/bin/bitmaps/l24.xbm index 8b2efc5..8fd49ae 100644 --- a/app/bin/bitmaps/l24.xbm +++ b/app/bin/bitmaps/l24.xbm @@ -1,6 +1,78 @@ -#define l24_width 14 -#define l24_height 16 -static char l24_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A, - 0x10, 0x09, 0x88, 0x08, 0x84, 0x1F, 0x02, 0x08, 0x01, 0x08, 0x3F, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l24_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1C,
+ 0xCC, 0x1E,
+ 0xC0, 0x1E,
+ 0xE0, 0x1F,
+ 0x70, 0x1B,
+ 0xB8, 0x3F,
+ 0x1C, 0x18,
+ 0xFC, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l24_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x1C, 0xC3, 0x03,
+ 0x1C, 0xC7, 0x03,
+ 0x00, 0xE7, 0x03,
+ 0x00, 0xE7, 0x03,
+ 0x80, 0xF3, 0x03,
+ 0xC0, 0xB3, 0x03,
+ 0xC0, 0xB9, 0x03,
+ 0xE0, 0x98, 0x03,
+ 0xF0, 0xFC, 0x0F,
+ 0x78, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x3C, 0x80, 0x03,
+ 0xFC, 0x87, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l24_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0xF0, 0x00,
+ 0xF8, 0x0F, 0xF0, 0x00,
+ 0x3C, 0x1F, 0xF8, 0x00,
+ 0x1C, 0x1E, 0xF8, 0x00,
+ 0x1E, 0x1C, 0xFC, 0x00,
+ 0x1E, 0x1C, 0xFC, 0x00,
+ 0x00, 0x1C, 0xFE, 0x00,
+ 0x00, 0x1E, 0xEE, 0x00,
+ 0x00, 0x1E, 0xEF, 0x00,
+ 0x00, 0x8F, 0xE7, 0x00,
+ 0x80, 0x8F, 0xE7, 0x00,
+ 0xC0, 0xC7, 0xE3, 0x00,
+ 0xC0, 0xC3, 0xE1, 0x00,
+ 0xE0, 0xE1, 0xFF, 0x03,
+ 0xF0, 0xE0, 0xFF, 0x03,
+ 0x78, 0x00, 0xE0, 0x00,
+ 0x3C, 0x00, 0xE0, 0x00,
+ 0x3C, 0x00, 0xE0, 0x00,
+ 0xFE, 0x1F, 0xE0, 0x00,
+ 0xFE, 0x1F, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l25.xbm b/app/bin/bitmaps/l25.xbm index f4751dc..6bf1e2b 100644 --- a/app/bin/bitmaps/l25.xbm +++ b/app/bin/bitmaps/l25.xbm @@ -1,6 +1,78 @@ -#define l25_width 14 -#define l25_height 16 -static char l25_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00, - 0x90, 0x0F, 0x08, 0x10, 0x04, 0x10, 0x02, 0x10, 0x81, 0x10, 0x3F, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l25_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x07,
+ 0xCC, 0x07,
+ 0xC0, 0x1F,
+ 0xE0, 0x3B,
+ 0x70, 0x30,
+ 0x38, 0x33,
+ 0x1C, 0x3F,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l25_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF1, 0x07,
+ 0xB8, 0x73, 0x00,
+ 0x1C, 0x73, 0x00,
+ 0x1C, 0x37, 0x00,
+ 0x00, 0x37, 0x00,
+ 0x00, 0xFF, 0x03,
+ 0x80, 0x7B, 0x07,
+ 0xC0, 0x3B, 0x07,
+ 0xC0, 0x01, 0x0E,
+ 0xE0, 0x00, 0x0E,
+ 0xF0, 0x00, 0x0E,
+ 0x78, 0x38, 0x06,
+ 0x38, 0x38, 0x07,
+ 0x3C, 0x70, 0x07,
+ 0xFC, 0xE7, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l25_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0xFF, 0x03,
+ 0xF8, 0x0F, 0xFF, 0x03,
+ 0x3C, 0x1F, 0x07, 0x00,
+ 0x1C, 0x1E, 0x07, 0x00,
+ 0x1E, 0x9C, 0x07, 0x00,
+ 0x1E, 0x9C, 0x07, 0x00,
+ 0x00, 0x9C, 0x7F, 0x00,
+ 0x00, 0x9E, 0xFF, 0x01,
+ 0x00, 0x9E, 0xE7, 0x01,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x0F, 0xC0, 0x03,
+ 0xC0, 0x07, 0x80, 0x03,
+ 0xC0, 0x03, 0x80, 0x03,
+ 0xE0, 0x01, 0x80, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0x78, 0xC0, 0xC3, 0x03,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xE7, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l26.xbm b/app/bin/bitmaps/l26.xbm index 9e67365..ebed83b 100644 --- a/app/bin/bitmaps/l26.xbm +++ b/app/bin/bitmaps/l26.xbm @@ -1,6 +1,78 @@ -#define l26_width 14 -#define l26_height 16 -static char l26_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00, - 0x90, 0x0F, 0x88, 0x10, 0x84, 0x10, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l26_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x03,
+ 0xC0, 0x1F,
+ 0xE0, 0x3F,
+ 0x70, 0x33,
+ 0x38, 0x33,
+ 0x1C, 0x3F,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l26_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x33, 0x07,
+ 0x1C, 0x3F, 0x00,
+ 0x00, 0x3F, 0x00,
+ 0x00, 0x3F, 0x00,
+ 0x80, 0xFB, 0x03,
+ 0xC0, 0x7B, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xE0, 0x38, 0x0E,
+ 0xF0, 0x38, 0x0E,
+ 0x78, 0x38, 0x0E,
+ 0x38, 0x30, 0x07,
+ 0x3C, 0x70, 0x07,
+ 0xFC, 0xE7, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l26_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0xFC, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0x3C, 0x1F, 0xEF, 0x01,
+ 0x1C, 0x9E, 0xC7, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0x03, 0x00,
+ 0x00, 0xDC, 0x03, 0x00,
+ 0x00, 0xDE, 0x7F, 0x00,
+ 0x00, 0xDE, 0xFF, 0x01,
+ 0x00, 0xCF, 0xEF, 0x01,
+ 0x80, 0xCF, 0xC7, 0x03,
+ 0xC0, 0xC7, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0x78, 0x80, 0x83, 0x03,
+ 0x3C, 0x80, 0xC7, 0x03,
+ 0x3C, 0x80, 0xEF, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x01,
+ 0xFE, 0x1F, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l27.xbm b/app/bin/bitmaps/l27.xbm index abdbb55..d611f65 100644 --- a/app/bin/bitmaps/l27.xbm +++ b/app/bin/bitmaps/l27.xbm @@ -1,6 +1,78 @@ -#define l27_width 14 -#define l27_height 16 -static char l27_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08, - 0x10, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x02, 0x3F, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l27_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x38,
+ 0xCC, 0x18,
+ 0xC0, 0x1C,
+ 0xE0, 0x0C,
+ 0x70, 0x0E,
+ 0x38, 0x0E,
+ 0x1C, 0x06,
+ 0xFC, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l27_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0xB8, 0x03, 0x0F,
+ 0x1C, 0x03, 0x07,
+ 0x1C, 0x87, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x00, 0xC7, 0x01,
+ 0x80, 0xC3, 0x01,
+ 0xC0, 0xC3, 0x01,
+ 0xC0, 0xE1, 0x00,
+ 0xE0, 0xE0, 0x00,
+ 0xF0, 0xE0, 0x00,
+ 0x78, 0xE0, 0x00,
+ 0x38, 0xE0, 0x00,
+ 0x3C, 0x70, 0x00,
+ 0xFC, 0x77, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l27_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0xC7, 0xFF, 0x03,
+ 0xF8, 0xCF, 0xFF, 0x03,
+ 0x3C, 0x1F, 0xC0, 0x03,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xF0, 0x00,
+ 0x00, 0x1C, 0xF0, 0x00,
+ 0x00, 0x1E, 0x78, 0x00,
+ 0x00, 0x1E, 0x78, 0x00,
+ 0x00, 0x0F, 0x38, 0x00,
+ 0x80, 0x0F, 0x3C, 0x00,
+ 0xC0, 0x07, 0x3C, 0x00,
+ 0xC0, 0x03, 0x1C, 0x00,
+ 0xE0, 0x01, 0x1E, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0x78, 0x00, 0x1E, 0x00,
+ 0x3C, 0x00, 0x1E, 0x00,
+ 0x3C, 0x00, 0x0E, 0x00,
+ 0xFE, 0x1F, 0x0E, 0x00,
+ 0xFE, 0x1F, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l28.xbm b/app/bin/bitmaps/l28.xbm index ceb8a68..d5ae122 100644 --- a/app/bin/bitmaps/l28.xbm +++ b/app/bin/bitmaps/l28.xbm @@ -1,6 +1,78 @@ -#define l28_width 14 -#define l28_height 16 -static char l28_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0x90, 0x10, 0x08, 0x0F, 0x84, 0x10, 0x82, 0x10, 0x81, 0x10, 0x3F, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l28_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x3B,
+ 0xC0, 0x3F,
+ 0xE0, 0x1E,
+ 0x70, 0x3F,
+ 0x38, 0x33,
+ 0x1C, 0x3F,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l28_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x33, 0x07,
+ 0x1C, 0x3F, 0x07,
+ 0x00, 0x3F, 0x07,
+ 0x00, 0x3F, 0x07,
+ 0x80, 0x73, 0x07,
+ 0xC0, 0xE3, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x38, 0x06,
+ 0xF0, 0x38, 0x0E,
+ 0x78, 0x38, 0x0E,
+ 0x38, 0x38, 0x06,
+ 0x3C, 0x70, 0x07,
+ 0xFC, 0xE7, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l28_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x3C, 0x9F, 0xEF, 0x01,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x00, 0x9C, 0xC7, 0x01,
+ 0x00, 0x1E, 0xEF, 0x01,
+ 0x00, 0x1E, 0xFE, 0x00,
+ 0x00, 0x0F, 0xFF, 0x00,
+ 0x80, 0x8F, 0xE7, 0x01,
+ 0xC0, 0x87, 0xC3, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0x78, 0xC0, 0x83, 0x03,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xE7, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x01,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l29.xbm b/app/bin/bitmaps/l29.xbm index 84c6512..7b23c07 100644 --- a/app/bin/bitmaps/l29.xbm +++ b/app/bin/bitmaps/l29.xbm @@ -1,6 +1,78 @@ -#define l29_width 14 -#define l29_height 16 -static char l29_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0x90, 0x10, 0x08, 0x1F, 0x04, 0x10, 0x02, 0x10, 0x01, 0x08, 0x3F, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l29_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xC0, 0x33,
+ 0xE0, 0x3F,
+ 0x70, 0x3E,
+ 0x38, 0x30,
+ 0x1C, 0x3B,
+ 0xFC, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l29_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x01,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x3B, 0x07,
+ 0x1C, 0x3F, 0x06,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x80, 0x3B, 0x0F,
+ 0xC0, 0x73, 0x0F,
+ 0xC0, 0xE1, 0x0F,
+ 0xE0, 0x00, 0x0E,
+ 0xF0, 0x00, 0x06,
+ 0x78, 0x00, 0x06,
+ 0x38, 0x38, 0x07,
+ 0x3C, 0x70, 0x03,
+ 0xFC, 0xF7, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l29_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x3C, 0x9F, 0xEF, 0x01,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x8F, 0xE7, 0x03,
+ 0xC0, 0x07, 0xFF, 0x03,
+ 0xC0, 0x03, 0xFE, 0x03,
+ 0xE0, 0x01, 0x80, 0x03,
+ 0xF0, 0x00, 0x80, 0x03,
+ 0x78, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xC3, 0x01,
+ 0x3C, 0x80, 0xE7, 0x01,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l3.xbm b/app/bin/bitmaps/l3.xbm index be5c0d1..070b9bb 100644 --- a/app/bin/bitmaps/l3.xbm +++ b/app/bin/bitmaps/l3.xbm @@ -1,6 +1,78 @@ -#define l3_width 14 -#define l3_height 16 -static char l3_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x00, 0x01, - 0x00, 0x01, 0xE0, 0x00, 0x00, 0x01, 0x00, 0x01, 0x08, 0x01, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l3_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xC0, 0x03,
+ 0x60, 0x07,
+ 0x00, 0x07,
+ 0x00, 0x03,
+ 0x80, 0x07,
+ 0x00, 0x07,
+ 0x60, 0x06,
+ 0xE0, 0x07,
+ 0xC0, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l3_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x3E, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x70, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l3_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0x8F, 0x03, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0xC0, 0x03, 0x00,
+ 0x00, 0xF8, 0x01, 0x00,
+ 0x00, 0xF8, 0x01, 0x00,
+ 0x00, 0xC0, 0x03, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x00, 0x8F, 0x07, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0xFE, 0x03, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l30.xbm b/app/bin/bitmaps/l30.xbm index f7ab137..324f979 100644 --- a/app/bin/bitmaps/l30.xbm +++ b/app/bin/bitmaps/l30.xbm @@ -1,6 +1,78 @@ -#define l30_width 14 -#define l30_height 16 -static char l30_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x18, - 0xA0, 0x14, 0x9C, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l30_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3F,
+ 0xE0, 0x33,
+ 0x60, 0x33,
+ 0xF0, 0x33,
+ 0xE0, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l30_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x80, 0x3B, 0x06,
+ 0x80, 0x3B, 0x06,
+ 0x80, 0x3B, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xE0, 0x3B, 0x0E,
+ 0x80, 0x3B, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x06,
+ 0x1C, 0x3F, 0x06,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l30_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x9E, 0xC3, 0x03,
+ 0x00, 0xCE, 0x83, 0x03,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l31.xbm b/app/bin/bitmaps/l31.xbm index 5ca3354..e379ca6 100644 --- a/app/bin/bitmaps/l31.xbm +++ b/app/bin/bitmaps/l31.xbm @@ -1,6 +1,78 @@ -#define l31_width 14 -#define l31_height 16 -static char l31_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x20, 0x05, - 0xA0, 0x04, 0x1C, 0x04, 0x20, 0x04, 0x20, 0x04, 0x21, 0x04, 0x1E, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l31_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xEC, 0x1E,
+ 0xE0, 0x1F,
+ 0x60, 0x1C,
+ 0xF0, 0x1C,
+ 0xE0, 0x1C,
+ 0xCC, 0x1C,
+ 0xFC, 0x1C,
+ 0x78, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l31_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0xC3, 0x03,
+ 0x9C, 0xC3, 0x03,
+ 0x80, 0xE3, 0x03,
+ 0x80, 0xB3, 0x03,
+ 0x80, 0x83, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0x83, 0x03,
+ 0x80, 0x83, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l31_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0x3C, 0x0F, 0x78, 0x00,
+ 0x3C, 0x0E, 0x7C, 0x00,
+ 0x1C, 0x1E, 0x7E, 0x00,
+ 0x00, 0x1E, 0x7F, 0x00,
+ 0x00, 0x0E, 0x73, 0x00,
+ 0x00, 0x0F, 0x70, 0x00,
+ 0xE0, 0x07, 0x70, 0x00,
+ 0xE0, 0x07, 0x70, 0x00,
+ 0x00, 0x0F, 0x70, 0x00,
+ 0x00, 0x1E, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x3C, 0x1E, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0xF8, 0x0F, 0x70, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l32.xbm b/app/bin/bitmaps/l32.xbm index c083094..3cbaaac 100644 --- a/app/bin/bitmaps/l32.xbm +++ b/app/bin/bitmaps/l32.xbm @@ -1,6 +1,78 @@ -#define l32_width 14 -#define l32_height 16 -static char l32_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10, - 0x20, 0x08, 0x1C, 0x04, 0x20, 0x02, 0x20, 0x01, 0xA1, 0x00, 0x9E, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l32_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3F,
+ 0xE0, 0x33,
+ 0x60, 0x30,
+ 0xF0, 0x38,
+ 0xE0, 0x1C,
+ 0xCC, 0x0E,
+ 0xFC, 0x07,
+ 0x78, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l32_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x06,
+ 0x80, 0x3B, 0x0E,
+ 0x80, 0x03, 0x0E,
+ 0x80, 0x03, 0x0E,
+ 0xC0, 0x01, 0x07,
+ 0xE0, 0x83, 0x07,
+ 0x80, 0x83, 0x03,
+ 0x00, 0xC7, 0x01,
+ 0x00, 0xE7, 0x01,
+ 0x1C, 0xF7, 0x00,
+ 0x9C, 0x73, 0x00,
+ 0xB8, 0x7B, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l32_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFE, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x03,
+ 0x3C, 0x8E, 0xC3, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0x0E, 0x80, 0x03,
+ 0x00, 0x0F, 0xC0, 0x03,
+ 0xE0, 0x07, 0xC0, 0x03,
+ 0xE0, 0x07, 0xE0, 0x01,
+ 0x00, 0x0F, 0xF0, 0x01,
+ 0x00, 0x1E, 0xF8, 0x00,
+ 0x00, 0x1C, 0x78, 0x00,
+ 0x00, 0x1C, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x0F, 0x00,
+ 0x3C, 0x9E, 0x07, 0x00,
+ 0x3C, 0x8F, 0x07, 0x00,
+ 0xF8, 0xCF, 0xFF, 0x03,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l33.xbm b/app/bin/bitmaps/l33.xbm index 241eac5..8d318c6 100644 --- a/app/bin/bitmaps/l33.xbm +++ b/app/bin/bitmaps/l33.xbm @@ -1,6 +1,78 @@ -#define l33_width 14 -#define l33_height 16 -static char l33_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x20, 0x10, - 0x20, 0x10, 0x1C, 0x0E, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l33_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3B,
+ 0xE0, 0x38,
+ 0x60, 0x18,
+ 0xF0, 0x3C,
+ 0xE0, 0x38,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l33_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x80, 0x03, 0x07,
+ 0x80, 0x03, 0x07,
+ 0x80, 0x03, 0x07,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0xC3, 0x07,
+ 0x80, 0x03, 0x07,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l33_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x0E, 0xC0, 0x01,
+ 0x00, 0x0F, 0xE0, 0x01,
+ 0xE0, 0x07, 0xFC, 0x00,
+ 0xE0, 0x07, 0xFC, 0x00,
+ 0x00, 0x0F, 0xE0, 0x01,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l34.xbm b/app/bin/bitmaps/l34.xbm index 552eafd..4e90020 100644 --- a/app/bin/bitmaps/l34.xbm +++ b/app/bin/bitmaps/l34.xbm @@ -1,6 +1,78 @@ -#define l34_width 14 -#define l34_height 16 -static char l34_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x20, 0x0A, - 0x20, 0x09, 0x9C, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x21, 0x08, 0x1E, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l34_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xEC, 0x1C,
+ 0xE0, 0x1E,
+ 0x60, 0x1E,
+ 0xF0, 0x1F,
+ 0xE0, 0x1B,
+ 0xCC, 0x3F,
+ 0xFC, 0x18,
+ 0x78, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l34_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x9C, 0xC3, 0x03,
+ 0x80, 0xC3, 0x03,
+ 0x80, 0xE3, 0x03,
+ 0x80, 0xE3, 0x03,
+ 0xC0, 0xF1, 0x03,
+ 0xE0, 0xB3, 0x03,
+ 0x80, 0xBB, 0x03,
+ 0x00, 0x9F, 0x03,
+ 0x00, 0xFF, 0x0F,
+ 0x1C, 0x87, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l34_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xF0, 0x00,
+ 0xF8, 0x07, 0xF0, 0x00,
+ 0x3C, 0x0F, 0xF8, 0x00,
+ 0x3C, 0x0E, 0xF8, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x00, 0x1E, 0xFC, 0x00,
+ 0x00, 0x0E, 0xFE, 0x00,
+ 0x00, 0x0F, 0xEE, 0x00,
+ 0xE0, 0x07, 0xEF, 0x00,
+ 0xE0, 0x87, 0xE7, 0x00,
+ 0x00, 0x8F, 0xE7, 0x00,
+ 0x00, 0xDE, 0xE3, 0x00,
+ 0x00, 0xDC, 0xE1, 0x00,
+ 0x00, 0xFC, 0xFF, 0x03,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1E, 0x1C, 0xE0, 0x00,
+ 0x3C, 0x1E, 0xE0, 0x00,
+ 0x3C, 0x0F, 0xE0, 0x00,
+ 0xF8, 0x0F, 0xE0, 0x00,
+ 0xF0, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l35.xbm b/app/bin/bitmaps/l35.xbm index 4bf7b2f..f8de169 100644 --- a/app/bin/bitmaps/l35.xbm +++ b/app/bin/bitmaps/l35.xbm @@ -1,6 +1,78 @@ -#define l35_width 14 -#define l35_height 16 -static char l35_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA0, 0x00, - 0xA0, 0x0F, 0x1C, 0x10, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l35_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xEC, 0x07,
+ 0xE0, 0x07,
+ 0x60, 0x1F,
+ 0xF0, 0x3B,
+ 0xE0, 0x30,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l35_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF1, 0x07,
+ 0xB8, 0x73, 0x00,
+ 0x9C, 0x73, 0x00,
+ 0x80, 0x33, 0x00,
+ 0x80, 0x33, 0x00,
+ 0x80, 0xFB, 0x03,
+ 0xC0, 0x79, 0x07,
+ 0xE0, 0x3B, 0x07,
+ 0x80, 0x03, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l35_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFF, 0x03,
+ 0xF8, 0x07, 0xFF, 0x03,
+ 0x3C, 0x0F, 0x07, 0x00,
+ 0x3C, 0x0E, 0x07, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x00, 0x9E, 0x07, 0x00,
+ 0x00, 0x8E, 0x7F, 0x00,
+ 0x00, 0x8F, 0xFF, 0x01,
+ 0xE0, 0x87, 0xE7, 0x01,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0x00, 0x0F, 0xC0, 0x03,
+ 0x00, 0x1E, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l36.xbm b/app/bin/bitmaps/l36.xbm index a048e6d..c3c19eb 100644 --- a/app/bin/bitmaps/l36.xbm +++ b/app/bin/bitmaps/l36.xbm @@ -1,6 +1,78 @@ -#define l36_width 14 -#define l36_height 16 -static char l36_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA0, 0x00, - 0xA0, 0x0F, 0x9C, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l36_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3F,
+ 0xE0, 0x03,
+ 0x60, 0x1F,
+ 0xF0, 0x3F,
+ 0xE0, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l36_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x80, 0x3B, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0xC0, 0xF9, 0x03,
+ 0xE0, 0x7B, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l36_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFC, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x9E, 0x03, 0x00,
+ 0x00, 0xCE, 0x03, 0x00,
+ 0x00, 0xCF, 0x7F, 0x00,
+ 0xE0, 0xC7, 0xFF, 0x01,
+ 0xE0, 0xC7, 0xEF, 0x01,
+ 0x00, 0xCF, 0xC7, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l37.xbm b/app/bin/bitmaps/l37.xbm index cd58fcd..df579f5 100644 --- a/app/bin/bitmaps/l37.xbm +++ b/app/bin/bitmaps/l37.xbm @@ -1,6 +1,78 @@ -#define l37_width 14 -#define l37_height 16 -static char l37_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x20, 0x08, - 0x20, 0x08, 0x1C, 0x04, 0x20, 0x04, 0x20, 0x02, 0x21, 0x02, 0x1E, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l37_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xEC, 0x38,
+ 0xE0, 0x18,
+ 0x60, 0x1C,
+ 0xF0, 0x0C,
+ 0xE0, 0x0E,
+ 0xCC, 0x0E,
+ 0xFC, 0x06,
+ 0x78, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l37_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0xB8, 0x03, 0x0F,
+ 0x9C, 0x03, 0x07,
+ 0x80, 0x83, 0x03,
+ 0x80, 0x83, 0x03,
+ 0x80, 0xC3, 0x01,
+ 0xC0, 0xC1, 0x01,
+ 0xE0, 0xC3, 0x01,
+ 0x80, 0xE3, 0x00,
+ 0x00, 0xE7, 0x00,
+ 0x00, 0xE7, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x9C, 0xE3, 0x00,
+ 0xB8, 0x73, 0x00,
+ 0xF0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l37_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0xF8, 0xC7, 0xFF, 0x03,
+ 0x3C, 0x0F, 0xC0, 0x03,
+ 0x3C, 0x0E, 0xE0, 0x01,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x00, 0x1E, 0xF0, 0x00,
+ 0x00, 0x0E, 0xF0, 0x00,
+ 0x00, 0x0F, 0x78, 0x00,
+ 0xE0, 0x07, 0x78, 0x00,
+ 0xE0, 0x07, 0x38, 0x00,
+ 0x00, 0x0F, 0x3C, 0x00,
+ 0x00, 0x1E, 0x3C, 0x00,
+ 0x00, 0x1C, 0x1C, 0x00,
+ 0x00, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x3C, 0x1E, 0x1E, 0x00,
+ 0x3C, 0x0F, 0x0E, 0x00,
+ 0xF8, 0x0F, 0x0E, 0x00,
+ 0xF0, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l38.xbm b/app/bin/bitmaps/l38.xbm index d47e1ea..424b263 100644 --- a/app/bin/bitmaps/l38.xbm +++ b/app/bin/bitmaps/l38.xbm @@ -1,6 +1,78 @@ -#define l38_width 14 -#define l38_height 16 -static char l38_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10, - 0xA0, 0x10, 0x1C, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l38_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3F,
+ 0xE0, 0x3B,
+ 0x60, 0x3F,
+ 0xF0, 0x1E,
+ 0xE0, 0x3F,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l38_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0xE3, 0x03,
+ 0x80, 0x73, 0x07,
+ 0x00, 0x3F, 0x06,
+ 0x00, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x9C, 0x3B, 0x06,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l38_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x9E, 0xC3, 0x03,
+ 0x00, 0x8E, 0xC7, 0x01,
+ 0x00, 0x0F, 0xEF, 0x01,
+ 0xE0, 0x07, 0xFE, 0x00,
+ 0xE0, 0x07, 0xFF, 0x00,
+ 0x00, 0x8F, 0xE7, 0x01,
+ 0x00, 0x9E, 0xC3, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l39.xbm b/app/bin/bitmaps/l39.xbm index 459ad96..51d14ab 100644 --- a/app/bin/bitmaps/l39.xbm +++ b/app/bin/bitmaps/l39.xbm @@ -1,6 +1,78 @@ -#define l39_width 14 -#define l39_height 16 -static char l39_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA0, 0x10, - 0xA0, 0x10, 0x1C, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x21, 0x08, 0x1E, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l39_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xEC, 0x3F,
+ 0xE0, 0x33,
+ 0x60, 0x33,
+ 0xF0, 0x3F,
+ 0xE0, 0x3E,
+ 0xCC, 0x30,
+ 0xFC, 0x3B,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l39_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x01,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x80, 0x3B, 0x06,
+ 0x80, 0x3B, 0x0E,
+ 0x80, 0x3B, 0x0E,
+ 0xC0, 0x39, 0x0F,
+ 0xE0, 0x73, 0x0F,
+ 0x80, 0xE3, 0x0F,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x06,
+ 0x1C, 0x07, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x03,
+ 0xF0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l39_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xCE, 0x83, 0x03,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0x00, 0x8F, 0xE7, 0x03,
+ 0x00, 0x1E, 0xFF, 0x03,
+ 0x00, 0x1C, 0xFE, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l4.xbm b/app/bin/bitmaps/l4.xbm index ea52f95..411ad63 100644 --- a/app/bin/bitmaps/l4.xbm +++ b/app/bin/bitmaps/l4.xbm @@ -1,6 +1,78 @@ -#define l4_width 14 -#define l4_height 16 -static char l4_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xC0, 0x00, 0xA0, 0x00, - 0x90, 0x00, 0x88, 0x00, 0xF8, 0x01, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l4_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x80, 0x03,
+ 0x80, 0x03,
+ 0xC0, 0x03,
+ 0xC0, 0x03,
+ 0xE0, 0x03,
+ 0x60, 0x03,
+ 0xF0, 0x07,
+ 0x00, 0x03,
+ 0x00, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l4_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1E, 0x00,
+ 0x00, 0x1E, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x1F, 0x00,
+ 0x80, 0x1D, 0x00,
+ 0xC0, 0x1D, 0x00,
+ 0xC0, 0x1C, 0x00,
+ 0xE0, 0x7F, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l4_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xE0, 0x01, 0x00,
+ 0x00, 0xE0, 0x01, 0x00,
+ 0x00, 0xF0, 0x01, 0x00,
+ 0x00, 0xF0, 0x01, 0x00,
+ 0x00, 0xF8, 0x01, 0x00,
+ 0x00, 0xF8, 0x01, 0x00,
+ 0x00, 0xFC, 0x01, 0x00,
+ 0x00, 0xDC, 0x01, 0x00,
+ 0x00, 0xDE, 0x01, 0x00,
+ 0x00, 0xCF, 0x01, 0x00,
+ 0x00, 0xCF, 0x01, 0x00,
+ 0x80, 0xC7, 0x01, 0x00,
+ 0x80, 0xC3, 0x01, 0x00,
+ 0xC0, 0xFF, 0x07, 0x00,
+ 0xC0, 0xFF, 0x07, 0x00,
+ 0x00, 0xC0, 0x01, 0x00,
+ 0x00, 0xC0, 0x01, 0x00,
+ 0x00, 0xC0, 0x01, 0x00,
+ 0x00, 0xC0, 0x01, 0x00,
+ 0x00, 0xC0, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l40.xbm b/app/bin/bitmaps/l40.xbm index f8d17da..8ee8e0f 100644 --- a/app/bin/bitmaps/l40.xbm +++ b/app/bin/bitmaps/l40.xbm @@ -1,6 +1,78 @@ -#define l40_width 14 -#define l40_height 16 -static char l40_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x18, - 0x92, 0x14, 0x91, 0x12, 0xBF, 0x11, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l40_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x78, 0x33,
+ 0x78, 0x33,
+ 0x7C, 0x33,
+ 0x6C, 0x33,
+ 0xFE, 0x33,
+ 0x60, 0x3F,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l40_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xE0, 0x39, 0x06,
+ 0xF0, 0x39, 0x06,
+ 0xF0, 0x39, 0x0E,
+ 0xF8, 0x39, 0x0E,
+ 0xD8, 0x39, 0x0E,
+ 0xDC, 0x39, 0x0E,
+ 0xCC, 0x39, 0x0E,
+ 0xFE, 0x3F, 0x06,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x31, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l40_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x7E, 0x00,
+ 0x80, 0x07, 0xFF, 0x00,
+ 0xC0, 0x07, 0xEF, 0x01,
+ 0xC0, 0x87, 0xC7, 0x01,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xF0, 0xC7, 0x83, 0x03,
+ 0x70, 0xC7, 0x83, 0x03,
+ 0x78, 0xC7, 0x83, 0x03,
+ 0x3C, 0xC7, 0x83, 0x03,
+ 0x3C, 0xC7, 0x83, 0x03,
+ 0x1E, 0xC7, 0x83, 0x03,
+ 0x0E, 0xC7, 0x83, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0xFF, 0x9F, 0xC3, 0x03,
+ 0x00, 0x87, 0xC3, 0x03,
+ 0x00, 0x87, 0xC7, 0x01,
+ 0x00, 0x07, 0xEF, 0x01,
+ 0x00, 0x07, 0xFF, 0x00,
+ 0x00, 0x07, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l41.xbm b/app/bin/bitmaps/l41.xbm index 2029d0a..8535fda 100644 --- a/app/bin/bitmaps/l41.xbm +++ b/app/bin/bitmaps/l41.xbm @@ -1,6 +1,78 @@ -#define l41_width 14 -#define l41_height 16 -static char l41_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x18, 0x06, 0x14, 0x05, - 0x92, 0x04, 0x11, 0x04, 0x3F, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l41_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1C,
+ 0x70, 0x1E,
+ 0x78, 0x1F,
+ 0x78, 0x1C,
+ 0x7C, 0x1C,
+ 0x6C, 0x1C,
+ 0xFE, 0x1C,
+ 0x60, 0x1C,
+ 0x60, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l41_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0xC1, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xE0, 0xE1, 0x03,
+ 0xF0, 0xB1, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0xF8, 0x81, 0x03,
+ 0xD8, 0x81, 0x03,
+ 0xDC, 0x81, 0x03,
+ 0xCC, 0x81, 0x03,
+ 0xFE, 0x87, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l41_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x70, 0x00,
+ 0x80, 0x07, 0x70, 0x00,
+ 0xC0, 0x07, 0x78, 0x00,
+ 0xC0, 0x07, 0x7C, 0x00,
+ 0xE0, 0x07, 0x7E, 0x00,
+ 0xE0, 0x07, 0x7F, 0x00,
+ 0xF0, 0x07, 0x73, 0x00,
+ 0x70, 0x07, 0x70, 0x00,
+ 0x78, 0x07, 0x70, 0x00,
+ 0x3C, 0x07, 0x70, 0x00,
+ 0x3C, 0x07, 0x70, 0x00,
+ 0x1E, 0x07, 0x70, 0x00,
+ 0x0E, 0x07, 0x70, 0x00,
+ 0xFF, 0x1F, 0x70, 0x00,
+ 0xFF, 0x1F, 0x70, 0x00,
+ 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x07, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l42.xbm b/app/bin/bitmaps/l42.xbm index b5be599..1b1b742 100644 --- a/app/bin/bitmaps/l42.xbm +++ b/app/bin/bitmaps/l42.xbm @@ -1,6 +1,78 @@ -#define l42_width 14 -#define l42_height 16 -static char l42_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10, - 0x12, 0x08, 0x11, 0x04, 0x3F, 0x02, 0x10, 0x01, 0x90, 0x00, 0x90, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l42_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x78, 0x33,
+ 0x78, 0x30,
+ 0x7C, 0x38,
+ 0x6C, 0x1C,
+ 0xFE, 0x0E,
+ 0x60, 0x07,
+ 0x60, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l42_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x39, 0x06,
+ 0xE0, 0x39, 0x0E,
+ 0xF0, 0x01, 0x0E,
+ 0xF0, 0x01, 0x0E,
+ 0xF8, 0x01, 0x07,
+ 0xD8, 0x81, 0x07,
+ 0xDC, 0x81, 0x03,
+ 0xCC, 0xC1, 0x01,
+ 0xFE, 0xE7, 0x01,
+ 0xC0, 0xF1, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x79, 0x00,
+ 0xC0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l42_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0xFE, 0x00,
+ 0x80, 0x07, 0xFF, 0x01,
+ 0xC0, 0x87, 0xE7, 0x03,
+ 0xC0, 0x87, 0xC3, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xF0, 0x07, 0x80, 0x03,
+ 0x70, 0x07, 0xC0, 0x03,
+ 0x78, 0x07, 0xC0, 0x03,
+ 0x3C, 0x07, 0xE0, 0x01,
+ 0x3C, 0x07, 0xF0, 0x01,
+ 0x1E, 0x07, 0xF8, 0x00,
+ 0x0E, 0x07, 0x78, 0x00,
+ 0xFF, 0x1F, 0x3C, 0x00,
+ 0xFF, 0x1F, 0x1E, 0x00,
+ 0x00, 0x07, 0x0F, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0xC7, 0xFF, 0x03,
+ 0x00, 0xC7, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l43.xbm b/app/bin/bitmaps/l43.xbm index 23ea804..1512650 100644 --- a/app/bin/bitmaps/l43.xbm +++ b/app/bin/bitmaps/l43.xbm @@ -1,6 +1,78 @@ -#define l43_width 14 -#define l43_height 16 -static char l43_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x14, 0x10, - 0x12, 0x10, 0x11, 0x0E, 0x3F, 0x10, 0x10, 0x10, 0x90, 0x10, 0x10, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l43_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3B,
+ 0x78, 0x38,
+ 0x78, 0x18,
+ 0x7C, 0x3C,
+ 0x6C, 0x38,
+ 0xFE, 0x33,
+ 0x60, 0x3F,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l43_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x39, 0x07,
+ 0xE0, 0x01, 0x07,
+ 0xF0, 0x01, 0x07,
+ 0xF0, 0x01, 0x07,
+ 0xF8, 0x81, 0x03,
+ 0xD8, 0xC1, 0x07,
+ 0xDC, 0x01, 0x07,
+ 0xCC, 0x01, 0x0E,
+ 0xFE, 0x07, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l43_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x7E, 0x00,
+ 0x80, 0x07, 0xFF, 0x00,
+ 0xC0, 0x87, 0xE7, 0x01,
+ 0xC0, 0x87, 0xC7, 0x01,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xE0, 0x07, 0xC0, 0x03,
+ 0xF0, 0x07, 0xC0, 0x01,
+ 0x70, 0x07, 0xE0, 0x01,
+ 0x78, 0x07, 0xFC, 0x00,
+ 0x3C, 0x07, 0xFC, 0x00,
+ 0x3C, 0x07, 0xE0, 0x01,
+ 0x1E, 0x07, 0xC0, 0x03,
+ 0x0E, 0x07, 0x80, 0x03,
+ 0xFF, 0x1F, 0x80, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0x00, 0xC7, 0x83, 0x03,
+ 0x00, 0x87, 0xC7, 0x03,
+ 0x00, 0x87, 0xE7, 0x01,
+ 0x00, 0x07, 0xFF, 0x01,
+ 0x00, 0x07, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l44.xbm b/app/bin/bitmaps/l44.xbm index f55e45c..7a96e04 100644 --- a/app/bin/bitmaps/l44.xbm +++ b/app/bin/bitmaps/l44.xbm @@ -1,6 +1,78 @@ -#define l44_width 14 -#define l44_height 16 -static char l44_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x18, 0x0C, 0x14, 0x0A, - 0x12, 0x09, 0x91, 0x08, 0xBF, 0x1F, 0x10, 0x08, 0x10, 0x08, 0x10, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l44_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1C,
+ 0x70, 0x1C,
+ 0x78, 0x1E,
+ 0x78, 0x1E,
+ 0x7C, 0x1F,
+ 0x6C, 0x1B,
+ 0xFE, 0x3F,
+ 0x60, 0x18,
+ 0x60, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l44_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xE0, 0xC1, 0x03,
+ 0xF0, 0xE1, 0x03,
+ 0xF0, 0xE1, 0x03,
+ 0xF8, 0xF1, 0x03,
+ 0xD8, 0xB1, 0x03,
+ 0xDC, 0xB9, 0x03,
+ 0xCC, 0x99, 0x03,
+ 0xFE, 0xFF, 0x0F,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l44_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0xF0, 0x00,
+ 0x80, 0x07, 0xF0, 0x00,
+ 0xC0, 0x07, 0xF8, 0x00,
+ 0xC0, 0x07, 0xF8, 0x00,
+ 0xE0, 0x07, 0xFC, 0x00,
+ 0xE0, 0x07, 0xFC, 0x00,
+ 0xF0, 0x07, 0xFE, 0x00,
+ 0x70, 0x07, 0xEE, 0x00,
+ 0x78, 0x07, 0xEF, 0x00,
+ 0x3C, 0x87, 0xE7, 0x00,
+ 0x3C, 0x87, 0xE7, 0x00,
+ 0x1E, 0xC7, 0xE3, 0x00,
+ 0x0E, 0xC7, 0xE1, 0x00,
+ 0xFF, 0xFF, 0xFF, 0x03,
+ 0xFF, 0xFF, 0xFF, 0x03,
+ 0x00, 0x07, 0xE0, 0x00,
+ 0x00, 0x07, 0xE0, 0x00,
+ 0x00, 0x07, 0xE0, 0x00,
+ 0x00, 0x07, 0xE0, 0x00,
+ 0x00, 0x07, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l45.xbm b/app/bin/bitmaps/l45.xbm index 8509e7c..d326cc1 100644 --- a/app/bin/bitmaps/l45.xbm +++ b/app/bin/bitmaps/l45.xbm @@ -1,6 +1,78 @@ -#define l45_width 14 -#define l45_height 16 -static char l45_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1F, 0x98, 0x00, 0x94, 0x00, - 0x92, 0x0F, 0x11, 0x10, 0x3F, 0x10, 0x10, 0x10, 0x90, 0x10, 0x10, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l45_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x3F,
+ 0x70, 0x07,
+ 0x78, 0x07,
+ 0x78, 0x1F,
+ 0x7C, 0x3B,
+ 0x6C, 0x30,
+ 0xFE, 0x33,
+ 0x60, 0x3F,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l45_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xF1, 0x07,
+ 0xC0, 0x71, 0x00,
+ 0xE0, 0x71, 0x00,
+ 0xE0, 0x31, 0x00,
+ 0xF0, 0x31, 0x00,
+ 0xF0, 0xF9, 0x03,
+ 0xF8, 0x79, 0x07,
+ 0xD8, 0x39, 0x07,
+ 0xDC, 0x01, 0x0E,
+ 0xCC, 0x01, 0x0E,
+ 0xFE, 0x07, 0x0E,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l45_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0xFF, 0x03,
+ 0x80, 0x07, 0xFF, 0x03,
+ 0xC0, 0x07, 0x07, 0x00,
+ 0xC0, 0x07, 0x07, 0x00,
+ 0xE0, 0x87, 0x07, 0x00,
+ 0xE0, 0x87, 0x07, 0x00,
+ 0xF0, 0x87, 0x7F, 0x00,
+ 0x70, 0x87, 0xFF, 0x01,
+ 0x78, 0x87, 0xE7, 0x01,
+ 0x3C, 0x87, 0xC3, 0x03,
+ 0x3C, 0x07, 0xC0, 0x03,
+ 0x1E, 0x07, 0x80, 0x03,
+ 0x0E, 0x07, 0x80, 0x03,
+ 0xFF, 0x1F, 0x80, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0x00, 0xC7, 0xC3, 0x03,
+ 0x00, 0x87, 0xC3, 0x03,
+ 0x00, 0x87, 0xE7, 0x01,
+ 0x00, 0x07, 0xFF, 0x00,
+ 0x00, 0x07, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l46.xbm b/app/bin/bitmaps/l46.xbm index 873164e..5313ab6 100644 --- a/app/bin/bitmaps/l46.xbm +++ b/app/bin/bitmaps/l46.xbm @@ -1,6 +1,78 @@ -#define l46_width 14 -#define l46_height 16 -static char l46_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x00, 0x94, 0x00, - 0x92, 0x0F, 0x91, 0x10, 0xBF, 0x10, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l46_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x78, 0x03,
+ 0x78, 0x1F,
+ 0x7C, 0x3F,
+ 0x6C, 0x33,
+ 0xFE, 0x33,
+ 0x60, 0x3F,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l46_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xE0, 0x39, 0x00,
+ 0xF0, 0x39, 0x00,
+ 0xF0, 0x39, 0x00,
+ 0xF8, 0xF9, 0x03,
+ 0xD8, 0x79, 0x07,
+ 0xDC, 0x39, 0x07,
+ 0xCC, 0x39, 0x0E,
+ 0xFE, 0x3F, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x31, 0x07,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l46_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0xFC, 0x00,
+ 0x80, 0x07, 0xFF, 0x01,
+ 0xC0, 0x07, 0xEF, 0x01,
+ 0xC0, 0x87, 0xC7, 0x03,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xE0, 0x87, 0x03, 0x00,
+ 0xF0, 0xC7, 0x03, 0x00,
+ 0x70, 0xC7, 0x7F, 0x00,
+ 0x78, 0xC7, 0xFF, 0x01,
+ 0x3C, 0xC7, 0xEF, 0x01,
+ 0x3C, 0xC7, 0xC7, 0x03,
+ 0x1E, 0xC7, 0x83, 0x03,
+ 0x0E, 0xC7, 0x83, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0x00, 0x87, 0x83, 0x03,
+ 0x00, 0x87, 0xC7, 0x03,
+ 0x00, 0x87, 0xEF, 0x01,
+ 0x00, 0x07, 0xFF, 0x01,
+ 0x00, 0x07, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l47.xbm b/app/bin/bitmaps/l47.xbm index 61043f1..e635d03 100644 --- a/app/bin/bitmaps/l47.xbm +++ b/app/bin/bitmaps/l47.xbm @@ -1,6 +1,78 @@ -#define l47_width 14 -#define l47_height 16 -static char l47_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x1F, 0x18, 0x10, 0x14, 0x08, - 0x12, 0x08, 0x11, 0x04, 0x3F, 0x04, 0x10, 0x02, 0x10, 0x02, 0x10, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l47_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x3F,
+ 0x70, 0x38,
+ 0x78, 0x18,
+ 0x78, 0x1C,
+ 0x7C, 0x0C,
+ 0x6C, 0x0E,
+ 0xFE, 0x0E,
+ 0x60, 0x06,
+ 0x60, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l47_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xF9, 0x0F,
+ 0xC0, 0x01, 0x0F,
+ 0xE0, 0x01, 0x07,
+ 0xE0, 0x81, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0xF0, 0xC1, 0x01,
+ 0xF8, 0xC1, 0x01,
+ 0xD8, 0xC1, 0x01,
+ 0xDC, 0xE1, 0x00,
+ 0xCC, 0xE1, 0x00,
+ 0xFE, 0xE7, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0xE1, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l47_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xC7, 0xFF, 0x03,
+ 0x80, 0xC7, 0xFF, 0x03,
+ 0xC0, 0x07, 0xC0, 0x03,
+ 0xC0, 0x07, 0xE0, 0x01,
+ 0xE0, 0x07, 0xE0, 0x01,
+ 0xE0, 0x07, 0xF0, 0x00,
+ 0xF0, 0x07, 0xF0, 0x00,
+ 0x70, 0x07, 0x78, 0x00,
+ 0x78, 0x07, 0x78, 0x00,
+ 0x3C, 0x07, 0x38, 0x00,
+ 0x3C, 0x07, 0x3C, 0x00,
+ 0x1E, 0x07, 0x3C, 0x00,
+ 0x0E, 0x07, 0x1C, 0x00,
+ 0xFF, 0x1F, 0x1E, 0x00,
+ 0xFF, 0x1F, 0x1E, 0x00,
+ 0x00, 0x07, 0x1E, 0x00,
+ 0x00, 0x07, 0x1E, 0x00,
+ 0x00, 0x07, 0x0E, 0x00,
+ 0x00, 0x07, 0x0E, 0x00,
+ 0x00, 0x07, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l48.xbm b/app/bin/bitmaps/l48.xbm index 0a04953..977b660 100644 --- a/app/bin/bitmaps/l48.xbm +++ b/app/bin/bitmaps/l48.xbm @@ -1,6 +1,78 @@ -#define l48_width 14 -#define l48_height 16 -static char l48_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10, - 0x92, 0x10, 0x11, 0x0F, 0xBF, 0x10, 0x90, 0x10, 0x90, 0x10, 0x10, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l48_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x78, 0x3B,
+ 0x78, 0x3F,
+ 0x7C, 0x1E,
+ 0x6C, 0x3F,
+ 0xFE, 0x33,
+ 0x60, 0x3F,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l48_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x31, 0x07,
+ 0xE0, 0x39, 0x07,
+ 0xF0, 0x39, 0x07,
+ 0xF0, 0x39, 0x07,
+ 0xF8, 0x71, 0x07,
+ 0xD8, 0xE1, 0x03,
+ 0xDC, 0x71, 0x07,
+ 0xCC, 0x39, 0x06,
+ 0xFE, 0x3F, 0x0E,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x71, 0x07,
+ 0xC0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l48_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x7E, 0x00,
+ 0x80, 0x07, 0xFF, 0x00,
+ 0xC0, 0x87, 0xEF, 0x01,
+ 0xC0, 0x87, 0xC7, 0x01,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xE0, 0x87, 0xC3, 0x03,
+ 0xF0, 0x87, 0xC7, 0x01,
+ 0x70, 0x07, 0xEF, 0x01,
+ 0x78, 0x07, 0xFE, 0x00,
+ 0x3C, 0x07, 0xFF, 0x00,
+ 0x3C, 0x87, 0xE7, 0x01,
+ 0x1E, 0x87, 0xC3, 0x03,
+ 0x0E, 0xC7, 0x83, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0xFF, 0xDF, 0x83, 0x03,
+ 0x00, 0xC7, 0x83, 0x03,
+ 0x00, 0x87, 0xC3, 0x03,
+ 0x00, 0x87, 0xE7, 0x01,
+ 0x00, 0x07, 0xFF, 0x01,
+ 0x00, 0x07, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l49.xbm b/app/bin/bitmaps/l49.xbm index 14b9914..e930612 100644 --- a/app/bin/bitmaps/l49.xbm +++ b/app/bin/bitmaps/l49.xbm @@ -1,6 +1,78 @@ -#define l49_width 14 -#define l49_height 16 -static char l49_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0F, 0x98, 0x10, 0x94, 0x10, - 0x92, 0x10, 0x11, 0x1F, 0x3F, 0x10, 0x10, 0x10, 0x10, 0x08, 0x10, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l49_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x70, 0x1E,
+ 0x70, 0x3F,
+ 0x78, 0x33,
+ 0x78, 0x33,
+ 0x7C, 0x3F,
+ 0x6C, 0x3E,
+ 0xFE, 0x30,
+ 0x60, 0x3B,
+ 0x60, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l49_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0xE1, 0x01,
+ 0xC0, 0x71, 0x07,
+ 0xE0, 0x39, 0x07,
+ 0xE0, 0x39, 0x06,
+ 0xF0, 0x39, 0x0E,
+ 0xF0, 0x39, 0x0E,
+ 0xF8, 0x39, 0x0F,
+ 0xD8, 0x71, 0x0F,
+ 0xDC, 0xE1, 0x0F,
+ 0xCC, 0x01, 0x0E,
+ 0xFE, 0x07, 0x06,
+ 0xC0, 0x01, 0x06,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x71, 0x03,
+ 0xC0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l49_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x07, 0x7E, 0x00,
+ 0x80, 0x07, 0xFF, 0x00,
+ 0xC0, 0x87, 0xEF, 0x01,
+ 0xC0, 0x87, 0xC7, 0x01,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xE0, 0xC7, 0x83, 0x03,
+ 0xF0, 0xC7, 0x83, 0x03,
+ 0x70, 0xC7, 0x83, 0x03,
+ 0x78, 0xC7, 0x83, 0x03,
+ 0x3C, 0x87, 0xC3, 0x03,
+ 0x3C, 0x87, 0xE7, 0x03,
+ 0x1E, 0x07, 0xFF, 0x03,
+ 0x0E, 0x07, 0xFE, 0x03,
+ 0xFF, 0x1F, 0x80, 0x03,
+ 0xFF, 0x1F, 0x80, 0x03,
+ 0x00, 0x87, 0xC3, 0x03,
+ 0x00, 0x87, 0xC3, 0x01,
+ 0x00, 0x87, 0xE7, 0x01,
+ 0x00, 0x07, 0xFF, 0x00,
+ 0x00, 0x07, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l5.xbm b/app/bin/bitmaps/l5.xbm index da409be..4d43af0 100644 --- a/app/bin/bitmaps/l5.xbm +++ b/app/bin/bitmaps/l5.xbm @@ -1,6 +1,78 @@ -#define l5_width 14 -#define l5_height 16 -static char l5_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x08, 0x00, 0x08, 0x00, - 0xF8, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x08, 0x01, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l5_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xE0, 0x07,
+ 0xE0, 0x00,
+ 0xE0, 0x00,
+ 0xE0, 0x03,
+ 0x60, 0x07,
+ 0x00, 0x06,
+ 0x60, 0x06,
+ 0xE0, 0x07,
+ 0xC0, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l5_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x80, 0x3F, 0x00,
+ 0x80, 0x03, 0x00,
+ 0x80, 0x03, 0x00,
+ 0x80, 0x01, 0x00,
+ 0x80, 0x01, 0x00,
+ 0xC0, 0x1F, 0x00,
+ 0xC0, 0x3B, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x70, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l5_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFE, 0x07, 0x00,
+ 0x00, 0xFE, 0x07, 0x00,
+ 0x00, 0x0E, 0x00, 0x00,
+ 0x00, 0x0E, 0x00, 0x00,
+ 0x00, 0x0F, 0x00, 0x00,
+ 0x00, 0x0F, 0x00, 0x00,
+ 0x00, 0xFF, 0x00, 0x00,
+ 0x00, 0xFF, 0x03, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x87, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l50.xbm b/app/bin/bitmaps/l50.xbm index 981e2c8..834ab8f 100644 --- a/app/bin/bitmaps/l50.xbm +++ b/app/bin/bitmaps/l50.xbm @@ -1,6 +1,78 @@ -#define l50_width 14 -#define l50_height 16 -static char l50_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x18, - 0x9F, 0x14, 0xA0, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l50_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3F,
+ 0x1C, 0x33,
+ 0x7C, 0x33,
+ 0xEC, 0x33,
+ 0xC0, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l50_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x03,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x30, 0x07,
+ 0x18, 0x38, 0x06,
+ 0x18, 0x38, 0x06,
+ 0xFC, 0x39, 0x0E,
+ 0xBC, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x06,
+ 0x1C, 0x3B, 0x06,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l50_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0x7E, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x00,
+ 0x38, 0x00, 0xEF, 0x01,
+ 0x38, 0x80, 0xC7, 0x01,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0xFC, 0xC3, 0x83, 0x03,
+ 0xFC, 0xCF, 0x83, 0x03,
+ 0x3C, 0xCF, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x00, 0xDE, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l51.xbm b/app/bin/bitmaps/l51.xbm index ac2e9a2..8081e2f 100644 --- a/app/bin/bitmaps/l51.xbm +++ b/app/bin/bitmaps/l51.xbm @@ -1,6 +1,78 @@ -#define l51_width 14 -#define l51_height 16 -static char l51_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x01, 0x06, 0x01, 0x05, - 0x9F, 0x04, 0x20, 0x04, 0x20, 0x04, 0x20, 0x04, 0x21, 0x04, 0x1E, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l51_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1C,
+ 0x1C, 0x1E,
+ 0x1C, 0x1F,
+ 0x7C, 0x1C,
+ 0xEC, 0x1C,
+ 0xC0, 0x1C,
+ 0xCC, 0x1C,
+ 0xFC, 0x1C,
+ 0x78, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l51_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0x83, 0x03,
+ 0x38, 0xC0, 0x03,
+ 0x38, 0xC0, 0x03,
+ 0x18, 0xE0, 0x03,
+ 0x18, 0xB0, 0x03,
+ 0xFC, 0x81, 0x03,
+ 0xBC, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x1C, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l51_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0x70, 0x00,
+ 0xF8, 0x1F, 0x70, 0x00,
+ 0x38, 0x00, 0x78, 0x00,
+ 0x38, 0x00, 0x7C, 0x00,
+ 0x3C, 0x00, 0x7E, 0x00,
+ 0x3C, 0x00, 0x7F, 0x00,
+ 0xFC, 0x03, 0x73, 0x00,
+ 0xFC, 0x0F, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x00, 0x1E, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1E, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l52.xbm b/app/bin/bitmaps/l52.xbm index 266c9a4..1547b10 100644 --- a/app/bin/bitmaps/l52.xbm +++ b/app/bin/bitmaps/l52.xbm @@ -1,6 +1,78 @@ -#define l52_width 14 -#define l52_height 16 -static char l52_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x1F, 0x08, 0x20, 0x04, 0x20, 0x02, 0x20, 0x01, 0xA1, 0x00, 0x9E, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l52_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3F,
+ 0x1C, 0x33,
+ 0x7C, 0x30,
+ 0xEC, 0x38,
+ 0xC0, 0x1C,
+ 0xCC, 0x0E,
+ 0xFC, 0x07,
+ 0x78, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l52_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x03,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x38, 0x06,
+ 0x18, 0x38, 0x0E,
+ 0x18, 0x00, 0x0E,
+ 0xFC, 0x01, 0x0E,
+ 0xBC, 0x03, 0x07,
+ 0x9C, 0x83, 0x07,
+ 0x00, 0x87, 0x03,
+ 0x00, 0xC7, 0x01,
+ 0x00, 0xE7, 0x01,
+ 0x1C, 0xF3, 0x00,
+ 0x9C, 0x73, 0x00,
+ 0xB8, 0x7B, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l52_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0xFE, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x01,
+ 0x38, 0x80, 0xE7, 0x03,
+ 0x38, 0x80, 0xC3, 0x03,
+ 0x3C, 0xC0, 0x83, 0x03,
+ 0x3C, 0xC0, 0x83, 0x03,
+ 0xFC, 0x03, 0x80, 0x03,
+ 0xFC, 0x0F, 0xC0, 0x03,
+ 0x3C, 0x0F, 0xC0, 0x03,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x00, 0x1E, 0xF0, 0x01,
+ 0x00, 0x1C, 0xF8, 0x00,
+ 0x00, 0x1C, 0x78, 0x00,
+ 0x00, 0x1C, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1E, 0x0F, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x3C, 0x8F, 0x07, 0x00,
+ 0xF8, 0xC7, 0xFF, 0x03,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l53.xbm b/app/bin/bitmaps/l53.xbm index 232b96c..a9620b9 100644 --- a/app/bin/bitmaps/l53.xbm +++ b/app/bin/bitmaps/l53.xbm @@ -1,6 +1,78 @@ -#define l53_width 14 -#define l53_height 16 -static char l53_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x01, 0x10, - 0x1F, 0x10, 0x20, 0x0E, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l53_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3B,
+ 0x1C, 0x38,
+ 0x7C, 0x18,
+ 0xEC, 0x3C,
+ 0xC0, 0x38,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l53_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x03,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x38, 0x07,
+ 0x18, 0x00, 0x07,
+ 0x18, 0x00, 0x07,
+ 0xFC, 0x01, 0x07,
+ 0xBC, 0x83, 0x03,
+ 0x9C, 0xC3, 0x07,
+ 0x00, 0x07, 0x07,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x1C, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l53_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0x7E, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x00,
+ 0x38, 0x80, 0xE7, 0x01,
+ 0x38, 0x80, 0xC7, 0x01,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x00, 0xC0, 0x03,
+ 0xFC, 0x03, 0xC0, 0x01,
+ 0xFC, 0x0F, 0xE0, 0x01,
+ 0x3C, 0x0F, 0xFC, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x00, 0x1E, 0xE0, 0x01,
+ 0x00, 0x1C, 0xC0, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDE, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l54.xbm b/app/bin/bitmaps/l54.xbm index e68e643..68a392e 100644 --- a/app/bin/bitmaps/l54.xbm +++ b/app/bin/bitmaps/l54.xbm @@ -1,6 +1,78 @@ -#define l54_width 14 -#define l54_height 16 -static char l54_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, 0x01, 0x0C, 0x01, 0x0A, - 0x1F, 0x09, 0xA0, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x21, 0x08, 0x1E, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l54_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1C,
+ 0x1C, 0x1C,
+ 0x1C, 0x1E,
+ 0x7C, 0x1E,
+ 0xEC, 0x1F,
+ 0xC0, 0x1B,
+ 0xCC, 0x3F,
+ 0xFC, 0x18,
+ 0x78, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l54_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0x83, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x38, 0xC0, 0x03,
+ 0x18, 0xC0, 0x03,
+ 0x18, 0xE0, 0x03,
+ 0xFC, 0xE1, 0x03,
+ 0xBC, 0xF3, 0x03,
+ 0x9C, 0xB3, 0x03,
+ 0x00, 0xBF, 0x03,
+ 0x00, 0x9F, 0x03,
+ 0x00, 0xFF, 0x0F,
+ 0x1C, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l54_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0xF0, 0x00,
+ 0xF8, 0x1F, 0xF0, 0x00,
+ 0x38, 0x00, 0xF8, 0x00,
+ 0x38, 0x00, 0xF8, 0x00,
+ 0x3C, 0x00, 0xFC, 0x00,
+ 0x3C, 0x00, 0xFC, 0x00,
+ 0xFC, 0x03, 0xFE, 0x00,
+ 0xFC, 0x0F, 0xEE, 0x00,
+ 0x3C, 0x0F, 0xEF, 0x00,
+ 0x1C, 0x9E, 0xE7, 0x00,
+ 0x00, 0x9E, 0xE7, 0x00,
+ 0x00, 0xDC, 0xE3, 0x00,
+ 0x00, 0xDC, 0xE1, 0x00,
+ 0x00, 0xFC, 0xFF, 0x03,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1E, 0x1E, 0xE0, 0x00,
+ 0x1C, 0x1E, 0xE0, 0x00,
+ 0x3C, 0x0F, 0xE0, 0x00,
+ 0xF8, 0x07, 0xE0, 0x00,
+ 0xF0, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l55.xbm b/app/bin/bitmaps/l55.xbm index 6b29ef2..8c35927 100644 --- a/app/bin/bitmaps/l55.xbm +++ b/app/bin/bitmaps/l55.xbm @@ -1,6 +1,78 @@ -#define l55_width 14 -#define l55_height 16 -static char l55_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x81, 0x00, 0x81, 0x00, - 0x9F, 0x0F, 0x20, 0x10, 0x20, 0x10, 0x20, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l55_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x3F,
+ 0x1C, 0x07,
+ 0x1C, 0x07,
+ 0x7C, 0x1F,
+ 0xEC, 0x3B,
+ 0xC0, 0x30,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l55_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xF3, 0x07,
+ 0x38, 0x70, 0x00,
+ 0x38, 0x70, 0x00,
+ 0x18, 0x30, 0x00,
+ 0x18, 0x30, 0x00,
+ 0xFC, 0xF9, 0x03,
+ 0xBC, 0x7B, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x1C, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l55_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x03,
+ 0xF8, 0x1F, 0xFF, 0x03,
+ 0x38, 0x00, 0x07, 0x00,
+ 0x38, 0x00, 0x07, 0x00,
+ 0x3C, 0x80, 0x07, 0x00,
+ 0x3C, 0x80, 0x07, 0x00,
+ 0xFC, 0x83, 0x7F, 0x00,
+ 0xFC, 0x8F, 0xFF, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDE, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l56.xbm b/app/bin/bitmaps/l56.xbm index 20eedef..e8f4d59 100644 --- a/app/bin/bitmaps/l56.xbm +++ b/app/bin/bitmaps/l56.xbm @@ -1,6 +1,78 @@ -#define l56_width 14 -#define l56_height 16 -static char l56_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x00, 0x81, 0x00, - 0x9F, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l56_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3F,
+ 0x1C, 0x03,
+ 0x7C, 0x1F,
+ 0xEC, 0x3F,
+ 0xC0, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l56_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x03,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x30, 0x07,
+ 0x18, 0x38, 0x00,
+ 0x18, 0x38, 0x00,
+ 0xFC, 0x39, 0x00,
+ 0xBC, 0xFB, 0x03,
+ 0x9C, 0x7B, 0x07,
+ 0x00, 0x3F, 0x07,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x1C, 0x3B, 0x0E,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l56_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0xFC, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x01,
+ 0x38, 0x00, 0xEF, 0x01,
+ 0x38, 0x80, 0xC7, 0x03,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0x03, 0x00,
+ 0xFC, 0xC3, 0x03, 0x00,
+ 0xFC, 0xCF, 0x7F, 0x00,
+ 0x3C, 0xCF, 0xFF, 0x01,
+ 0x1C, 0xDE, 0xEF, 0x01,
+ 0x00, 0xDE, 0xC7, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9E, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l57.xbm b/app/bin/bitmaps/l57.xbm index a9b7d42..5149c54 100644 --- a/app/bin/bitmaps/l57.xbm +++ b/app/bin/bitmaps/l57.xbm @@ -1,6 +1,78 @@ -#define l57_width 14 -#define l57_height 16 -static char l57_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x01, 0x10, 0x01, 0x08, - 0x1F, 0x08, 0x20, 0x04, 0x20, 0x04, 0x20, 0x02, 0x21, 0x02, 0x1E, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l57_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x3F,
+ 0x1C, 0x38,
+ 0x1C, 0x18,
+ 0x7C, 0x1C,
+ 0xEC, 0x0C,
+ 0xC0, 0x0E,
+ 0xCC, 0x0E,
+ 0xFC, 0x06,
+ 0x78, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l57_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xFB, 0x0F,
+ 0x38, 0x00, 0x0F,
+ 0x38, 0x00, 0x07,
+ 0x18, 0x80, 0x03,
+ 0x18, 0x80, 0x03,
+ 0xFC, 0xC1, 0x01,
+ 0xBC, 0xC3, 0x01,
+ 0x9C, 0xC3, 0x01,
+ 0x00, 0xE7, 0x00,
+ 0x00, 0xE7, 0x00,
+ 0x00, 0xE7, 0x00,
+ 0x1C, 0xE3, 0x00,
+ 0x9C, 0xE3, 0x00,
+ 0xB8, 0x73, 0x00,
+ 0xF0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l57_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0xDF, 0xFF, 0x03,
+ 0xF8, 0xDF, 0xFF, 0x03,
+ 0x38, 0x00, 0xC0, 0x03,
+ 0x38, 0x00, 0xE0, 0x01,
+ 0x3C, 0x00, 0xE0, 0x01,
+ 0x3C, 0x00, 0xF0, 0x00,
+ 0xFC, 0x03, 0xF0, 0x00,
+ 0xFC, 0x0F, 0x78, 0x00,
+ 0x3C, 0x0F, 0x78, 0x00,
+ 0x1C, 0x1E, 0x38, 0x00,
+ 0x00, 0x1E, 0x3C, 0x00,
+ 0x00, 0x1C, 0x3C, 0x00,
+ 0x00, 0x1C, 0x1C, 0x00,
+ 0x00, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1E, 0x1E, 0x00,
+ 0x1C, 0x1E, 0x1E, 0x00,
+ 0x3C, 0x0F, 0x0E, 0x00,
+ 0xF8, 0x07, 0x0E, 0x00,
+ 0xF0, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l58.xbm b/app/bin/bitmaps/l58.xbm index 01fb1bd..3fe4ad7 100644 --- a/app/bin/bitmaps/l58.xbm +++ b/app/bin/bitmaps/l58.xbm @@ -1,6 +1,78 @@ -#define l58_width 14 -#define l58_height 16 -static char l58_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x9F, 0x10, 0x20, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l58_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3F,
+ 0x1C, 0x3B,
+ 0x7C, 0x3F,
+ 0xEC, 0x1E,
+ 0xC0, 0x3F,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l58_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x03,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x30, 0x07,
+ 0x18, 0x38, 0x07,
+ 0x18, 0x38, 0x07,
+ 0xFC, 0x39, 0x07,
+ 0xBC, 0x73, 0x07,
+ 0x9C, 0xE3, 0x03,
+ 0x00, 0x77, 0x07,
+ 0x00, 0x3F, 0x06,
+ 0x00, 0x3F, 0x0E,
+ 0x1C, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x06,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l58_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0x7E, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x00,
+ 0x38, 0x80, 0xEF, 0x01,
+ 0x38, 0x80, 0xC7, 0x01,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0x3C, 0x80, 0xC3, 0x03,
+ 0xFC, 0x83, 0xC7, 0x01,
+ 0xFC, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x0F, 0xFE, 0x00,
+ 0x1C, 0x1E, 0xFF, 0x00,
+ 0x00, 0x9E, 0xE7, 0x01,
+ 0x00, 0x9C, 0xC3, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDE, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l59.xbm b/app/bin/bitmaps/l59.xbm index 8f5b367..9459753 100644 --- a/app/bin/bitmaps/l59.xbm +++ b/app/bin/bitmaps/l59.xbm @@ -1,6 +1,78 @@ -#define l59_width 14 -#define l59_height 16 -static char l59_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x9F, 0x10, 0x20, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x21, 0x08, 0x1E, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l59_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0x1C, 0x3F,
+ 0x1C, 0x33,
+ 0x7C, 0x33,
+ 0xEC, 0x3F,
+ 0xC0, 0x3E,
+ 0xCC, 0x30,
+ 0xFC, 0x3B,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l59_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF8, 0xE3, 0x01,
+ 0x38, 0x70, 0x07,
+ 0x38, 0x38, 0x07,
+ 0x18, 0x38, 0x06,
+ 0x18, 0x38, 0x0E,
+ 0xFC, 0x39, 0x0E,
+ 0xBC, 0x3B, 0x0F,
+ 0x9C, 0x73, 0x0F,
+ 0x00, 0xE7, 0x0F,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x07, 0x06,
+ 0x1C, 0x03, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x03,
+ 0xF0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l59_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF8, 0x1F, 0x7E, 0x00,
+ 0xF8, 0x1F, 0xFF, 0x00,
+ 0x38, 0x80, 0xEF, 0x01,
+ 0x38, 0x80, 0xC7, 0x01,
+ 0x3C, 0xC0, 0x83, 0x03,
+ 0x3C, 0xC0, 0x83, 0x03,
+ 0xFC, 0xC3, 0x83, 0x03,
+ 0xFC, 0xCF, 0x83, 0x03,
+ 0x3C, 0xCF, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x00, 0x9E, 0xE7, 0x03,
+ 0x00, 0x1C, 0xFF, 0x03,
+ 0x00, 0x1C, 0xFE, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l6.xbm b/app/bin/bitmaps/l6.xbm index 89efd19..325c80c 100644 --- a/app/bin/bitmaps/l6.xbm +++ b/app/bin/bitmaps/l6.xbm @@ -1,6 +1,78 @@ -#define l6_width 14 -#define l6_height 16 -static char l6_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x00, 0x08, 0x00, - 0xF8, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l6_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xC0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x00,
+ 0xE0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x06,
+ 0x60, 0x06,
+ 0xE0, 0x07,
+ 0xC0, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l6_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x80, 0x39, 0x00,
+ 0xC0, 0x01, 0x00,
+ 0xC0, 0x01, 0x00,
+ 0xC0, 0x01, 0x00,
+ 0xC0, 0x1F, 0x00,
+ 0xC0, 0x3B, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0x80, 0x39, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l6_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xF8, 0x01, 0x00,
+ 0x00, 0xFE, 0x03, 0x00,
+ 0x00, 0xDE, 0x03, 0x00,
+ 0x00, 0x8F, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x07, 0x00, 0x00,
+ 0x80, 0x07, 0x00, 0x00,
+ 0x80, 0xFF, 0x00, 0x00,
+ 0x80, 0xFF, 0x03, 0x00,
+ 0x80, 0xDF, 0x03, 0x00,
+ 0x80, 0x8F, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x00, 0x07, 0x07, 0x00,
+ 0x00, 0x8F, 0x07, 0x00,
+ 0x00, 0xDF, 0x03, 0x00,
+ 0x00, 0xFE, 0x03, 0x00,
+ 0x00, 0xF8, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l60.xbm b/app/bin/bitmaps/l60.xbm index 29692e4..11b9cc7 100644 --- a/app/bin/bitmaps/l60.xbm +++ b/app/bin/bitmaps/l60.xbm @@ -1,6 +1,78 @@ -#define l60_width 14 -#define l60_height 16 -static char l60_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x18, - 0x9F, 0x14, 0xA1, 0x12, 0xA1, 0x11, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l60_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0x0C, 0x33,
+ 0x7C, 0x33,
+ 0xFC, 0x33,
+ 0xCC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l60_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x1C, 0x38, 0x06,
+ 0x1C, 0x38, 0x06,
+ 0x1C, 0x38, 0x0E,
+ 0xFC, 0x39, 0x0E,
+ 0xBC, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x3F, 0x06,
+ 0x98, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l60_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x78, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x80, 0xC3, 0x03,
+ 0x1E, 0xC0, 0x83, 0x03,
+ 0xFE, 0xC3, 0x83, 0x03,
+ 0xFE, 0xCF, 0x83, 0x03,
+ 0x7E, 0xCF, 0x83, 0x03,
+ 0x3E, 0xDE, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1C, 0x9C, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x7C, 0x0F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xE0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l61.xbm b/app/bin/bitmaps/l61.xbm index 22973a9..1983790 100644 --- a/app/bin/bitmaps/l61.xbm +++ b/app/bin/bitmaps/l61.xbm @@ -1,6 +1,78 @@ -#define l61_width 14 -#define l61_height 16 -static char l61_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x01, 0x06, 0x01, 0x05, - 0x9F, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x1E, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l61_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1E,
+ 0x0C, 0x1F,
+ 0x7C, 0x1C,
+ 0xFC, 0x1C,
+ 0xCC, 0x1C,
+ 0xCC, 0x1C,
+ 0xFC, 0x1C,
+ 0x78, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l61_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0xC3, 0x03,
+ 0x98, 0xC3, 0x03,
+ 0x1C, 0xE0, 0x03,
+ 0x1C, 0xB0, 0x03,
+ 0x1C, 0x80, 0x03,
+ 0xFC, 0x81, 0x03,
+ 0xBC, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x98, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l61_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0x70, 0x00,
+ 0xF8, 0x0F, 0x70, 0x00,
+ 0x78, 0x0F, 0x78, 0x00,
+ 0x3C, 0x1E, 0x7C, 0x00,
+ 0x1C, 0x1E, 0x7E, 0x00,
+ 0x1C, 0x00, 0x7F, 0x00,
+ 0x1E, 0x00, 0x73, 0x00,
+ 0xFE, 0x03, 0x70, 0x00,
+ 0xFE, 0x0F, 0x70, 0x00,
+ 0x7E, 0x0F, 0x70, 0x00,
+ 0x3E, 0x1E, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1C, 0x1C, 0x70, 0x00,
+ 0x3C, 0x1E, 0x70, 0x00,
+ 0x7C, 0x0F, 0x70, 0x00,
+ 0xF8, 0x0F, 0x70, 0x00,
+ 0xE0, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l62.xbm b/app/bin/bitmaps/l62.xbm index 0447b20..93573ec 100644 --- a/app/bin/bitmaps/l62.xbm +++ b/app/bin/bitmaps/l62.xbm @@ -1,6 +1,78 @@ -#define l62_width 14 -#define l62_height 16 -static char l62_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x1F, 0x08, 0x21, 0x04, 0x21, 0x02, 0x21, 0x01, 0xA1, 0x00, 0x9E, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l62_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0x0C, 0x33,
+ 0x7C, 0x30,
+ 0xFC, 0x38,
+ 0xCC, 0x1C,
+ 0xCC, 0x0E,
+ 0xFC, 0x07,
+ 0x78, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l62_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x06,
+ 0x1C, 0x38, 0x0E,
+ 0x1C, 0x00, 0x0E,
+ 0x1C, 0x00, 0x0E,
+ 0xFC, 0x01, 0x07,
+ 0xBC, 0x83, 0x07,
+ 0x9C, 0x83, 0x03,
+ 0x1C, 0xC7, 0x01,
+ 0x1C, 0xE7, 0x01,
+ 0x1C, 0xF7, 0x00,
+ 0x98, 0x73, 0x00,
+ 0xB8, 0x7B, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l62_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0xFE, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0x78, 0x8F, 0xE7, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0xC0, 0x83, 0x03,
+ 0x1E, 0x00, 0x80, 0x03,
+ 0xFE, 0x03, 0xC0, 0x03,
+ 0xFE, 0x0F, 0xC0, 0x03,
+ 0x7E, 0x0F, 0xE0, 0x01,
+ 0x3E, 0x1E, 0xF0, 0x01,
+ 0x1E, 0x1C, 0xF8, 0x00,
+ 0x1E, 0x1C, 0x78, 0x00,
+ 0x1E, 0x1C, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1C, 0x1C, 0x0F, 0x00,
+ 0x3C, 0x9E, 0x07, 0x00,
+ 0x7C, 0x8F, 0x07, 0x00,
+ 0xF8, 0xCF, 0xFF, 0x03,
+ 0xE0, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l63.xbm b/app/bin/bitmaps/l63.xbm index 8fb46f9..6b95b4d 100644 --- a/app/bin/bitmaps/l63.xbm +++ b/app/bin/bitmaps/l63.xbm @@ -1,6 +1,78 @@ -#define l63_width 14 -#define l63_height 16 -static char l63_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x01, 0x10, - 0x1F, 0x10, 0x21, 0x0E, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l63_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3B,
+ 0x0C, 0x38,
+ 0x7C, 0x18,
+ 0xFC, 0x3C,
+ 0xCC, 0x38,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l63_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x07,
+ 0x1C, 0x00, 0x07,
+ 0x1C, 0x00, 0x07,
+ 0x1C, 0x00, 0x07,
+ 0xFC, 0x81, 0x03,
+ 0xBC, 0xC3, 0x07,
+ 0x9C, 0x03, 0x07,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x98, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l63_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x78, 0x8F, 0xE7, 0x01,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x00, 0xC0, 0x03,
+ 0x1E, 0x00, 0xC0, 0x01,
+ 0xFE, 0x03, 0xE0, 0x01,
+ 0xFE, 0x0F, 0xFC, 0x00,
+ 0x7E, 0x0F, 0xFC, 0x00,
+ 0x3E, 0x1E, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xC0, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDC, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x03,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xE0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l64.xbm b/app/bin/bitmaps/l64.xbm index 8fec658..e2a6cc5 100644 --- a/app/bin/bitmaps/l64.xbm +++ b/app/bin/bitmaps/l64.xbm @@ -1,6 +1,78 @@ -#define l64_width 14 -#define l64_height 16 -static char l64_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x01, 0x0C, 0x01, 0x0A, - 0x1F, 0x09, 0xA1, 0x08, 0xA1, 0x1F, 0x21, 0x08, 0x21, 0x08, 0x1E, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l64_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1C,
+ 0x0C, 0x1E,
+ 0x7C, 0x1E,
+ 0xFC, 0x1F,
+ 0xCC, 0x1B,
+ 0xCC, 0x3F,
+ 0xFC, 0x18,
+ 0x78, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l64_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x98, 0xC3, 0x03,
+ 0x1C, 0xC0, 0x03,
+ 0x1C, 0xE0, 0x03,
+ 0x1C, 0xE0, 0x03,
+ 0xFC, 0xF1, 0x03,
+ 0xBC, 0xB3, 0x03,
+ 0x9C, 0xBB, 0x03,
+ 0x1C, 0x9F, 0x03,
+ 0x1C, 0xFF, 0x0F,
+ 0x1C, 0x87, 0x03,
+ 0x98, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l64_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0xF0, 0x00,
+ 0xF8, 0x0F, 0xF0, 0x00,
+ 0x78, 0x0F, 0xF8, 0x00,
+ 0x3C, 0x1E, 0xF8, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x1C, 0x00, 0xFC, 0x00,
+ 0x1E, 0x00, 0xFE, 0x00,
+ 0xFE, 0x03, 0xEE, 0x00,
+ 0xFE, 0x0F, 0xEF, 0x00,
+ 0x7E, 0x8F, 0xE7, 0x00,
+ 0x3E, 0x9E, 0xE7, 0x00,
+ 0x1E, 0xDC, 0xE3, 0x00,
+ 0x1E, 0xDC, 0xE1, 0x00,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1C, 0x1C, 0xE0, 0x00,
+ 0x3C, 0x1E, 0xE0, 0x00,
+ 0x7C, 0x0F, 0xE0, 0x00,
+ 0xF8, 0x0F, 0xE0, 0x00,
+ 0xE0, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l65.xbm b/app/bin/bitmaps/l65.xbm index 34b6f4a..3ab1ce6 100644 --- a/app/bin/bitmaps/l65.xbm +++ b/app/bin/bitmaps/l65.xbm @@ -1,6 +1,78 @@ -#define l65_width 14 -#define l65_height 16 -static char l65_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x81, 0x00, 0x81, 0x00, - 0x9F, 0x0F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l65_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x07,
+ 0x0C, 0x07,
+ 0x7C, 0x1F,
+ 0xFC, 0x3B,
+ 0xCC, 0x30,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l65_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF1, 0x07,
+ 0xB8, 0x73, 0x00,
+ 0x98, 0x73, 0x00,
+ 0x1C, 0x30, 0x00,
+ 0x1C, 0x30, 0x00,
+ 0x1C, 0xF8, 0x03,
+ 0xFC, 0x79, 0x07,
+ 0xBC, 0x3B, 0x07,
+ 0x9C, 0x03, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x06,
+ 0x98, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l65_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0xFF, 0x03,
+ 0xF8, 0x0F, 0xFF, 0x03,
+ 0x78, 0x0F, 0x07, 0x00,
+ 0x3C, 0x1E, 0x07, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x1C, 0x80, 0x07, 0x00,
+ 0x1E, 0x80, 0x7F, 0x00,
+ 0xFE, 0x83, 0xFF, 0x01,
+ 0xFE, 0x8F, 0xE7, 0x01,
+ 0x7E, 0x8F, 0xC3, 0x03,
+ 0x3E, 0x1E, 0xC0, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDC, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x03,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xE0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l66.xbm b/app/bin/bitmaps/l66.xbm index 1e28cf3..1abbf7c 100644 --- a/app/bin/bitmaps/l66.xbm +++ b/app/bin/bitmaps/l66.xbm @@ -1,6 +1,78 @@ -#define l66_width 14 -#define l66_height 16 -static char l66_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x00, 0x81, 0x00, - 0x9F, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l66_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0x0C, 0x03,
+ 0x7C, 0x1F,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l66_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x1C, 0x38, 0x00,
+ 0x1C, 0x38, 0x00,
+ 0x1C, 0x38, 0x00,
+ 0xFC, 0xF9, 0x03,
+ 0xBC, 0x7B, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x98, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l66_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0xFC, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0x78, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x9E, 0xC7, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x80, 0x03, 0x00,
+ 0x1E, 0xC0, 0x03, 0x00,
+ 0xFE, 0xC3, 0x7F, 0x00,
+ 0xFE, 0xCF, 0xFF, 0x01,
+ 0x7E, 0xCF, 0xEF, 0x01,
+ 0x3E, 0xDE, 0xC7, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0x9C, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC7, 0x03,
+ 0x7C, 0x8F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xE0, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l67.xbm b/app/bin/bitmaps/l67.xbm index bbc56bf..8cce97c 100644 --- a/app/bin/bitmaps/l67.xbm +++ b/app/bin/bitmaps/l67.xbm @@ -1,6 +1,78 @@ -#define l67_width 14 -#define l67_height 16 -static char l67_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x01, 0x10, 0x01, 0x08, - 0x1F, 0x08, 0x21, 0x04, 0x21, 0x04, 0x21, 0x02, 0x21, 0x02, 0x1E, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l67_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x38,
+ 0x0C, 0x18,
+ 0x7C, 0x1C,
+ 0xFC, 0x0C,
+ 0xCC, 0x0E,
+ 0xCC, 0x0E,
+ 0xFC, 0x06,
+ 0x78, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l67_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0xB8, 0x03, 0x0F,
+ 0x98, 0x03, 0x07,
+ 0x1C, 0x80, 0x03,
+ 0x1C, 0x80, 0x03,
+ 0x1C, 0xC0, 0x01,
+ 0xFC, 0xC1, 0x01,
+ 0xBC, 0xC3, 0x01,
+ 0x9C, 0xE3, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x98, 0xE3, 0x00,
+ 0xB8, 0x73, 0x00,
+ 0xF0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l67_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0xC7, 0xFF, 0x03,
+ 0xF8, 0xCF, 0xFF, 0x03,
+ 0x78, 0x0F, 0xC0, 0x03,
+ 0x3C, 0x1E, 0xE0, 0x01,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x1C, 0x00, 0xF0, 0x00,
+ 0x1E, 0x00, 0xF0, 0x00,
+ 0xFE, 0x03, 0x78, 0x00,
+ 0xFE, 0x0F, 0x78, 0x00,
+ 0x7E, 0x0F, 0x38, 0x00,
+ 0x3E, 0x1E, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1C, 0x1C, 0x1E, 0x00,
+ 0x3C, 0x1E, 0x1E, 0x00,
+ 0x7C, 0x0F, 0x0E, 0x00,
+ 0xF8, 0x0F, 0x0E, 0x00,
+ 0xE0, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l68.xbm b/app/bin/bitmaps/l68.xbm index db31fa9..e32b8c2 100644 --- a/app/bin/bitmaps/l68.xbm +++ b/app/bin/bitmaps/l68.xbm @@ -1,6 +1,78 @@ -#define l68_width 14 -#define l68_height 16 -static char l68_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x9F, 0x10, 0x21, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l68_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0x0C, 0x3B,
+ 0x7C, 0x3F,
+ 0xFC, 0x1E,
+ 0xCC, 0x3F,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l68_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x1C, 0x38, 0x07,
+ 0x1C, 0x38, 0x07,
+ 0x1C, 0x38, 0x07,
+ 0xFC, 0x71, 0x07,
+ 0xBC, 0xE3, 0x03,
+ 0x9C, 0x73, 0x07,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x98, 0x3B, 0x06,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l68_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x78, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x80, 0xC3, 0x03,
+ 0x1E, 0x80, 0xC7, 0x01,
+ 0xFE, 0x03, 0xEF, 0x01,
+ 0xFE, 0x0F, 0xFE, 0x00,
+ 0x7E, 0x0F, 0xFF, 0x00,
+ 0x3E, 0x9E, 0xE7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDC, 0x83, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x03,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xE0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l69.xbm b/app/bin/bitmaps/l69.xbm index 2d79bc7..8df10ca 100644 --- a/app/bin/bitmaps/l69.xbm +++ b/app/bin/bitmaps/l69.xbm @@ -1,6 +1,78 @@ -#define l69_width 14 -#define l69_height 16 -static char l69_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0x81, 0x10, 0x81, 0x10, - 0x9F, 0x10, 0x21, 0x1F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x08, 0x1E, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l69_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0x0C, 0x33,
+ 0x7C, 0x33,
+ 0xFC, 0x3F,
+ 0xCC, 0x3E,
+ 0xCC, 0x30,
+ 0xFC, 0x3B,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l69_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x01,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x07,
+ 0x1C, 0x38, 0x06,
+ 0x1C, 0x38, 0x0E,
+ 0x1C, 0x38, 0x0E,
+ 0xFC, 0x39, 0x0F,
+ 0xBC, 0x73, 0x0F,
+ 0x9C, 0xE3, 0x0F,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x07, 0x06,
+ 0x1C, 0x07, 0x06,
+ 0x98, 0x3B, 0x07,
+ 0xB8, 0x73, 0x03,
+ 0xF0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l69_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xE0, 0x07, 0x7E, 0x00,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0x78, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x9E, 0xC7, 0x01,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0xC0, 0x83, 0x03,
+ 0x1E, 0xC0, 0x83, 0x03,
+ 0xFE, 0xC3, 0x83, 0x03,
+ 0xFE, 0xCF, 0x83, 0x03,
+ 0x7E, 0x8F, 0xC3, 0x03,
+ 0x3E, 0x9E, 0xE7, 0x03,
+ 0x1E, 0x1C, 0xFF, 0x03,
+ 0x1E, 0x1C, 0xFE, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1C, 0x9C, 0xC3, 0x03,
+ 0x3C, 0x9E, 0xC3, 0x01,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xE0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l7.xbm b/app/bin/bitmaps/l7.xbm index 28b2698..a86a7cc 100644 --- a/app/bin/bitmaps/l7.xbm +++ b/app/bin/bitmaps/l7.xbm @@ -1,6 +1,78 @@ -#define l7_width 14 -#define l7_height 16 -static char l7_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x01, 0x80, 0x00, - 0x80, 0x00, 0x40, 0x00, 0x40, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l7_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xE0, 0x07,
+ 0x00, 0x07,
+ 0x00, 0x03,
+ 0x80, 0x03,
+ 0x80, 0x01,
+ 0xC0, 0x01,
+ 0xC0, 0x01,
+ 0xC0, 0x00,
+ 0xC0, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l7_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xC0, 0x7F, 0x00,
+ 0x00, 0x78, 0x00,
+ 0x00, 0x38, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x1C, 0x00,
+ 0x00, 0x0E, 0x00,
+ 0x00, 0x0E, 0x00,
+ 0x00, 0x0E, 0x00,
+ 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00,
+ 0x00, 0x07, 0x00,
+ 0x80, 0x03, 0x00,
+ 0x80, 0x03, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l7_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xFF, 0x07, 0x00,
+ 0x80, 0xFF, 0x07, 0x00,
+ 0x00, 0x80, 0x07, 0x00,
+ 0x00, 0xC0, 0x03, 0x00,
+ 0x00, 0xC0, 0x03, 0x00,
+ 0x00, 0xE0, 0x01, 0x00,
+ 0x00, 0xE0, 0x01, 0x00,
+ 0x00, 0xF0, 0x00, 0x00,
+ 0x00, 0xF0, 0x00, 0x00,
+ 0x00, 0x70, 0x00, 0x00,
+ 0x00, 0x78, 0x00, 0x00,
+ 0x00, 0x78, 0x00, 0x00,
+ 0x00, 0x38, 0x00, 0x00,
+ 0x00, 0x3C, 0x00, 0x00,
+ 0x00, 0x3C, 0x00, 0x00,
+ 0x00, 0x3C, 0x00, 0x00,
+ 0x00, 0x3C, 0x00, 0x00,
+ 0x00, 0x1C, 0x00, 0x00,
+ 0x00, 0x1C, 0x00, 0x00,
+ 0x00, 0x1C, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l70.xbm b/app/bin/bitmaps/l70.xbm index 16b4c70..cfa65e6 100644 --- a/app/bin/bitmaps/l70.xbm +++ b/app/bin/bitmaps/l70.xbm @@ -1,6 +1,78 @@ -#define l70_width 14 -#define l70_height 16 -static char l70_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x18, - 0x90, 0x14, 0x88, 0x12, 0x88, 0x11, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l70_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3F,
+ 0x60, 0x33,
+ 0x70, 0x33,
+ 0x30, 0x33,
+ 0x38, 0x33,
+ 0x38, 0x33,
+ 0x18, 0x3F,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l70_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x03,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x33, 0x07,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x06,
+ 0xE0, 0x38, 0x0E,
+ 0xE0, 0x38, 0x0E,
+ 0xE0, 0x38, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x06,
+ 0x70, 0x38, 0x06,
+ 0x70, 0x30, 0x07,
+ 0x38, 0x70, 0x07,
+ 0x38, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l70_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0x00, 0x1E, 0xEF, 0x01,
+ 0x00, 0x8F, 0xC7, 0x01,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x87, 0xC3, 0x03,
+ 0x80, 0xC7, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xC0, 0xC1, 0x83, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xE0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0xF0, 0x80, 0xC7, 0x01,
+ 0x70, 0x00, 0xEF, 0x01,
+ 0x70, 0x00, 0xFF, 0x00,
+ 0x70, 0x00, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l71.xbm b/app/bin/bitmaps/l71.xbm index 12223f5..eeb2d63 100644 --- a/app/bin/bitmaps/l71.xbm +++ b/app/bin/bitmaps/l71.xbm @@ -1,6 +1,78 @@ -#define l71_width 14 -#define l71_height 16 -static char l71_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x20, 0x06, 0x10, 0x05, - 0x90, 0x04, 0x08, 0x04, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l71_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1C,
+ 0xE0, 0x1E,
+ 0x60, 0x1F,
+ 0x70, 0x1C,
+ 0x30, 0x1C,
+ 0x38, 0x1C,
+ 0x38, 0x1C,
+ 0x18, 0x1C,
+ 0x18, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l71_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0x87, 0x03,
+ 0x80, 0xC7, 0x03,
+ 0x80, 0xC3, 0x03,
+ 0xC0, 0xE1, 0x03,
+ 0xC0, 0xB1, 0x03,
+ 0xE0, 0x80, 0x03,
+ 0xE0, 0x80, 0x03,
+ 0xE0, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l71_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0x70, 0x00,
+ 0xFE, 0x1F, 0x70, 0x00,
+ 0x00, 0x1E, 0x78, 0x00,
+ 0x00, 0x0F, 0x7C, 0x00,
+ 0x00, 0x0F, 0x7E, 0x00,
+ 0x80, 0x07, 0x7F, 0x00,
+ 0x80, 0x07, 0x73, 0x00,
+ 0xC0, 0x03, 0x70, 0x00,
+ 0xC0, 0x03, 0x70, 0x00,
+ 0xC0, 0x01, 0x70, 0x00,
+ 0xE0, 0x01, 0x70, 0x00,
+ 0xE0, 0x01, 0x70, 0x00,
+ 0xE0, 0x00, 0x70, 0x00,
+ 0xF0, 0x00, 0x70, 0x00,
+ 0xF0, 0x00, 0x70, 0x00,
+ 0xF0, 0x00, 0x70, 0x00,
+ 0xF0, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x70, 0x00,
+ 0x70, 0x00, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l72.xbm b/app/bin/bitmaps/l72.xbm index 164f621..9ff206f 100644 --- a/app/bin/bitmaps/l72.xbm +++ b/app/bin/bitmaps/l72.xbm @@ -1,6 +1,78 @@ -#define l72_width 14 -#define l72_height 16 -static char l72_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10, - 0x10, 0x08, 0x08, 0x04, 0x08, 0x02, 0x04, 0x01, 0x84, 0x00, 0x84, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l72_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3F,
+ 0x60, 0x33,
+ 0x70, 0x30,
+ 0x30, 0x38,
+ 0x38, 0x1C,
+ 0x38, 0x0E,
+ 0x18, 0x07,
+ 0x18, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l72_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x03,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x3B, 0x06,
+ 0xC0, 0x39, 0x0E,
+ 0xC0, 0x01, 0x0E,
+ 0xE0, 0x00, 0x0E,
+ 0xE0, 0x00, 0x07,
+ 0xE0, 0x80, 0x07,
+ 0x70, 0x80, 0x03,
+ 0x70, 0xC0, 0x01,
+ 0x70, 0xE0, 0x01,
+ 0x70, 0xF0, 0x00,
+ 0x70, 0x70, 0x00,
+ 0x38, 0x78, 0x00,
+ 0x38, 0xF8, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l72_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0xFE, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x01,
+ 0x00, 0x9E, 0xE7, 0x03,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0x80, 0xC7, 0x83, 0x03,
+ 0x80, 0x07, 0x80, 0x03,
+ 0xC0, 0x03, 0xC0, 0x03,
+ 0xC0, 0x03, 0xC0, 0x03,
+ 0xC0, 0x01, 0xE0, 0x01,
+ 0xE0, 0x01, 0xF0, 0x01,
+ 0xE0, 0x01, 0xF8, 0x00,
+ 0xE0, 0x00, 0x78, 0x00,
+ 0xF0, 0x00, 0x3C, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0xF0, 0x00, 0x0F, 0x00,
+ 0xF0, 0x80, 0x07, 0x00,
+ 0x70, 0x80, 0x07, 0x00,
+ 0x70, 0xC0, 0xFF, 0x03,
+ 0x70, 0xC0, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l73.xbm b/app/bin/bitmaps/l73.xbm index 0031594..64dfbb4 100644 --- a/app/bin/bitmaps/l73.xbm +++ b/app/bin/bitmaps/l73.xbm @@ -1,6 +1,78 @@ -#define l73_width 14 -#define l73_height 16 -static char l73_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x08, 0x0E, 0x08, 0x10, 0x04, 0x10, 0x84, 0x10, 0x04, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l73_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3B,
+ 0x60, 0x38,
+ 0x70, 0x18,
+ 0x30, 0x3C,
+ 0x38, 0x38,
+ 0x38, 0x33,
+ 0x18, 0x3F,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l73_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x03,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0xC0, 0x01, 0x07,
+ 0xC0, 0x01, 0x07,
+ 0xE0, 0x00, 0x07,
+ 0xE0, 0x80, 0x03,
+ 0xE0, 0xC0, 0x07,
+ 0x70, 0x00, 0x07,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x07,
+ 0x38, 0x70, 0x07,
+ 0x38, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l73_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0x00, 0x9E, 0xE7, 0x01,
+ 0x00, 0x8F, 0xC7, 0x01,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x07, 0xC0, 0x03,
+ 0x80, 0x07, 0xC0, 0x01,
+ 0xC0, 0x03, 0xE0, 0x01,
+ 0xC0, 0x03, 0xFC, 0x00,
+ 0xC0, 0x01, 0xFC, 0x00,
+ 0xE0, 0x01, 0xE0, 0x01,
+ 0xE0, 0x01, 0xC0, 0x03,
+ 0xE0, 0x00, 0x80, 0x03,
+ 0xF0, 0x00, 0x80, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0x80, 0xC7, 0x03,
+ 0x70, 0x80, 0xE7, 0x01,
+ 0x70, 0x00, 0xFF, 0x01,
+ 0x70, 0x00, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l74.xbm b/app/bin/bitmaps/l74.xbm index be95f2c..c41ea54 100644 --- a/app/bin/bitmaps/l74.xbm +++ b/app/bin/bitmaps/l74.xbm @@ -1,6 +1,78 @@ -#define l74_width 14 -#define l74_height 16 -static char l74_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x08, 0x20, 0x0C, 0x10, 0x0A, - 0x10, 0x09, 0x88, 0x08, 0x88, 0x1F, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l74_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1C,
+ 0xE0, 0x1C,
+ 0x60, 0x1E,
+ 0x70, 0x1E,
+ 0x30, 0x1F,
+ 0x38, 0x1B,
+ 0xB8, 0x3F,
+ 0x18, 0x18,
+ 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l74_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0x87, 0x03,
+ 0x80, 0x87, 0x03,
+ 0x80, 0xC3, 0x03,
+ 0xC0, 0xC1, 0x03,
+ 0xC0, 0xE1, 0x03,
+ 0xE0, 0xE0, 0x03,
+ 0xE0, 0xF0, 0x03,
+ 0xE0, 0xB0, 0x03,
+ 0x70, 0xB8, 0x03,
+ 0x70, 0x98, 0x03,
+ 0x70, 0xFC, 0x0F,
+ 0x70, 0x80, 0x03,
+ 0x70, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x38, 0x80, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l74_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0xF0, 0x00,
+ 0xFE, 0x1F, 0xF0, 0x00,
+ 0x00, 0x1E, 0xF8, 0x00,
+ 0x00, 0x0F, 0xF8, 0x00,
+ 0x00, 0x0F, 0xFC, 0x00,
+ 0x80, 0x07, 0xFC, 0x00,
+ 0x80, 0x07, 0xFE, 0x00,
+ 0xC0, 0x03, 0xEE, 0x00,
+ 0xC0, 0x03, 0xEF, 0x00,
+ 0xC0, 0x81, 0xE7, 0x00,
+ 0xE0, 0x81, 0xE7, 0x00,
+ 0xE0, 0xC1, 0xE3, 0x00,
+ 0xE0, 0xC0, 0xE1, 0x00,
+ 0xF0, 0xE0, 0xFF, 0x03,
+ 0xF0, 0xE0, 0xFF, 0x03,
+ 0xF0, 0x00, 0xE0, 0x00,
+ 0xF0, 0x00, 0xE0, 0x00,
+ 0x70, 0x00, 0xE0, 0x00,
+ 0x70, 0x00, 0xE0, 0x00,
+ 0x70, 0x00, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l75.xbm b/app/bin/bitmaps/l75.xbm index 3524c94..58a6c52 100644 --- a/app/bin/bitmaps/l75.xbm +++ b/app/bin/bitmaps/l75.xbm @@ -1,6 +1,78 @@ -#define l75_width 14 -#define l75_height 16 -static char l75_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0xA0, 0x00, 0x90, 0x00, - 0x90, 0x0F, 0x08, 0x10, 0x08, 0x10, 0x04, 0x10, 0x84, 0x10, 0x04, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l75_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x3F,
+ 0xE0, 0x07,
+ 0x60, 0x07,
+ 0x70, 0x1F,
+ 0x30, 0x3B,
+ 0x38, 0x30,
+ 0x38, 0x33,
+ 0x18, 0x3F,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l75_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xF7, 0x07,
+ 0x80, 0x77, 0x00,
+ 0x80, 0x73, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xE0, 0xF8, 0x03,
+ 0xE0, 0x78, 0x07,
+ 0xE0, 0x38, 0x07,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x38, 0x06,
+ 0x70, 0x38, 0x07,
+ 0x38, 0x70, 0x07,
+ 0x38, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l75_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x03,
+ 0xFE, 0x1F, 0xFF, 0x03,
+ 0x00, 0x1E, 0x07, 0x00,
+ 0x00, 0x0F, 0x07, 0x00,
+ 0x00, 0x8F, 0x07, 0x00,
+ 0x80, 0x87, 0x07, 0x00,
+ 0x80, 0x87, 0x7F, 0x00,
+ 0xC0, 0x83, 0xFF, 0x01,
+ 0xC0, 0x83, 0xE7, 0x01,
+ 0xC0, 0x81, 0xC3, 0x03,
+ 0xE0, 0x01, 0xC0, 0x03,
+ 0xE0, 0x01, 0x80, 0x03,
+ 0xE0, 0x00, 0x80, 0x03,
+ 0xF0, 0x00, 0x80, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0xC3, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0x70, 0x80, 0xE7, 0x01,
+ 0x70, 0x00, 0xFF, 0x00,
+ 0x70, 0x00, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l76.xbm b/app/bin/bitmaps/l76.xbm index 83e8f59..9b385dc 100644 --- a/app/bin/bitmaps/l76.xbm +++ b/app/bin/bitmaps/l76.xbm @@ -1,6 +1,78 @@ -#define l76_width 14 -#define l76_height 16 -static char l76_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x00, 0x90, 0x00, - 0x90, 0x0F, 0x88, 0x10, 0x88, 0x10, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l76_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3F,
+ 0x60, 0x03,
+ 0x70, 0x1F,
+ 0x30, 0x3F,
+ 0x38, 0x33,
+ 0x38, 0x33,
+ 0x18, 0x3F,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l76_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x03,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x33, 0x07,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xE0, 0x38, 0x00,
+ 0xE0, 0xF8, 0x03,
+ 0xE0, 0x78, 0x07,
+ 0x70, 0x38, 0x07,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x30, 0x07,
+ 0x38, 0x70, 0x07,
+ 0x38, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l76_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0xFC, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x01,
+ 0x00, 0x1E, 0xEF, 0x01,
+ 0x00, 0x8F, 0xC7, 0x03,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x87, 0x03, 0x00,
+ 0x80, 0xC7, 0x03, 0x00,
+ 0xC0, 0xC3, 0x7F, 0x00,
+ 0xC0, 0xC3, 0xFF, 0x01,
+ 0xC0, 0xC1, 0xEF, 0x01,
+ 0xE0, 0xC1, 0xC7, 0x03,
+ 0xE0, 0xC1, 0x83, 0x03,
+ 0xE0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0x80, 0x83, 0x03,
+ 0xF0, 0x80, 0xC7, 0x03,
+ 0x70, 0x80, 0xEF, 0x01,
+ 0x70, 0x00, 0xFF, 0x01,
+ 0x70, 0x00, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l77.xbm b/app/bin/bitmaps/l77.xbm index 4e48354..c406f2d 100644 --- a/app/bin/bitmaps/l77.xbm +++ b/app/bin/bitmaps/l77.xbm @@ -1,6 +1,78 @@ -#define l77_width 14 -#define l77_height 16 -static char l77_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x1F, 0x20, 0x10, 0x10, 0x08, - 0x10, 0x08, 0x08, 0x04, 0x08, 0x04, 0x04, 0x02, 0x04, 0x02, 0x04, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l77_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x3F,
+ 0xE0, 0x38,
+ 0x60, 0x18,
+ 0x70, 0x1C,
+ 0x30, 0x0C,
+ 0x38, 0x0E,
+ 0x38, 0x0E,
+ 0x18, 0x06,
+ 0x18, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l77_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xFF, 0x0F,
+ 0x80, 0x07, 0x0F,
+ 0x80, 0x03, 0x07,
+ 0xC0, 0x81, 0x03,
+ 0xC0, 0x81, 0x03,
+ 0xE0, 0xC0, 0x01,
+ 0xE0, 0xC0, 0x01,
+ 0xE0, 0xC0, 0x01,
+ 0x70, 0xE0, 0x00,
+ 0x70, 0xE0, 0x00,
+ 0x70, 0xE0, 0x00,
+ 0x70, 0xE0, 0x00,
+ 0x70, 0xE0, 0x00,
+ 0x38, 0x70, 0x00,
+ 0x38, 0x70, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l77_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0xDF, 0xFF, 0x03,
+ 0xFE, 0xDF, 0xFF, 0x03,
+ 0x00, 0x1E, 0xC0, 0x03,
+ 0x00, 0x0F, 0xE0, 0x01,
+ 0x00, 0x0F, 0xE0, 0x01,
+ 0x80, 0x07, 0xF0, 0x00,
+ 0x80, 0x07, 0xF0, 0x00,
+ 0xC0, 0x03, 0x78, 0x00,
+ 0xC0, 0x03, 0x78, 0x00,
+ 0xC0, 0x01, 0x38, 0x00,
+ 0xE0, 0x01, 0x3C, 0x00,
+ 0xE0, 0x01, 0x3C, 0x00,
+ 0xE0, 0x00, 0x1C, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0xF0, 0x00, 0x1E, 0x00,
+ 0x70, 0x00, 0x0E, 0x00,
+ 0x70, 0x00, 0x0E, 0x00,
+ 0x70, 0x00, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l78.xbm b/app/bin/bitmaps/l78.xbm index 731d05d..0674918 100644 --- a/app/bin/bitmaps/l78.xbm +++ b/app/bin/bitmaps/l78.xbm @@ -1,6 +1,78 @@ -#define l78_width 14 -#define l78_height 16 -static char l78_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10, - 0x90, 0x10, 0x08, 0x0F, 0x88, 0x10, 0x84, 0x10, 0x84, 0x10, 0x04, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l78_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3F,
+ 0x60, 0x3B,
+ 0x70, 0x3F,
+ 0x30, 0x1E,
+ 0x38, 0x3F,
+ 0x38, 0x33,
+ 0x18, 0x3F,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l78_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x03,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x33, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xC0, 0x39, 0x07,
+ 0xE0, 0x38, 0x07,
+ 0xE0, 0x70, 0x07,
+ 0xE0, 0xE0, 0x03,
+ 0x70, 0x70, 0x07,
+ 0x70, 0x38, 0x06,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x0E,
+ 0x70, 0x38, 0x06,
+ 0x38, 0x70, 0x07,
+ 0x38, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l78_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0x00, 0x9E, 0xEF, 0x01,
+ 0x00, 0x8F, 0xC7, 0x01,
+ 0x00, 0x8F, 0xC3, 0x03,
+ 0x80, 0x87, 0xC3, 0x03,
+ 0x80, 0x87, 0xC7, 0x01,
+ 0xC0, 0x03, 0xEF, 0x01,
+ 0xC0, 0x03, 0xFE, 0x00,
+ 0xC0, 0x01, 0xFF, 0x00,
+ 0xE0, 0x81, 0xE7, 0x01,
+ 0xE0, 0x81, 0xC3, 0x03,
+ 0xE0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0xC0, 0x83, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0x70, 0x80, 0xE7, 0x01,
+ 0x70, 0x00, 0xFF, 0x01,
+ 0x70, 0x00, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l79.xbm b/app/bin/bitmaps/l79.xbm index 4e5259a..c1d909b 100644 --- a/app/bin/bitmaps/l79.xbm +++ b/app/bin/bitmaps/l79.xbm @@ -1,6 +1,78 @@ -#define l79_width 14 -#define l79_height 16 -static char l79_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x0F, 0xA0, 0x10, 0x90, 0x10, - 0x90, 0x10, 0x08, 0x1F, 0x08, 0x10, 0x04, 0x10, 0x04, 0x08, 0x04, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l79_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xFC, 0x1E,
+ 0xE0, 0x3F,
+ 0x60, 0x33,
+ 0x70, 0x33,
+ 0x30, 0x3F,
+ 0x38, 0x3E,
+ 0x38, 0x30,
+ 0x18, 0x3B,
+ 0x18, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l79_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFC, 0xE7, 0x01,
+ 0x80, 0x77, 0x07,
+ 0x80, 0x3B, 0x07,
+ 0xC0, 0x39, 0x06,
+ 0xC0, 0x39, 0x0E,
+ 0xE0, 0x38, 0x0E,
+ 0xE0, 0x38, 0x0F,
+ 0xE0, 0x70, 0x0F,
+ 0x70, 0xE0, 0x0F,
+ 0x70, 0x00, 0x0E,
+ 0x70, 0x00, 0x06,
+ 0x70, 0x00, 0x06,
+ 0x70, 0x38, 0x07,
+ 0x38, 0x70, 0x03,
+ 0x38, 0xF0, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l79_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xFE, 0x1F, 0x7E, 0x00,
+ 0xFE, 0x1F, 0xFF, 0x00,
+ 0x00, 0x9E, 0xEF, 0x01,
+ 0x00, 0x8F, 0xC7, 0x01,
+ 0x00, 0xCF, 0x83, 0x03,
+ 0x80, 0xC7, 0x83, 0x03,
+ 0x80, 0xC7, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xC0, 0xC3, 0x83, 0x03,
+ 0xC0, 0x81, 0xC3, 0x03,
+ 0xE0, 0x81, 0xE7, 0x03,
+ 0xE0, 0x01, 0xFF, 0x03,
+ 0xE0, 0x00, 0xFE, 0x03,
+ 0xF0, 0x00, 0x80, 0x03,
+ 0xF0, 0x00, 0x80, 0x03,
+ 0xF0, 0x80, 0xC3, 0x03,
+ 0xF0, 0x80, 0xC3, 0x01,
+ 0x70, 0x80, 0xE7, 0x01,
+ 0x70, 0x00, 0xFF, 0x00,
+ 0x70, 0x00, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l8.xbm b/app/bin/bitmaps/l8.xbm index cf07c8f..1054bfd 100644 --- a/app/bin/bitmaps/l8.xbm +++ b/app/bin/bitmaps/l8.xbm @@ -1,6 +1,78 @@ -#define l8_width 14 -#define l8_height 16 -static char l8_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, - 0x08, 0x01, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l8_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xC0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x07,
+ 0xE0, 0x07,
+ 0xC0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x06,
+ 0xE0, 0x07,
+ 0xC0, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l8_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x80, 0x39, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0x00, 0x1F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l8_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xDF, 0x03, 0x00,
+ 0x00, 0x8F, 0x03, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x8F, 0x03, 0x00,
+ 0x00, 0xDE, 0x03, 0x00,
+ 0x00, 0xFC, 0x01, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0xFE, 0x03, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l80.xbm b/app/bin/bitmaps/l80.xbm index 116c68f..8dc12d0 100644 --- a/app/bin/bitmaps/l80.xbm +++ b/app/bin/bitmaps/l80.xbm @@ -1,6 +1,78 @@ -#define l80_width 14 -#define l80_height 16 -static char l80_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18, - 0xA1, 0x14, 0x9E, 0x12, 0xA1, 0x11, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l80_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xEC, 0x33,
+ 0xFC, 0x33,
+ 0x78, 0x33,
+ 0xFC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l80_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x9C, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x0E,
+ 0xB8, 0x3B, 0x0E,
+ 0xF0, 0x39, 0x0E,
+ 0xB8, 0x3B, 0x0E,
+ 0x1C, 0x3B, 0x0E,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l80_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0xCE, 0x83, 0x03,
+ 0x78, 0xCF, 0x83, 0x03,
+ 0xF0, 0xC7, 0x83, 0x03,
+ 0xF8, 0xC7, 0x83, 0x03,
+ 0x3C, 0xCF, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x01,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l81.xbm b/app/bin/bitmaps/l81.xbm index 747787e..118901b 100644 --- a/app/bin/bitmaps/l81.xbm +++ b/app/bin/bitmaps/l81.xbm @@ -1,6 +1,78 @@ -#define l81_width 14 -#define l81_height 16 -static char l81_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05, - 0xA1, 0x04, 0x1E, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x1E, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l81_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1E,
+ 0xEC, 0x1F,
+ 0xFC, 0x1C,
+ 0x78, 0x1C,
+ 0xFC, 0x1C,
+ 0xCC, 0x1C,
+ 0xFC, 0x1C,
+ 0x78, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l81_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0xC3, 0x03,
+ 0x98, 0xC3, 0x03,
+ 0x9C, 0xE3, 0x03,
+ 0x9C, 0xB3, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x1C, 0x83, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l81_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0x7C, 0x0F, 0x78, 0x00,
+ 0x3C, 0x0E, 0x7C, 0x00,
+ 0x1C, 0x1E, 0x7E, 0x00,
+ 0x1C, 0x1E, 0x7F, 0x00,
+ 0x3C, 0x0E, 0x73, 0x00,
+ 0x78, 0x0F, 0x70, 0x00,
+ 0xF0, 0x07, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0xF8, 0x0F, 0x70, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l82.xbm b/app/bin/bitmaps/l82.xbm index e8758f9..74edb5d 100644 --- a/app/bin/bitmaps/l82.xbm +++ b/app/bin/bitmaps/l82.xbm @@ -1,6 +1,78 @@ -#define l82_width 14 -#define l82_height 16 -static char l82_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0x21, 0x08, 0x1E, 0x04, 0x21, 0x02, 0x21, 0x01, 0xA1, 0x00, 0x9E, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l82_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xEC, 0x33,
+ 0xFC, 0x30,
+ 0x78, 0x38,
+ 0xFC, 0x1C,
+ 0xCC, 0x0E,
+ 0xFC, 0x07,
+ 0x78, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l82_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x0E,
+ 0x9C, 0x03, 0x0E,
+ 0x9C, 0x03, 0x0E,
+ 0xB8, 0x03, 0x07,
+ 0xF0, 0x81, 0x07,
+ 0xB8, 0x83, 0x03,
+ 0x1C, 0xC3, 0x01,
+ 0x1C, 0xE7, 0x01,
+ 0x1C, 0xF7, 0x00,
+ 0x1C, 0x73, 0x00,
+ 0xB8, 0x7B, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l82_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFE, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x7C, 0x8F, 0xE7, 0x03,
+ 0x3C, 0x8E, 0xC3, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x3C, 0x0E, 0x80, 0x03,
+ 0x78, 0x0F, 0xC0, 0x03,
+ 0xF0, 0x07, 0xC0, 0x03,
+ 0xF8, 0x07, 0xE0, 0x01,
+ 0x3C, 0x0F, 0xF0, 0x01,
+ 0x1C, 0x1E, 0xF8, 0x00,
+ 0x1E, 0x1C, 0x78, 0x00,
+ 0x1E, 0x1C, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x0F, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x3C, 0x8F, 0x07, 0x00,
+ 0xF8, 0xCF, 0xFF, 0x03,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l83.xbm b/app/bin/bitmaps/l83.xbm index 8ccbf89..3f7a1a0 100644 --- a/app/bin/bitmaps/l83.xbm +++ b/app/bin/bitmaps/l83.xbm @@ -1,6 +1,78 @@ -#define l83_width 14 -#define l83_height 16 -static char l83_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10, - 0x21, 0x10, 0x1E, 0x0E, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l83_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3B,
+ 0xEC, 0x38,
+ 0xFC, 0x18,
+ 0x78, 0x3C,
+ 0xFC, 0x38,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l83_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x07,
+ 0x9C, 0x03, 0x07,
+ 0x9C, 0x03, 0x07,
+ 0x9C, 0x03, 0x07,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0xC1, 0x07,
+ 0xB8, 0x03, 0x07,
+ 0x1C, 0x03, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l83_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x1E, 0xC0, 0x03,
+ 0x3C, 0x0E, 0xC0, 0x01,
+ 0x78, 0x0F, 0xE0, 0x01,
+ 0xF0, 0x07, 0xFC, 0x00,
+ 0xF8, 0x07, 0xFC, 0x00,
+ 0x3C, 0x0F, 0xE0, 0x01,
+ 0x1C, 0x1E, 0xC0, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l84.xbm b/app/bin/bitmaps/l84.xbm index 5e0e1ba..0cce4be 100644 --- a/app/bin/bitmaps/l84.xbm +++ b/app/bin/bitmaps/l84.xbm @@ -1,6 +1,78 @@ -#define l84_width 14 -#define l84_height 16 -static char l84_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A, - 0x21, 0x09, 0x9E, 0x08, 0xA1, 0x1F, 0x21, 0x08, 0x21, 0x08, 0x1E, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l84_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1C,
+ 0xEC, 0x1E,
+ 0xFC, 0x1E,
+ 0x78, 0x1F,
+ 0xFC, 0x1B,
+ 0xCC, 0x3F,
+ 0xFC, 0x18,
+ 0x78, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l84_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x81, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x98, 0xC3, 0x03,
+ 0x9C, 0xC3, 0x03,
+ 0x9C, 0xE3, 0x03,
+ 0x9C, 0xE3, 0x03,
+ 0xB8, 0xF3, 0x03,
+ 0xF0, 0xB1, 0x03,
+ 0xB8, 0xBB, 0x03,
+ 0x1C, 0x9B, 0x03,
+ 0x1C, 0xFF, 0x0F,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0x83, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0xF0, 0x81, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l84_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xF0, 0x00,
+ 0xF8, 0x07, 0xF0, 0x00,
+ 0x7C, 0x0F, 0xF8, 0x00,
+ 0x3C, 0x0E, 0xF8, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x3C, 0x0E, 0xFE, 0x00,
+ 0x78, 0x0F, 0xEE, 0x00,
+ 0xF0, 0x07, 0xEF, 0x00,
+ 0xF8, 0x87, 0xE7, 0x00,
+ 0x3C, 0x8F, 0xE7, 0x00,
+ 0x1C, 0xDE, 0xE3, 0x00,
+ 0x1E, 0xDC, 0xE1, 0x00,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1E, 0xFC, 0xFF, 0x03,
+ 0x1E, 0x1C, 0xE0, 0x00,
+ 0x1C, 0x1E, 0xE0, 0x00,
+ 0x3C, 0x0F, 0xE0, 0x00,
+ 0xF8, 0x0F, 0xE0, 0x00,
+ 0xF0, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l85.xbm b/app/bin/bitmaps/l85.xbm index ee8ed02..420ea67 100644 --- a/app/bin/bitmaps/l85.xbm +++ b/app/bin/bitmaps/l85.xbm @@ -1,6 +1,78 @@ -#define l85_width 14 -#define l85_height 16 -static char l85_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00, - 0xA1, 0x0F, 0x1E, 0x10, 0x21, 0x10, 0x21, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l85_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x07,
+ 0xEC, 0x07,
+ 0xFC, 0x1F,
+ 0x78, 0x3B,
+ 0xFC, 0x30,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l85_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF1, 0x07,
+ 0xB8, 0x73, 0x00,
+ 0x98, 0x73, 0x00,
+ 0x9C, 0x33, 0x00,
+ 0x9C, 0x33, 0x00,
+ 0x9C, 0xFB, 0x03,
+ 0xB8, 0x7B, 0x07,
+ 0xF0, 0x39, 0x07,
+ 0xB8, 0x03, 0x0E,
+ 0x1C, 0x03, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l85_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFF, 0x03,
+ 0xF8, 0x07, 0xFF, 0x03,
+ 0x7C, 0x0F, 0x07, 0x00,
+ 0x3C, 0x0E, 0x07, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x1C, 0x9E, 0x07, 0x00,
+ 0x3C, 0x8E, 0x7F, 0x00,
+ 0x78, 0x8F, 0xFF, 0x01,
+ 0xF0, 0x87, 0xE7, 0x01,
+ 0xF8, 0x87, 0xC3, 0x03,
+ 0x3C, 0x0F, 0xC0, 0x03,
+ 0x1C, 0x1E, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l86.xbm b/app/bin/bitmaps/l86.xbm index 49e4a8d..31ee6f1 100644 --- a/app/bin/bitmaps/l86.xbm +++ b/app/bin/bitmaps/l86.xbm @@ -1,6 +1,78 @@ -#define l86_width 14 -#define l86_height 16 -static char l86_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00, - 0xA1, 0x0F, 0x9E, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l86_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xEC, 0x03,
+ 0xFC, 0x1F,
+ 0x78, 0x3F,
+ 0xFC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l86_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x9C, 0x3B, 0x00,
+ 0x9C, 0x3B, 0x00,
+ 0x9C, 0x3B, 0x00,
+ 0xB8, 0xFB, 0x03,
+ 0xF0, 0x79, 0x07,
+ 0xB8, 0x3B, 0x07,
+ 0x1C, 0x3B, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x33, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l86_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFC, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x7C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x9E, 0x03, 0x00,
+ 0x3C, 0xCE, 0x03, 0x00,
+ 0x78, 0xCF, 0x7F, 0x00,
+ 0xF0, 0xC7, 0xFF, 0x01,
+ 0xF8, 0xC7, 0xEF, 0x01,
+ 0x3C, 0xCF, 0xC7, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x9C, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l87.xbm b/app/bin/bitmaps/l87.xbm index bbba679..dcd52b5 100644 --- a/app/bin/bitmaps/l87.xbm +++ b/app/bin/bitmaps/l87.xbm @@ -1,6 +1,78 @@ -#define l87_width 14 -#define l87_height 16 -static char l87_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08, - 0x21, 0x08, 0x1E, 0x04, 0x21, 0x04, 0x21, 0x02, 0x21, 0x02, 0x1E, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l87_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x38,
+ 0xEC, 0x18,
+ 0xFC, 0x1C,
+ 0x78, 0x0C,
+ 0xFC, 0x0E,
+ 0xCC, 0x0E,
+ 0xFC, 0x06,
+ 0x78, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l87_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF9, 0x0F,
+ 0xB8, 0x03, 0x0F,
+ 0x98, 0x03, 0x07,
+ 0x9C, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0x9C, 0xC3, 0x01,
+ 0xB8, 0xC3, 0x01,
+ 0xF0, 0xC1, 0x01,
+ 0xB8, 0xE3, 0x00,
+ 0x1C, 0xE3, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x1C, 0xE7, 0x00,
+ 0x1C, 0xE3, 0x00,
+ 0xB8, 0x73, 0x00,
+ 0xF0, 0x71, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l87_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0xF8, 0xC7, 0xFF, 0x03,
+ 0x7C, 0x0F, 0xC0, 0x03,
+ 0x3C, 0x0E, 0xE0, 0x01,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x1C, 0x1E, 0xF0, 0x00,
+ 0x3C, 0x0E, 0xF0, 0x00,
+ 0x78, 0x0F, 0x78, 0x00,
+ 0xF0, 0x07, 0x78, 0x00,
+ 0xF8, 0x07, 0x38, 0x00,
+ 0x3C, 0x0F, 0x3C, 0x00,
+ 0x1C, 0x1E, 0x3C, 0x00,
+ 0x1E, 0x1C, 0x1C, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1E, 0x1C, 0x1E, 0x00,
+ 0x1C, 0x1E, 0x1E, 0x00,
+ 0x3C, 0x0F, 0x0E, 0x00,
+ 0xF8, 0x0F, 0x0E, 0x00,
+ 0xF0, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l88.xbm b/app/bin/bitmaps/l88.xbm index 17a4121..4d06b28 100644 --- a/app/bin/bitmaps/l88.xbm +++ b/app/bin/bitmaps/l88.xbm @@ -1,6 +1,78 @@ -#define l88_width 14 -#define l88_height 16 -static char l88_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0xA1, 0x10, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, 0xA1, 0x10, 0x1E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l88_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xEC, 0x3B,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l88_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x33, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x1C, 0x3B, 0x06,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3B, 0x06,
+ 0xB8, 0x73, 0x07,
+ 0xF0, 0xE1, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l88_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x78, 0x0F, 0xEF, 0x01,
+ 0xF0, 0x07, 0xFE, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l89.xbm b/app/bin/bitmaps/l89.xbm index 625081d..74b1448 100644 --- a/app/bin/bitmaps/l89.xbm +++ b/app/bin/bitmaps/l89.xbm @@ -1,6 +1,78 @@ -#define l89_width 14 -#define l89_height 16 -static char l89_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0xA1, 0x10, 0x1E, 0x1F, 0x21, 0x10, 0x21, 0x10, 0x21, 0x08, 0x1E, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l89_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xEC, 0x33,
+ 0xFC, 0x33,
+ 0x78, 0x3F,
+ 0xFC, 0x3E,
+ 0xCC, 0x30,
+ 0xFC, 0x3B,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l89_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE1, 0x01,
+ 0xB8, 0x73, 0x07,
+ 0x98, 0x3B, 0x07,
+ 0x9C, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x0E,
+ 0xB8, 0x3B, 0x0F,
+ 0xF0, 0x71, 0x0F,
+ 0xB8, 0xE3, 0x0F,
+ 0x1C, 0x03, 0x0E,
+ 0x1C, 0x07, 0x06,
+ 0x1C, 0x07, 0x06,
+ 0x1C, 0x3B, 0x07,
+ 0xB8, 0x73, 0x03,
+ 0xF0, 0xF1, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l89_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x3C, 0xCE, 0x83, 0x03,
+ 0x78, 0xCF, 0x83, 0x03,
+ 0xF0, 0xC7, 0x83, 0x03,
+ 0xF8, 0x87, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x03,
+ 0x1C, 0x1E, 0xFF, 0x03,
+ 0x1E, 0x1C, 0xFE, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x0F, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l9.xbm b/app/bin/bitmaps/l9.xbm index 14a43a4..281474c 100644 --- a/app/bin/bitmaps/l9.xbm +++ b/app/bin/bitmaps/l9.xbm @@ -1,6 +1,78 @@ -#define l9_width 14 -#define l9_height 16 -static char l9_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x08, 0x01, 0x08, 0x01, - 0x08, 0x01, 0xF0, 0x01, 0x00, 0x01, 0x00, 0x01, 0x80, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l9_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0xC0, 0x03,
+ 0xE0, 0x07,
+ 0x60, 0x06,
+ 0x60, 0x06,
+ 0xE0, 0x07,
+ 0xC0, 0x07,
+ 0x00, 0x06,
+ 0x60, 0x07,
+ 0xC0, 0x03,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l9_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x0F, 0x00,
+ 0x80, 0x3B, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0xC0, 0x31, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x71, 0x00,
+ 0xC0, 0x79, 0x00,
+ 0x80, 0x7B, 0x00,
+ 0x00, 0x7F, 0x00,
+ 0x00, 0x70, 0x00,
+ 0x00, 0x30, 0x00,
+ 0x00, 0x30, 0x00,
+ 0xC0, 0x39, 0x00,
+ 0x80, 0x1B, 0x00,
+ 0x80, 0x0F, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l9_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xDF, 0x03, 0x00,
+ 0x00, 0x8F, 0x03, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x80, 0x07, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0xCF, 0x07, 0x00,
+ 0x00, 0xFE, 0x07, 0x00,
+ 0x00, 0xFC, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x00, 0x07, 0x00,
+ 0x00, 0x87, 0x07, 0x00,
+ 0x00, 0x87, 0x03, 0x00,
+ 0x00, 0xCF, 0x03, 0x00,
+ 0x00, 0xFE, 0x01, 0x00,
+ 0x00, 0xFC, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l90.xbm b/app/bin/bitmaps/l90.xbm index f251dbe..d56c618 100644 --- a/app/bin/bitmaps/l90.xbm +++ b/app/bin/bitmaps/l90.xbm @@ -1,6 +1,78 @@ -#define l90_width 14 -#define l90_height 16 -static char l90_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x18, - 0xA1, 0x14, 0xBE, 0x12, 0xA0, 0x11, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l90_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x33,
+ 0xF8, 0x33,
+ 0xC0, 0x33,
+ 0xEC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l90_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x1C, 0x3B, 0x06,
+ 0x1C, 0x3F, 0x06,
+ 0x1C, 0x3F, 0x0E,
+ 0x9C, 0x3F, 0x0E,
+ 0xB8, 0x3F, 0x0E,
+ 0xF0, 0x3F, 0x0E,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3B, 0x06,
+ 0x00, 0x3B, 0x06,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x71, 0x07,
+ 0xF8, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l90_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x3C, 0xDF, 0x83, 0x03,
+ 0xF8, 0xDF, 0x83, 0x03,
+ 0xF0, 0xDF, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0x9C, 0xC3, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x8E, 0xC7, 0x01,
+ 0x3C, 0x0F, 0xEF, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l91.xbm b/app/bin/bitmaps/l91.xbm index 4df09a2..cb63233 100644 --- a/app/bin/bitmaps/l91.xbm +++ b/app/bin/bitmaps/l91.xbm @@ -1,6 +1,78 @@ -#define l91_width 14 -#define l91_height 16 -static char l91_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x04, 0x21, 0x06, 0x21, 0x05, - 0xA1, 0x04, 0x3E, 0x04, 0x20, 0x04, 0x20, 0x04, 0x10, 0x04, 0x0E, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l91_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1E,
+ 0xCC, 0x1F,
+ 0xCC, 0x1C,
+ 0xFC, 0x1C,
+ 0xF8, 0x1C,
+ 0xC0, 0x1C,
+ 0xEC, 0x1C,
+ 0x78, 0x1C,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l91_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x80, 0x03,
+ 0xB8, 0xC3, 0x03,
+ 0x9C, 0xC3, 0x03,
+ 0x1C, 0xE3, 0x03,
+ 0x1C, 0xB7, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x9C, 0x87, 0x03,
+ 0xB8, 0x87, 0x03,
+ 0xF0, 0x87, 0x03,
+ 0x00, 0x87, 0x03,
+ 0x00, 0x83, 0x03,
+ 0x00, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x81, 0x03,
+ 0xF8, 0x80, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l91_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0x7C, 0x0F, 0x78, 0x00,
+ 0x3C, 0x0E, 0x7C, 0x00,
+ 0x1E, 0x1C, 0x7E, 0x00,
+ 0x1E, 0x1C, 0x7F, 0x00,
+ 0x1E, 0x1C, 0x73, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1E, 0x1C, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x3C, 0x1F, 0x70, 0x00,
+ 0xF8, 0x1F, 0x70, 0x00,
+ 0xF0, 0x1F, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x00, 0x1C, 0x70, 0x00,
+ 0x1C, 0x1E, 0x70, 0x00,
+ 0x1C, 0x0E, 0x70, 0x00,
+ 0x3C, 0x0F, 0x70, 0x00,
+ 0xF8, 0x07, 0x70, 0x00,
+ 0xF0, 0x03, 0x70, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l92.xbm b/app/bin/bitmaps/l92.xbm index 16a5631..8323e42 100644 --- a/app/bin/bitmaps/l92.xbm +++ b/app/bin/bitmaps/l92.xbm @@ -1,6 +1,78 @@ -#define l92_width 14 -#define l92_height 16 -static char l92_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0x21, 0x08, 0x3E, 0x04, 0x20, 0x02, 0x20, 0x01, 0x90, 0x00, 0x8E, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l92_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xCC, 0x30,
+ 0xFC, 0x38,
+ 0xF8, 0x1C,
+ 0xC0, 0x0E,
+ 0xEC, 0x07,
+ 0x78, 0x3F,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l92_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x06,
+ 0x1C, 0x3B, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x1C, 0x07, 0x0E,
+ 0x9C, 0x07, 0x07,
+ 0xB8, 0x87, 0x07,
+ 0xF0, 0x87, 0x03,
+ 0x00, 0xC7, 0x01,
+ 0x00, 0xE3, 0x01,
+ 0x00, 0xF3, 0x00,
+ 0x9C, 0x73, 0x00,
+ 0xB8, 0x79, 0x00,
+ 0xF8, 0xF8, 0x0F,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l92_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFE, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x7C, 0x8F, 0xE7, 0x03,
+ 0x3C, 0x8E, 0xC3, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0x1C, 0x80, 0x03,
+ 0x1E, 0x1C, 0xC0, 0x03,
+ 0x1E, 0x1C, 0xC0, 0x03,
+ 0x1C, 0x1E, 0xE0, 0x01,
+ 0x3C, 0x1F, 0xF0, 0x01,
+ 0xF8, 0x1F, 0xF8, 0x00,
+ 0xF0, 0x1F, 0x78, 0x00,
+ 0x00, 0x1C, 0x3C, 0x00,
+ 0x00, 0x1C, 0x1E, 0x00,
+ 0x1C, 0x1E, 0x0F, 0x00,
+ 0x1C, 0x8E, 0x07, 0x00,
+ 0x3C, 0x8F, 0x07, 0x00,
+ 0xF8, 0xC7, 0xFF, 0x03,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l93.xbm b/app/bin/bitmaps/l93.xbm index 72515dd..4be9859 100644 --- a/app/bin/bitmaps/l93.xbm +++ b/app/bin/bitmaps/l93.xbm @@ -1,6 +1,78 @@ -#define l93_width 14 -#define l93_height 16 -static char l93_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0x21, 0x10, - 0x21, 0x10, 0x3E, 0x0E, 0x20, 0x10, 0x20, 0x10, 0x90, 0x10, 0x0E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l93_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3B,
+ 0xCC, 0x38,
+ 0xCC, 0x18,
+ 0xFC, 0x3C,
+ 0xF8, 0x38,
+ 0xC0, 0x33,
+ 0xEC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l93_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x1C, 0x03, 0x07,
+ 0x1C, 0x07, 0x07,
+ 0x1C, 0x07, 0x07,
+ 0x9C, 0x87, 0x03,
+ 0xB8, 0xC7, 0x07,
+ 0xF0, 0x07, 0x07,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x03, 0x0E,
+ 0x00, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x71, 0x07,
+ 0xF8, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l93_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xE7, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x1C, 0xC0, 0x03,
+ 0x1E, 0x1C, 0xC0, 0x01,
+ 0x1E, 0x1C, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xFC, 0x00,
+ 0x1C, 0x1E, 0xFC, 0x00,
+ 0x3C, 0x1F, 0xE0, 0x01,
+ 0xF8, 0x1F, 0xC0, 0x03,
+ 0xF0, 0x1F, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0x8E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l94.xbm b/app/bin/bitmaps/l94.xbm index 5732695..65f4306 100644 --- a/app/bin/bitmaps/l94.xbm +++ b/app/bin/bitmaps/l94.xbm @@ -1,6 +1,78 @@ -#define l94_width 14 -#define l94_height 16 -static char l94_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x08, 0x21, 0x0C, 0x21, 0x0A, - 0x21, 0x09, 0xBE, 0x08, 0xA0, 0x1F, 0x20, 0x08, 0x10, 0x08, 0x0E, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l94_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1C,
+ 0xFC, 0x1C,
+ 0xCC, 0x1E,
+ 0xCC, 0x1E,
+ 0xFC, 0x1F,
+ 0xF8, 0x1B,
+ 0xC0, 0x3F,
+ 0xEC, 0x18,
+ 0x78, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l94_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0x80, 0x03,
+ 0xB8, 0x83, 0x03,
+ 0x9C, 0xC3, 0x03,
+ 0x1C, 0xC3, 0x03,
+ 0x1C, 0xE7, 0x03,
+ 0x1C, 0xE7, 0x03,
+ 0x9C, 0xF7, 0x03,
+ 0xB8, 0xB7, 0x03,
+ 0xF0, 0xBF, 0x03,
+ 0x00, 0x9F, 0x03,
+ 0x00, 0xFF, 0x0F,
+ 0x00, 0x83, 0x03,
+ 0x9C, 0x83, 0x03,
+ 0xB8, 0x81, 0x03,
+ 0xF8, 0x80, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l94_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xF0, 0x00,
+ 0xF8, 0x07, 0xF0, 0x00,
+ 0x7C, 0x0F, 0xF8, 0x00,
+ 0x3C, 0x0E, 0xF8, 0x00,
+ 0x1E, 0x1C, 0xFC, 0x00,
+ 0x1E, 0x1C, 0xFC, 0x00,
+ 0x1E, 0x1C, 0xFE, 0x00,
+ 0x1E, 0x1C, 0xEE, 0x00,
+ 0x1E, 0x1C, 0xEF, 0x00,
+ 0x1C, 0x9E, 0xE7, 0x00,
+ 0x3C, 0x9F, 0xE7, 0x00,
+ 0xF8, 0xDF, 0xE3, 0x00,
+ 0xF0, 0xDF, 0xE1, 0x00,
+ 0x00, 0xFC, 0xFF, 0x03,
+ 0x00, 0xFC, 0xFF, 0x03,
+ 0x1C, 0x1E, 0xE0, 0x00,
+ 0x1C, 0x0E, 0xE0, 0x00,
+ 0x3C, 0x0F, 0xE0, 0x00,
+ 0xF8, 0x07, 0xE0, 0x00,
+ 0xF0, 0x03, 0xE0, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l95.xbm b/app/bin/bitmaps/l95.xbm index 33560b1..e8ab2c2 100644 --- a/app/bin/bitmaps/l95.xbm +++ b/app/bin/bitmaps/l95.xbm @@ -1,6 +1,78 @@ -#define l95_width 14 -#define l95_height 16 -static char l95_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0xA1, 0x00, 0xA1, 0x00, - 0xA1, 0x0F, 0x3E, 0x10, 0x20, 0x10, 0x20, 0x10, 0x90, 0x10, 0x0E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l95_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x07,
+ 0xCC, 0x07,
+ 0xCC, 0x1F,
+ 0xFC, 0x3B,
+ 0xF8, 0x30,
+ 0xC0, 0x33,
+ 0xEC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l95_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF0, 0x07,
+ 0xB8, 0x73, 0x00,
+ 0x9C, 0x73, 0x00,
+ 0x1C, 0x33, 0x00,
+ 0x1C, 0x37, 0x00,
+ 0x1C, 0xFF, 0x03,
+ 0x9C, 0x7F, 0x07,
+ 0xB8, 0x3F, 0x07,
+ 0xF0, 0x07, 0x0E,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x03, 0x0E,
+ 0x00, 0x3B, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x71, 0x07,
+ 0xF8, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l95_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFF, 0x03,
+ 0xF8, 0x07, 0xFF, 0x03,
+ 0x7C, 0x0F, 0x07, 0x00,
+ 0x3C, 0x0E, 0x07, 0x00,
+ 0x1E, 0x9C, 0x07, 0x00,
+ 0x1E, 0x9C, 0x07, 0x00,
+ 0x1E, 0x9C, 0x7F, 0x00,
+ 0x1E, 0x9C, 0xFF, 0x01,
+ 0x1E, 0x9C, 0xE7, 0x01,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x1F, 0xC0, 0x03,
+ 0xF8, 0x1F, 0x80, 0x03,
+ 0xF0, 0x1F, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDE, 0xC3, 0x03,
+ 0x1C, 0x8E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l96.xbm b/app/bin/bitmaps/l96.xbm index a959a68..b114e81 100644 --- a/app/bin/bitmaps/l96.xbm +++ b/app/bin/bitmaps/l96.xbm @@ -1,6 +1,78 @@ -#define l96_width 14 -#define l96_height 16 -static char l96_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x00, 0xA1, 0x00, - 0xA1, 0x0F, 0xBE, 0x10, 0xA0, 0x10, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l96_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x03,
+ 0xCC, 0x1F,
+ 0xFC, 0x3F,
+ 0xF8, 0x33,
+ 0xC0, 0x33,
+ 0xEC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l96_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x1C, 0x3B, 0x00,
+ 0x1C, 0x3F, 0x00,
+ 0x1C, 0x3F, 0x00,
+ 0x9C, 0xFF, 0x03,
+ 0xB8, 0x7F, 0x07,
+ 0xF0, 0x3F, 0x07,
+ 0x00, 0x3F, 0x0E,
+ 0x00, 0x3B, 0x0E,
+ 0x00, 0x3B, 0x0E,
+ 0x9C, 0x33, 0x07,
+ 0xB8, 0x71, 0x07,
+ 0xF8, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l96_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0xFC, 0x00,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0x7C, 0x0F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0x03, 0x00,
+ 0x1E, 0xDC, 0x03, 0x00,
+ 0x1E, 0xDC, 0x7F, 0x00,
+ 0x1E, 0xDC, 0xFF, 0x01,
+ 0x1C, 0xDE, 0xEF, 0x01,
+ 0x3C, 0xDF, 0xC7, 0x03,
+ 0xF8, 0xDF, 0x83, 0x03,
+ 0xF0, 0xDF, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1C, 0x9E, 0x83, 0x03,
+ 0x1C, 0x8E, 0xC7, 0x03,
+ 0x3C, 0x8F, 0xEF, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7C, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l97.xbm b/app/bin/bitmaps/l97.xbm index 1cd2c1e..75ab190 100644 --- a/app/bin/bitmaps/l97.xbm +++ b/app/bin/bitmaps/l97.xbm @@ -1,6 +1,78 @@ -#define l97_width 14 -#define l97_height 16 -static char l97_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x1F, 0x21, 0x10, 0x21, 0x08, - 0x21, 0x08, 0x3E, 0x04, 0x20, 0x04, 0x20, 0x02, 0x10, 0x02, 0x0E, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l97_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x3F,
+ 0xFC, 0x38,
+ 0xCC, 0x18,
+ 0xCC, 0x1C,
+ 0xFC, 0x0C,
+ 0xF8, 0x0E,
+ 0xC0, 0x0E,
+ 0xEC, 0x06,
+ 0x78, 0x06,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l97_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xF8, 0x0F,
+ 0xB8, 0x03, 0x0F,
+ 0x9C, 0x03, 0x07,
+ 0x1C, 0x83, 0x03,
+ 0x1C, 0x87, 0x03,
+ 0x1C, 0xC7, 0x01,
+ 0x9C, 0xC7, 0x01,
+ 0xB8, 0xC7, 0x01,
+ 0xF0, 0xE7, 0x00,
+ 0x00, 0xE7, 0x00,
+ 0x00, 0xE3, 0x00,
+ 0x00, 0xE3, 0x00,
+ 0x9C, 0xE3, 0x00,
+ 0xB8, 0x71, 0x00,
+ 0xF8, 0x70, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l97_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0xC3, 0xFF, 0x03,
+ 0xF8, 0xC7, 0xFF, 0x03,
+ 0x7C, 0x0F, 0xC0, 0x03,
+ 0x3C, 0x0E, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xE0, 0x01,
+ 0x1E, 0x1C, 0xF0, 0x00,
+ 0x1E, 0x1C, 0xF0, 0x00,
+ 0x1E, 0x1C, 0x78, 0x00,
+ 0x1E, 0x1C, 0x78, 0x00,
+ 0x1C, 0x1E, 0x38, 0x00,
+ 0x3C, 0x1F, 0x3C, 0x00,
+ 0xF8, 0x1F, 0x3C, 0x00,
+ 0xF0, 0x1F, 0x1C, 0x00,
+ 0x00, 0x1C, 0x1E, 0x00,
+ 0x00, 0x1C, 0x1E, 0x00,
+ 0x1C, 0x1E, 0x1E, 0x00,
+ 0x1C, 0x0E, 0x1E, 0x00,
+ 0x3C, 0x0F, 0x0E, 0x00,
+ 0xF8, 0x07, 0x0E, 0x00,
+ 0xF0, 0x03, 0x0E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l98.xbm b/app/bin/bitmaps/l98.xbm index bad329d..744aad6 100644 --- a/app/bin/bitmaps/l98.xbm +++ b/app/bin/bitmaps/l98.xbm @@ -1,6 +1,78 @@ -#define l98_width 14 -#define l98_height 16 -static char l98_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0xA1, 0x10, 0x3E, 0x0F, 0xA0, 0x10, 0xA0, 0x10, 0x90, 0x10, 0x0E, 0x0F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l98_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x3B,
+ 0xCC, 0x3F,
+ 0xFC, 0x1E,
+ 0xF8, 0x3F,
+ 0xC0, 0x33,
+ 0xEC, 0x3F,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l98_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x03,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x33, 0x07,
+ 0x1C, 0x3B, 0x07,
+ 0x1C, 0x3F, 0x07,
+ 0x1C, 0x3F, 0x07,
+ 0x9C, 0x77, 0x07,
+ 0xB8, 0xE7, 0x03,
+ 0xF0, 0x77, 0x07,
+ 0x00, 0x3F, 0x06,
+ 0x00, 0x3B, 0x0E,
+ 0x00, 0x3B, 0x0E,
+ 0x9C, 0x3B, 0x06,
+ 0xB8, 0x71, 0x07,
+ 0xF8, 0xE0, 0x03,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l98_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC3, 0x03,
+ 0x1E, 0x9C, 0xC7, 0x01,
+ 0x1E, 0x1C, 0xEF, 0x01,
+ 0x1E, 0x1C, 0xFE, 0x00,
+ 0x1C, 0x1E, 0xFF, 0x00,
+ 0x3C, 0x9F, 0xE7, 0x01,
+ 0xF8, 0x9F, 0xC3, 0x03,
+ 0xF0, 0xDF, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x00, 0xDC, 0x83, 0x03,
+ 0x1C, 0xDE, 0x83, 0x03,
+ 0x1C, 0x8E, 0xC3, 0x03,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x01,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/l99.xbm b/app/bin/bitmaps/l99.xbm index 53b1b0e..b7d956a 100644 --- a/app/bin/bitmaps/l99.xbm +++ b/app/bin/bitmaps/l99.xbm @@ -1,6 +1,78 @@ -#define l99_width 14 -#define l99_height 16 -static char l99_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x0F, 0xA1, 0x10, 0xA1, 0x10, - 0xA1, 0x10, 0x3E, 0x1F, 0x20, 0x10, 0x20, 0x10, 0x10, 0x08, 0x0E, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static char l99_x16[] = {
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x78, 0x1E,
+ 0xFC, 0x3F,
+ 0xCC, 0x33,
+ 0xCC, 0x33,
+ 0xFC, 0x3F,
+ 0xF8, 0x3E,
+ 0xC0, 0x30,
+ 0xEC, 0x3B,
+ 0x78, 0x1E,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, };
+
+static char l99_x24[] = {
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xF0, 0xE0, 0x01,
+ 0xB8, 0x73, 0x07,
+ 0x9C, 0x3B, 0x07,
+ 0x1C, 0x3B, 0x06,
+ 0x1C, 0x3F, 0x0E,
+ 0x1C, 0x3F, 0x0E,
+ 0x9C, 0x3F, 0x0F,
+ 0xB8, 0x77, 0x0F,
+ 0xF0, 0xE7, 0x0F,
+ 0x00, 0x07, 0x0E,
+ 0x00, 0x03, 0x06,
+ 0x00, 0x03, 0x06,
+ 0x9C, 0x3B, 0x07,
+ 0xB8, 0x71, 0x03,
+ 0xF8, 0xF0, 0x01,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, };
+
+static char l99_x32[] = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0x7C, 0x8F, 0xEF, 0x01,
+ 0x3C, 0x8E, 0xC7, 0x01,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1E, 0xDC, 0x83, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x3C, 0x9F, 0xE7, 0x03,
+ 0xF8, 0x1F, 0xFF, 0x03,
+ 0xF0, 0x1F, 0xFE, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x00, 0x1C, 0x80, 0x03,
+ 0x1C, 0x9E, 0xC3, 0x03,
+ 0x1C, 0x8E, 0xC3, 0x01,
+ 0x3C, 0x8F, 0xE7, 0x01,
+ 0xF8, 0x07, 0xFF, 0x00,
+ 0xF0, 0x03, 0x7E, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
+
diff --git a/app/bin/bitmaps/layers.xpm b/app/bin/bitmaps/layers.xpm new file mode 100644 index 0000000..60e1761 --- /dev/null +++ b/app/bin/bitmaps/layers.xpm @@ -0,0 +1,110 @@ +static char *layers_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " ",
+ " ",
+ " 177777777771 ",
+ " 0755555555541 ",
+ " 1455555555570 ",
+ " 13555555555411 ",
+ " 13333333333231 ",
+ " 01777777777371 ",
+ " 1666666666610 ",
+ " 17333333333720 ",
+ " 11122222222271 ",
+ " 133333333331 ",
+ " 0233333333371 ",
+ " 011111111111 ",
+ " ",
+ " "};
+
+static char *layers_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " ",
+ " ",
+ " ",
+ " 100000000000000001 ",
+ " 165555555555555552 ",
+ " 155555555555555541 ",
+ " 165555555555555552 ",
+ " 155555555555555561 ",
+ " 165555555555555551001 ",
+ " 14444444444444443761 ",
+ " 11122222222222227631 ",
+ " 136666666666666661 ",
+ " 166666666666666631 ",
+ " 136666666666666661001 ",
+ " 133333333333333372320 ",
+ " 11122222222222222371 ",
+ " 0233333333333333320 ",
+ " 173333333333333371 ",
+ " 0233333333333333320 ",
+ " 173333333333333371 ",
+ " 00000000000000000 ",
+ " ",
+ " ",
+ " "};
+
+static char *layers_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 10000000000000000000001 ",
+ " 135555555555555555555561 ",
+ " 14555555555555555555551 ",
+ " 135555555555555555555561 ",
+ " 15555555555555555555551 ",
+ " 165555555555555555555561 ",
+ " 155555555555555555555410 ",
+ " 165555555555555555555531221 ",
+ " 155555555555555555555416671 ",
+ " 117277777777777777777727631 ",
+ " 173333333333333333336620 ",
+ " 026666666666666666666631 ",
+ " 136666666666666666666620 ",
+ " 026666666666666666666631000 ",
+ " 136666666666666666666622720 ",
+ " 1266666666666666666666313370 ",
+ " 100000000000000000000017330 ",
+ " 173333333333333333333320 ",
+ " 013333333333333333333330 ",
+ " 173333333333333333333320 ",
+ " 013333333333333333333330 ",
+ " 173333333333333333333320 ",
+ " 017777777777777777777770 ",
+ " 111111111111111111111110 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **layers_xpm[3] = { layers_x16, layers_x24, layers_x32 };
+
diff --git a/app/bin/bitmaps/magnet.xpm b/app/bin/bitmaps/magnet.xpm index 99a31db..3d9a5ac 100644 --- a/app/bin/bitmaps/magnet.xpm +++ b/app/bin/bitmaps/magnet.xpm @@ -1,22 +1,139 @@ -/* XPM */ -static char * magnet_xpm[] = { -"16 16 3 1", -" c #FF0000", -". c None", -"X c #FFFF00", -"................", -"........ ......", -"....... ....", -"...... ...", -"..... ..", -"..... . .", -".... ... .", -"... ... .", -"..XXX ... ..", -".XXXXX... ..", -"..XXXX.. ...", -"...XX..XX ....", -"......XXXXX ....", -"......XXXXX.....", -"........XX......", -"................"}; +static char *magnet_x16[] = {
+ "16 16 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #666600",
+ "6 c #990000",
+ "7 c #999900",
+ "8 c #CC0000",
+ "9 c #CC3300",
+ "A c #CC9900",
+ "B c #CCCC00",
+ "C c #FF0000",
+ "D c #FF6600",
+ "E c #FFCC00",
+ "F c #FFFF00",
+ "G c #800000",
+ " 1110 ",
+ " 11888610 ",
+ " 16CCCCCCG0 ",
+ " 08CC836CCC30",
+ " 06CC83 13CC81",
+ " 3CC83 GCC1",
+ " 1CCC3 3CC1",
+ " 5DCC3 38C81",
+ "5BEDG1 38CC3 ",
+ " 5EA4 38CCG0 ",
+ " 55 18CC61 ",
+ " 18CC81 ",
+ " 5ACC83 ",
+ " 27FE93 ",
+ " 5AB5 ",
+ " 55 "};
+
+static char *magnet_x24[] = {
+ "24 24 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #666600",
+ "6 c #990000",
+ "7 c #996600",
+ "8 c #999900",
+ "9 c #CC0000",
+ "A c #CC9900",
+ "B c #FF0000",
+ "C c #FF6600",
+ "D c #FF9900",
+ "E c #FFCC00",
+ "F c #FFFF00",
+ "G c #800000",
+ "H c #808000",
+ " 000 ",
+ " 3399G310 ",
+ " 019BBBBBBG1 ",
+ " 0GBBBBBBBBB91 ",
+ " 0GBBBBBBBBBBBB1 ",
+ " 06BBBBBG319BBBBB1 ",
+ " 03BBBBB31 GGBBBBG0",
+ " 3BBBBB3 6GBBB91",
+ " 1BBBBB3 G9BBB1",
+ " 19BBBBG 39BBB1",
+ " 29BBBB6G G9BBB60",
+ " 48DBBB93 GGBBBB1 ",
+ "58FFDB91 GBBBBG0 ",
+ " 5EFFE3 GBBBB91 ",
+ " 5EE72 3BBBBB1 ",
+ " 5H4 3BBBBB3 ",
+ " 2 3BBBBB3 ",
+ " 13BBBBBG1 ",
+ " HCBBBBG1 ",
+ " 5EECBB63 ",
+ " 48FFFD61 ",
+ " 5HEFA2 ",
+ " 45A5 ",
+ " 5 "};
+
+static char *magnet_x32[] = {
+ "32 32 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #660000",
+ "4 c #663300",
+ "5 c #666600",
+ "6 c #990000",
+ "7 c #996600",
+ "8 c #CC0000",
+ "9 c #CC9900",
+ "A c #CCCC00",
+ "B c #FF0000",
+ "C c #FF3300",
+ "D c #FF6600",
+ "E c #FFCC00",
+ "F c #FFFF00",
+ "G c #800000",
+ "H c #808000",
+ " ",
+ " 013GGG010 ",
+ " 16BBBBBB8G00 ",
+ " 38BBBBBBBBBB30 ",
+ " 03BBBBBBBBBBBBB80 ",
+ " 03BBBBBBBBBBBBBBB80 ",
+ " 0GBBBBBBB88BBBBBBBB80 ",
+ " 03BBBBBBB83G3GBBBBBBBG0 ",
+ " 1BBBBBBB61 G38BBBBBB0 ",
+ " 1BBBBBBB61 G8BBBBBG0",
+ " 1BBBBBBB63 3BBBBB80",
+ " 08BBBBBB63 6GBBBB80",
+ " 06BBBBBB63 68BBBB81",
+ " 03BBBBBB83 8GBBBBBG0",
+ " 5CBBBBB83 3BBBBBB1 ",
+ " 5EECBBBB3 G8BBBBBG0 ",
+ " 5EFFECBBG1 G8BBBBB81 ",
+ " 5EFFFED81 G8BBBBBB1 ",
+ " 5EFFFE4 38BBBBBBG0 ",
+ " 5EFE5 38BBBBBB81 ",
+ " 5A5 18BBBBBB81 ",
+ " 5 18BBBBBB81 ",
+ " 08BBBBBBB3 ",
+ " 08BBBBBBB3 ",
+ " 59CBBBBBB3 ",
+ " 5AFECBBBB3 ",
+ " 59FFFECBBG ",
+ " 45EFFFEDG0 ",
+ " 5EFFE70 ",
+ " 5EE74 ",
+ " 5H2 ",
+ " 2 "};
+
+static char **magnet_xpm[3] = { magnet_x16, magnet_x24, magnet_x32 };
+
diff --git a/app/bin/bitmaps/magnifier.xpm b/app/bin/bitmaps/magnifier.xpm deleted file mode 100644 index 69a3faa..0000000 --- a/app/bin/bitmaps/magnifier.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */
-static char * magnifier_xpm[] = {
-"16 16 70 1",
-" c None",
-". c #545454",
-"+ c #555555",
-"@ c #515151",
-"# c #5E6063",
-"$ c #94A3B1",
-"% c #C5D5E6",
-"& c #DFEAF4",
-"* c #D9E3ED",
-"= c #A2ACB6",
-"- c #4D4D4D",
-"; c #5A5D5F",
-"> c #AEC1D5",
-", c #C4D8EB",
-"' c #E2ECF6",
-") c #E4EDF6",
-"! c #B8C8D9",
-"~ c #5B5D60",
-"{ c #494949",
-"] c #919FAD",
-"^ c #BBD2E8",
-"/ c #D5E3F1",
-"( c #D6E4F2",
-"_ c #97A4B0",
-": c #434343",
-"< c #B6CBE0",
-"[ c #C1D3E4",
-"} c #3E3E3E",
-"| c #BED4E9",
-"1 c #C8DBED",
-"2 c #383838",
-"3 c #BCCFE1",
-"4 c #CAD8E7",
-"5 c #313131",
-"6 c #939DA8",
-"7 c #BFD5EA",
-"8 c #DFE9F5",
-"9 c #9EA6AD",
-"0 c #373737",
-"a c #444647",
-"b c #C4D1DE",
-"c c #D9E6F3",
-"d c #E6EFF7",
-"e c #D3D9DF",
-"f c #3B3C3D",
-"g c #262626",
-"h c #3B3B3B",
-"i c #3C3C3C",
-"j c #ADADAF",
-"k c #28292B",
-"l c #91979D",
-"m c #E3E8EE",
-"n c #EDF3F9",
-"o c #E5EAEF",
-"p c #9EA0A3",
-"q c #282829",
-"r c #464647",
-"s c #B8B8BC",
-"t c #151516",
-"u c #141414",
-"v c #3D3D3D",
-"w c #515153",
-"x c #C4C4CC",
-"y c #212122",
-"z c #606064",
-"A c #D1D1DD",
-"B c #2E2E30",
-"C c #DADAEA",
-"D c #3F3F43",
-"E c #151515",
-" .+++++. ",
-" @#$%&*=#@ ",
-" -;>,'))'!~-",
-" {]^/))))(_{",
-" :<^^^^^^^[:",
-" }|^^)))))1}",
-" 23^))))))42",
-" 5678))))'95",
-" 0abc)))defg",
-" hijklmnopq ",
-" irst uuuuu ",
-" vwxy ",
-" }zAB ",
-" 0CD ",
-" Eu ",
-" "};
diff --git a/app/bin/bitmaps/manage.xpm b/app/bin/bitmaps/manage.xpm new file mode 100644 index 0000000..12264cf --- /dev/null +++ b/app/bin/bitmaps/manage.xpm @@ -0,0 +1,110 @@ +static char *manage_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " 11 ",
+ " 1370 ",
+ " 101 1361 111 ",
+ " 247074432742 ",
+ " 134444444431 ",
+ " 24432734470 ",
+ " 1743744734310 ",
+ "1274424555144330",
+ "1344414555144630",
+ "111347355674611 ",
+ " 14471274470 ",
+ " 24444644431 ",
+ " 1463644677470 ",
+ " 171013410121 ",
+ " 0 0761 ",
+ " 101 "};
+
+static char *manage_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " 00 ",
+ " 1331 ",
+ " 2440 ",
+ " 11 02441 111 ",
+ " 173100164431102431 ",
+ " 144473444444334441 ",
+ " 134444444444444421 ",
+ " 1644444444444431 ",
+ " 1344462102644431 ",
+ " 14446745547644410 ",
+ " 11134442455554244447201",
+ "076644442555555764444461",
+ "134444462555555734444461",
+ "013344441455555244447101",
+ " 0024443755553344420 ",
+ " 1344431732344461 ",
+ " 0744444336444461 ",
+ " 16444444444444471 ",
+ " 134466444444634442 ",
+ " 164311164447112441 ",
+ " 171 14431 11 ",
+ " 0 14470 ",
+ " 13620 ",
+ " 111 "};
+
+static char *manage_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " ",
+ " 11221 ",
+ " 164430 ",
+ " 164430 ",
+ " 11 164431 11 ",
+ " 1331 02444410 2461 ",
+ " 164431112444444701244461 ",
+ " 144446364444444446444461 ",
+ " 13444444444444444444441 ",
+ " 134444444444444444441 ",
+ " 14444444373344444461 ",
+ " 14444431011003444441 ",
+ " 0744443074554707444431 ",
+ " 016444417555555306444421111 ",
+ " 1227644443045555555174444466620",
+ "02444444447255555555324444444430",
+ "07444444447255555555324444444430",
+ " 244444444305555555527444443332 ",
+ " 100074444603555555403444471000 ",
+ " 1344447065555412444431 ",
+ " 14444470233702444442 ",
+ " 13444443710234444440 ",
+ " 164444444444444444421 ",
+ " 13444444444444444444421 ",
+ " 174444444444444444444441 ",
+ " 164443123444444620164441 ",
+ " 14431 12444431 13471 ",
+ " 1121 174441 111 ",
+ " 074441 ",
+ " 074440 ",
+ " 13371 ",
+ " 000 "};
+
+static char **manage_xpm[3] = { manage_x16, manage_x24, manage_x32 };
+
diff --git a/app/bin/bitmaps/map.xpm b/app/bin/bitmaps/map.xpm index 5d47930..e123f7f 100644 --- a/app/bin/bitmaps/map.xpm +++ b/app/bin/bitmaps/map.xpm @@ -1,24 +1,169 @@ -/* XPM */ -static char * map_xpm[] = { -"16 16 5 1", -"o c None", -" c #000000000000", -". c #FFFFFFFFFFFF", -"X c #0000FFFFFFFF", -"Y c #FFFF7DF70000", -"................", -". ...... .....", -". . .... . ....", -". .. .. .. . ...", -". YY. ... .. ..", -". .YY. ... ... .", -". X.YY ..X ... .", -". XX.Y YXX X.. .", -". .XX. YYY YX. .", -". ..XX XX. YYX .", -". ...X X.. .YY .", -". ... .. ... .", -".. .. . . .. .", -"... . ... . .", -".... ..... .", -"................"}; +static char *map_x16[] = {
+ "16 16 28 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #003366",
+ "3 c #0099CC",
+ "4 c #00CCFF",
+ "5 c #330000",
+ "6 c #330033",
+ "7 c #333300",
+ "8 c #333366",
+ "9 c #660033",
+ "A c #663300",
+ "B c #666699",
+ "C c #990066",
+ "D c #993300",
+ "E c #993399",
+ "F c #996600",
+ "G c #CC0099",
+ "H c #CC3399",
+ "I c #CC6600",
+ "J c #CC9900",
+ "K c #CC9933",
+ "L c #CC99CC",
+ "M c #FF0099",
+ "N c #FF00CC",
+ "O c #FF33CC",
+ "P c #FF6699",
+ "Q c #FF9900",
+ "0 0 ",
+ "000 00000 ",
+ "00000 000 0 000 ",
+ "00 000 0QQ 00",
+ "0AQQ 0 Q0 QQ 0",
+ "DIQQQ7JQQ 0 Q70",
+ "50 7KP 0 QF0",
+ "00 5MNN 0 QJA",
+ "5CNNN9G NN044 0",
+ "6EN 0 N04 4B6",
+ "2344 1 40L OH8",
+ "00 4424 440NNN81",
+ "00 034 00 0",
+ "000 0 000000 0",
+ " 000000 000",
+ " 00 00"};
+
+static char *map_x24[] = {
+ "24 24 29 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #003366",
+ "3 c #006666",
+ "4 c #006699",
+ "5 c #0099CC",
+ "6 c #00CCFF",
+ "7 c #330000",
+ "8 c #330033",
+ "9 c #333300",
+ "A c #336699",
+ "B c #660033",
+ "C c #660066",
+ "D c #663300",
+ "E c #6699CC",
+ "F c #66CCFF",
+ "G c #990066",
+ "H c #996600",
+ "I c #CC0099",
+ "J c #CC3399",
+ "K c #CC6600",
+ "L c #FF0099",
+ "M c #FF00CC",
+ "N c #FF3399",
+ "O c #FF33CC",
+ "P c #FF66CC",
+ "Q c #FF9900",
+ "R c #FF9933",
+ " ",
+ " 00 000 ",
+ " 0000 0000000 ",
+ " 0 000 000 0 00 ",
+ " 0 00000 DK 000 ",
+ " 0 00 QDKQQ 00",
+ " 0 QQ 0 Q7 QQ 00",
+ " 9QQQQQ 0 Q 0 QQ 00",
+ "HDQ QQ9QQQQ 0 Q 00",
+ " 0 9QRN 0 Q 00",
+ " 0 0MMMM 0 QQD0",
+ " 0 8MMMMM 0 QQHD",
+ " 0 MMMMLBM MMM0 666 00",
+ " BMMMM I0 MMC46 66 00",
+ " 1 0 MGE 6FB0",
+ " 3666 0 FGJ MOG8",
+ " 0 666662 66CIMMMMMA2",
+ " 0 6516 66 0GMMM 00",
+ " 0 0 66 00 00",
+ " 00 0 00000 00",
+ " 000 0 00 000 00",
+ " 000 0 00 00000",
+ " 00000 000",
+ " 0 "};
+
+static char *map_x32[] = {
+ "32 32 29 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006666",
+ "2 c #006699",
+ "3 c #0099CC",
+ "4 c #00CCCC",
+ "5 c #00CCFF",
+ "6 c #330000",
+ "7 c #333300",
+ "8 c #333366",
+ "9 c #663300",
+ "A c #666699",
+ "B c #66CCFF",
+ "C c #990066",
+ "D c #993399",
+ "E c #996600",
+ "F c #996699",
+ "G c #9999CC",
+ "H c #9999FF",
+ "I c #CC0099",
+ "J c #CC6600",
+ "K c #CC66CC",
+ "L c #CC9900",
+ "M c #FF0099",
+ "N c #FF00CC",
+ "O c #FF33CC",
+ "P c #FF6699",
+ "Q c #FF9900",
+ "R c #FF9933",
+ " ",
+ " 0 00 ",
+ " 000 000000 ",
+ " 0 000 00 00 000 ",
+ " 0 000 00 00 000 ",
+ " 0 000 00 EE 00 ",
+ " 0 00000 JJQQ 00 ",
+ " 0 00 QJEQQQQ 0 ",
+ " 0 QQQ 0 QQE0 QQQQ 0 ",
+ " 0 QQQQQQ 0 QQQ00 QQQ 0 ",
+ " 9QQQQQQQQJ0 QQQQQ 00 QQ 0 ",
+ " 7QQ QQLEQQQQQQ 00 QQ 0 ",
+ " 0 LEQQRP 00 QQQ 0 ",
+ " 0 6 NNNN 00 QQQ 0 ",
+ " 0 6NNNNNN 00 QQQ0 ",
+ " 0 ICNN NNNN 00 55 QQQ0 ",
+ " 0 NNNNNNICN NNNN00 555 0 ",
+ " 0MNNNNNNNI6 NNNC0555555 0 ",
+ " 0MNN 0 NNIA55 5555 0 ",
+ " 045 0 NIF5 55BK0 ",
+ " 055555 0 HIIB KON0 ",
+ " 03555555531 55DIN NNNOG0 ",
+ " 0 55555325 55558CNNNNNN 0 ",
+ " 0 55315555555 00NNNN 0 ",
+ " 0 055555 00 0 ",
+ " 00 0 55 0000 0 ",
+ " 000 0 000 000 0 ",
+ " 000 0 00 000 0 ",
+ " 000 0 00 000 0 ",
+ " 0000000 000 ",
+ " 000 0 ",
+ " "};
+
+static char **map_xpm[3] = { map_x16, map_x24, map_x32 };
+
diff --git a/app/bin/bitmaps/move.xpm b/app/bin/bitmaps/move.xpm index ab90555..5482a6b 100644 --- a/app/bin/bitmaps/move.xpm +++ b/app/bin/bitmaps/move.xpm @@ -1,23 +1,119 @@ -/* XPM */ -static char * move_xpm[] = { -"16 16 4 1", -" c None", -". c #0000FFFFFFFF", -"X c #000000000000", -"o c #FFFF00000000", -" . . X X ", -"...... XXXXXX ", -" . . X X ", -" . . o X X ", -" . . oX X ", -"...... XoXXXX ", -" . . Xo X ", -" . oooooooooXX ", -" . . Xo X ", -"...... XoXXXX ", -" . . oX X ", -" . . o X X ", -" . . X X ", -"...... XXXXXX ", -" . . X X ", -" "}; +static char *move_x16[] = {
+ "16 16 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099FF",
+ "3 c #CC0000",
+ "4 c #CCCCCC",
+ "5 c #808080",
+ " 1 1 5 5 ",
+ "21212 45454",
+ " 1 1 5 5 ",
+ "21212 45454",
+ " 1 1 5 5 ",
+ "21212 3 45454",
+ " 1 1 33 5 5 ",
+ "21212 333333 454",
+ " 1 1 33 5 5 ",
+ "21212 3 45454",
+ " 1 1 5 5 ",
+ "21212 45454",
+ " 1 1 5 5 ",
+ "21212 45454",
+ " 1 1 5 5 ",
+ " "};
+
+static char *move_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006699",
+ "2 c #009999",
+ "3 c #0099CC",
+ "4 c #00CCCC",
+ "5 c #666666",
+ "6 c #996666",
+ "7 c #999999",
+ "8 c #CC0000",
+ "9 c #CC3333",
+ "A c #CC6666",
+ "B c #CC9999",
+ "C c #C0C0C0",
+ "D c #808080",
+ " ",
+ " 1 1 55 5 ",
+ " 44144424 CD7CCD7C ",
+ " 1 1 55 5 ",
+ " 1 1 55 5 ",
+ " 44144424 CD7CCD7C ",
+ " 31 31 DD 5D ",
+ " 1 1 55 5 ",
+ " 44144314 B6DCCD7C ",
+ " 4144314 A86CCD7 ",
+ " 1 1 98 5 ",
+ " 4147666888888AA89BD7 ",
+ " 44147666988889A698BD7C ",
+ " 1 1 988 5 ",
+ " 31 31 A89 5D ",
+ " 44144424 B67CCD7C ",
+ " 1 1 55 5 ",
+ " 1 1 55 5 ",
+ " 44144424 CD7CCD7C ",
+ " 1 1 55 5 ",
+ " 1 1 55 5 ",
+ " 44144424 CD7CCD7C ",
+ " 31 31 DD 5D ",
+ " 1 1 5 "};
+
+static char *move_x32[] = {
+ "32 32 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006699",
+ "2 c #0099CC",
+ "3 c #00CCCC",
+ "4 c #666666",
+ "5 c #996666",
+ "6 c #999999",
+ "7 c #CC0000",
+ "8 c #CC3333",
+ "9 c #CC6666",
+ "A c #CC9999",
+ "B c #C0C0C0",
+ "C c #808080",
+ " ",
+ " 1 1 4 4 ",
+ " 1 12 4 46 ",
+ " 3313333133 BB4BBBBC6B ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 3313333133 BB4BBBBC6B ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 3313333133 BA4BBBBC6B ",
+ " 1 12 977A 46 ",
+ " 1 1 777 4 ",
+ " 1 1 877 4 ",
+ " 331368777777777777777779B46B ",
+ " 331367777777777777777778B46B ",
+ " 1 1 877 4 ",
+ " 1 1 777 4 ",
+ " 1 1 77 4 ",
+ " 3313333133 A95BBBBC6B ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 3313333133 BB4BBBBC6B ",
+ " 1 12 4 46 ",
+ " 1 1 4 4 ",
+ " 1 1 4 4 ",
+ " 3313333133 BB4BBBB46B ",
+ " 3313333133 BB4BBBB46B ",
+ " 1 1 4 4 ",
+ " "};
+
+static char **move_xpm[3] = { move_x16, move_x24, move_x32 };
+
diff --git a/app/bin/bitmaps/movedesc.xpm b/app/bin/bitmaps/movedesc.xpm deleted file mode 100644 index 520cfd6..0000000 --- a/app/bin/bitmaps/movedesc.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * movedesc_xpm[] = { -"16 16 4 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -"o c #0000FFFFFFFF", -" .. .. .. .. ", -" . . . . . ", -" . . .. .. . ", -" . . . . . ", -" .. ..X.. .. ", -" XXX ", -" X X X ", -" X X X ", -" X ", -" . . X . ", -"..oo..ooX o.oo..", -" .o o o Xo o. ", -" .o o ooXoo o. ", -" .o o o X o o. ", -"..oo..oo.oo.oo..", -" . . . . "}; diff --git a/app/bin/bitmaps/new-car.xpm b/app/bin/bitmaps/new-car.xpm new file mode 100644 index 0000000..c2fd649 --- /dev/null +++ b/app/bin/bitmaps/new-car.xpm @@ -0,0 +1,100 @@ +static char *new_car_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #339900",
+ "2 c #663300",
+ "3 c #808080",
+ " 11 ",
+ " 11 ",
+ " 111111 ",
+ " 111111 ",
+ " 11 ",
+ " 11 ",
+ " ",
+ " 22222222222222 ",
+ " 22222222222222 ",
+ " 22222222222222 ",
+ " 22222222222222 ",
+ " 22222222222222 ",
+ " 3 3 3 3 ",
+ " 30303 30303 ",
+ " 3 3 3 3 ",
+ " "};
+
+static char *new_car_x24[] = {
+ "24 24 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #00CC33",
+ "3 c #00FF66",
+ "4 c #663300",
+ " ",
+ " 221 ",
+ " 231 ",
+ " 1231 ",
+ " 222332221 ",
+ " 233333331 ",
+ " 11123111 ",
+ " 1231 ",
+ " 1231 ",
+ " 11 ",
+ " ",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ "444444444444444444444444",
+ " 00 0 00 0 ",
+ " 0000000 000 000 ",
+ " 000 000 000 000 ",
+ " 0 "};
+
+static char *new_car_x32[] = {
+ "32 32 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #009933",
+ "2 c #00CC33",
+ "3 c #00FF66",
+ "4 c #663300",
+ " ",
+ " 11111 ",
+ " 2331 ",
+ " 2331 ",
+ " 12331 ",
+ " 111123321111 ",
+ " 233333333331 ",
+ " 233333333331 ",
+ " 111123311111 ",
+ " 12331 ",
+ " 12331 ",
+ " 2221 ",
+ " 1111 ",
+ " ",
+ " ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ "4444444444444444444444444444444 ",
+ " 00 000 00 00 ",
+ " 00000000 00000000 ",
+ " 00000000 00000000 ",
+ " 000 000 000 000 ",
+ " "};
+
+static char **new_car_xpm[3] = { new_car_x16, new_car_x24, new_car_x32 };
+
diff --git a/app/bin/bitmaps/newcar.xpm b/app/bin/bitmaps/newcar.xpm deleted file mode 100644 index e1bc24a..0000000 --- a/app/bin/bitmaps/newcar.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * newcar_xpm[] = { -"16 16 4 1", -". c None", -"X c #800080008000", -"o c #000000000000", -" c #FFFFFFFF0000", -" ...X. X.X.... ", -"oooo... ..XX. ", -".. o... ...X .", -"...o ..o ..X ..", -"...o ooo. oo...", -"...o. ooo oo...", -"oooooooooooooo ", -"oooooooooooooo ", -"oooooooooooooo..", -"oooooooooooooooo", -"oooooooooooooooo", -"...oo.. oo ...o", -"..oooo.oooo ..o", -". oooo.oooo. o.", -" .oo.. oo...oo.", -" ...... ..... "}; diff --git a/app/bin/bitmaps/note.xpm b/app/bin/bitmaps/note.xpm new file mode 100644 index 0000000..51bf8c7 --- /dev/null +++ b/app/bin/bitmaps/note.xpm @@ -0,0 +1,114 @@ +static char *note_x16[] = {
+ "16 16 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #999999",
+ "3 c #CC9900",
+ "4 c #CC9933",
+ "5 c #CC9999",
+ "6 c #FFCC00",
+ "7 c #FFCC33",
+ "8 c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " 444444444444 ",
+ " 46666666666344 ",
+ " 46888888886664 ",
+ " 47222222227664 ",
+ " 46522222566664 ",
+ " 46788888866664 ",
+ " 47111111117664 ",
+ " 46666666666664 ",
+ " 46666666666664 ",
+ " 47777777777774 ",
+ " ",
+ " ",
+ " "};
+
+static char *note_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #999999",
+ "2 c #CC9900",
+ "3 c #CC9933",
+ "4 c #CC9999",
+ "5 c #CCCC66",
+ "6 c #FFCC00",
+ "7 c #FFCC33",
+ "8 c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 37777777777333333 ",
+ " 3666666666666666233 ",
+ " 36666666666666662223 ",
+ " 36788888888888766663 ",
+ " 36411111111111566663 ",
+ " 36666666666666666663 ",
+ " 36611111111156666663 ",
+ " 36688888888876666663 ",
+ " 36844444444444866663 ",
+ " 36544444444444566663 ",
+ " 36666666666666666663 ",
+ " 36666666666666666663 ",
+ " 36666666666666666663 ",
+ " 37777777777777777773 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *note_x32[] = {
+ "32 32 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #3399CC",
+ "3 c #999999",
+ "4 c #CC9900",
+ "5 c #CC9933",
+ "6 c #CCCC00",
+ "7 c #FFCC00",
+ "8 c #FFCC33",
+ "9 c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 55555555 ",
+ " 57777778888888888888855 ",
+ " 877777777777777777777445 ",
+ " 8777777777777777777774445 ",
+ " 87777777777777777777774465 ",
+ " 87799999999999999997777775 ",
+ " 87833333333333333337777775 ",
+ " 87777777777777777777777775 ",
+ " 87777777777777777777777775 ",
+ " 87782111111111128777777775 ",
+ " 87777777777777777777777775 ",
+ " 87777777777777777777777775 ",
+ " 87833333333333333337777775 ",
+ " 87799999999999999997777775 ",
+ " 87777777777777777777777775 ",
+ " 87777777777777777777777775 ",
+ " 87777777777777777777777775 ",
+ " 87777777777777777777777775 ",
+ " 58888887777777777777777775 ",
+ " 55555555555555555555 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *note_xpm[3] = { note_x16, note_x24, note_x32 };
+
diff --git a/app/bin/bitmaps/ok.xpm b/app/bin/bitmaps/ok.xpm new file mode 100644 index 0000000..1671eae --- /dev/null +++ b/app/bin/bitmaps/ok.xpm @@ -0,0 +1,92 @@ +static char *ok_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #008000",
+ " ",
+ " 1 ",
+ " 11 ",
+ " 111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1 1111 ",
+ " 11 1111 ",
+ " 1111111 ",
+ " 111111 ",
+ " 1111 ",
+ " 111 ",
+ " 1 ",
+ " "};
+
+static char *ok_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #008000",
+ " ",
+ " ",
+ " 1 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 1111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11 11111 ",
+ " 1111 11111 ",
+ " 11111 11111 ",
+ " 111111111 ",
+ " 11111111 ",
+ " 111111 ",
+ " 1111 ",
+ " 111 ",
+ " 1 ",
+ " ",
+ " "};
+
+static char *ok_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #008000",
+ " ",
+ " ",
+ " ",
+ " 111 ",
+ " 1111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 11111 ",
+ " 111111 ",
+ " 111111 ",
+ " 1111111 ",
+ " 1 1111111 ",
+ " 111 1111111 ",
+ " 1111 1111111 ",
+ " 11111 1111111 ",
+ " 111111111111 ",
+ " 11111111111 ",
+ " 111111111 ",
+ " 11111111 ",
+ " 111111 ",
+ " 11111 ",
+ " 111 ",
+ " 11 ",
+ " ",
+ " ",
+ " "};
+
+static char **ok_xpm[3] = { ok_x16, ok_x24, ok_x32 };
+
diff --git a/app/bin/bitmaps/openbutt.xpm b/app/bin/bitmaps/openbutt.xpm deleted file mode 100644 index 99b9666..0000000 --- a/app/bin/bitmaps/openbutt.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * openbutt_xpm[] = { -"7 16 2 1", -" c None", -". c #000000000000", -" ", -" ", -" ", -" ", -" ", -" ", -".......", -" ..... ", -" ... ", -" . ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/app/bin/bitmaps/pan-zoom.xpm b/app/bin/bitmaps/pan-zoom.xpm new file mode 100644 index 0000000..a42beee --- /dev/null +++ b/app/bin/bitmaps/pan-zoom.xpm @@ -0,0 +1,94 @@ +static char *pan_zoom_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #FF0000",
+ "2 c #FF3333",
+ " ",
+ " 11 ",
+ " 1211 ",
+ " 111111 ",
+ " 11 ",
+ " 1 11 1 ",
+ " 11 11 11 ",
+ " 11111111111111 ",
+ " 11111111111111 ",
+ " 11 11 11 ",
+ " 1 11 1 ",
+ " 11 ",
+ " 122111 ",
+ " 1111 ",
+ " 11 ",
+ " "};
+
+static char *pan_zoom_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #FF0000",
+ "2 c #FF3333",
+ " ",
+ " ",
+ " 11 ",
+ " 1111 ",
+ " 111111 ",
+ " 11111211 ",
+ " 11 ",
+ " 11 ",
+ " 1 11 1 ",
+ " 11 11 11 ",
+ " 111 11 111 ",
+ " 11111111111111111111 ",
+ " 11111111111111111111 ",
+ " 111 11 111 ",
+ " 11 11 11 ",
+ " 1 11 1 ",
+ " 11 ",
+ " 11 ",
+ " 11111111 ",
+ " 111111 ",
+ " 1111 ",
+ " 11 ",
+ " ",
+ " "};
+
+static char *pan_zoom_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ " ",
+ " ",
+ " 11 ",
+ " 111111 ",
+ " 1111111111 ",
+ " 111111111111 ",
+ " 1111 111 111 ",
+ " 111 ",
+ " 111 ",
+ " 111 ",
+ " 11 111 11 ",
+ " 111 111 111 ",
+ " 1111 111 1111 ",
+ " 111 111 111 ",
+ " 1111111111111111111111111111 ",
+ " 11111111111111111111111111111 ",
+ " 1111111111111111111111111111 ",
+ " 111 111 111 ",
+ " 1111 111 1111 ",
+ " 111 111 111 ",
+ " 11 111 111 ",
+ " 111 ",
+ " 111 ",
+ " 111 ",
+ " 111 111 1 ",
+ " 1111 111 111 ",
+ " 11111111111 ",
+ " 111111111 ",
+ " 11111 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char **pan_zoom_xpm[3] = { pan_zoom_x16, pan_zoom_x24, pan_zoom_x32 };
+
diff --git a/app/bin/bitmaps/pan.xpm b/app/bin/bitmaps/pan.xpm deleted file mode 100644 index 9575ec5..0000000 --- a/app/bin/bitmaps/pan.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * pan_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" XX ", -" XXXX ", -" XXXXXX. ", -" XX XX XX ", -" XX ", -" XX XX XX ", -" XXXXXXXXXXXXXX ", -" XXXXXXXXXXXXXX ", -" XX XX XX ", -" XX ", -" XX XX XX ", -" XXXXXX ", -" XXXX ", -" XX ", -" "}; diff --git a/app/bin/bitmaps/parallel-line.xpm b/app/bin/bitmaps/parallel-line.xpm index 4ac471d..b490c84 100644 --- a/app/bin/bitmaps/parallel-line.xpm +++ b/app/bin/bitmaps/parallel-line.xpm @@ -1,22 +1,108 @@ -/* XPM */ -static char * parallel_line_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" ", -" ", -"................", -" X ", -" X X ", -" X X ", -" ", -" ", -" . . . ", -"................", -" . . . ", -" . . . ", -" . . . ", -"................", -" . . . "}; +static char *parallel_line_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ " ",
+ "000000000000000 ",
+ " ",
+ " 1 ",
+ " 111 ",
+ " 11111 ",
+ " 1 ",
+ " 1 ",
+ " 1 ",
+ " 2 2 2 2 2 2 ",
+ "000000000000000 ",
+ " 2 2 2 2 2 2 2 ",
+ " 2 2 2 2 2 2 2 ",
+ "000000000000000 ",
+ " 2 2 2 2 2 2 2 ",
+ " "};
+
+static char *parallel_line_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " 4444444444444444444444 ",
+ " ",
+ " 66 ",
+ " 6666 ",
+ " 6666 6 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 7 ",
+ " 9 9 99 99 9 9 9 ",
+ " 0000000000000000000000 ",
+ " 9 9 99 99 9 9 9 ",
+ " 9 9 99 99 9 9 9 ",
+ " 9 9 99 99 9 9 9 ",
+ " 0300320320230230130031 ",
+ " 8 85 85 58 58 38 83 ",
+ " 9 9 9 9 9 9 9 ",
+ " ",
+ " "};
+
+static char *parallel_line_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #996600",
+ "6 c #CC0000",
+ "7 c #CC6600",
+ "8 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 444444444444444444444444444444 ",
+ " ",
+ " ",
+ " 66 ",
+ " 6666 ",
+ " 66 6 66 ",
+ " 6 6 6 ",
+ " 6 ",
+ " 6 ",
+ " 6 ",
+ " 6 ",
+ " 6 ",
+ " 6 ",
+ " 6 ",
+ " ",
+ " 88 88 88 88 88 88 88 ",
+ " 000000000000000000000000000000 ",
+ " 88 88 88 88 88 88 88 ",
+ " 88 88 88 88 88 88 88 ",
+ " 88 88 88 88 88 88 88 ",
+ " 88 88 88 88 88 88 88 ",
+ " 575 575 77 77 573 575 377 ",
+ " 033202330033003300331023201330 ",
+ " 88 88 88 88 88 88 88 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **parallel_line_xpm[3] = { parallel_line_x16, parallel_line_x24, parallel_line_x32 };
+
diff --git a/app/bin/bitmaps/parallel.xpm b/app/bin/bitmaps/parallel.xpm index eb816dc..a19f797 100644 --- a/app/bin/bitmaps/parallel.xpm +++ b/app/bin/bitmaps/parallel.xpm @@ -1,22 +1,116 @@ -/* XPM */ -static char * parallel_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -"................", -" . . . ", -" . . . ", -"................", -" . X . ", -" X X ", -" X X ", -" ", -" ", -" . . . ", -"................", -" . . . ", -" . . . ", -" . . . ", -"................", -" . . . "}; +static char *parallel_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #CC9966",
+ "3 c #CCCCCC",
+ "4 c #808080",
+ " 3 3 3 3 3 3 3 ",
+ "444444444444444 ",
+ " 3 3 3 3 3 3 3 ",
+ " 3 3 3 3 3 3 3 ",
+ "4444444 4444444 ",
+ " 3 3 3 1 3 3 3 ",
+ " 111 ",
+ " 11111 ",
+ " 1 ",
+ " 1 ",
+ " 2 2 2 1 2 2 2 ",
+ "0000000 0000000 ",
+ " 2 2 2 2 2 2 2 ",
+ " 2 2 2 2 2 2 2 ",
+ "000000000000000 ",
+ " 2 2 2 2 2 2 2 "};
+
+static char *parallel_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #666666",
+ "4 c #996600",
+ "5 c #999999",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ "A c #CC9999",
+ "B c #C0C0C0",
+ "C c #808080",
+ " B B B ",
+ " 55 5 5C 55 C5 5C 55 ",
+ "3CC33C33C33CC33C33C33CC3",
+ " BB B B BB B B BB ",
+ " BB B B BB B B BB ",
+ " BB B B BB B B BB ",
+ "3CC33C33C33CC33C33C33CC3",
+ " 55 5 5C 55 C5 5C 55 ",
+ " B B B AA B B ",
+ " 666 ",
+ " 666666 ",
+ " 666666 ",
+ " 66 ",
+ " 66 ",
+ " 66 ",
+ " 77 ",
+ " 99 9 9 99 9 9 99 ",
+ "000000000000000000000000",
+ " 99 9 9 99 9 9 99 ",
+ " 99 9 9 99 9 9 99 ",
+ " 99 9 9 99 9 9 99 ",
+ " 2400400420440140041044 ",
+ " 2400400420440140041044 ",
+ " 9 9 9 99 9 9 99 "};
+
+static char *parallel_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #996600",
+ "6 c #999999",
+ "7 c #CC0000",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ "A c #C0C0C0",
+ "B c #808080",
+ " ",
+ " AA AA AA AA AAA AA AA ",
+ " 46B44B6B4B6B446644B6B446B44B6B ",
+ " 46B44B6B4B6B446644B6B446B44B6B ",
+ " AA AA AA AA AAA AA AA ",
+ " AA AA AA AA AAA AA AA ",
+ " AA AA AA AA AAA AA AA ",
+ " AA AA AA AA AAA AA AA ",
+ " 46B44B6B4B6B446644B6B446B44B6B ",
+ " 46B44B6B4B6B446644B6B446B44B6B ",
+ " AA AA AA AA AAA AA AA ",
+ " ",
+ " 7777 ",
+ " 777777 ",
+ " 77777777 ",
+ " 77 77 777 ",
+ " 77 ",
+ " 77 ",
+ " 77 ",
+ " 77 ",
+ " 77 ",
+ " 99 99 9 99 9 99 99 ",
+ " 88 883 585 88 585 88 883 ",
+ " 0330033102330033002320033003310",
+ " 99 99 99 99 999 99 99 ",
+ " 99 99 99 99 999 99 99 ",
+ " 99 99 99 99 999 99 99 ",
+ " 99 99 99 99 999 99 99 ",
+ " 88 883 585 88 585 88 883 ",
+ " 0330033102330033002320033003310",
+ " 99 99 99 99 999 99 99 ",
+ " "};
+
+static char **parallel_xpm[3] = { parallel_x16, parallel_x24, parallel_x32 };
+
diff --git a/app/bin/bitmaps/parameter.xpm b/app/bin/bitmaps/parameter.xpm new file mode 100644 index 0000000..7a58a6f --- /dev/null +++ b/app/bin/bitmaps/parameter.xpm @@ -0,0 +1,104 @@ +static char *parameter_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #999999",
+ " 11111111111 ",
+ " 1 11 ",
+ " 1 11 ",
+ " 1 00000000 11 ",
+ " 1 1 ",
+ " 1 0 1 ",
+ " 1 00 1 ",
+ " 1 00 1 ",
+ " 1 000 1 ",
+ " 1 1 ",
+ " 1 00000000 1 ",
+ " 1 00 1 ",
+ " 1 00 1 ",
+ " 1 00 1 ",
+ " 1 1 ",
+ " 11111111111111 "};
+
+static char *parameter_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " 7777777777777777 ",
+ " 234444444444444447 ",
+ " 2355555555555555537 ",
+ " 2355100000000000757 ",
+ " 23555555555555555557 ",
+ " 235555555555555445547 ",
+ " 2355555555555437455537 ",
+ " 2355555555432745555547 ",
+ " 2355377202765555555547 ",
+ " 2355544555555555555547 ",
+ " 2355455555555555555547 ",
+ " 2355323455555472455547 ",
+ " 2355554724532345555547 ",
+ " 355555562074555555547 ",
+ " 355556234547745555547 ",
+ " 355323555555432455547 ",
+ " 355455555555555555547 ",
+ " 355466336666666455547 ",
+ " 355666321366666655547 ",
+ " 355555555326555555547 ",
+ " 355555555553265555547 ",
+ " 355555555555562455547 ",
+ " 355555555555555555547 ",
+ " 222222222222222222227 "};
+
+static char *parameter_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #666666",
+ "3 c #999999",
+ "4 c #CCCCCC",
+ "5 c #FFFFFF",
+ "6 c #C0C0C0",
+ "7 c #808080",
+ " 222222222222222222222 ",
+ " 73666666666666666666637 ",
+ " 74555555555555555555557 ",
+ " 745555555555555555555547 ",
+ " 7455500000000000000004547 ",
+ " 74555777777777777777745537 ",
+ " 74555555555555555555555557 ",
+ " 745555555555555555547555557 ",
+ " 7455555555555555547004555547 ",
+ " 7455555555555543100355555557 ",
+ " 7455554666637000265555555557 ",
+ " 7455530000001765555555555557 ",
+ " 7455546444455555555555555557 ",
+ " 7455555555555555555555555557 ",
+ " 7455537455555555554375555557 ",
+ " 7455531023555555420075555557 ",
+ " 7455555420074431013555555557 ",
+ " 7455555554300007455555555557 ",
+ " 7455555553101100345555555557 ",
+ " 7455554700245547002655555557 ",
+ " 7455570134555555532015555557 ",
+ " 7455544555555555555465555557 ",
+ " 7455555555555555555555555557 ",
+ " 7455537777227777777774555557 ",
+ " 7455570000000000000006555557 ",
+ " 7455555555531016555555555557 ",
+ " 7455555555555610135555555557 ",
+ " 7455555555555556200345555557 ",
+ " 7455555555555555542005555557 ",
+ " 7455555555555555555435555557 ",
+ " 7644444444444444444444444447 ",
+ " 7777777777777777777777777777 "};
+
+static char **parameter_xpm[3] = { parameter_x16, parameter_x24, parameter_x32 };
+
diff --git a/app/bin/bitmaps/paste.xpm b/app/bin/bitmaps/paste.xpm new file mode 100644 index 0000000..c820a4e --- /dev/null +++ b/app/bin/bitmaps/paste.xpm @@ -0,0 +1,107 @@ +static char *paste_x16[] = {
+ "16 16 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CCCCCC",
+ "4 c #FFFFFF",
+ "5 c #C0C0C0",
+ "6 c #808080",
+ " 6116 ",
+ " 666623326666 ",
+ "63333222233356 ",
+ "6444411111111111",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6444144444444441",
+ "6255144444444441",
+ " 111111111111111"};
+
+static char *paste_x24[] = {
+ "24 24 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CCCCCC",
+ "4 c #FFFFFF",
+ "5 c #C0C0C0",
+ "6 c #808080",
+ " 66666 ",
+ " 6533336 ",
+ " 6111111333336111166 ",
+ "12444444522224444441 ",
+ "15444444444444444446 ",
+ "15444441111111111111111 ",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "154444144444444444444441",
+ "124444144444444444444441",
+ " 61111144444444444444441",
+ " 1111111111111111 "};
+
+static char *paste_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CCCCCC",
+ "4 c #FFFFFF",
+ "5 c #C0C0C0",
+ "6 c #808080",
+ " 111111 ",
+ " 62555556 ",
+ " 6244444436 ",
+ " 6622222266333333662222266 ",
+ " 64444444442222223444444451 ",
+ " 64444444444444444444444436 ",
+ " 24444444444444444444444436 ",
+ " 244444441111111111111111111111 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 244444441444444444444444444441 ",
+ " 644444441444444444444444444441 ",
+ " 665555551444444444444444444441 ",
+ " 1111111444444444444444444441 ",
+ " 1111111111111111111111 "};
+
+static char **paste_xpm[3] = { paste_x16, paste_x24, paste_x32 };
+
diff --git a/app/bin/bitmaps/pause.xpm b/app/bin/bitmaps/pause.xpm new file mode 100644 index 0000000..da61446 --- /dev/null +++ b/app/bin/bitmaps/pause.xpm @@ -0,0 +1,147 @@ +static char* pause_x16[] = {
+ "16 16 20 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #009966",
+ "5 c #333333",
+ "6 c #336633",
+ "7 c #336666",
+ "8 c #339966",
+ "9 c #33CC99",
+ "A c #666666",
+ "B c #66CC99",
+ "C c #99CC99",
+ "D c #99CCCC",
+ "E c #CCCCCC",
+ "F c #CCFFCC",
+ "G c #CCFFFF",
+ "H c #FFFFFF",
+ "I c #808080",
+ " 0 ",
+ " 00000 ",
+ " 01133300 ",
+ " 001688887210 ",
+ " 01688888888821 ",
+ " 07CCCCDDDDDDC5 ",
+ " 0AEEEEEEEEEEE5 ",
+ " 0IHHHHHHHHHHG5 ",
+ " 0IHHHHHHHHHHG5 ",
+ " 0AFFFFFFFFFFD5 ",
+ " 07DDDDDDDDDDC2 ",
+ " 05BBBBBBBBBBB2 ",
+ " 128BBBBBB9720 ",
+ " 0128999810 ",
+ " 0134210 ",
+ " 020 "};
+
+static char* pause_x24[] = {
+ "24 24 22 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #009966",
+ "5 c #333333",
+ "6 c #336633",
+ "7 c #336666",
+ "8 c #339966",
+ "9 c #33CC66",
+ "A c #33CC99",
+ "B c #666666",
+ "C c #669999",
+ "D c #66CC99",
+ "E c #99CCCC",
+ "F c #99FFCC",
+ "G c #CCCCCC",
+ "H c #CCFFCC",
+ "I c #CCFFFF",
+ "J c #FFFFFF",
+ "K c #808080",
+ " ",
+ " 000 ",
+ " 0012000 ",
+ " 0003333300 ",
+ " 0036777773210 ",
+ " 01278888888887100 ",
+ " 01278888888888888710 ",
+ " 05CCCCCCCCCCCCCCCCC0 ",
+ " 07EEEEEEEEEEEEEEEEE0 ",
+ " 0BGGGGGGGGGGGGGGGGG0 ",
+ " 0BIIIIIIIIIIIIIIIII0 ",
+ " 0KJJJJJJJJJJJJJJJJJ0 ",
+ " 0KJJJJJJJJJJJJJJJJJ0 ",
+ " 0BHHHHHHHHHHHHHHHHH0 ",
+ " 0BFFFFFFFFFFFFFFFFF0 ",
+ " 07EEEEEEEEEEEEEEEEE0 ",
+ " 07DDDDDDDDDDDDDDDDD0 ",
+ " 02DDDDDDDDDDDDDDDDC1 ",
+ " 027DDDDDDDDDDDDA620 ",
+ " 028AAAAAAAAA720 ",
+ " 0128AAAA9811 ",
+ " 013894110 ",
+ " 01210 ",
+ " 0 "};
+
+static char* pause_x32[] = {
+ "32 32 22 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #009966",
+ "5 c #333333",
+ "6 c #336633",
+ "7 c #336666",
+ "8 c #339966",
+ "9 c #339999",
+ "A c #33CC66",
+ "B c #33CC99",
+ "C c #669966",
+ "D c #66CC99",
+ "E c #99CC99",
+ "F c #99CCCC",
+ "G c #99FFCC",
+ "H c #CCCCCC",
+ "I c #CCFFCC",
+ "J c #CCFFFF",
+ "K c #FFFFFF",
+ " ",
+ " ",
+ " 00000 ",
+ " 0023300 ",
+ " 00233333200 ",
+ " 011333333333210 ",
+ " 0013777777777776100 ",
+ " 006888888888888888600 ",
+ " 0168888888888888888888210 ",
+ " 018CCCCCCCCCCCCCCCCCCCCC810 ",
+ " 05EEEEEEEEEEEEEEEEEEEEEEE50 ",
+ " 05FFFFFFFFFFFFFFFFFFFFFFF50 ",
+ " 05HHHHHHHHHHHHHHHHHHHHHHH50 ",
+ " 05IIIIIIIIIIIIIIIIIIIIIII50 ",
+ " 05KKKKKKKKKKKKKKKKKKKKKKK50 ",
+ " 05KKKKKKKKKKKKKKKKKKKKKKK50 ",
+ " 06KKKKKKKKKKKKKKKKKKKKKKK60 ",
+ " 05JJJJJJJJJJJJJJJJJJJJJJJ50 ",
+ " 05IIIIIIIIIIIIIIIIIIIIIII50 ",
+ " 05GGGGGGGGGGGGGGGGGGGGGGG50 ",
+ " 05FFFFFFFFFFFFFFFFFFFFFFF50 ",
+ " 05FFFFFFFFFFFFFFFFFFFFFFF50 ",
+ " 05DDDDDDDDDDDDDDDDDDDDDDD50 ",
+ " 028DDDDDDDDDDDDDDDDDDDDD820 ",
+ " 0228DDDDDDDDDDDDDDDDD9220 ",
+ " 026BBBBBBBBBBBBBBB620 ",
+ " 028BBBBBBBBBBB820 ",
+ " 128AAAAAAA821 ",
+ " 0128AAA4210 ",
+ " 0134310 ",
+ " 010 ",
+ " "};
+
+static char *pause_xpm[3] = { pause_x16, pause_x24, pause_x32 };
+
diff --git a/app/bin/bitmaps/polygon.xpm b/app/bin/bitmaps/polygon.xpm new file mode 100644 index 0000000..cce796a --- /dev/null +++ b/app/bin/bitmaps/polygon.xpm @@ -0,0 +1,89 @@ +static char *polygon_x16[] = {
+ "16 16 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 000000000 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 0 00 ",
+ " 0 00 ",
+ "00 00",
+ " 0 00",
+ " 0 00",
+ " 00 00",
+ " 0 00",
+ " 0 00",
+ " 000 00",
+ " 000 000",
+ " 000000000 ",
+ " 00 "};
+
+static char *polygon_x24[] = {
+ "24 24 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 00000 ",
+ " 0000000000 00 ",
+ " 000 00 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 00 0 ",
+ " 00 0 ",
+ " 00 0 ",
+ " 000 0000 ",
+ " 000 000000 ",
+ " 000000 ",
+ " "};
+
+static char *polygon_x32[] = {
+ "32 32 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 000 ",
+ " 000000000000 ",
+ " 00000000000000 000 ",
+ " 000000 000 ",
+ " 000 000 ",
+ " 00 000 ",
+ " 00 00 ",
+ " 000 000 ",
+ " 00 000 ",
+ " 00 000 ",
+ " 00 000 ",
+ " 00 000 ",
+ " 00 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 00 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 00 00 ",
+ " 000 00 ",
+ " 00 00 ",
+ " 00 00 ",
+ " 000 00 ",
+ " 0000 00 ",
+ " 00000 00 ",
+ " 0000 00 ",
+ " 0000 0000000 ",
+ " 0000 0000000000 ",
+ " 00000000000 ",
+ " 0000 ",
+ " "};
+
+static char **polygon_xpm[3] = { polygon_x16, polygon_x24, polygon_x32 };
+
diff --git a/app/bin/bitmaps/polyline.xpm b/app/bin/bitmaps/polyline.xpm new file mode 100644 index 0000000..6611f44 --- /dev/null +++ b/app/bin/bitmaps/polyline.xpm @@ -0,0 +1,92 @@ +static char *polyline_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0000FF",
+ " ",
+ " 1 ",
+ " 1 1 ",
+ "11111 11 ",
+ " 1 1111 11 ",
+ " 1 11 1 ",
+ " 1 11",
+ " 11 11",
+ " 11 11",
+ " 1 1 ",
+ " 11 11 ",
+ " 11 1 ",
+ " 11 11 ",
+ " 1 11111 ",
+ " 11111 ",
+ " "};
+
+static char *polyline_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0000FF",
+ " ",
+ " ",
+ " 1 ",
+ " 11 ",
+ " 111 1 ",
+ " 111111 11 ",
+ " 11 1111 11 ",
+ " 11 1111 1 ",
+ " 1 1 11 ",
+ " 1 11 ",
+ " 1 1 ",
+ " 11 1 ",
+ " 11 1 ",
+ " 1 11 ",
+ " 1 1 ",
+ " 1 11 ",
+ " 1 1 ",
+ " 11 11 ",
+ " 11 1 ",
+ " 11 1 ",
+ " 1 111111 ",
+ " 111111 ",
+ " ",
+ " "};
+
+static char *polyline_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0000FF",
+ " ",
+ " ",
+ " ",
+ " 11 ",
+ " 111 ",
+ " 111 11 ",
+ " 111111 11 ",
+ " 111111111 11 ",
+ " 11 11111 11 ",
+ " 11 111111 11 ",
+ " 11 1111 11 ",
+ " 11 1 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 111 ",
+ " 11 11 ",
+ " 111 111 ",
+ " 111 11 ",
+ " 111 11 ",
+ " 11 11 ",
+ " 11 11 ",
+ " 11 1111 ",
+ " 111 1111111111 ",
+ " 1111111111 ",
+ " 11 ",
+ " ",
+ " "};
+
+static char **polyline_xpm[3] = { polyline_x16, polyline_x24, polyline_x32 };
+
diff --git a/app/bin/bitmaps/profile.xpm b/app/bin/bitmaps/profile.xpm index df22abe..d446bb4 100644 --- a/app/bin/bitmaps/profile.xpm +++ b/app/bin/bitmaps/profile.xpm @@ -1,24 +1,121 @@ -/* XPM */ -static char * profile_xpm[] = { -"16 16 5 1", -" c None", -". c #FFFF00000000", -"X c #0000FFFFFFFF", -"o c #00000000FFFF", -"O c #000000000000", -" ", -" . ", -" .Xo ", -" .Xo ", -" .XXXo o ", -".XXXXo .Xo", -"OXXXXXo .XO", -"OXXXXXo .XXO", -"OXXXXXXo .XXXO", -"OXXXXXXXo .XXXXO", -"OXXXXXXXXoXXXXXO", -"OXXXXXXXXXXXXXXO", -"OXXXXXXXXXXXXXXO", -"OOOOOOOOOOOOOOOO", -" O O O ", -" O O O "}; +static char *profile_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #336666",
+ "4 c #336699",
+ "5 c #339999",
+ "6 c #669999",
+ "7 c #6699CC",
+ "8 c #66CCCC",
+ "9 c #66CCFF",
+ "A c #99CCFF",
+ " ",
+ " 0 ",
+ " 262 ",
+ " 05A71 ",
+ " 05A92 20120 ",
+ "004AA82238A98300",
+ " 05AAA58AAAAA50 ",
+ "005AAAAAAAAAA500",
+ "004AAAAAAAAAA400",
+ " 05AAAAAAAAAA50 ",
+ "004AAAAAAAAAA400",
+ " 05AAAAAAAAAA50 ",
+ " 00000000000000 ",
+ " 0 00 0 0 0 ",
+ " 0 0 0 ",
+ " "};
+
+static char *profile_x24[] = {
+ "24 24 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339999",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #66CCCC",
+ "A c #66CCFF",
+ "B c #99CCFF",
+ " ",
+ " ",
+ " 0 ",
+ " 1481 ",
+ " 04AB81 ",
+ " 06BBA4 ",
+ " 06BBB92 11210 ",
+ " 006BBBB50 128AA8630000",
+ "0006BBBBA3128ABBBBBB5000",
+ " 06BBBBB87ABBBBBBBB60 ",
+ " 06BBBBBBBBBBBBBBBB60 ",
+ " 006BBBBBBBBBBBBBBBB5000",
+ " 006BBBBBBBBBBBBBBBB5000",
+ " 06BBBBBBBBBBBBBBBB60 ",
+ " 06BBBBBBBBBBBBBBBB60 ",
+ "0006BBBBBBBBBBBBBBBB5000",
+ " 06BBBBBBBBBBBBBBBB60 ",
+ " 06BBBBBBBBBBBBBBBB60 ",
+ " 01444444444444444410 ",
+ " 000000000000000000 ",
+ " 0 00 0 0 00 ",
+ " 0 0 00 ",
+ " ",
+ " "};
+
+static char *profile_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #336699",
+ "6 c #339999",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #66CCCC",
+ "A c #66CCFF",
+ "B c #99CCFF",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 2683 ",
+ " 029BB82 ",
+ " 06BBBB4 ",
+ " 06BBBBA2 ",
+ " 06BBBBB50 11200 ",
+ " 06BBBBBA1 017AA8511200 ",
+ " 0006BBBBBB83 016ABBBBBBA93000 ",
+ " 0006BBBBBBA2025ABBBBBBBBBB4000 ",
+ " 06BBBBBBB94ABBBBBBBBBBBB40 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ",
+ " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ",
+ " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 06BBBBBBBBBBBBBBBBBBBBBB40 ",
+ " 04888888888888888888888830 ",
+ " 00000000000000000000000000 ",
+ " 00 00 00 00 00 ",
+ " 00 0 00 0 00 ",
+ " 00 00 00 ",
+ " ",
+ " ",
+ " "};
+
+static char **profile_xpm[3] = { profile_x16, profile_x24, profile_x32 };
+
diff --git a/app/bin/bitmaps/protractor.xpm b/app/bin/bitmaps/protractor.xpm new file mode 100644 index 0000000..43fa250 --- /dev/null +++ b/app/bin/bitmaps/protractor.xpm @@ -0,0 +1,99 @@ +static char *protractor_x16[] = {
+ "16 16 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #990000",
+ "3 c #CC0000",
+ " ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 ",
+ " 01 ",
+ " 0033 ",
+ " 00 3 ",
+ " 00 33 ",
+ " 0 3 ",
+ " 000 3 ",
+ " 00000023 ",
+ " 000000 ",
+ " 00000 ",
+ " 0 "};
+
+static char *protractor_x24[] = {
+ "24 24 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #CC0000",
+ "4 c #800000",
+ " ",
+ " 00 ",
+ " 000 ",
+ " 000 ",
+ " 00 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 010 ",
+ " 00033 ",
+ " 000 3 ",
+ " 000 33 ",
+ " 000 3 ",
+ " 000 3 ",
+ " 000 33 ",
+ " 000 33 ",
+ " 000000 33 ",
+ " 00000000 33 ",
+ " 00000042 ",
+ " 00000000 ",
+ " 0000000 ",
+ " 0000 ",
+ " "};
+
+static char *protractor_x32[] = {
+ "32 32 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #990000",
+ "3 c #CC0000",
+ " ",
+ " 0 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0000 ",
+ " 000 ",
+ " 000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0001 ",
+ " 00033 ",
+ " 000 33 ",
+ " 0000 33 ",
+ " 0000 33 ",
+ " 0000 333 ",
+ " 0000 33 ",
+ " 000 33 ",
+ " 000 333 ",
+ " 0000 333 ",
+ " 00000 33 ",
+ " 000000000 33 ",
+ " 0000000000 333 ",
+ " 00000000023 ",
+ " 0000000000 ",
+ " 000000000 ",
+ " 000000000 ",
+ " 0000000 ",
+ " 00 ",
+ " "};
+
+static char **protractor_xpm[3] = { protractor_x16, protractor_x24, protractor_x32 };
+
diff --git a/app/bin/bitmaps/pull.xpm b/app/bin/bitmaps/pull.xpm deleted file mode 100644 index a25248e..0000000 --- a/app/bin/bitmaps/pull.xpm +++ /dev/null @@ -1,23 +0,0 @@ -/* XPM */ -static char * pull_xpm[] = { -"16 16 4 1", -" c None", -". c #0000FFFFFFFF", -"X c #FFFF00000000", -"o c #000000000000", -" . . . . ", -"...... ......", -" . . . . ", -" . . . . ", -"...... ......", -" . . . . ", -" X X ", -" XX XX ", -"XXXXXXX XXXXXXX", -" XX XX ", -" o X o Xo ", -"ooo oooo oooo oo", -" o o o ", -" o o o ", -"oo oooo oooo ooo", -" o o o "}; diff --git a/app/bin/bitmaps/redo.xpm b/app/bin/bitmaps/redo.xpm new file mode 100644 index 0000000..045a8f2 --- /dev/null +++ b/app/bin/bitmaps/redo.xpm @@ -0,0 +1,104 @@ +static char *redo_x16[] = {
+ "16 16 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006600",
+ "2 c #009900",
+ "3 c #00CC00",
+ "4 c #00FF00",
+ "5 c #008000",
+ " ",
+ " 1 ",
+ " 151 ",
+ " 11425 ",
+ " 1553344355 ",
+ " 5244444435 ",
+ " 5344511425 ",
+ " 5435 151 ",
+ " 5345 1 ",
+ " 145 ",
+ " 1235 ",
+ " 135 ",
+ " 525 ",
+ " 521 ",
+ " 51 ",
+ " "};
+
+static char *redo_x24[] = {
+ "24 24 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006600",
+ "2 c #009900",
+ "3 c #00CC00",
+ "4 c #00FF00",
+ "5 c #008000",
+ " ",
+ " ",
+ " 1 ",
+ " 151 ",
+ " 5425 ",
+ " 11544351 ",
+ " 552234444425 ",
+ " 553444444444425 ",
+ " 524444444444455 ",
+ " 52444421124435 ",
+ " 5444351 2455 ",
+ " 544425 55 ",
+ " 54421 5 ",
+ " 53435 ",
+ " 1445 ",
+ " 12435 ",
+ " 5345 ",
+ " 5335 ",
+ " 5421 ",
+ " 545 ",
+ " 141 ",
+ " 155 ",
+ " ",
+ " "};
+
+static char *redo_x32[] = {
+ "32 32 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006600",
+ "2 c #009900",
+ "3 c #00CC00",
+ "4 c #00FF00",
+ "5 c #008000",
+ " ",
+ " ",
+ " ",
+ " 1 ",
+ " 151 ",
+ " 2425 ",
+ " 244351 ",
+ " 1152444425 ",
+ " 552233444444355 ",
+ " 553444444444444425 ",
+ " 534444444444444435 ",
+ " 1244444444444444425 ",
+ " 5244444435113444351 ",
+ " 544444211 134425 ",
+ " 53444451 13351 ",
+ " 1244445 155 ",
+ " 544445 15 ",
+ " 54442 ",
+ " 534435 ",
+ " 14445 ",
+ " 54431 ",
+ " 13441 ",
+ " 53435 ",
+ " 5445 ",
+ " 1445 ",
+ " 5435 ",
+ " 5431 ",
+ " 542 ",
+ " 531 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char **redo_xpm[3] = { redo_x16, redo_x24, redo_x32 };
+
diff --git a/app/bin/bitmaps/reflect.xpm b/app/bin/bitmaps/reflect.xpm new file mode 100644 index 0000000..47adaad --- /dev/null +++ b/app/bin/bitmaps/reflect.xpm @@ -0,0 +1,115 @@ +static char *reflect_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #006699",
+ "3 c #0099CC",
+ "4 c #333333",
+ "5 c #3399CC",
+ "6 c #33CCCC",
+ "7 c #33CCFF",
+ "8 c #666666",
+ "9 c #66CCFF",
+ "A c #99CCFF",
+ " ",
+ " 00 ",
+ " 00 ",
+ "33 00 00",
+ "3553 00 0040",
+ "36965 00 04840",
+ "36AA95 00 048840",
+ "36AAA95200888840",
+ "36AAA95100488840",
+ "36AA75 00 048840",
+ "36955 00 04840",
+ "3553 00 040",
+ "33 00 00",
+ " 00 ",
+ " 00 ",
+ " "};
+
+static char *reflect_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0099CC",
+ "2 c #333333",
+ "3 c #3399CC",
+ "4 c #33CCCC",
+ "5 c #33CCFF",
+ "6 c #666666",
+ "7 c #66CCFF",
+ "8 c #99CCFF",
+ " ",
+ " ",
+ " 00 ",
+ " 00 ",
+ " 1 00 0 ",
+ " 13 00 00 ",
+ " 1733 00 0060 ",
+ " 17753 00 02660 ",
+ " 178873 00 066660 ",
+ " 17888733 00 02666660 ",
+ " 178888773 00 026666660 ",
+ " 1788888873000266666660 ",
+ " 178888873 00 066666660 ",
+ " 17888873 00 02666660 ",
+ " 1788873 00 0266660 ",
+ " 178743 00 026660 ",
+ " 17731 00 0660 ",
+ " 173 00 060 ",
+ " 13 00 00 ",
+ " 1 00 0 ",
+ " 00 ",
+ " 00 ",
+ " ",
+ " "};
+
+static char *reflect_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0099CC",
+ "2 c #333333",
+ "3 c #3399CC",
+ "4 c #33CCCC",
+ "5 c #33CCFF",
+ "6 c #666666",
+ "7 c #66CCFF",
+ "8 c #99CCFF",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 1 00 00 ",
+ " 133 00 020 ",
+ " 14733 00 02620 ",
+ " 148753 00 026620 ",
+ " 1488873 00 0666620 ",
+ " 148888733 00 026666620 ",
+ " 1488888773 00 0266666620 ",
+ " 14888888873 00 006666666620 ",
+ " 1488888888733 00 0266666666620 ",
+ " 1488888888871 0002666666666620 ",
+ " 148888888873 00 0266666666620 ",
+ " 14888888873 00 06666666620 ",
+ " 1488888873 00 0266666620 ",
+ " 148888873 00 026666620 ",
+ " 14888743 00 02666620 ",
+ " 1488731 00 266620 ",
+ " 14873 00 06620 ",
+ " 1473 00 0220 ",
+ " 133 00 000 ",
+ " 3 00 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " ",
+ " ",
+ " "};
+
+static char **reflect_xpm[3] = { reflect_x16, reflect_x24, reflect_x32 };
+
diff --git a/app/bin/bitmaps/rotate.xpm b/app/bin/bitmaps/rotate.xpm index 00b6b5a..d41ca61 100644 --- a/app/bin/bitmaps/rotate.xpm +++ b/app/bin/bitmaps/rotate.xpm @@ -1,23 +1,148 @@ -/* XPM */ -static char * rotate_xpm[] = { -"16 16 4 1", -" c None", -". c #0000FFFFFFFF", -"X c #FFFF00000000", -"o c #000000000000", -" . .XX ", -"....... XX ", -" . . XX ", -" . . X X", -"....... o X X", -" . . XX", -" . . o XXXX", -"....... ", -" . . o ", -" .o o o o o ", -".ooooooooooooooo", -" .o o o o o ", -" .oo o o o o ", -"..o..o. o o o ", -" ooooooooooooooo", -" o o o o o "}; +static char *rotate_x16[] = {
+ "16 16 24 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099CC",
+ "3 c #00CCCC",
+ "4 c #00CCFF",
+ "5 c #00FFFF",
+ "6 c #336699",
+ "7 c #3399CC",
+ "8 c #33CCCC",
+ "9 c #33CCFF",
+ "A c #6699CC",
+ "B c #66CCCC",
+ "C c #66CCFF",
+ "D c #996666",
+ "E c #999999",
+ "F c #99CCCC",
+ "G c #CC0000",
+ "H c #CC3333",
+ "I c #CC3366",
+ "J c #CC6666",
+ "K c #CC9999",
+ "L c #C0C0C0",
+ "M c #808080",
+ " 1 ",
+ "525435 ",
+ " 2437HG ",
+ "52543KGGG ",
+ " 1 11 GG ",
+ "52543 GG ",
+ " 2432 GGG ",
+ "52543 GG G ",
+ " 2432 G G ",
+ "52543BGG GGGG ",
+ " 298AH GGJ ",
+ "52BAJEEMEMEMEDE ",
+ " 2BIAEEMEMEMEME ",
+ " 2CB7FLLL L L L ",
+ " MMMMMMMMMMMMMM",
+ " LLLL L L L L "};
+
+static char *rotate_x24[] = {
+ "24 24 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099CC",
+ "3 c #00CCCC",
+ "4 c #00CCFF",
+ "5 c #00FFFF",
+ "6 c #33CCFF",
+ "7 c #33FFFF",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #66FFFF",
+ "B c #996699",
+ "C c #999999",
+ "D c #CC0000",
+ "E c #CC3333",
+ "F c #CC9999",
+ "G c #C0C0C0",
+ "H c #808080",
+ " ",
+ " 1 1 ",
+ " 5155525 ",
+ " 1 1 ",
+ " 1 32FDDDDD ",
+ " 5155525 DDD ",
+ " 1 1 DD ",
+ " 1 32 DD ",
+ " 5155525 DDDD ",
+ " 1 1 DD D ",
+ " 5155425 D ",
+ " 5155425 DD DD ",
+ " 1 1 DD ",
+ " 5155525 DD D DD ",
+ " 1 32 DD DD DDD ",
+ " 1 1 D DDD ",
+ " 515752FD G G G FEDG ",
+ " 18CCBCHHCHHCHCCHCHHCH ",
+ " 1HCEBCHHCHHCHCCHCHHCH ",
+ " 515562A G GG GG GG G ",
+ " 1 G91G G GG GG GG G ",
+ " HHHHHHHHHHHHHHHHHHHH ",
+ " CH C HC CC CC CC CC ",
+ " "};
+
+static char *rotate_x32[] = {
+ "32 32 22 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #0099CC",
+ "3 c #00CCCC",
+ "4 c #00CCFF",
+ "5 c #00FFFF",
+ "6 c #3399CC",
+ "7 c #33FFFF",
+ "8 c #66CCCC",
+ "9 c #66FFFF",
+ "A c #996666",
+ "B c #996699",
+ "C c #999999",
+ "D c #99CCCC",
+ "E c #CC0000",
+ "F c #CC3333",
+ "G c #CC3366",
+ "H c #CC6666",
+ "I c #CC9999",
+ "J c #C0C0C0",
+ "K c #808080",
+ " ",
+ " 1 1 ",
+ " 32 32 ",
+ " 552555525 ",
+ " 1 1 ",
+ " 1 1 EEEEEE ",
+ " 542555425FEEEEEEE ",
+ " 542555425 EEEEE ",
+ " 1 1 EEEE ",
+ " 1 1 EEE ",
+ " 552555525 EEE ",
+ " 32 32 EEEEE ",
+ " 1 1 EEE EEE ",
+ " 1 1 E EE ",
+ " 552555525 EE EEE ",
+ " 1 1 EEE EE ",
+ " 1 1 E EEE ",
+ " 1 1 EE EE E ",
+ " 552555525 EEE EE EE EEE ",
+ " 1 1 E EEEEEEEE ",
+ " 1 1 EE EEEEEE ",
+ " 32 732CEE EEEE ",
+ " 552577567C J J J JIE JJ ",
+ " 1KKCAGCCKKCKKKCKKKCKKKCKKCKK ",
+ " 1KKHEBCCKKCKKKCKKKCKKKCKKCK ",
+ " 542598C29D J J J JJ JJ ",
+ " 542599429D J J J JJ JJ ",
+ " 1 JJ 1JJ J J J JJ JJ ",
+ " KKKKKKKKKKKKKKKKKKKKKKKKKKK ",
+ " CC CC CC C KC CC CC ",
+ " J JJ J J J JJ JJ ",
+ " "};
+
+static char **rotate_xpm[3] = { rotate_x16, rotate_x24, rotate_x32 };
+
diff --git a/app/bin/bitmaps/ruler.xpm b/app/bin/bitmaps/ruler.xpm index 55d4842..11dbde8 100644 --- a/app/bin/bitmaps/ruler.xpm +++ b/app/bin/bitmaps/ruler.xpm @@ -1,21 +1,89 @@ -/* XPM */ -static char * ruler_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" .. ", -" . ", -" . ", -" . . ", -" . ... ", -" . ", -". ", -". ", -" .. ", -" .. . . ", -" .. . ", -" .. . ", -" .. . ", -" .. ", -" .. ", -" ."}; +static char *ruler_x16[] = {
+ "16 16 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " 0 ",
+ " 00 ",
+ " 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 00 ",
+ " 0 00 0 00",
+ " 0 00 00 0 0 ",
+ " 0000 00 0 0 ",
+ " 000000 00 00 ",
+ " 000000 00 ",
+ " 0000 ",
+ " ",
+ " "};
+
+static char *ruler_x24[] = {
+ "24 24 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " ",
+ " 0 ",
+ " 000 ",
+ " 000 ",
+ " 0 ",
+ " 0 ",
+ " 0 0 ",
+ " 0 0 ",
+ " 00 ",
+ " 00 ",
+ " 0 0 0 ",
+ " 0 0 0 0 ",
+ " 00 00 00 00 00 ",
+ " 000 00 00 00 0 ",
+ " 00000 0 0 0 ",
+ " 00000 0 00 ",
+ " 0000000 00 ",
+ " 0000000 ",
+ " 000 ",
+ " ",
+ " ",
+ " "};
+
+static char *ruler_x32[] = {
+ "32 32 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 000 ",
+ " 00000 ",
+ " 00000 ",
+ " 000 ",
+ " 000 ",
+ " 00 000 ",
+ " 00 000 ",
+ " 000 000 ",
+ " 00 ",
+ " 00 ",
+ " 00 0 ",
+ " 000 0 ",
+ " 00 00 0 00 ",
+ " 00 0 0 000 ",
+ " 000 0 00 0 00 ",
+ " 0000 00 00 0 00 ",
+ " 00000000 0 00 00 ",
+ " 00000000 0 00 000 ",
+ " 00000000 0 00 ",
+ " 000000000 00 ",
+ " 00000000 000 ",
+ " 00000000 ",
+ " 000 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **ruler_xpm[3] = { ruler_x16, ruler_x24, ruler_x32 };
+
diff --git a/app/bin/bitmaps/select.xpm b/app/bin/bitmaps/select.xpm index c630541..bd118c6 100644 --- a/app/bin/bitmaps/select.xpm +++ b/app/bin/bitmaps/select.xpm @@ -1,22 +1,106 @@ -/* XPM */ -static char * select_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" ", -" . . . . ", -"................", -" . . . . ", -" . . . ", -" . XX . ", -"... XXXXXX ..", -" . XXXXXXXX . ", -" XXXXXXXX ", -" XXXXXXX ", -" XXXXXX ", -" XXXXXX ", -" XXX XXX ", -" XX XXX ", -" XXX ", -" X "}; +static char *select_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #CC0000",
+ "3 c #CC6600",
+ "4 c #FF9999",
+ " ",
+ " ",
+ " ",
+ " 3 3 3 3 3 3 3 ",
+ "000000000000000 ",
+ " 3 3 3 3 3 ",
+ " 3 3 3 3 3 ",
+ "010000 222 0000 ",
+ " 3 3 3 224 3 3 ",
+ " 2424 ",
+ " 424 ",
+ " 424 ",
+ " 424 ",
+ " 4 ",
+ " ",
+ " "};
+
+static char *select_x24[] = {
+ "24 24 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #663300",
+ "3 c #996600",
+ "4 c #CC0000",
+ "5 c #CC3300",
+ "6 c #CC6600",
+ "7 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 7 7 7 7 ",
+ " 33 26 62 33 26 62 33 ",
+ "022012002102201200210220",
+ " 77 7 7 77 7 7 77 ",
+ " 77 7 7 56 56 7 77 ",
+ " 77 7 7 4444444 7 77 ",
+ "022012002144444440210220",
+ " 33 26 6344444 62 33 ",
+ " 7 7 44 444 7 ",
+ " 44 444 ",
+ " 44 444 ",
+ " 4 444 ",
+ " 444 ",
+ " 444 ",
+ " 44 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *select_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #663300",
+ "3 c #996600",
+ "4 c #CC0000",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 6 66 6 66 6 66 6 ",
+ " 031002300030003300332003200130 ",
+ " 000000000000000000000000000000 ",
+ " 52 35 5 55 353 53 25 ",
+ " 6 66 6 66 666 66 6 ",
+ " 6 66 6 44444444 66 6 ",
+ " 6 66 6 4444444444 66 6 ",
+ " 031002300030444444444403200130 ",
+ " 000000000000444444 00000000 ",
+ " 6 66 6 4444444 53 25 ",
+ " 6 6 6 444 4444 6 6 ",
+ " 444 4444 ",
+ " 444 4444 ",
+ " 44 4444 ",
+ " 4 4444 ",
+ " 4444 ",
+ " 4444 ",
+ " 4444 ",
+ " 444 ",
+ " 4 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **select_xpm[3] = { select_x16, select_x24, select_x32 };
+
diff --git a/app/bin/bitmaps/sensor.xpm b/app/bin/bitmaps/sensor.xpm index 6ed65a3..207f4c4 100644 --- a/app/bin/bitmaps/sensor.xpm +++ b/app/bin/bitmaps/sensor.xpm @@ -1,22 +1,138 @@ -/* XPM */
-static char * sensor_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #00FFFF",
-"+ c #FFFFFF",
-" ",
-" ",
-" ..... ",
-" +.......+ ",
-" +++.....+++ ",
-" .+++...+++. ",
-" ...+++.+++... ",
-" ....+++++.... ",
-" .....+++..... ",
-" ....+++++.... ",
-" ...+++.+++... ",
-" .+++...+++. ",
-" +++.....+++ ",
-" +.......+ ",
-" ..... ",
-" "};
+static char *sensor_x16[] = {
+ "16 16 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CCCC",
+ "2 c #336666",
+ "3 c #339966",
+ "4 c #339999",
+ "5 c #33CC99",
+ "6 c #33CCCC",
+ "7 c #666666",
+ "8 c #669966",
+ "9 c #669999",
+ "A c #66CCCC",
+ "B c #999999",
+ "C c #99CCCC",
+ "D c #CCCCCC",
+ "E c #CCFFCC",
+ "F c #CCFFFF",
+ "G c #FFFFFF",
+ " 77 ",
+ " 27444478 ",
+ " 941111114B ",
+ " 9GA111111AG9 ",
+ " 34AGA1111AGA43 ",
+ " 311AGA116GA114 ",
+ "74111AGA6GC11147",
+ "741111AGFC111143",
+ "7411111FGA111153",
+ "741111FCAGA11147",
+ " 3111EE11AGA1147",
+ " 341DF1111AGA53 ",
+ " 3CF111111AG9 ",
+ " 2D51111115BB ",
+ " 34455443 ",
+ " 773377 "};
+
+static char *sensor_x24[] = {
+ "24 24 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CCCC",
+ "2 c #336666",
+ "3 c #339966",
+ "4 c #339999",
+ "5 c #33CC99",
+ "6 c #33CCCC",
+ "7 c #666666",
+ "8 c #669999",
+ "9 c #66CCCC",
+ "A c #999999",
+ "B c #99CCCC",
+ "C c #CCCCCC",
+ "D c #CCFFCC",
+ "E c #CCFFFF",
+ "F c #FFFFFF",
+ " ",
+ " 72777727 ",
+ " 734511115432 ",
+ " 34111111111143 ",
+ " 8D111111111111BC ",
+ " 3BFE11111111119F63 ",
+ " 241BFE111111119F6143 ",
+ " 3111BFE1111119F91114 ",
+ " 741111BFE11116F9111153 ",
+ " 7111111BFE116F91111112 ",
+ " 71111111DFE6EB11111114 ",
+ " 311111111DFFB1111111147",
+ " 3111111111FFD1111111147",
+ " 311111111EBDFD111111147",
+ " 71111111DD11DFD1111113 ",
+ " 2411111DD1111DFD111152 ",
+ " 741111BE111111DFD11147 ",
+ " 3411BE11111111DFD153 ",
+ " 31BE6111111111DFD3 ",
+ " 7AE611111111111DC2 ",
+ " 8841111111111532 ",
+ " 345111111543 ",
+ " 7234444327 ",
+ " 77 "};
+
+static char *sensor_x32[] = {
+ "32 32 20 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CCCC",
+ "2 c #336666",
+ "3 c #339966",
+ "4 c #339999",
+ "5 c #33CC99",
+ "6 c #33CCCC",
+ "7 c #666666",
+ "8 c #669999",
+ "9 c #66CC99",
+ "A c #66CCCC",
+ "B c #999999",
+ "C c #99CC99",
+ "D c #99CCCC",
+ "E c #CCCCCC",
+ "F c #CCFFCC",
+ "G c #CCFFFF",
+ "H c #FFFFFF",
+ "I c #C0C0C0",
+ " ",
+ " 7777777777 ",
+ " 77777344477777 ",
+ " 777744111111543777 ",
+ " 77741111111111114377 ",
+ " 7B81111111111111111CB7 ",
+ " 77GHA11111111111111AHHB7 ",
+ " 774GHHA111111111111AHHG477 ",
+ " 7711GHHA1111111111AHHG11477 ",
+ " 774111GHHA111111116HHG111577 ",
+ " 7311111GHHA1111116HHG61111477 ",
+ " 774111111GHHA11116GHH611111577 ",
+ " 7751111116GHHA111GHH6111111177 ",
+ " 77111111116GHH61GHHA1111111147 ",
+ " 741111111116GHHGHHA11111111147 ",
+ " 7411111111116GHHHA1111111111477",
+ " 7411111111111DHHH61111111111477",
+ " 741111111111DHHHHH6111111111477",
+ " 73111111111DHHD6GHH61111111147 ",
+ " 7711111111DHHD116GHH6111111137 ",
+ " 774111111AHHE11116GHH611111577 ",
+ " 7411111AHHF1111116HHH61111477 ",
+ " 774111AHHG111111116HHG611177 ",
+ " 774116HHG11111111116HHG61477 ",
+ " 7746HHG6111111111116HHG577 ",
+ " 77GHG611111111111116HHB77 ",
+ " 7BG61111111111111119I77 ",
+ " 7774511111111111114777 ",
+ " 7774511111111547777 ",
+ " 7777344444437777 ",
+ " 777777777777 ",
+ " 7777 "};
+
+static char **sensor_xpm[3] = { sensor_x16, sensor_x24, sensor_x32 };
+
diff --git a/app/bin/bitmaps/signal.xpm b/app/bin/bitmaps/signal.xpm index 521adad..66f55c7 100644 --- a/app/bin/bitmaps/signal.xpm +++ b/app/bin/bitmaps/signal.xpm @@ -1,25 +1,106 @@ -/* XPM */ -static char * signal_xpm[] = { -"16 16 6 1", -" c None", -". c #000000", -"+ c #3A000B", -"@ c #C90328", -"# c #D9032B", -"$ c #F30431", -" .. ", -" .... ", -" .+$@+. ", -" .#$$#. ", -" .+$@+. ", -" .... ", -" .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" ............ ", -" ............ "}; +static char *signal_x16[] = {
+ "16 16 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #CC0033",
+ "4 c #FF0033",
+ "5 c #800000",
+ " 00 ",
+ " 23321 ",
+ " 144441 ",
+ " 144445 ",
+ " 144441 ",
+ " 23321 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 0000000000 "};
+
+static char *signal_x24[] = {
+ "24 24 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #990033",
+ "4 c #CC0033",
+ "5 c #FF0033",
+ "6 c #800000",
+ " ",
+ " 11110 ",
+ " 12555562 ",
+ " 15555552 ",
+ " 0655555541 ",
+ " 0355555541 ",
+ " 155555560 ",
+ " 13555541 ",
+ " 123321 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00000000000000 ",
+ " 00000000000000 "};
+
+static char *signal_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #990033",
+ "4 c #CC0033",
+ "5 c #FF0033",
+ "6 c #800000",
+ " ",
+ " 000000 ",
+ " 0001662000 ",
+ " 00355554100 ",
+ " 003555555400 ",
+ " 015555555560 ",
+ " 0655555555400 ",
+ " 0655555555300 ",
+ " 005555555520 ",
+ " 006555555300 ",
+ " 0064554600 ",
+ " 00000000 ",
+ " 000000 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 000000000000000000 ",
+ " 000000000000000000 ",
+ " 000000000000000000 "};
+
+static char **signal_xpm[3] = { signal_x16, signal_x24, signal_x32 };
+
diff --git a/app/bin/bitmaps/snap-curs.xpm b/app/bin/bitmaps/snap-curs.xpm new file mode 100644 index 0000000..08b93d0 --- /dev/null +++ b/app/bin/bitmaps/snap-curs.xpm @@ -0,0 +1,102 @@ +static char *snap_curs_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ "2 c #808080",
+ " 1 1 1 1 ",
+ "1 1 1 1 1 1 1 1 ",
+ " 10000 1 1 ",
+ " 002 ",
+ " 0202 1 1 ",
+ "1 0 202 1 1 1 1 ",
+ " 1 202 1 1 ",
+ " 202 ",
+ " 1 1 201 1 ",
+ "1 1 1 1 1 1 1 1 ",
+ " 1 1 1 1 ",
+ " ",
+ " 1 1 1 1 ",
+ "1 1 1 1 1 1 1 1 ",
+ " 1 1 1 1 ",
+ " "};
+
+static char *snap_curs_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ "2 c #330033",
+ "3 c #808080",
+ " ",
+ " ",
+ " ",
+ " 11 11 11 11 ",
+ " 1 1 1 1 1 1 1 1 ",
+ " 1 1 1 1 1 1 1 1 ",
+ " 11222222 11 11 ",
+ " 022223 ",
+ " 22223 ",
+ " 02223 ",
+ " 11023303 11 11 ",
+ " 1 031 3031 1 1 1 ",
+ " 1 1 303 1 1 1 ",
+ " 11 11 3031 11 ",
+ " 303 ",
+ " 30 ",
+ " ",
+ " 11 11 11 11 ",
+ " 1 1 1 1 1 1 1 1 ",
+ " 1 1 1 1 1 1 1 1 ",
+ " 11 11 11 11 ",
+ " ",
+ " ",
+ " "};
+
+static char *snap_curs_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #006600",
+ "2 c #009900",
+ "3 c #00CC00",
+ "4 c #330000",
+ "5 c #330033",
+ "6 c #333300",
+ "7 c #333333",
+ "8 c #008000",
+ " ",
+ " 333 33 333 ",
+ " 33333 333333 33333 ",
+ " 33 33 3 3 33 3 ",
+ " 3 4413 33 33 33 3 ",
+ " 3 5555555555554 33 33 3 ",
+ " 33 455555555555 3 3 3 ",
+ " 33355555555583333 33333 ",
+ " 3555555555 ",
+ " 55555555 ",
+ " 555555554 ",
+ " 5555555554 ",
+ " 45555455551 ",
+ " 33335554 555583 33333 ",
+ " 33 554 155563 3 33 ",
+ " 3 68 33555513 33 3 ",
+ " 3 83 33 55556 33 3 ",
+ " 3 33 3 45555 33 3 ",
+ " 33 33 333327555 33 33 ",
+ " 333 3333455554 333 ",
+ " 55554 ",
+ " 55554 ",
+ " 555 ",
+ " 54 ",
+ " 3333 3333 3333 ",
+ " 33 3 33 33 33 33 ",
+ " 3 3 3 33 33 3 ",
+ " 3 3 33 33 33 3 ",
+ " 3 3 3 33 33 3 ",
+ " 3 3 33 33 33 33 ",
+ " 333 3333 3333 ",
+ " "};
+
+static char **snap_curs_xpm[3] = { snap_curs_x16, snap_curs_x24, snap_curs_x32 };
+
diff --git a/app/bin/bitmaps/snap-grid.xpm b/app/bin/bitmaps/snap-grid.xpm new file mode 100644 index 0000000..1139051 --- /dev/null +++ b/app/bin/bitmaps/snap-grid.xpm @@ -0,0 +1,92 @@ +static char *snap_grid_x16[] = {
+ "16 16 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ " ",
+ " 1111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1111111111111 ",
+ " ",
+ " "};
+
+static char *snap_grid_x24[] = {
+ "24 24 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ " ",
+ " 111111111111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 111111111111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 111111111111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 111111111111111111111 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 1 1 1 1 1 ",
+ " 111111111111111111111 ",
+ " ",
+ " "};
+
+static char *snap_grid_x32[] = {
+ "32 32 3 1",
+ " c None",
+ "0 c #000000",
+ "1 c #00CC00",
+ " ",
+ " 1111111111111111111111111111111",
+ " 11 11 11 11 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 111111111111111111111111111111 ",
+ " 111111111111111111111111111111 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 11 11 11 11 1 ",
+ " 111111111111111111111111111111 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 11 11 11 11 1 ",
+ " 111111111111111111111111111111 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1 11 11 1 1 ",
+ " 1111111111111111111111111111111",
+ " "};
+
+static char **snap_grid_xpm[3] = { snap_grid_x16, snap_grid_x24, snap_grid_x32 };
+
diff --git a/app/bin/bitmaps/snapcurs.xbm b/app/bin/bitmaps/snapcurs.xbm deleted file mode 100644 index 06db450..0000000 --- a/app/bin/bitmaps/snapcurs.xbm +++ /dev/null @@ -1,7 +0,0 @@ -#define snapcurs_width 16 -#define snapcurs_height 16 -// static unsigned char snapcurs_bits[] = { -static char snapcurs_bits[] = { - 0x00, 0x00, 0x44, 0x44, 0xaa, 0xaa, 0xfc, 0x40, 0xf8, 0x07, 0xfc, 0x47, - 0xfa, 0xab, 0xfc, 0x45, 0xf0, 0x03, 0x74, 0x47, 0xb2, 0xae, 0x44, 0x5c, - 0x00, 0x08, 0x44, 0x44, 0xaa, 0xaa, 0x44, 0x44}; diff --git a/app/bin/bitmaps/snapvis.xbm b/app/bin/bitmaps/snapvis.xbm deleted file mode 100644 index cab6ee5..0000000 --- a/app/bin/bitmaps/snapvis.xbm +++ /dev/null @@ -1,7 +0,0 @@ -#define snapvis_width 16 -#define snapvis_height 16 -// static unsigned char snapvis_bits[] = { -static char snapvis_bits[] = { - 0x44, 0x44, 0x44, 0x44, 0xff, 0xff, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0xff, 0xff, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0xff, 0xff, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0xff, 0xff, 0x44, 0x44}; diff --git a/app/bin/bitmaps/split-draw.xpm b/app/bin/bitmaps/split-draw.xpm new file mode 100644 index 0000000..3e94832 --- /dev/null +++ b/app/bin/bitmaps/split-draw.xpm @@ -0,0 +1,95 @@ +static char *split_draw_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #808080",
+ " ",
+ " 2 ",
+ " 2 ",
+ " 2 ",
+ " 1 2 ",
+ " 11 2 ",
+ " 11 2 ",
+ " 111122 ",
+ " 2 111 ",
+ " 221111 ",
+ " 22 11 ",
+ " 22 11 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " "};
+
+static char *split_draw_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #808080",
+ " ",
+ " 2 ",
+ " 22 ",
+ " 22 ",
+ " 2 ",
+ " 2 ",
+ " 11 2 ",
+ " 11 2 ",
+ " 11 2 ",
+ " 11 2 ",
+ " 111111 2 ",
+ " 11111 ",
+ " 11 ",
+ " 2 111111 ",
+ " 22 11 ",
+ " 22 1 ",
+ " 22 1 ",
+ " 22 1 ",
+ " 22 1 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 2 ",
+ " "};
+
+static char *split_draw_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #808080",
+ " ",
+ " ",
+ " 2 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 11 222 ",
+ " 11 222 ",
+ " 11 222 ",
+ " 11 222 ",
+ " 11 222 ",
+ " 11111 222 ",
+ " 11111111 22 ",
+ " 1111111 ",
+ " ",
+ " 22 11111111 ",
+ " 222 11111111 ",
+ " 222 11 ",
+ " 222 11 ",
+ " 22 11 ",
+ " 222 11 ",
+ " 222 11 ",
+ " 222 11 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 22 ",
+ " ",
+ " "};
+
+static char **split_draw_xpm[3] = { split_draw_x16, split_draw_x24, split_draw_x32 };
+
diff --git a/app/bin/bitmaps/split.xpm b/app/bin/bitmaps/split.xpm new file mode 100644 index 0000000..1e0386a --- /dev/null +++ b/app/bin/bitmaps/split.xpm @@ -0,0 +1,107 @@ +static char *split_x16[] = {
+ "16 16 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #996666",
+ "3 c #999999",
+ "4 c #CC0000",
+ "5 c #CC3333",
+ "6 c #CC6666",
+ "7 c #C0C0C0",
+ "8 c #808080",
+ " ",
+ " 781 ",
+ " 71371 ",
+ " 4 83 88 ",
+ " 4 887317 ",
+ " 47887887 ",
+ " 444418718 ",
+ " 562 38 ",
+ " 38 17 ",
+ " 7317314444 ",
+ " 7887 834 ",
+ " 88 38 74 ",
+ " 38 313 4 ",
+ " 13313 ",
+ " 83 ",
+ " 7 "};
+
+static char *split_x24[] = {
+ "24 24 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CC0000",
+ "4 c #C0C0C0",
+ "5 c #808080",
+ " ",
+ " 4 1 ",
+ " 251 ",
+ " 4 124 ",
+ " 3 451 4211 ",
+ " 33 4 124 52 ",
+ " 33 451 44114 ",
+ " 334 154 55 ",
+ " 33451 44114 ",
+ " 333333154 52 ",
+ " 3333333 441144 ",
+ " 4 55 ",
+ " 421 144 ",
+ " 12 333 ",
+ " 21 44513333333 ",
+ " 12 55 33 ",
+ " 21 451 433 ",
+ " 12 55 33 ",
+ " 21 421 4 33 ",
+ " 12 52 3 ",
+ " 1 421 4 ",
+ " 52 ",
+ " 1 4 ",
+ " "};
+
+static char *split_x32[] = {
+ "32 32 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #999999",
+ "3 c #CC0000",
+ "4 c #C0C0C0",
+ "5 c #808080",
+ " ",
+ " ",
+ " 44 1 ",
+ " 25 ",
+ " 124 ",
+ " 4411 44 1 ",
+ " 33 55 421 ",
+ " 33 4 1144 52 ",
+ " 33 451 44 1 44 ",
+ " 33 15 25 ",
+ " 33 4 11 44 124 ",
+ " 33 421 421 4 ",
+ " 33333333 114 52 ",
+ " 33333333 1 4 1 44 ",
+ " 33333 411 ",
+ " 4 12 ",
+ " 421 11 4 ",
+ " 52 ",
+ " 4 1 44 333333333 ",
+ " 21 4411 33333333 ",
+ " 124 25 333 ",
+ " 4 11 44 1124 33 ",
+ " 55 421 33 ",
+ " 4 154 152 33 ",
+ " 4411 4 1 4 33 ",
+ " 55 21 33 ",
+ " 11 4 12 ",
+ " 4 1 4 ",
+ " 25 ",
+ " 1 4 ",
+ " 1 ",
+ " "};
+
+static char **split_xpm[3] = { split_x16, split_x24, split_x32 };
+
diff --git a/app/bin/bitmaps/splittrk.xpm b/app/bin/bitmaps/splittrk.xpm deleted file mode 100644 index 3a03c77..0000000 --- a/app/bin/bitmaps/splittrk.xpm +++ /dev/null @@ -1,22 +0,0 @@ -/* XPM */ -static char * splittrk_xpm[] = { -"16 16 3 1", -" c None", -". c #000000000000", -"X c #FFFF00000000", -" . . ", -" . ", -" X . . .", -" X . . . ", -" X . . .", -" XXXX . . . ", -" . ", -" . . ", -" . . ", -" . ", -" . . . XXXX ", -". . . X ", -" . . . X ", -". . . X ", -" . ", -" . . "}; diff --git a/app/bin/bitmaps/sticky-doc.xpm b/app/bin/bitmaps/sticky-doc.xpm new file mode 100644 index 0000000..7b0e4cb --- /dev/null +++ b/app/bin/bitmaps/sticky-doc.xpm @@ -0,0 +1,130 @@ +static char *sticky_doc_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #666699",
+ "3 c #669999",
+ "4 c #996633",
+ "5 c #999999",
+ "6 c #CC6633",
+ "7 c #CC9900",
+ "8 c #CC9933",
+ "9 c #CC9999",
+ "A c #CCCC66",
+ "B c #FFCC00",
+ "C c #FFCC33",
+ "D c #FFCC66",
+ " ",
+ " ",
+ "4888888888884 ",
+ "4BBBBBBCBBBB764 ",
+ "4BBD59B99BBB7774",
+ "4BC2D95C95CBBBB4",
+ "4BC2CBA5CA5CBBB4",
+ "4BBC5ABD5CD5CBB4",
+ "4BBBC59BCABC3CB4",
+ "4BBBBB95CBBB5DB4",
+ "4BBBBBBA2ABD2CB4",
+ "4BBBBBBBC513DBB4",
+ "4BBBBBBBBBBBBBB4",
+ "4777777777777774",
+ " 444444444444444",
+ " "};
+
+static char *sticky_doc_x24[] = {
+ "24 24 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #3366CC",
+ "3 c #666699",
+ "4 c #669999",
+ "5 c #996633",
+ "6 c #999999",
+ "7 c #CC6633",
+ "8 c #CC9900",
+ "9 c #CC9933",
+ "A c #CC9966",
+ "B c #CC9999",
+ "C c #CCCC66",
+ "D c #FFCC00",
+ "E c #FFCC33",
+ "F c #FFCC66",
+ " ",
+ " ",
+ " ",
+ "5555555555555555555 ",
+ "58DDDDDDDDDDDDDDDD85 ",
+ "58DDDDDDDDDDEDDDDD8875 ",
+ "58DDDC26ADD64EDDDD88885 ",
+ "58DDA13216EB13FDDDDDDD85",
+ "58DD32EE616EC22CDDDDDD95",
+ "58DD42CDDB13EF21ADDDDD95",
+ "58DDF21BDDA12FE316EDDD95",
+ "58DDDE316EDC22EE616EDD95",
+ "58DDDDE614EDFBDDE616DD95",
+ "58DDDDDDB12FDDDDDD61ED95",
+ "58DDDDDDDC21BDDDDD61ED95",
+ "58DDDDDDDDE316EDDF16DD95",
+ "58DDDDDDDDDE612BB21FDD95",
+ "58DDDDDDDDDDDC3112CDDD95",
+ "58DDDDDDDDDDDDDFFDDDDD95",
+ "58DDDDDDDDDDDDDDDDDDDD95",
+ "579999999999999999999955",
+ " 5555555555555555555555 ",
+ " ",
+ " "};
+
+static char *sticky_doc_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #3366CC",
+ "3 c #666699",
+ "4 c #996633",
+ "5 c #999999",
+ "6 c #CC6633",
+ "7 c #CC9900",
+ "8 c #CC9966",
+ "9 c #CC9999",
+ "A c #CCCC66",
+ "B c #FFCC00",
+ "C c #FFCC33",
+ "D c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 444444444444444444444444 ",
+ " 4BBBBBBBBBBBBBBBBBBBBB764 ",
+ " 4BBBBBBBBBBBBBBBBBBBBBB7744 ",
+ " 4BBBBBBBBBBBBBCCBBBBBBB77744 ",
+ " 4BBBBBA315DBBB53DBBBBBB777774 ",
+ " 4BBBB511112ABC212ABBBBB7777774 ",
+ " 4BBBA115A3119BC3118BBBBBBBBBB4 ",
+ " 4BBB915BBC5115CC5119BBBBBBBBB4 ",
+ " 4BBB812DBBB5115CC5115CBBBBBBB4 ",
+ " 4BBBC3118BBB8113CB9115CBBBBBB4 ",
+ " 4BBBBC3119CBBA212DBA213DBBBBB4 ",
+ " 4BBBBBC5115CBBD313CBD212ABBBB4 ",
+ " 4BBBBBBB9113DBBC5DBBBC311CBBB4 ",
+ " 4BBBBBBBBA2128BBBBBBBBC319BBB4 ",
+ " 4BBBBBBBBBC3115CBBBBBBB915BBB4 ",
+ " 4BBBBBBBBBBC5115CBBBBBB915BBB4 ",
+ " 4BBBBBBBBBBBB9113DBBBBC219BBB4 ",
+ " 4BBBBBBBBBBBBBA2115CBA313CBBB4 ",
+ " 4BBBBBBBBBBBBBBC51111112DBBBB4 ",
+ " 4BBBBBBBBBBBBBBBBA31115CBBBBB4 ",
+ " 4BBBBBBBBBBBBBBBBBCDDCBBBBBBB4 ",
+ " 4BBBBBBBBBBBBBBBBBBBBBBBBBBBB4 ",
+ " 4BBBBBBBBBBBBBBBBBBBBBBBBBBBB4 ",
+ " 444444444444444444444444444444 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **sticky_doc_xpm[3] = { sticky_doc_x16, sticky_doc_x24, sticky_doc_x32 };
+
diff --git a/app/bin/bitmaps/sticky-link.xpm b/app/bin/bitmaps/sticky-link.xpm new file mode 100644 index 0000000..b2a027b --- /dev/null +++ b/app/bin/bitmaps/sticky-link.xpm @@ -0,0 +1,138 @@ +static char *sticky_link_x16[] = {
+ "16 16 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #3366CC",
+ "2 c #666699",
+ "3 c #6666CC",
+ "4 c #669999",
+ "5 c #996600",
+ "6 c #996633",
+ "7 c #999999",
+ "8 c #CC6633",
+ "9 c #CC9900",
+ "A c #CC9933",
+ "B c #CC9966",
+ "C c #CC9999",
+ "D c #CCCC66",
+ "E c #FFCC00",
+ "F c #FFCC33",
+ "G c #FFCC66",
+ " ",
+ " ",
+ "68AAAAAAAAAA6 ",
+ "6EEEEEEEEEEE986 ",
+ "6EEEEEEEEEEE9996",
+ "6EEGCGEEEEFCGEE6",
+ "6ED7C4CEED2C7BE6",
+ "6E4GEEB777FEF1F6",
+ "6E1FEEF22GEEE3F6",
+ "6E77GC4FF77GB7E6",
+ "6EEC7BFEEEB77FE6",
+ "6EEEEEEEEEEEEEE6",
+ "6EEEEEEEEEEEEEE6",
+ "6A99999999999996",
+ " 666666666666666",
+ " "};
+
+static char *sticky_link_x24[] = {
+ "24 24 19 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #3366CC",
+ "3 c #666699",
+ "4 c #6666CC",
+ "5 c #669999",
+ "6 c #996600",
+ "7 c #996633",
+ "8 c #999999",
+ "9 c #CC6633",
+ "A c #CC9900",
+ "B c #CC9933",
+ "C c #CC9966",
+ "D c #CC9999",
+ "E c #CCCC66",
+ "F c #FFCC00",
+ "G c #FFCC33",
+ "H c #FFCC66",
+ " ",
+ " ",
+ " ",
+ "7777777777777777777 ",
+ "7BFFFFFFFFFFFFFFFFA7 ",
+ "7BFFFFFFFFFFFFFFFFAA97 ",
+ "7BFFFFFFFFFFFFFFFFAAAA7 ",
+ "7BFFFFFFFFFFFFFFFFFFFFA7",
+ "7BFFH888EFFFFFFG888HFFA7",
+ "7BFG228418GFFGD12822HFA7",
+ "7BFD2GFFC22HG818GFG38FA7",
+ "7BF88FFFFG3142EFFFFD2GA7",
+ "7BF3DFFFFFD118GFFFFE1GA7",
+ "7BF83FFFG818D13HFFF85FA7",
+ "7BFE18D822CFFE218D81DFA7",
+ "7BFFD1118HFFFFGD2118GFA7",
+ "7BFFFGHFFFFFFFFFFGGFFFA7",
+ "7BFFFFFFFFFFFFFFFFFFFFA7",
+ "7BFFFFFFFFFFFFFFFFFFFFA7",
+ "7BFFFFFFFFFFFFFFFFFFFFA7",
+ "77BBBBBBBBBBBBBBBBBBBB97",
+ " 7777777777777777777777 ",
+ " ",
+ " "};
+
+static char *sticky_link_x32[] = {
+ "32 32 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #3366CC",
+ "3 c #666699",
+ "4 c #6666CC",
+ "5 c #669999",
+ "6 c #996600",
+ "7 c #996633",
+ "8 c #999999",
+ "9 c #CC9900",
+ "A c #CC9933",
+ "B c #CC9966",
+ "C c #CC9999",
+ "D c #CCCC66",
+ "E c #FFCC00",
+ "F c #FFCC33",
+ "G c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 777777777777777777777777 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEA7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEE9977 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEE99977 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEE999997 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEE9999997 ",
+ " 7EEEEEFFEEEEEEEEEEEEEEFFEEEEE7 ",
+ " 7EEEF82115DFEEEEEEEG81118FEEE7 ",
+ " 7EEF81111113FEEEEF81111115FEE7 ",
+ " 7EED12DEFB412BEEG3118GEG51CEE7 ",
+ " 7EE81DEEEEF811CD213GEEEEG12EE7 ",
+ " 7EE42EEEEEEEC11118FEEEEEE81FE7 ",
+ " 7EE22EEEEEEEF8112FEEEEEEE81GE7 ",
+ " 7EE51FEEEEEG312312DEEEEEE31FE7 ",
+ " 7EEC18EEEF8113GF8118FEEEB18EE7 ",
+ " 7EEF21488111CFEEEC21188811DEE7 ",
+ " 7EEEG411118GEEEEEEF811111BEEE7 ",
+ " 7EEEEFDCDFEEEEEEEEEEFCCCFEEEE7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ",
+ " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ",
+ " 777777777777777777777777777777 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **sticky_link_xpm[3] = { sticky_link_x16, sticky_link_x24, sticky_link_x32 };
+
diff --git a/app/bin/bitmaps/sticky-note-chain.xpm b/app/bin/bitmaps/sticky-note-chain.xpm deleted file mode 100644 index aa9445a..0000000 --- a/app/bin/bitmaps/sticky-note-chain.xpm +++ /dev/null @@ -1,84 +0,0 @@ -/* XPM */
-static char * sticky_note_chain_bits[] = {
-"16 16 65 1",
-" c None",
-". c #CCB301",
-"+ c #CAB101",
-"@ c #FBEF9C",
-"# c #F9EB8F",
-"$ c #F8EA8D",
-"% c #F8E98A",
-"& c #F6E785",
-"* c #F3E37C",
-"= c #F0E074",
-"- c #EEDD6F",
-"; c #D5C44D",
-"> c #C8AF01",
-", c #FBED95",
-"' c #F7E67E",
-") c #F6E57C",
-"! c #F5E47B",
-"~ c #F4E379",
-"{ c #F1E075",
-"] c #ECDB70",
-"^ c #E8D76A",
-"/ c #E6D567",
-"( c #CDBC45",
-"_ c #FFF6BB",
-": c #C6AD01",
-"< c #FCEB84",
-"[ c #B7A73A",
-"} c #BFAE37",
-"| c #AC9401",
-"1 c #C3AA01",
-"2 c #FBED97",
-"3 c #EEDD7B",
-"4 c #9D96F6",
-"5 c #E1D26F",
-"6 c #C0A701",
-"7 c #006E6E",
-"8 c #00FFFF",
-"9 c #BCA401",
-"0 c #AFA358",
-"a c #ADA054",
-"b c #B9A101",
-"c c #B59E01",
-"d c #FEF19E",
-"e c #EDDD7C",
-"f c #E5D575",
-"g c #E5D571",
-"h c #B29A01",
-"i c #FFF2A1",
-"j c #FEED87",
-"k c #FDEC86",
-"l c #FDEC85",
-"m c #FBEA82",
-"n c #FAE981",
-"o c #F8E77F",
-"p c #A89100",
-"q c #FFF4AF",
-"r c #FFF1A0",
-"s c #FDF09C",
-"t c #FDEF9B",
-"u c #FCEE99",
-"v c #FAEC92",
-"w c #F9EA90",
-"x c #FAEC96",
-"y c #9D8600",
-"z c #9C8500",
-" ",
-" ",
-" ........... ",
-" +@#$%&*=--;+ ",
-" >,')!~{]^/(_> ",
-" :<<<<<<<<<[}}| ",
-" 1234445444''-1 ",
-" 647887478874-6 ",
-" 94800878a084=9 ",
-" b47887478874*b ",
-" cde444f444g{&c ",
-" hijkl<mno')!%h ",
-" pqirdstu2,vwxp ",
-" yzzzzzzzzzzzzy ",
-" ",
-" "};
diff --git a/app/bin/bitmaps/sticky-note-clip.xpm b/app/bin/bitmaps/sticky-note-clip.xpm deleted file mode 100644 index c74c64d..0000000 --- a/app/bin/bitmaps/sticky-note-clip.xpm +++ /dev/null @@ -1,99 +0,0 @@ -/* XPM */
-static char * sticky_note_clip_bits[] = {
-"16 16 80 1",
-" c None",
-". c #CCB301",
-"+ c #CAB101",
-"@ c #FBEF9C",
-"# c #F9EB8F",
-"$ c #F8EA8D",
-"% c #F8E98A",
-"& c #F7E992",
-"* c #EDE1A3",
-"= c #555753",
-"- c #DFCF67",
-"; c #D5C44D",
-"> c #C8AF01",
-", c #FBED95",
-"' c #F7E67E",
-") c #F6E57C",
-"! c #F6E68A",
-"~ c #ECE0A0",
-"{ c #BABDB6",
-"] c #EFE3A7",
-"^ c #CDBC45",
-"/ c #FFF6BB",
-"( c #C6AD01",
-"_ c #FBED97",
-": c #F8E77F",
-"< c #F8E88D",
-"[ c #EDE0A0",
-"} c #F5E68F",
-"| c #F0E39B",
-"1 c #888A85",
-"2 c #BFAE37",
-"3 c #AC9401",
-"4 c #C3AA01",
-"5 c #FCEE99",
-"6 c #F7E78B",
-"7 c #EBDE9C",
-"8 c #F8EBA2",
-"9 c #ECDB70",
-"0 c #E8D76A",
-"a c #E6D567",
-"b c #EEDD6F",
-"c c #C0A701",
-"d c #FDF0A5",
-"e c #DCD695",
-"f c #EAE29B",
-"g c #E8E098",
-"h c #DACB69",
-"i c #BCA401",
-"j c #FDF3B6",
-"k c #B9A101",
-"l c #FEF4B7",
-"m c #E0D986",
-"n c #F5E47B",
-"o c #F4E379",
-"p c #F1E075",
-"q c #F3E37C",
-"r c #B59E01",
-"s c #FFF3B4",
-"t c #DECF6F",
-"u c #F4E47D",
-"v c #F5E47C",
-"w c #F6E785",
-"x c #B29A01",
-"y c #FFF2A3",
-"z c #FBEDA4",
-"A c #F0E07C",
-"B c #F3E27C",
-"C c #F5E47D",
-"D c #A89100",
-"E c #FFF4AF",
-"F c #FFF2A1",
-"G c #FFF1A0",
-"H c #FEF19E",
-"I c #FDF09C",
-"J c #FDEF9B",
-"K c #FAEC92",
-"L c #F9EA90",
-"M c #FAEC96",
-"N c #9D8600",
-"O c #9C8500",
-" ",
-" ",
-" ........... ",
-" +@#$%&*==-;+ ",
-" >,')!~={]=^/> ",
-" (_:<[=}=|1{223 ",
-" 4567=8=8=90ab4 ",
-" cde=f=g=}h90bc ",
-" ij1818=8={)))i ",
-" kl=m=1f={nopqk ",
-" rs1t)8={uvnowr ",
-" xyz1=1{ABC)n%x ",
-" DEFGHIJ5_,KLMD ",
-" NOOOOOOOOOOOON ",
-" ",
-" "};
diff --git a/app/bin/bitmaps/sticky-note-text.xpm b/app/bin/bitmaps/sticky-note-text.xpm deleted file mode 100644 index 119f39b..0000000 --- a/app/bin/bitmaps/sticky-note-text.xpm +++ /dev/null @@ -1,86 +0,0 @@ -/* XPM */
-static char * sticky_note_text_bits[] = {
-"16 16 67 1",
-" c None",
-". c #CCB301",
-"+ c #CAB101",
-"@ c #FBEF9C",
-"# c #F9EB8F",
-"$ c #F8EA8D",
-"% c #F8E98A",
-"& c #F6E785",
-"* c #F3E37C",
-"= c #F0E074",
-"- c #EEDD6F",
-"; c #D5C44D",
-"> c #C8AF01",
-", c #FBED95",
-"' c #F7E67E",
-") c #F6E57C",
-"! c #F5E47B",
-"~ c #F4E379",
-"{ c #F1E075",
-"] c #ECDB70",
-"^ c #E8D76A",
-"/ c #E6D567",
-"( c #CDBC45",
-"_ c #FFF6BB",
-": c #C6AD01",
-"< c #FBED97",
-"[ c #F8E77F",
-"} c #BFAE37",
-"| c #AC9401",
-"1 c #C3AA01",
-"2 c #FCEE99",
-"3 c #7E7E7E",
-"4 c #979797",
-"5 c #C0A701",
-"6 c #FDEF9B",
-"7 c #E5DC75",
-"8 c #E4DB73",
-"9 c #E4DA70",
-"0 c #E3D86D",
-"a c #E2D769",
-"b c #EBDC70",
-"c c #BCA401",
-"d c #FDF09D",
-"e c #B9A101",
-"f c #FEF19E",
-"g c #E5DD77",
-"h c #EDDF75",
-"i c #B59E01",
-"j c #FFF1A0",
-"k c #DED273",
-"l c #E1D078",
-"m c #B29A01",
-"n c #FFF2A1",
-"o c #FEED87",
-"p c #FDEC86",
-"q c #FDEC85",
-"r c #FCEB84",
-"s c #FBEA82",
-"t c #FAE981",
-"u c #A89100",
-"v c #FFF4AF",
-"w c #FDF09C",
-"x c #FAEC92",
-"y c #F9EA90",
-"z c #FAEC96",
-"A c #9D8600",
-"B c #9C8500",
-" ",
-" ",
-" ........... ",
-" +@#$%&*=--;+ ",
-" >,')!~{]^/(_> ",
-" :<[')!~{]^}}}| ",
-" 12334344{]^/-1 ",
-" 567890ab~{]^-5 ",
-" cd3334333443=c ",
-" efgg789h)!~{*e ",
-" ij3343kl')!~&i ",
-" mnopqrst[')!%m ",
-" uvnjfw62<,xyzu ",
-" ABBBBBBBBBBBBA ",
-" ",
-" "};
diff --git a/app/bin/bitmaps/sticky-note.xpm b/app/bin/bitmaps/sticky-note.xpm new file mode 100644 index 0000000..fbd12e1 --- /dev/null +++ b/app/bin/bitmaps/sticky-note.xpm @@ -0,0 +1,124 @@ +static char *sticky_note_x16[] = {
+ "16 16 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #996600",
+ "2 c #996633",
+ "3 c #999999",
+ "4 c #CC6633",
+ "5 c #CC9900",
+ "6 c #CC9933",
+ "7 c #CC9966",
+ "8 c #CC9999",
+ "9 c #CCCC66",
+ "A c #FFCC00",
+ "B c #FFCC33",
+ "C c #FFCC66",
+ " ",
+ " ",
+ "2466666666662 ",
+ "2AAAAAAAAAAA542 ",
+ "2733333333375552",
+ "2BCCCCCCCCCBAAA2",
+ "2B88888888888CA2",
+ "2B88888888888CA2",
+ "2BCCCCCCCCCCBAA2",
+ "2733333333338AA2",
+ "2AAAAAAAAAAAAAA2",
+ "2733333333333392",
+ "2BCCCCCCCCCCCCB2",
+ "2655555555555552",
+ " 222222222222222",
+ " "};
+
+static char *sticky_note_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #996600",
+ "3 c #996633",
+ "4 c #999999",
+ "5 c #CC6633",
+ "6 c #CC9900",
+ "7 c #CC9933",
+ "8 c #CC9999",
+ "9 c #CCCC66",
+ "A c #FFCC00",
+ "B c #FFCC33",
+ "C c #FFCC66",
+ " ",
+ " ",
+ " ",
+ "3333333333333333333 ",
+ "37AAAAAAAAAAAAAAAA63 ",
+ "37AAAAAAAAAAAAAAAA6653 ",
+ "37B11111111111114A66663 ",
+ "37B44444444444448AAAAA63",
+ "37AAAAAAAAAAAAAAAAAAAA63",
+ "37B88888888888888889AA63",
+ "37B11111111111111114AA63",
+ "37BCCCCCCCCCCCCCCCCCAA63",
+ "37AAAAAAAAAAAAAAAAAAAA63",
+ "37B1111111111111118AAA63",
+ "37B4444444444444449AAA63",
+ "37AAAAAAAAAAAAAAAAAAAA63",
+ "37B888888888888888888A63",
+ "37B111111111111111111A63",
+ "37BCCCCCCCCCCCCCCCCCCA63",
+ "37AAAAAAAAAAAAAAAAAAAA63",
+ "337777777777777777777753",
+ " 3333333333333333333333 ",
+ " ",
+ " "};
+
+static char *sticky_note_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #0066CC",
+ "2 c #996600",
+ "3 c #996633",
+ "4 c #999999",
+ "5 c #CC9900",
+ "6 c #CC9933",
+ "7 c #CC9999",
+ "8 c #CCCC66",
+ "9 c #FFCC00",
+ "A c #FFCC33",
+ "B c #FFCC66",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 333333333333333333333333 ",
+ " 3999999999999999999999963 ",
+ " 399999999999999999999995533 ",
+ " 3999999999999999999999955533 ",
+ " 39A111111111111111111B9555553 ",
+ " 39A111111111111111111B95555553 ",
+ " 39ABBBBBBBBBBBBBBBBBBA99999993 ",
+ " 399999999999999999999999999993 ",
+ " 39ABBBBBBBBBBBBBBBBBBBBBBA9993 ",
+ " 39A1111111111111111111111B9993 ",
+ " 39A1111111111111111111111B9993 ",
+ " 399999999999999999999999999993 ",
+ " 399999999999999999999999999993 ",
+ " 39A777777777777777777778999993 ",
+ " 39B111111111111111111114999993 ",
+ " 39B444444444444444444447999993 ",
+ " 399999999999999999999999999993 ",
+ " 399999999999999999999999999993 ",
+ " 39A111111111111111111111111993 ",
+ " 39A111111111111111111111111993 ",
+ " 39ABBBBBBBBBBBBBBBBBBBBBBBB993 ",
+ " 399999999999999999999999999993 ",
+ " 399999999999999999999999999993 ",
+ " 333333333333333333333333333333 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **sticky_note_xpm[3] = { sticky_note_x16, sticky_note_x24, sticky_note_x32 };
+
diff --git a/app/bin/bitmaps/stop.xpm b/app/bin/bitmaps/stop.xpm index 5c66ba1..78fb1fc 100644 --- a/app/bin/bitmaps/stop.xpm +++ b/app/bin/bitmaps/stop.xpm @@ -1,22 +1,128 @@ -/* XPM */ -static char * stop_xpm[] = { -"16 16 3 1", -" c None", -"X c #000000000000", -"o c #FFFF00000000", -" XXXXXXX ", -" XXXXXXXXX ", -" XXoooooooXX ", -" XXoooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -"XXoooooooooooXX ", -" XXoooooooooXX ", -" XXoooooooXX ", -" XXXXXXXXX ", -" XXXXXXX ", -" "}; +static char *stop_x16[] = {
+ "16 16 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #990000",
+ "4 c #993300",
+ "5 c #993333",
+ "6 c #CC3333",
+ "7 c #CC6633",
+ "8 c #CC6666",
+ "9 c #CC9966",
+ "A c #CC9999",
+ "B c #FF9999",
+ "C c #800000",
+ " 00 ",
+ " 1221 ",
+ " 11566511 ",
+ " 015788886510 ",
+ " 12678888886620 ",
+ " 13688AAA9876C0 ",
+ " 14689ABAA886C0 ",
+ " 1478AABBA886C0 ",
+ " 14789ABBA886C0 ",
+ " 14688AAAA886C0 ",
+ " 136788A98876C0 ",
+ " 11568888876410 ",
+ " 1C677776C1 ",
+ " 11566411 ",
+ " 1111 ",
+ " "};
+
+static char *stop_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #990000",
+ "4 c #993300",
+ "5 c #993333",
+ "6 c #CC3300",
+ "7 c #CC3333",
+ "8 c #CC6633",
+ "9 c #CC6666",
+ "A c #CC9966",
+ "B c #CC9999",
+ "C c #FF9999",
+ "D c #800000",
+ " ",
+ " 0110 ",
+ " 1D7721 ",
+ " 1277777511 ",
+ " 11578888877410 ",
+ " 01D77899999987721 ",
+ " 12677899999999877310 ",
+ " 13778999ABA9999776D0 ",
+ " 1377899BBBBBA99877D0 ",
+ " 147899ABBBBBB99977D0 ",
+ " 147899BBCCCBBA9977D0 ",
+ " 147899BBCCCCBA9987D0 ",
+ " 147899BBCCCCBA9977D0 ",
+ " 147899ABBCCBB99977D0 ",
+ " 1377999BBBBBA99877D0 ",
+ " 13778999BBBA999876D0 ",
+ " 136779999999998776D0 ",
+ " 1D77789999998776D1 ",
+ " 1157788998877411 ",
+ " 127777777511 ",
+ " 014777721 ",
+ " 113D10 ",
+ " 10 ",
+ " "};
+
+static char *stop_x32[] = {
+ "32 32 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #660000",
+ "3 c #990000",
+ "4 c #993300",
+ "5 c #993333",
+ "6 c #CC0000",
+ "7 c #CC3300",
+ "8 c #CC3333",
+ "9 c #CC6633",
+ "A c #CC6666",
+ "B c #CC9966",
+ "C c #CC9999",
+ "D c #FF9999",
+ "E c #800000",
+ " ",
+ " 11 ",
+ " 113E10 ",
+ " 014888821 ",
+ " 128888888511 ",
+ " 1158889999888411 ",
+ " 11488999AAA999888E1 ",
+ " 01E88899AAAAAAAA9888411 ",
+ " 12388899AAAAAAAAAA98887E1 ",
+ " 1378899AAAABBBAAAAA98886E0 ",
+ " 137889AAAABCCCCBAAAA9887E0 ",
+ " 138899AAACCCCCCCBAAA9887E0 ",
+ " 14889AAABCCCCCCCCAAA9888E0 ",
+ " 14889AAACCCDDDDCCBAAA988E0 ",
+ " 14889AABCCDDDDDCCCAAA988E0 ",
+ " 14889AABCCDDDDDCCCAAA988E0 ",
+ " 17889AABCCDDDDDCCCAAA988E0 ",
+ " 17889AAACCCDDDDCCBAAA988E0 ",
+ " 17889AAABCCCCCCCCBAA9888E0 ",
+ " 138899AAACCCCCCCBAAA9887E0 ",
+ " 137889AAABCCCCCBAAAA9887E0 ",
+ " 1378899AAAABBBAAAAA98887E0 ",
+ " 1E78889AAAAAAAAAAA98887620 ",
+ " 11488899AAAAAAAA99887311 ",
+ " 1E888999AAAA99888521 ",
+ " 11488899999888821 ",
+ " 11588888888410 ",
+ " 1288888411 ",
+ " 01E7411 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char **stop_xpm[3] = { stop_x16, stop_x24, stop_x32 };
+
diff --git a/app/bin/bitmaps/straight-line.xpm b/app/bin/bitmaps/straight-line.xpm new file mode 100644 index 0000000..9808d8d --- /dev/null +++ b/app/bin/bitmaps/straight-line.xpm @@ -0,0 +1,96 @@ +static char *straight_line_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ " 222 ",
+ " 222 ",
+ " 2 2 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 01 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " "};
+
+static char *straight_line_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " ",
+ " ",
+ " 2222 ",
+ " 22 ",
+ " 2 2 ",
+ " 2 2 ",
+ " 2 ",
+ " 22 ",
+ " 22 ",
+ " 22 ",
+ " 03 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " 00 ",
+ " ",
+ " "};
+
+static char *straight_line_x32[] = {
+ "32 32 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " ",
+ " 22222 ",
+ " 2222222 ",
+ " 2222 ",
+ " 22222 ",
+ " 222 22 ",
+ " 222 22 ",
+ " 222 22 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 122 ",
+ " 002 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 0 ",
+ " ",
+ " "};
+
+static char **straight_line_xpm[3] = { straight_line_x16, straight_line_x24, straight_line_x32 };
+
diff --git a/app/bin/bitmaps/straight.xpm b/app/bin/bitmaps/straight.xpm index b5fc178..83e2f67 100644 --- a/app/bin/bitmaps/straight.xpm +++ b/app/bin/bitmaps/straight.xpm @@ -1,22 +1,133 @@ -/* XPM */ -static char * straight_xpm[] = { -"16 16 3 1", -" c None", -". c #FFFF00000000", -"X c #000000000000", -" .....", -" X ..", -" X X . .", -" X . X.", -" X . X .", -" X X . X ", -" X . X X ", -" X . X ", -" X X . X ", -" X . X X ", -" X X X ", -"X X X ", -" X X X ", -"X X X ", -" X ", -" X X "}; +static char *straight_x16[] = {
+ "16 16 18 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #993333",
+ "6 c #996600",
+ "7 c #996633",
+ "8 c #996666",
+ "9 c #999999",
+ "A c #CC0000",
+ "B c #CC3333",
+ "C c #CC6600",
+ "D c #CC6666",
+ "E c #CC9900",
+ "F c #C0C0C0",
+ "G c #808080",
+ " AAA ",
+ " AAAA",
+ " 945AAA",
+ " G9A8AA",
+ " G8B94 ",
+ " FG8D8GF ",
+ " E49B8G ",
+ " 37A9G ",
+ " 62EC49 ",
+ " E32E 2E ",
+ " E13E 3 ",
+ " 63 E2 E ",
+ " C1EE0C ",
+ " 2E 2C ",
+ " 33 ",
+ " 03E "};
+
+static char *straight_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #996600",
+ "6 c #999999",
+ "7 c #CC0000",
+ "8 c #CC3333",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #CC9999",
+ "C c #C0C0C0",
+ "D c #808080",
+ " ",
+ " 77777 ",
+ " 777 ",
+ " C 4 7777 ",
+ " 6D 77 7 ",
+ " C 4DB7 4 7 ",
+ " 6D4 8B44 ",
+ " C 4DB7 DD ",
+ " CD4 8B44CC ",
+ " A 4DB7 DD ",
+ " A52 8B44CC ",
+ " A 03A7 DD ",
+ " A50 AA246C ",
+ " 03A 53 ",
+ " A50 AA 0AA ",
+ " 3A 93 ",
+ " A90 AA 09A ",
+ " 1A 93 ",
+ " A90 AA 05A ",
+ " 39 A3 ",
+ " 0 AA 05A ",
+ " A30 ",
+ " 05A ",
+ " 0 "};
+
+static char *straight_x32[] = {
+ "32 32 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #666666",
+ "6 c #996600",
+ "7 c #999999",
+ "8 c #CC0000",
+ "9 c #CC3333",
+ "A c #CC6600",
+ "B c #CC6666",
+ "C c #CC9900",
+ "D c #CC9999",
+ "E c #C0C0C0",
+ "F c #808080",
+ " ",
+ " 888888 ",
+ " 8888888 ",
+ " 8888 ",
+ " E 5 88888 ",
+ " E75 888 88 ",
+ " F7 888 88 ",
+ " EE 5 D988 5 88 ",
+ " 7F5 88D 5 ",
+ " 57D8887F ",
+ " E 55 988 57E ",
+ " EF5 88D755 E ",
+ " 5FD888 FF ",
+ " CC35 989 55EE ",
+ " 64 889E55 ",
+ " 00CC 8 FF ",
+ " C40 CC 55 E ",
+ " 44 C60 ",
+ " C 0 C 04C ",
+ " CA0 C 00 CC ",
+ " 2A A2 ",
+ " CC 0 CC 0C ",
+ " C2 CC 0 C ",
+ " 0AC 64 ",
+ " C 00 CC 06C ",
+ " 44 CC0 ",
+ " 04C 46 ",
+ " 0 C 0 CC ",
+ " C20 ",
+ " 1A ",
+ " 00 C ",
+ " "};
+
+static char **straight_xpm[3] = { straight_x16, straight_x24, straight_x32 };
+
diff --git a/app/bin/bitmaps/switch-ai.xpm b/app/bin/bitmaps/switch-ai.xpm new file mode 100644 index 0000000..34213ba --- /dev/null +++ b/app/bin/bitmaps/switch-ai.xpm @@ -0,0 +1,96 @@ +static char *switch_ai_x16[] = {
+ "16 16 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ " ",
+ " 2 ",
+ " 2 ",
+ " 2222 ",
+ " 2222 ",
+ " 2222 ",
+ " 2221 ",
+ " 2 00 ",
+ " 00 ",
+ " 0 ",
+ " 0 000 ",
+ " 00000 ",
+ " 00 00 ",
+ " 00 000 ",
+ " 00 000 ",
+ " 00000000"};
+
+static char *switch_ai_x24[] = {
+ "24 24 4 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #CC0000",
+ " ",
+ "222 ",
+ " 222 ",
+ " 222 ",
+ " 222 ",
+ " 22222 ",
+ " 222222 ",
+ " 222222 ",
+ " 222222 ",
+ " 222222 ",
+ " 222210 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 ",
+ " 000 000 ",
+ " 00000000 ",
+ " 000 00 ",
+ " 000 00 ",
+ " 00000 00 ",
+ " 0 00000 ",
+ " 0 0000 ",
+ " 00000000000 ",
+ " 00 00 "};
+
+static char *switch_ai_x32[] = {
+ "32 32 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #800000",
+ " ",
+ " 22 ",
+ " 222 ",
+ " 222 ",
+ " 2222 ",
+ " 2222 ",
+ " 2222 ",
+ " 2222222 ",
+ " 2222222 ",
+ " 22222222 ",
+ " 22222222 ",
+ " 22222222 ",
+ " 22222221 ",
+ " 2222230 ",
+ " 2221000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0000 ",
+ " 0000 0000 ",
+ " 000 000000 ",
+ " 0000000000 ",
+ " 0000 00 ",
+ " 0000 00 ",
+ " 000000 00 ",
+ " 000 0000 00 ",
+ " 000 000000 ",
+ " 00 00000 ",
+ " 000000000000000 ",
+ " 00000000000000000",
+ " 000000000000000 "};
+
+static char **switch_ai_xpm[3] = { switch_ai_x16, switch_ai_x24, switch_ai_x32 };
+
diff --git a/app/bin/bitmaps/table-edge.xpm b/app/bin/bitmaps/table-edge.xpm new file mode 100644 index 0000000..1983460 --- /dev/null +++ b/app/bin/bitmaps/table-edge.xpm @@ -0,0 +1,114 @@ +static char *table_edge_x16[] = {
+ "16 16 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #006600",
+ "3 c #333333",
+ "4 c #336633",
+ "5 c #339933",
+ "6 c #33CC33",
+ "7 c #666666",
+ "8 c #999999",
+ "9 c #808080",
+ " ",
+ " 5 ",
+ " 666666666666630",
+ " 666666666666430",
+ " 666666666664770",
+ " 666666666647970",
+ " 666666666479970",
+ " 666666664799970",
+ "122222222399993 ",
+ " 8888888979993 ",
+ " 888888897993 ",
+ " 88888889793 ",
+ " 8888888973 ",
+ " 888888870 ",
+ " 000000000 ",
+ " "};
+
+static char *table_edge_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #336633",
+ "3 c #339933",
+ "4 c #33CC33",
+ "5 c #666633",
+ "6 c #666666",
+ "7 c #999999",
+ "8 c #808080",
+ " ",
+ " ",
+ " 2 ",
+ " 4444444444444444444430 ",
+ " 4444444444444444444310 ",
+ " 4444444444444444443180 ",
+ " 4444444444444444431880 ",
+ " 4444444444444444318880 ",
+ " 4444444444444443188880 ",
+ " 4444444444444431888880 ",
+ " 4444444444444418888880 ",
+ " 4444444444444188888881 ",
+ " 333333333333188888881 ",
+ " 77777777777718888881 ",
+ " 7777777777771888881 ",
+ " 777777777777188881 ",
+ " 777777777777188810 ",
+ " 77777777777718851 ",
+ " 7777777777771861 ",
+ " 777777777777161 ",
+ " 77777777777701 ",
+ " 0000000000000 ",
+ " ",
+ " "};
+
+static char *table_edge_x32[] = {
+ "32 32 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #336633",
+ "3 c #339933",
+ "4 c #33CC33",
+ "5 c #666633",
+ "6 c #666666",
+ "7 c #999999",
+ "8 c #808080",
+ " ",
+ " ",
+ " ",
+ " 4444444444444444444444444443 ",
+ " 444444444444444444444444444310 ",
+ " 444444444444444444444444444110 ",
+ " 444444444444444444444444441860 ",
+ " 444444444444444444444444428860 ",
+ " 444444444444444444444444268860 ",
+ " 444444444444444444444442688860 ",
+ " 444444444444444444444426888860 ",
+ " 444444444444444444444268888860 ",
+ " 444444444444444444443588888860 ",
+ " 444444444444444444431888888860 ",
+ " 444444444444444444318888888860 ",
+ " 44444444444444444318888888881 ",
+ " 2333333333333333318888888881 ",
+ " 888888888888888668888888810 ",
+ " 77777777777777766888888851 ",
+ " 7777777777777776688888861 ",
+ " 777777777777777668888861 ",
+ " 77777777777777766888861 ",
+ " 7777777777777776688861 ",
+ " 777777777777777688881 ",
+ " 77777777777777768881 ",
+ " 7777777777777776881 ",
+ " 777777777777777661 ",
+ " 77777777777777711 ",
+ " 000000000000000000 ",
+ " ",
+ " ",
+ " "};
+
+static char **table_edge_xpm[3] = { table_edge_x16, table_edge_x24, table_edge_x32 };
+
diff --git a/app/bin/bitmaps/text.xpm b/app/bin/bitmaps/text.xpm index 176621d..12bc092 100644 --- a/app/bin/bitmaps/text.xpm +++ b/app/bin/bitmaps/text.xpm @@ -1,21 +1,89 @@ -/* XPM */ -static char * text_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" .. ", -" .. ", -" .... ", -" .... ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" .......... ", -" ............ ", -" .. .. ", -" .. .. ", -" .. .. ", -".. ..", -"... ..."}; +static char *text_x16[] = {
+ "16 16 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 0000 ",
+ " 000000 ",
+ " 000000 ",
+ " 0000000 ",
+ " 00000000 ",
+ " 000 000 ",
+ " 0000 0000 ",
+ " 0000 0000 ",
+ " 0000 00000 ",
+ " 000000000000 ",
+ " 000000000000 ",
+ " 0000 0000 ",
+ " 0000 0000 ",
+ "0000 0000",
+ "0000 0000"};
+
+static char *text_x24[] = {
+ "24 24 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 000000 ",
+ " 000000 ",
+ " 00000000 ",
+ " 00000000 ",
+ " 0000000000 ",
+ " 0000000000 ",
+ " 0000000000 ",
+ " 00000 00000 ",
+ " 00000 00000 ",
+ " 000000 000000 ",
+ " 00000 00000 ",
+ " 00000 000000 ",
+ " 00000 00000 ",
+ " 0000000000000000 ",
+ " 000000000000000000 ",
+ " 000000000000000000 ",
+ " 0000000000000000000 ",
+ " 000000 000000 ",
+ " 00000 00000 ",
+ " 000000 000000 ",
+ " 00000 00000 ",
+ "000000 000000",
+ " "};
+
+static char *text_x32[] = {
+ "32 32 2 1",
+ " c None",
+ "0 c #000000",
+ " ",
+ " 00000000 ",
+ " 00000000 ",
+ " 000000000 ",
+ " 0000000000 ",
+ " 0000000000 ",
+ " 000000000000 ",
+ " 000000000000 ",
+ " 00000000000000 ",
+ " 00000000000000 ",
+ " 000000 000000 ",
+ " 0000000 0000000 ",
+ " 000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ " 000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000000000000000000 ",
+ " 00000000000000000000000 ",
+ " 000000000000000000000000 ",
+ " 000000000000000000000000 ",
+ " 00000000000000000000000000 ",
+ " 0000000 0000000 ",
+ " 0000000 00000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ " 0000000 0000000 ",
+ "00000000 00000000",
+ " "};
+
+static char **text_xpm[3] = { text_x16, text_x24, text_x32 };
+
diff --git a/app/bin/bitmaps/top.xpm b/app/bin/bitmaps/top.xpm new file mode 100644 index 0000000..84d2152 --- /dev/null +++ b/app/bin/bitmaps/top.xpm @@ -0,0 +1,111 @@ +static char *top_x16[] = {
+ "16 16 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #990000",
+ "3 c #993333",
+ "4 c #996666",
+ "5 c #CC0000",
+ "6 c #FF0000",
+ "7 c #808080",
+ " ",
+ " ",
+ " 000000000 ",
+ " 214777777770",
+ " 22555377777770",
+ " 256666637777770",
+ " 566666663777770",
+ "2566666662777770",
+ "2566666662777770",
+ "2566666662777770",
+ " 266666654777770",
+ " 26666537777770",
+ " 2222477777770",
+ " 0000000000",
+ " ",
+ " "};
+
+static char *top_x24[] = {
+ "24 24 10 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #990000",
+ "3 c #993333",
+ "4 c #996666",
+ "5 c #CC0000",
+ "6 c #FF0000",
+ "7 c #808080",
+ "8 c #800000",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 000000000000000 ",
+ " 222847777777777770 ",
+ " 2556552377777777770 ",
+ " 26666666537777777770 ",
+ " 266666666663777777770 ",
+ " 2666666666665477777770 ",
+ " 2666666666666377777770 ",
+ " 2666666666666277777770 ",
+ "25666666666666277777770 ",
+ " 2666666666666377777770 ",
+ " 2666666666665377777770 ",
+ " 2566666666662777777770 ",
+ " 256666666654777777770 ",
+ " 25666666247777777770 ",
+ " 2225223777777777770 ",
+ " 100000000000000 ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *top_x32[] = {
+ "32 32 9 1",
+ " c None",
+ "0 c #000000",
+ "1 c #660000",
+ "2 c #990000",
+ "3 c #993333",
+ "4 c #996666",
+ "5 c #CC0000",
+ "6 c #FF0000",
+ "7 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00000000000000000000 ",
+ " 07777777777777777770 ",
+ " 222223477777777777777770 ",
+ " 2556666537777777777777770 ",
+ " 226666666662477777777777770 ",
+ " 2566666666666547777777777770 ",
+ " 25666666666666654777777777770 ",
+ " 26666666666666663777777777770 ",
+ " 256666666666666665477777777770 ",
+ " 266666666666666666377777777770 ",
+ " 266666666666666666377777777770 ",
+ " 266666666666666666377777777770 ",
+ " 266666666666666666377777777770 ",
+ " 256666666666666665377777777770 ",
+ " 256666666666666665477777777770 ",
+ " 26666666666666663777777777770 ",
+ " 2666666666666637777777777770 ",
+ " 2566666666666347777777777770 ",
+ " 225666666653777777777777770 ",
+ " 2225552247777777777777770 ",
+ " 2217777777777777777770 ",
+ " 00000000000000000000 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **top_xpm[3] = { top_x16, top_x24, top_x32 };
+
diff --git a/app/bin/bitmaps/train.xpm b/app/bin/bitmaps/train.xpm index c94593e..bc9a846 100644 --- a/app/bin/bitmaps/train.xpm +++ b/app/bin/bitmaps/train.xpm @@ -1,22 +1,118 @@ -/* XPM */ -static char * train_xpm[]={ -"16 16 3 1", -". c None", -"# c #800080008000", -"a c #000000000000", -".....#..#.#.....", -"aaaa.......##...", -"...a........#...", -"...a...a...#....", -"...a..aaa..aa...", -"...a..aaa..aa...", -"aaaaaaaaaaaaaa..", -"aaaaaaaaaaaaaa..", -"aaaaaaaaaaaaaa..", -"aaaaaaaaaaaaaaaa", -"aaaaaaaaaaaaaaaa", -"...aa...aa.....a", -"..aaaa.aaaa....a", -"..aaaa.aaaa..aa.", -"...aa...aa...aa.", -"................"}; +static char *train_x16[] = {
+ "16 16 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #006666",
+ "5 c #009966",
+ "6 c #669933",
+ "7 c #999933",
+ "8 c #99CC33",
+ "9 c #CCCC33",
+ "A c #808080",
+ " ",
+ " AAAAAAAAA ",
+ " AAAAAAAAAAA ",
+ " AAAAAAAAAAAA ",
+ " AAAAAAAAAAAA ",
+ " AAAAA A ",
+ " 0 A ",
+ " 0000 0 ",
+ " 0 0 0 ",
+ " 3761111111111 ",
+ " 3985555555555 ",
+ " 3984444444444 ",
+ " 3971221221221 ",
+ " 000000000 00 ",
+ " 0000000000000 0",
+ " 0 0 0 "};
+
+static char *train_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #009966",
+ "5 c #669933",
+ "6 c #999933",
+ "7 c #99CC33",
+ "8 c #FFFF33",
+ "9 c #808080",
+ " ",
+ " 9999999999 ",
+ " 999999999999999 ",
+ " 99999999999999999 ",
+ " 999999999999999999 ",
+ " 999999999999999999 ",
+ " 99999999999999999 ",
+ " 99999999999 99 ",
+ " 99 99 ",
+ " 99 ",
+ " 0000000 00 ",
+ " 0 00 ",
+ " 0 00 00 ",
+ " 0 00 00 ",
+ " 33573322222222222222 ",
+ " 33683344444444444444 ",
+ " 33683344444444444444 ",
+ " 33683333333333333333 ",
+ " 33683322222222222222 ",
+ " 333521000000000000000 ",
+ " 00000000 0000 00 ",
+ " 00 00000000 0000 00 00",
+ " 00 000 000 000 00 ",
+ " "};
+
+static char *train_x32[] = {
+ "32 32 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003300",
+ "2 c #003333",
+ "3 c #006633",
+ "4 c #009966",
+ "5 c #336633",
+ "6 c #669933",
+ "7 c #999933",
+ "8 c #CCCC33",
+ "9 c #FFFF33",
+ "A c #808080",
+ " ",
+ " ",
+ " AAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAAAAAAAAA ",
+ " AAAAAAAAAAAAAAAAA AAA ",
+ " AAAAAAAAAAA AA ",
+ " AA ",
+ " AA ",
+ " 0000 ",
+ " 00000000 0000 ",
+ " 00 0000 ",
+ " 00 000 0000 ",
+ " 00 000 0000 ",
+ " 33333330000000000000000000 ",
+ " 33587332222222222222222222 ",
+ " 33698333333333333333333333 ",
+ " 33698334444444444444444444 ",
+ " 33698334444444444444444444 ",
+ " 33698333333333333333333333 ",
+ " 33698332222222222222222222 ",
+ " 33333320011000011000011100 ",
+ " 0000 0000 0000 00 ",
+ " 0 000000000000000000 0 00 ",
+ " 000 000000000000000000 000 00 ",
+ " 000 00000 0000 0000 000 ",
+ " 000 00 00 0 ",
+ " "};
+
+static char **train_xpm[3] = { train_x16, train_x24, train_x32 };
+
diff --git a/app/bin/bitmaps/trim.xpm b/app/bin/bitmaps/trim.xpm new file mode 100644 index 0000000..ac679d6 --- /dev/null +++ b/app/bin/bitmaps/trim.xpm @@ -0,0 +1,99 @@ +static char *trim_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #666666",
+ "2 c #CC0000",
+ "3 c #808080",
+ "4 c #800000",
+ " ",
+ " 3 ",
+ " 22 3 ",
+ " 22 3 ",
+ " 22 2 3 ",
+ " 222 3 ",
+ " 22 3 ",
+ " 222221 ",
+ " 42222 ",
+ " 0 2222 ",
+ " 0 222 ",
+ " 00 2 2 ",
+ " 00 2 ",
+ " 00 2 ",
+ " 00 2 ",
+ " "};
+
+static char *trim_x24[] = {
+ "24 24 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #990000",
+ "2 c #CC0000",
+ "3 c #808080",
+ " ",
+ " ",
+ " 3 ",
+ " 2 3 ",
+ " 2 3 ",
+ " 2 2 3 ",
+ " 22 22 3 ",
+ " 22 22 3 ",
+ " 2222 3 ",
+ " 222 3 ",
+ " 222222 3 ",
+ " 2222222 ",
+ " 122 222 ",
+ " 0 2222222 ",
+ " 0 2222 ",
+ " 0 22 2 ",
+ " 0 22 2 ",
+ " 00 22 2 ",
+ " 00 22 2 ",
+ " 00 22 ",
+ " 00 22 ",
+ " 00 2 ",
+ " 0 ",
+ " "};
+
+static char *trim_x32[] = {
+ "32 32 5 1",
+ " c None",
+ "0 c #000000",
+ "1 c #CC0000",
+ "2 c #808080",
+ "3 c #800000",
+ " ",
+ " ",
+ " 2 ",
+ " 222 ",
+ " 11 222 ",
+ " 111 222 ",
+ " 111 222 ",
+ " 111 1 222 ",
+ " 111 111 222 ",
+ " 111 111 222 ",
+ " 111 111 222 ",
+ " 111111 222 ",
+ " 11111 222 ",
+ " 11111111 222 ",
+ " 1111111111 2 ",
+ " 111 1111 ",
+ " 3111 ",
+ " 003111111111 ",
+ " 000 11111111 ",
+ " 000 11111 ",
+ " 000 111111 ",
+ " 000 111 111 ",
+ " 000 111 111 ",
+ " 000 111 111 ",
+ " 000 11 111 ",
+ " 0000 111 ",
+ " 0000 111 ",
+ " 0000 1111 ",
+ " 000 11 ",
+ " 00 ",
+ " ",
+ " "};
+
+static char **trim_xpm[3] = { trim_x16, trim_x24, trim_x32 };
+
diff --git a/app/bin/bitmaps/tunnel.xpm b/app/bin/bitmaps/tunnel.xpm index 449080e..9b70b28 100644 --- a/app/bin/bitmaps/tunnel.xpm +++ b/app/bin/bitmaps/tunnel.xpm @@ -1,22 +1,118 @@ -/* XPM */ -static char * tunnel_xpm[] = { -"16 16 3 1", -" c None", -". c #00FFFF", -"+ c #000000", -" .. ", -" .. ", -" .. ", -" .. ", -"+ + .. ", -"++++++++.. + + ", -"+ + .. ", -"+ + .. ", -"+ + .. ", -"++++++++.. + + ", -"+ + .. ", -" .. ", -" .. ", -" .. ", -" .. ", -" "}; +static char *tunnel_x16[] = {
+ "16 16 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333333",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #993300",
+ "6 c #996600",
+ "7 c #999999",
+ "8 c #CC6600",
+ "9 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 8 8 007 7 7 7 ",
+ "0303102999949499",
+ " 6 63027797 7 79",
+ " 8 8 0077 7 7 7 ",
+ "0000002444444444",
+ " 8 8 0077 7 7 7 ",
+ " 00 ",
+ " 0 ",
+ " ",
+ " ",
+ " "};
+
+static char *tunnel_x24[] = {
+ "24 24 11 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333300",
+ "2 c #333333",
+ "3 c #663300",
+ "4 c #666666",
+ "5 c #993300",
+ "6 c #996600",
+ "7 c #999999",
+ "8 c #CC6600",
+ "9 c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 00 ",
+ " 8 8 00 7 7 7 77 ",
+ " 35006000449949944994994",
+ " 35006000449949944994994",
+ " 88 8 0 77 7 7 77 ",
+ " 88 8 0 77 7 7 77 ",
+ " 66 6 02 79 97 79 77 ",
+ "013003000449949944994994",
+ " 88 8 0 77 7 7 77 ",
+ " 00 ",
+ " 00 ",
+ " 0 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *tunnel_x32[] = {
+ "32 32 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #663333",
+ "6 c #666666",
+ "7 c #993300",
+ "8 c #996600",
+ "9 c #999999",
+ "A c #CC6600",
+ "B c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 00 ",
+ " 000 ",
+ " 00 ",
+ " AA AA 00 99 99 99 99 ",
+ " 488 884 003 99 99B 99 99B ",
+ " 14400441000566BB66BBB66BB66BBB6",
+ " AA AA 00 99 99 99 99 ",
+ " AA AA 00 99 99 99 99 ",
+ " AA AA 00 99 99 99 99 ",
+ " AA AA 00 99 99 99 99 ",
+ " 28700782000366BB66BBB66BB66BBB ",
+ " 28700782000366BB66BBB66BB66BBB ",
+ " AA AA 00 99 99 99 99 ",
+ " 000 ",
+ " 000 ",
+ " 0000 ",
+ " 0 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **tunnel_xpm[3] = { tunnel_x16, tunnel_x24, tunnel_x32 };
+
diff --git a/app/bin/bitmaps/turnout-designer.xpm b/app/bin/bitmaps/turnout-designer.xpm new file mode 100644 index 0000000..00db9be --- /dev/null +++ b/app/bin/bitmaps/turnout-designer.xpm @@ -0,0 +1,129 @@ +static char *turnout_designer_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #666666",
+ "6 c #996600",
+ "7 c #999999",
+ "8 c #CC6600",
+ "9 c #CC9900",
+ "A c #CC9966",
+ "B c #CCCCCC",
+ "C c #C0C0C0",
+ "D c #808080",
+ " ",
+ " ",
+ " BBBBBBB ",
+ " B777777CB ",
+ " BC5500557B ",
+ " BBBBD3BBBB ",
+ " BD3B99640 ",
+ " BD3B64169 ",
+ " CD3B669 60",
+ " 9 9667D3B9 6168",
+ "10000077DB000000",
+ " 9 999ACC76 9 9 ",
+ "4424101244414240",
+ " 86646866684868 ",
+ " ",
+ " "};
+
+static char *turnout_designer_x24[] = {
+ "24 24 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #666666",
+ "6 c #996600",
+ "7 c #999966",
+ "8 c #999999",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #CC9999",
+ "C c #CCCC99",
+ "D c #CCCCCC",
+ "E c #C0C0C0",
+ "F c #808080",
+ " ",
+ " ",
+ " ",
+ " ",
+ " DDEEEEEEEEEDD ",
+ " D50000000008D ",
+ " DE00000000008D ",
+ " DDEEE8005EEEDD ",
+ " DD008D ",
+ " D008D A40 ",
+ " D008DAAA016 ",
+ " D008D9424 AA ",
+ " D008846AA A0 ",
+ " A D008EAA AA024 ",
+ " AA A 925D008DAA 4409A ",
+ "0000000003D0088000000000",
+ " AA A A DEED826 AA A ",
+ " AA A A 7FF7 AA AA A ",
+ " 66 96040040 9 66 66 96 ",
+ "044041041140040440440420",
+ " AA A A A A AA AA A ",
+ " ",
+ " ",
+ " "};
+
+static char *turnout_designer_x32[] = {
+ "32 32 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #666666",
+ "6 c #993300",
+ "7 c #996600",
+ "8 c #999999",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #CCCCCC",
+ "C c #C0C0C0",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " BBBBBBBBBBBBBBBBB ",
+ " BB5555555555555BB ",
+ " B80000000000000BB ",
+ " BB30000000000000BB ",
+ " BC55555500355555BB ",
+ " BBBBBBBB8003BBBBBBB ",
+ " B8003BB ",
+ " B8003BB A00 ",
+ " B8003BB AA 044 ",
+ " B8003BB A97007A ",
+ " B8003BB76077 AA ",
+ " B8003B827 AA A ",
+ " B8003BC A A 920 ",
+ " AA B8003BB A AA 019 ",
+ " A A 9700B8003BB A 0410AA ",
+ " 041014000200B8003B824000440440 ",
+ " 94 490079 BC888B8210079 77 ",
+ " A A AA BBBBCC87A A AA ",
+ " A A AA 74007A A A AA ",
+ " A A 770047 AA A A AA ",
+ " 000000000000000000000000000000 ",
+ " A A AA AA AA A A AA ",
+ " A A A A A A A A ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **turnout_designer_xpm[3] = { turnout_designer_x16, turnout_designer_x24, turnout_designer_x32 };
+
diff --git a/app/bin/bitmaps/turnout.xpm b/app/bin/bitmaps/turnout.xpm index 91d7af5..dc60fdb 100644 --- a/app/bin/bitmaps/turnout.xpm +++ b/app/bin/bitmaps/turnout.xpm @@ -1,21 +1,107 @@ -/* XPM */ -static char * turnout_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" ", -" ", -" . . ", -" .. ", -" . ... ", -" .. . . ", -" . ... .. ", -" . .. . .. . ", -"............... ", -" . . .. . ", -" . ... . . ", -"............... ", -" . . . . ", -" ", -" ", -" "}; +static char *turnout_x16[] = {
+ "16 16 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 64 ",
+ " 6414 ",
+ " 53236650",
+ " 541346 5234",
+ "2323002232301231",
+ " 54545543133535 ",
+ " 54533124453535 ",
+ "2323123232313130",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *turnout_x24[] = {
+ "24 24 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 6 ",
+ " 6 32 ",
+ " 643036 ",
+ " 6602346 66 ",
+ " 6 32056 6 40 ",
+ " 6 33046 66 64035 ",
+ " 3404302014034043003243 ",
+ " 3404304224034030043043 ",
+ " 66 66 6 6 32046 66 6 ",
+ " 66 66 6322035 66 66 6 ",
+ "02303200003023032032032 ",
+ " 45 5405335 45 54 54 54 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char *turnout_x32[] = {
+ "32 32 8 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #663300",
+ "4 c #996600",
+ "5 c #CC6600",
+ "6 c #CC9900",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " 6 ",
+ " 50 ",
+ " 6660035 ",
+ " 66121 6 ",
+ " 6 32056 66 ",
+ " 6 50046 6 6 0 ",
+ " 64004 66 66 32 ",
+ " 6 6 66 0310 6 66 62046 ",
+ " 54 500320044 5 45 0113054 ",
+ " 032003001300320030022002320320 ",
+ " 6 6 66 6 63014 66 66 ",
+ " 6 6 66 6 021066 66 66 ",
+ " 6 6 66 41006 66 66 66 ",
+ " 54 500330044 53 45 45 54 ",
+ " 032003001300320031023002300320 ",
+ " 6 6 66 6 6 66 66 66 ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+
+static char **turnout_xpm[3] = { turnout_x16, turnout_x24, turnout_x32 };
+
diff --git a/app/bin/bitmaps/turntable.xpm b/app/bin/bitmaps/turntable.xpm new file mode 100644 index 0000000..c6e6375 --- /dev/null +++ b/app/bin/bitmaps/turntable.xpm @@ -0,0 +1,133 @@ +static char *turntable_x16[] = {
+ "16 16 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #663333",
+ "6 c #666633",
+ "7 c #666666",
+ "8 c #996600",
+ "9 c #999999",
+ "A c #CC6600",
+ "B c #CC9900",
+ "C c #CCCCCC",
+ "D c #FFFFFF",
+ "E c #C0C0C0",
+ "F c #808080",
+ " 1B ",
+ " 0 82B 000 ",
+ " 84 85033303 ",
+ " B446FF397793 ",
+ " B39DF3977DC3 ",
+ " 7DDF3977DDF3",
+ "88A5EDDF3977DDC3",
+ "4443CDDF3977DDD0",
+ "BBB3CDDF3977DDD3",
+ "1000EDDF3977DDC3",
+ "BBB49DDF3977DDE3",
+ " B3CDF3977DD3 ",
+ " B483CF3977CF3 ",
+ " 84 837373330 ",
+ " 0B82B03330 ",
+ " 04B "};
+
+static char *turntable_x24[] = {
+ "24 24 17 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #666600",
+ "6 c #666633",
+ "7 c #666666",
+ "8 c #996600",
+ "9 c #999999",
+ "A c #CC6600",
+ "B c #CC9900",
+ "C c #CCCCCC",
+ "D c #FFFFFF",
+ "E c #C0C0C0",
+ "F c #808080",
+ " 0 B ",
+ " 48 ",
+ " 0 B20B 000 ",
+ " 2A 48300000030 ",
+ " B1 B8397799939F3 ",
+ " 467CD779993EDE3 ",
+ " B83CDD779993EDDC3 ",
+ " 3CDDD779993EDDD93 ",
+ " 0FDDDD779993EDDDD3 ",
+ " B B3EDDDD779993EDDDD90",
+ "040243CDDDD779993EDDDDC3",
+ " A 8A0DDDDD779993EDDDDC3",
+ " B BB3DDDDD779993EDDDDC3",
+ " A 8A3CDDDD779993EDDDDE3",
+ "040243CDDDD779993EDDDD90",
+ " B B39DDDD779993EDDDD7 ",
+ " 3CDDD779993EDDDC3 ",
+ " B2FDDD779993EDDD3 ",
+ " 443EDD779993EDDF3 ",
+ " B40 B37C779993EC73 ",
+ " 24 B41333777073 ",
+ " 0 B 08B 0300330 ",
+ " 48 ",
+ " 04B "};
+
+static char *turntable_x32[] = {
+ "32 32 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #330000",
+ "2 c #333300",
+ "3 c #333333",
+ "4 c #663300",
+ "5 c #663333",
+ "6 c #666666",
+ "7 c #996600",
+ "8 c #999999",
+ "9 c #CC6600",
+ "A c #CC9900",
+ "B c #CCCCCC",
+ "C c #FFFFFF",
+ "D c #C0C0C0",
+ "E c #808080",
+ " 0 ",
+ " 04A ",
+ " 72 ",
+ " 0 AA 00AA 0000 ",
+ " 04A 47 3000000033 ",
+ " A71 A903D668888E3D33 ",
+ " A 02AA38BC668888E3CC83 ",
+ " 443BCCC668888E3CCCB6 ",
+ " A 08CCCC668888E3CCCCB3 ",
+ " 3ECCCCC668888E3CCCCCD3 ",
+ " 3BCCCCC668888E3CCCCCC6 ",
+ " 08CCCCCC668888E3CCCCCCD3 ",
+ " AA A 3BCCCCCC668888E3CCCCCCB3 ",
+ " 77 903CCCCCCC668888E3CCCCCCC6 ",
+ "04400403CCCCCCC668888E3CCCCCCC80",
+ " AA A0ECCCCCCC668888E3CCCCCCC83",
+ " AA A0ECCCCCCC668888E3CCCCCCCD3",
+ " AA A 6CCCCCCC668888E3CCCCCCC80",
+ "04400403CCCCCCC668888E3CCCCCCC80",
+ " 77 9 3BCCCCCC668888E3CCCCCCC6 ",
+ " AA A 3DCCCCCC668888E3CCCCCCB3 ",
+ " 6CCCCCC668888E3CCCCCC83 ",
+ " 3BCCCCC668888E3CCCCCB3 ",
+ " A13BCCCC668888E3CCCCC6 ",
+ " 743ECCCC668888E3CCCC83 ",
+ " A 09A5EBCC668888E3CCC86 ",
+ " 91 AA33DC668888E3CB63 ",
+ " 2A 74 363366666363 ",
+ " 0 A 09A 03000033 ",
+ " 90 ",
+ " 29 ",
+ " 0 AA "};
+
+static char **turntable_xpm[3] = { turntable_x16, turntable_x24, turntable_x32 };
+
diff --git a/app/bin/bitmaps/turntbl.xpm b/app/bin/bitmaps/turntbl.xpm deleted file mode 100644 index ca6f359..0000000 --- a/app/bin/bitmaps/turntbl.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static char * turntbl_xpm[] = { -"16 16 2 1", -" c None", -". c #000000000000", -" . ", -". .. ", -" . .. ..... ", -" . .. . . . ", -" . . . . . . ", -" . . . . ", -" . . . . .", -".... . . .", -" . . . . .", -".... . . .", -" . . . . .", -" . . . . ", -" . . . . . . ", -" . .. . . . ", -" . .. ..... ", -" .. "}; diff --git a/app/bin/bitmaps/undo.xpm b/app/bin/bitmaps/undo.xpm new file mode 100644 index 0000000..2450967 --- /dev/null +++ b/app/bin/bitmaps/undo.xpm @@ -0,0 +1,103 @@ +static char *undo_x16[] = {
+ "16 16 6 1",
+ " c None",
+ "0 c #000000",
+ "1 c #996600",
+ "2 c #CC6600",
+ "3 c #CC9900",
+ "4 c #FFCC00",
+ " ",
+ " 1 ",
+ " 11 ",
+ " 13411 ",
+ " 134443311 ",
+ " 1344444432 ",
+ " 1342114431 ",
+ " 11 1443 ",
+ " 1 1441 ",
+ " 141 ",
+ " 1331 ",
+ " 131 ",
+ " 131 ",
+ " 131 ",
+ " 11 ",
+ " "};
+
+static char *undo_x24[] = {
+ "24 24 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #996600",
+ "2 c #CC6600",
+ "3 c #CC9900",
+ "4 c #FF9900",
+ "5 c #FFCC00",
+ " ",
+ " ",
+ " 1 ",
+ " 11 ",
+ " 12531 ",
+ " 1355311 ",
+ " 135555533311 ",
+ " 15555555555411 ",
+ " 13555555555531 ",
+ " 13553113555531 ",
+ " 2531 135552 ",
+ " 111 135551 ",
+ " 1 3553 ",
+ " 13551 ",
+ " 1551 ",
+ " 1353 ",
+ " 1531 ",
+ " 1551 ",
+ " 1351 ",
+ " 151 ",
+ " 151 ",
+ " 131 ",
+ " 11 ",
+ " "};
+
+static char *undo_x32[] = {
+ "32 32 7 1",
+ " c None",
+ "0 c #000000",
+ "1 c #996600",
+ "2 c #CC6600",
+ "3 c #CC9900",
+ "4 c #FF9900",
+ "5 c #FFCC00",
+ " ",
+ " ",
+ " ",
+ " 1 ",
+ " 121 ",
+ " 12531 ",
+ " 135531 ",
+ " 13555551111 ",
+ " 135555555433211 ",
+ " 15555555555555531 ",
+ " 1355555555555555531 ",
+ " 255555555555555531 ",
+ " 135555112355555531 ",
+ " 125551 113555552 ",
+ " 1351 12555551 ",
+ " 121 2555531 ",
+ " 11 255551 ",
+ " 35552 ",
+ " 135531 ",
+ " 15551 ",
+ " 13551 ",
+ " 15531 ",
+ " 14531 ",
+ " 3551 ",
+ " 1551 ",
+ " 1551 ",
+ " 1351 ",
+ " 1351 ",
+ " 151 ",
+ " 111 ",
+ " ",
+ " "};
+
+static char **undo_xpm[3] = { undo_x16, undo_x24, undo_x32 };
+
diff --git a/app/bin/bitmaps/zoom-choose.xpm b/app/bin/bitmaps/zoom-choose.xpm new file mode 100644 index 0000000..4066455 --- /dev/null +++ b/app/bin/bitmaps/zoom-choose.xpm @@ -0,0 +1,127 @@ +static char *zoom_choose_x16[] = {
+ "16 16 13 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #333366",
+ "3 c #336666",
+ "4 c #666666",
+ "5 c #669999",
+ "6 c #6699CC",
+ "7 c #9999CC",
+ "8 c #99CCCC",
+ "9 c #99CCFF",
+ "A c #99FFFF",
+ "B c #CCFFFF",
+ " ",
+ " 13421 ",
+ " 249BBB93 ",
+ " 3BBBBBB92 ",
+ " 18500000650 ",
+ " 19934443981 ",
+ " 19B73438B81 ",
+ " 18BB415BB50 ",
+ " 3BBA5BBA3 ",
+ " 15ABBB931 ",
+ " 014431141 ",
+ " 0140 ",
+ " 0140 ",
+ " 0110 ",
+ " 010 ",
+ " "};
+
+static char *zoom_choose_x24[] = {
+ "24 24 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #9999CC",
+ "A c #99CCCC",
+ "B c #99CCFF",
+ "C c #99FFFF",
+ "D c #CCFFFF",
+ " ",
+ " 02220 ",
+ " 227ABA832 ",
+ " 37DDDDDDC93 ",
+ " 29DDDDDDDDDA3 ",
+ " 4DDDDDDDDDDD72 ",
+ " 2AD755555556CB2 ",
+ " 2CD725555525DD2 ",
+ " 0DDD4555554BDD4 ",
+ " 2DDDB45554ADDD4 ",
+ " 2BDDDA4557DDDD1 ",
+ " 2ADDDD754CDDDB2 ",
+ " 4DDDDC4BDDDD72 ",
+ " 27DDDDDDDDDA2 ",
+ " 37CDDDDDD7350 ",
+ " 0279AA6222520 ",
+ " 00220 05520 ",
+ " 05520 ",
+ " 2552 ",
+ " 2552 ",
+ " 02550 ",
+ " 0220 ",
+ " 0 ",
+ " "};
+
+static char *zoom_choose_x32[] = {
+ "32 32 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #666666",
+ "7 c #666699",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #9999CC",
+ "B c #99CCCC",
+ "C c #99CCFF",
+ "D c #99FFFF",
+ "E c #CCFFFF",
+ " ",
+ " ",
+ " 31560130 ",
+ " 36BEEEEEC83 ",
+ " 3AEEEEEEEEEC64 ",
+ " 4CEEEEEEEEEEEE83 ",
+ " 4BEEEEEEEEEEEEED5 ",
+ " 5EEEEEEEEEEEEEEEC3 ",
+ " 3CEDAAAAAAAAAAABEE5 ",
+ " 2EED333333333339EEB3 ",
+ " 4EEEC4666666666EEEB3 ",
+ " 6EEEE956666665CEEEC3 ",
+ " 08EEEEE6666665BEEEEC3 ",
+ " 5EEEEEC566668EEEEEB3 ",
+ " 3EEEEEEB5665EEEEEE80 ",
+ " 3BEEEEEE865CEEEEEE5 ",
+ " 5EEEEEEE5AEEEEEEB3 ",
+ " 38EEEEEEDEEEEEED3 ",
+ " 4BEEEEEEEEEEED530 ",
+ " 38DEEEEEEEEB36630 ",
+ " 33BCCEECB7336663 ",
+ " 33300330 036660 ",
+ " 036660 ",
+ " 036663 ",
+ " 066630 ",
+ " 066630 ",
+ " 366630 ",
+ " 36660 ",
+ " 03630 ",
+ " 000 ",
+ " ",
+ " "};
+
+static char **zoom_choose_xpm[3] = { zoom_choose_x16, zoom_choose_x24, zoom_choose_x32 };
+
diff --git a/app/bin/bitmaps/zoom-extent.xpm b/app/bin/bitmaps/zoom-extent.xpm new file mode 100644 index 0000000..17688da --- /dev/null +++ b/app/bin/bitmaps/zoom-extent.xpm @@ -0,0 +1,125 @@ +static char *zoom_extent_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #669999",
+ "7 c #990000",
+ "8 c #9999CC",
+ "9 c #99CCCC",
+ "A c #99CCFF",
+ "B c #CC0000",
+ "C c #CCFFFF",
+ "D c #800000",
+ " B BBB ",
+ "BBBBB BBBBB",
+ "BBB BBB",
+ "BB B B BB",
+ " B B B BB",
+ " D2523 ",
+ " 2ACC60 ",
+ " 06CCC92 ",
+ " 4CCC81 ",
+ " 36A93 ",
+ " 2220 ",
+ " B 00 B ",
+ "BB BB 000 B BB",
+ "BBBB 00 BBB",
+ "BBB BBB",
+ "BBBBB BBBBB"};
+
+static char *zoom_extent_x24[] = {
+ "24 24 12 1",
+ " c None",
+ "0 c #000000",
+ "1 c #333333",
+ "2 c #336666",
+ "3 c #666666",
+ "4 c #666699",
+ "5 c #669999",
+ "6 c #99CCCC",
+ "7 c #99CCFF",
+ "8 c #99FFFF",
+ "9 c #CC0000",
+ "A c #CCFFFF",
+ " ",
+ " 999999 999999 ",
+ " 999 99 ",
+ " 999 9 9 ",
+ " 9 9 9 9 ",
+ " 9 9 9 9 ",
+ " 9 9 9 9 ",
+ " 9 111 9 ",
+ " 1267621 ",
+ " 28AAA82 ",
+ " 16AAAAA61 ",
+ " 17AAAAA71 ",
+ " 16AAAAA61 ",
+ " 3AAAAA50 ",
+ " 147A752 ",
+ " 01010 ",
+ " 010 ",
+ " 9 99 010 9 9 ",
+ " 9 99 01 9 9 ",
+ " 9 99 010 9 9 ",
+ " 9 99 000 9 9 ",
+ " 999 99 ",
+ " 999999 999999 ",
+ " "};
+
+static char *zoom_extent_x32[] = {
+ "32 32 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #99CCCC",
+ "A c #99CCFF",
+ "B c #99FFFF",
+ "C c #CC0000",
+ "D c #CCFFFF",
+ " ",
+ " CCCCCCCC CCCCCCCC ",
+ " CCCCCCCC CCCCCCCC ",
+ " CCCCC CCCC ",
+ " CCCCC CCCCC ",
+ " CCCCCC CCC CC ",
+ " CC CCC CCC CC ",
+ " CC CCC CCC CC ",
+ " CC CCC CCC CC ",
+ " CC CC ",
+ " 20012 ",
+ " 369DDD94 ",
+ " 06DDDDDDA4 ",
+ " 2ADDDDDDD82 ",
+ " 4DDDDDDDDA2 ",
+ " 5DDDDDDDDA2 ",
+ " 3DDDDDDDDA2 ",
+ " 2ADDDDDDD72 ",
+ " 4BDDDDDA3 ",
+ " 49DDA84 ",
+ " 210210 ",
+ " 050 ",
+ " CC 0220 CC ",
+ " CC CCC 050 CCC CC ",
+ " CC CCC 050 CCC CC ",
+ " CC CCC 0220 CCC CC ",
+ " CC CCC 020 CCC CC ",
+ " CCCCC 00 CCCCC ",
+ " CCCC CCCC ",
+ " CCCCCCCC CCCCCCCC ",
+ " CCCCCCCC CCCCCCCC ",
+ " "};
+
+static char **zoom_extent_xpm[3] = { zoom_extent_x16, zoom_extent_x24, zoom_extent_x32 };
+
diff --git a/app/bin/bitmaps/zoom-in.xpm b/app/bin/bitmaps/zoom-in.xpm new file mode 100644 index 0000000..8f66a29 --- /dev/null +++ b/app/bin/bitmaps/zoom-in.xpm @@ -0,0 +1,128 @@ +static char *zoom_in_x16[] = {
+ "16 16 15 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #6699CC",
+ "9 c #9999CC",
+ "A c #99CCCC",
+ "B c #99CCFF",
+ "C c #99FFFF",
+ "D c #CCFFFF",
+ " 00 ",
+ " 227752 ",
+ " 37DB9CB5 ",
+ " 5DDA0BDC3 ",
+ " 2ADDA0BDD70 ",
+ " 2B6000007A2 ",
+ " 2BA97089AA1 ",
+ " 2ADDA0BDD70 ",
+ " 4CDA0BDB2 ",
+ " 4ADDCA22 ",
+ " 20022252 ",
+ " 0250 ",
+ " 0250 ",
+ " 0520 ",
+ " 022 ",
+ " 0 "};
+
+static char *zoom_in_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #9999CC",
+ "9 c #99CCCC",
+ "A c #99CCFF",
+ "B c #99FFFF",
+ "C c #CCFFFF",
+ " ",
+ " 0220220 ",
+ " 379BCA962 ",
+ " 39CCAAACC93 ",
+ " 2ACCC706CCC93 ",
+ " 27CCCC706CCCC70 ",
+ " 2ACCCC706CCCC92 ",
+ " 0CA888504888AB1 ",
+ " 3CA0000000009C3 ",
+ " 2CA6664026669C1 ",
+ " 2ACCCC706CCCCA2 ",
+ " 29CCCC706CCCC93 ",
+ " 3ACCC706CCCB4 ",
+ " 5CCCAAACCB52 ",
+ " 329CCCCB93250 ",
+ " 225541205520 ",
+ " 05520 ",
+ " 2552 ",
+ " 2552 ",
+ " 02550 ",
+ " 02550 ",
+ " 0520 ",
+ " 00 ",
+ " "};
+
+static char *zoom_in_x32[] = {
+ "32 32 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #666666",
+ "7 c #666699",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #9999CC",
+ "B c #99CCCC",
+ "C c #99CCFF",
+ "D c #99FFFF",
+ "E c #CCFFFF",
+ " ",
+ " 0000 ",
+ " 338AA9653 ",
+ " 4BEEEEEEEB53 ",
+ " 35CEEEEEEEEEEB4 ",
+ " 07EEEEE700CEEEE83 ",
+ " 3CEEEEE700CEEEEE7 ",
+ " 38EEEEEE700CEEEEEC3 ",
+ " 1EEEEEEE700CEEEEEE5 ",
+ " 4EEEEEEE700CEEEEEE90 ",
+ " 6EE8000000000000CEB3 ",
+ " 08EE8000000000000CEB3 ",
+ " 08EE8000000000000CEB3 ",
+ " 5EEEEEEE700CEEEEEEA2 ",
+ " 3DEEEEEE700CEEEEEE6 ",
+ " 3BEEEEEE700CEEEEEC4 ",
+ " 4CEEEEE700CEEEEE5 ",
+ " 6EEEEE977CEEEEB3 ",
+ " 38DEEEEEEEEEE8330 ",
+ " 33BEEEEEEEC63663 ",
+ " 3469AA853036663 ",
+ " 0000 036660 ",
+ " 036660 ",
+ " 066630 ",
+ " 066630 ",
+ " 36663 ",
+ " 36660 ",
+ " 036660 ",
+ " 03660 ",
+ " 030 ",
+ " 0 ",
+ " "};
+
+static char **zoom_in_xpm[3] = { zoom_in_x16, zoom_in_x24, zoom_in_x32 };
+
diff --git a/app/bin/bitmaps/zoom-out.xpm b/app/bin/bitmaps/zoom-out.xpm new file mode 100644 index 0000000..c37242d --- /dev/null +++ b/app/bin/bitmaps/zoom-out.xpm @@ -0,0 +1,127 @@ +static char *zoom_out_x16[] = {
+ "16 16 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #9999CC",
+ "9 c #99CCCC",
+ "A c #99CCFF",
+ "B c #99FFFF",
+ "C c #CCFFFF",
+ " 00 ",
+ " 227752 ",
+ " 37CCCCA5 ",
+ " 5CCCCCCB3 ",
+ " 29CCCCCCC70 ",
+ " 2A600000792 ",
+ " 2A988888991 ",
+ " 29CCCCCCC70 ",
+ " 4BCCCCCA2 ",
+ " 49CCB922 ",
+ " 20022252 ",
+ " 0250 ",
+ " 0250 ",
+ " 0520 ",
+ " 022 ",
+ " 0 "};
+
+static char *zoom_out_x24[] = {
+ "24 24 14 1",
+ " c None",
+ "0 c #000000",
+ "1 c #003333",
+ "2 c #333333",
+ "3 c #333366",
+ "4 c #336666",
+ "5 c #666666",
+ "6 c #666699",
+ "7 c #669999",
+ "8 c #9999CC",
+ "9 c #99CCCC",
+ "A c #99CCFF",
+ "B c #99FFFF",
+ "C c #CCFFFF",
+ " ",
+ " 0220220 ",
+ " 379BCA962 ",
+ " 39CCCCCCC93 ",
+ " 2ACCCCCCCCC93 ",
+ " 27CCCCCCCCCCC70 ",
+ " 2ACCCCCCCCCCC92 ",
+ " 0CA888888888AB1 ",
+ " 3CA0000000009C3 ",
+ " 2CA6666666669C1 ",
+ " 2ACCCCCCCCCCCA2 ",
+ " 29CCCCCCCCCCC93 ",
+ " 3ACCCCCCCCCB4 ",
+ " 5CCCCCCCCB52 ",
+ " 329CCCCB93250 ",
+ " 225541205520 ",
+ " 05520 ",
+ " 2552 ",
+ " 2552 ",
+ " 02550 ",
+ " 02550 ",
+ " 0520 ",
+ " 00 ",
+ " "};
+
+static char *zoom_out_x32[] = {
+ "32 32 16 1",
+ " c None",
+ "0 c #000000",
+ "1 c #000033",
+ "2 c #003333",
+ "3 c #333333",
+ "4 c #333366",
+ "5 c #336666",
+ "6 c #666666",
+ "7 c #666699",
+ "8 c #669999",
+ "9 c #6699CC",
+ "A c #9999CC",
+ "B c #99CCCC",
+ "C c #99CCFF",
+ "D c #99FFFF",
+ "E c #CCFFFF",
+ " ",
+ " 0000 ",
+ " 338AA9653 ",
+ " 4BEEEEEEEB53 ",
+ " 35CEEEEEEEEEEB4 ",
+ " 07EEEEEEEEEEEEE83 ",
+ " 3CEEEEEEEEEEEEEE7 ",
+ " 38EEEEEEEEEEEEEEEC3 ",
+ " 1EEEEEEEEEEEEEEEEE5 ",
+ " 4EEEEEEEEEEEEEEEEE90 ",
+ " 6EE8000000000000CEB3 ",
+ " 08EE8000000000000CEB3 ",
+ " 08EE8000000000000CEB3 ",
+ " 5EEEEEEEEEEEEEEEEEA2 ",
+ " 3DEEEEEEEEEEEEEEEE6 ",
+ " 3BEEEEEEEEEEEEEEEC4 ",
+ " 4CEEEEEEEEEEEEEE5 ",
+ " 6EEEEEEEEEEEEEB3 ",
+ " 38DEEEEEEEEEE8330 ",
+ " 33BEEEEEEEC63663 ",
+ " 3469AA853036663 ",
+ " 0000 036660 ",
+ " 036660 ",
+ " 066630 ",
+ " 066630 ",
+ " 36663 ",
+ " 36660 ",
+ " 036660 ",
+ " 03660 ",
+ " 030 ",
+ " 0 ",
+ " "};
+
+static char **zoom_out_xpm[3] = { zoom_out_x16, zoom_out_x24, zoom_out_x32 };
+
diff --git a/app/bin/bitmaps/zoom.xpm b/app/bin/bitmaps/zoom.xpm deleted file mode 100644 index 6b845a5..0000000 --- a/app/bin/bitmaps/zoom.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * zoom_xpm[] = { -"16 16 5 1", -" c None", -"- c #FFFFFFFFFFFF", -". c #000000000000", -"X c #0000FFFFFFFF", -"o c #FFFF7DF70000", -" ..... ", -" ..-XXXX.. ", -" .----XXX. ", -".--.---.--. ", -".-...-.---. ", -".--.-.----. ", -".---.-...-. ", -".XX.------. ", -" .XXX----. ", -" ..XXX--... ", -" ..... .o. ", -" .o. ", -" .o. ", -" .o. ", -" .. ", -" "}; diff --git a/app/bin/bitmaps/zoomin.xpm b/app/bin/bitmaps/zoomin.xpm deleted file mode 100644 index 4b6f8d5..0000000 --- a/app/bin/bitmaps/zoomin.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * zoomin_xpm[] = { -"16 16 5 1", -" c None", -"- c #FFFFFFFFFFFF", -". c #000000000000", -"X c #0000FFFFFFFF", -"o c #FFFF7DF70000", -" ..... ", -" ..-XXXX.. ", -" .----XXX. ", -".-.--.--.-. ", -"........... . ", -".-.--.--.-. ....", -"........... . ", -".X.--.--.-. ", -" .XXX----. ", -" ..XXX--.o. ", -" ..... .o. ", -" .o. ", -" .o. ", -" .o. ", -" .. ", -" "}; diff --git a/app/bin/bitmaps/zoomout.xpm b/app/bin/bitmaps/zoomout.xpm deleted file mode 100644 index 8d8d442..0000000 --- a/app/bin/bitmaps/zoomout.xpm +++ /dev/null @@ -1,24 +0,0 @@ -/* XPM */ -static char * zoomout_xpm[] = { -"16 16 5 1", -" c None", -"- c #FFFFFFFFFFFF", -". c #000000000000", -"X c #0000FFFFFFFF", -"o c #FFFF7DF70000", -" ..... ", -" ..-XXXX.. ", -" .----XXX. ", -".---------. . ", -".-.--.--.-. ....", -"........... . ", -".-.--.--.-. ....", -".XX-------. . ", -" .XXX----. ", -" ..XXX--... ", -" ..... .o. ", -" .o. ", -" .o. ", -" .o. ", -" .. ", -" "}; diff --git a/app/bin/cJSON.c b/app/bin/cJSON.c index 1733811..ee641fc 100755 --- a/app/bin/cJSON.c +++ b/app/bin/cJSON.c @@ -1,4 +1,4 @@ -/* +/** Copyright (c) 2009-2017 Dave Gamble and cJSON contributors Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/bin/cJSON.h b/app/bin/cJSON.h index 8d45390..291d694 100755 --- a/app/bin/cJSON.h +++ b/app/bin/cJSON.h @@ -1,4 +1,4 @@ -/* +/** Copyright (c) 2009-2017 Dave Gamble and cJSON contributors Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/app/bin/cbezier.c b/app/bin/cbezier.c index 7f90a27..22c95ba 100644 --- a/app/bin/cbezier.c +++ b/app/bin/cbezier.c @@ -42,7 +42,7 @@ */ -#include "track.h" +#include "common.h" #include "draw.h" #include "ccurve.h" #include "cbezier.h" @@ -50,15 +50,14 @@ #include "cstraigh.h" #include "drawgeom.h" #include "cjoin.h" -#include "i18n.h" #include "common.h" +#include "track.h" #include "wcolors.h" -#include "math.h" -#include "utility.h" #include "param.h" #include "fileio.h" #include "layout.h" #include "cundo.h" +#include "compound.h" extern drawCmd_t tempD; @@ -385,7 +384,7 @@ EXPORT BOOL_T ConvertToArcs (coOrd pos[4], dynArr_t * segs, BOOL_T track, wDrawC end_point = getPoint(pos, t_e); //End of trial Arc PlotCurve( crvCmdFromChord, start_point, end_point, mid_point, - &(arc.curveData), TRUE ); //Find Arc through three points + &(arc.curveData), FALSE, 0.0 ); //Find Arc through three points arc.start = t_s; //remember start arc.end = t_e; //remember end @@ -615,7 +614,7 @@ EXPORT STATUS_T AdjustBezCurve( case C_DOWN: if (Da.state != PICK_POINT) return C_CONTINUE; - dd = 10000.0; + dd = DIST_INF; Da.selectPoint = -1; for (int i=0;i<4;i++) { d = FindDistance(Da.pos[i],pos); @@ -803,10 +802,6 @@ EXPORT STATUS_T AdjustBezCurve( } -struct extraData { - BezierData_t bezierData; - }; - /* * CmdBezModify * @@ -825,13 +820,12 @@ struct extraData { */ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) { BOOL_T track = TRUE; - track_p t; double width = 1.0; long mode = 0; long cmd; - struct extraData *xx = GetTrkExtraData(trk); - cmd = (long)commandContext; + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + cmd = VP2L(commandContext); Da.trackGauge = trackG; switch (action&0xFF) { @@ -854,30 +848,30 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) Da.selectTrack = trk; - for (int i=0;i<4;i++) Da.pos[i] = xx->bezierData.pos[i]; //Copy parms from old trk + for (int i=0;i<4;i++) Da.pos[i] = xx->pos[i]; //Copy parms from old trk InfoMessage(_("%s picked - now select a Point"),track?"Track":"Line"); Da.state = TRACK_SELECTED; DrawTrack(Da.selectTrack,&mainD,wDrawColorWhite); //Wipe out real track, draw replacement - return AdjustBezCurve(C_START, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + return AdjustBezCurve(C_START, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); case wActionMove: if (Da.state == NONE) return C_CONTINUE; - return AdjustBezCurve(wActionMove, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + return AdjustBezCurve(wActionMove, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); case C_DOWN: if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up UndrawNewTrack( Da.selectTrack ); - return AdjustBezCurve(C_DOWN, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + return AdjustBezCurve(C_DOWN, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); case C_MOVE: if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up and down - return AdjustBezCurve(C_MOVE, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + return AdjustBezCurve(C_MOVE, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); case C_UP: if (Da.state == TRACK_SELECTED) { Da.state = PICK_POINT; //First time up, next time pick a point } - return AdjustBezCurve(C_UP, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); //Run Adjust + return AdjustBezCurve(C_UP, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); //Run Adjust case C_TEXT: if ((action>>8) != 32) @@ -890,22 +884,18 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) return C_CANCEL; } UndoStart( _("Modify Bezier"), "newBezier - CR" ); - if (Da.track) t = NewBezierTrack( Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); - else t = NewBezierLine(Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt,xx->bezierData.segsColor,xx->bezierData.segsWidth); - - if (Da.track) CopyAttributes( trk, t ); + UndoModify( trk ); - Da.state = NONE; //Must do before Delete for redraw - DeleteTrack(trk, TRUE); - - if (Da.track) { - for (int i=0;i<2;i++) { //Attach new track - if (Da.trk[i] != NULL && Da.ep[i] != -1) { //Like the old track - ConnectAbuttingTracks(t,i,Da.trk[i],Da.ep[i]); - } - } + Da.state = NONE; + wDrawColor color = wDrawColorBlack; + DIST_T width = 0; + if ( !Da.track ) { + color = xx->segsColor; + width = xx->segsWidth; } - DrawNewTrack( t ); + SetBezierData( trk, Da.pos, xx->segsColor, xx->segsWidth ); + + DrawNewTrack( trk ); UndoEnd(); InfoMessage(_("Modify Bezier Complete")); return C_TERMINATE; @@ -916,7 +906,7 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) return C_TERMINATE; case C_REDRAW: - return AdjustBezCurve(C_REDRAW, pos, Da.track, xx->bezierData.segsColor, xx->bezierData.segsWidth, InfoMessage); + return AdjustBezCurve(C_REDRAW, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); } return C_CONTINUE; @@ -961,7 +951,7 @@ DIST_T BezierOffsetLength(dynArr_t segs, double offset) { DIST_T BezierMinRadius(coOrd pos[4],dynArr_t segs) { - DIST_T r = 100000.0, rr; + DIST_T r = DIST_INF, rr; if (segs.cnt == 0 ) return r; for (int i = 0;i<segs.cnt;i++) { trkSeg_t t = DYNARR_N(trkSeg_t, segs, i); @@ -969,7 +959,7 @@ DIST_T BezierMinRadius(coOrd pos[4],dynArr_t segs) { rr = fabs(t.u.c.radius); } else if (t.type == SEG_BEZLIN || t.type == SEG_BEZTRK) { rr = BezierMinRadius(t.u.b.pos, t.bezSegs); - } else rr = 100000.00; + } else rr = DIST_INF; if (rr<r) r = rr; } return r; @@ -1003,12 +993,14 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) { track_p t; static int segCnt; + static BOOL_T lock; + static coOrd movePos; STATUS_T rc = C_CONTINUE; long curveMode = 0; long cmd; if (action>>8) { cmd = action>>8; - } else cmd = (long)commandContext; + } else cmd = VP2L(commandContext); Da.width = (double)lineWidth/mainD.dpi; @@ -1047,7 +1039,8 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) int end = Da.state==POS_1?0:1; EPINX_T ep; if (Da.track) { - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == 0) { //Snap Track + if (lock) { + pos = movePos; if ((t = OnTrack(&p, FALSE, TRUE)) != NULL) { ep = PickUnconnectedEndPointSilent(p, t); if (ep != -1) { @@ -1066,16 +1059,9 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) } } } else { //Snap Bez Line to Lines - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == 0) { - if ((t = OnTrack(&p,FALSE, FALSE)) != NULL) { - if (GetClosestEndPt(t,&p)) { - pos = p; - found = TRUE; - } - } - } + if (lock) + pos = movePos; } - if (!found) SnapPos( &pos ); if (Da.state == POS_1) { Da.pos[0] = pos; Da.pos[1] = pos; @@ -1101,12 +1087,15 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); - if ( Da.state != POS_1 && Da.state != POS_2) return C_CONTINUE; + lock = FALSE; + if ( Da.state != POS_1 && Da.state != POS_2) return C_CONTINUE; //Don't snap CPs if (Da.track) { - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == 0) { + if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap) { if ((t = OnTrack(&pos, FALSE, TRUE)) != NULL) { EPINX_T ep = PickUnconnectedEndPointSilent(pos, t); if (ep != -1) { + lock = TRUE; + movePos = pos; if (GetTrkGauge(t) == GetScaleTrackGauge(GetLayoutCurScale())) { pos = GetTrkEndPos(t, ep); CreateEndAnchor(pos,FALSE); @@ -1115,15 +1104,21 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) } } } else { - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == 0) { + if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap) { if ((t = OnTrack(&pos,FALSE, FALSE)) != NULL) { CreateEndAnchor(pos,TRUE); + lock = TRUE; + movePos = pos; } } } - if (anchors_da.cnt) - return C_CONTINUE; - + if (!lock && SnapPos(&pos)) { + CreateEndAnchor(pos,TRUE); + lock = TRUE; + movePos = pos; + } + if (anchors_da.cnt) return C_CONTINUE; + /* no break */ case C_MOVE: if (Da.state == POS_1) { InfoMessage( _("Place 1st endpoint of Bezier - snap to %s"), Da.track?"unconnected track":"line" ); @@ -1224,8 +1219,8 @@ void UpdateParms(wDrawColor color,long width) { } -#include "bitmaps/bezier.xpm" -#include "bitmaps/dbezier.xpm" +#include "bitmaps/bezier-track.xpm" +#include "bitmaps/bezier-line.xpm" EXPORT void InitCmdBezier( wMenu_p menu ) { diff --git a/app/bin/cbezier.h b/app/bin/cbezier.h index 49b818f..74ef51f 100644 --- a/app/bin/cbezier.h +++ b/app/bin/cbezier.h @@ -21,8 +21,6 @@ */ #include "common.h" -#include "wlib.h" -#include "utility.h" extern dynArr_t tempEndPts_da; @@ -37,16 +35,16 @@ extern dynArr_t tempEndPts_da; extern wDrawColor lineColor; extern long lineWidth; -typedef void (*bezMessageProc)( char *, ... ); +typedef void (*bezMessageProc)( const char *, ... ); STATUS_T CmdBezCurve( wAction_t, coOrd); STATUS_T CmdBezModify(track_p, wAction_t, coOrd, DIST_T); STATUS_T CreateBezier( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, bezMessageProc ); DIST_T BezierDescriptionDistance( coOrd, track_p, coOrd *, BOOL_T, BOOL_T * ); STATUS_T BezierDescriptionMove( track_p, wAction_t, coOrd ); -BOOL_T GetBezierMiddle( track_p, coOrd * ); + BOOL_T ConvertToArcs (coOrd[4], dynArr_t *, BOOL_T, wDrawColor, DIST_T); -track_p NewBezierTrack(coOrd[4], trkSeg_t *, int); +track_p NewBezierTrack(coOrd[4], trkSeg_p, int); double BezierLength(coOrd[4], dynArr_t); double BezierOffsetLength(dynArr_t,double offset); double BezierMinRadius(coOrd[4],dynArr_t); diff --git a/app/bin/cblock.c b/app/bin/cblock.c index b395306..0291b4a 100644 --- a/app/bin/cblock.c +++ b/app/bin/cblock.c @@ -46,24 +46,19 @@ * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cblock.c,v 1.5 2009-11-23 19:46:16 rheller Exp $ */ -#include <ctype.h> -#include <stdlib.h> -#include <string.h> - +#include "common.h" #include "compound.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" #include "trackx.h" -#include "utility.h" +#include "common-ui.h" -#ifdef WINDOWS +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS +#endif // UTFCONVERT EXPORT TRKTYP_T T_BLOCK = -1; @@ -78,19 +73,20 @@ static void NoDrawString( drawCmd_p d, coOrd p, ANGLE_T a, char * s, wFont_p fp, FONTSIZE_T fontSize, wDrawColor color ) {} static void NoDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, wDrawColor color) {} -static void NoDrawFillPoly( drawCmd_p d, int cnt, coOrd * pts, int * types, - wDrawColor color, wDrawWidth width, int fill, int open) {} +static void NoDrawPoly( drawCmd_p d, int cnt, coOrd * pts, int * types, + wDrawColor color, wDrawWidth width, drawFill_e eFillOpt ) {} static void NoDrawFillCircle( drawCmd_p d, coOrd p, DIST_T r, wDrawColor color ) {} +static void NoDrawRectangle( drawCmd_p d, coOrd orig, coOrd size, wDrawColor color, drawFill_e eFill ) {} static drawFuncs_t noDrawFuncs = { - 0, NoDrawLine, NoDrawArc, NoDrawString, NoDrawBitMap, - NoDrawFillPoly, - NoDrawFillCircle }; + NoDrawPoly, + NoDrawFillCircle, + NoDrawRectangle}; static drawCmd_t blockD = { NULL, @@ -108,10 +104,10 @@ static track_p first_block; static track_p last_block; static paramData_t blockPLs[] = { -/*0*/ { PD_STRING, blockName, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof( blockName )}, -/*1*/ { PD_STRING, blockScript, "script", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Script"), 0, 0, sizeof( blockScript)} +/*0*/ { PD_STRING, blockName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof( blockName )}, +/*1*/ { PD_STRING, blockScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof( blockScript)} }; -static paramGroup_t blockPG = { "block", 0, blockPLs, sizeof blockPLs/sizeof blockPLs[0] }; +static paramGroup_t blockPG = { "block", 0, blockPLs, COUNT( blockPLs ) }; static wWin_p blockW; static char blockEditName[STR_SHORT_SIZE]; @@ -120,11 +116,11 @@ static char blockEditSegs[STR_LONG_SIZE]; static track_p blockEditTrack; static paramData_t blockEditPLs[] = { -/*0*/ { PD_STRING, blockEditName, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(blockEditName)}, -/*1*/ { PD_STRING, blockEditScript, "script", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Script"), 0, 0, sizeof(blockEditScript)}, -/*2*/ { PD_STRING, blockEditSegs, "segments", PDO_NOPREF, (void*)350, N_("Segments"), BO_READONLY }, +/*0*/ { PD_STRING, blockEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(blockEditName)}, +/*1*/ { PD_STRING, blockEditScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof(blockEditScript)}, +/*2*/ { PD_STRING, blockEditSegs, "segments", PDO_NOPREF, I2VP(350), N_("Segments"), BO_READONLY, 0, sizeof(blockEditSegs) }, }; -static paramGroup_t blockEditPG = { "block", 0, blockEditPLs, sizeof blockEditPLs/sizeof blockEditPLs[0] }; +static paramGroup_t blockEditPG = { "block", 0, blockEditPLs, COUNT( blockEditPLs ) }; static wWin_p blockEditW; typedef struct btrackinfo_t { @@ -133,12 +129,14 @@ typedef struct btrackinfo_t { } btrackinfo_t, *btrackinfo_p; static dynArr_t blockTrk_da; + #define blockTrk(N) DYNARR_N( btrackinfo_t , blockTrk_da, N ) #define tracklist(N) (&(xx->trackList))[N] typedef struct blockData_t { + extraDataBase_t base; char * name; char * script; BOOL_T IsHilite; @@ -149,7 +147,7 @@ typedef struct blockData_t { static blockData_p GetblockData ( track_p trk ) { - return (blockData_p) GetTrkExtraData(trk); + return GET_EXTRA_DATA( trk, T_BLOCK, blockData_t ); } static void DrawBlock (track_p t, drawCmd_p d, wDrawColor color ) @@ -393,9 +391,9 @@ static BOOL_T WriteBlock ( track_p t, FILE * f ) blockData_p xx = GetblockData(t); char *blockName = MyStrdup(xx->name); -#ifdef WINDOWS +#ifdef UTFCONVERT blockName = Convert2UTF8(blockName); -#endif // WINDOWS +#endif // UTFCONVERT rc &= fprintf(f, "BLOCK %d \"%s\" \"%s\"\n", GetTrkIndex(t), blockName, xx->script)>0; @@ -426,11 +424,12 @@ static BOOL_T ReadBlock ( char * line ) return FALSE; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(name); -#endif // WINDOWS +#endif // UTFCONVERT + - DYNARR_RESET( btrackinfo_p , blockTrk_da ); + DYNARR_RESET( btrackinfo_t , blockTrk_da ); while ( (cp = GetNextLine()) != NULL ) { if ( IsEND( END_BLOCK ) ) { break; @@ -442,12 +441,12 @@ static BOOL_T ReadBlock ( char * line ) if ( strncmp( cp, "TRK", 3 ) == 0 ) { if (!GetArgs(cp+4,"d",&trkindex)) return FALSE; /*trk = FindTrack(trkindex);*/ - DYNARR_APPEND( btrackinfo_p *, blockTrk_da, 10 ); - blockTrk(blockTrk_da.cnt-1).i = trkindex; + DYNARR_APPEND( btrackinfo_t, blockTrk_da, 10 ); + DYNARR_LAST( btrackinfo_t, blockTrk_da ).i = trkindex; } } /*blockCheckContigiousPath(); save for ResolveBlockTracks */ - trk = NewTrack(index, T_BLOCK, tempEndPts_da.cnt, sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt-1))+1); + trk = NewTrack(index, T_BLOCK, tempEndPts_da.cnt, sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt))+1); for ( ep=0; ep<tempEndPts_da.cnt; ep++) { endPtP = &tempEndPts(ep); SetTrkEndPoint( trk, ep, endPtP->pos, endPtP->angle ); @@ -771,7 +770,7 @@ static STATUS_T CmdBlock (wAction_t action, coOrd pos ) { LOG( log_block, 1, ("*** CmdBlock(%08x,{%f,%f})\n",action,pos.x,pos.y)) - switch ((long)commandContext) { + switch (VP2L(commandContext)) { case BLOCK_CREATE: return CmdBlockCreate(action,pos); case BLOCK_EDIT: return CmdBlockEdit(action,pos); case BLOCK_DELETE: return CmdBlockDelete(action,pos); @@ -857,13 +856,10 @@ static POS_T blkhiliteBorder; static wDrawColor blkhiliteColor = 0; static void DrawBlockTrackHilite( void ) { - wPos_t x, y, w, h; if (blkhiliteColor==0) blkhiliteColor = wDrawColorGray(87); - w = (wPos_t)((blkhiliteSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((blkhiliteSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,blkhiliteOrig,&x,&y); - wDrawFilledRectangle( mainD.d, x, y, w, h, blkhiliteColor, wDrawOptTemp|wDrawOptTransparent ); + // This is incomplete. We should be in temp drawing mode and clearing temp draw on UN_HILIGHT + DrawRectangle( &tempD, blkhiliteOrig, blkhiliteSize, blkhiliteColor, DRAW_TRANSPARENT ); } @@ -984,11 +980,11 @@ EXPORT void BlockMgmLoad( void ) static wIcon_p blockI = NULL; if ( blockI == NULL) - blockI = wIconCreatePixMap( block_xpm ); + blockI = wIconCreatePixMap( block_xpm[iconSize] ); TRK_ITERATE(trk) { if (GetTrkType(trk) != T_BLOCK) continue; - ContMgmLoad( blockI, BlockMgmProc, (void *)trk ); + ContMgmLoad( blockI, BlockMgmProc, trk ); } } @@ -998,7 +994,7 @@ EXPORT void InitCmdBlock( wMenu_p menu ) blockName[0] = '\0'; blockScript[0] = '\0'; AddMenuButton( menu, CmdBlockCreate, "cmdBlockCreate", _("Block"), - wIconCreatePixMap( block_xpm ), LEVEL0_50, + wIconCreatePixMap( block_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_BLOCK1, NULL ); ParamRegister( &blockPG ); } @@ -1008,6 +1004,10 @@ EXPORT void InitTrkBlock( void ) { T_BLOCK = InitObject ( &blockCmds ); log_block = LogFindIndex ( "block" ); + blockTrk_da.max = 0; + blockTrk_da.cnt = 0; + blockTrk_da.ptr = NULL; + last_block = NULL; } diff --git a/app/bin/ccontrol.c b/app/bin/ccontrol.c index 793acc3..a4f9b27 100644 --- a/app/bin/ccontrol.c +++ b/app/bin/ccontrol.c @@ -46,23 +46,19 @@ static const char rcsid[] = "@(#) : $Id$"; -#include <ctype.h> -#include <string.h> - #include "compound.h" +#include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" #include "param.h" #include "track.h" #include "trackx.h" -#ifdef WINDOWS +#include "common-ui.h" +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS -#include "utility.h" -#include "messages.h" +#endif // UTFCONVERT EXPORT TRKTYP_T T_CONTROL = -1; @@ -85,6 +81,7 @@ static char controlOffScript[STR_LONG_SIZE]; #endif typedef struct controlData_t { + extraDataBase_t base; coOrd orig; BOOL_T IsHilite; char * name; @@ -94,7 +91,7 @@ typedef struct controlData_t { static controlData_p GetcontrolData ( track_p trk ) { - return (controlData_p) GetTrkExtraData(trk); + return GET_EXTRA_DATA( trk, T_CONTROL, controlData_t ); } #define RADIUS 6 @@ -310,9 +307,9 @@ static BOOL_T WriteControl ( track_p t, FILE * f ) controlData_p xx = GetcontrolData(t); char *controlName = MyStrdup(xx->name); -#ifdef WINDOWS +#ifdef UTFCONVERT controlName = Convert2UTF8(controlName); -#endif // WINDOWS +#endif // UTFCONVERT rc &= fprintf(f, "CONTROL %d %u %s %d %0.6f %0.6f \"%s\" \"%s\" \"%s\"\n", GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), @@ -340,9 +337,9 @@ static BOOL_T ReadControl ( char * line ) return FALSE; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(name); -#endif // WINDOWS +#endif // UTFCONVERT trk = NewTrack(index, T_CONTROL, 0, sizeof(controlData_t)); SetTrkVisible(trk, visible); @@ -422,18 +419,18 @@ static char controlEditOffScript[STR_LONG_SIZE]; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramData_t controlEditPLs[] = { #define I_CONTROLNAME (0) - /*0*/ { PD_STRING, controlEditName, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(controlEditName) }, + /*0*/ { PD_STRING, controlEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(controlEditName) }, #define I_ORIGX (1) /*1*/ { PD_FLOAT, &controlEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Origin X") }, #define I_ORIGY (2) /*2*/ { PD_FLOAT, &controlEditOrig.y, "origy", PDO_DIM, &r_1000_1000, N_("Origin Y") }, #define I_CONTROLONSCRIPT (3) - /*3*/ { PD_STRING, controlEditOnScript, "script", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("On Script"), 0, 0, sizeof(controlEditOnScript)}, + /*3*/ { PD_STRING, controlEditOnScript, "script", PDO_NOPREF, I2VP(350), N_("On Script"), 0, 0, sizeof(controlEditOnScript)}, #define I_CONTROLOFFSCRIPT (4) - /*4*/ { PD_STRING, controlEditOffScript, "script", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Off Script"), 0, 0, sizeof(controlEditOffScript)}, + /*4*/ { PD_STRING, controlEditOffScript, "script", PDO_NOPREF, I2VP(350), N_("Off Script"), 0, 0, sizeof(controlEditOffScript)}, }; -static paramGroup_t controlEditPG = { "controlEdit", 0, controlEditPLs, sizeof controlEditPLs/sizeof controlEditPLs[0] }; +static paramGroup_t controlEditPG = { "controlEdit", 0, controlEditPLs, COUNT( controlEditPLs ) }; static wWin_p controlEditW; static void ControlEditOk ( void * junk ) @@ -524,6 +521,7 @@ static STATUS_T CmdControl ( wAction_t action, coOrd pos ) switch (action) { case C_START: InfoMessage(_("Place control")); + SetAllTrackSelect( FALSE ); create = FALSE; return C_CONTINUE; case C_DOWN: @@ -553,13 +551,9 @@ static POS_T ctlhiliteBorder; static wDrawColor ctlhiliteColor = 0; static void DrawControlTrackHilite( void ) { - wPos_t x, y, w, h; if (ctlhiliteColor==0) ctlhiliteColor = wDrawColorGray(87); - w = (wPos_t)((ctlhiliteSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((ctlhiliteSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,ctlhiliteOrig,&x,&y); - wDrawFilledRectangle( mainD.d, x, y, w, h, ctlhiliteColor, wDrawOptTemp|wDrawOptTransparent ); + DrawRectangle( &tempD, ctlhiliteOrig, ctlhiliteSize, ctlhiliteColor, DRAW_TRANSPARENT ); } static int ControlMgmProc ( int cmd, void * data ) @@ -624,12 +618,12 @@ EXPORT void ControlMgmLoad ( void ) static wIcon_p controlI = NULL; if (controlI == NULL) { - controlI = wIconCreatePixMap( control_xpm ); + controlI = wIconCreatePixMap( control_xpm[iconSize] ); } TRK_ITERATE(trk) { if (GetTrkType(trk) != T_CONTROL) continue; - ContMgmLoad (controlI, ControlMgmProc, (void *) trk ); + ContMgmLoad (controlI, ControlMgmProc, trk ); } } @@ -638,7 +632,7 @@ EXPORT void ControlMgmLoad ( void ) EXPORT void InitCmdControl ( wMenu_p menu ) { AddMenuButton( menu, CmdControl, "cmdControl", _("Control"), - wIconCreatePixMap( control_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CONTROL, NULL ); + wIconCreatePixMap( control_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CONTROL, NULL ); } EXPORT void InitTrkControl ( void ) diff --git a/app/bin/ccornu.c b/app/bin/ccornu.c index fd51755..f447d64 100644 --- a/app/bin/ccornu.c +++ b/app/bin/ccornu.c @@ -79,18 +79,13 @@ #include "cstraigh.h" #include "drawgeom.h" #include "cjoin.h" -#include "i18n.h" #include "common.h" -#include "utility.h" -#include "math.h" #include "param.h" #include "layout.h" #include "cundo.h" -#include "messages.h" #include "cselect.h" #include "fileio.h" - -#include <stdint.h> +#include "common-ui.h" extern drawCmd_t tempD; extern TRKTYP_T T_BEZIER; @@ -194,7 +189,7 @@ static char * CmdCornuHotBarProc( case HB_SELECT: CmdCornu( C_CANCEL, zero ); curCornu = trkseg; - DoCommandB( (void*)(intptr_t)cornuHotBarCmdInx ); + DoCommandB( I2VP(cornuHotBarCmdInx) ); return NULL; case HB_LISTTITLE: sprintf(message,_("%s FlexTrack"),GetScaleName(GetLayoutCurScale())); @@ -253,7 +248,7 @@ EXPORT void AddHotBarCornu( void ) hotB.txt.u.t.boxed = TRUE; hotB.txt.u.t.string = MyStrdup(_(" FLEX ")); hotB.txt.u.t.fontP = NULL; - hotB.txt.u.t.fontSize = 160.0*ratio; + hotB.txt.u.t.fontSize = 160*mainD.dpi/72.0*ratio; hotB.txt.u.t.angle = 0.0; char * label = MyMalloc(256); @@ -342,7 +337,7 @@ int createEndPoint( endHandle->end_curve = zero; endHandle->end_valid = TRUE; endHandle->mid_disp = 0.0; - DIST_T end_length = 20*trackGauge; + DIST_T end_length = tempD.scale*2.0; Translate(&endHandle->end_curve,pos0,angle,end_length); Translate(&endHandle->end_center,pos0,angle,end_length/2); if (radius>0.0) { @@ -358,7 +353,7 @@ int createEndPoint( Rotate(&cm,endHandle->end_curve,-a ); endHandle->mid_disp = cm.x-endHandle->end_curve.x; curveData_t curveData; - PlotCurve(crvCmdFromCenter,pos0,endHandle->end_center, endHandle->end_curve, &curveData, FALSE); + PlotCurve(crvCmdFromCenter,pos0,endHandle->end_center, endHandle->end_curve, &curveData, FALSE, 0.0); if (curveData.type == curveTypeStraight) { coOrd pos_line[2]; Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)+90,trackGauge/2); @@ -486,7 +481,6 @@ static void CreateCornuEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; anchors(i).width = 0; - } static void CreateCornuExtendAnchor(coOrd p, ANGLE_T a, wBool_t selected) { @@ -992,9 +986,6 @@ track_p CreateCornuFromPoints(coOrd pos[2],BOOL_T track_end[2]) { } -struct extraData { - cornuData_t cornuData; - }; ANGLE_T GetOpenAngle(coOrd pos[2],ANGLE_T angle[2],int moved) { ANGLE_T a = FindAngle(pos[1-moved],pos[moved]); @@ -1017,12 +1008,12 @@ static paramData_t cornuModPLs[] = { #define cornuModEndAnglePD (cornuModPLs[0]) #define cornuModEndAngle 0 - { PD_FLOAT, &cornuModCmdContext.angle, "End Angle", PDO_NORECORD|BO_ENTER, &r0_360, N_("End Angle") }, + { PD_FLOAT, &cornuModCmdContext.angle, "endangle", PDO_NORECORD|BO_ENTER, &r0_360, N_("End Angle") }, #define cornuModEndRadiusPD (cornuModPLs[1]) #define cornuModEndRadius 1 - { PD_FLOAT, &cornuModCmdContext.radius, "End Radius", PDO_DIM|PDO_NORECORD|BO_ENTER, &r10000_10000, N_("End Radius") }, + { PD_FLOAT, &cornuModCmdContext.radius, "endradius", PDO_DIM|PDO_NORECORD|BO_ENTER, &r10000_10000, N_("End Radius") }, }; -static paramGroup_t cornuModPG = { "cornuMod", 0, cornuModPLs, sizeof cornuModPLs/sizeof cornuModPLs[0] }; +static paramGroup_t cornuModPG = { "cornuMod", 0, cornuModPLs, COUNT( cornuModPLs ) }; /* * AdjustCornuCurve @@ -1050,7 +1041,7 @@ EXPORT STATUS_T AdjustCornuCurve( wControl_p controls[5]; //Always needs a NULL last entry char * labels[4]; - Da.cmdType = (long)commandContext; + Da.cmdType = VP2L(commandContext); if (Da.state != PICK_POINT && Da.state != POINT_PICKED && Da.state != TRACK_SELECTED) return C_CONTINUE; @@ -1095,6 +1086,7 @@ EXPORT STATUS_T AdjustCornuCurve( case wActionMove: if (Da.state == NONE || Da.state == PICK_POINT) { + wSetCursor(mainD.d,defaultCursor); DYNARR_RESET(trkSeg_t,anchors_da); for(int i=0;i<2;i++) { if (IsClose(FindDistance(pos,Da.pos[i]))) { @@ -1113,6 +1105,7 @@ EXPORT STATUS_T AdjustCornuCurve( d = FindDistance(DYNARR_N(coOrd,Da.mid_points,i),pos); if (IsClose(d)) { CreateCornuAnchor(DYNARR_N(coOrd,Da.mid_points,i),FALSE); + wSetCursor(mainD.d,wCursorNone); return C_CONTINUE; } } @@ -1121,6 +1114,7 @@ EXPORT STATUS_T AdjustCornuCurve( d = FindDistance(Da.endHandle[i].end_center,pos); if (IsClose(d)) { CreateCornuAnchor(Da.endHandle[i].end_center, FALSE); + wSetCursor(mainD.d,wCursorNone); return C_CONTINUE; } } @@ -1129,13 +1123,14 @@ EXPORT STATUS_T AdjustCornuCurve( d = FindDistance(Da.endHandle[i].end_curve,pos); if (IsClose(d)) { CreateCornuAnchor(Da.endHandle[i].end_curve, FALSE); + wSetCursor(mainD.d,wCursorNone); return C_CONTINUE; } } coOrd temp_pos = pos; if (IsClose(DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,(trkSeg_p)Da.crvSegs_da.ptr,&temp_pos,NULL))) { CreateCornuAnchor(temp_pos, TRUE); - } + } else wSetCursor(mainD.d,defaultCursor); } return C_CONTINUE; @@ -1371,7 +1366,6 @@ EXPORT STATUS_T AdjustCornuCurve( if (((MyGetKeyState() & WKEY_SHIFT) != 0) && Da.selectTrack) { //Extend end locked SetUpCornuParms(&cp); CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,FALSE); - struct extraData *xx = GetTrkExtraData(Da.selectTrack); if (Da.radius[sel] == 0) { //Straight Da.extendSeg[sel].type = SEG_STRTRK; Da.extendSeg[sel].width = 0; @@ -1786,6 +1780,7 @@ EXPORT STATUS_T AdjustCornuCurve( if (anchors_da.cnt) { DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); } + if (Da.state == POINT_PICKED) wSetCursor(mainD.d,wCursorNone); return C_CONTINUE; case C_CANCEL: case C_FINISH: @@ -1826,7 +1821,6 @@ static void cornuModDlgUpdate( * */ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG ) { - struct extraData *xx = GetTrkExtraData(trk); Da.trackGauge = trackG; @@ -1871,11 +1865,11 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG else Da.ep[0] = -1; } if (prior) { - struct extraData *xx0 = GetTrkExtraData(prior); - Da.pos[0] = xx0->cornuData.pos[ep0]; //Copy parms from FIRST CORNU trk - Da.radius[0] = xx0->cornuData.r[ep0]; - Da.angle[0] = xx0->cornuData.a[ep0]; - Da.center[0] = xx0->cornuData.c[ep0]; + struct extraDataCornu_t *xx0 = GET_EXTRA_DATA(prior, T_CORNU, extraDataCornu_t); + Da.pos[0] = xx0->pos[ep0]; //Copy parms from FIRST CORNU trk + Da.radius[0] = xx0->r[ep0]; + Da.angle[0] = xx0->a[ep0]; + Da.center[0] = xx0->c[ep0]; } //Move to RHS @@ -1897,11 +1891,11 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG } if (next) { - struct extraData *xx1 = GetTrkExtraData(next); - Da.pos[1] = xx1->cornuData.pos[ep1]; //Copy parms from LAST CORNU trk - Da.radius[1] = xx1->cornuData.r[ep1]; - Da.angle[1] = xx1->cornuData.a[ep1]; - Da.center[1] = xx1->cornuData.c[ep1]; + struct extraDataCornu_t *xx1 = GET_EXTRA_DATA(next, T_CORNU, extraDataCornu_t); + Da.pos[1] = xx1->pos[ep1]; //Copy parms from LAST CORNU trk + Da.radius[1] = xx1->r[ep1]; + Da.angle[1] = xx1->a[ep1]; + Da.center[1] = xx1->c[ep1]; } InfoMessage(_("Now Select or Add (+Shift) a Point")); @@ -1987,7 +1981,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.state = NONE; return C_TERMINATE; } - + CopyAttributes(Da.selectTrack,Da.trk[i]); } } BOOL_T end_point[2]; @@ -2008,7 +2002,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.center[1].x,Da.center[1].y, Da.angle[0],Da.angle[1], FormatDistance(Da.radius[0]),FormatDistance(Da.radius[1])); - UndoUndo(); + UndoUndo(NULL); Da.state = NONE; return C_TERMINATE; } @@ -2038,7 +2032,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.center[1].x,Da.center[1].y, Da.angle[0],Da.angle[1], FormatDistance(Da.radius[0]),FormatDistance(Da.radius[1])); - UndoUndo(); + UndoUndo(NULL); Da.state = NONE; return C_TERMINATE; } @@ -2073,7 +2067,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG if (Da.ep[i]>= 0) ConnectTracks(i==0?first_trk:trk1,i,Da.trk[i],Da.ep[i]); } else { - UndoUndo(); + UndoUndo(NULL); wBeep(); InfoMessage(_("Connected Track End Adjust for end %d failed"),i); return C_TERMINATE; @@ -2140,7 +2134,7 @@ DIST_T CornuOffsetLength(dynArr_t segs, double offset) { } DIST_T CornuMinRadius(coOrd pos[4],dynArr_t segs) { - DIST_T r = 100000.0, rr; + DIST_T r = DIST_INF, rr; if (segs.cnt == 0 ) return r; for (int i = 0;i<segs.cnt;i++) { trkSeg_t t = DYNARR_N(trkSeg_t, segs, i); @@ -2148,7 +2142,7 @@ DIST_T CornuMinRadius(coOrd pos[4],dynArr_t segs) { rr = fabs(t.u.c.radius); } else if (t.type == SEG_BEZLIN || t.type == SEG_BEZTRK) { rr = CornuMinRadius(t.u.b.pos, t.bezSegs); - } else rr = 100000.00; + } else rr = DIST_INF; if (rr<r) r = rr; } return r; @@ -2208,6 +2202,8 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) track_p t = NULL; cornuParm_t cp; + static BOOL_T lock; + Da.commandType = CORNU_CREATE; Da.width = (double)lineWidth/mainD.dpi; @@ -2218,7 +2214,8 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) switch (action&0xFF) { case C_START: - Da.cmdType = (long)commandContext; + lock = FALSE; + Da.cmdType = VP2L(commandContext); Da.state = NONE; Da.selectEndPoint = -1; Da.selectMidPoint = -1; @@ -2298,7 +2295,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.angle[end] = GetTrkEndAngle(t,ep); } else if (t == NULL) { //end not on Track, OK for CreateCornu -> empty end point pos = p; //Reset to initial - SnapPos( &pos ); + if (lock) SnapPos( &pos ); //Only snap if snapped in move if (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) { Da.trk[end] = NULL; Da.pos[end] = pos; @@ -2385,6 +2382,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) return C_CONTINUE; case wActionMove: + lock = FALSE; DYNARR_RESET(trkSeg_t,anchors_da); if (Da.state != NONE && Da.state != LOC_2) return C_CONTINUE; if (Da.trk[0] && Da.trk[1]) return C_CONTINUE; @@ -2421,6 +2419,9 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Translate(&pos,tp.ttcenter,a,tp.ttradius); CreateCornuEndAnchor(pos,TRUE); } else CreateCornuEndAnchor(pos,TRUE); + } else if (SnapPos(&pos)) { + CreateCornuEndAnchor(pos,FALSE); + lock = TRUE; } return C_CONTINUE; @@ -2542,10 +2543,14 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.pos[i] = zero; Da.endHandle[i].end_valid = FALSE; } + SetAllTrackSelect( FALSE ); } return rc; case C_REDRAW: + wSetCursor(mainD.d,defaultCursor); + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if ( Da.state != NONE ) { DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,Da.ep2Segs,Da.ep2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt, NULL, Da.extend[0]?&Da.extendSeg[0]:NULL,Da.extend[1]?&Da.extendSeg[1]:NULL,(trkSeg_t *)Da.midSegs.ptr,Da.midSegs.cnt,wDrawColorBlack); @@ -2554,6 +2559,8 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); if (MyGetKeyState()&WKEY_SHIFT) DrawHighlightBoxes(FALSE,FALSE,NULL); + if (Da.state == POINT_PICKED) wSetCursor(mainD.d,wCursorNone); + return C_CONTINUE; case C_CANCEL: @@ -2572,6 +2579,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) } //DYNARR_FREE(trkSeg_t,Da.crvSegs_da); } + SetAllTrackSelect( FALSE ); Da.state = NONE; if (infoSubst) { InfoSubstituteControls( NULL, NULL ); @@ -2589,12 +2597,12 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) { track_p trk_old = NULL; newTracks[0] = NULL, newTracks[1] = NULL; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); if (!IsTrack(trk)) return FALSE; - for (int i=0; i<xx->cornuData.arcSegs.cnt;i++) { + for (int i=0; i<xx->arcSegs.cnt;i++) { track_p bezTrack[2]; bezTrack[0] = NULL, bezTrack[1] = NULL; - trkSeg_p seg = &DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + trkSeg_p seg = &DYNARR_N(trkSeg_t,xx->arcSegs,i); if (seg->type == SEG_BEZTRK) { DYNARR_RESET(trkSeg_t,seg->bezSegs); FixUpBezierSeg(seg->u.b.pos,seg,TRUE); @@ -2690,7 +2698,7 @@ static STATUS_T cmdCornuCreate( /* no break */ case C_START: createState = 0; - commandContext = (void *)cornuCmdHotBar; + commandContext = I2VP(cornuCmdHotBar); rc = CmdCornu(C_START, pos); Da.prevSelected = -1; Da.selectEndHandle = -1; @@ -3039,14 +3047,14 @@ static STATUS_T CmdConvertFrom( } } -#include "bitmaps/convertto.xpm" -#include "bitmaps/convertfr.xpm" +#include "bitmaps/convert-to.xpm" +#include "bitmaps/convert-from.xpm" EXPORT void InitCmdCornu( wMenu_p menu ) { ButtonGroupBegin( _("Convert"), "cmdConvertSetCmd", _("Convert") ); - AddMenuButton( menu, CmdConvertTo, "cmdConvertTo", _("Convert To Cornu"), wIconCreatePixMap(convertto_xpm), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP3|IC_WANT_MOVE,ACCL_CONVERTTO, NULL ); - AddMenuButton( menu, CmdConvertFrom, "cmdConvertFrom", _("Convert From Cornu"), wIconCreatePixMap(convertfr_xpm), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP3|IC_WANT_MOVE,ACCL_CONVERTFR, NULL ); + AddMenuButton( menu, CmdConvertTo, "cmdConvertTo", _("Convert To Cornu"), wIconCreatePixMap(convert_to_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP3|IC_WANT_MOVE,ACCL_CONVERTTO, NULL ); + AddMenuButton( menu, CmdConvertFrom, "cmdConvertFrom", _("Convert From Cornu"), wIconCreatePixMap(convert_from_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_LCLICK|IC_POPUP3|IC_WANT_MOVE,ACCL_CONVERTFR, NULL ); cornuHotBarCmdInx = AddMenuButton(menu, cmdCornuCreate, "cmdCornuCreate", "", NULL, LEVEL0_50, IC_STICKY|IC_POPUP3|IC_WANT_MOVE, 0, NULL); ButtonGroupEnd(); ParamCreateControls( &cornuModPG, cornuModDlgUpdate) ; diff --git a/app/bin/ccornu.h b/app/bin/ccornu.h index 2bd1f49..29b6171 100644 --- a/app/bin/ccornu.h +++ b/app/bin/ccornu.h @@ -7,9 +7,9 @@ #ifndef APP_BIN_CCORNU_H_ #define APP_BIN_CCORNU_H_ +#include "common.h" - -typedef void (*cornuMessageProc)( char *, ... ); +typedef void (*cornuMessageProc)( const char *, ... ); #define cornuCmdNone (0) #define cornuJoinTrack (1) diff --git a/app/bin/ccurve.c b/app/bin/ccurve.c index e119610..2308bd1 100644 --- a/app/bin/ccurve.c +++ b/app/bin/ccurve.c @@ -20,9 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <string.h> - #include "ccurve.h" #include "cjoin.h" @@ -30,17 +27,14 @@ #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" +#include "cselect.h" -#include "messages.h" -#include "param.h" #include "param.h" #include "track.h" -#include "utility.h" -#include "wlib.h" #include "cbezier.h" #include "ccornu.h" #include "layout.h" +#include "common-ui.h" /* * STATE INFO @@ -213,7 +207,7 @@ EXPORT STATUS_T CreateCurve( } } } else { - if ((t = OnTrack(&p, FALSE, FALSE)) != NULL) { + if (((t = OnTrack(&p, FALSE, FALSE)) != NULL) && IsClose(FindDistance(p,pos))) { if (!IsTrack(t)) { pos = p; found = TRUE; @@ -221,7 +215,8 @@ EXPORT STATUS_T CreateCurve( } } Da.down = TRUE; - if (!found) SnapPos( &pos ); + if (!found && !track) SnapPos( &pos ); + if (mode == crvCmdFromCenter) SnapPos( &pos ); Da.lock0 = found; if (Da.create_state == NOCURVE) @@ -279,7 +274,7 @@ EXPORT STATUS_T CreateCurve( DYNARR_RESET(trkSeg_t,*anchor_array); DYNARR_APPEND(trkSeg_t,*anchor_array,1); if (!Da.down) return C_CONTINUE; - if (Da.trk && !(MyGetKeyState() & WKEY_SHIFT)) { //Shift inhibits direction lock + if (Da.trk && track && !(MyGetKeyState() & WKEY_SHIFT)) { //Shift inhibits direction lock angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk, Da.ep)); angle2 = NormalizeAngle(FindAngle(pos, Da.pos0)-angle1); if (mode ==crvCmdFromEP1 ) { @@ -302,7 +297,7 @@ EXPORT STATUS_T CreateCurve( DIST_T dp = FindDistance(Da.pos0, pos)*sin(D2R(angle2)); Translate( &pos, Da.pos0, angle1-90.0, dp ); } - } else SnapPos(&pos); + } else if (track) SnapPos(&pos); tempSegs_da.cnt =1; if (Da.trk && mode == crvCmdFromChord) { tempSegs(0).type = SEG_CRVTRK; @@ -400,7 +395,7 @@ EXPORT STATUS_T CreateCurve( } break; } - message( _("Drag on Red arrows to adjust curve") ); + //message( _("Drag on Red arrows to adjust curve") ); return C_CONTINUE; default: @@ -409,7 +404,16 @@ EXPORT STATUS_T CreateCurve( } } +static DIST_T desired_radius = 0.0; +static BOOL_T infoSubst = FALSE; +static paramFloatRange_t r_0_10000 = { 0.0, 100000.0 }; +static paramData_t curvePLs[] = { +#define curveRadPD (curvePLs[0]) +#define curveRadI 0 + { PD_FLOAT, &desired_radius, "radius", PDO_DIM, &r_0_10000, N_("Desired Radius") } +}; +static paramGroup_t curvePG = { "curvefixed", 0, curvePLs, COUNT( curvePLs ) }; static STATUS_T CmdCurve( wAction_t action, coOrd pos ) { @@ -417,39 +421,32 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) DIST_T d; static int segCnt; STATUS_T rc = C_CONTINUE; + wControl_p controls[2]; + char * labels[1]; + static BOOL_T lock; + static coOrd movePos; + switch (action) { case C_START: - curveMode = (long)commandContext; + lock = FALSE; + curveMode = VP2L(commandContext); Da.state = -1; Da.pos0 = pos; tempSegs_da.cnt = 0; segCnt = 0; STATUS_T rcode; DYNARR_RESET(trkSeg_t,anchors_da); + if (curvePLs[0].control==NULL) { + ParamCreateControls(&curvePG, NULL); + } + SetAllTrackSelect(FALSE); return CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, &anchors_da, InfoMessage ); case C_DOWN: if (Da.state == -1) { - BOOL_T found = FALSE; - if (curveMode != crvCmdFromCenter ) { - if (((MyGetKeyState() & WKEY_ALT)==0) == magneticSnap) { - if ((t = OnTrack(&pos,FALSE,TRUE))!=NULL) { - EPINX_T ep = PickUnconnectedEndPointSilent(pos, t); - if (ep != -1) { - if (GetTrkGauge(t) != GetScaleTrackGauge(GetLayoutCurScale())) { - wBeep(); - InfoMessage(_("Track is different gauge")); - return C_CONTINUE; - } - pos = GetTrkEndPos(t, ep); - found = TRUE; - } - } - } - } - if (!found) SnapPos( &pos ); + if (lock) pos = movePos; Da.pos0 = Da.pos1 = pos; Da.state = 0; rcode = CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, &anchors_da, InfoMessage ); @@ -458,12 +455,19 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) return rcode; //Da.pos0 = pos; } + if (infoSubst) { + sprintf(message, "desired_radius-%s", curScaleName); + wPrefSetFloat("misc", message, desired_radius); + InfoSubstituteControls(NULL, NULL); + } + infoSubst = FALSE; //This is where the user could adjust - if we allow that? tempSegs_da.cnt = segCnt; return C_CONTINUE; case wActionMove: + lock = FALSE; if ((Da.state<0) && (curveMode != crvCmdFromCenter)) { DYNARR_RESET(trkSeg_t,anchors_da); if (((MyGetKeyState() & WKEY_ALT)==0) == magneticSnap) { @@ -473,10 +477,17 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) if (ep != -1) { pos = GetTrkEndPos(t, ep); CreateEndAnchor(pos,&anchors_da,FALSE); + lock = TRUE; + movePos = pos; } } } } + if (!lock && SnapPos(&pos)) { + CreateEndAnchor(pos,&anchors_da,FALSE); + lock = TRUE; + movePos = pos; + } } return C_CONTINUE; @@ -490,8 +501,8 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) DYNARR_RESET(trkSeg_t,anchors_da); // SnapPos( &pos ); tempSegs_da.cnt = segCnt; - if (Da.trk) PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, FALSE ); - else PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, TRUE ); + if (Da.trk) PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, FALSE, desired_radius ); + else PlotCurve( curveMode, Da.pos0, Da.pos1, pos, &Da.curveData, TRUE, desired_radius ); if (Da.curveData.type == curveTypeStraight) { tempSegs(0).type = SEG_STRTRK; tempSegs(0).u.l.pos[0] = Da.pos0; @@ -514,14 +525,15 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) tempSegs(0).u.c.a1 = Da.curveData.a1; tempSegs_da.cnt = 1; segCnt = 1; + d = D2R(Da.curveData.a1); + if (d < 0.0) d = 2*M_PI+d; if ( d*Da.curveData.curveRadius > mapD.size.x+mapD.size.y ) { ErrorMessage( MSG_CURVE_TOO_LARGE ); tempSegs_da.cnt = 0; Da.curveData.type = curveTypeNone; - mainD.funcs->options = 0; return C_CONTINUE; } InfoMessage( _("Curved Track: Radius=%s Angle=%0.3f Length=%s"), @@ -532,13 +544,18 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) if (curveMode == crvCmdFromEP1 || curveMode == crvCmdFromChord) DrawArrowHeadsArray(&anchors_da,pos,FindAngle(Da.curveData.curvePos,pos),TRUE,wDrawColorRed); else if (curveMode == crvCmdFromTangent || curveMode == crvCmdFromCenter) { - CreateEndAnchor(Da.curveData.pos2,&anchors_da,FALSE); + if (Da.curveData.curveRadius == desired_radius) + CreateEndAnchor(Da.curveData.pos2,&anchors_da,TRUE); + else + CreateEndAnchor(Da.curveData.pos2,&anchors_da,FALSE); DrawArrowHeadsArray(&anchors_da,Da.curveData.pos2,FindAngle(Da.curveData.curvePos,Da.curveData.pos2)+90,TRUE,wDrawColorRed); } - CreateEndAnchor(Da.curveData.curvePos,&anchors_da,TRUE); + if (Da.curveData.curveRadius == desired_radius) + CreateEndAnchor(Da.curveData.curvePos,&anchors_da,TRUE); + else + CreateEndAnchor(Da.curveData.curvePos,&anchors_da,FALSE); } } - mainD.funcs->options = 0; return rc; case C_TEXT: if ( Da.state == 0 ) @@ -547,8 +564,8 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) case C_UP: if (Da.state<0) return C_CONTINUE; if (Da.state == 0 && ((curveMode != crvCmdFromChord) || (curveMode == crvCmdFromChord && !Da.trk))) { - SnapPos( &pos ); - Da.pos1 = pos; + //SnapPos( &pos ); + //Da.pos1 = pos; if ((d = FindDistance(Da.pos0,Da.pos1))<minLength) { ErrorMessage( MSG_TRK_TOO_SHORT, "Curved ", PutDim(fabs(minLength-d)) ); return C_TERMINATE; @@ -556,9 +573,20 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) Da.state = 1; CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, &anchors_da, InfoMessage ); tempSegs_da.cnt = 1; - mainD.funcs->options = 0; segCnt = tempSegs_da.cnt; - InfoMessage( _("Drag on Red arrows to adjust curve") ); + + sprintf(message, "desired_radius-%s", curScaleName); + wPrefGetFloat("misc", message, &desired_radius, desired_radius); + controls[0] = curveRadPD.control; + controls[1] = NULL; + labels[0] = N_("Desired Radius"); + InfoSubstituteControls(controls, labels); + infoSubst = TRUE; + curveRadPD.option |= PDO_NORECORD; + ParamLoadControls(&curvePG); + ParamGroupRecord(&curvePG); + //InfoMessage( _("Drag on Red arrows to adjust curve") ); + return C_CONTINUE; } else if ((curveMode == crvCmdFromChord && Da.state == 0 && Da.trk)) { pos = Da.middle; @@ -566,9 +594,8 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) ErrorMessage( MSG_TRK_TOO_SHORT, "Curved ", PutDim(fabs(minLength-d)) ); return C_TERMINATE; } - PlotCurve( curveMode, Da.pos0, Da.pos1, Da.middle, &Da.curveData, TRUE ); + PlotCurve( curveMode, Da.pos0, Da.pos1, Da.middle, &Da.curveData, TRUE, desired_radius ); } - mainD.funcs->options = 0; tempSegs_da.cnt = 0; segCnt = 0; Da.state = -1; @@ -590,6 +617,7 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) ErrorMessage( MSG_TRK_TOO_SHORT, "Curved ", PutDim(fabs(minLength-d)) ); return C_TERMINATE; } + UndoStart( _("Create Curved Track"), "newCurve - curve" ); t = NewCurvedTrack( Da.curveData.curvePos, Da.curveData.curveRadius, Da.curveData.a0, Da.curveData.a1, 0 ); @@ -607,7 +635,6 @@ static STATUS_T CmdCurve( wAction_t action, coOrd pos ) case C_REDRAW: if ( Da.state >= 0 ) { DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); - mainD.funcs->options = 0; } if (anchors_da.cnt) DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); @@ -668,12 +695,12 @@ static paramData_t helixPLs[] = { { PD_FLOAT, &helixGrade, "grade", 0, &r0_100, N_("Grade") }, { PD_FLOAT, &helixVertSep, "vertSep", PDO_DIM, &r0_1000000, N_("Vertical Separation") }, #define I_HELIXMSG (6) - { PD_MESSAGE, N_("Total Length"), NULL, PDO_DLGRESETMARGIN, (void*)200 } }; -static paramGroup_t helixPG = { "helix", PGO_PREFMISCGROUP, helixPLs, sizeof helixPLs/sizeof helixPLs[0] }; + { PD_MESSAGE, N_("Total Length"), NULL, PDO_DLGRESETMARGIN, I2VP(200) } }; +static paramGroup_t helixPG = { "helix", PGO_PREFMISCGROUP, helixPLs, COUNT( helixPLs ) }; static paramData_t circleRadiusPLs[] = { { PD_FLOAT, &circleRadius, "radius", PDO_DIM, &r1_10000 } }; -static paramGroup_t circleRadiusPG = { "circle", 0, circleRadiusPLs, sizeof circleRadiusPLs/sizeof circleRadiusPLs[0] }; +static paramGroup_t circleRadiusPG = { "circle", 0, circleRadiusPLs, COUNT( circleRadiusPLs ) }; static void ComputeHelix( @@ -684,7 +711,7 @@ static void ComputeHelix( DIST_T totTurns; DIST_T length; long updates = 0; - if ( h_inx < 0 || h_inx >= sizeof h_orders/sizeof h_orders[0] ) + if ( h_inx < 0 || h_inx >= COUNT( h_orders ) ) return; ParamLoadData( &helixPG ); totTurns = helixTurns + helixAngSep/360.0; @@ -809,6 +836,7 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) break; } } + SetAllTrackSelect( FALSE ); tempSegs_da.cnt = 0; return C_CONTINUE; @@ -932,7 +960,7 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) static STATUS_T CmdCircle( wAction_t action, coOrd pos ) { if ( action == C_START ) { - circleMode = (long)commandContext; + circleMode = VP2L(commandContext); } return CmdCircleCommon( action, pos, FALSE ); } @@ -943,32 +971,31 @@ static STATUS_T CmdHelix( wAction_t action, coOrd pos ) return CmdCircleCommon( action, pos, TRUE ); } -#include "bitmaps/curve1.xpm" -#include "bitmaps/curve2.xpm" -#include "bitmaps/curve3.xpm" -#include "bitmaps/curve4.xpm" -#include "bitmaps/bezier.xpm" +#include "bitmaps/curved-end.xpm" +#include "bitmaps/curved-tangent.xpm" +#include "bitmaps/curved-middle.xpm" +#include "bitmaps/curved-chord.xpm" +#include "bitmaps/bezier-track.xpm" #include "bitmaps/cornu.xpm" -#include "bitmaps/circle1.xpm" -#include "bitmaps/circle2.xpm" -#include "bitmaps/circle3.xpm" +#include "bitmaps/circle.xpm" +#include "bitmaps/circle-tangent.xpm" +#include "bitmaps/circle-center.xpm" EXPORT void InitCmdCurve( wMenu_p menu ) { - AddMenuButton( menu, CmdCornu, "cmdCornu", _("Cornu Curve"), wIconCreatePixMap(cornu_xpm), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CORNU, (void*)cornuCmdCreateTrack); - - ButtonGroupBegin( _("Curve Track"), "cmdCircleSetCmd", _("Curve Tracks") ); - AddMenuButton( menu, CmdCurve, "cmdCurveEndPt", _("Curve from End-Pt"), wIconCreatePixMap( curve1_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE1, (void*)0 ); - AddMenuButton( menu, CmdCurve, "cmdCurveTangent", _("Curve from Tangent"), wIconCreatePixMap( curve2_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE2, (void*)1 ); - AddMenuButton( menu, CmdCurve, "cmdCurveCenter", _("Curve from Center"), wIconCreatePixMap( curve3_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE3, (void*)2 ); - AddMenuButton( menu, CmdCurve, "cmdCurveChord", _("Curve from Chord"), wIconCreatePixMap( curve4_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE4, (void*)3 ); - AddMenuButton( menu, CmdBezCurve, "cmdBezier", _("Bezier Curve"), wIconCreatePixMap(bezier_xpm), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_BEZIER, (void*)bezCmdCreateTrack ); + ButtonGroupBegin( _("Curve Track"), "cmdCurveSetCmd", _("Curve Tracks") ); + AddMenuButton( menu, CmdCurve, "cmdCurveEndPt", _("Curve from End-Pt"), wIconCreatePixMap( curved_end_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE1, I2VP(0) ); + AddMenuButton( menu, CmdCurve, "cmdCurveTangent", _("Curve from Tangent"), wIconCreatePixMap( curved_tangent_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE2, I2VP(1) ); + AddMenuButton( menu, CmdCurve, "cmdCurveCenter", _("Curve from Center"), wIconCreatePixMap( curved_middle_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE3, I2VP(2) ); + AddMenuButton( menu, CmdCurve, "cmdCurveChord", _("Curve from Chord"), wIconCreatePixMap( curved_chord_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE4, I2VP(3) ); + AddMenuButton( menu, CmdBezCurve, "cmdBezier", _("Bezier Curve"), wIconCreatePixMap( bezier_track_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_BEZIER, I2VP(bezCmdCreateTrack) ); + AddMenuButton( menu, CmdCornu, "cmdCornu", _("Cornu Curve"), wIconCreatePixMap( cornu_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CORNU, I2VP(cornuCmdCreateTrack)); ButtonGroupEnd(); - ButtonGroupBegin( _("Circle Track"), "cmdCurveSetCmd", _("Circle Tracks") ); - AddMenuButton( menu, CmdCircle, "cmdCircleFixedRadius", _("Fixed Radius Circle"), wIconCreatePixMap( circle1_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE1, (void*)0 ); - AddMenuButton( menu, CmdCircle, "cmdCircleTangent", _("Circle from Tangent"), wIconCreatePixMap( circle2_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE2, (void*)1 ); - AddMenuButton( menu, CmdCircle, "cmdCircleCenter", _("Circle from Center"), wIconCreatePixMap( circle3_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE3, (void*)2 ); + ButtonGroupBegin( _("Circle Track"), "cmdCircleSetCmd", _("Circle Tracks") ); + AddMenuButton( menu, CmdCircle, "cmdCircleFixedRadius", _("Fixed Radius Circle"), wIconCreatePixMap( circle_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE1, I2VP(0) ); + AddMenuButton( menu, CmdCircle, "cmdCircleTangent", _("Circle from Tangent"), wIconCreatePixMap( circle_tangent_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE2, I2VP(1) ); + AddMenuButton( menu, CmdCircle, "cmdCircleCenter", _("Circle from Center"), wIconCreatePixMap( circle_center_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE3, I2VP(2) ); ButtonGroupEnd(); ParamRegister( &circleRadiusPG ); diff --git a/app/bin/ccurve.h b/app/bin/ccurve.h index 0c00c46..7ae4227 100644 --- a/app/bin/ccurve.h +++ b/app/bin/ccurve.h @@ -23,10 +23,8 @@ #ifndef HAVE_CCURVE_H #define HAVE_CCURVE_H -#include "draw.h" -#include "track.h" -#include "wlib.h" -#include "utility.h" +#include "common.h" +#include "track.h" //- curveType_e typedef struct { curveType_e type; @@ -48,10 +46,10 @@ typedef struct { #define circleCmdFromTangent (1) #define circleCmdFromCenter (2) -typedef void (*curveMessageProc)( char *, ... ); +typedef void (*curveMessageProc)( const char *, ... ); STATUS_T CreateCurve( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, dynArr_t *,curveMessageProc ); int IsCurveCircle( track_p ); -void PlotCurve( long, coOrd, coOrd, coOrd, curveData_t *, BOOL_T ); +void PlotCurve( long, coOrd, coOrd, coOrd, curveData_t *, BOOL_T, DIST_T ); track_p NewCurvedTrack( coOrd, DIST_T, ANGLE_T, ANGLE_T, long ); DIST_T CurveDescriptionDistance( coOrd, track_p, coOrd *, BOOL_T, BOOL_T * ); STATUS_T CurveDescriptionMove( track_p, wAction_t, coOrd ); diff --git a/app/bin/cdraw.c b/app/bin/cdraw.c index 6bb4c4a..b6cc035 100644 --- a/app/bin/cdraw.c +++ b/app/bin/cdraw.c @@ -20,22 +20,16 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <stdint.h> -#include <string.h> -#include "wlib.h" - +#include "common.h" #include "ccurve.h" #include "cbezier.h" #include "drawgeom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" #include "misc.h" - +#include "cselect.h" +#include "common-ui.h" extern TRKTYP_T T_BZRLIN; static wMenu_p drawModDelMI; @@ -76,23 +70,23 @@ EXPORT void LoadFontSizeList( wIndex_t curInx = 0, inx1; int inx; wListClear(list); - for (inx = 0; inx < sizeof fontSizeList / sizeof fontSizeList[0]; inx++) + for (inx = 0; inx < COUNT( fontSizeList ); inx++) { if ((inx == 0 || curFontSize > fontSizeList[inx - 1]) && (curFontSize < fontSizeList[inx])) { sprintf(message, "%ld", curFontSize); - curInx = wListAddValue(list, message, NULL, (void*)curFontSize); + curInx = wListAddValue(list, message, NULL, I2VP(curFontSize)); } sprintf(message, "%ld", fontSizeList[inx]); - inx1 = wListAddValue(list, message, NULL, (void*)fontSizeList[inx]); + inx1 = wListAddValue(list, message, NULL, I2VP(fontSizeList[inx])); if (curFontSize == fontSizeList[inx]) curInx = inx1; } - if (curFontSize > fontSizeList[(sizeof fontSizeList / sizeof fontSizeList[0]) - 1]) + if (curFontSize > fontSizeList[ COUNT( fontSizeList ) - 1]) { sprintf(message, "%ld", curFontSize); - curInx = wListAddValue(list, message, NULL, (void*)curFontSize); + curInx = wListAddValue(list, message, NULL, I2VP(curFontSize)); } wListSetIndex(list, curInx); wFlush(); @@ -106,7 +100,7 @@ long GetFontSize(wIndex_t inx) long GetFontSizeIndex(long size) { int i; - for (i = 0; i < sizeof fontSizeList / sizeof fontSizeList[0]; i++) + for (i = 0; i < COUNT( fontSizeList ); i++) { if (fontSizeList[i] == size) return(i); @@ -122,7 +116,7 @@ EXPORT void UpdateFontSizeList( long fontSize; if ( listInx >= 0 ) { - *fontSizeR = (long)wListGetItemContext( list, listInx ); + *fontSizeR = VP2L( wListGetItemContext( list, listInx )); } else { wListGetValues( list, message, sizeof message, NULL, NULL ); if ( message[0] != '\0' ) { @@ -154,13 +148,14 @@ EXPORT void UpdateFontSizeList( */ -struct extraData { +typedef struct extraDataDraw_t { + extraDataBase_t base; coOrd orig; ANGLE_T angle; drawLineType_e lineType; wIndex_t segCnt; trkSeg_t segs[1]; - }; + } extraDataDraw_t; static TRKTYP_T T_DRAW = -1; static track_p ignoredTableEdge; @@ -169,7 +164,7 @@ static track_p ignoredDraw; static void ComputeDrawBoundingBox( track_p t ) { - struct extraData * xx = GetTrkExtraData(t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); coOrd lo, hi; GetSegBounds( xx->orig, xx->angle, xx->segCnt, xx->segs, &lo, &hi ); @@ -185,12 +180,12 @@ static track_p MakeDrawFromSeg1( ANGLE_T angle, trkSeg_p sp ) { - struct extraData * xx; + struct extraDataDraw_t * xx; track_p trk; if ( sp->type == ' ' ) return NULL; trk = NewTrack( index, T_DRAW, 0, sizeof *xx ); - xx = GetTrkExtraData( trk ); + xx = GET_EXTRA_DATA( trk, T_DRAW, extraDataDraw_t ); xx->orig = pos; xx->angle = angle; xx->segCnt = 1; @@ -230,10 +225,10 @@ EXPORT track_p MakePolyLineFromSegs( ANGLE_T angle, dynArr_t * segsArr) { - struct extraData * xx; + struct extraDataDraw_t * xx; track_p trk; trk = NewTrack( 0, T_DRAW, 0, sizeof *xx ); - xx = GetTrkExtraData( trk ); + xx = GET_EXTRA_DATA( trk, T_DRAW, extraDataDraw_t ); xx->orig = pos; xx->angle = angle; xx->lineType = DRAWLINESOLID; @@ -458,7 +453,7 @@ void static CreateOriginAnchor(coOrd origin, wBool_t trans_selected) { EXPORT void DrawOriginAnchor(track_p trk) { if (!trk || GetTrkType(trk) != T_DRAW) return; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if ((xx->orig.x != 0.0) || (xx->orig.y !=0.0) ) { DYNARR_RESET(trkSeg_t,anchors_da); CreateOriginAnchor(xx->orig,FALSE); @@ -470,11 +465,11 @@ EXPORT void DrawOriginAnchor(track_p trk) { static DIST_T DistanceDraw( track_p t, coOrd * p ) { - struct extraData * xx = GetTrkExtraData(t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); if ( ignoredTableEdge == t && xx->segs[0].type == SEG_TBLEDGE ) - return 100000.0; + return DIST_INF; if ( ignoredDraw == t ) - return 100000.0; + return DIST_INF; return DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, p, NULL ); } @@ -507,26 +502,25 @@ static struct { wIndex_t dimenSize; descPivot_t pivot; wIndex_t fontSizeInx; - char text[STR_LONG_SIZE]; + char text[STR_HUGE_SIZE]; unsigned int layer; wIndex_t lineType; } drawData; -typedef enum { E0, E1, PP, CE, AL, A1, A2, RD, LN, HT, WT, LK, OI, RA, VC, LW, LT, CO, FL, OP, BX, BE, OR, DS, TP, TA, TS, TX, PV, LY } drawDesc_e; +typedef enum { E0, E1, PP, CE, AL, LA, A1, A2, RD, LN, HT, WT, PV, VC, LW, LT, CO, FL, OP, BX, BE, OR, DS, TP, TA, TS, TX, LK, OI, RA, LY } drawDesc_e; static descData_t drawDesc[] = { /*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &drawData.endPt[0] }, /*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &drawData.endPt[1] }, /*PP*/ { DESC_POS, N_("First Point: X,Y"), &drawData.endPt[0] }, /*CE*/ { DESC_POS, N_("Center: X,Y"), &drawData.center }, -/*AL*/ { DESC_FLOAT, N_("Angle"), &drawData.angle }, +/*AL*/ { DESC_FLOAT, N_("Angular Length"), &drawData.angle }, +/*LA*/ { DESC_FLOAT, N_("Line Angle"), &drawData.angle }, /*A1*/ { DESC_ANGLE, N_("CCW Angle"), &drawData.angle0 }, /*A2*/ { DESC_ANGLE, N_("CW Angle"), &drawData.angle1 }, /*RD*/ { DESC_DIM, N_("Radius"), &drawData.radius }, /*LN*/ { DESC_DIM, N_("Length"), &drawData.length }, /*HT*/ { DESC_DIM, N_("Height"), &drawData.height }, /*WT*/ { DESC_DIM, N_("Width"), &drawData.width }, -/*LK*/ { DESC_BOXED, N_("Keep Origin Relative"), &drawData.lock_origin}, -/*OI*/ { DESC_POS, N_("Rot Origin: X,Y"), &drawData.origin }, -/*RA*/ { DESC_FLOAT, N_("Rotate Angle"), &drawData.angle }, +/*PV*/ { DESC_PIVOT, N_("Pivot"), &drawData.pivot }, /*VC*/ { DESC_LONG, N_("Point Count"), &drawData.pointCount }, /*LW*/ { DESC_LONG, N_("Line Width"), &drawData.lineWidth }, /*LT*/ { DESC_LIST, N_("Line Type"), &drawData.lineType }, @@ -537,11 +531,13 @@ static descData_t drawDesc[] = { /*BE*/ { DESC_LIST, N_("Lumber"), &drawData.benchChoice }, /*OR*/ { DESC_LIST, N_("Orientation"), &drawData.benchOrient }, /*DS*/ { DESC_LIST, N_("Size"), &drawData.dimenSize }, -/*TP*/ { DESC_POS, N_("Origin: X,Y"), &drawData.endPt[0] }, -/*TA*/ { DESC_FLOAT, N_("Angle"), &drawData.angle }, +/*TP*/ { DESC_POS, N_("Text Origin: X,Y"), &drawData.endPt[0] }, +/*TA*/ { DESC_FLOAT, N_("Text Angle"), &drawData.angle }, /*TS*/ { DESC_EDITABLELIST, N_("Font Size"), &drawData.fontSizeInx }, /*TX*/ { DESC_TEXT, N_("Text"), &drawData.text }, -/*PV*/ { DESC_PIVOT, N_("Pivot"), &drawData.pivot }, +/*LK*/ { DESC_BOXED, N_("Lock To Origin"), &drawData.lock_origin}, +/*OI*/ { DESC_POS, N_("Rot Origin: X,Y"), &drawData.origin }, +/*RA*/ { DESC_FLOAT, N_("Rotate By"), &drawData.rotate_angle }, /*LY*/ { DESC_LAYER, N_("Layer"), &drawData.layer }, { DESC_NULL } }; static int drawSegInx; @@ -567,13 +563,16 @@ static int drawSegInx; * so that the object remains at the same place as the user specifies. * If the edit starts with origin {0,0}, it will be set unlocked, otherwise set locked. * - * AL- Angle will be set to 0.0 when the object is modified. The points of the objects will be rotated so that + * RA - Rotate By Angle will only be active if the Origin is locked. + * It will be set to 0.0 whenever the object is modified. + * + * At the end of the operations, the points of the objects will be rotated so that * rotated and adjusted so they don't need rotation to lie where the user left them. * */ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataDraw_t *xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); trkSeg_p segPtr; coOrd mid; long fontSize; @@ -590,7 +589,10 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) coOrd off; switch ( inx ) { case LW: - segPtr->width = drawData.lineWidth/mainD.dpi; + if (drawData.lineWidth<0) + segPtr->width = drawData.lineWidth; + else + segPtr->width = drawData.lineWidth/75.0; //Replace with absolute pixel break; case CO: segPtr->color = drawData.color; @@ -601,61 +603,42 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) coOrd off; off.x = drawData.endPt[0].x - drawData.oldE0.x; off.y = drawData.endPt[0].y - drawData.oldE0.y; - if (drawData.lock_origin) { - xx->orig.x +=off.x; - xx->orig.y +=off.y; - drawDesc[OI].mode |= DESC_CHANGE; - } else { - switch(segPtr->type) { //E0 does not alter length - translates - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], xx->angle, xx->orig ); - drawData.endPt[1].x = off.x+drawData.endPt[1].x; - drawData.endPt[1].y = off.y+drawData.endPt[1].y; - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); - drawDesc[E1].mode |= DESC_CHANGE; - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - UNREORIGIN( segPtr->u.c.center, drawData.endPt[0], xx->angle, xx->orig ); - break; - case SEG_TEXT: - UNREORIGIN( segPtr->u.t.pos, drawData.endPt[0], xx->angle, xx->orig ); - break; - case SEG_POLY: - case SEG_FILPOLY: - break; //Note not used by POLYGONS - default:; - } - } - } else { //E1 - alters length - off.x = drawData.endPt[1].x - drawData.oldE1.x; - off.y = drawData.endPt[1].y - drawData.oldE1.y; - drawDesc[E1].mode |= DESC_CHANGE; - if (drawData.lock_origin) { - xx->orig.x +=off.x; - xx->orig.y +=off.y; - drawDesc[OI].mode |= DESC_CHANGE; - } else { - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); + switch(segPtr->type) { //E0 does not alter length - translates + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + drawData.endPt[1].x = off.x+drawData.endPt[1].x; + drawData.endPt[1].y = off.y+drawData.endPt[1].y; + UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E1].mode |= DESC_CHANGE; + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + UNREORIGIN( segPtr->u.c.center, drawData.endPt[0], 0.0, xx->orig ); + break; + case SEG_POLY: + case SEG_FILPOLY: + break; //Note not used by POLYGONS + default:; } + } else { + UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); } drawData.length = FindDistance( drawData.endPt[0], drawData.endPt[1] ); drawDesc[LN].mode |= DESC_CHANGE; break; - case OI: - off.x = drawData.origin.x - drawData.oldOrigin.x; - off.y = drawData.origin.y - drawData.oldOrigin.y; + case OI: ; + off.x = drawData.origin.x-xx->orig.x; + off.y = drawData.origin.y-xx->orig.y; xx->orig = drawData.origin; - if (!drawData.lock_origin) { + if (!drawData.lock_origin) { //Move the points so that the object is not moved switch(segPtr->type) { case SEG_POLY: case SEG_FILPOLY: for (int i=0;i<segPtr->u.p.cnt;i++) { - REORIGIN( pt, segPtr->u.p.pts[i].pt, xx->angle, drawData.oldOrigin); - UNREORIGIN( segPtr->u.p.pts[i].pt, pt, xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); } break; case SEG_STRLIN: @@ -663,50 +646,40 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case SEG_BENCH: case SEG_TBLEDGE: for (int i=0;i<2;i++) { - UNREORIGIN( segPtr->u.l.pos[i], drawData.endPt[i], xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); } break; case SEG_CRVLIN: case SEG_FILCRCL: - UNREORIGIN( segPtr->u.c.center, drawData.center, xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); break; case SEG_TEXT: - UNREORIGIN( segPtr->u.t.pos, drawData.endPt[0], xx->angle, xx->orig ); - break; + UNREORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); default:; } } else { - drawData.endPt[0].x += off.x; - drawData.endPt[0].y += off.y; switch(segPtr->type) { case SEG_STRLIN: case SEG_DIMLIN: case SEG_BENCH: case SEG_TBLEDGE: + REORIGIN( drawData.endPt[0], segPtr->u.l.pos[0], 0.0, xx->orig ); + REORIGIN( drawData.endPt[1], segPtr->u.l.pos[1], 0.0, xx->orig ); drawDesc[E0].mode |= DESC_CHANGE; - UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], xx->angle, xx->orig ); - drawData.endPt[1].x = off.x+drawData.endPt[1].x; - drawData.endPt[1].y = off.y+drawData.endPt[1].y; - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); drawDesc[E1].mode |= DESC_CHANGE; break; case SEG_CRVLIN: case SEG_FILCRCL: - UNREORIGIN( segPtr->u.c.center, drawData.endPt[0], xx->angle, xx->orig ); - drawDesc[E0].mode |= DESC_CHANGE; + REORIGIN( drawData.center, segPtr->u.c.center, 0.0, xx->orig ); + drawDesc[CE].mode |= DESC_CHANGE; break; case SEG_TEXT: - UNREORIGIN( segPtr->u.t.pos, drawData.endPt[0], xx->angle, xx->orig ); - drawDesc[E0].mode |= DESC_CHANGE; + REORIGIN( drawData.endPt[0], segPtr->u.t.pos, 0.0, xx->orig ); + drawDesc[TP].mode |= DESC_CHANGE; break; case SEG_POLY: case SEG_FILPOLY: - for (int i=0;i<segPtr->u.p.cnt;i++) { - REORIGIN( pt, segPtr->u.p.pts[i].pt, xx->angle, drawData.oldOrigin); - pt.x += off.x; - pt.y += off.y; - UNREORIGIN( segPtr->u.p.pts[i].pt, pt, xx->angle, xx->orig ); - } + REORIGIN(drawData.endPt[0], segPtr->u.p.pts[0].pt, 0.0, xx->orig); drawDesc[PP].mode |= DESC_CHANGE; break; default:; @@ -734,15 +707,16 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) } } break; - case RA:; - ANGLE_T angle = NormalizeAngle(drawData.rotate_angle); - switch(segPtr->type) { + case RA:; //Only applies if "Lock" has been set + if (drawData.lock_origin) { + ANGLE_T angle = NormalizeAngle(drawData.rotate_angle); + switch(segPtr->type) { case SEG_POLY: case SEG_FILPOLY: for (int i=0;i<segPtr->u.p.cnt;i++) { - REORIGIN(pt,segPtr->u.p.pts[i].pt, angle, xx->orig); + UNREORIGIN(pt, segPtr->u.p.pts[i].pt, angle, drawData.origin); + REORIGIN(segPtr->u.p.pts[i].pt, pt, 0.0, drawData.origin); if (i == 0) drawData.endPt[0] = pt; - UNREORIGIN(segPtr->u.p.pts[i].pt, pt, 0.0, xx->orig); } drawDesc[PP].mode |= DESC_CHANGE; break; @@ -750,18 +724,18 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) coOrd end0, end1; Translate(&end0,segPtr->u.c.center,segPtr->u.c.a0,segPtr->u.c.radius); Translate(&end1,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1,segPtr->u.c.radius); - REORIGIN(end0, end0, angle, xx->orig ); - REORIGIN(end1, end1, angle, xx->orig ); - REORIGIN( drawData.center,segPtr->u.c.center, angle, xx->orig ); - drawData.angle0 = FindAngle( drawData.center, end0); + REORIGIN(drawData.center, segPtr->u.c.center, angle, drawData.origin); + REORIGIN(end0, end0, angle, drawData.origin); + REORIGIN(end1, end1, angle, drawData.origin); + segPtr->u.c.a0 = drawData.angle0 = FindAngle( drawData.center, end0); drawData.angle1 = FindAngle( drawData.center, end1); + UNREORIGIN(segPtr->u.c.center,drawData.center,0.0,drawData.origin); drawDesc[CE].mode |= DESC_CHANGE; drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; /*no break*/ case SEG_FILCRCL: - REORIGIN( drawData.center,segPtr->u.c.center, angle, xx->orig ); - UNREORIGIN( segPtr->u.c.center, drawData.center, 0.0, xx->orig); //Remove angle + REORIGIN(drawData.center, segPtr->u.c.center, angle, drawData.origin); //Remove angle + UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, drawData.origin); drawDesc[CE].mode |= DESC_CHANGE; break; case SEG_STRLIN: @@ -769,27 +743,36 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case SEG_BENCH: case SEG_TBLEDGE: for (int i=0;i<2;i++) { - REORIGIN( drawData.endPt[i], segPtr->u.l.pos[i], angle, xx->orig ); - UNREORIGIN(segPtr->u.l.pos[i], drawData.endPt[i], 0.0, xx->orig ); + REORIGIN( drawData.endPt[i], segPtr->u.l.pos[i], angle, drawData.origin ); + UNREORIGIN( segPtr->u.l.pos[i], drawData.endPt[i], 0.0, drawData.origin ); } drawDesc[E0].mode |= DESC_CHANGE; drawDesc[E1].mode |= DESC_CHANGE; break; - case SEG_TEXT: - + case SEG_TEXT:; + coOrd tp; + REORIGIN( tp, segPtr->u.t.pos, angle, drawData.origin ); + UNREORIGIN( segPtr->u.t.pos, tp, 0.0, drawData.origin ); + drawData.endPt[0] = tp; + drawData.angle = segPtr->u.t.angle += angle; + drawDesc[TA].mode |= DESC_CHANGE; + drawDesc[TP].mode |= DESC_CHANGE; break; default:; + } } xx->angle = drawData.rotate_angle = 0.0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; drawDesc[RA].mode |= DESC_CHANGE; break; - case AL:; - angle = NormalizeAngle(drawData.angle); + case AL: //Uses Pivot Point + case LA:; + ANGLE_T angle = NormalizeAngle(drawData.angle); switch(segPtr->type) { case SEG_POLY: case SEG_FILPOLY: break; //Doesn't Use - case SEG_CRVLIN: + case SEG_CRVLIN: //Uses as swept angle switch ( drawData.pivot ) { case DESC_PIVOT_FIRST: segPtr->u.c.a1 = drawData.angle; @@ -799,7 +782,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case DESC_PIVOT_SECOND: segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a1+segPtr->u.c.a0-drawData.angle); segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); + drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); drawDesc[A1].mode |= DESC_CHANGE; drawDesc[A2].mode |= DESC_CHANGE; @@ -807,7 +790,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case DESC_PIVOT_MID: segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1/2.0-drawData.angle/2.0); segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); + drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); drawDesc[A1].mode |= DESC_CHANGE; drawDesc[A2].mode |= DESC_CHANGE; @@ -815,6 +798,8 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) default: break; } + drawData.length = 2*M_PI*segPtr->u.c.radius*segPtr->u.c.a1/360; + drawDesc[LN].mode = DESC_RO|DESC_CHANGE; break; case SEG_FILCRCL: break; //Doesn't Use @@ -822,9 +807,31 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case SEG_DIMLIN: case SEG_BENCH: case SEG_TBLEDGE: - Translate(&drawData.endPt[1],drawData.endPt[0],angle,drawData.length); - UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); - drawDesc[E1].mode |= DESC_CHANGE; + switch ( drawData.pivot ) { + case DESC_PIVOT_FIRST: + Translate(&drawData.endPt[1],drawData.endPt[0],angle,drawData.length); + UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E1].mode |= DESC_CHANGE; + break; + case DESC_PIVOT_MID:; + coOrd middle; + middle.x = (drawData.endPt[1].x+drawData.endPt[0].x)/2; + middle.y = (drawData.endPt[1].y+drawData.endPt[0].y)/2; + Translate(&drawData.endPt[0],middle,NormalizeAngle(angle+180),drawData.length/2); + Translate(&drawData.endPt[1],middle,angle,drawData.length/2); + UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E0].mode |= DESC_CHANGE; + drawDesc[E1].mode |= DESC_CHANGE; + break; + case DESC_PIVOT_SECOND: + Translate(&drawData.endPt[0],drawData.endPt[1],NormalizeAngle(angle+180),drawData.length); + UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + drawDesc[E0].mode |= DESC_CHANGE; + break; + default: + break; + } break; case SEG_TEXT: break; //Doesnt Use @@ -834,11 +841,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case LN: if ( drawData.length <= minLength ) { ErrorMessage( MSG_OBJECT_TOO_SHORT ); - if ( segPtr->type != SEG_CRVLIN ) { - drawData.length = FindDistance( drawData.endPt[0], drawData.endPt[1] ); - } else { - drawData.length = fabs(segPtr->u.c.radius)*2*M_PI*segPtr->u.c.a1/360.0; - } + drawData.length = fabs(segPtr->u.c.radius)*2*M_PI*segPtr->u.c.a1/360.0; drawDesc[LN].mode |= DESC_CHANGE; break; } @@ -846,12 +849,12 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) switch ( drawData.pivot ) { case DESC_PIVOT_FIRST: Translate( &drawData.endPt[1], drawData.endPt[0], drawData.angle, drawData.length ); - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); drawDesc[E1].mode |= DESC_CHANGE; break; case DESC_PIVOT_SECOND: Translate( &drawData.endPt[0], drawData.endPt[1], drawData.angle+180.0, drawData.length ); - UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); drawDesc[E0].mode |= DESC_CHANGE; break; case DESC_PIVOT_MID: @@ -859,32 +862,18 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) mid.y = (drawData.endPt[0].y+drawData.endPt[1].y)/2.0; Translate( &drawData.endPt[0], mid, drawData.angle+180.0, drawData.length/2.0 ); Translate( &drawData.endPt[1], mid, drawData.angle, drawData.length/2.0 ); - UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], xx->angle, xx->orig ); - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); drawDesc[E0].mode |= DESC_CHANGE; drawDesc[E1].mode |= DESC_CHANGE; break; default: break; } - } else { - - if ( drawData.angle < 0.0 || drawData.angle >= 360.0 ) { - ErrorMessage( MSG_CURVE_OUT_OF_RANGE ); - drawData.angle = segPtr->u.c.a1; - drawDesc[AL].mode |= DESC_CHANGE; - } else { - segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1/2.0-drawData.angle/2.0); - segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; - } } break; case CE: - UNREORIGIN( segPtr->u.c.center, drawData.center, xx->angle, xx->orig ); + UNREORIGIN( segPtr->u.c.center, drawData.center, 0.0, xx->orig ); break; case RD: if ( drawData.pivot == DESC_PIVOT_FIRST ) { @@ -896,82 +885,51 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) } drawDesc[CE].mode |= DESC_CHANGE; segPtr->u.c.radius = drawData.radius; - drawDesc[LN].mode |= DESC_CHANGE; + drawData.length = 2*M_PI*segPtr->u.c.radius*(segPtr->type==SEG_CRVLIN?segPtr->u.c.a1/360:1.0); + drawDesc[LN].mode = DESC_RO|DESC_CHANGE; break; - case A1: - switch ( drawData.pivot ) { - case DESC_PIVOT_FIRST: - segPtr->u.c.a1 = drawData.angle; - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A2].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_SECOND: - segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a1+segPtr->u.c.a0-drawData.angle); - segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_MID: - segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1/2.0-drawData.angle/2.0); - segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; - break; - default: - break; - } + case A1: //Angle of first point of curve + segPtr->u.c.a0 = NormalizeAngle(drawData.angle0); + drawData.angle1 = NormalizeAngle(segPtr->u.c.a0+segPtr->u.c.a1); + drawDesc[A2].mode |= DESC_CHANGE; break; case A2: - segPtr->u.c.a0 = NormalizeAngle( drawData.angle1-segPtr->u.c.a1-xx->angle ); - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); + segPtr->u.c.a0 = NormalizeAngle( drawData.angle1-segPtr->u.c.a1); + drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); drawDesc[A1].mode |= DESC_CHANGE; break; case BE: - BenchUpdateOrientationList( (long)wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice ), (wList_p)drawDesc[OR].control0 ); + BenchUpdateOrientationList( VP2L( wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); if ( drawData.benchOrient < wListGetCount( (wList_p)drawDesc[OR].control0 ) ) wListSetIndex( (wList_p)drawDesc[OR].control0, drawData.benchOrient ); else drawData.benchOrient = 0; - segPtr->u.l.option = GetBenchData( (long)wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice ), drawData.benchOrient ); + segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); break; case OR: - segPtr->u.l.option = GetBenchData( (long)wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice ), drawData.benchOrient ); + segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); break; case DS: segPtr->u.l.option = drawData.dimenSize; break; - case TP: - UNREORIGIN( segPtr->u.t.pos, drawData.endPt[0], xx->angle, xx->orig ); + case TP:; + UNREORIGIN(segPtr->u.t.pos, drawData.endPt[0], 0.0, xx->orig ); break; case PP: off.x = drawData.endPt[0].x - drawData.oldE0.x; off.y = drawData.endPt[0].y - drawData.oldE0.y; - if (drawData.lock_origin) { - xx->orig.x +=off.x; - xx->orig.y +=off.y; - drawData.origin = xx->orig; - drawDesc[OI].mode |= DESC_CHANGE; - drawDesc[E0].mode |= DESC_CHANGE; - break; - } else { - for (int i=0;i<segPtr->u.p.cnt;i++) { - REORIGIN( pt, segPtr->u.p.pts[i].pt, xx->angle, xx->orig ); - pt.x += off.x; - pt.y += off.y; - if (i<5) drawData.endPt[i] = pt; - UNREORIGIN( segPtr->u.p.pts[i].pt, pt, 0.0, xx->orig ); + for (int i=0;i<segPtr->u.p.cnt;i++) { + REORIGIN( pt, segPtr->u.p.pts[i].pt, 0.0, xx->orig ); + pt.x += off.x; + pt.y += off.y; + if (i<5) { + drawData.endPt[i] = pt; } - xx->angle = 0.0; - drawDesc[AL].mode |= DESC_CHANGE; + UNREORIGIN( segPtr->u.p.pts[i].pt, pt, 0.0, xx->orig ); } break; case TA: - //segPtr->u.t.angle = NormalizeAngle( drawData.angle ); - xx->angle = NormalizeAngle( drawData.angle ); + segPtr->u.t.angle = NormalizeAngle( drawData.angle ); break; case TS: fontSize = (long)segPtr->u.t.fontSize; @@ -980,19 +938,36 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) break; case FL: if (segPtr->type == SEG_POLY && drawData.open) { + segPtr->u.p.polyType = POLYLINE; drawData.filled = FALSE; - drawDesc[FL].mode |= DESC_CHANGE; + drawDesc[FL].mode = DESC_RO|DESC_CHANGE; break; } if(drawData.filled) { - if (segPtr->type == SEG_POLY) segPtr->type = SEG_FILPOLY; - if (segPtr->type == SEG_CRVLIN) segPtr->type = SEG_FILCRCL; + if (segPtr->type == SEG_POLY) { + segPtr->type = SEG_FILPOLY; + segPtr->u.p.polyType = FREEFORM; + drawData.open = FALSE; + drawDesc[OP].mode = DESC_RO|DESC_CHANGE; + } + if (segPtr->type == SEG_CRVLIN) { + segPtr->type = SEG_FILCRCL; + drawData.length = 0.0; + drawDesc[LN].mode = DESC_RO|DESC_CHANGE; + } } else { - if (segPtr->type == SEG_FILPOLY) segPtr->type = SEG_POLY; + if (segPtr->type == SEG_FILPOLY) { + segPtr->type = SEG_POLY; + segPtr->u.p.polyType = FREEFORM; + drawData.open = FALSE; + drawDesc[OP].mode = DESC_CHANGE; + } if (segPtr->type == SEG_FILCRCL) { segPtr->type = SEG_CRVLIN; segPtr->u.c.a0 = 0.0; segPtr->u.c.a1 = 360.0; + drawData.length = 2*M_PI*segPtr->u.c.radius; + drawDesc[LN].mode = DESC_RO|DESC_CHANGE; } } break; @@ -1003,9 +978,17 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) break; } if (drawData.open) { - if (segPtr->type == SEG_POLY && segPtr->u.p.polyType == FREEFORM) segPtr->u.p.polyType = POLYLINE; + if (segPtr->type == SEG_POLY && segPtr->u.p.polyType == FREEFORM) { + segPtr->u.p.polyType = POLYLINE; + drawData.filled = FALSE; + drawDesc[FL].mode = DESC_RO|DESC_CHANGE; + } } else { - if (segPtr->type == SEG_POLY && segPtr->u.p.polyType == POLYLINE) segPtr->u.p.polyType = FREEFORM; + if (segPtr->type == SEG_POLY && segPtr->u.p.polyType == POLYLINE) { + segPtr->u.p.polyType = FREEFORM; + drawData.filled = FALSE; + drawDesc[FL].mode = DESC_CHANGE; + } } break; case BX: @@ -1015,6 +998,10 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) if ( wTextGetModified((wText_p)drawDesc[TX].control0 )) { int len = wTextGetSize((wText_p)drawDesc[TX].control0); MyFree( segPtr->u.t.string ); + if (len>STR_HUGE_SIZE-8) { //Truncate string to max + len = STR_HUGE_SIZE-8; + ErrorMessage( MSG_TEXT_TOO_LONG ); + } segPtr->u.t.string = (char *)MyMalloc(len+1); wTextGetText((wText_p)drawDesc[TX].control0, segPtr->u.t.string, len+1); segPtr->u.t.string[len] = '\0'; //Make sure of null term @@ -1025,6 +1012,13 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) SetTrkLayer( trk, drawData.layer); break; case LK: + if (drawData.lock_origin) { + drawDesc[RA].mode = 0; + } else { + drawDesc[RA].mode = DESC_RO; + } + drawData.rotate_angle = 0.0; + drawDesc[RA].mode |= DESC_CHANGE; break; case LT: xx->lineType = drawData.lineType; @@ -1034,7 +1028,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) } drawData.oldE0 = drawData.endPt[0]; drawData.oldE1 = drawData.endPt[1]; - drawData.oldAngle = drawData.angle; + drawData.oldAngle = drawData.rotate_angle; drawData.oldOrigin = drawData.origin; ComputeDrawBoundingBox( trk ); DrawNewTrack( trk ); @@ -1045,7 +1039,7 @@ extern BOOL_T inDescribeCmd; static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataDraw_t *xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); coOrd pos = oldMarker; trkSeg_p segPtr; int inx; @@ -1057,14 +1051,17 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) if ( drawSegInx==-1 ) return; segPtr = &xx->segs[drawSegInx]; - for ( inx=0; inx<sizeof drawDesc/sizeof drawDesc[0]; inx++ ) { + for ( inx=0; inx<COUNT( drawDesc ); inx++ ) { drawDesc[inx].mode = DESC_IGNORE; drawDesc[inx].control0 = NULL; } drawData.color = segPtr->color; drawData.layer = GetTrkLayer(trk); drawDesc[CO].mode = 0; - drawData.lineWidth = (long)floor(segPtr->width*mainD.dpi+0.5); + if (drawData.lineWidth<0) + drawData.lineWidth = (long)segPtr->width; + else + drawData.lineWidth = (long)floor(segPtr->width*75.0+0.5); drawDesc[LW].mode = 0; drawDesc[LY].mode = DESC_NOREDRAW; drawDesc[BE].mode = @@ -1076,7 +1073,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) if ((xx->orig.x == 0.0) && (xx->orig.y == 0.0)) drawData.lock_origin = FALSE; else drawData.lock_origin = TRUE; - drawData.rotate_angle = xx->angle; + drawData.rotate_angle = 0.0; drawDesc[LK].mode = 0; @@ -1090,13 +1087,19 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawData.length = FindDistance( drawData.endPt[0], drawData.endPt[1] ); drawData.angle = FindAngle( drawData.endPt[0], drawData.endPt[1] ); drawData.origin = xx->orig; + //Remove input Angle (if any) + UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig); + UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig); + xx->angle = 0.0; drawDesc[LN].mode = - drawDesc[AL].mode = + drawDesc[LA].mode = drawDesc[PV].mode = 0; drawDesc[E0].mode = drawDesc[OI].mode = 0; drawDesc[E1].mode = 0; drawDesc[RA].mode = 0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + else drawDesc[RA].mode = 0; switch (segPtr->type) { case SEG_STRLIN: title = _("Straight Line"); @@ -1136,22 +1139,30 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) break; case SEG_CRVLIN: REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); + //Remove input Angle (if any) + UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, xx->orig); + xx->angle = 0.0; drawData.radius = fabs(segPtr->u.c.radius); drawData.origin = xx->orig; drawDesc[OI].mode = 0; - drawDesc[RA].mode = drawDesc[CE].mode = drawDesc[RD].mode = 0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + else drawDesc[RA].mode = 0; drawDesc[LT].mode = 0; drawData.lineType = (wIndex_t)xx->lineType; if ( segPtr->u.c.a1 >= 360.0 ) { title = _("Circle"); drawDesc[FL].mode = 0; drawData.filled = FALSE; + drawDesc[LN].mode = DESC_RO; + drawData.length = 2*M_PI*segPtr->u.c.radius; } else { drawData.angle = segPtr->u.c.a1; drawData.angle0 = NormalizeAngle( segPtr->u.c.a0+xx->angle ); drawData.angle1 = NormalizeAngle( drawData.angle0+drawData.angle ); + drawDesc[LN].mode = DESC_RO; + drawData.length = 2*M_PI*segPtr->u.c.radius*segPtr->u.c.a1/360; drawDesc[AL].mode = drawDesc[A1].mode = drawDesc[A2].mode = 0; @@ -1161,12 +1172,18 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) break; case SEG_FILCRCL: REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); + //Remove input Angle (if any) + UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, xx->orig); + xx->angle = 0.0; drawData.radius = fabs(segPtr->u.c.radius); drawData.origin = xx->orig; drawDesc[OI].mode = - drawDesc[RA].mode = drawDesc[FL].mode = 0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + else drawDesc[RA].mode = 0; drawData.filled = TRUE; + drawData.length = 0.0; + drawDesc[LN].mode = DESC_RO; drawDesc[CE].mode = drawDesc[RD].mode = 0; drawDesc[PV].mode = 0; @@ -1175,23 +1192,34 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) title = _("Filled Circle"); break; case SEG_POLY: + case SEG_FILPOLY:; + BOOL_T filled = FALSE; + if (segPtr->type == SEG_FILPOLY) filled = TRUE; REORIGIN(drawData.endPt[0],segPtr->u.p.pts[0].pt, xx->angle, xx->orig); + //Remove input Angle (if any) + for (int i=0;i<segPtr->u.p.cnt;i++) { + coOrd pt; + REORIGIN(pt,segPtr->u.p.pts[i].pt, xx->angle, xx->orig); + UNREORIGIN(segPtr->u.p.pts[i].pt, pt, 0.0, xx->orig); + } + xx->angle = 0.0; drawDesc[PP].mode = 0; drawData.pointCount = segPtr->u.p.cnt; drawDesc[VC].mode = DESC_RO; - drawData.filled = FALSE; + drawData.filled = filled; drawDesc[FL].mode = 0; drawData.angle = 0.0; - drawDesc[RA].mode = 0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + else drawDesc[RA].mode = 0; drawData.origin = xx->orig; drawDesc[OI].mode = 0; - drawData.open=FALSE; - drawDesc[OP].mode = 0; + drawData.open= FALSE; + drawDesc[OP].mode = filled?DESC_RO:0; drawDesc[LT].mode = 0; drawData.lineType = (wIndex_t)xx->lineType; switch (segPtr->u.p.polyType) { case RECTANGLE: - title = _("Rectangle"); + title = filled?_("Filled Rectangle"):_("Rectangle"); drawDesc[OP].mode = DESC_IGNORE; drawDesc[VC].mode = DESC_IGNORE; drawData.width = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[1].pt); @@ -1207,57 +1235,33 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) case POLYLINE: title = _("Polyline"); drawData.open=TRUE; + drawData.filled= FALSE; + drawDesc[FL].mode = DESC_RO; + drawDesc[OP].mode = 0; break; default: - title = _("Polygon"); - } - break; - case SEG_FILPOLY: - REORIGIN(drawData.endPt[0],segPtr->u.p.pts[0].pt, xx->angle, xx->orig); - drawDesc[PP].mode = 0; - drawData.pointCount = segPtr->u.p.cnt; - drawDesc[VC].mode = DESC_RO; - drawData.filled = TRUE; - drawDesc[FL].mode = 0; - drawDesc[LW].mode = DESC_IGNORE; - drawData.angle = xx->angle; - drawDesc[RA].mode = 0; - drawData.origin = xx->orig; - drawDesc[OI].mode = DESC_RO; - drawData.open = FALSE; - switch (segPtr->u.p.polyType) { - case RECTANGLE: - title =_("Filled Rectangle"); - drawDesc[VC].mode = DESC_IGNORE; - drawData.width = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[1].pt); - drawDesc[WT].mode = 0; - drawData.height = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[3].pt); - drawDesc[HT].mode = 0; - for(int i=0;i<4;i++) { - REORIGIN( drawData.endPt[i], segPtr->u.p.pts[i].pt, xx->angle, xx->orig ); - } - drawDesc[E0].mode = DESC_IGNORE; - drawData.origin = xx->orig; - break; - default: - title = _("Filled Polygon"); + title = filled?_("Filled Polygon"):_("Polygon"); } break; case SEG_TEXT: REORIGIN( drawData.endPt[0], segPtr->u.t.pos, xx->angle, xx->orig ); - drawData.angle = NormalizeAngle( xx->angle ); + UNREORIGIN( segPtr->u.t.pos, drawData.endPt[0], 0.0, xx->orig ); + xx->angle = 0.0; + drawData.angle = segPtr->u.t.angle; //Text Angle + drawData.origin = xx->orig; strncpy( drawData.text, segPtr->u.t.string, sizeof drawData.text ); drawData.text[sizeof drawData.text-1] ='\0'; drawData.boxed = segPtr->u.t.boxed; - drawData.origin = xx->orig; - drawDesc[E0].mode = drawDesc[TP].mode = drawDesc[TS].mode = drawDesc[TX].mode = drawDesc[TA].mode = - drawDesc[BX].mode = - drawDesc[RA].mode = - drawDesc[OI].mode = 0; + drawDesc[LK].mode = + drawDesc[OI].mode = + drawDesc[BX].mode = 0; + if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + else drawDesc[RA].mode = 0; + drawDesc[E0].mode = DESC_IGNORE; drawDesc[CO].mode = 0; /*Allow Text color setting*/ drawDesc[LW].mode = DESC_IGNORE; title = _("Text"); @@ -1272,7 +1276,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawData.oldE0 = drawData.endPt[0]; drawData.oldE1 = drawData.endPt[1]; - drawData.oldAngle = drawData.angle; + drawData.oldAngle = drawData.rotate_angle; drawData.oldOrigin = drawData.origin; @@ -1281,26 +1285,26 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) if ( segPtr->type==SEG_BENCH && drawDesc[BE].control0!=NULL && drawDesc[OR].control0!=NULL) { BenchLoadLists( (wList_p)drawDesc[BE].control0, (wList_p)drawDesc[OR].control0 ); wListSetIndex( (wList_p)drawDesc[BE].control0, drawData.benchChoice ); - BenchUpdateOrientationList( (long)wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice ), (wList_p)drawDesc[OR].control0 ); + BenchUpdateOrientationList( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); wListSetIndex( (wList_p)drawDesc[OR].control0, drawData.benchOrient ); } if ( (segPtr->type==SEG_STRLIN || segPtr->type==SEG_CRVLIN || segPtr->type==SEG_POLY) && drawDesc[LT].control0!=NULL) { wListClear( (wList_p)drawDesc[LT].control0 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("Solid"), NULL, (void*)0 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("Dash"), NULL, (void*)1 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("Dot"), NULL, (void*)2 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("DashDot"), NULL, (void*)3 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("DashDotDot"), NULL, (void*)4 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("CenterDot"), NULL, (void*)5 ); - wListAddValue( (wList_p)drawDesc[LT].control0, _("PhantomDot"), NULL, (void*)6 ); + wListAddValue( (wList_p)drawDesc[LT].control0, _("Solid"), NULL, I2VP(0 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("Dash"), NULL, I2VP(1 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("Dot"), NULL, I2VP(2 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("DashDot"), NULL, I2VP(3 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("DashDotDot"), NULL, I2VP(4 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("CenterDot"), NULL, I2VP(5 )); + wListAddValue( (wList_p)drawDesc[LT].control0, _("PhantomDot"), NULL, I2VP(6 )); wListSetIndex( (wList_p)drawDesc[LT].control0, drawData.lineType ); } if ( segPtr->type==SEG_DIMLIN && drawDesc[DS].control0!=NULL ) { wListClear( (wList_p)drawDesc[DS].control0 ); - wListAddValue( (wList_p)drawDesc[DS].control0, _("Tiny"), NULL, (void*)0 ); - wListAddValue( (wList_p)drawDesc[DS].control0, _("Small"), NULL, (void*)1 ); - wListAddValue( (wList_p)drawDesc[DS].control0, _("Medium"), NULL, (void*)2 ); - wListAddValue( (wList_p)drawDesc[DS].control0, _("Large"), NULL, (void*)3 ); + wListAddValue( (wList_p)drawDesc[DS].control0, _("Tiny"), NULL, I2VP(0 )); + wListAddValue( (wList_p)drawDesc[DS].control0, _("Small"), NULL, I2VP(1 )); + wListAddValue( (wList_p)drawDesc[DS].control0, _("Medium"), NULL, I2VP(2 )); + wListAddValue( (wList_p)drawDesc[DS].control0, _("Large"), NULL, I2VP(3 )); wListSetIndex( (wList_p)drawDesc[DS].control0, drawData.dimenSize ); } if ( segPtr->type==SEG_TEXT && drawDesc[TS].control0!=NULL ) { @@ -1311,7 +1315,7 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) static void DrawDraw( track_p t, drawCmd_p d, wDrawColor color ) { - struct extraData * xx = GetTrkExtraData(t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); unsigned long NotSolid = ~(DC_NOTSOLIDLINE); d->options &= NotSolid; if (xx->lineType == DRAWLINESOLID) {} @@ -1329,7 +1333,7 @@ static void DrawDraw( track_p t, drawCmd_p d, wDrawColor color ) static void DeleteDraw( track_p t ) { /* Get rid of points if specified */ - struct extraData * xx = GetTrkExtraData(t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || xx->segs[0].type == SEG_FILPOLY) { MyFree(xx->segs[0].u.p.pts); @@ -1340,7 +1344,7 @@ static void DeleteDraw( track_p t ) static BOOL_T WriteDraw( track_p t, FILE * f ) { - struct extraData * xx = GetTrkExtraData(t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); BOOL_T rc = TRUE; rc &= fprintf(f, "DRAW %d %d %d 0 0 %0.6f %0.6f 0 %0.6f\n", GetTrkIndex(t), GetTrkLayer(t), xx->lineType, @@ -1359,7 +1363,7 @@ static BOOL_T ReadDraw( char * header ) ANGLE_T angle; wIndex_t layer; int lineType; - struct extraData * xx; + struct extraDataDraw_t * xx; if ( !GetArgs( header+5, paramVersion<3?"dXXpYf":paramVersion<9?"dLX00pYf":"dLd00pff", &index, &layer, &lineType, &orig, &elev, &angle ) ) @@ -1368,11 +1372,13 @@ static BOOL_T ReadDraw( char * header ) return FALSE; if (tempSegs_da.cnt == 1) { trk = MakeDrawFromSeg1( index, orig, angle, &tempSegs(0) ); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + xx->lineType = lineType; SetTrkLayer( trk, layer ); } else { trk = NewTrack( index, T_DRAW, 0, sizeof *xx + (tempSegs_da.cnt-1) * sizeof *(trkSeg_p)0 ); SetTrkLayer( trk, layer ); - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); xx->orig = orig; xx->angle = angle; xx->segCnt = tempSegs_da.cnt; @@ -1384,27 +1390,88 @@ static BOOL_T ReadDraw( char * header ) } -static void MoveDraw( track_p trk, coOrd orig ) +static void MoveDraw( track_p trk, coOrd off ) { - struct extraData * xx = GetTrkExtraData(trk); - xx->orig.x += orig.x; - xx->orig.y += orig.y; + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + + trkSeg_p segPtr = &xx->segs[0]; + + if (xx->orig.x == 0.0 && xx->orig.y == 0.0) { //No origin set + switch(segPtr->type) { + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0;i<segPtr->u.p.cnt;i++) { + REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); + } + break; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0;i<2;i++) { + REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + REORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); + break; + case SEG_TEXT: + REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); + break; + default:; + } + + } else { + xx->orig.x += off.x; + xx->orig.y += off.y; + } ComputeDrawBoundingBox( trk ); } static void RotateDraw( track_p trk, coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); - Rotate( &xx->orig, orig, angle ); - xx->angle = NormalizeAngle( xx->angle + angle ); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + trkSeg_p segPtr = &xx->segs[0]; + if (xx->orig.x == 0.0 && xx->orig.y == 0.0) { //No origin set + switch(segPtr->type) { + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0;i<segPtr->u.p.cnt;i++) { + Rotate(&segPtr->u.p.pts[i].pt, orig, angle ); + } + break; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0;i<2;i++) { + Rotate( &segPtr->u.l.pos[i], orig, angle ); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + Rotate( &segPtr->u.c.center, orig, angle ); + segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + angle); + break; + case SEG_TEXT: + Rotate( &segPtr->u.t.pos, orig, angle ); + segPtr->u.t.angle = NormalizeAngle(segPtr->u.t.angle+angle+xx->angle); + break; + default:; + } + } else { + Rotate( &xx->orig, orig, angle ); + xx->angle = NormalizeAngle( xx->angle + angle ); + } ComputeDrawBoundingBox( trk ); } static void RescaleDraw( track_p trk, FLOAT_T ratio ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); xx->orig.x *= ratio; xx->orig.y *= ratio; RescaleSegs( xx->segCnt, xx->segs, ratio, ratio, ratio ); @@ -1422,7 +1489,8 @@ static drawModContext_t drawModCmdContext = { static BOOL_T infoSubst = FALSE; -static paramIntegerRange_t i0_100 = { 0, 100, 25 }; +static paramIntegerRange_t i100_100 = { -100, 100, 25 }; //Allow negative numbers +static paramFloatRange_t r0d001_10000 = { 0.001, 10000 }; static paramFloatRange_t r1_10000 = { 1, 10000 }; static paramFloatRange_t r0_10000 = { 0, 10000 }; static paramFloatRange_t r10000_10000 = {-10000, 10000}; @@ -1431,31 +1499,31 @@ static paramFloatRange_t r0_360 = { 0, 360, 80 }; static paramData_t drawModPLs[] = { #define drawModLengthPD (drawModPLs[0]) - { PD_FLOAT, &drawModCmdContext.length, "Length", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Length") }, + { PD_FLOAT, &drawModCmdContext.length, "Length", PDO_NOPREF|PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Length") }, #define drawModAnglePD (drawModPLs[1]) - { PD_FLOAT, &drawModCmdContext.abs_angle, "Angle", PDO_NORECORD|BO_ENTER, &r360_360, N_("Angle") }, + { PD_FLOAT, &drawModCmdContext.abs_angle, "Angle", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r360_360, N_("Angle") }, #define drawModRelAnglePD (drawModPLs[2]) #define drawModRelAngle 2 - { PD_FLOAT, &drawModCmdContext.rel_angle, "Rel Angle", PDO_NORECORD|BO_ENTER, &r360_360, N_("Relative Angle") }, + { PD_FLOAT, &drawModCmdContext.rel_angle, "RelAngle", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r360_360, N_("Relative Angle") }, #define drawModWidthPD (drawModPLs[3]) - { PD_FLOAT, &drawModCmdContext.width, "Width", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Width") }, + { PD_FLOAT, &drawModCmdContext.width, "Width", PDO_NOPREF|PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Width") }, #define drawModHeightPD (drawModPLs[4]) - { PD_FLOAT, &drawModCmdContext.height, "Height", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Height") }, + { PD_FLOAT, &drawModCmdContext.height, "Height", PDO_NOPREF|PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Height") }, #define drawModRadiusPD (drawModPLs[5]) #define drawModRadius 5 - { PD_FLOAT, &drawModCmdContext.radius, "Radius", PDO_DIM|PDO_NORECORD|BO_ENTER, &r10000_10000, N_("Radius") }, + { PD_FLOAT, &drawModCmdContext.radius, "Radius", PDO_NOPREF|PDO_DIM|PDO_NORECORD|BO_ENTER, &r0d001_10000, N_("Radius") }, #define drawModArcAnglePD (drawModPLs[6]) - { PD_FLOAT, &drawModCmdContext.arc_angle, "ArcAngle", PDO_NORECORD|BO_ENTER, &r360_360, N_("Arc Angle") }, + { PD_FLOAT, &drawModCmdContext.arc_angle, "ArcAngle", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r360_360, N_("Arc Angle") }, #define drawModRotAnglePD (drawModPLs[7) - { PD_FLOAT, &drawModCmdContext.rot_angle, "Rot Angle", PDO_NORECORD|BO_ENTER, &r0_360, N_("Rotate Angle") }, + { PD_FLOAT, &drawModCmdContext.rot_angle, "RotAngle", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r0_360, N_("Rotate Angle") }, #define drawModRotCenterXPD (drawModPLs[8]) #define drawModRotCenterInx 8 - { PD_FLOAT, &drawModCmdContext.rot_center.x, "Rot Center X,Y", PDO_NORECORD|BO_ENTER, &r0_10000, N_("Rot Center X") }, + { PD_FLOAT, &drawModCmdContext.rot_center.x, "RotCenterx", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Rot Center X,Y") }, #define drawModRotCenterYPD (drawModPLs[9]) - { PD_FLOAT, &drawModCmdContext.rot_center.y, " ", PDO_NORECORD|BO_ENTER, &r0_10000, N_("Rot Center Y") }, + { PD_FLOAT, &drawModCmdContext.rot_center.y, "RotCentery", PDO_NOPREF|PDO_NORECORD|BO_ENTER, &r0_10000, NULL }, }; -static paramGroup_t drawModPG = { "drawMod", 0, drawModPLs, sizeof drawModPLs/sizeof drawModPLs[0] }; +static paramGroup_t drawModPG = { "drawMod", 0, drawModPLs, COUNT( drawModPLs ) }; static void DrawModDlgUpdate( paramGroup_p pg, @@ -1472,7 +1540,7 @@ static void DrawModDlgUpdate( static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); STATUS_T rc = C_CONTINUE; wControl_p controls[5]; //Always needs a NULL last entry @@ -1649,6 +1717,7 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) wMenuPushEnable( drawModLast,drawModCmdContext.rotate_state && (drawModCmdContext.prev_inx>=0)); wMenuPushEnable( drawModCenter,drawModCmdContext.rotate_state); break; + case wActionExtKey: case C_TEXT: ignoredDraw = trk ; rc = DrawGeomModify( action, pos, &drawModCmdContext ); @@ -1665,19 +1734,25 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) xx->angle = drawModCmdContext.angle; xx->orig = drawModCmdContext.orig; ignoredDraw = NULL; + DrawNewTrack( trk ); ComputeDrawBoundingBox( trk ); - DYNARR_RESET(trkSeg_t,tempSegs_da); if ( infoSubst ) { InfoSubstituteControls( NULL, NULL ); infoSubst = FALSE; } break; - case C_CANCEL: case C_CONFIRM: - case C_TERMINATE: + case C_OK: + rc = DrawGeomModify( action, pos, &drawModCmdContext ); + ComputeDrawBoundingBox( trk ); + if ( infoSubst ) { + InfoSubstituteControls( NULL, NULL ); + infoSubst = FALSE; + } + break; + case C_CANCEL: rc = DrawGeomModify( action, pos, &drawModCmdContext ); drawModCmdContext.state = MOD_NONE; - DYNARR_RESET(trkSeg_t,tempSegs_da); if ( infoSubst ) { InfoSubstituteControls( NULL, NULL ); infoSubst = FALSE; @@ -1694,7 +1769,7 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) static void UngroupDraw( track_p trk ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); int inx; if ( xx->segCnt <= 1 ) return; @@ -1715,7 +1790,7 @@ static ANGLE_T GetAngleDraw( EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); ANGLE_T angle; pos.x -= xx->orig.x; @@ -1732,20 +1807,23 @@ static ANGLE_T GetAngleDraw( static BOOL_T EnumerateDraw( track_p trk ) { - struct extraData * xx; + struct extraDataDraw_t * xx; int inx; trkSeg_p segPtr; if ( trk ) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if ( xx->segCnt < 1 ) - return TRUE; + return FALSE; + BOOL_T content = FALSE; for ( inx=0; inx<xx->segCnt; inx++ ) { segPtr = &xx->segs[inx]; if ( segPtr->type == SEG_BENCH ) { CountBench( segPtr->u.l.option, FindDistance( segPtr->u.l.pos[0], segPtr->u.l.pos[1] ) ); + content = TRUE; } } + return content; } else { TotalBench(); } @@ -1758,10 +1836,47 @@ static void FlipDraw( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + + trkSeg_p segPtr = &xx->segs[0]; + BOOL_T reorigin = FALSE; + if (xx->orig.x == 0.0 && xx->orig.y == 0.0) { + reorigin = TRUE; + } FlipPoint( &xx->orig, orig, angle ); xx->angle = NormalizeAngle( 2*angle - xx->angle + 180.0 ); FlipSegs( xx->segCnt, xx->segs, zero, angle ); + + + if (reorigin) { + switch(segPtr->type) { + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0;i<segPtr->u.p.cnt;i++) { + REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, xx->angle, xx->orig); + } + break; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0;i<2;i++) { + REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], xx->angle, xx->orig); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + REORIGIN( segPtr->u.c.center, segPtr->u.c.center, xx->angle, xx->orig); + segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + xx->angle); + break; + case SEG_TEXT: + REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, xx->angle, xx->orig ); + break; + default:; + } + xx->orig.x = 0.0, xx->orig.y = 0.0, xx->angle = 0.0; + } + ComputeDrawBoundingBox( trk ); } @@ -1770,7 +1885,7 @@ static BOOL_T StoreDraw( void **data, long * len) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || xx->segs[0].type == SEG_FILPOLY) { *data = xx->segs[0].u.p.pts; @@ -1785,7 +1900,7 @@ static BOOL_T ReplayDraw( void * data, long len) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || xx->segs[0].type == SEG_FILPOLY) { xx->segs[0].u.p.pts = MyMalloc(len); @@ -1797,7 +1912,7 @@ static BOOL_T ReplayDraw( static BOOL_T QueryDraw( track_p trk, int query ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); switch(query) { case Q_IS_DRAW: return TRUE; @@ -1813,9 +1928,16 @@ static BOOL_T QueryDraw( track_p trk, int query ) case Q_GET_NODES: return TRUE; case Q_CAN_PARALLEL: - if ((xx->segs[0].type == SEG_STRLIN) || (xx->segs[0].type == SEG_CRVLIN || - ((xx->segs[0].type == SEG_POLY) && (xx->segs[0].u.p.polyType == POLYLINE)) - )) return TRUE; + case Q_MODIFY_CAN_SPLIT: + if ((xx->segs[0].type == SEG_STRLIN) || + (xx->segs[0].type == SEG_CRVLIN) || + (xx->segs[0].type == SEG_BEZLIN) || + (xx->segs[0].type == SEG_FILCRCL) || + (xx->segs[0].type == SEG_FILPOLY) || + (xx->segs[0].type == SEG_POLY) || + (xx->segs[0].type == SEG_BENCH) || + (xx->segs[0].type == SEG_TBLEDGE) + ) return TRUE; else return FALSE; default: return FALSE; @@ -1824,8 +1946,8 @@ static BOOL_T QueryDraw( track_p trk, int query ) static wBool_t CompareDraw( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataDraw_t *xx1 = GET_EXTRA_DATA( trk1, T_DRAW, extraDataDraw_t ); + struct extraDataDraw_t *xx2 = GET_EXTRA_DATA( trk2, T_DRAW, extraDataDraw_t ); char * cp = message + strlen(message); REGRESS_CHECK_POS( "Orig", xx1, xx2, orig ) REGRESS_CHECK_ANGLE( "Angle", xx1, xx2, angle ) @@ -1835,7 +1957,7 @@ static wBool_t CompareDraw( track_cp trk1, track_cp trk2 ) static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * params ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (inx != PARAMS_NODES ) return FALSE; DYNARR_RESET(coOrd,params->nodes); BOOL_T back = FALSE; @@ -1845,6 +1967,7 @@ static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * pa if (xx->segs[0].u.p.polyType != POLYLINE) return FALSE; REORIGIN(start,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); REORIGIN(end,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); + params->ep = 1; if (FindDistance(pos,start)>FindDistance(pos,end)) back = TRUE; for (int i=0;i<xx->segs[0].u.p.cnt;i++) { DYNARR_APPEND(coOrd,params->nodes,xx->segs[0].u.p.cnt); @@ -1861,7 +1984,10 @@ static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * pa case SEG_STRLIN:; REORIGIN(start,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); REORIGIN(end,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); - if (FindDistance(pos,start)>FindDistance(pos,end)) back = TRUE; + params->ep = 1; + if (FindDistance(pos,start)>FindDistance(pos,end)) { + back = TRUE; + } for (int i=0;i<2;i++) { DYNARR_APPEND(coOrd,params->nodes,2); REORIGIN(DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.l.pos[back?1-i:i],xx->angle,xx->orig); @@ -1896,6 +2022,7 @@ static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * pa } params->lineOrig = DYNARR_N(coOrd,params->nodes,0); params->lineEnd = DYNARR_LAST(coOrd,params->nodes); + params->ep = 1; return TRUE; case SEG_BEZLIN: @@ -1962,6 +2089,309 @@ static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * pa } +static BOOL_T SplitDraw( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) +{ + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + + coOrd p0,p1; + DIST_T d; + BOOL_T polyline_trim = FALSE, new_last = ep; + + + DYNARR_SET(trkSeg_t, tempSegs_da, 1); + + tempSegs(0).type = -1; + + switch (xx->segs[0].type) { + case SEG_STRLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); + REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).width = xx->segs[0].width; + tempSegs_da.cnt = 1; + tempSegs(0).type = xx->segs[0].type; + tempSegs(0).u.l.pos[0] = 1-ep?p0:pos; + tempSegs(0).u.l.pos[1] = 1-ep?pos:p1; + xx->segs[0].u.l.pos[0] = 1-ep?pos:p0; + xx->segs[0].u.l.pos[1] = 1-ep?p1:pos; + break; + case SEG_CRVLIN: + case SEG_FILCRCL: ; + coOrd c; + REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); + coOrd c0,c1; + if (xx->segs[0].type == SEG_FILCRCL || + (xx->segs[0].type == SEG_CRVLIN && xx->segs[0].u.c.a1 >= 360.0)) { + Translate(&c0,c,FindAngle(c,pos),xx->segs[0].u.c.radius); + c1 = c0; + xx->segs[0].type = SEG_CRVLIN; + xx->segs[0].u.c.a0 = FindAngle(c,c0); + xx->segs[0].u.c.a1 = 355.0; + } else { + Translate(&c0,c,xx->segs[0].u.c.a0+xx->angle,xx->segs[0].u.c.radius); + Translate(&c1,c,xx->segs[0].u.c.a1+xx->segs[0].u.c.a0+xx->angle,xx->segs[0].u.c.radius); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).width = xx->segs[0].width; + tempSegs_da.cnt = 1; + tempSegs(0).type = SEG_CRVLIN; + tempSegs(0).u.c.center = c; + tempSegs(0).u.c.radius = xx->segs[0].u.c.radius; + if (ep) { + tempSegs(0).u.c.a0 = FindAngle(c,c0); + tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,pos)-tempSegs(0).u.c.a0); + } else { + tempSegs(0).u.c.a0 = FindAngle(c,pos); + tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,c1)-tempSegs(0).u.c.a0); + } + xx->segs[0].u.c.center = c; + if (ep) { + xx->segs[0].u.c.a0 = FindAngle(c,pos); + xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,c1)-xx->segs[0].u.c.a0); + } else { + xx->segs[0].u.c.a0 = FindAngle(c,c0); + xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,pos)-xx->segs[0].u.c.a0); + } + } + break; + case SEG_POLY: + case SEG_FILPOLY: + d = DIST_INF; + DIST_T dd; + BOOL_T onPoint = FALSE; + BOOL_T closeSeg = FALSE; + coOrd end; + int polyInx = -1; + for ( int inx=0; inx<xx->segs[0].u.p.cnt-1; inx++ ) { + p0 = pos; + coOrd pl0,pl1; + REORIGIN(pl0,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); + REORIGIN(pl1,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); + dd = LineDistance( &p0, pl0, pl1 ); + if ( d > dd ) { + d = dd; + if (IsClose(FindDistance(pos,pl1))) { + polyInx = inx; + REORIGIN(pos,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); + onPoint = TRUE; + break; + } else if (IsClose(FindDistance(pos,pl1))) { + polyInx = inx+1; + REORIGIN(pos,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); + onPoint=TRUE; + break; + } else { + if (!IsClose(d)) continue; + polyInx = inx; + pos = p0; + break; + } + } + } + //If Closed, look at closing line + if ( !onPoint && (xx->segs[0].u.p.polyType != POLYLINE)) { + coOrd pl0,pl1; + p0 = pos; + REORIGIN(pl0,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); + REORIGIN(pl1,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); + dd = LineDistance( &p0, pl0, pl1 ); + if (d > dd) { + d = dd; + if (IsClose(d)) { + polyInx = xx->segs[0].u.p.cnt-1; + closeSeg=TRUE; + pos = p0; + } + } + } + //If Closed, split into a PolyLine + if (xx->segs[0].u.p.polyType != POLYLINE) { + if (!IsClose(d)) { + *leftover = NULL; + return FALSE; + } + end = pos; + REORIGIN(end,end,xx->angle,xx->orig); + + trkSeg_t temp; //Buffer for expanded array + temp.u.p.cnt = xx->segs[0].u.p.cnt + 2 - onPoint; + temp.u.p.pts = MyMalloc(temp.u.p.cnt*sizeof(pts_t)); + int j = 0; + temp.u.p.pts[j].pt = end; + temp.u.p.pts[j].pt_type = wPolyLineStraight; + j++; + /* After split */ + for (int i=polyInx+1;i<=xx->segs[0].u.p.cnt-1;i++,j++) { + temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); + } + /* Before split */ + for (int i=0;i<=polyInx;i++,j++) { + temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); + } + if (!onPoint) { + temp.u.p.pts[temp.u.p.cnt-1].pt = end; + } + temp.u.p.pts[temp.u.p.cnt-1].pt_type = wPolyLineStraight; + + //Swap Pts Array into existing track + MyFree(xx->segs[0].u.p.pts); + xx->segs[0].u.p.pts = temp.u.p.pts; + xx->segs[0].u.p.cnt = temp.u.p.cnt; + xx->segs[0].u.p.polyType = POLYLINE; + break; + } + //Check if on an end-point -> reject + if ((polyInx <= 0 || polyInx >= xx->segs[0].u.p.cnt-1) && onPoint ) { + *leftover = NULL; + return FALSE; + } + if (polyInx == 0 || (polyInx == 1 && onPoint )) { + //Between First End and Next -> Trim end + end = xx->segs[0].u.p.pts[0].pt; + REORIGIN(end,end,xx->angle,xx->orig); + if (onPoint) { + for (int i=0;i< xx->segs[0].u.p.cnt-1;i++) { + xx->segs[0].u.p.pts[i] = xx->segs[0].u.p.pts[i+1]; + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); + } + --xx->segs[0].u.p.cnt; + } else { + xx->segs[0].u.p.pts[0].pt = pos; + for (int i=1;i< xx->segs[0].u.p.cnt;i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); + } + } + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).width = xx->segs[0].width; + tempSegs_da.cnt = 1; + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = pos; + tempSegs(0).u.l.pos[1] = end; + polyline_trim = TRUE; + new_last = FALSE; + } else if (polyInx == xx->segs[0].u.p.cnt-2) { + //Between second last and last -> Trim the other end + end = xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt; + REORIGIN(end,end,xx->angle,xx->orig); + if (onPoint) { + --xx->segs[0].u.p.cnt; + for (int i=0;i<xx->segs[0].u.p.cnt;i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); + } + } else { + xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt = pos; + for (int i=0;i<xx->segs[0].u.p.cnt;i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); + } + } + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).width = xx->segs[0].width; + tempSegs_da.cnt = 1; + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = end; + tempSegs(0).u.l.pos[1] = pos; + polyline_trim = TRUE; + new_last = TRUE; + } else { + //Check that new line will have >=3 spots if not -> reject + if (xx->segs[0].u.p.cnt >3) { + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).width = xx->segs[0].width; + tempSegs_da.cnt = 1; + tempSegs(0).type = SEG_POLY; + tempSegs(0).u.p.polyType = POLYLINE; + if (1-ep) + tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt - polyInx; + else + tempSegs(0).u.p.cnt = polyInx + 2 - onPoint; + tempSegs(0).u.p.pts = MyMalloc(tempSegs(0).u.p.cnt*sizeof(pts_t)); + int j = 0; + if (1-ep) { + tempSegs(0).u.p.pts[0].pt=pos; + tempSegs(0).u.p.pts[0].pt_type = wPolyLineStraight; + j = 1; + for (int i=polyInx+1;i<xx->segs[0].u.p.cnt;i++,j++) { + tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle,xx->orig); + } + } else { + for (int i=0;i<=polyInx+1;i++,j++) { + tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle,xx->orig); + } + if (!onPoint) { + tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt = pos; + tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt_type = wPolyLineStraight; + } + } + } else { + *leftover = NULL; + return FALSE; + } + polyline_trim = TRUE; + new_last = 1-ep; + int new_cnt, old_cnt = xx->segs[0].u.p.cnt; + if (1-ep) + new_cnt = polyInx + 2 - onPoint; + else + new_cnt = xx->segs[0].u.p.cnt-polyInx; + pts_t * newpts = MyMalloc(new_cnt*sizeof(pts_t)); + int j = 0; + if (1-ep) { + for (int i = 0; i<polyInx+1; i++,j++) { + newpts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(newpts[j].pt,newpts[i].pt,xx->angle,xx->orig); + } + if (!onPoint) { + newpts[new_cnt-1].pt = pos; + newpts[new_cnt-1].pt_type = wPolyLineStraight; + } + } else { + newpts[0].pt = pos; + newpts[0].pt_type = wPolyLineStraight; + j = 1; + for (int i=polyInx+1;i<old_cnt;i++,j++) { + newpts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(newpts[j].pt,newpts[j].pt,xx->angle,xx->orig); + } + } + MyFree(xx->segs[0].u.p.pts); + xx->segs[0].u.p.cnt = new_cnt; + xx->segs[0].u.p.pts = newpts; + } + break; + default: + return FALSE; + } + *leftover = NULL; + if (tempSegs(0).type != -1) { + *leftover = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*leftover, T_DRAW, extraDataDraw_t); + yy->lineType = xx->lineType; + if (tempSegs(0).type == SEG_POLY && tempSegs(0).u.p.pts) { + MyFree(tempSegs(0).u.p.pts); + tempSegs(0).u.p.cnt = 0; + tempSegs(0).u.p.pts = NULL; + } + } + + if (*leftover) { + //Polyline sets new_last to the end of the extra + if (polyline_trim && (ep != new_last)) { + *leftover = trk; + } + } + xx->orig = zero; + xx->angle = 0.0; + ComputeDrawBoundingBox(trk); + *ep0 = 1-ep; + *ep1 = ep; + return TRUE; +} + static BOOL_T MakeParallelDraw( track_p trk, coOrd pos, @@ -1973,21 +2403,25 @@ static BOOL_T MakeParallelDraw( BOOL_T track) { if (track) return FALSE; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); ANGLE_T angle; DIST_T rad; - coOrd p0,p1; + + DYNARR_SET(trkSeg_t, tempSegs_da, 1); switch (xx->segs[0].type) { case SEG_STRLIN: - angle = FindAngle(xx->segs[0].u.l.pos[0],xx->segs[0].u.l.pos[1]); + angle = NormalizeAngle(FindAngle(xx->segs[0].u.l.pos[0],xx->segs[0].u.l.pos[1])+xx->angle); if ( NormalizeAngle( FindAngle( xx->segs[0].u.l.pos[0], pos ) - angle ) < 180.0 ) angle += 90; else angle -= 90; - Translate(&p0,xx->segs[0].u.l.pos[0], angle, sep); - Translate(&p1,xx->segs[0].u.l.pos[1], angle, sep); + coOrd p0,p1; + REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); + REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); + Translate(&p0,p0, angle, sep); + Translate(&p1,p1, angle, sep); tempSegs(0).color = xx->segs[0].color; tempSegs(0).width = xx->segs[0].width; tempSegs_da.cnt = 1; @@ -1996,7 +2430,7 @@ static BOOL_T MakeParallelDraw( tempSegs(0).u.l.pos[1] = p1; if (newTrkR) { *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraData * yy = GetTrkExtraData(*newTrkR); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); yy->lineType = xx->lineType; } @@ -2005,7 +2439,10 @@ static BOOL_T MakeParallelDraw( return TRUE; break; case SEG_CRVLIN: - rad = FindDistance( pos, xx->segs[0].u.c.center ); + case SEG_FILCRCL:; + coOrd c; + REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); + rad = FindDistance( pos, c ); if ( rad > xx->segs[0].u.c.radius ) rad = xx->segs[0].u.c.radius + sep; else @@ -2014,13 +2451,13 @@ static BOOL_T MakeParallelDraw( tempSegs(0).width = xx->segs[0].width; tempSegs_da.cnt = 1; tempSegs(0).type = SEG_CRVLIN; - tempSegs(0).u.c.center = xx->segs[0].u.c.center; + tempSegs(0).u.c.center = c; tempSegs(0).u.c.radius = rad; - tempSegs(0).u.c.a0 = xx->segs[0].u.c.a0; + tempSegs(0).u.c.a0 = xx->segs[0].u.c.a0 + xx->angle; tempSegs(0).u.c.a1 = xx->segs[0].u.c.a1; if (newTrkR) { *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraData * yy = GetTrkExtraData(*newTrkR); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); yy->lineType = xx->lineType; } if ( p0R ) PointOnCircle( p0R, xx->segs[0].u.c.center, rad, xx->segs[0].u.c.a0 ); @@ -2028,30 +2465,63 @@ static BOOL_T MakeParallelDraw( return TRUE; break; case SEG_POLY: - if (xx->segs[0].u.p.polyType != POLYLINE) return FALSE; - int inx2; + case SEG_FILPOLY: + pos.x -= xx->orig.x; + pos.y -= xx->orig.y; + Rotate( &pos, zero, -xx->angle ); coOrd p = pos; - angle = GetAngleSegs(1,&xx->segs[0],&p,NULL,NULL,NULL,&inx2,NULL); + int inx2; + angle = NormalizeAngle(GetAngleSegs(1,&xx->segs[0],&p,NULL,NULL,NULL,&inx2,NULL)+xx->angle); if ( NormalizeAngle( FindAngle( p, pos ) - angle ) < 180.0 ) { - sep = sep*1.0; - angle += 90; + angle = +90.0; } else { - angle -= 90; - sep = sep*1.0; + angle = -90.0; } tempSegs(0).color = xx->segs[0].color; tempSegs(0).width = xx->segs[0].width; tempSegs_da.cnt = 1; tempSegs(0).type = SEG_POLY; - tempSegs(0).u.p.polyType = POLYLINE; + tempSegs(0).u.p.polyType = xx->segs[0].type==SEG_POLY?xx->segs[0].u.p.polyType:POLYLINE; tempSegs(0).u.p.pts = memdup( xx->segs[0].u.p.pts, xx->segs[0].u.p.cnt*sizeof (pts_t) ); tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt; + ANGLE_T a,b; for (int i=0;i<xx->segs[0].u.p.cnt;i++) { - Translate(&tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,angle,sep); + REORIGIN(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,xx->angle, xx->orig); + } + for (int i=0;i<xx->segs[0].u.p.cnt;i++) { + if (xx->segs[0].u.p.polyType == POLYLINE) { + if (i==0) { + a = FindAngle(tempSegs(0).u.p.pts[0].pt,tempSegs(0).u.p.pts[1].pt); + b = 0; + } else if (i==xx->segs[0].u.p.cnt-1) { + a = NormalizeAngle(FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0); + b = 0; + } else { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a + b; + } + } else { + if (i==0) { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[xx->segs[0].u.p.cnt-1].pt)+180.0)/2; + a = a+b; + } else if (i==xx->segs[0].u.p.cnt-1) { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[0].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a+b; + } else { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a+b; + } + } + + Translate(&tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,a+angle,fabs(sep/cos(D2R(b)))); } if (newTrkR) { *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraData * yy = GetTrkExtraData(*newTrkR); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); yy->lineType = xx->lineType; if (tempSegs(0).u.p.pts) MyFree(tempSegs(0).u.p.pts); } @@ -2078,7 +2548,7 @@ static trackCmd_t drawCmds = { RescaleDraw, NULL, GetAngleDraw, /* getAngle */ - NULL, /* split */ + SplitDraw, /* split */ NULL, /* traverse */ EnumerateDraw, NULL, /* redraw */ @@ -2106,14 +2576,14 @@ static trackCmd_t drawCmds = { EXPORT BOOL_T OnTableEdgeEndPt( track_p trk, coOrd * pos ) { track_p trk1; - struct extraData *xx; + struct extraDataDraw_t *xx; coOrd pos1 = *pos; ignoredTableEdge = trk; if ((trk1 = OnTrack( &pos1, FALSE, FALSE )) != NULL && GetTrkType(trk1) == T_DRAW) { ignoredTableEdge = NULL; - xx = GetTrkExtraData(trk1); + xx = GET_EXTRA_DATA(trk1, T_DRAW, extraDataDraw_t); if (xx->segCnt < 1) return FALSE; if (xx->segs[0].type == SEG_TBLEDGE) { @@ -2132,11 +2602,11 @@ EXPORT BOOL_T OnTableEdgeEndPt( track_p trk, coOrd * pos ) EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) { - struct extraData *xx; + struct extraDataDraw_t *xx; if (GetTrkType(trk) == T_DRAW) { ignoredTableEdge = NULL; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (xx->segCnt < 1) return FALSE; DIST_T dd0,dd1; @@ -2176,7 +2646,7 @@ EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) Rotate(&p1,xx->orig,xx->angle); } else if (GetTrkType(trk) == T_BZRLIN) { coOrd p0,p1; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); p0 = xx->segs[0].u.b.pos[0]; p1 = xx->segs[0].u.b.pos[3]; dd0 = FindDistance(p00,p0); @@ -2212,38 +2682,38 @@ static wDrawColor benchColor; static paramData_t drawPLs[] = { #define drawLineWidthPD (drawPLs[0]) - { PD_LONG, &drawCmdContext.line_Width, "linewidth", PDO_NORECORD, &i0_100, N_("Line Width") }, + { PD_LONG, &drawCmdContext.line_Width, "linewidth", PDO_NORECORD, &i100_100, N_("Line Width") }, #define drawColorPD (drawPLs[1]) { PD_COLORLIST, &lineColor, "linecolor", PDO_NORECORD, NULL, N_("Color") }, #define drawBenchColorPD (drawPLs[2]) { PD_COLORLIST, &benchColor, "benchcolor", PDO_NORECORD, NULL, N_("Color") }, #define drawBenchChoicePD (drawPLs[3]) #ifdef WINDOWS - { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)120, N_("Lumber Type") }, + { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(120), N_("Lumber Type") }, #else - { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)145, N_("Lumber Type") }, + { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(145), N_("Lumber Type") }, #endif #define drawBenchOrientPD (drawPLs[4]) #ifdef WINDOWS - { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)45, "", 0 }, + { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(45), "", 0 }, #else - { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, (void*)105, "", 0 }, + { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(105), "", 0 }, #endif #define drawDimArrowSizePD (drawPLs[5]) - { PD_DROPLIST, &dimArrowSize, "arrowsize", PDO_NORECORD|PDO_LISTINDEX, (void*)80, N_("Size") }, + { PD_DROPLIST, &dimArrowSize, "arrowsize", PDO_NORECORD|PDO_LISTINDEX, I2VP(80), N_("Size") }, #define drawLengthPD (drawPLs[6]) - { PD_FLOAT, &drawCmdContext.length, "Length", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Length") }, + { PD_FLOAT, &drawCmdContext.length, "length", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Length") }, #define drawWidthPD (drawPLs[7]) - { PD_FLOAT, &drawCmdContext.width, "BoxWidth", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Width") }, + { PD_FLOAT, &drawCmdContext.width, "width", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Width") }, #define drawAnglePD (drawPLs[8]) #define drawAngleInx 8 - { PD_FLOAT, &drawCmdContext.angle, "Angle", PDO_NORECORD|BO_ENTER, &r360_360, N_("Angle") }, + { PD_FLOAT, &drawCmdContext.angle, "angle", PDO_NORECORD|BO_ENTER, &r360_360, N_("Angle") }, #define drawRadiusPD (drawPLs[9]) - { PD_FLOAT, &drawCmdContext.radius, "Radius", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Radius") }, + { PD_FLOAT, &drawCmdContext.radius, "radius", PDO_DIM|PDO_NORECORD|BO_ENTER, &r0_10000, N_("Radius") }, #define drawLineTypePD (drawPLs[10]) - { PD_DROPLIST, &drawCmdContext.lineType, "Type", PDO_DIM|PDO_NORECORD|BO_ENTER, (void*)0, N_("Line Type") }, + { PD_DROPLIST, &drawCmdContext.lineType, "type", PDO_DIM|PDO_NORECORD|BO_ENTER, I2VP(0), N_("Line Type") }, }; -static paramGroup_t drawPG = { "draw", 0, drawPLs, sizeof drawPLs/sizeof drawPLs[0] }; +static paramGroup_t drawPG = { "draw", 0, drawPLs, COUNT( drawPLs ) }; static char * objectName[] = { N_("Straight"), @@ -2289,12 +2759,13 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) drawBenchChoicePD.option |= PDO_NORECORD; drawBenchOrientPD.option |= PDO_NORECORD; drawDimArrowSizePD.option |= PDO_NORECORD; - drawCmdContext.Op = (wIndex_t)(long)commandContext; + drawCmdContext.Op = (wIndex_t)VP2L(commandContext); if ( drawCmdContext.Op < 0 || drawCmdContext.Op > OP_LAST ) { NoticeMessage( "cmdDraw: Op %d", _("Ok"), NULL, drawCmdContext.Op ); drawCmdContext.Op = OP_LINE; } - /*DrawGeomOp( (void*)(drawCmdContext.Op>=0?drawCmdContext.Op:OP_LINE) );*/ + SetAllTrackSelect( FALSE ); + /*DrawGeomOp( (drawCmdContext.Op>=0?drawCmdContext.Op:OP_LINE) );*/ infoSubst = TRUE; switch( drawCmdContext.Op ) { case OP_LINE: @@ -2352,7 +2823,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) BenchLoadLists( (wList_p)drawBenchChoicePD.control, (wList_p)drawBenchOrientPD.control ); ParamLoadControls( &drawPG ); - BenchUpdateOrientationList( (long)wListGetItemContext( (wList_p)drawBenchChoicePD.control, benchChoice ), (wList_p)drawBenchOrientPD.control ); + BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p)drawBenchChoicePD.control, benchChoice )), (wList_p)drawBenchOrientPD.control ); wListSetIndex( (wList_p)drawBenchOrientPD.control, benchOrient ); InfoSubstituteControls( controls, labels ); drawBenchColorPD.option &= ~PDO_NORECORD; @@ -2393,7 +2864,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) return CmdBezCurve(act2, pos); } if ( drawCmdContext.Op == OP_BENCH ) { - drawCmdContext.benchOption = GetBenchData( (long)wListGetItemContext((wList_p)drawBenchChoicePD.control, benchChoice ), benchOrient ); + drawCmdContext.benchOption = GetBenchData( VP2L(wListGetItemContext((wList_p)drawBenchChoicePD.control, benchChoice )), benchOrient ); drawCmdContext.Color = benchColor; } else if ( drawCmdContext.Op == OP_DIMLINE ) { @@ -2416,19 +2887,14 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) case wActionRDown: case wActionRDrag: if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); - if (!((MyGetKeyState() & WKEY_ALT) != magneticSnap)) { - SnapPos( &pos ); - } return DrawGeomMouse( action, pos, &drawCmdContext); case wActionLUp: case wActionRUp: if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); - //if (!((MyGetKeyState() & WKEY_SHIFT) != 0)) { - // SnapPos( &pos ); Remove Snap at end of action - it will have been imposed in Geom if needed - //} + drawCmdContext.show = TRUE; int rc = DrawGeomMouse( action, pos, &drawCmdContext); // Put up text entry boxes ready for updates if the result was continue - if (rc == C_CONTINUE) { + if (rc == C_CONTINUE && drawCmdContext.show) { switch( drawCmdContext.Op ) { case OP_CIRCLE1: case OP_CIRCLE2: @@ -2519,8 +2985,9 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) case C_OK: if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext); - - /*DrawOk( NULL );*/ + case C_CONFIRM: + if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext); case C_FINISH: if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); @@ -2540,29 +3007,32 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) } } -#include "bitmaps/dline.xpm" -#include "bitmaps/ddimlin.xpm" -#include "bitmaps/dbench.xpm" -#include "bitmaps/dtbledge.xpm" -#include "bitmaps/dcurve1.xpm" -#include "bitmaps/dcurve2.xpm" -#include "bitmaps/dcurve3.xpm" -#include "bitmaps/dcurve4.xpm" +#include "bitmaps/straight-line.xpm" +#include "bitmaps/dimension.xpm" +#include "bitmaps/benchwork.xpm" +#include "bitmaps/table-edge.xpm" + +#include "bitmaps/curved-line-end.xpm" +#include "bitmaps/curved-line-tangent.xpm" +#include "bitmaps/curved-line-middle.xpm" +#include "bitmaps/curved-line-chord.xpm" + /*#include "bitmaps/dcircle1.xpm"*/ -#include "bitmaps/dcircle2.xpm" -#include "bitmaps/dcircle3.xpm" +#include "bitmaps/circle-line-center.xpm" +#include "bitmaps/circle-line-tangent.xpm" /*#include "bitmaps/dflcrcl1.xpm"*/ -#include "bitmaps/dflcrcl2.xpm" -#include "bitmaps/dflcrcl3.xpm" -#include "bitmaps/dbox.xpm" -#include "bitmaps/dfilbox.xpm" -#include "bitmaps/dpoly.xpm" -#include "bitmaps/dfilpoly.xpm" -#include "bitmaps/dbezier.xpm" -#include "bitmaps/dpolyline.xpm" +#include "bitmaps/circle-filled-center.xpm" +#include "bitmaps/circle-filled-tangent.xpm" + +#include "bitmaps/box.xpm" +#include "bitmaps/filled-box.xpm" +#include "bitmaps/polygon.xpm" +#include "bitmaps/filled-polygon.xpm" +#include "bitmaps/bezier-line.xpm" +#include "bitmaps/polyline.xpm" typedef struct { - char **xpm; + char ***xpm; int OP; char * shortName; char * cmdName; @@ -2571,29 +3041,29 @@ typedef struct { } drawData_t; static drawData_t dlineCmds[] = { - { dline_xpm, OP_LINE, N_("Line"), N_("Draw Line"), "cmdDrawLine", ACCL_DRAWLINE }, - { ddimlin_xpm, OP_DIMLINE, N_("Dimension Line"), N_("Draw Dimension Line"), "cmdDrawDimLine", ACCL_DRAWDIMLINE }, - { dbench_xpm, OP_BENCH, N_("Benchwork"), N_("Draw Benchwork"), "cmdDrawBench", ACCL_DRAWBENCH }, - { dtbledge_xpm, OP_TBLEDGE, N_("Table Edge"), N_("Draw Table Edge"), "cmdDrawTableEdge", ACCL_DRAWTBLEDGE } }; + { straight_line_xpm, OP_LINE, N_("Line"), N_("Draw Line"), "cmdDrawLine", ACCL_DRAWLINE }, + { dimension_xpm, OP_DIMLINE, N_("Dimension Line"), N_("Draw Dimension Line"), "cmdDrawDimLine", ACCL_DRAWDIMLINE }, + { benchwork_xpm, OP_BENCH, N_("Benchwork"), N_("Draw Benchwork"), "cmdDrawBench", ACCL_DRAWBENCH }, + { table_edge_xpm, OP_TBLEDGE, N_("Table Edge"), N_("Draw Table Edge"), "cmdDrawTableEdge", ACCL_DRAWTBLEDGE } }; static drawData_t dcurveCmds[] = { - { dcurve1_xpm, OP_CURVE1, N_("Curve End"), N_("Draw Curve from End"), "cmdDrawCurveEndPt", ACCL_DRAWCURVE1 }, - { dcurve2_xpm, OP_CURVE2, N_("Curve Tangent"), N_("Draw Curve from Tangent"), "cmdDrawCurveTangent", ACCL_DRAWCURVE2 }, - { dcurve3_xpm, OP_CURVE3, N_("Curve Center"), N_("Draw Curve from Center"), "cmdDrawCurveCenter", ACCL_DRAWCURVE3 }, - { dcurve4_xpm, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 }, - { dbezier_xpm, OP_BEZLIN, N_("Bezier Curve"), N_("Draw Bezier"), "cmdDrawBezierCurve", ACCL_DRAWBEZLINE } }; + { curved_line_end_xpm, OP_CURVE1, N_("Curve End"), N_("Draw Curve from End"), "cmdDrawCurveEndPt", ACCL_DRAWCURVE1 }, + { curved_line_tangent_xpm, OP_CURVE2, N_("Curve Tangent"), N_("Draw Curve from Tangent"), "cmdDrawCurveTangent", ACCL_DRAWCURVE2 }, + { curved_line_middle_xpm, OP_CURVE3, N_("Curve Center"), N_("Draw Curve from Center"), "cmdDrawCurveCenter", ACCL_DRAWCURVE3 }, + { curved_line_chord_xpm, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 }, + { bezier_line_xpm, OP_BEZLIN, N_("Bezier Curve"), N_("Draw Bezier"), "cmdDrawBezierCurve", ACCL_DRAWBEZLINE } }; static drawData_t dcircleCmds[] = { /*{ dcircle1_xpm, OP_CIRCLE1, "Circle Fixed Radius", "Draw Fixed Radius Circle", "cmdDrawCircleFixedRadius", ACCL_DRAWCIRCLE1 },*/ - { dcircle3_xpm, OP_CIRCLE3, N_("Circle Tangent"), N_("Draw Circle from Tangent"), "cmdDrawCircleTangent", ACCL_DRAWCIRCLE2 }, - { dcircle2_xpm, OP_CIRCLE2, N_("Circle Center"), N_("Draw Circle from Center"), "cmdDrawCircleCenter", ACCL_DRAWCIRCLE3 }, + { circle_line_center_xpm, OP_CIRCLE3, N_("Circle Center"), N_("Draw Circle from Center"), "cmdDrawCircleCenter", ACCL_DRAWCIRCLE2 }, + { circle_line_tangent_xpm, OP_CIRCLE2, N_("Circle Tangent"), N_("Draw Circle from Tangent"), "cmdDrawCircleTangent", ACCL_DRAWCIRCLE3 }, /*{ dflcrcl1_xpm, OP_FILLCIRCLE1, "Circle Filled Fixed Radius", "Draw Fixed Radius Filled Circle", "cmdDrawFilledCircleFixedRadius", ACCL_DRAWFILLCIRCLE1 },*/ - { dflcrcl3_xpm, OP_FILLCIRCLE3, N_("Circle Filled Tangent"), N_("Draw Filled Circle from Tangent"), "cmdDrawFilledCircleTangent", ACCL_DRAWFILLCIRCLE2 }, - { dflcrcl2_xpm, OP_FILLCIRCLE2, N_("Circle Filled Center"), N_("Draw Filled Circle from Center"), "cmdDrawFilledCircleCenter", ACCL_DRAWFILLCIRCLE3 } }; + { circle_filled_center_xpm, OP_FILLCIRCLE3, N_("Circle Filled Center"), N_("Draw Filled Circle from Center"), "cmdDrawFilledCircleCenter", ACCL_DRAWFILLCIRCLE2 }, + { circle_filled_tangent_xpm, OP_FILLCIRCLE2, N_("Circle Filled Tangent"), N_("Draw Filled Circle from Tangent"), "cmdDrawFilledCircleTangent", ACCL_DRAWFILLCIRCLE3 } }; static drawData_t dshapeCmds[] = { - { dbox_xpm, OP_BOX, N_("Box"), N_("Draw Box"), "cmdDrawBox", ACCL_DRAWBOX }, - { dfilbox_xpm, OP_FILLBOX, N_("Filled Box"), N_("Draw Filled Box"), "cmdDrawFilledBox", ACCL_DRAWFILLBOX }, - { dpoly_xpm, OP_POLY, N_("Polygon"), N_("Draw Polygon"), "cmdDrawPolygon", ACCL_DRAWPOLY }, - { dfilpoly_xpm, OP_FILLPOLY, N_("Filled Polygon"), N_("Draw Filled Polygon"), "cmdDrawFilledPolygon", ACCL_DRAWFILLPOLYGON }, - { dpolyline_xpm, OP_POLYLINE, N_("PolyLine"), N_("Draw PolyLine"), "cmdDrawPolyline", ACCL_DRAWPOLYLINE }, + { box_xpm, OP_BOX, N_("Box"), N_("Draw Box"), "cmdDrawBox", ACCL_DRAWBOX }, + { filled_box_xpm, OP_FILLBOX, N_("Filled Box"), N_("Draw Filled Box"), "cmdDrawFilledBox", ACCL_DRAWFILLBOX }, + { polygon_xpm, OP_POLY, N_("Polygon"), N_("Draw Polygon"), "cmdDrawPolygon", ACCL_DRAWPOLY }, + { filled_polygon_xpm, OP_FILLPOLY, N_("Filled Polygon"), N_("Draw Filled Polygon"), "cmdDrawFilledPolygon", ACCL_DRAWFILLPOLYGON }, + { polyline_xpm, OP_POLYLINE, N_("PolyLine"), N_("Draw PolyLine"), "cmdDrawPolyline", ACCL_DRAWPOLYLINE }, }; typedef struct { @@ -2692,7 +3162,7 @@ static void DrawDlgUpdate( } if ( inx >= 0 && pg->paramPtr[inx].valueP == &benchChoice ) - BenchUpdateOrientationList( (long)wListGetItemContext( (wList_p)drawBenchChoicePD.control, (wIndex_t)*(long*)valueP ), (wList_p)drawBenchOrientPD.control ); + BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p)drawBenchChoicePD.control, (wIndex_t)*(long*)valueP )), (wList_p)drawBenchOrientPD.control ); } EXPORT void InitCmdDraw( wMenu_p menu ) @@ -2714,8 +3184,8 @@ EXPORT void InitCmdDraw( wMenu_p menu ) ButtonGroupBegin( _(dsp->menuTitle), dsp->helpKey, _(dsp->stickyLabel) ); for ( inx2=0; inx2<dsp->cnt; inx2++ ) { ddp = &dsp->data[inx2]; - icon = wIconCreatePixMap( ddp->xpm ); - AddMenuButton( menu, CmdDraw, ddp->helpKey, _(ddp->cmdName), icon, LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ddp->acclKey, (void *)(intptr_t)ddp->OP ); + icon = wIconCreatePixMap( ddp->xpm[iconSize] ); + AddMenuButton( menu, CmdDraw, ddp->helpKey, _(ddp->cmdName), icon, LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ddp->acclKey, I2VP(ddp->OP) ); } ButtonGroupEnd(); } @@ -2772,13 +3242,13 @@ EXPORT track_p NewText( tempSeg.type = SEG_TEXT; tempSeg.color = color; tempSeg.width = 0; - tempSeg.u.t.pos = zero; + tempSeg.u.t.pos = pos; tempSeg.u.t.angle = angle; tempSeg.u.t.fontP = NULL; tempSeg.u.t.fontSize = textSize; tempSeg.u.t.string = MyStrdup( text ); tempSeg.u.t.boxed = boxed; - trk = MakeDrawFromSeg1( index, pos, angle, &tempSeg ); + trk = MakeDrawFromSeg1( index, zero, 0.0, &tempSeg ); return trk; } @@ -2809,7 +3279,9 @@ EXPORT BOOL_T ReadText( char * line ) return TRUE; } -void MenuMode(int mode) { +void MenuMode(void * modeVP ) +{ + int mode = (int)VP2L(modeVP); if ( infoSubst ) { InfoSubstituteControls( NULL, NULL ); infoSubst = FALSE; @@ -2823,7 +3295,9 @@ void MenuMode(int mode) { } } -void MenuEnter(int key) { +void MenuEnter( void * keyVP ) +{ + int key = (int)VP2L(keyVP); int action; action = C_TEXT; action |= key<<8; @@ -2833,8 +3307,10 @@ void MenuEnter(int key) { DrawGeomModify(action,zero,&drawModCmdContext); } -void MenuLine(int key) { - struct extraData * xx = GetTrkExtraData(drawModCmdContext.trk); +void MenuLine( void * keyVP ) +{ + int key = (int)VP2L(keyVP); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(drawModCmdContext.trk, T_DRAW, extraDataDraw_t); if ( drawModCmdContext.type==SEG_STRLIN || drawModCmdContext.type==SEG_CRVLIN || drawModCmdContext.type==SEG_POLY ) { switch(key) { case '0': @@ -2865,7 +3341,7 @@ void MenuLine(int key) { EXPORT void SetLineType( track_p trk, int width ) { if (QueryTrack(trk, Q_IS_DRAW)) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if ( xx->segs[0].type==SEG_STRLIN || xx->segs[0].type==SEG_CRVLIN || xx->segs[0].type==SEG_POLY) { switch(width) { case 0: @@ -2901,29 +3377,29 @@ EXPORT void InitTrkDraw( void ) AddParam( "TEXT", ReadText ); drawModDelMI = MenuRegister( "Modify Draw Edit Menu" ); - drawModClose = wMenuPushCreate( drawModDelMI, "", _("Close Polygon - 'g'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'g'); - drawModOpen = wMenuPushCreate( drawModDelMI, "", _("Make PolyLine - 'l'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'l'); - drawModFill = wMenuPushCreate( drawModDelMI, "", _("Fill Polygon - 'f'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'f'); - drawModEmpty = wMenuPushCreate( drawModDelMI, "", _("Empty Polygon - 'u'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'u'); + drawModClose = wMenuPushCreate( drawModDelMI, "", _("Close Polygon - 'g'"), 0, MenuEnter, I2VP( 'g')); + drawModOpen = wMenuPushCreate( drawModDelMI, "", _("Make PolyLine - 'l'"), 0, MenuEnter, I2VP( 'l')); + drawModFill = wMenuPushCreate( drawModDelMI, "", _("Fill Polygon - 'f'"), 0, MenuEnter, I2VP( 'f')); + drawModEmpty = wMenuPushCreate( drawModDelMI, "", _("Empty Polygon - 'u'"), 0, MenuEnter, I2VP( 'u')); wMenuSeparatorCreate( drawModDelMI ); - drawModPointsMode = wMenuPushCreate( drawModDelMI, "", _("Points Mode - 'p'"), 0, (wMenuCallBack_p)MenuMode, (void*) 0 ); - drawModDel = wMenuPushCreate( drawModDelMI, "", _("Delete Selected Point - 'Del'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 127 ); - drawModVertex = wMenuPushCreate( drawModDelMI, "", _("Vertex Point - 'v'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'v' ); - drawModRound = wMenuPushCreate( drawModDelMI, "", _("Round Corner - 'r'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'r' ); - drawModSmooth = wMenuPushCreate( drawModDelMI, "", _("Smooth Corner - 's'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 's' ); + drawModPointsMode = wMenuPushCreate( drawModDelMI, "", _("Points Mode - 'p'"), 0, MenuMode, I2VP( 0 )); + drawModDel = wMenuPushCreate( drawModDelMI, "", _("Delete Selected Point - 'Del'"), 0, MenuEnter, I2VP( 127 )); + drawModVertex = wMenuPushCreate( drawModDelMI, "", _("Vertex Point - 'v'"), 0, MenuEnter, I2VP( 'v' )); + drawModRound = wMenuPushCreate( drawModDelMI, "", _("Round Corner - 'r'"), 0, MenuEnter, I2VP( 'r' )); + drawModSmooth = wMenuPushCreate( drawModDelMI, "", _("Smooth Corner - 's'"), 0, MenuEnter, I2VP( 's' )); wMenuSeparatorCreate( drawModDelMI ); drawModLinMI = wMenuMenuCreate( drawModDelMI, "", _("LineType...") ); - drawModSolid = wMenuPushCreate( drawModLinMI, "", _("Solid Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '0' ); - drawModDot = wMenuPushCreate( drawModLinMI, "", _("Dashed Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '1' ); - drawModDash = wMenuPushCreate( drawModLinMI, "", _("Dotted Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '2' ); - drawModDashDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '3' ); - drawModDashDotDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot-Dot Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '4' ); - drawModCenterDot = wMenuPushCreate( drawModLinMI, "", _("Center-Dot Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '5' ); - drawModPhantom = wMenuPushCreate( drawModLinMI, "", _("Phantom-Dot Line"), 0, (wMenuCallBack_p)MenuLine, (void*) '6' ); + drawModSolid = wMenuPushCreate( drawModLinMI, "", _("Solid Line"), 0, MenuLine, I2VP( '0' )); + drawModDot = wMenuPushCreate( drawModLinMI, "", _("Dashed Line"), 0, MenuLine, I2VP( '1' )); + drawModDash = wMenuPushCreate( drawModLinMI, "", _("Dotted Line"), 0, MenuLine, I2VP( '2' )); + drawModDashDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot Line"), 0, MenuLine, I2VP( '3' )); + drawModDashDotDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot-Dot Line"), 0, MenuLine, I2VP( '4' )); + drawModCenterDot = wMenuPushCreate( drawModLinMI, "", _("Center-Dot Line"), 0, MenuLine, I2VP( '5' )); + drawModPhantom = wMenuPushCreate( drawModLinMI, "", _("Phantom-Dot Line"), 0, MenuLine, I2VP( '6' )); wMenuSeparatorCreate( drawModDelMI ); - drawModriginMode = wMenuPushCreate( drawModDelMI, "", _("Origin Mode - 'o'"), 0, (wMenuCallBack_p)MenuMode, (void*) 1 ); - drawModOrigin = wMenuPushCreate( drawModDelMI, "", _("Reset Origin - '0'"), 0, (wMenuCallBack_p)MenuEnter, (void*) '0' ); - drawModLast = wMenuPushCreate( drawModDelMI, "", _("Origin to Selected - 'l'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'l' ); - drawModCenter = wMenuPushCreate( drawModDelMI, "", _("Origin to Middle - 'm'"), 0, (wMenuCallBack_p)MenuEnter, (void*) 'm'); + drawModriginMode = wMenuPushCreate( drawModDelMI, "", _("Origin Mode - 'o'"), 0, MenuMode, I2VP( 1 )); + drawModOrigin = wMenuPushCreate( drawModDelMI, "", _("Reset Origin - '0'"), 0, MenuEnter, I2VP( '0' )); + drawModLast = wMenuPushCreate( drawModDelMI, "", _("Origin to Selected - 'l'"), 0, MenuEnter, I2VP( 'l' )); + drawModCenter = wMenuPushCreate( drawModDelMI, "", _("Origin to Middle - 'm'"), 0, MenuEnter, I2VP( 'm')); } diff --git a/app/bin/celev.c b/app/bin/celev.c index 1da4b22..b80874f 100644 --- a/app/bin/celev.c +++ b/app/bin/celev.c @@ -19,18 +19,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <string.h> #include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "param.h" #include "track.h" #include "ccurve.h" -#include "utility.h" static wWin_p elevW; @@ -53,12 +49,12 @@ static paramData_t elevationPLs[] = { #define I_HEIGHT (1) { PD_FLOAT, &elevHeightV, "value", PDO_DIM|PDO_DLGNEWCOLUMN, &r_1000_1000 }, #define I_COMPUTED (2) - { PD_MESSAGE, NULL, "computed", 0, (void*)80 }, + { PD_MESSAGE, NULL, "computed", 0, I2VP(80) }, #define I_GRADE (3) - { PD_MESSAGE, NULL, "grade", 0, (void*)80 }, + { PD_MESSAGE, NULL, "grade", 0, I2VP(80) }, #define I_STATION (4) - { PD_STRING, elevStationV, "station", PDO_DLGUNDERCMDBUTT|PDO_STRINGLIMITLENGTH, (void*)200, NULL, 0, 0, sizeof(elevStationV)} }; -static paramGroup_t elevationPG = { "elev", 0, elevationPLs, sizeof elevationPLs/sizeof elevationPLs[0] }; + { PD_STRING, elevStationV, "station", PDO_DLGUNDERCMDBUTT|PDO_STRINGLIMITLENGTH, I2VP(200), NULL, 0, 0, sizeof(elevStationV)} }; +static paramGroup_t elevationPG = { "elev", 0, elevationPLs, COUNT( elevationPLs ) }; static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) @@ -129,14 +125,14 @@ void static CreateMoveAnchor(coOrd pos) { static void LayoutElevW( paramData_t * pd, int inx, - wPos_t colX, - wPos_t * x, - wPos_t * y ) + wWinPix_t colX, + wWinPix_t * x, + wWinPix_t * y ) { - static wPos_t h = 0; + static wWinPix_t h = 0; switch ( inx ) { case I_HEIGHT: - h = wControlGetHeight( elevationPLs[I_MODE].control )/((sizeof elevModeLabels/sizeof elevModeLabels[0])-1); + h = wControlGetHeight( elevationPLs[I_MODE].control )/(COUNT( elevModeLabels )-1); #ifndef WINDOWS h += 3; #endif @@ -243,7 +239,6 @@ static void ElevSelect( track_p trk, EPINX_T ep ) int mode; DIST_T elevX, grade, elev, dist; long radio; - BOOL_T computedOk; BOOL_T gradeOk = TRUE; track_p trk1; EPINX_T ep1; @@ -296,69 +291,55 @@ static void ElevSelect( track_p trk, EPINX_T ep ) elevModeV = radio; ParamLoadControl( &elevationPG, I_MODE ); gradeOk = ComputeElev( trk, ep, FALSE, &elevX, &grade, TRUE ); - computedOk = TRUE; - if (oldElevationEvaluation || computedOk) { - sprintf( message, "%0.2f%s", round(PutDim( elevX )*100.0)/100.0, (units==UNITS_METRIC?"cm":"\"") ); - ParamLoadMessage( &elevationPG, I_COMPUTED, message ); - if (gradeOk) { - sprintf( message, "%0.1f%%", fabs(round(grade*1000.0)/10.0) ); - } else { - if ( EndPtIsDefinedElev(trk,ep) ) { - elev = GetElevation(trk); - dist = GetTrkLength(trk,ep,-1); + sprintf( message, "%0.2f%s", round(PutDim( elevX )*100.0)/100.0, (units==UNITS_METRIC?"cm":"\"") ); + ParamLoadMessage( &elevationPG, I_COMPUTED, message ); + if (gradeOk) { + sprintf( message, "%0.1f%%", fabs(round(grade*1000.0)/10.0) ); + } else { + if ( EndPtIsDefinedElev(trk,ep) ) { + elev = GetElevation(trk); + dist = GetTrkLength(trk,ep,-1); + if (dist>0.1) + sprintf( message, "%0.1f%%", fabs(round(((elev-elevX)/dist)*1000.0))/10.0 ); + else + sprintf( message, _("Undefined") ); + if ( (trk1=GetTrkEndTrk(trk,ep)) && (ep1=GetEndPtConnectedToMe(trk1,trk))>=0 ) { + elev = GetElevation(trk1); + dist = GetTrkLength(trk1,ep1,-1); if (dist>0.1) - sprintf( message, "%0.1f%%", fabs(round((elev-elevX)/dist)*1000.0)/10.0 ); + sprintf( message+strlen(message), " - %0.1f%%", fabs(round(((elev-elevX)/dist)*1000.0))/10.0 ); else - sprintf( message, _("Undefined") ); - if ( (trk1=GetTrkEndTrk(trk,ep)) && (ep1=GetEndPtConnectedToMe(trk1,trk))>=0 ) { - elev = GetElevation(trk1); - dist = GetTrkLength(trk1,ep1,-1); - if (dist>0.1) - sprintf( message+strlen(message), " - %0.1f%%", fabs(round((elev-elevX)/dist)*1000.0)/10.0 ); - else - sprintf( message+strlen(message), " - %s", _("Undefined") ); - } - } else { - strcpy( message, _("Undefined") ); + sprintf( message+strlen(message), " - %s", _("Undefined") ); } - } - ParamLoadMessage( &elevationPG, I_GRADE, message ); - if ( (mode&ELEV_MASK)!=ELEV_DEF ) { - elevHeightV = elevX; - ParamLoadControl( &elevationPG, I_HEIGHT ); + } else { + strcpy( message, _("Undefined") ); } } + ParamLoadMessage( &elevationPG, I_GRADE, message ); + if ( (mode&ELEV_MASK)!=ELEV_DEF ) { + elevHeightV = elevX; + ParamLoadControl( &elevationPG, I_HEIGHT ); + } wShow(elevW); } static BOOL_T GetPointElev(track_p trk, coOrd pos, DIST_T * height) { - DIST_T len, len1, elev0, elev1, dist0, dist1; + DIST_T elev0, elev1, dist0, dist1; if ( IsTrack( trk ) && GetTrkEndPtCnt(trk) == 2 ) { + if ( GetTrkLength( trk, 0, 1 ) < 0.1 ) + return FALSE; dist0 = FindDistance(pos,GetTrkEndPos(trk,0)); dist1 = FindDistance(pos,GetTrkEndPos(trk,1)); - if (EndPtIsDefinedElev(trk,0)) - elev0 = GetTrkEndElevHeight(trk,0); - else { - if (!GetTrkEndElevCachedHeight(trk,0,&elev0,&len)) { - if (GetTrkLength( trk, 0, 1 )<0.1) return FALSE; - ComputeElev( trk, 0, FALSE, &elev0, NULL, TRUE ); - } - } - if (EndPtIsDefinedElev(trk,1)) - elev1 = GetTrkEndElevHeight(trk,1); - else { - if (!GetTrkEndElevCachedHeight(trk,1,&elev1,&len1)) { - if (GetTrkLength( trk, 0, 1 )<0.1) return FALSE; - ComputeElev( trk, 0, FALSE, &elev0, NULL, TRUE ); - } - } - if (dist1+dist0 < 0.1) { + ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ); + ComputeElev( trk, 1, FALSE, &elev1, NULL, FALSE ); + if (dist1+dist0 <= 0.1) { *height = elev0; return TRUE; } *height = ((elev1-elev0)*(dist0/(dist0+dist1)))+elev0; return TRUE; - } else if (GetTrkEndPtCnt(trk) == 1 && GetTrkEndElevCachedHeight(trk,0,&elev0,&len)) { + } else if (GetTrkEndPtCnt(trk) == 1 && + ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ) ) { *height = elev0; return TRUE; } @@ -387,7 +368,7 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) ParamControlActive( &elevationPG, I_STATION, FALSE ); ParamLoadMessage( &elevationPG, I_COMPUTED, "" ); ParamLoadMessage( &elevationPG, I_GRADE, "" ); - InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description") ); + InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description, +Alt to show elevation") ); elevTrk = NULL; elevUndo = FALSE; CmdMoveDescription( action, pos ); @@ -396,7 +377,7 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); if (MyGetKeyState()&WKEY_CTRL) { - commandContext = (void*) 1; //Just end points + commandContext = I2VP(1); //Just end points CmdMoveDescription( action, pos ); return C_CONTINUE; } @@ -414,43 +395,46 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) InfoMessage( _("Move to end or track crossing") ); return C_CONTINUE; } - if ((trk1 = OnTrack2(&p2,FALSE, TRUE, FALSE, trk0)) != NULL) { - if (IsClose(FindDistance(p0,p2))) { - if (GetEndPtConnectedToMe(trk0,trk1) == -1) { //Not simply connected to each other!!! - if (GetTrkEndPtCnt(trk1) == 2) { - if (GetPointElev(trk1,p2,&elev1)) { - if (MyGetKeyState()&WKEY_SHIFT) { - InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f - Click to Split"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); - } else - InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + if (((MyGetKeyState()&WKEY_ALT))) { //Add square with Alt + if ((trk1 = OnTrack2(&p2,FALSE, TRUE, FALSE, trk0)) != NULL) { + if (IsClose(FindDistance(p0,p2))) { + if (GetEndPtConnectedToMe(trk0,trk1) == -1) { //Not simply connected to each other!!! + if (GetTrkEndPtCnt(trk1) == 2) { + if (GetPointElev(trk1,p2,&elev1)) { + if (MyGetKeyState()&WKEY_SHIFT) { + InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f - Click to Split"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + } else + InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + } + CreateSquareAnchor(p2); + return C_CONTINUE; } - CreateSquareAnchor(p2); - return C_CONTINUE; } } } } if ((ep0 = PickEndPoint( p0, trk0 )) != -1) { - if (IsClose(FindDistance(GetTrkEndPos(trk0,ep0),pos))) { - CreateEndAnchor(GetTrkEndPos(trk0,ep0),FALSE); - InfoMessage (_("Track End elevation %0.3f"), PutDim(elev0)); - } else if ((MyGetKeyState()&WKEY_SHIFT) && QueryTrack(trk0,Q_MODIFY_CAN_SPLIT) + if ((MyGetKeyState()&WKEY_SHIFT) && QueryTrack(trk0,Q_MODIFY_CAN_SPLIT) && !(QueryTrack(trk0,Q_IS_TURNOUT))) { InfoMessage( _("Click to split here - elevation %0.3f"), PutDim(elev0)); CreateSplitAnchor(p0,trk0); - } else { - InfoMessage( _("Track Point elevation %0.3f"), PutDim(elev0)); + } else if ((IsClose(FindDistance(GetTrkEndPos(trk0,ep0),p0)) + || (FindDistance(GetTrkEndPos(trk0,ep0),p0)<minLength))) { + CreateEndAnchor(GetTrkEndPos(trk0,ep0),FALSE); + InfoMessage (_("Track End elevation %0.3f - snap End Pt"), PutDim(elev0)); + } else if (MyGetKeyState()&WKEY_ALT) { CreateEndAnchor(p0,TRUE); + InfoMessage (_("Track End elevation %0.3f"), PutDim(elev0)); } - } else InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description") ); + } else InfoMessage( _("Click on End Pt, +Shift to split, +Ctrl to move description, +Alt show Elevation") ); } else - InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description") ); + InfoMessage( _("Click on End Pt, +Shift to split, +Ctrl to move description, +Alt show Elevation") ); return C_CONTINUE; case C_DOWN: case C_MOVE: case C_UP: if (MyGetKeyState()&WKEY_CTRL) { - commandContext = (void*) 1; //Just end points + commandContext = I2VP(1); //Just end points CmdMoveDescription( action, pos ); DYNARR_RESET(trkSeg_t,anchors_da); elevTrk = NULL; @@ -466,10 +450,7 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description") ); } else { ep0 = PickEndPoint( p0, trk0 ); - if (IsClose(FindDistance(GetTrkEndPos(trk0,ep0),pos))) { - InfoMessage( _("Point selected!") ); - ElevSelect( trk0, ep0 ); - } else if ( (MyGetKeyState()&WKEY_SHIFT) ) { + if ( (MyGetKeyState()&WKEY_SHIFT) ) { UndoStart( _("Split track"), "SplitTrack( T%d[%d] )", GetTrkIndex(trk0), ep0 ); oldTrackCount = trackCount; if (!QueryTrack(trk0,Q_IS_TURNOUT) && @@ -479,6 +460,10 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) ElevSelect( trk0, ep0 ); UndoEnd(); elevUndo = FALSE; + } else if (IsClose(FindDistance(GetTrkEndPos(trk0,ep0),p0)) || + (FindDistance(GetTrkEndPos(trk0,ep0),p0)<minLength)) { //Snap if close visually or track + InfoMessage( _("Point selected!") ); + ElevSelect( trk0, ep0 ); } } DYNARR_RESET(trkSeg_t,anchors_da); @@ -493,10 +478,13 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) InfoMessage( "" ); return C_TERMINATE; case C_REDRAW: + wSetCursor(mainD.d,defaultCursor); DoElevHilight( NULL ); HilightSelectedEndPt( TRUE, elevTrk, elevEp ); - if (anchors_da.cnt) + if (anchors_da.cnt) { DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + wSetCursor(mainD.d,wCursorNone); + } CmdMoveDescription( action, pos ); return C_CONTINUE; } @@ -506,11 +494,11 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) -#include "bitmaps/elev.xpm" +#include "bitmaps/elevation.xpm" EXPORT void InitCmdElevation( wMenu_p menu ) { ParamRegister( &elevationPG ); - AddMenuButton( menu, CmdElevation, "cmdElevation", _("Elevation"), wIconCreatePixMap(elev_xpm), LEVEL0_50, IC_POPUP|IC_LCLICK|IC_RCLICK|IC_WANT_MOVE, ACCL_ELEVATION, NULL ); + AddMenuButton( menu, CmdElevation, "cmdElevation", _("Elevation"), wIconCreatePixMap(elevation_xpm[iconSize]), LEVEL0_50, IC_POPUP|IC_LCLICK|IC_RCLICK|IC_WANT_MOVE, ACCL_ELEVATION, NULL ); } diff --git a/app/bin/cgroup.c b/app/bin/cgroup.c index 1183e76..d30481f 100644 --- a/app/bin/cgroup.c +++ b/app/bin/cgroup.c @@ -21,23 +21,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> -#include <math.h> -#include <string.h> - +#include "cselect.h" #include "compound.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "tbezier.h" #include "tcornu.h" #include "common.h" -#include "messages.h" #include "param.h" #include "shrtpath.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" /***************************************************************************** @@ -54,13 +49,19 @@ static dynArr_t pathPtr_da; static char groupManuf[STR_SIZE]; static char groupDesc[STR_SIZE]; static char groupPartno[STR_SIZE]; -static char groupTitle[STR_SIZE]; +static char groupTitle[STR_LONG_SIZE]; static int groupCompoundCount = 0; extern TRKTYP_T T_BZRTRK; extern TRKTYP_T T_BZRLIN; extern TRKTYP_T T_CORNU; +/***************************************************************************** + * + * Ungroup + * + */ + typedef struct { int segInx; EPINX_T segEP; @@ -168,8 +169,8 @@ static void GroupCopyTitle( EXPORT void UngroupCompound( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); - struct extraData *xx1; + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx1; trkSeg_p sp; track_p trk0, trk1; int segCnt, segInx, segInx1; @@ -219,8 +220,13 @@ EXPORT void UngroupCompound( LOG( log_group, 1, ( "Ungroup( T%d )\n", GetTrkIndex(trk) ) ); epCnt = GetTrkEndPtCnt(trk); - for ( segCnt=0; segCnt<xx->segCnt&&IsSegTrack(&xx->segs[segCnt]); segCnt++ ); - ASSERT( (epCnt==0) == (segCnt==0) ); + segCnt = xx->segCnt; + int trackCount = 0; + for ( sp=xx->segs; sp<&xx->segs[xx->segCnt]; sp++ ) { + if (IsSegTrack(sp)) trackCount++; + } + //ASSERT( (epCnt==0) == (segCnt==0) ); + ASSERT( (epCnt==0) == (trackCount==0) ); turnoutChanged = FALSE; if ( epCnt > 0 ) { turnoutChanged = TRUE; @@ -253,7 +259,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep */ DYNARR_SET( int, refCount_da, segCnt+epCnt ); memset( refCount_da.ptr, 0, refCount_da.cnt * sizeof *(int*)0 ); - cp = (char *)xx->paths; + cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; while ( cp[0] ) { @@ -262,6 +268,10 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep segInx1 = FindEP( tempEndPts_da.cnt, &tempEndPts(0), pos ); if ( segInx1 >= 0 ) { segInx1 += segCnt; + if ( segInx1 >= refCount_da.cnt ) { + InputError( "Invalid segInx1 %d", TRUE, segInx1 ); + return; + } refCount(segInx1)++; } else { DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); @@ -275,6 +285,10 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep segEP1 = 0; while ( cp[0] ) { GetSegInxEP( cp[0], &segInx, &segEP ); + if ( segInx1 >= refCount_da.cnt ) { + InputError( "Invalid segInx1 %d", TRUE, segInx1 ); + return; + } refCount(segInx)++; if ( refCount(segInx) > refCount(segInx1) ) AddMergePt( segInx, segEP ); @@ -314,7 +328,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep */ DYNARR_SET( int, refCount_da, segCnt ); memset( refCount_da.ptr, -1, segCnt * sizeof *(int*)0 ); - cp = (char *)xx->paths; + cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; while ( cp[0] ) { @@ -472,9 +486,11 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep Rotate( &orig, zero, xx->angle ); orig.x = xx->orig.x - orig.x; orig.y = xx->orig.y - orig.y; - trk1 = NewCompound( T_TURNOUT, 0, orig, xx->angle, xx->title, tempEndPts_da.cnt-epCnt1, &tempEndPts(epCnt1), NULL, pathPtr_da.cnt, &pathPtr(0), tempSegs_da.cnt, &tempSegs(0) ); - xx1 = GetTrkExtraData(trk1); + trk1 = NewCompound( T_TURNOUT, 0, orig, xx->angle, xx->title, tempEndPts_da.cnt-epCnt1, &tempEndPts(epCnt1), (PATHPTR_T)&pathPtr(0), tempSegs_da.cnt, &tempSegs(0) ); + xx1 = GET_EXTRA_DATA(trk1, T_TURNOUT, extraDataCompound_t); xx1->ungrouped = TRUE; + xx1->pathOverRide = xx->pathOverRide; + xx1->pathNoCombine = xx->pathNoCombine; SetTrkVisible( trk1, TRUE ); SetTrkNoTies( trk1, FALSE ); @@ -491,6 +507,8 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep */ for ( segInx=0; segInx<segCnt; segInx++ ) { if ( refCount(segInx) >= 0 ) continue; + if ( ! IsSegTrack( xx->segs+segInx ) ) + continue; SegProc( SEGPROC_NEWTRACK, xx->segs+segInx, &segProcData ); SetTrkScale( segProcData.newTrack.trk, GetTrkScale(trk) ); SetTrkBits( segProcData.newTrack.trk, TB_SELECTED ); @@ -503,7 +521,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep /* 9: reconnect tracks */ - cp = (char *)xx->paths; + cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; while ( cp[0] ) { @@ -566,7 +584,8 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep mp->trk = NULL; } } else { - DrawNewTrack( segTrack(segInx).trk ); + if ( segTrack(segInx).trk ) + DrawNewTrack( segTrack(segInx).trk ); } } wDrawDelayUpdate( mainD.d, FALSE ); @@ -575,7 +594,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep -EXPORT void DoUngroup( void ) +EXPORT void DoUngroup( void * unused ) { track_p trk = NULL; int ungroupCnt; @@ -612,6 +631,7 @@ static drawCmd_t groupD = { NULL, &tempSegDrawFuncs, DC_SEGTRACK, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix }; static long groupSegCnt; static long groupReplace; +static long groupNoCombine; static double groupOriginX; static double groupOriginY; char * groupReplaceLabels[] = { N_("Replace with new group?"), NULL }; @@ -620,21 +640,23 @@ static wWin_p groupW; static paramIntegerRange_t r0_999999 = { 0, 999999 }; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramData_t groupPLs[] = { -/*0*/ { PD_STRING, groupManuf, "manuf", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Manufacturer"), 0, 0, sizeof(groupManuf)}, -/*1*/ { PD_STRING, groupDesc, "desc", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)230, N_("Description"), 0, 0, sizeof(groupDesc)}, -/*2*/ { PD_STRING, groupPartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH|PDO_STRINGLIMITLENGTH, (void*)100, N_("#"), 0, 0, sizeof(groupPartno)}, +/*0*/ { PD_STRING, groupManuf, "manuf", PDO_NOPREF | PDO_NOTBLANK, I2VP(350), N_("Manufacturer"), 0, 0, sizeof(groupManuf)}, +/*1*/ { PD_STRING, groupDesc, "desc", PDO_NOPREF | PDO_NOTBLANK, I2VP(230), N_("Description"), 0, 0, sizeof(groupDesc)}, +/*2*/ { PD_STRING, groupPartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH|PDO_NOTBLANK, I2VP(100), N_("#"), 0, 0, sizeof(groupPartno)}, /*3*/ { PD_LONG, &groupSegCnt, "segcnt", PDO_NOPREF, &r0_999999, N_("# Segments"), BO_READONLY }, #define I_GROUP_ORIGIN_OFFSET 4 /* Need to change if add above */ /*4*/ { PD_FLOAT, &groupOriginX, "orig", PDO_DIM, &r_1000_1000, N_("Offset X,Y:")}, /*5*/ { PD_FLOAT, &groupOriginY, "origy",PDO_DIM | PDO_DLGHORZ, &r_1000_1000, ""}, /*6*/ { PD_TOGGLE, &groupReplace, "replace", 0, groupReplaceLabels, "", BC_HORZ|BC_NOBORDER } }; -static paramGroup_t groupPG = { "group", 0, groupPLs, sizeof groupPLs/sizeof groupPLs[0] }; +static paramGroup_t groupPG = { "group", 0, groupPLs, COUNT( groupPLs ) }; typedef struct { track_p trk; int segStart; int segEnd; + int totalSegStart; //Where we are overall + int totalSegEnd; } groupTrk_t, * groupTrk_p; static dynArr_t groupTrk_da; #define groupTrk(N) DYNARR_N( groupTrk_t, groupTrk_da, N ) @@ -673,7 +695,6 @@ static char * FindPathBtwEP( EPINX_T ep2, BOOL_T * flip ) { - struct extraData * xx = GetTrkExtraData( trk ); char * cp; coOrd trkPos[2]; @@ -690,7 +711,8 @@ LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) LOG( log_group, 3, (" Flip:%s Path= Seg=%d-\n", *flip?"T":"F", *cp ) ); return cp; } - cp = (char *)xx->paths; + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + cp = (char *)GetPaths( trk ); trkPos[0] = GetTrkEndPos(trk,ep1); Rotate( &trkPos[0], xx->orig, -xx->angle ); trkPos[0].x -= xx->orig.x; @@ -889,6 +911,10 @@ static int ConflictPaths( path_p path0, path_p path1 ) { + if ( groupNoCombine != 0 ) { + // No grouping + return TRUE; + } /* do these paths share an EP? */ if ( path0->ep1 == path1->ep1 ) return TRUE; if ( path0->ep1 == path1->ep2 ) return TRUE; @@ -903,7 +929,7 @@ static BOOL_T CheckPathEndPt( char cc, EPINX_T ep ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); wIndex_t segInx; EPINX_T segEP, epCnt; DIST_T d; @@ -925,9 +951,8 @@ static BOOL_T CheckPathEndPt( static BOOL_T CheckForBumper( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); char * cp; - cp = (char *)xx->paths; + cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; while ( cp[0] ) { @@ -942,36 +967,10 @@ static BOOL_T CheckForBumper( return TRUE; } -typedef struct { - int inx; - wBool_t track; -} segInMap_t; -static dynArr_t segInMap_da; -#define segInMap(N) DYNARR_N( segInMap_t, segInMap_da, N) - -void AddToSegMap(int inx,wBool_t track) { - DYNARR_APPEND(segInMap_t,segInMap_da,10); - DYNARR_LAST(segInMap_t,segInMap_da).inx = inx; - DYNARR_LAST(segInMap_t,segInMap_da).track = track; -} - -void AddSegsToSegMap(int start, int end, wBool_t track) { - for (int i = start; i<= end; i++) { - AddToSegMap(i,track); - } -} - static dynArr_t trackSegs_da; #define trackSegs(N) DYNARR_N( trkSeg_t, trackSegs_da, N ) -trkSeg_p GetSegFromSegMap(int index) { - if (DYNARR_N( segInMap_t, segInMap_da, index).track) { - return &DYNARR_N(trkSeg_t,trackSegs_da,DYNARR_N( segInMap_t, segInMap_da, index).inx); - } else - return &DYNARR_N(trkSeg_t,tempSegs_da,DYNARR_N( segInMap_t, segInMap_da, index).inx); -} - static dynArr_t outputSegs_da; #define outputSegs(N) DYNARR_N( trkSeg_t, outputSegs_da, N) @@ -1004,10 +1003,12 @@ static void LogSeg( LogPrintf( "%c:\n", segP->type ); } } + + /* * GroupOk: create a TURNOUT or STRUCTURE from the selected objects * 1 - Add selected tracks to groupTrk[] - * - Add each group trk's segments to trackSeg[] or tempSegs[] + * - Add each group trk's segments to trackSeg[] * - Add all segs to segInMap[] * - if no track segments goto step 9 * 2 - Collect boundary endPts and sort them in tempEndPts[] @@ -1017,16 +1018,16 @@ static void LogSeg( * 4 - Flip tracks so sub-path elements match up * 5 - Create conflict map * 6 - Flip paths to minimize the number of flipped segments - * 7 - Build the path ('P') string + * 7 - Build the path ('P') string (new-P) * 8 - Build segment list, adjust endPts in tempEndPts[] - * 9 - create new TURNOUT/STRUCTURE definition + * 9 - create new TURNOUT/STRUCTURE definition * 10 - write defn to xtrkcad.cus * 11 - optionally replace grouped tracks with new defn */ -static void GroupOk( void * junk ) +static void GroupOk( void * unused ) { - struct extraData *xx = NULL; + struct extraDataCompound_t *xx = NULL; turnoutInfo_t * to; int inx; EPINX_T ep, epCnt, epN; @@ -1055,10 +1056,7 @@ static void GroupOk( void * junk ) int groupCnt; int pinx, pinx2, ginx, ginx2, gpinx2; trkEndPt_p endPtP; - PATHPTR_T path; - int pathLen; signed char pathChar; - char *oldLocale = NULL; DYNARR_RESET( trkSeg_t, trackSegs_da ); DYNARR_RESET( trkSeg_t, tempSegs_da ); @@ -1068,8 +1066,6 @@ static void GroupOk( void * junk ) DYNARR_RESET( trkEndPt_t, tempEndPts_da ); DYNARR_RESET( char, pathPtr_da ); - DYNARR_RESET( segInMap_t, segInMap_da); - ParamUpdate( &groupPG ); if ( groupManuf[0]==0 || groupDesc[0]==0 || groupPartno[0]==0 ) { NoticeMessage2( 0, MSG_GROUP_NONBLANK, _("Ok"), NULL ); @@ -1089,98 +1085,83 @@ static void GroupOk( void * junk ) */ trk = NULL; int InInx = -1; + BOOL_T hasTracks = FALSE; while ( TrackIterate( &trk ) ) { if ( GetTrkSelected( trk ) ) { - if ( IsTrack(trk) ) { - DYNARR_APPEND( groupTrk_t, groupTrk_da, 10 ); - groupP = &groupTrk(groupTrk_da.cnt-1); - groupP->trk = trk; - groupP->segStart = trackSegs_da.cnt; - if ( GetTrkType(trk) == T_TURNOUT ) { - xx = GetTrkExtraData(trk); - for ( pinx=0; pinx<xx->segCnt; pinx++ ) { - segPtr = &xx->segs[pinx]; - if ( IsSegTrack(segPtr) ) { - DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); - trackSegs(trackSegs_da.cnt-1) = *segPtr; - - AddToSegMap(trackSegs_da.cnt-1,TRUE); /* Single Track Seg - Note no Cornu*/ - - RotateSegs( 1, &trackSegs(trackSegs_da.cnt-1), zero, xx->angle ); - MoveSegs( 1, &trackSegs(trackSegs_da.cnt-1), xx->orig ); - - } else { - int start = tempSegs_da.cnt; - DrawSegs( &groupD, xx->orig, xx->angle, segPtr, 1, trackGauge, wDrawColorBlack ); - - AddSegsToSegMap(start,tempSegs_da.cnt-1,FALSE); /* Multiple Non-Track Segs */ - } - } - } else if (GetTrkType(trk) == T_BEZIER || GetTrkType(trk) == T_BZRLIN ) { - DYNARR_APPEND(trkSeg_t, trackSegs_da, 10); - segPtr = &trackSegs(trackSegs_da.cnt-1); + DYNARR_APPEND( groupTrk_t, groupTrk_da, 10 ); + groupP = &groupTrk(groupTrk_da.cnt-1); + groupP->trk = trk; + groupP->segStart = trackSegs_da.cnt; + groupP->totalSegStart = tempSegs_da.cnt+trackSegs_da.cnt; + if (IsTrack(trk)) hasTracks = TRUE; + if ( GetTrkType(trk) == T_TURNOUT || GetTrkType(trk) == T_STRUCTURE) { + xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + for ( pinx=0; pinx<xx->segCnt; pinx++ ) { + segPtr = &xx->segs[pinx]; + if ( IsSegTrack(segPtr) ) { + DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); + trackSegs(trackSegs_da.cnt-1) = *segPtr; + hasTracks = TRUE; + RotateSegs( 1, &trackSegs(trackSegs_da.cnt-1), zero, xx->angle ); + MoveSegs( 1, &trackSegs(trackSegs_da.cnt-1), xx->orig ); + + } else { + DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); + trackSegs(trackSegs_da.cnt-1) = *segPtr; + + RotateSegs( 1, &trackSegs(trackSegs_da.cnt-1), zero, xx->angle ); + MoveSegs( 1, &trackSegs(trackSegs_da.cnt-1), xx->orig ); - GetBezierSegmentFromTrack(trk,segPtr); - - AddToSegMap(trackSegs_da.cnt-1,TRUE); // Add Single Bezier Track - - } else if (GetTrkType(trk) == T_CORNU) { + } + } + } else if (GetTrkType(trk) == T_BEZIER || GetTrkType(trk) == T_BZRLIN ) { + DYNARR_APPEND(trkSeg_t, trackSegs_da, 10); + segPtr = &trackSegs(trackSegs_da.cnt-1); - int start = trackSegs_da.cnt; + GetBezierSegmentFromTrack(trk,segPtr); - GetBezierSegmentsFromCornu(trk,&trackSegs_da,TRUE); //Only give back Bezier - cant be undone + } else if (GetTrkType(trk) == T_CORNU) { - AddSegsToSegMap(start,trackSegs_da.cnt-1,TRUE); /* Add Multiple Track Segs */ + int start = trackSegs_da.cnt; - } else { - segCnt = tempSegs_da.cnt; - DrawTrack( trk, &groupD, wDrawColorBlack ); - DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); - segPtr = &trackSegs(trackSegs_da.cnt-1); - *segPtr = tempSegs( segCnt ); - - AddToSegMap(trackSegs_da.cnt-1,TRUE); // Add One Track - - if ( tempSegs_da.cnt != segCnt+1 || - !IsSegTrack(segPtr) ) { - NoticeMessage2( 0, MSG_CANNOT_GROUP_TRACK, _("Ok"), NULL ); - wHide( groupW ); - return; - } + GetBezierSegmentsFromCornu(trk,&trackSegs_da,TRUE); //Only give back Bezier - cant be undone - tempSegs_da.cnt = segCnt; - } - groupP->segEnd = trackSegs_da.cnt-1; } else { - int start = tempSegs_da.cnt; - + if (IsTrack(trk)) hasTracks=TRUE; + segCnt = tempSegs_da.cnt; DrawTrack( trk, &groupD, wDrawColorBlack ); + DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); + segPtr = &trackSegs(trackSegs_da.cnt-1); + *segPtr = tempSegs( segCnt ); + + if ( tempSegs_da.cnt != segCnt+1 ) { + NoticeMessage2( 0, MSG_CANNOT_GROUP_TRACK, _("Ok"), NULL, GetTrkTypeName(trk)); + wHide( groupW ); + return; + } - AddSegsToSegMap(start,tempSegs_da.cnt-1,FALSE); /* Multiple Non-Track Segs */ } + groupP->segEnd = trackSegs_da.cnt-1; } } if ( log_group >= 1 && logTable(log_group).level >= 4 ) { LogPrintf( "Track Segs:\n"); for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { - LogPrintf( " %d: ", inx+1 ); - LogSeg( &trackSegs(inx) ); + if (IsSegTrack(&trackSegs(inx))) { + LogPrintf( " %d: ", inx+1 ); + LogSeg( &trackSegs(inx) ); + } } LogPrintf( "Other Segs:\n"); - for ( int inx = 0; inx < tempSegs_da.cnt; inx++ ) { - LogPrintf( " %d: ", inx+1 ); - LogSeg( &tempSegs(inx) ); - } -} -if ( log_group >= 1 && logTable(log_group).level >= 3 ) { - LogPrintf( "Combined Segs:\n" ); - for ( int inx = 0; inx<segInMap_da.cnt; inx++ ) { - LogPrintf( "%d: %s X%d - ", inx+1, segInMap(inx).track?"Track":"Other", segInMap(inx).inx ); - LogSeg( GetSegFromSegMap( inx ) ); + for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { + if (!IsSegTrack(&trackSegs(inx))) { + LogPrintf( " %d: ", inx+1 ); + LogSeg( &tempSegs(inx) ); + } } } - if ( groupTrk_da.cnt>0 ) { + if ( groupTrk_da.cnt>0 && hasTracks) { if ( groupTrk_da.cnt > 128 ) { NoticeMessage( MSG_TOOMANYSEGSINGROUP, _("Ok"), NULL ); wDrawDelayUpdate( mainD.d, FALSE ); @@ -1237,11 +1218,6 @@ if ( log_group >= 1 && logTable(log_group).level >= 4 ) { wHide( groupW ); return; } - if ( groupTrk_da.cnt == 1 && GetTrkType( groupTrk(0).trk ) == T_TURNOUT ) { - path = xx->paths; - pathLen = xx->pathLen; - goto groupSimpleTurnout; - } /* Make sure no turnouts in groupTrk list have a path end which is not an EndPt */ //TODO Add Trap Points (which are Turnouts with a bumper track) @@ -1493,13 +1469,13 @@ if ( log_group >= 1 && logTable(log_group).level >= 3 ) { memset( &segFlip(0), 0, trackSegs_da.cnt * sizeof segFlip(0) ); for ( pinx=0; pinx<pathElem_da.cnt; pinx++ ) { ppp = &pathElem(pinx); - for ( path=ppp->path; *path; path++ ) { - inx = *path; + for ( PATHPTR_T pPaths=ppp->path; *pPaths; pPaths++ ) { + inx = *pPaths; if ( inx<0 ) inx = - inx; if ( inx > trackSegs_da.cnt ) AbortProg( "inx > trackSegs_da.cnt" ); - flip = *path<0; + flip = *pPaths<0; if ( ppp->flip ) flip = !flip; inx += groupTrk(ppp->groupInx).segStart - 1; @@ -1537,14 +1513,14 @@ LOG( log_group, 3, ( "\n" ) ); ppp = &pathElem( pinx2 ); LOG( log_group, 3, (" PE %d: GI %d, EP %d %d, Flip %d =", pinx2, ppp->groupInx, ppp->ep1, ppp->ep2, ppp->flip )); groupP = &groupTrk( ppp->groupInx ); - path = ppp->path; + PATHPTR_T pPaths = ppp->path; flip = ppp->flip; - if ( path == NULL ) + if ( pPaths == NULL ) AbortProg( "Missing Path T%d:%d.%d", GetTrkIndex(groupP->trk), ppp->ep2, ppp->ep1 ); - if ( flip ) path += strlen((char *)path)-1; - while ( *path && (path >= ppp->path) ) { //Add Guard for flip backwards + if ( flip ) pPaths += strlen((char *)pPaths)-1; + while ( *pPaths && (pPaths >= ppp->path) ) { //Add Guard for flip backwards DYNARR_APPEND( char, pathPtr_da, 10 ); - pathChar = *path; + pathChar = *pPaths; flip1 = flip; if ( pathChar < 0 ) { flip1 = !flip; @@ -1555,7 +1531,7 @@ LOG( log_group, 3, ( "\n" ) ); flip1 = ! flip1; if ( flip1 ) pathChar = - pathChar; pathPtr(pathPtr_da.cnt-1) = pathChar; - path += (flip?-1:1); + pPaths += (flip?-1:1); LOG( log_group, 3, (" %d", pathChar ) ); } LOG( log_group, 3, ("\n") ); @@ -1568,21 +1544,18 @@ LOG( log_group, 3, ( "\n" ) ); } DYNARR_APPEND( char, pathPtr_da, 10 ); pathPtr(pathPtr_da.cnt-1) = 0; - path = (PATHPTR_T)&pathPtr(0); - pathLen = pathPtr_da.cnt; -groupSimpleTurnout: /* * 8: Copy and Reorigin Segments - Start by putting them out in the original order */ DYNARR_RESET(trkSeg_t, outputSegs_da); - for (int i=0; i<segInMap_da.cnt;i++) { + for (int i=0; i<trackSegs_da.cnt;i++) { DYNARR_APPEND(trkSeg_t,outputSegs_da,10); - trkSeg_p from_p = GetSegFromSegMap(i); + trkSeg_p from_p = &trackSegs(i); trkSeg_p to_p = &DYNARR_LAST(trkSeg_t, outputSegs_da); - memcpy((void *)to_p,(void *)from_p,sizeof( trkSeg_t)); + memcpy(to_p,from_p,sizeof( trkSeg_t)); } CloneFilledDraw( outputSegs_da.cnt, outputSegs_da.ptr, FALSE ); @@ -1599,18 +1572,23 @@ groupSimpleTurnout: * 9: Final: create new definition */ - CheckPaths( outputSegs_da.cnt, &outputSegs(0), path ); + PATHPTR_T pPaths = (PATHPTR_T)&pathPtr(0); + CheckPaths( outputSegs_da.cnt, &outputSegs(0), pPaths ); - to = CreateNewTurnout( curScaleName, groupTitle, outputSegs_da.cnt, &outputSegs(0), pathLen, path, tempEndPts_da.cnt, &tempEndPts(0), NULL, TRUE ); + long options = 0; + if ( groupNoCombine != 0 ) + options |= COMPOUND_OPTION_PATH_NOCOMBINE; + to = CreateNewTurnout( curScaleName, groupTitle, outputSegs_da.cnt, &outputSegs(0), pPaths, tempEndPts_da.cnt, &tempEndPts(0), TRUE, options ); /* * 10: Write defn to xtrkcad.cus */ f = OpenCustom("a"); if (f && to) { - oldLocale = SaveLocale("C"); - rc &= fprintf( f, "TURNOUT %s \"%s\"\n", curScaleName, PutTitle(to->title) )>0; - rc &= WriteCompoundPathsEndPtsSegs( f, path, outputSegs_da.cnt, &outputSegs(0), tempEndPts_da.cnt, &tempEndPts(0) ); + SetCLocale(); + rc &= fprintf( f, "TURNOUT %s \"%s\" %ld\n", curScaleName, PutTitle(to->title), options )>0; + rc &= WriteCompoundPathsEndPtsSegs( f, pPaths, outputSegs_da.cnt, &outputSegs(0), tempEndPts_da.cnt, &tempEndPts(0) ); + SetUserLocale(); } if ( groupReplace ) { /* @@ -1639,7 +1617,11 @@ groupSimpleTurnout: trackCount--; } } - trk = NewCompound( T_TURNOUT, 0, orig, 0.0, to->title, tempEndPts_da.cnt, &tempEndPts(0), NULL, pathLen, (char *)path, outputSegs_da.cnt, &outputSegs(0) ); + SelectRecount(); + trk = NewCompound( T_TURNOUT, 0, orig, 0.0, to->title, tempEndPts_da.cnt, &tempEndPts(0), pPaths, outputSegs_da.cnt, &outputSegs(0) ); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + xx->pathOverRide = FALSE; + xx->pathNoCombine = groupNoCombine; SetTrkVisible( trk, TRUE ); for ( ep=0; ep<tempEndPts_da.cnt; ep++ ) { @@ -1652,18 +1634,19 @@ groupSimpleTurnout: EnableCommands(); } } else { - CloneFilledDraw( tempSegs_da.cnt, &tempSegs(0), TRUE ); - GetSegBounds( zero, 0, tempSegs_da.cnt, &tempSegs(0), &orig, &size ); + CloneFilledDraw( trackSegs_da.cnt, &trackSegs(0), TRUE ); + GetSegBounds( zero, 0, trackSegs_da.cnt, &trackSegs(0), &orig, &size ); orig.x = - orig.x-groupOriginX; //Include orig offset orig.y = - orig.y-groupOriginY; - MoveSegs( tempSegs_da.cnt, &tempSegs(0), orig ); - to = CreateNewStructure( curScaleName, groupTitle, tempSegs_da.cnt, &tempSegs(0), TRUE ); + MoveSegs( trackSegs_da.cnt, &trackSegs(0), orig ); + to = CreateNewStructure( curScaleName, groupTitle, trackSegs_da.cnt, &trackSegs(0), TRUE ); f = OpenCustom("a"); if (f && to) { - oldLocale = SaveLocale("C"); + SetCLocale(); rc &= fprintf( f, "STRUCTURE %s \"%s\"\n", curScaleName, PutTitle(groupTitle) )>0; - rc &= WriteSegs( f, tempSegs_da.cnt, &tempSegs(0) ); + rc &= WriteSegs( f, trackSegs_da.cnt, &trackSegs(0) ); + SetUserLocale(); } if ( groupReplace ) { UndoStart( _("Group Tracks"), "group" ); @@ -1675,16 +1658,16 @@ groupSimpleTurnout: trackCount--; } } + SelectRecount(); orig.x = - orig.x; orig.y = - orig.y; - trk = NewCompound( T_STRUCTURE, 0, orig, 0.0, groupTitle, 0, NULL, NULL, 0, "", tempSegs_da.cnt, &tempSegs(0) ); + trk = NewCompound( T_STRUCTURE, 0, orig, 0.0, groupTitle, 0, NULL, NULL, trackSegs_da.cnt, &trackSegs(0) ); SetTrkVisible( trk, TRUE ); DrawNewTrack( trk ); EnableCommands(); } } if (f) fclose(f); - RestoreLocale(oldLocale); DoChangeNotification( CHANGE_PARAMS ); wHide( groupW ); wDrawDelayUpdate( mainD.d, FALSE ); @@ -1693,10 +1676,10 @@ groupSimpleTurnout: } -EXPORT void DoGroup( void ) +EXPORT void DoGroup( void * unused ) { track_p trk = NULL; - struct extraData *xx; + struct extraDataCompound_t *xx; TRKTYP_T trkType; xx = NULL; groupSegCnt = 0; @@ -1705,14 +1688,17 @@ EXPORT void DoGroup( void ) groupOriginY = 0.0; BOOL_T isTurnout = FALSE; + groupNoCombine = FALSE; while ( TrackIterate( &trk ) ) { if ( GetTrkSelected( trk ) ) { trkType = GetTrkType(trk); if ( IsTrack(trk) ) isTurnout = TRUE; if ( trkType == T_TURNOUT || trkType == T_STRUCTURE ) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); groupSegCnt += xx->segCnt; GroupCopyTitle( xtitle(xx) ); + if ( trkType == T_TURNOUT && GetTrkEndPtCnt(trk) > 2 && xx->pathNoCombine != 0 ) + groupNoCombine = TRUE; } else groupSegCnt += 1; } diff --git a/app/bin/chndldto.c b/app/bin/chndldto.c index a0f2d6b..abb6e32 100644 --- a/app/bin/chndldto.c +++ b/app/bin/chndldto.c @@ -21,17 +21,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "ccurve.h" #include "cjoin.h" #include "compound.h" #include "cstraigh.h" #include "cundo.h" -#include "i18n.h" -#include "messages.h" #include "track.h" -#include "utility.h" +#include "draw.h" +#include "common-ui.h" #define PTRACE(X) @@ -351,9 +348,9 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) } -#include "bitmaps/hndldto.xpm" +#include "bitmaps/turnout-designer.xpm" EXPORT void InitCmdHandLaidTurnout( wMenu_p menu ) { - AddMenuButton( menu, CmdHandLaidTurnout, "cmdHandLaidTurnout", _("HandLaidTurnout"), wIconCreatePixMap(hndldto_xpm), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HNDLDTO, NULL ); + AddMenuButton( menu, CmdHandLaidTurnout, "cmdHandLaidTurnout", _("HandLaidTurnout"), wIconCreatePixMap(turnout_designer_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HNDLDTO, NULL ); } diff --git a/app/bin/chotbar.c b/app/bin/chotbar.c index 0b9a327..379f31a 100644 --- a/app/bin/chotbar.c +++ b/app/bin/chotbar.c @@ -20,22 +20,21 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> -#include <stdint.h> -#include <string.h> - #include "compound.h" #include "fileio.h" -#include "messages.h" #include "ccornu.h" #include "track.h" +#include "draw.h" EXPORT DIST_T curBarScale = -1; EXPORT long hotBarLabels = 0; +EXPORT wWinPix_t hotBarHeight = 32; #include "bitmaps/hotbarl.xbm" #include "bitmaps/hotbarr.xbm" +#define HOTBAR_LEFT 2 + static wButton_p hotBarLeftB = NULL; static wButton_p hotBarRightB = NULL; static wMenu_p hotbarPopupM; @@ -49,8 +48,8 @@ static drawCmd_t hotBarD = { 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix }; -static wPos_t hotBarDrawHeight = 28; -static wPos_t hotBarHeight = 28; +static wWinPix_t hotBarDrawHeight[] = {26, 32, 40}; +static wFontSize_t hotBarFontSize[] = {7, 8, 9}; typedef struct { DIST_T x; DIST_T w; @@ -75,23 +74,35 @@ static DIST_T hotBarWidth = 0.0; static void HotBarHighlight( int inx, DIST_T fixed_x ) { - wPos_t x0; - if ( inx == 0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) { - x0 = (wPos_t)0; - wDrawFilledRectangle( hotBarD.d, x0, 0, (wPos_t)(hotBarMap(0).w*hotBarD.dpi-2), hotBarHeight, wDrawColorBlack, wDrawOptTransparent ); - } else if ( inx >= hotBarCurrStart && inx < hotBarCurrEnd ) { - x0 = (wPos_t)((hotBarMap(inx).x-hotBarMap((int)hotBarCurrStart).x + (inx>0?fixed_x:0))*hotBarD.dpi); - wDrawFilledRectangle( hotBarD.d, x0, 0, (wPos_t)(hotBarMap(inx).w*hotBarD.dpi-2), hotBarHeight, wDrawColorBlack, wDrawOptTransparent ); - } + if ( inx > 0 && ( inx < hotBarCurrStart || inx >= hotBarCurrEnd ) ) + return; + coOrd orig, size; + hotBarD.scale = 1; + if ( inx == 0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) + orig.x = 0; + else + orig.x = hotBarMap(inx).x-hotBarMap(hotBarCurrStart).x + (inx>0?fixed_x:0); + orig.y = 0; + size.x = hotBarMap(inx).w - 2.0/hotBarD.dpi; + size.y = toolbarHeight; +#ifdef LATER + printf( "HotBarHilite fixed_x:%0.3f X0:%d/%0.3f X:%d/%0.3f+%0.3f X=%0.3f\n", + fixed_x, + hotBarCurrStart, hotBarMap(hotBarCurrStart).x, + inx, hotBarMap(inx).x, hotBarMap(inx).w, + orig.x ); +#endif + DrawRectangle( &hotBarD, orig, size, wDrawColorBlack, DRAW_TRANSPARENT ); } static wFont_p hotBarFp = NULL; static wFontSize_t hotBarFs = 8; +static wWinPix_t hotBarTextHeight = 11; -static void RedrawHotBar( wDraw_p dd, void * data, wPos_t w, wPos_t h ) +static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) { - DIST_T hh = (double)hotBarDrawHeight/hotBarD.dpi; + DIST_T hh = (double)(hotBarHeight + 1)/hotBarD.dpi; coOrd orig; int inx; hotBarMap_t * tbm; @@ -101,22 +112,29 @@ static void RedrawHotBar( wDraw_p dd, void * data, wPos_t w, wPos_t h ) DIST_T x; wDrawClear( hotBarD.d ); - wControlActive( (wControl_p)hotBarLeftB, hotBarCurrStart > 0 ); + if (hotBarCurrStart >0) + wControlActive( (wControl_p)hotBarLeftB, TRUE ); + else { + wButtonSetBusy(hotBarLeftB, FALSE); + wControlActive( (wControl_p)hotBarLeftB, FALSE ); + } + if (hotBarCurrStart < 0) { + wButtonSetBusy(hotBarRightB, FALSE); wControlActive( (wControl_p)hotBarRightB, FALSE ); return; } if ( hotBarLabels && !hotBarFp ) hotBarFp = wStandardFont( F_HELV, FALSE, FALSE ); - wPos_t textSize = wMessageGetHeight(0L); + DIST_T fixed_x = 0.0; if (hotBarCurrStart>0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) { //Do fixed element first - Cornu tbm = &hotBarMap(0); barScale = tbm->barScale; x = 0.0; - orig.y = hh/2.0*barScale - tbm->size.y/2.0 - tbm->orig.y; + orig.y = barScale/hotBarD.dpi + hh/2.0*barScale - tbm->size.y/2.0 - tbm->orig.y; if ( hotBarLabels ) { - orig.y += textSize/hotBarD.dpi*barScale; + orig.y += hotBarTextHeight/hotBarD.dpi*barScale; if ( tbm->labelW > tbm->objectW ) { fixed_x = tbm->labelW; x += (tbm->labelW-tbm->objectW)/2; @@ -139,13 +157,13 @@ static void RedrawHotBar( wDraw_p dd, void * data, wPos_t w, wPos_t h ) for ( inx=hotBarCurrStart; inx < hotBarMap_da.cnt; inx++ ) { tbm = &hotBarMap(inx); barScale = tbm->barScale; - x = tbm->x - hotBarMap(hotBarCurrStart).x + fixed_x; //Add space for fixed at start - if ( x + tbm->w + fixed_x > barWidth ) { + x = tbm->x - hotBarMap(hotBarCurrStart).x + fixed_x; + if ( x + tbm->w > barWidth ) { break; } - orig.y = hh/2.0*barScale - tbm->size.y/2.0 - tbm->orig.y; + orig.y = barScale/hotBarD.dpi + hh/2.0*barScale - tbm->size.y/2.0 - tbm->orig.y; if ( hotBarLabels ) { - orig.y += textSize/hotBarD.dpi*barScale; + orig.y += hotBarTextHeight/hotBarD.dpi*barScale; if ( tbm->labelW > tbm->objectW ) { x += (tbm->labelW-tbm->objectW)/2; } @@ -170,7 +188,12 @@ static void RedrawHotBar( wDraw_p dd, void * data, wPos_t w, wPos_t h ) HotBarHighlight( hotBarCurrSelect, fixed_x ); /* else hotBarCurrSelect = -1;*/ - wControlActive( (wControl_p)hotBarRightB, hotBarCurrEnd < hotBarMap_da.cnt ); + if (hotBarCurrEnd < hotBarMap_da.cnt) + wControlActive( (wControl_p)hotBarRightB, TRUE ); + else { + wButtonSetBusy(hotBarRightB, FALSE); + wControlActive( (wControl_p)hotBarRightB, FALSE ); + } wPrefSetInteger( "misc", "hotbar-start", hotBarCurrStart ); } @@ -187,7 +210,11 @@ static void DoHotBarRight( void * data ) } if ( inx >= hotBarMap_da.cnt ) inx = hotBarMap_da.cnt-1; - while ( inx > 1 && lastX - hotBarMap(inx-1).x <= barWidth ) + DIST_T fixed_x = 0.0; + if (hotBarCurrStart>0 && hotBarMap(0).isFixed) { + fixed_x = hotBarMap(0).w; + } + while ( (inx > 1) && ((lastX - hotBarMap(inx-1).x) < (barWidth - fixed_x)) ) inx--; if ( inx != hotBarCurrStart ) { hotBarCurrStart = inx; @@ -237,12 +264,12 @@ static void DoHotBarJump( int inx ) } -static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wPos_t w, wPos_t h ) +static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wDrawPix_t w, wDrawPix_t h ) { int inx; coOrd pos; DIST_T x; - wPos_t px; + wWinPix_t px; hotBarMap_t * tbm; char * titleP; @@ -279,11 +306,11 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wPos_t w, return; tbm = &hotBarMap(inx); if (inx==0) { - px = (wPos_t)((tbm->x-hotBarMap(0).x)*hotBarD.dpi); + px = (wWinPix_t)((tbm->x-hotBarMap(0).x)*hotBarD.dpi); } else { - px = (wPos_t)(((tbm->x-hotBarMap(hotBarCurrStart).x)+fixed_x)*hotBarD.dpi); + px = (wWinPix_t)(((tbm->x-hotBarMap(hotBarCurrStart).x)+fixed_x)*hotBarD.dpi); } - px += (wPos_t)(tbm->w*hotBarD.dpi/2); + px += (wWinPix_t)(tbm->w*hotBarD.dpi/2); titleP = tbm->proc( HB_LISTTITLE, tbm->context, NULL, NULL ); px -= wLabelWidth( titleP ) / 2; wControlSetBalloon( (wControl_p)hotBarD.d, px, -20, titleP ); @@ -386,7 +413,7 @@ static BOOL_T HotBarSelectPlayback( char * line ) static void HotbarJump( int inx, const char * name, void * arg ) { - hotBarCurrStart = (int)(long)arg; + hotBarCurrStart = (int)VP2L(arg); RedrawHotBar( hotBarD.d, NULL, 0, 0 ); } @@ -412,19 +439,22 @@ EXPORT void AddHotBarElement( hotBarMap_t * tbm; coOrd textsize; - if ( contentsLabel && strncmp(contentsLabel, curContentsLabel, sizeof curContentsLabel) != 0 ) { - wMenuListAdd( hotBarML, hotBarMLcnt++, contentsLabel, (void*)(intptr_t)hotBarMap_da.cnt ); + if ( contentsLabel && strncmp(contentsLabel, curContentsLabel, sizeof curContentsLabel) != 0 && !isFixed ) { + wMenuListAdd( hotBarML, hotBarMLcnt++, contentsLabel, I2VP(hotBarMap_da.cnt) ); strncpy( curContentsLabel, contentsLabel, sizeof curContentsLabel ); } - if (barScale <= 0) { if (!isTrack) - barScale = size.y/((double)hotBarDrawHeight/hotBarD.dpi); + barScale = size.y/(((double)hotBarHeight-2.0)/hotBarD.dpi); else if (isTrack) { - barScale = (trackGauge>0.1)?trackGauge*24:10; - if (size.y >= size.x) - barScale = size.y/((double)hotBarDrawHeight/hotBarD.dpi); + // size.y += 2.0 * trackGauge; + barScale = (trackGauge>0.1)?trackGauge*(36-hotBarHeight/2):10.0; + // barScale = 2.0 / ((hotBarHeight-2.0) / hotBarD.dpi); + //if (size.y >= size.x) + if (size.y/barScale > ((double)hotBarHeight-2.0)/hotBarD.dpi) + barScale = (size.y+2.0*trackGauge)/(((double)hotBarHeight-2.0)/hotBarD.dpi); } + // orig.y += 1.0/hotBarD.dpi; } DYNARR_APPEND( hotBarMap_t, hotBarMap_da, 10 ); tbm = &hotBarMap(hotBarMap_da.cnt-1); @@ -465,27 +495,27 @@ static void ChangeHotBar( long changes ) if ( hotBarLabels && !hotBarFp ) hotBarFp = wStandardFont( F_HELV, FALSE, FALSE ); if (hotBarLeftB != NULL && curScaleName) { - hotBarWidth = 0.0; - hotBarMLcnt = 0; - wMenuListClear( hotBarML ); - DYNARR_RESET( hotBarMap_t, hotBarMap_da ); - curContentsLabel[0] = '\0'; - if ( programMode == MODE_DESIGN ) { - if (showFlexTrack) - AddHotBarCornu(); - AddHotBarTurnouts(); - AddHotBarStructures(); - } else { - AddHotBarCarDesc(); - } + hotBarWidth = 0.0; + hotBarMLcnt = 0; + wMenuListClear( hotBarML ); + DYNARR_RESET( hotBarMap_t, hotBarMap_da ); + curContentsLabel[0] = '\0'; + if ( programMode == MODE_DESIGN ) { + if (showFlexTrack) + AddHotBarCornu(); + AddHotBarTurnouts(); + AddHotBarStructures(); + } else { + AddHotBarCarDesc(); + } - if ( programModeOld != programMode ) { - hotBarCurrSelects[0] = hotBarCurrSelects[1] = -1; - programModeOld = programMode; - } - if (hotBarMap_da.cnt > 0 && (hotBarCurrStart >= hotBarMap_da.cnt||hotBarCurrStart < 0)) - hotBarCurrStart = 0; - RedrawHotBar( NULL, NULL, 0, 0 ); + if ( programModeOld != programMode ) { + hotBarCurrSelects[0] = hotBarCurrSelects[1] = -1; + programModeOld = programMode; + } + if (hotBarMap_da.cnt > 0 && (hotBarCurrStart >= hotBarMap_da.cnt||hotBarCurrStart < 0)) + hotBarCurrStart = 0; + RedrawHotBar( NULL, NULL, 0, 0 ); } } @@ -501,45 +531,52 @@ EXPORT void InitHotBar( void ) hotBarCurrStart = (int)v; hotbarPopupM = MenuRegister( "Hotbar Select" ); hotBarML = wMenuListCreate( hotbarPopupM, "", -1, HotbarJump ); + hotBarHeight = hotBarDrawHeight[iconSize]; + hotBarFs = hotBarFontSize[iconSize]; } EXPORT void LayoutHotBar( void * redraw ) { - wPos_t buttonWidth, winWidth, winHeight; + wWinPix_t buttonHeight, buttonWidth, winWidth, winHeight; + wWinPix_t hbHeight = hotBarHeight; BOOL_T initialize = FALSE; wWinGetSize( mainW, &winWidth, &winHeight ); - hotBarHeight = hotBarDrawHeight; + /** @prefs [Preference] LargeIcons=1.5 Sets Icon scaling limits 1.0 to 2.0 */ double scaleicon; wPrefGetFloat(PREFSECTION, LARGEICON, &scaleicon, 1.0); if (scaleicon<1.0) scaleicon=1.0; if (scaleicon>2.0) scaleicon=2.0; - if (scaleicon>1.0) { - hotBarHeight = hotBarHeight*scaleicon; - } + //if (scaleicon>1.0) { + // hotBarHeight = (wWinPix_t)(hotBarHeight); + //} + hotBarTextHeight = (wWinPix_t)round(wMessageGetHeight(0L) * (0.5 + (double)iconSize / 10.0)); + if ( hotBarLabels) { - hotBarHeight += wMessageGetHeight(0L); + hbHeight += hotBarTextHeight; } if (hotBarLeftB == NULL) { wIcon_p bm_p; if (winWidth < 50) return; bm_p = wIconCreateBitMap( 16, 16, turnbarl_bits, wDrawColorBlack ); - hotBarLeftB = wButtonCreate( mainW, 0, 0, "hotBarLeft", (char*)bm_p, BO_ICON, 0, DoHotBarLeft, NULL ); + hotBarLeftB = wButtonCreate( mainW, 0, 0, "hotBarLeft", (char*)bm_p, BO_ICON|BO_REPEAT, 0, DoHotBarLeft, NULL ); bm_p = wIconCreateBitMap( 16, 16, turnbarr_bits, wDrawColorBlack ); - hotBarRightB = wButtonCreate( mainW, 0, 0, "hotBarRight", (char*)bm_p, BO_ICON, 0, DoHotBarRight, NULL ); - hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, BD_NOCAPTURE|BD_NOFOCUS, 100, hotBarHeight, NULL, RedrawHotBar, SelectHotBar ); + hotBarRightB = wButtonCreate( mainW, 0, 0, "hotBarRight", (char*)bm_p, BO_ICON|BO_REPEAT, 0, DoHotBarRight, NULL ); + hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, BD_NOCAPTURE|BD_NOFOCUS, 100, hbHeight, NULL, RedrawHotBar, SelectHotBar ); hotBarD.dpi = wDrawGetDPI( hotBarD.d ); hotBarD.scale = 1.0; + wSetCursor(hotBarD.d,wCursorNormal); initialize = TRUE; } buttonWidth = wControlGetWidth((wControl_p)hotBarLeftB); - wControlSetPos( (wControl_p)hotBarLeftB, 0, toolbarHeight ); - wControlSetPos( (wControl_p)hotBarRightB, winWidth-20-buttonWidth, toolbarHeight ); - wControlSetPos( (wControl_p)hotBarD.d, buttonWidth, toolbarHeight ); - wDrawSetSize( hotBarD.d, winWidth-20-buttonWidth*2, hotBarHeight+2, redraw ); + buttonHeight = wControlGetHeight((wControl_p)hotBarLeftB); + wControlSetPos( (wControl_p)hotBarLeftB, HOTBAR_LEFT, toolbarHeight+(hbHeight-buttonHeight)/2 ); + wControlSetPos( (wControl_p)hotBarRightB, winWidth-20-buttonWidth+HOTBAR_LEFT+1, toolbarHeight+(hbHeight-buttonHeight)/2 ); + wControlSetPos( (wControl_p)hotBarD.d, buttonWidth+HOTBAR_LEFT+1, toolbarHeight ); + wDrawSetSize( hotBarD.d, winWidth-20-buttonWidth*2, hbHeight+2, redraw ); hotBarD.size.x = ((double)(winWidth-20-buttonWidth*2))/hotBarD.dpi*hotBarD.scale; - hotBarD.size.y = (double)hotBarDrawHeight/hotBarD.dpi*hotBarD.scale; //Exclude Label from calc + hotBarD.size.y = (double)hotBarHeight/hotBarD.dpi*hotBarD.scale; //Exclude Label from calc wControlShow( (wControl_p)hotBarLeftB, TRUE ); wControlShow( (wControl_p)hotBarRightB, TRUE ); wControlShow( (wControl_p)hotBarD.d, TRUE ); @@ -547,7 +584,7 @@ EXPORT void LayoutHotBar( void * redraw ) ChangeHotBar( CHANGE_PARAMS ); else if (!redraw) RedrawHotBar( NULL, NULL, 0, 0 ); - toolbarHeight += hotBarHeight+3; + toolbarHeight += hbHeight+3; } void HideHotBar( void ) diff --git a/app/bin/cjoin.c b/app/bin/cjoin.c index 71f4dae..a027327 100644 --- a/app/bin/cjoin.c +++ b/app/bin/cjoin.c @@ -30,16 +30,14 @@ #include "cstraigh.h" #include "cjoin.h" #include "ccornu.h" -#include "i18n.h" -#include "utility.h" -#include "math.h" -#include "messages.h" #include "param.h" #include "cundo.h" #include "cselect.h" #include "fileio.h" +#include "common-ui.h" static BOOL_T debug = 0; +/** @logcmd @showrefby join=n cjoin.c */ static int log_join = 0; typedef struct { curveType_e type; @@ -101,7 +99,7 @@ LOG( log_join, 2, ( /* 3 - cases: */ if (b >= 360.0-connectAngle/2.0 || b <= connectAngle/2.0) { /* CASE 1: antiparallel */ - FindPos( &off, NULL, pos1, pos0, a0, 10000.0 ); + FindPos( &off, NULL, pos1, pos0, a0, DIST_INF ); res->arcR = off.y/2.0; res->arcA1 = 180.0; LOG( log_join, 3, ("JwL: parallel: off.y=%0.3f\n", off.y ) ) @@ -115,7 +113,7 @@ LOG( log_join, 3, ("JwL: parallel: off.y=%0.3f\n", off.y ) ) } } else if (b >= 180.0-connectAngle/2.0 && b <= 180.0+connectAngle/2.0) { /* CASE 2: parallel, possibly colinear? */ - FindPos( &off, &beyond, pos0, pos1, a0, 100000.0 ); + FindPos( &off, &beyond, pos0, pos1, a0, DIST_INF ); LOG( log_join, 3, ("JwL: colinear? off.y=%0.3f\n", off.y ) ) if (off.y > -connectDistance && off.y < connectDistance) { res->type = curveTypeStraight; @@ -389,8 +387,8 @@ static STATUS_T DoMoveToJoin( coOrd pos ) } if ( (Dj.inp[Dj.joinMoveState].trk = OnTrack( &pos, TRUE, TRUE )) == NULL ) return C_CONTINUE; - if (!CheckTrackLayer( Dj.inp[Dj.joinMoveState].trk ) ) - return C_CONTINUE; + // if (Dj.joinMoveState == 0 && !CheckTrackLayerSilent( Dj.inp[Dj.joinMoveState].trk ) ) + // return C_CONTINUE; Dj.inp[Dj.joinMoveState].params.ep = PickUnconnectedEndPoint( pos, Dj.inp[Dj.joinMoveState].trk ); /* CHECKME */ if ( Dj.inp[Dj.joinMoveState].params.ep == -1 ) { #ifdef LATER @@ -477,6 +475,7 @@ static STATUS_T CmdJoinLine( tempSegs_da.cnt = 0; DYNARR_RESET(trkSeg_t,Dl.newLine); Dl.curr_line = NULL; + SetAllTrackSelect( FALSE ); return C_CONTINUE; case wActionMove: DYNARR_RESET(trkSeg_t,Dl.anchors_da); @@ -527,10 +526,18 @@ static STATUS_T CmdJoinLine( DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.polyType = POLYLINE; DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts = MyMalloc(sizeof(pts_t)*Dl.params.nodes.cnt); DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.cnt = Dl.params.nodes.cnt; - //Copy in reverse as we want this point to be last - for (int i=0;i<Dl.params.nodes.cnt;i++) { - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i].pt = DYNARR_N(coOrd,Dl.params.nodes,Dl.params.nodes.cnt-1-i); - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i].pt_type = wPolyLineStraight; + if (Dl.params.ep) { + //Copy in reverse as we want this point to be last + for (int i=Dl.params.nodes.cnt-1,j=0;i>=0;i--,j++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt_type = wPolyLineStraight; + } + } else { + //Copy forwards to end up with this point last + for (int i=0; i<Dl.params.nodes.cnt;i++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i].pt_type = wPolyLineStraight; + } } InfoMessage( _("Left click - Select second object end") ); } else { @@ -562,10 +569,18 @@ static STATUS_T CmdJoinLine( if (IsClose(FindDistance(Dl.inp[0].pos,Dl.inp[1].pos))) join_near = TRUE; DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts = MyRealloc(DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts,sizeof(pts_t)*(old_cnt+Dl.params.nodes.cnt-join_near)); - //Copy forwards as this point is first - for (int i=join_near;i<Dl.params.nodes.cnt;i++) { - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i-join_near+old_cnt].pt = DYNARR_N(coOrd,Dl.params.nodes,i); - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[i-join_near+old_cnt].pt_type = wPolyLineStraight; + if (Dl.params.ep) { + //Copy forwards as this point is first + for (int i=join_near,j=old_cnt;i<Dl.params.nodes.cnt;i++,j++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt_type = wPolyLineStraight; + } + } else { + //Copy backwards as this point is last + for (int i=Dl.params.nodes.cnt-join_near-1,j=old_cnt;i>=0;i--,j++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt_type = wPolyLineStraight; + } } DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.cnt += Dl.params.nodes.cnt-join_near; } @@ -653,7 +668,7 @@ static paramData_t joinPLs[] = { #define joinRadI 0 { PD_FLOAT, &desired_radius, "radius", PDO_DIM, &r_0_10000, N_("Desired Radius") } }; -static paramGroup_t joinPG = { "join-fixed", 0, joinPLs, sizeof joinPLs/sizeof joinPLs[0] }; +static paramGroup_t joinPG = { "joinfixed", 0, joinPLs, COUNT( joinPLs ) }; @@ -849,6 +864,11 @@ static STATUS_T CmdJoin( trackParams_t moveParams; if (!GetTrackParams( PARAMS_1ST_JOIN, trk, pos, &moveParams )) return C_CONTINUE; + if (moveParams.type == curveTypeBezier || moveParams.type == curveTypeCornu) { + if (!(easementVal<0)) { + return C_CONTINUE; + } + } ep = PickUnconnectedEndPointSilent(pos,trk); if (ep <0) return C_CONTINUE; if (IsClose(FindDistance(GetTrkEndPos(trk,ep),pos))) @@ -888,10 +908,17 @@ LOG( log_join, 1, ("JOIN: 1st track %d @[%0.3f %0.3f]\n", GetTrkIndex(Dj.inp[0].trk), Dj.inp[0].pos.x, Dj.inp[1].pos.y ) ) if (!GetTrackParams( PARAMS_1ST_JOIN, Dj.inp[0].trk, pos, &Dj.inp[0].params )) return C_CONTINUE; + if (Dj.inp[0].params.type == curveTypeBezier || Dj.inp[0].params.type == curveTypeCornu) { + if (!(easementVal<0 && Dj.cornuMode)) { + ErrorMessage( MSG_JOIN_NOTBEZIERORCORNU); + return C_CONTINUE; + } + } Dj.inp[0].realType = GetTrkType(Dj.inp[0].trk); InfoMessage( _("Select 2nd track") ); Dj.state = 1; - wPrefGetFloat("misc", "desired_radius", &desired_radius, desired_radius); + sprintf(message, "desired_radius-%s", curScaleName); + wPrefGetFloat("misc", message, &desired_radius, desired_radius); controls[0] = joinRadPD.control; controls[1] = NULL; labels[0] = N_("Desired Radius"); @@ -944,6 +971,12 @@ LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) return C_CONTINUE; } } + if (Dj.inp[1].params.type == curveTypeBezier || Dj.inp[1].params.type == curveTypeCornu) { + if (!(easementVal<0 && Dj.cornuMode)) { + ErrorMessage( MSG_JOIN_NOTBEZIERORCORNU); + return C_CONTINUE; + } + } rc = C_CONTINUE; if ( MergeTracks( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp[1].trk, Dj.inp[1].params.ep ) ) { @@ -1027,6 +1060,8 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) } coOrd pos1 = pos; if (AdjustPosToRadius(&pos1,desired_radius+(Dj.jointD[0].x), na0, na1)) { + // Make sure this is initialized + beyond = 1.0; if (Dj.inp[1].params.type == curveTypeStraight) { FindPos( &off, &beyond, pos1, Dj.inp[1].params.lineOrig, Dj.inp[1].params.angle, FindDistance(Dj.inp[1].params.lineOrig,Dj.inp[1].params.lineEnd) ); @@ -1079,7 +1114,7 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) break; case curveTypeStraight: FindPos( &off, &beyond, pos, Dj.inp[1].params.lineOrig, Dj.inp[1].params.angle, - 100000 ); + DIST_INF ); Translate( &Dj.inp[1].pos, Dj.inp[1].params.lineOrig, Dj.inp[1].params.angle, off.x ); normalAngle = NormalizeAngle( Dj.inp[1].params.angle + @@ -1142,7 +1177,7 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", switch ( Dj.inp[0].params.type ) { case curveTypeStraight: FindPos( &off, &beyond, Dj.inp_pos[0], Dj.inp[0].params.lineOrig, - Dj.inp[0].params.angle, 100000.0 ); + Dj.inp[0].params.angle, DIST_INF ); if (beyond < 0.0) { InfoMessage(_("Beyond end of 1st track")); goto errorReturn; @@ -1153,7 +1188,7 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", break; case curveTypeCurve: if (IsCurveCircle(Dj.inp[0].trk)) { - d = 10000.0; + d = DIST_INF; } else { a = FindAngle( Dj.inp[0].params.arcP, Dj.inp_pos[0] ); if (Dj.inp[0].params.ep == 0) @@ -1185,7 +1220,7 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", break; case curveTypeCurve: if (IsCurveCircle(Dj.inp[1].trk)) { - d = 10000.0; + d = DIST_INF; } else { a = FindAngle( Dj.inp[1].params.arcP, Dj.inp_pos[1] ); if (Dj.inp[1].params.ep == 0) @@ -1332,8 +1367,10 @@ errorReturn: Dj.state = 0; DYNARR_RESET(trkSeg_t,Dj.anchors); rc = C_TERMINATE; - if (easementVal == 0.0) - wPrefSetFloat("misc", "desired_radius", desired_radius); + if (easementVal == 0.0) { + sprintf(message, "desired_radius-%s", curScaleName); + wPrefSetFloat("misc", message, desired_radius); + } if ( (!JoinTracks( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp_pos[0], trk, ep, Dj.jRes.pos[0], &Dj.jointD[0] ) ) || (!JoinTracks( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp_pos[1], @@ -1350,12 +1387,15 @@ errorReturn: return rc; case C_CANCEL: + SetAllTrackSelect( FALSE ); if (infoSubst) InfoSubstituteControls(NULL, NULL); infoSubst = FALSE; break; case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if ( Dj.joinMoveState == 1 || Dj.state == 1 ) { DrawFillCircle( &tempD, Dj.inp[0].pos, 0.10*mainD.scale, selectedColor ); } else if (easementVal<0 && Dj.joinMoveState == 0) @@ -1367,6 +1407,7 @@ errorReturn: case C_TEXT: case C_OK: + SetAllTrackSelect( FALSE ); if (easementVal<0 && Dj.cornuMode) return CmdCornu(action,pos); if (infoSubst) @@ -1387,14 +1428,15 @@ errorReturn: */ #include "bitmaps/join.xpm" -#include "bitmaps/joinline.xpm" +#include "bitmaps/join-line.xpm" void InitCmdJoin( wMenu_p menu ) { ButtonGroupBegin( _("Join"), "cmdJoinSetCmd", _("Join") ); - joinCmdInx = AddMenuButton( menu, CmdJoin, "cmdJoinTrack", _("Join Track"), wIconCreatePixMap(join_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); - AddMenuButton( menu, CmdJoinLine, "cmdJoinLine", _("Join Lines"), wIconCreatePixMap(joinline_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); + joinCmdInx = AddMenuButton( menu, CmdJoin, "cmdJoinTrack", _("Join Track"), wIconCreatePixMap(join_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); + AddMenuButton( menu, CmdJoinLine, "cmdJoinLine", _("Join Lines"), wIconCreatePixMap(join_line_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); ButtonGroupEnd(); + /** @logcmd @showrefby join=n cjoin.c Log Join Lines and Tracks command */ log_join = LogFindIndex( "join" ); } diff --git a/app/bin/cjoin.h b/app/bin/cjoin.h index 8d9c7e3..eabdce0 100644 --- a/app/bin/cjoin.h +++ b/app/bin/cjoin.h @@ -23,8 +23,6 @@ #define HAVE_CJOIN_H #include "common.h" -#include "wlib.h" -#include "track.h" #define E_NOTREQ (0) #define E_REQ (1) @@ -48,6 +46,7 @@ void UndoJoint( track_p, EPINX_T, track_p, EPINX_T ); void DrawJointTrack( drawCmd_p, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, track_p, EPINX_T, EPINX_T, DIST_T, wDrawColor, long ); DIST_T JointDistance( coOrd *, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T ); coOrd GetJointSegEndPos( coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, EPINX_T, ANGLE_T * ); +DIST_T JointDescriptionDistance(coOrd pos, track_p trk, coOrd * dpos, BOOL_T show_hidden, BOOL_T * hidden); #endif // !HAVE_CJOIN_H diff --git a/app/bin/cmisc.c b/app/bin/cmisc.c index b41ae42..9685503 100644 --- a/app/bin/cmisc.c +++ b/app/bin/cmisc.c @@ -20,15 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdint.h> - #include "common.h" -#include "utility.h" #include "cundo.h" -#include "i18n.h" -#include "messages.h" #include "param.h" +#include "fileio.h" +#include "cselect.h" #include "track.h" +#include "common-ui.h" EXPORT wIndex_t describeCmdInx; EXPORT BOOL_T inDescribeCmd; @@ -45,8 +43,8 @@ static POS_T descBorder; static wDrawColor descColor = 0; static BOOL_T descUndoStarted; static BOOL_T descNeedDrawHilite; -static wPos_t describeW_posy; -static wPos_t describeCmdButtonEnd; +static wWinPix_t describeW_posy; +static wWinPix_t describeCmdButtonEnd; static wMenu_p descPopupM; @@ -60,65 +58,65 @@ static char * pivotLabels[] = { N_("First"), N_("Middle"), N_("End"), NULL }; static char * boxLabels[] = { "", NULL }; static paramData_t describePLs[] = { #define I_FLOAT_0 (0) - { PD_FLOAT, NULL, "F1", 0, &rdata }, - { PD_FLOAT, NULL, "F2", 0, &rdata }, - { PD_FLOAT, NULL, "F3", 0, &rdata }, - { PD_FLOAT, NULL, "F4", 0, &rdata }, - { PD_FLOAT, NULL, "F5", 0, &rdata }, - { PD_FLOAT, NULL, "F6", 0, &rdata }, - { PD_FLOAT, NULL, "F7", 0, &rdata }, - { PD_FLOAT, NULL, "F8", 0, &rdata }, - { PD_FLOAT, NULL, "F9", 0, &rdata }, - { PD_FLOAT, NULL, "F10", 0, &rdata }, - { PD_FLOAT, NULL, "F11", 0, &rdata }, - { PD_FLOAT, NULL, "F12", 0, &rdata }, - { PD_FLOAT, NULL, "F13", 0, &rdata }, - { PD_FLOAT, NULL, "F14", 0, &rdata }, - { PD_FLOAT, NULL, "F15", 0, &rdata }, - { PD_FLOAT, NULL, "F16", 0, &rdata }, - { PD_FLOAT, NULL, "F17", 0, &rdata }, - { PD_FLOAT, NULL, "F18", 0, &rdata }, - { PD_FLOAT, NULL, "F19", 0, &rdata }, - { PD_FLOAT, NULL, "F20", 0, &rdata }, - { PD_FLOAT, NULL, "F21", 0, &rdata }, - { PD_FLOAT, NULL, "F22", 0, &rdata }, - { PD_FLOAT, NULL, "F23", 0, &rdata }, - { PD_FLOAT, NULL, "F24", 0, &rdata }, - { PD_FLOAT, NULL, "F25", 0, &rdata }, - { PD_FLOAT, NULL, "F26", 0, &rdata }, - { PD_FLOAT, NULL, "F27", 0, &rdata }, - { PD_FLOAT, NULL, "F28", 0, &rdata }, - { PD_FLOAT, NULL, "F29", 0, &rdata }, - { PD_FLOAT, NULL, "F30", 0, &rdata }, - { PD_FLOAT, NULL, "F31", 0, &rdata }, - { PD_FLOAT, NULL, "F32", 0, &rdata }, - { PD_FLOAT, NULL, "F33", 0, &rdata }, - { PD_FLOAT, NULL, "F34", 0, &rdata }, - { PD_FLOAT, NULL, "F35", 0, &rdata }, - { PD_FLOAT, NULL, "F36", 0, &rdata }, - { PD_FLOAT, NULL, "F37", 0, &rdata }, - { PD_FLOAT, NULL, "F38", 0, &rdata }, - { PD_FLOAT, NULL, "F39", 0, &rdata }, - { PD_FLOAT, NULL, "F40", 0, &rdata }, + { PD_FLOAT, NULL, "F1", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F2", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F3", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F4", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F5", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F6", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F7", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F8", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F9", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F10", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F11", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F12", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F13", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F14", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F15", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F16", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F17", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F18", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F19", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F20", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F21", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F22", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F23", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F24", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F25", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F26", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F27", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F28", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F29", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F30", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F31", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F32", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F33", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F34", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F35", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F36", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F37", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F38", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F39", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F40", PDO_NOPREF, &rdata }, #define I_FLOAT_N I_FLOAT_0+40 #define I_LONG_0 I_FLOAT_N - { PD_LONG, NULL, "I1", 0, &idata }, - { PD_LONG, NULL, "I2", 0, &idata }, - { PD_LONG, NULL, "I3", 0, &idata }, - { PD_LONG, NULL, "I4", 0, &idata }, - { PD_LONG, NULL, "I5", 0, &idata }, + { PD_LONG, NULL, "I1", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I2", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I3", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I4", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I5", PDO_NOPREF, &idata }, #define I_LONG_N I_LONG_0+5 #define I_STRING_0 I_LONG_N - { PD_STRING, NULL, "S1", 0, (void*)300 }, - { PD_STRING, NULL, "S2", 0, (void*)300 }, - { PD_STRING, NULL, "S3", 0, (void*)300 }, - { PD_STRING, NULL, "S4", 0, (void*)300 }, + { PD_STRING, NULL, "S1", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S2", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S3", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S4", PDO_NOPREF, I2VP(300) }, #define I_STRING_N I_STRING_0+4 #define I_LAYER_0 I_STRING_N - { PD_DROPLIST, NULL, "Y1", 0, (void*)150, NULL, 0 }, + { PD_DROPLIST, NULL, "Y1", PDO_NOPREF, I2VP(150), NULL, 0 }, #define I_LAYER_N I_LAYER_0+1 #define I_COLOR_0 I_LAYER_N @@ -126,22 +124,22 @@ static paramData_t describePLs[] = { #define I_COLOR_N I_COLOR_0+1 #define I_LIST_0 I_COLOR_N - { PD_DROPLIST, NULL, "L1", 0, (void*)150, NULL, 0 }, - { PD_DROPLIST, NULL, "L2", 0, (void*)150, NULL, 0 }, - { PD_DROPLIST, NULL, "L3", 0, (void*)150, NULL, 0 }, - { PD_DROPLIST, NULL, "L4", 0, (void*)150, NULL, 0 }, + { PD_DROPLIST, NULL, "L1", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "L2", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "L3", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "L4", PDO_NOPREF, I2VP(150), NULL, 0 }, #define I_LIST_N I_LIST_0+4 #define I_EDITLIST_0 I_LIST_N - { PD_DROPLIST, NULL, "LE1", 0, (void*)150, NULL, BL_EDITABLE }, + { PD_DROPLIST, NULL, "LE1", PDO_NOPREF, I2VP(150), NULL, BL_EDITABLE }, #define I_EDITLIST_N I_EDITLIST_0+1 #define I_TEXT_0 I_EDITLIST_N - { PD_TEXT, NULL, "T1", 0, &tdata, NULL, BT_HSCROLL }, + { PD_TEXT, NULL, "T1", PDO_NOPREF, &tdata, NULL, BT_HSCROLL }, #define I_TEXT_N I_TEXT_0+1 #define I_PIVOT_0 I_TEXT_N - { PD_RADIO, NULL, "P1", 0, pivotLabels, N_("Pivot"), BC_HORZ|BC_NOBORDER, 0 }, + { PD_RADIO, NULL, "P1", PDO_NOPREF, pivotLabels, N_("Lock"), BC_HORZ|BC_NOBORDER, 0 }, #define I_PIVOT_N I_PIVOT_0+1 #define I_TOGGLE_0 I_PIVOT_N @@ -152,7 +150,7 @@ static paramData_t describePLs[] = { #define I_TOGGLE_N I_TOGGLE_0+4 }; -static paramGroup_t describePG = { "describe", 0, describePLs, sizeof describePLs/sizeof describePLs[0] }; +static paramGroup_t describePG = { "describe", 0, describePLs, COUNT( describePLs ) }; /** * A mapping table is used to map the index in the dropdown list to the layer @@ -198,8 +196,6 @@ SearchEditableLayerList(unsigned int layer) static void DrawDescHilite(BOOL_T selected) { - wPos_t x, y, w, h; - if (descNeedDrawHilite == FALSE) { return; } @@ -207,11 +203,7 @@ static void DrawDescHilite(BOOL_T selected) if (descColor==0) { descColor = wDrawColorGray(87); } - - w = (wPos_t)((descSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((descSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,descOrig,&x,&y); - wDrawFilledRectangle(tempD.d, x, y, w, h, selected?descColor:wDrawColorBlue, wDrawOptTemp|wDrawOptTransparent); + DrawRectangle(&tempD, descOrig, descSize, selected?descColor:wDrawColorBlue, DRAW_TRANSPARENT); } @@ -248,26 +240,27 @@ static void DescribeUpdate( } UndoModify(descTrk); - descUpdateFunc(descTrk, ddp-descData, descData, FALSE); + descUpdateFunc(descTrk, (int)(ddp-descData), descData, FALSE); if (descTrk) { GetBoundingBox(descTrk, &hi, &lo); + if ((ddp->mode&DESC_NOREDRAW) == 0) { + descOrig = lo; + descSize = hi; + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + } + if (OFF_D(mapD.orig, mapD.size, descOrig, descSize)) { ErrorMessage(MSG_MOVE_OUT_OF_BOUNDS); } } - if ((ddp->mode&DESC_NOREDRAW) == 0) { - descOrig = lo; - descSize = hi; - descOrig.x -= descBorder; - descOrig.y -= descBorder; - descSize.x -= descOrig.x-descBorder; - descSize.y -= descOrig.y-descBorder; - } - for (inx = 0; inx < sizeof describePLs/sizeof describePLs[0]; inx++) { + for (inx = 0; inx < COUNT( describePLs ); inx++) { if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { continue; } @@ -283,6 +276,12 @@ static void DescribeUpdate( continue; } + if (ddp->mode&DESC_RO) { + wControlActive(ddp->control0, FALSE); + } else { + wControlActive(ddp->control0, TRUE); + } + ddp->mode &= ~DESC_CHANGE; if (ddp->type == DESC_POS) { //POS Has two fields if (ddp->mode&DESC_CHANGE2) { @@ -291,6 +290,7 @@ static void DescribeUpdate( ddp->mode |= DESC_CHANGE2; //First time } } + ParamLoadControl(&describePG, inx); } } @@ -351,7 +351,7 @@ static struct { */ static wControl_p AssignParamToDescribeDialog(descData_p ddp, void * valueP, char * label, - wPos_t sep) + wWinPix_t sep) { int inx; @@ -393,12 +393,12 @@ static wControl_p AssignParamToDescribeDialog(descData_p ddp, void * valueP, cha static void DescribeLayout( paramData_t * pd, int inx, - wPos_t colX, - wPos_t * x, - wPos_t * y) + wWinPix_t colX, + wWinPix_t * x, + wWinPix_t * y) { descData_p ddp; - wPos_t w, h; + wWinPix_t w, h; if (inx < 0) { return; @@ -463,7 +463,7 @@ void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) describeCmdButtonEnd = wControlBelow((wControl_p)describePG.helpB); } - for (inx=0; inx<sizeof describePLs/sizeof describePLs[0]; inx++) { + for (inx=0; inx<COUNT( describePLs ); inx++) { describePLs[inx].option = PDO_DLGIGNORE; wControlShow(describePLs[inx].control, FALSE); } @@ -476,7 +476,7 @@ void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) continue; } - ddp->mode |= ro_mode; + ddp->mode |= DESC_RO; } for (ddp=data; ddp->type != DESC_NULL; ddp++) { @@ -488,7 +488,8 @@ void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) ddp->posy = describeW_posy; ddp->control0 = AssignParamToDescribeDialog(ddp, ddp->valueP, label, (ddp->type == DESC_POS?3:3)); - wControlActive(ddp->control0, ((ddp->mode|ro_mode)&DESC_RO)==0); + if (ddp->type != DESC_LAYER) + wControlActive(ddp->control0, (!(ddp->mode&DESC_RO))); switch (ddp->type) { case DESC_POS: @@ -496,21 +497,33 @@ void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) &((coOrd*)(ddp->valueP))->y, NULL, 0); - wControlActive(ddp->control1, ((ddp->mode|ro_mode)&DESC_RO)==0); + wControlActive(ddp->control1, (!(ddp->mode&DESC_RO))); break; case DESC_LAYER: - wListClear((wList_p)ddp->control0); // Rebuild list on each invovation + wListClear((wList_p)ddp->control0); // Rebuild list on each invocation - for (inx = 0; inx<NUM_LAYERS; inx++) { - char *layerFormattedName; - layerFormattedName = FormatLayerName(editableLayerList[inx]); - wListAddValue((wList_p)ddp->control0, layerFormattedName, NULL, (void*)(long)inx); + if (ro_mode) { + char *layerFormattedName; + layerFormattedName = FormatLayerName(*(int *)(ddp->valueP)); + wListAddValue((wList_p)ddp->control0, layerFormattedName, NULL, I2VP(inx)); free(layerFormattedName); + *(int *)(ddp->valueP) = 0; + layerValue = (int *)(ddp->valueP); + wControlActive(ddp->control0, FALSE); + } else { + for (inx = 0; inx<NUM_LAYERS; inx++) { + char *layerFormattedName; + layerFormattedName = FormatLayerName(editableLayerList[inx]); + wListAddValue((wList_p)ddp->control0, layerFormattedName, NULL, I2VP(inx)); + free(layerFormattedName); + } + + *(int *)(ddp->valueP) = SearchEditableLayerList(*(int *)(ddp->valueP)); + layerValue = (int *)(ddp->valueP); + wControlActive(ddp->control0, TRUE); } - *(int *)(ddp->valueP) = SearchEditableLayerList(*(int *)(ddp->valueP)); - layerValue = (int *)(ddp->valueP); break; default: @@ -528,7 +541,7 @@ void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) static void DescChange(long changes) { - if ((changes&CHANGE_UNITS) && describePG.win && wWinIsVisible(describePG.win)) { + if ((changes&CHANGE_UNITS) && describePG.win && wWinIsVisible(describePG.win)) { ParamLoadControls(&describePG); } } @@ -544,8 +557,8 @@ EXPORT void DescribeCancel(void) { if (describePG.win && wWinIsVisible(describePG.win)) { if (descTrk) { - if (!IsTrackDeleted(descTrk)) - descUpdateFunc(descTrk, -1, descData, TRUE); + ASSERT(!IsTrackDeleted(descTrk)); + descUpdateFunc(descTrk, -1, descData, TRUE); descTrk = NULL; } @@ -569,7 +582,7 @@ EXPORT STATUS_T CmdDescribe(wAction_t action, coOrd pos) switch (action) { case C_START: - InfoMessage(_("Select track to describe")); + InfoMessage(_("Select track to describe +Shift for Frozen")); wSetCursor(mainD.d,wCursorQuestion); descUndoStarted = FALSE; trk = NULL; @@ -577,11 +590,20 @@ EXPORT STATUS_T CmdDescribe(wAction_t action, coOrd pos) case wActionMove: trk = OnTrack(&pos, FALSE, FALSE); + if (trk && GetLayerFrozen(GetTrkLayer(trk)) && !(MyGetKeyState() & WKEY_SHIFT)) { + trk = NULL; + return C_CONTINUE; + } return C_CONTINUE; case C_DOWN: if ((trk = OnTrack(&pos, FALSE, FALSE)) != NULL) { + if (GetLayerFrozen(GetTrkLayer(trk)) && !(MyGetKeyState()& WKEY_SHIFT)) { + InfoMessage("Track is Frozen, Add Shift to Describe"); + trk = NULL; + return C_CONTINUE; + } if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { descUpdateFunc(descTrk, -1, descData, TRUE); descTrk = NULL; @@ -613,7 +635,18 @@ EXPORT STATUS_T CmdDescribe(wAction_t action, coOrd pos) case C_REDRAW: if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { + descNeedDrawHilite = TRUE; + coOrd lo,hi; + GetBoundingBox(descTrk,&hi,&lo); + descOrig = lo; + descSize = hi; + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + DrawDescHilite(TRUE); + if (descTrk && QueryTrack(descTrk, Q_IS_DRAW)) { DrawOriginAnchor(descTrk); } @@ -650,7 +683,7 @@ extern wIndex_t panCmdInx; void InitCmdDescribe(wMenu_p menu) { describeCmdInx = AddMenuButton(menu, CmdDescribe, "cmdDescribe", - _("Properties"), wIconCreatePixMap(describe_xpm), + _("Properties"), wIconCreatePixMap(describe_xpm[iconSize]), LEVEL0, IC_CANCEL|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_DESCRIBE, NULL); RegisterChangeNotification(DescChange); ParamRegister(&describePG); @@ -658,8 +691,8 @@ void InitCmdDescribe(wMenu_p menu) void InitCmdDescribe2(wMenu_p menu) { descPopupM = MenuRegister( "Describe Context Menu" ); - wMenuPushCreate(descPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, (void*) (intptr_t) selectCmdInx); - wMenuPushCreate(descPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, (void*) (intptr_t) modifyCmdInx); - wMenuPushCreate(descPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, (void*) (intptr_t) panCmdInx); + wMenuPushCreate(descPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, I2VP(selectCmdInx)); + wMenuPushCreate(descPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, I2VP(modifyCmdInx)); + wMenuPushCreate(descPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, I2VP(panCmdInx)); } diff --git a/app/bin/cmisc2.c b/app/bin/cmisc2.c index c9daad2..128e52b 100644 --- a/app/bin/cmisc2.c +++ b/app/bin/cmisc2.c @@ -20,8 +20,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "common.h" #include "track.h" -#include "i18n.h" /***************************************************************************** * diff --git a/app/bin/cmodify.c b/app/bin/cmodify.c index 8f82012..1e66e74 100644 --- a/app/bin/cmodify.c +++ b/app/bin/cmodify.c @@ -20,8 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "cjoin.h" #include "ccurve.h" #include "cbezier.h" @@ -29,14 +27,13 @@ #include "cstraigh.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" #include "drawgeom.h" #include "common.h" #include "layout.h" +#include "cselect.h" +#include "common-ui.h" static struct { track_p Trk; @@ -64,6 +61,7 @@ static BOOL_T modifyBezierMode; static BOOL_T modifyCornuMode; static BOOL_T modifyDrawMode; static BOOL_T modifyRulerMode; +static BOOL_T modifyProtractorMode; static BOOL_T modifyExtendMode; @@ -79,6 +77,7 @@ static void CreateEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; anchors(i).width = 0; + wSetCursor(mainD.d,wCursorNone); } static void CreateCornuAnchor(coOrd p, wBool_t lock) { @@ -102,6 +101,7 @@ static void CreateCornuAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; anchors(i).width = 0; + wSetCursor(mainD.d,wCursorNone); } @@ -172,7 +172,7 @@ static STATUS_T ModifyCornu(wAction_t action, coOrd pos) { } /* - * Picking a DRAW will allow point modifications until terminated with "Enter" + * Picking a DRAW will allow point modifications until terminated with "Enter"/"Space" */ static STATUS_T ModifyDraw(wAction_t action, coOrd pos) { STATUS_T rc = C_CONTINUE; @@ -189,21 +189,22 @@ static STATUS_T ModifyDraw(wAction_t action, coOrd pos) { break; case C_TEXT: //Delete or '0' - continues - if ((action>>8 !=32) && (action >>8 !=13)) + if ((action>>8 !=32) && (action >>8 !=13) && (action >>8 !=9)) return ModifyTrack( Dex.Trk, action, pos ); - //Enter/Space does not - if ((action>>8 !=32) && (action>>8 != 13)) return C_CONTINUE; + //Enter/Space/Tab does not + if ((action>>8 !=32) && (action>>8 != 13) && (action>>8 != 9)) return C_CONTINUE; + if (((action>>8) == 9 && (MyGetKeyState()&WKEY_SHIFT))) return C_TERMINATE; /*no break*/ case C_OK: - UndoStart( _("Modify Track"), "Modify( T%d[%d] )", GetTrkIndex(Dex.Trk), Dex.params.ep ); - UndoModify( Dex.Trk ); - rc = ModifyTrack( Dex.Trk, C_TEXT | (13<<8), pos ); + rc = ModifyTrack( Dex.Trk, C_OK, pos ); if (rc != C_CONTINUE) modifyDrawMode = FALSE; UndoEnd(); break; + case C_CONFIRM: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; case C_CANCEL: case C_FINISH: - case C_CONFIRM: case C_TERMINATE: rc = ModifyTrack( Dex.Trk, action, pos ); Dex.Trk = NULL; @@ -218,6 +219,9 @@ static STATUS_T ModifyDraw(wAction_t action, coOrd pos) { menuPos = pos; rc = ModifyTrack( Dex.Trk, action, pos ); break; + case wActionExtKey: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; default: break; } @@ -269,35 +273,46 @@ STATUS_T CmdModify( modifyCornuMode = FALSE; modifyDrawMode = FALSE; modifyExtendMode = FALSE; + modifyRulerMode = FALSE; + modifyProtractorMode = FALSE; + SetAllTrackSelect( FALSE ); return C_CONTINUE; case C_DOWN: + case C_LDOUBLE: DYNARR_RESET(trkSeg_t,anchors_da); + if (modifyProtractorMode) + return ModifyProtractor(C_DOWN, pos); if (modifyBezierMode) return ModifyBezier(C_DOWN, pos); if (modifyCornuMode) return ModifyCornu(C_DOWN, pos); if (modifyDrawMode) return ModifyDraw(C_DOWN, pos); - /*no break*/ - case C_LDOUBLE: + DYNARR_SET( trkSeg_t, tempSegs_da, 2 ); tempSegs(0).color = wDrawColorBlack; tempSegs(0).width = 0; tempSegs(1).color = wDrawColorBlack; tempSegs(1).width = 0; tempSegs_da.cnt = 0; - Dex.Trk = OnTrack( &pos, TRUE, FALSE ); + Dex.Trk = OnTrack( &pos, FALSE, FALSE ); //Dex.Trk = trk; if (Dex.Trk == NULL) { - if ( ModifyRuler( C_DOWN, pos ) == C_CONTINUE ) + if ( ModifyRuler( C_DOWN, pos ) == C_CONTINUE ) { modifyRulerMode = TRUE; + } else if (ModifyProtractor( C_DOWN, pos ) == C_CONTINUE ) { + modifyProtractorMode = TRUE; + } else { + InfoMessage("Not on object, or Ruler, or Protractor"); + wBeep(); + } return C_CONTINUE; } if (!CheckTrackLayer( Dex.Trk ) ) { Dex.Trk = NULL; - return C_CONTINUE; + return C_ERROR; } trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); if (QueryTrack( Dex.Trk, Q_CAN_MODIFY_CONTROL_POINTS )) { //Bezier @@ -374,6 +389,7 @@ STATUS_T CmdModify( if (modifyDrawMode) return ModifyDraw(wActionMove,pos); if (modifyBezierMode) return ModifyBezier(wActionMove, pos); track_p t; + wSetCursor(mainD.d,defaultCursor); if (((t=OnTrack(&pos,FALSE,TRUE))!= NULL) && CheckTrackLayerSilent( t )) { EPINX_T ep = PickUnconnectedEndPointSilent(pos, t); if (QueryTrack( t, Q_IS_CORNU )) { @@ -387,6 +403,7 @@ STATUS_T CmdModify( ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); CreateRadiusAnchor(pos,a,FALSE); + wSetCursor(mainD.d,wCursorNone); } else if (QueryTrack(t,Q_CAN_EXTEND)) { if (ep != -1) { if (MyGetKeyState()&WKEY_CTRL) { @@ -418,15 +435,19 @@ STATUS_T CmdModify( } } } else if (((t=OnTrack(&pos,FALSE,FALSE))!= NULL) - && (!(GetLayerFrozen(GetTrkLayer(t)) && GetLayerModule(GetTrkLayer(t)))) + && (!(GetLayerFrozen(GetTrkLayer(t)) || GetLayerModule(GetTrkLayer(t)))) && (QueryTrack(t, Q_IS_DRAW ) && !QueryTrack(t, Q_IS_TEXT)) ) { CreateEndAnchor(pos,FALSE); + } else { + ModifyRuler (wActionMove, pos); } return C_CONTINUE; case C_MOVE: if ( modifyRulerMode ) return ModifyRuler( C_MOVE, pos ); + if ( modifyProtractorMode ) + return ModifyProtractor( C_MOVE, pos ); if (Dex.Trk == NULL) return C_CONTINUE; if ( modifyBezierMode ) @@ -439,7 +460,7 @@ STATUS_T CmdModify( goto extendTrackMove; tempSegs_da.cnt = 0; - SnapPos( &pos ); + if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); rc = ModifyTrack( Dex.Trk, C_MOVE, pos ); if ( rc != C_CONTINUE ) { rc = C_CONTINUE; @@ -453,6 +474,8 @@ STATUS_T CmdModify( return C_CONTINUE; if ( modifyRulerMode ) return ModifyRuler( C_MOVE, pos ); + if ( modifyProtractorMode) + return ModifyProtractor( C_UP, pos); if ( modifyBezierMode ) return ModifyBezier( C_UP, pos); if (modifyCornuMode) @@ -463,7 +486,7 @@ STATUS_T CmdModify( tempSegs_da.cnt = 0; - SnapPos( &pos ); + if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); UndoStart( _("Modify Track"), "Modify( T%d[%d] )", GetTrkIndex(Dex.Trk), Dex.params.ep ); UndoModify( Dex.Trk ); rc = ModifyTrack( Dex.Trk, C_UP, pos ); @@ -477,6 +500,7 @@ extendTrack: changeTrackMode = TRUE; modifyExtendMode = TRUE; modifyRulerMode = FALSE; + modifyProtractorMode = FALSE; modifyBezierMode = FALSE; modifyCornuMode = FALSE; modifyDrawMode = FALSE; @@ -486,7 +510,7 @@ extendTrack: if (Dex.Trk) { if (!CheckTrackLayer( Dex.Trk ) ) { Dex.Trk = NULL; - return C_CONTINUE; + return C_ERROR; } trackGauge = GetTrkGauge( Dex.Trk ); Dex.pos00 = pos; @@ -525,7 +549,7 @@ extendTrackMove: tempSegs_da.cnt = 0; Dex.valid = FALSE; if (Dex.Trk == NULL) return C_CONTINUE; - SnapPos( &pos ); + if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); if ( Dex.first && FindDistance( pos, Dex.pos00 ) <= minLength ) return C_CONTINUE; Dex.first = FALSE; @@ -543,9 +567,9 @@ extendTrackMove: Rotate(&pos,Dex.params.cornuCenter[Dex.params.ep],angle); } } else pos = Dex.pos00; //Only out from end - PlotCurve( crvCmdFromCornu, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, FALSE ); + PlotCurve( crvCmdFromCornu, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, FALSE, 0.0 ); } else - PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE ); + PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE, 0.0 ); curveType = Dex.curveData.type; if ( curveType == curveTypeStraight ) { Dex.r1 = 0.0; @@ -724,14 +748,17 @@ LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", if ((action>>8) == 'c') { panCenter = pos; LOG( log_pan, 2, ( "PanCenter:Mod-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); return C_CONTINUE; } if ((action>>8) == 'e') { - DoZoomExtents(0); + DoZoomExtents(I2VP(0)); + } + if ((action>>8) == 's') { + DoZoomExtents(I2VP(1)); } if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter('o'); + PanMenuEnter(I2VP('o')); } if ( !Dex.Trk ) return C_CONTINUE; @@ -792,14 +819,15 @@ extern wIndex_t describeCmdInx; void InitCmdModify( wMenu_p menu ) { - modifyCmdInx = AddMenuButton( menu, CmdModify, "cmdModify", _("Modify"), wIconCreatePixMap(extend_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_MODIFY, NULL ); + modifyCmdInx = AddMenuButton( menu, CmdModify, "cmdModify", _("Modify"), wIconCreatePixMap(extend_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_MODIFY, NULL ); + /** @logcmd @showrefby modify=n cmodify.c Log Modify command */ log_modify = LogFindIndex( "modify" ); modPopupM = MenuRegister( "Modify Context Menu" ); - wMenuPushCreate(modPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, (void*) (intptr_t) selectCmdInx); - wMenuPushCreate(modPopupM, "cmdDescribeMode", GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, (void*) (intptr_t) describeCmdInx); - wMenuPushCreate(modPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, (void*) (intptr_t) panCmdInx); + wMenuPushCreate(modPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, I2VP(selectCmdInx)); + wMenuPushCreate(modPopupM, "cmdDescribeMode", GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, I2VP(describeCmdInx)); + wMenuPushCreate(modPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, I2VP(panCmdInx)); wMenuSeparatorCreate(modPopupM); - wMenuPushCreate(modPopupM, "", _("Zoom In"), 0,(wMenuCallBack_p) DoZoomUp, (void*) 1); - wMenuPushCreate(modPopupM, "", _("Zoom Out"), 0, (wMenuCallBack_p) DoZoomDown, (void*) 1); - wMenuPushCreate(modPopupM, "", _("Pan center - 'c'"), 0, (wMenuCallBack_p) PanHere, (void*) 3); + wMenuPushCreate(modPopupM, "", _("Zoom In"), 0, DoZoomUp, I2VP(1)); + wMenuPushCreate(modPopupM, "", _("Zoom Out"), 0, DoZoomDown, I2VP(1)); + wMenuPushCreate(modPopupM, "", _("Pan center - 'c'"), 0, PanHere, I2VP(3)); } diff --git a/app/bin/cnote.c b/app/bin/cnote.c index 0a015f1..7e4c0f9 100644 --- a/app/bin/cnote.c +++ b/app/bin/cnote.c @@ -19,12 +19,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> #include "custom.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "misc.h" #include "param.h" #include "include/utf8convert.h" @@ -38,7 +36,7 @@ static paramData_t notePLs[] = { #define noteT ((wText_p)notePLs[I_NOTETEXT].control) { PD_TEXT, NULL, "text", PDO_DLGRESIZE, ¬eTextData } }; -static paramGroup_t notePG = { "note", 0, notePLs, sizeof notePLs/sizeof notePLs[0] }; +static paramGroup_t notePG = { "note", 0, notePLs, COUNT( notePLs ) }; void ClearNote(void) @@ -49,7 +47,7 @@ void ClearNote(void) } } -static void NoteOk(void * junk) +static void NoteOk(void * unused) { if (wTextGetModified(noteT)) { int len; @@ -63,7 +61,7 @@ static void NoteOk(void * junk) } -void DoNote(void) +void DoNote(void * unused) { if (noteW == NULL) { noteW = ParamCreateDialog(¬ePG, MakeWindowTitle(_("Note")), _("Ok"), NoteOk, @@ -84,26 +82,26 @@ BOOL_T WriteMainNote(FILE* f) char *noteText = mainText; if (noteText && *noteText) { -#ifdef WINDOWS +#ifdef UTFCONVERT char *out = NULL; if (RequiresConvToUTF8(mainText)) { - unsigned cnt = strlen(mainText) * 2 + 1; + size_t cnt = strlen(mainText) * 2 + 1; out = MyMalloc(cnt); - wSystemToUTF8(mainText, out, cnt); + wSystemToUTF8(mainText, out, (unsigned int)cnt); noteText = out; } -#endif // WINDOWS +#endif // UTFCONVERT char * sText = ConvertToEscapedText( noteText ); rc &= fprintf(f, "NOTE MAIN 0 0 0 0 0 \"%s\"\n", sText )>0; MyFree( sText ); -#ifdef WINDOWS +#ifdef UTFCONVERT if (out) { MyFree(out); } -#endif // WINDOWS +#endif // UTFCONVERT } return rc; } @@ -121,7 +119,7 @@ BOOL_T ReadMainNote(char *line) if (!GetArgs(line + 9, paramVersion < 3 ? "l" : - paramVersion < 12 ? "0000l": + paramVersion < VERSION_INLINENOTE ? "0000l": "0000lq", &size, &sNote)) { return FALSE; } @@ -130,7 +128,7 @@ BOOL_T ReadMainNote(char *line) MyFree(mainText); } - if ( paramVersion < 12 ) + if ( paramVersion < VERSION_INLINENOTE ) mainText = ReadMultilineText(); else mainText = sNote; diff --git a/app/bin/cnvdsgn.c b/app/bin/cnvdsgn.c index 6f75b11..fc4a827 100644 --- a/app/bin/cnvdsgn.c +++ b/app/bin/cnvdsgn.c @@ -1,12 +1,3 @@ -#include <stdio.h> -#include <math.h> -#include "common.h" -#include "utility.h" - -#include <string.h> -#include <stdlib.h> - - /* XTrkCad - Model Railroad CAD * Copyright (C) 2005 Dave Bullis * @@ -25,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include "utility.h" + #define GETMAXY \ if (lp->y0 > maxY) maxY = lp->y0; \ if (lp->y1 > maxY) maxY = lp->y1 diff --git a/app/bin/common-ui.h b/app/bin/common-ui.h new file mode 100644 index 0000000..893dbc7 --- /dev/null +++ b/app/bin/common-ui.h @@ -0,0 +1,31 @@ +/** \file common-ui.h + * Defnitions of message and other UI types + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2021 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* Do not include this file in header (.h) files */ + +#ifndef COMMON_UI_H +#define COMMON_UI_H + +#include "messages.h" + +#endif + diff --git a/app/bin/common.h b/app/bin/common.h index 2db961f..92620f2 100644 --- a/app/bin/common.h +++ b/app/bin/common.h @@ -1,5 +1,5 @@ /** \file common.h - * Defnitions of basic types + * Defnitions of basic types */ /* XTrkCad - Model Railroad CAD @@ -23,16 +23,98 @@ #ifndef COMMON_H #define COMMON_H -#include <stdlib.h> +// INCLUDES +#include <assert.h> +#include <ctype.h> +#include <errno.h> +#include <locale.h> +#include <math.h> +#include <stdarg.h> #include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <time.h> + +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif + +#include "wlib.h" + +#ifndef WINDOWS +// Unix/Mac +#include <dirent.h> +#include <unistd.h> + +#define PATH_SEPARATOR "/" + +#else +// Windows +#include <io.h> +#include <process.h> +#include "include/dirent.h" +#include "direct.h" +#include "getopt.h" + +// DEFINES +#define UTFCONVERT +#define M_PI 3.14159265358979323846 + +#define F_OK (00) +#define W_OK (02) +#define R_OK (04) +#define PATH_SEPARATOR "\\" + +// ALIASES for WINDOWS +#define access _access +#define unlink(a) _unlink((a)) +#define rmdir(a) _rmdir((a)) +#define open(name, flag, mode) _open((name), (flag), (mode)) +#define close(file) _close((file)) +#define getpid() _getpid() +#define strcasecmp _stricmp +#define strncasecmp _strnicmp +#define mkdir( DIR, MODE ) _mkdir( (DIR) ) +#if _MSC_VER >1300 +#define strnicmp _strnicmp +#define stricmp _stricmp +#define strdup _strdup +#endif +// starting from Visual Studio 2015 round is in the runtime library, fake otherwise +#if ( _MSC_VER < 1900 ) +#define round(x) floor((x)+0.5) +#endif + +/* suppress warning from *.bmp about conversion of int to char */ +#pragma warning( disable : 4305 ) +/* suppress warning about array references */ +#pragma warning( disable : 6385 ) +#endif + +// We need to pass integer values via void* objects +// typically context vars (declared as void*) which sometimes pass pointers and some times integers +// For example see paramData_t.context. +// Also some wlib calls take a generic parameter, declared as void* but somethings used to pass integers +// These are used in logical pairs; VP=I2VP(INTEGER); ...a lot of code...; INTEGER=VP2L(VP); +// Note: we never use VP2L to manipulate integer-ized values of a pointer and all integer values we use fit in a long +#define I2VP(VAL) ((void*)(intptr_t)(VAL)) +#define VP2L(VAL) ((long)(intptr_t)(VAL)) + #ifndef TRUE #define TRUE (1) #define FALSE (0) #endif +#define DIST_INF 2.0E9 + #define NUM_LAYERS (99) +// TYPEDEFS + typedef double FLOAT_T; typedef double POS_T; typedef double DIST_T; @@ -72,19 +154,15 @@ enum paramFileState { PARAMFILE_UNLOADED = 0, PARAMFILE_NOTUSABLE, PARAMFILE_COM #define SCALE_ANY (-2) #define SCALE_DEMO (-1) +// DYNARRAY + typedef struct { int cnt; int max; void * ptr; } dynArr_t; -#if defined(WINDOWS) && ! defined(WIN32) -#define CHECK_SIZE(T,DA) \ - if ( (long)((DA).max) * (long)(sizeof *(T*)NULL) > 65500L ) \ - AbortProg( "Dynamic array too large at %s:%d", __FILE__, __LINE__ ); -#else #define CHECK_SIZE(T,DA) -#endif #define DYNARR_APPEND(T,DA,INCR) \ { if ((DA).cnt >= (DA).max) { \ @@ -130,16 +208,42 @@ typedef struct { if ((DA.cnt)>=I) (DA).cnt--; \ } - -#ifdef WINDOWS -#define M_PI 3.14159 -#define strcasecmp _stricmp -#define strncasecmp _strnicmp -#endif - -#if _MSC_VER >1300 - #define strdup _strdup -#endif +// Base DotsPerInch +#define BASE_DPI (75.0) + +// FILE VERSIONS - non-backward file format changes +// Descriptions added for Bezier, Cornu, Joint +#define VERSION_DESCRIPTION2 (12) +// Inline quoted text replaces multiline text in Notes and Cars +#define VERSION_INLINENOTE (12) +// END is replaced by END$SEGS, END$TRK, ... +#define VERSION_NONAKEDENDS (12) + + +// FORWARD TYPE DECLS +typedef struct drawCmd_t * drawCmd_p; +typedef struct track_t * track_p; +typedef struct trkSeg_t * trkSeg_p; +typedef struct traverseTrack_t * traverseTrack_p; +typedef struct trkEndPt_t * trkEndPt_p; + +// base class for extraData*_t: each of which must include this struct as the first element +typedef struct extraDataBase_t { + TRKTYP_T trkType; + } extraDataBase_t; +// We check if TRKTYP_T in trk, trk->extraDataBase and the code context (TRKTYP) match. +// If TRKTYP is T_NOTRACK then we are dealing with T_TURNOUT/T_STRUCTURE or T_BEZIER/T_BEZLIN which +// share a log of code and have the same extraData*_t structure. +#define GET_EXTRA_DATA(TRK,TRKTYP,TYPE) \ + ((TYPE*)GetTrkExtraData( (TRK), (TRKTYP) )) +extraDataBase_t * GetTrkExtraData( track_p, TRKTYP_T ); + +// COMMON INCLUDES +// If you add includes here, please remove them elsewhere + +#include "i18n.h" +#include "utility.h" +#include "misc.h" #endif diff --git a/app/bin/compound.c b/app/bin/compound.c index 627d2ef..b6d5847 100644 --- a/app/bin/compound.c +++ b/app/bin/compound.c @@ -21,11 +21,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> -#include <math.h> -#include <string.h> - - #include "tbezier.h" #include "cjoin.h" #include "common.h" @@ -33,39 +28,173 @@ #include "cundo.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "shrtpath.h" #include "track.h" -#include "utility.h" -#include "messages.h" +#include "draw.h" #include "include/paramfile.h" +#include "common-ui.h" /***************************************************************************** * - * Misc + * Paths * */ -//Convert the internal path segment into the external one - which is based on the index count of only the track segments -char ConvertPathSegToExternal(char signed pp, int segCnt,trkSeg_p segs) { +#ifndef NEWPATH +/* GetPaths() + * + * Return the paths for 'trk'. + * + * \param trk IN Get paths for track 'trk' + */ +EXPORT PATHPTR_T GetPaths( track_p trk ) +{ + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, extraDataCompound_t ); + if ( GetTrkType(trk) == T_STRUCTURE && xx->paths != NULL ) { + LogPrintf( "GetPaths( STRUCTURE, paths!=NULL )\n" ); + } + if ( GetTrkType(trk) == T_TURNOUT && xx->paths == NULL ) { + LogPrintf( "GetPaths( TURNOUT, paths==NULL )\n" ); + } + return xx->paths; +} +#endif - char signed new_pp; - int old_inx; - EPINX_T old_EP; - GetSegInxEP(pp,&old_inx,&old_EP); - int j = old_inx; - for (int i=0;i<old_inx;i++) { - if ( !IsSegTrack(&segs[i]) ) { - j--; - } +/* GetPathsLength() + * + * Return the length of the paths object + * + * \param paths IN paths object + */ +EXPORT wIndex_t GetPathsLength( PATHPTR_T paths ) +{ + PATHPTR_T pp; + ASSERT( paths != NULL ); + for ( pp = paths; pp[0]; pp+=2 ) + for ( pp += strlen( (char*)pp ); pp[0] || pp[1]; pp++ ); + return (wIndex_t)(pp - paths + 1); +} + + +#ifndef NEWPATH +/* SetPaths() + * + * Set the paths for 'trk'. + * Called when paths are read from a layout file, copied from a param def'n or + * from a Spilt turnout. + * + * \param trk IN + * \param paths IN + */ +EXPORT void SetPaths( track_p trk, PATHPTR_T paths ) +{ + if ( GetTrkType(trk) == T_STRUCTURE && paths != NULL ) { + LogPrintf( "SetPaths( STRUCTURE, paths!=NULL )\n" ); + } + if ( GetTrkType(trk) == T_TURNOUT && paths == NULL ) { + LogPrintf( "SetPaths( TURNOUT, paths==NULL )\n" ); } - SetSegInxEP(&new_pp,j,old_EP); - return new_pp; + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, extraDataCompound_t ); + if ( xx->paths ) + MyFree( xx->paths ); + if ( paths == NULL ) { + xx->paths = NULL; + } else { + wIndex_t pathLen = GetPathsLength( paths ); + xx->paths = memdup( paths, pathLen * sizeof *xx->paths ); + } + xx->currPath = NULL; + xx->currPathIndex = 0; +} +#endif + + +/* GetCurrPath() + * + * Return the current path for 'trk'. + * Current path is the .currPathIndex'th path + * If the .currPathIndex is greater then the number of paths, return the first + * + * \param trk IN + */ +EXPORT PATHPTR_T GetCurrPath( track_p trk ) +{ + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + if ( xx->currPath ) + return xx->currPath; + PATHPTR_T path = GetPaths( trk ); + for ( wIndex_t position = xx->currPathIndex; + position > 0 && path[0]; + path+=2, position-- ) { + for ( path += strlen( (char*)path ); path[0] || path[1]; path++ ); + } + if ( !path[0] ) { + xx->currPathIndex = 0; + path = GetPaths( trk ); + } + xx->currPath = path; + return xx->currPath; } -BOOL_T WriteCompoundPathsEndPtsSegs( + +EXPORT long GetCurrPathIndex( track_p trk ) +{ + if ( GetTrkType( trk ) != T_TURNOUT ) + return 0; + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + return xx->currPathIndex; +} + + +EXPORT void SetCurrPathIndex( track_p trk, long position ) +{ + if ( GetTrkType( trk ) != T_TURNOUT ) + return; + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + xx->currPathIndex = position; + xx->currPath = NULL; +} + +#ifndef NEWPATH +/* GetParamPaths() + * + * Return the paths for turnout parameter 'to'. + * + * \param to IN + */ +PATHPTR_T GetParamPaths( turnoutInfo_t * to ) +{ + return to->paths; +} + +/* SetParamPaths() + * + * Set paths for a Turnout Parameter 'to' + * Used when creating a new turnout def'n + * + * \param to IN + * \param paths IN + */ +void SetParamPaths( turnoutInfo_t * to, PATHPTR_T paths ) +{ + if ( paths ) { + wIndex_t len = GetPathsLength(paths); + to->paths = (PATHPTR_T)memdup( paths, len * ( sizeof * to->paths ) ); + } else { + to->paths = NULL; + } +} +#endif + +/***************************************************************************** + * + * + * + */ + +EXPORT BOOL_T WriteCompoundPathsEndPtsSegs( FILE * f, PATHPTR_T paths, wIndex_t segCnt, @@ -77,11 +206,13 @@ BOOL_T WriteCompoundPathsEndPtsSegs( PATHPTR_T pp; BOOL_T rc = TRUE; - for ( pp=paths; *pp; pp+=2 ) { - rc &= fprintf( f, "\tP \"%s\"", pp )>0; - for ( pp+=strlen((char *)pp)+1; pp[0]!=0 || pp[1]!=0; pp++ ) - rc &= fprintf( f, " %d", ConvertPathSegToExternal(pp[0],segCnt,segs) )>0; - rc &= fprintf( f, "\n" )>0; + if ( paths ) { + for ( pp=paths; *pp; pp+=2 ) { + rc &= fprintf( f, "\tP \"%s\"", pp )>0; + for ( pp+=strlen((char *)pp)+1; pp[0]!=0 || pp[1]!=0; pp++ ) + rc &= fprintf( f, " %d", pp[0] )>0; + rc &= fprintf( f, "\n" )>0; + } } for ( i=0; i<endPtCnt; i++ ) rc &= fprintf( f, "\tE %0.6f %0.6f %0.6f\n", @@ -101,7 +232,7 @@ EXPORT void ParseCompoundTitle( int * partnoL ) { char * cp1, *cp2; - int len; + size_t len; *manufP = *nameP = *partnoP = NULL; *manufL = *nameL = *partnoL = 0; len = strlen( title ); @@ -111,17 +242,17 @@ EXPORT void ParseCompoundTitle( if ( cp2 ) { cp2++; *partnoP = cp2; - *partnoL = title+len-cp2; + *partnoL = (int)(title+len-cp2); len = cp2-title-1; } cp1++; *nameP = cp1; - *nameL = title+len-cp1; + *nameL = (int)(title+len-cp1); *manufP = title; - *manufL = cp1-title-1; + *manufL = (int)(cp1-title-1); } else { *nameP = title; - *nameL = len; + *nameL = (int)len; } } @@ -131,7 +262,7 @@ void FormatCompoundTitle( char * title ) { char *cp1, *cp2=NULL, *cq; - int len; + size_t len; FLOAT_T price; BOOL_T needSep; cq = message; @@ -210,10 +341,10 @@ void FormatCompoundTitle( void ComputeCompoundBoundingBox( track_p trk ) { - struct extraData *xx; + struct extraDataCompound_t *xx; coOrd hi, lo; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); GetSegBounds( xx->orig, xx->angle, xx->segCnt, xx->segs, &lo, &hi ); hi.x += lo.x; @@ -290,7 +421,7 @@ EXPORT void CompoundClearDemoDefns( void ) void SetDescriptionOrig( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); int i, j; coOrd p0, p1; @@ -328,7 +459,7 @@ void DrawCompoundDescription( { wFont_p fp; coOrd p1; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); char * desc; long layoutLabelsOption = layoutLabels; @@ -336,24 +467,30 @@ void DrawCompoundDescription( return; if ((labelEnable&LABELENABLE_TRKDESC)==0) return; - if ( (d->options&DC_SIMPLE) ) + if ( (d->options&(DC_SIMPLE|DC_SEGTRACK)) ) return; - if ( xx->special == TOpier ) { - desc = xx->u.pier.name; - } else { - if ( xx->flipped ) - layoutLabelsOption |= LABEL_FLIPPED; - if ( xx->ungrouped ) - layoutLabelsOption |= LABEL_UNGROUPED; - if ( xx->split ) - layoutLabelsOption |= LABEL_SPLIT; - FormatCompoundTitle( layoutLabelsOption, xtitle(xx) ); - desc = message; - } - p1 = xx->descriptionOrig; - Rotate( &p1, zero, xx->angle ); - p1.x += xx->orig.x + xx->descriptionOff.x; - p1.y += xx->orig.y + xx->descriptionOff.y; + if ( xx->special == TOpier ) { + desc = xx->u.pier.name; + } else { + if ( xx->flipped ) + layoutLabelsOption |= LABEL_FLIPPED; + if ( xx->ungrouped ) + layoutLabelsOption |= LABEL_UNGROUPED; + if ( xx->split ) + layoutLabelsOption |= LABEL_SPLIT; + FormatCompoundTitle( layoutLabelsOption, xtitle(xx) ); + desc = message; + } + p1 = xx->descriptionOrig; + Rotate( &p1, zero, xx->angle ); + coOrd p0; + p0.x = p1.x+xx->orig.x; + p0.y = p1.y+xx->orig.y; + p1.x += xx->orig.x + xx->descriptionOff.x; + p1.y += xx->orig.y + xx->descriptionOff.y; + if (color == drawColorPreviewSelected) { + DrawLine( d, p0, p1, 0, color ); + } fp = wStandardFont( F_TIMES, FALSE, FALSE ); DrawBoxedString( (xx->special==TOpier)?BOX_INVERT:BOX_NONE, d, p1, desc, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); } @@ -366,12 +503,12 @@ DIST_T CompoundDescriptionDistance( BOOL_T show_hidden, BOOL_T * hidden) { - struct extraData *xx = GetTrkExtraData(trk); coOrd p1; if (GetTrkType(trk) != T_TURNOUT && GetTrkType(trk) != T_STRUCTURE) - return 100000; + return DIST_INF; + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); if ( ((GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) && !show_hidden) - return 100000; + return DIST_INF; p1 = xx->descriptionOrig; coOrd offset = xx->descriptionOff; if ( (GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) offset = zero; @@ -380,6 +517,10 @@ DIST_T CompoundDescriptionDistance( p1.y += xx->orig.y + offset.y; if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); *dpos = p1; + + coOrd tpos = pos; + if (DistanceCompound(trk,&tpos)<FindDistance( p1, pos )) + return DistanceCompound(trk,&pos); return FindDistance( p1, pos ); } @@ -389,7 +530,7 @@ STATUS_T CompoundDescriptionMove( wAction_t action, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); static coOrd p0, p1; static BOOL_T editMode; wDrawColor color; @@ -470,7 +611,7 @@ DIST_T DistanceCompound( track_p t, coOrd * p ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataCompound_t); EPINX_T ep; DIST_T d0, d1; coOrd p0, p2; @@ -483,7 +624,7 @@ DIST_T DistanceCompound( d0 = DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, p, NULL ); } else if ( programMode != MODE_TRAIN || GetTrkEndPtCnt(t) <= 0 ) { d0 = DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, p, NULL ); - if (programMode != MODE_TRAIN && GetTrkEndPtCnt(t) > 0 && d0 < 10000.0) { + if (programMode != MODE_TRAIN && GetTrkEndPtCnt(t) > 0 && d0 < DIST_INF) { ep = PickEndPoint( *p, t ); *p = GetTrkEndPos(t,ep); } @@ -492,11 +633,11 @@ DIST_T DistanceCompound( Rotate( &p0, xx->orig, -xx->angle ); p0.x -= xx->orig.x; p0.y -= xx->orig.y; - d0 = 1000000.0; - path = xx->pathCurr; - for ( path=xx->pathCurr+strlen((char *)xx->pathCurr)+1; path[0] || path[1]; path++ ) { + d0 = DIST_INF; + path = GetCurrPath( t ); + for ( path += strlen((char *)path)+1; path[0] || path[1]; path++ ) { if ( path[0] != 0 ) { - d1 = 1000000.0; + d1 = DIST_INF; GetSegInxEP( *path, &segInx, &segEP ); segProcData.distance.pos1 = p0; SegProc( SEGPROC_DISTANCE, &xx->segs[segInx], &segProcData ); @@ -506,7 +647,7 @@ DIST_T DistanceCompound( } } } - if ( d0 < 1000000.0 ) { + if ( d0 < DIST_INF ) { p2.x += xx->orig.x; p2.y += xx->orig.y; Rotate( &p2, xx->orig, xx->angle ); @@ -575,7 +716,7 @@ static descData_t compoundDesc[] = { static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T needUndoStart ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); const char * manufS, * nameS, * partnoS; char * mP, *nP, *pP; int mL, nL, pL; @@ -806,7 +947,7 @@ void DescribeCompound( char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); int fix; EPINX_T ep, epCnt; char * mP, *nP, *pP, *cnP; @@ -953,13 +1094,13 @@ void DescribeCompound( if ( compoundDesc[LT].control0!=NULL) { wListClear( (wList_p)compoundDesc[LT].control0 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("Solid"), NULL, (void*)0 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dash"), NULL, (void*)1 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dot"), NULL, (void*)2 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDot"), NULL, (void*)3 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDotDot"), NULL, (void*)4 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("CenterDot"), NULL, (void*)5 ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("PhantomDot"), NULL, (void*)6 ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("Solid"), NULL, I2VP(0) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dash"), NULL, I2VP(1) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dot"), NULL, I2VP(2) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDot"), NULL, I2VP(3) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDotDot"), NULL, I2VP(4) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("CenterDot"), NULL, I2VP(5) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("PhantomDot"), NULL, I2VP(6) ); wListSetIndex( (wList_p)compoundDesc[LT].control0, compoundData.linetype ); } @@ -969,9 +1110,9 @@ void DescribeCompound( void DeleteCompound( track_p t ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataCompound_t); FreeFilledDraw( xx->segCnt, xx->segs ); - MyFree( xx->segs ); + if (xx->segCnt>0) MyFree( xx->segs ); xx->segs = NULL; } @@ -980,42 +1121,34 @@ BOOL_T WriteCompound( track_p t, FILE * f ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataCompound_t); EPINX_T ep, epCnt; long options; long position = 0; drawLineType_e lineType = 0; - PATHPTR_T path; BOOL_T rc = TRUE; options = (long)GetTrkWidth(t); if (xx->handlaid) - options |= 0x08; + options |= COMPOUND_OPTION_HANDLAID; if (xx->flipped) - options |= 0x10; + options |= COMPOUND_OPTION_FLIPPED; if (xx->ungrouped) - options |= 0x20; + options |= COMPOUND_OPTION_UNGROUPED; if (xx->split) - options |= 0x40; + options |= COMPOUND_OPTION_SPLIT; + if (xx->pathOverRide) + options |= COMPOUND_OPTION_PATH_OVERRIDE; + if (xx->pathNoCombine) + options |= COMPOUND_OPTION_PATH_NOCOMBINE; if ( ( GetTrkBits( t ) & TB_HIDEDESC ) != 0 ) - options |= 0x80; + options |= COMPOUND_OPTION_HIDEDESC; epCnt = GetTrkEndPtCnt(t); - if ( epCnt > -0 ) { - path = xx->paths; - while ( path != xx->pathCurr ) { - path += strlen((char*)path)+1; - while ( path[0] || path[1] ) - path++; - path += 2; - if ( *path == 0 ) - break; - position++; - } - } lineType = xx->lineType; rc &= fprintf(f, "%s %d %d %ld %ld %d %s %d %0.6f %0.6f 0 %0.6f \"%s\"\n", GetTrkTypeName(t), - GetTrkIndex(t), GetTrkLayer(t), options, position, lineType, + GetTrkIndex(t), GetTrkLayer(t), options, + GetCurrPathIndex(t), lineType, GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), xx->orig.x, xx->orig.y, xx->angle, PutTitle(xtitle(xx)) )>0; @@ -1034,7 +1167,7 @@ BOOL_T WriteCompound( ; } rc &= fprintf( f, "\tD %0.6f %0.6f\n", xx->descriptionOff.x, xx->descriptionOff.y )>0; - rc &= WriteCompoundPathsEndPtsSegs( f, xpaths(xx), xx->segCnt, xx->segs, 0, NULL ); + rc &= WriteCompoundPathsEndPtsSegs( f, GetPaths( t ), xx->segCnt, xx->segs, 0, NULL ); return rc; } @@ -1048,7 +1181,7 @@ BOOL_T WriteCompound( */ EXPORT void SetCompoundLineType( track_p trk, int width ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); switch(width) { case 0: xx->lineType = DRAWLINESOLID; @@ -1084,18 +1217,16 @@ EXPORT track_p NewCompound( char * title, EPINX_T epCnt, trkEndPt_t * epp, - DIST_T * radii, - int pathLen, - char * paths, + PATHPTR_T paths, wIndex_t segCnt, trkSeg_p segs ) { track_p trk; - struct extraData * xx; + struct extraDataCompound_t * xx; EPINX_T ep; trk = NewTrack( index, trkType, epCnt, sizeof (*xx) + 1 ); - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); xx->orig = pos; xx->angle = angle; xx->handlaid = FALSE; @@ -1107,12 +1238,7 @@ EXPORT track_p NewCompound( xx->title = MyStrdup( title ); xx->customInfo = NULL; xx->special = TOnormal; - if ( pathLen > 0 ) - xx->paths = memdup( paths, pathLen ); - else - xx->paths = (PATHPTR_T)""; - xx->pathLen = pathLen; - xx->pathCurr = xx->paths; + SetPaths( trk, paths ); xx->segCnt = segCnt; xx->segs = memdup( segs, segCnt * sizeof *segs ); trkSeg_p p = xx->segs; @@ -1120,17 +1246,8 @@ EXPORT track_p NewCompound( FixUpBezierSegs(xx->segs,xx->segCnt); ComputeCompoundBoundingBox( trk ); SetDescriptionOrig( trk ); -// if (radii) { -// xx->special = TOcurved; -// xx->u.curved.radii.max = 0; -// xx->u.curved.radii.cnt = 0; -// DYNARR_SET(DIST_T,xx->u.curved.radii,epCnt); -// } for ( ep=0; ep<epCnt; ep++ ) { SetTrkEndPoint( trk, ep, epp[ep].pos, epp[ep].angle ); -// if (radii) { -// DYNARR_N(DIST_T,xx->u.curved.radii,ep) = radii[ep]; -// } } return trk; } @@ -1141,7 +1258,7 @@ BOOL_T ReadCompound( TRKTYP_T trkType ) { track_p trk; - struct extraData *xx; + struct extraDataCompound_t *xx; TRKINX_T index; BOOL_T visible; coOrd orig; @@ -1154,7 +1271,6 @@ BOOL_T ReadCompound( long options = 0; long position = 0; long lineType = 0; - PATHPTR_T path=NULL; if (paramVersion<3) { if ( !GetArgs( line, "dXsdpfq", @@ -1175,10 +1291,15 @@ BOOL_T ReadCompound( pathCnt = 0; if ( !ReadSegs() ) return FALSE; - path = pathPtr; - if ( tempEndPts_da.cnt > 0 && pathCnt <= 1 ) { - pathCnt = 10; - path = (PATHPTR_T)"Normal\01\0\0"; + if ( trkType == T_TURNOUT ) { + if ( tempEndPts_da.cnt <= 0 ) { + InputError( "Turnout defn without EndPoints", TRUE ); + return FALSE; + } + if ( pathCnt <= 1 ) { + InputError( "Turnout defn without a Path", TRUE ); + return FALSE; + } } if (paramVersion<6 && strlen( title ) > 2) { cp = strchr( title, '\t' ); @@ -1189,7 +1310,9 @@ BOOL_T ReadCompound( UpdateTitleMark( title, LookupScale(scale) ); } } - trk = NewCompound( trkType, index, orig, angle, title, 0, NULL, NULL, pathCnt, (char *)path, tempSegs_da.cnt, &tempSegs(0) ); + trk = NewCompound( trkType, index, orig, angle, title, 0, NULL, + pathCnt > 1 ? pathPtr : NULL, + tempSegs_da.cnt, &tempSegs(0) ); SetEndPts( trk, 0 ); if ( paramVersion < 3 ) { SetTrkVisible(trk, visible!=0); @@ -1203,14 +1326,16 @@ BOOL_T ReadCompound( SetTrkScale(trk, LookupScale( scale )); SetTrkLayer(trk, layer); SetTrkWidth(trk, (int)(options&3)); - xx = GetTrkExtraData(trk); - xx->handlaid = (int)((options&0x08)!=0); - xx->flipped = (int)((options&0x10)!=0); - xx->ungrouped = (int)((options&0x20)!=0); - xx->split = (int)((options&0x40)!=0); + xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); + xx->handlaid = (int)((options&COMPOUND_OPTION_HANDLAID)!=0); + xx->flipped = (int)((options&COMPOUND_OPTION_FLIPPED)!=0); + xx->ungrouped = (int)((options&COMPOUND_OPTION_UNGROUPED)!=0); + xx->split = (int)((options&COMPOUND_OPTION_SPLIT)!=0); + xx->pathOverRide = (int)((options&COMPOUND_OPTION_PATH_OVERRIDE)!=0); + xx->pathNoCombine = (int)((options&COMPOUND_OPTION_PATH_NOCOMBINE)!=0); xx->lineType = lineType; xx->descriptionOff = descriptionOff; - if ( ( options & 0x80 ) != 0 ) + if ( ( options & COMPOUND_OPTION_HIDEDESC ) != 0 ) SetTrkBits( trk, TB_HIDEDESC ); if (tempSpecial[0] != '\0') { @@ -1231,18 +1356,7 @@ BOOL_T ReadCompound( return FALSE; } } - if (pathCnt > 0) { - path = xx->pathCurr; - while ( position-- ) { - path += strlen((char *)path)+1; - while ( path[0] || path[1] ) - path++; - path += 2; - if ( *path == 0 ) - path = xx->paths; - } - } - xx->pathCurr = path; + SetCurrPathIndex( trk, position ); return TRUE; } @@ -1250,7 +1364,7 @@ void MoveCompound( track_p trk, coOrd orig ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); xx->orig.x += orig.x; xx->orig.y += orig.y; ComputeCompoundBoundingBox( trk ); @@ -1262,7 +1376,7 @@ void RotateCompound( coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); Rotate( &xx->orig, orig, angle ); xx->angle = NormalizeAngle( xx->angle + angle ); Rotate( &xx->descriptionOff, zero, angle ); @@ -1274,7 +1388,7 @@ void RescaleCompound( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); xx->orig.x *= ratio; xx->orig.y *= ratio; xx->descriptionOff.x *= ratio; @@ -1290,7 +1404,7 @@ void FlipCompound( coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); EPINX_T ep, epCnt; char * mP, *nP, *pP; int mL, nL, pL; @@ -1405,19 +1519,21 @@ typedef struct { char * type; char * name; FLOAT_T price; + DynString indexes; } enumCompound_t; static dynArr_t enumCompound_da; #define EnumCompound(N) DYNARR_N( enumCompound_t,enumCompound_da,N) BOOL_T EnumerateCompound( track_p trk ) { - struct extraData *xx; + struct extraDataCompound_t *xx; INT_T inx, inx2; int cmp; long listLabelsOption = listLabels; + char * index = MyMalloc(10); if ( trk != NULL ) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); if ( xx->flipped ) listLabelsOption |= LABEL_FLIPPED; #ifdef LATER @@ -1428,11 +1544,14 @@ BOOL_T EnumerateCompound( track_p trk ) #endif FormatCompoundTitle( listLabelsOption, xtitle(xx) ); if (message[0] == '\0') - return TRUE; + return FALSE; //No content for (inx = 0; inx < enumCompound_da.cnt; inx++ ) { cmp = strcmp( EnumCompound(inx).name, message ); if ( cmp == 0 ) { EnumCompound(inx).count++; + sprintf(index,",%d",GetTrkIndex(trk)); + DynStringCatCStr(&(EnumCompound(inx).indexes),index); + MyFree(index); return TRUE; } else if ( cmp > 0 ) { break; @@ -1443,9 +1562,11 @@ BOOL_T EnumerateCompound( track_p trk ) EnumCompound(inx2) = EnumCompound(inx2-1); EnumCompound(inx).name = MyStrdup( message ); if (strlen(message) > (size_t)enumerateMaxDescLen) - enumerateMaxDescLen = strlen(message); + enumerateMaxDescLen = (int)strlen(message); EnumCompound(inx).type = GetTrkTypeName( trk ); EnumCompound(inx).count = 1; + DynStringMalloc(&(EnumCompound(inx).indexes),100); + DynStringPrintf(&(EnumCompound(inx).indexes),"%d",GetTrkIndex(trk)); FormatCompoundTitle( LABEL_MANUF|LABEL_DESCR|LABEL_PARTNO, xtitle(xx) ); wPrefGetFloat( "price list", message, &(EnumCompound(inx).price), 0.0 ); } else { @@ -1455,12 +1576,15 @@ BOOL_T EnumerateCompound( track_p trk ) if (EnumCompound(inx).type[0] == *type) { EnumerateList( EnumCompound(inx).count, EnumCompound(inx).price, - EnumCompound(inx).name ); + EnumCompound(inx).name, + DynStringSize(&(EnumCompound(inx).indexes))?DynStringToCStr(&(EnumCompound(inx).indexes)):NULL); } + DynStringFree(&(EnumCompound(inx).indexes)); } } DYNARR_RESET( enumCompound_t, enumCompound_da ); } + MyFree(index); return TRUE; } diff --git a/app/bin/compound.h b/app/bin/compound.h index b4c63ca..edcbb66 100644 --- a/app/bin/compound.h +++ b/app/bin/compound.h @@ -24,9 +24,9 @@ #define COMPOUND_H #include "common.h" -#include "track.h" +#include "track.h" //- PATHPTR_T drawLineType_e -typedef enum { TOnormal, TOadjustable, TOpierInfo, TOpier, TOcarDesc, TOlast, TOcurved } TOspecial_e; +typedef enum { TOnormal, TOadjustable, TOpierInfo, TOpier, TOcarDesc, TOlast } TOspecial_e; typedef struct { char * name; @@ -44,9 +44,6 @@ typedef union { FLOAT_T height; char * name; } pier; - struct { - dynArr_t radii; - } curved; } turnoutInfo_u; typedef struct turnoutInfo_t{ @@ -57,31 +54,32 @@ typedef struct turnoutInfo_t{ wIndex_t segCnt; trkSeg_p segs; wIndex_t endCnt; - trkEndPt_t * endPt; - wIndex_t pathLen; + trkEndPt_p endPt; PATHPTR_T paths; int paramFileIndex; char * customInfo; DIST_T barScale; TOspecial_e special; turnoutInfo_u u; + wBool_t pathOverRide; + wBool_t pathNoCombine; char * contentsLabel; } turnoutInfo_t; -#define xpaths(X) \ - (X->paths) #define xtitle(X) \ (X->title) -#ifndef PRIVATE_EXTRADATA -struct extraData { +typedef struct extraDataCompound_t { + extraDataBase_t base; coOrd orig; ANGLE_T angle; BOOL_T handlaid; BOOL_T flipped; BOOL_T ungrouped; BOOL_T split; + BOOL_T pathOverRide; + BOOL_T pathNoCombine; coOrd descriptionOrig; coOrd descriptionOff; coOrd descriptionSize; @@ -90,14 +88,12 @@ struct extraData { TOspecial_e special; turnoutInfo_u u; PATHPTR_T paths; - wIndex_t pathLen; - PATHPTR_T pathCurr; + PATHPTR_T currPath; + long currPathIndex; wIndex_t segCnt; - trkSeg_t * segs; - DIST_T * radii; + trkSeg_p segs; drawLineType_e lineType; - }; -#endif + } extraDataCompound_t; extern TRKTYP_T T_TURNOUT; extern TRKTYP_T T_STRUCTURE; @@ -118,11 +114,29 @@ extern turnoutInfo_t * curStructure; #define PIER "pier" #define CURVED "curvedends" +#define COMPOUND_OPTION_HANDLAID (0x0008) +#define COMPOUND_OPTION_FLIPPED (0x0010) +#define COMPOUND_OPTION_UNGROUPED (0x0020) +#define COMPOUND_OPTION_SPLIT (0x0040) +#define COMPOUND_OPTION_HIDEDESC (0x0080) +#define COMPOUND_OPTION_PATH_OVERRIDE (0x0100) +#define COMPOUND_OPTION_PATH_NOCOMBINE (0x0200) + + /* compound.c */ +PATHPTR_T GetPaths( track_p trk ); +wIndex_t GetPathsLength( PATHPTR_T paths ); +void SetPaths( track_p trk, PATHPTR_T paths ); +PATHPTR_T GetCurrPath( track_p trk ); +long GetCurrPathIndex( track_p trk ); +void SetCurrPathIndex( track_p trk, long position ); +PATHPTR_T GetParamPaths( turnoutInfo_t * to ); +void SetParamPaths( turnoutInfo_t * to, PATHPTR_T paths ); + #define FIND_TURNOUT (1<<11) #define FIND_STRUCT (1<<12) void FormatCompoundTitle( long, char *); -BOOL_T WriteCompoundPathsEndPtsSegs( FILE *, PATHPTR_T, wIndex_t, trkSeg_p, EPINX_T, trkEndPt_t *); +BOOL_T WriteCompoundPathsEndPtsSegs( FILE *, PATHPTR_T, wIndex_t, trkSeg_p, EPINX_T, trkEndPt_p); void ParseCompoundTitle( char *, char **, int *, char **, int *, char **, int * ); void FormatCompoundTitle( long, char *); void ComputeCompoundBoundingBox( track_p); @@ -135,7 +149,7 @@ void DrawCompoundDescription( track_p, drawCmd_p, wDrawColor ); DIST_T DistanceCompound( track_p, coOrd * ); void DescribeCompound( track_p, char *, CSIZE_T ); void DeleteCompound( track_p ); -track_p NewCompound( TRKTYP_T, TRKINX_T, coOrd, ANGLE_T, char *, EPINX_T, trkEndPt_t *, DIST_T *, int, char *, wIndex_t, trkSeg_p ); +track_p NewCompound( TRKTYP_T, TRKINX_T, coOrd, ANGLE_T, char *, EPINX_T, trkEndPt_p, PATHPTR_T, wIndex_t, trkSeg_p ); BOOL_T WriteCompound( track_p, FILE * ); BOOL_T ReadCompound( char *, TRKTYP_T ); void MoveCompound( track_p, coOrd ); @@ -147,8 +161,8 @@ void SetCompoundLineType( track_p trk, int width ); /* cgroup.c */ void UngroupCompound( track_p ); -void DoUngroup( void ); -void DoGroup( void ); +void DoUngroup( void * unused ); +void DoGroup( void * unused ); /* dcmpnd.c */ void UpdateTitleMark( char *, SCALEINX_T ); @@ -163,7 +177,7 @@ BOOL_T SplitTurnoutCheck(track_p,coOrd,EPINX_T ep,track_p *,EPINX_T *,EPINX_T *, void GetSegInxEP( signed char, int *, EPINX_T * ); void SetSegInxEP( signed char *, int, EPINX_T) ; wIndex_t CheckPaths( wIndex_t, trkSeg_p, PATHPTR_T ); -turnoutInfo_t * CreateNewTurnout( char *, char *, wIndex_t, trkSeg_p, wIndex_t, PATHPTR_T, EPINX_T, trkEndPt_t *, DIST_T *, wBool_t ); +turnoutInfo_t * CreateNewTurnout( char *, char *, wIndex_t, trkSeg_p, PATHPTR_T, EPINX_T, trkEndPt_p, wBool_t, long ); void DeleteTurnoutParams(int fileInx); turnoutInfo_t * TurnoutAdd( long, SCALEINX_T, wList_p, coOrd *, EPINX_T ); STATUS_T CmdTurnoutAction( wAction_t, coOrd ); diff --git a/app/bin/cparalle.c b/app/bin/cparalle.c index 27276b1..6825aea 100644 --- a/app/bin/cparalle.c +++ b/app/bin/cparalle.c @@ -20,17 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "ccurve.h" #include "cstraigh.h" +#include "cselect.h" #include "cundo.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" #include "layout.h" +#include "common-ui.h" static struct { track_p Trk; @@ -54,7 +51,7 @@ static paramData_t parSepPLs[] = { #define parFactorI 1 { PD_FLOAT, &parSepFactor, "factor", 0, &r_0_10, N_("Radius Factor") } }; -static paramGroup_t parSepPG = { "parallel", 0, parSepPLs, sizeof parSepPLs/sizeof parSepPLs[0] }; +static paramGroup_t parSepPG = { "parallel", 0, parSepPLs, COUNT( parSepPLs ) }; static STATUS_T CmdParallel(wAction_t action, coOrd pos) @@ -71,7 +68,7 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) char * labels[3]; static DIST_T parRFactor; - parType = (long)commandContext; + parType = VP2L(commandContext); switch (action&0xFF) { @@ -104,6 +101,7 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) parFactorPD.option &= ~PDO_NORECORD; Dpa.anchor_Trk = NULL; tempSegs_da.cnt = 0; + SetAllTrackSelect( FALSE ); return C_CONTINUE; case wActionMove: @@ -201,7 +199,7 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) tempSegs_da.cnt = 0; if ((t0=OnTrack(&p, FALSE, TRUE)) != NULL) { ep0 = PickEndPoint(p, t0); - if (GetTrkEndTrk(t0,ep0) != NULL) { + if (ep0 < 0 || GetTrkEndTrk(t0,ep0) != NULL) { t0 = NULL; } else { p = GetTrkEndPos(t0, ep0); @@ -214,7 +212,7 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) p = p1; if ((t1=OnTrack(&p, FALSE, TRUE)) != NULL) { ep1 = PickEndPoint(p, t1); - if (GetTrkEndTrk(t1,ep1) != NULL) { + if (ep1 < 0 || GetTrkEndTrk(t1,ep1) != NULL) { t1 = NULL; } else { p = GetTrkEndPos(t1, ep1); @@ -296,8 +294,8 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) EXPORT void InitCmdParallel( wMenu_p menu ) { ButtonGroupBegin( _("Parallel"), "cmdParallelSetCmd", _("Parallel") ); - AddMenuButton( menu, CmdParallel, "cmdParallelTrack", _("Parallel Track"), wIconCreatePixMap(parallel_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, (void*)0 ); - AddMenuButton( menu, CmdParallel, "cmdParallelLine", _("Parallel Line"), wIconCreatePixMap(parallel_line_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, (void*)1 ); + AddMenuButton( menu, CmdParallel, "cmdParallelTrack", _("Parallel Track"), wIconCreatePixMap(parallel_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(0) ); + AddMenuButton( menu, CmdParallel, "cmdParallelLine", _("Parallel Line"), wIconCreatePixMap(parallel_line_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(1) ); ButtonGroupEnd(); ParamRegister( &parSepPG ); } diff --git a/app/bin/cprint.c b/app/bin/cprint.c index 066e649..a8ae0c1 100644 --- a/app/bin/cprint.c +++ b/app/bin/cprint.c @@ -20,22 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <sys/types.h> -#include <time.h> -#include <string.h> -#include <ctype.h> -#include <math.h> -#include <stdbool.h> - #include "custom.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" #define PRINT_GAUDY (0) #define PRINT_PLAIN (1) @@ -57,13 +48,20 @@ static bitmap_t bm, bm0; #define BITMAP( BM, X, Y ) \ (BM).bm[ (X)-(BM).x0 + ((Y)-(BM).y0) * ((BM).x1-(BM).x0) ] -struct { +static struct { coOrd size; coOrd orig; ANGLE_T angle; } currPrintGrid, newPrintGrid; +EXPORT coOrd GetPrintOrig() { + return currPrintGrid.orig; +} + +EXPORT ANGLE_T GetPrintAngle() { + return currPrintGrid.angle; +} /* * GUI VARS */ @@ -104,7 +102,7 @@ static void PrintClear( void ); static void PrintMaxPageSize( void ); static void SelectAllPages(void); static void DoPrintMargin(void); -static bool PrintPageNumber( wPos_t x, wPos_t y, DIST_T width, DIST_T height ); +static bool PrintPageNumber( int x, int y, DIST_T width, DIST_T height ); static bool PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH); static char * printFormatLabels[] = { N_("Portrait"), N_("Landscape"), NULL }; @@ -114,25 +112,26 @@ static char * printRegistrationMarksLabels[] = { N_("Registration Marks (in 1:1 static char * printPageNumberLabels[] = { N_("Page Numbers"), NULL }; static char * printPhysSizeLabels[] = { N_("Ignore Page Margins"), NULL }; static char * printGridLabels[] = { N_("Snap Grid"), NULL }; -static char * printRulerLabels[] = { N_("Rulers"), NULL }; +static char * printRulerLabels[] = { N_("Layout Edge"), N_("Every Page"), N_("None"), NULL }; static char * printRoadbedLabels[] = { N_("Roadbed Outline"), NULL }; static char * printCenterLineLabels[] = { N_("Centerline below Scale 1:1"), NULL }; static paramIntegerRange_t rminScale_999 = { 1, 999, 0, PDO_NORANGECHECK_HIGH }; static paramFloatRange_t r0_ = { 0, 0, 0, PDO_NORANGECHECK_HIGH }; -static paramFloatRange_t r1_ = { 1, 0, 0, PDO_NORANGECHECK_HIGH }; -static paramFloatRange_t r_10_99999 = { -10, 99999, 0, PDO_NORANGECHECK_HIGH }; +static paramFloatRange_t r1_pgsz_x = { 1, 0, 0, 0 }; +static paramFloatRange_t r1_pgsz_y = { 1, 0, 0, 0 }; +static paramFloatRange_t r_100_99999 = { -100, 99999, 0, PDO_NORANGECHECK_HIGH }; static paramFloatRange_t r0_360 = { 0, 360 }; static paramData_t printPLs[] = { -/*0*/ { PD_LONG, &iPrintScale, "scale", 0, &rminScale_999, N_("Print Scale"), 0, (void*)1 }, -/*1*/ { PD_FLOAT, &newPrintGrid.size.x, "pagew", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_, N_("Page Width"), 0, (void*)2 }, -/*2*/ { PD_BUTTON, (void*)PrintMaxPageSize, "max", PDO_DLGHORZ, NULL, N_("Max") }, -/*3*/ { PD_FLOAT, &newPrintGrid.size.y, "pageh", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_, N_("Height"), 0, (void*)2 }, -/*4*/ { PD_BUTTON, (void*)PrintSnapShot, "snapshot", PDO_DLGHORZ, NULL, N_("Snap Shot") }, -/*5*/ { PD_RADIO, &printFormat, "format", 0, printFormatLabels, N_("Page Format"), BC_HORZ|BC_NOBORDER, (void*)1 }, +/*0*/ { PD_LONG, &iPrintScale, "scale", 0, &rminScale_999, N_("Print Scale"), 0, I2VP(1) }, +/*1*/ { PD_FLOAT, &newPrintGrid.size.x, "pagew", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_x, N_("Page Width"), 0, I2VP(2) }, +/*2*/ { PD_BUTTON, PrintMaxPageSize, "max", PDO_DLGHORZ, NULL, N_("Max") }, +/*3*/ { PD_FLOAT, &newPrintGrid.size.y, "pageh", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_y, N_("Height"), 0, I2VP(2) }, +/*4*/ { PD_BUTTON, PrintSnapShot, "snapshot", PDO_DLGHORZ, NULL, N_("Snap Shot") }, +/*5*/ { PD_RADIO, &printFormat, "format", 0, printFormatLabels, N_("Page Format"), BC_HORZ|BC_NOBORDER, I2VP(1) }, /*6*/ { PD_RADIO, &printOrder, "order", PDO_DLGBOXEND, printOrderLabels, N_("Print Order"), BC_HORZ|BC_NOBORDER }, -/*7*/ { PD_MESSAGE, N_("Print "), NULL, PDO_DLGRESETMARGIN| PDO_DLGNOLABELALIGN, (void*)0 }, -/*8*/ { PD_TOGGLE, &printGaudy, "style", PDO_DLGNOLABELALIGN, printGaudyLabels, NULL, BC_HORZ|BC_NOBORDER, (void*)1 }, +/*7*/ { PD_MESSAGE, N_("Print "), NULL, PDO_DLGRESETMARGIN| PDO_DLGNOLABELALIGN, I2VP(0) }, +/*8*/ { PD_TOGGLE, &printGaudy, "style", PDO_DLGNOLABELALIGN, printGaudyLabels, NULL, BC_HORZ|BC_NOBORDER, I2VP(1) }, #define I_REGMARKS (9) /*9*/ { PD_TOGGLE, &printRegistrationMarks, "registrationMarks", PDO_DLGNOLABELALIGN, printRegistrationMarksLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_PAGENUMBERS (10) @@ -140,28 +139,28 @@ static paramData_t printPLs[] = { #define I_GRID (11) /*11*/ { PD_TOGGLE, &printGrid, "grid", PDO_DLGNOLABELALIGN, printGridLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_RULER (12) -/*12*/ { PD_TOGGLE, &printRuler, "ruler", PDO_DLGNOLABELALIGN, printRulerLabels, NULL, BC_HORZ|BC_NOBORDER }, +/*12*/ { PD_RADIO, &printRuler, "ruler", 0, printRulerLabels, N_("Rulers:"), BC_HORZ|BC_NOBORDER }, #define I_CENTERLINE (13) /*13*/ { PD_TOGGLE, &printCenterLine, "centerLine", PDO_DLGNOLABELALIGN, printCenterLineLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_ROADBED (14) /*14*/{ PD_TOGGLE, &printRoadbed, "roadbed", PDO_DLGNOLABELALIGN, printRoadbedLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_ROADBEDWIDTH (15) /*15*/{ PD_FLOAT, &printRoadbedWidth, "roadbedWidth", PDO_DIM , &r0_, N_(" Width") }, -/*16*/ { PD_TOGGLE, &printPhysSize, "physsize", PDO_DLGNOLABELALIGN, printPhysSizeLabels, NULL, BC_HORZ | BC_NOBORDER, (void*)1 }, -/*17*/ { PD_BUTTON, (void*)DoPrintMargin, "margin", PDO_DLGHORZ|PDO_DLGBOXEND, NULL, N_("Margins") }, -/*18*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_10_99999, N_("Origin: X"), 0, (void*)2 }, -/*19*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_10_99999, N_("Y"), 0, (void*)2 }, -/*20*/ { PD_BUTTON, (void*)DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, -/*21*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, (void*)2 }, -/*22*/ { PD_BUTTON, (void*)DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, -/*23*/ { PD_BUTTON, (void*)SelectAllPages, "selall", 0, NULL, N_("Select All") }, -/*24*/ { PD_BUTTON, (void*)PrintClear, "clear", 0, NULL, N_("Clear") }, +/*16*/ { PD_TOGGLE, &printPhysSize, "physsize", PDO_DLGNOLABELALIGN, printPhysSizeLabels, NULL, BC_HORZ | BC_NOBORDER, I2VP(1) }, +/*17*/ { PD_BUTTON, DoPrintMargin, "margin", PDO_DLGHORZ|PDO_DLGBOXEND, NULL, N_("Margins") }, +/*18*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_100_99999, N_("Origin: X"), 0, I2VP(2) }, +/*19*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_100_99999, N_("Y"), 0, I2VP(2) }, +/*20*/ { PD_BUTTON, DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, +/*21*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, I2VP(2) }, +/*22*/ { PD_BUTTON, DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, +/*23*/ { PD_BUTTON, SelectAllPages, "selall", 0, NULL, N_("Select All") }, +/*24*/ { PD_BUTTON, PrintClear, "clear", 0, NULL, N_("Clear") }, #define I_PAGECNT (25) -/*25*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, (void*)80 }, -/*26*/ { PD_MESSAGE, N_("selected"), NULL, 0, (void*)80 } +/*25*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, I2VP(80) }, +/*26*/ { PD_MESSAGE, N_("selected"), NULL, 0, I2VP(80) } }; -static paramGroup_t printPG = { "print", PGO_PREFMISCGROUP, printPLs, sizeof printPLs/sizeof printPLs[0] }; +static paramGroup_t printPG = { "print", PGO_PREFMISCGROUP, printPLs, COUNT( printPLs ) }; static struct { double top, right, bottom, left; @@ -416,8 +415,8 @@ static void PrintGaudyBox( static void PrintPlainBox( - wPos_t x, - wPos_t y, + int x, + int y, coOrd *corners ) { coOrd p00, p01, p10, p11; @@ -507,11 +506,6 @@ static void PrintUpdate( int inx0 ) ParamLoadData( &printPG ); - if (newPrintGrid.size.x > maxPageSize.x+0.01 || - newPrintGrid.size.y > maxPageSize.y+0.01) { - NoticeMessage( MSG_PRINT_MAX_SIZE, _("Ok"), NULL, - FormatSmallDistance(maxPageSize.x), FormatSmallDistance(maxPageSize.y) ); - } if (newPrintGrid.size.x > maxPageSize.x) { newPrintGrid.size.x = maxPageSize.x; ParamLoadControl( &printPG, 1 ); @@ -521,8 +515,8 @@ static void PrintUpdate( int inx0 ) ParamLoadControl( &printPG, 3 ); } currPrintGrid = newPrintGrid; - for ( inx = 0; inx < sizeof printPLs/sizeof printPLs[0]; inx++ ) { - if ( inx != inx0 && printPLs[inx].context == (void*)2 ) + for ( inx = 0; inx < COUNT( printPLs ); inx++ ) { + if ( inx != inx0 && printPLs[inx].context == I2VP(2) ) ParamLoadControl( &printPG, inx ); } ChangeDim(); @@ -554,6 +548,8 @@ static void SetPageSize( BOOL_T doScale ) maxPageSize.x *= printScale; maxPageSize.y *= printScale; } + r1_pgsz_x.high = maxPageSize.x+0.0001; + r1_pgsz_y.high = maxPageSize.y+0.0001; } /** @@ -617,8 +613,8 @@ static paramData_t printMarginPLs[] = { #define I_PM_MESSAGE (4) { PD_MESSAGE, NULL, NULL, 0, NULL }, #define I_PM_RESET (5) - { PD_BUTTON, (void*) PrintMarginReset, "marginReset", PDO_DLGCMDBUTTON, NULL, N_("Reset") } }; -static paramGroup_t printMarginPG = { "printMargin", PGO_PREFMISCGROUP|PGO_NODEFAULTPROC, printMarginPLs, sizeof printMarginPLs/sizeof printMarginPLs[0] }; + { PD_BUTTON, PrintMarginReset, "marginReset", PDO_DLGCMDBUTTON, NULL, N_("Reset") } }; +static paramGroup_t printMarginPG = { "printMargin", PGO_PREFMISCGROUP|PGO_NODEFAULTPROC, printMarginPLs, COUNT( printMarginPLs ) }; static wLines_t aPmLines[] = { { 1, 25, 11, 94, 11 }, @@ -631,9 +627,9 @@ static int pmyoff=5; static void PrintMarginLayout( paramData_t * pd, int index, - wPos_t colX, - wPos_t * w, - wPos_t * h ) + wWinPix_t colX, + wWinPix_t * w, + wWinPix_t * h ) { if ( index < I_PM_FIRST || index > (I_PM_MESSAGE) ) return; @@ -641,7 +637,7 @@ static void PrintMarginLayout( *h = wControlGetPosY( printMarginPLs[I_PM_FIRST+2].control ) + wControlGetHeight( printMarginPLs[I_PM_FIRST+2].control ); return; } - wPos_t x0, y0; + wWinPix_t x0, y0; x0 = (aPmLines[index-I_PM_FIRST].x0+aPmLines[index-I_PM_FIRST].x1)/2; y0 = (aPmLines[index-I_PM_FIRST].y0+aPmLines[index-I_PM_FIRST].y1)/2; x0 -= pmxoff; @@ -690,8 +686,8 @@ static void DoPrintMarginOk( void * context ) sprintf( message, "%s-marginL", sPrinterName ); wPrefSetFloat( "printer", message, printMargin.left ); SetPageSize( TRUE ); - for ( int inx = 0; inx < sizeof printPLs/sizeof printPLs[0]; inx++ ) { - if ( printPLs[inx].context == (void*)2 ) + for ( int inx = 0; inx < COUNT( printPLs ); inx++ ) { + if ( printPLs[inx].context == I2VP(2) ) ParamLoadControl( &printPG, inx ); } DoPrintScale(); @@ -719,17 +715,17 @@ static void DoPrintMargin( void ) DoPrintSetup(); } if ( printMarginWin == NULL ) { - wPos_t x=10, y=10; + int x=10, y=10; printMarginWin = ParamCreateDialog( &printMarginPG, MakeWindowTitle(_("Print Margins")), _("Ok"), DoPrintMarginOk, NULL, TRUE, PrintMarginLayout, F_BLOCK, PrintMarginDlgUpdate ); if ( printMarginWin == NULL ) return; - for ( int i=0; i<sizeof aPmLines / sizeof aPmLines[0]; i++ ) { + for ( int i=0; i<COUNT( aPmLines ); i++ ) { aPmLines[i].x0 += x; aPmLines[i].x1 += x; aPmLines[i].y0 += y; aPmLines[i].y1 += y; } - wLineCreate( printMarginWin, NULL, sizeof aPmLines / sizeof aPmLines[0], aPmLines ); + wLineCreate( printMarginWin, NULL, COUNT( aPmLines ), aPmLines ); } wMessageSetValue( (wMessage_p)printMarginPLs[I_PM_MESSAGE].control, sPrinterName ); // Enable Reset button if we've changed anything @@ -794,8 +790,8 @@ static void PrintSnapShot( void ) scaleH = 1; for (i=0;i<3;i++) { size = mapD.size; - size.x += 0.75*scaleH; - size.y += 0.75*scaleH; + size.x += 2*0.5*scaleH; + size.y += 2*0.5*scaleH; if (printGaudy) size.y += 1.0*scaleH; scaleX = size.x/pageSize.x; @@ -806,8 +802,8 @@ static void PrintSnapShot( void ) scaleV = 1; for (i=0;i<3;i++) { size = mapD.size; - size.x += 0.75*scaleV; - size.y += 0.75*scaleV; + size.x += 2*0.5*scaleV; + size.y += 2*0.5*scaleV; if (printGaudy) size.y += 1.0*scaleV; scaleX = size.x/pageSize.y; @@ -830,8 +826,8 @@ static void PrintSnapShot( void ) currPrintGrid.orig.y = maxPageSize.x-0.5*printScale; currPrintGrid.angle = 90.0; } else {*/ - currPrintGrid.orig.x = -0.5*printScale; - currPrintGrid.orig.y = -0.5*printScale; + currPrintGrid.orig.x = -0.5*printScale; //Bigger rulers + currPrintGrid.orig.y = -0.5*printScale; //Bigger rules currPrintGrid.angle = 0.0; /* }*/ currPrintGrid.size = maxPageSize; @@ -854,7 +850,7 @@ static void DrawRegistrationMarks( drawCmd_p d ) long x, y, delta, divisor; coOrd p0, p1, qq, q0, q1; POS_T len; - char msg[10]; + char msg[STR_SIZE]; wFont_p fp; wFontSize_t fs; fp = wStandardFont( F_TIMES, FALSE, FALSE ); @@ -921,7 +917,9 @@ FormatPageNumber(int x, int y) char *result; DynStringMalloc(&formatted, 16); - if (x > 0 && x <= bm.x1 && y > 0 && y <= bm.y1) { + x -= bm.x0-1; + y -= bm.y0-1; + if (x > 0 && x <= bm.x1-bm.x0 && y > 0 && y <= bm.y1-bm.y0) { DynStringPrintf(&formatted, "(%d/%d)", x, y); } else { DynStringCatCStr(&formatted, "(-/-)"); @@ -944,7 +942,7 @@ FormatPageNumber(int x, int y) */ static bool -PrintPageNumber(wPos_t x, wPos_t y, DIST_T width, DIST_T height) +PrintPageNumber(int x, int y, DIST_T width, DIST_T height) { coOrd printPosition; coOrd textSize; @@ -953,23 +951,26 @@ PrintPageNumber(wPos_t x, wPos_t y, DIST_T width, DIST_T height) wFont_p fp = wStandardFont(F_HELV, TRUE, FALSE); wFontSize_t fs = 64.0; - positionText = FormatPageNumber(x + 1, y + 1); + positionText = FormatPageNumber(x, y); - // even though we're printing into page_d, mainD must be used here - DrawTextSize(&mainD, positionText, fp, fs, TRUE, &textSize); + if (strcmp(positionText,"(-/-)") != 0) { + // even though we're printing into page_d, mainD must be used here + DrawTextSize(&mainD, positionText, fp, fs, TRUE, &textSize); - if (printFormat == PORTRAIT) { - printPosition.x = (width - textSize.x) / 2; - printPosition.y = (height - textSize.y) / 2; - } else { - printPosition.x = (height - textSize.x) / 2; - printPosition.y = (width - textSize.y) / 2; - } + if (printFormat == PORTRAIT) { + printPosition.x = (width - textSize.x) / 2; + printPosition.y = (height - textSize.y) / 2; + } else { + printPosition.x = (height - textSize.x) / 2; + printPosition.y = (width - textSize.y) / 2; + } - page_d.funcs->options |= wDrawOutlineFont; - DrawString(&page_d, printPosition, 0.0, positionText, fp, fs, - wDrawColorGray(70)); - page_d.funcs->options &= ~wDrawOutlineFont; + unsigned long options = page_d.options; + page_d.options |= DC_OUTLINE; + DrawString(&page_d, printPosition, 0.0, positionText, fp, fs, + wDrawColorGray(70)); + page_d.options = options; + } free(positionText); @@ -992,7 +993,9 @@ PrintNextPageNumberAt(int x, int y, coOrd position) wFontSize_t fs = 8.0; pageNumber = FormatPageNumber(x, y); - DrawString(&page_d, position, 0.0, pageNumber, fp, fs, wDrawColorBlack); + //Suppress garbage page numbers + if (strcmp(pageNumber,"(-/-)") != 0) + DrawString(&page_d, position, 0.0, pageNumber, fp, fs, wDrawColorBlack); free(pageNumber); } @@ -1020,7 +1023,7 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) p00.x = pageH / 2.0 - 20.0 / 72.0; p00.y = pageW - 10.0 / 72.0; } - PrintNextPageNumberAt(x + 1, y + 2, p00); + PrintNextPageNumberAt(x, y + 1, p00); // below if (printFormat == PORTRAIT) { @@ -1028,7 +1031,7 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) } else { p00.y = 10.0 / 72.0; } - PrintNextPageNumberAt(x + 1, y, p00); + PrintNextPageNumberAt(x, y-1, p00); // right if (printFormat == PORTRAIT) { @@ -1038,7 +1041,7 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) p00.y = pageW / 2 + 10.0 / 72.0; p00.x = pageH - 20.0 / 72.0; } - PrintNextPageNumberAt(x + 2, y + 1, p00); + PrintNextPageNumberAt(x+1, y, p00); // left if (printFormat == PORTRAIT) { @@ -1046,7 +1049,7 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) } else { p00.x = 10.0 / 72.0; } - PrintNextPageNumberAt(x, y + 1, p00); + PrintNextPageNumberAt(x-1, y, p00); return (TRUE); } @@ -1142,22 +1145,31 @@ static BOOL_T PrintPage( } } if (printRotate) { - wPrintClip( (wPos_t)(clipOrig.y*print_d.dpi), (wPos_t)(clipOrig.x*print_d.dpi), - (wPos_t)(clipSize.y*print_d.dpi), (wPos_t)(clipSize.x*print_d.dpi) ); + wPrintClip( (clipOrig.y*print_d.dpi), (clipOrig.x*print_d.dpi), + (clipSize.y*print_d.dpi), (clipSize.x*print_d.dpi) ); } else { - wPrintClip( (wPos_t)(clipOrig.x*print_d.dpi), (wPos_t)(clipOrig.y*print_d.dpi), - (wPos_t)(clipSize.x*print_d.dpi), (wPos_t)(clipSize.y*print_d.dpi) ); + wPrintClip( (clipOrig.x*print_d.dpi), (clipOrig.y*print_d.dpi), + (clipSize.x*print_d.dpi), (clipSize.y*print_d.dpi) ); } p[0].x = p[3].x = 0.0; p[1].x = p[2].x = roomSize.x; p[0].y = p[1].y = 0.0; p[2].y = p[3].y = roomSize.y; - DrawRuler( &print_d, p[0], p[1], 0.0, TRUE, FALSE, wDrawColorBlack ); - DrawRuler( &print_d, p[0], p[3], 0.0, TRUE, TRUE, wDrawColorBlack ); - DrawRuler( &print_d, p[1], p[2], 0.0, FALSE, FALSE, wDrawColorBlack ); - DrawRuler( &print_d, p[3], p[2], 0.0, FALSE, TRUE, wDrawColorBlack ); - if ( printRuler && currPrintGrid.angle == 0 ) { + BOOL_T left_clear = FALSE, right_clear = FALSE, base_clear = FALSE, top_clear = FALSE; + + if (currPrintGrid.orig.x <= -0.5*printScale) left_clear = TRUE; + if (currPrintGrid.orig.y <= -0.5*printScale) base_clear = TRUE; + if (clipOrig.x + clipSize.x > roomSize.x + 0.5*printScale) right_clear = TRUE; + if (clipOrig.y + clipSize.y > roomSize.y + 0.5*printScale) top_clear = TRUE; + + if (printRuler != 2) { /* Not None so Edge or Every */ + DrawRuler( &print_d, p[0], p[1], 0.0, TRUE, !base_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[0], p[3], 0.0, TRUE, left_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[1], p[2], 0.0, TRUE, right_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[3], p[2], 0.0, TRUE, !top_clear, wDrawColorBlack ); + } + if ( printRuler==1 && currPrintGrid.angle == 0 ) { /* Every Page and not rotated origin */ if ( !printRotate ) { p[2] = p[3] = print_d.orig; p[3].x += print_d.size.x; @@ -1174,47 +1186,51 @@ static BOOL_T PrintPage( p[3].y = print_d.orig.y; } if ( p[2].x > 0 ) - minP.x = p[2].x + 0.4 * print_d.scale; + minP.x = p[2].x + 0.5 * print_d.scale; else minP.x = 0.0; if ( p[3].x < roomSize.x ) - maxP.x = p[3].x - 0.2 * print_d.scale; + maxP.x = p[3].x - 0.5 * print_d.scale; else maxP.x = roomSize.x; - if ( p[2].y > 0 ) - minP.y = p[2].y + 0.4 * print_d.scale; + if ( p[2].y > 0 ) + minP.y = p[2].y + 0.5 * print_d.scale; else minP.y = 0.0; if ( p[3].y < roomSize.y ) - maxP.y = p[3].y - 0.2 * print_d.scale; + maxP.y = p[3].y - 0.5 * print_d.scale; else maxP.y = roomSize.y; p[0].y = 0.0; p[1].y = maxP.y - minP.y; - if ( p[2].x > 0 ) { - p[0].x = p[1].x = p[2].x + 0.4 * print_d.scale; + if ( p[2].x > 0.5* print_d.scale ) { + p[0].x = p[1].x = p[2].x + 0.5* print_d.scale; DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, TRUE, wDrawColorBlack ); } - if ( p[3].x < roomSize.x ) { - p[0].x = p[1].x = p[3].x - 0.2 * print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.y, FALSE, FALSE, wDrawColorBlack ); + if ( p[3].x < roomSize.x - 0.5 * print_d.scale ) { + p[0].x = p[1].x = p[3].x - 0.5 * print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, FALSE, wDrawColorBlack ); } p[0].x = 0; p[1].x = maxP.x - minP.x; - if ( p[2].y > 0 ) { - p[0].y = p[1].y = p[2].y + 0.4 * print_d.scale; + if ( p[2].y > 0.5 * print_d.scale ) { + p[0].y = p[1].y = p[2].y + 0.5 * print_d.scale; DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, FALSE, wDrawColorBlack ); } - if ( p[3].y < roomSize.y ) { - p[0].y = p[1].y = p[3].y - 0.2 * print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.x, FALSE, TRUE, wDrawColorBlack ); + if ( p[3].y < roomSize.y - 0.5 * print_d.scale) { + p[0].y = p[1].y = p[3].y - 0.5 * print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, TRUE, wDrawColorBlack ); } } if (printGrid) DrawSnapGrid( &print_d, mapD.size, FALSE ); roadbedWidth = printRoadbed?printRoadbedWidth:0.0; - printCenterLines = printCenterLine; + if (printCenterLine) { + print_d.options |= DC_CENTERLINE; + } else { + print_d.options &= ~DC_CENTERLINE; + } DrawTracks( &print_d, print_d.scale, minP, maxP ); if (printRegistrationMarks && printScale == 1) DrawRegistrationMarks( &print_d ); @@ -1296,7 +1312,7 @@ static void DoResetGrid( void ) static void PrintGridRotate( void * pangle ) { - ANGLE_T angle = (ANGLE_T)(long)pangle; + ANGLE_T angle = (ANGLE_T)VP2L(pangle); currPrintGrid.orig = cmdMenuPos; currPrintGrid.angle += angle/1000; newPrintGrid = currPrintGrid; @@ -1330,9 +1346,9 @@ static void PrintDlgUpdate( void * valueP ) { if ( inx < 0 ) return; - if ( pg->paramPtr[inx].context == (void*)1 ) + if ( pg->paramPtr[inx].context == I2VP(1) ) DoPrintScale(); - else if ( pg->paramPtr[inx].context == (void*)2 ) + else if ( pg->paramPtr[inx].context == I2VP(2) ) PrintUpdate( inx ); ParamControlActive( &printPG, I_RULER, currPrintGrid.angle == 0 ); TempRedraw(); // PrintDlgUpdate @@ -1474,6 +1490,9 @@ LOG( log_print, 2, ( "Page size = %0.3f %0.3f\n", currPrintGrid.size.x, currPrin } } + +#include "bitmaps/doc-print.xpm" + EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) { ParamRegister( &printPG ); @@ -1483,7 +1502,7 @@ EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) printGridPopupM = MenuRegister( "Print Grid Rotate" ); AddRotateMenu( printGridPopupM, PrintGridRotate ); ParamRegister( &printMarginPG ); - return InitCommand( menu, CmdPrint, N_("Print..."), NULL, LEVEL0, IC_LCLICK|IC_POPUP3|IC_CMDMENU, ACCL_PRINT ); + return AddMenuButton( menu, CmdPrint, "cmdPrint", N_("Print..."), wIconCreatePixMap(doc_print_xpm[iconSize]), LEVEL0, IC_LCLICK|IC_POPUP3|IC_CMDMENU, ACCL_PRINT, NULL ); } /***************************************************************************** @@ -1495,10 +1514,6 @@ EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) wDrawable_t printD, mainD; -void wDrawHilight( void * d, coOrd orig, coOrd size ) -{ - lprintf( "wDrawHilight (%0.3f %0.3f) (%0.3f %0.3f)\n", orig.x, orig.y, size.x, size.y ); -} void PrintPage( void * d, wIndex_t mode , wIndex_t x, wIndex_t y ) { lprintf( "printPage %dx%d at (%0.3f %0.3f)\n", x, y, orig.x, orig.y ); @@ -1563,7 +1578,7 @@ main( INT_T argc, char * argv[] ) mapD.size.x = 4*12; mapD.size.y = 3*12; printD.scale = 1.0; - for (i=0; i<(sizeof cmds)/(sizeof cmds[0]); i++) { + for (i=0; i<COUNT( cmds ); i++) { switch (cmds[i].cmd) { case C_START: CmdPrint( cmds[i].cmd ); diff --git a/app/bin/cprofile.c b/app/bin/cprofile.c index 4f375ed..433e1d5 100644 --- a/app/bin/cprofile.c +++ b/app/bin/cprofile.c @@ -20,18 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <stdbool.h> - #include "custom.h" #include "cselect.h" #include "cundo.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "shrtpath.h" #include "track.h" +#include "common-ui.h" /* @@ -268,7 +264,7 @@ static void DrawProfile(drawCmd_p D, wFontSize_t fontSize, BOOL_T printVert) DYNARR_APPEND(pts_t, points_da, 10); pb.x = 0; points(points_da.cnt-1) = pb; - DrawPoly(D, points_da.cnt, points_da.ptr, NULL, profileColorFill, 1, 1, 0); + DrawPoly(D, points_da.cnt, points_da.ptr, NULL, profileColorFill, 1, DRAW_FILL); } pt.y = prof.minE-(2*LABELH+3.0/mainD.dpi)/prof.scaleY*D->scale; @@ -386,8 +382,8 @@ static void DrawProfile(drawCmd_p D, wFontSize_t fontSize, BOOL_T printVert) -static void ProfilePix2CoOrd(drawCmd_p, wPos_t, wPos_t, coOrd *); -static void ProfileCoOrd2Pix(drawCmd_p, coOrd, wPos_t*, wPos_t*); +static void ProfilePix2CoOrd(drawCmd_p, wDrawPix_t, wDrawPix_t, coOrd *); +static void ProfileCoOrd2Pix(drawCmd_p, coOrd, wDrawPix_t*, wDrawPix_t*); static drawCmd_t screenProfileD = { NULL, &screenDrawFuncs, @@ -400,8 +396,8 @@ static drawCmd_t screenProfileD = { static void ProfilePix2CoOrd( drawCmd_p d, - wPos_t xx, - wPos_t yy, + wDrawPix_t xx, + wDrawPix_t yy, coOrd * pos) { pos->x = (xx/d->dpi+d->orig.x)/prof.scaleX; @@ -412,12 +408,12 @@ static void ProfilePix2CoOrd( static void ProfileCoOrd2Pix( drawCmd_p d, coOrd pos, - wPos_t *xx, - wPos_t *yy) + wDrawPix_t *xx, + wDrawPix_t *yy) { - wPos_t x, y; - x = (wPos_t)((((pos.x*prof.scaleX)/d->scale-d->orig.x)*d->dpi+0.5)); - y = (wPos_t)(((((pos.y-prof.minE)*prof.scaleY)/d->scale-d->orig.y)*d->dpi+0.5)); + wDrawPix_t x, y; + x = ((((pos.x*prof.scaleX)/d->scale-d->orig.x)*d->dpi+0.5)); + y = (((((pos.y-prof.minE)*prof.scaleY)/d->scale-d->orig.y)*d->dpi+0.5)); if (d->angle == 0) { *xx = x; *yy = y; @@ -436,9 +432,9 @@ static void ProfileCoOrd2Pix( * Redraw profile window */ -static void RedrawProfileW(void) +static void RedrawProfileW( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ) { - wPos_t ww, hh; + wWinPix_t ww, hh; coOrd size; int divC; DIST_T maxE, rngE; @@ -676,10 +672,7 @@ static void DoProfilePrint(void * junk) p[1].x = p[2].x = PRINT_ABS2PAGEX(size.x+(printVert?PBR( printProfileFontSize)/4.0:PBR(printProfileFontSize))); p[2].y = p[3].y = PRINT_ABS2PAGEY(size.y+(printVert?PBT*2:PBT)); - DrawLine(&printProfileD, p[0], p[1], 0, drawColorBlack); - DrawLine(&printProfileD, p[1], p[2], 0, drawColorBlack); - DrawLine(&printProfileD, p[2], p[3], 0, drawColorBlack); - DrawLine(&printProfileD, p[3], p[0], 0, drawColorBlack); + DrawPoly( &printProfileD, 4, p, NULL, drawColorBlack, 0, DRAW_CLOSED ); DrawProfile(&printProfileD, printProfileFontSize, printVert); wPrintPageEnd(printProfileD.d); @@ -697,28 +690,28 @@ static wWin_p profileW; static BOOL_T profileUndo = FALSE; static void DoProfileChange(void *junk); static void DoProfileReset(void *junk); -static void DoProfileDone(void *); -static void DoProfileClear(void *); -static void DoProfilePrint(void *); -static void DoProfileChangeMode(void *); +static void DoProfileDone(void * junk); +static void DoProfileClear(void * junk); +static void DoProfilePrint(void * junk); +static void DoProfileChangeMode(void * junk); static void SelProfileW(wIndex_t, coOrd); static void CloseProfileWindow(paramGroup_p pg, int event, void *data); -static paramDrawData_t profileDrawData = { 300, 150, (wDrawRedrawCallBack_p)RedrawProfileW, SelProfileW, &screenProfileD }; +static paramDrawData_t profileDrawData = { 300, 150, RedrawProfileW, SelProfileW, &screenProfileD }; static paramData_t profilePLs[] = { { PD_DRAW, NULL, "canvas", PDO_DLGRESIZE, &profileDrawData }, #define I_PROFILEMSG (1) - { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, (void*)300 }, + { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, I2VP(300) }, #define I_CHANGEBUTTON 2 - { PD_BUTTON, (void*)DoProfileChange, "change", PDO_DLGCMDBUTTON, NULL, N_("Change") }, + { PD_BUTTON, DoProfileChange, "change", PDO_DLGCMDBUTTON, NULL, N_("Change") }, #define I_RESETBUTTON 3 - { PD_BUTTON, (void*)DoProfileReset, "reset", PDO_DLGCMDBUTTON, NULL, N_("Reset") }, + { PD_BUTTON, DoProfileReset, "reset", PDO_DLGCMDBUTTON, NULL, N_("Reset") }, #define I_CLEARBUTTON 4 - { PD_BUTTON, (void*)DoProfileClear, "clear", PDO_DLGCMDBUTTON, NULL, N_("Clear") }, + { PD_BUTTON, DoProfileClear, "clear", PDO_DLGCMDBUTTON, NULL, N_("Clear") }, #define I_PRINTBUTTON 5 - { PD_BUTTON, (void*)DoProfilePrint, "print", 0, NULL, N_("Print") } + { PD_BUTTON, DoProfilePrint, "print", 0, NULL, N_("Print") } }; -static paramGroup_t profilePG = { "profile", 0, profilePLs, sizeof profilePLs/sizeof profilePLs[0] }; +static paramGroup_t profilePG = { "profile", 0, profilePLs, COUNT( profilePLs ) }; #define CHANGEBUTTON ((wButton_p)profilePLs[I_CHANGEBUTTON].control) #define RESETBUTTON ((wButton_p)profilePLs[I_RESETBUTTON].control) @@ -742,6 +735,9 @@ static void SelProfileW( elev = pos.y; switch (action&0xFF) { + case C_START: + profileUndo = FALSE; + break; case C_DOWN: for (inx=0; inx<profElem_da.cnt; inx++) { if (dist <= profElem(inx).dist) { @@ -757,7 +753,7 @@ static void SelProfileW( sprintf(message, _("Elev = %0.1f"), round(PutDim(elev)*10.0)/10.0); ParamLoadMessage(&profilePG, I_PROFILEMSG, message); oldElev = elev; - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); break; case C_MOVE: if (inx < 0) { @@ -786,7 +782,7 @@ static void SelProfileW( ParamLoadMessage(&profilePG, I_PROFILEMSG, message); oldElev = elev; profElem(inx).elev = oldElev; - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); wPause(500l); break; case C_UP: @@ -799,7 +795,7 @@ static void SelProfileW( oldElev, NULL); } profElem(inx).elev = oldElev; - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); inx = -1; break; @@ -864,7 +860,7 @@ DoProfileReset(void *junk) UndoStart(_("Profile Command"), "Profile"); } ResetChanges(); - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); TempRedraw(); } @@ -895,7 +891,7 @@ static void DoProfileClear(void * junk) station_da.cnt = 0; ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); pathStartTrk = pathEndTrk = NULL; - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); } @@ -1371,7 +1367,7 @@ static void ProfileSelect(track_p trkN, EPINX_T epN) ComputeProfElem(); CreateCopyProfileElements(); - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); DoProfileChangeMode(NULL); if (log_profile>=1) { lprintf(" = "); @@ -1383,9 +1379,9 @@ static void ProfileSelect(track_p trkN, EPINX_T epN) -static void ProfileSubCommand(wBool_t set, void* pcmd) +static void ProfileSubCommand(void* pcmd) { - long cmd = (long)pcmd; + long cmd = VP2L(pcmd); int mode; coOrd pos = oldMarker; DIST_T elev; @@ -1425,7 +1421,7 @@ static void ProfileSubCommand(wBool_t set, void* pcmd) } UpdateTrkEndElev(profilePopupTrk, profilePopupEp, mode, elev, NULL); ComputeProfElem(); - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); TempRedraw(); // ProfileSubCommand } @@ -1454,7 +1450,7 @@ static STATUS_T CmdProfile(wAction_t action, coOrd pos) ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); profElem_da.cnt = 0; station_da.cnt = 0; - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); pathStartTrk = NULL; SetAllTrackSelect(FALSE); @@ -1514,7 +1510,7 @@ static STATUS_T CmdProfile(wAction_t action, coOrd pos) static void ProfileChange(long changes) { if ((changes & CHANGE_UNITS) && screenProfileD.d) { - RedrawProfileW(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); } } @@ -1526,14 +1522,14 @@ EXPORT void InitCmdProfile(wMenu_p menu) ParamRegister(&profilePG); AddMenuButton(menu, CmdProfile, "cmdProfile", _("Profile"), - wIconCreatePixMap(profile_xpm), LEVEL0_50, IC_LCLICK|IC_CMDMENU|IC_POPUP3, + wIconCreatePixMap(profile_xpm[iconSize]), LEVEL0_50, IC_LCLICK|IC_CMDMENU|IC_POPUP3, ACCL_PROFILE, NULL); profilePopupM = MenuRegister("Profile Mode"); profilePopupToggles[0] = wMenuToggleCreate(profilePopupM, "", _("Define"), 0, - FALSE, ProfileSubCommand, (void*)0); + FALSE, ProfileSubCommand, I2VP(0)); profilePopupToggles[1] = wMenuToggleCreate(profilePopupM, "", _("Ignore"), 0, - FALSE, ProfileSubCommand, (void*)1); + FALSE, ProfileSubCommand, I2VP(1)); profilePopupToggles[2] = wMenuToggleCreate(profilePopupM, "", _("None"), 0, - FALSE, ProfileSubCommand, (void*)2); + FALSE, ProfileSubCommand, I2VP(2)); RegisterChangeNotification(ProfileChange); } diff --git a/app/bin/cpull.c b/app/bin/cpull.c index 7f27864..afdf834 100644 --- a/app/bin/cpull.c +++ b/app/bin/cpull.c @@ -20,16 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "cselect.h" #include "compound.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "track.h" -#include "utility.h" +#include "draw.h" +#include "common-ui.h" int debugPull = 0; @@ -816,6 +813,8 @@ static STATUS_T CmdPull( return C_CONTINUE; case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if (anchors_da.cnt) DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); if (t1 && t_turn1) @@ -856,11 +855,13 @@ static STATUS_T CmdPull( -#include "bitmaps/pull.xpm" +#include "bitmaps/connect.xpm" wMenuPush_p pullConnectMultiple; -void pullMenuEnter(int key) { +void pullMenuEnter( void * keyVP ) +{ + int key = (int)VP2L(keyVP); int action; action = C_TEXT; action |= key<<8; @@ -869,7 +870,7 @@ void pullMenuEnter(int key) { void InitCmdPull( wMenu_p menu ) { - AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Two Tracks"), wIconCreatePixMap(pull_xpm), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_LCLICK|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, ACCL_CONNECT, NULL ); + AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Two Tracks"), wIconCreatePixMap(connect_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_LCLICK|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, ACCL_CONNECT, NULL ); pullPopupM = MenuRegister( "Connect Options" ); - pullConnectMultiple = wMenuPushCreate( pullPopupM, "", _("Connect All Selected - 'S'"), 0, (wMenuCallBack_p)pullMenuEnter, (void*) 'S'); + pullConnectMultiple = wMenuPushCreate( pullPopupM, "", _("Connect All Selected - 'S'"), 0, pullMenuEnter, I2VP('S') ); } diff --git a/app/bin/cruler.c b/app/bin/cruler.c index d3f2926..eb6a77d 100644 --- a/app/bin/cruler.c +++ b/app/bin/cruler.c @@ -21,11 +21,216 @@ */ #include "cundo.h" +#include "cselect.h" #include "fileio.h" -#include "i18n.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "misc.h" + +#define AN_OFF (0) +#define AN_FIRST (1) +#define AN_SECOND (2) +#define AN_ON (3) + + +static struct { + STATE_T state; + coOrd pos0; + coOrd pos1; + coOrd pos2; + BOOL_T isClose; + int modifyingEnd; + } An = { AN_OFF, { 0,0 }, { 0,0 } }; + + +void DrawAngle(drawCmd_p d, coOrd p0, coOrd p1, coOrd p2, wDrawColor color) { + char msg[512]; + trkSeg_t seg; + if ((An.state != AN_OFF) && !IsClose(FindDistance(p0,p1))) { + seg.type = SEG_STRLIN; + seg.width = 0; + seg.color = wDrawColorBlack; + seg.u.l.pos[0] = p0; + seg.u.l.pos[1] = p1; + DrawSegs(d,zero,0.0,&seg,1,trackGauge,color); + + if (!(IsClose(FindDistance(p0,p2)))) { + seg.type = SEG_STRLIN; + seg.width = 0; + seg.color = wDrawColorBlack; + seg.u.l.pos[0] = p0; + seg.u.l.pos[1] = p2; + DrawSegs(d,zero,0.0,&seg,1,trackGauge,color); + + DIST_T r = min(FindDistance(p0,p2),FindDistance(p0,p1))/2; + ANGLE_T a = DifferenceBetweenAngles(FindAngle(p0,p1),FindAngle(p0,p2)); + ANGLE_T a0; + + if (a>=0) + a0 = FindAngle(p0,p1); + else + a0 = FindAngle(p0,p2); + ANGLE_T a1 = fabs(DifferenceBetweenAngles(FindAngle(p0,p1),FindAngle(p0,p2))); + seg.type = SEG_CRVLIN; + seg.u.c.center = p0; + seg.u.c.radius = r; + seg.u.c.a0 = a0; + seg.u.c.a1 = a1; + DrawSegs(d,zero,0.0,&seg,1,trackGauge,color); + + coOrd p; + Translate(&p, p0, a1/2+a0, r ); + seg.type = SEG_TEXT; + seg.u.t.angle = 0.0; + sprintf(msg,"RA: %0.3f",a1); + seg.u.t.string = msg; + seg.u.t.pos = p; + seg.u.t.fontSize = 10.0*d->scale; + seg.u.t.fontP = NULL; + seg.u.t.boxed = FALSE; + DrawSegs(d,zero,0.0,&seg,1,trackGauge,color); + } + } + +} + + +static STATUS_T CmdAngle( wAction_t action, coOrd pos ) +{ + switch (action) { + + case C_START: + switch (An.state) { + case AN_OFF: + An.state = AN_ON; + break; + case AN_ON: + An.state = AN_OFF; + case AN_FIRST: + case AN_SECOND: + An.state = AN_OFF; + break; + } + return C_CONTINUE; + + case C_DOWN: + switch (An.state) { + case AN_OFF: + case AN_ON: + An.pos0 = An.pos1 = An.pos2 = pos; + An.state = AN_FIRST; + InfoMessage( "Drag out base line" ); + break; + case AN_FIRST: + An.pos2 = pos; + An.state = AN_SECOND; + InfoMessage( "Drag Angle" ); + break; + } + return C_CONTINUE; + + case C_MOVE: + //Lock to 90 degrees with CTRL + if (MyGetKeyState()&WKEY_CTRL) { + ANGLE_T line_angle; + if (An.state == AN_FIRST) line_angle = 0.0; + else line_angle = FindAngle(An.pos0,An.pos1); + DIST_T l = FindDistance(An.pos0, pos); + if (!IsClose(l)) { + ANGLE_T angle2 = NormalizeAngle(FindAngle(An.pos0, pos)-line_angle); + int oct = (int)((angle2 + 22.5) / 45.0); + l = fabs(l*cos(D2R(angle2-oct*45))); + Translate( &pos, An.pos0, oct*45.0+line_angle, l ); + } + } + switch (An.state) { + case AN_FIRST: + An.pos1 = An.pos2 = pos; + break; + case AN_SECOND: + An.pos2 = pos; + break; + default:; + } + if (An.state == AN_FIRST) + InfoMessage( "Base Angle %0.3f",FindAngle(An.pos0,An.pos1)); + if (An.state == AN_SECOND) + InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0,An.pos1), + fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0,An.pos2)))); + return C_CONTINUE; + + case C_UP: + if (An.state == AN_SECOND) return C_TERMINATE; + return C_CONTINUE; + + case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); + if (An.state != AN_OFF) { + if (!IsClose(FindDistance(An.pos1,An.pos2))) { + DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, wDrawColorBlack ); + } + } + return C_CONTINUE; + + case C_CANCEL: + return C_TERMINATE; + + } + return C_CONTINUE; + +} + +STATUS_T ModifyProtractor( + wAction_t action, + coOrd pos ) +{ + switch (action&0xFF) { + case C_DOWN: + An.modifyingEnd = -1; + An.isClose = FALSE; + if ( An.state == AN_OFF ) + return C_ERROR; + if ( IsClose(FindDistance( pos, An.pos0 ))) { + An.modifyingEnd = 0; + } else if ( IsClose(FindDistance( pos, An.pos1 ))) { + An.modifyingEnd = 1; + } else if ( IsClose(FindDistance( pos, An.pos2 ))) { + An.modifyingEnd = 2; + } else + return C_ERROR; + break; + case C_MOVE: + if ( An.modifyingEnd == 0 ) { + An.pos0 = pos; + } else if (An.modifyingEnd == 1) { + An.pos1 = pos; + } else if (An.modifyingEnd == 2) { + An.pos2 = pos; + } + InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0,An.pos1), + fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0,An.pos2)))); + return C_CONTINUE; + case C_UP: + return C_CONTINUE; + case C_REDRAW: + DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, An.isClose?wDrawColorBlue:wDrawColorBlack ); + break; + case wActionMove: + if ( IsClose(FindDistance( pos, An.pos0 )) || + IsClose(FindDistance( pos, An.pos1 )) || + IsClose(FindDistance( pos, An.pos2 )) ) { + An.isClose = TRUE; + } else + An.isClose = FALSE; + break; + default: + return C_ERROR; + } + return C_CONTINUE; +} + + /***************************************************************************** @@ -44,15 +249,23 @@ static struct { STATE_T state; coOrd pos0; coOrd pos1; + BOOL_T isClose; int modifyingEnd; } Dr = { DR_OFF, { 0,0 }, { 0,0 } }; + void RulerRedraw( BOOL_T demo ) { + if (programMode == MODE_TRAIN) return; if (Dr.state == DR_ON) - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, wDrawColorBlack ); - if (demo) + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + if (demo) { Dr.state = DR_OFF; + An.state = AN_OFF; + } + if (An.state != AN_OFF) + DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, An.isClose?wDrawColorBlue:wDrawColorBlack); + } static STATUS_T CmdRuler( wAction_t action, coOrd pos ) @@ -60,6 +273,7 @@ static STATUS_T CmdRuler( wAction_t action, coOrd pos ) switch (action) { case C_START: + Dr.isClose = FALSE; switch (Dr.state) { case DR_OFF: Dr.state = DR_ON; @@ -87,19 +301,22 @@ static STATUS_T CmdRuler( wAction_t action, coOrd pos ) return C_TERMINATE; case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if (Dr.state == DR_ON) { - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, wDrawColorBlack ); + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); } return C_CONTINUE; case C_CANCEL: return C_TERMINATE; - } + return C_CONTINUE; } + STATUS_T ModifyRuler( wAction_t action, coOrd pos ) @@ -109,25 +326,36 @@ STATUS_T ModifyRuler( Dr.modifyingEnd = -1; if ( Dr.state != DR_ON ) return C_ERROR; - if ( FindDistance( pos, Dr.pos0 ) < mainD.scale*0.25 ) { + if ( IsClose(FindDistance( pos, Dr.pos0 ))) { Dr.modifyingEnd = 0; - } else if ( FindDistance( pos, Dr.pos1 ) < mainD.scale*0.25 ) { + } else if ( IsClose(FindDistance( pos, Dr.pos1 ))) { Dr.modifyingEnd = 1; } else { return C_ERROR; } + break; case C_MOVE: if ( Dr.modifyingEnd == 0 ) { Dr.pos0 = pos; - } else { + } else if ( Dr.modifyingEnd == 1) { Dr.pos1 = pos; - } + } else return C_ERROR; InfoMessage( "%s", FormatDistance( FindDistance( Dr.pos0, Dr.pos1 ) ) ); return C_CONTINUE; case C_UP: return C_CONTINUE; case C_REDRAW: - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, wDrawColorBlack ); + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + break; + case wActionMove: + if ( IsClose(FindDistance( pos, Dr.pos0 )) || + IsClose(FindDistance( pos, Dr.pos1 ))) { + Dr.isClose = TRUE; + An.isClose = FALSE; + } else { + Dr.isClose = FALSE; + ModifyProtractor(wActionMove,pos); + } break; default: return C_ERROR; @@ -137,8 +365,12 @@ STATUS_T ModifyRuler( #include "bitmaps/ruler.xpm" +#include "bitmaps/protractor.xpm" void InitCmdRuler( wMenu_p menu ) { - AddMenuButton( menu, CmdRuler, "cmdRuler", _("Ruler"), wIconCreatePixMap(ruler_xpm), LEVEL0, IC_STICKY|IC_NORESTART, ACCL_RULER, NULL ); + ButtonGroupBegin( _("Measurement"), "cmdMeasureSetCmd", _("Measurement") ); + AddMenuButton( menu, CmdRuler, "cmdRuler", _("Ruler"), wIconCreatePixMap(ruler_xpm[iconSize]), LEVEL0, IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_RULER, NULL ); + AddMenuButton( menu, CmdAngle, "cmdAngle", _("Protractor"), wIconCreatePixMap(protractor_xpm[iconSize]), LEVEL0, IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_ANGLE, NULL ); + ButtonGroupEnd(); } diff --git a/app/bin/cselect.c b/app/bin/cselect.c index 4e4e8eb..1b153b9 100644 --- a/app/bin/cselect.c +++ b/app/bin/cselect.c @@ -20,29 +20,25 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <string.h> - +#include "common.h" #include "draw.h" #include "ccurve.h" #include "tcornu.h" #include "tbezier.h" #include "track.h" -#define PRIVATE_EXTRADATA #include "compound.h" #include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "cjoin.h" #include "draw.h" #include "misc.h" #include "trackx.h" +#include "common-ui.h" #include "bitmaps/bmendpt.xbm" @@ -56,12 +52,12 @@ EXPORT wIndex_t selectCmdInx; EXPORT wIndex_t moveCmdInx; EXPORT wIndex_t rotateCmdInx; +EXPORT wIndex_t flipCmdInx; #define MAXMOVEMODE (3) static long moveMode = MAXMOVEMODE; static BOOL_T enableMoveDraw = TRUE; static BOOL_T move0B; -struct extraData { char junk[2000]; }; static wDrawBitMap_p endpt_bm; static wDrawBitMap_p angle_bm[4]; @@ -70,8 +66,8 @@ track_p IsInsideABox(coOrd pos); static track_p moveDescTrk; static coOrd moveDescPos; -int incrementalDrawLimit = 20; - static int microCount = 0; +int incrementalDrawLimit = 0; +static int microCount = 0; static dynArr_t tlist_da; @@ -128,6 +124,7 @@ void CreateArrowAnchor(coOrd pos,ANGLE_T a,DIST_T len) { anchors(i).u.l.pos[0] = pos; Translate(&anchors(i).u.l.pos[1],pos,NormalizeAngle(a-135),len); anchors(i).color = wDrawColorBlue; + wSetCursor(mainD.d,wCursorNone); } void static CreateRotateAnchor(coOrd pos) { @@ -146,6 +143,16 @@ void static CreateRotateAnchor(coOrd pos) { Translate(&head,pos,j*120,d*2); CreateArrowAnchor(head,NormalizeAngle((j*120)+90),d); } + DYNARR_APPEND(trkSeg_t,anchors_da,1); + i = anchors_da.cnt-1; + anchors(i).type = SEG_CRVLIN; + anchors(i).width = d/8; + anchors(i).u.c.center = pos; + anchors(i).u.c.a0 = 180.0; + anchors(i).u.c.a1 = 360.0; + anchors(i).u.c.radius = d/16; + anchors(i).color = wDrawColorAqua; + wSetCursor(mainD.d,wCursorNone); } void static CreateModifyAnchor(coOrd pos) { @@ -168,6 +175,7 @@ void static CreateModifyAnchor(coOrd pos) { anchors(i).u.c.a1 = 360.0; anchors(i).u.c.radius = d; anchors(i).color = wDrawColorPowderedBlue; + wSetCursor(mainD.d,wCursorNone); } @@ -193,6 +201,7 @@ void CreateDescribeAnchor(coOrd pos) { Translate(&anchors(i).u.l.pos[1],pos,180.0,d*1.5); anchors(i).color = wDrawColorPowderedBlue; } + wSetCursor(mainD.d,wCursorNone); } void CreateActivateAnchor(coOrd pos) { @@ -218,6 +227,7 @@ void CreateActivateAnchor(coOrd pos) { anchors(i).u.c.a1 = 360.0; anchors(i).u.c.radius = d; anchors(i).color = wDrawColorPowderedBlue; + wSetCursor(mainD.d,wCursorNone); } void static CreateMoveAnchor(coOrd pos) { @@ -225,6 +235,7 @@ void static CreateMoveAnchor(coOrd pos) { DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,0,TRUE,wDrawColorBlue); DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,90,TRUE,wDrawColorBlue); + wSetCursor(mainD.d,wCursorNone); } void CreateEndAnchor(coOrd p, wBool_t lock) { @@ -382,7 +393,7 @@ EXPORT void SetAllTrackSelect( BOOL_T select ) selectedTrackCount = 0; trk = NULL; while ( TrackIterate( &trk ) ) { - if ((!select) || GetLayerVisible( GetTrkLayer( trk ))) { + if ((!select) || (GetLayerVisible( GetTrkLayer( trk )) && !GetLayerFrozen(GetTrkLayer( trk )) )) { if (select) selectedTrackCount++; if ((GetTrkSelected(trk)!=0) != select) { @@ -392,7 +403,7 @@ EXPORT void SetAllTrackSelect( BOOL_T select ) ClrTrkBits( trk, TB_SELECTED ); if (!doRedraw) SetTrkBits( trk, TB_SELREDRAW ); - DrawTrackAndEndPts( trk, wDrawColorBlack ); + DrawTrackAndEndPts( trk, wDrawColorBlack ); } } } @@ -405,20 +416,20 @@ EXPORT void SetAllTrackSelect( BOOL_T select ) } } -/* Invert selected state of all visible non-module objects. +/* Invert selected state of all visible non-module, non-frozen objects. * * \param none * \return none */ -EXPORT void InvertTrackSelect( void *ptr ) +EXPORT void InvertTrackSelect( void * unused ) { track_p trk; trk = NULL; while ( TrackIterate( &trk ) ) { if (GetLayerVisible( GetTrkLayer( trk )) && - !GetLayerModule(GetTrkLayer( trk ))) { + !GetLayerModule(GetTrkLayer( trk )) && !GetLayerFrozen(GetTrkLayer( trk )) ) { SelectOneTrack( trk, GetTrkSelected(trk)==0 ); } } @@ -428,7 +439,7 @@ EXPORT void InvertTrackSelect( void *ptr ) MainRedraw(); // InvertTrackSelect } -/* Select orphaned (ie single) track pieces. +/* Select orphaned (ie single) track pieces (ignore frozen and module) * * \param none * \return none @@ -444,7 +455,7 @@ EXPORT void OrphanedTrackSelect( void *ptr ) while( TrackIterate( &trk ) ) { cnt = 0; - if( GetLayerVisible( GetTrkLayer( trk ) && !GetLayerModule(GetTrkLayer(trk)))) { + if( GetLayerVisible( GetTrkLayer( trk ) && !GetLayerModule(GetTrkLayer(trk)) && !GetLayerFrozen(GetTrkLayer(trk)))) { for( ep = 0; ep < GetTrkEndPtCnt( trk ); ep++ ) { if( GetTrkEndTrk( trk, ep ) ) cnt++; @@ -480,12 +491,11 @@ static void SelectOneTrack( selectedTrackCount--; } SelectedTrackCountChange(); - DrawTrackAndEndPts( trk, wDrawColorBlack ); } -static void HighlightSelectedTracks( - track_p trk_ignore, BOOL_T box, BOOL_T invert ) +EXPORT void HighlightSelectedTracks( + track_p trk_ignore, BOOL_T keep, BOOL_T invert ) { track_p trk = NULL; if ( selectedTrackCount == 0 ) @@ -494,7 +504,9 @@ static void HighlightSelectedTracks( if (trk == trk_ignore) continue; if(GetTrkSelected(trk)) { if (!GetLayerVisible( GetTrkLayer( trk ))) continue; - if (invert) + if (keep) + DrawTrack(trk,&tempD,selectedColor); + else if (invert) DrawTrack(trk,&tempD,wDrawColorPreviewUnselected); else DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); @@ -503,6 +515,11 @@ static void HighlightSelectedTracks( } +/* + * Select all tracks connected walking the tree until hitting ends or already selected tracks + * + * Ignore Frozen Tracks + */ static void SelectConnectedTracks( track_p trk, BOOL_T display_only ) { @@ -517,15 +534,17 @@ static void SelectConnectedTracks( if ( inx > 0 && (selectedTrackCount == 0) && !display_only ) return; trk = Tlist(inx); - if (inx!=0 && - GetTrkSelected(trk)) { - if (display_only) - DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); - continue; - } else if (GetTrkSelected(trk)) { - if (display_only) - DrawTrack(trk,&tempD,wDrawColorPreviewUnselected); - continue; + if (!GetLayerFrozen(GetTrkLayer(trk))) { + if (inx!=0 && + GetTrkSelected(trk)) { + if (display_only) + DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); + continue; + } else if (GetTrkSelected(trk)) { + if (display_only) + DrawTrack(trk,&tempD,wDrawColorPreviewUnselected); + continue; + } } for (ep=0; ep<GetTrkEndPtCnt(trk); ep++) { trk1 = GetTrkEndTrk( trk, ep ); @@ -535,10 +554,12 @@ static void SelectConnectedTracks( } else TlistAppend( trk1 ); } } - if (display_only) DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); + if (display_only && !GetLayerFrozen(GetTrkLayer(trk))) DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); else if (!GetTrkSelected(trk)) { if (GetLayerModule(GetTrkLayer(trk))) { continue; + } else if (GetLayerFrozen(GetTrkLayer(trk))) { + continue; } else { SelectOneTrack( trk, TRUE ); InfoCount( inx+1 ); @@ -572,7 +593,25 @@ static void DrawSingleTrack(track_p trk, BOOL_T bit) { DrawTrack(trk,&tempD,bit?wDrawColorPreviewSelected:wDrawColorPreviewUnselected); } +typedef BOOL_T (*testSelectedTrackCallBack_t)(track_p, int); + + +static BOOL_T TestAllSelectedTracks( testSelectedTrackCallBack_t testit, int value) +{ + track_p trk; + trk = NULL; + while ( TrackIterate( &trk ) ) { + if (GetTrkSelected(trk)) { + if ( !testit( trk, value ) ) { + return FALSE; + } + } + } + return TRUE; +} + typedef BOOL_T (*doSelectedTrackCallBack_t)(track_p, BOOL_T); + static void DoSelectedTracks( doSelectedTrackCallBack_t doit ) { track_p trk; @@ -619,7 +658,7 @@ EXPORT void SelectTrackWidth( void* width ) if (GetTrkSelected(trk)) { DrawTrackAndEndPts( trk, wDrawColorWhite ); UndoModify( trk ); - SetTrkWidth( trk, (int)(long)width ); + SetTrkWidth( trk, (int)VP2L(width) ); DrawTrackAndEndPts( trk, wDrawColorBlack ); } } @@ -627,8 +666,9 @@ EXPORT void SelectTrackWidth( void* width ) UndoEnd(); } -EXPORT void SelectLineType( void* width ) +static void SelectLineType( void* widthVP ) { + int width = (int)VP2L(widthVP); track_p trk; if (SelectedTracksAreFrozen()) return; @@ -643,11 +683,11 @@ EXPORT void SelectLineType( void* width ) if (GetTrkSelected(trk)) { UndoModify( trk ); if (QueryTrack(trk, Q_CAN_MODIFY_CONTROL_POINTS)) - SetBezierLineType(trk, (int) (long) width); + SetBezierLineType(trk, width); else if (QueryTrack(trk, Q_IS_DRAW)) - SetLineType( trk, (int)(long)width ); + SetLineType( trk, width ); else if (QueryTrack(trk, Q_IS_STRUCTURE)) { - SetCompoundLineType(trk, (int)(long)width); + SetCompoundLineType(trk, width); } } } @@ -657,15 +697,26 @@ EXPORT void SelectLineType( void* width ) static BOOL_T doingDouble; -EXPORT void SelectDelete( void ) +EXPORT int SelectDelete( void ) { - if (GetCurrentCommand() != selectCmdInx) return; - if (doingDouble) return; + if (GetCurrentCommand() != selectCmdInx ) { + if (GetCurrentCommand() != modifyCmdInx ) { + InfoMessage(_("Delete only works in Select Mode")); + wBeep(); + return -1; + } + } + + if (doingDouble || (GetCurrentCommand() == modifyCmdInx)) return 1; if (SelectedTracksAreFrozen()) - return; + return 0; if (selectedTrackCount>0) { - UndoStart( _("Delete Tracks"), "delete" ); + BOOL_T UndoStarted = FALSE; + if (!TestAllSelectedTracks(QueryTrack,(int)Q_ISTRAIN)) { // If all Cars, don't bother with UndoStart as there will be nothing to delete + UndoStarted = TRUE; + UndoStart( _("Delete Tracks"), "delete" ); + } wDrawDelayUpdate( mainD.d, TRUE ); wDrawDelayUpdate( mapD.d, TRUE ); DoSelectedTracks( DeleteTrack ); @@ -674,15 +725,26 @@ EXPORT void SelectDelete( void ) wDrawDelayUpdate( mapD.d, FALSE ); selectedTrackCount = 0; SelectedTrackCountChange(); - UndoEnd(); + if (UndoStarted) + UndoEnd(); } else { ErrorMessage( MSG_NO_SELECTED_TRK ); } + return 0; +} + +/* + * Called By Windows directly with Delete Key. We first try a simple Delete, and if that doesn't work saying "In Modify" we call Modify with a Text key for Delete + */ +EXPORT void TrySelectDelete( void ) { + if(SelectDelete() == 1) { + CmdModify((C_TEXT+(int)(127<<8)),zero); + } } BOOL_T flipHiddenDoSelectRecount; -static BOOL_T FlipHidden( track_p trk, BOOL_T junk ) +static BOOL_T FlipHidden( track_p trk, BOOL_T unused ) { EPINX_T i; track_p trk2; @@ -713,7 +775,7 @@ static BOOL_T FlipHidden( track_p trk, BOOL_T junk ) return TRUE; } -static BOOL_T FlipBridge( track_p trk, BOOL_T junk ) +static BOOL_T FlipBridge( track_p trk, BOOL_T unused ) { UndoModify( trk ); if (GetTrkBridge(trk)) { @@ -725,7 +787,7 @@ static BOOL_T FlipBridge( track_p trk, BOOL_T junk ) return TRUE; } -static BOOL_T FlipTies( track_p trk, BOOL_T junk ) +static BOOL_T FlipTies( track_p trk, BOOL_T unused ) { UndoModify( trk ); if (GetTrkNoTies(trk)) { @@ -737,7 +799,7 @@ static BOOL_T FlipTies( track_p trk, BOOL_T junk ) return TRUE; } -EXPORT void SelectTunnel( void ) +EXPORT void SelectTunnel( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -755,7 +817,7 @@ EXPORT void SelectTunnel( void ) SelectRecount(); } -EXPORT void SelectBridge( void ) +EXPORT void SelectBridge( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -772,7 +834,7 @@ EXPORT void SelectBridge( void ) MainRedraw(); // SelectBridge } -EXPORT void SelectTies( void ) +EXPORT void SelectTies( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -803,14 +865,14 @@ void SelectRecount( void ) } -static BOOL_T SetLayer( track_p trk, BOOL_T junk ) +static BOOL_T SetLayer( track_p trk, BOOL_T unused ) { UndoModify( trk ); SetTrkLayer( trk, curLayer ); return TRUE; } -EXPORT void MoveSelectedTracksToCurrentLayer( void ) +EXPORT void MoveSelectedTracksToCurrentLayer( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -823,20 +885,32 @@ EXPORT void MoveSelectedTracksToCurrentLayer( void ) } } -EXPORT void SelectCurrentLayer( void ) +EXPORT void SelectCurrentLayer( void * unused ) { track_p trk; trk = NULL; + if (GetLayerFrozen(curLayer)) return; while ( TrackIterate( &trk ) ) { - if ((!GetTrkSelected(trk)) && GetTrkLayer(trk) == curLayer ) { + if ((!GetTrkSelected(trk)) && GetTrkLayer(trk) == curLayer) { SelectOneTrack( trk, TRUE ); } } RedrawSelectedTracksBoundary(); } +EXPORT void DeselectLayer( unsigned int layer ) { + track_p trk; + trk = NULL; + while ( TrackIterate( &trk ) ) { + if ((GetTrkSelected(trk)) && GetTrkLayer(trk) == layer) { + SelectOneTrack( trk, FALSE ); + } + } + RedrawSelectedTracksBoundary(); +} + -static BOOL_T ClearElevation( track_p trk, BOOL_T junk ) +static BOOL_T ClearElevation( track_p trk, BOOL_T unused ) { EPINX_T ep; for ( ep=0; ep<GetTrkEndPtCnt(trk); ep++ ) { @@ -850,7 +924,7 @@ static BOOL_T ClearElevation( track_p trk, BOOL_T junk ) return TRUE; } -EXPORT void ClearElevations( void ) +EXPORT void ClearElevations( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -866,7 +940,7 @@ EXPORT void ClearElevations( void ) static DIST_T elevDelta; -static BOOL_T AddElevation( track_p trk, BOOL_T junk ) +static BOOL_T AddElevation( track_p trk, BOOL_T unused ) { track_p trk1; EPINX_T ep, ep1; @@ -909,7 +983,7 @@ EXPORT void AddElevations( DIST_T delta ) } -EXPORT void DoRefreshCompound( void ) +EXPORT void DoRefreshCompound( void * unused ) { if (SelectedTracksAreFrozen()) return; @@ -961,11 +1035,11 @@ static paramData_t rescalePLs[] = { #define I_RESCALE_MODE (0) { PD_RADIO, &rescaleMode, "toggle", PDO_NOPREF, &rescaleToggleLabels, N_("Rescale by:"), BC_HORZ|BC_NOBORDER }, #define I_RESCALE_FROM_SCALE (1) - { PD_STRING, rescaleFromScale, "fromS", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)100, N_("From:"),0, 0, sizeof(rescaleFromScale)}, + { PD_STRING, rescaleFromScale, "fromS", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(100), N_("From:"),0, 0, sizeof(rescaleFromScale)}, #define I_RESCALE_FROM_GAUGE (2) - { PD_STRING, rescaleFromGauge, "fromG", PDO_NOPREF|PDO_DLGHORZ | PDO_STRINGLIMITLENGTH, (void*)100, " / ", 0, 0, sizeof(rescaleFromGauge)}, + { PD_STRING, rescaleFromGauge, "fromG", PDO_NOPREF|PDO_DLGHORZ | PDO_STRINGLIMITLENGTH, I2VP(100), " / ", 0, 0, sizeof(rescaleFromGauge)}, #define I_RESCALE_TO_SCALE (3) - { PD_DROPLIST, &rescaleToScaleInx, "toS", PDO_NOPREF|PDO_LISTINDEX, (void *)100, N_("To: ") }, + { PD_DROPLIST, &rescaleToScaleInx, "toS", PDO_NOPREF|PDO_LISTINDEX, I2VP(100), N_("To: ") }, #define I_RESCALE_TO_GAUGE (4) { PD_DROPLIST, &rescaleToGaugeInx, "toG", PDO_NOPREF|PDO_LISTINDEX|PDO_DLGHORZ, NULL, " / " }, #define I_RESCALE_CHANGE (5) @@ -973,13 +1047,13 @@ static paramData_t rescalePLs[] = { #define I_RESCALE_PERCENT (6) { PD_FLOAT, &rescalePercent, "ratio", 0, &r0o001_10000, N_("Ratio") }, { PD_MESSAGE, "%", NULL, PDO_DLGHORZ } }; -static paramGroup_t rescalePG = { "rescale", 0, rescalePLs, sizeof rescalePLs/sizeof rescalePLs[0] }; +static paramGroup_t rescalePG = { "rescale", 0, rescalePLs, COUNT( rescalePLs ) }; static long getboundsCount; static coOrd getboundsLo, getboundsHi; -static BOOL_T GetboundsDoIt( track_p trk, BOOL_T junk ) +static BOOL_T GetboundsDoIt( track_p trk, BOOL_T unused ) { coOrd hi, lo; @@ -998,7 +1072,7 @@ static BOOL_T GetboundsDoIt( track_p trk, BOOL_T junk ) } static coOrd rescaleShift; -static BOOL_T RescaleDoIt( track_p trk, BOOL_T junk ) +static BOOL_T RescaleDoIt( track_p trk, BOOL_T unused ) { EPINX_T ep, ep1; track_p trk1; @@ -1026,7 +1100,7 @@ static BOOL_T RescaleDoIt( track_p trk, BOOL_T junk ) static void RescaleDlgOk( - void * junk ) + void * unused ) { coOrd center, size; DIST_T d; @@ -1073,6 +1147,19 @@ static void RescaleDlgOk( rescaleToInx = GetScaleInx( rescaleToScaleInx, rescaleToGaugeInx ); DoSelectedTracks( RescaleDoIt ); + + // rescale the background if it exists and the layout is resized + if (HasBackGround() && ratio != 1.0) { + coOrd pos = GetLayoutBackGroundPos(); + double size = GetLayoutBackGroundSize(); + pos.x = ratio * pos.x + rescaleShift.x; + pos.y = ratio * pos.y + rescaleShift.y; + SetLayoutBackGroundPos(pos); + + size *= ratio; + SetLayoutBackGroundSize(size); + } + DoRedraw(); wHide( rescalePG.win ); } @@ -1126,11 +1213,11 @@ static void RescaleDlgUpdate( * FIXME: special cases like tracks pieces with different gauges or scale need to be handled * * \param IN trk track element - * \param IN junk + * \param IN unused * \return TRUE; */ -static BOOL_T SelectedScaleGauge( track_p trk, BOOL_T junk ) +static BOOL_T SelectedScaleGauge( track_p trk, BOOL_T unused ) { char *scaleName; SCALEINX_T scale; @@ -1159,7 +1246,7 @@ static BOOL_T SelectedScaleGauge( track_p trk, BOOL_T junk ) * RescaleDlgUpdate() */ -EXPORT void DoRescale( void ) +EXPORT void DoRescale( void * unused ) { if ( rescalePG.win == NULL ) { ParamCreateDialog( &rescalePG, MakeWindowTitle(_("Rescale")), _("Ok"), RescaleDlgOk, wHide, TRUE, NULL, F_BLOCK, RescaleDlgUpdate ); @@ -1200,21 +1287,35 @@ static void DrawSelectedTracksD( drawCmd_p d, wDrawColor color ) } if (color != wDrawColorWhite) ClrTrkBits(trk, TB_UNDRAWN); - DrawTrack( trk, d, color ); if (color == wDrawColorWhite) SetTrkBits( trk, TB_UNDRAWN ); } + MainRedraw(); //Omitting all the tracks with TB_UNDRAWN set /*wDrawDelayUpdate( d->d, FALSE );*/ } static BOOL_T AddSelectedTrack( - track_p trk, BOOL_T junk ) + track_p trk, BOOL_T unused ) { DYNARR_APPEND( track_p, tlist_da, 10 ); DYNARR_LAST( track_p, tlist_da ) = trk; return TRUE; } +static BOOL_T RemoveSelectedTrack(track_p trk) { + + for(int i=0;i<tlist_da.cnt; i++) { + if (DYNARR_N(track_p,tlist_da,i) == trk) { + for (int j=i;j<tlist_da.cnt-1;j++) { + DYNARR_N(track_p,tlist_da,j) = DYNARR_N(track_p,tlist_da,j+1); + } + tlist_da.cnt--; + return TRUE; + } + } + return FALSE; +} + static coOrd moveOrig; static ANGLE_T moveAngle; @@ -1257,6 +1358,8 @@ static void AccumulateTracks( void ) /*wDrawDelayUpdate( moveD.d, FALSE );*/ } +static dynArr_t auto_select_da; + static void AddEndCornus() { for (int i=0;i<tlist_da.cnt;i++) { track_p trk = DYNARR_N(track_p,tlist_da,i); @@ -1267,11 +1370,23 @@ static void AddEndCornus() { SelectOneTrack( tc, TRUE ); DYNARR_APPEND(track_p,tlist_da,1); //Add to selected list DYNARR_LAST(track_p,tlist_da) = tc; + DYNARR_APPEND(track_p,auto_select_da,1); + DYNARR_LAST(track_p,auto_select_da) = tc; } } } } +static void RemoveEndCornus() { + track_p tc; + for (int i=0;i<auto_select_da.cnt;i++) { + tc = DYNARR_N(track_p,auto_select_da,i); + SelectOneTrack( tc, FALSE ); + RemoveSelectedTrack(tc); + } + DYNARR_RESET(track_p,auto_select_da); +} + static void GetMovedTracks( BOOL_T undraw ) { @@ -1343,7 +1458,7 @@ static void DrawMovedTracks( void ) dynArr_t cornu_segs; DrawSegs( &tempD, moveOrig, moveAngle, &tempSegs(0), tempSegs_da.cnt, - 0.0, wDrawColorBlack ); + 0.0, selectedColor ); for ( inx=0; inx<tlist_da.cnt; inx++ ) { trk = Tlist(inx); @@ -1377,7 +1492,7 @@ static void DrawMovedTracks( void ) trkSeg_p cornu_p = &DYNARR_N(trkSeg_t,cornu_segs,0); DrawSegsO(&tempD, trk, zero, 0.0, cornu_p,cornu_segs.cnt, - GetTrkGauge(trk), wDrawColorBlack, DTS_LEFT|DTS_RIGHT ); + GetTrkGauge(trk), selectedColor, DTS_LEFT|DTS_RIGHT ); } } @@ -1413,20 +1528,37 @@ static void MoveTracks( DrawSelectedTracksD( &mapD, wDrawColorWhite ); } } + //Do non-Cornu first to establish new end-points + for ( inx=0; inx<tlist_da.cnt; inx++ ) { + trk = Tlist(inx); + UndoModify( trk ); + if (QueryTrack(trk, Q_IS_CORNU)) continue; + if (move) + MoveTrack( trk, base ); + if (rotate) + RotateTrack( trk, orig, angle ); + for (ep=0; ep<GetTrkEndPtCnt(trk); ep++) { + if ((trk1 = GetTrkEndTrk(trk,ep)) != NULL && + !GetTrkSelected(trk1)) { + ep1 = GetEndPtConnectedToMe( trk1, trk ); + DisconnectTracks( trk, ep, trk1, ep1 ); + DrawEndPt( &mainD, trk1, ep1, wDrawColorBlack ); + } + } + } + //Now do the just Cornus - to reset to where the fixed parts ended up for ( inx=0; inx<tlist_da.cnt; inx++ ) { trk = Tlist(inx); UndoModify( trk ); BOOL_T fixed_end; fixed_end = FALSE; - if (QueryTrack(trk, Q_IS_CORNU)) { - for (int i=0;i<2;i++) { - track_p te; - if ((te = GetTrkEndTrk(trk,i)) && !GetTrkSelected(te)) { - fixed_end = TRUE; - } + if (!QueryTrack(trk, Q_IS_CORNU)) continue; + for (int i=0;i<2;i++) { + track_p te; + if ((te = GetTrkEndTrk(trk,i)) && !GetTrkSelected(te)) { + fixed_end = TRUE; } } - if (!fixed_end) { if (move) MoveTrack( trk, base ); @@ -1441,65 +1573,64 @@ static void MoveTracks( } } } else { - if (QueryTrack(trk, Q_IS_CORNU)) { //Cornu will be at the end of selected set - for (int i=0;i<2;i++) { - if ((trk1 = GetTrkEndTrk(trk,i)) && GetTrkSelected(trk1)) { - ep1 = GetEndPtConnectedToMe( trk1, trk ); - DisconnectTracks(trk,i,trk1,ep1); - GetTrackParams(PARAMS_CORNU,trk1,GetTrkEndPos(trk1,ep1),&trackParms); - if (trackParms.type == curveTypeStraight) { - endRadius = 0; - endCenter = zero; - } else { - endRadius = trackParms.arcR; - endCenter = trackParms.arcP; - } - DrawTrack(trk,&mainD,wDrawColorWhite); - DrawTrack(trk,&mapD,wDrawColorWhite); - endAngle = NormalizeAngle(GetTrkEndAngle(trk1,ep1)+180); - if (SetCornuEndPt(trk,i,GetTrkEndPos(trk1,ep1),endCenter,endAngle,endRadius)) { - ConnectTracks(trk,i,trk1,ep1); - DrawTrack(trk,&mainD,wDrawColorBlack); - DrawTrack(trk,&mapD,wDrawColorBlack); - } else { - DeleteTrack(trk,TRUE); - ErrorMessage(_("Cornu too tight - it was deleted")); - DoRedraw(); // MoveTracks: Cornu/delete - return; - } - } else if (!trk1) { //No end track - DrawTrack(trk,&mainD,wDrawColorWhite); - DrawTrack(trk,&mapD,wDrawColorWhite); - GetTrackParams(PARAMS_CORNU,trk,GetTrkEndPos(trk,i),&trackParms); - if (move) { - coOrd end_pos, end_center; - end_pos = trackParms.cornuEnd[i]; - end_pos.x += base.x; - end_pos.y += base.y; - end_center = trackParms.cornuCenter[i]; - end_center.x += base.x; - end_center.y += base.y; - SetCornuEndPt(trk,i,end_pos,end_center,trackParms.cornuAngle[i],trackParms.cornuRadius[i]); - } - if (rotate) { - coOrd end_pos, end_center; - ANGLE_T end_angle; - end_pos = trackParms.cornuEnd[i]; - end_center = trackParms.cornuCenter[i]; - Rotate(&end_pos, orig, angle); - Rotate(&end_center, orig, angle); - end_angle = NormalizeAngle( trackParms.cornuAngle[i] + angle ); - SetCornuEndPt(trk,i,end_pos,end_center,end_angle,trackParms.cornuRadius[i]); - } + for (int i=0;i<2;i++) { + if ((trk1 = GetTrkEndTrk(trk,i)) && GetTrkSelected(trk1)) { + ep1 = GetEndPtConnectedToMe( trk1, trk ); + DisconnectTracks(trk,i,trk1,ep1); + GetTrackParams(PARAMS_CORNU,trk1,GetTrkEndPos(trk1,ep1),&trackParms); + if (trackParms.type == curveTypeStraight) { + endRadius = 0; + endCenter = zero; + } else { + endRadius = trackParms.arcR; + endCenter = trackParms.arcP; + } + DrawTrack(trk,&mainD,wDrawColorWhite); + DrawTrack(trk,&mapD,wDrawColorWhite); + endAngle = NormalizeAngle(GetTrkEndAngle(trk1,ep1)+180); + if (SetCornuEndPt(trk,i,GetTrkEndPos(trk1,ep1),endCenter,endAngle,endRadius)) { + ConnectTracks(trk,i,trk1,ep1); DrawTrack(trk,&mainD,wDrawColorBlack); DrawTrack(trk,&mapD,wDrawColorBlack); + } else { + DeleteTrack(trk,TRUE); + ErrorMessage(_("Cornu too tight - it was deleted")); + DoRedraw(); // MoveTracks: Cornu/delete + continue; + } + } else if (!trk1) { //No end track + DrawTrack(trk,&mainD,wDrawColorWhite); + DrawTrack(trk,&mapD,wDrawColorWhite); + GetTrackParams(PARAMS_CORNU,trk,GetTrkEndPos(trk,i),&trackParms); + if (move) { + coOrd end_pos, end_center; + end_pos = trackParms.cornuEnd[i]; + end_pos.x += base.x; + end_pos.y += base.y; + end_center = trackParms.cornuCenter[i]; + end_center.x += base.x; + end_center.y += base.y; + SetCornuEndPt(trk,i,end_pos,end_center,trackParms.cornuAngle[i],trackParms.cornuRadius[i]); } + if (rotate) { + coOrd end_pos, end_center; + ANGLE_T end_angle; + end_pos = trackParms.cornuEnd[i]; + end_center = trackParms.cornuCenter[i]; + Rotate(&end_pos, orig, angle); + Rotate(&end_center, orig, angle); + end_angle = NormalizeAngle( trackParms.cornuAngle[i] + angle ); + SetCornuEndPt(trk,i,end_pos,end_center,end_angle,trackParms.cornuRadius[i]); + } + DrawTrack(trk,&mainD,wDrawColorBlack); + DrawTrack(trk,&mapD,wDrawColorBlack); } } } InfoCount( inx ); } + RemoveEndCornus(); ClrAllTrkBits(TB_UNDRAWN); DoRedraw(); wSetCursor( mainD.d, defaultCursor ); @@ -1534,6 +1665,7 @@ void MoveToJoin( ConnectTracks( trk0, ep0, trk1, ep1 ); DrawNewTrack( trk0 ); DrawNewTrack( trk1 ); + RemoveEndCornus(); } void FreeTempStrings() { @@ -1627,23 +1759,22 @@ void DrawHighlightLayer(int layer) { if (layer_lo.y > lo.y ) layer_lo.y = lo.y; } } - wPos_t margin = (wPos_t)(10.5*mainD.scale/mainD.dpi); + wDrawPix_t margin = (10.5*mainD.scale/mainD.dpi); layer_hi.x +=margin; layer_hi.y +=margin; layer_lo.x -=margin; layer_lo.y -=margin; - wPos_t rect[4][2]; int type[4]; - coOrd top_left, bot_right; - top_left.x = layer_lo.x; top_left.y = layer_hi.y; - bot_right.x = layer_hi.x; bot_right.y = layer_lo.y; type[0] = type[1] = type[2] = type[3] = 0; - mainD.CoOrd2Pix(&mainD,layer_lo,&rect[0][0],&rect[0][1]); - mainD.CoOrd2Pix(&mainD,top_left,&rect[1][0],&rect[1][1]); - mainD.CoOrd2Pix(&mainD,layer_hi,&rect[2][0],&rect[2][1]); - mainD.CoOrd2Pix(&mainD,bot_right,&rect[3][0],&rect[3][1]); - wDrawPolygon(tempD.d,rect,(wPolyLine_e *)type,4,wDrawColorPowderedBlue,0,wDrawLineDash,wDrawOptTemp,0,0); + coOrd rect[4]; + // r3 r2 + // r0 r1 + rect[0].x = rect[3].x = layer_lo.x; + rect[1].x = rect[2].x = layer_hi.x; + rect[0].y = rect[1].y = layer_lo.y; + rect[2].y = rect[3].y = layer_hi.y; + DrawPoly(&tempD,4,rect,type,wDrawColorPowderedBlue,wDrawLineDash,DRAW_CLOSED); } void SetUpMenu2(coOrd pos, track_p trk) { @@ -1734,7 +1865,7 @@ static STATUS_T CmdMove( UndoStart( _("Move Tracks"), "move" ); base = zero; orig = pos; - + DYNARR_RESET(track_p,auto_select_da); GetMovedTracks(TRUE); SetMoveD( TRUE, base, 0.0 ); drawCount = 0; @@ -1747,7 +1878,7 @@ static STATUS_T CmdMove( drawEnable = enableMoveDraw; base.x = pos.x - orig.x; base.y = pos.y - orig.y; - SnapPos( &base ); + if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &base ); SetMoveD( TRUE, base, 0.0 ); if (((MyGetKeyState()&(WKEY_ALT)) == 0) == magneticSnap) { // ALT if (FindEndIntersection(base,zero,0.0,&t1,&ep1,&t2,&ep2)) { @@ -1776,6 +1907,7 @@ static STATUS_T CmdMove( } ep1 = -1; ep2 = -1; + RemoveEndCornus(); tlist_da.cnt = 0; return C_TERMINATE; @@ -1805,17 +1937,25 @@ static STATUS_T CmdMove( if ((action>>8) == 'c') { panCenter = pos; LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); } if ((action>>8) == 'e') { - DoZoomExtents(0); + DoZoomExtents(I2VP(0)); + } + if ((action>>8 == 's')) { + DoZoomExtents(I2VP(1)); } if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter('o'); + PanMenuEnter(I2VP('o')); } + if ((action>>8) == 127 || (action>>8) == 8) + SelectDelete(); break; case C_REDRAW: /* DO_REDRAW */ + //Draw all existing highlight boxes only + DrawHighlightBoxes(FALSE, FALSE, NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if (anchors_da.cnt) DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); if ( state == 0 ) @@ -1860,6 +2000,7 @@ static STATUS_T CmdMove( microCount = 0; MainRedraw(); // Micro step move } + RemoveEndCornus(); return C_CONTINUE; } break; @@ -1869,14 +2010,16 @@ static STATUS_T CmdMove( doingMove = FALSE; UndoEnd(); } + RemoveEndCornus(); tlist_da.cnt = 0; break; case C_CONFIRM: case C_CANCEL: if (doingMove) { doingMove = FALSE; - UndoUndo(); + UndoUndo(NULL); } + RemoveEndCornus(); tlist_da.cnt = 0; break; default: @@ -1889,8 +2032,9 @@ static STATUS_T CmdMove( static int rotateAlignState = 0; -static void RotateAlign( BOOL_T align ) +static void RotateAlign( void * alignVP ) { + BOOL_T align = (BOOL_T)VP2L(alignVP); rotateAlignState = 0; if (align) { rotateAlignState = 1; @@ -1951,6 +2095,7 @@ static STATUS_T CmdRotate( return C_TERMINATE; } UndoStart( _("Rotate Tracks"), "rotate" ); + DYNARR_RESET(track_p,auto_select_da); if ( rotateAlignState == 0 ) { drawnAngle = FALSE; angle = 0.0; @@ -2044,7 +2189,7 @@ static STATUS_T CmdRotate( ANGLE_T diff_angle = 0.0; base = pos; drawEnable = enableMoveDraw; - if ( FindDistance( orig, pos ) > (20.0/75.0)*mainD.scale ) { + if ( FindDistance( orig, pos ) > (20.0/BASE_DPI)*mainD.scale ) { ANGLE_T old_angle = angle; angle = FindAngle( orig, pos ); if (!drawnAngle) { @@ -2079,7 +2224,7 @@ static STATUS_T CmdRotate( angle = baseAngle+diff_angle; } Translate( &base, orig, angle, FindDistance(orig,pos) ); //Line one - Translate( &orig_base,orig, baseAngle, FindDistance(orig,pos)<=(60.0/75.00*mainD.scale)?FindDistance(orig,pos):60.0/75.00*mainD.scale ); //Line two + Translate( &orig_base,orig, baseAngle, FindDistance(orig,pos)<=(60.0/BASE_DPI*mainD.scale)?FindDistance(orig,pos):60.0/BASE_DPI*mainD.scale ); //Line two SetMoveD( FALSE, orig, NormalizeAngle( angle-baseAngle ) ); if (((MyGetKeyState()&(WKEY_ALT)) == WKEY_ALT) != magneticSnap) { //Just Shift if (FindEndIntersection(zero,orig,NormalizeAngle( angle-baseAngle ),&t1,&ep1,&t2,&ep2)) { @@ -2127,6 +2272,7 @@ static STATUS_T CmdRotate( } } UndoEnd(); + RemoveEndCornus(); tlist_da.cnt = 0; return C_TERMINATE; @@ -2154,30 +2300,35 @@ static STATUS_T CmdRotate( if ((action>>8) == 'd') { panCenter = pos; LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); } if ((action>>8) == 'e') { - DoZoomExtents(0); + DoZoomExtents(I2VP(0)); + } + if ((action>>8) == 's') { + DoZoomExtents(I2VP(1)); } if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter('o'); + PanMenuEnter(I2VP('o')); } break; case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if (anchors_da.cnt) DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); /* DO_REDRAW */ if ( state == 0 ) break; if ( rotateAlignState != 2 ) { - DIST_T width = mainD.scale*0.5; + DIST_T width = tempD.scale*0.15; DrawLine( &tempD, base, orig, 0, wDrawColorBlue ); if (drawnAngle) { - DrawLine( &tempD, orig_base, orig, (wDrawWidth)width, wDrawColorBlue ); + DrawLine( &tempD, orig_base, orig, (wDrawWidth)width/2, wDrawColorBlue ); ANGLE_T a = DifferenceBetweenAngles(FindAngle(orig, orig_base),FindAngle(orig, base)); DIST_T dist = FindDistance(orig,base); - if (dist>(60.0/75.0)*mainD.scale) dist = (60.0/75.0)*mainD.scale; + if (dist>(60.0/BASE_DPI)*mainD.scale) dist = (60.0/BASE_DPI)*mainD.scale; if (direction_set) { if (clockwise) { @@ -2211,6 +2362,7 @@ static STATUS_T CmdRotate( static void QuickMove( void* pos) { coOrd move_pos = *(coOrd*)pos; + DYNARR_RESET(track_p,auto_select_da); if ( SelectedTracksAreFrozen() ) return; wDrawDelayUpdate( mainD.d, TRUE ); @@ -2220,9 +2372,67 @@ static void QuickMove( void* pos) { wDrawDelayUpdate( mainD.d, FALSE ); } +static track_p SelectTrackByIndex(TRKINX_T ti, char * message ) { + track_p trk = FindTrack(ti); + if (trk) { + if (!GetLayerFrozen( GetTrkLayer( trk ) ) ) { + if (GetLayerModule(GetTrkLayer(trk))) { + DoModuleTracks(GetTrkLayer(trk),DrawSingleTrack,TRUE); + snprintf(message, STR_LONG_SIZE, "%s %d",_("In module layer:"),GetTrkLayer(trk)+1); + } else { + if (!GetLayerVisible(GetTrkLayer(trk))) FlipLayer(I2VP(GetTrkLayer(trk))); + if (!GetTrkVisible(trk) && drawTunnel==0 ) drawTunnel = 1; //Force DRAW_TUNNEL_DASH + SelectOneTrack(trk,TRUE); + } + } else { + snprintf(message, STR_LONG_SIZE, "%s %d",_("Frozen Layer:"),GetTrkLayer(trk)+1); + trk = NULL; + } + } else { + snprintf(message, STR_LONG_SIZE, "%s",_("Not found")); + } + return trk; +} + +EXPORT void SelectByIndex( void* string) { + char result[STR_LONG_SIZE] = ""; + char * message; + SetAllTrackSelect(FALSE); + char * cp = (char *)string; + cp = strtok(cp,","); + BOOL_T single = TRUE; + track_p trk = NULL; + while (cp) { + long ti = strtol(cp,&cp,0); + if (ti>0) { + message = MyMalloc(STR_LONG_SIZE); + trk = SelectTrackByIndex(ti, message); + if (!trk || message[0]) { + size_t len = strlen(result); + snprintf(result+len,(sizeof(result) - len),"I:%ld %s", ti, message); + MyFree(message); + } + } + cp = strtok(NULL,","); + if (cp) single = FALSE; + } + + DoZoomExtents(I2VP(1)); + if (strlen(result)) + InfoMessage(result); + else if (single && trk) { + char msg[STR_SIZE]; + DescribeTrack( trk, msg, sizeof msg ); + InfoMessage( msg ); + } else if (!single) { + InfoMessage(_("Multiple Selected")); + } +} + static void QuickRotate( void* pangle ) { - ANGLE_T angle = (ANGLE_T)(long)pangle; + ANGLE_T angle = (ANGLE_T)VP2L(pangle); + DYNARR_RESET(track_p,auto_select_da); if ( SelectedTracksAreFrozen() ) return; wDrawDelayUpdate( mainD.d, TRUE ); @@ -2236,8 +2446,24 @@ static void QuickRotate( void* pangle ) static wMenu_p moveDescM; static wMenuToggle_p moveDescMI; +static wMenuToggle_p moveDetailDescMI; + +static void ChangeDetailedFlag( void * mode ) +{ + wDrawDelayUpdate( mainD.d, TRUE ); + UndoStart( _("Toggle Detail"), "Modedetail( T%d )", GetTrkIndex(moveDescTrk) ); + UndoModify( moveDescTrk ); + UndrawNewTrack( moveDescTrk ); + if ( ( GetTrkBits( moveDescTrk ) & TB_DETAILDESC ) == 0 ) { + ClrTrkBits( moveDescTrk, TB_HIDEDESC ); + SetTrkBits( moveDescTrk, TB_DETAILDESC ); + } else + ClrTrkBits( moveDescTrk, TB_DETAILDESC ); + DrawNewTrack( moveDescTrk ); + wDrawDelayUpdate( mainD.d, FALSE ); +} -static void ChangeDescFlag( wBool_t set, void * mode ) +static void ChangeDescFlag( void * mode ) { wDrawDelayUpdate( mainD.d, TRUE ); UndoStart( _("Toggle Label"), "Modedesc( T%d )", GetTrkIndex(moveDescTrk) ); @@ -2251,9 +2477,13 @@ static void ChangeDescFlag( wBool_t set, void * mode ) wDrawDelayUpdate( mainD.d, FALSE ); } +/* + * Mode_o -1 = everything, 0 = elevations only, 1 = descriptions only + */ + track_p FindTrackDescription(coOrd pos, EPINX_T * ep_o, int * mode_o, BOOL_T show_hidden, BOOL_T * hidden_o) { track_p trk = NULL; - DIST_T d, dd = 10000; + DIST_T d, dd = DIST_INF; track_p trk1 = NULL; EPINX_T ep1=-1, ep=-1; BOOL_T hidden_t, hidden; @@ -2265,6 +2495,8 @@ track_p FindTrackDescription(coOrd pos, EPINX_T * ep_o, int * mode_o, BOOL_T sho continue; if ( (!GetTrkVisible(trk1)) && drawTunnel==0 ) continue; + if ( GetLayerFrozen( GetTrkLayer( trk1 ) )) + continue; if ( (labelEnable&LABELENABLE_ENDPT_ELEV)!=0 && *mode_o <= 0) { for ( ep1=0; ep1<GetTrkEndPtCnt(trk1); ep1++ ) { d = EndPtDescriptionDistance( pos, trk1, ep1, &dpos, FALSE, NULL ); //No hidden @@ -2278,7 +2510,8 @@ track_p FindTrackDescription(coOrd pos, EPINX_T * ep_o, int * mode_o, BOOL_T sho } } } - if ( !QueryTrack( trk1, Q_HAS_DESC ) && (mode <0 || mode > 0) ) + if (IsClose(dd)) break; + if ( *mode_o == 0 || !QueryTrack( trk1, Q_HAS_DESC ) ) continue; if ((labelEnable&LABELENABLE_TRKDESC)==0) continue; @@ -2321,15 +2554,47 @@ track_p FindTrackDescription(coOrd pos, EPINX_T * ep_o, int * mode_o, BOOL_T sho hidden = hidden_t; cpos = dpos; } + d = StraightDescriptionDistance( pos, trk1, &dpos, show_hidden, &hidden_t ); + if (d < dd ) { + dd = d; + trk = trk1; + ep = -1; + mode = 5; + hidden = hidden_t; + cpos = dpos; + } + d = JointDescriptionDistance( pos, trk1, &dpos, show_hidden, &hidden_t ); + if (d < dd ) { + dd = d; + trk = trk1; + ep = -1; + mode = 6; + hidden = hidden_t; + cpos = dpos; + } + } - if ((trk != NULL && (trk == OnTrack(&pos, FALSE, FALSE))) || - IsClose(d) || IsClose(FindDistance( pos, cpos) )) { //Only when close to a label or the track - not anywhere on layout! + + coOrd pos1 = pos; + + if ((trk != NULL) && IsClose(dd) ) { if (ep_o) *ep_o = ep; if (mode_o) *mode_o = mode; if (hidden_o) *hidden_o = hidden; return trk; + } else { // Return other track for description (not near to description but nearest to track) + if ((trk1 = OnTrack(&pos1, FALSE, FALSE))==NULL) return NULL; + if (!QueryTrack( trk1, Q_HAS_DESC )) return NULL; + if (GetLayerFrozen(GetTrkLayer(trk1))) return NULL; + if (IsClose(FindDistance(pos,pos1))) { + if (mode_o) *mode_o = -1; + if (ep_o) *ep_o = -1; + if (hidden_o) *hidden_o = GetTrkBits( trk1 ) & TB_HIDEDESC; + return trk1; + } } - else return NULL; + + return NULL; } static long moveDescMode; @@ -2338,31 +2603,55 @@ STATUS_T CmdMoveDescription( wAction_t action, coOrd pos ) { - static track_p trk; static EPINX_T ep; static BOOL_T hidden; static int mode; BOOL_T bChanged; - moveDescMode = (long)commandContext; //Context 0 = everything, 1 means elevations, 2 means descriptions + moveDescMode = VP2L(commandContext); //Context 0 = everything, 1 means elevations, 2 means descriptions bChanged = FALSE; switch (action&0xFF) { case C_START: moveDescTrk = NULL; moveDescPos = zero; - trk = NULL; hidden = FALSE; mode = -1; if ( labelWhen < 2 || mainD.scale > labelScale || (labelEnable&(LABELENABLE_TRKDESC|LABELENABLE_ENDPT_ELEV))==0 ) { ErrorMessage( MSG_DESC_NOT_VISIBLE ); - return C_TERMINATE; + return C_ERROR; } - InfoMessage( _("Select and drag a description") ); - break; + SetAllTrackSelect( FALSE ); + /* no break */ + case wActionMove: + if ( labelWhen < 2 || mainD.scale > labelScale ) return C_CONTINUE; + mode = moveDescMode-1; // -1 means everything, 0 means elevations only, 1 means descriptions only + if ((moveDescTrk=FindTrackDescription(pos,&ep,&mode,TRUE,&hidden))!=NULL) { + if (mode==0) { + InfoMessage(_("Elevation description")); + } else { + if (moveDescMode == 1) { + moveDescTrk = NULL; + return C_CONTINUE; //Ignore other tracks if only looking for elevations + } + if (hidden) { + InfoMessage(_("Hidden description - 's' to Show, 'd' Details")); + moveDescPos = pos; + } else { + InfoMessage(_("Shown description - 'h' to Hide")); + moveDescPos = pos; + } + } + return C_CONTINUE; + } else { + moveDescTrk = NULL; + } + InfoMessage( _("Select and drag a description") ); + break; case C_TEXT: if (!moveDescTrk) return C_CONTINUE; + if (mode == 0) return C_CONTINUE; bChanged = FALSE; if (action>>8 == 's') { if ( ( GetTrkBits( moveDescTrk ) & TB_HIDEDESC) != 0 ) @@ -2372,97 +2661,105 @@ STATUS_T CmdMoveDescription( if ( ( GetTrkBits( moveDescTrk ) & TB_HIDEDESC) == 0 ) bChanged = TRUE; SetTrkBits( moveDescTrk, TB_HIDEDESC ); + ClrTrkBits( moveDescTrk, TB_DETAILDESC ); + } else if (action>>8 == 'd') { //Toggle Detailed + bChanged = TRUE; + if ((GetTrkBits( moveDescTrk ) & TB_DETAILDESC) != 0) + ClrTrkBits( moveDescTrk, TB_DETAILDESC); + else { + ClrTrkBits( moveDescTrk, TB_HIDEDESC ); + SetTrkBits( moveDescTrk, TB_DETAILDESC ); + } } if ( bChanged ) { - // We should push the draw/undraw of the description down - // but there is no clear way to do that - MainRedraw(); // CmdMoveDescription - } - /*no break*/ - case wActionMove: - if ( labelWhen < 2 || mainD.scale > labelScale ) return C_CONTINUE; - mode = moveDescMode-1; // -1 means everything, 0 means elevations only, 1 means descriptions only - if ((trk=FindTrackDescription(pos,&ep,&mode,TRUE,&hidden))!=NULL) { - if (mode==0) { - InfoMessage(_("Elevation description")); - } else { - if (hidden) { - InfoMessage(_("Hidden description - 's' to Show")); - moveDescTrk = trk; - moveDescPos = pos; - } else { - InfoMessage(_("Shown description - 'h' to Hide")); - moveDescTrk = trk; - moveDescPos = pos; - } - } - return C_CONTINUE; + return C_TERMINATE; } - InfoMessage( _("Select and drag a description") ); break; case C_DOWN: if (( labelWhen < 2 || mainD.scale > labelScale ) || (labelEnable&(LABELENABLE_TRKDESC|LABELENABLE_ENDPT_ELEV))==0 ) { ErrorMessage( MSG_DESC_NOT_VISIBLE ); - return C_TERMINATE; + return C_ERROR; } mode = moveDescMode-1; - trk = FindTrackDescription(pos,&ep,&mode,TRUE,&hidden); - if (trk == NULL ) + moveDescTrk = FindTrackDescription(pos,&ep,&mode,TRUE,&hidden); + if (moveDescTrk == NULL ) return C_CONTINUE; if (hidden) { - ClrTrkBits( trk, TB_HIDEDESC ); InfoMessage(_("Hidden Label - Drag to reveal")); } else { InfoMessage(_("Drag label")); } - UndoStart( _("Move Label"), "Modedesc( T%d )", GetTrkIndex(trk) ); - UndoModify( trk ); + if (ep == -1 ) + DrawTrack( moveDescTrk, &mainD, wDrawColorWhite ); /* no break */ case C_MOVE: + if (moveDescTrk == NULL ) + return C_CONTINUE; + UndoStart( _("Move Label"), "Modedesc( T%d )", GetTrkIndex(moveDescTrk) ); + UndoModify( moveDescTrk ); + ClrTrkBits( moveDescTrk, TB_HIDEDESC ); + hidden = FALSE; + /* no break */ case C_UP: - case C_REDRAW: if ( labelWhen < 2 || mainD.scale > labelScale ) - return C_TERMINATE; - if ( trk == NULL ) return C_CONTINUE; - STATUS_T status = C_ERROR; - if ( action == C_REDRAW ) { - if (mode==0) { - DrawEndPt2( &tempD, trk, ep, wDrawColorBlue ); - } else { - if (hidden) { - DrawTrack( trk,&tempD,wDrawColorAqua); - } else { - DrawTrack( trk,&tempD,wDrawColorBlue); - } - } - } + if ( moveDescTrk == NULL ) + return C_CONTINUE; + int rc = C_CONTINUE; switch (mode) { case 0: - return EndPtDescriptionMove( trk, ep, action, pos ); + rc = EndPtDescriptionMove( moveDescTrk, ep, action, pos ); + break; case 1: - return CompoundDescriptionMove( trk, action, pos ); + rc = CompoundDescriptionMove( moveDescTrk, action, pos ); + break; case 2: - return CurveDescriptionMove( trk, action, pos ); + rc = CurveDescriptionMove( moveDescTrk, action, pos ); + break; case 3: - return CornuDescriptionMove( trk, action, pos ); + rc = CornuDescriptionMove( moveDescTrk, action, pos ); + break; case 4: - return BezierDescriptionMove( trk, action, pos ); + rc = BezierDescriptionMove( moveDescTrk, action, pos ); + break; + case 5: + rc = StraightDescriptionMove( moveDescTrk, action, pos); + break; + case 6: + rc = JointDescriptionMove( moveDescTrk, action, pos); + break; } hidden = FALSE; if ( action == C_UP ) { - trk = NULL; + moveDescTrk = NULL; InfoMessage(_("To Hide, use Context Menu")); + return C_TERMINATE; + } + break; + case C_REDRAW: + if ( labelWhen < 2 || mainD.scale > labelScale ) + return C_CONTINUE; + if ( moveDescTrk ) { + if (mode==0) { + DrawEndPt2( &tempD, moveDescTrk, ep, drawColorPreviewSelected ); + } else { + if (hidden) { + DrawTrack( moveDescTrk,&tempD,wDrawColorAqua); + } else { + DrawTrack( moveDescTrk,&tempD,drawColorPreviewSelected); + } + } } break; - case C_CMDMENU: - if (trk == NULL) { - moveDescTrk = OnTrack( &pos, TRUE, FALSE ); + if (moveDescTrk != NULL && mode !=0) { + if ( GetLayerFrozen( GetTrkLayer( moveDescTrk ) ) ) { + moveDescTrk = NULL; + break; + } moveDescPos = pos; } else { - moveDescTrk = trk; moveDescPos = pos; } if ( moveDescTrk == NULL ) break; @@ -2470,8 +2767,10 @@ STATUS_T CmdMoveDescription( if ( moveDescM == NULL ) { moveDescM = MenuRegister( "Move Desc Toggle" ); moveDescMI = wMenuToggleCreate( moveDescM, "", _("Show/Hide Description"), 0, TRUE, ChangeDescFlag, NULL ); + moveDetailDescMI = wMenuToggleCreate( moveDescM, "", _("Toggle Detailed Description"), 0, TRUE, ChangeDetailedFlag, NULL ); } - wMenuToggleSet( moveDescMI, ( GetTrkBits( moveDescTrk ) & TB_HIDEDESC ) == 0 ); + wMenuToggleSet( moveDescMI, !( GetTrkBits( moveDescTrk ) & TB_HIDEDESC ) ); + wMenuToggleSet( moveDetailDescMI, ( GetTrkBits( moveDescTrk ) & TB_DETAILDESC ) ); menuPos = pos; wMenuPopupShow( moveDescM ); break; @@ -2572,6 +2871,8 @@ static STATUS_T CmdFlip( case C_CANCEL: #endif case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); if ( state == 0 ) return C_CONTINUE; DrawLine( &tempD, pos0, pos1, 0, wDrawColorBlack ); @@ -2654,7 +2955,9 @@ static BOOL_T SelectArea( lo.x >= base.x && hi.x <= base.x+size.x && lo.y >= base.y && hi.y <= base.y+size.y) { if ( (GetTrkSelected( trk )==0) == (action==C_UP) ) { - if (GetLayerModule(GetTrkLayer(trk))) { + if (GetLayerFrozen(GetTrkLayer(trk))) { + continue; + } else if (GetLayerModule(GetTrkLayer(trk))) { if (add) DoModuleTracks(GetTrkLayer(trk),SelectOneTrack,TRUE); else @@ -2693,12 +2996,14 @@ static BOOL_T SelectArea( break; //Draw to-be selected tracks versus not. trk = NULL; - if (selectMode == 0 && add) HighlightSelectedTracks(NULL, TRUE, TRUE); + if (selectMode == 1 && add) HighlightSelectedTracks(NULL, TRUE, TRUE); while ( TrackIterate( &trk ) ) { GetBoundingBox( trk, &hi, &lo ); if (GetLayerVisible( GetTrkLayer( trk ) ) && lo.x >= base.x && hi.x <= base.x+size.x && lo.y >= base.y && hi.y <= base.y+size.y) { + if (GetLayerFrozen(GetTrkLayer(trk))) + continue; if (GetLayerModule(GetTrkLayer(trk))) { if (add) DoModuleTracks(GetTrkLayer(trk),DrawSingleTrack,TRUE); @@ -2745,6 +3050,13 @@ static STATUS_T SelectTrack( return C_CONTINUE; } if (trk == NULL) return C_CONTINUE; + if (!CheckTrackLayerSilent( trk ) ) { + if (GetLayerFrozen(GetTrkLayer(trk)) ) { + trk = NULL; + InfoMessage(_("Track is in Frozen Layer")); + return C_CONTINUE; + } + } inDescribeCmd = FALSE; DescribeTrack( trk, msg, sizeof msg ); InfoMessage( msg ); @@ -2830,12 +3142,11 @@ void DrawHighlightBoxes(BOOL_T highlight_selected, BOOL_T select, track_p not_th coOrd size; size.x = max.x-origin.x; size.y = max.y-origin.y; - wPos_t w,h; - w = (wPos_t)((size.x/mainD.scale)*mainD.dpi+0.5+10); - h = (wPos_t)((size.y/mainD.scale)*mainD.dpi+0.5+10); - wPos_t x, y; - tempD.CoOrd2Pix(&tempD,origin,&x,&y); - wDrawFilledRectangle(tempD.d, x-5, y-5, w, h, wDrawColorPowderedBlue, wDrawOptTemp|wDrawOptTransparent); + origin.x -= 5*tempD.scale/tempD.dpi; + origin.y -= 5*tempD.scale/tempD.dpi; + size.x += 10*tempD.scale/tempD.dpi; + size.y += 10*tempD.scale/tempD.dpi; + DrawRectangle( &tempD, origin, size, wDrawColorPowderedBlue, DRAW_TRANSPARENT ); } } @@ -2853,7 +3164,7 @@ static STATUS_T CallDescribe(wAction_t action, coOrd pos) { return rc; } -static void CallPushDescribe(void * func) { +static void CallPushDescribe(void * unused) { if (moveDescTrk) { CallDescribe(C_START, moveDescPos); CallDescribe(C_DOWN, moveDescPos); @@ -2864,7 +3175,7 @@ static void CallPushDescribe(void * func) { static STATUS_T CmdSelect(wAction_t,coOrd); -static void CallPushModify(void * func) { +static void CallPushModify(void * unused) { if (moveDescTrk) { CmdSelect(C_LDOUBLE, moveDescPos); } @@ -2900,7 +3211,6 @@ static STATUS_T CmdSelect( } } - switch (action&0xFF) { case C_START: InfoMessage( _("Select track") ); @@ -2949,13 +3259,14 @@ static STATUS_T CmdSelect( CreateModifyAnchor(pos); showMode = SHOWMODIFY; } else { - if (QueryTrack(ht,Q_IS_ACTIVATEABLE)) + if (QueryTrack(ht,Q_IS_ACTIVATEABLE)) { CreateActivateAnchor(pos); showMode = SHOWACTIVATE; + } else wSetCursor(mainD.d,defaultCursor); } - } - } - } + } else wSetCursor(mainD.d,defaultCursor); + } else wSetCursor(mainD.d,defaultCursor); + } else wSetCursor(mainD.d,defaultCursor); break; case C_DOWN: @@ -2965,7 +3276,6 @@ static STATUS_T CmdSelect( } DYNARR_RESET(trkSeg_t,anchors_da); switch (mode) { - rc = C_CONTINUE; case MOVE: if (SelectedTracksAreFrozen() || (selectedTrackCount==0)) { rc = C_TERMINATE; @@ -2973,7 +3283,7 @@ static STATUS_T CmdSelect( } else if ((MyGetKeyState()&(WKEY_CTRL|WKEY_SHIFT))==WKEY_CTRL) { doingRotate = TRUE; doingMove = FALSE; - RotateAlign( FALSE ); + RotateAlign( I2VP(FALSE) ); rc = CmdRotate( action, pos ); } else if ((MyGetKeyState()&(WKEY_SHIFT|WKEY_CTRL))==WKEY_SHIFT) { doingMove = TRUE; @@ -2992,6 +3302,11 @@ static STATUS_T CmdSelect( return rc; break; case wActionExtKey: + if ((action>>8)==wAccelKey_Del) { + SelectDelete(); + break; + } + /* No Break */ case C_RMOVE: case C_MOVE: if (doingDouble) { @@ -3010,7 +3325,7 @@ static STATUS_T CmdSelect( doingMove = FALSE; doingRotate = FALSE; } else if (doingRotate == TRUE) { - RotateAlign( FALSE ); + RotateAlign( I2VP(FALSE) ); rc = CmdRotate( action, pos ); } else if (doingMove == TRUE) { rc = CmdMove( action, pos ); @@ -3040,7 +3355,7 @@ static STATUS_T CmdSelect( doingMove = FALSE; doingRotate = FALSE; } else if (doingRotate == TRUE) { - RotateAlign( FALSE ); + RotateAlign( I2VP(FALSE) ); rc = CmdRotate( action, pos ); } else if (doingMove == TRUE) { rc = CmdMove( action, pos ); @@ -3061,6 +3376,11 @@ static STATUS_T CmdSelect( break; case C_REDRAW: + if ( trk != NULL && IsTrackDeleted(trk) ) { + // If the track is deleted, then trk should be cleared + // TODO: This should be done at the point trk is deleted + trk = NULL; + } if (doingDouble) { return CallModify(action,pos); } @@ -3097,20 +3417,26 @@ static STATUS_T CmdSelect( DrawHighlightBoxes(FALSE, FALSE, trk); // If not on a track, show all tracks as going to be de-selected if selectZero on - if (!trk && selectZero ) { - HighlightSelectedTracks(NULL, TRUE, TRUE); - //Handle the SHIFT+ which means SelectAllConnected case - } else if ( trk && !IsTrackDeleted(trk)) { + if (!trk) { + if ( selectZero ) { + HighlightSelectedTracks(NULL, FALSE, TRUE); + } else { + HighlightSelectedTracks(trk, TRUE, FALSE); + } + } else { + //Handle the SHIFT+ which means SelectAllConnected case if ((MyGetKeyState() & WKEY_SHIFT) ) SelectConnectedTracks(trk, TRUE); //Highlight all connected //Normal case - handle track we are hovering over - else { + else { //Select=Add if (selectMode == 1) { if ((MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) == WKEY_CTRL) { - //Only Highlight if adding + //Only Highlight if adding otherwise show already selected if (!GetTrkSelected(trk)) DrawTrack(trk,&tempD,wDrawColorPreviewSelected); + else + DrawTrack(trk,&tempD,selectedColor); } else { if (GetTrkSelected(trk)) DrawTrack(trk,&tempD,wDrawColorPreviewUnselected); //Toggle @@ -3128,6 +3454,8 @@ static STATUS_T CmdSelect( //Only Highlight if adding if (!GetTrkSelected(trk)) DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); + else + DrawTrack(trk,&tempD,selectedColor); } } } @@ -3138,20 +3466,19 @@ static STATUS_T CmdSelect( else DoModuleTracks(GetTrkLayer(trk),DrawSingleTrack,TRUE); DrawHighlightLayer(GetTrkLayer(trk)); + } + //Select=Add + if (selectMode == 1) { + if (((MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) == WKEY_CTRL)) + HighlightSelectedTracks(trk, FALSE, TRUE); + else + HighlightSelectedTracks(trk, TRUE, FALSE); // Highlight all others selected + //Select=Only } else { - //Select=Add - if (selectMode == 1) { - if (((MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) == WKEY_CTRL)) - HighlightSelectedTracks(trk, TRUE, TRUE); - //else - // HighlightSelectedTracks(trk, TRUE, FALSE); Highlight all selected - //Select=Only - } else { - if (((MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) != WKEY_CTRL)) - HighlightSelectedTracks(trk, TRUE, TRUE); - //else - // HighlightSelectedTracks(trk, TRUE, TRUE); Highlight all selected - } + if (((MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) != WKEY_CTRL)) + HighlightSelectedTracks(trk, FALSE, TRUE); + else + HighlightSelectedTracks(trk, TRUE, FALSE); // Highlight all others selected } } //Finally add the anchors for any actions or snaps @@ -3222,28 +3549,41 @@ static STATUS_T CmdSelect( if (doingDouble) { return CallModify(action,pos); } + if ((action>>8) == 127 || (action>>8) == 8) { //Backspace or Delete key + SelectDelete(); + break; + } if ((action>>8) == 'c') { panCenter = pos; LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); } if ((action>>8) == 'e') { DoZoomExtents(0); } if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter('o'); + PanMenuEnter(I2VP('o')); } if ((action>>8) == '?') { if((moveDescTrk = OnTrack(&pos,FALSE,FALSE)) != NULL) moveDescPos = pos; - CallPushDescribe((void*)0); + CallPushDescribe(I2VP(0)); wSetCursor(mainD.d,defaultCursor); moveDescTrk = NULL; } break; + case C_CONFIRM: + if (doingDouble) + return CallModify(action,pos); + return C_CONTINUE; case C_FINISH: + if (doingDouble) { + CallModify(C_OK,pos); + CallModify(C_FINISH,pos); + } if (doingMove) UndoEnd(); doingDouble = FALSE; + wSetCursor(mainD.d,defaultCursor); break; default: if (doingDouble) return CallModify(action, pos); @@ -3259,8 +3599,8 @@ static STATUS_T CmdSelect( #include "bitmaps/bridge.xpm" #include "bitmaps/move.xpm" #include "bitmaps/rotate.xpm" -#include "bitmaps/flip.xpm" -#include "bitmaps/movedesc.xpm" +#include "bitmaps/reflect.xpm" +#include "bitmaps/description.xpm" static void SetMoveMode( char * line ) @@ -3272,19 +3612,20 @@ static void SetMoveMode( char * line ) enableMoveDraw = ((tmp&0x10) == 0); } -static void moveDescription( void ) { +static void moveDescription( void * unused ) { if (!moveDescTrk) return; int hidden = GetTrkBits( moveDescTrk) &TB_HIDEDESC ; if (hidden) ClrTrkBits( moveDescTrk, TB_HIDEDESC ); else SetTrkBits( moveDescTrk, TB_HIDEDESC ); + MainRedraw(); } EXPORT void InitCmdSelect( wMenu_p menu ) { - selectCmdInx = AddMenuButton( menu, CmdSelect, "cmdSelect", _("Select"), wIconCreatePixMap(select_xpm), + selectCmdInx = AddMenuButton( menu, CmdSelect, "cmdSelect", _("Select"), wIconCreatePixMap(select_xpm[iconSize]), LEVEL0, IC_CANCEL|IC_POPUP|IC_LCLICK|IC_CMDMENU|IC_WANT_MOVE|IC_WANT_MODKEYS, ACCL_SELECT, NULL ); } @@ -3303,68 +3644,72 @@ EXPORT void InitCmdSelect2( wMenu_p menu ) { if (moveMode > MAXMOVEMODE || moveMode < 0) moveMode = MAXMOVEMODE; selectPopup1M = MenuRegister( "Select Mode Menu" ); - wMenuPushCreate(selectPopup1M, "", _("Undo"), 0,(wMenuCallBack_p) UndoUndo, (void *) 0); - wMenuPushCreate(selectPopup1M, "", _("Redo"), 0,(wMenuCallBack_p) UndoRedo, (void *) 0); + wMenuPushCreate(selectPopup1M, "", _("Undo"), 0, UndoUndo, NULL); + wMenuPushCreate(selectPopup1M, "", _("Redo"), 0, UndoRedo, NULL); wMenuSeparatorCreate( selectPopup1M ); - wMenuPushCreate(selectPopup1M, "cmdDescribeMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, (void*) (intptr_t) modifyCmdInx); - wMenuPushCreate(selectPopup1M, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, (void*) (intptr_t) panCmdInx); - wMenuPushCreate(selectPopup1M, "cmdTrainMode", GetBalloonHelpStr("cmdTrainMode"), 0, DoCommandB, (void*) (intptr_t) trainCmdInx); + wMenuPushCreate(selectPopup1M, "cmdDescribeMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, I2VP(modifyCmdInx)); + wMenuPushCreate(selectPopup1M, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, I2VP(panCmdInx)); + wMenuPushCreate(selectPopup1M, "cmdTrainMode", GetBalloonHelpStr("cmdTrainMode"), 0, DoCommandB, I2VP(trainCmdInx)); wMenuSeparatorCreate( selectPopup1M ); - wMenuPushCreate(selectPopup1M, "", _("Zoom In"), 0,(wMenuCallBack_p) DoZoomUp, (void*) 1); - wMenuPushCreate( selectPopup1M, "", _("Zoom to extents - 'e'"), 0, (wMenuCallBack_p)DoZoomExtents, (void*) 0); + wMenuPushCreate(selectPopup1M, "", _("Zoom In"), 0, DoZoomUp, I2VP(1)); + wMenuPushCreate( selectPopup1M, "", _("Zoom to extents - 'e'"), 0, DoZoomExtents, I2VP(0) ); wMenu_p zoomPop1 = wMenuMenuCreate(selectPopup1M, "", _("&Zoom")); InitCmdZoom(NULL, NULL, zoomPop1, NULL); - wMenuPushCreate(selectPopup1M, "", _("Zoom Out"), 0, (wMenuCallBack_p) DoZoomDown, (void*) 1); - wMenuPushCreate(selectPopup1M, "", _("Pan to Origin - 'o'/'0'"), 0, (wMenuCallBack_p) PanMenuEnter, (void*) 'o'); - wMenuPushCreate(selectPopup1M, "", _("Pan Center Here - 'c'"), 0, (wMenuCallBack_p) PanHere, (void*) 3); + wMenuPushCreate(selectPopup1M, "", _("Zoom Out"), 0, DoZoomDown, I2VP(1)); + wMenuPushCreate(selectPopup1M, "", _("Pan to Origin - 'o'/'0'"), 0, PanMenuEnter, I2VP( 'o')); + wMenuPushCreate(selectPopup1M, "", _("Pan Center Here - 'c'"), 0, PanHere, I2VP( 3)); wMenuSeparatorCreate( selectPopup1M ); - wMenuPushCreate(selectPopup1M, "", _("Select All"), 0,(wMenuCallBack_p) SetAllTrackSelect, (void *) 1); - wMenuPushCreate(selectPopup1M, "",_("Select Current Layer"), 0,(wMenuCallBack_p) SelectCurrentLayer, (void *) 0); + wMenuPushCreate(selectPopup1M, "", _("Select All"), 0,(wMenuCallBack_p) SetAllTrackSelect, I2VP( 1)); + wMenuPushCreate(selectPopup1M, "",_("Select Current Layer"), 0, SelectCurrentLayer, I2VP( 0)); + AddIndexMenu( selectPopup1M, SelectByIndex); wMenuSeparatorCreate( selectPopup1M ); selectPopup2M = MenuRegister( "Track Selected Menu " ); - wMenuPushCreate(selectPopup2M, "", _("Undo"), 0,(wMenuCallBack_p) UndoUndo, (void *) 0); - wMenuPushCreate(selectPopup2M, "", _("Redo"), 0,(wMenuCallBack_p) UndoRedo, (void *) 0); + wMenuPushCreate(selectPopup2M, "", _("Undo"), 0, UndoUndo , NULL); + wMenuPushCreate(selectPopup2M, "", _("Redo"), 0, UndoRedo , NULL); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Zoom In"), 0,(wMenuCallBack_p) DoZoomUp, (void*) 1); - wMenuPushCreate(selectPopup2M, "", _("Zoom Out"), 0, (wMenuCallBack_p) DoZoomDown, (void*) 1); - wMenuPushCreate(selectPopup2M, "", _("Pan Center Here - 'c'"), 0, (wMenuCallBack_p) PanHere, (void*) 3); + wMenuPushCreate(selectPopup2M, "", _("Zoom In"), 0, DoZoomUp, I2VP( 1)); + wMenuPushCreate(selectPopup2M, "", _("Zoom Out"), 0, DoZoomDown, I2VP( 1)); + wMenuPushCreate( selectPopup2M, "", _("Zoom to extents - 'e'"), 0, DoZoomExtents, I2VP( 0)); + wMenuPushCreate( selectPopup2M, "", _("Zoom to selected - 's'"), 0, DoZoomExtents, I2VP( 1)); + wMenuPushCreate(selectPopup2M, "", _("Pan Center Here - 'c'"), 0, PanHere, I2VP( 3)); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Deselect All"), 0, (wMenuCallBack_p) SetAllTrackSelect, (void *) 0); + AddIndexMenu( selectPopup2M, SelectByIndex); + wMenuPushCreate(selectPopup2M, "", _("Deselect All"), 0, (wMenuCallBack_p) SetAllTrackSelect, I2VP( 0)); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Properties -'?'"), 0,(wMenuCallBack_p) CallPushDescribe, (void*)0); - menuPushModify = wMenuPushCreate(selectPopup2M, "", _("Modify/Activate Track"), 0,(wMenuCallBack_p) CallPushModify, (void*)0); + wMenuPushCreate(selectPopup2M, "", _("Properties -'?'"), 0, CallPushDescribe, I2VP(0)); + menuPushModify = wMenuPushCreate(selectPopup2M, "", _("Modify/Activate Track"), 0, CallPushModify, I2VP(0)); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Cut"), 0,(wMenuCallBack_p) EditCut, (void *) 0); - wMenuPushCreate(selectPopup2M, "", _("Copy"), 0,(wMenuCallBack_p) EditCopy, (void *) 0); - wMenuPushCreate(selectPopup2M, "", _("Paste"), 0, (wMenuCallBack_p) EditPaste, (void *) 0); - wMenuPushCreate(selectPopup2M, "", _("Clone"), 0, (wMenuCallBack_p) EditClone, (void *) 0); + wMenuPushCreate(selectPopup2M, "", _("Cut"), 0, EditCut, I2VP( 0)); + wMenuPushCreate(selectPopup2M, "", _("Copy"), 0, EditCopy, I2VP( 0)); + wMenuPushCreate(selectPopup2M, "", _("Paste"), 0, EditPaste, I2VP( 0)); + wMenuPushCreate(selectPopup2M, "", _("Clone"), 0, EditClone, I2VP( 0)); AddMoveMenu( selectPopup2M, QuickMove); selectPopup2RM = wMenuMenuCreate(selectPopup2M, "", _("Rotate...")); AddRotateMenu( selectPopup2RM, QuickRotate ); - rotateAlignMI = wMenuPushCreate( selectPopup2RM, "", _("Align"), 0, (wMenuCallBack_p)RotateAlign, (void* ) 1 ); + rotateAlignMI = wMenuPushCreate( selectPopup2RM, "", _("Align"), 0, RotateAlign, I2VP(1) ); wMenuSeparatorCreate( selectPopup2M ); - descriptionMI = wMenuPushCreate(selectPopup2M, "cmdMoveLabel", _("Show/Hide Description"), 0, (wMenuCallBack_p)moveDescription, (void*) 0); + descriptionMI = wMenuPushCreate(selectPopup2M, "cmdMoveLabel", _("Show/Hide Description"), 0, moveDescription, I2VP(0)); wMenuSeparatorCreate( selectPopup2M ); - hideMI = wMenuPushCreate(selectPopup2M, "", _("Hide/NoHide"), 0,(wMenuCallBack_p) SelectTunnel, (void *) 0); - bridgeMI = wMenuPushCreate(selectPopup2M, "", _("Bridge/NoBridge"), 0,(wMenuCallBack_p) SelectBridge, (void *) 0); - tiesMI = wMenuPushCreate(selectPopup2M, "", _("NoTies/Ties"), 0,(wMenuCallBack_p) SelectTies, (void *) 0); + hideMI = wMenuPushCreate(selectPopup2M, "", _("Hide/NoHide"), 0, SelectTunnel, I2VP( 0)); + bridgeMI = wMenuPushCreate(selectPopup2M, "", _("Bridge/NoBridge"), 0, SelectBridge, I2VP( 0)); + tiesMI = wMenuPushCreate(selectPopup2M, "", _("NoTies/Ties"), 0, SelectTies, I2VP( 0)); selectPopup2TM = wMenuMenuCreate(selectPopup2M, "", _("Thickness...")); - wMenuPushCreate( selectPopup2TM, "", _("Thin Tracks"), 0, (void*)(wMenuCallBack_p)SelectTrackWidth, (void *)0 ); - wMenuPushCreate( selectPopup2TM, "", _("Medium Tracks"), 0, (void*)(wMenuCallBack_p)SelectTrackWidth, (void *)2 ); - wMenuPushCreate( selectPopup2TM, "", _("Thick Tracks"), 0, (void*)(wMenuCallBack_p)SelectTrackWidth, (void *)3 ); + wMenuPushCreate( selectPopup2TM, "", _("Thin Tracks"), 0, SelectTrackWidth, I2VP(0 )); + wMenuPushCreate( selectPopup2TM, "", _("Medium Tracks"), 0, SelectTrackWidth, I2VP(2 )); + wMenuPushCreate( selectPopup2TM, "", _("Thick Tracks"), 0, SelectTrackWidth, I2VP(3 )); selectPopup2TYM = wMenuMenuCreate( selectPopup2M, "", _("LineType...") ); - wMenuPushCreate( selectPopup2TYM, "", _("Solid Line"), 0, (wMenuCallBack_p)SelectLineType, (void*)0 ); - wMenuPushCreate( selectPopup2TYM, "", _("Dashed Line"), 0, (wMenuCallBack_p)SelectLineType, (void*)1 ); - wMenuPushCreate( selectPopup2TYM, "", _("Dotted Line"), 0, (wMenuCallBack_p)SelectLineType, (void*)2 ); - wMenuPushCreate( selectPopup2TYM, "", _("Dash-Dotted Line"), 0, (wMenuCallBack_p)SelectLineType, (void*)3 ); - wMenuPushCreate( selectPopup2TYM, "", _("Dash-Dot-Dotted Line"), 0, (wMenuCallBack_p)SelectLineType, (void*)4 ); + wMenuPushCreate( selectPopup2TYM, "", _("Solid Line"), 0, SelectLineType, I2VP(0 )); + wMenuPushCreate( selectPopup2TYM, "", _("Dashed Line"), 0, SelectLineType, I2VP(1 )); + wMenuPushCreate( selectPopup2TYM, "", _("Dotted Line"), 0, SelectLineType, I2VP(2 )); + wMenuPushCreate( selectPopup2TYM, "", _("Dash-Dotted Line"), 0, SelectLineType, I2VP(3 )); + wMenuPushCreate( selectPopup2TYM, "", _("Dash-Dot-Dotted Line"), 0, SelectLineType, I2VP(4 )); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Move To Front"), 0,(wMenuCallBack_p) SelectAbove,(void *) 0); - wMenuPushCreate(selectPopup2M, "", _("Move To Back"), 0,(wMenuCallBack_p) SelectBelow, (void *) 0); + wMenuPushCreate(selectPopup2M, "", _("Move To Front"), 0, SelectAbove,I2VP( 0)); + wMenuPushCreate(selectPopup2M, "", _("Move To Back"), 0, SelectBelow, I2VP( 0)); wMenuSeparatorCreate( selectPopup2M ); - wMenuPushCreate(selectPopup2M, "", _("Group"), 0,(wMenuCallBack_p) DoGroup, (void *) 0); - wMenuPushCreate(selectPopup2M, "", _("UnGroup"), 0,(wMenuCallBack_p) DoUngroup, (void *) 0); + wMenuPushCreate(selectPopup2M, "", _("Group"), 0, DoGroup, I2VP( 0)); + wMenuPushCreate(selectPopup2M, "", _("UnGroup"), 0, DoUngroup, I2VP( 0)); wMenuSeparatorCreate( selectPopup2M ); ParamRegister( &rescalePG ); @@ -3375,41 +3720,38 @@ EXPORT void InitCmdSelect2( wMenu_p menu ) { EXPORT void InitCmdDelete( void ) { wIcon_p icon; - icon = wIconCreatePixMap( delete_xpm ); + icon = wIconCreatePixMap( delete_xpm[iconSize] ); AddToolbarButton( "cmdDelete", icon, IC_SELECTED, (wButtonCallBack_p)SelectDelete, 0 ); -#ifdef WINDOWS - wAttachAccelKey( wAccelKey_Del, 0, (wAccelKeyCallBack_p)SelectDelete, NULL ); -#endif } EXPORT void InitCmdTunnel( void ) { wIcon_p icon; - icon = wIconCreatePixMap( tunnel_xpm ); - AddToolbarButton( "cmdTunnel", icon, IC_SELECTED|IC_POPUP, (addButtonCallBack_t)SelectTunnel, NULL ); + icon = wIconCreatePixMap( tunnel_xpm[iconSize] ); + AddToolbarButton( "cmdTunnel", icon, IC_SELECTED|IC_POPUP, SelectTunnel, NULL ); } EXPORT void InitCmdBridge( void) { wIcon_p icon; - icon = wIconCreatePixMap( bridge_xpm ); - AddToolbarButton( "cmdBridge", icon, IC_SELECTED|IC_POPUP, (addButtonCallBack_t)SelectBridge, NULL ); + icon = wIconCreatePixMap( bridge_xpm[iconSize] ); + AddToolbarButton( "cmdBridge", icon, IC_SELECTED|IC_POPUP, SelectBridge, NULL ); } EXPORT void InitCmdMoveDescription( wMenu_p menu ) { - AddMenuButton( menu, CmdMoveDescription, "cmdMoveLabel", _("Move Description"), wIconCreatePixMap(movedesc_xpm), - LEVEL0, IC_STICKY|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, ACCL_MOVEDESC, (void*) 0 ); + AddMenuButton( menu, CmdMoveDescription, "cmdMoveLabel", _("Move Description"), wIconCreatePixMap(description_xpm[iconSize]), + LEVEL0, IC_STICKY|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, ACCL_MOVEDESC, I2VP( 0 )); } EXPORT void InitCmdMove( wMenu_p menu ) { - moveCmdInx = AddMenuButton( menu, CmdMove, "cmdMove", _("Move"), wIconCreatePixMap(move_xpm), + moveCmdInx = AddMenuButton( menu, CmdMove, "cmdMove", _("Move"), wIconCreatePixMap(move_xpm[iconSize]), LEVEL0, IC_STICKY|IC_SELECTED|IC_CMDMENU|IC_WANT_MOVE, ACCL_MOVE, NULL ); - rotateCmdInx = AddMenuButton( menu, CmdRotate, "cmdRotate", _("Rotate"), wIconCreatePixMap(rotate_xpm), + rotateCmdInx = AddMenuButton( menu, CmdRotate, "cmdRotate", _("Rotate"), wIconCreatePixMap(rotate_xpm[iconSize]), LEVEL0, IC_STICKY|IC_SELECTED|IC_CMDMENU|IC_WANT_MOVE, ACCL_ROTATE, NULL ); - /*flipCmdInx =*/ AddMenuButton( menu, CmdFlip, "cmdFlip", _("Flip"), wIconCreatePixMap(flip_xpm), + flipCmdInx = AddMenuButton( menu, CmdFlip, "cmdFlip", _("Flip"), wIconCreatePixMap(reflect_xpm[iconSize]), LEVEL0, IC_STICKY|IC_SELECTED|IC_CMDMENU, ACCL_FLIP, NULL ); } diff --git a/app/bin/cselect.h b/app/bin/cselect.h index a9913bf..0f36cfd 100644 --- a/app/bin/cselect.h +++ b/app/bin/cselect.h @@ -23,7 +23,8 @@ #define CSELECT_H #include "common.h" -#include "track.h" + +#define defaultCursor wCursorCross extern wIndex_t selectCmdInx; extern wIndex_t moveCmdInx; @@ -31,24 +32,28 @@ extern wIndex_t rotateCmdInx; extern int incrementalDrawLimit; extern long selectedTrackCount; -void InvertTrackSelect( void * ); -void OrphanedTrackSelect( void * ); +void InvertTrackSelect( void * unused ); +void OrphanedTrackSelect( void * unused ); void SetAllTrackSelect( BOOL_T ); -void SelectTunnel( void ); -void SelectBridge( void ); -void SelectTies( void ); +void SelectTunnel( void * unused ); +void SelectBridge( void * unused ); +void SelectTies( void * unused ); void SelectRecount( void ); void SelectTrackWidth( void* ); -void SelectDelete( void ); +int SelectDelete( void ); +void TrySelectDelete( void ); void MoveToJoin( track_p, EPINX_T, track_p, EPINX_T ); -void MoveSelectedTracksToCurrentLayer( void ); -void SelectCurrentLayer( void ); -void ClearElevations( void ); +void MoveSelectedTracksToCurrentLayer( void * unused ); +void SelectCurrentLayer( void * unused ); +void DeselectLayer( unsigned int ); +void SelectByIndex( void* string); +void ClearElevations( void * unused ); void AddElevations( DIST_T ); -void DoRefreshCompound( void ); +void DoRefreshCompound( void * unused ); void WriteSelectedTracksToTempSegs( void ); -void DoRescale( void ); +void DoRescale( void *unused ); STATUS_T CmdMoveDescription( wAction_t, coOrd ); void DrawHighlightBoxes(BOOL_T, BOOL_T,track_p); +void HighlightSelectedTracks(track_p trk_ignore, BOOL_T keep, BOOL_T invert ); #endif diff --git a/app/bin/csensor.c b/app/bin/csensor.c index 4f395c2..b6f2224 100644 --- a/app/bin/csensor.c +++ b/app/bin/csensor.c @@ -46,23 +46,19 @@ static const char rcsid[] = "@(#) : $Id$"; -#include <ctype.h> -#include <string.h> - #include "compound.h" +#include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" #include "param.h" #include "track.h" #include "trackx.h" -#ifdef WINDOWS +#include "common-ui.h" +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS -#include "utility.h" -#include "messages.h" +#endif // UTFCONVERT EXPORT TRKTYP_T T_SENSOR = -1; @@ -84,6 +80,7 @@ static char sensorScript[STR_LONG_SIZE]; #endif typedef struct sensorData_t { + extraDataBase_t base; coOrd orig; BOOL_T IsHilite; char * name; @@ -92,7 +89,7 @@ typedef struct sensorData_t { static sensorData_p GetsensorData ( track_p trk ) { - return (sensorData_p) GetTrkExtraData(trk); + return GET_EXTRA_DATA( trk, T_SENSOR, sensorData_t ); } #define RADIUS 6 @@ -275,9 +272,9 @@ static BOOL_T WriteSensor ( track_p t, FILE * f ) sensorData_p xx = GetsensorData(t); char *sensorName = MyStrdup(xx->name); -#ifdef WINDOWS +#ifdef UTFCONVERT sensorName = Convert2UTF8(sensorName); -#endif // WINDOWS +#endif // UTFCONVERT rc &= fprintf(f, "SENSOR %d %u %s %d %0.6f %0.6f \"%s\" \"%s\"\n", GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), @@ -305,9 +302,9 @@ static BOOL_T ReadSensor ( char * line ) return FALSE; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(name); -#endif // WINDOWS +#endif // UTFCONVERT trk = NewTrack(index, T_SENSOR, 0, sizeof(sensorData_t)); SetTrkVisible(trk, visible); @@ -386,16 +383,16 @@ static char sensorEditScript[STR_LONG_SIZE]; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramData_t sensorEditPLs[] = { #define I_SENSORNAME (0) - /*0*/ { PD_STRING, sensorEditName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(sensorEditName)}, + /*0*/ { PD_STRING, sensorEditName, "name", PDO_NOPREF|PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(sensorEditName)}, #define I_ORIGX (1) - /*1*/ { PD_FLOAT, &sensorEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Orgin X") }, + /*1*/ { PD_FLOAT, &sensorEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Origin X") }, #define I_ORIGY (2) /*2*/ { PD_FLOAT, &sensorEditOrig.y, "origy", PDO_DIM, &r_1000_1000, N_("Origin Y") }, #define I_SENSORSCRIPT (3) - /*3*/ { PD_STRING, sensorEditScript, "script", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Script"), 0, 0, sizeof(sensorEditScript)}, + /*3*/ { PD_STRING, sensorEditScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof(sensorEditScript)}, }; -static paramGroup_t sensorEditPG = { "sensorEdit", 0, sensorEditPLs, sizeof sensorEditPLs/sizeof sensorEditPLs[0] }; +static paramGroup_t sensorEditPG = { "sensorEdit", 0, sensorEditPLs, COUNT( sensorEditPLs ) }; static wWin_p sensorEditW; static void SensorEditOk ( void * junk ) @@ -479,6 +476,7 @@ static STATUS_T CmdSensor ( wAction_t action, coOrd pos ) switch (action) { case C_START: InfoMessage(_("Place sensor")); + SetAllTrackSelect( FALSE ); create = FALSE; return C_CONTINUE; case C_DOWN: @@ -509,13 +507,9 @@ static POS_T ctlhiliteBorder; static wDrawColor ctlhiliteColor = 0; static void DrawSensorTrackHilite( void ) { - wPos_t x, y, w, h; if (ctlhiliteColor==0) ctlhiliteColor = wDrawColorGray(87); - w = (wPos_t)((ctlhiliteSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((ctlhiliteSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,ctlhiliteOrig,&x,&y); - wDrawFilledRectangle( tempD.d, x, y, w, h, ctlhiliteColor, wDrawOptTemp|wDrawOptTransparent ); + DrawRectangle( &tempD, ctlhiliteOrig, ctlhiliteSize, ctlhiliteColor, DRAW_TRANSPARENT ); } static int SensorMgmProc ( int cmd, void * data ) @@ -580,12 +574,12 @@ EXPORT void SensorMgmLoad ( void ) static wIcon_p sensorI = NULL; if (sensorI == NULL) { - sensorI = wIconCreatePixMap( sensor_xpm ); + sensorI = wIconCreatePixMap( sensor_xpm[iconSize] ); } TRK_ITERATE(trk) { if (GetTrkType(trk) != T_SENSOR) continue; - ContMgmLoad (sensorI, SensorMgmProc, (void *) trk ); + ContMgmLoad (sensorI, SensorMgmProc, trk ); } } @@ -594,7 +588,7 @@ EXPORT void SensorMgmLoad ( void ) EXPORT void InitCmdSensor ( wMenu_p menu ) { AddMenuButton( menu, CmdSensor, "cmdSensor", _("Sensor"), - wIconCreatePixMap( sensor_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_SENSOR, NULL ); + wIconCreatePixMap( sensor_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_SENSOR, NULL ); } EXPORT void InitTrkSensor ( void ) diff --git a/app/bin/csignal.c b/app/bin/csignal.c index 0fc09e6..83609e1 100644 --- a/app/bin/csignal.c +++ b/app/bin/csignal.c @@ -47,23 +47,19 @@ static const char rcsid[] = "@(#) : $Id$"; -#include <ctype.h> -#include <string.h> - #include "compound.h" +#include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" #include "param.h" #include "track.h" #include "trackx.h" -#ifdef WINDOWS +#include "common-ui.h" +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS -#include "utility.h" -#include "messages.h" +#endif // UTFCONVERT EXPORT TRKTYP_T T_SIGNAL = -1; @@ -93,6 +89,7 @@ static dynArr_t signalAspect_da; #define signalAspect(N) DYNARR_N( signalAspect_t, signalAspect_da, N ) typedef struct signalData_t { + extraDataBase_t base; coOrd orig; ANGLE_T angle; char * name; @@ -104,7 +101,7 @@ typedef struct signalData_t { static signalData_p GetsignalData ( track_p trk ) { - return (signalData_p) GetTrkExtraData(trk); + return GET_EXTRA_DATA( trk, T_SIGNAL, signalData_t ); } #define BASEX 6 @@ -343,9 +340,9 @@ static BOOL_T WriteSignal ( track_p t, FILE * f ) signalData_p xx = GetsignalData(t); char *signalName = MyStrdup(xx->name); -#ifdef WINDOWS +#ifdef UTFCONVERT signalName = Convert2UTF8(signalName); -#endif // WINDOWS +#endif // UTFCONVERT rc &= fprintf(f, "SIGNAL %d %u %s %d %0.6f %0.6f %0.6f %d \"%s\"\n", GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), @@ -383,9 +380,9 @@ static BOOL_T ReadSignal ( char * line ) return FALSE; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(name); -#endif // WINDOWS +#endif // UTFCONVERT DYNARR_RESET( signalAspect_p, signalAspect_da ); while ( (cp = GetNextLine()) != NULL ) { @@ -494,7 +491,7 @@ static char signalAspectEditScript[STR_LONG_SIZE]; static long signalAspectEditIndex; static paramIntegerRange_t r1_3 = {1, 3}; -static wPos_t aspectListWidths[] = { STR_SHORT_SIZE, 150 }; +static wWinPix_t aspectListWidths[] = { STR_SHORT_SIZE, 150 }; static const char * aspectListTitles[] = { N_("Name"), N_("Script") }; static paramListData_t aspectListData = {10, 400, 2, aspectListWidths, aspectListTitles}; @@ -506,9 +503,9 @@ static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramFloatRange_t r0_360 = { 0.0, 360.0, 80 }; static paramData_t signalEditPLs[] = { #define I_SIGNALNAME (0) - /*0*/ { PD_STRING, signalEditName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(signalEditName)}, + /*0*/ { PD_STRING, signalEditName, "name", PDO_NOPREF|PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(signalEditName)}, #define I_ORIGX (1) - /*1*/ { PD_FLOAT, &signalEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Orgin X") }, + /*1*/ { PD_FLOAT, &signalEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Origin X") }, #define I_ORIGY (2) /*2*/ { PD_FLOAT, &signalEditOrig.y, "origy", PDO_DIM, &r_1000_1000, N_("Origin Y") }, #define I_ANGLE (3) @@ -519,27 +516,27 @@ static paramData_t signalEditPLs[] = { #define aspectSelL ((wList_p)signalEditPLs[I_SIGNALASPECTLIST].control) /*5*/ { PD_LIST, NULL, "inx", PDO_DLGRESETMARGIN|PDO_DLGRESIZE, &aspectListData, NULL, BL_MANY }, #define I_SIGNALASPECTEDIT (6) - /*6*/ { PD_BUTTON, (void*)AspectEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit Aspect") }, + /*6*/ { PD_BUTTON, AspectEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit Aspect") }, #define I_SIGNALASPECTADD (7) - /*7*/ { PD_BUTTON, (void*)AspectAdd, "add", PDO_DLGCMDBUTTON, NULL, N_("Add Aspect") }, + /*7*/ { PD_BUTTON, AspectAdd, "add", PDO_DLGCMDBUTTON, NULL, N_("Add Aspect") }, #define I_SIGNALASPECTDELETE (8) - /*8*/ { PD_BUTTON, (void*)AspectDelete, "delete", 0, NULL, N_("Delete Aspect") }, + /*8*/ { PD_BUTTON, AspectDelete, "delete", 0, NULL, N_("Delete Aspect") }, }; -static paramGroup_t signalEditPG = { "signalEdit", 0, signalEditPLs, sizeof signalEditPLs/sizeof signalEditPLs[0] }; +static paramGroup_t signalEditPG = { "signalEdit", 0, signalEditPLs, COUNT( signalEditPLs ) }; static wWin_p signalEditW; static paramIntegerRange_t rm1_999999 = { -1, 999999 }; static paramData_t aspectEditPLs[] = { #define I_ASPECTNAME (0) - /*0*/ { PD_STRING, signalAspectEditName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(signalAspectEditName)}, + /*0*/ { PD_STRING, signalAspectEditName, "name", PDO_NOPREF|PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(signalAspectEditName)}, #define I_ASPECTSCRIPT (1) - /*1*/ { PD_STRING, signalAspectEditScript, "script", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Script"), 0, 0, sizeof(signalAspectEditScript)}, + /*1*/ { PD_STRING, signalAspectEditScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof(signalAspectEditScript)}, #define I_ASPECTINDEX (2) /*2*/ { PD_LONG, &signalAspectEditIndex, "index", PDO_NOPREF, &rm1_999999, N_("Aspect Index"), BO_READONLY }, }; -static paramGroup_t aspectEditPG = { "aspectEdit", 0, aspectEditPLs, sizeof aspectEditPLs/sizeof aspectEditPLs[0] }; +static paramGroup_t aspectEditPG = { "aspectEdit", 0, aspectEditPLs, COUNT( aspectEditPLs ) }; static wWin_p aspectEditW; @@ -794,6 +791,7 @@ static STATUS_T CmdSignal ( wAction_t action, coOrd pos ) case C_START: InfoMessage(_("Place base of signal")); create = FALSE; + SetAllTrackSelect( FALSE ); return C_CONTINUE; case C_DOWN: SnapPos(&pos); @@ -827,13 +825,9 @@ static POS_T sighiliteBorder; static wDrawColor sighiliteColor = 0; static void DrawSignalTrackHilite( void ) { - wPos_t x, y, w, h; if (sighiliteColor==0) sighiliteColor = wDrawColorGray(87); - w = (wPos_t)((sighiliteSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((sighiliteSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,sighiliteOrig,&x,&y); - wDrawFilledRectangle( tempD.d, x, y, w, h, sighiliteColor, wDrawOptTemp|wDrawOptTransparent ); + DrawRectangle( &tempD, sighiliteOrig, sighiliteSize, sighiliteColor, DRAW_TRANSPARENT ); } static int SignalMgmProc ( int cmd, void * data ) @@ -898,12 +892,12 @@ EXPORT void SignalMgmLoad ( void ) static wIcon_p signalI = NULL; if (signalI == NULL) { - signalI = wIconCreatePixMap( signal_xpm ); + signalI = wIconCreatePixMap( signal_xpm[iconSize] ); } TRK_ITERATE(trk) { if (GetTrkType(trk) != T_SIGNAL) continue; - ContMgmLoad (signalI, SignalMgmProc, (void *) trk ); + ContMgmLoad (signalI, SignalMgmProc, trk ); } } @@ -912,7 +906,7 @@ EXPORT void SignalMgmLoad ( void ) EXPORT void InitCmdSignal ( wMenu_p menu ) { AddMenuButton( menu, CmdSignal, "cmdSignal", _("Signal"), - wIconCreatePixMap( signal_xpm ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_SIGNAL, NULL ); + wIconCreatePixMap( signal_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_SIGNAL, NULL ); } EXPORT void InitTrkSignal ( void ) diff --git a/app/bin/csnap.c b/app/bin/csnap.c index eb58bc4..5c437fa 100644 --- a/app/bin/csnap.c +++ b/app/bin/csnap.c @@ -20,17 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" -#define bigdot_width 3 +#define bigdot_width 2 +int log_timedrawgrid = 0; /***************************************************************************** * @@ -97,7 +94,7 @@ EXPORT void MapGrid( static DIST_T Gdx, Gdy, Ddx, Ddy; static coOrd GDorig; -static wPos_t lborder, bborder; +static wDrawPix_t lborder, bborder; void static DrawGridPoint( drawCmd_p D, @@ -108,7 +105,7 @@ void static DrawGridPoint( coOrd p0, BOOL_T bigdot ) { - wPos_t x0, y0; + // Map Grid index to Layout pos POS_T x; x = (p0.x*Gdx + p0.y*Gdy) + orig.x; p0.y = (p0.y*Gdx - p0.x*Gdy) + orig.y; @@ -117,20 +114,14 @@ void static DrawGridPoint( ( p0.x < 0.0 || p0.x > size->x || p0.y < 0.0 || p0.y > size->y ) ) return; - p0.x -= D->orig.x; - p0.y -= D->orig.y; - x = (p0.x*Ddx + p0.y*Ddy); - p0.y = (p0.y*Ddx - p0.x*Ddy); - p0.x = x; - if ( p0.x < 0.0 || p0.x > D->size.x || - p0.y < 0.0 || p0.y > D->size.y ) - return; - x0 = (wPos_t)(p0.x*dpi+0.5) + lborder; - y0 = (wPos_t)(p0.y*dpi+0.5) + bborder; - if ( bigdot ) - wDrawFilledCircle(D->d, x0, y0, (wPos_t)(bigdot_width+0.5)/2, Color, (wDrawOpts)D->funcs->options ); - else - wDrawPoint( D->d, x0, y0, Color, (wDrawOpts)D->funcs->options ); + DIST_T r; + if ( bigdot ) { + r = (bigdot_width+0.5)/2 - 0.5; + } else { + r = 0.75; + } + r /= dpi; + DrawFillCircle( D, p0, r, Color ); } @@ -144,7 +135,6 @@ static void DrawGridLine( coOrd p0, coOrd p1 ) { - wPos_t x0, y0, x1, y1; POS_T x; x = (p0.x*Gdx + p0.y*Gdy) + orig.x; p0.y = (p0.y*Gdx - p0.x*Gdy) + orig.y; @@ -154,32 +144,10 @@ static void DrawGridLine( p1.x = x; if (size && clip && !ClipLine( &p0, &p1, zero, 0.0, *size )) return; - p0.x -= D->orig.x; - p0.y -= D->orig.y; - p1.x -= D->orig.x; - p1.y -= D->orig.y; - x = (p0.x*Ddx + p0.y*Ddy); - p0.y = (p0.y*Ddx - p0.x*Ddy); - p0.x = x; - x = (p1.x*Ddx + p1.y*Ddy); - p1.y = (p1.y*Ddx - p1.x*Ddy); - p1.x = x; - if (clip && !ClipLine( &p0, &p1, zero, 0.0, D->size )) - return; - x0 = (wPos_t)(p0.x*dpi+0.5) + lborder; - y0 = (wPos_t)(p0.y*dpi+0.5) + bborder; - x1 = (wPos_t)(p1.x*dpi+0.5) + lborder; - y1 = (wPos_t)(p1.y*dpi+0.5) + bborder; - wDrawLine( D->d, x0, y0, x1, y1, 0, wDrawLineSolid, Color, (wDrawOpts)D->funcs->options ); + DrawLine( D, p0, p1, 0, Color ); } -#ifdef WINDOWS -#define WONE (1) -#else -#define WONE (0) -#endif - EXPORT void DrawGrid( drawCmd_p D, coOrd * size, @@ -209,6 +177,7 @@ EXPORT void DrawGrid( cross0_bm = wDrawBitMapCreate( mainD.d, cross0_width, cross0_height, 2, 2, cross0_bits ); #endif + unsigned long time0 = wGetTimer(); wSetCursor( mainD.d, wCursorWait ); dpi = D->dpi/D->scale; Gdx = cos(D2R(Gangle)); @@ -330,6 +299,7 @@ EXPORT void DrawGrid( done: wSetCursor( mainD.d, defaultCursor ); + LOG( log_timedrawgrid, 1, ( "DrawGrid time = %lu mS\n", wGetTimer()-time0 ) ); } @@ -431,12 +401,14 @@ typedef struct { static gridHVData grid = { { 1.0, 0, 1 }, { 1.0, 0, 1 } }; -EXPORT void SnapPos( coOrd * pos ) +EXPORT BOOL_T SnapPos( coOrd * pos ) { coOrd p; DIST_T spacing; + if ((MyGetKeyState() & WKEY_ALT) != 0) + return FALSE; if ( grid.Vert.Enable == FALSE && grid.Horz.Enable == FALSE ) - return; + return FALSE; p = *pos; p.x -= grid.Orig.x; p.y -= grid.Orig.y; @@ -460,6 +432,7 @@ EXPORT void SnapPos( coOrd * pos ) REORIGIN1( p, grid.Angle, grid.Orig ); *pos = p; InfoPos( p ); + return TRUE; } @@ -513,7 +486,7 @@ static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramFloatRange_t r0_360 = { 0.0, 360.0, 80 }; static char *gridLabels[] = { "", NULL }; static paramData_t gridPLs[] = { - { PD_MESSAGE, N_("Horz"), NULL, 0, (void*)60 }, + { PD_MESSAGE, N_("Horz"), NULL, 0, I2VP(60) }, #define I_HORZSPACING (1) { PD_FLOAT, &grid.Horz.Spacing, "horzspacing", PDO_DIM, &r0_999999, N_("Spacing") }, #define I_HORZDIVISION (2) @@ -521,7 +494,7 @@ static paramData_t gridPLs[] = { #define I_HORZENABLE (3) #define gridHorzEnableT ((wChoice_p)gridPLs[I_HORZENABLE].control) { PD_TOGGLE, &grid.Horz.Enable, "horzenable", 0, gridLabels, N_("Enable"), BC_HORZ|BC_NOBORDER }, - { PD_MESSAGE, N_("Vert"), NULL, PDO_DLGNEWCOLUMN|PDO_DLGWIDE, (void*)60}, + { PD_MESSAGE, N_("Vert"), NULL, PDO_DLGNEWCOLUMN|PDO_DLGWIDE, I2VP(60) }, #define I_VERTSPACING (5) { PD_FLOAT, &grid.Vert.Spacing, "vertspacing", PDO_DIM, &r0_999999, NULL }, #define I_VERTDIVISION (6) @@ -539,7 +512,7 @@ static paramData_t gridPLs[] = { #define gridShowT ((wChoice_p)gridPLs[I_SHOW].control) { PD_TOGGLE, &grid.Show, "show", PDO_DLGIGNORELABELWIDTH, gridLabels, N_("Show"), BC_HORZ|BC_NOBORDER } }; -static paramGroup_t gridPG = { "grid", PGO_RECORD, gridPLs, sizeof gridPLs/sizeof gridPLs[0] }; +static paramGroup_t gridPG = { "grid", PGO_RECORD, gridPLs, COUNT( gridPLs ) }; static BOOL_T GridChanged( void ) @@ -566,7 +539,7 @@ static void RedrawGrid( void ) } -static void GridOk( void * junk ) +static void GridOk( void * unused ) { long changes; @@ -678,7 +651,7 @@ static void GridDlgUpdate( static void SnapGridRotate( void * pangle ) { - ANGLE_T angle = (ANGLE_T)(long)pangle; + ANGLE_T angle = (ANGLE_T)VP2L(pangle); wDrawDelayUpdate( tempD.d, TRUE ); grid.Orig = cmdMenuPos; grid.Angle += angle/1000; @@ -694,9 +667,6 @@ EXPORT STATUS_T CmdGrid( coOrd pos ) { STATUS_T rc; -#ifdef TIMEDRAWGRID - unsigned long time0, time1, time2; -#endif switch (action) { @@ -741,20 +711,10 @@ EXPORT STATUS_T CmdGrid( return rc; case C_UP: case C_RUP: -#ifdef TIMEDRAWGRID - time0 = wGetTimer(); -#endif -#ifdef TIMEDRAWGRID - time1 = wGetTimer(); -#endif rc = GridAction( action, pos, &grid.Orig, &grid.Angle ); ParamLoadControls( &gridPG ); RedrawGrid(); oldGrid = grid; -#ifdef TIMEDRAWGRID - time2 = wGetTimer(); - InfoMessage( "undraw %ld, draw %ld", (long)(time1-time0), (long)(time2-time1) ); -#endif return rc; case C_CMDMENU: @@ -788,28 +748,29 @@ EXPORT wIndex_t InitGrid( wMenu_p menu ) snapGridPopupM = MenuRegister( "Snap Grid Rotate" ); AddRotateMenu( snapGridPopupM, SnapGridRotate ); GridButtonUpdate( 0 ); + log_timedrawgrid = LogFindIndex( "timedrawgrid" ); return InitCommand( menu, CmdGrid, N_("Change Grid..."), NULL, LEVEL0, IC_CMDMENU, ACCL_GRIDW ); } -EXPORT void SnapGridEnable( void ) +EXPORT void SnapGridEnable( void * unused ) { grid.Vert.Enable = grid.Horz.Enable = !( grid.Vert.Enable || grid.Horz.Enable ); GridButtonUpdate( (CHK_HENABLE|CHK_VENABLE) ); } -EXPORT void SnapGridShow( void ) +EXPORT void SnapGridShow( void * unused ) { grid.Show = !grid.Show; GridButtonUpdate( CHK_SHOW ); } -#include "bitmaps/snapcurs.xbm" -#include "bitmaps/snapvis.xbm" +#include "bitmaps/snap-curs.xpm" +#include "bitmaps/snap-grid.xpm" EXPORT void InitSnapGridButtons( void ) { - snapGridEnable_b = AddToolbarButton( "cmdGridEnable", wIconCreateBitMap(snapcurs_width, snapcurs_height, snapcurs_bits, wDrawColorBlack), 0, (addButtonCallBack_t)SnapGridEnable, NULL ); - snapGridShow_b = AddToolbarButton( "cmdGridShow", wIconCreateBitMap(snapvis_width, snapvis_height, snapvis_bits, wDrawColorBlack), IC_MODETRAIN_TOO, (addButtonCallBack_t)SnapGridShow, NULL ); + snapGridEnable_b = AddToolbarButton( "cmdGridEnable", wIconCreatePixMap(snap_curs_xpm[iconSize] ), 0, SnapGridEnable, NULL ); + snapGridShow_b = AddToolbarButton( "cmdGridShow", wIconCreatePixMap(snap_grid_xpm[iconSize] ), IC_MODETRAIN_TOO, SnapGridShow, NULL ); } diff --git a/app/bin/csplit.c b/app/bin/csplit.c index c2b516a..49b87ce 100644 --- a/app/bin/csplit.c +++ b/app/bin/csplit.c @@ -22,11 +22,11 @@ #include "cundo.h" #include "compound.h" -#include "i18n.h" -#include "messages.h" +#include "cselect.h" #include "track.h" -#include "utility.h" +#include "draw.h" #include "fileio.h" +#include "common-ui.h" static wMenu_p splitPopupM[2]; static wMenuToggle_p splitPopupMI[2][4]; @@ -36,9 +36,9 @@ static BOOL_T splitTrkFlip; static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) -static void ChangeSplitEPMode( wBool_t set, void * mode ) +static void ChangeSplitEPMode( void * mode ) { - long imode = (long)mode; + long imode = VP2L(mode); long option; int inx0, inx; @@ -59,7 +59,7 @@ static void ChangeSplitEPMode( wBool_t set, void * mode ) DrawEndPt( &mainD, splitTrkTrk[1], splitTrkEP[1], wDrawColorBlack ); } -static void CreateSplitAnchorAngle(coOrd pos, track_p t, BOOL_T end, ANGLE_T a) { +static void CreateSplitAnchorAngle(coOrd pos, track_p t, BOOL_T end, ANGLE_T a, BOOL_T trim) { DIST_T d = tempD.scale*0.1; DIST_T w = tempD.scale/tempD.dpi*4; int i; @@ -68,8 +68,8 @@ static void CreateSplitAnchorAngle(coOrd pos, track_p t, BOOL_T end, ANGLE_T a) i = anchors_da.cnt-1; anchors(i).type = SEG_STRLIN; anchors(i).color = wDrawColorBlue; - Translate(&anchors(i).u.l.pos[0],pos,a,GetTrkGauge(t)); - Translate(&anchors(i).u.l.pos[1],pos,a,-GetTrkGauge(t)); + Translate(&anchors(i).u.l.pos[0],pos,a,trim?2*GetTrkGauge(t):GetTrkGauge(t)); + Translate(&anchors(i).u.l.pos[1],pos,a,trim?2*-GetTrkGauge(t):-GetTrkGauge(t)); anchors(i).width = w; } else { DYNARR_APPEND(trkSeg_t,anchors_da,1); @@ -95,13 +95,34 @@ static void CreateSplitAnchorAngle(coOrd pos, track_p t, BOOL_T end, ANGLE_T a) static void CreateSplitAnchor(coOrd pos, track_p t, BOOL_T end) { ANGLE_T a = NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0); - CreateSplitAnchorAngle(pos,t,end,a); + CreateSplitAnchorAngle(pos,t,end,a,FALSE); +} + +static void CreateTrimAnchorLeg(coOrd pos, ANGLE_T a, track_p t) { + DIST_T d = tempD.scale*0.1; + DIST_T w = tempD.scale/tempD.dpi*4; + DYNARR_APPEND(trkSeg_t,anchors_da,1); + int i = anchors_da.cnt-1; + anchors(i).type = SEG_STRLIN; + anchors(i).color = wDrawColorBlue; + anchors(i).u.l.pos[0] = pos; + Translate(&anchors(i).u.l.pos[1],pos,a,GetTrkGauge(t)*2); + anchors(i).width = w; + +} + +static void CreateTrimAnchor(coOrd pos, track_p t, track_p s, coOrd cursor) { + ANGLE_T a = NormalizeAngle(GetAngleAtPoint(s,pos,NULL,NULL)); + CreateSplitAnchorAngle(pos,t,FALSE,a,TRUE); + ANGLE_T aa = FindAngle(pos,cursor); + ANGLE_T d = DifferenceBetweenAngles(a,aa); + CreateTrimAnchorLeg(pos,a+(d>0?90:-90),t); } static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) { track_p trk0, trk1; - EPINX_T ep0; + EPINX_T ep0 = 0; int oldTrackCount; int inx, mode, quad; ANGLE_T angle; @@ -110,6 +131,7 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) case C_START: InfoMessage( _("Select track to split") ); DYNARR_RESET(trkSeg_t,anchors_da); + SetAllTrackSelect( FALSE ); /* no break */ case C_DOWN: case C_MOVE: @@ -117,7 +139,7 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) break; case C_UP: onTrackInSplit = TRUE; - trk0 = OnTrack( &pos, TRUE, TRUE ); + trk0 = OnTrack( &pos, FALSE, TRUE ); if ( trk0 != NULL) { if (!CheckTrackLayer( trk0 ) ) { onTrackInSplit = FALSE; @@ -127,9 +149,10 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) if (IsClose(FindDistance(GetTrkEndPos(trk0,ep0),pos)) && (GetTrkEndTrk(trk0,ep0)!=NULL)) { pos = GetTrkEndPos(trk0,ep0); } else { - if (!QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + if (!IsTrack(trk0) || + !QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { onTrackInSplit = FALSE; - InfoMessage(_("Can't Split that Track")); + InfoMessage(_("Can't Split that Track Object")); return C_CONTINUE; } } @@ -142,6 +165,21 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) SplitTrack( trk0, pos, ep0, &trk1, FALSE ); UndoEnd(); return C_TERMINATE; + } else if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (!QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + onTrackInSplit = FALSE; + InfoMessage(_("Can't Split that Draw Object")); + return C_CONTINUE; + } + onTrackInSplit = FALSE; + UndoStart( _("Split Track"), "SplitTrack( T%d[%d] )", GetTrkIndex(trk0), ep0 ); + oldTrackCount = trackCount; + SplitTrack( trk0, pos, ep0, &trk1, FALSE ); + UndoEnd(); + return C_TERMINATE; + } else { + InfoMessage(_("No Track to Split")); + wBeep(); } onTrackInSplit = FALSE; return C_TERMINATE; @@ -152,15 +190,15 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) return C_CONTINUE; if ( splitPopupM[0] == NULL ) { splitPopupM[0] = MenuRegister( "End Point Mode R-L" ); - splitPopupMI[0][0] = wMenuToggleCreate( splitPopupM[0], "", _("None"), 0, TRUE, ChangeSplitEPMode, (void*)0 ); - splitPopupMI[0][1] = wMenuToggleCreate( splitPopupM[0], "", _("Left"), 0, FALSE, ChangeSplitEPMode, (void*)1 ); - splitPopupMI[0][2] = wMenuToggleCreate( splitPopupM[0], "", _("Right"), 0, FALSE, ChangeSplitEPMode, (void*)2 ); - splitPopupMI[0][3] = wMenuToggleCreate( splitPopupM[0], "", _("Both"), 0, FALSE, ChangeSplitEPMode, (void*)3 ); + splitPopupMI[0][0] = wMenuToggleCreate( splitPopupM[0], "", _("None"), 0, TRUE, ChangeSplitEPMode, I2VP(0) ); + splitPopupMI[0][1] = wMenuToggleCreate( splitPopupM[0], "", _("Left"), 0, FALSE, ChangeSplitEPMode, I2VP(1) ); + splitPopupMI[0][2] = wMenuToggleCreate( splitPopupM[0], "", _("Right"), 0, FALSE, ChangeSplitEPMode, I2VP(2) ); + splitPopupMI[0][3] = wMenuToggleCreate( splitPopupM[0], "", _("Both"), 0, FALSE, ChangeSplitEPMode, I2VP(3) ); splitPopupM[1] = MenuRegister( "End Point Mode T-B" ); - splitPopupMI[1][0] = wMenuToggleCreate( splitPopupM[1], "", _("None"), 0, TRUE, ChangeSplitEPMode, (void*)0 ); - splitPopupMI[1][1] = wMenuToggleCreate( splitPopupM[1], "", _("Top"), 0, FALSE, ChangeSplitEPMode, (void*)1 ); - splitPopupMI[1][2] = wMenuToggleCreate( splitPopupM[1], "", _("Bottom"), 0, FALSE, ChangeSplitEPMode, (void*)2 ); - splitPopupMI[1][3] = wMenuToggleCreate( splitPopupM[1], "", _("Both"), 0, FALSE, ChangeSplitEPMode, (void*)3 ); + splitPopupMI[1][0] = wMenuToggleCreate( splitPopupM[1], "", _("None"), 0, TRUE, ChangeSplitEPMode, I2VP(0) ); + splitPopupMI[1][1] = wMenuToggleCreate( splitPopupM[1], "", _("Top"), 0, FALSE, ChangeSplitEPMode, I2VP(1) ); + splitPopupMI[1][2] = wMenuToggleCreate( splitPopupM[1], "", _("Bottom"), 0, FALSE, ChangeSplitEPMode, I2VP(2) ); + splitPopupMI[1][3] = wMenuToggleCreate( splitPopupM[1], "", _("Both"), 0, FALSE, ChangeSplitEPMode, I2VP(3) ); } splitTrkEP[0] = PickEndPoint( pos, splitTrkTrk[0] ); angle = NormalizeAngle(GetTrkEndAngle( splitTrkTrk[0], splitTrkEP[0] )); @@ -195,13 +233,15 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) onTrackInSplit = TRUE; if ((trk0 = OnTrack( &pos, FALSE, TRUE ))!=NULL && CheckTrackLayerSilent( trk0 )) { ep0 = PickEndPoint( pos, trk0 ); + if ( ep0 < 0 ) + break; if (IsClose(FindDistance(GetTrkEndPos(trk0,ep0),pos)) && (GetTrkEndTrk(trk0,ep0)!=NULL)) { CreateSplitAnchor(GetTrkEndPos(trk0,ep0),trk0,TRUE); } else if (QueryTrack(trk0,Q_IS_TURNOUT)) { if ((MyGetKeyState()&WKEY_SHIFT) != 0 ) { if (SplitTurnoutCheck(trk0,pos,ep0,NULL,NULL,NULL,TRUE,&pos,&angle)) { angle = NormalizeAngle(angle+90); - CreateSplitAnchorAngle(pos,trk0,FALSE,angle); + CreateSplitAnchorAngle(pos,trk0,FALSE,angle,FALSE); } } else { CreateSplitAnchor(GetTrkEndPos(trk0,ep0),trk0,TRUE); @@ -210,6 +250,71 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) } else if (QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { CreateSplitAnchor(pos,trk0,FALSE); } + } else { + if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + CreateSplitAnchor(pos,trk0, FALSE); + } + } + } + onTrackInSplit = FALSE; + + break; + case C_REDRAW: + if (anchors_da.cnt) + DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + break; + } + + return C_CONTINUE; +} + +static STATUS_T CmdSplitDraw( wAction_t action, coOrd pos ) +{ + track_p trk0, trk1; + EPINX_T ep0 = 0; + int oldTrackCount; + + switch (action) { + case C_START: + InfoMessage( _("Select draw to split") ); + DYNARR_RESET(trkSeg_t,anchors_da); + SetAllTrackSelect( FALSE ); + /* no break */ + case C_DOWN: + case C_MOVE: + return C_CONTINUE; + break; + case C_UP: + onTrackInSplit = TRUE; + if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (IsTrack(trk0)) return C_CONTINUE; + if (!QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + onTrackInSplit = FALSE; + InfoMessage(_("Can't Split that Draw Object")); + return C_CONTINUE; + } + onTrackInSplit = FALSE; + UndoStart( _("Split Draw"), "SplitDraw( T%d[%d] )", GetTrkIndex(trk0), ep0 ); + oldTrackCount = trackCount; + SplitTrack( trk0, pos, ep0, &trk1, FALSE ); + UndoEnd(); + return C_TERMINATE; + } else { + InfoMessage(_("No Draw to Split")); + wBeep(); + } + onTrackInSplit = FALSE; + return C_TERMINATE; + break; + case wActionMove: + DYNARR_RESET(trkSeg_t,anchors_da); + onTrackInSplit = TRUE; + if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (IsTrack(trk0)) break; + if (QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + CreateSplitAnchor(pos,trk0, FALSE); + } } onTrackInSplit = FALSE; break; @@ -222,13 +327,153 @@ static STATUS_T CmdSplitTrack( wAction_t action, coOrd pos ) return C_CONTINUE; } +typedef enum {TRIM_NONE, TRIM_LINE} TrimState_e; + +static STATUS_T CmdTrimDraw( wAction_t action, coOrd pos ) +{ + track_p trk0, trk1, trk2; + EPINX_T ep0 = 0; + static TrimState_e trimState; + static track_p trimLine; + static track_p trk; + switch (action&0xFF) { + case C_START: + InfoMessage( _("Select the draw object to Trim to") ); + DYNARR_RESET(trkSeg_t,anchors_da); + trimState = TRIM_NONE; + trimLine = NULL; + trk = NULL; + SetAllTrackSelect( FALSE ); + /* no break */ + case C_DOWN: + case C_MOVE: + return C_CONTINUE; + break; + case C_UP: + if (trimState == TRIM_NONE) { + if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (IsTrack(trk0)) { + InfoMessage(_("Can't Trim with a Track")); + return C_CONTINUE; + } + trimState = TRIM_LINE; + trimLine = trk0; + InfoMessage( _("Select an intersecting draw object to Trim") ); + return C_CONTINUE; + } + else return C_CONTINUE; + } + if (!trimLine) { + InfoMessage(_("No Draw to Trim with")); + wBeep(); + return C_TERMINATE; + } + coOrd pos1 = pos; + if ((trk1 = OnTrackIgnore(&pos1,FALSE,FALSE,trimLine))!=NULL) { + if (IsTrack(trk1)) { + InfoMessage(_("Can't Split a track object")); + wBeep(); + return C_CONTINUE; + } + if (!QueryTrack(trk1,Q_MODIFY_CAN_SPLIT)) { + onTrackInSplit = FALSE; + InfoMessage(_("Can't Split that Draw Object")); + return C_CONTINUE; + } + pos1 = pos; + if (IsClose(GetTrkDistance(trimLine,&pos1)*4)) { + if ( IsClose(GetTrkDistance(trk1,&pos1)*4)) { + //Iterate twice + for (int i=0; i<2;i++) { + GetTrkDistance(trimLine,&pos1); + GetTrkDistance(trk1,&pos1); + } + } else return C_CONTINUE; + } else { + return C_CONTINUE; + } + } else return C_CONTINUE; + + ANGLE_T a = GetAngleAtPoint(trk1,pos1,NULL,NULL); + ANGLE_T aa = DifferenceBetweenAngles(a,FindAngle(pos1,pos)); + if (fabs(aa)<90 ) ep0 = 1; + else ep0 = 0; + + UndoStart( _("Trim Draw"), "TrimDraw( T%d[%d] )", GetTrkIndex(trimLine), ep0 ); + SplitTrack( trk1, pos1, ep0, &trk2, FALSE ); + if (trk2 ) DeleteTrack(trk2, FALSE); + UndoEnd(); + MainRedraw(); + InfoMessage( _("Select another draw object to Trim, or Space to Deselect") ); + return C_CONTINUE; + break; + case wActionMove: + DYNARR_RESET(trkSeg_t,anchors_da); + trk = NULL; + if (trimState == TRIM_NONE) { + if ((trk0 = OnTrack( &pos, FALSE, FALSE))!=NULL && CheckTrackLayerSilent( trk0 )) { + if (IsTrack(trk0)) break; + if (QueryTrack(trk0,Q_MODIFY_CAN_SPLIT)) { + trk = trk0; + } + } + } + if (trimState == TRIM_LINE) { + coOrd pos1=pos; + if ((trk1 = OnTrackIgnore(&pos1,FALSE,FALSE,trimLine))!=NULL) { + if (IsTrack(trk1)) { + return C_CONTINUE; + } + pos1 = pos; + if (IsClose(GetTrkDistance(trimLine,&pos1)*4)) { + if (IsClose(GetTrkDistance(trk1,&pos1)*4)) { + //Iterate Twice + for (int i=0; i<2;i++) { + GetTrkDistance(trimLine,&pos1); + GetTrkDistance(trk1,&pos1); + } + CreateTrimAnchor(pos1, trk1, trimLine, pos); + } + } + } + } + break; + case C_REDRAW: + if (trk) { + DrawTrack(trk,&tempD,wDrawColorPreviewSelected); + } + if (trimLine) { + DrawTrack(trimLine,&tempD,selectedColor); + } + if (anchors_da.cnt) + DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + break; + case C_TEXT: + if (action>>8 != ' ' && action>>8 != 13 ) + return C_CONTINUE; + trimLine = NULL; + trk = NULL; + trimState = TRIM_NONE; + InfoMessage(""); + return C_TERMINATE; + default: ; + } + + return C_CONTINUE; +} -#include "bitmaps/splittrk.xpm" +#include "bitmaps/split.xpm" +#include "bitmaps/split-draw.xpm" +#include "bitmaps/trim.xpm" void InitCmdSplit( wMenu_p menu ) { - AddMenuButton( menu, CmdSplitTrack, "cmdSplitTrack", _("Split Track"), wIconCreatePixMap(splittrk_xpm), LEVEL0_50, IC_STICKY|IC_POPUP|IC_CMDMENU|IC_WANT_MOVE, ACCL_SPLIT, NULL ); + ButtonGroupBegin( _("Split"), "cmdSplitSetCmd", _("Split") ); + AddMenuButton( menu, CmdSplitTrack, "cmdSplitTrack", _("Split Track"), wIconCreatePixMap(split_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_CMDMENU|IC_WANT_MOVE, ACCL_SPLIT, NULL); + AddMenuButton( menu, CmdSplitDraw, "cmdSplitDraw", _("Split Draw"), wIconCreatePixMap(split_draw_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_SPLITDRAW, NULL); + AddMenuButton( menu, CmdTrimDraw, "cmdTrimDraw", _("Trim Draw"), wIconCreatePixMap(trim_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_TRIMDRAW, NULL); + ButtonGroupEnd(); } diff --git a/app/bin/cstraigh.c b/app/bin/cstraigh.c index 464f16e..277db96 100644 --- a/app/bin/cstraigh.c +++ b/app/bin/cstraigh.c @@ -19,17 +19,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include "cstraigh.h" +#include "cselect.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" #include "layout.h" +#include "common-ui.h" /* * STATE INFO @@ -75,6 +73,7 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) Dl.ep=-1; Dl.down = FALSE; InfoMessage( _("Place 1st endpoint of straight track, snap to unconnected endpoint") ); + SetAllTrackSelect( FALSE ); return C_CONTINUE; case C_DOWN: @@ -113,6 +112,7 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) case C_MOVE: case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); + found = FALSE; if (!Dl.down) { if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap) { p = pos; @@ -120,12 +120,18 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) if (GetTrkGauge(t) == GetScaleTrackGauge(GetLayoutCurScale())) { EPINX_T ep = PickUnconnectedEndPointSilent(pos, t); if (ep != -1) { - if (GetTrkGauge(t) == GetScaleTrackGauge(GetLayoutCurScale())) + if (GetTrkGauge(t) == GetScaleTrackGauge(GetLayoutCurScale())) { CreateEndAnchor(GetTrkEndPos(t,ep),FALSE); + found = TRUE; + } } } } } + if (!found && SnapPos( &pos )) { + CreateEndAnchor(pos,FALSE); + found = TRUE; + } return C_CONTINUE; } ANGLE_T angle, angle2; @@ -135,7 +141,10 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) if (angle2 > 90.0 && angle2 < 270.0) Translate( &pos, Dl.pos0, angle, FindDistance( Dl.pos0, pos ) ); else pos = Dl.pos0; - } else SnapPos( &pos ); + } else if (SnapPos( &pos )) { + CreateEndAnchor(pos,FALSE); + found = TRUE; + } InfoMessage( _("Straight Track Length=%s Angle=%0.3f"), FormatDistance(FindDistance( Dl.pos0, pos )), @@ -188,5 +197,5 @@ static STATUS_T CmdStraight( wAction_t action, coOrd pos ) void InitCmdStraight( wMenu_p menu ) { - AddMenuButton( menu, CmdStraight, "cmdStraight", _("Straight Track"), wIconCreatePixMap(straight_xpm), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_STRAIGHT, NULL ); + AddMenuButton( menu, CmdStraight, "cmdStraight", _("Straight Track"), wIconCreatePixMap(straight_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_STRAIGHT, NULL ); } diff --git a/app/bin/cstraigh.h b/app/bin/cstraigh.h index 30d1539..1231546 100644 --- a/app/bin/cstraigh.h +++ b/app/bin/cstraigh.h @@ -24,7 +24,6 @@ #define HAVE_CSTRAIGH_H
#include "common.h"
-#include "track.h" void AdjustStraightEndPt( track_p t, EPINX_T ep, coOrd pos ); track_p NewStraightTrack( coOrd p0, coOrd p1 ); diff --git a/app/bin/cstruct.c b/app/bin/cstruct.c index 6907e2c..fc13924 100644 --- a/app/bin/cstruct.c +++ b/app/bin/cstruct.c @@ -20,30 +20,23 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> -#include <math.h> -#include <stdint.h> -#include <string.h> - #include "compound.h" +#include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" +#include "cselect.h" #include "include/paramfile.h" #include "track.h" -#include "utility.h" #include "ccurve.h" +#include "common-ui.h" EXPORT TRKTYP_T T_STRUCTURE = -1; EXPORT dynArr_t structureInfo_da; -typedef struct compoundData extraData; - static wIndex_t pierListInx; EXPORT turnoutInfo_t * curStructure = NULL; @@ -63,13 +56,13 @@ static drawCmd_t structureD = { static wIndex_t structureHotBarCmdInx; static wIndex_t structureInx; static long hideStructureWindow; -static void RedrawStructure(void); +static void RedrawStructure( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ); -static wPos_t structureListWidths[] = { 80, 80, 220 }; +static wWinPix_t structureListWidths[] = { 80, 80, 220 }; static const char * structureListTitles[] = { N_("Manufacturer"), N_("Part No"), N_("Description") }; static paramListData_t listData = { 13, 400, 3, structureListWidths, structureListTitles }; static const char * hideLabels[] = { N_("Hide"), NULL }; -static paramDrawData_t structureDrawData = { 490, 200, (wDrawRedrawCallBack_p)RedrawStructure, NULL, &structureD }; +static paramDrawData_t structureDrawData = { 490, 200, RedrawStructure, NULL, &structureD }; static paramData_t structurePLs[] = { #define I_LIST (0) #define structureListL ((wList_p)structurePLs[I_LIST].control) @@ -77,14 +70,14 @@ static paramData_t structurePLs[] = { #define I_DRAW (1) { PD_DRAW, NULL, "canvas", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_DLGRESIZE, &structureDrawData, NULL, 0 }, #define I_HIDE (2) - { PD_TOGGLE, &hideStructureWindow, "hide", PDO_DLGCMDBUTTON, /*CAST_AWAY_CONST*/(void*)hideLabels, NULL, BC_NOBORDER }, + { PD_TOGGLE, &hideStructureWindow, "hide", PDO_DLGCMDBUTTON, hideLabels, NULL, BC_NOBORDER }, #define I_MSGSCALE (3) - { PD_MESSAGE, NULL, NULL, 0, (void*)80 }, + { PD_MESSAGE, NULL, NULL, 0, I2VP(80) }, #define I_MSGWIDTH (4) - { PD_MESSAGE, NULL, NULL, 0, (void*)80 }, + { PD_MESSAGE, NULL, NULL, 0, I2VP(80) }, #define I_MSGHEIGHT (5) - { PD_MESSAGE, NULL, NULL, 0, (void*)80 } }; -static paramGroup_t structurePG = { "structure", 0, structurePLs, sizeof structurePLs/sizeof structurePLs[0] }; + { PD_MESSAGE, NULL, NULL, 0, I2VP(80) } }; +static paramGroup_t structurePG = { "structure", 0, structurePLs, COUNT( structurePLs ) }; @@ -136,8 +129,7 @@ EXPORT turnoutInfo_t * CreateNewStructure( else to->contentsLabel = curSubContents; to->endCnt = 0; - to->pathLen = 0; - to->paths = (PATHPTR_T)""; + SetParamPaths( to, NULL ); if (updateList && structureListL != NULL) { FormatCompoundTitle( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, to->title ); if (message[0] != '\0') @@ -162,6 +154,25 @@ StructureDelete(void *structure) MyFree(to->title); MyFree(to->segs); + if (to->special) { + switch(to->special) { + case TOpier: + MyFree(to->u.pier.name); + to->u.pier.name = NULL; + break; + case TOpierInfo: + for(int pierInx=0;pierInx<to->u.pierInfo.cnt;pierInx++) { + if (to->u.pierInfo.info[pierInx].name) + MyFree(to->u.pierInfo.info[pierInx].name); + to->u.pierInfo.info[pierInx].name = NULL; + } + MyFree(to->u.pierInfo.info); + to->u.pierInfo.cnt = 0; + break; + default:; + } + } + MyFree(to); return(TRUE); } @@ -207,6 +218,17 @@ DeleteStructures(int fileIndex) structureInfo_da.cnt -= cnt; } +/** + * Check to find out to what extent the contents of the parameter file can be used with + * the current layout scale / gauge. + * + * If parameter scale == layout we have an exact fit. + * If parameter scale == layout scale +/15% we have compatible track. + * + * \param paramFileIndex + * \param scaleIndex + * \return + */ enum paramFileState GetStructureCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) { @@ -218,14 +240,22 @@ GetStructureCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) return(PARAMFILE_UNLOADED); } + //Loop over all entries until an exact fit is found if none return if compatibles were found + for (i = 0; i < structureInfo_da.cnt; i++) { turnoutInfo_t *to = structureInfo(i); if (to->paramFileIndex == paramFileIndex) { - if (GetScaleRatio(to->scaleInx) == ratio || to->scaleInx == SCALE_ANY) { + SCALE_FIT_T fit = CompatibleScale(FIT_STRUCTURE,to->scaleInx,scaleIndex); + if (fit == FIT_EXACT) { ret = PARAMFILE_FIT; break; - } + } + //Within 15% of scale + if (fit == FIT_COMPATIBLE) { + ret = PARAMFILE_COMPATIBLE; + } } + } return(ret); } @@ -281,7 +311,7 @@ EXPORT turnoutInfo_t * StructAdd( long mode, SCALEINX_T scale, wList_p list, coO to = structureInfo(inx); if ( IsParamValid(to->paramFileIndex) && to->segCnt > 0 && - CompatibleScale( FALSE, to->scaleInx, scale ) && + (FIT_NONE != CompatibleScale( FIT_STRUCTURE, to->scaleInx, scale )) && to->segCnt != 0 ) { if (to1 == NULL) to1 = to; @@ -316,7 +346,7 @@ static void DrawStructure( drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_STRUCTURE, extraDataCompound_t); d->options &= ~DC_NOTSOLIDLINE; switch(xx->lineType) { @@ -365,7 +395,7 @@ static ANGLE_T GetAngleStruct( EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t * xx = GET_EXTRA_DATA(trk, T_STRUCTURE, extraDataCompound_t); ANGLE_T angle; pos.x -= xx->orig.x; @@ -393,8 +423,8 @@ static BOOL_T QueryStructure( track_p trk, int query ) static wBool_t CompareStruct( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataCompound_t *xx1 = GET_EXTRA_DATA( trk1, T_STRUCTURE, extraDataCompound_t ); + struct extraDataCompound_t *xx2 = GET_EXTRA_DATA( trk2, T_STRUCTURE, extraDataCompound_t ); char * cp = message + strlen(message); REGRESS_CHECK_POS( "Orig", xx1, xx2, orig ) REGRESS_CHECK_ANGLE( "Angle", xx1, xx2, angle ) @@ -446,8 +476,8 @@ static trackCmd_t structureCmds = { CompareStruct }; static paramData_t pierPLs[] = { - { PD_DROPLIST, &pierListInx, "inx", 0, (void*)50, N_("Pier Number") } }; -static paramGroup_t pierPG = { "structure-pier", 0, pierPLs, sizeof pierPLs/sizeof pierPLs[0] }; + { PD_DROPLIST, &pierListInx, "inx", 0, I2VP(50), N_("Pier Number") } }; +static paramGroup_t pierPG = { "structure-pier", 0, pierPLs, COUNT( pierPLs ) }; #define pierL ((wList_p)pierPLs[0].control) static void ShowPierL( void ) @@ -495,7 +525,7 @@ static wWin_p structureW; static void RescaleStructure( void ) { DIST_T xscale, yscale; - wPos_t ww, hh; + wWinPix_t ww, hh; DIST_T w, h; wDrawGetSize( structureD.d, &ww, &hh ); w = ww/structureD.dpi - 0.2; @@ -540,13 +570,13 @@ static void structureChange( long changes ) maxStructureDim.x += 2*trackGauge; maxStructureDim.y += 2*trackGauge; /*RescaleStructure();*/ - RedrawStructure(); + RedrawStructure( structureD.d, NULL, 0, 0 ); return; } -static void RedrawStructure() +static void RedrawStructure( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ) { RescaleStructure(); LOG( log_structure, 2, ( "SelStructure(%s)\n", (curStructure?curStructure->title:"<NULL>") ) ) @@ -578,8 +608,8 @@ static void StructureDlgUpdate( NewStructure(); curStructure = to; ShowPierL(); - RedrawStructure(); - ParamDialogOkActive( &structurePG, FALSE ); + RedrawStructure( structureD.d, NULL, 0, 0 ); + /* ParamDialogOkActive( &structurePG, FALSE ); */ } @@ -689,8 +719,7 @@ static ANGLE_T PlaceStructure( static void NewStructure( void ) { track_p trk; - struct extraData *xx; - wIndex_t titleLen; + struct extraDataCompound_t *xx; wIndex_t pierInx; if (curStructure->segCnt < 1) { @@ -704,23 +733,8 @@ static void NewStructure( void ) return; } UndoStart( _("Place Structure"), "newStruct" ); - titleLen = strlen( curStructure->title ); - trk = NewCompound( T_STRUCTURE, 0, Dst.pos, Dst.angle, curStructure->title, 0, NULL, NULL, 0, "", curStructure->segCnt, curStructure->segs ); - xx = GetTrkExtraData(trk); -#ifdef LATER - trk = NewTrack( 0, T_STRUCTURE, 0, sizeof (*xx) + 1 ); - xx->orig = Dst.pos; - xx->angle = Dst.angle; - xx->segs = MyMalloc( (curStructure->segCnt)*sizeof curStructure->segs[0] ); - - /* - * copy data */ - xx->segCnt = curStructure->segCnt; - memcpy( xx->segs, curStructure->segs, xx->segCnt * sizeof *(trkSeg_p)0 ); - xx->title = curStructure->title; - xx->pathLen = 0; - xx->paths = ""; -#endif + trk = NewCompound( T_STRUCTURE, 0, Dst.pos, Dst.angle, curStructure->title, 0, NULL, NULL, curStructure->segCnt, curStructure->segs ); + xx = GET_EXTRA_DATA(trk, T_STRUCTURE, extraDataCompound_t); switch(curStructure->special) { case TOnormal: xx->special = TOnormal; @@ -747,13 +761,6 @@ static void NewStructure( void ) SetTrkVisible( trk, TRUE ); SetTrkNoTies( trk, FALSE); SetTrkBridge( trk, FALSE); -#ifdef LATER - ComputeCompoundBoundingBox( trk ); - - SetDescriptionOrig( trk ); - xx->descriptionOff = zero; - xx->descriptionSize = zero; -#endif DrawNewTrack( trk ); /*DrawStructure( trk, &mainD, wDrawColorBlack, 0 );*/ @@ -768,7 +775,7 @@ static void StructRotate( void * pangle ) { if (Dst.state == 0) return; - ANGLE_T angle = (ANGLE_T)(long)pangle; + ANGLE_T angle = (ANGLE_T)VP2L(pangle); angle /= 1000.0; Dst.pos = cmdMenuPos; Rotate( &Dst.pos, cmdMenuPos, angle ); @@ -796,7 +803,7 @@ EXPORT STATUS_T CmdStructureAction( Dst.state = 0; Dst.angle = 00.0; ShowPierL(); - InfoMessage(_("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel")); + SetAllTrackSelect( FALSE ); return C_CONTINUE; case wActionMove: @@ -849,7 +856,7 @@ EXPORT STATUS_T CmdStructureAction( DYNARR_RESET(trkSeg_t,anchors_da); if ( curStructure == NULL ) return C_CONTINUE; rot1 = pos; - if ( FindDistance( rot0, rot1 ) > (6.0/75.0)*mainD.scale ) { + if ( FindDistance( rot0, rot1 ) > (6.0/BASE_DPI)*mainD.scale ) { angle = FindAngle( rot0, rot1 ); if (!validAngle) { baseAngle = angle; @@ -880,16 +887,25 @@ EXPORT STATUS_T CmdStructureAction( return C_CONTINUE; case C_REDRAW: + wSetCursor(mainD.d,defaultCursor); if (Dst.state) DrawSegs( &tempD, Dst.pos, Dst.angle, - curStructure->segs, curStructure->segCnt, 0.0, wDrawColorBlue ); + curStructure->segs, curStructure->segCnt, 0.0, selectedColor ); if (anchors_da.cnt>0) { DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + wSetCursor(mainD.d,wCursorNone); } if (Dst.state == 2) DrawLine( &tempD, rot0, rot1, 0, wDrawColorBlack ); return C_CONTINUE; + case C_LCLICK: + DYNARR_RESET(trkSeg_t,anchors_da); + if ( curStructure == NULL ) return C_CONTINUE; + CmdStructureAction( C_DOWN, pos ); + CmdStructureAction( C_UP, pos ); + return C_CONTINUE; + case C_CANCEL: DYNARR_RESET(trkSeg_t,anchors_da); Dst.state = 0; @@ -934,7 +950,7 @@ static STATUS_T CmdStructure( case C_START: if (structureW == NULL) { - structureW = ParamCreateDialog( &structurePG, MakeWindowTitle(_("Structure")), _("Ok"), (paramActionOkProc)DoStructOk, (paramActionCancelProc)Reset, TRUE, NULL, F_RESIZE, StructureDlgUpdate ); + structureW = ParamCreateDialog( &structurePG, MakeWindowTitle(_("Structure")), _("Close"), (paramActionOkProc)DoStructOk, wHide, TRUE, NULL, F_RESIZE, StructureDlgUpdate ); RegisterChangeNotification( structureChange ); } ParamDialogOkActive( &structurePG, FALSE ); @@ -949,11 +965,12 @@ static STATUS_T CmdStructure( if (structureIndex > 0 && structurePtr) { curStructure = structurePtr; wListSetIndex( structureListL, structureIndex ); - RedrawStructure(); + RedrawStructure( structureD.d, NULL, 0, 0 ); } InfoMessage( _("Select Structure and then drag to place")); ParamLoadControls( &structurePG ); ParamGroupRecord( &structurePG ); + SetAllTrackSelect( FALSE ); return CmdStructureAction( action, pos ); case wActionMove: @@ -993,6 +1010,10 @@ static STATUS_T CmdStructure( return CmdStructureAction( action, pos ); return C_CONTINUE; + case C_LCLICK: + CmdStructureAction( action, pos ); + return C_CONTINUE; + case C_CANCEL: wHide( structureW ); /*no break*/ @@ -1021,7 +1042,7 @@ static char * CmdStructureHotBarProc( case HB_SELECT: CmdStructureAction( C_FINISH, zero ); curStructure = to; - DoCommandB( (void*)(intptr_t)structureHotBarCmdInx ); + DoCommandB( I2VP(structureHotBarCmdInx) ); return NULL; case HB_LISTTITLE: FormatCompoundTitle( listLabels, to->title ); @@ -1034,8 +1055,8 @@ static char * CmdStructureHotBarProc( case HB_FULLTITLE: return to->title; case HB_DRAW: - origP->x -= to->orig.x; - origP->y -= to->orig.y; + //origP->x -= to->orig.x; + //origP->y -= to->orig.y; DrawSegs( d, *origP, 0.0, to->segs, to->segCnt, trackGauge, wDrawColorBlack ); return NULL; } @@ -1051,7 +1072,7 @@ EXPORT void AddHotBarStructures( void ) to = structureInfo(inx); if ( !( IsParamValid(to->paramFileIndex) && to->segCnt > 0 && - CompatibleScale( FALSE, to->scaleInx, GetLayoutCurScale()) ) ) + (FIT_NONE != CompatibleScale( FIT_STRUCTURE, to->scaleInx, GetLayoutCurScale())) ) ) /*( (strcmp( to->scale, "*" ) == 0 && strcasecmp( curScaleName, "DEMO" ) != 0 ) || strncasecmp( to->scale, curScaleName, strlen(to->scale) ) == 0 ) ) )*/ continue; @@ -1066,7 +1087,7 @@ static STATUS_T CmdStructureHotBar( switch (action & 0xFF) { case C_START: - structureChange( CHANGE_PARAMS ); + //structureChange( CHANGE_PARAMS ); if (curStructure == NULL) { NoticeMessage( MSG_STRUCT_NO_STRUCTS, _("Ok"), NULL ); return C_TERMINATE; @@ -1074,10 +1095,10 @@ static STATUS_T CmdStructureHotBar( FormatCompoundTitle( listLabels|LABEL_DESCR, curStructure->title ); InfoMessage( _("Place %s and draw into position"), message ); wIndex_t listIndex = FindListItemByContext( structureListL, curStructure ); - if ( listIndex > 0 ) + if ( listIndex >= 0 ) structureInx = listIndex; - //ParamLoadControls( &structurePG ); - //ParamGroupRecord( &structurePG ); + ParamLoadControls( &structurePG ); + ParamGroupRecord( &structurePG ); return CmdStructureAction( action, pos ); case wActionMove: @@ -1121,11 +1142,11 @@ static STATUS_T CmdStructureHotBar( } } -#include "bitmaps/struct.xpm" +#include "bitmaps/building.xpm" EXPORT void InitCmdStruct( wMenu_p menu ) { - AddMenuButton( menu, CmdStructure, "cmdStructure", _("Structure"), wIconCreatePixMap(struct_xpm), LEVEL0_50, IC_WANT_MOVE|IC_STICKY|IC_CMDMENU|IC_POPUP2, ACCL_STRUCTURE, NULL ); + AddMenuButton( menu, CmdStructure, "cmdStructure", _("Structure"), wIconCreatePixMap(building_xpm[iconSize]), LEVEL0_50, IC_WANT_MOVE|IC_STICKY|IC_CMDMENU|IC_POPUP2, ACCL_STRUCTURE, NULL ); structureHotBarCmdInx = AddMenuButton( menu, CmdStructureHotBar, "cmdStructureHotBar", "", NULL, LEVEL0_50, IC_WANT_MOVE|IC_STICKY|IC_CMDMENU|IC_POPUP2, 0, NULL ); ParamRegister( &structurePG ); if ( structPopupM == NULL ) { diff --git a/app/bin/cswitchmotor.c b/app/bin/cswitchmotor.c index a8e1c54..563e4b8 100644 --- a/app/bin/cswitchmotor.c +++ b/app/bin/cswitchmotor.c @@ -49,22 +49,18 @@ * */ -#include <ctype.h> -#include <string.h> - #include "compound.h" +#include "cselect.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "param.h" #include "track.h" #include "trackx.h" -#ifdef WINDOWS +#include "common-ui.h" +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS -#include "utility.h" -#include "messages.h" +#endif // UTFCONVERT EXPORT TRKTYP_T T_SWITCHMOTOR = -1; @@ -90,13 +86,13 @@ static track_p last_motor; static track_p first_motor; static paramData_t switchmotorPLs[] = { -/*0*/ { PD_STRING, switchmotorName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(switchmotorName)}, -/*1*/ { PD_STRING, switchmotorNormal, "normal", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Normal"), 0, 0, sizeof(switchmotorNormal)}, -/*2*/ { PD_STRING, switchmotorReverse, "reverse", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Reverse"), 0, 0, sizeof(switchmotorReverse)}, -/*3*/ { PD_STRING, switchmotorPointSense, "pointSense", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Point Sense"), 0, 0, sizeof(switchmotorPointSense)} +/*0*/ { PD_STRING, switchmotorName, "name", PDO_NOPREF|PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(switchmotorName)}, +/*1*/ { PD_STRING, switchmotorNormal, "normal", PDO_NOPREF, I2VP(350), N_("Normal"), 0, 0, sizeof(switchmotorNormal)}, +/*2*/ { PD_STRING, switchmotorReverse, "reverse", PDO_NOPREF, I2VP(350), N_("Reverse"), 0, 0, sizeof(switchmotorReverse)}, +/*3*/ { PD_STRING, switchmotorPointSense, "pointSense", PDO_NOPREF, I2VP(350), N_("Point Sense"), 0, 0, sizeof(switchmotorPointSense)} }; -static paramGroup_t switchmotorPG = { "switchmotor", 0, switchmotorPLs, sizeof switchmotorPLs/sizeof switchmotorPLs[0] }; +static paramGroup_t switchmotorPG = { "switchmotor", 0, switchmotorPLs, COUNT( switchmotorPLs ) }; static wWin_p switchmotorW; static char switchmotorEditName[STR_SHORT_SIZE]; @@ -109,14 +105,14 @@ static track_p switchmotorEditTrack; static paramIntegerRange_t r0_999999 = { 0, 999999 }; static paramData_t switchmotorEditPLs[] = { - /*0*/ { PD_STRING, switchmotorEditName, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Name"), 0, 0, sizeof(switchmotorEditName)}, -/*1*/ { PD_STRING, switchmotorEditNormal, "normal", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Normal"), 0, 0, sizeof(switchmotorEditNormal)}, -/*2*/ { PD_STRING, switchmotorEditReverse, "reverse", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Reverse"), 0, 0, sizeof(switchmotorEditReverse)}, -/*3*/ { PD_STRING, switchmotorEditPointSense, "pointSense", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Point Sense"), 0, 0, sizeof(switchmotorEditPointSense)}, + /*0*/ { PD_STRING, switchmotorEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(switchmotorEditName)}, +/*1*/ { PD_STRING, switchmotorEditNormal, "normal", PDO_NOPREF, I2VP(350), N_("Normal"), 0, 0, sizeof(switchmotorEditNormal)}, +/*2*/ { PD_STRING, switchmotorEditReverse, "reverse", PDO_NOPREF, I2VP(350), N_("Reverse"), 0, 0, sizeof(switchmotorEditReverse)}, +/*3*/ { PD_STRING, switchmotorEditPointSense, "pointSense", PDO_NOPREF, I2VP(350), N_("Point Sense"), 0, 0, sizeof(switchmotorEditPointSense)}, /*4*/ { PD_LONG, &switchmotorEditTonum, "turnoutNumber", PDO_NOPREF, &r0_999999, N_("Turnout Number"), BO_READONLY }, }; -static paramGroup_t switchmotorEditPG = { "switchmotorEdit", 0, switchmotorEditPLs, sizeof switchmotorEditPLs/sizeof switchmotorEditPLs[0] }; +static paramGroup_t switchmotorEditPG = { "switchmotorEdit", 0, switchmotorEditPLs, COUNT( switchmotorEditPLs ) }; static wWin_p switchmotorEditW; /* @@ -125,6 +121,7 @@ static dynArr_t switchmotorTrk_da; */ typedef struct switchmotorData_t { + extraDataBase_t base; char * name; char * normal; char * reverse; @@ -137,7 +134,7 @@ typedef struct switchmotorData_t { static switchmotorData_p GetswitchmotorData ( track_p trk ) { - return (switchmotorData_p) GetTrkExtraData(trk); + return GET_EXTRA_DATA( trk, T_SWITCHMOTOR, switchmotorData_t ); } #if 0 @@ -148,14 +145,14 @@ static wDrawBitMap_p switchmotormark_bm = NULL; static coOrd switchmotorPoly_Pix[] = { {6,0}, {6,13}, {4,13}, {4,19}, {6,19}, {6,23}, {9,23}, {9,19}, {13,19}, {13,23}, {27,23}, {27,10}, {13,10}, {13,13}, {9,13}, {9,0}, {6,0} }; -#define switchmotorPoly_CNT (sizeof(switchmotorPoly_Pix)/sizeof(switchmotorPoly_Pix[0])) +#define switchmotorPoly_CNT (COUNT(switchmotorPoly_Pix)) #define switchmotorPoly_SF (3.0) static void ComputeSwitchMotorBoundingBox (track_p t) { coOrd hi, lo, p; switchmotorData_p data_p = GetswitchmotorData(t); - struct extraData *xx = GetTrkExtraData(data_p->turnout); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(data_p->turnout, T_TURNOUT, extraDataCompound_t); coOrd orig = xx->orig; ANGLE_T angle = xx->angle; SCALEINX_T s = GetTrkScale(data_p->turnout); @@ -190,7 +187,7 @@ static void DrawSwitchMotor (track_p t, drawCmd_p d, wDrawColor color ) { coOrd p[switchmotorPoly_CNT]; switchmotorData_p data_p = GetswitchmotorData(t); - struct extraData *xx = GetTrkExtraData(data_p->turnout); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(data_p->turnout, T_TURNOUT, extraDataCompound_t); coOrd orig = xx->orig; ANGLE_T angle = xx->angle; SCALEINX_T s = GetTrkScale(data_p->turnout); @@ -208,7 +205,7 @@ static void DrawSwitchMotor (track_p t, drawCmd_p d, wDrawColor color ) Translate (&p[iPoint], orig, x_angle, switchmotorPoly_Pix[iPoint].x * switchmotorPoly_SF / scaleRatio ); Translate (&p[iPoint], p[iPoint], y_angle, (10+switchmotorPoly_Pix[iPoint].y) * switchmotorPoly_SF / scaleRatio ); } - DrawPoly(d, switchmotorPoly_CNT, p, NULL, color, 0, 1, 0); + DrawPoly(d, switchmotorPoly_CNT, p, NULL, color, 0, DRAW_FILL); } static struct { @@ -411,9 +408,9 @@ static BOOL_T WriteSwitchMotor ( track_p t, FILE * f ) switchmotorData_p xx = GetswitchmotorData(t); char *switchMotorName = MyStrdup(xx->name); -#ifdef WINDOWS +#ifdef UTFCONVERT switchMotorName = Convert2UTF8(switchMotorName); -#endif // WINDOWS +#endif // UTFCONVERT if (xx->turnout == NULL) return FALSE; @@ -437,9 +434,9 @@ static BOOL_T ReadSwitchMotor ( char * line ) if (!GetArgs(line+12,"ddqqqq",&index,&trkindex,&name,&normal,&reverse,&pointsense)) { return FALSE; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(name); -#endif // WINDOWS +#endif // UTFCONVERT trk = NewTrack(index, T_SWITCHMOTOR, 0, sizeof(switchmotorData_t)+1); xx = GetswitchmotorData( trk ); xx->name = name; @@ -592,6 +589,7 @@ static STATUS_T CmdSwitchMotorCreate( wAction_t action, coOrd pos ) switch (action & 0xFF) { case C_START: InfoMessage( _("Select a turnout") ); + SetAllTrackSelect( FALSE ); return C_CONTINUE; case C_DOWN: if ((trk = OnTrack(&pos, TRUE, TRUE )) == NULL) { @@ -694,7 +692,7 @@ static STATUS_T CmdSwitchMotor (wAction_t action, coOrd pos ) LOG( log_switchmotor, 1, ("*** CmdSwitchMotor(%08x,{%f,%f})\n",action,pos.x,pos.y)) - switch ((long)commandContext) { + switch (VP2L(commandContext)) { case SWITCHMOTOR_CREATE: return CmdSwitchMotorCreate(action,pos); case SWITCHMOTOR_EDIT: return CmdSwitchMotorEdit(action,pos); case SWITCHMOTOR_DELETE: return CmdSwitchMotorDelete(action,pos); @@ -757,13 +755,9 @@ static POS_T swmhiliteBorder; static wDrawColor swmhiliteColor = 0; static void DrawSWMotorTrackHilite( void ) { - wPos_t x, y, w, h; if (swmhiliteColor==0) swmhiliteColor = wDrawColorGray(87); - w = (wPos_t)((swmhiliteSize.x/mainD.scale)*mainD.dpi+0.5); - h = (wPos_t)((swmhiliteSize.y/mainD.scale)*mainD.dpi+0.5); - mainD.CoOrd2Pix(&mainD,swmhiliteOrig,&x,&y); - wDrawFilledRectangle( mainD.d, x, y, w, h, swmhiliteColor, wDrawOptTemp|wDrawOptTransparent ); + DrawRectangle( &tempD, swmhiliteOrig, swmhiliteSize, swmhiliteColor, DRAW_TRANSPARENT ); } static int SwitchmotorMgmProc ( int cmd, void * data ) @@ -844,7 +838,7 @@ EXPORT void SwitchmotorMgmLoad( void ) TRK_ITERATE(trk) { if (GetTrkType(trk) != T_SWITCHMOTOR) continue; - ContMgmLoad( switchmI, SwitchmotorMgmProc, (void *)trk ); + ContMgmLoad( switchmI, SwitchmotorMgmProc, trk ); } } diff --git a/app/bin/ctext.c b/app/bin/ctext.c index c292d1c..3ab301c 100644 --- a/app/bin/ctext.c +++ b/app/bin/ctext.c @@ -22,13 +22,11 @@ #include "cundo.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "wlib.h" #include "draw.h" #include "misc.h" +#include "common-ui.h" track_p NewText( wIndex_t index, coOrd p, ANGLE_T angle, char * text, CSIZE_T textSize, wDrawColor color, BOOL_T boxed ); @@ -55,7 +53,7 @@ static struct { ANGLE_T angle; long size; wIndex_t fontSizeInx; - char text[STR_LONG_SIZE]; + char text[STR_HUGE_SIZE]; wDrawColor color; BOOL_T boxed; } Dt; @@ -63,13 +61,13 @@ static struct { static char * boxLabels[] = { "", NULL }; static paramData_t textPLs[] = { #define textPD (textPLs[0]) - { PD_DROPLIST, &Dt.fontSizeInx, "Fontsize", 0, NULL, N_("Font Size"), BL_EDITABLE }, + { PD_DROPLIST, &Dt.fontSizeInx, "fontsize", 0, NULL, N_("Font Size"), BL_EDITABLE }, #define colorPD (textPLs[1]) - { PD_COLORLIST, &Dt.color, "Color", PDO_NORECORD, NULL, N_("Color") }, + { PD_COLORLIST, &Dt.color, "color", PDO_NORECORD, NULL, N_("Color") }, #define boxPD (textPLs[2]) - { PD_TOGGLE, &Dt.boxed, "Boxed", 0, boxLabels, N_("Boxed"), 0 } + { PD_TOGGLE, &Dt.boxed, "boxed", 0, boxLabels, N_("Boxed"), 0 } }; -static paramGroup_t textPG = { "text", 0, textPLs, sizeof textPLs/sizeof textPLs[0] }; +static paramGroup_t textPG = { "text", 0, textPLs, COUNT( textPLs ) }; enum TEXT_POSITION { @@ -206,6 +204,12 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) Dt.text[Dt.len] = '\000'; } } + if (Dt.len>sizeof(Dt.text)-8) { + Dt.len=sizeof(Dt.text)-8; + Dt.text[Dt.len] = '\0'; + InfoMessage("Text too long - truncated"); + wBeep(); + } DrawMultiLineTextSize( &mainD, Dt.text, NULL, Dt.size, TRUE, &size, &lastline); Dt.textLen = size.x; Dt.lastLineLen = lastline.x; @@ -261,9 +265,9 @@ static STATUS_T CmdText( wAction_t action, coOrd pos ) void InitCmdText( wMenu_p menu ) { - AddMenuButton( menu, CmdText, "cmdText", _("Text"), wIconCreatePixMap(text_xpm), LEVEL0_50, IC_STICKY|IC_CMDMENU|IC_POPUP2, ACCL_TEXT, NULL ); + AddMenuButton( menu, CmdText, "cmdText", _("Text"), wIconCreatePixMap(text_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_CMDMENU|IC_POPUP2, ACCL_TEXT, NULL ); textPopupM = MenuRegister( "Text Font" ); - wMenuPushCreate( textPopupM, "", _("Fonts..."), 0, (wMenuCallBack_p)SelectFont, NULL ); + wMenuPushCreate( textPopupM, "", _("Fonts..."), 0, SelectFont, NULL ); Dt.size = (CSIZE_T)wSelectedFontSize(); Dt.color = wDrawColorBlack; } diff --git a/app/bin/ctodesgn.c b/app/bin/ctodesgn.c index dc118a1..ea124cf 100644 --- a/app/bin/ctodesgn.c +++ b/app/bin/ctodesgn.c @@ -21,29 +21,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef WINDOWS -#include <stdlib.h> -#endif - -#include <stdint.h> -#include <ctype.h> -#include <math.h> -#include <string.h> -#include "messages.h" - #include "ccurve.h" #include "compound.h" #include "cstraigh.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "param.h" #include "track.h" -#include "utility.h" #include "ccornu.h" #include "cbezier.h" #include "misc.h" +#include "common-ui.h" dynArr_t tempSegs_da; dynArr_t tempEndPts_da; @@ -53,6 +42,8 @@ char tempCustom[4096]; dynArr_t tempSegs_da; +// Minimum Track Segment length +#define MIN_TRACK_LENGTH (0.20) /***************************************** * @@ -84,7 +75,7 @@ dynArr_t tempSegs_da; typedef struct { struct { - wPos_t x, y; + wWinPix_t x, y; } pos; int index; char * winLabel; @@ -148,13 +139,16 @@ static long newTurnRoadbedLineWidth = 0; static wDrawColor roadbedColor; static DIST_T newTurnTrackGauge; static char * newTurnScaleName; +static paramFloatRange_t r0d001_10000 = { 0.001, 10000, 80 }; +static paramFloatRange_t r0d300_10000 = { 0.300, 10000, 80 }; static paramFloatRange_t r0_10000 = { 0, 10000, 80 }; -static paramFloatRange_t r_10000_10000 = {-10000, 10000, 80 }; -static paramFloatRange_t r0_360 = { 0, 360, 80 }; +static paramFloatRange_t r_10000_10000 = { -1000, 10000, 80 }; +static paramFloatRange_t r0d001_90 = { 0.001, 90, 80 }; +static paramFloatRange_t r_90_90 = { -90, 90, 80 }; static paramFloatRange_t r0_100 = { 0, 100, 80 }; static paramIntegerRange_t i0_100 = { 0, 100, 40 }; -static void NewTurnOk( void * ); -static void ShowTurnoutDesigner( void * ); +static void NewTurnOk( void * context ); +static void ShowTurnoutDesigner( void * context ); static coOrd points[20]; @@ -166,48 +160,48 @@ static DIST_T radii[10]; static double angles[10]; -#define POSX(X) ((wPos_t)((X)*newTurnout_d.dpi)) -#define POSY(Y) ((wPos_t)((Y)*newTurnout_d.dpi)) +#define POSX(X) ((wWinPix_t)((X)*newTurnout_d.dpi)) +#define POSY(Y) ((wWinPix_t)((Y)*newTurnout_d.dpi)) static paramData_t turnDesignPLs[] = { #define I_TOLENGTH (0) #define I_TO_FIRST_FLOAT (0) - { PD_FLOAT, &newTurnLen0, "len0", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, - { PD_FLOAT, &newTurnLen1, "len1", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, - { PD_FLOAT, &newTurnLen2, "len2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, - { PD_FLOAT, &newTurnLen3, "len3", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, + { PD_FLOAT, &newTurnLen0, "len0", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Length") }, + { PD_FLOAT, &newTurnLen1, "len1", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Length") }, + { PD_FLOAT, &newTurnLen2, "len2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Length") }, + { PD_FLOAT, &newTurnLen3, "len3", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Length") }, #define I_TOOFFSET (4) - { PD_FLOAT, &newTurnOff0, "off0", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Offset") }, - { PD_FLOAT, &newTurnOff1, "off1", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Offset") }, - { PD_FLOAT, &newTurnOff2, "off2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Offset") }, - { PD_FLOAT, &newTurnOff3, "off3", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Offset") }, + { PD_FLOAT, &newTurnOff0, "off0", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Offset") }, + { PD_FLOAT, &newTurnOff1, "off1", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Offset") }, + { PD_FLOAT, &newTurnOff2, "off2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Offset") }, + { PD_FLOAT, &newTurnOff3, "off3", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d001_10000, N_("Offset") }, #define I_TORAD (8) { PD_FLOAT, &newTurnRad0, "rad0", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Radius") }, { PD_FLOAT, &newTurnRad1, "rad1", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Radius") }, - { PD_FLOAT, &newTurnRad2, "rad2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Radius") }, + { PD_FLOAT, &newTurnRad2, "rad2", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Radius") }, { PD_FLOAT, &newTurnRad3, "rad3", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r_10000_10000, N_("Radius") }, #define I_TOTOELENGTH (12) - { PD_FLOAT, &newTurnToeL, "toeL", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, - { PD_FLOAT, &newTurnToeR, "toeR", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0_10000, N_("Length") }, + { PD_FLOAT, &newTurnToeL, "toeL", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d300_10000, N_("Length") }, + { PD_FLOAT, &newTurnToeR, "toeR", PDO_DIM|PDO_DLGIGNORELABELWIDTH, &r0d300_10000, N_("Length") }, #define I_TOANGLE (14) - { PD_FLOAT, &newTurnAngle0, "angle0", PDO_DLGIGNORELABELWIDTH, &r0_360, N_("Angle") }, - { PD_FLOAT, &newTurnAngle1, "angle1", PDO_DLGIGNORELABELWIDTH, &r0_360, N_("Angle") }, - { PD_FLOAT, &newTurnAngle2, "angle2", PDO_DLGIGNORELABELWIDTH, &r0_360, N_("Angle") }, + { PD_FLOAT, &newTurnAngle0, "angle0", PDO_DLGIGNORELABELWIDTH, &r0d001_90, N_("Angle") }, + { PD_FLOAT, &newTurnAngle1, "angle1", PDO_DLGIGNORELABELWIDTH, &r0d001_90, N_("Angle") }, + { PD_FLOAT, &newTurnAngle2, "angle2", PDO_DLGIGNORELABELWIDTH, &r0d001_90, N_("Angle") }, #define I_TO_LAST_FLOAT (17) - { PD_FLOAT, &newTurnAngle3, "angle3", PDO_DLGIGNORELABELWIDTH, &r0_360, N_("Angle") }, + { PD_FLOAT, &newTurnAngle3, "angle3", PDO_DLGIGNORELABELWIDTH, &r0d001_90, N_("Angle") }, #define I_TOMANUF (18) - { PD_STRING, &newTurnManufacturer, "manuf", PDO_STRINGLIMITLENGTH, NULL, N_("Manufacturer"), 0, 0, sizeof(newTurnManufacturer)}, + { PD_STRING, &newTurnManufacturer, "manuf", PDO_NOTBLANK, NULL, N_("Manufacturer"), 0, 0, sizeof(newTurnManufacturer)}, #define I_TOLDESC (19) - { PD_STRING, &newTurnLeftDesc, "desc1", PDO_STRINGLIMITLENGTH, NULL, N_("Left Description"), 0, 0, sizeof(newTurnLeftDesc)}, - { PD_STRING, &newTurnLeftPartno, "partno1", PDO_DLGHORZ | PDO_STRINGLIMITLENGTH, NULL, N_(" #"), 0, 0, sizeof(newTurnLeftPartno)}, + { PD_STRING, &newTurnLeftDesc, "desc1", PDO_NOTBLANK, NULL, N_("Left Description"), 0, 0, sizeof(newTurnLeftDesc)}, + { PD_STRING, &newTurnLeftPartno, "partno1", PDO_DLGHORZ | PDO_NOTBLANK, NULL, N_(" #"), 0, 0, sizeof(newTurnLeftPartno)}, #define I_TORDESC (21) - { PD_STRING, &newTurnRightDesc, "desc2", PDO_STRINGLIMITLENGTH, NULL, N_("Right Description"),0, 0, sizeof(newTurnRightDesc)}, - { PD_STRING, &newTurnRightPartno, "partno2", PDO_DLGHORZ | PDO_STRINGLIMITLENGTH, NULL, N_(" #"),0, 0, sizeof(newTurnRightPartno)}, + { PD_STRING, &newTurnRightDesc, "desc2", PDO_NOTBLANK, NULL, N_("Right Description"),0, 0, sizeof(newTurnRightDesc)}, + { PD_STRING, &newTurnRightPartno, "partno2", PDO_DLGHORZ | PDO_NOTBLANK, NULL, N_(" #"),0, 0, sizeof(newTurnRightPartno)}, { PD_FLOAT, &newTurnRoadbedWidth, "roadbedWidth", PDO_DIM, &r0_100, N_("Roadbed Width") }, { PD_LONG, &newTurnRoadbedLineWidth, "roadbedLineWidth", PDO_DLGHORZ, &i0_100, N_("Line Width") }, { PD_COLORLIST, &roadbedColor, "color", PDO_DLGHORZ|PDO_DLGBOXEND, NULL, N_("Color") }, - { PD_BUTTON, (void*)NewTurnOk, "done", PDO_DLGCMDBUTTON, NULL, N_("Ok") }, - { PD_BUTTON, (void*)wPrintSetup, "printsetup", 0, NULL, N_("Print Setup") }, + { PD_BUTTON, NewTurnOk, "done", PDO_DLGCMDBUTTON, NULL, N_("Ok") }, + { PD_BUTTON, wPrintSetup, "printsetup", 0, NULL, N_("Print Setup") }, #define I_TOANGMODE (28) { PD_RADIO, &newTurnAngleMode, "angleMode", 0, newTurnAngleModeLabels }, #define I_TOSLIPMODE (29) @@ -215,7 +209,7 @@ static paramData_t turnDesignPLs[] = { }; #ifndef MKTURNOUT -static paramGroup_t turnDesignPG = { "turnoutNew", 0, turnDesignPLs, sizeof turnDesignPLs/sizeof turnDesignPLs[0] }; +static paramGroup_t turnDesignPG = { "turnoutNew", 0, turnDesignPLs, COUNT( turnDesignPLs ) }; static turnoutInfo_t * customTurnout1, * customTurnout2; static BOOL_T includeNontrackSegments; @@ -253,8 +247,8 @@ static toDesignDesc_t RegDesc = { NTO_REGULAR, N_("Regular Turnout"), 2, - sizeof RegLines/sizeof RegLines[0], RegLines, - sizeof RegFloats/sizeof RegFloats[0], RegFloats, + COUNT( RegLines ), RegLines, + COUNT( RegFloats ), RegFloats, &RegSchema, 1 }; static wLines_t CrvLines[] = { @@ -290,8 +284,8 @@ static toDesignDesc_t CrvDesc = { NTO_CURVED, N_("Curved Turnout"), 2, - sizeof CrvLines/sizeof CrvLines[0], CrvLines, - sizeof CrvFloats/sizeof CrvFloats[0], CrvFloats, + COUNT( CrvLines ), CrvLines, + COUNT( CrvFloats ), CrvFloats, &Crv1Schema, 1 }; static wLines_t CornuLines[] = { @@ -319,8 +313,8 @@ static toDesignDesc_t CornuDesc = { NTO_CORNU, N_("Cornu Curved Turnout"), 2, - sizeof CornuLines/sizeof CornuLines[0], CornuLines, - sizeof CornuFloats/sizeof CornuFloats[0], CornuFloats, + COUNT( CornuLines ), CornuLines, + COUNT( CornuFloats ), CornuFloats, &CornuSchema, 1 }; static wLines_t WyeLines[] = { @@ -356,8 +350,8 @@ static toDesignDesc_t WyeDesc = { NTO_WYE, N_("Wye Turnout"), 1, - sizeof WyeLines/sizeof WyeLines[0], WyeLines, - sizeof WyeFloats/sizeof WyeFloats[0], WyeFloats, + COUNT( WyeLines ), WyeLines, + COUNT( WyeFloats ), WyeFloats, NULL, 1 }; static wLines_t CornuWyeLines[] = { @@ -385,8 +379,8 @@ static toDesignDesc_t CornuWyeDesc = { NTO_CORNUWYE, N_("Cornu Wye Turnout"), 1, - sizeof CornuWyeLines/sizeof CornuWyeLines[0], CornuWyeLines, - sizeof CornuWyeFloats/sizeof CornuWyeFloats[0], CornuWyeFloats, + COUNT( CornuWyeLines ), CornuWyeLines, + COUNT( CornuWyeFloats ), CornuWyeFloats, NULL, 1 }; static wLines_t ThreewayLines[] = { @@ -426,8 +420,8 @@ static toDesignDesc_t ThreewayDesc = { NTO_3WAY, N_("3-way Turnout"), 1, - sizeof ThreewayLines/sizeof ThreewayLines[0], ThreewayLines, - sizeof ThreewayFloats/sizeof ThreewayFloats[0], ThreewayFloats, + COUNT( ThreewayLines ), ThreewayLines, + COUNT( ThreewayFloats ), ThreewayFloats, NULL, 1 }; static wLines_t CornuThreewayLines[] = { @@ -461,8 +455,8 @@ static toDesignDesc_t CornuThreewayDesc = { NTO_CORNU3WAY, N_("Cornu 3-way Turnout"), 1, - sizeof CornuThreewayLines/sizeof CornuThreewayLines[0], CornuThreewayLines, - sizeof CornuThreewayFloats/sizeof CornuThreewayFloats[0], CornuThreewayFloats, + COUNT( CornuThreewayLines ), CornuThreewayLines, + COUNT( CornuThreewayFloats ), CornuThreewayFloats, NULL, 1 }; static wLines_t CrossingLines[] = { @@ -481,8 +475,8 @@ static toDesignDesc_t CrossingDesc = { NTO_CROSSING, N_("Crossing"), 1, - sizeof CrossingLines/sizeof CrossingLines[0], CrossingLines, - sizeof CrossingFloats/sizeof CrossingFloats[0], CrossingFloats, + COUNT( CrossingLines ), CrossingLines, + COUNT( CrossingFloats ), CrossingFloats, &CrossingSchema, 1 }; static wLines_t SingleSlipLines[] = { @@ -502,8 +496,8 @@ static toDesignDesc_t SingleSlipDesc = { NTO_S_SLIP, N_("Single Slipswitch"), 1, - sizeof SingleSlipLines/sizeof SingleSlipLines[0], SingleSlipLines, - sizeof SingleSlipFloats/sizeof SingleSlipFloats[0], SingleSlipFloats, + COUNT( SingleSlipLines ), SingleSlipLines, + COUNT( SingleSlipFloats ), SingleSlipFloats, &SingleSlipSchema, 1 }; static wLines_t DoubleSlipLines[] = { @@ -531,8 +525,8 @@ static toDesignDesc_t DoubleSlipDesc = { NTO_D_SLIP, N_("Double Slipswitch"), 1, - sizeof DoubleSlipLines/sizeof DoubleSlipLines[0], DoubleSlipLines, - sizeof DoubleSlipFloats/sizeof DoubleSlipFloats[0], DoubleSlipFloats, + COUNT( DoubleSlipLines ), DoubleSlipLines, + COUNT( DoubleSlipFloats ), DoubleSlipFloats, &DoubleSlipSchema, 1 }; static wLines_t RightCrossoverLines[] = { @@ -551,8 +545,8 @@ static toDesignDesc_t RightCrossoverDesc = { NTO_R_CROSSOVER, N_("Right Crossover"), 1, - sizeof RightCrossoverLines/sizeof RightCrossoverLines[0], RightCrossoverLines, - sizeof RightCrossoverFloats/sizeof RightCrossoverFloats[0], RightCrossoverFloats, + COUNT( RightCrossoverLines ), RightCrossoverLines, + COUNT( RightCrossoverFloats ), RightCrossoverFloats, &RightCrossoverSchema, 0 }; static wLines_t LeftCrossoverLines[] = { @@ -571,8 +565,8 @@ static toDesignDesc_t LeftCrossoverDesc = { NTO_L_CROSSOVER, N_("Left Crossover"), 1, - sizeof LeftCrossoverLines/sizeof LeftCrossoverLines[0], LeftCrossoverLines, - sizeof LeftCrossoverFloats/sizeof LeftCrossoverFloats[0], LeftCrossoverFloats, + COUNT( LeftCrossoverLines ), LeftCrossoverLines, + COUNT( LeftCrossoverFloats ), LeftCrossoverFloats, &LeftCrossoverSchema, 0 }; static wLines_t DoubleCrossoverLines[] = { @@ -591,8 +585,8 @@ static toDesignDesc_t DoubleCrossoverDesc = { NTO_D_CROSSOVER, N_("Double Crossover"), 1, - sizeof DoubleCrossoverLines/sizeof DoubleCrossoverLines[0], DoubleCrossoverLines, - sizeof DoubleCrossoverFloats/sizeof DoubleCrossoverFloats[0], DoubleCrossoverFloats, + COUNT( DoubleCrossoverLines ), DoubleCrossoverLines, + COUNT( DoubleCrossoverFloats ), DoubleCrossoverFloats, &DoubleCrossoverSchema, 0 }; static wLines_t StrSectionLines[] = { @@ -609,8 +603,8 @@ static toDesignDesc_t StrSectionDesc = { NTO_STR_SECTION, N_("Straight Section"), 1, - sizeof StrSectionLines/sizeof StrSectionLines[0], StrSectionLines, - sizeof StrSectionFloats/sizeof StrSectionFloats[0], StrSectionFloats, + COUNT( StrSectionLines ), StrSectionLines, + COUNT( StrSectionFloats ), StrSectionFloats, &StrSectionSchema, 0 }; static wLines_t CrvSectionLines[] = { @@ -628,8 +622,8 @@ static toDesignDesc_t CrvSectionDesc = { NTO_CRV_SECTION, N_("Curved Section"), 1, - sizeof CrvSectionLines/sizeof CrvSectionLines[0], CrvSectionLines, - sizeof CrvSectionFloats/sizeof CrvSectionFloats[0], CrvSectionFloats, + COUNT( CrvSectionLines ), CrvSectionLines, + COUNT( CrvSectionFloats ), CrvSectionFloats, &CrvSectionSchema, 0 }; #ifdef LATER @@ -647,8 +641,8 @@ static toDesignDesc_t BumperDesc = { NTO_BUMPER, N_("Bumper Section"), 1, - sizeof StrSectionLines/sizeof StrSectionLines[0], StrSectionLines, - sizeof BumperFloats/sizeof BumperFloats[0], BumperFloats, + COUNT( BumberLines ), BumperLines, + COUNT( BumperFloats ), BumperFloats, &BumperSchema, 0 }; static wLines_t TurntableLines[] = { @@ -739,8 +733,8 @@ static toDesignDesc_t TurntableDesc = { NTO_TURNTABLE, N_("Turntable Section"), 1, - sizeof StrSectionLines/sizeof StrSectionLines[0], StrSectionLines, - sizeof TurntableFloats/sizeof TurntableFloats[0], TurntableFloats, + COUNT( TurntableLines ), TurntableLines, + COUNT( TurntableFloats ), TurntableFLoats, &TurntableSchema, 0 }; #endif @@ -900,7 +894,7 @@ BOOL_T HittestTurnoutRoadbed( d -= roadbedWidth/2.0; PointOnCircle( &p0, sp->u.c.center, d, a ); } - dd = 100000.0; + dd = DIST_INF; closest = -1; for (inx=0; inx<segCnt; inx++) { sp = &segPtr[inx]; @@ -953,7 +947,7 @@ EXPORT long ComputeTurnoutRoadbedSide( rbw = (int)(roadbedWidth/length*32/2); /*printf( "L=%0.3f G=%0.3f [%0.3f %0.3f] RBW=%d\n", length, gapWidth, first, last, rbw );*/ res = 0xFF0000FF; - for ( p=searchTable; p<&searchTable[sizeof searchTable/sizeof searchTable[0]]; p++) { + for ( p=searchTable; p<&searchTable[COUNT( searchTable )]; p++) { if ( (p->width < rbw && res==0xFFFFFFFF) || res==0 ) break; res1 = (p->mask & res); @@ -1043,7 +1037,7 @@ if ( debugComputeRoadbed>=3 ) printf( " res=%lx\n", res ); hit0 = hit1; } if ( debugComputeRoadbed>=2 ) printf( "S%d %c res=%lx\n", segInx, side>0?'+':'-', res ); - return res; + return (0xFFFFFFFF)&res; } @@ -1286,11 +1280,10 @@ BOOL_T CallCornuNoBez(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T ra static toDesignSchema_t * LoadSegs( toDesignDesc_t * dp, - wBool_t loadPoints, - wIndex_t * pathLenP ) + wBool_t loadPoints ) { wIndex_t s; - int i, p, p0, p1; + int p, p0, p1; DIST_T d; #ifndef MKTURNOUT wIndex_t pathLen; @@ -1332,15 +1325,15 @@ static toDesignSchema_t * LoadSegs( pp = dp->paths; if (loadPoints) { DYNARR_RESET( trkEndPt_t, tempEndPts_da ); - for ( i=0; i<dp->floatCnt; i++ ) - if ( *(FLOAT_T*)(turnDesignPLs[dp->floats[i].index].valueP) == 0.0 ) - if (dp->type != NTO_CORNU && - dp->type != NTO_CORNUWYE && - dp->type != NTO_CORNU3WAY - ) { - NoticeMessage( MSG_TODSGN_VALUES_GTR_0, _("Ok"), NULL ); - return NULL; - } +// for ( i=0; i<dp->floatCnt; i++ ) +// if ( *(FLOAT_T*)(turnDesignPLs[dp->floats[i].index].valueP) == 0.0 ) +// if (dp->type != NTO_CORNU && +// dp->type != NTO_CORNUWYE && +// dp->type != NTO_CORNU3WAY +// ) { +// NoticeMessage( MSG_TODSGN_VALUES_GTR_0, _("Ok"), NULL ); +// return NULL; +// } switch (dp->type) { case NTO_REGULAR: @@ -1367,9 +1360,9 @@ static toDesignSchema_t * LoadSegs( (newTurnLen1), fabs(newTurnOff1), angle1 ) ) return NULL; d = points[3].x - points[5].x; - if ( d < -0.10 ) + if ( d < -MIN_TRACK_LENGTH ) pp = &Crv3Schema; - else if ( d > 0.10 ) + else if ( d > MIN_TRACK_LENGTH ) pp = &Crv2Schema; else pp = &Crv1Schema; @@ -1422,9 +1415,9 @@ static toDesignSchema_t * LoadSegs( points[7].y = 0; points[7].x = (newTurnLen2); d = points[3].x - points[5].x; - if ( d < -0.10 ) { + if ( d < -MIN_TRACK_LENGTH ) { pp = (dp->type==NTO_3WAY ? &Tri3Schema : &Wye3Schema ); - } else if ( d > 0.10 ) { + } else if ( d > MIN_TRACK_LENGTH ) { pp = (dp->type==NTO_3WAY ? &Tri2Schema : &Wye2Schema ); } else { pp = (dp->type==NTO_3WAY ? &Tri1Schema : &Wye1Schema ); @@ -1499,21 +1492,32 @@ static toDesignSchema_t * LoadSegs( } } - DIST_T end_length = minLength/2; + DIST_T end_length = MIN_TRACK_LENGTH; for (int i=0;i<((dp->type==NTO_CORNU3WAY)?4:3);i++) { if (radii[i] == 0.0) { - Translate(&end_points[i], points[i], 90-angles[i]+(i==0?0:180), end_length); + if (i==2) + Translate(&end_points[i], points[i], NormalizeAngle(90.0+angles[i]+180), end_length); + else + Translate(&end_points[i], points[i], NormalizeAngle(90.0-angles[i]+(i==0?0.0:180.0)), end_length); end_angles[i] = angles[i]; } else { - if (((i==0) && radii[0]>0.0) || ((i==1 || i==3) && radii[i]>0.0)|| ((i==2) && radii[i]<0.0)) - Translate(&end_centers[i], points[i], -angles[i], fabs(radii[i])); - else - Translate(&end_centers[i], points[i], angles[i], fabs(radii[i])); - end_arcs[i] = (radii[i]>=0?1:-1)*R2D(end_length/fabs(radii[i])); + if (i!=2) { + if (((i==0) && radii[0]>0.0) || ((i==1 || i==3) && radii[i]>0.0)) + Translate(&end_centers[i], points[i], -angles[i], fabs(radii[i])); + else + Translate(&end_centers[i], points[i], angles[i]+180, fabs(radii[i])); + end_arcs[i] = (radii[i]>=0?1:-1)*R2D(end_length/fabs(radii[i])); + } else { + if (radii[2]>0.0) + Translate(&end_centers[i], points[i], angles[i]+180, fabs(radii[i])); + else + Translate(&end_centers[i], points[i], -angles[i], fabs(radii[i])); + end_arcs[i] = (radii[i]>=0?-1:1)*R2D(end_length/fabs(radii[i])); + } end_points[i] = points[i]; - Rotate(&end_points[i],end_centers[i],((i==0||i==3)?-1:1)*end_arcs[i]); - end_angles[i] = angles[i]-((i==0||i==3)?-1:1)*end_arcs[i]; + Rotate(&end_points[i],end_centers[i],end_arcs[i]); + end_angles[i] = angles[i]+end_arcs[i]; } LogPrintf( "ctoDes0-%d: EP(%f,%f) NEP(%f,%f) EA(%f) NEA(%f) R(%f) ARC(%f) EC(%f,%f) \n", i+1,points[i].x,points[i].y,end_points[i].x,end_points[i].y,angles[i],end_angles[i],radii[i],end_arcs[i], @@ -1620,20 +1624,18 @@ LogPrintf( "ctoDes0-%d: EP(%f,%f) NEP(%f,%f) EA(%f) NEA(%f) R(%f) ARC(%f) EC(%f, int inx,subSeg; wBool_t back, neg; - CallCornu0(&cornuData.pos[0],&cornuData.center[0],&cornuData.angle[0],&cornuData.radius[0],&tempSegs_da, FALSE); - /* Override if a "Y" has zero radius at base to be a straight until the Toe * We set the start of the curve to be at the Toe position */ if (cornuData.radius[0] == 0.0) { - pos.x = end_points[0].x+(LH_first?newTurnToeL:newTurnToeR); - pos.y = 0.0; + pos.x = end_points[0].x+(LH_first?newTurnToeL:newTurnToeR)-MIN_TRACK_LENGTH; + pos.y = end_points[0].y; angle = 90.0; radius = 0.0; center = zero; } else { - /*Find Toe 1 from curve */ + CallCornu0(&cornuData.pos[0],&cornuData.center[0],&cornuData.angle[0],&cornuData.radius[0],&tempSegs_da, FALSE); /*Get ToeAngle/Radius/Center for first toe */ pos.x = end_points[0].x+(LH_first?newTurnToeL:newTurnToeR); @@ -1692,22 +1694,30 @@ LogPrintf( "ctoDes0-%d: EP(%f,%f) NEP(%f,%f) EA(%f) NEA(%f) R(%f) ARC(%f) EC(%f, if (dp->type == NTO_CORNU3WAY) { if (newTurnToeR!=newTurnToeL) { /* Second Toe */ - pos.x = end_points[0].x+(LH_first?newTurnToeR:newTurnToeL); - pos.y = end_points[0].y; /* This will be close to but not on the curve */ - angle = GetAngleSegs(tempSegs_da.cnt,(trkSeg_t *)(tempSegs_da.ptr),&pos,&inx,NULL,&back,&subSeg,&neg); - segPtr = &DYNARR_N(trkSeg_t, tempSegs_da, inx); - - if (segPtr->type == SEG_BEZTRK) { - segPtr = &DYNARR_N(trkSeg_t,segPtr->bezSegs,subSeg); - } - - if (segPtr->type == SEG_STRTRK) { + if (cornuData.radius[0] == 0.0) { + pos.x = end_points[0].x+(LH_first?newTurnToeR:newTurnToeL)-MIN_TRACK_LENGTH; + pos.y = 0.0; + angle = 90.0; radius = 0.0; center = zero; - } else if (segPtr->type == SEG_CRVTRK) { - center = segPtr->u.c.center; - radius = fabs(segPtr->u.c.radius); - } + } else { + pos.x = end_points[0].x+(LH_first?newTurnToeR:newTurnToeL); + pos.y = end_points[0].y; /* This will be close to but not on the curve */ + angle = GetAngleSegs(tempSegs_da.cnt,(trkSeg_t *)(tempSegs_da.ptr),&pos,&inx,NULL,&back,&subSeg,&neg); + segPtr = &DYNARR_N(trkSeg_t, tempSegs_da, inx); + + if (segPtr->type == SEG_BEZTRK) { + segPtr = &DYNARR_N(trkSeg_t,segPtr->bezSegs,subSeg); + } + + if (segPtr->type == SEG_STRTRK) { + radius = 0.0; + center = zero; + } else if (segPtr->type == SEG_CRVTRK) { + center = segPtr->u.c.center; + radius = fabs(segPtr->u.c.radius); + } + } cornuData.pos[3] = pos; cornuData.center[3] = center; cornuData.angle[3] = angle; @@ -1786,16 +1796,36 @@ LogPrintf( "ctoDes1: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f), EP(%f,%f) RP0(%f,%f) points[0].x,points[0].y,end_points[0].x,end_points[0].y, rp0.x,rp0.y,rp1.x,rp1.y); } - - if ((cornuData.pos[0].x != cornuData.pos[1].x) || - (cornuData.pos[0].y != cornuData.pos[1].y) ) + //If Radius zero, just a straight to the First Toe if offset + if (cornuData.radius[0] == 0.0) { + if ((cornuData.pos[0].x != cornuData.pos[1].x) || + (cornuData.pos[0].y != cornuData.pos[1].y)) { + DYNARR_APPEND(trkSeg_t,tempSegs_da,1); + temp_p = &DYNARR_LAST(trkSeg_t,tempSegs_da); + temp_p->type = SEG_STRTRK; + temp_p->color = wDrawColorBlack; + temp_p->width = 0.0; + temp_p->u.l.pos[0] = cornuData.pos[0]; + temp_p->u.l.pos[1] = cornuData.pos[1]; + } + } else if ((cornuData.pos[0].x != cornuData.pos[1].x) || + (cornuData.pos[0].y != cornuData.pos[1].y) ) CallCornuNoBez(&cornuData.pos[0],&cornuData.center[0],&cornuData.angle[0],&cornuData.radius[0],&tempSegs_da); + Toe1Seg = tempSegs_da.cnt; if (dp->type == NTO_CORNU3WAY) { if (newTurnToeR!=newTurnToeL) { /* Toe1 to Toe2 in tempSegs array */ - if ((cornuData.pos[2].x != cornuData.pos[3].x) || + if (cornuData.radius[0] == 0.0) { + DYNARR_APPEND(trkSeg_t,cornuSegs_da,1); + temp_p = &DYNARR_LAST(trkSeg_t,cornuSegs_da); + temp_p->type = SEG_STRTRK; + temp_p->color = wDrawColorBlack; + temp_p->width = 0.0; + temp_p->u.l.pos[0] = cornuData.pos[2]; + temp_p->u.l.pos[1] = cornuData.pos[3]; + } else if ((cornuData.pos[2].x != cornuData.pos[3].x) || (cornuData.pos[2].y != cornuData.pos[3].y) ) CallCornuNoBez(&cornuData.pos[2],&cornuData.center[2],&cornuData.angle[2],&cornuData.radius[2],&cornuSegs_da); @@ -1817,7 +1847,7 @@ LogPrintf( "ctoDes1: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f), EP(%f,%f) RP0(%f,%f) temp_p->color = wDrawColorBlack; temp_p->width = 0.0; temp_p->u.l.pos[0] = cornuData.pos[5]; - temp_p->u.l.pos[1] = end_points[3]; + temp_p->u.l.pos[1] = points[3]; LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->u.l.pos[0].x,temp_p->u.l.pos[0].y,temp_p->u.l.pos[1].x,temp_p->u.l.pos[1].y ); } else { @@ -1826,7 +1856,7 @@ LogPrintf( "ctoDes1: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f), EP(%f,%f) RP0(%f,%f) temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[3]); + temp_p->u.c.radius = -radii[3]; //Assumed Left if (radii[3]>0) temp_p->u.c.a0 = FindAngle(end_centers[3],points[3]); else @@ -1861,7 +1891,7 @@ LogPrintf( "ctoDes1: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f), EP(%f,%f) RP0(%f,%f) temp_p->color = wDrawColorBlack; temp_p->width = 0.0; temp_p->u.l.pos[0] = cornuData.pos[7]; - temp_p->u.l.pos[1] = end_points[1]; + temp_p->u.l.pos[1] = points[1]; LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->u.l.pos[0].x,temp_p->u.l.pos[0].y,temp_p->u.l.pos[1].x,temp_p->u.l.pos[1].y ); } else { @@ -1870,7 +1900,7 @@ LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[1]); + temp_p->u.c.radius = -radii[1]; //Negative relative to left if (radii[1]>0) temp_p->u.c.a0 = FindAngle(end_centers[1],points[1]); else @@ -1903,7 +1933,7 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) temp_p->color = wDrawColorBlack; temp_p->width = 0.0; temp_p->u.l.pos[0] = cornuData.pos[9]; - temp_p->u.l.pos[1] = end_points[2]; + temp_p->u.l.pos[1] = points[2]; LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->u.l.pos[0].x,temp_p->u.l.pos[0].y,temp_p->u.l.pos[1].x,temp_p->u.l.pos[1].y ); } else { @@ -1912,9 +1942,9 @@ LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[2]); - if (radii[2]<0) - temp_p->u.c.a0 = FindAngle(end_centers[2],points[2]); + temp_p->u.c.radius = radii[2]; + if (radii[2]>0) + temp_p->u.c.a0 = FindAngle(end_centers[2],cornuData.pos[9]); else temp_p->u.c.a0 = FindAngle(end_centers[2],end_points[2]); temp_p->u.c.a1 = fabs(end_arcs[2]); @@ -1945,7 +1975,7 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) static char pathChar[512]; if (dp->type == NTO_CORNU3WAY) { strcpy(pathChar,"Normal"); /* Also resets array */ - pathLen = strlen(pathChar)+1; + pathLen = (wIndex_t)strlen(pathChar)+1; for (uint8_t i=0;i<CenterEndSeg;i++) { pathChar[pathLen] = i+1; pathLen++; @@ -1955,10 +1985,10 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) pathChar[pathLen] = 0; pathLen++; sprintf(&pathChar[pathLen],"%s","Left"); - pathLen += strlen(&pathChar[pathLen])+1; + pathLen += (wIndex_t)strlen(&pathChar[pathLen])+1; } else { strcpy(pathChar,"Left"); - pathLen = strlen(pathChar)+1; + pathLen = (wIndex_t)strlen(pathChar)+1; } for (uint8_t i=0;i<Toe1Seg;i++) { pathChar[pathLen] = i+1; @@ -1982,7 +2012,7 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) pathLen++; sprintf(&pathChar[pathLen],"%s","Right"); - pathLen += strlen(&pathChar[pathLen])+1; + pathLen += (wIndex_t)strlen(&pathChar[pathLen])+1; for (uint8_t i=0;i<Toe1Seg;i++) { pathChar[pathLen] = i+1; @@ -2107,9 +2137,9 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) switch (dp->type) { case NTO_CURVED: d = points[3].x - points[5].x; - if ( d < -0.10 ) + if ( d < -MIN_TRACK_LENGTH ) pp = &Crv3Schema; - else if ( d > 0.10 ) + else if ( d > MIN_TRACK_LENGTH ) pp = &Crv2Schema; else pp = &Crv1Schema; @@ -2121,7 +2151,7 @@ LogPrintf( "ctoDes2: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) if(dp->type == NTO_CORNU) { DYNARR_SET( trkEndPt_t, tempEndPts_da, 3 ); - DIST_T end_length = minLength/2; + DIST_T end_length = MIN_TRACK_LENGTH; // Adjust end_points to impose small fixed end segments @@ -2173,7 +2203,7 @@ LogPrintf( "ctoDes0-%d: EP(%f,%f) NEP(%f,%f) EA(%f) NEA(%f) R(%f) ARC(%f) EC(%f, cornuData.radius[0] = fabs(radii[0]); cornuData.radius[1] = fabs(radii[2]); cornuData.radius[3] = fabs(radii[2]); - cornuData.radius[5] = fabs(radii[1]); /*Inner*/ + cornuData.radius[5] = fabs(radii[1]); /*Inner*/ DYNARR_RESET( trkSeg_t, tempSegs_da ); trkSeg_t * temp_p, * cornu_p; @@ -2188,7 +2218,7 @@ LogPrintf( "ctoDes0-%d: EP(%f,%f) NEP(%f,%f) EA(%f) NEA(%f) R(%f) ARC(%f) EC(%f, wBool_t back, neg; DIST_T radius; coOrd center; - pos.x = end_points[0].x+newTurnToeL; + pos.x = end_points[0].x+newTurnToeL-MIN_TRACK_LENGTH; pos.y = end_points[0].y; /* This will be close to but not on the curve */ ANGLE_T angle = GetAngleSegs(tempSegs_da.cnt,(trkSeg_t *)(tempSegs_da.ptr),&pos,&inx,NULL,&back,&subSeg,&neg); segPtr = &DYNARR_N(trkSeg_t, tempSegs_da, inx); @@ -2239,7 +2269,7 @@ LogPrintf( "ctoDes1: P0(%f,%f) P1(%f,%f) \n", temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[0]);; + temp_p->u.c.radius = -radii[0]; if (radii[0]>0.0) temp_p->u.c.a0 = FindAngle(end_centers[0],end_points[0]); else @@ -2281,7 +2311,7 @@ LogPrintf( "ctoDes2: P0(%f,%f) P1(%f,%f) \n", temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[2]); + temp_p->u.c.radius = -radii[2]; if (radii[2]>0) temp_p->u.c.a0 = FindAngle(end_centers[2],points[2]); else @@ -2324,7 +2354,7 @@ LogPrintf( "ctoDes3: P0(%f,%f) P1(%f,%f) \n", temp_p->type = SEG_CRVTRK; temp_p->color = wDrawColorBlack; temp_p->width = 0.0; - temp_p->u.c.radius = fabs(radii[1]); + temp_p->u.c.radius = -radii[1]; if (radii[1]>0) temp_p->u.c.a0 = FindAngle(end_centers[1],points[1]); else @@ -2357,7 +2387,7 @@ LogPrintf( "ctoDes3: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) static char pathChar[512]; strcpy(pathChar,"Normal"); /* Also resets array */ - pathLen = strlen(pathChar)+1; + pathLen = (wIndex_t)strlen(pathChar)+1; for (uint8_t i=0;i<OuterEndSeg;i++) { pathChar[pathLen] = i+1; @@ -2370,7 +2400,7 @@ LogPrintf( "ctoDes3: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) sprintf(&pathChar[pathLen],"%s","Reverse"); - pathLen += strlen(&pathChar[pathLen])+1; + pathLen += (wIndex_t)strlen(&pathChar[pathLen])+1; for (uint8_t i=0;i<ToeSeg;i++) { pathChar[pathLen] = i+1; pathLen++; @@ -2393,7 +2423,7 @@ LogPrintf( "ctoDes3: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) if (!( (dp->type== NTO_CORNU) || (dp->type == NTO_CORNUWYE) || (dp->type == NTO_CORNU3WAY))) { segOrder = pp->segOrder; - segCnt = strlen( segOrder ); + segCnt = (wIndex_t)strlen( segOrder ); if (segCnt%3 != 0) AbortProg( dp->label ); segCnt /= 3; @@ -2429,11 +2459,8 @@ LogPrintf( "ctoDes3: R(%f) A0(%f) A1(%f) C(%f,%f) P(%f,%f) EP(%f,%f) RP0(%f,%f) AddRoadbed(); #ifndef MKTURNOUT - if ( (pathLen=CheckPaths( segCnt, &tempSegs(0), pp->paths )) < 0 ) + if ( CheckPaths( segCnt, &tempSegs(0), pp->paths ) < 0 ) return NULL; - - if (pathLenP) - *pathLenP = pathLen; #endif return pp; } @@ -2474,7 +2501,7 @@ static void NewTurnPrint( { 0.0, 0.0 }, Pix2CoOrd, CoOrd2Pix }; - if ((pp=LoadSegs( curDesign, TRUE, NULL )) == NULL) + if ((pp=LoadSegs( curDesign, TRUE )) == NULL) return; if (includeNontrackSegments && customTurnout1) CopyNonTracks( customTurnout1 ); @@ -2529,26 +2556,25 @@ static void NewTurnPrint( #endif orig.x = - ( size.y + orig.x + newTurnTrackGauge/2.0 + 0.5 ); orig.y -= (0.5); + coOrd strPos; for ( i=0, newTurnout_d.orig.x=orig.x; i<ii; i++, newTurnout_d.orig.x+=newTurnout_d.size.x ) { for ( j=0, newTurnout_d.orig.y=orig.y; j<jj; j++, newTurnout_d.orig.y+=newTurnout_d.size.y ) { newTurnout_d.d = wPrintPageStart(); newTurnout_d.dpi = wDrawGetDPI(newTurnout_d.d); + strPos.x = newTurnout_d.orig.x + 3.0; sprintf( message, "%s", sProdName ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(6.75), 0.0, message, fp, 40, - wDrawColorBlack, 0 ); + strPos.y = newTurnout_d.orig.y + 6.75; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 40, wDrawColorBlack ); sprintf( message, _("%s Designer"), _(curDesign->label) ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(6.25), 0.0, message, fp, 30, - wDrawColorBlack, 0 ); + strPos.y -= 0.5; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 20, wDrawColorBlack ); sprintf( message, _("%s %d x %d (of %d x %d)"), _("Page"), i+1, j+1, ii, jj ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(5.75), 0.0, message, fp, 20, - wDrawColorBlack, 0 ); - + strPos.y -= 0.5; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 20, wDrawColorBlack ); + strPos.y -= 0.10; for ( p=0; p<curDesign->floatCnt; p++ ) { tmpR = *(FLOAT_T*)(turnDesignPLs[curDesign->floats[p].index].valueP); sprintf( message, "%s: %s", @@ -2556,34 +2582,21 @@ static void NewTurnPrint( curDesign->floats[p].mode==Dim_e? FormatDistance(tmpR): FormatFloat(tmpR) ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(5.50-p*0.25), 0.0, - message, fp, 20, wDrawColorBlack, 0 ); + strPos.y -= 0.25; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 16, wDrawColorBlack ); } if (newTurnLeftDesc[0] || newTurnLeftPartno[0]) { sprintf( message, "%s %s %s", newTurnManufacturer, newTurnLeftPartno, newTurnLeftDesc ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(5.50-curDesign->floatCnt*0.25), 0.0, - message, fp, 20, wDrawColorBlack, 0 ); + strPos.y -= 0.25; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 16, wDrawColorBlack ); } if (newTurnRightDesc[0] || newTurnRightPartno[0]) { sprintf( message, "%s %s %s", newTurnManufacturer, newTurnRightPartno, newTurnRightDesc ); - wDrawString( newTurnout_d.d, POSX(3.0), - POSY(5.50-curDesign->floatCnt*0.25-0.25), 0.0, - message, fp, 20, wDrawColorBlack, 0 ); + strPos.y -= 0.25; + DrawString( &newTurnout_d, strPos, 0.0, message, fp, 16, wDrawColorBlack ); } - wDrawLine( newTurnout_d.d, POSX(0), POSY(0), - POSX(newTurnout_d.size.x), POSY(0), 0, wDrawLineSolid, - wDrawColorBlack, 0 ); - wDrawLine( newTurnout_d.d, POSX(newTurnout_d.size.x), POSY(0.0), - POSX(newTurnout_d.size.x), POSY(newTurnout_d.size.y), 0, - wDrawLineSolid, wDrawColorBlack, 0 ); - wDrawLine( newTurnout_d.d, POSX(newTurnout_d.size.x), POSY(newTurnout_d.size.y), - POSX(0.0), POSY(newTurnout_d.size.y), 0, wDrawLineSolid, - wDrawColorBlack, 0 ); - wDrawLine( newTurnout_d.d, POSX(0.0), POSY(newTurnout_d.size.y), - POSX(0.0), POSX(0.0), 0, wDrawLineSolid, wDrawColorBlack, 0 ); + DrawRectangle( &newTurnout_d, newTurnout_d.orig, newTurnout_d.size, wDrawColorBlack, DRAW_CLOSED ); DrawSegs( &newTurnout_d, zero, 270.0, &tempSegs(0), tempSegs_da.cnt, newTurnTrackGauge, wDrawColorBlack ); @@ -2615,7 +2628,6 @@ static void NewTurnOk( void * context ) { FILE * f; toDesignSchema_t * pp; - wIndex_t pathLen; int i; BOOL_T foundR=FALSE; char * cp; @@ -2625,16 +2637,20 @@ static void NewTurnOk( void * context ) FLOAT_T flt; wIndex_t segCnt; char * customInfoP; - char *oldLocale = NULL; - if ((pp=LoadSegs( curDesign, TRUE, &pathLen )) == NULL) +#ifndef MKTURNOUT + if ( ! ParamCheckInputs( &turnDesignPG, (wControl_p)turnDesignPG.okB ) ) return; +#endif - if ( (curDesign->strCnt >= 1 && newTurnLeftDesc[0] == 0) || - (curDesign->strCnt >= 2 && newTurnRightDesc[0] == 0) ) { - NoticeMessage( MSG_TODSGN_DESC_NONBLANK, _("Ok"), NULL ); + if ((pp=LoadSegs( curDesign, TRUE )) == NULL) return; - } + +// if ( (curDesign->strCnt >= 1 && newTurnLeftDesc[0] == 0) || +// (curDesign->strCnt >= 2 && newTurnRightDesc[0] == 0) ) { +// NoticeMessage( MSG_TODSGN_DESC_NONBLANK, _("Ok"), NULL ); +// return; +// } BuildTrimedTitle( message, "\t", newTurnManufacturer, newTurnLeftDesc, newTurnLeftPartno ); #ifndef MKTURNOUT @@ -2643,7 +2659,7 @@ static void NewTurnOk( void * context ) if ( !NoticeMessage( MSG_TODSGN_REPLACE, _("Yes"), _("No") ) ) return; } - oldLocale = SaveLocale("C"); + SetCLocale(); #endif f = OpenCustom("a"); @@ -2695,6 +2711,9 @@ static void NewTurnOk( void * context ) strcpy( tempCustom, message ); segCnt = tempSegs_da.cnt; + long options = 0; + if ( curDesign->type == NTO_D_SLIP && newTurnSlipMode == 1) + options |= COMPOUND_OPTION_PATH_NOCOMBINE; #ifndef MKTURNOUT if (includeNontrackSegments && customTurnout1) CopyNonTracks( customTurnout1 ); @@ -2708,13 +2727,12 @@ static void NewTurnOk( void * context ) (curDesign->type == NTO_CORNU3WAY)) { radii_ends = &radii[0]; } - to = CreateNewTurnout( newTurnScaleName, tempCustom, tempSegs_da.cnt, &tempSegs(0), - pathLen, pp->paths, tempEndPts_da.cnt, &tempEndPts(0), radii, FALSE ); + pp->paths, tempEndPts_da.cnt, &tempEndPts(0), FALSE, options ); to->customInfo = customInfoP; #endif if (f) { - fprintf( f, "TURNOUT %s \"%s\"\n", newTurnScaleName, PutTitle(tempCustom) ); + fprintf( f, "TURNOUT %s \"%s\" %ld\n", newTurnScaleName, PutTitle(tempCustom), options ); #ifdef MKTURNOUT if (doCustomInfoLine) #endif @@ -2729,7 +2747,7 @@ static void NewTurnOk( void * context ) points[3].y = - points[3].y; points[4].y = - points[4].y; radii[0] = - radii[0]; - LoadSegs( curDesign, FALSE, &pathLen ); + LoadSegs( curDesign, FALSE ); tempEndPts(2).pos.y = - tempEndPts(2).pos.y; tempEndPts(2).angle = 180.0 - tempEndPts(2).angle; BuildTrimedTitle( tempCustom, "\t", newTurnManufacturer, newTurnRightDesc, newTurnRightPartno ); @@ -2740,11 +2758,11 @@ static void NewTurnOk( void * context ) if ( customTurnout2 ) customTurnout2->segCnt = 0; to = CreateNewTurnout( newTurnScaleName, tempCustom, tempSegs_da.cnt, &tempSegs(0), - pathLen, pp->paths, tempEndPts_da.cnt, &tempEndPts(0), NULL, FALSE ); + pp->paths, tempEndPts_da.cnt, &tempEndPts(0), FALSE, options ); to->customInfo = customInfoP; #endif if (f) { - fprintf( f, "TURNOUT %s \"%s\"\n", newTurnScaleName, PutTitle(tempCustom) ); + fprintf( f, "TURNOUT %s \"%s\" %ld\n", newTurnScaleName, PutTitle(tempCustom), options ); #ifdef MKTURNOUT if (doCustomInfoLine) #endif @@ -2774,7 +2792,7 @@ static void NewTurnOk( void * context ) angles[4] = -angles[4]; angles[5] = -angles[5]; angles[6] = -angles[6]; - LoadSegs( curDesign, FALSE, &pathLen ); + LoadSegs( curDesign, FALSE ); tempEndPts(1).pos.y = - tempEndPts(1).pos.y; tempEndPts(1).angle = 180.0 - tempEndPts(1).angle; tempEndPts(2).pos.y = - tempEndPts(2).pos.y; @@ -2787,11 +2805,11 @@ static void NewTurnOk( void * context ) if ( customTurnout2 ) customTurnout2->segCnt = 0; to = CreateNewTurnout( newTurnScaleName, tempCustom, tempSegs_da.cnt, &tempSegs(0), - pathLen, pp->paths, tempEndPts_da.cnt, &tempEndPts(0), NULL, FALSE ); + pp->paths, tempEndPts_da.cnt, &tempEndPts(0), FALSE, options ); to->customInfo = customInfoP; #endif if (f) { - fprintf( f, "TURNOUT %s \"%s\"\n", newTurnScaleName, PutTitle(tempCustom) ); + fprintf( f, "TURNOUT %s \"%s\" %ld\n", newTurnScaleName, PutTitle(tempCustom), options ); #ifdef MKTURNOUT if (doCustomInfoLine) #endif @@ -2807,7 +2825,7 @@ static void NewTurnOk( void * context ) #ifndef MKTURNOUT if (f) fclose(f); - RestoreLocale(oldLocale); + SetUserLocale(); includeNontrackSegments = TRUE; wHide( newTurnW ); DoChangeNotification( CHANGE_PARAMS ); @@ -2826,17 +2844,17 @@ static void NewTurnCancel( wWin_p win ) -static wPos_t turnDesignWidth; -static wPos_t turnDesignHeight; +static wWinPix_t turnDesignWidth; +static wWinPix_t turnDesignHeight; static void TurnDesignLayout( paramData_t * pd, int index, - wPos_t colX, - wPos_t * w, - wPos_t * h ) + wWinPix_t colX, + wWinPix_t * w, + wWinPix_t * h ) { - wPos_t inx; + wIndex_t inx; if ( curDesign == NULL ) return; if ( index >= I_TO_FIRST_FLOAT && index <= I_TO_LAST_FLOAT ) { @@ -2856,18 +2874,18 @@ static void TurnDesignLayout( static void SetupTurnoutDesignerW( toDesignDesc_t * newDesign ) { - static wPos_t partnoWidth; + static wWinPix_t partnoWidth; int inx; - wPos_t w, h, ctlH; + wWinPix_t w, h, ctlH; if ( newTurnW == NULL ) { partnoWidth = wLabelWidth( "999-99999-9999" ); turnDesignPLs[I_TOLDESC+1].winData = turnDesignPLs[I_TORDESC+1].winData = - (void*)(intptr_t)partnoWidth; + I2VP(partnoWidth); partnoWidth += wLabelWidth( " # " ); newTurnW = ParamCreateDialog( &turnDesignPG, _("Turnout Designer"), _("Print"), NewTurnPrint, NewTurnCancel, TRUE, TurnDesignLayout, F_BLOCK, NULL ); - for ( inx=0; inx<(sizeof designDescs/sizeof designDescs[0]); inx++ ) { + for ( inx=0; inx<COUNT( designDescs ); inx++ ) { designDescs[inx]->lineC = wLineCreate( turnDesignPG.win, NULL, designDescs[inx]->lineCnt, designDescs[inx]->lines ); wControlShow( (wControl_p)designDescs[inx]->lineC, FALSE ); } @@ -2944,6 +2962,27 @@ static void SetupTurnoutDesignerW( toDesignDesc_t * newDesign ) w -= partnoWidth; wStringSetWidth( (wString_p)turnDesignPLs[I_TOLDESC].control, w ); wStringSetWidth( (wString_p)turnDesignPLs[I_TORDESC].control, w ); + if ( curDesign->type == NTO_CORNU || + curDesign->type == NTO_CORNUWYE || + curDesign->type == NTO_CORNU3WAY ) { + turnDesignPLs[I_TOOFFSET+0].winData = + turnDesignPLs[I_TOOFFSET+1].winData = + turnDesignPLs[I_TOOFFSET+2].winData = + turnDesignPLs[I_TOOFFSET+3].winData = &r_10000_10000; + turnDesignPLs[I_TOANGLE+0].winData = + turnDesignPLs[I_TOANGLE+1].winData = + turnDesignPLs[I_TOANGLE+2].winData = + turnDesignPLs[I_TOANGLE+3].winData = &r_90_90; + } else { + turnDesignPLs[I_TOOFFSET+0].winData = + turnDesignPLs[I_TOOFFSET+1].winData = + turnDesignPLs[I_TOOFFSET+2].winData = + turnDesignPLs[I_TOOFFSET+3].winData = &r0d001_10000; + turnDesignPLs[I_TOANGLE+0].winData = + turnDesignPLs[I_TOANGLE+1].winData = + turnDesignPLs[I_TOANGLE+2].winData = + turnDesignPLs[I_TOANGLE+3].winData = &r0d001_90; + } ParamLayoutDialog( &turnDesignPG ); } } @@ -2989,7 +3028,6 @@ EXPORT void EditCustomTurnout( turnoutInfo_t * to, turnoutInfo_t * to1 ) int i; toDesignDesc_t * dp; char * type, * name, *cp, *mfg, *descL, *partL, *descR, *partR; - wIndex_t pathLen; long rgb; trkSeg_p sp0, sp1; BOOL_T segsDiff; @@ -2997,13 +3035,13 @@ EXPORT void EditCustomTurnout( turnoutInfo_t * to, turnoutInfo_t * to1 ) if ( ! GetArgs( to->customInfo, "qqqqqc", &type, &name, &mfg, &descL, &partL, &cp ) ) return; - for ( i=0; i<(sizeof designDescs/sizeof designDescs[0]); i++ ) { + for ( i=0; i<COUNT( designDescs ); i++ ) { dp = designDescs[i]; if ( strcmp( type, dp->label ) == 0 ) { break; } } - if ( i >= (sizeof designDescs/sizeof designDescs[0]) ) + if ( i >= COUNT( designDescs ) ) return; SetupTurnoutDesignerW(dp); @@ -3054,7 +3092,7 @@ EXPORT void EditCustomTurnout( turnoutInfo_t * to, turnoutInfo_t * to1 ) segsDiff = FALSE; if ( to ) { - LoadSegs( dp, TRUE, &pathLen ); + LoadSegs( dp, TRUE ); segsDiff = FALSE; if ( to->segCnt == tempSegs_da.cnt ) { for ( sp0=to->segs,sp1=&tempSegs(0); (!segsDiff) && sp0<&to->segs[to->segCnt]; sp0++,sp1++ ) { @@ -3112,7 +3150,7 @@ EXPORT void EditCustomTurnout( turnoutInfo_t * to, turnoutInfo_t * to1 ) radii[0] = - radii[0]; radii[1] = - radii[1]; } - LoadSegs( dp, FALSE, &pathLen ); + LoadSegs( dp, FALSE ); if ( dp->type==NTO_REGULAR ) { points[2].y = - points[2].y; radii[0] = - radii[0]; @@ -3190,9 +3228,9 @@ EXPORT void InitNewTurn( wMenu_p m ) { int i; ParamRegister( &turnDesignPG ); - for ( i=0; i<(sizeof designDescs/sizeof designDescs[0]); i++ ) { + for ( i=0; i<COUNT( designDescs ); i++ ) { wMenuPushCreate( m, NULL, _(designDescs[i]->label), 0, - ShowTurnoutDesigner, (void*)designDescs[i] ); + ShowTurnoutDesigner, designDescs[i] ); sprintf( message, "%s SHOW %s", TURNOUTDESIGNER, designDescs[i]->label ); AddPlaybackProc( message, (playbackProc_p)ShowTurnoutDesigner, designDescs[i] ); } @@ -3204,10 +3242,6 @@ EXPORT void InitNewTurn( wMenu_p m ) #ifdef MKTURNOUT -#include <stdlib.h> -#include <stdio.h> -#include <stdarg.h> - char message[STR_HUGE_SIZE]; char * curScaleName; double trackGauge; @@ -3216,7 +3250,7 @@ wDrawColor drawColorBlack; long roadbedColorRGB = 0; EXPORT void AbortProg( - char * msg, + const char * msg, ... ) { static BOOL_T abort2 = FALSE; @@ -3229,7 +3263,7 @@ EXPORT void AbortProg( abort(); } -void * MyRealloc( void * ptr, long size ) +void * MyRealloc( void * ptr, size_t size ) { return realloc( ptr, size ); } @@ -3243,7 +3277,7 @@ EXPORT char * MyStrdup( const char * str ) } -int NoticeMessage( char * msg, char * yes, char * no, ... ) +int NoticeMessage( const char * msg, const char * yes, const char * no, ... ) { /*fprintf( stderr, "%s\n", msg );*/ return 0; @@ -3284,9 +3318,9 @@ EXPORT void ComputeCurvedSeg( } } -EXPORT char * Strcpytrimed( char * dst, char * src, BOOL_T double_quotes ) +EXPORT char * Strcpytrimed( char * dst, const char * src, BOOL_T double_quotes ) { - char * cp; + const char * cp; while (*src && isspace((unsigned char)*src) ) src++; if (!*src) return dst; @@ -3302,7 +3336,7 @@ EXPORT char * Strcpytrimed( char * dst, char * src, BOOL_T double_quotes ) } -EXPORT char * BuildTrimedTitle( char * cp, char * sep, char * mfg, char * desc, char * partno ) +EXPORT char * BuildTrimedTitle( char * cp, const char * sep, const char * mfg, const char * desc, const char * partno ) { cp = Strcpytrimed( cp, mfg, FALSE ); strcpy( cp, sep ); @@ -3502,7 +3536,7 @@ int main ( int argc, char * argv[] ) newTurnScaleName = curScaleName = *argv++; trackGauge = 0.0; - for ( inx=0; inx<sizeof scaleMap/sizeof scaleMap[0]; inx++ ) { + for ( inx=0; inx<COUNT( scaleMap ); inx++ ) { if (strcmp( curScaleName, scaleMap[inx].scale ) == 0 ) { newTurnTrackGauge = trackGauge = scaleMap[inx].trackGauge; break; diff --git a/app/bin/ctrain.c b/app/bin/ctrain.c index b15cb91..f113ee5 100644 --- a/app/bin/ctrain.c +++ b/app/bin/ctrain.c @@ -20,27 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef WINDOWS -#include <errno.h> -#endif -#include <ctype.h> -#include <math.h> -#include <string.h> - -#define PRIVATE_EXTRADATA - #include "compound.h" +#include "cselect.h" #include "ctrain.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" #include "trackx.h" -#include "utility.h" +#include "common-ui.h" long programMode; long maxCouplingSpeed = 100; @@ -53,7 +43,8 @@ static TRKTYP_T T_CAR = -1; typedef enum { ST_NotOnTrack, ST_StopManual, ST_EndOfTrack, ST_OpenTurnout, ST_NoRoom, ST_Crashed } trainStatus_e; -struct extraData { +typedef struct extraDataCar_t { + extraDataBase_t base; traverseTrack_t trvTrk; long state; carItem_p item; @@ -65,7 +56,7 @@ struct extraData { DIST_T distance; coOrd couplerPos[2]; unsigned int trkLayer; -}; +} extraDataCar_t; #define NOTALAYER (127) #define CAR_STATE_IGNORED (1L<<17) @@ -88,6 +79,15 @@ struct extraData { #define SetProcessed( XX ) (XX)->state |= CAR_STATE_PROCESSED #define ClrProcessed( XX ) (XX)->state &= ~CAR_STATE_PROCESSED +// Scroll the window before the train hits the edge +#define OFF_F( ORIG, SIZE, LO, HI ) \ + ( ( (HI).x < (ORIG).x+((SIZE).x)*0.2 && (ORIG).x > 0.0 ) || \ + ( (LO).x > (ORIG).x+((SIZE).x)*0.8 && (ORIG).x+(SIZE).x < mapD.size.x ) || \ + ( (HI).y < (ORIG).y+((SIZE).y)*0.2 && (ORIG).y > 0.0 ) || \ + ( (LO).y > (ORIG).y+((SIZE).y)*0.8 && (ORIG).y+(SIZE).y < mapD.size.y ) ) +#define OFF_FOLLOW( LO, HI ) \ + OFF_F( mainD.orig, mainD.size, LO, HI ) + static wButton_p newcarB; static void ControllerDialogSyncAll(void); @@ -99,6 +99,7 @@ static coOrd followCenter; static BOOL_T trainsTimeoutPending; static enum { TRAINS_STOP, TRAINS_RUN, TRAINS_IDLE, TRAINS_PAUSE } trainsState; static wIcon_p stopI, goI; +static wIcon_p stopB, goB; static void RestartTrains(void); static void DrawAllCars(void); static void UncoupleCars(track_p, track_p); @@ -113,7 +114,7 @@ static void PlaceCar(track_p); #define WALK_CARS_START( CAR, XX, DIR ) \ while (1) { \ - (XX) = GetTrkExtraData(CAR);\ + (XX) = GET_EXTRA_DATA(CAR, T_CAR, extraDataCar_t);\ { \ #define WALK_CARS_END( CAR, XX, DIR ) \ @@ -136,7 +137,7 @@ void CarGetPos( coOrd * posR, ANGLE_T * angleR) { - struct extraData * xx = GetTrkExtraData(car); + struct extraDataCar_t * xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); if (GetTrkType(car) != T_CAR) { AbortProg("getCarPos"); @@ -149,7 +150,7 @@ void CarGetPos( void CarSetVisible( track_p car) { - struct extraData * xx; + struct extraDataCar_t * xx; int dir; dir = 0; WALK_CARS_START(car, xx, dir) @@ -243,7 +244,7 @@ static void DescribeCar( char * str, CSIZE_T len) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCar_t *xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); char * cp; coOrd size; CarItemSize(xx->item, &size); @@ -320,7 +321,7 @@ EXPORT void CheckCarTraverse(track_p track) { track_p car; for (car=NULL; TrackIterate(&car);) { if (GetTrkType(car) == T_CAR) { - struct extraData * xx = GetTrkExtraData(car); + struct extraDataCar_t * xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); if (xx->trvTrk.trk == track) { xx->trvTrk.trk=NULL; xx->status = ST_NotOnTrack; @@ -340,10 +341,10 @@ static void DrawCar( drawCmd_p d, wDrawColor color) { - struct extraData * xx = GetTrkExtraData(car); + struct extraDataCar_t * xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); int dir; vector_t coupler[2]; - struct extraData * xx1; + struct extraDataCar_t * xx1; int dir1; if (drawCarEnable == FALSE) { @@ -369,7 +370,7 @@ static void DrawCar( coupler[dir].pos = xx->couplerPos[dir]; if ((car1 = GetTrkEndTrk(car,dir))) { - xx1 = GetTrkExtraData(car1); + xx1 = GET_EXTRA_DATA(car1, T_CAR, extraDataCar_t); dir1 = (GetTrkEndTrk(car1,0)==car)?0:1; coupler[dir].angle = FindAngle(xx->couplerPos[dir], xx1->couplerPos[dir1]); } else { @@ -387,13 +388,13 @@ static DIST_T DistanceCar( track_p trk, coOrd * pos) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCar_t * xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); DIST_T dist; coOrd pos1; coOrd size; if (IsIgnored(xx)) { - return 10000.0; + return DIST_INF; } CarItemSize(xx->item, @@ -420,7 +421,7 @@ static DIST_T DistanceCar( static void SetCarBoundingBox( track_p car) { - struct extraData * xx = GetTrkExtraData(car); + struct extraDataCar_t * xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); coOrd lo, hi, p[4]; int inx; coOrd size; @@ -464,10 +465,10 @@ track_p NewCar( ANGLE_T angle) { track_p trk; - struct extraData * xx; + struct extraDataCar_t * xx; trk = NewTrack(index, T_CAR, 2, sizeof(*xx)); /*SetEndPts( trk, 0 );*/ - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); /*SetTrkVisible( trk, IsVisible(xx) );*/ xx->item = item; xx->trvTrk.pos = pos; @@ -483,7 +484,7 @@ track_p NewCar( static void DeleteCar( track_p trk) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCar_t * xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); CarItemSetTrack(xx->item, NULL); } @@ -508,7 +509,7 @@ static void MoveCar( track_p car, coOrd pos) { - struct extraData *xx = GetTrkExtraData(car); + struct extraDataCar_t *xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); xx->trvTrk.pos.x += pos.x; xx->trvTrk.pos.y += pos.y; xx->trvTrk.trk = NULL; @@ -522,7 +523,7 @@ static void RotateCar( coOrd pos, ANGLE_T angle) { - struct extraData *xx = GetTrkExtraData(car); + struct extraDataCar_t *xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); Rotate(&xx->trvTrk.pos, pos, angle); xx->trvTrk.angle = NormalizeAngle(xx->trvTrk.angle + angle); xx->trvTrk.trk = NULL; @@ -536,6 +537,8 @@ static BOOL_T QueryCar(track_p trk, int query) switch (query) { case Q_NODRAWENDPT: return TRUE; + case Q_ISTRAIN: + return TRUE; default: return FALSE; @@ -547,14 +550,14 @@ static BOOL_T StoreCar( void **data, long * len) { - struct extraData *xx = GetTrkExtraData(car); + struct extraDataCar_t *xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); return StoreCarItem(xx->item,data,len); } static BOOL_T ReplayCar (track_p car, void *data,long len) { - struct extraData *xx = GetTrkExtraData(car); + struct extraDataCar_t *xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); return ReplayCarItem(xx->item,data,len); } @@ -633,10 +636,10 @@ typedef struct { static trainControlDlg_t * curTrainDlg; -static void SpeedRedraw(wDraw_p, void *, wPos_t, wPos_t); +static void SpeedRedraw(wDraw_p, void *, wWinPix_t, wWinPix_t); static void SpeedAction(wAction_t, coOrd); static void LocoListChangeEntry(track_p, track_p); -static void CmdTrainExit(void *); +static void CmdTrainExit(void * unused); drawCmd_t speedD = { NULL, @@ -658,18 +661,18 @@ static char * trainAutoReverseLabels[] = { N_("Auto Reverse"), NULL }; static paramData_t trainPLs[] = { #define I_LIST (0) #ifdef WINDOWS - /*0*/ { PD_DROPLIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, (void*)120, NULL, 0 }, + /*0*/ { PD_DROPLIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, I2VP(120), NULL, 0 }, #else /*0*/ { PD_LIST, NULL, "list", PDO_NOPREF|PDO_NOPSHUPD, &listData, NULL, 0 }, #endif #define I_STATUS (1) - { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, + { PD_MESSAGE, NULL, NULL, 0, I2VP(120) }, #define I_POS (2) - { PD_MESSAGE, NULL, NULL, 0, (void*)120 }, + { PD_MESSAGE, NULL, NULL, 0, I2VP(120) }, #define I_SLIDER (3) { PD_DRAW, NULL, "speed", PDO_NOPSHUPD|PDO_DLGSETY, &speedParamData }, #define I_DIST (4) - { PD_STRING, NULL, "distance", PDO_DLGNEWCOLUMN, (void*)(100-SLIDER_WIDTH), NULL, BO_READONLY }, + { PD_STRING, NULL, "distance", PDO_DLGNEWCOLUMN, I2VP(100-SLIDER_WIDTH), NULL, BO_READONLY }, #define I_ZERO (5) { PD_BUTTON, NULL, "zeroDistance", PDO_NOPSHUPD|PDO_NOPREF|PDO_DLGHORZ, NULL, NULL, BO_ICON }, #define I_GOTO (6) @@ -683,10 +686,10 @@ static paramData_t trainPLs[] = { #define I_STOP (10) { PD_BUTTON, NULL, "stop", PDO_DLGWIDE, NULL, N_("Stop") }, #define I_SPEED (11) - { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, (void *)120 } + { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, I2VP(120) } }; -static paramGroup_t trainPG = { "train", 0, trainPLs, sizeof trainPLs/sizeof trainPLs[0] }; +static paramGroup_t trainPG = { "train", 0, trainPLs, COUNT( trainPLs ) }; typedef struct { @@ -723,12 +726,12 @@ static wIndex_t FindLoco( static void SpeedRedraw( wDraw_p d, void * context, - wPos_t w, - wPos_t h) + wWinPix_t w, + wWinPix_t h) { - wPos_t y, pts[4][2]; + wDrawPix_t y; trainControlDlg_p dlg = (trainControlDlg_p)context; - struct extraData * xx; + struct extraDataCar_t * xx; wDrawColor drawColor; wDrawClear(d); @@ -736,7 +739,7 @@ static void SpeedRedraw( return; } - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); if (xx->speed > MAX_SPEED) { xx->speed = MAX_SPEED; @@ -746,25 +749,23 @@ static void SpeedRedraw( xx->speed = 0; } - y = (wPos_t)(xx->speed/MAX_SPEED*((SLIDER_HEIGHT-SLIDER_THICKNESS)) + y = (xx->speed/MAX_SPEED*((SLIDER_HEIGHT-SLIDER_THICKNESS)) +SLIDER_THICKNESS/2); drawColor = wDrawFindColor(wRGB(160, 160, 160)); - pts[0][1] = pts[1][1] = y-SLIDER_THICKNESS/2; - pts[2][1] = pts[3][1] = y+SLIDER_THICKNESS/2; - pts[0][0] = pts[3][0] = 0; - pts[1][0] = pts[2][0] = SLIDER_WIDTH; - wDrawPolygon(d, pts, NULL, 4, drawColor, 0, 0, 0, 1, 0); - drawColor = wDrawFindColor(wRGB(220, 220, 220)); - pts[0][1] = pts[1][1] = y+SLIDER_THICKNESS/2; - pts[2][1] = pts[3][1] = y; - pts[0][0] = pts[3][0] = 0; - pts[1][0] = pts[2][0] = SLIDER_WIDTH; - wDrawPolygon(d, pts, NULL, 4, drawColor, 0, 0, 0, 1, 0); - wDrawLine(d, 0, y, SLIDER_WIDTH, y, 1, wDrawLineSolid, drawColorRed, 0); - wDrawLine(d, 0, y+SLIDER_THICKNESS/2, SLIDER_WIDTH, y+SLIDER_THICKNESS/2, 1, - wDrawLineSolid, drawColorBlack, 0); - wDrawLine(d, 0, y-SLIDER_THICKNESS/2, SLIDER_WIDTH, y-SLIDER_THICKNESS/2, 1, - wDrawLineSolid, drawColorBlack, 0); + coOrd pos0, pos1, siz; + y /= speedD.dpi; + siz.x = SLIDER_WIDTH/speedD.dpi; + siz.y = SLIDER_THICKNESS/speedD.dpi; + pos0.x = 0.0; + pos0.y = y - siz.y/2.0; + DrawRectangle( &speedD, pos0, siz, drawColor, DRAW_FILL ); + pos1.x = siz.x; + pos1.y = pos0.y; + DrawLine( &speedD, pos0, pos1, 1, drawColorBlack ); + pos0.y = pos1.y = y; + DrawLine( &speedD, pos0, pos1, 3, drawColorRed ); + pos0.y = pos1.y = y + siz.y/2.0; + DrawLine( &speedD, pos0, pos1, 1, drawColorBlack ); sprintf(dlg->speedS, "%3d %s", (int)(units==UNITS_ENGLISH?xx->speed:xx->speed*1.6), (units==UNITS_ENGLISH?"mph":"km/h")); @@ -778,7 +779,7 @@ static void SpeedAction( coOrd pos) { trainControlDlg_p dlg = curTrainDlg; - struct extraData * xx; + struct extraDataCar_t * xx; FLOAT_T speed; BOOL_T startStop; @@ -786,7 +787,7 @@ static void SpeedAction( return; } - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); switch (action) { case C_DOWN: @@ -841,7 +842,7 @@ static void SpeedAction( static void ControllerDialogSync( trainControlDlg_p dlg) { - struct extraData * xx=NULL; + struct extraDataCar_t * xx=NULL; wIndex_t inx; BOOL_T dir; BOOL_T followMe; @@ -870,7 +871,7 @@ static void ControllerDialogSync( if (dlg->train) { char * statusMsg; DIST_T speed; - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); dir = xx->direction==0?0:1; speed = xx->speed; pos = xx->trvTrk.pos; @@ -996,7 +997,7 @@ static void LocoListChangeEntry( track_p newLoco) { wIndex_t inx = -1; - struct extraData * xx; + struct extraDataCar_t * xx; if (curTrainDlg == NULL) { return; @@ -1005,7 +1006,7 @@ static void LocoListChangeEntry( if (oldLoco && (inx=FindLoco(oldLoco))>=0) { if (newLoco) { locoList(inx).loco = newLoco; - xx = GetTrkExtraData(newLoco); + xx = GET_EXTRA_DATA(newLoco, T_CAR, extraDataCar_t); locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; wListSetValues((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, inx, CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco); @@ -1026,7 +1027,7 @@ static void LocoListChangeEntry( inx = locoList_da.cnt; DYNARR_APPEND(locoList_t, locoList_da, 10); locoList(inx).loco = newLoco; - xx = GetTrkExtraData(newLoco); + xx = GET_EXTRA_DATA(newLoco, T_CAR, extraDataCar_t); locoList(inx).running = IsOnTrack(xx) && xx->speed > 0; wListAddValue((wList_p)curTrainDlg->trainPGp->paramPtr[I_LIST].control, CarItemNumber(xx->item), locoList(inx).running?goI:stopI, newLoco); @@ -1048,7 +1049,7 @@ static void LocoListChangeEntry( static void LocoListInit(void) { track_p train; - struct extraData * xx; + struct extraDataCar_t * xx; locoList_da.cnt = 0; for (train=NULL; TrackIterate(&train);) { @@ -1056,7 +1057,7 @@ static void LocoListInit(void) continue; } - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); if (!CarItemIsLoco(xx->item)) { continue; @@ -1083,13 +1084,13 @@ static void StopTrain( track_p train, trainStatus_e status) { - struct extraData * xx; + struct extraDataCar_t * xx; if (train == NULL) { return; } - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); xx->speed = 0; xx->status = status; LocoListChangeEntry(train, train); @@ -1133,7 +1134,7 @@ static void MoveMainWindow( static void SetTrainDirection( track_p train) { - struct extraData *xx, *xx0=GetTrkExtraData(train); + struct extraDataCar_t *xx, *xx0=GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); int dir0; track_p car; car = train; @@ -1161,7 +1162,7 @@ static void ControllerDialogUpdate( { trainControlDlg_p dlg = curTrainDlg; track_p train; - struct extraData * xx; + struct extraDataCar_t * xx; if (dlg == NULL) { return; @@ -1188,7 +1189,7 @@ static void ControllerDialogUpdate( } TrainTimeEndPause(); - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); xx->distance = 0.0; ParamLoadMessage(dlg->trainPGp, I_DIST, FormatDistance(xx->distance)); ParamLoadControl(curTrainDlg->trainPGp, I_DIST); @@ -1201,7 +1202,7 @@ static void ControllerDialogUpdate( } TrainTimeEndPause(); - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); followTrain = NULL; dlg->followMe = FALSE; ParamLoadControl(curTrainDlg->trainPGp, I_FOLLOW); @@ -1217,7 +1218,7 @@ static void ControllerDialogUpdate( if (*(long*)valueP) { followTrain = dlg->train; - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); if (OFF_MAIND(xx->trvTrk.pos, xx->trvTrk.pos)) { MoveMainWindow(xx->trvTrk.pos, xx->trvTrk.angle); @@ -1235,7 +1236,7 @@ static void ControllerDialogUpdate( return; } - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); xx->autoReverse = *(long*)valueP!=0; break; @@ -1244,7 +1245,7 @@ static void ControllerDialogUpdate( return; } - xx = GetTrkExtraData(dlg->train); + xx = GET_EXTRA_DATA(dlg->train, T_CAR, extraDataCar_t); dlg->direction = xx->direction = !xx->direction; wButtonSetLabel((wButton_p)pg->paramPtr[I_DIR].control, (dlg->direction?_("Reverse"):_("Forward"))); @@ -1303,6 +1304,8 @@ static trainControlDlg_p CreateTrainControlDlg(void) dlg->trainPGp = &trainPG; dlg->win = ParamCreateDialog(dlg->trainPGp, _("Train Control"), NULL, NULL, NULL, FALSE, NULL, 0, ControllerDialogUpdate); + speedD.size.x = SLIDER_WIDTH/speedD.dpi; + speedD.size.y = SLIDER_HEIGHT/speedD.dpi; return dlg; } @@ -1323,7 +1326,7 @@ static track_p followTrain = NULL; static void DrawAllCars(void) { track_p car; - struct extraData * xx; + struct extraDataCar_t * xx; coOrd size, lo, hi; BOOL_T drawCarEnable1 = drawCarEnable; drawCarEnable = TRUE; @@ -1333,7 +1336,7 @@ static void DrawAllCars(void) for (car=NULL; TrackIterate(&car);) { if (GetTrkType(car) == T_CAR) { - xx = GetTrkExtraData(car); + xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); CarItemSize(xx->item, &size); /* TODO assumes xx->trvTrk.pos is the car center */ lo.x = xx->trvTrk.pos.x - size.x/2.0; @@ -1357,7 +1360,7 @@ static DIST_T GetTrainLength2( BOOL_T * dir) { DIST_T length = 0, carLength; - struct extraData * xx; + struct extraDataCar_t * xx; WALK_CARS_START(*car0, xx, *dir) carLength = CarItemCoupledLength(xx->item); @@ -1383,7 +1386,7 @@ static DIST_T GetTrainLength( static void PlaceCar( track_p car) { - struct extraData *xx = GetTrkExtraData(car); + struct extraDataCar_t *xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); DIST_T dists[2]; CarItemPlace(xx->item, &xx->trvTrk, dists); @@ -1414,13 +1417,13 @@ static track_p FindCar( { coOrd pos0, pos1; track_p trk, trk1; - DIST_T dist1 = 100000, dist; - struct extraData * xx; + DIST_T dist1 = DIST_INF, dist; + struct extraDataCar_t * xx; trk1 = NULL; for (trk=NULL; TrackIterate(&trk);) { if (GetTrkType(trk) == T_CAR) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); if (IsIgnored(xx)) { continue; @@ -1450,7 +1453,7 @@ static track_p FindMasterLoco( track_p train, int * dirR) { - struct extraData *xx0; + struct extraDataCar_t *xx0; int dir; for (dir = 0; dir<2; dir++) { @@ -1480,7 +1483,7 @@ static track_p PickMasterLoco( int dir) { track_p loco=NULL; - struct extraData *xx; + struct extraDataCar_t *xx; WALK_CARS_START(car, xx, dir) if (CarItemIsLoco(xx->item)) { @@ -1499,7 +1502,7 @@ static track_p PickMasterLoco( return NULL; } - xx = GetTrkExtraData(loco); + xx = GET_EXTRA_DATA(loco, T_CAR, extraDataCar_t); SetLocoMaster(xx); xx->speed = 0; LOG(log_trainMove, 1, ("%s becomes master\n", CarItemNumber(xx->item))) @@ -1558,12 +1561,12 @@ static void CoupleCars( track_p car2, int dir2) { - struct extraData * xx1, * xx2; + struct extraDataCar_t * xx1, * xx2; track_p loco1, loco2; track_p car; int dir; - xx1 = GetTrkExtraData(car1); - xx2 = GetTrkExtraData(car2); + xx1 = GET_EXTRA_DATA(car1, T_CAR, extraDataCar_t); + xx2 = GET_EXTRA_DATA(car2, T_CAR, extraDataCar_t); if (GetTrkEndTrk(car1,dir1) != NULL || GetTrkEndTrk(car2,dir2) != NULL) { LOG(log_trainMove, 1, ("coupleCars - already coupled\n")) @@ -1604,8 +1607,8 @@ static void CoupleCars( } if ((loco1 != NULL && loco2 != NULL)) { - xx1 = GetTrkExtraData(loco1); - xx2 = GetTrkExtraData(loco2); + xx1 = GET_EXTRA_DATA(loco1, T_CAR, extraDataCar_t); + xx2 = GET_EXTRA_DATA(loco2, T_CAR, extraDataCar_t); if (xx1->speed == 0) { ClrLocoMaster(xx1); @@ -1651,7 +1654,7 @@ static void PlaceCars( long crashSpeed, BOOL_T crashFlip) { - struct extraData *xx0 = GetTrkExtraData(car0), *xx; + struct extraDataCar_t *xx0 = GET_EXTRA_DATA(car0, T_CAR, extraDataCar_t), *xx; int dir; traverseTrack_t trvTrk; DIST_T length; @@ -1715,14 +1718,14 @@ static void CrashTrain( BOOL_T flip) { track_p loco; - struct extraData *xx; + struct extraDataCar_t *xx; loco = FindMasterLoco(car,NULL); if (loco != NULL) { StopTrain(loco, ST_Crashed); } - xx = GetTrkExtraData(car); + xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); xx->trvTrk = *trvTrkP; if (dir) { @@ -1751,13 +1754,13 @@ static BOOL_T CheckCoupling( BOOL_T doCheckCrash) { track_p car1; - struct extraData *xx0, *xx1; + struct extraDataCar_t *xx0, *xx1; coOrd pos1; - DIST_T dist0, distc, dist=100000.0; + DIST_T dist0, distc, dist=DIST_INF; int dir0, dir1, dirl; ANGLE_T angle; traverseTrack_t trvTrk0, trvTrk1; - xx0 = xx1 = GetTrkExtraData(car0); + xx0 = xx1 = GET_EXTRA_DATA(car0, T_CAR, extraDataCar_t); /* find length of train from loco to start and end */ dir0 = dir00; dist0 = GetTrainLength2(&car0, &dir0); @@ -1775,7 +1778,7 @@ static BOOL_T CheckCoupling( return TRUE; } - xx1 = GetTrkExtraData(car1); + xx1 = GET_EXTRA_DATA(car1, T_CAR, extraDataCar_t); if (!IsOnTrack(xx1)) { return TRUE; @@ -1866,7 +1869,7 @@ static BOOL_T CheckCoupling( xx1 = NULL; if (loco1) { - xx1 = GetTrkExtraData(loco1); + xx1 = GET_EXTRA_DATA(loco1, T_CAR, extraDataCar_t); speed1 = (long)xx1->speed; if (car1 == loco1) { @@ -1908,9 +1911,9 @@ static void PlaceTrain( BOOL_T doCheckCoupling) { track_p car_curr; - struct extraData *xx0; + struct extraDataCar_t *xx0; int dir0; - xx0 = GetTrkExtraData(car0); + xx0 = GET_EXTRA_DATA(car0, T_CAR, extraDataCar_t); LOG(log_trainMove, 2, (" placeTrain: %s [%0.3f %0.3f] A%0.3f", CarItemNumber(xx0->item), xx0->trvTrk.pos.x, xx0->trvTrk.pos.y, xx0->trvTrk.angle)) @@ -1918,7 +1921,7 @@ static void PlaceTrain( for (dir0=0; dir0<2; dir0++) { int dir; - struct extraData *xx; + struct extraDataCar_t *xx; car_curr = car0; dir = dir0; xx = xx0; @@ -1955,7 +1958,7 @@ static void PlaceTrainInit( ANGLE_T angle0, BOOL_T doCheckCoupling) { - struct extraData * xx = GetTrkExtraData(car0); + struct extraDataCar_t * xx = GET_EXTRA_DATA(car0, T_CAR, extraDataCar_t); xx->trvTrk.trk = trk0; xx->trvTrk.dist = xx->trvTrk.length = -1; xx->trvTrk.pos = pos0; @@ -1968,7 +1971,7 @@ static void FlipTrain( track_p train) { DIST_T d0, d1; - struct extraData * xx; + struct extraDataCar_t * xx; if (train == NULL) { return; @@ -1976,7 +1979,7 @@ static void FlipTrain( d0 = GetTrainLength(train, 0); d1 = GetTrainLength(train, 1); - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); TraverseTrack2(&xx->trvTrk, d0-d1); FlipTraverseTrack(&xx->trvTrk); xx->trvTrk.length = -1; @@ -1989,7 +1992,7 @@ static BOOL_T MoveTrain( long timeD) { DIST_T ips, dist0, dist1; - struct extraData *xx, *xx1; + struct extraDataCar_t *xx, *xx1; traverseTrack_t trvTrk; DIST_T length; track_p car1; @@ -2000,7 +2003,7 @@ static BOOL_T MoveTrain( return FALSE; } - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); if (xx->speed <= 0) { return FALSE; @@ -2086,7 +2089,7 @@ static BOOL_T MoveTrain( } followTrain = NULL; - } else if (OFF_MAIND(xx->trvTrk.pos, xx->trvTrk.pos)) { + } else if (OFF_FOLLOW(xx->trvTrk.pos, xx->trvTrk.pos)) { MoveMainWindow(xx->trvTrk.pos, NormalizeAngle(xx->trvTrk.angle+(xx->direction?180.0:0.0))); followCenter = mainCenter; @@ -2102,14 +2105,14 @@ static BOOL_T MoveTrains(long timeD) { BOOL_T trains_moved = FALSE; track_p train; - struct extraData * xx; + struct extraDataCar_t * xx; for (train=NULL; TrackIterate(&train);) { if (GetTrkType(train) != T_CAR) { continue; } - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); if (!CarItemIsLoco(xx->item)) { continue; @@ -2298,7 +2301,7 @@ void AttachTrains(void) { track_p car; track_p loco; - struct extraData * xx; + struct extraDataCar_t * xx; coOrd pos; track_p trk; ANGLE_T angle; @@ -2312,7 +2315,7 @@ void AttachTrains(void) continue; } - xx = GetTrkExtraData(car); + xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); ClrProcessed(xx); } @@ -2321,7 +2324,7 @@ void AttachTrains(void) continue; } - xx = GetTrkExtraData(car); + xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); if (IsProcessed(xx)) { continue; @@ -2330,7 +2333,7 @@ void AttachTrains(void) loco = FindMasterLoco(car, NULL); if (loco != NULL) { - xx = GetTrkExtraData(loco); + xx = GET_EXTRA_DATA(loco, T_CAR, extraDataCar_t); } else { loco = car; } @@ -2390,7 +2393,7 @@ void AttachTrains(void) continue; } - xx = GetTrkExtraData(car); + xx = GET_EXTRA_DATA(car, T_CAR, extraDataCar_t); ClrProcessed(xx); } } @@ -2399,7 +2402,7 @@ void AttachTrains(void) static void UpdateTrainAttachment(void) { track_p trk; - struct extraData * xx; + struct extraDataCar_t * xx; for (trk=NULL; TrackIterate(&trk);) { ClrTrkBits(trk, TB_CARATTACHED); @@ -2407,7 +2410,7 @@ static void UpdateTrainAttachment(void) for (trk=NULL; TrackIterate(&trk);) { if (GetTrkType(trk) == T_CAR) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_CAR, extraDataCar_t); if (xx->trvTrk.trk != NULL) { SetTrkBits(xx->trvTrk.trk, TB_CARATTACHED); @@ -2422,7 +2425,7 @@ static BOOL_T TrainOnMovableTrack( track_p *trainR) { track_p train; - struct extraData * xx; + struct extraDataCar_t * xx; int dir; for (train=NULL; TrackIterate(&train);) { @@ -2430,7 +2433,7 @@ static BOOL_T TrainOnMovableTrack( continue; } - xx = GetTrkExtraData(train); + xx = GET_EXTRA_DATA(train, T_CAR, extraDataCar_t); if (IsOnTrack(xx)) { if (xx->trvTrk.trk == trk) { @@ -2493,8 +2496,8 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) ANGLE_T angle1; EPINX_T ep0, ep1; int dir; - struct extraData * xx=NULL; - wPos_t w, h; + struct extraDataCar_t * xx=NULL; + wWinPix_t w, h; switch (action) { case C_START: @@ -2507,11 +2510,11 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) if (CarAvailableCount() <= 0) { if (NoticeMessage(MSG_NO_CARS, _("Yes"), _("No")) > 0) { - DoCarDlg(); + DoCarDlg(NULL); DoChangeNotification(CHANGE_PARAMS); } } - + SetAllTrackSelect( FALSE ); EnableCommands(); if (curTrainDlg == NULL) { @@ -2525,7 +2528,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) tempSegs_da.cnt = 0; DYNARR_SET(trkSeg_t, tempSegs_da, 8); RestartTrains(); - wButtonSetLabel(trainPauseB, (char*)goI); + wButtonSetLabel(trainPauseB, (char*)goB); trainTime0 = 0; AttachTrains(); curTrainDlg->train = NULL; @@ -2534,7 +2537,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) LocoListInit(); ControllerDialogSync(curTrainDlg); wShow(curTrainDlg->win); - wControlShow((wControl_p)newcarB, (toolbarSet&(1<<BG_HOTBAR)) == 0); + wControlShow((wControl_p)newcarB, (toolbarSet&(1<<BG_TRAIN))); currCarItemPtr = NULL; TempRedraw(); // CmdTrain C_START return C_CONTINUE; @@ -2568,7 +2571,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) return C_CONTINUE; } - xx = GetTrkExtraData(currCar); + xx = GET_EXTRA_DATA(currCar, T_CAR, extraDataCar_t); xx->pencils = FALSE; dist = CarItemCoupledLength(xx->item)/2.0; Translate(&pos, xx->trvTrk.pos, xx->trvTrk.angle, dist); @@ -2605,13 +2608,13 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) if (logTable(log_trainMove).level >= 1) { if (currCar) { - xx = GetTrkExtraData(currCar); + xx = GET_EXTRA_DATA(currCar, T_CAR, extraDataCar_t); LogPrintf("selected %s\n", CarItemNumber(xx->item)); for (dir=0; dir<2; dir++) { int dir1 = dir; track_p car1 = currCar; - struct extraData * xx1 = GetTrkExtraData(car1); + struct extraDataCar_t * xx1 = GET_EXTRA_DATA(car1, T_CAR, extraDataCar_t); LogPrintf("dir=%d\n", dir1); WALK_CARS_START(car1, xx1, dir1) LogPrintf(" %s [%0.3f,%d]\n", CarItemNumber(xx1->item), xx1->trvTrk.angle, @@ -2642,7 +2645,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) pos.x += delta.x; pos.y += delta.y; pos0 = pos; - xx = GetTrkExtraData(currCar); + xx = GET_EXTRA_DATA(currCar, T_CAR, extraDataCar_t); trk0 = OnTrack(&pos0, FALSE, TRUE); if (/*currCarItemPtr != NULL &&*/ trk0) { @@ -2672,7 +2675,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) trk0 = FindMasterLoco(currCar, NULL); if (trk0) { - xx = GetTrkExtraData(trk0); + xx = GET_EXTRA_DATA(trk0, T_CAR, extraDataCar_t); if (!IsOnTrack(xx) || xx->speed <= 0) { StopTrain(trk0, ST_StopManual); @@ -2703,7 +2706,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) QueryTrack(trk0, Q_CAN_NEXT_POSITION) && TrainOnMovableTrack(trk0, &trk1)) { if (trk1) { - xx = GetTrkExtraData(trk1); + xx = GET_EXTRA_DATA(trk1, T_CAR, extraDataCar_t); pos1 = xx->trvTrk.pos; angle1 = xx->trvTrk.angle; } else { @@ -2750,7 +2753,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) return C_CONTINUE; } - xx = GetTrkExtraData(trainFuncCar); + xx = GET_EXTRA_DATA(trainFuncCar, T_CAR, extraDataCar_t); if (xx->pencils) { wMenuPushEnable(trainPopupMI[DO_PENCILS_OFF], TRUE); wMenuPushEnable(trainPopupMI[DO_PENCILS_ON], FALSE); @@ -2768,7 +2771,7 @@ static STATUS_T CmdTrain(wAction_t action, coOrd pos) !IsLocoMaster(xx)); if (trk0) { - xx = GetTrkExtraData(trk0); + xx = GET_EXTRA_DATA(trk0, T_CAR, extraDataCar_t); } wMenuPushEnable(trainPopupMI[DO_CHANGEDIR], trk0!=NULL); @@ -2853,22 +2856,24 @@ STATUS_T CmdCarDescAction( #include "bitmaps/train.xpm" #include "bitmaps/exit.xpm" -#include "bitmaps/newcar.xpm" +#include "bitmaps/new-car.xpm" #include "bitmaps/zero.xpm" -#include "bitmaps/ballgreen.xpm" -#include "bitmaps/ballred.xpm" +#include "bitmaps/go.xpm" +#include "bitmaps/stop.xpm" +#include "bitmaps/greendot.xpm" +#include "bitmaps/reddot.xpm" -static void CmdTrainStopGo(void * junk) +static void CmdTrainStopGo(void * unused) { wIcon_p icon; if (trainsState == TRAINS_STOP) { - icon = goI; + icon = goB; RestartTrains(); } else { trainsState = TRAINS_STOP; - icon = stopI; + icon = stopB; TrainTimeEndPause(); } @@ -2894,7 +2899,7 @@ static BOOL_T TrainStopGoPlayback(char * line) } -static void CmdTrainExit(void * junk) +static void CmdTrainExit(void * unused) { Reset(); InfoSubstituteControls(NULL, NULL); @@ -2904,7 +2909,7 @@ static void CmdTrainExit(void * junk) static void TrainFunc( void * action) { - struct extraData * xx, *xx1; + struct extraDataCar_t * xx, *xx1; ANGLE_T angle; int dir; track_p loco; @@ -2918,12 +2923,12 @@ static void TrainFunc( return; } - xx = GetTrkExtraData(trainFuncCar); + xx = GET_EXTRA_DATA(trainFuncCar, T_CAR, extraDataCar_t); angle = FindAngle(xx->trvTrk.pos, trainFuncPos); angle = NormalizeAngle(angle-xx->trvTrk.angle); dir = (angle>90&&angle<270); - switch ((int)(long)action) { + switch (VP2L(action)) { case DO_UNCOUPLE: if (GetTrkEndTrk(trainFuncCar,dir)) { UncoupleCars(trainFuncCar, GetTrkEndTrk(trainFuncCar,dir)); @@ -3010,7 +3015,7 @@ static void TrainFunc( WALK_CARS_START(trainFuncCar, xx, dir) if (temp0) { - xx1 = GetTrkExtraData(temp0); + xx1 = GET_EXTRA_DATA(temp0, T_CAR, extraDataCar_t); temp0->deleted = TRUE; /*DeleteTrack( temp0, FALSE );*/ CarItemUpdate(xx1->item); @@ -3020,7 +3025,7 @@ static void TrainFunc( WALK_CARS_END(trainFuncCar, xx, dir) if (temp0) { - xx1 = GetTrkExtraData(temp0); + xx1 = GET_EXTRA_DATA(temp0, T_CAR, extraDataCar_t); temp0->deleted = TRUE; /*DeleteTrack( temp0, FALSE );*/ CarItemUpdate(xx1->item); @@ -3043,7 +3048,7 @@ static void TrainFunc( LOG(log_trainMove, 1, ("%s gets master\n", CarItemNumber(xx->item))) if (loco) { - xx1 = GetTrkExtraData(loco); + xx1 = GET_EXTRA_DATA(loco, T_CAR, extraDataCar_t); ClrLocoMaster(xx1); LOG(log_trainMove, 1, ("%s looses master\n", CarItemNumber(xx1->item))) xx->speed = xx1->speed; @@ -3060,7 +3065,7 @@ static void TrainFunc( loco = FindMasterLoco(trainFuncCar, NULL); if (loco) { - xx = GetTrkExtraData(loco); + xx = GET_EXTRA_DATA(loco, T_CAR, extraDataCar_t); xx->direction = !xx->direction; SetTrainDirection(loco); ControllerDialogSync(curTrainDlg); @@ -3095,40 +3100,43 @@ void InitCmdTrain(wMenu_p menu) log_trainPlayback = LogFindIndex("trainPlayback"); trainPLs[I_ZERO].winLabel = (char*)wIconCreatePixMap(zero_xpm); ParamRegister(&trainPG); - trainCmdInx = AddMenuButton(menu, CmdTrain, "cmdTrain", _("Train"), - wIconCreatePixMap(train_xpm), LEVEL0_50, IC_POPUP3|IC_LCLICK|IC_RCLICK, 0, + trainCmdInx = AddMenuButton(menu, CmdTrain, "cmdTrain", _("Run Trains"), + wIconCreatePixMap(train_xpm[iconSize]), LEVEL0_50, IC_POPUP3|IC_LCLICK|IC_RCLICK, 0, NULL); - stopI = wIconCreatePixMap(ballred); - goI = wIconCreatePixMap(ballgreen); - trainPauseB = AddToolbarButton("cmdTrainPause", stopI, IC_MODETRAIN_ONLY, + stopI = wIconCreatePixMap(reddot); + goI = wIconCreatePixMap(greendot); + stopB = wIconCreatePixMap(stop_xpm[iconSize]); + goB = wIconCreatePixMap(go_xpm[iconSize]); + trainPauseB = AddToolbarButton("cmdTrainPause", stopB, IC_MODETRAIN_ONLY, CmdTrainStopGo, NULL); - AddToolbarButton("cmdTrainExit", wIconCreatePixMap(exit_xpm), IC_MODETRAIN_ONLY, + AddToolbarButton("cmdTrainExit", wIconCreatePixMap(exit_xpm[iconSize]), IC_MODETRAIN_ONLY, CmdTrainExit, NULL); - newcarB = AddToolbarButton("cmdTrainNewCar", wIconCreatePixMap(newcar_xpm), + newcarB = AddToolbarButton("cmdTrainNewCar", wIconCreatePixMap(new_car_xpm[iconSize]), IC_MODETRAIN_ONLY, CarItemLoadList, NULL); T_CAR = InitObject(&carCmds); - trainPopupM = MenuRegister("Train Commands"); + + trainPopupM = MenuRegister("Train Commands"); trainPopupMI[DO_UNCOUPLE] = wMenuPushCreate(trainPopupM, "", _("Uncouple"), 0, - TrainFunc, (void*)DO_UNCOUPLE); + TrainFunc, I2VP(DO_UNCOUPLE)); trainPopupMI[DO_FLIPCAR] = wMenuPushCreate(trainPopupM, "", _("Flip Car"), 0, - TrainFunc, (void*)DO_FLIPCAR); + TrainFunc, I2VP(DO_FLIPCAR)); trainPopupMI[DO_PENCILS_ON] = wMenuPushCreate(trainPopupM, "", _("Clearance Lines On"), 0, - TrainFunc, (void*)DO_PENCILS_ON); + TrainFunc, I2VP(DO_PENCILS_ON)); trainPopupMI[DO_PENCILS_OFF] = wMenuPushCreate(trainPopupM, "", _("Clearance Lines Off"), 0, - TrainFunc, (void*)DO_PENCILS_OFF); + TrainFunc, I2VP(DO_PENCILS_OFF)); trainPopupMI[DO_FLIPTRAIN] = wMenuPushCreate(trainPopupM, "", _("Flip Train"), - 0, TrainFunc, (void*)DO_FLIPTRAIN); + 0, TrainFunc, I2VP(DO_FLIPTRAIN)); trainPopupMI[DO_MUMASTER] = wMenuPushCreate(trainPopupM, "", _("MU Master"), - 0, TrainFunc, (void*)DO_MUMASTER); + 0, TrainFunc, I2VP(DO_MUMASTER)); trainPopupMI[DO_CHANGEDIR] = wMenuPushCreate(trainPopupM, "", - _("Change Direction"), 0, TrainFunc, (void*)DO_CHANGEDIR); + _("Change Direction"), 0, TrainFunc, I2VP(DO_CHANGEDIR)); trainPopupMI[DO_STOP] = wMenuPushCreate(trainPopupM, "", _("Stop"), 0, - TrainFunc, (void*)DO_STOP); + TrainFunc, I2VP(DO_STOP)); wMenuSeparatorCreate(trainPopupM); trainPopupMI[DO_DELCAR] = wMenuPushCreate(trainPopupM, "", _("Remove Car"), - 0, TrainFunc, (void*)DO_DELCAR); + 0, TrainFunc, I2VP(DO_DELCAR)); trainPopupMI[DO_DELTRAIN] = wMenuPushCreate(trainPopupM, "", - _("Remove Train"), 0, TrainFunc, (void*)DO_DELTRAIN); + _("Remove Train"), 0, TrainFunc, I2VP(DO_DELTRAIN)); AddPlaybackProc("TRAINSTOPGO", (playbackProc_p)TrainStopGoPlayback, NULL); AddPlaybackProc("TRAINPAUSE", (playbackProc_p)TrainTimeDoPause, NULL); AddPlaybackProc("TRAINMOVIE", (playbackProc_p)TrainDoMovie, NULL); diff --git a/app/bin/ctrain.h b/app/bin/ctrain.h index 858860b..f11ba81 100644 --- a/app/bin/ctrain.h +++ b/app/bin/ctrain.h @@ -24,8 +24,7 @@ #define HAVE_CTRAIN_H #include "common.h" -#include "include/paramfile.h" -#include "track.h" +#include "track.h" //- traverseTrack extern wIndex_t trainCmdInx; @@ -39,7 +38,7 @@ typedef struct { extern carItem_p currCarItemPtr; extern wControl_p newCarControls[2]; -void DoCarDlg( void ); +void DoCarDlg( void * unused ); BOOL_T CarItemRead( char * ); track_p NewCar( wIndex_t, carItem_p, coOrd, ANGLE_T ); void CarGetPos( track_p, coOrd *, ANGLE_T * ); diff --git a/app/bin/cturnout.c b/app/bin/cturnout.c index 150f381..02eadef 100644 --- a/app/bin/cturnout.c +++ b/app/bin/cturnout.c @@ -1,30 +1,26 @@ /** \file cturnout.c - * T_TURNOUT + * Turnout object handling and drawing */ -/* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include <ctype.h> -#include <math.h> -#include <stdint.h> -#include <string.h> - + /* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "common.h" #include "ccurve.h" #include "tbezier.h" #include "tcornu.h" @@ -34,14 +30,13 @@ #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" +#include "cselect.h" #include "include/paramfile.h" #include "track.h" #include "trackx.h" -#include "utility.h" +#include "common-ui.h" EXPORT TRKTYP_T T_TURNOUT = -1; @@ -51,13 +46,17 @@ EXPORT TRKTYP_T T_TURNOUT = -1; EXPORT dynArr_t turnoutInfo_da; -EXPORT turnoutInfo_t * curTurnout = NULL; +EXPORT turnoutInfo_t* curTurnout = NULL; EXPORT long curTurnoutEp = 0; static int curTurnoutInx = -1; +/** @logcmd @showrefby turnout=n cturnout.c */ static int log_turnout = 0; +/** @logcmd @showrefby traverseTurnout=n cturnout.c */ static int log_traverseTurnout = 0; +/** @logcmd @showrefby suppresscheckpaths=n cturnout.c */ static int log_suppressCheckPaths = 0; +/** @logcmd @showrefby splitturnout=n cturnout.c */ static int log_splitturnout = 0; static wMenu_p turnoutPopupM; @@ -75,33 +74,99 @@ static drawCmd_t turnoutD = { static wIndex_t turnoutHotBarCmdInx; static wIndex_t turnoutInx; static long hideTurnoutWindow; -static void RedrawTurnout(void); -static void SelTurnoutEndPt( wIndex_t, coOrd ); -static void HilightEndPt( void ); +static void RedrawTurnout( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ); +static void SelTurnoutEndPt(wIndex_t, coOrd); +static void HilightEndPt(void); -static wPos_t turnoutListWidths[] = { 80, 80, 220 }; -static const char * turnoutListTitles[] = { N_("Manufacturer"), N_("Part No"), N_("Description") }; +static wWinPix_t turnoutListWidths[] = { 80, 80, 220 }; +static const char* turnoutListTitles[] = { N_("Manufacturer"), N_("Part No"), N_("Description") }; static paramListData_t listData = { 13, 400, 3, turnoutListWidths, turnoutListTitles }; -static const char * hideLabels[] = { N_("Hide"), NULL }; -static paramDrawData_t turnoutDrawData = { 490, 200, (wDrawRedrawCallBack_p)RedrawTurnout, SelTurnoutEndPt, &turnoutD }; +static const char* hideLabels[] = { N_("Hide"), NULL }; +static paramDrawData_t turnoutDrawData = { 490, 200, RedrawTurnout, SelTurnoutEndPt, &turnoutD }; static paramData_t turnoutPLs[] = { #define I_LIST (0) #define turnoutListL ((wList_p)turnoutPLs[I_LIST].control) - { PD_LIST, &turnoutInx, "list", PDO_NOPREF|PDO_DLGRESIZEW, &listData, NULL, BL_DUP }, + { PD_LIST, &turnoutInx, "list", PDO_NOPREF | PDO_DLGRESIZEW, &listData, NULL, BL_DUP }, #define I_DRAW (1) #define turnoutDrawD ((wDraw_p)turnoutPLs[I_DRAW].control) - { PD_DRAW, NULL, "canvas", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_DLGRESIZE, &turnoutDrawData, NULL, 0 }, + { PD_DRAW, NULL, "canvas", PDO_NOPSHUPD | PDO_DLGUNDERCMDBUTT | PDO_DLGRESIZE, &turnoutDrawData, NULL, 0 }, #define I_NEW (2) #define turnoutNewM ((wMenu_p)turnoutPLs[I_NEW].control) { PD_MENU, NULL, "new", PDO_DLGCMDBUTTON, NULL, N_("New") }, #define I_HIDE (3) #define turnoutHideT ((wChoice_p)turnoutPLs[I_HIDE].control) - { PD_TOGGLE, &hideTurnoutWindow, "hide", PDO_DLGCMDBUTTON, /*CAST_AWAY_CONST*/(void*)hideLabels, NULL, BC_NOBORDER } }; -static paramGroup_t turnoutPG = { "turnout", 0, turnoutPLs, sizeof turnoutPLs/sizeof turnoutPLs[0] }; + { PD_TOGGLE, &hideTurnoutWindow, "hide", PDO_DLGCMDBUTTON, hideLabels, NULL, BC_NOBORDER } }; +static paramGroup_t turnoutPG = { "turnout", 0, turnoutPLs, COUNT( turnoutPLs ) }; #endif +/* Draw turnout data */ + +/** + * The types of turnouts that get enhanced drawing methods + */ +enum dtoType { + DTO_INVALID, + DTO_NORMAL, + DTO_THREE, + DTO_WYE, + + DTO_CURVED, + + DTO_XING, + DTO_XNG9, + DTO_SSLIP, + DTO_DSLIP, + + DTO_LCROSS, + DTO_RCROSS, + DTO_DCROSS +}; + +// Define to plot control points (DTO_NORMAL, DTO_CURVED, DTO_XING, DTO_LCROSS) +// #define DTO_DEBUG DTO_XING + +#define DTO_DIM 4 // Maximum number of paths +#define DTO_SEGS 24 // Maximum number of control points + +static struct DrawToData_t { + TRKINX_T index; + enum dtoType toType; + track_p trk; + int bridge; + int endCnt; + int pathCnt; + int routeCnt; + int strCnt; + int crvCnt; + int rgtCnt; + int lftCnt; + int strPath; + int str2Path; + int crvPath; + int crv2Path; + int origCnt; + int origins[DTO_DIM]; + coOrd midPt; + struct extraDataCompound_t* xx; +} dtod; + +struct DrawTo_t { + int n; + trkSeg_p trkSeg[DTO_SEGS]; + coOrd base[DTO_SEGS]; + coOrd baseLast; + DIST_T dy[DTO_SEGS]; + ANGLE_T angle; + ANGLE_T crvAngle; + coOrd pts[DTO_SEGS]; + coOrd ptsLast; + char type; +}; + +static struct DrawTo_t dto[DTO_DIM]; + + - /**************************************** * * TURNOUT LIST MANAGEMENT @@ -109,47 +174,49 @@ static paramGroup_t turnoutPG = { "turnout", 0, turnoutPLs, sizeof turnoutPLs/si */ -EXPORT turnoutInfo_t * CreateNewTurnout( - char * scale, - char * title, - wIndex_t segCnt, - trkSeg_p segData, - wIndex_t pathLen, - PATHPTR_T paths, - EPINX_T endPtCnt, - trkEndPt_t * endPts, - DIST_T * radii, - wBool_t updateList ) +EXPORT turnoutInfo_t* CreateNewTurnout( + char* scale, + char* title, + wIndex_t segCnt, + trkSeg_p segData, + PATHPTR_T paths, + EPINX_T endPtCnt, + trkEndPt_t* endPts, + wBool_t updateList, + long options) { - turnoutInfo_t * to; - long changes=0; + turnoutInfo_t* to; + long changes = 0; - to = FindCompound( FIND_TURNOUT, scale, title ); + to = FindCompound(FIND_TURNOUT, scale, title); if (to == NULL) { - DYNARR_APPEND( turnoutInfo_t *, turnoutInfo_da, 10 ); - to = (turnoutInfo_t*)MyMalloc( sizeof *to ); - turnoutInfo(turnoutInfo_da.cnt-1) = to; - to->title = MyStrdup( title ); - to->scaleInx = LookupScale( scale ); + DYNARR_APPEND(turnoutInfo_t*, turnoutInfo_da, 10); + to = (turnoutInfo_t*)MyMalloc(sizeof * to); + turnoutInfo(turnoutInfo_da.cnt - 1) = to; + to->title = MyStrdup(title); + to->scaleInx = LookupScale(scale); changes = CHANGE_PARAMS; } to->segCnt = segCnt; trkSeg_p seg_p; - to->segs = (trkSeg_p)memdup( segData, (sizeof (*segData) * segCnt )); + to->segs = (trkSeg_p)memdup(segData, (sizeof(*segData) * segCnt)); seg_p = to->segs; - for (int i=0;i<segCnt;i++) { + for (int i = 0; i < segCnt; i++) { seg_p[i].bezSegs.ptr = NULL; seg_p[i].bezSegs.cnt = 0; seg_p[i].bezSegs.max = 0; } - CopyPoly(to->segs,segCnt); - FixUpBezierSegs(to->segs,to->segCnt); - GetSegBounds( zero, 0.0, segCnt, to->segs, &to->orig, &to->size ); + CopyPoly(to->segs, segCnt); + FixUpBezierSegs(to->segs, to->segCnt); + GetSegBounds(zero, 0.0, segCnt, to->segs, &to->orig, &to->size); to->endCnt = endPtCnt; - to->endPt = (trkEndPt_t*)memdup( endPts, (sizeof *endPts) * to->endCnt ); + to->endPt = (trkEndPt_t*)memdup(endPts, (sizeof * endPts) * to->endCnt); - to->pathLen = pathLen; - to->paths = (PATHPTR_T)memdup( paths, (sizeof *to->paths) * to->pathLen ); + if (options & COMPOUND_OPTION_PATH_OVERRIDE) + to->pathOverRide = TRUE; + if (options & COMPOUND_OPTION_PATH_NOCOMBINE) + to->pathNoCombine = TRUE; + SetParamPaths( to, paths ); to->paramFileIndex = curParamFileIndex; if (curParamFileIndex == PARAM_CUSTOM) to->contentsLabel = MyStrdup("Custom Turnouts"); @@ -157,42 +224,40 @@ EXPORT turnoutInfo_t * CreateNewTurnout( to->contentsLabel = curSubContents; #ifdef TURNOUTCMD if (updateList && turnoutListL != NULL) { - FormatCompoundTitle( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, title ); + FormatCompoundTitle(LABEL_TABBED | LABEL_MANUF | LABEL_PARTNO | LABEL_DESCR, title); if (message[0] != '\0') - wListAddValue( turnoutListL, message, NULL, to ); + wListAddValue(turnoutListL, message, NULL, to); } #endif - to->barScale = curBarScale>0?curBarScale:-1; + to->barScale = curBarScale > 0 ? curBarScale : -1; to->special = TOnormal; - if (radii) { - to->special = TOcurved; - DYNARR_SET(DIST_T,to->u.curved.radii,to->endCnt); - for (int i=0;i<to->endCnt;i++) { - DYNARR_N(DIST_T,to->u.curved.radii,i) = radii[i]; - } - } if (updateList && changes) - DoChangeNotification( changes ); + DoChangeNotification(changes); return to; } /** * Delete a turnout parameter from the list and free the related memory * - * \param [IN] to turnout definition to be deleted + * \param [IN] toInfo turnout definition to be deleted + * + * \returns True if it succeeds */ BOOL_T -DeleteTurnout(void *toInfo) +DeleteTurnout(void* toInfo) { - turnoutInfo_t * to = (turnoutInfo_t *)toInfo; + turnoutInfo_t* to = (turnoutInfo_t*)toInfo; MyFree(to->title); MyFree(to->segs); MyFree(to->endPt); MyFree(to->paths); if (to->special) { - DYNARR_FREE(DIST_T, to->u.curved.radii); + switch (to->special) { + case TOadjustable: + default:; + } } MyFree(to); @@ -200,62 +265,62 @@ DeleteTurnout(void *toInfo) } /** - * Delete all turnout definitions that came from a specific parameter file. - * Due to the way the definitions are loaded from file it is safe to + * Delete all turnout definitions that came from a specific parameter file. + * Due to the way the definitions are loaded from file it is safe to * assume that they form a contiguous block in the array. - * + * * \param [IN] fileIndex parameter file */ void DeleteTurnoutParams(int fileIndex) { - int inx=0; - int startInx = -1; - int cnt = 0; - - // go to the start of the block - while (inx < turnoutInfo_da.cnt && - turnoutInfo(inx)->paramFileIndex != fileIndex) { - startInx = inx++; - } + int inx = 0; + int startInx = -1; + int cnt = 0; + + // go to the start of the block + while (inx < turnoutInfo_da.cnt && + turnoutInfo(inx)->paramFileIndex != fileIndex) { + startInx = inx++; + } - // delete them - for (; inx < turnoutInfo_da.cnt && - turnoutInfo(inx)->paramFileIndex == fileIndex; inx++) { - turnoutInfo_t * to = turnoutInfo(inx); - if (to->paramFileIndex == fileIndex) { - DeleteTurnout(to); - cnt++; - } - } + // delete them + for (; inx < turnoutInfo_da.cnt && + turnoutInfo(inx)->paramFileIndex == fileIndex; inx++) { + turnoutInfo_t* to = turnoutInfo(inx); + if (to->paramFileIndex == fileIndex) { + DeleteTurnout(to); + cnt++; + } + } - // copy down the rest of the list to fill the gap - startInx++; - while (inx < turnoutInfo_da.cnt) { - turnoutInfo(startInx++) = turnoutInfo(inx++); - } + // copy down the rest of the list to fill the gap + startInx++; + while (inx < turnoutInfo_da.cnt) { + turnoutInfo(startInx++) = turnoutInfo(inx++); + } - // and reduce the actual number - turnoutInfo_da.cnt -= cnt; + // and reduce the actual number + turnoutInfo_da.cnt -= cnt; } -/** - * Check to find out to what extent the contents of the parameter file can be used with - * the current layout scale / gauge. - * +/** + * Check to find out to what extent the contents of the parameter file can be used with + * the current layout scale / gauge. + * * If parameter scale == layout and parameter gauge == layout we have an exact fit. - * If parameter gauge == layout we have compatible track. - * OO scale is special cased. If the layout is in OO scale track in HO is considered + * If parameter gauge == layout we have compatible track. + * OO, O and N scales are special cased. If the layout is in OO scale track in HO is considered * an exact fit in spite of scale differences. - * + * * \param paramFileIndex * \param scaleIndex - * \return + * \return enum paraFileState */ -enum paramFileState -GetTrackCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) +enum paramFileState + GetTrackCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) { int i; enum paramFileState ret = PARAMFILE_NOTUSABLE; @@ -267,224 +332,182 @@ GetTrackCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) // loop over all parameter entries or until a exact fit is found for (i = 0; i < turnoutInfo_da.cnt && ret < PARAMFILE_FIT; i++) { - turnoutInfo_t *to = turnoutInfo( i ); - if (to->paramFileIndex == paramFileIndex ) { - if (to->scaleInx == scaleIndex ) { + turnoutInfo_t* to = turnoutInfo(i); + if (to->paramFileIndex == paramFileIndex) { + SCALE_FIT_T fit = CompatibleScale(FIT_TURNOUT, to->scaleInx, scaleIndex); + if (fit == FIT_EXACT) { ret = PARAMFILE_FIT; break; - } else { - if (GetScaleTrackGauge(to->scaleInx) == gauge && - ret < PARAMFILE_COMPATIBLE) { - ret = PARAMFILE_COMPATIBLE; - // handle special cases - // if layout is OO scale, HO scale track is considered exact - char *layoutScaleName = GetScaleName(scaleIndex); - char *paramScaleName = GetScaleName(to->scaleInx); - if (!strcmp(layoutScaleName, "OO") && - !strcmp(paramScaleName, "HO")) { - ret = PARAMFILE_FIT; - } - //if layout is in Japanese or British N scale, N scale is exact - if ((!strcmp(layoutScaleName, "N(UK)") || - !strcmp(layoutScaleName, "N(JP)")) && - !strcmp(paramScaleName, "N")) { - ret = PARAMFILE_FIT; - } - } + } + else if (fit == FIT_COMPATIBLE) { + ret = PARAMFILE_COMPATIBLE; } } } return(ret); } - +/** + * Check Paths verifies that each track segment is on at least one path. + * It will assume new-P or old-P order is possible and does not change it. + * + * \param segCnt + * \param segs + * \param paths + * + * \returns -1 if a track segment is not on a path + */ EXPORT wIndex_t CheckPaths( - wIndex_t segCnt, - trkSeg_p segs, - PATHPTR_T paths ) + wIndex_t segCnt, + trkSeg_p segs, + PATHPTR_T paths) { if ((segCnt == 0) || !segs) return -1; + if (!paths) return -1; int pc, ps; PATHPTR_T pp = 0; - int inx; - static dynArr_t segMap_da; + int segInx[2], segEp[2]; int segTrkLast = -1; - + // Check that each track segment is on at least one path + // Note - In new-P the tracks may be preceded by draws (or interspersed by them) int suppressCheckPaths = log_suppressCheckPaths > 0 ? logTable(log_suppressCheckPaths).level : 0; - if ( suppressCheckPaths == 0 ) { - char trkSegInx = 0; - for ( int inx = 0; inx<segCnt; inx++ ) { - if ( IsSegTrack( &segs[inx] ) ) { - trkSegInx++; + if (suppressCheckPaths == 0) { + for (int inx = 0; inx < segCnt; inx++) { + if (IsSegTrack(&segs[inx])) { PATHPTR_T cp = paths; - while ( *cp ) { - // path is: 'N' 'A' 'M' 'E' 0 1 2 0 3 4 0 0 - // skip name - for ( ; *cp; cp++ ); - cp++; + while (*cp) { + // 0-9 are x00 to x09 or the negative equivalent (backwards) + // Pathlist is: Path00Path000 + // Path is: NAME01203400 + for (; *cp; cp++); //Skip Name + cp++; //Skip 0 after name // check each path component - for ( ; cp[0] || cp[1]; cp++ ) - if ( abs(*cp) == trkSegInx ) - break; - if ( *cp ) // we broke early - break; - cp += 2;; // Skip 2nd 0 + for (; cp[0] || cp[1]; cp++) { //keeps going even if there are two or more parts + if (!cp[0]) continue; //ignore the 0 between parts of the same PATH!! + GetSegInxEP(cp[0], &segInx[0], &segEp[0]); //GetSegInxEP subtracts one to match inx + if (segInx[0] == inx) break; //Found it! + } + if (*cp) // we broke early + break; // get out - we found it + cp++; + cp++; // Go to next path - past two 0s } - if ( !*cp ) { // we looked and didn't find - InputError( "Track segment %d not on Path", FALSE, inx+1 ); + if (!*cp) { // we looked through all the paths and didn't find it + InputError("Track segment %d not on Path", FALSE, inx + 1); return -1;; } } } } -typedef struct { - trkSeg_p seg; - int indx; -} segMap_t, * segMap_p; - -#define segMap(N) DYNARR_N( segMap_t, segMap_da, N ) - segMap_p sg; - DYNARR_RESET( segMap_t, segMap_da ); - // Don't reshuffle segs, but build an offset map instead just of the tracks - // Use the map to set up the paths to point at the correct segs in the Turnout - for ( inx=0; inx<segCnt; inx++ ) { - if ( IsSegTrack(&segs[inx]) ) { - DYNARR_APPEND( segMap_t, segMap_da, 10 ); - sg = &DYNARR_LAST(segMap_t,segMap_da); - sg->seg = &segs[inx]; - sg->indx = inx; - } - } - - for ( pc=0,pp=paths; *pp; pp+=2,pc++ ) { - for ( ps=0,pp+=strlen((char *)pp)+1; pp[0]!=0 || pp[1]!=0; pp++,ps++ ) { -#ifdef LATER - if (*pp >= '0' && *pp <= '9') - *pp -= '0'; - else if (*pp >= 'A' && *pp <= 'Z') - *pp -= 'A' - 10; - if (*pp < 0 || *pp > segCnt) { - InputError( _("Turnout path[%d:%d] out of bounds: %d"), - FALSE, pc, ps, *pp); - return -1; + for (pc = 0, pp = paths; *pp; pp += 2, pc++) { + for (ps = 0, pp += strlen((char*)pp) + 1; pp[0] != 0 || pp[1] != 0; pp++, ps++) { + if (pp[0] != 0 && ps == 0) { // First or only one } -#endif - //Rewrite the Path to point to the nth Track seg using the Map - int old_inx; - EPINX_T old_EP; - if (pp[0]!=0 && ps==0) { // First or only one - GetSegInxEP( pp[0], &old_inx, &old_EP ); - if (old_inx<0 || old_inx>= segMap_da.cnt) { - InputError( _("Turnout path[%d] %d is not a valid track segment"), - FALSE, pc, ps ); - return -1; - } - SetSegInxEP( &pp[0], DYNARR_N(segMap_t,segMap_da,old_inx).indx, old_EP); - } - if (pp[0]!=0 && pp[1]!=0 ) { - //Rewrite the Path to point to the nth Track seg using the Map - GetSegInxEP( pp[1], &old_inx, &old_EP ); - if (old_inx<0 || old_inx>= segMap_da.cnt) { - InputError( _("Turnout path[%d] %d is not a valid track segment"), - FALSE, pc, ps ); - return -1; - } - SetSegInxEP( &pp[1], DYNARR_N(segMap_t,segMap_da,old_inx).indx, old_EP); + if (pp[0] != 0 && pp[1] != 0) { /* check connectivity */ DIST_T d; - GetSegInxEP( pp[0], &segInx[0], &segEp[0] ); - GetSegInxEP( pp[1], &segInx[1], &segEp[1] ); - if ( !IsSegTrack( &segs[segInx[0]] ) ) { - InputError( _("Turnout path[%d] %d is not a track segment"), - FALSE, pc, pp[0] ); + GetSegInxEP(pp[0], &segInx[0], &segEp[0]); + GetSegInxEP(pp[1], &segInx[1], &segEp[1]); + if (!IsSegTrack(&segs[segInx[0]])) { + InputError(_("CheckPath: Turnout path[%d] %d is not a track segment"), + FALSE, pc, pp[0]); return -1; } - if ( !IsSegTrack( &segs[segInx[1]] ) ) { - InputError( _("Turnout path[%d] %d is not a track segment"), - FALSE, pc, pp[1] ); + if (!IsSegTrack(&segs[segInx[1]])) { + InputError(_("CheckPath: Turnout path[%d] %d is not a track segment"), + FALSE, pc, pp[1]); return -1; } - coOrd p0 = GetSegEndPt( &segs[segInx[0]], 1-segEp[0], FALSE, NULL ); - coOrd p1 = GetSegEndPt( &segs[segInx[1]], segEp[1], FALSE, NULL ); - d = FindDistance(p0,p1); + coOrd p0 = GetSegEndPt(&segs[segInx[0]], 1 - segEp[0], FALSE, NULL); + coOrd p1 = GetSegEndPt(&segs[segInx[1]], segEp[1], FALSE, NULL); + d = FindDistance(p0, p1); if (d > MIN_TURNOUT_SEG_CONNECT_DIST) { - InputError( _("Turnout path[%d] %d-%d not connected: %0.3f P0(%f,%f) P1(%f,%f)"), - FALSE, pc, pp[0], pp[1], d, p0.x, p0.y, p1.x, p1.y ); + InputError(_("CheckPath: Turnout path[%d] %d-%d not connected: %0.3f P0(%f,%f) P1(%f,%f)"), + FALSE, pc, pp[0], pp[1], d, p0.x, p0.y, p1.x, p1.y); return -1; } } } } - return pp-paths+1; + return (wIndex_t)(pp - paths + 1); } static BOOL_T ReadTurnoutParam( - char * firstLine ) + char* firstLine) { char scale[10]; - char *title; - turnoutInfo_t * to; + char* title; + turnoutInfo_t* to; + PATHPTR_T cp; + long options = 0; - if ( !GetArgs( firstLine+8, "sq", scale, &title ) ) + if (!GetArgs(firstLine + 8, "sqc", scale, &title, &cp)) return FALSE; - DYNARR_RESET( trkEndPt_t, tempEndPts_da ); + if (cp != NULL) + if (!GetArgs((char*)cp, "l", &options)) + return FALSE; + DYNARR_RESET(trkEndPt_t, tempEndPts_da); pathCnt = 0; - if ( !ReadSegs() ) + if (!ReadSegs()) return FALSE; - CheckPaths( tempSegs_da.cnt, &tempSegs(0), pathPtr ); - to = CreateNewTurnout( scale, title, tempSegs_da.cnt, &tempSegs(0), - pathCnt, pathPtr, tempEndPts_da.cnt, &tempEndPts(0), NULL, FALSE ); - MyFree( title ); + PATHPTR_T pPaths = NULL; + if ( pathPtr && pathPtr[0] && pathCnt > 0 ) + pPaths = pathPtr; + CheckPaths( tempSegs_da.cnt, &tempSegs(0), pPaths ); + to = CreateNewTurnout(scale, title, tempSegs_da.cnt, &tempSegs(0), + pPaths, tempEndPts_da.cnt, &tempEndPts(0), FALSE, options ); + MyFree(title); if (to == NULL) return FALSE; if (tempSpecial[0] != '\0') { - if (strncmp( tempSpecial, ADJUSTABLE, strlen(ADJUSTABLE) ) == 0) { + if (strncmp(tempSpecial, ADJUSTABLE, strlen(ADJUSTABLE)) == 0) { to->special = TOadjustable; - if ( !GetArgs( tempSpecial+strlen(ADJUSTABLE), "ff", - &to->u.adjustable.minD, &to->u.adjustable.maxD ) ) + if (!GetArgs(tempSpecial + strlen(ADJUSTABLE), "ff", + &to->u.adjustable.minD, &to->u.adjustable.maxD)) return FALSE; - } else { + } + else { InputError(_("Unknown special case"), TRUE); return FALSE; } } if (tempCustom[0] != '\0') { - to->customInfo = MyStrdup( tempCustom ); + to->customInfo = MyStrdup(tempCustom); } return TRUE; } -EXPORT turnoutInfo_t * TurnoutAdd( long mode, SCALEINX_T scale, wList_p list, coOrd * maxDim, EPINX_T epCnt ) +EXPORT turnoutInfo_t* TurnoutAdd(long mode, SCALEINX_T scale, wList_p list, coOrd* maxDim, EPINX_T epCnt) { wIndex_t inx; - turnoutInfo_t * to, * to1 = NULL; + turnoutInfo_t* to, * to1 = NULL; turnoutInx = 0; - for ( inx = 0; inx < turnoutInfo_da.cnt; inx++ ) { + for (inx = 0; inx < turnoutInfo_da.cnt; inx++) { to = turnoutInfo(inx); - if ( IsParamValid(to->paramFileIndex) && - to->segCnt > 0 && - CompatibleScale( TRUE, to->scaleInx, scale ) && - /*strcasecmp( to->scale, scaleName ) == 0 && */ - ( epCnt <= 0 || epCnt == to->endCnt ) ) { - if (to1==NULL) + if (IsParamValid(to->paramFileIndex) && + to->segCnt > 0 && + (FIT_NONE != CompatibleScale(FIT_TURNOUT, to->scaleInx, scale)) && + /*strcasecmp( to->scale, scaleName ) == 0 && */ + (epCnt <= 0 || epCnt == to->endCnt)) { + if (to1 == NULL) to1 = to; - if ( to == curTurnout ) { + if (to == curTurnout) { to1 = to; - turnoutInx = wListGetCount( list ); + turnoutInx = wListGetCount(list); } - FormatCompoundTitle( mode, to->title ); + FormatCompoundTitle(mode, to->title); if (message[0] != '\0') { - wListAddValue( list, message, NULL, to ); + wListAddValue(list, message, NULL, to); if (maxDim) { - if (to->size.x > maxDim->x) + if (to->size.x > maxDim->x) maxDim->x = to->size.x; - if (to->size.y > maxDim->y) + if (to->size.y > maxDim->y) maxDim->y = to->size.y; } } @@ -492,7 +515,7 @@ EXPORT turnoutInfo_t * TurnoutAdd( long mode, SCALEINX_T scale, wList_p list, co } return to1; } - + /**************************************** * * Adjustable Track Support @@ -501,20 +524,20 @@ EXPORT turnoutInfo_t * TurnoutAdd( long mode, SCALEINX_T scale, wList_p list, co static void ChangeAdjustableEndPt( - track_p trk, - EPINX_T ep, - DIST_T d ) + track_p trk, + EPINX_T ep, + DIST_T d) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); coOrd pos; trkSeg_p segPtr; - ANGLE_T angle = GetTrkEndAngle( trk, ep ); - Translate( &pos, GetTrkEndPos( trk, 1-ep ), angle, d ); + ANGLE_T angle = GetTrkEndAngle(trk, ep); + Translate(&pos, GetTrkEndPos(trk, 1 - ep), angle, d); UndoModify(trk); - SetTrkEndPoint( trk, ep, pos, angle ); - if ( ep == 0 ) + SetTrkEndPoint(trk, ep, pos, angle); + if (ep == 0) xx->orig = pos; - for ( segPtr=xx->segs; segPtr<&xx->segs[xx->segCnt]; segPtr++ ) { + for (segPtr = xx->segs; segPtr < &xx->segs[xx->segCnt]; segPtr++) { switch (segPtr->type) { case SEG_STRLIN: case SEG_STRTRK: @@ -524,19 +547,19 @@ static void ChangeAdjustableEndPt( ; } } - ComputeBoundingBox( trk ); - DrawNewTrack( trk ); + ComputeBoundingBox(trk); + DrawNewTrack(trk); } EXPORT BOOL_T ConnectAdjustableTracks( - track_p trk1, - EPINX_T ep1, - track_p trk2, - EPINX_T ep2 ) + track_p trk1, + EPINX_T ep1, + track_p trk2, + EPINX_T ep2) { - struct extraData * xx1; - struct extraData * xx2; + struct extraDataCompound_t* xx1; + struct extraDataCompound_t* xx2; BOOL_T adj1, adj2; coOrd p1, p2; ANGLE_T a, a1, a2; @@ -545,65 +568,74 @@ EXPORT BOOL_T ConnectAdjustableTracks( coOrd off; DIST_T beyond; - xx1 = GetTrkExtraData(trk1); - xx2 = GetTrkExtraData(trk2); + if ((GetTrkType(trk1) != T_TURNOUT) && (GetTrkType(trk2) != T_TURNOUT)) return FALSE; + adj1 = adj2 = FALSE; - if (GetTrkType(trk1) == T_TURNOUT && xx1->special == TOadjustable) - adj1 = TRUE; - if (GetTrkType(trk2) == T_TURNOUT && xx2->special == TOadjustable) - adj2 = TRUE; + + if (GetTrkType(trk1) == T_TURNOUT) { + xx1 = GET_EXTRA_DATA(trk1, T_TURNOUT, extraDataCompound_t); + if (xx1->special == TOadjustable) + adj1 = TRUE; + } + if (GetTrkType(trk2) == T_TURNOUT) { + xx2 = GET_EXTRA_DATA(trk2, T_TURNOUT, extraDataCompound_t); + if (xx2->special == TOadjustable) + adj2 = TRUE; + } if (adj1 == FALSE && adj2 == FALSE) return FALSE; - a1 = GetTrkEndAngle( trk1, ep1 ); - a2 = GetTrkEndAngle( trk2, ep2 ); - a = NormalizeAngle( a1 - a2 + 180.0 + connectAngle/2.0); - if (a>connectAngle) + a1 = GetTrkEndAngle(trk1, ep1); + a2 = GetTrkEndAngle(trk2, ep2); + a = NormalizeAngle(a1 - a2 + 180.0 + connectAngle / 2.0); + if (a > connectAngle) return FALSE; - UndoStart( _("Connect Adjustable Tracks"), "changeAdjustableEndPt" ); + UndoStart(_("Connect Adjustable Tracks"), "changeAdjustableEndPt"); maxD = 0.0; if (adj1) { - p1 = GetTrkEndPos( trk1, 1-ep1 ); - Translate( &p1, p1, a1, xx1->u.adjustable.minD ); - maxD += xx1->u.adjustable.maxD-xx1->u.adjustable.minD; - } else { - p1 = GetTrkEndPos( trk1, ep1 ); + p1 = GetTrkEndPos(trk1, 1 - ep1); + Translate(&p1, p1, a1, xx1->u.adjustable.minD); + maxD += xx1->u.adjustable.maxD - xx1->u.adjustable.minD; + } + else { + p1 = GetTrkEndPos(trk1, ep1); } if (adj2) { - p2 = GetTrkEndPos( trk2, 1-ep2 ); - Translate( &p2, p2, a2, xx2->u.adjustable.minD ); - maxD += xx2->u.adjustable.maxD-xx2->u.adjustable.minD; - } else { - p2 = GetTrkEndPos( trk2, ep2 ); + p2 = GetTrkEndPos(trk2, 1 - ep2); + Translate(&p2, p2, a2, xx2->u.adjustable.minD); + maxD += xx2->u.adjustable.maxD - xx2->u.adjustable.minD; + } + else { + p2 = GetTrkEndPos(trk2, ep2); } - d = FindDistance( p1, p2 ); + d = FindDistance(p1, p2); rc = TRUE; if (d > maxD) { d = maxD; rc = FALSE; } - FindPos( &off, &beyond, p1, p2, a1, 10000.0 ); + FindPos(&off, &beyond, p1, p2, a1, DIST_INF); if (fabs(off.y) > connectDistance) rc = FALSE; if (adj1) { - UndrawNewTrack( trk1 ); - d1 = d * (xx1->u.adjustable.maxD-xx1->u.adjustable.minD)/maxD + xx1->u.adjustable.minD; - ChangeAdjustableEndPt( trk1, ep1, d1 ); + UndrawNewTrack(trk1); + d1 = d * (xx1->u.adjustable.maxD - xx1->u.adjustable.minD) / maxD + xx1->u.adjustable.minD; + ChangeAdjustableEndPt(trk1, ep1, d1); } if (adj2) { - UndrawNewTrack( trk2 ); - d2 = d * (xx2->u.adjustable.maxD-xx2->u.adjustable.minD)/maxD + xx2->u.adjustable.minD; - ChangeAdjustableEndPt( trk2, ep2, d2 ); + UndrawNewTrack(trk2); + d2 = d * (xx2->u.adjustable.maxD - xx2->u.adjustable.minD) / maxD + xx2->u.adjustable.minD; + ChangeAdjustableEndPt(trk2, ep2, d2); } if (rc) { - DrawEndPt( &mainD, trk1, ep1, wDrawColorWhite ); - DrawEndPt( &mainD, trk2, ep2, wDrawColorWhite ); - ConnectTracks( trk1, ep1, trk2, ep2 ); - DrawEndPt( &mainD, trk1, ep1, wDrawColorBlack ); - DrawEndPt( &mainD, trk2, ep2, wDrawColorBlack ); + DrawEndPt(&mainD, trk1, ep1, wDrawColorWhite); + DrawEndPt(&mainD, trk2, ep2, wDrawColorWhite); + ConnectTracks(trk1, ep1, trk2, ep2); + DrawEndPt(&mainD, trk1, ep1, wDrawColorBlack); + DrawEndPt(&mainD, trk2, ep2, wDrawColorBlack); } return rc; } - + /**************************************** * * Draw Turnout Roadbed @@ -613,81 +645,84 @@ EXPORT BOOL_T ConnectAdjustableTracks( int roadbedOnScreen = 0; -void DrawTurnoutRoadbedSide( drawCmd_p d, wDrawColor color, coOrd orig, ANGLE_T angle, trkSeg_p sp, ANGLE_T side, int first, int last ) +void DrawTurnoutRoadbedSide(drawCmd_p d, wDrawColor color, coOrd orig, ANGLE_T angle, trkSeg_p sp, ANGLE_T side, int first, int last) { segProcData_t data; - if (last<=first) + if (last <= first) return; data.drawRoadbedSide.first = first; data.drawRoadbedSide.last = last; data.drawRoadbedSide.side = side; data.drawRoadbedSide.roadbedWidth = roadbedWidth; - data.drawRoadbedSide.rbw = (wDrawWidth)floor(roadbedLineWidth*(d->dpi/d->scale)+0.5); + data.drawRoadbedSide.rbw = (wDrawWidth)floor(roadbedLineWidth * (d->dpi / d->scale) + 0.5); data.drawRoadbedSide.orig = orig; data.drawRoadbedSide.angle = angle; data.drawRoadbedSide.color = color; data.drawRoadbedSide.d = d; - SegProc( SEGPROC_DRAWROADBEDSIDE, sp, &data ); + SegProc(SEGPROC_DRAWROADBEDSIDE, sp, &data); } static void ComputeAndDrawTurnoutRoadbedSide( - drawCmd_p d, - wDrawColor color, - coOrd orig, - ANGLE_T angle, - trkSeg_p segPtr, - int segCnt, - int segInx, - ANGLE_T side ) + drawCmd_p d, + wDrawColor color, + coOrd orig, + ANGLE_T angle, + trkSeg_p segPtr, + int segCnt, + int segInx, + ANGLE_T side) { unsigned long res, res1; int b0, b1; - res = ComputeTurnoutRoadbedSide( segPtr, segCnt, segInx, side, roadbedWidth ); + res = ComputeTurnoutRoadbedSide(segPtr, segCnt, segInx, side, roadbedWidth); if (res == 0L) { - } else if (res == 0xFFFFFFFF) { - DrawTurnoutRoadbedSide( d, color, orig, angle, &segPtr[segInx], side, 0, 32 ); - } else { - for ( b0=0, res1=0x00000001; res1&&(res1&res); b0++,res1<<=1 ); - for ( b1=32,res1=0x80000000; res1&&(res1&res); b1--,res1>>=1 ); - DrawTurnoutRoadbedSide( d, color, orig, angle, &segPtr[segInx], side, 0, b0 ); - DrawTurnoutRoadbedSide( d, color, orig, angle, &segPtr[segInx], side, b1, 32 ); + } + else if (res == 0xFFFFFFFF) { + DrawTurnoutRoadbedSide(d, color, orig, angle, &segPtr[segInx], side, 0, 32); + } + else { + for (b0 = 0, res1 = 0x00000001; res1 && (res1 & res); b0++, res1 <<= 1); + for (b1 = 32, res1 = 0x80000000; res1 && (res1 & res); b1--, res1 >>= 1); + DrawTurnoutRoadbedSide(d, color, orig, angle, &segPtr[segInx], side, 0, b0); + DrawTurnoutRoadbedSide(d, color, orig, angle, &segPtr[segInx], side, b1, 32); } } static void DrawTurnoutRoadbed( - drawCmd_p d, - wDrawColor color, - coOrd orig, - ANGLE_T angle, - trkSeg_p segPtr, - int segCnt ) -{ - int inx, trkCnt=0, segInx=0; - for (inx=0;inx<segCnt;inx++) { - if ( IsSegTrack(&segPtr[inx]) ) { + drawCmd_p d, + wDrawColor color, + coOrd orig, + ANGLE_T angle, + trkSeg_p segPtr, + int segCnt) +{ + int inx, trkCnt = 0, segInx = 0; + for (inx = 0; inx < segCnt; inx++) { + if (IsSegTrack(&segPtr[inx])) { segInx = inx; trkCnt++; - if (trkCnt>1) + if (trkCnt > 1) break; } } - if (trkCnt==0) + if (trkCnt == 0) return; if (trkCnt == 1) { - DrawTurnoutRoadbedSide( d, color, orig, angle, &segPtr[segInx], +90, 0, 32 ); - DrawTurnoutRoadbedSide( d, color, orig, angle, &segPtr[segInx], -90, 0, 32 ); - } else { - for (inx=0;inx<segCnt;inx++) { - if ( IsSegTrack(&segPtr[inx]) ) { - ComputeAndDrawTurnoutRoadbedSide( d, color, orig, angle, segPtr, segCnt, inx, +90 ); - ComputeAndDrawTurnoutRoadbedSide( d, color, orig, angle, segPtr, segCnt, inx, -90 ); + DrawTurnoutRoadbedSide(d, color, orig, angle, &segPtr[segInx], +90, 0, 32); + DrawTurnoutRoadbedSide(d, color, orig, angle, &segPtr[segInx], -90, 0, 32); + } + else { + for (inx = 0; inx < segCnt; inx++) { + if (IsSegTrack(&segPtr[inx])) { + ComputeAndDrawTurnoutRoadbedSide(d, color, orig, angle, segPtr, segCnt, inx, +90); + ComputeAndDrawTurnoutRoadbedSide(d, color, orig, angle, segPtr, segCnt, inx, -90); } } } } - + /**************************************** * * HAND LAID TURNOUTS @@ -695,47 +730,47 @@ static void DrawTurnoutRoadbed( */ track_p NewHandLaidTurnout( - coOrd p0, - ANGLE_T a0, - coOrd p1, - ANGLE_T a1, - coOrd p2, - ANGLE_T a2, - ANGLE_T frogA ) + coOrd p0, + ANGLE_T a0, + coOrd p1, + ANGLE_T a1, + coOrd p2, + ANGLE_T a2, + ANGLE_T frogA) { track_p trk; - struct extraData * xx; + struct extraDataCompound_t* xx; trkSeg_t segs[2]; - sprintf( message, "\tHand Laid Turnout, Angle=%0.1f\t", frogA ); - DYNARR_SET( trkEndPt_t, tempEndPts_da, 2 ); - memset( &tempEndPts(0), 0, tempEndPts_da.cnt * sizeof tempEndPts(0) ); + sprintf(message, "\tHand Laid Turnout, Angle=%0.1f\t", frogA); + DYNARR_SET(trkEndPt_t, tempEndPts_da, 2); + memset(&tempEndPts(0), 0, tempEndPts_da.cnt * sizeof tempEndPts(0)); tempEndPts(0).pos = p0; tempEndPts(0).angle = a0; tempEndPts(1).pos = p1; tempEndPts(1).angle = a1; tempEndPts(2).pos = p2; tempEndPts(2).angle = a2; - Rotate( &p1, p0, -a0 ); + Rotate(&p1, p0, -a0); p1.x -= p0.x; p1.y -= p0.y; segs[0].type = SEG_STRTRK; segs[0].color = wDrawColorBlack; segs[0].u.l.pos[0] = zero; segs[0].u.l.pos[1] = p1; - Rotate( &p2, p0, -a0 ); + Rotate(&p2, p0, -a0); p2.x -= p0.x; p2.y -= p0.y; segs[1].type = SEG_STRTRK; segs[1].color = wDrawColorBlack; segs[1].u.l.pos[0] = zero; segs[1].u.l.pos[1] = p2; - trk = NewCompound( T_TURNOUT, 0, p0, a0, message, 3, &tempEndPts(0), NULL, 22, "Normal\0\1\0\0Reverse\0\2\0\0\0", 2, segs ); - xx = GetTrkExtraData(trk); + trk = NewCompound(T_TURNOUT, 0, p0, a0, message, 3, &tempEndPts(0), (PATHPTR_T)"Normal\0\1\0\0Reverse\0\2\0\0\0", 2, segs); + xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); xx->handlaid = TRUE; return trk; } - + /**************************************** * * GENERIC FUNCTIONS @@ -743,136 +778,1982 @@ track_p NewHandLaidTurnout( */ static coOrd MapPathPos( - struct extraData * xx, - signed char segInx, - EPINX_T ep ) + struct extraDataCompound_t* xx, + signed char segInx, + EPINX_T ep) { trkSeg_p segPtr; coOrd pos; - if ( segInx < 0 ) { - segInx = - segInx; - ep = 1-ep; + if (segInx < 0) { + segInx = -segInx; + ep = 1 - ep; } - segPtr=xx->segs+(segInx-1); + segPtr = xx->segs + (segInx - 1); if (!IsSegTrack(segPtr)) { - fprintf( stderr, "mapPathPos: bad segInx: %d\n", segInx ); + fprintf(stderr, "mapPathPos: bad segInx: %d\n", segInx); return zero; } - pos = GetSegEndPt( segPtr, ep, FALSE, NULL ); - REORIGIN1( pos, xx->angle, xx->orig ); + pos = GetSegEndPt(segPtr, ep, FALSE, NULL); + REORIGIN1(pos, xx->angle, xx->orig); return pos; } +static trkSeg_p MapPathSeg( + struct extraDataCompound_t* xx, + signed char segInx) { + if (segInx < 0) { + segInx = -segInx; + } + return xx->segs + (segInx - 1); +} + + +/**************************************** + * + * TURNOUT DRAWING + * + */ + + /** + * Get the paths from the turnout definition. Puts the results into static dto structure. + * Curved segments are broken up into short sections of the lesser of 5 degrees or 5 * tie spacing. + * + * \param trk track_p pointer to a track + * \param xx pointer to the extraDataCompound struct + * + * \returns the number of paths + */ +int GetTurnoutPaths(track_p trk, struct extraDataCompound_t* xx) { + wIndex_t segInx; + wIndex_t segEP; + + SCALEINX_T scaleInx = GetTrkScale(trk); + tieData_p td = GetScaleTieData(scaleInx); + + int i; + ANGLE_T a0, a1, aa0, aa1; + DIST_T r, len; + coOrd p0, p1; + + PATHPTR_T pp; + int pathCnt = 0, routeCnt = 0; + + for (i = 0; i < DTO_DIM; i++) + dto[i].n = 0; + + dtod.trk = trk; + dtod.index = trk->index; + dtod.xx = xx; + + // Validate that the first segment starts at (0, 0) + // and if STR p1.y == 0, if CRV angle == 0 or angle == 180 + GetSegInxEP(1, &segInx, &segEP); + trkSeg_p segPtr = &xx->segs[segInx]; + switch (segPtr->type) { + case SEG_STRTRK: + p0 = segPtr->u.l.pos[0]; + p1 = segPtr->u.l.pos[1]; + if ((FindDistance(p0, zero) > EPSILON) || (fabs(p1.y) > EPSILON)) + return -1; + break; + case SEG_CRVTRK: + r = fabs(segPtr->u.c.radius); + a0 = segPtr->u.c.a0; + a1 = segPtr->u.c.a1; + + if (segPtr->u.c.radius > 0) { + aa0 = a0; + } + else { + aa0 = a0 + a1; + } + PointOnCircle(&p0, segPtr->u.c.center, r, aa0); + if ((FindDistance(p0, zero) > EPSILON) + || ((fabs(aa0 - 180) > EPSILON) && (fabs(aa0) > EPSILON))) + return -1; + break; + } + + pp = GetPaths(trk); + while (pp[0]) { + pp += strlen((char*)pp) + 1; + + ANGLE_T angle = 0; + while (pp[0]) { + if (pathCnt < DTO_DIM) + dto[pathCnt].type = 'S'; + while (pp[0]) { + GetSegInxEP(pp[0], &segInx, &segEP); + // trkSeg_p + segPtr = &xx->segs[segInx]; + switch (segPtr->type) { + case SEG_STRTRK: + p0 = segPtr->u.l.pos[0]; + p1 = segPtr->u.l.pos[1]; + + wIndex_t n = dto[pathCnt].n; + dto[pathCnt].trkSeg[n] = segPtr; + dto[pathCnt].base[n] = p0; + n++; + dto[pathCnt].trkSeg[n] = segPtr; + dto[pathCnt].base[n] = p1; + // n++; + dto[pathCnt].n = n; + + if (n >= DTO_SEGS - 1) return -1; + + break; + case SEG_CRVTRK: + r = fabs(segPtr->u.c.radius); + + dto[pathCnt].type = segPtr->u.c.center.y < 0 ? 'R' : 'L'; + + a0 = segPtr->u.c.a0; + a1 = segPtr->u.c.a1; + + angle += a1; + + len = D2R(a1) * r; + // Every 5 degrees or 5 * tie spacing + int cnt = (int)floor(a1 / 5.0); + int cnt2 = (int)floor(len / 5 / td->spacing); + if (cnt2 > cnt) cnt = cnt2; + if (cnt <= 0) cnt = 1; + + aa1 = a1 / cnt; + if (dto[pathCnt].type == 'R') { + aa0 = a0; + } + else { + aa0 = a0 + a1; + aa1 = -aa1; + } + PointOnCircle(&p0, segPtr->u.c.center, r, aa0); + n = dto[pathCnt].n; + dto[pathCnt].trkSeg[n] = segPtr; + dto[pathCnt].base[n] = p0; + n++; + dto[pathCnt].n = n; + + while (cnt > 0) { + aa0 += aa1; + PointOnCircle(&p0, segPtr->u.c.center, r, aa0); + + // n = dto[pathCnt].n; + dto[pathCnt].trkSeg[n] = segPtr; + dto[pathCnt].base[n] = p0; + n++; + + if (n >= DTO_SEGS - 1) return -1; + + cnt--; + } + n--; // remove that last point count + dto[pathCnt].n = n; + } + pp++; + } + // Include the last point + dto[pathCnt].crvAngle = angle; + dto[pathCnt].n++; + + pathCnt++; + if (pathCnt > DTO_DIM) return -1; + pp++; + } + routeCnt++; + pp++; + } + dtod.pathCnt = pathCnt; + dtod.routeCnt = routeCnt; + dtod.endCnt = trk->endCnt; + + // Guard value: n < DTO_SEGS - 2 + for (i = 0; i < pathCnt; i++) + dto[i].pts[dto[i].n].x = DIST_INF; + + return pathCnt; +} + +/** +* Sets the turnout type if compatible with enhanced drawing methods. The data is +* from the path data saved in dtod and dto by GetTurnoutPaths. The turnout type is +* stored in the dtod.toType. DTO_INVALID (0) if the enhanced methods cannot handle +* it. +*/ +void GetTurnoutType() { + dtod.strPath = -1; + dtod.str2Path = -1; + dtod.crvPath = -1; + dtod.crv2Path = -1; + + dtod.toType = DTO_INVALID; + + int strCnt = 0, crvCnt = 0, lftCnt = 0, rgtCnt = 0; + enum dtoType toType = DTO_INVALID; + int i, j; + + // Count path origins + dtod.origCnt = 1; + dtod.origins[0] = 0; + + for (i = 1; i < dtod.pathCnt; i++) { + int eq = 0; + for (j = 0; j < i; j++) { + if (CoOrdEqual(dto[dtod.origins[j]].base[0], dto[i].base[0])) + eq++; + } + if (eq == 0) { + dtod.origins[dtod.origCnt] = i; + dtod.origCnt++; + } + + if (dtod.origCnt > 4) + return; + } + + // Determine the path type + for (i = 0; i < dtod.pathCnt; i++) { + switch (dto[i].type) { + case 'S': + strCnt++; + if (strCnt == 1) + dtod.strPath = i; + else + dtod.str2Path = i; + break; + case 'L': + lftCnt++; + crvCnt++; + if (crvCnt == 1) + dtod.crvPath = i; + else + dtod.crv2Path = i; + break; + case 'R': + rgtCnt++; + crvCnt++; + if (crvCnt == 1) + dtod.crvPath = i; + else + dtod.crv2Path = i; + break; + } + } + + dtod.strCnt = strCnt; + dtod.crvCnt = crvCnt; + dtod.lftCnt = lftCnt; + dtod.rgtCnt = rgtCnt; + + // Normal two- or three-way turnout, or a curved turnout + if (dtod.origCnt == 1) { + if (dtod.pathCnt == 2) { + if (strCnt == 1 && crvCnt == 1) { + dtod.toType = DTO_NORMAL; + } + else if ((strCnt == 0) && ((lftCnt == 2) || (rgtCnt == 2))) { + // Assumes outer curve is [0] and inner is [1] + if ((dto[0].crvAngle <= 20) && (dto[1].crvAngle - dto[0].crvAngle <= 15)) + dtod.toType = DTO_CURVED; + } + else if (lftCnt == 1 && rgtCnt == 1) { + dtod.toType = DTO_WYE; + } + } + else if ((dtod.pathCnt == 3) && (strCnt == 1) + && (lftCnt == 1) && (rgtCnt == 1)) { + dtod.toType = DTO_THREE; + } + } + else + // Crossing, single- and double-slip + if ((dtod.origCnt == 2) && (dtod.endCnt == 4) + && strCnt == 2) { + + ANGLE_T a0, a1, a2; + a1 = FindAngle(dto[dtod.strPath].base[0], dto[dtod.strPath].base[1]); + a2 = FindAngle(dto[dtod.str2Path].base[0], dto[dtod.str2Path].base[1]); + // Swap the ends of the strPath if large angle + if((a1 > 180.0) && (dto[dtod.strPath].n == 2)) + { + coOrd tmp = dto[dtod.strPath].base[0]; + dto[dtod.strPath].base[0] = dto[dtod.strPath].base[1]; + dto[dtod.strPath].base[1] = tmp; + + i = dto[dtod.strPath].n - 1; + tmp = dto[dtod.strPath].pts[0]; + dto[dtod.strPath].pts[0] = dto[dtod.strPath].pts[i]; + dto[dtod.strPath].pts[i] = tmp; + + a1 = a1 - 180.0; + dto[dtod.strPath].angle = a1; + } + // Swap the ends of the str2Path if large angle + if((a2 > 180.0) && (dto[dtod.str2Path].n == 2)) + { + coOrd tmp = dto[dtod.str2Path].base[0]; + dto[dtod.str2Path].base[0] = dto[dtod.str2Path].base[1]; + dto[dtod.str2Path].base[1] = tmp; + + i = dto[dtod.str2Path].n - 1; + tmp = dto[dtod.str2Path].pts[0]; + dto[dtod.str2Path].pts[0] = dto[dtod.str2Path].pts[i]; + dto[dtod.str2Path].pts[i] = tmp; + + a2 = a2 - 180.0; + dto[dtod.str2Path].angle = a2; + } + a0 = DifferenceBetweenAngles(a1, a2); + if(a0 < 0) + { + int tmp = dtod.strPath; + dtod.strPath = dtod.str2Path; + dtod.str2Path = tmp; + a0 = NormalizeAngle(-a0); + } + if ((a0 > 90.0) || (a0 < 0.0)) + return; + + coOrd p1 = dto[dtod.strPath].base[0]; + coOrd p2 = dto[dtod.str2Path].base[0]; + coOrd pos = zero; + int intersect = FindIntersection(&pos, p1, a1, p2, a2); + + if (intersect) { + if(strCnt == 2 && dtod.pathCnt == 2){ + if((a0 <= 61) && (a0 >= -61)) + dtod.toType = DTO_XING; + else + dtod.toType = DTO_XNG9; + } + else if(dtod.pathCnt == 3 && (lftCnt == 1 || rgtCnt == 1)){ + dtod.toType = DTO_SSLIP; + } + else if(dtod.pathCnt == 4 && lftCnt == 1 && rgtCnt == 1){ + dtod.toType = DTO_DSLIP; + } + } + // No intersect, it could be a crossover + else if (strCnt == 2) { + if (dtod.pathCnt == 4 && lftCnt == 1 && rgtCnt == 1) { + dtod.toType = DTO_DCROSS; + } + else if(dtod.pathCnt == 3){ + // Perverse test because the cross paths go Left then Right, for example + if(lftCnt == 1){ + dtod.toType = DTO_RCROSS; + } + else if(rgtCnt == 1){ + dtod.toType = DTO_LCROSS; + } + else{ + dtod.toType = DTO_INVALID; + } + } + } + } +} + +/** + * Draw Layout lines and points + * + * \param d The drawing object + * \param scaleInx The layout/track scale index + */ +static void DrawDtoLayout( + drawCmd_p d, + SCALEINX_T scaleInx +) +{ + tieData_p td; + td = GetScaleTieData(scaleInx); + + // Draw the points and lines from dto + double r = td->width / 2; + // if (r < 1) r = 1; + + int i, j; + for (i = 0; i < DTO_DIM; i++) { + for (j = 0; j < dto[i].n; j++) { + DrawFillCircle(d, dto[i].pts[j], r, drawColorPurple); + if (j < dto[i].n - 1) + DrawLine(d, dto[i].pts[j], dto[i].pts[j + 1], 0, drawColorPurple); + } + } +} + +/** +* Use the coOrds to build a polygon and draw the bridge fill. Note that the coordinates are +* passed as pairs, and rearranged into a polygon with the 1,2,4,3 order. +* +* \param d The drawing object +* \param b1 The first coordinate +* \param b2 The second coordinate +* \param b3 The third coordinate +* \param b4 The fourth coordinate +*/ +static void DrawBridgeFill( + drawCmd_p d, + coOrd b1, + coOrd b2, + coOrd b3, + coOrd b4 + ) +{ + coOrd p[4] = {b1, b2, b4, b3}; + DrawPoly(d,4,p,NULL,drawColorGrey90,0,DRAW_FILL ); +} + +/** +* Draw Bridge parapets and background for a turnout +* +* \param d The drawing object +* \param path1 The first path +* \param path2 The second path +*/ +static void DrawTurnoutBridge( + drawCmd_p d, + int path1, + int path2 +) +{ + DIST_T trackGauge = GetTrkGauge(dtod.trk); + wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi) / BASE_DPI); + if (d->options&DC_PRINT) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); + + coOrd b1,b2,b3,b4,b5,b6; + ANGLE_T angle = dtod.xx->angle,a = 0.0; + int i,j,i1,i2; + i1 = path1; + i2 = path2; + if(dto[i1].base[dto[i1].n - 1].y < dto[i2].base[dto[i2].n - 1].y) { + i1 = path2; + i2 = path1; + // a = -a; + } + + if(dtod.toType == DTO_THREE) { + i = dtod.strPath; + DIST_T dy = fabs(dto[i].dy[0]) + trackGauge * 1.5; + b1 = dto[i].pts[0]; + Translate(&b3,b1,(angle + a),dy); + b1 = dto[i].pts[dto[i].n - 1]; + Translate(&b4,b1,(angle + a),dy); + b2 = dto[i].pts[0]; + Translate(&b5,b2,(angle + a),-dy); + b2 = dto[i].pts[dto[i].n - 1]; + Translate(&b6,b2,(angle + a),-dy); + + // Draw the bridge background + DrawBridgeFill(d,b3,b4,b5,b6); + } + + for(i = i1; 1; i = i2,a = 180.0) { + DIST_T dy = fabs(dto[i].dy[0]) + trackGauge * 1.5; + b1 = dto[i].pts[0]; + Translate(&b3,b1,(angle + a),dy); + Translate(&b5,b1,(angle + a),-(dy * 0.75)); + for(j = 1; j < dto[i].n; j++) { + dy = fabs(dto[i].dy[j]) + trackGauge * 1.5; + b2 = dto[i].pts[j]; + Translate(&b4,b2,(angle + a),dy); + Translate(&b6,b2,(angle + a),-(dy * 0.75)); + + // Draw the bridge background + DrawBridgeFill(d,b3,b4,b5,b6); + + // Draw the bridge edge + DrawLine(d,b3,b4,width2,drawColorBlack); + + b1 = b2; + b3 = b4; + b5 = b6; + } + + if(i == i2) + break; + } + + EPINX_T ep; + coOrd p; + track_p trk1; + coOrd p0,p1; + + for(ep = 0; ep < 3; ep++) { + trk1 = GetTrkEndTrk(dtod.trk,ep); + + if((trk1) && (!GetTrkBridge(trk1))) { + + p = GetTrkEndPos(dtod.trk,ep); + a = GetTrkEndAngle(dtod.trk,ep) + 90.0; + + int i = (dtod.lftCnt > 0) && (dtod.rgtCnt == 0) ? 2 : 1; + if(ep != i) { + Translate(&p0,p,a,trackGauge * 1.5); + Translate(&p1,p0,a - 45.0,trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + if(ep != (3 - i)) { + Translate(&p0,p,a,-trackGauge * 1.5); + Translate(&p1,p0,a + 45.0,-trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + } + } +} + +/** +* Draw Bridge parapets and background for a cross-over +* +* \param d The drawing object +* \param path1 The first path, straight +* \param path2 The second path, straight +*/ +static void DrawCrossBridge( + drawCmd_p d, + int path1, + int path2 +) +{ + DIST_T trackGauge = GetTrkGauge(dtod.trk); + wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/BASE_DPI); + if (d->options&DC_PRINT) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); + + coOrd b1, b2, b3, b4, b5, b6; + ANGLE_T angle = dtod.xx->angle, a = 0.0; + int i1, i2; + i1 = path1; + i2 = path2; + if(dto[i1].base[dto[i1].n - 1].y < dto[i2].base[dto[i2].n - 1].y) { + i1 = path2; + i2 = path1; + // a = -a; + } + + DIST_T dy = fabs(dto[i1].dy[0]) + trackGauge * 1.5; + b1 = dto[i1].pts[0]; + Translate(&b3,b1,(angle + a),dy); + b1 = dto[i1].pts[dto[i1].n-1]; + Translate(&b4,b1,(angle + a),dy); + b2 = dto[i2].pts[0]; + Translate(&b5,b2,(angle + a),-dy); + b2 = dto[i2].pts[dto[i2].n-1]; + Translate(&b6,b2,(angle + a),-dy); + + // Draw the bridge background + DrawBridgeFill(d, b3, b4, b5, b6); + + // Draw the bridge edges + DrawLine(d,b3,b4,width2,drawColorBlack); + DrawLine(d,b5,b6,width2,drawColorBlack); + + EPINX_T ep; + coOrd p; + track_p trk1; + coOrd p0,p1; + + for(ep = 0; ep < 4; ep++) { + trk1 = GetTrkEndTrk(dtod.trk,ep); + + if((trk1) && (!GetTrkBridge(trk1))) { + p = GetTrkEndPos(dtod.trk,ep); + a = GetTrkEndAngle(dtod.trk,ep) + 90.0; + + if((ep == 1) || (ep == 2)) { + Translate(&p0,p,a,trackGauge * 1.5); + Translate(&p1,p0,a - 45.0,trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + if((ep == 0) || (ep == 3)) { + Translate(&p0,p,a,-trackGauge * 1.5); + Translate(&p1,p0,a + 45.0,-trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + } + } +} + +/** +* Draw Bridge parapets and background for a crossing +* +* \param d The drawing object +* \param path1 The first path +* \param path2 The second path +*/ +static void DrawXingBridge( + drawCmd_p d, + int path1, + int path2 +) +{ + DIST_T trackGauge = GetTrkGauge(dtod.trk); + wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/BASE_DPI); + if (d->options&DC_PRINT) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); + + coOrd b0, b1, b2, b3, b4, b5, b6; + int i, j, i1, i2; + i1 = dtod.strPath; + i2 = dtod.str2Path; + + // Bridge fill both straight sections + wDrawWidth width3 = (wDrawWidth)round(trackGauge * 3 * d->dpi/d->scale); + b1 = dto[i1].pts[0]; + b2 = dto[i1].pts[dto[i1].n-1]; + DrawLine(d,b1,b2,width3,wDrawColorGrey90); + b1 = dto[i2].pts[0]; + b2 = dto[i2].pts[dto[i1].n-1]; + DrawLine(d,b1,b2,width3,wDrawColorGrey90); + + i1 = path1; + i2 = path2; + if(dto[i1].base[dto[i1].n - 1].y < dto[i2].base[dto[i2].n - 1].y) { + i1 = path2; + i2 = path1; + } + + // Handle curved sections for slips + BOOL_T hasLeft = 0, hasRgt = 0; + ANGLE_T angle = dtod.xx->angle, a = 0.0; + for(i = i1; 1; i = i2,a = 180.0) { + DIST_T dy = fabs(dto[i].dy[0]) + trackGauge * 1.5; + b1 = dto[i].pts[0]; + Translate(&b3,b1,(angle + a),dy); + Translate(&b5,b1,(angle + a),-(dy * 0.75)); + if(dto[i].type != 'S') { + if(dto[i].type == 'L') + hasLeft = 1; + else if(dto[i].type == 'R') + hasRgt = 1; + for(j = 1; j < dto[i].n; j++) { + dy = fabs(dto[i].dy[j]) + trackGauge * 1.5; + b2 = dto[i].pts[j]; + Translate(&b4,b2,(angle + a),dy); + Translate(&b6,b2,(angle + a),-(dy * 0.75)); + + // Draw the bridge background + DrawBridgeFill(d,b3,b4,b5,b6); + + // Draw the bridge edge + DrawLine(d,b3,b4,width2,drawColorBlack); + b1 = b2; + b3 = b4; + b5 = b6; + } + } + if(i == i2) + break; + } + + if(dtod.strPath >= 0 && dtod.str2Path >= 0) { + i1 = dtod.strPath; + i2 = dtod.str2Path; + if(!hasRgt) { + DIST_T dy = trackGauge * 1.5; + ANGLE_T a1, a2; + b1 = dto[i1].pts[0]; + a1 = dto[i1].angle + 90; + Translate(&b3,b1,a1,dy); + + b2 = dto[i2].pts[dto[i2].n - 1]; + a2 = dto[i2].angle + 90; + Translate(&b4,b2,a2,dy); + + FindIntersection(&b0, b3, a1-90.0, b4, a2-90.0); + + // Draw the bridge edge + DrawLine(d,b3,b0,width2,drawColorBlack); + DrawLine(d,b0,b4,width2,drawColorBlack); + } + + if(!hasLeft) { + DIST_T dy = trackGauge * 1.5; + ANGLE_T a1, a2; + b1 = dto[i2].pts[0]; + a1 = dto[i2].angle - 90; + Translate(&b3,b1,a1,dy); + + b2 = dto[i1].pts[dto[i1].n - 1]; + a2 = dto[i1].angle - 90; + Translate(&b4,b2,a2,dy); + + FindIntersection(&b0, b3, a1+90.0, b4, a2+90.0); + + // Draw the bridge edge + DrawLine(d,b3,b0,width2,drawColorBlack); + DrawLine(d,b0,b4,width2,drawColorBlack); + } + + if(dtod.toType == DTO_XNG9) { + DIST_T dy = trackGauge * 1.5; + ANGLE_T a1, a2; + b1 = dto[i1].pts[dto[i1].n - 1]; + a1 = dto[i1].angle + 90; + Translate(&b3,b1,a1,dy); + + b2 = dto[i2].pts[dto[i2].n - 1]; + a2 = dto[i2].angle - 90; + Translate(&b4,b2,a2,dy); + + FindIntersection(&b0, b3, a1-90.0, b4, a2+90.0); + + // Draw the bridge edge + DrawLine(d,b3,b0,width2,drawColorBlack); + DrawLine(d,b0,b4,width2,drawColorBlack); + + b1 = dto[i1].pts[0]; + a1 = dto[i1].angle - 90; + Translate(&b3,b1,a1,dy); + + b2 = dto[i2].pts[0]; + a2 = dto[i2].angle + 90; + Translate(&b4,b2,a2,dy); + + FindIntersection(&b0, b3, a1+90.0, b4, a2-90.0); + + // Draw the bridge edge + DrawLine(d,b3,b0,width2,drawColorBlack); + DrawLine(d,b0,b4,width2,drawColorBlack); + } + } + + // Bridge wings + EPINX_T ep; + coOrd p; + track_p trk1; + coOrd p0,p1; + + for(ep = 0; ep < 4; ep++) { + trk1 = GetTrkEndTrk(dtod.trk,ep); + + if((trk1) && (!GetTrkBridge(trk1))) { + p = GetTrkEndPos(dtod.trk,ep); + a = GetTrkEndAngle(dtod.trk,ep) + 90.0; + + if((dtod.toType == DTO_XNG9) || (ep == 2) || (ep == 3)) { + Translate(&p0,p,a,trackGauge * 1.5); + Translate(&p1,p0,a - 45.0,trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + if((dtod.toType == DTO_XNG9) || (ep == 0) || (ep == 1)) { + Translate(&p0,p,a,-trackGauge * 1.5); + Translate(&p1,p0,a + 45.0,-trackGauge * 1.5); + DrawLine(d,p0,p1,width2,drawColorBlack); + } + } + } +} + +/** + * Init Normal Turnout data structure + * Calculates the dy value of each segment + * Sets pts values REORIGIN base to actual position and angle + * Save often used last base and last point coOrd + */ +static void DrawDtoInit() +{ + struct extraDataCompound_t* xx = dtod.xx; + coOrd p1; + int i, j; + + for(i = 0; i < DTO_DIM; i++) { + int n = dto[i].n; + for(j = 0; j < n; j++) { + REORIGIN(p1,dto[i].base[j],xx->angle,xx->orig); + dto[i].pts[j] = p1; + if(j < n - 1) + dto[i].dy[j] = (dto[i].base[j + 1].y - dto[i].base[j].y) / (dto[i].base[j + 1].x - dto[i].base[j].x); + } + dto[i].ptsLast = dto[i].pts[n - 1]; + dto[i].baseLast = dto[i].base[n - 1]; + } +} + +/** + * Draw Normal (Single Origin) Turnout Bridge and Ties. Uses the static dto and dtod structures. + * + * \param d The drawing object + * \param scaleInx The layout/track scale index + * \param color The tie color. If black the color is read from the global tieColor. + */ +static void DrawNormalTurnout( + drawCmd_p d, + SCALEINX_T scaleInx, + BOOL_T omitTies, + wDrawColor color) +{ + tieData_p td; + DIST_T len; + coOrd pos; + int cnt; + ANGLE_T angle; + coOrd s1, s2, p1, p2, q1, q2; + int s0, p0, q0; + ANGLE_T a0; + + if (color == wDrawColorBlack) + color = tieColor; + + DIST_T trackGauge = GetTrkGauge(dtod.trk); + + DrawDtoInit(); + + // draw the points +#ifdef DTO_DEBUG + if (DTO_DEBUG == DTO_NORMAL) DrawDtoLayout(d, scaleInx); +#endif + + int strPath = dtod.strPath, othPath = 0, secPath = 1; + int toType = dtod.toType; + int first = 1; + + switch (toType) { + case DTO_NORMAL: + othPath = 1 - strPath; + secPath = strPath; + break; + case DTO_WYE: + // strPath = 2; + othPath = 0; secPath = 1; + break; + case DTO_THREE: + switch (strPath) { + case 0: + othPath = 1; secPath = 2; + break; + case 1: + othPath = 0; secPath = 2; + break; + case 2: + othPath = 0; secPath = 1; + break; + } + break; + } + + if(dtod.bridge) { + DrawTurnoutBridge(d,othPath,secPath); + } + if (omitTies) + return; + + // Straight vector for tie angle + if (toType == DTO_WYE) { + s1 = dto[othPath].pts[0]; + s2 = MidPtCoOrd(dto[othPath].ptsLast, dto[secPath].ptsLast); + } + else { + s1 = dto[strPath].pts[0]; + s2 = dto[strPath].ptsLast; + } + // Diverging vector(s) + p1 = dto[othPath].pts[0]; + p2 = dto[othPath].ptsLast; + q1 = dto[secPath].pts[0]; + q2 = dto[secPath].ptsLast; + + td = GetScaleTieData(scaleInx); + len = FindDistance(s1, s2); + angle = FindAngle(s1, s2); // The straight segment + + cnt = (int)floor(len / td->spacing + 0.5); + if (cnt > 0) { + int pn = dto[othPath].n; + int qn = dto[secPath].n; + DIST_T dx = len / cnt; + s0 = p0 = q0 = 0; + DIST_T tdlen = td->length; + DIST_T tdmax = (toType == DTO_WYE) ? 2.0 * tdlen : 2.5 * tdlen; + DIST_T px = len, dlenx = dx / 2; + + cnt = cnt > 1 ? cnt - 1 : 1; + for (px = dlenx; cnt; cnt--, px += dx) { + if (px >= dto[othPath].base[p0 + 1].x) p0++; + if (px >= dto[secPath].base[q0 + 1].x) q0++; + if (p0 >= pn || q0 >= qn) + break; + + if ((px + dx >= dto[othPath].baseLast.x) || (px + dx >= dto[secPath].baseLast.x)) { + break; + } + + DIST_T dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + DIST_T dy2 = dto[secPath].base[q0].y + (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + tdlen = td->length + fabs(dy1) + fabs(dy2); + if (tdlen > tdmax) + break; + + DIST_T dy = dy1 + dy2; + Translate(&pos, s1, angle, px); + Translate(&pos, pos, (angle - 90.0), dy / 2); + + DrawTie(d, pos, angle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + // Asymmetric? Use longer ties for remaining two tracks (strPath, othPath) + DIST_T sx = px; // Save these values for second code block + int s0 = p0; + if((dtod.toType == DTO_THREE) && (px + dx >= dto[secPath].baseLast.x)){ + for ( ; cnt; cnt--, px += dx) { + if (px >= dto[othPath].base[p0 + 1].x) p0++; + // if (px >= dto[secPath].base[q0 + 1].x) q0++; + if (p0 >= pn) + break; + + if (px + dx >= dto[othPath].baseLast.x) { + break; + } + + DIST_T dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + tdlen = td->length + fabs(dy1); + if (tdlen > tdmax) + break; + + DIST_T dy = dy1; + Translate(&pos, s1, angle, px); + Translate(&pos, pos, (angle - 90.0), dy / 2); + + DrawTie(d, pos, angle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + } + + // Draw remaining ties, if any + if (px + dx < dto[othPath].baseLast.x){ + p1 = dto[othPath].pts[p0]; + p2 = dto[othPath].ptsLast; + angle = FindAngle(p1, p2); + a0 = FindAngle(dto[othPath].base[p0], dto[othPath].baseLast); + DIST_T lenr = (dto[othPath].baseLast.x - px + dlenx) / cos(D2R(90.0 - a0)); + Translate(&p1, p2, angle, -lenr); + DrawStraightTies(d, scaleInx, p1, p2, color); + } + else { + p1 = dto[othPath].pts[pn - 2]; + a0 = FindAngle(p1, p2); + Translate(&pos, p2, a0, -dx / 2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + // Restore saved values + if(dtod.toType == DTO_THREE){ + px = sx; + p0 = s0; + } + + // Asymmetric? Use longer ties for remaining two tracks (strPath, secPath) + if((dtod.toType == DTO_THREE) && (px + dx >= dto[othPath].baseLast.x)){ + for ( ; cnt; cnt--, px += dx) { + // if (px >= dto[othPath].base[p0 + 1].x) p0++; + if (px >= dto[secPath].base[q0 + 1].x) q0++; + if (q0 >= qn) + break; + + if (px + dx >= dto[secPath].baseLast.x) { + break; + } + + DIST_T dy1 = dto[secPath].base[q0].y + (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + tdlen = td->length + fabs(dy1); + if (tdlen > tdmax) + break; + + DIST_T dy = dy1; + Translate(&pos, s1, angle, px); + Translate(&pos, pos, (angle - 90.0), dy / 2); + + DrawTie(d, pos, angle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + } + if (px + dx < dto[secPath].baseLast.x) { + q1 = dto[secPath].pts[q0]; + q2 = dto[secPath].ptsLast; + angle = FindAngle(q1, q2); + a0 = FindAngle(dto[secPath].base[q0], dto[secPath].baseLast); + DIST_T lenr = (dto[secPath].baseLast.x - px + dlenx) / cos(D2R(90.0 - a0)); + Translate(&q1, q2, angle, -lenr); + DrawStraightTies(d, scaleInx, q1, q2, color); + } + else { + q1 = dto[secPath].pts[qn - 2]; + a0 = FindAngle(q1, q2); + Translate(&pos, q2, a0, -dx / 2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + // Final ties at end + if (dtod.toType == DTO_THREE) { + + int n = (int)(dto[strPath].baseLast.x); + if (px + dx < len) { + angle = FindAngle(s1, s2); + DIST_T lenr = len - px + dlenx; + Translate(&s1, s2, angle, -lenr); + DrawStraightTies(d, scaleInx, s1, s2, color); + } + else { + n = dto[strPath].n; + s1 = dto[strPath].pts[n - 2]; + a0 = FindAngle(s1, s2); + Translate(&pos, s2, a0, -dx / 2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + } + } +} + +/** + * Draw Curved (Single Origin) Turnout Bridge and Ties. Uses the static dto and dtod structures. + * + * \param d The drawing object + * \param scaleInx The layout/track scale index + * \param color The tie color. If black the color is read from the global tieColor. + */ +static void DrawCurvedTurnout( + drawCmd_p d, + SCALEINX_T scaleInx, + BOOL_T omitTies, + wDrawColor color) +{ + tieData_p td; + DIST_T len, r; + coOrd pos; + int cnt; + ANGLE_T angle, dang; + coOrd center; + coOrd p1, p2, q1, q2; + ANGLE_T a0, a1, a2; + struct extraDataCompound_t* xx = dtod.xx; + + if (color == wDrawColorBlack) + color = tieColor; + + DrawDtoInit(); + + // draw the points +#ifdef DTO_DEBUG + if (DTO_DEBUG == DTO_CURVED) DrawDtoLayout(d, scaleInx); +#endif + + int othPath = 0, secPath = 1; + int toType = dtod.toType; + + if(dtod.bridge) { + DrawTurnoutBridge(d,othPath,secPath); + } + if (omitTies) + return; + + td = GetScaleTieData(scaleInx); + + // Save the ending coordinates + coOrd othEnd = zero, secEnd = zero; + + trkSeg_p trk; + DIST_T tdlen = td->length, tdmax = tdlen * 2.5; + DIST_T tdspc = td->spacing, tdspc2 = tdspc / 2.0; + double rdot = td->width / 2; + + int pn = dto[othPath].n; + int qn = dto[secPath].n; + int p0 = 0, q0 = 0; + DIST_T px = 0, qx = 0, dy = 0, dy1 = 0, dy2 = 0; + + double cosAdj = 1.0; + + angle = 0; + px = tdspc2; + qx = tdspc2; + int segs = max(dto[othPath].n, dto[secPath].n); + for (; segs > 0; segs--) { + + if (px >= dto[othPath].base[p0 + 1].x) + p0++; + if (qx >= dto[secPath].base[q0 + 1].x) + q0++; + if ((p0 >= pn - 1) || (q0 >= qn - 1)) { + break; + } + + trk = dto[othPath].trkSeg[p0]; + if (trk->type == SEG_CRVTRK) { + + center = trk->u.c.center; + r = fabs(trk->u.c.radius); + a0 = NormalizeAngle(trk->u.c.a0 + dtod.xx->angle); + a1 = trk->u.c.a1; + + pos = center; + REORIGIN(center, pos, xx->angle, xx->orig); + + len = r * D2R(a1); + cnt = (int)floor(len / tdspc + 0.5); + if (len - tdspc * cnt >= tdspc2) { + cnt++; + } + DIST_T tdlen = td->length; + DIST_T dx = len / cnt, dx2 = dx / 2; + + if (cnt != 0) { + dang = (len / cnt) * 360 / (2 * M_PI * r); + DIST_T dx = len / cnt, dx2 = dx / 2; + + if (dto[othPath].type == 'R') { + a2 = a0 + dang / 2; + } + else { + a2 = a0 + a1 - dang / 2; + dang = -dang; + } + angle += fabs(dang / 2); + + cosAdj = fabs(cos(D2R(angle))); + px += dx2 * cosAdj; + qx += dx2 * cosAdj; + + for (; cnt; cnt--, a2 += dang, angle += dang) { + if (px >= dto[othPath].base[p0 + 1].x) + p0++; + if (qx >= dto[secPath].base[q0 + 1].x) + q0++; + if ((p0 >= pn - 1) || (q0 >= qn - 1)) { + break; + } + + coOrd e1, e2; + PointOnCircle(&e1, center, r, a2); + + q1 = dto[secPath].pts[q0]; + q2 = dto[secPath].pts[q0 + 1]; + FindIntersection(&e2, e1, a2, q1, FindAngle(q1, q2)); + + dy = FindDistance(e1, e2); + DIST_T tlen = tdlen + dy; + + if (tlen > tdmax) { + break; + } + + Translate(&pos, e1, a2, -dy / 2); + DrawTie(d, pos, angle + xx->angle + 90, tlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + // Assures that these ends are the last point drawn before break + othEnd = e1; + secEnd = e2; + + cosAdj = fabs(cos(D2R(angle))); + if (cnt > 1) { + px += dx * cosAdj; + qx += dx * cosAdj; + } + else { + px += dx2 * cosAdj; + qx += dx2 * cosAdj; + } + } + } + } + else { + cosAdj = fabs(cos(D2R(angle))); + + p1 = dto[othPath].base[p0]; + p2 = dto[othPath].base[p0 + 1]; + len = FindDistance(p1, p2); + cnt = (int)floor(len / tdspc + 0.6); + if (cnt > 0) { + DIST_T dx = len / cnt, dx2 = dx / 2; + + for (; cnt; cnt--) { + if (px >= dto[othPath].base[p0 + 1].x) + p0++; + if (qx >= dto[secPath].base[q0 + 1].x) + q0++; + if ((p0 >= pn - 1) || (q0 >= qn - 1)) { + break; + } + + p1 = dto[othPath].base[p0]; + p2 = dto[othPath].base[p0 + 1]; + + if ((px >= dto[othPath].baseLast.x) + || (qx >= dto[secPath].baseLast.x)) { + break; + } + + dy1 = dto[secPath].base[q0].y + (qx - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + dy2 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + dy = dy1 - dy2; + DIST_T tlen = tdlen + fabs(cosAdj * dy); + if (tlen > tdmax) { + break; + } + + q1 = dto[secPath].pts[q0]; + q2 = dto[secPath].pts[q0 + 1]; + a1 = FindAngle(q1, q2); + DIST_T xlen = qx - dto[secPath].base[q0].x; + Translate(&pos, q1, a1, xlen); + secEnd = pos; + + q1 = dto[othPath].pts[p0]; + q2 = dto[othPath].pts[p0 + 1]; + a1 = FindAngle(q1, q2); + xlen = px - dto[othPath].base[p0].x; + Translate(&pos, q1, a1, xlen); + othEnd = pos; + + Translate(&pos, pos, (a1 - 90.0), dy / 2); + DrawTie(d, pos, a1, tlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + cosAdj = fabs(cos(D2R(angle))); + px += dx * cosAdj; + qx += dx * cosAdj; + } + } + else { + break; + } + } + } + +#ifdef DTO_DEBUG + if (DTO_DEBUG == DTO_CURVED) { + DrawFillCircle(d, othEnd, rdot, drawColorGreen); + DrawFillCircle(d, secEnd, rdot, drawColorGreen); + + DrawFillCircle(d, dto[othPath].pts[p0], rdot, drawColorBlue); + DrawFillCircle(d, dto[secPath].pts[q0], rdot, drawColorBlue); + } +#endif + + // Draw remaining ties, if any + p1 = othEnd; + p2 = dto[othPath].ptsLast; + a0 = FindAngle(p1, p2); + len = FindDistance(p1, p2); + if (len >= 2 * tdspc) { + Translate(&p1, p1, a0, tdspc2); + DrawStraightTies(d, scaleInx, p1, p2, color); + } + else if (len > tdspc2) { + Translate(&p2, p2, a0, -tdspc2); + DrawTie(d, p2, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + q1 = secEnd; + q2 = dto[secPath].ptsLast; + a0 = FindAngle(q1, q2); + len = FindDistance(q1, q2); + if (len >= 2 * tdspc) { + Translate(&q1, q1, a0, tdspc2); + DrawStraightTies(d, scaleInx, q1, q2, color); + } + else if (len > tdspc2) { + Translate(&q2, q2, a0, -tdspc2); + DrawTie(d, q2, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } +} + +/** + * Draw Crossing and Slip Turnout Bridge and Ties - Uses the static dto and dtod structures. + * + * \param d The drawing object + * \param scaleInx The layout/track scale index + * \param color The tie color. If black the color is read from the global tieColor. + */ +static void DrawXingTurnout( + drawCmd_p d, + SCALEINX_T scaleInx, + BOOL_T omitTies, + wDrawColor color) +{ + tieData_p td; + DIST_T len; + coOrd pos; + int cnt; + ANGLE_T cAngle; + + if (color == wDrawColorBlack) + color = tieColor; + + coOrd c1, c2, s1, s2, p1, p2, q1; + int p0, q0; + ANGLE_T a0, a1, a2; + int strPath = dtod.strPath, str2Path = dtod.str2Path; + + struct extraDataCompound_t* xx = dtod.xx; + + DrawDtoInit(); + + dto[strPath].angle = FindAngle(dto[strPath].pts[0], dto[strPath].ptsLast); + dto[str2Path].angle = FindAngle(dto[str2Path].pts[0], dto[str2Path].ptsLast); + + int othPath = strPath, secPath = str2Path; + int toType = dtod.toType; + + int i, j; + switch (toType) { + case DTO_XING: + case DTO_XNG9: + break; + case DTO_SSLIP: + for (i = 0; i < dtod.pathCnt; i++) { + if (dto[i].type == 'L' || dto[i].type == 'R') { + secPath = i; + break; + } + } + break; + case DTO_DSLIP: + for (i = 0; i < dtod.pathCnt; i++) { + if (dto[i].type == 'L') { + othPath = i; + } + else if (dto[i].type == 'R') { + secPath = i; + } + } + break; + } + + if(dtod.bridge) { + DrawXingBridge(d,othPath,secPath); + } + // draw the points +#ifdef DTO_DEBUG + if (DTO_DEBUG == DTO_XING) DrawDtoLayout(d, scaleInx); +#endif + + if (omitTies) + return; + + td = GetScaleTieData(scaleInx); + DIST_T tdlen = td->length, tdmax = 2.0 * tdlen; + DIST_T tdspc = td->spacing, tdspc2 = tdspc / 2; + + // Midpoint + p1 = dto[strPath].pts[0]; + a1 = dto[strPath].angle; + + q1 = dto[str2Path].pts[0]; + a2 = dto[str2Path].angle; + + FindIntersection(&pos, p1, a1, q1, a2); + dtod.midPt = pos; + +#ifdef DTO_DEBUG + if(DTO_DEBUG == DTO_XING) + { + double r = td->width / 2; + DrawFillCircle(d,p1,r,drawColorPurple); + DrawFillCircle(d,q1,r,drawColorPurple); + DrawFillCircle(d,dtod.midPt,r,drawColorPurple); + } +#endif + + // Tie length adjust + double dAngle = fabs(DifferenceBetweenAngles(a1, a2)); + double magic = 1.0; + + // Short circuit the complex code for this simple case + if (toType == DTO_XNG9) { + p1 = dto[strPath].pts[0]; + p2 = dto[strPath].ptsLast; + DrawStraightTies(d, scaleInx, p1, p2, color); + + p1 = dto[str2Path].pts[0]; + p2 = dto[str2Path].ptsLast; + + // Omit the center ties + magic = 1 / cos(D2R(90 - dAngle)); + DIST_T tdadj = (tdlen / 2) * magic; + DIST_T tdadj2 = tdspc2 * magic; + + dAngle = (dAngle - 90) / 2; + Translate(&pos, dtod.midPt, a2, -tdadj - tdadj2); + DrawTie(d, pos, a2 - dAngle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + Translate(&pos, dtod.midPt, a2, -tdadj - tdspc); + DrawStraightTies(d, scaleInx, p1, pos, color); + + Translate(&pos, dtod.midPt, a2, tdadj + tdadj2); + DrawTie(d, pos, a2 - dAngle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + Translate(&pos, dtod.midPt, a2, tdadj + tdspc); + DrawStraightTies(d, scaleInx, pos, p2, color); + return; + } + + // Straight vector for tie angle + s1 = MidPtCoOrd(dto[strPath].base[0], dto[str2Path].base[0]); + s2 = MidPtCoOrd(dto[strPath].baseLast, dto[str2Path].baseLast); + + // Rotate base coordinates so that the tie line is aligned with x-axis and origin is at zero + cAngle = FindAngle(s1, s2); + for (i = 0; i < DTO_DIM; i++) + for (j = 0; j < dto[i].n; j++) { + dto[i].base[j].x -= s1.x; + dto[i].base[j].y -= s1.y; + Rotate(&dto[i].base[j], zero, (90.0 - cAngle)); + } + + for (i = 0; i < DTO_DIM; i++) { + for (j = 0; j < dto[i].n - 1; j++) { + dto[i].dy[j] = (dto[i].base[j + 1].y - dto[i].base[j].y) / (dto[i].base[j + 1].x - dto[i].base[j].x); + } + if (dto[i].type == 'S') + dto[i].angle = FindAngle(dto[i].pts[0], dto[i].ptsLast); + } + + // Tie center line in drawing coordinates + REORIGIN(c1, s1, xx->angle, xx->orig); + REORIGIN(c2, s2, xx->angle, xx->orig); + cAngle = FindAngle(c1, c2); + + int pn = dto[othPath].n; + int qn = dto[secPath].n; + + // Tie length adjust + magic = 1 / cos(0.5 * D2R(dAngle)); + // Extra ties length adjust + double magic2 = 1.0 / cos(0.5 * D2R(dAngle)); + + // Draw right half + len = FindDistance(dtod.midPt, c2); + cnt = (int)floor(len / td->spacing + 0.5); + if (cnt <= 0) + return; + + DIST_T dx = len / cnt; + p0 = q0 = 0; + DIST_T dx2 = dx / 2; + DIST_T px = len + dx2; + DIST_T lenx = 0; + + while (p0 < pn && px > dto[othPath].base[p0 + 1].x) p0++; + while (q0 < qn && px > dto[secPath].base[q0 + 1].x) q0++; + while (p0 < pn && q0 < qn) { + if (px > dto[othPath].base[p0 + 1].x) p0++; + if (px > dto[secPath].base[q0 + 1].x) q0++; + if (p0 >= pn || q0 >= qn) + break; + // Dont use baseLast, as base coOrds have been rotated + if ((px + dx >= dto[othPath].base[pn - 1].x) + || (px + dx >= dto[secPath].base[qn - 1].x)) { + break; + } + + DIST_T dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + DIST_T dy2 = dto[secPath].base[q0].y + (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + tdlen = (td->length + fabs(dy1) + fabs(dy2)) * magic; + if(tdlen > tdmax) + { + if(dAngle >= 30) + { + DIST_T dy = (dy1 + dy2) / 2; + Translate(&pos,dtod.midPt,cAngle,px - len); + Translate(&pos,pos,(cAngle - 90.0),dy); + DrawTie(d,pos,cAngle,tdlen - td->length * magic,td->width,color,tieDrawMode == TIEDRAWMODE_SOLID); + lenx += dx2 * magic2; + } + break; + } + + DIST_T dy = (dy1 + dy2) / 2; + Translate(&pos, dtod.midPt, cAngle, px - len); + Translate(&pos, pos, (cAngle - 90.0), dy); + DrawTie(d, pos, cAngle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + px += dx; + lenx += dx; + } + + p1 = dtod.midPt; + p2 = dto[strPath].ptsLast; + DIST_T lenr = FindDistance(p1, p2) - lenx * magic2; + a0 = dto[strPath].angle; + if (lenr > dx) { + Translate(&pos, p2, a0, -lenr); + DrawStraightTies(d, scaleInx, pos, p2, color); + } + else { + Translate(&pos, p2, a0, -dx2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + // p1 = dtod.midPt; + p2 = dto[str2Path].ptsLast; + lenr = FindDistance(p1, p2) - lenx * magic2; + a0 = dto[str2Path].angle; + if (lenr > dx) { + Translate(&pos, p2, a0, -lenr); + DrawStraightTies(d, scaleInx, pos, p2, color); + } + else { + Translate(&pos, p2, a0, -dx2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + // Draw left half + // Change the straight path used + if (dtod.toType == DTO_SSLIP) { + othPath = str2Path; + } + + len = FindDistance(c1, dtod.midPt); + cnt = (int)floor(len / td->spacing + 0.5); + if (cnt <= 0) + return; + + p0 = q0 = 0; + tdlen = td->length; + + dx = len / cnt; + dx2 = dx / 2; + px = len - dx2; + lenx = 0; + + while (p0 < pn && px > dto[othPath].base[p0 + 1].x) p0++; + while (q0 < qn && px > dto[secPath].base[q0 + 1].x) q0++; + while (p0 >= 0 && q0 >= 0) { + if (px < dto[othPath].base[p0].x) p0--; + if (px < dto[secPath].base[q0].x) q0--; + if (p0 < 0 || q0 < 0) + break; + + if ((px - dx < dto[othPath].base[0].x) + || (px - dx < dto[secPath].base[0].x)) { + break; + } + + DIST_T dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + DIST_T dy2 = dto[secPath].base[q0].y + (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + tdlen = (td->length + fabs(dy1) + fabs(dy2)) * magic; + if(tdlen > tdmax) + { + if(dAngle >= 30) + { + DIST_T dy = (dy1 + dy2) / 2; + Translate(&pos,dtod.midPt,cAngle,px - len); + Translate(&pos,pos,(cAngle - 90.0),dy); + DrawTie(d,pos,cAngle,tdlen - td->length * magic,td->width,color,tieDrawMode == TIEDRAWMODE_SOLID); + lenx += dx2 * magic2; + } + break; + } + + DIST_T dy = (dy1 + dy2) / 2; + Translate(&pos, dtod.midPt, cAngle, px - len); + Translate(&pos, pos, (cAngle - 90.0), dy); + DrawTie(d, pos, cAngle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + px -= dx; + lenx += dx; + } + + p1 = dto[strPath].pts[0]; + p2 = dtod.midPt; + a0 = dto[strPath].angle; + lenr = FindDistance(p1, p2) - lenx * magic2; + if (lenr > dx) { + Translate(&pos, p1, a0, lenr); + DrawStraightTies(d, scaleInx, p1, pos, color); + } + else { + Translate(&pos, p1, a0, dx2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + p1 = dto[str2Path].pts[0]; + // p2 = dtod.midPt; + a0 = dto[str2Path].angle; + lenr = FindDistance(p1, p2) - lenx * magic2; + if (lenr > dx) { + Translate(&pos, p1, a0, lenr); + DrawStraightTies(d, scaleInx, p1, pos, color); + } + else { + Translate(&pos, p1, a0, dx2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } +} + +/** + * Draw Crossover (Two Origin) Turnout Bridge and Ties. Uses the static dto and dtod structures. + * + * \param d The drawing object + * \param scaleInx The layout/track scale index + * \param color The tie color. If black the color is read from the global tieColor. + */ +static void DrawCrossTurnout( + drawCmd_p d, + SCALEINX_T scaleInx, + BOOL_T omitTies, + wDrawColor color) +{ + tieData_p td; + DIST_T len, dx; + coOrd pos; + int cnt; + ANGLE_T angle; + + if (color == wDrawColorBlack) + color = tieColor; + + struct extraDataCompound_t* xx = dtod.xx; + + DrawDtoInit(); + + // draw the points +#ifdef DTO_DEBUG + if (DTO_DEBUG == DTO_LCROSS) DrawDtoLayout(d, scaleInx); +#endif + + int strPath = dtod.strPath, str2Path = dtod.str2Path; + // Bad assumption + int othPath = 2, secPath = 2; + if (dtod.pathCnt == 4) secPath = 3; + + dto[strPath].angle = FindAngle(dto[strPath].pts[0], dto[strPath].ptsLast); + dto[str2Path].angle = FindAngle(dto[str2Path].pts[0], dto[str2Path].ptsLast); + + if(dtod.bridge) { + DrawCrossBridge(d,strPath,str2Path); + } + if (omitTies) + return; + + td = GetScaleTieData(scaleInx); + + coOrd s1, s2, t1, t2, p1, p2, q1, q2; + int s0, t0, p0, q0; + + int sn = dto[strPath].n; + int tn = dto[str2Path].n; + int pn = dto[othPath].n; + int qn = dto[secPath].n; + + s1 = dto[strPath].pts[0]; + s2 = dto[strPath].ptsLast; + t1 = dto[str2Path].pts[0]; + t2 = dto[str2Path].ptsLast; + angle = dto[strPath].angle; + + p1 = dto[othPath].base[0]; + p2 = dto[othPath].baseLast; + q1 = dto[secPath].base[0]; + q2 = dto[secPath].baseLast; + + td = GetScaleTieData(scaleInx); + len = FindDistance(s1, s2); + angle = dto[strPath].angle; + + cnt = (int)floor(len / td->spacing + 0.5); + if (cnt > 0) { + DIST_T px = 0; + DIST_T dy, dy1, dy2; + int cflag = 0; + dy = dto[str2Path].base[0].y - dto[strPath].base[0].y; + + dx = len / cnt; + s0 = t0 = p0 = q0 = 0; + DIST_T tdlen = td->length; + DIST_T dlenx = dx / 2; + + DIST_T px1 = len / 2 - dlenx * 5, + px2 = len / 2 + dlenx * 4; + + for (px = dlenx; cnt; cnt--, px += dx) { + if (px >= dto[strPath].base[s0 + 1].x) s0++; + if (px >= dto[str2Path].base[t0 + 1].x) t0++; + if (px >= dto[othPath].base[p0 + 1].x) p0++; + if (px >= dto[secPath].base[q0 + 1].x) q0++; + if (s0 >= sn || t0 >= tn || p0 >= pn || q0 >= qn) + break; + + if ((px >= dto[strPath].baseLast.x) + || (px >= dto[str2Path].baseLast.x)) { + break; + } + + dy1 = dy2 = 0; + cflag = 0; + if (px < px1) { + switch (dtod.toType) { + case DTO_DCROSS: + dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + dy2 = dy - dto[secPath].base[q0].y - (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + break; + case DTO_LCROSS: + dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + dy2 = 0; + break; + case DTO_RCROSS: + dy1 = 0; + dy2 = dy - dto[secPath].base[q0].y - (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + break; + default: + break; + } + } + else if (px < px2) { + dy1 = (dto[str2Path].base[s0].y - dto[strPath].base[t0].y); + dy2 = 0; + cflag = 1; + } + else { + switch (dtod.toType) { + case DTO_DCROSS: + dy1 = dto[secPath].base[q0].y + (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + dy2 = dy - dto[othPath].base[p0].y - (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + break; + case DTO_LCROSS: + dy1 = 0; + dy2 = dy - dto[secPath].base[q0].y - (px - dto[secPath].base[q0].x) * dto[secPath].dy[q0]; + break; + case DTO_RCROSS: + dy1 = dto[othPath].base[p0].y + (px - dto[othPath].base[p0].x) * dto[othPath].dy[p0]; + dy2 = 0; + break; + default: + break; + } + } + + if (fabs(dy1) + fabs(dy2) >= dy) { + dy1 = (dto[str2Path].base[s0].y - dto[strPath].base[t0].y); + dy2 = 0; + cflag = 1; + } + + tdlen = td->length + fabs(dy1); + Translate(&pos, s1, angle, px); + Translate(&pos, pos, (angle - 90.0), dy1 / 2); + DrawTie(d, pos, angle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + + if (!cflag) { + tdlen = td->length + fabs(dy2); + Translate(&pos, t1, angle, px); + Translate(&pos, pos, (angle - 90.0), -dy2 / 2); + DrawTie(d, pos, angle, tdlen, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + } + return; + + // Draw remaining ties, if any + // Currently by definition, there won't be any + /* + if (px + dx < dto[strPath].baseLast.x) { + p1 = dto[strPath].pts[p0]; + p2 = dto[strPath].ptsLast; + angle = FindAngle(p1, p2); + a0 = FindAngle(dto[strPath].base[p0], dto[strPath].baseLast); + DIST_T lenr = (dto[strPath].baseLast.x - px + dlenx) / cos(D2R(90.0 - a0)); + Translate(&p1, p2, angle, -lenr); + DrawStraightTies(d, scaleInx, p1, p2, color); + } + else { + p1 = dto[strPath].pts[pn - 2]; + a0 = FindAngle(p1, p2); + Translate(&pos, p2, a0, -dx / 2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + + if (px + dx < dto[str2Path].baseLast.x) { + q1 = dto[str2Path].pts[q0]; + q2 = dto[str2Path].ptsLast; + angle = FindAngle(q1, q2); + a0 = FindAngle(dto[str2Path].base[q0], dto[str2Path].baseLast); + DIST_T lenr = (dto[str2Path].baseLast.x - px + dlenx) / cos(D2R(90.0 - a0)); + Translate(&q1, q2, angle, -lenr); + DrawStraightTies(d, scaleInx, q1, q2, color); + } + else { + q1 = dto[str2Path].pts[qn - 2]; + a0 = FindAngle(q1, q2); + Translate(&pos, q2, a0, -dx / 2); + DrawTie(d, pos, a0, td->length, td->width, color, tieDrawMode == TIEDRAWMODE_SOLID); + } + */ + } +} + +/** + * Draw all turnout components: ties, rail, roadbed, etc. The turnout is checked + * to see if the enhanced methods can be used. If so the ties are drawn and the + * TB_NOTIES bit is set so that the rails and such are drawn on top of the ties. + * That bit is restored to its previous state before return. + * + * \param trk Pointer to the track object + * \param d The drawing object + * \param color The turnout color. + */ static void DrawTurnout( - track_p trk, - drawCmd_p d, - wDrawColor color ) + track_p trk, + drawCmd_p d, + wDrawColor color) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); wIndex_t i; long widthOptions = 0; - DIST_T scale2rail; + SCALEINX_T scaleInx = GetTrkScale(trk); + DIST_T scale2rail = (d->options & DC_PRINT) ? (twoRailScale * 2 + 1) : twoRailScale; + BOOL_T omitTies = !DoDrawTies(d, trk) || (d->scale > scale2rail) || ((d->options & DC_SIMPLE) != 0); // || (scaleInx == 0); + + widthOptions = DTS_LEFT | DTS_RIGHT; + + int noTies = GetTrkNoTies(trk); + int bridge = GetTrkBridge(trk); + + long skip = 0; + /** @prefs [Preference] NormalTurnoutDraw=1 to skip enhanced drawing methods */ + wPrefGetInteger("Preference", "NormalTurnoutDraw", (long *) &skip, 0); + + int pathCnt = (skip == 0 ? GetTurnoutPaths(trk, xx) : 0); + + if ( (pathCnt > 1) && (pathCnt <= DTO_DIM) + && (trk->endCnt <= 4) + && (xx->special == TOnormal) ) + { + + dtod.bridge = bridge; + + int strPath = -1; + GetTurnoutType(); + + if (dtod.toType != DTO_INVALID) { + + switch (dtod.toType) + { + case DTO_NORMAL: + case DTO_THREE: + case DTO_WYE: + DrawNormalTurnout(d, scaleInx, omitTies, color); + break; + case DTO_CURVED: + DrawCurvedTurnout(d, scaleInx, omitTies, color); + break; + case DTO_XING: + case DTO_XNG9: + case DTO_SSLIP: + case DTO_DSLIP: + DrawXingTurnout(d, scaleInx, omitTies, color); + break; + case DTO_LCROSS: + case DTO_RCROSS: + case DTO_DCROSS: + DrawCrossTurnout(d, scaleInx, omitTies, color); + break; + default: + break; + } + SetTrkNoTies(trk, 1); + ClrTrkBits(trk, TB_BRIDGE); + } + } - widthOptions = DTS_LEFT|DTS_RIGHT; - - scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; - DrawSegsO( d, trk, xx->orig, xx->angle, xx->segs, xx->segCnt, GetTrkGauge(trk), color, widthOptions | DTS_NOCENTER ); // no curve center for turnouts + // Begin standard DrawTurnout code to draw rails or centerline + DrawSegsO(d, trk, xx->orig, xx->angle, xx->segs, xx->segCnt, GetTrkGauge(trk), color, widthOptions | DTS_NOCENTER); // no curve center for turnouts - for (i=0; i<GetTrkEndPtCnt(trk); i++) { - DrawEndPt( d, trk, i, color ); + for (i = 0; i < GetTrkEndPtCnt(trk); i++) { + DrawEndPt(d, trk, i, color); } - if ( (d->options & DC_SIMPLE) == 0 && - (labelWhen == 2 || (labelWhen == 1 && (d->options&DC_PRINT))) && - labelScale >= d->scale && - ( GetTrkBits( trk ) & TB_HIDEDESC ) == 0 ) { - DrawCompoundDescription( trk, d, color ); + if ((d->options & DC_SIMPLE) == 0 && + (labelWhen == 2 || (labelWhen == 1 && (d->options & DC_PRINT))) && + labelScale >= d->scale && + (GetTrkBits(trk) & TB_HIDEDESC) == 0) { + DrawCompoundDescription(trk, d, color); if (!xx->handlaid) - LabelLengths( d, trk, color ); + LabelLengths(d, trk, color); } - if ( roadbedWidth > GetTrkGauge(trk) && - ( ((d->options&DC_PRINT) && d->scale <= (twoRailScale*2+1)/2.0) || - (roadbedOnScreen && d->scale <= twoRailScale) ) ) - DrawTurnoutRoadbed( d, color, xx->orig, xx->angle, xx->segs, xx->segCnt ); - + if (roadbedWidth > GetTrkGauge(trk) && + (((d->options & DC_PRINT) && d->scale <= (twoRailScale * 2 + 1) / 2.0) || + (roadbedOnScreen && d->scale <= twoRailScale))) + DrawTurnoutRoadbed(d, color, xx->orig, xx->angle, xx->segs, xx->segCnt); + + // Restore these settings + if (noTies == 0) ClrTrkBits(trk, TB_NOTIES); + if (bridge) SetTrkBits(trk, TB_BRIDGE); } static BOOL_T ReadTurnout( - char * line ) + char* line) { - if ( !ReadCompound( line+8, T_TURNOUT ) ) + if (!ReadCompound(line + 8, T_TURNOUT)) return FALSE; return TRUE; } static ANGLE_T GetAngleTurnout( - track_p trk, - coOrd pos, - EPINX_T *ep0, - EPINX_T *ep1 ) + track_p trk, + coOrd pos, + EPINX_T* ep0, + EPINX_T* ep1) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); wIndex_t segCnt, segInx; ANGLE_T angle; - if ( ep0 && ep1 ) - *ep0 = *ep1 = PickEndPoint( pos, trk ); - coOrd pos0=pos; - double dd = 10000.0; + if (ep0 && ep1) + *ep0 = *ep1 = PickEndPoint(pos, trk); + coOrd pos0 = pos; + double dd = DIST_INF; int found = -1; //Cope with tracks not being first - for (segCnt =0; segCnt<xx->segCnt ; segCnt++ ) { + for (segCnt = 0; segCnt < xx->segCnt; segCnt++) { if (IsSegTrack(&xx->segs[segCnt])) { - double d = DistanceSegs( xx->orig, xx->angle, 1, &xx->segs[segCnt], &pos0, NULL ); - if (d<dd) { + double d = DistanceSegs(xx->orig, xx->angle, 1, &xx->segs[segCnt], &pos0, NULL); + if (d < dd) { dd = d; found = segCnt; } } pos0 = pos; } - if (found>=0) { + if (found >= 0) { pos.x -= xx->orig.x; pos.y -= xx->orig.y; - Rotate( &pos, zero, -xx->angle ); - angle = GetAngleSegs( 1, &xx->segs[found], &pos, &segInx, NULL, NULL, NULL, NULL ); - return NormalizeAngle( angle+xx->angle ); - } else return 0.0; + Rotate(&pos, zero, -xx->angle); + angle = GetAngleSegs(1, &xx->segs[found], &pos, &segInx, NULL, NULL, NULL, NULL); + return NormalizeAngle(angle + xx->angle); + } + else return 0.0; } static BOOL_T SplitTurnoutCheckPath( - wIndex_t segInxEnd, - PATHPTR_T pp1, - int dir1, - PATHPTR_T pp2, - int dir2, - trkSeg_p segs, - coOrd epPos ) + wIndex_t segInxEnd, + PATHPTR_T pp1, + int dir1, + PATHPTR_T pp2, + int dir2, + trkSeg_p segs, + coOrd epPos) { wIndex_t segInx1, segInx2; EPINX_T segEP; coOrd pos; DIST_T dist; - GetSegInxEP( pp2[0], &segInx2, &segEP ); - if ( dir2 < 0 ) segEP = 1-segEP; - pos = GetSegEndPt( &segs[segInx2], segEP, FALSE, NULL ); - dist = FindDistance( pos, epPos ); - if ( dist>connectDistance ) + GetSegInxEP(pp2[0], &segInx2, &segEP); + if (dir2 < 0) segEP = 1 - segEP; + pos = GetSegEndPt(&segs[segInx2], segEP, FALSE, NULL); + dist = FindDistance(pos, epPos); + if (dist > connectDistance) return TRUE; - while ( pp2[0] ) { - GetSegInxEP( pp1[0], &segInx1, &segEP ); - GetSegInxEP( pp2[0], &segInx2, &segEP ); - if ( segInx1 != segInx2 ) + while (pp2[0]) { + GetSegInxEP(pp1[0], &segInx1, &segEP); + GetSegInxEP(pp2[0], &segInx2, &segEP); + if (segInx1 != segInx2) break; - if ( segInxEnd == segInx2 ) + if (segInxEnd == segInx2) return TRUE; pp1 += dir1; pp2 += dir2; @@ -882,21 +2763,21 @@ static BOOL_T SplitTurnoutCheckPath( static BOOL_T SplitTurnoutCheckEP( - wIndex_t segInx0, - coOrd epPos, - PATHPTR_T pp1, - int dir1, - PATHPTR_T pp, - trkSeg_p segs ) -{ - while ( pp[0] ) { - pp += strlen((char *)pp)+1; - while ( pp[0] ) { - if (!SplitTurnoutCheckPath( segInx0, pp1, dir1, pp, 1, segs, epPos )) + wIndex_t segInx0, + coOrd epPos, + PATHPTR_T pp1, + int dir1, + PATHPTR_T pp, + trkSeg_p segs) +{ + while (pp[0]) { + pp += strlen((char*)pp) + 1; + while (pp[0]) { + if (!SplitTurnoutCheckPath(segInx0, pp1, dir1, pp, 1, segs, epPos)) return FALSE; - while ( pp[0] ) + while (pp[0]) pp++; - if (!SplitTurnoutCheckPath( segInx0, pp1, dir1, pp-1, -1, segs, epPos )) + if (!SplitTurnoutCheckPath(segInx0, pp1, dir1, pp - 1, -1, segs, epPos)) return FALSE; pp++; } @@ -907,11 +2788,11 @@ static BOOL_T SplitTurnoutCheckEP( EXPORT EPINX_T TurnoutPickEndPt( - coOrd epPos, - track_p trk ) + coOrd epPos, + track_p trk) { - struct extraData * xx = GetTrkExtraData(trk); - wIndex_t segCnt, segInx, segInx0; + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + wIndex_t segInx, segInx0; EPINX_T segEP; PATHPTR_T cp, cq, pps[2]; coOrd pos; @@ -920,38 +2801,37 @@ EXPORT EPINX_T TurnoutPickEndPt( EPINX_T ep, epCnt, eps[2]; BOOL_T unique_eps[2]; - for ( segCnt=0; segCnt<xx->segCnt && IsSegTrack(&xx->segs[segCnt]); segCnt++ ); - DistanceSegs( xx->orig, xx->angle, segCnt, xx->segs, &epPos, &segInx0 ); - Rotate( &epPos, xx->orig, xx->angle ); + DistanceSegs(xx->orig, xx->angle, xx->segCnt, xx->segs, &epPos, &segInx0); + Rotate(&epPos, xx->orig, xx->angle); epPos.x -= xx->orig.x; epPos.y -= xx->orig.y; epCnt = GetTrkEndPtCnt(trk); - cp = xx->paths; + cp = GetPaths(trk); eps[0] = eps[1] = -1; unique_eps[0] = unique_eps[1] = TRUE; - while ( cp[0] ) { - cp += strlen((char *)cp)+1; - while ( cp[0] ) { - while ( cp[0] ) { - GetSegInxEP( cp[0], &segInx, &segEP ); - if ( segInx == segInx0 ) { - for ( dir=0; dir<2; dir++ ) { - for ( cq=cp; cq[dir?-1:1]; cq += (dir?-1:1) ); - GetSegInxEP( cq[0], &segInx, &segEP ); - if ( dir==0 ) segEP = 1-segEP; - pos = GetSegEndPt( &xx->segs[segInx], segEP, FALSE, NULL ); - dist = FindDistance( pos, epPos ); - if ( eps[dir] < 0 || dist < dists[dir] ) { + while (cp[0]) { + cp += strlen((char*)cp) + 1; + while (cp[0]) { + while (cp[0]) { + GetSegInxEP(cp[0], &segInx, &segEP); + if (segInx == segInx0) { + for (dir = 0; dir < 2; dir++) { + for (cq = cp; cq[dir ? -1 : 1]; cq += (dir ? -1 : 1)); + GetSegInxEP(cq[0], &segInx, &segEP); + if (dir == 0) segEP = 1 - segEP; + pos = GetSegEndPt(&xx->segs[segInx], segEP, FALSE, NULL); + dist = FindDistance(pos, epPos); + if (eps[dir] < 0 || dist < dists[dir]) { dists[dir] = dist; pos.x += xx->orig.x; pos.y += xx->orig.y; - Rotate( &pos, xx->orig, xx->angle ); - for ( ep=0; ep<epCnt; ep++ ) { - if ( FindDistance( pos, GetTrkEndPos(trk,ep) ) < connectDistance ) + Rotate(&pos, xx->orig, xx->angle); + for (ep = 0; ep < epCnt; ep++) { + if (FindDistance(pos, GetTrkEndPos(trk, ep)) < connectDistance) break; } - if ( ep<epCnt ) { - if ( eps[dir] >= 0 && eps[dir] != ep ) + if (ep < epCnt) { + if (eps[dir] >= 0 && eps[dir] != ep) unique_eps[dir] = FALSE; eps[dir] = ep; dists[dir] = dist; @@ -967,27 +2847,27 @@ EXPORT EPINX_T TurnoutPickEndPt( cp++; } - for ( dir=0; dir<2; dir++ ) { - if ( unique_eps[dir] && eps[dir] >= 0 ) { - GetSegInxEP( pps[dir][0], &segInx, &segEP ); - if ( dir == 0 ) segEP = 1-segEP; - epPos = GetSegEndPt( &xx->segs[segInx], segEP, FALSE, NULL ); - if ( ! SplitTurnoutCheckEP( segInx0, epPos, pps[dir], dir?1:-1, xx->paths, xx->segs ) ) - unique_eps[dir] = FALSE; + for (dir = 0; dir < 2; dir++) { + if (unique_eps[dir] && eps[dir] >= 0) { + GetSegInxEP(pps[dir][0], &segInx, &segEP); + if (dir == 0) segEP = 1 - segEP; + epPos = GetSegEndPt(&xx->segs[segInx], segEP, FALSE, NULL); + if (!SplitTurnoutCheckEP(segInx0, epPos, pps[dir], dir ? 1 : -1, GetPaths(trk), xx->segs)) + unique_eps[dir] = FALSE; } } - if ( unique_eps[0] == unique_eps[1] ) { - if ( eps[0] >= 0 && eps[1] >= 0 ) - return ( dists[0] < dists[1] ) ? eps[0] : eps[1] ; + if (unique_eps[0] == unique_eps[1]) { + if (eps[0] >= 0 && eps[1] >= 0) + return (dists[0] < dists[1]) ? eps[0] : eps[1]; } - if ( unique_eps[0] && eps[0] >= 0 ) + if (unique_eps[0] && eps[0] >= 0) return eps[0]; - if ( unique_eps[1] && eps[1] >= 0 ) + if (unique_eps[1] && eps[1] >= 0) return eps[1]; - if ( eps[0] >= 0 && eps[1] >= 0 ) - return ( dists[0] < dists[1] ) ? eps[0] : eps[1] ; - return eps[0] >= 0 ? eps[0] : eps[1] ; + if (eps[0] >= 0 && eps[1] >= 0) + return (dists[0] < dists[1]) ? eps[0] : eps[1]; + return eps[0] >= 0 ? eps[0] : eps[1]; } @@ -996,11 +2876,11 @@ static PATHPTR_T splitTurnoutRoot; static int splitTurnoutDir; static void SplitTurnoutCheckEndPt( - PATHPTR_T path, - int dir, - trkSeg_p segs, - coOrd epPos, - coOrd splitPos ) + PATHPTR_T path, + int dir, + trkSeg_p segs, + coOrd epPos, + coOrd splitPos) { PATHPTR_T path0; wIndex_t segInx; @@ -1009,21 +2889,21 @@ static void SplitTurnoutCheckEndPt( DIST_T dist, minDist; path0 = path; - GetSegInxEP( path[0], &segInx, &segEP ); - if ( dir < 0 ) segEP = 1-segEP; - pos = GetSegEndPt( &segs[segInx], segEP, FALSE, NULL ); - dist = FindDistance( pos, epPos ); - LOG( log_splitturnout, 1, ( " SPTChkEp P%d DIR:%d SegInx:%d SegEP:%d POS[%0.3f %0.3f] DIST:%0.3f\n", *path, dir, segInx, segEP, pos.x, pos.y, dist ) ); - if ( dist>connectDistance ) + GetSegInxEP(path[0], &segInx, &segEP); + if (dir < 0) segEP = 1 - segEP; + pos = GetSegEndPt(&segs[segInx], segEP, FALSE, NULL); + dist = FindDistance(pos, epPos); + LOG(log_splitturnout, 1, (" SPTChkEp P%d DIR:%d SegInx:%d SegEP:%d POS[%0.3f %0.3f] DIST:%0.3f\n", *path, dir, segInx, segEP, pos.x, pos.y, dist)); + if (dist > connectDistance) return; minDist = trackGauge; - while ( path[0] ) { - GetSegInxEP( path[0], &segInx, &segEP ); - if ( dir < 0 ) segEP = 1-segEP; + while (path[0]) { + GetSegInxEP(path[0], &segInx, &segEP); + if (dir < 0) segEP = 1 - segEP; pos = splitPos; - dist = DistanceSegs( zero, 0.0, 1, &segs[segInx], &pos, NULL ); - LOG( log_splitturnout, 1, ( " - P:%d SegInx:%d SegEP:%d DIST:%0.3f\n", path[0], segInx, segEP, dist ) ); - if ( dist < minDist ) { + dist = DistanceSegs(zero, 0.0, 1, &segs[segInx], &pos, NULL); + LOG(log_splitturnout, 1, (" - P:%d SegInx:%d SegEP:%d DIST:%0.3f\n", path[0], segInx, segEP, dist)); + if (dist < minDist) { minDist = dist; splitTurnoutPath = path; splitTurnoutDir = -dir; @@ -1034,26 +2914,26 @@ static void SplitTurnoutCheckEndPt( } EXPORT BOOL_T SplitTurnoutCheck( - track_p trk, - coOrd pos, - EPINX_T ep, - track_p *leftover, - EPINX_T * ep0, - EPINX_T * ep1, - BOOL_T check, - coOrd * outPos, - ANGLE_T * outAngle ) - { - struct extraData * xx = GetTrkExtraData( trk ); + track_p trk, + coOrd pos, + EPINX_T ep, + track_p* leftover, + EPINX_T* ep0, + EPINX_T* ep1, + BOOL_T check, + coOrd* outPos, + ANGLE_T* outAngle) +{ + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); wIndex_t segInx0, segInx, segCnt; - EPINX_T segEP, epCnt, ep2=0, epN; + EPINX_T segEP, epCnt, ep2 = 0, epN; PATHPTR_T pp, pp1, pp2; unsigned char c; - char * cp; + char* cp; int negCnt, posCnt, pathCnt, dir; segProcData_t segProcDataSplit; segProcData_t segProcDataNewTrack; - track_p trk2=NULL; + track_p trk2 = NULL; static dynArr_t segIndexMap_da; #define segIndexMap(N) DYNARR_N( int, segIndexMap_da, N ) static dynArr_t newPath_da; @@ -1064,9 +2944,9 @@ EXPORT BOOL_T SplitTurnoutCheck( int s0, s1; trkSeg_t newSeg; - if ( (MyGetKeyState()&WKEY_SHIFT) == 0 ) { + if ((MyGetKeyState() & WKEY_SHIFT) == 0) { if (!check) - ErrorMessage( MSG_CANT_SPLIT_TRK, _("Turnout") ); + ErrorMessage(MSG_CANT_SPLIT_TRK, _("Turnout")); return FALSE; } @@ -1074,62 +2954,62 @@ EXPORT BOOL_T SplitTurnoutCheck( * 1. Find segment on path that ends at 'ep' */ epCnt = GetTrkEndPtCnt(trk); - epPos = GetTrkEndPos( trk, ep ); - for ( segCnt=0; segCnt<xx->segCnt && IsSegTrack(&xx->segs[segCnt]); segCnt++ ); - Rotate( &pos, xx->orig, -xx->angle ); + epPos = GetTrkEndPos(trk, ep); + for (segCnt = 0; segCnt < xx->segCnt && IsSegTrack(&xx->segs[segCnt]); segCnt++); + Rotate(&pos, xx->orig, -xx->angle); pos.x -= xx->orig.x; pos.y -= xx->orig.y; - Rotate( &epPos, xx->orig, -xx->angle ); + Rotate(&epPos, xx->orig, -xx->angle); epPos.x -= xx->orig.x; epPos.y -= xx->orig.y; splitTurnoutPath = NULL; - pp = xx->paths; - LOG( log_splitturnout, 1, ( "SplitTurnoutCheck T%d POS[%0.3f %0.3f] EP:%d CHK:%d EPPOS[%0.3f %0.3f]\n", trk?trk->index:0, pos.x, pos.y, ep, check, epPos.x, epPos.y ) ); - while ( pp[0] ) { - pp += strlen((char *)pp)+1; - while ( pp[0] ) { - SplitTurnoutCheckEndPt( pp, 1, xx->segs, epPos, pos ); - if ( splitTurnoutPath != NULL ) + pp = GetPaths(trk); + LOG(log_splitturnout, 1, ("SplitTurnoutCheck T%d POS[%0.3f %0.3f] EP:%d CHK:%d EPPOS[%0.3f %0.3f]\n", trk ? trk->index : 0, pos.x, pos.y, ep, check, epPos.x, epPos.y)); + while (pp[0]) { + pp += strlen((char*)pp) + 1; + while (pp[0]) { + SplitTurnoutCheckEndPt(pp, 1, xx->segs, epPos, pos); + if (splitTurnoutPath != NULL) goto foundSeg; - while ( pp[0] ) + while (pp[0]) pp++; - SplitTurnoutCheckEndPt( pp-1, -1, xx->segs, epPos, pos ); - if ( splitTurnoutPath != NULL ) + SplitTurnoutCheckEndPt(pp - 1, -1, xx->segs, epPos, pos); + if (splitTurnoutPath != NULL) goto foundSeg; pp++; } pp++; } if (!check) - ErrorMessage( _("splitTurnout: can't find segment") ); + ErrorMessage(_("splitTurnout: can't find segment")); return FALSE; foundSeg: /* * 2a. Check that all other paths thru found segment are the same */ - GetSegInxEP( splitTurnoutPath[0], &segInx0, &segEP ); - LOG( log_splitturnout, 1, (" Found Seg: %d SEG:%d EP:%d\n", *splitTurnoutPath, segInx0, segEP ) ); - pp = xx->paths; + GetSegInxEP(splitTurnoutPath[0], &segInx0, &segEP); + LOG(log_splitturnout, 1, (" Found Seg: %d SEG:%d EP:%d\n", *splitTurnoutPath, segInx0, segEP)); + pp = GetPaths(trk); pathCnt = 0; - while ( pp[0] ) { - pp += strlen((char *)pp)+1; - while ( pp[0] ) { - while ( pp[0] ) { - GetSegInxEP( pp[0], &segInx, &segEP ); - if ( segInx == segInx0 ) { + while (pp[0]) { + pp += strlen((char*)pp) + 1; + while (pp[0]) { + while (pp[0]) { + GetSegInxEP(pp[0], &segInx, &segEP); + if (segInx == segInx0) { pp1 = splitTurnoutPath; pp2 = pp; - dir = (pp2[0]>0?1:-1) * splitTurnoutDir; - while ( pp1[0] && pp2[0] ) { - if ( splitTurnoutDir * pp1[0] != dir * pp2[0] ) + dir = (pp2[0] > 0 ? 1 : -1) * splitTurnoutDir; + while (pp1[0] && pp2[0]) { + if (splitTurnoutDir * pp1[0] != dir * pp2[0]) break; pp1 += splitTurnoutDir; pp2 += dir; } - if ( pp1[0]!='\0' || pp2[0]!='\0' ) { + if (pp1[0] != '\0' || pp2[0] != '\0') { if (!check) - ErrorMessage( MSG_SPLIT_POS_BTW_MERGEPTS ); + ErrorMessage(MSG_SPLIT_POS_BTW_MERGEPTS); return FALSE; } } @@ -1143,20 +3023,20 @@ foundSeg: /* * 2b. Check that all paths from ep pass thru segInx0 */ - if ( !SplitTurnoutCheckEP( segInx0, epPos, splitTurnoutRoot, -splitTurnoutDir, xx->paths, xx->segs ) ) { + if (!SplitTurnoutCheckEP(segInx0, epPos, splitTurnoutRoot, -splitTurnoutDir, GetPaths(trk), xx->segs)) { if (!check) - ErrorMessage( MSG_SPLIT_PATH_NOT_UNIQUE ); + ErrorMessage(MSG_SPLIT_PATH_NOT_UNIQUE); return FALSE; } if (check) { segProcDataSplit.getAngle.pos = pos; - SegProc( SEGPROC_GETANGLE, xx->segs+segInx0, &segProcDataSplit ); - *outAngle = NormalizeAngle(segProcDataSplit.getAngle.angle+xx->angle); + SegProc(SEGPROC_GETANGLE, xx->segs + segInx0, &segProcDataSplit); + *outAngle = NormalizeAngle(segProcDataSplit.getAngle.angle + xx->angle); *outPos = segProcDataSplit.getAngle.pos; (*outPos).x += xx->orig.x; (*outPos).y += xx->orig.y; - Rotate( outPos, xx->orig, xx->angle ); + Rotate(outPos, xx->orig, xx->angle); return TRUE; } @@ -1165,53 +3045,56 @@ foundSeg: */ segProcDataSplit.split.pos = pos; s0 = (splitTurnoutPath[0] > 0) != (splitTurnoutDir > 0); - s1 = 1-s0; - SegProc( SEGPROC_SPLIT, xx->segs+segInx0, &segProcDataSplit ); - if ( segProcDataSplit.split.length[s1] <= minLength ) { - if ( splitTurnoutPath[splitTurnoutDir] == '\0' ) + s1 = 1 - s0; + SegProc(SEGPROC_SPLIT, xx->segs + segInx0, &segProcDataSplit); + if (segProcDataSplit.split.length[s1] <= minLength) { + if (splitTurnoutPath[splitTurnoutDir] == '\0') return FALSE; segProcDataSplit.split.length[s0] += segProcDataSplit.split.length[s1]; segProcDataSplit.split.length[s1] = 0; segProcDataSplit.split.newSeg[s0] = xx->segs[segInx0]; - epPos = GetSegEndPt( &segProcDataSplit.split.newSeg[s0], s1, FALSE, &epAngle ); - } else if ( segProcDataSplit.split.length[s0] <= minLength ) { + epPos = GetSegEndPt(&segProcDataSplit.split.newSeg[s0], s1, FALSE, &epAngle); + } + else if (segProcDataSplit.split.length[s0] <= minLength) { segProcDataSplit.split.length[s1] += segProcDataSplit.split.length[s0]; segProcDataSplit.split.length[s0] = 0; segProcDataSplit.split.newSeg[s1] = xx->segs[segInx0]; - epPos = GetSegEndPt( &segProcDataSplit.split.newSeg[s1], s0, FALSE, &epAngle ); + epPos = GetSegEndPt(&segProcDataSplit.split.newSeg[s1], s0, FALSE, &epAngle); epAngle += 180.0; - } else { - epPos = GetSegEndPt( &segProcDataSplit.split.newSeg[s1], s0, FALSE, &epAngle ); + } + else { + epPos = GetSegEndPt(&segProcDataSplit.split.newSeg[s1], s0, FALSE, &epAngle); epAngle += 180.0; } /* * 4. Map the old segments to new */ - DYNARR_SET( int, segIndexMap_da, xx->segCnt ); - for ( segInx=0; segInx<xx->segCnt; segInx++ ) - segIndexMap(segInx) = segInx+1; + DYNARR_SET(int, segIndexMap_da, xx->segCnt); + for (segInx = 0; segInx < xx->segCnt; segInx++) + segIndexMap(segInx) = segInx + 1; pp = splitTurnoutPath; - if ( segProcDataSplit.split.length[s0] > minLength ) + if (segProcDataSplit.split.length[s0] > minLength) pp += splitTurnoutDir; negCnt = 0; - while ( *pp ) { - GetSegInxEP( *pp, &segInx, &segEP ); - segIndexMap(segInx) = - segIndexMap(segInx); + while (*pp) { + GetSegInxEP(*pp, &segInx, &segEP); + segIndexMap(segInx) = -segIndexMap(segInx); negCnt++; pp += splitTurnoutDir; } - for ( segInx=posCnt=0; segInx<xx->segCnt; segInx++ ) { - if ( segIndexMap(segInx) > 0 ) + for (segInx = posCnt = 0; segInx < xx->segCnt; segInx++) { + if (segIndexMap(segInx) > 0) segIndexMap(segInx) = ++posCnt; } - DYNARR_SET( trkSeg_t, tempSegs_da, posCnt ); - for ( segInx=posCnt=0; segInx<xx->segCnt; segInx++ ) { - if ( segIndexMap(segInx) > 0 ) { - if ( segInx == segInx0 ) { - tempSegs(segIndexMap(segInx)-1) = segProcDataSplit.split.newSeg[s0]; - } else { - tempSegs(segIndexMap(segInx)-1) = xx->segs[segInx]; + DYNARR_SET(trkSeg_t, tempSegs_da, posCnt); + for (segInx = posCnt = 0; segInx < xx->segCnt; segInx++) { + if (segIndexMap(segInx) > 0) { + if (segInx == segInx0) { + tempSegs(segIndexMap(segInx) - 1) = segProcDataSplit.split.newSeg[s0]; + } + else { + tempSegs(segIndexMap(segInx) - 1) = xx->segs[segInx]; } posCnt++; } @@ -1220,19 +3103,19 @@ foundSeg: /* * 5. Remap paths by removing trailing segments */ - DYNARR_SET( char, newPath_da, xx->pathLen ); - pp = xx->paths; + pp = GetPaths(trk); + DYNARR_SET(char, newPath_da, GetPathsLength(pp)); pp1 = (PATHPTR_T)&newPath(0); - while ( *pp ) { - strcpy( (char *)pp1, (char *)pp ); - pp += strlen( (char *)pp )+1; - pp1 += strlen( (char *)pp1 )+1; - while ( *pp ) { - while ( *pp ) { - GetSegInxEP( *pp, &segInx, &segEP ); - if ( segIndexMap(segInx) > 0 ) { + while (*pp) { + strcpy((char*)pp1, (char*)pp); + pp += strlen((char*)pp) + 1; + pp1 += strlen((char*)pp1) + 1; + while (*pp) { + while (*pp) { + GetSegInxEP(*pp, &segInx, &segEP); + if (segIndexMap(segInx) > 0) { c = segIndexMap(segInx); - if ( *pp<0 ) + if (*pp < 0) c = -c; *pp1++ = c; } @@ -1249,23 +3132,25 @@ foundSeg: /* * 6. Reorigin segments */ - GetSegBounds( zero, 0, tempSegs_da.cnt, &tempSegs(0), &orig, &size ); + GetSegBounds(zero, 0, tempSegs_da.cnt, &tempSegs(0), &orig, &size); orig.x = -orig.x; orig.y = -orig.y; - MoveSegs( tempSegs_da.cnt, &tempSegs(0), orig ); + MoveSegs(tempSegs_da.cnt, &tempSegs(0), orig); epPos.x += orig.x; epPos.y += orig.y; - cp = strchr( xx->title, '\t' ); - if ( cp ) { - if ( strncmp( cp+1, "Split ", 6 ) != 0 ) { - memcpy( message, xx->title, cp-xx->title+1 ); - strcpy( message+(cp-xx->title+1), "Split " ); - strcat( message, cp+1 ); - } else { - strcpy( message, xx->title ); + cp = strchr(xx->title, '\t'); + if (cp) { + if (strncmp(cp + 1, "Split ", 6) != 0) { + memcpy(message, xx->title, cp - xx->title + 1); + strcpy(message + (cp - xx->title + 1), "Split "); + strcat(message, cp + 1); + } + else { + strcpy(message, xx->title); } - } else { - sprintf( message, "Split %s", xx->title ); + } + else { + sprintf(message, "Split %s", xx->title); } /* @@ -1273,28 +3158,30 @@ foundSeg: */ int trks = 0; path = splitTurnoutPath; - if ( segProcDataSplit.split.length[s1] < minLength ) + if (segProcDataSplit.split.length[s1] < minLength) path += splitTurnoutDir; - while ( path[0] ) { - GetSegInxEP( path[0], &segInx, &segEP ); + while (path[0]) { + GetSegInxEP(path[0], &segInx, &segEP); s0 = (path[0] > 0) != (splitTurnoutDir > 0); - if ( segInx0 != segInx ) { + if (segInx0 != segInx) { newSeg = xx->segs[segInx]; - } else { + } + else { newSeg = segProcDataSplit.split.newSeg[s1]; } - MoveSegs( 1, &newSeg, xx->orig ); - RotateSegs( 1, &newSeg, xx->orig, xx->angle ); - SegProc( SEGPROC_NEWTRACK, &newSeg, &segProcDataNewTrack ); - if ( *leftover == NULL ) { + MoveSegs(1, &newSeg, xx->orig); + RotateSegs(1, &newSeg, xx->orig, xx->angle); + SegProc(SEGPROC_NEWTRACK, &newSeg, &segProcDataNewTrack); + if (*leftover == NULL) { *ep0 = segProcDataNewTrack.newTrack.ep[s0]; *leftover = trk2 = segProcDataNewTrack.newTrack.trk; - ep2 = 1-*ep0; - } else { + ep2 = 1 - *ep0; + } + else { epN = segProcDataNewTrack.newTrack.ep[s0]; - ConnectTracks( trk2, ep2, segProcDataNewTrack.newTrack.trk, epN ); + ConnectTracks(trk2, ep2, segProcDataNewTrack.newTrack.trk, epN); trk2 = segProcDataNewTrack.newTrack.trk; - ep2 = 1-epN; + ep2 = 1 - epN; } ++trks; path += splitTurnoutDir; @@ -1304,40 +3191,39 @@ foundSeg: * 8. Replace segments, paths, and endPt in original turnout */ xx->split = TRUE; - Rotate( &orig, zero, xx->angle ); + Rotate(&orig, zero, xx->angle); xx->orig.x -= orig.x; xx->orig.y -= orig.y; xx->segCnt = tempSegs_da.cnt; - xx->segs = (trkSeg_p)memdup( &tempSegs(0), tempSegs_da.cnt * sizeof tempSegs(0) ); - CloneFilledDraw( xx->segCnt, xx->segs, TRUE ); - xx->pathLen = pp1-(PATHPTR_T)&newPath(0); - xx->pathCurr = xx->paths = memdup( &newPath(0), xx->pathLen ); - epAngle = NormalizeAngle( xx->angle+epAngle ); + xx->segs = (trkSeg_p)memdup(&tempSegs(0), tempSegs_da.cnt * sizeof tempSegs(0)); + CloneFilledDraw(xx->segCnt, xx->segs, TRUE); + SetPaths(trk, (PATHPTR_T)&newPath(0)); + epAngle = NormalizeAngle(xx->angle + epAngle); epPos.x += xx->orig.x; epPos.y += xx->orig.y; - Rotate( &epPos, xx->orig, xx->angle ); - SetTrkEndPoint( trk, ep, epPos, epAngle ); - ComputeCompoundBoundingBox( trk ); + Rotate(&epPos, xx->orig, xx->angle); + SetTrkEndPoint(trk, ep, epPos, epAngle); + ComputeCompoundBoundingBox(trk); return TRUE; } static BOOL_T SplitTurnout( - track_p trk, - coOrd pos, - EPINX_T ep, - track_p *leftover, - EPINX_T * ep0, - EPINX_T * ep1 ) + track_p trk, + coOrd pos, + EPINX_T ep, + track_p* leftover, + EPINX_T* ep0, + EPINX_T* ep1) { - return SplitTurnoutCheck(trk,pos,ep,leftover,ep0,ep1,FALSE,NULL,NULL); + return SplitTurnoutCheck(trk, pos, ep, leftover, ep0, ep1, FALSE, NULL, NULL); } static BOOL_T CheckTraverseTurnout( - track_p trk, - coOrd pos ) + track_p trk, + coOrd pos) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); coOrd pos1; #ifdef LATER int inx, foundInx = 0; @@ -1348,65 +3234,67 @@ static BOOL_T CheckTraverseTurnout( int segInx; EPINX_T segEP; -LOG( log_traverseTurnout, 1, ( "CheckTraverseTurnout( T%d, [%0.3f %0.3f])\n", GetTrkIndex(trk), pos.x, pos.y ) ) - Rotate( &pos, xx->orig, -xx->angle ); + LOG(log_traverseTurnout, 1, ("CheckTraverseTurnout( T%d, [%0.3f %0.3f])\n", GetTrkIndex(trk), pos.x, pos.y)) + Rotate(&pos, xx->orig, -xx->angle); pos.x -= xx->orig.x; pos.y -= xx->orig.y; -LOG( log_traverseTurnout, 1, ( "After rotation = [%0.3f %0.3f])\n", pos.x, pos.y ) ) - + LOG(log_traverseTurnout, 1, ("After rotation = [%0.3f %0.3f])\n", pos.x, pos.y)) + #ifdef LATER - for ( inx=0; inx<xx->segCnt; inx++ ) { - switch ( xx->segs[inx].type ) { - case SEG_STRTRK: - case SEG_CRVTRK: - pos1 = GetSegEndPt( &xx->segs[inx], 0, FALSE, NULL ); - d = FindDistance( pos, pos1 ); - if ( foundInx == 0 || d < foundD ) { - foundInx = inx+1; - foundD = d; - } - pos1 = GetSegEndPt( &xx->segs[inx], 1, FALSE, NULL ); - d = FindDistance( pos, pos1 ); - if ( foundInx == 0 || d < foundD ) { - foundInx = -(inx+1); - foundD = d; + for (inx = 0; inx < xx->segCnt; inx++) { + switch (xx->segs[inx].type) { + case SEG_STRTRK: + case SEG_CRVTRK: + pos1 = GetSegEndPt(&xx->segs[inx], 0, FALSE, NULL); + d = FindDistance(pos, pos1); + if (foundInx == 0 || d < foundD) { + foundInx = inx + 1; + foundD = d; + } + pos1 = GetSegEndPt(&xx->segs[inx], 1, FALSE, NULL); + d = FindDistance(pos, pos1); + if (foundInx == 0 || d < foundD) { + foundInx = -(inx + 1); + foundD = d; + } + break; } - break; } - } - if ( foundInx == 0 ) + if (foundInx == 0) return FALSE; #endif - for ( pathCurr = xx->pathCurr+strlen((char*)xx->pathCurr)+1; pathCurr[0] || pathCurr[1]; pathCurr++ ) { -LOG( log_traverseTurnout, 1, ( "P[%d] = %d ", pathCurr-xx->paths, pathCurr[0] ) ) - if ( pathCurr[-1] == 0 ) { - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - pos1 = GetSegEndPt( &xx->segs[segInx], segEP, FALSE, NULL ); - d = FindDistance( pos, pos1 ); -LOG( log_traverseTurnout, 1, ( "d=%0.3f\n", d ) ) - if ( d < connectDistance ) - return TRUE; - } - if ( pathCurr[1] == 0 ) { - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - pos1 = GetSegEndPt( &xx->segs[segInx], 1-segEP, FALSE, NULL ); - d = FindDistance( pos, pos1 ); -LOG( log_traverseTurnout, 1, ( "d=%0.3f\n", d ) ) - if ( d < connectDistance ) - return TRUE; - } - } -LOG( log_traverseTurnout, 1, ( " not found\n" ) ) - return FALSE; + PATHPTR_T pathName = GetCurrPath(trk); + for (pathCurr = pathName + strlen((char*)pathName) + 1; + pathCurr[0] || pathCurr[1]; pathCurr++) { + LOG(log_traverseTurnout, 1, ("P[%d] = %d ", pathCurr - GetPaths(trk), pathCurr[0])) + if (pathCurr[-1] == 0) { + GetSegInxEP(pathCurr[0], &segInx, &segEP); + pos1 = GetSegEndPt(&xx->segs[segInx], segEP, FALSE, NULL); + d = FindDistance(pos, pos1); + LOG(log_traverseTurnout, 1, ("d=%0.3f\n", d)) + if (d < connectDistance) + return TRUE; + } + if (pathCurr[1] == 0) { + GetSegInxEP(pathCurr[0], &segInx, &segEP); + pos1 = GetSegEndPt(&xx->segs[segInx], 1 - segEP, FALSE, NULL); + d = FindDistance(pos, pos1); + LOG(log_traverseTurnout, 1, ("d=%0.3f\n", d)) + if (d < connectDistance) + return TRUE; + } + } + LOG(log_traverseTurnout, 1, (" not found\n")) + return FALSE; } static BOOL_T TraverseTurnout( - traverseTrack_p trvTrk, - DIST_T * distR ) + traverseTrack_p trvTrk, + DIST_T* distR) { track_p trk = trvTrk->trk; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); coOrd pos0, pos1, pos2; DIST_T d, dist; PATHPTR_T path, pathCurr; @@ -1416,37 +3304,38 @@ static BOOL_T TraverseTurnout( EPINX_T segEP; segProcData_t segProcData; - d = 10000; + d = DIST_INF; pos0 = trvTrk->pos; - Rotate( &pos0, xx->orig, -xx->angle ); + Rotate(&pos0, xx->orig, -xx->angle); pos0.x -= xx->orig.x; pos0.y -= xx->orig.y; dist = *distR; -LOG( log_traverseTurnout, 1, ( "TraverseTurnout( T%d, [%0.3f %0.3f] [%0.3f %0.3f], A%0.3f, D%0.3f\n", GetTrkIndex(trk), trvTrk->pos.x, trvTrk->pos.y, pos0.x, pos0.y, trvTrk->angle, *distR ) ) - pathCurr = 0; - for ( path = xx->pathCurr+strlen((char*)xx->pathCurr)+1; path[0] || path[1]; path++ ) { - if ( path[0] == 0 ) + LOG(log_traverseTurnout, 1, ("TraverseTurnout( T%d, [%0.3f %0.3f] [%0.3f %0.3f], A%0.3f, D%0.3f\n", GetTrkIndex(trk), trvTrk->pos.x, trvTrk->pos.y, pos0.x, pos0.y, trvTrk->angle, *distR)) + pathCurr = 0; + path = GetCurrPath(trk); + for (path += strlen((char*)path) + 1; path[0] || path[1]; path++) { + if (path[0] == 0) continue; - GetSegInxEP( path[0], &segInx, &segEP ); - segPtr = xx->segs+segInx; + GetSegInxEP(path[0], &segInx, &segEP); + segPtr = xx->segs + segInx; segProcData.distance.pos1 = pos0; - SegProc( SEGPROC_DISTANCE, segPtr, &segProcData ); - if ( segProcData.distance.dd < d ) { + SegProc(SEGPROC_DISTANCE, segPtr, &segProcData); + if (segProcData.distance.dd < d) { d = segProcData.distance.dd; pos2 = segProcData.distance.pos1; pathCurr = path; } } - if ( d > 10 || pathCurr == 0 ) { - ErrorMessage( "traverseTurnout: Not near: %0.3f", d ); + if (d > 10 || pathCurr == 0) { + ErrorMessage("traverseTurnout: Not near: %0.3f", d); return FALSE; } -LOG( log_traverseTurnout, 1, ( " PC=%d ", pathCurr[0] ) ) - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - segPtr = xx->segs+segInx; + LOG(log_traverseTurnout, 1, (" PC=%d ", pathCurr[0])) + GetSegInxEP(pathCurr[0], &segInx, &segEP); + segPtr = xx->segs + segInx; segProcData.traverse1.pos = pos2; - segProcData.traverse1.angle = -xx->angle+trvTrk->angle; - SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); + segProcData.traverse1.angle = -xx->angle + trvTrk->angle; + SegProc(SEGPROC_TRAVERSE1, segPtr, &segProcData); dist += segProcData.traverse1.dist; //Get ready for Traverse2 - copy all Traverse1 first BOOL_T backwards = segProcData.traverse1.backwards; @@ -1461,111 +3350,112 @@ LOG( log_traverseTurnout, 1, ( " PC=%d ", pathCurr[0] ) ) BOOL_T turnout_backwards = backwards; if (segEP) turnout_backwards = !turnout_backwards; //direction modified if path reversed -LOG( log_traverseTurnout, 2, ( " SI%d TB%d SP%d B%d SB%d N%d BSI%d D%0.3f\n", segInx, turnout_backwards, segEP, backwards, segs_backwards, neg, BezSegInx, dist ) ) - while ( *pathCurr ) { - //Set up Traverse2 - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - segPtr = xx->segs+segInx; - segProcData.traverse2.segDir = backwards; - segProcData.traverse2.dist = dist; - segProcData.traverse2.BezSegInx = BezSegInx; - segProcData.traverse2.segs_backwards = segs_backwards; - SegProc( SEGPROC_TRAVERSE2, segPtr, &segProcData ); - if ( segProcData.traverse2.dist <= 0 ) { - *distR = 0; - REORIGIN( trvTrk->pos, segProcData.traverse2.pos, xx->angle, xx->orig ); - trvTrk->angle = NormalizeAngle( xx->angle+segProcData.traverse2.angle ); -LOG( log_traverseTurnout, 2, ( " -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR )) - return TRUE; + LOG(log_traverseTurnout, 2, (" SI%d TB%d SP%d B%d SB%d N%d BSI%d D%0.3f\n", segInx, turnout_backwards, segEP, backwards, segs_backwards, neg, BezSegInx, dist)) + while (*pathCurr) { + //Set up Traverse2 + GetSegInxEP(pathCurr[0], &segInx, &segEP); + segPtr = xx->segs + segInx; + segProcData.traverse2.segDir = backwards; + segProcData.traverse2.dist = dist; + segProcData.traverse2.BezSegInx = BezSegInx; + segProcData.traverse2.segs_backwards = segs_backwards; + SegProc(SEGPROC_TRAVERSE2, segPtr, &segProcData); + if (segProcData.traverse2.dist <= 0) { + *distR = 0; + REORIGIN(trvTrk->pos, segProcData.traverse2.pos, xx->angle, xx->orig); + trvTrk->angle = NormalizeAngle(xx->angle + segProcData.traverse2.angle); + LOG(log_traverseTurnout, 2, (" -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR)) + return TRUE; + } + dist = segProcData.traverse2.dist; //Remainder after segment + pathCurr += (turnout_backwards ? -1 : 1); //Use master direction for turnout + //Redrive Traverse 1 for each segment for Bezier - to pick up backwards elements + if (pathCurr[0] == '\0') continue; // + //Set up Traverse1 - copy all of Traverse2 values first + GetSegInxEP(pathCurr[0], &segInx, &segEP); + segPtr = xx->segs + segInx; + ANGLE_T angle = segProcData.traverse2.angle; + coOrd pos = segProcData.traverse2.pos; + LOG(log_traverseTurnout, 1, (" Loop2-1 SI%d SP%d [%0.3f %0.3f] A%0.3f D%0.3f\n", segInx, segEP, pos.x, pos.y, angle, dist)) + segProcData.traverse1.pos = pos; + segProcData.traverse1.angle = angle; + SegProc(SEGPROC_TRAVERSE1, segPtr, &segProcData); + // dist += segProcData.traverse1.dist; //Add distance from end to pos (could be zero or whole length if backwards) + backwards = segProcData.traverse1.backwards; + segs_backwards = segProcData.traverse1.segs_backwards; + neg = segProcData.traverse1.negative; + BezSegInx = segProcData.traverse1.BezSegInx; + LOG(log_traverseTurnout, 1, (" Loop1-2 B%d SB%d N%d BSI%d D%0.3f\n", backwards, segs_backwards, neg, BezSegInx, dist)) } - dist = segProcData.traverse2.dist; //Remainder after segment - pathCurr += (turnout_backwards?-1:1); //Use master direction for turnout - //Redrive Traverse 1 for each segment for Bezier - to pick up backwards elements - if (pathCurr[0] == '\0') continue; // - //Set up Traverse1 - copy all of Traverse2 values first - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - segPtr = xx->segs+segInx; - ANGLE_T angle = segProcData.traverse2.angle; - coOrd pos = segProcData.traverse2.pos; -LOG( log_traverseTurnout, 1, ( " Loop2-1 SI%d SP%d [%0.3f %0.3f] A%0.3f D%0.3f\n", segInx, segEP, pos.x, pos.y, angle, dist ) ) - segProcData.traverse1.pos = pos; - segProcData.traverse1.angle = angle; - SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); - // dist += segProcData.traverse1.dist; //Add distance from end to pos (could be zero or whole length if backwards) - backwards = segProcData.traverse1.backwards; - segs_backwards = segProcData.traverse1.segs_backwards; - neg = segProcData.traverse1.negative; - BezSegInx = segProcData.traverse1.BezSegInx; -LOG( log_traverseTurnout, 1, ( " Loop1-2 B%d SB%d N%d BSI%d D%0.3f\n", backwards, segs_backwards, neg, BezSegInx, dist ) ) - } - - pathCurr += (turnout_backwards?1:-1); - pos1 = MapPathPos( xx, pathCurr[0], (turnout_backwards?0:1) ); + + pathCurr += (turnout_backwards ? 1 : -1); + pos1 = MapPathPos(xx, pathCurr[0], (turnout_backwards ? 0 : 1)); *distR = dist; epCnt = GetTrkEndPtCnt(trk); ep = 0; - dist = FindDistance( pos1, GetTrkEndPos(trk,0) ); - for ( ep2=1; ep2<epCnt; ep2++ ) { - d = FindDistance( pos1, GetTrkEndPos(trk,ep2) ); - if ( d < dist ) { + dist = FindDistance(pos1, GetTrkEndPos(trk, 0)); + for (ep2 = 1; ep2 < epCnt; ep2++) { + d = FindDistance(pos1, GetTrkEndPos(trk, ep2)); + if (d < dist) { dist = d; ep = ep2; } } - if ( dist > connectDistance ) { + if (dist > connectDistance) { trk = NULL; trvTrk->pos = pos1; - } else { - trvTrk->pos = GetTrkEndPos( trk, ep ); - trvTrk->angle = GetTrkEndAngle( trk, ep ); - trk = GetTrkEndTrk( trk, ep ); - } - dist = FindDistance( trvTrk->pos, pos1 ); -LOG( log_traverseTurnout, 1, ( " -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR ) ) - trvTrk->trk = trk; + } + else { + trvTrk->pos = GetTrkEndPos(trk, ep); + trvTrk->angle = GetTrkEndAngle(trk, ep); + trk = GetTrkEndTrk(trk, ep); + } + dist = FindDistance(trvTrk->pos, pos1); + LOG(log_traverseTurnout, 1, (" -> [%0.3f %0.3f] A%0.3f D%0.3f\n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR)) + trvTrk->trk = trk; return TRUE; } -static STATUS_T ModifyTurnout( track_p trk, wAction_t action, coOrd pos ) +static STATUS_T ModifyTurnout(track_p trk, wAction_t action, coOrd pos) { - struct extraData *xx; + struct extraDataCompound_t* xx; static EPINX_T ep; static wBool_t curved; DIST_T d; - xx = GetTrkExtraData(trk); - if ( xx->special == TOadjustable ) { - switch ( action ) { + xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + if (xx->special == TOadjustable) { + switch (action) { case C_START: ep = -1; curved = FALSE; return C_CONTINUE; case C_DOWN: - ep = PickUnconnectedEndPoint( pos, trk ); + ep = PickUnconnectedEndPoint(pos, trk); if (ep == -1) return C_ERROR; - UndrawNewTrack( trk ); + UndrawNewTrack(trk); tempSegs(0).type = SEG_STRTRK; tempSegs(0).width = 0; - tempSegs(0).u.l.pos[0] = GetTrkEndPos( trk, 1-ep ); + tempSegs(0).u.l.pos[0] = GetTrkEndPos(trk, 1 - ep); tempSegs_da.cnt = 1; - InfoMessage( _("Drag to change track length") ); + InfoMessage(_("Drag to change track length")); return C_CONTINUE; case C_MOVE: - d = FindDistance( tempSegs(0).u.l.pos[0], pos ); - if ( d < xx->u.adjustable.minD ) + d = FindDistance(tempSegs(0).u.l.pos[0], pos); + if (d < xx->u.adjustable.minD) d = xx->u.adjustable.minD; - else if ( d > xx->u.adjustable.maxD ) + else if (d > xx->u.adjustable.maxD) d = xx->u.adjustable.maxD; - Translate( &tempSegs(0).u.l.pos[1], tempSegs(0).u.l.pos[0], GetTrkEndAngle( trk, ep ), d ); + Translate(&tempSegs(0).u.l.pos[1], tempSegs(0).u.l.pos[0], GetTrkEndAngle(trk, ep), d); tempSegs_da.cnt = 1; if (action == C_MOVE) - InfoMessage( _("Length=%s"), FormatDistance( d ) ); + InfoMessage(_("Length=%s"), FormatDistance(d)); return C_CONTINUE; case C_UP: - d = FindDistance( tempSegs(0).u.l.pos[0],tempSegs(0).u.l.pos[1] ); - ChangeAdjustableEndPt( trk, ep, d ); + d = FindDistance(tempSegs(0).u.l.pos[0], tempSegs(0).u.l.pos[1]); + ChangeAdjustableEndPt(trk, ep, d); return C_TERMINATE; default: return C_CONTINUE; @@ -1576,141 +3466,130 @@ static STATUS_T ModifyTurnout( track_p trk, wAction_t action, coOrd pos ) } -static BOOL_T GetParamsTurnout( int inx, track_p trk, coOrd pos, trackParams_t * params ) +static BOOL_T GetParamsTurnout(int inx, track_p trk, coOrd pos, trackParams_t* params) { - struct extraData *xx; - xx = GetTrkExtraData(trk); + struct extraDataCompound_t* xx; + xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); params->type = curveTypeStraight; - if (inx == PARAMS_TURNOUT) { - params->len = 0.0; - int epCnt = GetTrkEndPtCnt(trk); - if (epCnt < 3) { - double d = 10000.0; - params->centroid = zero; - //calculate path length from endPt (either to end or to other end) - segProcData_t segProcData; - trkSeg_p seg; - int segInx; - int segEP; - trkSeg_p segPtr; - PATHPTR_T path,pathCurr; - //Find starting seg on path (nearest to end Pt) - for ( path = xx->pathCurr+strlen((char*)xx->pathCurr)+1; path[0] || path[1]; path++ ) { - if ( path[0] == 0 ) - continue; - GetSegInxEP( path[0], &segInx, &segEP ); - segPtr = xx->segs+segInx; - segProcData.distance.pos1 = pos; - SegProc( SEGPROC_DISTANCE, segPtr, &segProcData ); - if ( segProcData.distance.dd < d ) { - d = segProcData.distance.dd; - pathCurr = path; - } - } - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - seg = xx->segs+segInx; - d = 0.0; - //Loop through segs on path from endPt adding - while (pathCurr[0]) { - GetSegInxEP( pathCurr[0], &segInx, &segEP ); - seg = xx->segs+segInx; - SegProc(SEGPROC_LENGTH, seg, &segProcData ); - d += segProcData.length.length; - pathCurr += segEP?1:-1; - } - params->len = d; - } else { - double x, y; - x = 0; y = 0; - for (int i=0;i<epCnt; i++) { - coOrd cpos = GetTrkEndPos(trk,i); - x += cpos.x; - y += cpos.y; - } - params->centroid.x = x/epCnt; - params->centroid.y = y/epCnt; - params->len = FindDistance(params->centroid,pos)*2; //Times two because it will be halved by track.c - } - return TRUE; - } - if ((inx == PARAMS_CORNU) || (inx == PARAMS_EXTEND)) { + if (inx == PARAMS_TURNOUT) { + params->len = 0.0; + int epCnt = GetTrkEndPtCnt(trk); + if (epCnt < 3) { + double d = DIST_INF; + params->centroid = zero; + //calculate path length from endPt (either to end or to other end) + segProcData_t segProcData; + trkSeg_p seg; + int segInx; + int segEP; + trkSeg_p segPtr; + PATHPTR_T path, pathCurr; + //Find starting seg on path (nearest to end Pt) + path = GetCurrPath(trk); + pathCurr = path; + for (path += strlen((char*)path) + 1; path[0] || path[1]; path++) { + if (path[0] == 0) + continue; + GetSegInxEP(path[0], &segInx, &segEP); + segPtr = xx->segs + segInx; + segProcData.distance.pos1 = pos; + SegProc(SEGPROC_DISTANCE, segPtr, &segProcData); + if (segProcData.distance.dd < d) { + d = segProcData.distance.dd; + pathCurr = path; + } + } + GetSegInxEP(pathCurr[0], &segInx, &segEP); + seg = xx->segs + segInx; + d = 0.0; + //Loop through segs on path from endPt adding + while (pathCurr[0]) { + GetSegInxEP(pathCurr[0], &segInx, &segEP); + seg = xx->segs + segInx; + SegProc(SEGPROC_LENGTH, seg, &segProcData); + d += segProcData.length.length; + pathCurr += segEP ? 1 : -1; + } + params->len = d; + } + else { + // Centroid is middle of bounding box + params->centroid.x = (trk->lo.x + trk->hi.x) / 2.0; + params->centroid.y = (trk->lo.y + trk->hi.y) / 2.0; + params->len = FindDistance(params->centroid, pos) * 2; //Times two because it will be halved by track.c + } + return TRUE; + } + if ((inx == PARAMS_CORNU) || (inx == PARAMS_EXTEND)) { params->type = curveTypeStraight; params->arcR = 0.0; params->arcP = zero; - params->ep = PickEndPoint(pos, trk); + params->ep = PickEndPoint(pos, trk); params->circleOrHelix = FALSE; - if (params->ep>=0) { - params->angle = GetTrkEndAngle(trk,params->ep); - params->track_angle = params->angle + params->ep?0:180; - } else { - params->angle = params-> track_angle = 0; + if (params->ep >= 0) { + params->angle = GetTrkEndAngle(trk, params->ep); + params->track_angle = params->angle + params->ep ? 0 : 180; + } + else { + params->angle = params->track_angle = 0; return FALSE; } - /* Use end radii if we have them */ - //if (xx->special == TOcurved) { - // params->type = curveTypeCurve; - // params->arcR = fabs(DYNARR_N(DIST_T,xx->u.curved.radii,params->ep)); - // if (params->arcR != 0.0) - // Translate(¶ms->arcP,pos,params->track_angle-90.0,params->arcR); - // else - // params->type = curveTypeStraight; - // return TRUE; - //} /* Find the path we are closest to */ PATHPTR_T pathCurr = 0; int segInx, subSegInx; trkSeg_p segPtr; - double d = 10000; - struct extraData * xx = GetTrkExtraData(trk); + DIST_T d = DIST_INF; + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); /* Get parms from that seg */ - wBool_t back,negative; + wBool_t back, negative; coOrd segPos = pos; - Rotate(&segPos,xx->orig,-xx->angle); + Rotate(&segPos, xx->orig, -xx->angle); segPos.x -= xx->orig.x; segPos.y -= xx->orig.y; params->track_angle = GetAngleSegs( //Find correct subSegment - xx->segCnt,xx->segs, - &segPos, &segInx, &d , &back, &subSegInx, &negative ); - if (segInx ==- 1) return FALSE; - segPtr = xx->segs+segInx; + xx->segCnt, xx->segs, + &segPos, &segInx, &d, &back, &subSegInx, &negative); + if (segInx == -1) return FALSE; + segPtr = xx->segs + segInx; switch (segPtr->type) { - case SEG_BEZTRK: - if ( negative != back ) params->track_angle = NormalizeAngle(params->track_angle+180); //Bezier is in reverse - segPtr = xx->segs + segInx; - trkSeg_p subSegPtr = (trkSeg_p)segPtr->bezSegs.ptr+subSegInx; - if (subSegPtr->type == SEG_CRVTRK) { - params->type = curveTypeCurve; - params->arcR = fabs(subSegPtr->u.c.radius); - params->arcP = subSegPtr->u.c.center; - params->arcP.x += xx->orig.x; - params->arcP.y += xx->orig.y; - Rotate(¶ms->arcP,xx->orig,xx->angle); - params->arcA0 = subSegPtr->u.c.a0; - params->arcA1 = subSegPtr->u.c.a1; - } - return TRUE; - break; - case SEG_CRVTRK: + case SEG_BEZTRK: + if (negative != back) params->track_angle = NormalizeAngle(params->track_angle + 180); //Bezier is in reverse + segPtr = xx->segs + segInx; + trkSeg_p subSegPtr = (trkSeg_p)segPtr->bezSegs.ptr + subSegInx; + if (subSegPtr->type == SEG_CRVTRK) { params->type = curveTypeCurve; - params->arcR = fabs(segPtr->u.c.radius); - params->arcP = segPtr->u.c.center; + params->arcR = fabs(subSegPtr->u.c.radius); + params->arcP = subSegPtr->u.c.center; params->arcP.x += xx->orig.x; params->arcP.y += xx->orig.y; - Rotate(¶ms->arcP,xx->orig,xx->angle); - params->arcA0 = segPtr->u.c.a0; - params->arcA1 = segPtr->u.c.a1; - return TRUE; - break; - } - params->arcR = 0.0; + Rotate(¶ms->arcP, xx->orig, xx->angle); + params->arcA0 = subSegPtr->u.c.a0; + params->arcA1 = subSegPtr->u.c.a1; + } + return TRUE; + break; + case SEG_CRVTRK: + params->type = curveTypeCurve; + params->arcR = fabs(segPtr->u.c.radius); + params->arcP = segPtr->u.c.center; + params->arcP.x += xx->orig.x; + params->arcP.y += xx->orig.y; + Rotate(¶ms->arcP, xx->orig, xx->angle); + params->arcA0 = segPtr->u.c.a0; + params->arcA1 = segPtr->u.c.a1; + return TRUE; + break; + } + params->arcR = 0.0; params->arcP = zero; - params->ep = PickEndPoint(pos,trk); //Nearest - if (params->ep>=0) { - params->angle = GetTrkEndAngle(trk,params->ep); - params->track_angle = params->angle + params->ep?0:180; - } else { - params->angle = params-> track_angle = 0; + params->ep = PickEndPoint(pos, trk); //Nearest + if (params->ep >= 0) { + params->angle = GetTrkEndAngle(trk, params->ep); + params->track_angle = params->angle + params->ep ? 0 : 180; + } + else { + params->angle = params->track_angle = 0; return FALSE; } return TRUE; @@ -1718,49 +3597,49 @@ static BOOL_T GetParamsTurnout( int inx, track_p trk, coOrd pos, trackParams_t * if ((inx == PARAMS_1ST_JOIN) || (inx == PARAMS_2ND_JOIN)) params->ep = PickEndPoint(pos, trk); else - params->ep = PickUnconnectedEndPointSilent( pos, trk ); + params->ep = PickUnconnectedEndPointSilent(pos, trk); if (params->ep == -1) - return FALSE; - params->lineOrig = GetTrkEndPos(trk,params->ep); + return FALSE; + params->lineOrig = GetTrkEndPos(trk, params->ep); params->lineEnd = params->lineOrig; params->len = 0.0; - params->angle = GetTrkEndAngle(trk,params->ep); + params->angle = GetTrkEndAngle(trk, params->ep); params->arcR = 0.0; return TRUE; } -static BOOL_T MoveEndPtTurnout( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) +static BOOL_T MoveEndPtTurnout(track_p* trk, EPINX_T* ep, coOrd pos, DIST_T d0) { ANGLE_T angle0; DIST_T d; track_p trk1; - angle0 = GetTrkEndAngle(*trk,*ep); - d = FindDistance( GetTrkEndPos(*trk,*ep), pos); + angle0 = GetTrkEndAngle(*trk, *ep); + d = FindDistance(GetTrkEndPos(*trk, *ep), pos); if (d0 > 0.0) { d -= d0; if (d < 0.0) { - ErrorMessage( MSG_MOVED_BEFORE_END_TURNOUT ); + ErrorMessage(MSG_MOVED_BEFORE_END_TURNOUT); return FALSE; } - Translate( &pos, pos, angle0+180, d0 ); + Translate(&pos, pos, angle0 + 180, d0); } if (d > minLength) { - trk1 = NewStraightTrack( GetTrkEndPos(*trk,*ep), pos ); - CopyAttributes( *trk, trk1 ); - ConnectTracks( *trk, *ep, trk1, 0 ); + trk1 = NewStraightTrack(GetTrkEndPos(*trk, *ep), pos); + CopyAttributes(*trk, trk1); + ConnectTracks(*trk, *ep, trk1, 0); *trk = trk1; *ep = 1; - DrawNewTrack( *trk ); + DrawNewTrack(*trk); } return TRUE; } -static BOOL_T QueryTurnout( track_p trk, int query ) +static BOOL_T QueryTurnout(track_p trk, int query) { - switch ( query ) { + switch (query) { case Q_IGNORE_EASEMENT_ON_EXTEND: case Q_DRAWENDPTV_1: case Q_CAN_GROUP: @@ -1774,12 +3653,16 @@ static BOOL_T QueryTurnout( track_p trk, int query ) case Q_IS_TURNOUT: return TRUE; case Q_CAN_PARALLEL: - if( GetTrkEndPtCnt( trk ) == 2 && fabs( GetTrkEndAngle( trk, 0 ) - GetTrkEndAngle( trk, 1 )) == 180.0 ) + if (GetTrkEndPtCnt(trk) == 2 && fabs(GetTrkEndAngle(trk, 0) - GetTrkEndAngle(trk, 1)) == 180.0) return TRUE; else return FALSE; case Q_CAN_NEXT_POSITION: - return ( GetTrkEndPtCnt(trk) > 2 ); + { + PATHPTR_T path = GetPaths( trk ); // QueryTurnout + for ( path += strlen((char*)path) + 1; path[0] || path[1]; path++ ); + return ( path[2] != 0 ); + } case Q_CORNU_CAN_MODIFY: return FALSE; default: @@ -1789,54 +3672,70 @@ static BOOL_T QueryTurnout( track_p trk, int query ) EXPORT int doDrawTurnoutPosition = 1; -static wIndex_t drawTurnoutPositionWidth=3; +static wIndex_t drawTurnoutPositionWidth = 3; static void DrawTurnoutPositionIndicator( - track_p trk, - wDrawColor color ) + track_p trk, + wDrawColor color) { - struct extraData * xx = GetTrkExtraData(trk); - PATHPTR_T path = xx->pathCurr; - coOrd pos0, pos1; + struct extraDataCompound_t* xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + PATHPTR_T path, path1; + coOrd pos0 = zero, pos1; + trkSeg_p seg; + BOOL_T multiPart = FALSE; - if ( xx->pathCurr == xx->paths ) { - for ( path=xx->pathCurr+strlen((char *)xx->pathCurr); path[0] || path[1]; path++ ); - if ( path[2] == 0 ) - return; - } - for ( path=xx->pathCurr+strlen((char *)xx->pathCurr); path[0] || path[1]; path++ ) { - if ( path[0] == 0 ) { - pos0 = MapPathPos( xx, path[1], 0 ); - } else if ( path[1] == 0 ) { - pos1 = MapPathPos( xx, path[0], 1 ); - DrawLine( &tempD, pos0, pos1, drawTurnoutPositionWidth, color ); + // Only 1 path? Don't draw + if ( ! QueryTurnout( trk, Q_CAN_NEXT_POSITION ) ) + return; + + path = GetCurrPath(trk); + + //Is this a multi-part path? + path1 = path; + for (path1 += strlen((char*)path1) + 1; path1[0]; path1++); + if (path1[1] != 0) multiPart = TRUE; + + + for (path += strlen((char*)path); path[0] || path[1]; path++) { + + if (path[0] == 0) { + pos0 = MapPathPos(xx, path[1], 0); + if ((tempD.scale <= 10) || !multiPart) { + seg = MapPathSeg(xx, path[1]); + DrawSegsO(&tempD, trk, xx->orig, xx->angle, seg, 1, GetTrkGauge(trk), color, DTS_CENTERONLY); + } + } + else if (path[1] == 0) { + pos1 = MapPathPos(xx, path[0], 1); + if ((tempD.scale > 10) && multiPart) + DrawLine(&tempD, pos0, pos1, drawTurnoutPositionWidth, color); + else { + seg = MapPathSeg(xx, path[0]); + DrawSegsO(&tempD, trk, xx->orig, xx->angle, seg, 1, GetTrkGauge(trk), color, DTS_CENTERONLY); + } + } + else if ((tempD.scale <= 10) || !multiPart) { + seg = MapPathSeg(xx, path[0]); + DrawSegsO(&tempD, trk, xx->orig, xx->angle, seg, 1, GetTrkGauge(trk), color, DTS_CENTERONLY); } } } EXPORT void AdvanceTurnoutPositionIndicator( - track_p trk, - coOrd pos, - coOrd *posR, - ANGLE_T *angleR ) + track_p trk, + coOrd pos, + coOrd* posR, + ANGLE_T* angleR) { - struct extraData * xx = GetTrkExtraData(trk); - PATHPTR_T path; traverseTrack_t trvtrk; DIST_T dist; - if ( GetTrkType(trk) != T_TURNOUT ) - AbortProg( "nextTurnoutPosition" ); - - path = xx->pathCurr; - path += strlen((char *)path)+1; - while ( path[0] || path[1] ) - path++; - path += 2; - if ( *path == 0 ) - path = xx->paths; - xx->pathCurr = path; - if ( angleR == NULL || posR == NULL ) + if (GetTrkType(trk) != T_TURNOUT) + AbortProg("nextTurnoutPosition"); + + SetCurrPathIndex(trk, GetCurrPathIndex(trk) + 1); + InfoMessage(_("Turnout %d Path: %s"), GetTrkIndex(trk), GetCurrPath(trk)); + if (angleR == NULL || posR == NULL) return; trvtrk.trk = trk; trvtrk.length = 0; @@ -1844,17 +3743,17 @@ EXPORT void AdvanceTurnoutPositionIndicator( trvtrk.pos = *posR; trvtrk.angle = *angleR; dist = 0; - if ( !TraverseTurnout( &trvtrk, &dist ) ) + if (!TraverseTurnout(&trvtrk, &dist)) return; - if ( NormalizeAngle( trvtrk.angle-*angleR+90.0 ) > 180 ) - trvtrk.angle = NormalizeAngle( trvtrk.angle+180.0 ); + if (NormalizeAngle(trvtrk.angle - *angleR + 90.0) > 180) + trvtrk.angle = NormalizeAngle(trvtrk.angle + 180.0); *posR = trvtrk.pos; *angleR = trvtrk.angle; } /** * Create a parallel track for a turnout. - * + * * * \param trk IN existing track * \param pos IN ?? @@ -1866,60 +3765,56 @@ EXPORT void AdvanceTurnoutPositionIndicator( */ static BOOL_T MakeParallelTurnout( - track_p trk, - coOrd pos, - DIST_T sep, - DIST_T factor, - track_p * newTrk, - coOrd * p0R, - coOrd * p1R, - BOOL_T track) -{ - ANGLE_T angle = GetTrkEndAngle(trk,1); - struct extraData *xx, *yy; - coOrd *endPts; + track_p trk, + coOrd pos, + DIST_T sep, + DIST_T factor, + track_p* newTrk, + coOrd* p0R, + coOrd* p1R, + BOOL_T track) +{ + ANGLE_T angle = GetTrkEndAngle(trk, 1); + struct extraDataCompound_t* xx, * yy; + coOrd* endPts; trkEndPt_p endPt; int i; int option; DIST_T d; - if ( NormalizeAngle( FindAngle( GetTrkEndPos(trk,0), pos ) - GetTrkEndAngle(trk,1) ) < 180.0 ) + if (NormalizeAngle(FindAngle(GetTrkEndPos(trk, 0), pos) - GetTrkEndAngle(trk, 1)) < 180.0) angle += 90; else - angle -= 90; + angle -= 90; /* * get all endpoints of current piece and translate them for the new piece */ - endPts = MyMalloc( GetTrkEndPtCnt( trk ) * sizeof( coOrd )); - for( i = 0; i < GetTrkEndPtCnt( trk ); i++) { - Translate( &(endPts[ i ]), GetTrkEndPos( trk, i ), angle, sep ); + endPts = MyMalloc(GetTrkEndPtCnt(trk) * sizeof(coOrd)); + for (i = 0; i < GetTrkEndPtCnt(trk); i++) { + Translate(&(endPts[i]), GetTrkEndPos(trk, i), angle, sep); } /* - * get information about the current piece and copy data + * get information about the current piece and copy data */ - if( newTrk ) { + if (newTrk) { if (track) { - endPt = MyMalloc( GetTrkEndPtCnt( trk ) * sizeof( trkEndPt_t )); - endPt[ 0 ].pos = endPts[ 0 ]; - endPt[ 0 ].angle = GetTrkEndAngle( trk, 0 ); - endPt[ 1 ].pos = endPts[ 1 ]; - endPt[ 1 ].angle = GetTrkEndAngle( trk, 1 ); - - yy = GetTrkExtraData(trk); - - DIST_T * radii = NULL; - if (yy->special == TOcurved) { - radii = MyMalloc(GetTrkEndPtCnt(trk) * sizeof(DIST_T)); - for (int i=0;i<GetTrkEndPtCnt( trk );i++) { - radii[i] = DYNARR_N(DIST_T,yy->u.curved.radii,i); - } - } + endPt = MyMalloc(GetTrkEndPtCnt(trk) * sizeof(trkEndPt_t)); + endPt[0].pos = endPts[0]; + endPt[0].angle = GetTrkEndAngle(trk, 0); + endPt[1].pos = endPts[1]; + endPt[1].angle = GetTrkEndAngle(trk, 1); - *newTrk = NewCompound( T_TURNOUT, 0, endPt[ 0 ].pos, endPt[ 0 ].angle + 90.0, yy->title, 2, endPt, radii, yy->pathLen, (char *)yy->paths, yy->segCnt, yy->segs ); - xx = GetTrkExtraData(*newTrk); + yy = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + + + PATHPTR_T paths = GetPaths(trk); // MakeParallelTurnout + *newTrk = NewCompound(T_TURNOUT, 0, endPt[0].pos, endPt[0].angle + 90.0, + yy->title, 2, endPt, paths, + yy->segCnt, yy->segs); + xx = GET_EXTRA_DATA(*newTrk, T_TURNOUT, extraDataCompound_t); xx->customInfo = yy->customInfo; /* if (connection((int)curTurnoutEp).trk) { @@ -1927,62 +3822,66 @@ static BOOL_T MakeParallelTurnout( SetTrkScale( newTrk, curScaleInx ); } */ xx->special = yy->special; + xx->pathOverRide = yy->pathOverRide; + xx->pathNoCombine = yy->pathNoCombine; xx->u = yy->u; - SetDescriptionOrig( *newTrk ); + SetDescriptionOrig(*newTrk); xx->descriptionOff = zero; xx->descriptionSize = zero; SetTrkElev(*newTrk, GetTrkElevMode(trk), GetTrkElev(trk)); - GetTrkEndElev( trk, 0, &option, &d ); - SetTrkEndElev( *newTrk, 0, option, d, NULL ); - GetTrkEndElev( trk, 1, &option, &d ); - SetTrkEndElev( *newTrk, 1, option, d, NULL ); + GetTrkEndElev(trk, 0, &option, &d); + SetTrkEndElev(*newTrk, 0, option, d, NULL); + GetTrkEndElev(trk, 1, &option, &d); + SetTrkEndElev(*newTrk, 1, option, d, NULL); - MyFree( endPt ); - } else { + MyFree(endPt); + } + else { tempSegs(0).color = wDrawColorBlack; tempSegs(0).width = 0; tempSegs_da.cnt = 1; - tempSegs(0).type = track?SEG_STRTRK:SEG_STRLIN; - tempSegs(0).u.l.pos[0] = endPts[ 0 ]; - tempSegs(0).u.l.pos[1] = endPts[ 1 ]; - *newTrk = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + tempSegs(0).type = track ? SEG_STRTRK : SEG_STRLIN; + tempSegs(0).u.l.pos[0] = endPts[0]; + tempSegs(0).u.l.pos[1] = endPts[1]; + *newTrk = MakeDrawFromSeg(zero, 0.0, &tempSegs(0)); } - } else { + } + else { /* draw some temporary track while command is in process */ tempSegs(0).color = wDrawColorBlack; tempSegs(0).width = 0; tempSegs_da.cnt = 1; - tempSegs(0).type = track?SEG_STRTRK:SEG_STRLIN; - tempSegs(0).u.l.pos[0] = endPts[ 0 ]; - tempSegs(0).u.l.pos[1] = endPts[ 1 ]; + tempSegs(0).type = track ? SEG_STRTRK : SEG_STRLIN; + tempSegs(0).u.l.pos[0] = endPts[0]; + tempSegs(0).u.l.pos[1] = endPts[1]; } - if ( p0R ) *p0R = endPts[ 0 ]; - if ( p1R ) *p1R = endPts[ 1 ]; + if (p0R) *p0R = endPts[0]; + if (p1R) *p1R = endPts[1]; - MyFree( endPts ); + MyFree(endPts); return TRUE; } -static wBool_t CompareTurnout( track_cp trk1, track_cp trk2 ) +static wBool_t CompareTurnout(track_cp trk1, track_cp trk2) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); - char * cp = message + strlen(message); - REGRESS_CHECK_POS( "Orig", xx1, xx2, orig ) - REGRESS_CHECK_ANGLE( "Angle", xx1, xx2, angle ) - REGRESS_CHECK_INT( "Handlaid", xx1, xx2, handlaid ) - REGRESS_CHECK_INT( "Flipped", xx1, xx2, flipped ) - REGRESS_CHECK_INT( "Ungrouped", xx1, xx2, ungrouped ) - REGRESS_CHECK_INT( "Split", xx1, xx2, split ) - /* desc orig is not stable - REGRESS_CHECK_POS( "DescOrig", xx1, xx2, descriptionOrig ) */ - REGRESS_CHECK_POS( "DescOff", xx1, xx2, descriptionOff ) - REGRESS_CHECK_POS( "DescSize", xx1, xx2, descriptionSize ) - return CompareSegs( xx1->segs, xx1->segCnt, xx1->segs, xx1->segCnt ); + struct extraDataCompound_t* xx1 = GET_EXTRA_DATA(trk1, T_TURNOUT, extraDataCompound_t); + struct extraDataCompound_t* xx2 = GET_EXTRA_DATA(trk2, T_TURNOUT, extraDataCompound_t); + char* cp = message + strlen(message); + REGRESS_CHECK_POS("Orig", xx1, xx2, orig) + REGRESS_CHECK_ANGLE("Angle", xx1, xx2, angle) + REGRESS_CHECK_INT("Handlaid", xx1, xx2, handlaid) + REGRESS_CHECK_INT("Flipped", xx1, xx2, flipped) + REGRESS_CHECK_INT("Ungrouped", xx1, xx2, ungrouped) + REGRESS_CHECK_INT("Split", xx1, xx2, split) + /* desc orig is not stable + REGRESS_CHECK_POS( "DescOrig", xx1, xx2, descriptionOrig ) */ + REGRESS_CHECK_POS("DescOff", xx1, xx2, descriptionOff) + REGRESS_CHECK_POS("DescSize", xx1, xx2, descriptionSize) + return CompareSegs(xx1->segs, xx1->segCnt, xx1->segs, xx1->segCnt); } static trackCmd_t turnoutCmds = { @@ -2022,7 +3921,7 @@ static trackCmd_t turnoutCmds = { NULL, CompareTurnout }; - + #ifdef TURNOUTCMD /***************************************** * @@ -2032,84 +3931,84 @@ static trackCmd_t turnoutCmds = { static coOrd maxTurnoutDim; -static void AddTurnout( void ); +static void AddTurnout(void); static wWin_p turnoutW; -static void RescaleTurnout( void ) +static void RescaleTurnout(void) { DIST_T xscale, yscale; - wPos_t ww, hh; + wWinPix_t ww, hh; DIST_T w, h; - wDrawGetSize( turnoutD.d, &ww, &hh ); - w = ww/turnoutD.dpi; - h = hh/turnoutD.dpi; - xscale = maxTurnoutDim.x/w; - yscale = maxTurnoutDim.y/h; - turnoutD.scale = max(xscale,yscale); + wDrawGetSize(turnoutD.d, &ww, &hh); + w = ww / turnoutD.dpi; + h = hh / turnoutD.dpi; + xscale = maxTurnoutDim.x / w; + yscale = maxTurnoutDim.y / h; + turnoutD.scale = max(xscale, yscale); if (turnoutD.scale == 0.0) turnoutD.scale = 1.0; - turnoutD.size.x = w*turnoutD.scale; - turnoutD.size.y = h*turnoutD.scale; + turnoutD.size.x = w * turnoutD.scale; + turnoutD.size.y = h * turnoutD.scale; return; } -static void TurnoutChange( long changes ) +static void TurnoutChange(long changes) { - static char * lastScaleName = NULL; + static char* lastScaleName = NULL; if (turnoutW == NULL) return; - wListSetIndex( turnoutListL, 0 ); - if ( (!wWinIsVisible(turnoutW)) || - ( ((changes&CHANGE_SCALE) == 0 || lastScaleName == curScaleName) && - (changes&CHANGE_PARAMS) == 0 ) ) + wListSetIndex(turnoutListL, 0); + if ((!wWinIsVisible(turnoutW)) || + (((changes & CHANGE_SCALE) == 0 || lastScaleName == curScaleName) && + (changes & CHANGE_PARAMS) == 0)) return; lastScaleName = curScaleName; //curTurnout = NULL; curTurnoutEp = 0; - wControlShow( (wControl_p)turnoutListL, FALSE ); - wListClear( turnoutListL ); + wControlShow((wControl_p)turnoutListL, FALSE); + wListClear(turnoutListL); maxTurnoutDim.x = maxTurnoutDim.y = 0.0; if (turnoutInfo_da.cnt <= 0) return; - curTurnout = TurnoutAdd( LABEL_TABBED|LABEL_MANUF|LABEL_PARTNO|LABEL_DESCR, GetLayoutCurScale(), turnoutListL, &maxTurnoutDim, -1 ); - wListSetIndex( turnoutListL, turnoutInx ); - wControlShow( (wControl_p)turnoutListL, TRUE ); + curTurnout = TurnoutAdd(LABEL_TABBED | LABEL_MANUF | LABEL_PARTNO | LABEL_DESCR, GetLayoutCurScale(), turnoutListL, &maxTurnoutDim, -1); + wListSetIndex(turnoutListL, turnoutInx); + wControlShow((wControl_p)turnoutListL, TRUE); if (curTurnout == NULL) { - wDrawClear( turnoutD.d ); + wDrawClear(turnoutD.d); return; } turnoutD.orig.x = -trackGauge; turnoutD.orig.y = -trackGauge; - maxTurnoutDim.x += 2*trackGauge; - maxTurnoutDim.y += 2*trackGauge; + maxTurnoutDim.x += 2 * trackGauge; + maxTurnoutDim.y += 2 * trackGauge; /*RescaleTurnout();*/ - RedrawTurnout(); + RedrawTurnout( turnoutD.d, NULL, 0, 0 ); return; } -static void RedrawTurnout() +static void RedrawTurnout( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ) { RescaleTurnout(); -LOG( log_turnout, 2, ( "SelTurnout(%s)\n", (curTurnout?curTurnout->title:"<NULL>") ) ) + LOG(log_turnout, 2, ("SelTurnout(%s)\n", (curTurnout ? curTurnout->title : "<NULL>"))) - wDrawClear( turnoutD.d ); + wDrawClear(turnoutD.d); if (curTurnout == NULL) { return; } turnoutD.orig.x = curTurnout->orig.x - trackGauge; turnoutD.orig.y = (curTurnout->size.y + curTurnout->orig.y) - turnoutD.size.y + trackGauge; - DrawSegs( &turnoutD, zero, 0.0, curTurnout->segs, curTurnout->segCnt, - trackGauge, wDrawColorBlack ); + DrawSegs(&turnoutD, zero, 0.0, curTurnout->segs, curTurnout->segCnt, + trackGauge, wDrawColorBlack); curTurnoutEp = 0; HilightEndPt(); } -static void TurnoutOk( void ) +static void TurnoutOk(void) { AddTurnout(); Reset(); @@ -2117,33 +4016,33 @@ static void TurnoutOk( void ) static void TurnoutDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void* valueP) { - turnoutInfo_t * to; - if ( inx != I_LIST ) return; - to = (turnoutInfo_t*)wListGetItemContext( (wList_p)pg->paramPtr[inx].control, (wIndex_t)*(long*)valueP ); + turnoutInfo_t* to; + if (inx != I_LIST) return; + to = (turnoutInfo_t*)wListGetItemContext((wList_p)pg->paramPtr[inx].control, (wIndex_t) * (long*)valueP); AddTurnout(); curTurnout = to; - RedrawTurnout(); -/* ParamDialogOkActive( &turnoutPG, FALSE ); */ + RedrawTurnout( turnoutD.d, NULL, 0, 0 ); + /* ParamDialogOkActive( &turnoutPG, FALSE ); */ } static wIndex_t TOpickEndPoint( - coOrd p, - turnoutInfo_t *to ) + coOrd p, + turnoutInfo_t* to) { wIndex_t inx, i; DIST_T d, dd; coOrd posI; - d = FindDistance( p, to->endPt[0].pos ); + d = FindDistance(p, to->endPt[0].pos); inx = 0; - for ( i=1; i<to->endCnt; i++ ) { + for (i = 1; i < to->endCnt; i++) { posI = to->endPt[i].pos; - if ((dd=FindDistance(p, posI)) < d) { + if ((dd = FindDistance(p, posI)) < d) { d = dd; inx = i; } @@ -2152,57 +4051,55 @@ static wIndex_t TOpickEndPoint( } -static void HilightEndPt( void ) +static void HilightEndPt(void) { coOrd p, s; p.x = curTurnout->endPt[(int)curTurnoutEp].pos.x - trackGauge; p.y = curTurnout->endPt[(int)curTurnoutEp].pos.y - trackGauge; - s.x = s.y = trackGauge*2.0 /*+ turnoutD.minSize*/; - wDrawSetTempMode( turnoutD.d, TRUE ); - DrawHilight( &turnoutD, p, s, FALSE ); - wDrawSetTempMode( turnoutD.d, FALSE ); + s.x = s.y = trackGauge * 2.0 /*+ turnoutD.minSize*/; + DrawHilight(&turnoutD, p, s, FALSE); } static void SelTurnoutEndPt( - wIndex_t action, - coOrd pos ) + wIndex_t action, + coOrd pos) { if (action != C_DOWN) return; - curTurnoutEp = TOpickEndPoint( pos, curTurnout ); + curTurnoutEp = TOpickEndPoint(pos, curTurnout); HilightEndPt(); -LOG( log_turnout, 3, (" selected (action=%d) %ld\n", action, curTurnoutEp ) ) + LOG(log_turnout, 3, (" selected (action=%d) %ld\n", action, curTurnoutEp)) } #endif - + /**************************************** * * GRAPHICS COMMANDS * */ -/* - * STATE INFO - */ + /* + * STATE INFO + */ static struct { - int state; - coOrd pos; - coOrd place; - track_p trk; - ANGLE_T angle; - coOrd rot0, rot1; - } Dto; + int state; + coOrd pos; + coOrd place; + track_p trk; + ANGLE_T angle; + coOrd rot0, rot1; +} Dto; static dynArr_t vector_da; #define vector(N) DYNARR_N( vector_t, vector_da, N ) typedef struct { - DIST_T off; - ANGLE_T angle; - EPINX_T ep; - track_p trk; - } vector_t; + DIST_T off; + ANGLE_T angle; + EPINX_T ep; + track_p trk; +} vector_t; /* * PlaceTurnoutTrial @@ -2216,13 +4113,13 @@ typedef struct { * OUT Vector - An array of end points positions and offsets */ static void PlaceTurnoutTrial( - track_p *trkR, - coOrd *posR, - ANGLE_T *angle1R, - ANGLE_T *angle2R, - int *connCntR, - DIST_T *maxDR, - vector_t *v ) + track_p* trkR, + coOrd* posR, + ANGLE_T* angle1R, + ANGLE_T* angle2R, + int* connCntR, + DIST_T* maxDR, + vector_t* v) { coOrd pos = *posR; ANGLE_T aa; @@ -2235,82 +4132,86 @@ static void PlaceTurnoutTrial( DIST_T d, maxD = 0; coOrd testP = pos; - if (*trkR && (GetTrkDistance(*trkR,&testP)<trackGauge)) { //Have Track, stick with it unless outside bounds + if (*trkR && (GetTrkDistance(*trkR, &testP) < trackGauge)) { //Have Track, stick with it unless outside bounds trk = *trkR; pos = testP; - } else *trkR = trk = OnTrack( &pos, FALSE, TRUE ); - if ( (trk) != NULL && - !QueryTrack(trk,Q_CANNOT_PLACE_TURNOUT) && - (ep0 = PickEndPoint( pos, trk )) >= 0 && - ! ( GetTrkType(trk) == T_TURNOUT && - (trk1=GetTrkEndTrk(trk,ep0)) && - GetTrkType(trk1) == T_TURNOUT) && - ! GetLayerFrozen(GetTrkLayer(trk)) && - ! GetLayerModule(GetTrkLayer(trk))) { - epPos = GetTrkEndPos( trk, ep0 ); - d = FindDistance( pos, epPos ); + } + else *trkR = trk = OnTrack(&pos, FALSE, TRUE); + if ((trk) != NULL && + !QueryTrack(trk, Q_CANNOT_PLACE_TURNOUT) && + (ep0 = PickEndPoint(pos, trk)) >= 0 && + !(GetTrkType(trk) == T_TURNOUT && + (trk1 = GetTrkEndTrk(trk, ep0)) && + GetTrkType(trk1) == T_TURNOUT) && + !GetLayerFrozen(GetTrkLayer(trk)) && + !GetLayerModule(GetTrkLayer(trk))) { + epPos = GetTrkEndPos(trk, ep0); + d = FindDistance(pos, epPos); if (d <= minLength) pos = epPos; - if ( GetTrkType(trk) == T_TURNOUT ) { //Only on the end - ep0 = ep1 = PickEndPoint( pos, trk ); - angle = GetTrkEndAngle( trk, ep0 ); - } else { - angle = GetAngleAtPoint( trk, pos, &ep0, &ep1 ); - if (ep0==1) angle = NormalizeAngle(angle+180); //Reverse if curve backwards - } - angle = NormalizeAngle( angle + 180.0 ); - if ( NormalizeAngle( FindAngle( pos, *posR ) - angle ) < 180.0 && ep0 != ep1 ) - angle = NormalizeAngle( angle + 180 ); + if (GetTrkType(trk) == T_TURNOUT) { //Only on the end + ep0 = ep1 = PickEndPoint(pos, trk); + angle = GetTrkEndAngle(trk, ep0); + } + else { + angle = GetAngleAtPoint(trk, pos, &ep0, &ep1); + if (ep0 == 1) angle = NormalizeAngle(angle + 180); //Reverse if curve backwards + } + angle = NormalizeAngle(angle + 180.0); + if (NormalizeAngle(FindAngle(pos, *posR) - angle) < 180.0 && ep0 != ep1) + angle = NormalizeAngle(angle + 180); *angle2R = angle; epPos = curTurnout->endPt[(int)curTurnoutEp].pos; - *angle1R = angle = NormalizeAngle( angle - curTurnout->endPt[(int)curTurnoutEp].angle ); - Rotate( &epPos, zero, angle ); + *angle1R = angle = NormalizeAngle(angle - curTurnout->endPt[(int)curTurnoutEp].angle); + Rotate(&epPos, zero, angle); pos.x -= epPos.x; pos.y -= epPos.y; *posR = pos; //The place the Turnout end sits -LOG( log_turnout, 3, ( "placeTurnout T%d (%0.3f %0.3f) A%0.3f\n", - GetTrkIndex(trk), pos.x, pos.y, angle ) ) - /*InfoMessage( "Turnout(%d): Angle=%0.3f", GetTrkIndex(trk), angle );*/ - track_p ctrk = NULL; + LOG(log_turnout, 3, ("placeTurnout T%d (%0.3f %0.3f) A%0.3f\n", + GetTrkIndex(trk), pos.x, pos.y, angle)) + /*InfoMessage( "Turnout(%d): Angle=%0.3f", GetTrkIndex(trk), angle );*/ + track_p ctrk = NULL; int ccnt = 0; - DIST_T clarge = 100000; - for (i=0;i<curTurnout->endCnt;i++) { + DIST_T clarge = DIST_INF; + for (i = 0; i < curTurnout->endCnt; i++) { posI = curTurnout->endPt[i].pos; - epPos = AddCoOrd( pos, posI, angle ); - epAngle = NormalizeAngle( curTurnout->endPt[i].angle + angle ); + epPos = AddCoOrd(pos, posI, angle); + epAngle = NormalizeAngle(curTurnout->endPt[i].angle + angle); conPos = epPos; if ((trk = OnTrack(&conPos, FALSE, TRUE)) != NULL && !GetLayerFrozen(GetTrkLayer(trk)) && !GetLayerModule(GetTrkLayer(trk))) { - v->off = FindDistance( epPos, conPos ); - v->angle = FindAngle( epPos, conPos ); - if ( GetTrkType(trk) == T_TURNOUT ) { - ep0 = ep1 = PickEndPoint( conPos, trk ); - aa = GetTrkEndAngle( trk, ep0 ); - } else { - aa = GetAngleAtPoint( trk, conPos, &ep0, &ep1 ); + v->off = FindDistance(epPos, conPos); + v->angle = FindAngle(epPos, conPos); + if (GetTrkType(trk) == T_TURNOUT) { + ep0 = ep1 = PickEndPoint(conPos, trk); + aa = GetTrkEndAngle(trk, ep0); + } + else { + aa = GetAngleAtPoint(trk, conPos, &ep0, &ep1); if (ep0) //Backwards - so reverse - aa = NormalizeAngle(aa+180); + aa = NormalizeAngle(aa + 180); } v->ep = i; - aa = fabs(DifferenceBetweenAngles( aa, epAngle )); - if (QueryTrack(trk,Q_IS_CORNU) ) { //Make sure only two conns to each Cornu - int k=0; + aa = fabs(DifferenceBetweenAngles(aa, epAngle)); + if (QueryTrack(trk, Q_IS_CORNU)) { //Make sure only two conns to each Cornu + int k = 0; v->trk = trk; - for (int j=0; j<i;j++) { + for (int j = 0; j < i; j++) { if (vector(j).trk == trk) k++; } - if (k<2) { //Already two conns to this track + if (k < 2) { //Already two conns to this track connCnt++; if (v->off > maxD) maxD = v->off; v++; } - } else if (( IsClose(v->off) && (aa<connectAngle || aa>180-connectAngle) && - !( GetTrkType(trk) == T_TURNOUT && - (trk1=GetTrkEndTrk(trk,ep0)) && - GetTrkType(trk1) == T_TURNOUT )) ) { + } + else if ((IsClose(v->off) && (aa < connectAngle || aa>180 - connectAngle) && + !(GetTrkType(trk) == T_TURNOUT && + (trk1 = GetTrkEndTrk(trk, ep0)) && + GetTrkType(trk1) == T_TURNOUT))) { if (v->off > maxD) maxD = v->off; connCnt++; @@ -2318,7 +4219,8 @@ LOG( log_turnout, 3, ( "placeTurnout T%d (%0.3f %0.3f) A%0.3f\n", } } } - } else { + } + else { trk = NULL; *trkR = NULL; } @@ -2328,51 +4230,51 @@ LOG( log_turnout, 3, ( "placeTurnout T%d (%0.3f %0.3f) A%0.3f\n", static void PlaceTurnout( - coOrd pos, track_p trk ) + coOrd pos, track_p trk) { coOrd p, pos1, pos2; track_p trk1, trk2; ANGLE_T a, a1, a2, a3; int i, connCnt1, connCnt2; DIST_T d, maxD1, maxD2, sina; - vector_t *V, * maxV; + vector_t* V, * maxV; + - pos1 = Dto.place = Dto.pos = pos; -LOG( log_turnout, 1, ( "Place Turnout @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, ("Place Turnout @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); if (curTurnoutEp >= (long)curTurnout->endCnt) curTurnoutEp = 0; - DYNARR_SET( vector_t, vector_da, curTurnout->endCnt ); + DYNARR_SET(vector_t, vector_da, curTurnout->endCnt); if (trk) trk1 = trk; else trk1 = NULL; - PlaceTurnoutTrial( &trk1, &pos1, &a1, &a2, &connCnt1, &maxD1, &vector(0) ); + PlaceTurnoutTrial(&trk1, &pos1, &a1, &a2, &connCnt1, &maxD1, &vector(0)); if (connCnt1 > 0) { Dto.pos = pos1; //First track pos -LOG( log_turnout, 1, ( " trial 1 @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, (" trial 1 @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); Dto.trk = trk1; //Track Dto.angle = a1; //Angle of track to put down - if ( ((MyGetKeyState()&WKEY_SHIFT)==0) && (connCnt1 > 1) && (maxD1 >= 0.001) ) { //Adjust if not Shift + if (((MyGetKeyState() & WKEY_SHIFT) == 0) && (connCnt1 > 1) && (maxD1 >= 0.001)) { //Adjust if not Shift maxV = &vector(0); - for ( i=1; i<connCnt1; i++ ) { //Ignore first point + for (i = 1; i < connCnt1; i++) { //Ignore first point V = &vector(i); - if ( V->off > maxV->off ) { + if (V->off > maxV->off) { maxV = V; } } - a3 = NormalizeAngle( Dto.angle + curTurnout->endPt[maxV->ep].angle ); - a = NormalizeAngle( a2 - a3 ); + a3 = NormalizeAngle(Dto.angle + curTurnout->endPt[maxV->ep].angle); + a = NormalizeAngle(a2 - a3); sina = sin(D2R(a)); if (fabs(sina) > 0.01) { - d = maxV->off/sina; - if (NormalizeAngle( maxV->angle - a3) > 180) + d = maxV->off / sina; + if (NormalizeAngle(maxV->angle - a3) > 180) d = -d; - Translate( &pos2, pos, a2, d ); + Translate(&pos2, pos, a2, d); trk2 = trk1; - PlaceTurnoutTrial( &trk2, &pos2, &a2, &a, &connCnt2, &maxD2, &vector(0) ); - if ( connCnt2 >= connCnt1 && maxD2 < maxD1 ) { + PlaceTurnoutTrial(&trk2, &pos2, &a2, &a, &connCnt2, &maxD2, &vector(0)); + if (connCnt2 >= connCnt1 && maxD2 < maxD1) { Dto.pos = pos2; -LOG( log_turnout, 1, ( " trial 2 @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, (" trial 2 @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); Dto.trk = trk2; Dto.angle = a2; maxD1 = maxD2; @@ -2381,37 +4283,37 @@ LOG( log_turnout, 1, ( " trial 2 @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); } } } - if ( connCnt1 > 0 ) { - FormatCompoundTitle( listLabels, curTurnout->title ); - InfoMessage( _("%d connections, max distance %0.3f (%s)"), - connCnt1, PutDim(maxD1), message ); - } else { + if (connCnt1 > 0) { + FormatCompoundTitle(listLabels, curTurnout->title); + InfoMessage(_("%d connections, max distance %0.3f (%s)"), + connCnt1, PutDim(maxD1), message); + } + else { Dto.trk = NULL; - FormatCompoundTitle( listLabels, curTurnout->title ); - InfoMessage( _("0 connections (%s)"), message ); + FormatCompoundTitle(listLabels, curTurnout->title); + InfoMessage(_("0 connections (%s)"), message); p = curTurnout->endPt[(int)curTurnoutEp].pos; - Rotate( &p, zero, Dto.angle ); + Rotate(&p, zero, Dto.angle); Dto.pos.x = pos.x - p.x; Dto.pos.y = pos.y - p.y; -LOG( log_turnout, 1, ( " final @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, (" final @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); } } -static void AddTurnout( void ) +static void AddTurnout(void) { track_p newTrk; track_p trk, trk1; - struct extraData *xx; + struct extraDataCompound_t* xx; coOrd epPos; DIST_T d; ANGLE_T a, aa; EPINX_T ep0, ep1, epx, epy; - wIndex_t i,j; - wIndex_t titleLen; + wIndex_t i, j; typedef struct { track_p trk; EPINX_T ep; - } junk_t; + } junk_t; static dynArr_t connection_da; static dynArr_t leftover_da; #define connection(N) DYNARR_N( junk_t, connection_da, N ) @@ -2425,27 +4327,26 @@ static void AddTurnout( void ) return; if (curTurnout->segCnt < 1 || curTurnout->endCnt < 1) { - AbortProg( "addTurnout: bad cnt" ); + AbortProg("addTurnout: bad cnt"); } - UndoStart( _("Place New Turnout"), "addTurnout" ); - titleLen = strlen( curTurnout->title ); + UndoStart(_("Place New Turnout"), "addTurnout"); - DYNARR_SET( trkEndPt_t, tempEndPts_da, curTurnout->endCnt ); - DYNARR_SET( junk_t, connection_da, curTurnout->endCnt ); - DYNARR_SET( junk_t, leftover_da, curTurnout->endCnt ); + DYNARR_SET(trkEndPt_t, tempEndPts_da, curTurnout->endCnt); + DYNARR_SET(junk_t, connection_da, curTurnout->endCnt); + DYNARR_SET(junk_t, leftover_da, curTurnout->endCnt); - for (i=0; i<curTurnout->endCnt; i++ ) { + for (i = 0; i < curTurnout->endCnt; i++) { coOrd posI; posI = curTurnout->endPt[i].pos; - tempEndPts(i).pos = AddCoOrd( Dto.pos, posI, Dto.angle ); - tempEndPts(i).angle = NormalizeAngle( curTurnout->endPt[i].angle + Dto.angle ); + tempEndPts(i).pos = AddCoOrd(Dto.pos, posI, Dto.angle); + tempEndPts(i).angle = NormalizeAngle(curTurnout->endPt[i].angle + Dto.angle); } - AuditTracks( "addTurnout begin" ); + AuditTracks("addTurnout begin"); - for (i=0;i<curTurnout->endCnt;i++) { - AuditTracks( "addTurnout [%d]", i ); + for (i = 0; i < curTurnout->endCnt; i++) { + AuditTracks("addTurnout [%d]", i); connection(i).trk = leftover(i).trk = NULL; connection(i).ep = -1; leftover(i).ep = -1; @@ -2453,70 +4354,72 @@ static void AddTurnout( void ) epPos = tempEndPts(i).pos; if ((trk = OnTrack(&epPos, FALSE, TRUE)) != NULL && //Adjust epPos onto existing track (!GetLayerFrozen(GetTrkLayer(trk))) && - (!GetLayerModule(GetTrkLayer(trk))) && - (!QueryTrack(trk,Q_CANNOT_PLACE_TURNOUT)) ) { -LOG( log_turnout, 1, ( "ep[%d] on T%d @(%0.3f %0.3f)\n", - i, GetTrkIndex(trk), epPos.x, epPos.y ) ) - DIST_T dd = 10000.0; + (!GetLayerModule(GetTrkLayer(trk))) && + (!QueryTrack(trk, Q_CANNOT_PLACE_TURNOUT))) { + LOG(log_turnout, 1, ("ep[%d] on T%d @(%0.3f %0.3f)\n", + i, GetTrkIndex(trk), epPos.x, epPos.y)) + DIST_T dd = DIST_INF; int nearest = -1; - for (int j=0;j<curTurnout->endCnt;j++) { - if (j<i && (connection(j).trk == trk)) { + for (int j = 0; j < curTurnout->endCnt; j++) { + if (j < i && (connection(j).trk == trk)) { nearest = -1; goto nextEnd; //Track already chosen in use } - if (dd>FindDistance(epPos,tempEndPts(j).pos)) { - dd = FindDistance(epPos,tempEndPts(j).pos); + if (dd > FindDistance(epPos, tempEndPts(j).pos)) { + dd = FindDistance(epPos, tempEndPts(j).pos); nearest = j; } } if (nearest != i) continue; //Not this one - d = FindDistance( tempEndPts(i).pos, epPos ); - if ( GetTrkType(trk) == T_TURNOUT ) { - ep0 = ep1 = PickEndPoint( epPos, trk ); - a = GetTrkEndAngle( trk, ep0 ); - } else { - a = GetAngleAtPoint( trk, epPos, &ep0, &ep1 ); - } - aa = fabs(DifferenceBetweenAngles( a , tempEndPts(i).angle)); - if ((QueryTrack(trk,Q_IS_CORNU) && (d<trackGauge*2)) || - (( IsClose(d) && ( ((ep0!=ep1) && (aa<=connectAngle)) || ((aa<=connectAngle) || (aa>180-connectAngle)) ) && - ! ( GetTrkType(trk) == T_TURNOUT && - (trk1=GetTrkEndTrk(trk,ep0)) && - GetTrkType(trk1) == T_TURNOUT )) ) ) { + d = FindDistance(tempEndPts(i).pos, epPos); + if (GetTrkType(trk) == T_TURNOUT) { + ep0 = ep1 = PickEndPoint(epPos, trk); + a = GetTrkEndAngle(trk, ep0); + } + else { + a = GetAngleAtPoint(trk, epPos, &ep0, &ep1); + } + aa = fabs(DifferenceBetweenAngles(a, tempEndPts(i).angle)); + if ((QueryTrack(trk, Q_IS_CORNU) && (d < trackGauge * 2)) || + ((IsClose(d) && (((ep0 != ep1) && (aa <= connectAngle)) || ((aa <= connectAngle) || (aa > 180 - connectAngle))) && + !(GetTrkType(trk) == T_TURNOUT && + (trk1 = GetTrkEndTrk(trk, ep0)) && + GetTrkType(trk1) == T_TURNOUT)))) { /* ... if they are close enough to a track and line up */ - if (aa<90) { - epx = ep1; - epy = ep0; - } else { - epx = ep0; - epy = ep1; + if (aa < 90) { + epx = ep1; + epy = ep0; } -LOG( log_turnout, 1, ( " Attach! epx=%d\n", epx ) ) - if ( (epx != epy) && - ((d=FindDistance(GetTrkEndPos(trk,epy), epPos)) < minLength) && - ((trk1=GetTrkEndTrk(trk,epy)) != NULL) ) { - epx = GetEndPtConnectedToMe( trk1, trk ); - trk = trk1; + else { + epx = ep0; + epy = ep1; } + LOG(log_turnout, 1, (" Attach! epx=%d\n", epx)) + if ((epx != epy) && + ((d = FindDistance(GetTrkEndPos(trk, epy), epPos)) < minLength) && + ((trk1 = GetTrkEndTrk(trk, epy)) != NULL)) { + epx = GetEndPtConnectedToMe(trk1, trk); + trk = trk1; + } /* split the track at the intersection point */ - AuditTracks( "addTurnout [%d] before splitTrack", i ); - if (SplitTrack( trk, epPos, epx, &leftover(i).trk, TRUE )) { - AuditTracks( "addTurnout [%d], after splitTrack", i ); + AuditTracks("addTurnout [%d] before splitTrack", i); + if (SplitTrack(trk, epPos, epx, &leftover(i).trk, TRUE)) { + AuditTracks("addTurnout [%d], after splitTrack", i); /* remember so we can fix up connection later */ connection(i).trk = trk; connection(i).ep = epx; if (leftover(i).trk != NULL) { - leftover(i).ep = 1-epx; + leftover(i).ep = 1 - epx; /* did we already split this track? */ - for (j=0;j<i;j++) { - if ( connection(i).trk == leftover(j).trk ) { + for (j = 0; j < i; j++) { + if (connection(i).trk == leftover(j).trk) { /* yes. Remove the latest leftover piece */ -LOG( log_turnout, 1, ( " deleting leftover T%d\n", - GetTrkIndex(leftover(i).trk) ) ) - AuditTracks( "addTurnout [%d] before delete", i ); - UndrawNewTrack( leftover(i).trk ); - DeleteTrack( leftover(i).trk, FALSE ); - AuditTracks( "addTurnout [%d] before delete", i ); + LOG(log_turnout, 1, (" deleting leftover T%d\n", + GetTrkIndex(leftover(i).trk))) + AuditTracks("addTurnout [%d] before delete", i); + UndrawNewTrack(leftover(i).trk); + DeleteTrack(leftover(i).trk, FALSE); + AuditTracks("addTurnout [%d] before delete", i); leftover(i).trk = NULL; leftover(i).ep = -1; leftover(j).trk = NULL; //Forget this leftover @@ -2528,112 +4431,110 @@ LOG( log_turnout, 1, ( " deleting leftover T%d\n", } } } -nextEnd:; + nextEnd:; } - AuditTracks( "addTurnout after loop" ); + AuditTracks("addTurnout after loop"); /* * copy data */ - newTrk = NewCompound( T_TURNOUT, 0, Dto.pos, Dto.angle, curTurnout->title, tempEndPts_da.cnt, &tempEndPts(0), NULL, curTurnout->pathLen, (char *)curTurnout->paths, curTurnout->segCnt, curTurnout->segs ); - xx = GetTrkExtraData(newTrk); + newTrk = NewCompound(T_TURNOUT, 0, Dto.pos, Dto.angle, curTurnout->title, tempEndPts_da.cnt, &tempEndPts(0), GetParamPaths(curTurnout), curTurnout->segCnt, curTurnout->segs); + xx = GET_EXTRA_DATA(newTrk, T_TURNOUT, extraDataCompound_t); xx->customInfo = curTurnout->customInfo; if (connection((int)curTurnoutEp).trk) { - CopyAttributes( connection((int)curTurnoutEp).trk, newTrk ); - SetTrkScale( newTrk, GetLayoutCurScale()); + CopyAttributes(connection((int)curTurnoutEp).trk, newTrk); + SetTrkScale(newTrk, GetLayoutCurScale()); } xx->special = curTurnout->special; - if (xx->special == TOcurved) { - DYNARR_SET(DIST_T,xx->u.curved.radii,curTurnout->endCnt); - for (int i=0;i<curTurnout->endCnt;i++) { - DYNARR_N(DIST_T,xx->u.curved.radii,i) = DYNARR_N(DIST_T,curTurnout->u.curved.radii,i); - } - } xx->u = curTurnout->u; + xx->pathOverRide = curTurnout->pathOverRide; + xx->pathNoCombine = curTurnout->pathNoCombine; /* Make the connections */ visible = FALSE; no_ties = FALSE; noConnections = TRUE; - AuditTracks( "addTurnout T%d before connection", GetTrkIndex(newTrk) ); - for (i=0;i<curTurnout->endCnt;i++) { - if ( connection(i).trk != NULL ) { - if (GetTrkEndTrk(connection(i).trk,connection(i).ep)) continue; - p0 = GetTrkEndPos( newTrk, i ); - p1 = GetTrkEndPos( connection(i).trk, connection(i).ep ); - ANGLE_T a0 = GetTrkEndAngle( newTrk, i); - ANGLE_T a1 = GetTrkEndAngle( connection(i).trk, connection(i).ep ); - ANGLE_T a = fabs(DifferenceBetweenAngles(a0+180,a1)); - d = FindDistance( p0, p1 ); - if (QueryTrack(connection(i).trk,Q_IS_CORNU)) { - ANGLE_T a = DifferenceBetweenAngles(FindAngle(p0,p1),a0); - if (IsClose(d) || fabs(a)<=90.0) { + AuditTracks("addTurnout T%d before connection", GetTrkIndex(newTrk)); + for (i = 0; i < curTurnout->endCnt; i++) { + if (connection(i).trk != NULL) { + if (GetTrkEndTrk(connection(i).trk, connection(i).ep)) continue; + p0 = GetTrkEndPos(newTrk, i); + p1 = GetTrkEndPos(connection(i).trk, connection(i).ep); + ANGLE_T a0 = GetTrkEndAngle(newTrk, i); + ANGLE_T a1 = GetTrkEndAngle(connection(i).trk, connection(i).ep); + ANGLE_T a = fabs(DifferenceBetweenAngles(a0 + 180, a1)); + d = FindDistance(p0, p1); + if (QueryTrack(connection(i).trk, Q_IS_CORNU)) { + ANGLE_T a = DifferenceBetweenAngles(FindAngle(p0, p1), a0); + if (IsClose(d) || fabs(a) <= 90.0) { trk1 = connection(i).trk; ep0 = connection(i).ep; - if (GetTrkEndTrk(trk1,ep0)) continue; - DrawEndPt( &mainD, trk1, ep0, wDrawColorWhite ); + if (GetTrkEndTrk(trk1, ep0)) continue; + DrawEndPt(&mainD, trk1, ep0, wDrawColorWhite); trackParams_t params; - GetTrackParams( PARAMS_EXTEND, newTrk, GetTrkEndPos(newTrk,i), ¶ms); - SetCornuEndPt(trk1, ep0, GetTrkEndPos(newTrk,i), params.arcP, NormalizeAngle(params.angle+180.0), params.arcR); - ConnectTracks(newTrk,i,trk1,ep0); - DrawEndPt( &mainD, trk1, ep0, wDrawColorBlack ); + GetTrackParams(PARAMS_EXTEND, newTrk, GetTrkEndPos(newTrk, i), ¶ms); + SetCornuEndPt(trk1, ep0, GetTrkEndPos(newTrk, i), params.arcP, NormalizeAngle(params.angle + 180.0), params.arcR); + ConnectTracks(newTrk, i, trk1, ep0); + DrawEndPt(&mainD, trk1, ep0, wDrawColorBlack); } - } else if ( d < connectDistance && (a<=connectAngle)) { + } + else if (d < connectDistance && (a <= connectAngle)) { noConnections = FALSE; trk1 = connection(i).trk; ep0 = connection(i).ep; - DrawEndPt( &mainD, trk1, ep0, wDrawColorWhite ); - ConnectTracks( newTrk, i, trk1, ep0 ); + DrawEndPt(&mainD, trk1, ep0, wDrawColorWhite); + ConnectTracks(newTrk, i, trk1, ep0); visible |= GetTrkVisible(trk1); no_ties |= GetTrkNoTies(trk1); - DrawEndPt( &mainD, trk1, ep0, wDrawColorBlack ); + DrawEndPt(&mainD, trk1, ep0, wDrawColorBlack); } } } if (noConnections) visible = TRUE; - SetTrkVisible( newTrk, visible); + SetTrkVisible(newTrk, visible); SetTrkNoTies(newTrk, no_ties); SetTrkBridge(newTrk, FALSE); - AuditTracks( "addTurnout T%d before dealing with leftovers", GetTrkIndex(newTrk) ); + AuditTracks("addTurnout T%d before dealing with leftovers", GetTrkIndex(newTrk)); /* deal with the leftovers */ - for (i=0;i<curTurnout->endCnt;i++) { - if ( (trk=leftover(i).trk) != NULL && !IsTrackDeleted(trk) ) { + for (i = 0; i < curTurnout->endCnt; i++) { + if ((trk = leftover(i).trk) != NULL) { + ASSERT( !IsTrackDeleted(trk) ); /* move endPt beyond the turnout */ /* it it is short then delete it */ coOrd off; DIST_T maxX; track_p lt = leftover(i).trk; - if (QueryTrack(lt,Q_IS_CORNU)) { + if (QueryTrack(lt, Q_IS_CORNU)) { UndrawNewTrack(lt); - DeleteTrack(lt,TRUE); + DeleteTrack(lt, TRUE); leftover(i).trk = NULL; continue; } - EPINX_T ep, le = leftover(i).ep, nearest_ep =-1; + EPINX_T ep, le = leftover(i).ep, nearest_ep = -1; coOrd pos, nearest_pos = zero; ANGLE_T nearest_angle = 0.0; DIST_T nearest_radius = 0.0; coOrd nearest_center = zero; trackParams_t params; maxX = 0.0; - DIST_T dd = 10000.0; - a = NormalizeAngle( GetTrkEndAngle(lt,le) + 180.0 ); - for (ep=0; ep<curTurnout->endCnt; ep++) { - FindPos( &off, NULL, GetTrkEndPos(newTrk,ep), GetTrkEndPos(lt,le), a, 100000.0 ); - pos = GetTrkEndPos(newTrk,ep); + DIST_T dd = DIST_INF; + a = NormalizeAngle(GetTrkEndAngle(lt, le) + 180.0); + for (ep = 0; ep < curTurnout->endCnt; ep++) { + FindPos(&off, NULL, GetTrkEndPos(newTrk, ep), GetTrkEndPos(lt, le), a, DIST_INF); + pos = GetTrkEndPos(newTrk, ep); DIST_T d = GetTrkDistance(lt, &pos); - if ((d<dd) && ( d<trackGauge/2)) { - ANGLE_T a = GetTrkEndAngle( lt, le ); - ANGLE_T a2 = fabs(DifferenceBetweenAngles(GetTrkEndAngle(newTrk,ep),a+180)); - if (GetTrkEndTrk(newTrk,ep)==NULL) { //Not if joined already - if (a2<90 && QueryTrack(lt,Q_IS_CORNU)) { //And Cornu in the right direction - GetTrackParams( PARAMS_EXTEND, newTrk, GetTrkEndPos(newTrk,ep), ¶ms); - nearest_pos = GetTrkEndPos(newTrk,ep); - nearest_angle = NormalizeAngle(params.angle+180.0); + if ((d < dd) && (d < trackGauge / 2)) { + ANGLE_T a = GetTrkEndAngle(lt, le); + ANGLE_T a2 = fabs(DifferenceBetweenAngles(GetTrkEndAngle(newTrk, ep), a + 180)); + if (GetTrkEndTrk(newTrk, ep) == NULL) { //Not if joined already + if (a2 < 90 && QueryTrack(lt, Q_IS_CORNU)) { //And Cornu in the right direction + GetTrackParams(PARAMS_EXTEND, newTrk, GetTrkEndPos(newTrk, ep), ¶ms); + nearest_pos = GetTrkEndPos(newTrk, ep); + nearest_angle = NormalizeAngle(params.angle + 180.0); nearest_radius = params.arcR; nearest_center = params.arcP; nearest_ep = ep; @@ -2646,30 +4547,33 @@ nextEnd:; } maxX += trackGauge; pos = Dto.pos; - if (QueryTrack(lt,Q_IS_CORNU)) { - if (nearest_ep >=0) { + if (QueryTrack(lt, Q_IS_CORNU)) { + if (nearest_ep >= 0) { SetCornuEndPt(lt, le, nearest_pos, nearest_center, nearest_angle, nearest_radius); - ConnectTracks(newTrk,nearest_ep,lt,le); - } else { + ConnectTracks(newTrk, nearest_ep, lt, le); + } + else { UndrawNewTrack(lt); - DeleteTrack(lt,TRUE); + DeleteTrack(lt, TRUE); + leftover(i).trk = NULL; } - } else { - AuditTracks( "addTurnout T%d[%d] before trimming L%d[%d]", GetTrkIndex(newTrk), i, GetTrkIndex(lt), le ); - wBool_t rc = TrimTrack( lt, le, maxX, nearest_pos, nearest_angle, nearest_radius, nearest_center ); - AuditTracks( "addTurnout T%d[%d] after trimming L%d[%d]", GetTrkIndex(newTrk), i, GetTrkIndex(lt), le ); + } + else { + AuditTracks("addTurnout T%d[%d] before trimming L%d[%d]", GetTrkIndex(newTrk), i, GetTrkIndex(lt), le); + wBool_t rc = TrimTrack(lt, le, maxX, nearest_pos, nearest_angle, nearest_radius, nearest_center); + AuditTracks("addTurnout T%d[%d] after trimming L%d[%d]", GetTrkIndex(newTrk), i, GetTrkIndex(lt), le); } } } - SetDescriptionOrig( newTrk ); + SetDescriptionOrig(newTrk); xx->descriptionOff = zero; xx->descriptionSize = zero; - DrawNewTrack( newTrk ); + DrawNewTrack(newTrk); - AuditTracks( "addTurnout T%d returns", GetTrkIndex(newTrk) ); + AuditTracks("addTurnout T%d returns", GetTrkIndex(newTrk)); UndoEnd(); Dto.state = 0; Dto.trk = NULL; @@ -2677,14 +4581,14 @@ nextEnd:; } -static void TurnoutRotate( void * pangle ) +static void TurnoutRotate(void* pangle) { if (Dto.state == 0) return; - ANGLE_T angle = (ANGLE_T)(long)pangle; + ANGLE_T angle = (ANGLE_T)VP2L(pangle); angle /= 1000.0; Dto.pos = cmdMenuPos; - Rotate( &Dto.pos, cmdMenuPos, angle ); + Rotate(&Dto.pos, cmdMenuPos, angle); Dto.angle += angle; TempRedraw(); // TurnoutRotate } @@ -2692,59 +4596,59 @@ static void TurnoutRotate( void * pangle ) static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) -void static CreateArrowAnchor(coOrd pos,ANGLE_T a,DIST_T len) { - DYNARR_APPEND(trkSeg_t,anchors_da,1); - int i = anchors_da.cnt-1; +void static CreateArrowAnchor(coOrd pos, ANGLE_T a, DIST_T len) { + DYNARR_APPEND(trkSeg_t, anchors_da, 1); + int i = anchors_da.cnt - 1; anchors(i).type = SEG_STRLIN; anchors(i).width = 0; anchors(i).u.l.pos[0] = pos; - Translate(&anchors(i).u.l.pos[1],pos,NormalizeAngle(a+135),len); + Translate(&anchors(i).u.l.pos[1], pos, NormalizeAngle(a + 135), len); anchors(i).color = wDrawColorBlue; - DYNARR_APPEND(trkSeg_t,anchors_da,1); - i = anchors_da.cnt-1; + DYNARR_APPEND(trkSeg_t, anchors_da, 1); + i = anchors_da.cnt - 1; anchors(i).type = SEG_STRLIN; anchors(i).width = 0; anchors(i).u.l.pos[0] = pos; - Translate(&anchors(i).u.l.pos[1],pos,NormalizeAngle(a-135),len); + Translate(&anchors(i).u.l.pos[1], pos, NormalizeAngle(a - 135), len); anchors(i).color = wDrawColorBlue; } void static CreateRotateAnchor(coOrd pos) { - DIST_T d = tempD.scale*0.15; - DYNARR_APPEND(trkSeg_t,anchors_da,1); - int i = anchors_da.cnt-1; + DIST_T d = tempD.scale * 0.15; + DYNARR_APPEND(trkSeg_t, anchors_da, 1); + int i = anchors_da.cnt - 1; anchors(i).type = SEG_CRVLIN; anchors(i).width = 0.5; anchors(i).u.c.center = pos; anchors(i).u.c.a0 = 180.0; anchors(i).u.c.a1 = 360.0; - anchors(i).u.c.radius = d*2; + anchors(i).u.c.radius = d * 2; anchors(i).color = wDrawColorAqua; coOrd head; //Arrows - for (int j=0;j<3;j++) { - Translate(&head,pos,j*120,d*2); - CreateArrowAnchor(head,NormalizeAngle((j*120)+90),d); + for (int j = 0; j < 3; j++) { + Translate(&head, pos, j * 120, d * 2); + CreateArrowAnchor(head, NormalizeAngle((j * 120) + 90), d); } } void static CreateMoveAnchor(coOrd pos) { - DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,0,TRUE,wDrawColorBlue); - DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,90,TRUE,wDrawColorBlue); + DYNARR_SET(trkSeg_t, anchors_da, anchors_da.cnt + 5); + DrawArrowHeads(&DYNARR_N(trkSeg_t, anchors_da, anchors_da.cnt - 5), pos, 0, TRUE, wDrawColorBlue); + DYNARR_SET(trkSeg_t, anchors_da, anchors_da.cnt + 5); + DrawArrowHeads(&DYNARR_N(trkSeg_t, anchors_da, anchors_da.cnt - 5), pos, 90, TRUE, wDrawColorBlue); } - + /** * Process the mouse events for laying track. * * \param action IN event type - * \param pos IN mouse position + * \param pos IN mouse position * \return next state */ EXPORT STATUS_T CmdTurnoutAction( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos) { ANGLE_T angle; static BOOL_T validAngle; @@ -2760,155 +4664,154 @@ EXPORT STATUS_T CmdTurnoutAction( Dto.state = 0; Dto.trk = NULL; Dto.angle = 0.0; - DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t, anchors_da); + SetAllTrackSelect(FALSE); return C_CONTINUE; case wActionMove: - DYNARR_RESET(trkSeg_t,anchors_da); - if (Dto.state && (MyGetKeyState()&WKEY_CTRL)) { + DYNARR_RESET(trkSeg_t, anchors_da); + if (Dto.state && (MyGetKeyState() & WKEY_CTRL)) { CreateRotateAnchor(pos); - } else { + } + else { CreateMoveAnchor(pos); } return C_CONTINUE; break; case C_DOWN: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; - PlaceTurnout( pos, NULL ); + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; + PlaceTurnout(pos, NULL); Dto.state = 1; - CreateMoveAnchor(pos); return C_CONTINUE; case C_MOVE: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; - if ( curTurnoutEp >= (long)curTurnout->endCnt ) + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; + if (curTurnoutEp >= (long)curTurnout->endCnt) curTurnoutEp = 0; Dto.state = 1; - PlaceTurnout( pos, Dto.trk ); - CreateMoveAnchor(pos); + PlaceTurnout(pos, Dto.trk); return C_CONTINUE; case C_UP: - DYNARR_RESET(trkSeg_t,anchors_da); - CreateMoveAnchor(pos); - InfoMessage( _("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel") ); + DYNARR_RESET(trkSeg_t, anchors_da); + InfoMessage(_("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel")); return C_CONTINUE; case C_RDOWN: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; if (Dto.state == 0) { Dto.pos = pos; // If first, use pos, otherwise use current -LOG( log_turnout, 1, ( "RDOWN @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, ("RDOWN @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); } Dto.rot0 = Dto.rot1 = pos; - CreateRotateAnchor(pos); Dto.state = 2; origPos = Dto.pos; #ifdef NEWROTATE origAngle = Dto.angle; #else - Rotate( &origPos, Dto.rot0, -(Dto.angle + curTurnout->endPt[(int)curTurnoutEp].angle) ); + Rotate(&origPos, Dto.rot0, -(Dto.angle + curTurnout->endPt[(int)curTurnoutEp].angle)); #endif validAngle = FALSE; return C_CONTINUE; case C_RMOVE: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; Dto.rot1 = pos; - if ( FindDistance(Dto.rot0, Dto.rot1) > 0.1*mainD.scale ) { - angle = FindAngle( Dto.rot0, Dto.rot1 ); + if (FindDistance(Dto.rot0, Dto.rot1) > 0.1 * mainD.scale) { + angle = FindAngle(Dto.rot0, Dto.rot1); if (!validAngle) { baseAngle = angle/* - Dto.angle*/; validAngle = TRUE; } Dto.pos = origPos; -LOG( log_turnout, 1, ( "RMOVE pre @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + LOG(log_turnout, 1, ("RMOVE pre @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); #ifdef NEWROTATE angle -= baseAngle; - Dto.angle = NormalizeAngle( origAngle + angle ); + Dto.angle = NormalizeAngle(origAngle + angle); #else angle += 180.0; Dto.angle = angle - curTurnout->endPt[(int)curTurnoutEp].angle; #endif - Rotate( &Dto.pos, Dto.rot0, angle ); -LOG( log_turnout, 1, ( "RMOVE post @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); + Rotate(&Dto.pos, Dto.rot0, angle); + LOG(log_turnout, 1, ("RMOVE post @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y)); } - FormatCompoundTitle( listLabels, curTurnout->title ); - InfoMessage( _("Angle = %0.3f (%s)"), PutAngle( NormalizeAngle(Dto.angle + 90.0) ), message ); + FormatCompoundTitle(listLabels, curTurnout->title); + InfoMessage(_("Angle = %0.3f (%s)"), PutAngle(NormalizeAngle(Dto.angle + 90.0)), message); Dto.state = 2; - CreateRotateAnchor(Dto.rot0); return C_CONTINUE; case C_RUP: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; Dto.state = 1; - CreateMoveAnchor(pos); - InfoMessage( _("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel") ); + InfoMessage(_("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel")); return C_CONTINUE; case C_LCLICK: - DYNARR_RESET(trkSeg_t,anchors_da); - if ( curTurnout == NULL ) return C_CONTINUE; - if ( MyGetKeyState() & WKEY_SHIFT ) { + DYNARR_RESET(trkSeg_t, anchors_da); + if (curTurnout == NULL) return C_CONTINUE; + if (MyGetKeyState() & WKEY_SHIFT) { angle = curTurnout->endPt[(int)curTurnoutEp].angle; curTurnoutEp++; if (curTurnoutEp >= (long)curTurnout->endCnt) curTurnoutEp = 0; if (Dto.trk == NULL) - Dto.angle = NormalizeAngle( Dto.angle + (angle - curTurnout->endPt[(int)curTurnoutEp].angle ) ); - PlaceTurnout( Dto.place, Dto.trk ); - } else { - CmdTurnoutAction( C_DOWN, pos ); - CmdTurnoutAction( C_UP, pos ); + Dto.angle = NormalizeAngle(Dto.angle + (angle - curTurnout->endPt[(int)curTurnoutEp].angle)); + PlaceTurnout(Dto.place, Dto.trk); + } + else { + CmdTurnoutAction(C_DOWN, pos); + CmdTurnoutAction(C_UP, pos); } return C_CONTINUE; case C_REDRAW: + wSetCursor(mainD.d, defaultCursor); if (Dto.state) { - DrawSegs( &tempD, Dto.pos, Dto.angle, - curTurnout->segs, curTurnout->segCnt, trackGauge, wDrawColorBlue ); + DrawSegs(&tempD, Dto.pos, Dto.angle, + curTurnout->segs, curTurnout->segCnt, trackGauge, selectedColor); } - if (anchors_da.cnt>0) { - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + if (anchors_da.cnt > 0) { + DrawSegs(&tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack); + wSetCursor(mainD.d, wCursorNone); } if (Dto.state == 2) - DrawLine( &tempD, Dto.rot0, Dto.rot1, 0, wDrawColorBlack ); + DrawLine(&tempD, Dto.rot0, Dto.rot1, 0, wDrawColorBlue); return C_CONTINUE; case C_CANCEL: - DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t, anchors_da); Dto.state = 0; Dto.trk = NULL; /*wHide( newTurn.reg.win );*/ return C_TERMINATE; case C_TEXT: - if ((action>>8) != ' ') + if ((action >> 8) != ' ') return C_CONTINUE; /*no break*/ case C_OK: - DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t, anchors_da); AddTurnout(); - Dto.state=0; + Dto.state = 0; Dto.trk = NULL; return C_TERMINATE; case C_FINISH: - DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t, anchors_da); if (Dto.state != 0 && Dto.trk != NULL) - CmdTurnoutAction( C_OK, pos ); + CmdTurnoutAction(C_OK, pos); else - CmdTurnoutAction( C_CANCEL, pos ); + CmdTurnoutAction(C_CANCEL, pos); return C_TERMINATE; case C_CMDMENU: menuPos = pos; - wMenuPopupShow( turnoutPopupM ); + wMenuPopupShow(turnoutPopupM); return C_CONTINUE; default: @@ -2919,83 +4822,84 @@ LOG( log_turnout, 1, ( "RMOVE post @ %0.3fx%0.3f\n", Dto.pos.x, Dto.pos.y ) ); #ifdef TURNOUTCMD static STATUS_T CmdTurnout( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos) { wIndex_t turnoutIndex; - turnoutInfo_t * turnoutPtr; + turnoutInfo_t* turnoutPtr; switch (action & 0xFF) { case C_START: if (turnoutW == NULL) { -/* turnoutW = ParamCreateDialog( &turnoutPG, MakeWindowTitle("Turnout"), "Ok", , (paramActionCancelProc)Reset, TRUE, NULL, F_RESIZE|F_RECALLSIZE, TurnoutDlgUpdate ); */ - turnoutW = ParamCreateDialog( &turnoutPG, MakeWindowTitle(_("Turnout")), _("Close"), (paramActionOkProc)TurnoutOk, wHide, TRUE, NULL, F_RESIZE|F_RECALLSIZE|PD_F_ALT_CANCELLABEL, TurnoutDlgUpdate ); - InitNewTurn( turnoutNewM ); + /* turnoutW = ParamCreateDialog( &turnoutPG, MakeWindowTitle("Turnout"), "Ok", , (paramActionCancelProc)Reset, TRUE, NULL, F_RESIZE|F_RECALLSIZE, TurnoutDlgUpdate ); */ + turnoutW = ParamCreateDialog(&turnoutPG, MakeWindowTitle(_("Turnout")), _("Close"), (paramActionOkProc)TurnoutOk, wHide, TRUE, NULL, F_RESIZE | F_RECALLSIZE | PD_F_ALT_CANCELLABEL, TurnoutDlgUpdate); + InitNewTurn(turnoutNewM); } -/* ParamDialogOkActive( &turnoutPG, FALSE ); */ - turnoutIndex = wListGetIndex( turnoutListL ); + /* ParamDialogOkActive( &turnoutPG, FALSE ); */ + turnoutIndex = wListGetIndex(turnoutListL); turnoutPtr = curTurnout; - wShow( turnoutW ); - TurnoutChange( CHANGE_PARAMS|CHANGE_SCALE ); + wShow(turnoutW); + TurnoutChange(CHANGE_PARAMS | CHANGE_SCALE); if (curTurnout == NULL) { - NoticeMessage2( 0, MSG_TURNOUT_NO_TURNOUT, _("Ok"), NULL ); + NoticeMessage2(0, MSG_TURNOUT_NO_TURNOUT, _("Ok"), NULL); return C_TERMINATE; } if (turnoutIndex > 0 && turnoutPtr) { curTurnout = turnoutPtr; - wListSetIndex( turnoutListL, turnoutIndex ); - RedrawTurnout(); + wListSetIndex(turnoutListL, turnoutIndex); + RedrawTurnout( turnoutD.d, NULL, 0, 0 ); } - InfoMessage( _("Pick turnout and active End Point, then place on the layout")); - ParamLoadControls( &turnoutPG ); - ParamGroupRecord( &turnoutPG ); - return CmdTurnoutAction( action, pos ); + InfoMessage(_("Pick turnout and active End Point, then place on the layout")); + ParamLoadControls(&turnoutPG); + ParamGroupRecord(&turnoutPG); + SetAllTrackSelect(FALSE); + return CmdTurnoutAction(action, pos); case wActionMove: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_DOWN: case C_RDOWN: - ParamDialogOkActive( &turnoutPG, TRUE ); + ParamDialogOkActive(&turnoutPG, TRUE); if (hideTurnoutWindow) - wHide( turnoutW ); - if (((action&0xFF) == C_DOWN) && (MyGetKeyState()&WKEY_CTRL)) + wHide(turnoutW); + if (((action & 0xFF) == C_DOWN) && (MyGetKeyState() & WKEY_CTRL)) return CmdTurnoutAction(C_RDOWN, pos); //Convert CTRL into Right /*no break*/ case C_MOVE: - if (MyGetKeyState()&WKEY_CTRL) - return CmdTurnoutAction (C_RMOVE, pos); + if (MyGetKeyState() & WKEY_CTRL) + return CmdTurnoutAction(C_RMOVE, pos); /*no break*/ case C_RMOVE: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_UP: case C_RUP: if (hideTurnoutWindow) - wShow( turnoutW ); + wShow(turnoutW); - InfoMessage( _("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel") ); - if (((action&0xFF) == C_UP) && (MyGetKeyState()&WKEY_CTRL)) - return CmdTurnoutAction (C_RUP, pos); - return CmdTurnoutAction( action, pos ); + InfoMessage(_("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel")); + if (((action & 0xFF) == C_UP) && (MyGetKeyState() & WKEY_CTRL)) + return CmdTurnoutAction(C_RUP, pos); + return CmdTurnoutAction(action, pos); case C_LCLICK: - CmdTurnoutAction( action, pos ); + CmdTurnoutAction(action, pos); HilightEndPt(); return C_CONTINUE; case C_CANCEL: - wHide( turnoutW ); - return CmdTurnoutAction( action, pos ); + wHide(turnoutW); + return CmdTurnoutAction(action, pos); case C_TEXT: - CmdTurnoutAction( action, pos ); + CmdTurnoutAction(action, pos); return C_CONTINUE; case C_OK: case C_FINISH: case C_CMDMENU: case C_REDRAW: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); default: return C_CONTINUE; @@ -3003,59 +4907,59 @@ static STATUS_T CmdTurnout( } #endif - + /** * Event procedure for the hotbar. * * \param op IN requested function - * \param data IN pointer to info on selected element + * \param data IN pointer to info on selected element * \param d IN * \param origP IN - * \return + * \return */ -static char * CmdTurnoutHotBarProc( - hotBarProc_e op, - void * data, - drawCmd_p d, - coOrd * origP ) +static char* CmdTurnoutHotBarProc( + hotBarProc_e op, + void* data, + drawCmd_p d, + coOrd* origP) { - turnoutInfo_t * to = (turnoutInfo_t*)data; - switch ( op ) { + turnoutInfo_t* to = (turnoutInfo_t*)data; + switch (op) { case HB_SELECT: /* new element is selected */ - CmdTurnoutAction( C_FINISH, zero ); /* finish current operation */ + CmdTurnoutAction(C_FINISH, zero); /* finish current operation */ curTurnout = to; - DoCommandB( (void*)(intptr_t)turnoutHotBarCmdInx ); /* continue with new turnout / structure */ + DoCommandB(I2VP(turnoutHotBarCmdInx)); /* continue with new turnout / structure */ return NULL; case HB_LISTTITLE: - FormatCompoundTitle( listLabels, to->title ); + FormatCompoundTitle(listLabels, to->title); if (message[0] == '\0') - FormatCompoundTitle( listLabels|LABEL_DESCR, to->title ); + FormatCompoundTitle(listLabels | LABEL_DESCR, to->title); return message; case HB_BARTITLE: - FormatCompoundTitle( hotBarLabels<<1, to->title ); + FormatCompoundTitle(hotBarLabels << 1, to->title); return message; case HB_FULLTITLE: return to->title; case HB_DRAW: - DrawSegs( d, *origP, 0.0, to->segs, to->segCnt, trackGauge, wDrawColorBlack ); + DrawSegs(d, *origP, 0.0, to->segs, to->segCnt, trackGauge, wDrawColorBlack); return NULL; } return NULL; } -EXPORT void AddHotBarTurnouts( void ) +EXPORT void AddHotBarTurnouts(void) { wIndex_t inx; - turnoutInfo_t * to; - for ( inx=0; inx < turnoutInfo_da.cnt; inx ++ ) { + turnoutInfo_t* to; + for (inx = 0; inx < turnoutInfo_da.cnt; inx++) { to = turnoutInfo(inx); - if ( !( IsParamValid(to->paramFileIndex) && - to->segCnt > 0 && - CompatibleScale( TRUE, to->scaleInx, GetLayoutCurScale()) ) ) - continue; - AddHotBarElement( to->contentsLabel, to->size, to->orig, TRUE, FALSE, to->barScale, to, CmdTurnoutHotBarProc ); + if (!(IsParamValid(to->paramFileIndex) && + to->segCnt > 0 && + (FIT_NONE != CompatibleScale(FIT_TURNOUT, to->scaleInx, GetLayoutCurScale())))) + continue; + AddHotBarElement(to->contentsLabel, to->size, to->orig, TRUE, FALSE, to->barScale, to, CmdTurnoutHotBarProc); } } @@ -3068,8 +4972,8 @@ EXPORT void AddHotBarTurnouts( void ) */ static STATUS_T CmdTurnoutHotBar( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos) { switch (action & 0xFF) { @@ -3077,61 +4981,61 @@ static STATUS_T CmdTurnoutHotBar( case C_START: //TurnoutChange( CHANGE_PARAMS|CHANGE_SCALE ); if (curTurnout == NULL) { - NoticeMessage2( 0, MSG_TURNOUT_NO_TURNOUT, _("Ok"), NULL ); + NoticeMessage2(0, MSG_TURNOUT_NO_TURNOUT, _("Ok"), NULL); return C_TERMINATE; } - FormatCompoundTitle( listLabels|LABEL_DESCR, curTurnout->title ); - InfoMessage( _("Place %s and draw into position"), message ); - wIndex_t listIndex = FindListItemByContext( turnoutListL, curTurnout ); - if ( listIndex > 0 ) - turnoutInx = listIndex; - ParamLoadControls( &turnoutPG ); - ParamGroupRecord( &turnoutPG ); - return CmdTurnoutAction( action, pos ); + FormatCompoundTitle(listLabels | LABEL_DESCR, curTurnout->title); + InfoMessage(_("Place %s and draw into position"), message); + wIndex_t listIndex = FindListItemByContext(turnoutListL, curTurnout); + if (listIndex >= 0) + turnoutInx = listIndex; + ParamLoadControls(&turnoutPG); + ParamGroupRecord(&turnoutPG); + return CmdTurnoutAction(action, pos); case wActionMove: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_DOWN: - if (MyGetKeyState()&WKEY_CTRL) { - return CmdTurnoutAction( C_RDOWN, pos ); + if (MyGetKeyState() & WKEY_CTRL) { + return CmdTurnoutAction(C_RDOWN, pos); } /*no break*/ case C_RDOWN: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_MOVE: - if (MyGetKeyState()&WKEY_CTRL) { - return CmdTurnoutAction( C_RMOVE, pos ); + if (MyGetKeyState() & WKEY_CTRL) { + return CmdTurnoutAction(C_RMOVE, pos); } /*no break*/ case C_RMOVE: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_UP: - if (MyGetKeyState()&WKEY_CTRL) { - return CmdTurnoutAction( C_RUP, pos ); + if (MyGetKeyState() & WKEY_CTRL) { + return CmdTurnoutAction(C_RUP, pos); } /*no break*/ case C_RUP: - InfoMessage( _("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel") ); - return CmdTurnoutAction( action, pos ); + InfoMessage(_("Left-Drag to place, Ctrl+Left-Drag or Right-Drag to Rotate, Space or Enter to accept, Esc to Cancel")); + return CmdTurnoutAction(action, pos); case C_REDRAW: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); case C_TEXT: - if ((action>>8) != ' ') + if ((action >> 8) != ' ') return C_CONTINUE; /* no break*/ case C_OK: - CmdTurnoutAction( action, pos ); + CmdTurnoutAction(action, pos); return C_CONTINUE; case C_CANCEL: HotBarCancel(); /*no break*/ default: - return CmdTurnoutAction( action, pos ); + return CmdTurnoutAction(action, pos); } } @@ -3139,96 +5043,96 @@ static STATUS_T CmdTurnoutHotBar( #include "bitmaps/turnout.xpm" -EXPORT void InitCmdTurnout( wMenu_p menu ) +EXPORT void InitCmdTurnout(wMenu_p menu) { - AddMenuButton( menu, CmdTurnout, "cmdTurnout", _("Predefined Track"), wIconCreatePixMap(turnout_xpm), LEVEL0_50, IC_WANT_MOVE|IC_STICKY|IC_LCLICK|IC_CMDMENU|IC_POPUP2, ACCL_TURNOUT, NULL ); - turnoutHotBarCmdInx = AddMenuButton( menu, CmdTurnoutHotBar, "cmdTurnoutHotBar", "", NULL, LEVEL0_50, IC_WANT_MOVE|IC_STICKY|IC_LCLICK|IC_CMDMENU|IC_POPUP2, 0, NULL ); - RegisterChangeNotification( TurnoutChange ); - ParamRegister( &turnoutPG ); - log_turnout = LogFindIndex( "turnout" ); - log_traverseTurnout = LogFindIndex( "traverseTurnout" ); - log_suppressCheckPaths = LogFindIndex( "suppresscheckpaths" ); - log_splitturnout = LogFindIndex( "splitturnout" ); - if ( turnoutPopupM == NULL ) { - turnoutPopupM = MenuRegister( "Turnout Rotate" ); - AddRotateMenu( turnoutPopupM, TurnoutRotate ); + AddMenuButton(menu, CmdTurnout, "cmdTurnout", _("Predefined Track"), wIconCreatePixMap(turnout_xpm[iconSize]), LEVEL0_50, IC_WANT_MOVE | IC_STICKY | IC_LCLICK | IC_CMDMENU | IC_POPUP2, ACCL_TURNOUT, NULL); + turnoutHotBarCmdInx = AddMenuButton(menu, CmdTurnoutHotBar, "cmdTurnoutHotBar", "", NULL, LEVEL0_50, IC_WANT_MOVE | IC_STICKY | IC_LCLICK | IC_CMDMENU | IC_POPUP2, 0, NULL); + RegisterChangeNotification(TurnoutChange); + ParamRegister(&turnoutPG); + log_turnout = LogFindIndex("turnout"); + log_traverseTurnout = LogFindIndex("traverseTurnout"); + log_suppressCheckPaths = LogFindIndex("suppresscheckpaths"); + log_splitturnout = LogFindIndex("splitturnout"); + if (turnoutPopupM == NULL) { + turnoutPopupM = MenuRegister("Turnout Rotate"); + AddRotateMenu(turnoutPopupM, TurnoutRotate); } } #endif -EXPORT void InitTrkTurnout( void ) +EXPORT void InitTrkTurnout(void) { - T_TURNOUT = InitObject( &turnoutCmds ); + T_TURNOUT = InitObject(&turnoutCmds); /*InitDebug( "Turnout", &debugTurnout );*/ - AddParam( "TURNOUT ", ReadTurnoutParam); + AddParam("TURNOUT ", ReadTurnoutParam); } - + #ifdef TEST wDrawable_t turnoutD; -void wListAddValue( wList_p bl, char * val, wIcon_p, void * listData, void * itemData ) +void wListAddValue(wList_p bl, char* val, wIcon_p, void* listData, void* itemData) { } -void wListClear( wList_p bl ) +void wListClear(wList_p bl) { } -void wDrawSetScale( wDrawable_p d ) +void wDrawSetScale(wDrawable_p d) { d->scale = 1.0; } -void wDrawClear( wDrawable_p d ) +void wDrawClear(wDrawable_p d) { } -void GetTrkCurveCenter( track_p t, coOrd *pos, DIST_T *radius ) +void GetTrkCurveCenter(track_p t, coOrd* pos, DIST_T* radius) { } #ifdef NOTRACK_C -track_p NewTrack( wIndex_t index, TRKTYP_T type, EPINX_T endCnt, SIZE_T extraSize ) +track_p NewTrack(wIndex_t index, TRKTYP_T type, EPINX_T endCnt, SIZE_T extraSize) { return NULL; } -track_p OnTrack( coOrd *pos ) +track_p OnTrack(coOrd* pos) { return NULL; } -void ErrorMessage( char * msg, ... ) +void ErrorMessage(char* msg, ...) { - lprintf( "ERROR : %s\n", msg ); + lprintf("ERROR : %s\n", msg); } -void DeleteTrack( track_p t ) +void DeleteTrack(track_p t) { } -void ConnectTracks( track_p t0, EPINX_T ep0, track_p t1, EPINX_T ep1 ) +void ConnectTracks(track_p t0, EPINX_T ep0, track_p t1, EPINX_T ep1) { } #endif -main( INT_T argc, char * argv[] ) +main(INT_T argc, char* argv[]) { - FILE * f; + FILE* f; char line[STR_SIZE]; wIndex_t lineCnt = 0; /*debugTurnout = 3;*/ - if ((f = fopen("turnout.params", "r" )) == NULL ) { - Perror( "turnout.params" ); + if ((f = fopen("turnout.params", "r")) == NULL) { + Perror("turnout.params"); Exit(1); } - while ( fgets( line, sizeof line, f ) != NULL ) { + while (fgets(line, sizeof line, f) != NULL) { lineCnt++; - ReadTurnoutParam( &lineCnt ); + ReadTurnoutParam(&lineCnt); } } #endif diff --git a/app/bin/cturntbl.c b/app/bin/cturntbl.c index f15aeff..2ef49d1 100644 --- a/app/bin/cturntbl.c +++ b/app/bin/cturntbl.c @@ -20,27 +20,24 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <string.h> - #include "cstraigh.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "cselect.h" +#include "common-ui.h" static TRKTYP_T T_TURNTABLE = -1; -struct extraData { +typedef struct extraDataTurntable_t { + extraDataBase_t base; coOrd pos; DIST_T radius; EPINX_T currEp; BOOL_T reverse; - }; + } extraDataTurntable_t; static DIST_T turntableDiameter = 1.0; @@ -50,17 +47,17 @@ static paramFloatRange_t r1_100 = { 1.0, 100.0, 100 }; static paramData_t turntablePLs[] = { #define turntableDiameterPD (turntablePLs[0]) { PD_FLOAT, &turntableDiameter, "diameter", PDO_DIM|PDO_NOPREF, &r1_100, N_("Diameter") } }; -static paramGroup_t turntablePG = { "turntable", 0, turntablePLs, sizeof turntablePLs/sizeof turntablePLs[0] }; +static paramGroup_t turntablePG = { "turntable", 0, turntablePLs, COUNT( turntablePLs ) }; static BOOL_T ValidateTurntablePosition( track_p trk ) { - struct extraData * xx = GetTrkExtraData(trk); EPINX_T ep, epCnt = GetTrkEndPtCnt(trk); if ( epCnt <= 0 ) return FALSE; + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); ep = xx->currEp; do { if ( GetTrkEndTrk(trk,ep) ) { @@ -77,8 +74,8 @@ static BOOL_T ValidateTurntablePosition( static void ComputeTurntableBoundingBox( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); coOrd hi, lo; + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); hi.x = xx->pos.x+xx->radius; lo.x = xx->pos.x-xx->radius; hi.y = xx->pos.y+xx->radius; @@ -89,9 +86,9 @@ static void ComputeTurntableBoundingBox( track_p trk ) static track_p NewTurntable( coOrd p, DIST_T r ) { track_p t; - struct extraData *xx; + struct extraDataTurntable_t *xx; t = NewTrack( 0, T_TURNTABLE, 0, sizeof *xx ); - xx = GetTrkExtraData(t); + xx = GET_EXTRA_DATA(t, T_TURNTABLE, extraDataTurntable_t); xx->pos = p; xx->radius = r; xx->currEp = 0; @@ -122,7 +119,7 @@ static track_p NewTurntable( coOrd p, DIST_T r ) static ANGLE_T ConstrainTurntableAngle( track_p trk, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); ANGLE_T a, al, ah, aa, aaa; EPINX_T inx, cnt; @@ -161,7 +158,7 @@ static ANGLE_T ConstrainTurntableAngle( track_p trk, coOrd pos ) static EPINX_T NewTurntableEndPt( track_p trk, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); EPINX_T ep = -1; /* Reuse an old empty ep if it exists */ for (int i =0;i< GetTrkEndPtCnt(trk)-1;i++) { @@ -182,14 +179,14 @@ static EPINX_T NewTurntableEndPt( track_p trk, ANGLE_T angle ) static void TurntableGetCenter( track_p trk, coOrd * center, DIST_T * radius) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); *center = xx->pos; *radius = xx->radius; } static void DrawTurntable( track_p t, drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(t, T_TURNTABLE, extraDataTurntable_t); coOrd p0, p1; EPINX_T ep; long widthOptions = DTS_LEFT|DTS_RIGHT; @@ -220,7 +217,7 @@ static void DrawTurntable( track_p t, drawCmd_p d, wDrawColor color ) static DIST_T DistanceTurntable( track_p trk, coOrd * p ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); DIST_T d; ANGLE_T a; coOrd pos0, pos1; @@ -231,7 +228,7 @@ static DIST_T DistanceTurntable( track_p trk, coOrd * p ) Translate( p, xx->pos, a, d+xx->radius ); } else { if ( !ValidateTurntablePosition(trk) ) - return 100000.0; + return DIST_INF; pos0 = GetTrkEndPos(trk,xx->currEp); Translate( &pos1, xx->pos, GetTrkEndAngle(trk,xx->currEp)+180.0, xx->radius ); LineDistance( p, pos0, pos1 ); @@ -256,7 +253,7 @@ static descData_t trntblDesc[] = { static void UpdateTurntable( track_p trk, int inx, descData_p descUpd, BOOL_T final ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); if ( inx == -1 ) return; @@ -282,7 +279,7 @@ static void UpdateTurntable( track_p trk, int inx, descData_p descUpd, BOOL_T fi static void DescribeTurntable( track_p trk, char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); sprintf( str, _("Turntable(%d): Layer=%d Center=[%s %s] Diameter=%s #EP=%d"), GetTrkIndex(trk), GetTrkLayer(trk)+1, FormatDistance(xx->pos.x), FormatDistance(xx->pos.y), @@ -290,7 +287,11 @@ static void DescribeTurntable( track_p trk, char * str, CSIZE_T len ) trntblData.orig = xx->pos; trntblData.diameter = xx->radius*2.0; - trntblData.epCnt = GetTrkEndPtCnt(trk); + int j=0; + for (int i=0;i<GetTrkEndPtCnt(trk);i++) { + if (GetTrkEndTrk(trk,i)) j++; //Only count if track + } + trntblData.epCnt = j; trntblData.layerNumber = GetTrkLayer(trk); trntblDesc[OR].mode = @@ -307,14 +308,20 @@ static void DeleteTurntable( track_p t ) static BOOL_T WriteTurntable( track_p t, FILE * f ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(t, T_TURNTABLE, extraDataTurntable_t); EPINX_T ep; BOOL_T rc = TRUE; + int j = -1, k = 0; + for (ep=0; ep<GetTrkEndPtCnt(t); ep++) { + if (GetTrkEndTrk(t,ep)) j++; + if (ep == xx->currEp) k=j; //Write out the curr->Ep reset to real endPts + } rc &= fprintf(f, "TURNTABLE %d %d 0 0 0 %s %d %0.6f %0.6f 0 %0.6f %d\n", GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), GetTrkVisible(t), - xx->pos.x, xx->pos.y, xx->radius, xx->currEp )>0; - for (ep=0; ep<GetTrkEndPtCnt(t); ep++) - rc &= WriteEndPt( f, t, ep ); + xx->pos.x, xx->pos.y, xx->radius, k )>0; + for (ep=0; ep<GetTrkEndPtCnt(t); ep++) { + if (GetTrkEndTrk(t,ep)) rc &= WriteEndPt( f, t, ep ); //Only write if there is a track + } rc &= fprintf(f, "\t%s\n", END_SEGS)>0; return rc; } @@ -322,7 +329,7 @@ static BOOL_T WriteTurntable( track_p t, FILE * f ) static BOOL_T ReadTurntable( char * line ) { track_p trk; - struct extraData *xx; + struct extraDataTurntable_t *xx; TRKINX_T index; BOOL_T visible; DIST_T r; @@ -343,7 +350,7 @@ static BOOL_T ReadTurntable( char * line ) return FALSE; trk = NewTrack( index, T_TURNTABLE, 0, sizeof *xx ); SetEndPts( trk, 0 ); - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); if ( paramVersion < 3 ) { SetTrkVisible(trk, visible!=0); } else { @@ -354,6 +361,7 @@ static BOOL_T ReadTurntable( char * line ) xx->pos = p; xx->radius = r; xx->currEp = currEp; + if (xx->currEp > GetTrkEndPtCnt(trk)) xx->currEp = 0; xx->reverse = 0; ComputeTurntableBoundingBox( trk ); return TRUE; @@ -361,7 +369,7 @@ static BOOL_T ReadTurntable( char * line ) static void MoveTurntable( track_p trk, coOrd orig ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); xx->pos.x += orig.x; xx->pos.y += orig.y; ComputeTurntableBoundingBox( trk ); @@ -369,21 +377,21 @@ static void MoveTurntable( track_p trk, coOrd orig ) static void RotateTurntable( track_p trk, coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); Rotate( &xx->pos, orig, angle ); ComputeTurntableBoundingBox( trk ); } static void RescaleTurntable( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); xx->pos.x *= ratio; xx->pos.y *= ratio; } static ANGLE_T GetAngleTurntable( track_p trk, coOrd pos, EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); if ( programMode == MODE_DESIGN ) { return FindAngle( xx->pos, pos ); } else { @@ -444,12 +452,46 @@ static BOOL_T FindTurntableEndPt( } +static EPINX_T FindTurntableNextEndPt( + track_p trk, + coOrd pos) { + + EPINX_T ep,epfound=-1,epCnt; + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); + ANGLE_T a = FindAngle(xx->pos,pos); + ANGLE_T foundangle = 370.0; + ANGLE_T diff = DifferenceBetweenAngles(GetTrkEndAngle(trk,xx->currEp),a); + BOOL_T forward = TRUE; + if (diff>90) { + forward = FALSE; + } + if (diff<0 && diff>-90) { + forward = FALSE; + } + ANGLE_T currdiff, angle1; + for (ep=0,epCnt=GetTrkEndPtCnt(trk); ep<epCnt; ep++) { + if ( (GetTrkEndTrk(trk,ep)) == NULL ) + continue; + angle1 = GetTrkEndAngle(trk,ep); + if (forward) + currdiff = NormalizeAngle(angle1-a); + else + currdiff = NormalizeAngle(a-angle1); + if (currdiff<foundangle) { + foundangle = currdiff; + epfound = ep; + } + } + return epfound; +} + + static BOOL_T CheckTraverseTurntable( track_p trk, coOrd pos ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); ANGLE_T angle; if ( !ValidateTurntablePosition( trk ) ) @@ -467,7 +509,7 @@ static BOOL_T TraverseTurntable( DIST_T * distR ) { track_p trk = trvTrk->trk; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); coOrd pos0; DIST_T dist, dist1; ANGLE_T angle, angle1; @@ -522,27 +564,30 @@ static BOOL_T TraverseTurntable( static BOOL_T EnumerateTurntable( track_p trk ) { - struct extraData *xx; + struct extraDataTurntable_t *xx; static dynArr_t turntables_da; #define turntables(N) DYNARR_N( FLOAT_T, turntables_da, N ) - int inx; + size_t inx; char tmp[40]; + BOOL_T content = FALSE; if ( trk != NULL ) { - xx = GetTrkExtraData(trk); + content = TRUE; + xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); DYNARR_APPEND( FLOAT_T, turntables_da, 10 ); turntables(turntables_da.cnt-1) = xx->radius*2.0; sprintf( tmp, "Turntable, diameter %s", FormatDistance(turntables(turntables_da.cnt-1)) ); inx = strlen( tmp ); - if ( inx > (int)enumerateMaxDescLen ) - enumerateMaxDescLen = inx; + if ( inx > enumerateMaxDescLen ) + enumerateMaxDescLen = (int)inx; } else { for (inx=0; inx<turntables_da.cnt; inx++) { + content = TRUE; sprintf( tmp, "Turntable, diameter %s", FormatDistance(turntables(inx)) ); - EnumerateList( 1, 0.0, tmp ); + EnumerateList( 1, 0.0, tmp, NULL ); } DYNARR_RESET( FLOAT_T, turntables_da ); } - return TRUE; + return content; } @@ -620,7 +665,7 @@ EXPORT BOOL_T ConnectTurntableTracks( UndoModify(trk1); EPINX_T ep = NewTurntableEndPt(trk1,angle); if (ConnectTracks( trk1, ep, trk2, ep2 )) { - UndoUndo(); + UndoUndo(NULL); return FALSE; } return TRUE; @@ -687,7 +732,7 @@ static BOOL_T MoveEndPtTurntable( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d if (!found) *ep = NewTurntableEndPt(*trk,angle0); else { - struct extraData *xx = GetTrkExtraData(*trk); + struct extraDataTurntable_t *xx = GET_EXTRA_DATA(*trk, T_TURNTABLE, extraDataTurntable_t); coOrd pos1; PointOnCircle( &pos1, xx->pos, xx->radius, angle0 ); SetTrkEndPoint(*trk, *ep, pos1, angle0); //Reuse @@ -730,15 +775,16 @@ static void FlipTurntable( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); FlipPoint( &xx->pos, orig, angle ); ComputeBoundingBox( trk ); } +BOOL_T debug = 0; static void DrawTurntablePositionIndicator( track_p trk, wDrawColor color ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); coOrd pos0, pos1; ANGLE_T angle; @@ -748,12 +794,22 @@ static void DrawTurntablePositionIndicator( track_p trk, wDrawColor color ) angle = FindAngle( xx->pos, pos0 ); PointOnCircle( &pos1, xx->pos, xx->radius, angle+180.0 ); DrawLine( &tempD, pos0, pos1, 3, color ); + if (debug) { + if (xx->reverse) { + + Rotate(&pos1,xx->pos, 15); + DrawFillCircle( &tempD, pos1, 0.5, color); + } else { + Rotate(&pos0,xx->pos, 10); + DrawFillCircle( &tempD, pos0, 0.5, color); + } + } } static wBool_t CompareTurntable( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataTurntable_t *xx1 = GET_EXTRA_DATA( trk1, T_TURNTABLE, extraDataTurntable_t ); + struct extraDataTurntable_t *xx2 = GET_EXTRA_DATA( trk2, T_TURNTABLE, extraDataTurntable_t ); char * cp = message + strlen(message); REGRESS_CHECK_POS( "Pos", xx1, xx2, pos ) REGRESS_CHECK_DIST( "Radius", xx1, xx2, radius ) @@ -768,31 +824,64 @@ static void AdvanceTurntablePositionIndicator( coOrd * posR, ANGLE_T * angleR ) { - struct extraData * xx = GetTrkExtraData(trk); + + struct extraDataTurntable_t * xx = GET_EXTRA_DATA(trk, T_TURNTABLE, extraDataTurntable_t); EPINX_T ep; ANGLE_T angle0, angle1; - BOOL_T reverse; - - angle1 = FindAngle( xx->pos, pos ); - if ( !FindTurntableEndPt( trk, &angle1, &ep, &reverse ) ) - return; + BOOL_T reverse=FALSE, train_reversed = FALSE; + EPINX_T epCnt=GetTrkEndPtCnt(trk); + EPINX_T epbest = -1, epfound = -1; + coOrd inpos = *posR; + ANGLE_T inangle = *angleR; angle0 = GetTrkEndAngle(trk,xx->currEp); - if ( ep == xx->currEp ) { - Rotate( posR, xx->pos, 180.0 ); - if ( xx->reverse ) { - angle1 = angle0; - xx->reverse = FALSE; + if (fabs(DifferenceBetweenAngles(angle0,*angleR))>90) train_reversed = TRUE; + DIST_T dd = DIST_INF; + // If on ep, use that + for (ep=0; ep<epCnt; ep++) { + if ( (GetTrkEndTrk(trk,ep)) == NULL ) + continue; + coOrd end = GetTrkEndPos(trk,ep); + DIST_T d = FindDistance(end,pos); + if (d<dd) { + dd = d; + epbest = ep; + } + } + if (epbest>=0 && IsClose(dd)) { + epfound = epbest; + } + // Else find next track in given direction beyond current + if (epfound<0) { + epfound = FindTurntableNextEndPt( trk, pos ); + } + if (epfound>=0) { + if (xx->currEp == epfound ) { + reverse = TRUE; + xx->reverse = !xx->reverse; + train_reversed = !train_reversed; } else { - angle1 = NormalizeAngle( angle0+180.0 ); - xx->reverse = TRUE; + //If back end moving, flip result + if (fabs(DifferenceBetweenAngles(FindAngle(xx->pos,pos),GetTrkEndAngle(trk,xx->currEp)))>90) { + if (epfound>=0 && epfound != xx->currEp) { + reverse = TRUE; + xx->reverse = !xx->reverse; + train_reversed = !train_reversed; + } + } } - } else { - angle1 = GetTrkEndAngle(trk,ep); - Rotate( posR, xx->pos, angle1-angle0 ); - xx->reverse = FALSE; + xx->currEp = epfound; + angle1 = GetTrkEndAngle(trk,xx->currEp); + if (!reverse) { + *angleR = NormalizeAngle(angle1+(train_reversed?180:0)); + Translate( posR, xx->pos, *angleR, FindDistance(*posR,xx->pos) ); + } else { + *angleR = NormalizeAngle(angle1+(train_reversed?180:0)); + Translate(posR, xx->pos, *angleR, FindDistance(*posR,xx->pos) ); + } + coOrd outpos = *posR; + if (debug) + InfoMessage("AO:%0.3f PO:(%0.3f,%0.3f) AI:%0.3f PI:(%0.3f,%0.3f)",*angleR,outpos.x,outpos.y,inangle,inpos.x,inpos.y); } - *angleR = angle1; - xx->currEp = ep; } @@ -856,6 +945,7 @@ static STATUS_T CmdTurntable( wAction_t action, coOrd pos ) controls[1] = NULL; labels[0] = N_("Diameter"); InfoSubstituteControls( controls, labels ); + SetAllTrackSelect( FALSE ); /*InfoMessage( "Place Turntable");*/ state = 0; return C_CONTINUE; @@ -908,12 +998,12 @@ static STATUS_T CmdTurntable( wAction_t action, coOrd pos ) } -#include "bitmaps/turntbl.xpm" +#include "bitmaps/turntable.xpm" EXPORT void InitCmdTurntable( wMenu_p menu ) { - AddMenuButton( menu, CmdTurntable, "cmdTurntable", _("Custom Turntable"), wIconCreatePixMap(turntbl_xpm), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY, ACCL_TURNTABLE, NULL ); + AddMenuButton( menu, CmdTurntable, "cmdTurntable", _("Custom Turntable"), wIconCreatePixMap(turntable_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY, ACCL_TURNTABLE, NULL ); } diff --git a/app/bin/cundo.c b/app/bin/cundo.c index 1ed5588..fda012f 100644 --- a/app/bin/cundo.c +++ b/app/bin/cundo.c @@ -20,21 +20,63 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <time.h> -#include <stdarg.h> -#include <errno.h> -#include <string.h> +/* + * Implements Undo/Redo + * + * Each action/change (New/Modify/Delete) is recorded by UndoNew(), UndoModify(), UndoDelete() within an undo transaction (initiated by UndoStart(). + * + * New tracks are added to the end of the tracklist (headed by to_first). + * + * Modify/Delete generate an undo record (WriteObject) in undoStream. + * Each record contains: + * - op (ModifyOp or DeleteOp) + * - address for the existing track + * - copy of the track + * - endpts, extradata, extra-extradata + * + * Undo pulls records from the undoStream (ReadObject) for the current transation + * to recreate modified and deleted tracks. + * New tracks are snipped from the tracklist + * + * Undone records can be copied to redoStream for susequent redo ops + * + * The undo transactions are stored in a circular buffer (undoStack). + * When this buffer wraps around, the old transaction is recycled, + * At this point, any DeleteOp records in the old transaction are processed + * (DeleteInStream) and the deleted track is Free'd + * + * The streams are expandable ring buffers. + * When the transaction buffer wraps, the unreferenced start of the undoStreams is trimmed. + * THe redoStream is purged for every transaction. + * + * + * Note on Delete + * + * UndoDelete does 2 things: + * 1 Marks the track's transaction record with DeleteOp + * When the transaction record is recycled, the old track object will be Free'd. + * 2 Sets the .delete flag in the track object + * For the most part (except dcar.c and cundo.c) IsTrackDeleted() is used in ASSERTs + * There are a few cases where we have to deal with deleted track. + * In general, we do not need to look inside a deleted track and + * GET_EXTRA_DATA will complain if we try (FreeTrack is the exception) + */ #include "cselect.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "paths.h" #include "track.h" #include "trackx.h" +#include "draw.h" #include "cundo.h" +#include "common-ui.h" + +#include <inttypes.h> + +#include <stdint.h> + +#define SLOG_FMT "0x%.12" PRIxPTR /***************************************************************************** @@ -53,10 +95,10 @@ typedef struct { wIndex_t delCnt; wIndex_t trackCount; track_p newTrks; - long undoStart; - long undoEnd; - long redoStart; - long redoEnd; + uintptr_t undoStart; + uintptr_t undoEnd; + uintptr_t redoStart; + uintptr_t redoEnd; BOOL_T needRedo; track_p * oldTail; track_p * newTail; @@ -76,6 +118,8 @@ static BOOL_T recordUndo = 1; #define UASSERT( ARG, VAL ) \ if (!(ARG)) return UndoFail( #ARG, VAL, __FILE__, __LINE__ ) +#define UASSERT2( ARG, VAL ) \ + if (!(ARG)) { UndoFail( #ARG, VAL, __FILE__, __LINE__ ); return; } #define INC_UNDO_INX( INX ) {\ if (++INX >= UNDO_STACK_SIZE) \ @@ -92,8 +136,8 @@ typedef streamBlocks_t *streamBlocks_p; typedef struct { dynArr_t stream_da; long startBInx; - long end; - long curr; + uintptr_t end; + uintptr_t curr; } stream_t; typedef stream_t *stream_p; static stream_t undoStream; @@ -118,7 +162,7 @@ static void DumpStream( FILE * outf, stream_p stream, char * name ) { long binx; long i, j; - long off; + uintptr_t off; streamBlocks_p blk; int zeroCnt; static char zeros[16] = { 0 }; @@ -132,26 +176,26 @@ static void DumpStream( FILE * outf, stream_p stream, char * name ) zeroCnt++; } else { if ( zeroCnt == 2 ) - fprintf( outf, "%6.6lx 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", off-16 ); + fprintf( outf, "%6.6lx 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", (unsigned long)off-16 ); zeroCnt = 0; } if ( zeroCnt <= 1 ) { - fprintf( outf, "%6.6lx ", off ); + fprintf( outf, SLOG_FMT" ", off ); for ( j=0; j<16; j++ ) { fprintf( outf, "%2.2x ", (unsigned char)((*blk)[i+j]) ); } fprintf( outf, "\n" ); } else if ( zeroCnt == 3 ) { - fprintf( outf, "%6.6lx .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..\n", off ); + fprintf( outf, SLOG_FMT" .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..\n", off ); } off += 16; } } if ( zeroCnt > 2 ) - fprintf( outf, "%6.6lx 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", off-16 ); + fprintf( outf, SLOG_FMT" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n", off-16 ); } -static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber ) +static BOOL_T UndoFail( char * cause, uintptr_t val, char * fileName, int lineNumber ) { int inx, cnt; undoStack_p us; @@ -167,9 +211,10 @@ static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber return FALSE; } time( &clock ); + fprintf(outf, "\nUndo Assert: %s @ %s:%d (%s)\n", cause, fileName, lineNumber, ctime(&clock) ); - fprintf(outf, "Val = %ld(%lx)\n", val, val ); - fprintf(outf, "to_first=%lx, to_last=%lx\n", (long)to_first, (long)to_last ); + fprintf(outf, "Val = %lld(" SLOG_FMT ")\n", (long long)val, val ); + fprintf(outf, "to_first="SLOG_FMT", to_last="SLOG_FMT"\n", (uintptr_t)to_first, (uintptr_t)to_last ); fprintf(outf, "undoHead=%d, doCount=%d, undoCount=%d\n", undoHead, doCount, undoCount ); if (undoHead >= 0 && undoHead < UNDO_STACK_SIZE) inx=undoHead; @@ -177,15 +222,15 @@ static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber inx = 0; for (cnt=0; cnt<UNDO_STACK_SIZE; cnt++) { us = &undoStack[inx]; - fprintf( outf, "US[%d]: M:%d N:%d D:%d TC:%d NT:%lx OT:%lx NT:%lx US:%lx UE:%lx RS:%lx RE:%lx NR:%d\n", + fprintf( outf, "US[%d]: M:%d N:%d D:%d TC:%d NT:"SLOG_FMT" OT:"SLOG_FMT" NT:"SLOG_FMT" US:"SLOG_FMT" UE:"SLOG_FMT" RS:"SLOG_FMT" RE:"SLOG_FMT" NR:%d\n", inx, us->modCnt, us->newCnt, us->delCnt, us->trackCount, - (long)us->newTrks, (long)us->oldTail, (long)us->newTail, + (uintptr_t)us->newTrks, (uintptr_t)us->oldTail, (uintptr_t)us->newTail, us->undoStart, us->undoEnd, us->redoStart, us->redoEnd, us->needRedo ); INC_UNDO_INX(inx); } - fprintf( outf, "Undo: SBI:%ld E:%lx C:%lx SC:%d SM:%d\n", + fprintf( outf, "Undo: SBI:%ld E:"SLOG_FMT" C:"SLOG_FMT" SC:%d SM:%d\n", undoStream.startBInx, undoStream.end, undoStream.curr, undoStream.stream_da.cnt, undoStream.stream_da.max ); - fprintf( outf, "Redo: SBI:%ld E:%lx C:%lx SC:%d SM:%d\n", + fprintf( outf, "Redo: SBI:%ld E:"SLOG_FMT" C:"SLOG_FMT" SC:%d SM:%d\n", redoStream.startBInx, redoStream.end, redoStream.curr, redoStream.stream_da.cnt, redoStream.stream_da.max ); DumpStream( outf, &undoStream, "undoStream" ); DumpStream( outf, &redoStream, "redoStream" ); @@ -199,13 +244,13 @@ static BOOL_T UndoFail( char * cause, long val, char * fileName, int lineNumber BOOL_T ReadStream( stream_t * stream, void * ptr, int size ) { - long binx, boff, brem; + size_t binx, boff, brem; streamBlocks_p blk; if ( stream->curr+size > stream->end ) { - UndoFail( "Overrun on stream", (long)(stream->curr+size), __FILE__, __LINE__ ); + UndoFail( "Overrun on stream", (uintptr_t)(stream->curr+size), __FILE__, __LINE__ ); return FALSE; } -LOG( log_undo, 5, ( "ReadStream( , %lx, %d ) %ld %ld %ld\n", (long)ptr, size, stream->startBInx, stream->curr, stream->end ) ) +LOG( log_undo, 5, ( "ReadStream( , "SLOG_FMT", %d ) %ld %ld %ld\n", (uintptr_t)ptr, size, stream->startBInx, stream->curr, stream->end ) ) binx = stream->curr/BSTREAM_SIZE; boff = stream->curr%BSTREAM_SIZE; stream->curr += size; @@ -231,9 +276,9 @@ LOG( log_undo, 5, ( "ReadStream( , %lx, %d ) %ld %ld %ld\n", (long)ptr, size, st BOOL_T WriteStream( stream_p stream, void * ptr, int size ) { - long binx, boff, brem; + size_t binx, boff, brem; streamBlocks_p blk; -LOG( log_undo, 5, ( "WriteStream( , %lx, %d ) %ld %ld %ld\n", (long)ptr, size, stream->startBInx, stream->curr, stream->end ) ) +LOG( log_undo, 5, ( "WriteStream( , "SLOG_FMT", %d ) %ld "SLOG_FMT" "SLOG_FMT"\n", (uintptr_t)ptr, size, stream->startBInx, stream->curr, stream->end ) ) if (size == 0) return TRUE; binx = stream->end/BSTREAM_SIZE; @@ -254,7 +299,7 @@ LOG( log_undo, 5, ( "WriteStream( , %lx, %d ) %ld %ld %ld\n", (long)ptr, size, s if (size > brem) { memcpy( &(*blk)[boff], ptr, (size_t)brem ); ptr = (char*)ptr + brem; - size -= (size_t)brem; + size -= (int)brem; binx++; boff = 0; brem = BSTREAM_SIZE; @@ -266,15 +311,15 @@ LOG( log_undo, 5, ( "WriteStream( , %lx, %d ) %ld %ld %ld\n", (long)ptr, size, s return TRUE; } -BOOL_T TrimStream( stream_p stream, long off ) +BOOL_T TrimStream( stream_p stream, uintptr_t off ) { - long binx, cnt, inx; + size_t binx, cnt, inx; streamBlocks_p blk; -LOG( log_undo, 3, ( "TrimStream( , %ld )\n", off ) ) +LOG( log_undo, 3, ( " TrimStream( , %ld )\n", off ) ) binx = off/BSTREAM_SIZE; cnt = binx-stream->startBInx; if (recordUndo) - Rprintf("Trim(%ld) %ld blocks (out of %d)\n", off, cnt, stream->stream_da.cnt); + Rprintf("Trim("SLOG_FMT") %ld blocks (out of %d)\n", off, cnt, stream->stream_da.cnt); UASSERT( cnt >= 0 && cnt <= stream->stream_da.cnt, cnt ); if (cnt == 0) return TRUE; @@ -285,7 +330,7 @@ LOG( log_undo, 3, ( "TrimStream( , %ld )\n", off ) ) for (inx=cnt; inx<stream->stream_da.cnt; inx++ ) { DYNARR_N( streamBlocks_p, stream->stream_da, inx-cnt ) = DYNARR_N( streamBlocks_p, stream->stream_da, inx ); } - stream->startBInx = binx; + stream->startBInx =(long)binx; stream->stream_da.cnt -= (wIndex_t)cnt; UASSERT( stream->stream_da.cnt >= 0, stream->stream_da.cnt ); return TRUE; @@ -301,13 +346,14 @@ void ClearStream( stream_p stream ) MyFree( blk ); } stream->stream_da.cnt = 0; - stream->startBInx = stream->end = stream->curr = 0; + stream->startBInx = 0; + stream->end = stream->curr = 0; } -BOOL_T TruncateStream( stream_p stream, long off ) +BOOL_T TruncateStream( stream_p stream, uintptr_t off ) { - long binx, boff, cnt, inx; + size_t binx, boff, cnt, inx; streamBlocks_p blk; LOG( log_undo, 3, ( "TruncateStream( , %ld )\n", off ) ) binx = off/BSTREAM_SIZE; @@ -317,7 +363,7 @@ LOG( log_undo, 3, ( "TruncateStream( , %ld )\n", off ) ) binx -= stream->startBInx; cnt = stream->stream_da.cnt-binx; if (recordUndo) - Rprintf("Truncate(%ld) %ld blocks (out of %d)\n", off, cnt, stream->stream_da.cnt); + Rprintf("Truncate("SLOG_FMT") %ld blocks (out of %d)\n", off, cnt, stream->stream_da.cnt); UASSERT( cnt >= 0 && cnt <= stream->stream_da.cnt, cnt ); if (cnt == 0) return TRUE; @@ -343,7 +389,12 @@ BOOL_T WriteObject( stream_p stream, char op, track_p trk ) !WriteStream( stream, trk->extraData, trk->extraSize )) return FALSE; /* Add a copy of the any type specific data before it is tampered with, for example */ - StoreTrackData(trk,&buff,&len); + if ( !IsTrackDeleted(trk) ) { + StoreTrackData(trk,&buff,&len); + } else { + len = 0; + buff = NULL; + } if (!WriteStream( stream, &len, sizeof len )) return FALSE; if (len) @@ -353,6 +404,13 @@ BOOL_T WriteObject( stream_p stream, char op, track_p trk ) } +/** + * Read an object from a stream + * + * \param stream + * \param needRedo copy current object to redoStream + * + */ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) { track_p trk; @@ -362,12 +420,17 @@ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) return FALSE; if (!ReadStream( stream, &trk, sizeof trk )) return FALSE; + LOG( log_undo, 4, ( " @ " SLOG_FMT " %s\n", stream->curr-1, op==ModifyOp?"Mod":"Del" ) ); if (needRedo) { - if (!WriteObject( &redoStream, op, trk )) + if (!WriteObject( &redoStream, op, trk )) { return FALSE; + } } if (!ReadStream( stream, &tempTrk, sizeof tempTrk )) return FALSE; + if (op == ModifyOp) + UASSERT( (op==ModifyOp) && !IsTrackDeleted(&tempTrk), GetTrkIndex(&tempTrk) ); + // op==DeleteOp doesnot imply that tmpTrk.delete == TRUE: SetDeleteOpInStream if (tempTrk.endCnt != trk->endCnt) tempTrk.endPt = MyRealloc( trk->endPt, tempTrk.endCnt * sizeof tempTrk.endPt[0] ); else @@ -375,7 +438,7 @@ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) if (!ReadStream( stream, tempTrk.endPt, tempTrk.endCnt * sizeof tempTrk.endPt[0] )) return FALSE; if (tempTrk.extraSize != trk->extraSize) - tempTrk.extraData = MyRealloc( trk->extraData, tempTrk.extraSize ); + tempTrk.extraData = (extraDataBase_t*)MyRealloc( trk->extraData, tempTrk.extraSize ); else tempTrk.extraData = trk->extraData; if (!ReadStream( stream, tempTrk.extraData, tempTrk.extraSize )) @@ -389,24 +452,26 @@ static BOOL_T ReadObject( stream_p stream, BOOL_T needRedo ) tempBuff = MyMalloc(Addsize); if (!ReadStream( stream, tempBuff, Addsize )) return FALSE; - ReplayTrackData(&tempTrk, tempBuff, Addsize); + if ( ! IsTrackDeleted(&tempTrk) ) + ReplayTrackData(&tempTrk, tempBuff, Addsize); MyFree(tempBuff); } - RebuildTrackSegs(&tempTrk); //If we had an array of Segs - recreate it - if (recordUndo) Rprintf( "Restore T%D(%d) @ %lx\n", trk->index, tempTrk.index, (long)trk ); + if ( ! IsTrackDeleted(&tempTrk) ) + RebuildTrackSegs(&tempTrk); //If we had an array of Segs - recreate it + if (recordUndo) Rprintf( "Restore T%D(%d) @ "SLOG_FMT"\n", trk->index, tempTrk.index, (uintptr_t)trk ); tempTrk.index = trk->index; tempTrk.next = trk->next; if ( (tempTrk.bits&TB_CARATTACHED) != 0 ) needAttachTrains = TRUE; tempTrk.bits &= ~TB_TEMPBITS; *trk = tempTrk; - if (!trk->deleted) + if (!IsTrackDeleted(trk)) ClrTrkElev( trk ); return TRUE; } -static BOOL_T RedrawInStream( stream_p stream, long start, long end, BOOL_T draw ) +static BOOL_T RedrawInStream( stream_p stream, uintptr_t start, uintptr_t end, BOOL_T draw ) { char op; track_p trk; @@ -422,7 +487,7 @@ static BOOL_T RedrawInStream( stream_p stream, long start, long end, BOOL_T draw if (!ReadStream( stream, &Addsize, sizeof Addsize )) return FALSE; stream->curr += Addsize; - if (!trk->deleted) { + if (!IsTrackDeleted(trk)) { if (draw) DrawNewTrack( trk ); else @@ -433,19 +498,30 @@ static BOOL_T RedrawInStream( stream_p stream, long start, long end, BOOL_T draw } -static BOOL_T DeleteInStream( stream_p stream, long start, long end ) +/** + * Delete unreferenced objects from stream + * + * \param stream + * \param start + * \param end + * + * The current transaction is being recycled: + * unlink and free any deleted objects from the old transaction + */ +static BOOL_T DeleteInStream( stream_p stream, uintptr_t start, uintptr_t end ) { char op; track_p trk; track_p *ptrk; track_t tempTrk; int delCount = 0; -LOG( log_undo, 3, ( "DeleteInSteam( , %ld, %ld )\n", start, end ) ) + LOG( log_undo, 3, ( " DeleteInStream( , "SLOG_FMT", "SLOG_FMT" )\n", start, end ) ) stream->curr = start; while (stream->curr < end ) { if (!ReadStream( stream, &op, sizeof op )) return FALSE; UASSERT( op == ModifyOp || op == DeleteOp, (long)op ); + LOG( log_undo, 4, ( " @ " SLOG_FMT " %s\n", stream->curr-1, op==ModifyOp?"Mod":"Del" ) ); if (!ReadStream( stream, &trk, sizeof trk ) || !ReadStream( stream, &tempTrk, sizeof tempTrk )) return FALSE; @@ -455,8 +531,9 @@ LOG( log_undo, 3, ( "DeleteInSteam( , %ld, %ld )\n", start, end ) ) return FALSE; stream->curr += Addsize; if (op == DeleteOp) { - if (recordUndo) Rprintf( " Free T%D(%d) @ %lx\n", trk->index, tempTrk.index, (long)trk ); - UASSERT( IsTrackDeleted(trk), (long)trk ); + if (recordUndo) Rprintf( " Free T%D(%d) @ "SLOG_FMT"\n", trk->index, tempTrk.index, (uintptr_t)trk ); + LOG( log_undo, 3, ( " Free T%d @ "SLOG_FMT"\n", GetTrkIndex(trk), (uintptr_t)trk ) ); + UASSERT( IsTrackDeleted(trk), GetTrkIndex(trk) ); trk->index = -1; delCount++; } @@ -465,8 +542,9 @@ LOG( log_undo, 3, ( "DeleteInSteam( , %ld, %ld )\n", start, end ) ) if (delCount) { for (ptrk=&to_first; *ptrk; ) { if ((*ptrk)->index == -1) { + // old track to be discarded: Unlink and Free it trk = *ptrk; - UASSERT( IsTrackDeleted(trk), (long)trk ); + UASSERT( IsTrackDeleted(trk), (uintptr_t)trk ); *ptrk = trk->next; FreeTrack(trk); } else { @@ -479,14 +557,25 @@ LOG( log_undo, 3, ( "DeleteInSteam( , %ld, %ld )\n", start, end ) ) } -static BOOL_T SetDeleteOpInStream( stream_p stream, long start, long end, track_p trk0 ) +/** + * Find undo record for 'trk' and change op from Modify to Delete + * + * \param stream + * \param start + * \param end + * \param trk + * + * Note: does not set trk->delete flag + */ +static BOOL_T SetDeleteOpInStream( stream_p stream, uintptr_t start, uintptr_t end, track_p trk0 ) { char op; track_p trk; track_t tempTrk; - long binx, boff; + size_t binx, boff; streamBlocks_p blk; + LOG( log_undo, 3, ( " SetDeleteOpInStream T%d @ "SLOG_FMT"\n", GetTrkIndex(trk0), (uintptr_t)trk0) ); stream->curr = start; while (stream->curr < end) { binx = stream->curr/BSTREAM_SIZE; @@ -495,16 +584,19 @@ static BOOL_T SetDeleteOpInStream( stream_p stream, long start, long end, track_ if (!ReadStream( stream, &op, sizeof op )) return FALSE; UASSERT( op == ModifyOp || op == DeleteOp, (long)op ); + LOG( log_undo, 4, ( " @ " SLOG_FMT " %s\n", stream->curr-1, op==ModifyOp?"Mod":"Del" ) ); if (!ReadStream( stream, &trk, sizeof trk ) ) return FALSE; + if (!ReadStream( stream, &tempTrk, sizeof tempTrk )) + return FALSE; if (trk == trk0) { UASSERT( op == ModifyOp, (long)op ); blk = DYNARR_N( streamBlocks_p, stream->stream_da, binx ); memcpy( &(*blk)[boff], &DeleteOp, sizeof DeleteOp ); + // Should set .delete flag in stream + LOG( log_undo, 3, ( " -> Delete\n") ); return TRUE; } - if (!ReadStream( stream, &tempTrk, sizeof tempTrk )) - return FALSE; stream->curr += tempTrk.extraSize + tempTrk.endCnt*sizeof tempTrk.endPt[0]; long Addsize; if (!ReadStream( stream, &Addsize, sizeof Addsize)) @@ -560,12 +652,21 @@ static track_p * FindParent( track_p trk, int lineNum ) break; ptrk = &(*ptrk)->next; } - UndoFail( "Cannot find trk on list", (long)trk, "cundo.c", lineNum ); + UndoFail( "Cannot find trk on list", (uintptr_t)trk, "cundo.c", lineNum ); return NULL; } static int undoIgnoreEmpty = 0; + +/** + * Start an Undo transcation + * + * \param label help text for balloon help + * \param format logging info + * + * + */ void UndoStart( char * label, char * format, @@ -578,22 +679,18 @@ void UndoStart( int inx; int usp; -LOG( log_undo, 1, ( "UndoStart(%s) [%d] d:%d u:%d us:%ld\n", label, undoHead, doCount, undoCount, undoStream.end ) ) +LOG( log_undo, 1, ( "UndoStart[%d] (%s) d:%d u:%d us:"SLOG_FMT"\n", undoHead, label, undoHead, doCount, undoCount, undoStream.end ) ) if (recordUndo) { va_start( ap, format ); vsprintf( buff, format, ap ); va_end( ap ); - Rprintf( "Start(%s)[%d] d:%d u:%d us:%ld\n", buff, undoHead, doCount, undoCount, undoStream.end ); + Rprintf( "Start(%s)[%d] d:%d u:%d us:"SLOG_FMT"\n", buff, undoHead, doCount, undoCount, undoStream.end ); } if ( undoHead >= 0 ) { us = &undoStack[undoHead]; if ( us->modCnt == 0 && us->delCnt == 0 && us->newCnt == 0 ) { -#ifndef WINDOWS -#ifdef DEBUG - printf( "undoStart noop: %s - %s\n", us->label?us->label:"<>", label?label:"<>" ); -#endif -#endif + LOG( log_undo, 1, ( " noop: %s - %s\n", us->label?us->label:"<>", label?label:"<>" ) ); if ( undoIgnoreEmpty ) { us->label = label; return; @@ -603,8 +700,8 @@ LOG( log_undo, 1, ( "UndoStart(%s) [%d] d:%d u:%d us:%ld\n", label, undoHead, do INC_UNDO_INX(undoHead); us = &undoStack[undoHead]; - changed++; - SetWindowTitle(); + + SetFileChanged(); if (doCount == UNDO_STACK_SIZE) { if (recordUndo) Rprintf( " Wrapped N:%d M:%d D:%d\n", us->newCnt, us->modCnt, us->delCnt ); /* wrapped around stack */ @@ -623,8 +720,9 @@ LOG( log_undo, 1, ( "UndoStart(%s) [%d] d:%d u:%d us:%ld\n", label, undoHead, do us1 = &undoStack[usp]; if (recordUndo) Rprintf(" U[%d] N:%d\n", usp, us1->newCnt ); for (trk=us1->newTrks; trk; trk=next) { - if (recordUndo) Rprintf( " Free T%d @ %lx\n", trk->index, (long)trk ); - /*ASSERT( IsTrackDeleted(trk) );*/ + if (recordUndo) Rprintf( " Free T%d @ "SLOG_FMT"\n", trk->index, (uintptr_t)trk ); + // trk->delete may not be TRUE, see SetDeleteOpInStream + LOG( log_undo, 4, (" Free T%d @ "SLOG_FMT"\n", trk->index, (uintptr_t)trk ) ); next = trk->next; FreeTrack( trk ); } @@ -659,6 +757,13 @@ LOG( log_undo, 1, ( "UndoStart(%s) [%d] d:%d u:%d us:%ld\n", label, undoHead, do } +/** + * Record Modify'd track for Undo + * \param trk + * + * If track has not been previously recorded in these Undo transaction + * or is not 'new' write the track to the undoStream which a ModifyOp flag + */ BOOL_T UndoModify( track_p trk ) { undoStack_p us; @@ -667,15 +772,15 @@ BOOL_T UndoModify( track_p trk ) if (trk == NULL) return TRUE; UASSERT(undoCount==0, undoCount); UASSERT(undoHead >= 0, undoHead); - UASSERT(!IsTrackDeleted(trk), (long)trk); + UASSERT(!IsTrackDeleted(trk), GetTrkIndex(trk)); if (trk->modified || trk->new) return TRUE; -LOG( log_undo, 2, ( " UndoModify( T%d, E%d, X%ld )\n", trk->index, trk->endCnt, trk->extraSize ) ) +LOG( log_undo, 2, ( " UndoModify( T%d, E%d, X%ld @ "SLOG_FMT"\n", trk->index, trk->endCnt, trk->extraSize, (uintptr_t)trk ) ) if ( (GetTrkBits(trk)&TB_CARATTACHED)!=0 ) needAttachTrains = TRUE; us = &undoStack[undoHead]; if (recordUndo) - Rprintf( " MOD T%d @ %lx\n", trk->index, (long)trk ); + Rprintf( " MOD T%d @ "SLOG_FMT"\n", trk->index, (uintptr_t)trk ); if (!WriteObject( &undoStream, ModifyOp, trk )) return FALSE; us->undoEnd = undoStream.end; @@ -685,32 +790,45 @@ LOG( log_undo, 2, ( " UndoModify( T%d, E%d, X%ld )\n", trk->index, trk->endCn } +/** + * Record that the track has been deleted + * + * \param trk + * + * If the track has been Modified, then update undoStream to change op to DeleteOp + * If the track is not New, then write the record to the undoSteam with a DeleteOp + * When this undo transaction is recycled, DeleteOp records will unlinked and freed. + * + * Otherwise, we're deleting a New track: remove it from track list and discard it + */ BOOL_T UndoDelete( track_p trk ) { undoStack_p us; if ( !undoActive ) return TRUE; -LOG( log_undo, 2, ( " UndoDelete( T%d, E%d, X%ld )\n", trk->index, trk->endCnt, trk->extraSize ) ) +LOG( log_undo, 2, ( " UndoDelete( T%d, E%d, X%ld @ "SLOG_FMT" )\n", trk->index, trk->endCnt, trk->extraSize, (uintptr_t)trk ) ) if ( (GetTrkBits(trk)&TB_CARATTACHED)!=0 ) needAttachTrains = TRUE; us = &undoStack[undoHead]; if (recordUndo) - Rprintf( " DEL T%d @ %lx\n", trk->index, (long)trk ); - UASSERT( !IsTrackDeleted(trk), (long)trk ); + Rprintf( " DEL T%d @ "SLOG_FMT"\n", trk->index, (uintptr_t)trk ); + UASSERT( !IsTrackDeleted(trk), trk->index ); if ( trk->modified ) { if (!SetDeleteOpInStream( &undoStream, us->undoStart, us->undoEnd, trk )) return FALSE; } else if ( !trk->new ) { + LOG( log_undo, 3, ( " Write DeleteOp object\n" ) ); if (!WriteObject( &undoStream, DeleteOp, trk )) return FALSE; us->undoEnd = undoStream.end; } else { + LOG( log_undo, 3, ( " Remove New object\n" ) ); track_p * ptrk; if (us->newTrks == trk) us->newTrks = trk->next; if (!(ptrk = FindParent( trk, __LINE__ ))) return FALSE; if (trk->next == NULL) { - UASSERT( to_last == &(*ptrk)->next, (long)&(*ptrk)->next ); + UASSERT( to_last == &(*ptrk)->next, (uintptr_t)&(*ptrk)->next ); to_last = ptrk; } *ptrk = trk->next; @@ -718,22 +836,30 @@ LOG( log_undo, 2, ( " UndoDelete( T%d, E%d, X%ld )\n", trk->index, trk->endCn us->newCnt--; return TRUE; } + ClrTrkBits( trk, TB_SELECTED ); trk->deleted = TRUE; us->delCnt++; return TRUE; } - +/** + * Record a New track for Undo + * + * \param trk + * + * New tracks are added to the end of the Track list + * Save the begining of New tracks in this Undo transaction in us->newTrks + */ BOOL_T UndoNew( track_p trk ) { undoStack_p us; if (!undoActive) return TRUE; -LOG( log_undo, 2, ( " UndoNew( T%d )\n", trk->index ) ) +LOG( log_undo, 2, ( " UndoNew( T%d @ "SLOG_FMT")\n", trk->index, (uintptr_t)trk ) ) if (recordUndo) - Rprintf( " NEW T%d @%lx\n", trk->index, (long)trk ); + Rprintf( " NEW T%d @"SLOG_FMT"\n", trk->index, (uintptr_t)trk ); UASSERT(undoCount==0, undoCount); UASSERT(undoHead >= 0, undoHead); us = &undoStack[undoHead]; @@ -746,6 +872,9 @@ LOG( log_undo, 2, ( " UndoNew( T%d )\n", trk->index ) ) } +/** + * End of a Undo transaction + */ void UndoEnd( void ) { if (recordUndo) Rprintf( "End[%d] d:%d\n", undoHead, doCount ); @@ -758,6 +887,9 @@ void UndoEnd( void ) } +/** + * Reset the Undo state + */ void UndoClear( void ) { int inx; @@ -775,8 +907,19 @@ LOG( log_undo, 2, ( " UndoClear()\n" ) ) } -BOOL_T UndoUndo( void ) +EXPORT wBool_t undoStatus = TRUE; + +/** + * Undo the last transaction + * + * Move any New tracks from the end of the Track list + * Cut the Track list at us->newTrks + * Read Modified/Deleted tracks from undoSteam + * Cleanup: redraw, update elevs, cars, counts, ... + */ +void UndoUndo( void * unused ) { + undoStatus = FALSE; undoStack_p us; track_p trk; wIndex_t oldCount; @@ -784,13 +927,13 @@ BOOL_T UndoUndo( void ) if (doCount <= 0) { ErrorMessage( MSG_NO_UNDO ); - return FALSE; + return; } - ConfirmReset( FALSE ); + int rc = ConfirmReset( FALSE ); wDrawDelayUpdate( mainD.d, TRUE ); us = &undoStack[undoHead]; -LOG( log_undo, 1, ( " undoUndo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt ) ) +LOG( log_undo, 1, ( " UndoUndo[%d] d:%d u:%d N:%d M:%d D:%d %s\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt, us->needRedo?"Redo":"" ) ) if (recordUndo) Rprintf( "Undo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt ); //redrawAll = (us->newCnt+us->modCnt) > incrementalDrawLimit; @@ -803,22 +946,16 @@ LOG( log_undo, 1, ( " undoUndo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doC if (us->needRedo) us->redoStart = us->redoEnd = redoStream.end; - for (trk=us->newTrks; trk; trk=trk->next ) { - if (recordUndo) Rprintf(" Deleting New Track T%d @ %lx\n", trk->index, (long)trk ); - UASSERT( !IsTrackDeleted(trk), (long)trk ); - trk->deleted = TRUE; - } if (!(us->oldTail=FindParent(us->newTrks,__LINE__))) - return FALSE; + return; us->newTail = to_last; to_last = us->oldTail; *to_last = NULL; - needAttachTrains = FALSE; undoStream.curr = us->undoStart; while ( undoStream.curr < us->undoEnd ) { if (!ReadObject( &undoStream, us->needRedo )) - return FALSE; + return; } if (us->needRedo) us->redoEnd = redoStream.end; @@ -847,12 +984,21 @@ LOG( log_undo, 1, ( " undoUndo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doC SetButtons( doCount>0, TRUE ); wBalloonHelpUpdate(); wDrawDelayUpdate( mainD.d, FALSE ); - return TRUE; + undoStatus = TRUE; + return; } -BOOL_T UndoRedo( void ) +/** + * Undo and last Undo op + * + * Attach the New tracks to the end of the Track list + * Read Modified/Deleted object from redoStream + * Cleanup: redraw, update elevs, cars, counts, ... + */ +void UndoRedo( void * unused ) { + undoStatus = FALSE; undoStack_p us; wIndex_t oldCount; BOOL_T redrawAll; @@ -860,14 +1006,14 @@ BOOL_T UndoRedo( void ) if (undoCount <= 0) { ErrorMessage( MSG_NO_REDO ); - return FALSE; + return; } - ConfirmReset( FALSE ); + int rc = ConfirmReset( FALSE ); wDrawDelayUpdate( mainD.d, TRUE ); INC_UNDO_INX( undoHead ); us = &undoStack[undoHead]; -LOG( log_undo, 1, ( " undoRedo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt ) ) +LOG( log_undo, 1, ( " UndoRedo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt ) ) if (recordUndo) Rprintf( "Redo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doCount, undoCount, us->newCnt, us->modCnt, us->delCnt ); //redrawAll = (us->newCnt+us->modCnt) > incrementalDrawLimit; @@ -876,22 +1022,17 @@ LOG( log_undo, 1, ( " undoRedo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doC RedrawInStream( &redoStream, us->redoStart, us->redoEnd, FALSE ); } - for (trk=us->newTrks; trk; trk=trk->next ) { - if (recordUndo) Rprintf(" Undeleting New Track T%d @ %lx\n", trk->index, (long)trk ); - UASSERT( IsTrackDeleted(trk), (long)trk ); - trk->deleted = FALSE; - } - UASSERT( us->newTail != NULL, (long)us->newTail ); + UASSERT2( us->newTail != NULL, (uintptr_t)us->newTail ); *to_last = us->newTrks; to_last = us->newTail; - UASSERT( (*to_last) == NULL, (long)*to_last ); + UASSERT2( (*to_last) == NULL, (uintptr_t)*to_last ); RenumberTracks(); needAttachTrains = FALSE; redoStream.curr = us->redoStart; while ( redoStream.curr < us->redoEnd ) { if (!ReadObject( &redoStream, FALSE )) - return FALSE; + return; } if ( needAttachTrains ) { @@ -919,7 +1060,8 @@ LOG( log_undo, 1, ( " undoRedo[%d] d:%d u:%d N:%d M:%d D:%d\n", undoHead, doC SetButtons( TRUE, undoCount>0 ); wBalloonHelpUpdate(); wDrawDelayUpdate( mainD.d, FALSE ); - return TRUE; + undoStatus = TRUE; + return; } diff --git a/app/bin/cundo.h b/app/bin/cundo.h index 89beab3..4b7fca1 100644 --- a/app/bin/cundo.h +++ b/app/bin/cundo.h @@ -24,10 +24,10 @@ #define HAVE_CUNDO_H
#include "common.h" -#include "track.h" -int UndoUndo( void ); -int UndoRedo( void ); +extern wBool_t undoStatus; // Status of the last Undo/Redo command +void UndoUndo( void * unused ); +void UndoRedo( void * unused ); void UndoResume( void ); void UndoSuspend( void ); void UndoStart( char *, char *, ... ); diff --git a/app/bin/custom.c b/app/bin/custom.c index 68a996b..1ec38e0 100644 --- a/app/bin/custom.c +++ b/app/bin/custom.c @@ -1,6 +1,6 @@ #define RENAME_H /** \file custom.c - * + * */ /* XTrkCad - Model Railroad CAD @@ -21,30 +21,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#else -#include <sys/stat.h> -#endif -#include <stdarg.h> -#include <errno.h> - #include "cjoin.h" #include "common.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "misc.h" #include "track.h" #include "version.h" @@ -81,6 +61,7 @@ char * sSaveFilePattern = NULL; char * sImageFilePattern = NULL; char * sImportFilePattern = NULL; char * sDXFFilePattern = NULL; +char * sSVGFilePattern = NULL; char * sRecordFilePattern = NULL; char * sNoteFilePattern = NULL; char * sLogFilePattern = NULL; @@ -91,7 +72,6 @@ int iParamVersion = PARAMVERSION; int iMinParamVersion = MINPARAMVERSION; long lParamKey = PARAMKEY; -extern char *userLocale; EXPORT char * MakeWindowTitle( char * name ) { @@ -106,7 +86,7 @@ void InitCmdEasement( void ) { easementP = EasementInit(); } -void DoEasementRedir( void ) +void DoEasementRedir( void * unused ) { if (easementP) easementP(NULL); @@ -139,7 +119,7 @@ BOOL_T Initialize( void ) InitTrkStruct(); InitTrkText(); InitTrkDraw(); - + InitTrkBlock(); InitTrkSwitchMotor(); InitTrkSignal(); @@ -149,12 +129,12 @@ BOOL_T Initialize( void ) InitCmdNote(); memset( message, 0, sizeof message ); - + return TRUE; } /** - * Initialize siome localized strings for filename patterns etc. + * Initialize siome localized strings for filename patterns etc. */ void InitCustom( void ) @@ -177,9 +157,9 @@ void InitCustom( void ) sprintf(buf, _("All %s Files (*.xtc,*.xtce)|*.xtc;*.xtce|" "%s Trackplan (*.xtc)|*.xtc|" "%s Extended Trackplan (*.xtce)|*.xtce|" - "All Files (*)|*"), + "All Files (*)|*"), + Product, Product, - Product, Product ); sSourceFilePattern = strdup(buf); } @@ -206,6 +186,11 @@ void InitCustom( void ) { sDXFFilePattern = strdup(_("Data Exchange Format Files (*.dxf)|*.dxf")); } + if (sSVGFilePattern == NULL) + { + sSVGFilePattern = strdup(_("Scalable Vector Graphics Format Files (*.svg)|*.svg" )); + } + if (sRecordFilePattern == NULL) { sprintf(buf, _("%s Record Files (*.xtr)|*.xtr"), Product); @@ -259,6 +244,10 @@ void CleanupCustom( void ) free(sDXFFilePattern); sDXFFilePattern = NULL; } + if (sSVGFilePattern) { + free(sSVGFilePattern); + sSVGFilePattern = NULL; + } if (sRecordFilePattern) { free(sRecordFilePattern); @@ -279,9 +268,4 @@ void CleanupCustom( void ) free(sPartsListFilePattern); sPartsListFilePattern = NULL; } - if (userLocale) - { - free(userLocale); - userLocale = NULL; - } } diff --git a/app/bin/custom.h b/app/bin/custom.h index 1c4f7b6..abef217 100644 --- a/app/bin/custom.h +++ b/app/bin/custom.h @@ -23,8 +23,7 @@ #ifndef CUSTOM_H #define CUSTOM_H -#include "wlib.h" -#include "misc.h" +#include "common.h" #define ICON_WIDTH (64) #define ICON_HEIGHT (64) @@ -46,6 +45,7 @@ #define BG_FILE (14) #define BG_CONTROL (15) #define BG_EXPORTIMPORT (16) +#define BG_PRINT (17) #define BG_BIGGAP (1<<8) extern int cmdGroup; @@ -72,6 +72,7 @@ extern char * sSaveFilePattern; extern char * sImageFilePattern; extern char * sImportFilePattern; extern char * sDXFFilePattern; +extern char * sSVGFilePattern; extern char * sRecordFilePattern; extern char * sNoteFilePattern; extern char * sLogFilePattern; @@ -140,7 +141,7 @@ void InitCmdNote(); void InitCmdUndo( void ); void InitCmdStruct( wMenu_p menu ); void InitCmdAboveBelow( void ); -void InitCmdEnumerate( void ); +//void InitCmdEnumerate( void ); void InitCmdExport( void ); void InitCmdEasement( void ); @@ -151,7 +152,7 @@ void InitLayers( void ); void InitHotBar( void ); void InitCarDlg( void ); BOOL_T Initialize( void ); -void DoEasementRedir( void ); +void DoEasementRedir( void * unused ); void DoStructDesignerRedir( void ); void InitNewTurnRedir( wMenu_p ); diff --git a/app/bin/dbench.c b/app/bin/dbench.c index c8d944f..7619fcb 100644 --- a/app/bin/dbench.c +++ b/app/bin/dbench.c @@ -20,14 +20,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <stdio.h> -#include <string.h> - -#include "i18n.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common.h" /***************************************************************************** * @@ -125,12 +120,13 @@ static dynArr_t benchType_da; static void AddBenchTypes( long type, - char * key, - char * defvalue ) + const char * key, + const char * defvalue ) { benchType_p bt; - char *value, *cp, *cq; - value = CAST_AWAY_CONST wPrefGetString( "misc", key ); + const char *value, *cp; + char *cq; + value = wPrefGetString( "misc", key ); if ( value == NULL ) { value = defvalue; wPrefSetString( "misc", key, value ); @@ -140,14 +136,15 @@ static void AddBenchTypes( DYNARR_APPEND( benchType_t, benchType_da, 10 ); bt = &benchType(benchType_da.cnt-1); bt->type = type; - bt->width = strtol( cq=cp, &cp, 10 ); - bt->height0 = strtol( cq=cp, &cp, 10 ); - bt->height1 = strtol( cq=cp, &cp, 10 ); + bt->width = strtol( cp, &cq, 10 ); + bt->height0 = strtol( cp=cq, &cq, 10 ); + bt->height1 = strtol( cp=cq, &cq, 10 ); if ( cp == cq ) { NoticeMessage( _("Bad BenchType for %s:\n%s"), _("Continue"), NULL, key, value ); benchType_da.cnt--; return; } + cp = cq; } } @@ -176,7 +173,7 @@ EXPORT void BenchLoadLists( wList_p choiceL, wList_p orientL ) sprintf( cp, "%ld\"x%ld\"", bt->width, height ); else sprintf( cp, "%ldmm x %ldmm", height*25, bt->width*25 ); - wListAddValue( choiceL, message, NULL, (void*)benchData ); + wListAddValue( choiceL, message, NULL, I2VP(benchData) ); } } BenchUpdateOrientationList( benchType(0).type<<24, orientL ); @@ -257,15 +254,12 @@ EXPORT void DrawBench( Translate( &pp[1], p0, a-90, width ); Translate( &pp[2], p1, a-90, width ); Translate( &pp[3], p1, a+90, width ); - DrawPoly( d, 4, pp, NULL, color1, 0, 1, 0); + DrawPoly( d, 4, pp, NULL, color1, 0, DRAW_FILL ); /* Draw Outline */ if ( /*color1 != color2 &&*/ ( ( d->scale < ((d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale) ) || /* big enough scale */ - ( d->funcs == &tempSegDrawFuncs ) ) ) { /* DrawFillPoly didn't draw */ - DrawLine( d, pp[0], pp[1], 0, color2 ); - DrawLine( d, pp[1], pp[2], 0, color2 ); - DrawLine( d, pp[2], pp[3], 0, color2 ); - DrawLine( d, pp[3], pp[0], 0, color2 ); + ( d->funcs == &tempSegDrawFuncs ) ) ) { + DrawPoly( d, 4, pp, NULL, color2, 0, DRAW_CLOSED ); if ( color1 != color2 && type != B_RECT ) { oldOptions = d->options; if ( type == B_LGRIDER || orient == 1 || orient == 2 ) { @@ -384,9 +378,9 @@ EXPORT void CountBench( bp->length = length; foundBenchEnum: PrintBenchLine( message, bp ); - iwidth = strlen(message); - if ( iwidth > enumerateMaxDescLen) - enumerateMaxDescLen = (int)iwidth; + size_t width = strlen(message); + if ( width > enumerateMaxDescLen) + enumerateMaxDescLen = (int)width; } static int Cmp_benchEnum( @@ -413,7 +407,7 @@ EXPORT void TotalBench( void ) bp = &benchEnum(inx); if ( bp->length > 0 ) { PrintBenchLine( title, bp ); - EnumerateList( 1, 0, title ); + EnumerateList( 1, 0, title, NULL ); bp->length = 0; } } diff --git a/app/bin/dbitmap.c b/app/bin/dbitmap.c index c45c7d0..62c708e 100644 --- a/app/bin/dbitmap.c +++ b/app/bin/dbitmap.c @@ -20,119 +20,226 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> - #include "custom.h" +#include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "paths.h" #include "track.h" +#include "common-ui.h" + +#ifdef WIN32 +#ifdef _WIN64 +#define BITMAPDIM 50000 +#define BITMAPSIZE 500e6 +#else +#define BITMAPDIM 32000 +#define BITMAPSIZE 150e6 +#endif +#else // Not WIN +#define BITMAPDIM 50000 +#define BITMAPSIZE 500e6 +#endif // WIN32 + +/** Option flags for bitmap export */ +#define BITMAPDRAWTITLE 1 +#define BITMAPDRAWFRAMEONLY (1<<1) +#define BITMAPDRAWCENTERLINE (1<<2) +#define BITMAPDRAWBACKGROUND (1<<3) + +#define POINTSTOINCH 72.0 +#define BITMAPEXPORTFONTSIZE 18 +// line height is 20 percent larger than fontsize and converted to inches +#define LINEHEIGHT (BITMAPEXPORTFONTSIZE * 1.2 / POINTSTOINCH) +#define DEFAULTMARGIN 0.2 +#define LEFTMARGIN (DEFAULTMARGIN + 0.3) +#define BOTTOMMARGIN (DEFAULTMARGIN + LINEHEIGHT) static long outputBitMapTogglesV = 3; static double outputBitMapDensity = 10; static struct wFilSel_t * bitmap_fs; -static long bitmap_w, bitmap_h; +static wWinPix_t bitmap_w, bitmap_h; static drawCmd_t bitmap_d = { - NULL, - &screenDrawFuncs, - 0, - 16.0, - 0.0, - {0.0, 0.0}, {1.0,1.0}, - Pix2CoOrd, CoOrd2Pix }; - - -static int SaveBitmapFile( - int files, - char **fileName, - void * data ) + NULL, + &screenDrawFuncs, + 0, + 16.0, + 0.0, + {0.0, 0.0}, {1.0, 1.0}, + Pix2CoOrd, CoOrd2Pix +}; + +/** + * Show string at given y position centered in x direction + * + * \param [in] string If non-null, the string. + * \param font The font. + * \param fontSize Size of the font. + * \param yPos The position. + */ + +static void DrawTextCenterXPosY( char *string, wFont_p font, wFontSize_t fontSize, + POS_T yPos ) +{ + coOrd textSize; + coOrd p; + + DrawTextSize( &mainD, string, font, fontSize * bitmap_d.scale, FALSE, + &textSize ); + p.x = ( bitmap_d.size.x - textSize.x ) / 2.0 + bitmap_d.orig.x; + p.y = mapD.size.y + yPos*bitmap_d.scale; + DrawString( &bitmap_d, p, 0.0, string, font, fontSize*bitmap_d.scale, + wDrawColorBlack ); +} + +/** +* Draw the product info to the bitmap +* +* \param [in] preFix preFix to add to product name +* \param fontSize Size of the font. +* \param yPos The position. +*/ + +static void +DrawProductInfo( char *preFix, wFontSize_t fontSize, POS_T yPos ) { - coOrd p[4]; - FLOAT_T y0, y1; wFont_p fp, fp_bi; - wFontSize_t fs; coOrd textsize, textsize1; + coOrd textPos; + + fp = wStandardFont( F_TIMES, FALSE, FALSE ); + fp_bi = wStandardFont( F_TIMES, TRUE, TRUE ); + DrawTextSize( &mainD, preFix, fp, fontSize * bitmap_d.scale, FALSE, &textsize ); + DrawTextSize( &mainD, sProdName, fp_bi, fontSize * bitmap_d.scale, FALSE, + &textsize1 ); + textPos.x = ( bitmap_d.size.x - ( textsize.x + textsize1.x ) ) / + 2.0 + bitmap_d.orig.x; + textPos.y = -LINEHEIGHT*bitmap_d.scale; + DrawString( &bitmap_d, textPos, 0.0, preFix, fp, + fontSize * bitmap_d.scale, wDrawColorBlack ); + textPos.x += textsize.x; + DrawString( &bitmap_d, textPos, 0.0, sProdName, fp_bi, + fontSize * bitmap_d.scale, wDrawColorBlack ); +} + +/** + * Saves a bitmap file + * + * \param files number of files, must be 1 + * \param [in] fileName name of the file + * \param [in,out] data unused + * + * \returns true on success, false otherwise + */ + +static int SaveBitmapFile( + int files, + char **fileName, + void * data ) +{ + bool result; assert( fileName != NULL ); assert( files == 1 ); - SetCurrentPath( BITMAPPATHKEY, fileName[ 0 ] ); + wSetCursor( mainD.d, wCursorWait ); + InfoMessage( _( "Drawing tracks to bitmap" ) ); + + SetCurrentPath( BITMAPPATHKEY, fileName[ 0 ] ); - bitmap_d.d = wBitMapCreate( (wPos_t)bitmap_w, (wPos_t)bitmap_h, 8 ); - if (bitmap_d.d == (wDraw_p)0) { - NoticeMessage( MSG_WBITMAP_FAILED, _("Ok"), NULL ); - return FALSE; - } - y0 = y1 = 0.0; - p[0].x = p[3].x = 0.0; - p[1].x = p[2].x = mapD.size.x; - p[0].y = p[1].y = 0.0; - p[2].y = p[3].y = mapD.size.y; - if ( (outputBitMapTogglesV&2) ) { - DrawRuler( &bitmap_d, p[0], p[1], 0.0, TRUE, FALSE, wDrawColorBlack ); - DrawRuler( &bitmap_d, p[0], p[3], 0.0, TRUE, TRUE, wDrawColorBlack ); - DrawRuler( &bitmap_d, p[1], p[2], 0.0, FALSE, FALSE, wDrawColorBlack ); - DrawRuler( &bitmap_d, p[3], p[2], 0.0, FALSE, TRUE, wDrawColorBlack ); - y0 = 0.37; - y1 = 0.2; - } - if ( (outputBitMapTogglesV&3) == 1) { - DrawLine( &bitmap_d, p[0], p[1], 2, wDrawColorBlack ); - DrawLine( &bitmap_d, p[0], p[3], 2, wDrawColorBlack ); - DrawLine( &bitmap_d, p[1], p[2], 2, wDrawColorBlack ); - DrawLine( &bitmap_d, p[3], p[2], 2, wDrawColorBlack ); + bitmap_d.d = wBitMapCreate( bitmap_w, bitmap_h, 8 ); + + if( !bitmap_d.d ) { + NoticeMessage( MSG_WBITMAP_FAILED, _( "Ok" ), NULL ); + return false; } - if (outputBitMapTogglesV&1) { - fp = wStandardFont( F_TIMES, FALSE, FALSE ); - fs = 18; - DrawTextSize( &mainD, GetLayoutTitle(), fp, fs, FALSE, &textsize ); - p[0].x = (bitmap_d.size.x - (textsize.x*bitmap_d.scale))/2.0 + bitmap_d.orig.x; - p[0].y = mapD.size.y + (y1+0.30)*bitmap_d.scale; - DrawString( &bitmap_d, p[0], 0.0, GetLayoutTitle(), fp, fs*bitmap_d.scale, wDrawColorBlack ); - DrawTextSize( &mainD, GetLayoutSubtitle(), fp, fs, FALSE, &textsize ); - p[0].x = (bitmap_d.size.x - (textsize.x*bitmap_d.scale))/2.0 + bitmap_d.orig.x; - p[0].y = mapD.size.y + (y1+0.05)*bitmap_d.scale; - DrawString( &bitmap_d, p[0], 0.0, GetLayoutSubtitle(), fp, fs*bitmap_d.scale, wDrawColorBlack ); - fp_bi = wStandardFont( F_TIMES, TRUE, TRUE ); - DrawTextSize( &mainD, _("Drawn with "), fp, fs, FALSE, &textsize ); - DrawTextSize( &mainD, sProdName, fp_bi, fs, FALSE, &textsize1 ); - p[0].x = (bitmap_d.size.x - ((textsize.x+textsize1.x)*bitmap_d.scale))/2.0 + bitmap_d.orig.x; - p[0].y = -(y0+0.23)*bitmap_d.scale; - DrawString( &bitmap_d, p[0], 0.0, _("Drawn with "), fp, fs*bitmap_d.scale, wDrawColorBlack ); - p[0].x += (textsize.x*bitmap_d.scale); - DrawString( &bitmap_d, p[0], 0.0, sProdName, fp_bi, fs*bitmap_d.scale, wDrawColorBlack ); + + if( outputBitMapTogglesV & ( BITMAPDRAWFRAMEONLY | BITMAPDRAWTITLE ) ) { + coOrd p[4]; + + p[0].x = p[3].x = 0.0; + p[1].x = p[2].x = mapD.size.x; + p[0].y = p[1].y = 0.0; + p[2].y = p[3].y = mapD.size.y; + DrawPoly( &bitmap_d, 4, p, NULL, wDrawColorBlack, 2, DRAW_CLOSED ); + + if( ( outputBitMapTogglesV & BITMAPDRAWFRAMEONLY ) ) { + DrawRuler( &bitmap_d, p[0], p[1], 0.0, TRUE, FALSE, wDrawColorBlack ); + DrawRuler( &bitmap_d, p[0], p[3], 0.0, TRUE, TRUE, wDrawColorBlack ); + DrawRuler( &bitmap_d, p[1], p[2], 0.0, FALSE, FALSE, wDrawColorBlack ); + DrawRuler( &bitmap_d, p[3], p[2], 0.0, FALSE, TRUE, wDrawColorBlack ); + //y0 = 0.37; + //y1 = 0.2; + } + + if( outputBitMapTogglesV & BITMAPDRAWTITLE ) { + wFont_p fp; + + fp = wStandardFont( F_TIMES, FALSE, FALSE ); + DrawTextCenterXPosY( GetLayoutTitle(), fp, BITMAPEXPORTFONTSIZE, + 1.4 * LINEHEIGHT ); + DrawTextCenterXPosY( GetLayoutSubtitle(), fp, BITMAPEXPORTFONTSIZE, + 0.4 * LINEHEIGHT ); + DrawProductInfo( N_( "Drawn with " ), BITMAPEXPORTFONTSIZE, -LINEHEIGHT ); + } } + wDrawClip( bitmap_d.d, - (wPos_t)(-bitmap_d.orig.x/bitmap_d.scale*bitmap_d.dpi), - (wPos_t)(-bitmap_d.orig.y/bitmap_d.scale*bitmap_d.dpi), - (wPos_t)(mapD.size.x/bitmap_d.scale*bitmap_d.dpi), - (wPos_t)(mapD.size.y/bitmap_d.scale*bitmap_d.dpi) ); - wSetCursor( mainD.d, wCursorWait ); - InfoMessage( _("Drawing tracks to BitMap") ); + ( wWinPix_t )( -bitmap_d.orig.x/bitmap_d.scale*bitmap_d.dpi ), + ( wWinPix_t )( -bitmap_d.orig.y/bitmap_d.scale*bitmap_d.dpi ), + ( wWinPix_t )( mapD.size.x/bitmap_d.scale*bitmap_d.dpi ), + ( wWinPix_t )( mapD.size.y/bitmap_d.scale*bitmap_d.dpi ) ); + DrawSnapGrid( &bitmap_d, mapD.size, TRUE ); - if ( (outputBitMapTogglesV&4) ) + + if( outputBitMapTogglesV & BITMAPDRAWBACKGROUND && + GetLayoutBackGroundScreen() < 100.0 ) { + wWinPix_t bitmapPosX; + wWinPix_t bitmapPosY; + wWinPix_t bitmapWidth; + + TranslateBackground( &bitmap_d, + bitmap_d.orig.x, + bitmap_d.orig.y, + &bitmapPosX, + &bitmapPosY, + &bitmapWidth ); + wDrawCloneBackground( mainD.d, bitmap_d.d ); + + wDrawShowBackground( bitmap_d.d, + bitmapPosX, + bitmapPosY, + bitmapWidth, + GetLayoutBackGroundAngle(), + GetLayoutBackGroundScreen() ); + } + + if( outputBitMapTogglesV & BITMAPDRAWCENTERLINE ) { bitmap_d.options |= DC_CENTERLINE; - else + } else { bitmap_d.options &= ~DC_CENTERLINE; + } + DrawTracks( &bitmap_d, bitmap_d.scale, bitmap_d.orig, bitmap_d.size ); - InfoMessage( _("Writing BitMap to file") ); - if ( wBitMapWriteFile( bitmap_d.d, fileName[0] ) == FALSE ) { - NoticeMessage( MSG_WBITMAP_FAILED, _("Ok"), NULL ); - return FALSE; + + InfoMessage( _( "Writing bitmap to file" ) ); + + if( !wBitMapWriteFile( bitmap_d.d, fileName[0] ) ) { + NoticeMessage( MSG_WBITMAP_FAILED, _( "Ok" ), NULL ); + result = false; + } else { + InfoMessage( "" ); + result = true; } - InfoMessage( "" ); + wSetCursor( mainD.d, defaultCursor ); wBitMapDelete( bitmap_d.d ); - return TRUE; + return result; } - - /******************************************************************************* * * Output BitMap Dialog @@ -141,112 +248,258 @@ static int SaveBitmapFile( static wWin_p outputBitMapW; -static char *bitmapTogglesLabels[] = { N_("Print Titles"), N_("Print Borders"), - N_("Print Centerline"), NULL }; -static paramFloatRange_t r0o1_100 = { 0.1, 100.0, 60 }; +static char *bitmapTogglesLabels[] = { N_( "Layout Titles" ), + N_( "Borders" ), + N_( "Centerline of Track" ), + N_( "Background Image" ), + NULL + }; +static paramFloatRange_t dpiRange = { 0.1, 100.0, 60 }; static paramData_t outputBitMapPLs[] = { #define I_TOGGLES (0) - { PD_TOGGLE, &outputBitMapTogglesV, "toggles", 0, bitmapTogglesLabels }, + { PD_TOGGLE, &outputBitMapTogglesV, "toggles", PDO_NOPSHUPD, bitmapTogglesLabels, N_( "Include " ) }, #define I_DENSITY (1) - { PD_FLOAT, &outputBitMapDensity, "density", PDO_DLGRESETMARGIN, &r0o1_100, N_(" dpi") }, -#define I_MSG1 (2) - { PD_MESSAGE, N_("Bitmap : 99999 by 99999 pixels"), NULL, PDO_DLGRESETMARGIN|PDO_DLGUNDERCMDBUTT|PDO_DLGWIDE, (void*)180 }, -#define I_MSG2 (3) - { PD_MESSAGE, N_("Approximate file size: 999.9Mb"), NULL, PDO_DLGUNDERCMDBUTT, (void*)180 } }; + { PD_FLOAT, &outputBitMapDensity, "density", PDO_NOPSHUPD, &dpiRange, N_( "Resolution " ) }, + { PD_MESSAGE, N_( "dpi" ), NULL, PDO_DLGHORZ }, + { PD_MESSAGE, N_( "Bitmap Size " ), NULL, PDO_NOPSHUPD | PDO_DLGRESETMARGIN, 0 }, +#define I_MSG1 (4) + { PD_MESSAGE, N_( "99999 by 99999 pixels" ), NULL, PDO_DLGHORZ | PDO_DLGUNDERCMDBUTT /* | PDO_DLGWIDE */, I2VP( 180 )}, + { PD_MESSAGE, N_( "Approximate File Size " ), NULL, PDO_NOPSHUPD, 0 }, +#define I_MSG2 (6) + { PD_MESSAGE, N_( "999.9Mb" ), NULL, PDO_DLGHORZ | PDO_DLGUNDERCMDBUTT | PDO_DLGBOXEND, I2VP( 180 ) }, +}; -static paramGroup_t outputBitMapPG = { "outputbitmap", 0, outputBitMapPLs, sizeof outputBitMapPLs/sizeof outputBitMapPLs[0] }; +static paramGroup_t outputBitMapPG = { "outputbitmap", 0, outputBitMapPLs, COUNT( outputBitMapPLs ) }; +/** + * The upper limit for the dpi setting is calculated. The limit is set + * to make sute that the number of pixels in any direction is below the + * maximum value. + * + * \param [in] size The size of the layout + * \param [in] marginX The total size of margins in X direction + * \param [in] marginY The total size of margins in Y direction + * + * \returns the maximum allowed dpi value + */ -static void OutputBitMapComputeSize( void ) +static double CalculateMaxDPI( coOrd size, POS_T marginX, POS_T marginY ) { - FLOAT_T Lborder=0.0, Rborder=0.0, Tborder=0.0, Bborder=0.0; - FLOAT_T size; + POS_T maxSize; + POS_T maxMargin; + double maxDpi; + + if( size.x > size.y ) { + maxMargin = marginX; + maxSize = size.x; + } else { + maxMargin = marginY; + maxSize = size.y; + } + + maxDpi = ( BITMAPDIM - maxMargin * mainD.dpi ) / maxSize; + return( floor( maxDpi ) ); +} + +/** + * Display the pixel size of the bitmap + */ + +static void +OutputBitmapPixelSize( void ) +{ + DynString message; + DynStringMalloc( &message, 16 ); + ParamLoadData( &outputBitMapPG ); + + DynStringPrintf( &message, _( "%ld by %ld pixels" ), bitmap_w, bitmap_h ); + ParamLoadMessage( &outputBitMapPG, I_MSG1, DynStringToCStr( &message ) ); + DynStringFree( &message ); +} +/** +* Display and return the file size of the bitmap +* +* \returns the estimated file size +*/ + +static FLOAT_T +OutputBitmapFileSize( void ) +{ + DynString message; + DynStringMalloc( &message, 16 ); ParamLoadData( &outputBitMapPG ); + FLOAT_T size; + + size = ( FLOAT_T )bitmap_w * bitmap_h; + + if( size < 1e4 ) { + DynStringPrintf( &message, _( "%0.0f" ), size ); + } else if( size < 1e6 ) { + DynStringPrintf( &message, _( "%0.1fKb" ), ( size + 50.0 ) / 1e3 ); + } else if( size < 1e9 ) { + DynStringPrintf( &message, _( "%0.1fMb" ), ( size + 5e4 ) / 1e6 ); + } else { + DynStringPrintf( &message, _( "%0.1fGb" ), ( size + 5e7 ) / 1e9 ); + } + + ParamLoadMessage( &outputBitMapPG, I_MSG2, DynStringToCStr( &message ) ); + + DynStringFree( &message ); + + return( size ); +} + +/** + * Compute pixel size of bitmap + */ + +static void ComputeBitmapSize( void ) +{ + FLOAT_T Lborder=0.0, Rborder=0.0, Tborder=0.0, Bborder=0.0; + bitmap_d.dpi = mainD.dpi; - bitmap_d.scale = mainD.dpi/outputBitMapDensity; + bitmap_d.scale = mainD.dpi / outputBitMapDensity; - if (outputBitMapTogglesV&2) { - Lborder = 0.37; - Rborder = 0.2; - Tborder = 0.2; - Bborder = 0.37; + if( outputBitMapTogglesV & ( BITMAPDRAWFRAMEONLY | BITMAPDRAWTITLE ) ) { + Lborder = LEFTMARGIN; + Rborder = DEFAULTMARGIN; + Tborder = DEFAULTMARGIN; + Bborder = BOTTOMMARGIN; } - if (outputBitMapTogglesV&1) { - Tborder += 0.60; - Bborder += 0.28; + + if( outputBitMapTogglesV & BITMAPDRAWTITLE ) { + Tborder += 2 * LINEHEIGHT; + Bborder += LINEHEIGHT; } - bitmap_d.orig.x = 0.0-Lborder*bitmap_d.scale; - bitmap_d.size.x = mapD.size.x + (Lborder+Rborder)*bitmap_d.scale; - bitmap_d.orig.y = 0.0-Bborder*bitmap_d.scale; - bitmap_d.size.y = mapD.size.y + (Bborder+Tborder)*bitmap_d.scale; - bitmap_w = (long)(bitmap_d.size.x/bitmap_d.scale*bitmap_d.dpi)/*+1*/; - bitmap_h = (long)(bitmap_d.size.y/bitmap_d.scale*bitmap_d.dpi)/*+1*/; - sprintf( message, _("Bitmap : %ld by %ld pixels"), bitmap_w, bitmap_h ); - ParamLoadMessage( &outputBitMapPG, I_MSG1, message ); - size = bitmap_w * bitmap_h; - if ( size < 1e4 ) - sprintf( message, _("Approximate file size : %0.0f"), size ); - else if ( size < 1e6 ) - sprintf( message, _("Approximate file size : %0.1fKb"), (size+50.0)/1e3 ); - else - sprintf( message, _("Approximate file size : %0.1fMb"), (size+5e4)/1e6 ); - ParamLoadMessage( &outputBitMapPG, I_MSG2, message ); + + dpiRange.high = CalculateMaxDPI( mapD.size, Lborder + Rborder, + Bborder + Tborder ); + + bitmap_d.orig.x = -Lborder*bitmap_d.scale; + bitmap_d.size.x = mapD.size.x + ( Lborder + Rborder )*bitmap_d.scale; + bitmap_d.orig.y = -Bborder*bitmap_d.scale; + bitmap_d.size.y = mapD.size.y + ( Bborder + Tborder )*bitmap_d.scale; + + bitmap_w = ( wWinPix_t )( bitmap_d.size.x / bitmap_d.scale*bitmap_d.dpi ); + bitmap_h = ( wWinPix_t )( bitmap_d.size.y / bitmap_d.scale*bitmap_d.dpi ); } +/** + * Update the dialog for changed bitmap settings. Based on the new dimensions + * selected options the bitmap size and and maximum density is calculated and + * displayed. + */ -static void OutputBitMapOk( void * junk ) +void +UpdateBitmapDialog( void ) { - FLOAT_T size; - if (bitmap_w>32000 || bitmap_h>32000) { - NoticeMessage( MSG_BITMAP_TOO_LARGE, _("Ok"), NULL ); - return; + ParamLoadData( &outputBitMapPG ); + + ComputeBitmapSize(); + ParamLoadControl( &outputBitMapPG, I_DENSITY ); // trigger range check + + if( outputBitMapDensity > dpiRange.high ) { + ParamDialogOkActive( &outputBitMapPG, false ); + } else { + ParamDialogOkActive( &outputBitMapPG, true ); } - size = bitmap_w * bitmap_h; - if (size >= 1000000) { - if (NoticeMessage(MSG_BITMAP_SIZE_WARNING, _("Yes"), _("Cancel") )==0) + + OutputBitmapPixelSize(); + OutputBitmapFileSize(); +} + +/** + * Check input from bitmap options dialog and trigger file name selection + * + * \param [in,out] junk If non-null, the junk. + */ + +static void OutputBitMapOk( void * unused ) +{ + FLOAT_T size; + + size = OutputBitmapFileSize(); + + if( size > BITMAPSIZE ) { + if( NoticeMessage( MSG_BITMAP_SIZE_WARNING, _( "Continue" ), + _( "Cancel" ) )==0 ) { return; + } } + wHide( outputBitMapW ); - if (bitmap_fs == NULL) - bitmap_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Bitmap"), -//#ifdef WINDOWS -// _("Bitmap files (*.bmp)|*.bmp"), -//#else - _("Bitmap files (*.png)|*.png"), -//#endif - SaveBitmapFile, NULL ); - wFilSelect( bitmap_fs, GetCurrentPath( BITMAPPATHKEY )); -} + if( !bitmap_fs ) { + bitmap_fs = wFilSelCreate( mainW, FS_SAVE, 0, _( "Save Bitmap" ), + _( "Portable Network Graphics format (*.png)|*.png|" \ + "JPEG format (*.jpg)|*.jpg" ), + SaveBitmapFile, NULL ); + } + wFilSelect( bitmap_fs, GetCurrentPath( BITMAPPATHKEY ) ); +} + +/** + * Handle changes for bitmap export. Only changes relevant here are + * changes to the map. + * + * \param changes The changes. + */ static void OutputBitMapChange( long changes ) { - if ((changes&(CHANGE_UNITS|CHANGE_MAP))==0 || outputBitMapW==NULL) - return; - wControlSetLabel( outputBitMapPLs[I_DENSITY].control, units==UNITS_METRIC?"dpcm":"dpi" ); - ParamLoadControls( &outputBitMapPG ); - OutputBitMapComputeSize(); + if( ( changes & CHANGE_MAP ) && outputBitMapW ) { + ParamLoadControls( &outputBitMapPG ); + ComputeBitmapSize(); + } + + return; } +/** + * Executes the output bit map operation + * + * \param [in,out] unused. + */ -static void DoOutputBitMap( void * junk ) +static void DoOutputBitMap( void* unused ) { - if (outputBitMapW == NULL) { - outputBitMapW = ParamCreateDialog( &outputBitMapPG, MakeWindowTitle(_("BitMap")), _("Ok"), OutputBitMapOk, wHide, TRUE, NULL, 0, (paramChangeProc)OutputBitMapComputeSize ); + if( outputBitMapW == NULL ) { + outputBitMapW = ParamCreateDialog( &outputBitMapPG, + MakeWindowTitle( _( "Export to bitmap" ) ), + _( "Ok" ), + OutputBitMapOk, + wHide, + TRUE, + NULL, + 0, + ( paramChangeProc )UpdateBitmapDialog ); } + ParamLoadControls( &outputBitMapPG ); ParamGroupRecord( &outputBitMapPG ); - OutputBitMapComputeSize(); + + UpdateBitmapDialog(); + + if( dpiRange.high < outputBitMapDensity ) { + outputBitMapDensity = dpiRange.high; + ParamLoadControl( &outputBitMapPG, I_DENSITY ); + } + wShow( outputBitMapW ); } +/** + * Initialize bitmap output + * + * \returns entry point for bitmap export + */ EXPORT addButtonCallBack_t OutputBitMapInit( void ) { ParamRegister( &outputBitMapPG ); - RegisterChangeNotification(OutputBitMapChange); + RegisterChangeNotification( OutputBitMapChange ); return &DoOutputBitMap; } diff --git a/app/bin/dcar.c b/app/bin/dcar.c index e067e2b..5607738 100644 --- a/app/bin/dcar.c +++ b/app/bin/dcar.c @@ -20,26 +20,16 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef WINDOWS -#include <errno.h> -#endif -#include <assert.h> -#include <ctype.h> -#include <math.h> -#include <stdint.h> -#include <string.h> - #include "cselect.h" #include "ctrain.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "paths.h" #include "track.h" -#include "utility.h" +#include "include/paramfile.h" +#include "common-ui.h" static int log_carList; static int log_carInvList; @@ -47,6 +37,7 @@ static int log_carDlgState; static int log_carDlgList; static paramFloatRange_t r0_99999 = { 0, 99999, 80 }; +static paramFloatRange_t r0d001_99999 = { 0.001, 99999, 80 }; static paramFloatRange_t r9999_9999 = {-99999, 99999, 80}; static paramIntegerRange_t i1_999999999 = { 1, 999999999, 80, PDO_NORANGECHECK_HIGH }; static paramIntegerRange_t i1_9999 = { 1, 9999, 50 }; @@ -144,10 +135,10 @@ static void TabStringExtract( if ( next ) next = strchr( string, '\t' ); if ( next ) { - tabs[inx].len = next-string; + tabs[inx].len = (int)(next-string); string = next+1; } else { - tabs[inx].len = strlen( string ); + tabs[inx].len = (int)strlen( string ); string += tabs[inx].len; } } @@ -183,8 +174,8 @@ static int TabStringCmp( char * src, tabString_t * tab ) { - int srclen = strlen(src); - int len = srclen; + size_t srclen = strlen(src); + size_t len = srclen; int rc; if ( len > tab->len ) len = tab->len; @@ -284,7 +275,7 @@ static void * LookupListElem( DYNARR_APPEND( void*, *da, 10 ); for ( mid=da->cnt-1; mid>lo; mid-- ) DYNARR_N(void*,*da,mid) = DYNARR_N(void*,*da,mid-1); - DYNARR_N(void*,*da,lo) = (void*)MyMalloc(elem_size); + DYNARR_N(void*,*da,lo) = MyMalloc(elem_size); memset( DYNARR_N(void*,*da,lo), 0, elem_size ); lookupListIndex = lo; return DYNARR_N(void*,*da,lo); @@ -382,28 +373,28 @@ static void CarProtoDrawTruck( wDrawColor color = wDrawColorBlack; memcpy( p, truckOutline, sizeof truckOutline ); - RescalePts( sizeof truckOutline/sizeof truckOutline[0], p, 1.0, width/56.5 ); - RescalePts( sizeof truckOutline/sizeof truckOutline[0], p, ratio, ratio ); - RotatePts( sizeof truckOutline/sizeof truckOutline[0], p, zero, angle ); - MovePts( sizeof truckOutline/sizeof truckOutline[0], p, pos ); - DrawPoly( d, sizeof truckOutline/sizeof truckOutline[0], p, NULL, color, 0, 1, 0); + RescalePts( COUNT( truckOutline ), p, 1.0, width/56.5 ); + RescalePts( COUNT( truckOutline ), p, ratio, ratio ); + RotatePts( COUNT( truckOutline ), p, zero, angle ); + MovePts( COUNT( truckOutline ), p, pos ); + DrawPoly( d, COUNT( truckOutline ), p, NULL, color, 0, DRAW_FILL); pp.x = -70/2; pp.y = 0; memcpy( p, wheelOutline, sizeof wheelOutline ); - RescalePts( sizeof wheelOutline/sizeof wheelOutline[0], p, 1.0, width/56.5 ); - MovePts( sizeof wheelOutline/sizeof wheelOutline[0], p, pp ); - RescalePts( sizeof wheelOutline/sizeof wheelOutline[0], p, ratio, ratio ); - RotatePts( sizeof wheelOutline/sizeof wheelOutline[0], p, zero, angle ); - MovePts( sizeof wheelOutline/sizeof wheelOutline[0], p, pos ); - DrawPoly( d, sizeof wheelOutline/sizeof wheelOutline[0], p, NULL, color, 0, 1, 0); + RescalePts( COUNT( wheelOutline ), p, 1.0, width/56.5 ); + MovePts( COUNT( wheelOutline ), p, pp ); + RescalePts( COUNT( wheelOutline ), p, ratio, ratio ); + RotatePts( COUNT( wheelOutline ), p, zero, angle ); + MovePts( COUNT( wheelOutline ), p, pos ); + DrawPoly( d, COUNT( wheelOutline ), p, NULL, color, 0, DRAW_FILL); pp.x = 70/2; memcpy( p, wheelOutline, sizeof wheelOutline ); - RescalePts( sizeof wheelOutline/sizeof wheelOutline[0], p, 1.0, width/56.5 ); - MovePts( sizeof wheelOutline/sizeof wheelOutline[0], p, pp ); - RescalePts( sizeof wheelOutline/sizeof wheelOutline[0], p, ratio, ratio ); - RotatePts( sizeof wheelOutline/sizeof wheelOutline[0], p, zero, angle ); - MovePts( sizeof wheelOutline/sizeof wheelOutline[0], p, pos ); - DrawPoly( d, sizeof wheelOutline/sizeof wheelOutline[0], p, NULL, color, 0, 1, 0 ); + RescalePts( COUNT( wheelOutline ), p, 1.0, width/56.5 ); + MovePts( COUNT( wheelOutline ), p, pp ); + RescalePts( COUNT( wheelOutline ), p, ratio, ratio ); + RotatePts( COUNT( wheelOutline ), p, zero, angle ); + MovePts( COUNT( wheelOutline ), p, pos ); + DrawPoly( d, COUNT( wheelOutline ), p, NULL, color, 0, DRAW_FILL ); } @@ -440,11 +431,11 @@ static void CarProtoDrawCoupler( pp.x = length-12.0; pp.y = 0; /* TODO - if length > 6 then draw Sills */ - MovePts( sizeof couplerOutline/sizeof couplerOutline[0], p, pp ); - RescalePts( sizeof couplerOutline/sizeof couplerOutline[0], p, ratio, ratio ); - RotatePts( sizeof couplerOutline/sizeof couplerOutline[0], p, zero, angle-90.0 ); - MovePts( sizeof couplerOutline/sizeof couplerOutline[0], p, pos ); - DrawPoly( d, sizeof couplerOutline/sizeof couplerOutline[0], p, NULL, color, 0, 1 ,0 ); + MovePts( COUNT( couplerOutline ), p, pp ); + RescalePts( COUNT( couplerOutline ), p, ratio, ratio ); + RotatePts( COUNT( couplerOutline ), p, zero, angle-90.0 ); + MovePts( COUNT( couplerOutline ), p, pos ); + DrawPoly( d, COUNT( couplerOutline ), p, NULL, color, 0, DRAW_FILL ); } @@ -597,6 +588,7 @@ static carProto_p CarProtoLookup( CloneFilledDraw( proto->segCnt, proto->segPtr, FALSE ); GetSegBounds( zero, 0.0, proto->segCnt, proto->segPtr, &proto->orig, &proto->size ); carProtoListChanged = TRUE; + // return proto; } return proto; } @@ -738,9 +730,8 @@ static BOOL_T CarProtoWrite( carProto_t * proto ) { BOOL_T rc = TRUE; - char *oldLocale = NULL; - oldLocale = SaveLocale("C"); + SetCLocale(); long longCenterOffset = (long)(proto->dim.truckCenterOffset*1000); @@ -748,7 +739,7 @@ static BOOL_T CarProtoWrite( PutTitle(proto->desc), proto->options, proto->type, proto->dim.carLength, proto->dim.carWidth, longCenterOffset, proto->dim.truckCenter, proto->dim.coupledLength )>0; rc &= WriteSegs( f, proto->segCnt, proto->segPtr ); - RestoreLocale(oldLocale); + SetUserLocale(); return rc; } @@ -909,7 +900,7 @@ static roadnameMap_p LoadRoadnameList( cmp_key.name = roadnameTab->ptr; cmp_key.len = roadnameTab->len; - roadnameMapP = LookupListElem( &roadnameMap_da, &cmp_key, Cmp_roadnameMap, sizeof roadnameMapP ); + roadnameMapP = LookupListElem( &roadnameMap_da, &cmp_key, Cmp_roadnameMap, sizeof (roadnameMap_t) ); if ( roadnameMapP->roadname == NULL ) { roadnameMapP->roadname = TabStringDup(roadnameTab); roadnameMapP->repmark = TabStringDup(repmarkTab); @@ -1124,11 +1115,10 @@ static BOOL_T CarPartWrite( carPart_p partP ) { BOOL_T rc = TRUE; - char *oldLocale = NULL; carPartParent_p parentP=partP->parent; tabString_t tabs[7]; - oldLocale = SaveLocale("C"); + SetCLocale(); TabStringExtract( partP->title, 7, tabs ); sprintf( message, "%s\t%s\t%.*s\t%.*s\t%.*s\t%.*s\t%.*s", @@ -1142,7 +1132,7 @@ static BOOL_T CarPartWrite( rc &= fprintf( f, " %ld %ld %0.3f %0.3f 0 0 %0.3f %0.3f %ld\n", partP->options, partP->type, partP->dim.carLength, partP->dim.carWidth, partP->dim.truckCenter, partP->dim.coupledLength, wDrawGetRGB(partP->color) )>0; - RestoreLocale(oldLocale); + SetUserLocale(); return rc; } @@ -1269,9 +1259,8 @@ static carItem_p CarItemNew( } /** - * Check the whether the parameter file has CARPARTS that are compatible - * with the current state. For CARPARTS only the exactly identical scale - * is accepted as compatible + * Check the whether the parameter file has CARPARTS that are a fit or compatible + * with the current state. * * \param paramFileIndex IN the parameter file * \param scaleIndex IN the scale to check against @@ -1283,6 +1272,7 @@ GetCarPartCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) int i; enum paramFileState ret = PARAMFILE_NOTUSABLE; DIST_T ratio = GetScaleRatio(scaleIndex); + DIST_T gauge = GetScaleTrackGauge(scaleIndex); if (!IsParamValid(paramFileIndex)) { return(PARAMFILE_UNLOADED); @@ -1290,17 +1280,19 @@ GetCarPartCompatibility(int paramFileIndex, SCALEINX_T scaleIndex) for (i = 0; i < carPartParent_da.cnt && ret != PARAMFILE_FIT; i++) { carPartParent_t *carPartParent = carPartParent( i ); - - if(GetScaleRatio(carPartParent->scale) == ratio ){ - for(int j = 0; j < carPartParent->parts_da.cnt; j++ ){ + SCALE_FIT_T fit = CompatibleScale(FIT_CAR,carPartParent->scale,scaleIndex); + if(fit == FIT_EXACT) { + for(int j = 0; j < carPartParent->parts_da.cnt; j++ ) { carPart_t *carPart = carPart( carPartParent, j ); - if (carPart->paramFileIndex == paramFileIndex) { ret = PARAMFILE_FIT; break; } } } + if (fit == FIT_COMPATIBLE) { + ret = PARAMFILE_COMPATIBLE; + } } return(ret); } @@ -1335,7 +1327,7 @@ EXPORT BOOL_T CarItemRead( &purchPrice, &currPrice, &condition, &purchDate, &serviceDate, &cp ) ) return FALSE; dim.truckCenterOffset = longCenterOffset/1000.0; - if ( paramVersion < 12 ) { + if ( paramVersion < VERSION_INLINENOTE ) { if ( (options&CAR_ITEM_HASNOTES) ) { sNote = ReadMultilineText(); } @@ -1373,10 +1365,9 @@ static BOOL_T CarItemWrite( coOrd pos; ANGLE_T angle; BOOL_T rc = TRUE; - char *oldLocale = NULL; long longCenterOffset = (long)(item->dim.truckCenterOffset*1000); - oldLocale = SaveLocale("C"); + SetCLocale(); if ( item->data.notes && item->data.notes[0] ) options |= CAR_ITEM_HASNOTES; @@ -1405,7 +1396,7 @@ static BOOL_T CarItemWrite( rc &= fprintf( f, "\n" )>0; } - RestoreLocale(oldLocale); + SetUserLocale(); return rc; } @@ -1498,8 +1489,8 @@ static long carHotbarModes[] = { 0x0002, 0x0012, 0x0312, 0x4312, 0x0021, 0x0321, static long carHotbarContents[] = { 0x0005, 0x0002, 0x0012, 0x0012, 0x0001, 0x0021, 0x0021 }; static long newCarInx; static paramData_t newCarPLs[] = { - { PD_DROPLIST, &newCarInx, "index", PDO_DLGWIDE, (void*)400, N_("Item") } }; -static paramGroup_t newCarPG = { "train-newcar", 0, newCarPLs, sizeof newCarPLs/sizeof newCarPLs[0] }; + { PD_DROPLIST, &newCarInx, "index", PDO_DLGWIDE, I2VP(400), N_("Item") } }; +static paramGroup_t newCarPG = { "train-newcar", 0, newCarPLs, COUNT( newCarPLs ) }; EXPORT wControl_p newCarControls[2]; static char newCarLabel1[STR_SIZE]; static char * newCarLabels[2] = { newCarLabel1, NULL }; @@ -1556,7 +1547,7 @@ static void CarItemHotbarUpdate( carItemInx = (wIndex_t)*(long*)data; if ( carItemInx < 0 ) return; - carItemInx = (wIndex_t)(long)wListGetItemContext( (wList_p)pg->paramPtr[inx].control, carItemInx ); + carItemInx = (wIndex_t)VP2L(wListGetItemContext( (wList_p)pg->paramPtr[inx].control, carItemInx )); item = carItemHotbar(carItemInx); if ( item != NULL ) currCarItemPtr = item; @@ -1650,12 +1641,12 @@ EXPORT char * CarItemDescribe( } -EXPORT void CarItemLoadList( void * junk ) +EXPORT void CarItemLoadList( void * unused ) { wIndex_t inx; carItem_p item; char * cp; - wPos_t w, h; + wWinPix_t w, h; DYNARR_SET( carItem_t*, carItemHotbar_da, carItemInfo_da.cnt ); memcpy( carItemHotbar_da.ptr, carItemInfo_da.ptr, carItemInfo_da.cnt * sizeof item ); @@ -1665,7 +1656,7 @@ EXPORT void CarItemLoadList( void * junk ) if ( item->car && !IsTrackDeleted(item->car) ) continue; cp = CarItemDescribe( item, 0, NULL ); - wListAddValue( (wList_p)newCarPLs[0].control, cp, NULL, (void*)(intptr_t)inx ); + wListAddValue( (wList_p)newCarPLs[0].control, cp, NULL, I2VP(inx) ); } /*wListSetValue( (wList_p)newCarPLs[0].control, "Select a car" );*/ wListSetIndex( (wList_p)newCarPLs[0].control, 0 ); @@ -1685,12 +1676,12 @@ static char * CarItemHotbarProc( drawCmd_p d, coOrd * origP ) { - wIndex_t carItemInx = (wIndex_t)(long)data; + wIndex_t carItemInx = (wIndex_t)VP2L(data); carItem_p item; wIndex_t inx; long mode; char * cp; - wPos_t w, h; + wWinPix_t w, h; item = carItemHotbar(carItemInx); if ( item == NULL ) @@ -1708,11 +1699,11 @@ static char * CarItemHotbarProc( if ( item->car && !IsTrackDeleted(item->car) ) continue; cp = CarItemDescribe( item, mode, NULL ); - wListAddValue( (wList_p)newCarPLs[0].control, cp, NULL, (void*)(intptr_t)inx ); + wListAddValue( (wList_p)newCarPLs[0].control, cp, NULL, I2VP(inx) ); } /*wListSetValue( (wList_p)newCarPLs[0].control, "Select a car" );*/ wListSetIndex( (wList_p)newCarPLs[0].control, 0 ); - cp = CarItemHotbarProc( HB_BARTITLE, (void*)(intptr_t)carItemInx, NULL, NULL ); + cp = CarItemHotbarProc( HB_BARTITLE, I2VP(carItemInx), NULL, NULL ); strncpy( newCarLabel1, cp, sizeof newCarLabel1 ); ParamLoadControls( &newCarPG ); ParamGroupRecord( &newCarPG ); @@ -1750,7 +1741,7 @@ EXPORT int CarAvailableCount( void ) carItem_t * item; for ( inx=0; inx < carItemHotbar_da.cnt; inx ++ ) { item = carItemHotbar(inx); - if ( item->scaleInx != GetLayoutCurScale()) + if (FIT_NONE == CompatibleScale( FIT_CAR, item->scaleInx, GetLayoutCurScale())) continue; cnt++; } @@ -1772,7 +1763,7 @@ EXPORT void AddHotBarCarDesc( void ) item1 = carItemHotbar(inx); if ( item1->car && !IsTrackDeleted(item1->car) ) continue; - if ( item1->scaleInx != GetLayoutCurScale()) + if ( FIT_NONE == CompatibleScale(FIT_CAR,item1->scaleInx,GetLayoutCurScale())) continue; if ( (carHotbarModes[carHotbarModeInx]&0xF000)!=0 || ( item0 == NULL || Cmp_carHotbar( &item0, &item1 ) != 0 ) ) { #ifdef DESCFIX @@ -1782,7 +1773,7 @@ EXPORT void AddHotBarCarDesc( void ) orig = zero; size.x = item1->dim.carLength; size.y = item1->dim.carWidth; - AddHotBarElement( FormatCarTitle( item1, carHotbarContents[carHotbarModeInx] ), size, orig, FALSE, FALSE, (60.0*12.0/curScaleRatio), (void*)(intptr_t)inx, CarItemHotbarProc ); + AddHotBarElement( FormatCarTitle( item1, carHotbarContents[carHotbarModeInx] ), size, orig, FALSE, FALSE, (60.0*12.0/curScaleRatio), I2VP(inx), CarItemHotbarProc ); } item0 = item1; } @@ -2179,8 +2170,9 @@ static drawCmd_t carDlgD = { 0.0, { 0, 0 }, { 0, 0 }, Pix2CoOrd, CoOrd2Pix }; -static void CarDlgRedraw(void); -static paramDrawData_t carDlgDrawData = { 455, 100, (wDrawRedrawCallBack_p)CarDlgRedraw, NULL, &carDlgD }; +static void CarDlgRedraw( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ); + +static paramDrawData_t carDlgDrawData = { 455, 100, CarDlgRedraw, NULL, &carDlgD }; static paramTextData_t notesData = { 440, 100 }; static char *multinumLabels[] = { N_("Sequential"), N_("Repeated"), NULL }; static void CarDlgNewProto( void ); @@ -2191,23 +2183,23 @@ static void CarDlgNewProto( void ); static paramData_t carDlgPLs[] = { #define A (0) #define I_CD_MANUF_LIST (A+0) - { PD_DROPLIST, &carDlgManufInx, "manuf", PDO_NOPREF, (void*)350, N_("Manufacturer"), BL_EDITABLE }, + { PD_DROPLIST, &carDlgManufInx, "manuf", PDO_NOPREF, I2VP(350), N_("Manufacturer"), BL_EDITABLE }, #define I_CD_PROTOTYPE_STR (A+1) - { PD_STRING, &carDlgProtoStr, "prototype", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Prototype"), 0, 0, sizeof(carDlgProtoStr)}, + { PD_STRING, &carDlgProtoStr, "prototype", PDO_NOPREF|PDO_NOTBLANK, I2VP(350), N_("Prototype"), 0, 0, sizeof(carDlgProtoStr)}, #define I_CD_PROTOKIND_LIST (A+2) - { PD_DROPLIST, &carDlgKindInx, "protokind-list", PDO_NOPREF, (void*)125, N_("Prototype"), 0 }, + { PD_DROPLIST, &carDlgKindInx, "protokind-list", PDO_NOPREF, I2VP(125), N_("Prototype"), 0 }, #define I_CD_PROTOTYPE_LIST (A+3) - { PD_DROPLIST, &carDlgProtoInx, "prototype-list", PDO_NOPREF|PDO_DLGHORZ, (void*)(225-3), NULL, 0 }, + { PD_DROPLIST, &carDlgProtoInx, "prototype-list", PDO_NOPREF|PDO_DLGHORZ, I2VP(225-3), NULL, 0 }, #define I_CD_TYPE_LIST (A+4) - { PD_DROPLIST, &carDlgTypeInx, "type", PDO_NOPREF, (void*)350, N_("Type"), 0 }, + { PD_DROPLIST, &carDlgTypeInx, "type", PDO_NOPREF, I2VP(350), N_("Type"), 0 }, #define I_CD_PARTNO_LIST (A+5) - { PD_DROPLIST, &carDlgPartnoInx, "partno-list", PDO_NOPREF, (void*)350, N_("Part"), BL_EDITABLE }, + { PD_DROPLIST, &carDlgPartnoInx, "partno-list", PDO_NOPREF, I2VP(350), N_("Part"), BL_EDITABLE }, #define I_CD_PARTNO_STR (A+6) - { PD_STRING, &carDlgPartnoStr, "partno", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Part Number"), 0, 0, sizeof(carDlgPartnoStr)}, + { PD_STRING, &carDlgPartnoStr, "partno", PDO_NOPREF|PDO_NOTBLANK, I2VP(350), N_("Part Number"), 0, 0, sizeof(carDlgPartnoStr)}, #define I_CD_ISLOCO (A+7) { PD_TOGGLE, &carDlgIsLoco, "isLoco", PDO_NOPREF|PDO_DLGWIDE, isLocoLabels, N_("Loco?"), BC_HORZ|BC_NOBORDER }, #define I_CD_DESC_STR (A+8) - { PD_STRING, &carDlgDescStr, "desc", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)350, N_("Description"), 0, 0, sizeof(carDlgDescStr)}, + { PD_STRING, &carDlgDescStr, "desc", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(350), N_("Description"), 0, 0, sizeof(carDlgDescStr)}, #define I_CD_IMPORT (A+9) { PD_BUTTON, NULL, "import", 0, 0, N_("Import") }, #define I_CD_RESET (A+10) @@ -2220,27 +2212,27 @@ static paramData_t carDlgPLs[] = { #define B (A+13) #define I_CD_ROADNAME_LIST (B+0) - { PD_DROPLIST, &carDlgRoadnameInx, "road", PDO_NOPREF|PDO_DLGWIDE, (void*)350, N_("Road"), BL_EDITABLE }, + { PD_DROPLIST, &carDlgRoadnameInx, "road", PDO_NOPREF|PDO_DLGWIDE, I2VP(350), N_("Road"), BL_EDITABLE }, #define I_CD_REPMARK (B+1) - { PD_STRING, carDlgRepmarkStr, "repmark", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)60, N_("Reporting Mark"), 0, 0, sizeof(carDlgRepmarkStr)}, + { PD_STRING, carDlgRepmarkStr, "repmark", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(60), N_("Reporting Mark"), 0, 0, sizeof(carDlgRepmarkStr)}, #define I_CD_NUMBER (B+2) - { PD_STRING, carDlgNumberStr, "number", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ|PDO_STRINGLIMITLENGTH, (void*)80, N_("Number"), 0, 0, sizeof(carDlgNumberStr)}, + { PD_STRING, carDlgNumberStr, "number", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ|PDO_STRINGLIMITLENGTH, I2VP(80), N_("Number"), 0, 0, sizeof(carDlgNumberStr)}, #define I_CD_BODYCOLOR (B+3) { PD_COLORLIST, &carDlgBodyColor, "bodyColor", PDO_DLGWIDE|PDO_DLGHORZ, NULL, N_("Color") }, #define I_CD_CARLENGTH (B+4) - { PD_FLOAT, &carDlgDim.carLength, "carLength", PDO_DIM|PDO_NOPREF|PDO_DLGWIDE, &r0_99999, N_("Car Length") }, + { PD_FLOAT, &carDlgDim.carLength, "carLength", PDO_DIM|PDO_NOPREF|PDO_DLGWIDE, &r0d001_99999, N_("Car Length") }, #define I_CD_CARWIDTH (B+5) - { PD_FLOAT, &carDlgDim.carWidth, "carWidth", PDO_DIM|PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, &r0_99999, N_("Width") }, + { PD_FLOAT, &carDlgDim.carWidth, "carWidth", PDO_DIM|PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, &r0d001_99999, N_("Width") }, #define I_CD_TRKCENTER (B+6) - { PD_FLOAT, &carDlgDim.truckCenter, "trkCenter", PDO_DIM|PDO_NOPREF, &r0_99999, N_("Truck Centers") }, + { PD_FLOAT, &carDlgDim.truckCenter, "trkCenter", PDO_DIM|PDO_NOPREF, &r0d001_99999, N_("Truck Centers") }, #define I_CD_TRKOFFSET (B+7) { PD_FLOAT, &carDlgDim.truckCenterOffset, "trkCenterOffset", PDO_DIM|PDO_NOPREF|PDO_DLGHORZ|PDO_DLGWIDE, &r9999_9999, N_("Center Offset") }, #define I_CD_CPLRMNT (B+8) { PD_RADIO, &carDlgCouplerMount, "cplrMount", PDO_NOPREF, cplrModeLabels, N_("Coupler Mount"), BC_HORZ|BC_NOBORDER }, #define I_CD_CPLDLEN (B+9) - { PD_FLOAT, &carDlgDim.coupledLength, "cpldLen", PDO_DIM|PDO_NOPREF, &r0_99999, N_("Coupled Length") }, + { PD_FLOAT, &carDlgDim.coupledLength, "cpldLen", PDO_DIM|PDO_NOPREF, &r0d001_99999, N_("Coupled Length") }, #define I_CD_CPLRLEN (B+10) - { PD_FLOAT, &carDlgCouplerLength, "cplrLen", PDO_DIM|PDO_NOPREF|PDO_DLGHORZ, &r0_99999, N_("Coupler Length") }, + { PD_FLOAT, &carDlgCouplerLength, "cplrLen", PDO_DIM|PDO_NOPREF|PDO_DLGHORZ, &r0d001_99999, N_("Coupler Length") }, #define I_CD_CANVAS (B+11) { PD_DRAW, NULL, "canvas", PDO_NOPSHUPD|PDO_DLGWIDE|PDO_DLGNOLABELALIGN|PDO_DLGRESETMARGIN|PDO_DLGBOXEND|PDO_DLGRESIZE, &carDlgDrawData, NULL, 0 }, @@ -2248,15 +2240,15 @@ static paramData_t carDlgPLs[] = { #define I_CD_ITEMINDEX (C+0) { PD_LONG, &carDlgItemIndex, "index", PDO_NOPREF|PDO_DLGWIDE, &i1_999999999, N_("Index"), 0 }, #define I_CD_PURPRC (C+1) - { PD_STRING, &carDlgPurchPriceStr, "purchPrice", PDO_NOPREF|PDO_DLGWIDE, (void*)50, N_("Purchase Price"), 0, &carDlgPurchPrice }, + { PD_STRING, &carDlgPurchPriceStr, "purchPrice", PDO_NOPREF|PDO_DLGWIDE|PDO_STRINGLIMITLENGTH, I2VP(50), N_("Purchase Price"), 0, &carDlgPurchPrice, sizeof(carDlgPurchPriceStr) }, #define I_CD_CURPRC (C+2) - { PD_STRING, &carDlgCurrPriceStr, "currPrice", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, (void*)50, N_("Current Price"), 0, &carDlgCurrPrice }, + { PD_STRING, &carDlgCurrPriceStr, "currPrice", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ|PDO_STRINGLIMITLENGTH, I2VP(50), N_("Current Price"), 0, &carDlgCurrPrice, sizeof(carDlgCurrPriceStr) }, #define I_CD_COND (C+3) - { PD_DROPLIST, &carDlgConditionInx, "condition", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, (void*)90, N_("Condition") }, + { PD_DROPLIST, &carDlgConditionInx, "condition", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, I2VP(90), N_("Condition") }, #define I_CD_PURDAT (C+4) - { PD_STRING, &carDlgPurchDateStr, "purchDate", PDO_NOPREF|PDO_DLGWIDE, (void*)80, N_("Purchase Date"), 0, &carDlgPurchDate }, + { PD_STRING, &carDlgPurchDateStr, "purchDate", PDO_NOPREF|PDO_DLGWIDE|PDO_STRINGLIMITLENGTH, I2VP(80), N_("Purchase Date"), 0, &carDlgPurchDate, sizeof(carDlgPurchDateStr) }, #define I_CD_SRVDAT (C+5) - { PD_STRING, &carDlgServiceDateStr, "serviceDate", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ, (void*)80, N_("Service Date"), 0, &carDlgServiceDate }, + { PD_STRING, &carDlgServiceDateStr, "serviceDate", PDO_NOPREF|PDO_DLGWIDE|PDO_DLGHORZ|PDO_STRINGLIMITLENGTH, I2VP(80), N_("Service Date"), 0, &carDlgServiceDate, sizeof(carDlgServiceDateStr) }, #define I_CD_QTY (C+6) { PD_LONG, &carDlgQuantity, "quantity", PDO_NOPREF|PDO_DLGWIDE, &i1_9999, N_("Quantity") }, #define I_CD_MLTNUM (C+7) @@ -2266,15 +2258,15 @@ static paramData_t carDlgPLs[] = { #define D (C+9) #define I_CD_MSG (D+0) - { PD_MESSAGE, NULL, NULL, PDO_DLGNOLABELALIGN|PDO_DLGRESETMARGIN|PDO_DLGBOXEND, (void*)450 }, + { PD_MESSAGE, NULL, NULL, PDO_DLGNOLABELALIGN|PDO_DLGRESETMARGIN|PDO_DLGBOXEND, I2VP(450) }, #define I_CD_NEW (D+1) - { PD_MENU, NULL, "new-menu", PDO_DLGCMDBUTTON, NULL, N_("New"), 0, (void*)0 }, - { PD_MENUITEM, (void*)CarDlgNewDesc, "new-part-mi", 0, NULL, N_("Car Part"), 0, (void*)0 }, - { PD_MENUITEM, (void*)CarDlgNewProto, "new-proto-mi", 0, NULL, N_("Car Prototype"), 0, (void*)0 }, + { PD_MENU, NULL, "new-menu", PDO_DLGCMDBUTTON, NULL, N_("New"), 0, I2VP(0) }, + { PD_MENUITEM, CarDlgNewDesc, "new-part-mi", 0, NULL, N_("Car Part"), 0, I2VP(0) }, + { PD_MENUITEM, CarDlgNewProto, "new-proto-mi", 0, NULL, N_("Car Prototype"), 0, I2VP(0) }, #define I_CD_NEWPROTO (D+4) - { PD_BUTTON, (void*)CarDlgNewProto, "new", PDO_DLGCMDBUTTON, NULL, N_("New"), 0, (void*)0 } }; + { PD_BUTTON, CarDlgNewProto, "new", PDO_DLGCMDBUTTON, NULL, N_("New"), 0, I2VP(0) } }; -static paramGroup_t carDlgPG = { "carpart", 0, carDlgPLs, sizeof carDlgPLs/sizeof carDlgPLs[0] }; +static paramGroup_t carDlgPG = { "carpart", 0, carDlgPLs, COUNT( carDlgPLs ) }; static dynArr_t carDlgSegs_da; @@ -2538,9 +2530,10 @@ static void CarDlgLoadDimsFromProto( carProto_p protoP ) } -static void CarDlgRedraw( void ) +static void CarDlgRedraw( + wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ) { - wPos_t w, h; + wWinPix_t w, h; DIST_T ww, hh; DIST_T scale_w, scale_h; coOrd orig, pos, size; @@ -2679,7 +2672,7 @@ LOG( log_carDlgList, 3, ( "CarDlgLoadManufList( %s, %s, %d )\n carDlgManufStr continue; if ( !CheckAvail(manufP) ) continue; - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, manufP->manuf, NULL, (void*)manufP ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, manufP->manuf, NULL, manufP ); if ( carDlgManufInx < 0 && ( carDlgManufStr[0] == '\0' || strcasecmp( carDlgManufStr, manufP->manuf ) == 0 ) ) { LOG( log_carDlgList, 4, ( " found manufStr (inx=%d, listInx=%d)\n", inx, listInx ) ) carDlgManufInx = listInx; @@ -2690,7 +2683,7 @@ LOG( log_carDlgList, 4, ( " found manufStr (inx=%d, listInx=%d)\n", inx, list manufP1 = manufP; } if ( bInclCustomUnknown ) { - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, _("Custom"), NULL, (void*)NULL ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, _("Custom"), NULL, NULL ); if ( carDlgManufInx < 0 && ( carDlgManufStr[0] == '\0' || strcasecmp( carDlgManufStr, "Custom" ) == 0 ) ) { LOG( log_carDlgList, 4, ( " found Cus manufStr (inx=%d, listInx=%d)\n", inx, listInx ) ) carDlgManufInx = listInx; @@ -2698,7 +2691,7 @@ LOG( log_carDlgList, 4, ( " found Cus manufStr (inx=%d, listInx=%d)\n", inx, } if ( firstName == NULL ) firstName = "Custom"; - wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, _("Unknown"), NULL, (void*)NULL ); + wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, _("Unknown"), NULL, NULL ); if ( carDlgManufInx < 0 && ( carDlgManufStr[0] == '\0' || strcasecmp( carDlgManufStr, "Unknown" ) == 0 ) ) { LOG( log_carDlgList, 4, ( " found Unk manufStr (inx=%d, listInx=%d)\n", inx, listInx ) ) carDlgManufInx = listInx; @@ -2758,7 +2751,7 @@ LOG( log_carDlgList, 4, ( " found typeinx, reset list (old=%d)\n", listTypeIn firstName = NULL; } if ( currTypeInx != listTypeInx ) continue; - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOTYPE_LIST].control, protoP->desc, NULL, (void*)protoP ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOTYPE_LIST].control, protoP->desc, NULL, protoP ); if ( carDlgProtoInx < 0 && carDlgProtoStr[0] && strcasecmp( carDlgProtoStr, protoP->desc ) == 0 ) { LOG( log_carDlgList, 4, ( " found protoStr (inx=%d, listInx=%d)\n", inx, listInx ) ) carDlgProtoInx = listInx; @@ -2796,7 +2789,7 @@ LOG( log_carDlgList, 4, ( " found typeinx, reset list (old=%d)\n", listTypeIn } if ( !found ) continue; - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOTYPE_LIST].control, parentP->proto, NULL, (void*)parentP ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOTYPE_LIST].control, parentP->proto, NULL, parentP ); if ( carDlgProtoInx < 0 && ( carDlgProtoStr[0] == '\0' || strcasecmp( carDlgProtoStr, parentP->proto ) == 0 ) ) { LOG( log_carDlgList, 4, ( " found protoStr (inx=%d, listInx=%d)\n", inx, listInx ) ) carDlgProtoInx = listInx; @@ -2825,7 +2818,7 @@ LOG( log_carDlgList, 4, ( " loading typelist\n" ) ) wListClear( (wList_p)carDlgPLs[I_CD_PROTOKIND_LIST].control ); for ( currTypeInx=0; currTypeInx<N_TYPELISTMAP; currTypeInx++ ) { if ( typeCount[currTypeInx] > 0 ) { - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOKIND_LIST].control, _(typeListMap[currTypeInx].name), NULL, (void*)(intptr_t)currTypeInx ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOKIND_LIST].control, _(typeListMap[currTypeInx].name), NULL, I2VP(currTypeInx) ); if ( currTypeInx == listTypeInx ) { LOG( log_carDlgList, 4, ( " current = %d\n", listInx ) ) carDlgKindInx = listInx; @@ -2902,7 +2895,7 @@ static BOOL_T CarDlgLoadPartList( carPartParent_p parentP ) lastPart.paramFileIndex = partP->paramFileIndex; if ( message[0] && IsParamValid(partP->paramFileIndex) && ( lastPart.title == NULL || Cmp_part( &lastPart, partP ) != 0 ) ) { - listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PARTNO_LIST].control, message, NULL, (void*)partP ); + listInx = wListAddValue( (wList_p)carDlgPLs[I_CD_PARTNO_LIST].control, message, NULL, partP ); if ( carDlgPartnoInx<0 && (carDlgPartnoStr[0]?TabStringCmp( carDlgPartnoStr, &tabs[T_PART] ) == 0:TRUE) ) { carDlgPartnoInx = listInx; @@ -2976,7 +2969,7 @@ static BOOL_T CarDlgLoadLists( } if ( (!CarDlgLoadManufList( !isItem, loadCustomUnknown, scale )) && tabs ) { TabStringCpy( carDlgManufStr, &tabs[T_MANUF] ); - carDlgManufInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, carDlgManufStr, NULL, (void*)NULL ); + carDlgManufInx = wListAddValue( (wList_p)carDlgPLs[I_CD_MANUF_LIST].control, carDlgManufStr, NULL, NULL ); isItem = FALSE; } if ( isItem ) { @@ -3126,7 +3119,7 @@ static void CarDlgDoActions( DIST_T ratio; tabString_t tabs[7]; char * cp; - BOOL_T reload[sizeof carDlgPLs/sizeof carDlgPLs[0]]; + BOOL_T reload[COUNT( carDlgPLs )]; #define RELOAD_DIMS \ reload[I_CD_CARLENGTH] = reload[I_CD_CARWIDTH] = reload[I_CD_CPLDLEN] = \ reload[I_CD_TRKCENTER] = reload[I_CD_TRKOFFSET] = reload[I_CD_CPLRLEN] = TRUE @@ -3146,7 +3139,7 @@ static void CarDlgDoActions( LOG( log_carDlgState, 2, ( "Action = %s\n", carDlgAction_s[*actions] ) ) switch ( *actions++ ) { case A_Return: - for ( inx=0; inx<sizeof carDlgPLs/sizeof carDlgPLs[0]; inx++ ) + for ( inx=0; inx<COUNT( carDlgPLs ); inx++ ) if ( reload[inx] ) ParamLoadControl( &carDlgPG, inx ); return; @@ -3271,7 +3264,7 @@ LOG( log_carDlgState, 2, ( "Action = %s\n", carDlgAction_s[*actions] ) ) RELOAD_DIMS; break; case A_Redraw: - CarDlgRedraw(); + CarDlgRedraw( carDlgD.d, NULL, 0, 0 ); break; case A_ClrManuf: carDlgManufStr[0] = '\0'; @@ -3397,9 +3390,9 @@ LOG( log_carDlgState, 2, ( "Action = %s\n", carDlgAction_s[*actions] ) ) carDlgScaleInx = carDlgUpdatePartPtr->parent->scale; TabStringExtract( carDlgUpdatePartPtr->title, 7, tabs ); tabs[T_MANUF].ptr = carDlgUpdatePartPtr->parent->manuf; - tabs[T_MANUF].len = strlen(carDlgUpdatePartPtr->parent->manuf); + tabs[T_MANUF].len = (int)strlen(carDlgUpdatePartPtr->parent->manuf); tabs[T_PROTO].ptr = carDlgUpdatePartPtr->parent->proto; - tabs[T_PROTO].len = strlen(carDlgUpdatePartPtr->parent->proto); + tabs[T_PROTO].len = (int)strlen(carDlgUpdatePartPtr->parent->proto); CarDlgLoadLists( FALSE, tabs, carDlgScaleInx ); CarDlgLoadPart( carDlgUpdatePartPtr ); RELOAD_LISTS; @@ -3479,6 +3472,18 @@ static BOOL_T CheckCarDlgItemIndex( long * index ) } +void CarDlgError( + wBool_t ok, + paramData_p p, + char * msg ) +{ + p->bInvalid = !ok; + ParamHilite( p->group->win, p->control, !ok ); + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, ok?NULL:msg ); +} + + static void CarDlgUpdate( paramGroup_p pg, int inx, @@ -3489,7 +3494,7 @@ static void CarDlgUpdate( char * cp, *cq; long valL, d, m; FLOAT_T ratio; - BOOL_T ok; + BOOL_T ok = TRUE; DIST_T len; BOOL_T checkTruckCenter = FALSE; cmp_key_t cmp_key; @@ -3541,7 +3546,7 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) case I_CD_PROTOKIND_LIST: carDlgChanged++; - carDlgTypeInx = (int)(long)wListGetItemContext( (wList_p)pg->paramPtr[inx].control, carDlgKindInx ); + carDlgTypeInx = (int)VP2L(wListGetItemContext( (wList_p)pg->paramPtr[inx].control, carDlgKindInx )); if ( S_PART || (currState==S_ItemEnter) ) { CarDlgLoadProtoList( NULL, 0, FALSE ); } else { @@ -3571,6 +3576,12 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) break; case I_CD_DISPMODE: + + if ( !ParamCheckInputs( &carDlgPG, carDlgPLs[I_CD_DISPMODE].control ) ) { + carDlgDispMode = 1-carDlgDispMode; + ParamLoadControl( &carDlgPG, I_CD_DISPMODE ); + break; + } for ( inx=B; inx<C; inx++ ) ParamControlShow( &carDlgPG, inx, carDlgDispMode==1 ); for ( inx=C; inx<D; inx++ ) @@ -3594,7 +3605,7 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) } else { wListGetValues( (wList_p)pg->paramPtr[I_CD_ROADNAME_LIST].control, carDlgRoadnameStr, sizeof carDlgRoadnameStr, NULL, NULL ); cmp_key.name = carDlgRoadnameStr; - cmp_key.len = strlen(carDlgRoadnameStr); + cmp_key.len = (int)strlen(carDlgRoadnameStr); roadnameMapP = LookupListElem( &roadnameMap_da, &cmp_key, Cmp_roadnameMap, 0 ); } if ( roadnameMapP ) { @@ -3674,14 +3685,14 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) } else if ( carDlgDim.carLength != 0 && ( carDlgDim.coupledLength == 0 || carDlgCarLengthClock >= carDlgCoupledLengthClock ) ) { len = carDlgDim.carLength+carDlgCouplerLength*2.0; if ( len > 0 ) { - carDlgDim.coupledLength = carDlgDim.carLength+carDlgCouplerLength*2.0; + carDlgDim.coupledLength = len; ParamLoadControl( &carDlgPG, I_CD_CPLDLEN ); } carDlgCouplerLengthClock = ++carDlgClock; } else if ( carDlgDim.coupledLength != 0 && ( carDlgDim.carLength == 0 || carDlgCoupledLengthClock > carDlgCarLengthClock ) ) { - len = carDlgCouplerLength-carDlgDim.coupledLength*2.0; + len = carDlgDim.coupledLength-carDlgCouplerLength*2.0; if ( len > 0 ) { - carDlgDim.carLength = carDlgCouplerLength-carDlgDim.coupledLength*2.0; + carDlgDim.carLength = len; ParamLoadControl( &carDlgPG, I_CD_CARLENGTH ); checkTruckCenter = TRUE; } @@ -3723,6 +3734,10 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) carDlgTruckOffsetL = 0; carDlgTruckOffsetR = 0; } + if ( 2*carDlgDim.truckCenterOffset > carDlgDim.carLength - carDlgDim.truckCenter) { + ok = FALSE; + CarDlgError( ok, &carDlgPLs[I_CD_TRKOFFSET], _("Truck Center Offset plus Truck Centers must be less than Car Length") ); + } redraw = TRUE; break; @@ -3753,8 +3768,12 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) case I_CD_CURPRC: carDlgChanged++; *(FLOAT_T*)(pg->paramPtr[inx].context) = strtod( (char*)pg->paramPtr[inx].valueP, &cp ); - if ( cp==NULL || *cp!='\0' ) + if ( cp==NULL || *cp!='\0' ) { *(FLOAT_T*)(pg->paramPtr[inx].context) = -1; + ok = FALSE; + sprintf( message, "%s not valid", pg->paramPtr[inx].winLabel ); + } + CarDlgError( ok, &pg->paramPtr[inx], message ); break; case I_CD_COND: @@ -3770,37 +3789,45 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) case I_CD_PURDAT: case I_CD_SRVDAT: carDlgChanged++; - cp = (char*)pg->paramPtr[inx].valueP; + for ( cp = (char*)pg->paramPtr[inx].valueP; *cp && isspace(*(unsigned char*)cp); cp++ ); if ( *cp ) { valL = strtol( cp, &cq, 10 ); - if ( cq==NULL || *cq!='\0' ) { - cp = N_("Enter a 8 digit numeric date"); - } else if ( valL != 0 ) { - if ( strlen(cp) != 8 ) { - cp = N_("Enter a 8 digit date"); + if ( cq==NULL || *cq !='\0' ) { + cp = N_("Enter a 8 digit numeric date (yyyymmdd)"); + ok = FALSE; + } else { + if ( strlen(cp) != 8 || valL == 0) { + cp = N_("Enter a 8 digit numeric date (yyyymmdd)"); + ok = FALSE; } else if ( valL < 19000101 || valL > 21991231 ) { cp = N_("Enter a date between 19000101 and 21991231"); + ok = FALSE; } else { d = valL % 100; m = (valL / 100) % 100; if ( m < 1 || m > 12 ) { cp = N_("Invalid month"); + ok = FALSE; } else if ( d < 1 || d > 31 ) { cp = N_("Invalid day"); + ok = FALSE; } else { cp = NULL; } } } - if ( cp ) { - valL = 0; + if ( !ok ) { + valL = -1; } } else { cp = NULL; valL = 0; } - wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, _(cp) ); - *(long*)(pg->paramPtr[inx].context) = valL; + CarDlgError( ok, &pg->paramPtr[inx], cp ); + if (inx == I_CD_PURDAT) + carDlgPurchDate = valL; + else + carDlgServiceDate = valL; break; case I_CD_TYPE_LIST: @@ -3876,39 +3903,8 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) ParamLoadControl( &carDlgPG, I_CD_TRKOFFSET ); } - ok = FALSE; - if ( S_PROTO && carDlgProtoStr[0] == '\0' ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter a Prototype name") ); - else if ( S_PART && carDlgManufStr[0] == '\0' ) + if ( S_PART && carDlgManufStr[0] == '\0' ) ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Select or Enter a Manufacturer") ); - else if ( S_PART && carDlgPartnoStr[0] == '\0' ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter a Part Number") ); - else if ( carDlgDim.carLength <= 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter the Car Length") ); - else if ( carDlgDim.carWidth <= 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter the Car Width") ); - else if ( carDlgDim.truckCenter <= 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter the Truck Centers") ); - else if ( carDlgDim.truckCenterOffset < 0) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Truck Center Offset must be greater than 0 or 0") ); - else if ( carDlgDim.truckCenter >= carDlgDim.carLength ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Truck Centers must be less than Car Length") ); - else if ( 2*carDlgDim.truckCenterOffset > carDlgDim.carLength - carDlgDim.truckCenter) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Truck Center Offset plus Truck Centers must be less than Car Length") ); - else if ( (!S_PROTO) && ( carDlgDim.coupledLength <= 0 || carDlgCouplerLength <= 0 ) ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter the Coupled Length or Coupler Length") ); - else if ( S_PROTO && carDlgDim.coupledLength <= 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter the Coupled Length") ); - else if ( S_ITEM && carDlgItemIndex <= 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Enter a item Index") ); - else if ( S_ITEM && carDlgPurchPrice < 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Purchase Price is not valid") ); - else if ( S_ITEM && carDlgCurrPrice < 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Current Price is not valid") ); - else if ( S_ITEM && carDlgPurchDate < 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Purchase Date is not valid") ); - else if ( S_ITEM && carDlgServiceDate < 0 ) - ParamLoadMessage( &carDlgPG, I_CD_MSG, _("Service Date is not valid") ); else if ( S_ITEM && carDlgUpdateItemPtr==NULL && ( valL = carDlgItemIndex , !CheckCarDlgItemIndex(&carDlgItemIndex) ) ) { sprintf( message, _("Item Index %ld duplicated an existing item: updated to new value"), valL ); @@ -3921,7 +3917,7 @@ LOG( log_carDlgState, 3, ( "CarDlgUpdate( %d )\n", inx ) ) } if ( redraw ) - CarDlgRedraw(); + CarDlgRedraw( carDlgD.d, NULL, 0, 0 ); ParamDialogOkActive( pg, ok ); } @@ -3991,7 +3987,7 @@ static void CarDlgClose( wWin_p win ) } -static void CarDlgOk( void * junk ) +static void CarDlgOk( void * unused ) { long options = 0; int len; @@ -4005,10 +4001,11 @@ static void CarDlgOk( void * junk ) carPart_p partP=NULL; carProto_p protoP; BOOL_T reloadRoadnameList = FALSE; - char *oldLocale = NULL; LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) + ParamUpdate(&carDlgPG); + /*ParamUpdate( &carDlgPG );*/ if ( carDlgDim.carLength <= 0.0 || carDlgDim.carWidth <= 0.0 || @@ -4018,7 +4015,8 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) NoticeMessage( MSG_CARDESC_VALUE_ZERO, _("Ok"), NULL ); return; } - if ( carDlgDim.carLength <= carDlgDim.carWidth ) { + if ( carDlgDim.carLength <= carDlgDim.carWidth || + carDlgDim.truckCenter >= carDlgDim.carLength ) { NoticeMessage( MSG_CARDESC_BAD_DIM_VALUE, _("Ok"), NULL ); return; } @@ -4033,6 +4031,14 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) return; } + if ( S_ITEM && (carDlgPurchDate<0 || carDlgServiceDate<0 || carDlgPurchPrice <0 || carDlgCurrPrice<0)) return; + + if ( S_PROTO && carDlgProtoStr[0] == '\0' ) return; + + if ( S_PART && (carDlgManufStr[0] == '\0' || carDlgPartnoStr[0] == '\0')) return; + + if ( S_ITEM && carDlgItemIndex <= 0 ) return; + if ( (!S_PROTO) && carDlgCouplerMount != 0 ) options |= CAR_DESC_COUPLER_MODE_BODY; if ( carDlgIsLoco == 1 ) @@ -4043,17 +4049,17 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) sprintf( title, "%s\t%s\t%s\t%s\t%s\t%s\t%s", carDlgManufStr, carDlgProtoStr, carDlgDescStr, carDlgPartnoStr, carDlgRoadnameStr, carDlgRepmarkStr, carDlgNumberStr ); partP = NULL; if ( ( carDlgManufInx < 0 || carDlgPartnoInx < 0 ) && carDlgPartnoStr[0] ) { - partP = CarPartFind( carDlgManufStr, strlen(carDlgManufStr), carDlgPartnoStr, strlen(carDlgPartnoStr), carDlgScaleInx ); + partP = CarPartFind( carDlgManufStr, (int)strlen(carDlgManufStr), carDlgPartnoStr, (int)strlen(carDlgPartnoStr), carDlgScaleInx ); if ( partP != NULL && NoticeMessage( MSG_CARPART_DUPNAME, _("Yes"), _("No") ) <= 0 ) return; partP = CarPartNew( NULL, PARAM_CUSTOM, carDlgScaleInx, title, options, typeListMap[carDlgTypeInx].value, &carDlgDim, carDlgBodyColor ); if ( partP != NULL ) { if ( ( f = OpenCustom("a") ) ) { - oldLocale = SaveLocale("C"); + SetCLocale(); CarPartWrite( f, partP ); fclose(f); - RestoreLocale(oldLocale); + SetUserLocale(); } } } @@ -4082,10 +4088,10 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) } if ( len > 0 ) { if ( itemP->data.notes ) - itemP->data.notes = MyRealloc( itemP->data.notes, len+2 ); + itemP->data.notes = MyRealloc( itemP->data.notes, (len+2) * sizeof(wchar_t) ); else - itemP->data.notes = MyMalloc( len+2 ); - itemP->data.notes = (char*)MyMalloc( len+2 ); + itemP->data.notes = MyMalloc( (len+2) * sizeof(wchar_t) ); + // itemP->data.notes = (char*)MyMalloc( (len+2) * sizeof(wchar_t) ); wTextGetText( (wText_p)carDlgPLs[I_CD_NOTES].control, itemP->data.notes, len ); if ( itemP->data.notes[len-1] != '\n' ) { itemP->data.notes[len] = '\n'; @@ -4102,8 +4108,7 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) CarInvListAdd( itemP ); else CarInvListUpdate( itemP ); - changed++; - SetWindowTitle(); + SetFileChanged(); reloadRoadnameList = TRUE; if ( carDlgUpdateItemPtr==NULL ) { if ( carDlgQuantity > 1 ) { @@ -4127,7 +4132,7 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) carDlgRepmarkStr[0] = '\0'; } if ( carDlgUpdatePartPtr==NULL ) { - partP = CarPartFind( carDlgManufStr, strlen(carDlgManufStr), carDlgPartnoStr, strlen(carDlgPartnoStr), carDlgScaleInx ); + partP = CarPartFind( carDlgManufStr, (int)strlen(carDlgManufStr), carDlgPartnoStr, (int)strlen(carDlgPartnoStr), carDlgScaleInx ); if ( partP != NULL && NoticeMessage( MSG_CARPART_DUPNAME, _("Yes"), _("No") ) <= 0 ) return; @@ -4136,10 +4141,10 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) carDlgNewPartPtr = CarPartNew( carDlgUpdatePartPtr, PARAM_CUSTOM, carDlgScaleInx, message, options, typeListMap[carDlgTypeInx].value, &carDlgDim, carDlgBodyColor ); if ( carDlgNewPartPtr != NULL && ( f = OpenCustom("a") ) ) { - oldLocale = SaveLocale("C"); - CarPartWrite( f, carDlgNewPartPtr ); - fclose(f); - RestoreLocale(oldLocale); + SetCLocale(); + CarPartWrite( f, carDlgNewPartPtr ); + fclose(f); + SetUserLocale(); } reloadRoadnameList = TRUE; sprintf( message, _("%s Part: %s %s %s %s %s %s"), carDlgUpdatePartPtr==NULL?_("Added new"):_("Updated"), carDlgManufStr, carDlgPartnoStr, carDlgProtoStr, carDlgDescStr, carDlgRepmarkStr[ 0 ]?carDlgRepmarkStr:carDlgRoadnameStr, carDlgNumberStr ); @@ -4153,10 +4158,10 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) } carDlgNewProtoPtr = CarProtoNew( carDlgUpdateProtoPtr, PARAM_CUSTOM, carDlgProtoStr, options, typeListMap[carDlgTypeInx].value, &carDlgDim, carDlgSegs_da.cnt, &carDlgSegs(0) ); if ( (f = OpenCustom("a") ) ) { - oldLocale = SaveLocale("C"); + SetCLocale(); CarProtoWrite( f, carDlgNewProtoPtr ); fclose(f); - RestoreLocale(oldLocale); + SetUserLocale(); } sprintf( message, _("%s Prototype: %s%s."), carDlgUpdateProtoPtr==NULL?_("Added new"):_("Updated"), carDlgProtoStr, @@ -4165,9 +4170,9 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) if ( reloadRoadnameList ) { tabs[0].ptr = carDlgRoadnameStr; - tabs[0].len = strlen(carDlgRoadnameStr); + tabs[0].len = (int)strlen(carDlgRoadnameStr); tabs[1].ptr = carDlgRepmarkStr; - tabs[1].len = strlen(carDlgRepmarkStr); + tabs[1].len = (int)strlen(carDlgRepmarkStr); LoadRoadnameList( &tabs[0], &tabs[1] ); CarDlgLoadRoadnameList(); ParamLoadControl( &carDlgPG, I_CD_ROADNAME_LIST ); @@ -4227,12 +4232,12 @@ LOG( log_carDlgState, 3, ( "CarDlgOk()\n" ) ) static void CarDlgLayout( paramData_t * pd, int inx, - wPos_t currX, - wPos_t *xx, - wPos_t *yy ) + wWinPix_t currX, + wWinPix_t *xx, + wWinPix_t *yy ) { - static wPos_t col2pos = 0; - wPos_t y0, y1; + static wWinPix_t col2pos = 0; + wWinPix_t y0, y1; switch (inx) { case I_CD_PROTOTYPE_STR: @@ -4295,13 +4300,13 @@ static void DoCarPartDlg( carDlgAction_e *actions ) roadnameMapChanged = TRUE; for ( inx=0; inx<N_CONDLISTMAP; inx++ ) - wListAddValue( (wList_p)carDlgPLs[I_CD_COND].control, _(condListMap[inx].name), NULL, (void*)condListMap[inx].value ); + wListAddValue( (wList_p)carDlgPLs[I_CD_COND].control, _(condListMap[inx].name), NULL, I2VP(condListMap[inx].value) ); for ( inx=0; inx<N_TYPELISTMAP; inx++ ) - wListAddValue( (wList_p)carDlgPLs[I_CD_TYPE_LIST].control, _(typeListMap[inx].name), NULL, (void*)typeListMap[inx].value ); + wListAddValue( (wList_p)carDlgPLs[I_CD_TYPE_LIST].control, _(typeListMap[inx].name), NULL, I2VP(typeListMap[inx].value) ); for ( inx=0; inx<N_TYPELISTMAP; inx++ ) - wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOKIND_LIST].control, _(typeListMap[inx].name), NULL, (void*)typeListMap[inx].value ); + wListAddValue( (wList_p)carDlgPLs[I_CD_PROTOKIND_LIST].control, _(typeListMap[inx].name), NULL, I2VP(typeListMap[inx].value) ); wTextSetReadonly( (wText_p)carDlgPLs[I_CD_NOTES].control, FALSE ); } @@ -4314,6 +4319,8 @@ static void DoCarPartDlg( carDlgAction_e *actions ) carDlgScaleInx = GetLayoutCurScale(); carDlgFlipToggle = FALSE; carDlgChanged = 0; + for ( paramData_p p=carDlgPLs; p < carDlgPLs + COUNT( carDlgPLs ); p++ ) + p->bInvalid = FALSE; CarDlgDoStateActions( actions ); @@ -4349,7 +4356,7 @@ EXPORT void CarDlgAddDesc( void ) static wIndex_t carInvInx; static wIndex_t carInvSort[] = { 0, 1, 2, 3 }; -#define N_SORT (sizeof carInvSort/sizeof carInvSort[0]) +#define N_SORT (COUNT( carInvSort )) static void CarInvDlgAdd( void ); static void CarInvDlgEdit( void ); @@ -4359,7 +4366,7 @@ static void CarInvDlgExportCsv( void ); static void CarInvDlgSaveText( void ); static void CarInvListLoad( void ); -static wPos_t carInvColumnWidths[] = { +static wWinPix_t carInvColumnWidths[] = { -40, 30, 100, -50, 50, 130, 120, 100, -50, -50, 60, 55, 55, 40, 200 }; static const char * carInvColumnTitles[] = { @@ -4384,29 +4391,29 @@ static char * sortOrders[] = { #define S_CONDITION (10) #define S_PURCHDATE (11) #define S_SRVDATE (12) -static paramListData_t carInvListData = { 30, 600, sizeof carInvColumnTitles/sizeof carInvColumnTitles[0], carInvColumnWidths, carInvColumnTitles }; +static paramListData_t carInvListData = { 30, 600, COUNT( carInvColumnTitles ), carInvColumnWidths, carInvColumnTitles }; static paramData_t carInvPLs[] = { #define I_CI_SORT (0) - { PD_DROPLIST, &carInvSort[0], "sort1", PDO_LISTINDEX|0, (void*)110, N_("Sort By") }, - { PD_DROPLIST, &carInvSort[1], "sort2", PDO_LISTINDEX|PDO_DLGHORZ, (void*)110, "" }, - { PD_DROPLIST, &carInvSort[2], "sort3", PDO_LISTINDEX|PDO_DLGHORZ, (void*)110, "" }, - { PD_DROPLIST, &carInvSort[3], "sort4", PDO_LISTINDEX|PDO_DLGHORZ, (void*)110, "" }, + { PD_DROPLIST, &carInvSort[0], "sort1", PDO_LISTINDEX|0, I2VP(110), N_("Sort By") }, + { PD_DROPLIST, &carInvSort[1], "sort2", PDO_LISTINDEX|PDO_DLGHORZ, I2VP(110), "" }, + { PD_DROPLIST, &carInvSort[2], "sort3", PDO_LISTINDEX|PDO_DLGHORZ, I2VP(110), "" }, + { PD_DROPLIST, &carInvSort[3], "sort4", PDO_LISTINDEX|PDO_DLGHORZ, I2VP(110), "" }, #define S (4) #define I_CI_LIST (S+0) { PD_LIST, &carInvInx, "list", PDO_LISTINDEX|PDO_DLGRESIZE|PDO_DLGNOLABELALIGN|PDO_DLGRESETMARGIN, &carInvListData, NULL, BO_READONLY|BL_MANY }, #define I_CI_EDIT (S+1) - { PD_BUTTON, (void*)CarInvDlgEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, + { PD_BUTTON, CarInvDlgEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, #define I_CI_ADD (S+2) - { PD_BUTTON, (void*)CarInvDlgAdd, "add", 0, NULL, N_("Add"), 0, 0 }, + { PD_BUTTON, CarInvDlgAdd, "add", 0, NULL, N_("Add"), 0, 0 }, #define I_CI_DELETE (S+3) - { PD_BUTTON, (void*)CarInvDlgDelete, "delete", PDO_DLGWIDE, NULL, N_("Delete") }, + { PD_BUTTON, CarInvDlgDelete, "delete", PDO_DLGWIDE, NULL, N_("Delete") }, #define I_CI_IMPORT_CSV (S+4) - { PD_BUTTON, (void*)CarInvDlgImportCsv, "import", PDO_DLGWIDE, NULL, N_("Import") }, + { PD_BUTTON, CarInvDlgImportCsv, "import", PDO_DLGWIDE, NULL, N_("Import") }, #define I_CI_EXPORT_CSV (S+5) - { PD_BUTTON, (void*)CarInvDlgExportCsv, "export", 0, NULL, N_("Export") }, + { PD_BUTTON, CarInvDlgExportCsv, "export", 0, NULL, N_("Export") }, #define I_CI_PRINT (S+6) - { PD_BUTTON, (void*)CarInvDlgSaveText, "savetext", 0, NULL, N_("List") } }; -static paramGroup_t carInvPG = { "carinv", 0, carInvPLs, sizeof carInvPLs/sizeof carInvPLs[0] }; + { PD_BUTTON, CarInvDlgSaveText, "savetext", 0, NULL, N_("List") } }; +static paramGroup_t carInvPG = { "carinv", 0, carInvPLs, COUNT( carInvPLs ) }; static carItem_p CarInvDlgFindCurrentItem( void ) { @@ -4423,7 +4430,7 @@ static carItem_p CarInvDlgFindCurrentItem( void ) } -static void CarInvDlgFind( void * junk ) +static void CarInvDlgFind( void * unused ) { carItem_p item = CarInvDlgFindCurrentItem(); coOrd pos; @@ -4433,7 +4440,7 @@ static void CarInvDlgFind( void * junk ) CarSetVisible( item->car ); panCenter = pos; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere( (void*)0 ); // CarInvDlgFind + PanHere( I2VP(0) ); // CarInvDlgFind } @@ -4486,8 +4493,7 @@ static void CarInvDlgDelete( void ) inx--; cnt--; } - changed++; - SetWindowTitle(); + SetFileChanged(); carInvInx = -1; ParamLoadControl( &carInvPG, I_CI_LIST ); ParamControlActive( &carInvPG, I_CI_EDIT, FALSE ); @@ -4525,9 +4531,9 @@ static int CarInvSaveText( item = carItemInfo(inx); TabStringExtract( item->title, 7, tabs ); sprintf( message, "%ld", item->index ); - width = strlen( message ); + width = (int)strlen( message ); if ( width > widths[0] ) widths[0] = width; - width = strlen(GetScaleName(item->scaleInx)) + 1 + tabs[T_MANUF].len + 1 + tabs[T_PART].len; + width = (int)strlen(GetScaleName(item->scaleInx)) + 1 + tabs[T_MANUF].len + 1 + tabs[T_PART].len; if ( width > widths[1] ) widths[1] = width; if ( tabs[T_PROTO].len > widths[2] ) widths[2] = tabs[T_PROTO].len; width = tabs[T_REPMARK].len + tabs[T_NUMBER].len; @@ -4537,14 +4543,14 @@ static int CarInvSaveText( if ( item->data.purchDate > 0 ) widths[4] = 8; if ( item->data.purchPrice > 0 ) { sprintf( message, "%0.2f", item->data.purchPrice ); - width = strlen(message); + width = (int)strlen(message); if ( width > widths[5] ) widths[5] = width; } if ( item->data.condition != 0 ) widths[6] = 5; if ( item->data.currPrice > 0 ) { sprintf( message, "%0.2f", item->data.currPrice ); - width = strlen(message); + width = (int)strlen(message); if ( width > widths[7] ) widths[7] = width; } if ( item->data.serviceDate > 0 ) widths[8] = 8; @@ -4614,9 +4620,9 @@ static int CarInvSaveText( while ( 1 ) { cp1 = strchr( cp0, '\n' ); if ( cp1 ) { - len = cp1-cp0; + len = (int)(cp1-cp0); } else { - len = strlen( cp0 ); + len = (int)strlen( cp0 ); if ( len == 0 ) break; } @@ -4715,11 +4721,11 @@ static int ParseCsvLine( rc = NoticeMessage( MSG_CARIMP_MISSING_COMMA, _("Continue"), _("Stop"), ptr ); return (rc<1)?-1:elem; } - len = cq-ptr; + len = (int)(cq-ptr); } else { ptr = cp; while ( *cp && *cp != ',' ) { cp++; } - len = cp-ptr; + len = (int)(cp-ptr); } if ( map[elem] >= 0 ) { tabs[map[elem]].ptr = ptr; @@ -4752,7 +4758,6 @@ static int CarInvImportCsv( SCALEINX_T scale; carPart_p partP; int requiredCols; - char *oldLocale = NULL; assert( fileName != NULL ); assert( files == 1 ); @@ -4764,34 +4769,34 @@ static int CarInvImportCsv( return FALSE; } - oldLocale = SaveLocale("C"); + SetCLocale(); if ( fgets( message, sizeof message, f ) == NULL ) { NoticeMessage( MSG_CARIMP_NO_DATA, _("Continue"), NULL ); fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } for ( j=0; j<40; j++ ) map[j] = j; numCol = ParseCsvLine( message, 40, tabs, map ); if ( numCol <= 0 ) { fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } for ( j=0; j<40; j++ ) map[j] = -1; requiredCols = 0; for ( i=0; i<numCol; i++ ) { - for ( j=0; j<sizeof carCsvColumnTitles/sizeof carCsvColumnTitles[0]; j++ ) { + for ( j=0; j<COUNT( carCsvColumnTitles ); j++ ) { if ( TabStringCmp( carCsvColumnTitles[j], &tabs[i] ) == 0 ) { if ( map[i] >= 0 ) { NoticeMessage( MSG_CARIMP_DUP_COLUMNS, _("Continue"), NULL, carCsvColumnTitles[j] ); fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } map[i] = j; - /*j = sizeof carCsvColumnTitles/sizeof carCsvColumnTitles[0];*/ + /*j = COUNT( carCsvColumnTitles );*/ if ( j == M_SCALE || j == M_PROTO || j == M_MANUF || j == M_PARTNO ) requiredCols++; } @@ -4805,7 +4810,7 @@ static int CarInvImportCsv( if ( requiredCols != 4 ) { NoticeMessage( MSG_CARIMP_MISSING_COLUMNS, _("Continue"), NULL ); fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } while ( fgets( message, sizeof message, f ) != NULL ) { @@ -4835,7 +4840,7 @@ static int CarInvImportCsv( rc = NoticeMessage( MSG_CARIMP_MISSING_PARTNO, _("Continue"), _("Stop"), tabs[M_MANUF].ptr ); if ( rc <= 0 ) { fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } continue; @@ -4863,6 +4868,7 @@ static int CarInvImportCsv( if ( dim.truckCenter <= 0 ) dim.truckCenter = partP->dim.truckCenter; if ( dim.truckCenterOffset < 0 ) dim.truckCenterOffset = partP->dim.truckCenterOffset; } + if (dim.truckCenterOffset <0) dim.truckCenterOffset = 0; cp = TabStringCpy( title, &tabs[M_MANUF] ); *cp++ = '\t'; cp = TabStringCpy( cp, &tabs[M_PROTO] ); @@ -4889,7 +4895,7 @@ static int CarInvImportCsv( rc = NoticeMessage( MSG_CARIMP_MISSING_DIMS, _("Yes"), _("No"), message ); if ( rc <= 0 ) { fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } continue; @@ -4898,7 +4904,7 @@ static int CarInvImportCsv( &dim, wDrawFindColor(color), purchPrice, currPrice, condition, purchDate, srvcDate ); if ( tabs[M_NOTES].len > 0 ) { - item->data.notes = cp = MyMalloc( tabs[M_NOTES].len+1 ); + item->data.notes = cp = MyMalloc( (tabs[M_NOTES].len+2) ); for ( cq=tabs[M_NOTES].ptr,len=tabs[M_NOTES].len; *cq&&len; ) { if ( strncmp( cq, "<NL>", 4 ) == 0 ) { *cp++ = '\n'; @@ -4910,11 +4916,10 @@ static int CarInvImportCsv( } } } - changed++; - SetWindowTitle(); + SetFileChanged(); } fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); CarInvListLoad(); return TRUE; } @@ -4988,7 +4993,6 @@ static int CarInvExportCsv( long inx; tabString_t tabs[7]; char * sp; - char *oldLocale = NULL; assert( fileName != NULL ); assert( files == 1 ); @@ -5000,17 +5004,17 @@ static int CarInvExportCsv( return FALSE; } - oldLocale = SaveLocale("C"); + SetCLocale(); - for ( inx=0; inx<sizeof carCsvColumnTitles/sizeof carCsvColumnTitles[0]; inx++ ) { - CsvFormatString( f, carCsvColumnTitles[inx], strlen(carCsvColumnTitles[inx]), inx<(sizeof carCsvColumnTitles/sizeof carCsvColumnTitles[0])-1?",":"\n" ); + for ( inx=0; inx<COUNT( carCsvColumnTitles ); inx++ ) { + CsvFormatString( f, carCsvColumnTitles[inx], (int)strlen(carCsvColumnTitles[inx]), inx<(COUNT( carCsvColumnTitles ))-1?",":"\n" ); } for ( inx=0; inx<carItemInfo_da.cnt; inx++ ) { item = carItemInfo( inx ); TabStringExtract( item->title, 7, tabs ); CsvFormatLong( f, item->index, "," ); sp = GetScaleName(item->scaleInx); - CsvFormatString( f, sp, strlen(sp), "," ); + CsvFormatString( f, sp, (int)strlen(sp), "," ); CsvFormatString( f, tabs[T_MANUF].ptr, tabs[T_MANUF].len, "," ); CsvFormatLong( f, item->type, "," ); CsvFormatString( f, tabs[T_PART].ptr, tabs[T_PART].len, "," ); @@ -5022,8 +5026,8 @@ static int CarInvExportCsv( CsvFormatLong( f, item->options, "," ); CsvFormatFloat( f, item->dim.carLength, 3, "," ); CsvFormatFloat( f, item->dim.carWidth, 3, "," ); - CsvFormatFloat( f, item->dim.truckCenterOffset, 3, ","); CsvFormatFloat( f, item->dim.coupledLength, 3, "," ); + CsvFormatFloat( f, item->dim.truckCenterOffset, 3, ","); CsvFormatFloat( f, item->dim.truckCenter, 3, "," ); CsvFormatLong( f, wDrawGetRGB(item->color), "," ); CsvFormatFloat( f, item->data.purchPrice, 2, "," ); @@ -5032,12 +5036,12 @@ static int CarInvExportCsv( CsvFormatLong( f, item->data.purchDate, "," ); CsvFormatLong( f, item->data.serviceDate, "," ); if ( item->data.notes ) - CsvFormatString( f, item->data.notes, strlen(item->data.notes), "\n" ); + CsvFormatString( f, item->data.notes, (int)strlen(item->data.notes), "\n" ); else - CsvFormatString( f, "", strlen(""), "\n" ); + CsvFormatString( f, "", (int)strlen(""), "\n" ); } fclose( f ); - RestoreLocale(oldLocale); + SetUserLocale(); return TRUE; } @@ -5249,13 +5253,13 @@ static void CarInvListUpdate( } -EXPORT void DoCarDlg( void ) +EXPORT void DoCarDlg( void * unused ) { int inx, inx2; if ( carInvPG.win == NULL ) { ParamCreateDialog( &carInvPG, MakeWindowTitle(_("Car Inventory")), _("Find"), CarInvDlgFind, wHide, TRUE, NULL, F_BLOCK|F_RESIZE|F_RECALLSIZE|PD_F_ALT_CANCELLABEL, CarInvDlgUpdate ); for ( inx=I_CI_SORT; inx<I_CI_SORT+N_SORT; inx++ ) { - for ( inx2=0; inx2<sizeof sortOrders/sizeof sortOrders[0]; inx2++ ) { + for ( inx2=0; inx2<COUNT( sortOrders ); inx2++ ) { wListAddValue( (wList_p)carInvPLs[inx].control, _(sortOrders[inx2]), NULL, NULL ); ParamLoadControl( &carInvPG, inx ); } @@ -5434,7 +5438,7 @@ EXPORT void CarCustMgmLoad( void ) partP = carPart(parentP,partX); if ( partP->paramFileIndex != PARAM_CUSTOM ) continue; - CustMgmLoad( carpartI, CarPartCustMgmProc, (void*)partP ); + CustMgmLoad( carpartI, CarPartCustMgmProc, partP ); } } @@ -5443,7 +5447,7 @@ EXPORT void CarCustMgmLoad( void ) if ( carProtoP->paramFileIndex != PARAM_CUSTOM ) continue; if (carProtoP->paramFileIndex == PARAM_CUSTOM) { - CustMgmLoad( carprotoI, CarProtoCustMgmProc, (void*)carProtoP ); + CustMgmLoad( carprotoI, CarProtoCustMgmProc, carProtoP ); } } } diff --git a/app/bin/dcmpnd.c b/app/bin/dcmpnd.c index 93e73ac..b86ab7b 100644 --- a/app/bin/dcmpnd.c +++ b/app/bin/dcmpnd.c @@ -20,20 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> -#include <string.h> - #include "compound.h" #include "cundo.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "include/paramfile.h" #include "shrtpath.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" /***************************************************************************** * @@ -68,14 +63,14 @@ static paramData_t updateTitlePLs[] = { { PD_MESSAGE, "You can use the List Labels control on the Preferences dialog to" }, { PD_MESSAGE, "control the format of the list entries" }, #define I_UPDATESTR (9) - { PD_STRING, NULL, "old", PDO_NOPREF, (void*)400, NULL, BO_READONLY }, + { PD_STRING, NULL, "old", PDO_NOPREF, I2VP(400), NULL, BO_READONLY }, #define I_UPDATELIST (10) #define updateTitleL ((wList_p)updateTitlePLs[I_UPDATELIST].control) - { PD_DROPLIST, NULL, "sel", PDO_NOPREF, (void*)400 }, - { PD_BUTTON, (void*)UpdateTitleIgnore, "ignore", PDO_DLGCMDBUTTON, NULL, N_("Ignore") }, + { PD_DROPLIST, NULL, "sel", PDO_NOPREF, I2VP(400) }, + { PD_BUTTON, UpdateTitleIgnore, "ignore", PDO_DLGCMDBUTTON, NULL, N_("Ignore") }, #define I_UPDATELOAD (12) { PD_BUTTON, NULL, "load", 0, NULL, N_("Load") } }; -static paramGroup_t updateTitlePG = { "updatetitle", 0, updateTitlePLs, sizeof updateTitlePLs/sizeof updateTitlePLs[0] }; +static paramGroup_t updateTitlePG = { "updatetitle", 0, updateTitlePLs, COUNT( updateTitlePLs ) }; static void UpdateTitleChange( long changes ) @@ -102,7 +97,7 @@ static void UpdateTitleNext( void ) wIndex_t inx; wIndex_t cnt; track_p trk; - struct extraData *xx; + struct extraDataCompound_t *xx; updateTitleInx++; if (updateTitleInx >= updateTitles_da.cnt) { wHide( updateTitleW ); @@ -112,8 +107,9 @@ static void UpdateTitleNext( void ) trk = NULL; while (TrackIterate( &trk ) ) { InfoCount(cnt++); - if (GetTrkType(trk) == T_TURNOUT || GetTrkType(trk) == T_STRUCTURE) { - xx = GetTrkExtraData(trk); + TRKTYP_T trkType = GetTrkType(trk); + if (trkType == T_TURNOUT || trkType == T_STRUCTURE) { + xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); for (inx=0; inx<updateTitles_da.cnt; inx++) { if ( updateTitles(inx).old && strcmp( xx->title, updateTitles(inx).old ) == 0 ) { @@ -126,8 +122,7 @@ static void UpdateTitleNext( void ) DYNARR_RESET( updateTitleElement, updateTitles_da ); InfoMessage(""); InfoCount( trackCount ); - changed++; - SetWindowTitle(); + SetFileChanged(); DoChangeNotification( CHANGE_MAIN ); return; } @@ -169,7 +164,7 @@ void DoUpdateTitles( void ) return; if (updateTitleW == NULL) { ParamRegister( &updateTitlePG ); - updateTitlePLs[I_UPDATELOAD].valueP = (void*)ParamFilesInit(); + updateTitlePLs[I_UPDATELOAD].valueP = ParamFilesInit(); updateTitleW = ParamCreateDialog( &updateTitlePG, MakeWindowTitle(_("Update Title")), _("Update"), UpdateTitleUpdate, UpdateTitleCancel, TRUE, NULL, 0, NULL ); RegisterChangeNotification( UpdateTitleChange ); } @@ -218,7 +213,7 @@ static BOOL_T CheckCompoundEndPoint( BOOL_T flip ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); coOrd pos; DIST_T d; ANGLE_T a, a2; @@ -251,7 +246,6 @@ static BOOL_T RefreshCompound1( track_p trk, turnoutInfo_t * to ) { - struct extraData *xx = GetTrkExtraData(trk); EPINX_T ep, epCnt; BOOL_T ok; BOOL_T flip = FALSE; @@ -286,16 +280,15 @@ static BOOL_T RefreshCompound1( } } UndoModify( trk ); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); FreeFilledDraw( xx->segCnt, xx->segs ); MyFree( xx->segs ); xx->segCnt = to->segCnt; xx->segs = (trkSeg_p)MyMalloc( xx->segCnt * sizeof *(trkSeg_p)0 ); memcpy( xx->segs, to->segs, xx->segCnt * sizeof *(trkSeg_p)0 ); - MyFree( xx->paths); - xx->paths = (signed char*)MyMalloc( to->pathLen * sizeof *xx->paths ); - memcpy( xx->paths, to->paths, to->pathLen * sizeof *xx->paths ); - xx->pathLen = to->pathLen; - xx->pathCurr = xx->paths; + xx->pathOverRide = to->pathOverRide; + xx->pathNoCombine = to->pathNoCombine; + SetPaths( trk, GetParamPaths(to) ); if ( flip ) FlipSegs( xx->segCnt, xx->segs, zero, 90.0 ); ClrTrkBits( trk, TB_SELECTED ); @@ -313,19 +306,19 @@ static dynArr_t refreshSpecial_da; #define refreshSpecial(N) DYNARR_N( refreshSpecial_t, refreshSpecial_da, N ) static wIndex_t refreshSpecialInx; static BOOL_T refreshReturnVal; -static void RefreshSkip( void * ); +static void RefreshSkip( void * junk ); static paramListData_t refreshSpecialListData = { 30, 600, 0, NULL, NULL }; static paramData_t refreshSpecialPLs[] = { #define REFRESH_M1 (0) - { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, (void*)380 }, + { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, I2VP(380) }, #define REFRESH_M2 (1) - { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, (void*)380 }, + { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, I2VP(380) }, #define REFRESH_S (2) - { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, (void*)380 }, + { PD_MESSAGE, NULL, NULL, 0/*PDO_DLGRESIZEW*/, I2VP(380) }, #define REFRESH_L (3) { PD_LIST, &refreshSpecialInx, "list", PDO_LISTINDEX|PDO_NOPREF|PDO_DLGRESIZE, &refreshSpecialListData, NULL, BO_READONLY }, - { PD_BUTTON, (void*)RefreshSkip, "skip", PDO_DLGCMDBUTTON, NULL, N_("Skip") } }; -static paramGroup_t refreshSpecialPG = { "refreshSpecial", 0, refreshSpecialPLs, sizeof refreshSpecialPLs/sizeof refreshSpecialPLs[0] }; + { PD_BUTTON, RefreshSkip, "skip", PDO_DLGCMDBUTTON, NULL, N_("Skip") } }; +static paramGroup_t refreshSpecialPG = { "refreshSpecial", 0, refreshSpecialPLs, COUNT( refreshSpecialPLs ) }; static void RefreshSpecialOk( void * junk ) { @@ -350,7 +343,7 @@ EXPORT BOOL_T RefreshCompound( BOOL_T junk ) { TRKTYP_T trkType; - struct extraData *xx; + struct extraDataCompound_t *xx; int inx; turnoutInfo_t *to; SCALEINX_T scale; @@ -365,12 +358,12 @@ EXPORT BOOL_T RefreshCompound( return FALSE; } trkType = GetTrkType(trk); - xx = GetTrkExtraData(trk); scale = GetTrkScale(trk); if ( trkType != T_TURNOUT && trkType != T_STRUCTURE ) { ClrTrkBits( trk, TB_SELECTED ); return TRUE; } + xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); refreshReturnVal = TRUE; for ( inx=0; inx<refreshSpecial_da.cnt; inx++ ) { if ( refreshSpecial(inx).name != NULL && @@ -380,7 +373,7 @@ EXPORT BOOL_T RefreshCompound( return TRUE; if ( IsParamValid(to->paramFileIndex) && to->segCnt > 0 && - CompatibleScale( GetTrkEndPtCnt(trk)>0, to->scaleInx, scale ) ) { + (FIT_NONE != CompatibleScale( GetTrkEndPtCnt(trk)>0, to->scaleInx, scale ) )) { if ( RefreshCompound1( trk, refreshSpecial(inx).to ) ) { if ( strcasecmp( xx->title, to->title ) != 0 ) { MyFree( xx->title ); @@ -453,10 +446,10 @@ static char renamePartno[STR_SIZE]; static turnoutInfo_t * renameTo; static paramData_t renamePLs[] = { -/*0*/ { PD_STRING, renameManuf, "manuf", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)350, N_("Manufacturer"), 0, 0, sizeof(renameManuf)}, -/*1*/ { PD_STRING, renameDesc, "desc", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)230, N_("Description"), 0, 0, sizeof(renameDesc)}, -/*2*/ { PD_STRING, renamePartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH | PDO_STRINGLIMITLENGTH, (void*)100, N_("#"), 0, 0, sizeof(renamePartno)} }; -static paramGroup_t renamePG = { "rename", 0, renamePLs, sizeof renamePLs/sizeof renamePLs[0] }; +/*0*/ { PD_STRING, renameManuf, "manuf", PDO_NOPREF | PDO_NOTBLANK, I2VP(350), N_("Manufacturer"), 0, 0, sizeof(renameManuf)}, +/*1*/ { PD_STRING, renameDesc, "desc", PDO_NOPREF | PDO_NOTBLANK, I2VP(230), N_("Description"), 0, 0, sizeof(renameDesc)}, +/*2*/ { PD_STRING, renamePartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH | PDO_NOTBLANK, I2VP(100), N_("#"), 0, 0, sizeof(renamePartno)} }; +static paramGroup_t renamePG = { "rename", 0, renamePLs, COUNT( renamePLs ) }; EXPORT BOOL_T CompoundCustomSave( @@ -472,7 +465,7 @@ EXPORT BOOL_T CompoundCustomSave( rc &= fprintf( f, "TURNOUT %s \"%s\"\n", GetScaleName(to->scaleInx), PutTitle(to->title) )>0; if ( to->customInfo ) rc &= fprintf( f, "\tU %s\n",to->customInfo )>0; - rc &= WriteCompoundPathsEndPtsSegs( f, to->paths, to->segCnt, to->segs, + rc &= WriteCompoundPathsEndPtsSegs( f, GetParamPaths( to ), to->segCnt, to->segs, to->endCnt, to->endPt ); } } @@ -519,7 +512,8 @@ static int CompoundCustMgmProc( rc &= fprintf( customMgmF, "TURNOUT %s \"%s\"\n", GetScaleName(to->scaleInx), PutTitle(to->title) )>0; if ( to->customInfo ) rc &= fprintf( customMgmF, "\tU %s\n",to->customInfo )>0; - rc &= WriteCompoundPathsEndPtsSegs( customMgmF, to->paths, to->segCnt, to->segs, + rc &= WriteCompoundPathsEndPtsSegs( customMgmF, + GetParamPaths( to ), to->segCnt, to->segs, to->endCnt, to->endPt ); } else { rc &= fprintf( customMgmF, "STRUCTURE %s \"%s\"\n", GetScaleName(to->scaleInx), PutTitle(to->title) )>0; @@ -573,7 +567,7 @@ static int CompoundCustMgmProc( #include "bitmaps/turnout.xpm" -#include "bitmaps/struct.xpm" +#include "bitmaps/building.xpm" EXPORT void CompoundCustMgmLoad( void ) { @@ -583,20 +577,20 @@ EXPORT void CompoundCustMgmLoad( void ) static wIcon_p structI = NULL; if ( turnoutI == NULL ) - turnoutI = wIconCreatePixMap( turnout_xpm ); + turnoutI = wIconCreatePixMap( turnout_xpm[0] ); if ( structI == NULL ) - structI = wIconCreatePixMap( struct_xpm ); + structI = wIconCreatePixMap( building_xpm[0] ); for ( inx=0; inx<turnoutInfo_da.cnt; inx++ ) { to = turnoutInfo(inx); if (to->paramFileIndex == PARAM_CUSTOM && to->segCnt > 0) { - CustMgmLoad( turnoutI, CompoundCustMgmProc, (void*)to ); + CustMgmLoad( turnoutI, CompoundCustMgmProc, to ); } } for ( inx=0; inx<structureInfo_da.cnt; inx++ ) { to = structureInfo(inx); if (to->paramFileIndex == PARAM_CUSTOM && to->segCnt > 0) { - CustMgmLoad( structI, CompoundCustMgmProc, (void*)to ); + CustMgmLoad( structI, CompoundCustMgmProc, to ); } } } diff --git a/app/bin/dcontmgm.c b/app/bin/dcontmgm.c index 19abefa..1ffd067 100644 --- a/app/bin/dcontmgm.c +++ b/app/bin/dcontmgm.c @@ -60,22 +60,10 @@ static const char rcsid[] = "@(#) : $Id$"; -#include <errno.h> -#include <math.h> - -#ifdef WINDOWS -#include <io.h> -#define F_OK (0) -#define W_OK (2) -#define access _access -#endif - #include "cundo.h" #include "custom.h" -#include "i18n.h" #include "param.h" #include "track.h" -#include "wlib.h" /***************************************************************************** @@ -87,7 +75,7 @@ static const char rcsid[] = "@(#) : $Id$"; static void ControlEdit( void * action ); static void ControlDelete( void * action ); static void ControlDone( void * action ); -static wPos_t controlListWidths[] = { 18, 100, 150 }; +static wWinPix_t controlListWidths[] = { 18, 100, 150 }; static const char * controlListTitles[] = { "", N_("Name"), N_("Tracks") }; static paramListData_t controlListData = { 10, 400, 3, controlListWidths, controlListTitles }; @@ -96,11 +84,11 @@ static paramData_t controlPLs[] = { #define controlSelL ((wList_p)controlPLs[I_CONTROLLIST].control) { PD_LIST, NULL, "inx", PDO_DLGRESETMARGIN|PDO_DLGRESIZE, &controlListData, NULL, BL_MANY }, #define I_CONTROLEDIT (1) - { PD_BUTTON, (void*)ControlEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, + { PD_BUTTON, ControlEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, #define I_CONTROLDEL (2) - { PD_BUTTON, (void*)ControlDelete, "delete", 0, NULL, N_("Delete") }, + { PD_BUTTON, ControlDelete, "delete", 0, NULL, N_("Delete") }, } ; -static paramGroup_t controlPG = { "contmgm", 0, controlPLs, sizeof controlPLs/sizeof controlPLs[0] }; +static paramGroup_t controlPG = { "contmgm", 0, controlPLs, COUNT( controlPLs ) }; typedef struct { diff --git a/app/bin/dcustmgm.c b/app/bin/dcustmgm.c index 39bd085..73de62c 100644 --- a/app/bin/dcustmgm.c +++ b/app/bin/dcustmgm.c @@ -20,29 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <errno.h> -#include <string.h> - -#ifdef WINDOWS -#include <io.h> -#define F_OK (0) -#define W_OK (2) -#define access _access -#else -#include <unistd.h> -#endif - #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "paths.h" #include "track.h" -#include "wlib.h" #include "include/paramfilelist.h" -#ifdef WINDOWS +#include "common-ui.h" +#ifdef UTFCONVERT #include "include/utf8convert.h" #endif @@ -55,7 +40,7 @@ static void CustomNewCar( void * action ); static const char * customTypes[] = { "Car Part", "Car Prototype", NULL }; static wIndex_t selectedType; -static wPos_t customListWidths[] = { 18, 100, 30, 80, 220 }; +static wWinPix_t customListWidths[] = { 18, 100, 30, 80, 220 }; static const char * customListTitles[] = { "", N_("Manufacturer"), N_("Scale"), N_("Part No"), N_("Description") }; static paramListData_t customListData = { 10, 400, 5, customListWidths, customListTitles }; @@ -64,17 +49,17 @@ static paramData_t customPLs[] = { #define customSelL ((wList_p)customPLs[I_CUSTOMLIST].control) { PD_LIST, NULL, "inx", PDO_DLGRESETMARGIN|PDO_DLGRESIZE|PDO_DLGBOXEND, &customListData, NULL, BL_MANY }, #define I_CUSTOMNEWTYPE (1) - { PD_DROPLIST, &selectedType, "newtype", PDO_DLGRESETMARGIN | PDO_LISTINDEX, (void*)150, N_("Create a new ") }, + { PD_DROPLIST, &selectedType, "newtype", PDO_DLGRESETMARGIN | PDO_LISTINDEX, I2VP(150), N_("Create a new ") }, #define I_CUSTOMNEW (2) - { PD_BUTTON, (void *)CustomNewCar, "newcar", PDO_DLGHORZ| PDO_DLGBOXEND, NULL, N_("Go") }, + { PD_BUTTON, CustomNewCar, "newcar", PDO_DLGHORZ| PDO_DLGBOXEND, NULL, N_("Go") }, #define I_CUSTOMEDIT (3) - { PD_BUTTON, (void*)CustomEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, + { PD_BUTTON, CustomEdit, "edit", PDO_DLGCMDBUTTON, NULL, N_("Edit") }, #define I_CUSTOMDEL (4) - { PD_BUTTON, (void*)CustomDelete, "delete", 0, NULL, N_("Delete") }, + { PD_BUTTON, CustomDelete, "delete", 0, NULL, N_("Delete") }, #define I_CUSTOMCOPYTO (5) - { PD_BUTTON, (void*)CustomExport, "export", 0, NULL, N_("Move To") }, + { PD_BUTTON, CustomExport, "export", 0, NULL, N_("Move To") }, } ; -static paramGroup_t customPG = { "custmgm", 0, customPLs, sizeof customPLs/sizeof customPLs[0] }; +static paramGroup_t customPG = { "custmgm", 0, customPLs, COUNT( customPLs ) }; typedef struct { @@ -186,8 +171,8 @@ EXPORT FILE * customMgmF; static char custMgmContentsStr[STR_SIZE]; static BOOL_T custMgmProceed; static paramData_t custMgmContentsPLs[] = { - { PD_STRING, custMgmContentsStr, "label", PDO_STRINGLIMITLENGTH, (void*)400, N_("Label"), 0, 0, sizeof(custMgmContentsStr)} }; -static paramGroup_t custMgmContentsPG = { "contents", 0, custMgmContentsPLs, sizeof custMgmContentsPLs/sizeof custMgmContentsPLs[0] }; + { PD_STRING, custMgmContentsStr, "label", PDO_NOTBLANK, I2VP(400), N_("Label"), 0, 0, sizeof(custMgmContentsStr)} }; +static paramGroup_t custMgmContentsPG = { "contents", 0, custMgmContentsPLs, COUNT( custMgmContentsPLs ) }; static void CustMgmContentsOk( void * junk ) { @@ -205,7 +190,6 @@ static int CustomDoExport( wIndex_t selcnt = wListGetSelectedCount( (wList_p)customPLs[0].control ); wIndex_t inx, cnt; custMgmContext_p context = NULL; - char *oldLocale = NULL; assert( fileName != NULL ); assert( files == 1 ); @@ -237,18 +221,18 @@ static int CustomDoExport( return FALSE; } - oldLocale = SaveLocale("C"); + SetCLocale(); if (rc == -1) { - #ifdef WINDOWS + #ifdef UTFCONVERT char *contents = MyStrdup(custMgmContentsStr); contents = Convert2UTF8(contents); fprintf(customMgmF, "CONTENTS %s\n", contents); MyFree(contents); #else fprintf(customMgmF, "CONTENTS %s\n", custMgmContentsStr); - #endif // WINDOWS + #endif // UTFCONVERT } cnt = wListGetCount( (wList_p)customPLs[0].control ); @@ -260,7 +244,7 @@ static int CustomDoExport( if (!context->proc( CUSTMGM_DO_COPYTO, context->data )) { NoticeMessage( MSG_WRITE_FAILURE, _("Ok"), NULL, strerror(errno), fileName[ 0 ] ); fclose( customMgmF ); - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } context->proc( CUSTMGM_DO_DELETE, context->data ); @@ -270,7 +254,7 @@ static int CustomDoExport( cnt--; } fclose( customMgmF ); - RestoreLocale(oldLocale); + SetUserLocale(); LoadParamFile( 1, fileName, NULL ); DoChangeNotification( CHANGE_PARAMS ); return TRUE; @@ -288,18 +272,17 @@ static void CustomExport( void * junk ) static void CustomDone( void * action ) { - char *oldLocale = NULL; FILE * f = OpenCustom("w"); if (f == NULL) { wHide( customPG.win ); return; } - oldLocale = SaveLocale("C"); + SetCLocale(); CompoundCustomSave(f); CarCustomSave(f); fclose(f); - RestoreLocale(oldLocale); + SetUserLocale(); wHide( customPG.win ); } diff --git a/app/bin/dease.c b/app/bin/dease.c index d01f0df..2b393db 100644 --- a/app/bin/dease.c +++ b/app/bin/dease.c @@ -20,14 +20,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <string.h> - +#include "common.h" #include "ccurve.h" #include "cjoin.h" #include "cstraigh.h" #include "custom.h" -#include "i18n.h" #include "fileio.h" #include "param.h" #include "track.h" @@ -67,17 +64,18 @@ static void EasementCancel( void ); static char *easementChoiceLabels[] = { N_("None"), N_("Sharp"), N_("Normal"), N_("Broad"), N_("Cornu"), NULL }; static paramFloatRange_t r0n1_100 = { -1.0, 100.0, 60 }; static paramFloatRange_t r0_100 = { 0.0, 100.0, 60 }; +static paramFloatRange_t r0_200 = { 0.0, 200.0, 60 }; static paramFloatRange_t r0_10 = { 0.0, 10.0, 60 }; static long easeM; static paramData_t easementPLs[] = { #define I_EASEVAL (0) { PD_FLOAT, &easementVal, "val", PDO_NOPSHUPD, &r0n1_100, N_("Value") }, - { PD_FLOAT, &easeR, "r", PDO_DIM|PDO_DLGRESETMARGIN, &r0_100, N_("R"), BO_READONLY }, + { PD_FLOAT, &easeR, "r", PDO_DIM|PDO_DLGRESETMARGIN, &r0_200, N_("R"), BO_READONLY }, { PD_FLOAT, &easeX, "x", PDO_DIM|PDO_DLGHORZ, &r0_10, N_("X"), BO_READONLY }, { PD_FLOAT, &easeL, "l", PDO_DIM|PDO_DLGHORZ, &r0_100, N_("L"), BO_READONLY }, #define I_EASESEL (4) { PD_RADIO, &easeM, "radio", PDO_DIM|PDO_NORECORD|PDO_NOPREF|PDO_DLGRESETMARGIN, easementChoiceLabels, NULL, BC_HORZ|BC_NONE } }; -static paramGroup_t easementPG = { "easement", PGO_RECORD, easementPLs, sizeof easementPLs/sizeof easementPLs[0] }; +static paramGroup_t easementPG = { "easement", PGO_RECORD, easementPLs, COUNT( easementPLs ) }; static void SetEasement( @@ -164,14 +162,14 @@ static void SetEasement( static void EasementOk( void ) { ParamLoadData( &easementPG ); - SetEasement( easementVal, (void*)FALSE ); + SetEasement( easementVal, I2VP(FALSE) ); wHide( easementW ); } static void EasementCancel( void ) { - SetEasement( easementVal = oldEasementVal, (void*)FALSE ); + SetEasement( easementVal = oldEasementVal, I2VP(FALSE) ); wHide( easementW ); } @@ -204,7 +202,7 @@ static void EasementSel( val = 0.0; break; } - SetEasement( val, (void*)FALSE ); + SetEasement( val, I2VP(FALSE) ); } @@ -215,7 +213,7 @@ static void EasementDlgUpdate( { switch (inx) { case I_EASEVAL: - SetEasement( *(FLOAT_T*)valueP, (void*)1 ); + SetEasement( *(FLOAT_T*)valueP, I2VP(1) ); break; case I_EASESEL: EasementSel( *(long*)valueP ); @@ -227,24 +225,24 @@ static void EasementDlgUpdate( static void LayoutEasementW( paramData_t * pd, int inx, - wPos_t colX, - wPos_t * x, - wPos_t * y ) + wWinPix_t colX, + wWinPix_t * x, + wWinPix_t * y ) { if ( inx == 2 ) wControlSetPos( easementPLs[0].control, *x, wControlGetPosY(easementPLs[0].control) ); } -static void DoEasement( void * junk ) +static void DoEasement( void * unused ) { if (easementW == NULL) { easementW = ParamCreateDialog( &easementPG, MakeWindowTitle(_("Easement")), _("Ok"), (paramActionOkProc)EasementOk, (paramActionCancelProc)EasementCancel, TRUE, LayoutEasementW, 0, EasementDlgUpdate ); - SetEasement( easementVal, (void*)TRUE ); + SetEasement( easementVal, I2VP(TRUE) ); } oldEasementVal = easementVal; wShow( easementW ); - SetEasement( easementVal, (void*)TRUE ); + SetEasement( easementVal, I2VP(TRUE) ); } @@ -255,36 +253,36 @@ static void EasementChange( long changes ) { if (changes&(CHANGE_SCALE|CHANGE_UNITS)) { GetScaleEasementValues( Rvalues, Lvalues ); - SetEasement( easementVal, (void*)TRUE ); + SetEasement( easementVal, I2VP(TRUE) ); } } -#include "bitmaps/enone.xpm" -#include "bitmaps/esharp.xpm" -#include "bitmaps/egtsharp.xpm" -#include "bitmaps/eltsharp.xpm" -#include "bitmaps/enormal.xpm" -#include "bitmaps/eltbroad.xpm" -#include "bitmaps/ebroad.xpm" -#include "bitmaps/egtbroad.xpm" -#include "bitmaps/ecornu.xpm" +#include "bitmaps/ease-none.xpm" +#include "bitmaps/ease-sharp.xpm" +#include "bitmaps/ease-gt-sharp.xpm" +#include "bitmaps/ease-lt-sharp.xpm" +#include "bitmaps/ease-normal.xpm" +#include "bitmaps/ease-broad.xpm" +#include "bitmaps/ease-gt-broad.xpm" +#include "bitmaps/ease-lt-broad.xpm" +#include "bitmaps/ease-cornu.xpm" EXPORT addButtonCallBack_t EasementInit( void ) { ParamRegister( &easementPG ); - enone_bm = wIconCreatePixMap( enone_xpm ); - eltsharp_bm = wIconCreatePixMap( eltsharp_xpm ); - esharp_bm = wIconCreatePixMap( esharp_xpm ); - egtsharp_bm = wIconCreatePixMap( egtsharp_xpm ); - enormal_bm = wIconCreatePixMap( enormal_xpm ); - eltbroad_bm = wIconCreatePixMap( eltbroad_xpm ); - ebroad_bm = wIconCreatePixMap( ebroad_xpm ); - egtbroad_bm = wIconCreatePixMap( egtbroad_xpm ); - ecornu_bm = wIconCreatePixMap( ecornu_xpm ); - easementB = AddToolbarButton( "cmdEasement", enone_bm, 0, (addButtonCallBack_t)DoEasementRedir, NULL ); + enone_bm = wIconCreatePixMap( ease_none_xpm[iconSize] ); + eltsharp_bm = wIconCreatePixMap( ease_ltsharp_xpm[iconSize] ); + esharp_bm = wIconCreatePixMap( ease_sharp_xpm[iconSize] ); + egtsharp_bm = wIconCreatePixMap( ease_gtsharp_xpm[iconSize] ); + enormal_bm = wIconCreatePixMap( ease_normal_xpm[iconSize] ); + eltbroad_bm = wIconCreatePixMap( ease_ltbroad_xpm[iconSize] ); + ebroad_bm = wIconCreatePixMap( ease_broad_xpm[iconSize] ); + egtbroad_bm = wIconCreatePixMap( ease_gtbroad_xpm[iconSize] ); + ecornu_bm = wIconCreatePixMap( ease_cornu_xpm[iconSize] ); + easementB = AddToolbarButton( "cmdEasement", enone_bm, 0, DoEasementRedir, NULL ); RegisterChangeNotification( EasementChange ); return &DoEasement; diff --git a/app/bin/denum.c b/app/bin/denum.c index b353627..9a83ffb 100644 --- a/app/bin/denum.c +++ b/app/bin/denum.c @@ -20,18 +20,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <string.h> -#include <time.h> - #include "custom.h" #include "fileio.h" #include "layout.h" -#include "i18n.h" #include "param.h" #include "paths.h" #include "track.h" -#include "utility.h" static wWin_p enumW; @@ -42,21 +36,26 @@ static wWin_p enumW; #undef max #define max(a,b) (((a) > (b)) ? (a) : (b)) -static void DoEnumOp( void * ); +static void DoEnumOp( void * data ); static long enableListPrices; +static long enableListIndexes; static paramTextData_t enumTextData = { 80, 24 }; static char * priceLabels[] = { N_("Prices"), NULL }; +static char * indexLabels[] = { N_("Indexes"), NULL }; static paramData_t enumPLs[] = { #define I_ENUMTEXT (0) #define enumT ((wText_p)enumPLs[I_ENUMTEXT].control) { PD_TEXT, NULL, "text", PDO_DLGRESIZE, &enumTextData, NULL, BT_CHARUNITS|BT_FIXEDFONT }, - { PD_BUTTON, (void*)DoEnumOp, "save", PDO_DLGCMDBUTTON, NULL, N_("Save As ..."), 0, (void*)ENUMOP_SAVE }, - { PD_BUTTON, (void*)DoEnumOp, "print", 0, NULL, N_("Print"), 0, (void*)ENUMOP_PRINT }, - { PD_BUTTON, (void*)wPrintSetup, "printsetup", 0, NULL, N_("Print Setup"), 0, NULL }, + { PD_BUTTON, DoEnumOp, "save", PDO_DLGCMDBUTTON, NULL, N_("Save As ..."), 0, I2VP(ENUMOP_SAVE) }, + { PD_BUTTON, DoEnumOp, "print", 0, NULL, N_("Print"), 0, I2VP(ENUMOP_PRINT) }, + { PD_BUTTON, wPrintSetup, "printsetup", 0, NULL, N_("Print Setup"), 0, NULL }, #define I_ENUMLISTPRICE (4) - { PD_TOGGLE, &enableListPrices, "list-prices", PDO_DLGRESETMARGIN, priceLabels, NULL, BC_HORZ|BC_NOBORDER } }; -static paramGroup_t enumPG = { "enum", 0, enumPLs, sizeof enumPLs/sizeof enumPLs[0] }; + { PD_TOGGLE, &enableListPrices, "list-prices", PDO_DLGRESETMARGIN, priceLabels, NULL, BC_HORZ|BC_NOBORDER }, +#define I_ENUMLISTINDEXES (5) + { PD_TOGGLE, &enableListIndexes, "list-indexes", PDO_DLGRESETMARGIN, indexLabels, NULL, BC_HORZ|BC_NOBORDER } +}; +static paramGroup_t enumPG = { "enum", 0, enumPLs, COUNT( enumPLs ) }; static struct wFilSel_t * enumFile_fs; @@ -86,7 +85,7 @@ static int DoEnumSave( static void DoEnumOp( void * data ) { - switch( (int)(long)data ) { + switch( VP2L(data) ) { case ENUMOP_SAVE: wFilSelect( enumFile_fs, GetCurrentPath(PARTLISTPATHKEY) ); break; @@ -105,8 +104,8 @@ static void EnumDlgUpdate( int inx, void * valueP ) { - if ( inx != I_ENUMLISTPRICE ) return; - EnumerateTracks(); + if ( inx != I_ENUMLISTPRICE && inx != I_ENUMLISTINDEXES) return; + EnumerateTracks( NULL ); } @@ -116,10 +115,11 @@ static FLOAT_T enumerateTotal; void EnumerateList( long count, FLOAT_T price, - char * desc ) + char * desc, + char * indexes ) { char * cp; - int len; + size_t len; sprintf( message, "%*ld | %s\n", count_utf8_chars(_("Count")), count, desc ); if (enableListPrices) { cp = message + strlen( message )-1; @@ -134,6 +134,8 @@ void EnumerateList( sprintf( cp, " | %-*s |\n", (int) max( 7, count_utf8_chars( _("Each"))), " " ); } } + if (enableListIndexes && indexes) + sprintf( message, "%s%s -> %s \n", message, N_("Indexes"), indexes); wTextAppend( enumT, message ); } @@ -210,7 +212,7 @@ void EnumerateStart(void) void EnumerateEnd(void) { - int len; + size_t len; char * cp; ScaleLengthEnd(); diff --git a/app/bin/directory.c b/app/bin/directory.c index 265485b..991e139 100644 --- a/app/bin/directory.c +++ b/app/bin/directory.c @@ -20,27 +20,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <errno.h> -#include <string.h> - -#ifdef WINDOWS - #include "include/dirent.h" - #include <direct.h> - #define unlink(a) _unlink((a)) - #define rmdir(a) _rmdir((a)) -#else - #include <dirent.h> - #include <unistd.h> - #include <sys/stat.h> - #include <sys/types.h> -#endif - -#include <wlib.h> #include "directory.h" #include "dynstring.h" -#include "i18n.h" -#include "messages.h" #include "misc.h" +#include "common-ui.h" /***************************************************************************** * Safe Create Dir @@ -54,11 +37,7 @@ BOOL_T SafeCreateDir(const char *dir) { int err; -#ifdef WINDOWS - err = _mkdir(dir); -#else err = mkdir(dir, 0755); -#endif if (err < 0) { if (errno != EEXIST) { NoticeMessage(MSG_DIR_CREATE_FAIL, diff --git a/app/bin/dlayer.c b/app/bin/dlayer.c index 352dbe1..e5fed61 100644 --- a/app/bin/dlayer.c +++ b/app/bin/dlayer.c @@ -20,19 +20,17 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <stdbool.h> -#include <stdint.h> -#include <string.h> - +#include "cselect.h" #include "custom.h" +#include "paths.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" +#include "include/partcatalog.h" +#include "include/stringxtc.h" +#include "common-ui.h" /***************************************************************************** * @@ -45,10 +43,13 @@ #define LAYERPREF_ONMAP (2) #define LAYERPREF_VISIBLE (4) #define LAYERPREF_MODULE (8) +#define LAYERPREF_NOBUTTON (16) #define LAYERPREF_SECTION ("Layers") #define LAYERPREF_NAME "name" #define LAYERPREF_COLOR "color" #define LAYERPREF_FLAGS "flags" +#define LAYERPREF_LIST "list" +#define LAYERPREF_SETTINGS "settings" unsigned int curLayer; long layerCount = 10; @@ -73,12 +74,17 @@ typedef struct { BOOL_T visible; /**< visible flag */ BOOL_T onMap; /**< is layer shown map */ BOOL_T module; /**< is layer a module (all or nothing) */ + BOOL_T button_off; /**< hide button */ long objCount; /**< number of objects on layer */ + dynArr_t layerLinkList; /**< other layers that show/hide with this one */ + char settingsName[STR_SHORT_SIZE]; /**< name of settings file to load when this is current */ } layer_t; static layer_t layers[NUM_LAYERS]; static layer_t *layers_save = NULL; +static Catalog * settingsCatalog; + static int oldColorMap[][3] = { { 255, 255, 255 }, /* White */ @@ -140,7 +146,7 @@ static int oldColorMap[][3] = { }; static void DoLayerOp(void * data); -static void UpdateLayerDlg(void); +void UpdateLayerDlg(unsigned int); static void InitializeLayers(void LayerInitFunc(void), int newCurrLayer); static void LayerPrefSave(void); @@ -148,7 +154,7 @@ static void LayerPrefLoad(void); int IsLayerValid(unsigned int layer) { - return (layer <= NUM_LAYERS); + return (layer <= NUM_LAYERS && layer != -1); } BOOL_T GetLayerVisible(unsigned int layer) @@ -160,6 +166,15 @@ BOOL_T GetLayerVisible(unsigned int layer) } } +BOOL_T GetLayerHidden(unsigned int layer) +{ + if (!IsLayerValid(layer)) { + return TRUE; + } else { + return layers[layer].button_off; + } +} + BOOL_T GetLayerFrozen(unsigned int layer) { @@ -227,8 +242,9 @@ static void RedrawLayer( unsigned int l, BOOL_T draw ) } -static void FlipLayer(unsigned int layer) +EXPORT void FlipLayer( void * layerVP ) { + unsigned int layer = (unsigned int)VP2L(layerVP); wBool_t visible; if (!IsLayerValid(layer)) { @@ -236,7 +252,8 @@ static void FlipLayer(unsigned int layer) } if (layer == curLayer && layers[layer].visible) { - wButtonSetBusy(layer_btns[layer], layers[layer].visible); + if (!layers[layer].button_off) + wButtonSetBusy(layer_btns[layer], layers[layer].visible); NoticeMessage(MSG_LAYER_HIDE, _("Ok"), NULL); return; } @@ -246,13 +263,26 @@ static void FlipLayer(unsigned int layer) layers[layer].visible = visible; if (layer<NUM_BUTTONS) { - wButtonSetBusy(layer_btns[layer], visible != 0); - wButtonSetLabel(layer_btns[layer], (char *)show_layer_bmps[layer]); + if (!layers[layer].button_off) { + wButtonSetBusy(layer_btns[layer], visible != 0); + wButtonSetLabel(layer_btns[layer], (char *)show_layer_bmps[layer]); + } } + /* Set visible on related layers other than current */ + for (int i=0;i<layers[layer].layerLinkList.cnt;i++) { + int l = DYNARR_N(int,layers[layer].layerLinkList,i)-1; + if ((l != curLayer) && (l >=0) && (l < NUM_LAYERS)) { + layers[l].visible = layers[layer].visible; + if (!layers[l].button_off) + wButtonSetBusy(layer_btns[l], layers[l].visible); + } + } + RedrawLayer(layer, TRUE); } +static char lastSettings[STR_SHORT_SIZE]; void SetCurrLayer(wIndex_t inx, const char * name, wIndex_t op, void * listContext, void * arg) { @@ -264,16 +294,44 @@ void SetCurrLayer(wIndex_t inx, const char * name, wIndex_t op, return; } + char *array[1]; + if (!layers[inx].settingsName[0] || strcmp(layers[inx].settingsName," ")==0) { + if (lastSettings[0]) { + DoSettingsRead(1,NULL, NULL); + } + lastSettings[0] = '\0'; + } else { + if (strcmp(layers[inx].settingsName,lastSettings)!=0) { + if (!lastSettings[0]) wPrefFlush(""); // Save Last Settings for no settings file + array[0] = layers[inx].settingsName; + DoSettingsRead(1,array, NULL); + } + strcpy(lastSettings,layers[inx].settingsName); + } + + curLayer = newLayer; if (!IsLayerValid(curLayer)) { - curLayer = 0; + curLayer = 0; //Too big or -1 + layers[curLayer].frozen = FALSE; //Make sure the layer is not frozen } + if (!layers[curLayer].visible) { - FlipLayer(inx); + FlipLayer(I2VP(inx)); } + /* Set visible on related layers other than current */ + for (int i=0;i<layers[curLayer].layerLinkList.cnt;i++) { + int l = DYNARR_N(int,layers[curLayer].layerLinkList,i)-1; + if (l != curLayer && l >=0 && l < NUM_LAYERS) { + layers[l].visible = layers[curLayer].visible; + if (!layers[l].button_off) + wButtonSetBusy(layer_btns[l], layers[l].visible); + } + } + if (recordF) { fprintf(recordF, "SETCURRLAYER %d\n", inx); } @@ -307,6 +365,17 @@ static void SetLayerColor(unsigned int inx, wDrawColor color) } } +static void SetLayerHideButton(unsigned int inx, wBool_t hide) { + if (hide != layers[inx].button_off) { + if (inx < NUM_BUTTONS) { + wControlShow((wControl_p)layer_btns[inx],!hide); + if (!hide) wButtonSetBusy(layer_btns[inx], layers[inx].visible); + } + layers[inx].button_off = hide; + layoutLayerChanged = TRUE; + } +} + char * FormatLayerName(unsigned int layerNumber) { @@ -316,13 +385,15 @@ FormatLayerName(unsigned int layerNumber) DynStringPrintf(&string, "%2d %c %s", layerNumber + 1, - (layers[layerNumber].objCount > 0 ? '+' : '-'), + (layers[layerNumber].frozen ? '*': layers[layerNumber].module ? 'm': layers[layerNumber].objCount > 0 ? '+' : '-'), layers[layerNumber].name); result = strdup(DynStringToCStr(&string)); DynStringFree(&string); return result; } +static int lbits_width[3] = {14,20,26}; +static int lbits_height[3] = {16,24,32}; #include "bitmaps/l1.xbm" #include "bitmaps/l2.xbm" @@ -425,17 +496,37 @@ FormatLayerName(unsigned int layerNumber) #include "bitmaps/l99.xbm" -static char * show_layer_bits[NUM_BUTTONS] = { - l1_bits, l2_bits, l3_bits, l4_bits, l5_bits, l6_bits, l7_bits, l8_bits, l9_bits, l10_bits, - l11_bits, l12_bits, l13_bits, l14_bits, l15_bits, l16_bits, l17_bits, l18_bits, l19_bits, l20_bits, - l21_bits, l22_bits, l23_bits, l24_bits, l25_bits, l26_bits, l27_bits, l28_bits, l29_bits, l30_bits, - l31_bits, l32_bits, l33_bits, l34_bits, l35_bits, l36_bits, l37_bits, l38_bits, l39_bits, l40_bits, - l41_bits, l42_bits, l43_bits, l44_bits, l45_bits, l46_bits, l47_bits, l48_bits, l49_bits, l50_bits, - l51_bits, l52_bits, l53_bits, l54_bits, l55_bits, l56_bits, l57_bits, l58_bits, l59_bits, l60_bits, - l61_bits, l62_bits, l63_bits, l64_bits, l65_bits, l66_bits, l67_bits, l68_bits, l69_bits, l70_bits, - l71_bits, l72_bits, l73_bits, l74_bits, l75_bits, l76_bits, l77_bits, l78_bits, l79_bits, l80_bits, - l81_bits, l82_bits, l83_bits, l84_bits, l85_bits, l86_bits, l87_bits, l88_bits, l89_bits, l90_bits, - l91_bits, l92_bits, l93_bits, l94_bits, l95_bits, l96_bits, l97_bits, l98_bits, l99_bits, +static char * show_layer_bits[3][NUM_BUTTONS] = { + { l1_x16, l2_x16, l3_x16, l4_x16, l5_x16, l6_x16, l7_x16, l8_x16, l9_x16, l10_x16, + l11_x16, l12_x16, l13_x16, l14_x16, l15_x16, l16_x16, l17_x16, l18_x16, l19_x16, l20_x16, + l21_x16, l22_x16, l23_x16, l24_x16, l25_x16, l26_x16, l27_x16, l28_x16, l29_x16, l30_x16, + l31_x16, l32_x16, l33_x16, l34_x16, l35_x16, l36_x16, l37_x16, l38_x16, l39_x16, l40_x16, + l41_x16, l42_x16, l43_x16, l44_x16, l45_x16, l46_x16, l47_x16, l48_x16, l49_x16, l50_x16, + l51_x16, l52_x16, l53_x16, l54_x16, l55_x16, l56_x16, l57_x16, l58_x16, l59_x16, l60_x16, + l61_x16, l62_x16, l63_x16, l64_x16, l65_x16, l66_x16, l67_x16, l68_x16, l69_x16, l70_x16, + l71_x16, l72_x16, l73_x16, l74_x16, l75_x16, l76_x16, l77_x16, l78_x16, l79_x16, l80_x16, + l81_x16, l82_x16, l83_x16, l84_x16, l85_x16, l86_x16, l87_x16, l88_x16, l89_x16, l90_x16, + l91_x16, l92_x16, l93_x16, l94_x16, l95_x16, l96_x16, l97_x16, l98_x16, l99_x16, }, + { l1_x24, l2_x24, l3_x24, l4_x24, l5_x24, l6_x24, l7_x24, l8_x24, l9_x24, l10_x24, + l11_x24, l12_x24, l13_x24, l14_x24, l15_x24, l16_x24, l17_x24, l18_x24, l19_x24, l20_x24, + l21_x24, l22_x24, l23_x24, l24_x24, l25_x24, l26_x24, l27_x24, l28_x24, l29_x24, l30_x24, + l31_x24, l32_x24, l33_x24, l34_x24, l35_x24, l36_x24, l37_x24, l38_x24, l39_x24, l40_x24, + l41_x24, l42_x24, l43_x24, l44_x24, l45_x24, l46_x24, l47_x24, l48_x24, l49_x24, l50_x24, + l51_x24, l52_x24, l53_x24, l54_x24, l55_x24, l56_x24, l57_x24, l58_x24, l59_x24, l60_x24, + l61_x24, l62_x24, l63_x24, l64_x24, l65_x24, l66_x24, l67_x24, l68_x24, l69_x24, l70_x24, + l71_x24, l72_x24, l73_x24, l74_x24, l75_x24, l76_x24, l77_x24, l78_x24, l79_x24, l80_x24, + l81_x24, l82_x24, l83_x24, l84_x24, l85_x24, l86_x24, l87_x24, l88_x24, l89_x24, l90_x24, + l91_x24, l92_x24, l93_x24, l94_x24, l95_x24, l96_x24, l97_x24, l98_x24, l99_x24, }, + { l1_x32, l2_x32, l3_x32, l4_x32, l5_x32, l6_x32, l7_x32, l8_x32, l9_x32, l10_x32, + l11_x32, l12_x32, l13_x32, l14_x32, l15_x32, l16_x32, l17_x32, l18_x32, l19_x32, l20_x32, + l21_x32, l22_x32, l23_x32, l24_x32, l25_x32, l26_x32, l27_x32, l28_x32, l29_x32, l30_x32, + l31_x32, l32_x32, l33_x32, l34_x32, l35_x32, l36_x32, l37_x32, l38_x32, l39_x32, l40_x32, + l41_x32, l42_x32, l43_x32, l44_x32, l45_x32, l46_x32, l47_x32, l48_x32, l49_x32, l50_x32, + l51_x32, l52_x32, l53_x32, l54_x32, l55_x32, l56_x32, l57_x32, l58_x32, l59_x32, l60_x32, + l61_x32, l62_x32, l63_x32, l64_x32, l65_x32, l66_x32, l67_x32, l68_x32, l69_x32, l70_x32, + l71_x32, l72_x32, l73_x32, l74_x32, l75_x32, l76_x32, l77_x32, l78_x32, l79_x32, l80_x32, + l81_x32, l82_x32, l83_x32, l84_x32, l85_x32, l86_x32, l87_x32, l88_x32, l89_x32, l90_x32, + l91_x32, l92_x32, l93_x32, l94_x32, l95_x32, l96_x32, l97_x32, l98_x32, l99_x32, } }; @@ -456,13 +547,16 @@ static wDrawColor layerColorTab[COUNT(layerRawColorTab)]; static wWin_p layerW; static char layerName[STR_SHORT_SIZE]; +static char layerLinkList[STR_LONG_SIZE]; +static char settingsName[STR_SHORT_SIZE]; static wDrawColor layerColor; static long layerUseColor = TRUE; static long layerVisible = TRUE; static long layerFrozen = FALSE; static long layerOnMap = TRUE; static long layerModule = FALSE; -static void LayerOk(void *); +static long layerNoButton = FALSE; +static void LayerOk(void * unused); static BOOL_T layerRedrawMap = FALSE; #define ENUMLAYER_RELOAD (1) @@ -475,12 +569,13 @@ static char *onMapLabels[] = { "", NULL }; static char *moduleLabels[] = { "", NULL }; static char *layerColorLabels[] = { "", NULL }; static paramIntegerRange_t i0_20 = { 0, NUM_BUTTONS }; +static paramListData_t layerUiListData = { 10, 370, 0 }; static paramData_t layerPLs[] = { #define I_LIST (0) - { PD_DROPLIST, NULL, "layer", PDO_LISTINDEX|PDO_DLGNOLABELALIGN, (void*)250 }, + { PD_DROPLIST, NULL, "layer", PDO_LISTINDEX, I2VP(250), N_("Select Layer:") }, #define I_NAME (1) - { PD_STRING, layerName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, (void*)(250-54), N_("Name"), 0, 0, sizeof(layerName) }, + { PD_STRING, layerName, "name", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(250-54), N_("Name"), 0, 0, sizeof(layerName) }, #define I_COLOR (2) { PD_COLORLIST, &layerColor, "color", PDO_NOPREF, NULL, N_("Color") }, #define I_USE_COLOR (3) @@ -493,19 +588,116 @@ static paramData_t layerPLs[] = { { PD_TOGGLE, &layerOnMap, "onmap", PDO_NOPREF|PDO_DLGHORZ, onMapLabels, N_("On Map"), BC_HORZ|BC_NOBORDER }, #define I_MOD (7) { PD_TOGGLE, &layerModule, "module", PDO_NOPREF|PDO_DLGHORZ, moduleLabels, N_("Module"), BC_HORZ|BC_NOBORDER }, -#define I_COUNT (8) - { PD_STRING, NULL, "object-count", PDO_NOPREF|PDO_DLGBOXEND, (void*)(80), N_("Count"), BO_READONLY }, - { PD_MESSAGE, N_("Personal Preferences"), NULL, PDO_DLGRESETMARGIN, (void *)180 }, - { PD_BUTTON, (void*)DoLayerOp, "reset", PDO_DLGRESETMARGIN, 0, N_("Load"), 0, (void *)ENUMLAYER_RELOAD }, - { PD_BUTTON, (void*)DoLayerOp, "save", PDO_DLGHORZ, 0, N_("Save"), 0, (void *)ENUMLAYER_SAVE }, - { PD_BUTTON, (void*)DoLayerOp, "clear", PDO_DLGHORZ | PDO_DLGBOXEND, 0, N_("Defaults"), 0, (void *)ENUMLAYER_CLEAR }, +#define I_BUT (8) + { PD_TOGGLE, &layerNoButton, "button", PDO_NOPREF|PDO_DLGHORZ, moduleLabels, N_("No Button"), BC_HORZ|BC_NOBORDER }, +#define I_LINKLIST (9) + { PD_STRING, layerLinkList, "layerlist", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(250-54), N_("Linked Layers"), 0, 0, sizeof(layerLinkList) }, +#define I_SETTINGS (10) + { PD_DROPLIST, NULL, "settings", PDO_LISTINDEX, I2VP( 250), N_("Settings when Current") }, +#define I_COUNT (11) + { PD_MESSAGE, N_("Object Count:"), NULL, PDO_DLGBOXEND|PDO_DLGNOLABELALIGN, I2VP(370) }, + { PD_MESSAGE, N_("All Layer Preferences"), NULL, PDO_DLGRESETMARGIN, I2VP(180) }, + { PD_BUTTON, DoLayerOp, "load", PDO_DLGRESETMARGIN, 0, N_("Load"), 0, I2VP(ENUMLAYER_RELOAD) }, + { PD_BUTTON, DoLayerOp, "save", PDO_DLGHORZ, 0, N_("Save"), 0, I2VP(ENUMLAYER_SAVE) }, + { PD_BUTTON, DoLayerOp, "clear", PDO_DLGHORZ | PDO_DLGBOXEND, 0, N_("Defaults"), 0, I2VP(ENUMLAYER_CLEAR) }, { PD_LONG, &newLayerCount, "button-count", PDO_DLGBOXEND|PDO_DLGRESETMARGIN, &i0_20, N_("Number of Layer Buttons") }, }; -static paramGroup_t layerPG = { "layer", 0, layerPLs, sizeof layerPLs/sizeof layerPLs[0] }; +#define settingsListL ((wList_p)layerPLs[I_SETTINGS].control) +#define MESSAGETEXT ((wMessage_p)layerPLs[I_COUNT].control) + +static paramGroup_t layerPG = { "layer", 0, layerPLs, COUNT( layerPLs ) }; + +/** + * Reload the listbox showing the current catalog + */ + +static +int LoadFileListLoad(Catalog *catalog, char * name) +{ + CatalogEntry *currentEntry = catalog->head; + DynString description; + DynStringMalloc(&description, STR_SHORT_SIZE); + + wControlShow((wControl_p)settingsListL, FALSE); + wListClear(settingsListL); + + int currset = 0; + + int i = 0; + + wListAddValue(settingsListL," ",NULL," "); + + while (currentEntry) { + i++; + DynStringClear(&description); + DynStringCatCStr(&description, + currentEntry->contents) ; + wListAddValue(settingsListL, + DynStringToCStr(&description), + NULL, + currentEntry->fullFileName[0]); + if (strcmp(currentEntry->fullFileName[0],name)==0) currset = i; + currentEntry = currentEntry->next; + } + + + wListSetIndex(settingsListL,currset); + + wControlShow((wControl_p)settingsListL, TRUE); + + DynStringFree(&description); + + if (currset == 0 && strcmp(" ",name)!=0) return FALSE; + return TRUE; + +} #define layerL ((wList_p)layerPLs[I_LIST].control) +#define layerS ((wList_p)layerPLs[I_SETTINGS].control) + +void GetLayerLinkString(int inx,char * list) { + + char * cp = &list[0]; + cp[0] = '\0'; + int len = 0; + for (int i = 0; i<layers[inx].layerLinkList.cnt && len<STR_LONG_SIZE-5; i++) { + int l = DYNARR_N(int,layers[inx].layerLinkList,i); + if (i==0) + cp += sprintf(cp,"%d",l); + else + cp += sprintf(cp,";%d",l); + cp[0] = '\0'; + } +} + +void PutLayerListArray(int inx, char * list) { + char * cp = &list[0]; + DYNARR_RESET(int, layers[inx].layerLinkList); + while (cp) { + cp = strpbrk(list,",; "); + if (cp) { + cp[0] ='\0'; + int i = abs((int)strtol(list,&list,0)); + if (i>0 && i !=inx-1 && i<NUM_LAYERS) { + DYNARR_APPEND(int,layers[inx].layerLinkList,1); + DYNARR_LAST(int, layers[inx].layerLinkList) = i; + } + cp[0] = ';'; + list = cp+1; + } else { + int i = abs((int)strtol(list,&list,0)); + if (i>0 && i !=inx-1 && i<NUM_LAYERS) { + DYNARR_APPEND(int,layers[inx].layerLinkList,1); + DYNARR_LAST(int,layers[inx].layerLinkList) = i; + } + cp = 0; + } + } +} + + /** * Load the layer settings to hard coded system defaults */ @@ -521,7 +713,9 @@ LayerSystemDefaults(void) layers[inx].frozen = FALSE; layers[inx].onMap = TRUE; layers[inx].module = FALSE; + layers[inx].button_off = FALSE; layers[inx].objCount = 0; + DYNARR_RESET(int,layers[inx].layerLinkList); SetLayerColor(inx, layerColorTab[inx%COUNT(layerColorTab)]); } } @@ -540,6 +734,11 @@ void LoadLayerLists(void) wListClear(layerL); } + if (layerS) { + wListClear(layerS); + } + + /* add all layers to both lists */ for (inx=0; inx<NUM_LAYERS; inx++) { char *layerLabel; @@ -556,9 +755,8 @@ void LoadLayerLists(void) /* set current layer to selected */ wListSetIndex(setLayerL, curLayer); - if (layerL) { - wListSetIndex(layerL, curLayer); - } + if (layerL) wListSetIndex(layerL,curLayer); + } /** @@ -572,7 +770,7 @@ void LoadLayerLists(void) static void DoLayerOp(void * data) { - switch ((long)data) { + switch (VP2L(data)) { case ENUMLAYER_CLEAR: InitializeLayers(LayerSystemDefaults, -1); break; @@ -586,13 +784,12 @@ static void DoLayerOp(void * data) break; } - UpdateLayerDlg(); + UpdateLayerDlg(curLayer); //Reset to current Layer if (layoutLayerChanged) { MainProc(mainW, wResize_e, NULL, NULL); layoutLayerChanged = FALSE; - changed++; - SetWindowTitle(); + SetFileChanged(); } } @@ -602,35 +799,50 @@ static void DoLayerOp(void * data) * elements to the new settings. */ -static void -UpdateLayerDlg() +EXPORT void UpdateLayerDlg(unsigned int layer) { - int inx; + int inx; /* update the globals for the layer dialog */ - layerVisible = layers[curLayer].visible; - layerFrozen = layers[curLayer].frozen; - layerOnMap = layers[curLayer].onMap; - layerModule = layers[curLayer].module; - layerColor = layers[curLayer].color; - layerUseColor = layers[curLayer].useColor; - strcpy(layerName, layers[curLayer].name); - layerCurrent = curLayer; + layerVisible = layers[layer].visible; + layerFrozen = layers[layer].frozen; + layerOnMap = layers[layer].onMap; + layerModule = layers[layer].module; + layerColor = layers[layer].color; + layerUseColor = layers[layer].useColor; + layerNoButton = layers[layer].button_off; + strcpy(layerName, layers[layer].name); + strcpy(settingsName, layers[layer].settingsName); + GetLayerLinkString(layer,layerLinkList); + + layerCurrent = layer; /* now re-load the layer list boxes */ LoadLayerLists(); - sprintf(message, "%ld", layers[curLayer].objCount); - ParamLoadMessage(&layerPG, I_COUNT, message); + + /* force update of the 'manage layers' dialogbox */ if (layerL) { + wListSetIndex(layerL,layer); ParamLoadControls(&layerPG); } - /* finally show the layer buttons with ballon text */ + if (layerS) { + if (!LoadFileListLoad(settingsCatalog,settingsName)) + layers[layer].settingsName[0] = '\0'; + } + + sprintf(message, "Object Count: %ld", layers[layer].objCount); + if (MESSAGETEXT) wMessageSetValue(MESSAGETEXT, message); + + /* finally show the layer buttons with balloon text */ for (inx = 0; inx < NUM_BUTTONS; inx++) { - wButtonSetBusy(layer_btns[inx], layers[inx].visible != 0); - wControlSetBalloonText((wControl_p)layer_btns[inx], + if (!layers[inx].button_off) { + wButtonSetBusy(layer_btns[inx], layers[inx].visible != 0); + wControlSetBalloonText((wControl_p)layer_btns[inx], (layers[inx].name[0] != '\0' ? layers[inx].name :_("Show/Hide Layer"))); + } } + } /** @@ -648,7 +860,7 @@ FillLayerList( wList_p listLayers) for (int inx = 0; inx < NUM_LAYERS; inx++) { char *layerFormattedName; layerFormattedName = FormatLayerName(inx); - wListAddValue((wList_p)listLayers, layerFormattedName, NULL, (void*)(long)inx); + wListAddValue((wList_p)listLayers, layerFormattedName, NULL, I2VP(inx)); free(layerFormattedName); } @@ -670,9 +882,20 @@ InitializeLayers(void LayerInitFunc(void), int newCurrLayer) /* count the objects on each layer */ LayerSetCounts(); - /* Switch the current layer when requested */ + /* Switch the current layer when requested or the first above not frozen*/ if (newCurrLayer != -1) { - curLayer = newCurrLayer; + curLayer = -1; + for (int i = newCurrLayer; i< NUM_LAYERS; i++) { + if (!layers[i].frozen) { + curLayer = i; + break; + } + } + if (curLayer == -1) { + ErrorMessage( MSG_NO_EMPTY_LAYER ); + layers[0].frozen = FALSE; + curLayer = 0; + } } } @@ -686,6 +909,7 @@ LayerPrefSave(void) unsigned int inx; int flags; char buffer[ 80 ]; + char links[STR_LONG_SIZE]; char layersSaved[ 3 * NUM_LAYERS + 1 ]; /* 0..99 plus separator */ /* FIXME: values for layers that are configured to default now should be overwritten in the settings */ layersSaved[ 0 ] = '\0'; @@ -693,8 +917,10 @@ LayerPrefSave(void) for (inx = 0; inx < NUM_LAYERS; inx++) { /* if a name is set that is not the default value or a color different from the default has been set, information about the layer needs to be saved */ - if ((layers[inx].name[0] && inx != 0) || + if ((layers[inx].name[0]) || layers[inx].frozen || (!layers[inx].onMap) || (!layers[inx].visible) || + layers[inx].button_off || (layers[inx].layerLinkList.cnt>0) || + layers[inx].module || layers[inx].color != layerColorTab[inx%COUNT(layerColorTab)]) { sprintf(buffer, LAYERPREF_NAME ".%0u", inx); wPrefSetString(LAYERPREF_SECTION, buffer, layers[inx].name); @@ -718,9 +944,24 @@ LayerPrefSave(void) flags |= LAYERPREF_MODULE; } + if (layers[inx].button_off) { + flags |= LAYERPREF_NOBUTTON; + } + sprintf(buffer, LAYERPREF_FLAGS ".%0u", inx); wPrefSetInteger(LAYERPREF_SECTION, buffer, flags); + if (layers[inx].layerLinkList.cnt>0) { + sprintf(buffer, LAYERPREF_LIST ".%0u", inx); + GetLayerLinkString(inx,links); + wPrefSetString(LAYERPREF_SECTION, buffer, links); + + if (settingsName[0] && strcmp(settingsName," ")!=0) { + sprintf(buffer, LAYERPREF_SETTINGS ".%0u", inx); + wPrefSetString(LAYERPREF_SECTION, buffer, layers[inx].settingsName); + } + } + /* extend the list of layers that are set up via the preferences */ if (layersSaved[ 0 ]) { strcat(layersSaved, ","); @@ -758,6 +999,7 @@ LayerPrefLoad(void) int inx; char layerOption[20]; const char *layerValue; + char listValue[STR_LONG_SIZE]; int color; inx = atoi(prefString); sprintf(layerOption, LAYERPREF_NAME ".%d", inx); @@ -783,9 +1025,40 @@ LayerPrefLoad(void) layers[inx].onMap = ((flags & LAYERPREF_ONMAP) != 0); layers[inx].visible = ((flags & LAYERPREF_VISIBLE) != 0); layers[inx].module = ((flags & LAYERPREF_MODULE) !=0); + layers[inx].button_off = ((flags & LAYERPREF_NOBUTTON) !=0); + + sprintf(layerOption, LAYERPREF_LIST ".%d", inx); + layerValue = wPrefGetString(LAYERPREF_SECTION,layerOption); + if (layerValue) { + strcpy(listValue,layerValue); + PutLayerListArray(inx,listValue); + } else { + listValue[0] = '\0'; + PutLayerListArray(inx,listValue); + } + sprintf(layerOption, LAYERPREF_SETTINGS ".%d", inx); + layerValue = wPrefGetString(LAYERPREF_SECTION,layerOption); + if (layerValue) { + strcpy(layers[inx].settingsName,layerValue); + } else { + layers[inx].settingsName[0] = '\0'; + } + prefString = strtok(NULL, ","); } } + //Make sure curLayer not frozen + for (int i=curLayer; i<NUM_LAYERS; i++) { + if (!layers[i].frozen) { + curLayer = i; + break; + } + } + if (layers[curLayer].frozen) { + ErrorMessage( MSG_NO_EMPTY_LAYER ); + layers[0].frozen = FALSE; + curLayer = 0; + } } /** @@ -852,7 +1125,7 @@ void DefaultLayerProperties(void) { InitializeLayers(LayerPrefLoad, 0); - UpdateLayerDlg(); + UpdateLayerDlg(curLayer); //Use Current Layer if (layoutLayerChanged) { MainProc(mainW, wResize_e, NULL, NULL); @@ -892,6 +1165,8 @@ static void LayerUpdate(void) layerModule = FALSE; ParamLoadControl(&layerPG, I_MOD); } + char oldLinkList[STR_LONG_SIZE]; + GetLayerLinkString((int)layerCurrent,oldLinkList); if (strcmp(layers[(int)layerCurrent].name, layerName) || layerColor != layers[(int)layerCurrent].color || @@ -899,9 +1174,11 @@ static void LayerUpdate(void) layers[(int)layerCurrent].visible != (BOOL_T)layerVisible || layers[(int)layerCurrent].frozen != (BOOL_T)layerFrozen || layers[(int)layerCurrent].onMap != (BOOL_T)layerOnMap || - layers[(int)layerCurrent].module != (BOOL_T)layerModule) { - changed++; - SetWindowTitle(); + layers[(int)layerCurrent].module != (BOOL_T)layerModule || + layers[(int)layerCurrent].button_off != (BOOL_T)layerNoButton || + strcmp(layers[(int)layerCurrent].settingsName,settingsName) || + strcmp(oldLinkList,layerLinkList)) { + SetFileChanged(); } if (layerL) { @@ -912,11 +1189,12 @@ static void LayerUpdate(void) free(layerFormattedName); } + layerFormattedName = FormatLayerName(layerCurrent); wListSetValues(setLayerL, layerCurrent, layerFormattedName, NULL, NULL); free(layerFormattedName); - if (layerCurrent < NUM_BUTTONS) { + if (layerCurrent < NUM_BUTTONS && !layers[(int)layerCurrent].button_off) { if (strlen(layers[(int)layerCurrent].name)>0) { wControlSetBalloonText((wControl_p)layer_btns[(int)layerCurrent], layers[(int)layerCurrent].name); @@ -937,15 +1215,25 @@ static void LayerUpdate(void) SetLayerColor(layerCurrent, layerColor); if (layerCurrent<NUM_BUTTONS && - layers[(int)layerCurrent].visible!=(BOOL_T)layerVisible) { + layers[(int)layerCurrent].visible!=(BOOL_T)layerVisible && !layers[(int)layerCurrent].button_off) { wButtonSetBusy(layer_btns[(int)layerCurrent], layerVisible); } layers[(int)layerCurrent].useColor = (BOOL_T)layerUseColor; + if (layers[(int)layerCurrent].visible != (BOOL_T)layerVisible) + FlipLayer(I2VP(layerCurrent)); layers[(int)layerCurrent].visible = (BOOL_T)layerVisible; layers[(int)layerCurrent].frozen = (BOOL_T)layerFrozen; + if (layers[(int)layerCurrent].frozen) DeselectLayer(layerCurrent); layers[(int)layerCurrent].onMap = (BOOL_T)layerOnMap; layers[(int)layerCurrent].module = (BOOL_T)layerModule; + strcpy(layers[(int)layerCurrent].settingsName,settingsName); + + PutLayerListArray((int)layerCurrent,layerLinkList); + + SetLayerHideButton(layerCurrent,layerNoButton); + + MainProc( mainW, wResize_e, NULL, NULL ); if (layerRedrawMap) { DoRedraw(); @@ -968,15 +1256,26 @@ static void LayerSelect( layerCurrent = (unsigned int)inx; strcpy(layerName, layers[inx].name); + strcpy(settingsName, layers[inx].settingsName); layerVisible = layers[inx].visible; layerFrozen = layers[inx].frozen; layerOnMap = layers[inx].onMap; layerModule = layers[inx].module; layerColor = layers[inx].color; layerUseColor = layers[inx].useColor; + layerNoButton = layers[inx].button_off; sprintf(message, "%ld", layers[inx].objCount); + GetLayerLinkString(inx,layerLinkList); ParamLoadMessage(&layerPG, I_COUNT, message); ParamLoadControls(&layerPG); + + if (layerS) { + if (!LoadFileListLoad(settingsCatalog,settingsName)) { + settingsName[0] = '\0'; + layers[inx].settingsName[0] = '\0'; + } + + } } void ResetLayers(void) @@ -989,9 +1288,13 @@ void ResetLayers(void) layers[inx].frozen = FALSE; layers[inx].onMap = TRUE; layers[inx].module = FALSE; + layers[inx].button_off = FALSE; layers[inx].objCount = 0; + strcpy(layers[inx].settingsName,""); + DYNARR_RESET(int,layers[inx].layerLinkList); SetLayerColor(inx, layerColorTab[inx%COUNT(layerColorTab)]); + if (inx<NUM_BUTTONS) { wButtonSetLabel(layer_btns[inx], (char*)show_layer_bmps[inx]); } @@ -1003,7 +1306,21 @@ void ResetLayers(void) wControlSetBalloonText((wControl_p)layer_btns[inx], _("Show/Hide Layer")); } - curLayer = 0; + curLayer = -1; + + for (int i=0;i<NUM_LAYERS;i++) { + if (!layers[i].frozen) { + curLayer = i; + break; + } + } + + if (curLayer == -1) { + ErrorMessage( MSG_NO_EMPTY_LAYER ); + layers[0].frozen = FALSE; + curLayer = 0; + } + layerVisible = TRUE; layerFrozen = FALSE; layerOnMap = TRUE; @@ -1011,6 +1328,8 @@ void ResetLayers(void) layerColor = layers[0].color; layerUseColor = TRUE; strcpy(layerName, layers[0].name); + strcpy(settingsName, layers[0].settingsName); + LoadLayerLists(); if (layerL) { @@ -1028,6 +1347,10 @@ void SaveLayers(void) abort(); } + for (int i=0;i<NUM_LAYERS;i++) { + layers[i].settingsName[0] = '\0'; + } + memcpy(layers_save, layers, NUM_LAYERS * sizeof layers[0]); ResetLayers(); } @@ -1075,7 +1398,7 @@ void RestoreLayers(void) * */ -static void LayerOk(void * junk) +static void LayerOk(void * unused) { LayerSelect(layerCurrent); @@ -1113,30 +1436,135 @@ static void LayerDlgUpdate( case I_MAP: layerRedrawMap = TRUE; - break; + /* No Break */ + case I_VIS: + case I_FRZ: + case I_MOD: + case I_BUT: + LayerUpdate(); + UpdateLayerDlg(layerCurrent); + break; + + case I_SETTINGS: + if (strcmp((char*)wListGetItemContext(settingsListL,(wIndex_t)*(long*)valueP)," ")==0) + settingsName[0] = '\0'; + else + strcpy(settingsName,(char*)wListGetItemContext(settingsListL,(wIndex_t)*(long*)valueP)); + break; } + + + } +/** + * Scan opened directory for the next settings file + * + * \param dir IN opened directory handle + * \param dirName IN name of directory + * \param fileName OUT fully qualified filename + * + * \return TRUE if file found, FALSE if not + */ -static void DoLayer(void * junk) +static bool +GetNextSettingsFile(DIR *dir, const char *dirName, char **fileName) +{ + bool done = false; + bool res = false; + + /* + * get all files from the directory + */ + while (!done) { + struct stat fileState; + struct dirent *ent; + + ent = readdir(dir); + + if (ent) { + if (!XtcStricmp(FindFileExtension(ent->d_name), "xset")) { + /* create full file name and get the state for that file */ + MakeFullpath(fileName, dirName, ent->d_name, NULL); + + if (stat(*fileName, &fileState) == -1) { + fprintf(stderr, "Error getting file state for %s\n", *fileName); + continue; + } + + /* ignore any directories */ + if (!(fileState.st_mode & S_IFDIR)) { + done = true; + res = true; + } + } + } else { + done = true; + res = false; + } + } + return (res); +} + + +/* + * Get all the settings files in the working directory + */ + +static CatalogEntry * +ScanSettingsDirectory(Catalog *catalog, const char *dirName) +{ + DIR *d; + CatalogEntry *newEntry = catalog->head; + char contents[STR_SHORT_SIZE]; + + d = opendir(dirName); + if (d) { + char *fileName = NULL; + + while (GetNextSettingsFile(d, dirName, &fileName)) { + char *contents_start = strrchr(fileName,PATH_SEPARATOR[0]); + if (contents_start[0] == '/') contents_start++; + char *contents_end = strchr(contents_start,'.'); + if (contents_end[0] == '.') contents_end[0] = '\0'; + strcpy(contents,contents_start); + contents_end[0] = '.'; + newEntry = InsertInOrder(catalog,contents, NULL); + UpdateCatalogEntry(newEntry, fileName, contents, NULL); + free(fileName); + fileName = NULL; + } + closedir(d); + } + + return (newEntry); +} + +static void DoLayer(void * unused) { if (layerW == NULL) { layerW = ParamCreateDialog(&layerPG, MakeWindowTitle(_("Layers")), _("Done"), LayerOk, wHide, TRUE, NULL, 0, LayerDlgUpdate); } + if (settingsCatalog) CatalogDiscard(settingsCatalog); + else settingsCatalog = InitCatalog(); + ScanSettingsDirectory(settingsCatalog, wGetAppWorkDir()); + + /* set the globals to the values for the current layer */ - UpdateLayerDlg(); + UpdateLayerDlg(curLayer); layerRedrawMap = FALSE; wShow(layerW); layoutLayerChanged = FALSE; } + BOOL_T ReadLayers(char * line) { - char * name; - int inx, visible, frozen, color, onMap, module, dontUseColor, ColorFlags; + char * name, *layerLinkList, *layerSettingsName; + int inx, visible, frozen, color, onMap, module, dontUseColor, ColorFlags, button_off; unsigned long rgb; /* older files didn't support layers */ @@ -1151,9 +1579,15 @@ BOOL_T ReadLayers(char * line) curLayer = atoi(line+7); if (!IsLayerValid(curLayer)) { + curLayer = 0; } + if (layers[curLayer].frozen) { + ErrorMessage( MSG_NOT_UNFROZEN_LAYER ); + layers[curLayer].frozen = FALSE; + } + if (layerL) { wListSetIndex(layerL, curLayer); } @@ -1165,15 +1599,33 @@ BOOL_T ReadLayers(char * line) return TRUE; } - /* get the properties for a layer from the file and update the layer accordingly */ + if (strncmp(line, "LINK", 4) == 0) { + if (!GetArgs(line+4, "dq" , &inx, &layerLinkList)) { + return FALSE; + } + PutLayerListArray(inx,layerLinkList); + return TRUE; + } - if (!GetArgs(line, "dddduddd0q", &inx, &visible, &frozen, &onMap, &rgb, &module, &dontUseColor, &ColorFlags, - &name)) { - return FALSE; + if (strncmp(line, "SET", 3) == 0) { + if (!GetArgs(line+3, "dq", &inx, &layerSettingsName)) { + return FALSE; + } + strcpy(layers[inx].settingsName,layerSettingsName); + return TRUE; } + /* get the properties for a layer from the file and update the layer accordingly */ + + if (!GetArgs(line, "dddduddddq", &inx, &visible, &frozen, &onMap, &rgb, &module, &dontUseColor, &ColorFlags, &button_off, + &name)) { + + return FALSE; + } + + if (paramVersion < 9) { - if ((int)rgb < sizeof oldColorMap/sizeof oldColorMap[0]) { + if ((int)rgb < COUNT( oldColorMap ) ) { rgb = wRGB(oldColorMap[(int)rgb][0], oldColorMap[(int)rgb][1], oldColorMap[(int)rgb][2]); } else { @@ -1194,15 +1646,15 @@ BOOL_T ReadLayers(char * line) layers[inx].module = module; layers[inx].color = color; layers[inx].useColor = !dontUseColor; + layers[inx].button_off = button_off; colorTrack = ColorFlags&1; //Make sure globals are set colorDraw = ColorFlags&2; - if (inx<NUM_BUTTONS) { + if (inx<NUM_BUTTONS && !layers[inx].button_off) { if (strlen(name) > 0) { wControlSetBalloonText((wControl_p)layer_btns[(int)inx], layers[inx].name); } - wButtonSetBusy(layer_btns[(int)inx], visible); } MyFree(name); @@ -1227,12 +1679,15 @@ IsLayerConfigured(unsigned int layerNumber) layers[layerNumber].frozen || !layers[layerNumber].onMap || layers[layerNumber].module || + layers[layerNumber].button_off || layers[layerNumber].color != layerColorTab[layerNumber % (COUNT(layerColorTab))] || layers[layerNumber].name[0] || + layers[layerNumber].layerLinkList.cnt > 0 || layers[layerNumber].objCount); } + /** * Save the layer information to the file. * @@ -1259,12 +1714,20 @@ BOOL_T WriteLayers(FILE * f) wDrawGetRGB(layers[inx].color), layers[inx].module, layers[inx].useColor?0:1, - ColorFlags, 0, + ColorFlags, layers[inx].button_off, PutTitle(layers[inx].name)); } } fprintf(f, "LAYERS CURRENT %u\n", curLayer); + + for (inx = 0; inx < NUM_LAYERS; inx++) { + GetLayerLinkString(inx,layerLinkList); + if (IsLayerConfigured(inx) && strlen(layerLinkList)>0) + fprintf(f, "LAYERS LINK %u \"%s\"\n",inx,layerLinkList); + if (IsLayerConfigured(inx) && layers[inx].settingsName[0]) + fprintf(f, "LAYERS SET %u \"%s\"\n",inx, layers[inx].settingsName); + } return TRUE; } @@ -1281,8 +1744,10 @@ void InitLayers(void) /* create the bitmaps for the layer buttons */ /* all bitmaps have to have the same dimensions */ - for (i = 0; i<NUM_BUTTONS; i++) { - show_layer_bmps[i] = wIconCreateBitMap(l1_width, l1_height, show_layer_bits[i], + for (int i = 0;i<NUM_LAYERS; i++) { + // char *bits = (show_layer_bits[i] + iconSize * sizeof(char*))); + show_layer_bmps[i] = wIconCreateBitMap(lbits_width[iconSize], lbits_height[iconSize], + show_layer_bits[iconSize][i], layerColorTab[i%(COUNT(layerColorTab))]); layers[i].color = layerColorTab[i%(COUNT(layerColorTab))]; layers[i].useColor = TRUE; @@ -1294,11 +1759,13 @@ void InitLayers(void) wControlSetBalloonText((wControl_p)setLayerL, GetBalloonHelpStr("cmdLayerSet")); AddToolbarControl((wControl_p)setLayerL, IC_MODETRAIN_TOO); - backgroundB = AddToolbarButton("cmdBackgroundShow", wIconCreatePixMap(background), 0, - (addButtonCallBack_t)BackgroundToggleShow, NULL); + backgroundB = AddToolbarButton("cmdBackgroundShow", wIconCreatePixMap(background_xpm[iconSize]), 0, + BackgroundToggleShow, NULL); + /* add the help text */ + wControlSetBalloonText((wControl_p)backgroundB, _("Show/Hide Background")); wControlActive((wControl_p)backgroundB, FALSE); - for (i = 0; i<NUM_LAYERS; i++) { + for (int i = 0; i<NUM_LAYERS; i++) { char *layerName; if (i<NUM_BUTTONS) { @@ -1306,17 +1773,17 @@ void InitLayers(void) sprintf(message, "cmdLayerShow%u", i); layer_btns[i] = wButtonCreate(mainW, 0, 0, message, (char*)(show_layer_bmps[i]), - BO_ICON, 0, (wButtonCallBack_p)FlipLayer, (void*)(intptr_t)i); + BO_ICON, 0, FlipLayer, I2VP(i) ); /* add the help text */ wControlSetBalloonText((wControl_p)layer_btns[i], _("Show/Hide Layer")); /* put on toolbar */ - AddToolbarControl((wControl_p)layer_btns[i], IC_MODETRAIN_TOO); - /* set state of button */ - wButtonSetBusy(layer_btns[i], 1); + AddToolbarControl((wControl_p)layer_btns[i], IC_MODETRAIN_TOO); + /* set state of button */ + wButtonSetBusy(layer_btns[i], 1); } layerName = FormatLayerName(i); - wListAddValue(setLayerL, layerName, NULL, (void*)(long)i); + wListAddValue(setLayerL, layerName, NULL, I2VP(i)); free(layerName); } @@ -1324,7 +1791,6 @@ void InitLayers(void) AddPlaybackProc("LAYERS", (playbackProc_p)ReadLayers, NULL); } - addButtonCallBack_t InitLayersDialog(void) { ParamRegister(&layerPG); diff --git a/app/bin/doption.c b/app/bin/doption.c index 3b9ed02..d196558 100644 --- a/app/bin/doption.c +++ b/app/bin/doption.c @@ -20,20 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <ctype.h> - #include "ccurve.h" #include "cselect.h" #include "custom.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" +#include "common-ui.h" -static paramIntegerRange_t i0_64 = { 0, 64 }; static paramIntegerRange_t i1_64 = { 1, 64 }; static paramIntegerRange_t i1_100 = { 1, 100 }; +static paramIntegerRange_t i0_256 = { 0, 256 }; static paramIntegerRange_t i1_256 = { 1, 256 }; +static paramIntegerRange_t i1_1024 = { 1, 1024 }; static paramIntegerRange_t i0_10000 = { 0, 10000 }; static paramIntegerRange_t i0_99 = { 0, 99}; static paramIntegerRange_t i1_1000 = { 1, 1000 }; @@ -62,7 +60,7 @@ long GetChanges( paramGroup_p pg ) int inx; for ( changed=ParamUpdate(pg),inx=0,changes=0; changed; changed>>=1,inx++ ) { if ( changed&1 ) - changes |= (long)pg->paramPtr[inx].context; + changes |= VP2L(pg->paramPtr[inx].context); } return changes; } @@ -71,45 +69,7 @@ static paramGroup_t prefPG; -static void OptionDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) -{ - if ( inx < 0 ) return; - if ( pg->paramPtr[inx].valueP == &enableBalloonHelp ) { - wEnableBalloonHelp((wBool_t)*(long*)valueP); - } else { - if (pg->paramPtr[inx].valueP == &units) { - UpdatePrefD(); - } - if (pg->paramPtr[inx].valueP == &distanceFormatInx) { - UpdateMeasureFmt(); - } - if (pg->paramPtr[inx].valueP == &showFlexTrack) { - DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR); - } - if (pg->paramPtr[inx].valueP == &checkPtInterval) { - checkPtInterval = *(long *)valueP; - if (checkPtInterval == 0 ) { - wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, _("Turning off AutoSave") ); - UpdateAutoSaveInterval(0); - } else { - wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, NULL ); - } - } - if (pg->paramPtr[inx].valueP == &autosaveChkPoints) { - autosaveChkPoints = *(long *)valueP; - if (checkPtInterval == 0 && autosaveChkPoints>0 ) { - wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, _("Turning on CheckPointing") ); - UpdateChkPtInterval(10); - } else { - wControlSetBalloon( pg->paramPtr[inx].control, 0, -5, NULL ); - } - } - } -} static void OptionDlgCancel( wWin_p win ) @@ -141,37 +101,40 @@ static char * colorDrawLabels[] = { N_("Object"), N_("Layer"), NULL }; static char * liveMapLabels[] = { N_("Live Map"), NULL }; static char * hideTrainsInTunnelsLabels[] = { N_("Hide Trains On Hidden Track"), NULL }; static char * constrainMainLabels[] = {N_("Constrain Drawing Area to Room boundaries"), NULL}; +static char * dontHideLabels[] = {N_("Don't Hide System Cursor when program cursor is active"), NULL}; extern long trainPause; static paramData_t displayPLs[] = { - { PD_RADIO, &colorTrack, "color-track", PDO_NOPSHUPD|PDO_DRAW, colorTrackLabels, N_("Color Track"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, &colorDraw, "color-draw", PDO_NOPSHUPD|PDO_DRAW, colorDrawLabels, N_("Color Draw"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, &drawTunnel, "tunnels", PDO_NOPSHUPD|PDO_DRAW, drawTunnelLabels, N_("Draw Tunnel"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, &drawEndPtV, "endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtLabels3, N_("Draw EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, &drawUnconnectedEndPt, "unconnected-endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtUnconnectedSize, N_("Draw Unconnected EndPts"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, &tieDrawMode, "tiedraw", PDO_NOPSHUPD|PDO_DRAW, tiedrawLabels, N_("Draw Ties"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_RADIO, ¢erDrawMode, "centerdraw", PDO_NOPSHUPD|PDO_DRAW, drawCenterCircle, N_("Draw Centers"), BC_HORZ, (void*)(CHANGE_MAIN | CHANGE_MAP) }, - { PD_LONG, &twoRailScale, "tworailscale", PDO_NOPSHUPD, &i1_64, N_("Two Rail Scale"), 0, (void*)(CHANGE_MAIN) }, - { PD_LONG, &mapScale, "mapscale", PDO_NOPSHUPD, &i1_256, N_("Map Scale"), 0, (void*)(CHANGE_MAP) }, + { PD_RADIO, &colorTrack, "color-track", PDO_NOPSHUPD|PDO_DRAW, colorTrackLabels, N_("Color Track"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, &colorDraw, "color-draw", PDO_NOPSHUPD|PDO_DRAW, colorDrawLabels, N_("Color Draw"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, &drawTunnel, "tunnels", PDO_NOPSHUPD|PDO_DRAW, drawTunnelLabels, N_("Draw Tunnel"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, &drawEndPtV, "endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtLabels3, N_("Draw EndPts"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, &drawUnconnectedEndPt, "unconnected-endpt", PDO_NOPSHUPD|PDO_DRAW, drawEndPtUnconnectedSize, N_("Draw Unconnected EndPts"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, &tieDrawMode, "tiedraw", PDO_NOPSHUPD|PDO_DRAW, tiedrawLabels, N_("Draw Ties"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_RADIO, ¢erDrawMode, "centerdraw", PDO_NOPSHUPD|PDO_DRAW, drawCenterCircle, N_("Draw Centers"), BC_HORZ, I2VP(CHANGE_MAIN | CHANGE_MAP) }, + { PD_LONG, &twoRailScale, "tworailscale", PDO_NOPSHUPD, &i1_256, N_("Two Rail Scale"), 0, I2VP(CHANGE_MAIN) }, + { PD_LONG, &mapScale, "mapscale", PDO_NOPSHUPD, &i1_1024, N_("Map Scale"), 0, I2VP(CHANGE_MAP) }, + { PD_TOGGLE, &dontHideCursor, "donthidecursor", PDO_NOPSHUPD, dontHideLabels, "", BC_HORZ }, { PD_TOGGLE, &constrainMain, "constrainmain", PDO_NOPSHUPD, constrainMainLabels, "", BC_HORZ }, { PD_TOGGLE, &liveMap, "livemap", PDO_NOPSHUPD, liveMapLabels, "", BC_HORZ }, { PD_TOGGLE, &autoPan, "autoPan", PDO_NOPSHUPD, autoPanLabels, "", BC_HORZ }, - { PD_TOGGLE, &labelEnable, "labelenable", PDO_NOPSHUPD, labelEnableLabels, N_("Label Enable"), 0, (void*)(CHANGE_MAIN) }, - { PD_LONG, &labelScale, "labelscale", PDO_NOPSHUPD, &i0_64, N_("Label Scale"), 0, (void*)(CHANGE_MAIN) }, - { PD_LONG, &descriptionFontSize, "description-fontsize", PDO_NOPSHUPD, &i1_1000, N_("Label Font Size"), 0, (void*)(CHANGE_MAIN) }, - { PD_TOGGLE, &hotBarLabels, "hotbarlabels", PDO_NOPSHUPD, hotBarLabelsLabels, N_("Hot Bar Labels"), BC_HORZ, (void*)(CHANGE_TOOLBAR) }, - { PD_TOGGLE, &layoutLabels, "layoutlabels", PDO_NOPSHUPD, listLabelsLabels, N_("Layout Labels"), BC_HORZ, (void*)(CHANGE_MAIN) }, - { PD_TOGGLE, &listLabels, "listlabels", PDO_NOPSHUPD, listLabelsLabels, N_("List Labels"), BC_HORZ, (void*)(CHANGE_PARAMS) }, +#define labelSelect (12) + { PD_TOGGLE, &labelEnable, "labelenable", PDO_NOPSHUPD, labelEnableLabels, N_("Label Enable"), 0, I2VP(CHANGE_MAIN) }, + { PD_LONG, &labelScale, "labelscale", PDO_NOPSHUPD, &i0_256, N_("Label Scale"), 0, I2VP(CHANGE_MAIN) }, + { PD_LONG, &descriptionFontSize, "description-fontsize", PDO_NOPSHUPD, &i1_1000, N_("Label Font Size"), 0, I2VP(CHANGE_MAIN) }, + { PD_TOGGLE, &hotBarLabels, "hotbarlabels", PDO_NOPSHUPD, hotBarLabelsLabels, N_("Hot Bar Labels"), BC_HORZ, I2VP(CHANGE_TOOLBAR) }, + { PD_TOGGLE, &layoutLabels, "layoutlabels", PDO_NOPSHUPD, listLabelsLabels, N_("Layout Labels"), BC_HORZ, I2VP(CHANGE_MAIN) }, + { PD_TOGGLE, &listLabels, "listlabels", PDO_NOPSHUPD, listLabelsLabels, N_("List Labels"), BC_HORZ, I2VP(CHANGE_PARAMS) }, /* ATTENTION: update the define below if you add entries above */ -#define I_HOTBARLABELS (18) - { PD_DROPLIST, &carHotbarModeInx, "carhotbarlabels", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_LISTINDEX, (void*)250, N_("Car Labels"), 0, (void*)CHANGE_SCALE }, +#define I_HOTBARLABELS (19) + { PD_DROPLIST, &carHotbarModeInx, "carhotbarlabels", PDO_NOPSHUPD|PDO_DLGUNDERCMDBUTT|PDO_LISTINDEX, I2VP(250), N_("Car Labels"), 0, I2VP(CHANGE_SCALE) }, { PD_LONG, &trainPause, "trainpause", PDO_NOPSHUPD, &i10_1000 , N_("Train Update Delay"), 0, 0 }, { PD_TOGGLE, &hideTrainsInTunnels, "hideTrainsInTunnels", PDO_NOPSHUPD, hideTrainsInTunnelsLabels, "", BC_HORZ } }; -static paramGroup_t displayPG = { "display", PGO_RECORD|PGO_PREFMISC, displayPLs, sizeof displayPLs/sizeof displayPLs[0] }; +static paramGroup_t displayPG = { "display", PGO_RECORD|PGO_PREFMISC, displayPLs, COUNT( displayPLs ) }; static void DisplayOk( void * junk ) @@ -183,27 +146,65 @@ static void DisplayOk( void * junk ) } -#ifdef LATER -static void DisplayChange( long changes ) +static void OptionDlgUpdate( + paramGroup_p pg, + int inx, + void * valueP ) { - if (changes & (CHANGE_SCALE|CHANGE_UNITS)) - if (displayW != NULL && wWinIsVisible(displayW) ) - ParamLoadControls( &displayPG ); -} -#endif + if ( inx < 0 ) return; + if ( pg->paramPtr[inx].valueP == &enableBalloonHelp ) { + wEnableBalloonHelp((wBool_t)*(long*)valueP); + } else { + if (pg->paramPtr[inx].valueP == &labelEnable) { + long new_labels = wRadioGetValue( (wChoice_p)pg->paramPtr[inx].control ); + labelEnable = new_labels; + ParamLoadControl(&displayPG,labelSelect); + } + if (pg->paramPtr[inx].valueP == &units) { + UpdatePrefD(); + } + if (pg->paramPtr[inx].valueP == &distanceFormatInx) { + UpdateMeasureFmt(); + } + if (pg->paramPtr[inx].valueP == &showFlexTrack) { + DoChangeNotification(CHANGE_PARAMS|CHANGE_TOOLBAR); + } + if (pg->paramPtr[inx].valueP == &checkPtInterval) { + checkPtInterval = *(long *)valueP; + if (checkPtInterval == 0 ) { + wWinPix_t h = wControlGetHeight(pg->paramPtr[inx].control); + wControlSetBalloon( pg->paramPtr[inx].control, 0, h*3/4, _("Turning off AutoSave") ); + UpdateAutoSaveInterval(0); + } else { + wControlSetBalloon( pg->paramPtr[inx].control, 0, 0, NULL ); + } + } + if (pg->paramPtr[inx].valueP == &autosaveChkPoints) { + autosaveChkPoints = *(long *)valueP; + if (checkPtInterval == 0 && autosaveChkPoints>0 ) { + wWinPix_t h = wControlGetHeight(pg->paramPtr[inx].control); + wControlSetBalloon( pg->paramPtr[inx].control, 0, -h*3/4, _("Turning on CheckPointing") ); + UpdateChkPtInterval(10); + } else { + wControlSetBalloon( pg->paramPtr[inx].control, 0, 0, NULL ); + } + } + + } +} static void DoDisplay( void * junk ) { if (displayW == NULL) { displayW = ParamCreateDialog( &displayPG, MakeWindowTitle(_("Display Options")), _("Ok"), DisplayOk, OptionDlgCancel, TRUE, NULL, 0, OptionDlgUpdate ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto"), NULL, (void*)0x0002 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf"), NULL, (void*)0x0012 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Part Number"), NULL, (void*)0x0312 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Partno/Item"), NULL, (void*)0x4312 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto"), NULL, (void*)0x0021 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Part Number"), NULL, (void*)0x0321 ); - wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Partno/Item"), NULL, (void*)0x4321 ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto"), NULL, I2VP(0x0002) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf"), NULL, I2VP(0x0012) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Part Number"), NULL, I2VP(0x0312) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Proto/Manuf/Partno/Item"), NULL, I2VP(0x4312) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto"), NULL, I2VP(0x0021) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Part Number"), NULL, I2VP(0x0321) ); + wListAddValue( (wList_p)displayPLs[I_HOTBARLABELS].control, _("Manuf/Proto/Partno/Item"), NULL, I2VP(0x4321) ); } ParamLoadControls( &displayPG ); @@ -250,7 +251,7 @@ EXPORT paramData_t cmdoptPLs[] = { { PD_RADIO, &selectMode, "selectmode", PDO_NOPSHUPD, selectLabels, N_("Select Mode"), 0}, { PD_TOGGLE, &selectZero, "selectzero", PDO_NOPSHUPD, selectZeroLabels, "", 0 } }; -static paramGroup_t cmdoptPG = { "cmdopt", PGO_RECORD|PGO_PREFMISC, cmdoptPLs, sizeof cmdoptPLs/sizeof cmdoptPLs[0] }; +static paramGroup_t cmdoptPG = { "cmdopt", PGO_RECORD|PGO_PREFMISC, cmdoptPLs, COUNT( cmdoptPLs ) }; static void CmdoptOk( void * junk ) { @@ -295,6 +296,7 @@ EXPORT addButtonCallBack_t CmdoptInit( void ) static wWin_p prefW; static long displayUnits; +static char * iconSizeLabels[] = { N_("16 px"), N_("24 px"), N_("32 px"), NULL }; static char * unitsLabels[] = { N_("English"), N_("Metric"), NULL }; static char * angleSystemLabels[] = { N_("Polar"), N_("Cartesian"), NULL }; static char * enableBalloonHelpLabels[] = { N_("Balloon Help"), NULL }; @@ -302,10 +304,11 @@ static char * enableFlexTrackLabels[] = { N_("Show FlexTrack in HotBar"), NULL } static char * startOptions[] = { N_("Load Last Layout"), N_("Start New Layout"), NULL }; static paramData_t prefPLs[] = { + { PD_RADIO, &iconSize, "iconsize", PDO_NOPSHUPD, iconSizeLabels, N_("Icon Size"), BC_HORZ, I2VP(CHANGE_ICONSIZE) }, { PD_RADIO, &angleSystem, "anglesystem", PDO_NOPSHUPD, angleSystemLabels, N_("Angles"), BC_HORZ }, - { PD_RADIO, &units, "units", PDO_NOPSHUPD|PDO_NOUPDACT, unitsLabels, N_("Units"), BC_HORZ, (void*)(CHANGE_MAIN|CHANGE_UNITS) }, -#define I_DSTFMT (2) - { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_DIM|PDO_NOPSHUPD|PDO_LISTINDEX, (void*)150, N_("Length Format"), 0, (void*)(CHANGE_MAIN|CHANGE_UNITS) }, + { PD_RADIO, &units, "units", PDO_NOPSHUPD|PDO_NOUPDACT, unitsLabels, N_("Units"), BC_HORZ, I2VP(CHANGE_MAIN|CHANGE_UNITS) }, +#define I_DSTFMT (3) + { PD_DROPLIST, &distanceFormatInx, "dstfmt", PDO_DIM|PDO_NOPSHUPD|PDO_LISTINDEX, I2VP(150), N_("Length Format"), 0, I2VP(CHANGE_MAIN|CHANGE_UNITS) }, { PD_FLOAT, &minLength, "minlength", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Min Track Length") }, { PD_FLOAT, &connectDistance, "connectdistance", PDO_DIM|PDO_SMALLDIM|PDO_NOPSHUPD, &r0o1_1, N_("Connection Distance"), }, { PD_FLOAT, &connectAngle, "connectangle", PDO_NOPSHUPD, &r1_10, N_("Connection Angle") }, @@ -316,13 +319,13 @@ static paramData_t prefPLs[] = { { PD_LONG, &dragPixels, "dragpixels", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Distance") }, { PD_LONG, &dragTimeout, "dragtimeout", PDO_NOPSHUPD|PDO_DRAW, &i1_1000, N_("Drag Timeout") }, { PD_LONG, &minGridSpacing, "mingridspacing", PDO_NOPSHUPD|PDO_DRAW, &i1_100, N_("Min Grid Spacing"), 0, 0 }, -#define I_CHKPT (13) +#define I_CHKPT (14) { PD_LONG, &checkPtInterval, "checkpoint", PDO_NOPSHUPD|PDO_FILE, &i0_10000, N_("Check Point Frequency") }, -#define I_AUTOSAVE (14) +#define I_AUTOSAVE (15) { PD_LONG, &autosaveChkPoints, "autosave", PDO_NOPSHUPD|PDO_FILE, &i0_99, N_("Autosave Checkpoint Frequency") }, { PD_RADIO, &onStartup, "onstartup", PDO_NOPSHUPD, startOptions, N_("On Program Startup"), 0, NULL } }; -static paramGroup_t prefPG = { "pref", PGO_RECORD|PGO_PREFMISC, prefPLs, sizeof prefPLs/sizeof prefPLs[0] }; +static paramGroup_t prefPG = { "pref", PGO_RECORD|PGO_PREFMISC, prefPLs, COUNT( prefPLs ) }; typedef struct { @@ -394,7 +397,7 @@ static void LoadDstFmtList( void ) int inx; wListClear( (wList_p)prefPLs[I_DSTFMT].control ); for ( inx=0; dstFmts[units][inx].name; inx++ ) - wListAddValue( (wList_p)prefPLs[I_DSTFMT].control, _(dstFmts[units][inx].name), NULL, (void*)dstFmts[units][inx].fmt ); + wListAddValue( (wList_p)prefPLs[I_DSTFMT].control, _(dstFmts[units][inx].name), NULL, I2VP(dstFmts[units][inx].fmt) ); } /** @@ -416,7 +419,7 @@ static void UpdatePrefD( void ) LoadDstFmtList(); distanceFormatInx = 0; - for (inx = 0; inx < sizeof prefPLs / sizeof prefPLs[0]; inx++) { + for (inx = 0; inx < COUNT( prefPLs ); inx++) { if ((prefPLs[inx].option&PDO_DIM)) { ParamLoadControl(&prefPG, inx); } @@ -439,7 +442,7 @@ static void UpdateMeasureFmt() distanceFormatInx = wListGetIndex((wList_p)prefPLs[I_DSTFMT].control); units = wRadioGetValue((wChoice_p)prefPLs[1].control); - for (inx = 0; inx < sizeof prefPLs / sizeof prefPLs[0]; inx++) { + for (inx = 0; inx < COUNT( prefPLs ); inx++) { if ((prefPLs[inx].option&PDO_DIM)) { ParamLoadControl(&prefPG, inx); } @@ -479,6 +482,8 @@ static void PrefOk( void * junk ) NoticeMessage2( 0, MSG_CONN_PARAMS_TOO_BIG, _("Ok"), NULL ) ; } + if(changes & CHANGE_ICONSIZE) + NoticeMessage( MSG_ICON_SIZE_RESTART, _("Ok"), NULL ) ; wHide( prefW ); DoChangeNotification(changes); @@ -527,17 +532,17 @@ EXPORT long GetDistanceFormat( void ) static wWin_p colorW; static paramData_t colorPLs[] = { - { PD_COLORLIST, &snapGridColor, "snapgrid", PDO_NOPSHUPD, NULL, N_("Snap Grid"), 0, (void*)(CHANGE_GRID) }, - { PD_COLORLIST, &markerColor, "marker", PDO_NOPSHUPD, NULL, N_("Marker"), 0, (void*)(CHANGE_GRID) }, - { PD_COLORLIST, &borderColor, "border", PDO_NOPSHUPD, NULL, N_("Border"), 0, (void*)(CHANGE_MAIN) }, + { PD_COLORLIST, &snapGridColor, "snapgrid", PDO_NOPSHUPD, NULL, N_("Snap Grid"), 0, I2VP(CHANGE_GRID) }, + { PD_COLORLIST, &markerColor, "marker", PDO_NOPSHUPD, NULL, N_("Marker"), 0, I2VP(CHANGE_GRID) }, + { PD_COLORLIST, &borderColor, "border", PDO_NOPSHUPD, NULL, N_("Border"), 0, I2VP(CHANGE_MAIN) }, { PD_COLORLIST, &crossMajorColor, "crossmajor", PDO_NOPSHUPD, NULL, N_("Primary Axis"), 0, 0 }, { PD_COLORLIST, &crossMinorColor, "crossminor", PDO_NOPSHUPD, NULL, N_("Secondary Axis"), 0, 0 }, - { PD_COLORLIST, &normalColor, "normal", PDO_NOPSHUPD, NULL, N_("Normal Track"), 0, (void*)(CHANGE_MAIN|CHANGE_PARAMS) }, - { PD_COLORLIST, &selectedColor, "selected", PDO_NOPSHUPD, NULL, N_("Selected Track"), 0, (void*)(CHANGE_MAIN) }, - { PD_COLORLIST, &profilePathColor, "profile", PDO_NOPSHUPD, NULL, N_("Profile Path"), 0, (void*)(CHANGE_MAIN) }, - { PD_COLORLIST, &exceptionColor, "exception", PDO_NOPSHUPD, NULL, N_("Exception Track"), 0, (void*)(CHANGE_MAIN) }, - { PD_COLORLIST, &tieColor, "tie", PDO_NOPSHUPD, NULL, N_("Track Ties"), 0, (void*)(CHANGE_MAIN) } }; -static paramGroup_t colorPG = { "rgbcolor", PGO_RECORD|PGO_PREFGROUP, colorPLs, sizeof colorPLs/sizeof colorPLs[0] }; + { PD_COLORLIST, &normalColor, "normal", PDO_NOPSHUPD, NULL, N_("Normal Track"), 0, I2VP(CHANGE_MAIN|CHANGE_PARAMS) }, + { PD_COLORLIST, &selectedColor, "selected", PDO_NOPSHUPD, NULL, N_("Selected Track"), 0, I2VP(CHANGE_MAIN) }, + { PD_COLORLIST, &profilePathColor, "profile", PDO_NOPSHUPD, NULL, N_("Profile Path"), 0, I2VP(CHANGE_MAIN) }, + { PD_COLORLIST, &exceptionColor, "exception", PDO_NOPSHUPD, NULL, N_("Exception Track"), 0, I2VP(CHANGE_MAIN) }, + { PD_COLORLIST, &tieColor, "tie", PDO_NOPSHUPD, NULL, N_("Track Ties"), 0, I2VP(CHANGE_MAIN) } }; +static paramGroup_t colorPG = { "rgbcolor", PGO_RECORD|PGO_PREFGROUP, colorPLs, COUNT( colorPLs ) }; diff --git a/app/bin/dpricels.c b/app/bin/dpricels.c index 9d04d6d..ef7025e 100644 --- a/app/bin/dpricels.c +++ b/app/bin/dpricels.c @@ -19,13 +19,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> #include "compound.h" #include "custom.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" @@ -41,7 +38,7 @@ DIST_T priceListFlexLengthV; DIST_T priceListFlexCostV; static paramFloatRange_t priceListCostData = { 0.0, 9999.99, 80 }; -static wPos_t priceListColumnWidths[] = { -60, 200 }; +static wWinPix_t priceListColumnWidths[] = { -60, 200 }; static const char * priceListColumnTitles[] = { N_("Price"), N_("Item") }; static paramListData_t priceListListData = { 10, 400, 2, priceListColumnWidths, priceListColumnTitles }; static paramFloatRange_t priceListFlexData = { 0.0, 999.99, 80 }; @@ -51,7 +48,7 @@ static paramData_t priceListPLs[] = { { PD_FLOAT, &priceListCostV, "cost", PDO_NOPREF|PDO_NOPSHUPD, &priceListCostData }, #define I_PRICELSENTRY (1) #define priceListEntryS ((wString_p)priceListPLs[I_PRICELSENTRY].control) - { PD_STRING, &priceListEntryV, "entry", PDO_NOPREF|PDO_NOPSHUPD|PDO_DLGHORZ, (void*)(400-80-3), NULL, BO_READONLY }, + { PD_STRING, &priceListEntryV, "entry", PDO_NOPREF|PDO_NOPSHUPD|PDO_DLGHORZ, I2VP(400-80-3), NULL, BO_READONLY, NULL, sizeof priceListEntryV }, #define I_PRICELSLIST (2) #define priceListSelL ((wList_p)priceListPLs[I_PRICELSLIST].control) { PD_LIST, NULL, "inx", PDO_NOPREF|PDO_NOPSHUPD, &priceListListData }, @@ -60,7 +57,7 @@ static paramData_t priceListPLs[] = { { PD_MESSAGE, N_("costs"), NULL, PDO_DLGHORZ }, #define I_PRICELSFLEXCOST (6) { PD_FLOAT, &priceListFlexCostV, "flexcost", PDO_NOPREF|PDO_NOPSHUPD|PDO_DLGHORZ, &priceListFlexData } }; -static paramGroup_t priceListPG = { "pricelist", 0, priceListPLs, sizeof priceListPLs/sizeof priceListPLs[0] }; +static paramGroup_t priceListPG = { "pricelist", 0, priceListPLs, COUNT( priceListPLs ) }; static void PriceListUpdate() diff --git a/app/bin/dprmfile.c b/app/bin/dprmfile.c index 3bb249e..7fbe337 100644 --- a/app/bin/dprmfile.c +++ b/app/bin/dprmfile.c @@ -20,16 +20,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <stdbool.h> -#include <stdint.h> -#include <string.h> - #include "custom.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "include/paramfile.h" #include "include/paramfilelist.h" @@ -65,9 +58,9 @@ static long paramFileSel = 0; static void ParamFileFavorite(void * favorite); static void ParamRefreshSelectedFiles(void * action); -static void ParamUnloadSelectedFiles(void *); -static void ParamFileBrowse(void *); -static void ParamFileSelectAll(void *); +static void ParamUnloadSelectedFiles(void * action); +static void ParamFileBrowse(void * junk); +static void ParamFileSelectAll(void * junk); static paramListData_t paramFileListData = { 15, 370 }; static char * paramFileLabels[] = { N_("Show File Names"), NULL }; @@ -78,19 +71,19 @@ static paramData_t paramFilePLs[] = { #define I_PRMFILTOGGLE (1) { PD_TOGGLE, ¶mFileSel, "mode", 0, paramFileLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_MESSAGE (2) - { PD_MESSAGE, "", NULL, 0, (void *)370 }, - { PD_BUTTON, (void *)ParamFileSelectAll, "selectall", PDO_DLGCMDBUTTON, NULL, N_("Select all") }, + { PD_MESSAGE, "", NULL, 0, I2VP(370) }, + { PD_BUTTON, ParamFileSelectAll, "selectall", PDO_DLGCMDBUTTON, NULL, N_("Select all") }, #define I_PRMFILEFAVORITE (4) - { PD_BUTTON, (void *)ParamFileFavorite, "favorite", PDO_DLGCMDBUTTON, (void *)TRUE, N_("Favorite")}, - { PD_BUTTON, (void*)ParamUnloadSelectedFiles, "unload", PDO_DLGCMDBUTTON, NULL, N_(PARAMBUTTON_UNLOAD), 0L, FALSE }, - { PD_BUTTON, (void*)ParamRefreshSelectedFiles, "refresh", PDO_DLGCMDBUTTON, NULL, N_(PARAMBUTTON_REFRESH), 0L, FALSE }, - { PD_BUTTON, (void*)DoSearchParams, "find", 0, NULL, N_("Search Library") }, - { PD_BUTTON, (void*)ParamFileBrowse, "browse", 0, NULL, N_("Browse ...") }, + { PD_BUTTON, ParamFileFavorite, "favorite", PDO_DLGCMDBUTTON, I2VP(TRUE), N_("Favorite")}, + { PD_BUTTON, ParamUnloadSelectedFiles, "unload", PDO_DLGCMDBUTTON, NULL, N_(PARAMBUTTON_UNLOAD), 0L, FALSE }, + { PD_BUTTON, ParamRefreshSelectedFiles, "refresh", PDO_DLGCMDBUTTON, NULL, N_(PARAMBUTTON_REFRESH), 0L, FALSE }, + { PD_BUTTON, DoSearchParams, "find", 0, NULL, N_("Library...") }, + { PD_BUTTON, ParamFileBrowse, "browse", 0, NULL, N_("Browse...") }, }; -static paramGroup_t paramFilePG = { "prmfile", 0, paramFilePLs, sizeof paramFilePLs/sizeof paramFilePLs[0] }; +static paramGroup_t paramFilePG = { "prmfile", 0, paramFilePLs, COUNT( paramFilePLs ) }; #define MESSAGETEXT ((wMessage_p)paramFilePLs[I_MESSAGE].control) @@ -131,12 +124,12 @@ void SortParamFileList(size_t cnt, dynArr_t *files, int *list) { for (size_t i = 0; i < cnt; i++) { - list[i] = i; + list[i] = (int)i; } sortFiles = files; - qsort((void *)list, (size_t)cnt, sizeof(int), CompareParameterFiles); + qsort(list, (size_t)cnt, sizeof(int), CompareParameterFiles); } @@ -168,7 +161,7 @@ void ParamFileListLoad(int paramFileCnt, dynArr_t *paramFiles) wListAddValue(paramFileL, DynStringToCStr(&description), indicatorIcons[ paramFileInfo.favorite ][paramFileInfo.trackState], - (void*)(intptr_t)sortedIndex[i]); + I2VP(sortedIndex[i])); LOG1(log_params, ("ParamFileListLoad: = %s: %d\n", paramFileInfo.contents, paramFileInfo.trackState)) } @@ -214,13 +207,13 @@ static void UpdateParamFileButton(void) for (inx=0; inx<cnt; inx++) { if (wListGetItemSelected((wList_p)paramFileL, inx)) { // if item is selected, get status - fileInx = (intptr_t)wListGetItemContext(paramFileL, inx); + fileInx = (wIndex_t)VP2L(wListGetItemContext(paramFileL, inx)); if (fileInx < 0 || fileInx >= GetParamFileCount()) { return; } if (!IsParamFileFavorite(fileInx)) { - paramFilePLs[I_PRMFILEFAVORITE].context = (void *)TRUE; + paramFilePLs[I_PRMFILEFAVORITE].context = I2VP(TRUE); } } } @@ -244,7 +237,7 @@ UpdateParamFileProperties( bool newState) // walk through the whole list box for (inx = 0; inx < cnt; inx++) { if (wListGetItemSelected((wList_p)paramFileL, inx)) { - fileInx = (intptr_t)wListGetItemContext(paramFileL, inx); + fileInx = (wIndex_t)VP2L(wListGetItemContext(paramFileL, inx)); SetParamFileFavorite(fileInx, newState); } } @@ -284,7 +277,7 @@ ParamChangeSelectedFiles(unsigned paramFileChange) for (inx = 0; inx < cnt; inx++) { if (wListGetItemSelected((wList_p)paramFileL, inx)) { - fileInx = (intptr_t)wListGetItemContext(paramFileL, inx); + fileInx = (wIndex_t)VP2L(wListGetItemContext(paramFileL, inx)); switch (paramFileChange) { case PARAMFILE_UNLOAD: diff --git a/app/bin/draw.c b/app/bin/draw.c index 343ae3f..d7ec0c0 100644 --- a/app/bin/draw.c +++ b/app/bin/draw.c @@ -20,37 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#include <string.h> - -#ifdef HAVE_MALLOC_C -#include <malloc.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#include <stdarg.h> -#include <sys/types.h> -#ifndef WINDOWS -#include <unistd.h> -#include <sys/time.h> -#else -#include <sys/timeb.h> -#endif - #include "cselect.h" #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "track.h" -#include "utility.h" #include "layout.h" +#include "common-ui.h" + + +EXPORT wIndex_t panCmdInx; static void DrawRoomWalls( wBool_t ); static void DrawMarkers( void ); @@ -63,17 +44,16 @@ static void DDrawPoly( int * types, wDrawColor color, wDrawWidth width, - int fill, - int open ); + drawFill_e eFillOpt ); static void DrawMapBoundingBox( BOOL_T set ); static void DrawTicks( drawCmd_p d, coOrd size ); +static void DoZoom( void * pScaleVP ); EXPORT int log_pan = 0; static int log_zoom = 0; static int log_mouse = 0; static int log_redraw = 0; - -static BOOL_T hideBox = FALSE; +static int log_timemainredraw = 0; static wFontSize_t drawMaxTextFontSize = 100; @@ -85,7 +65,7 @@ static wFontSize_t drawMaxTextFontSize = 100; // static char FAR message[STR_LONG_SIZE]; -EXPORT wPos_t closePixels = 10; +EXPORT wDrawPix_t closePixels = 10; EXPORT long maxArcSegStraightLen = 100; EXPORT long drawCount; EXPORT BOOL_T drawEnable = TRUE; @@ -125,8 +105,8 @@ EXPORT DIST_T pixelBins = 80; * */ -static wPos_t infoHeight; -static wPos_t textHeight; +static wWinPix_t infoHeight; +static wWinPix_t textHeight; EXPORT wWin_p mapW; EXPORT BOOL_T mapVisible; EXPORT BOOL_T magneticSnap; @@ -150,10 +130,10 @@ static struct { wStatus_p posX_m; wStatus_p posY_m; wStatus_p info_m; - wPos_t scale_w; - wPos_t count_w; - wPos_t pos_w; - wPos_t info_w; + wWinPix_t scale_w; + wWinPix_t count_w; + wWinPix_t pos_w; + wWinPix_t info_w; wBox_p scale_b; wBox_p count_b; wBox_p posX_b; @@ -170,7 +150,7 @@ EXPORT BOOL_T inError = FALSE; typedef enum { mouseNone, mouseLeft, mouseRight, mouseLeftPending } mouseState_e; static mouseState_e mouseState; -static int mousePositionx, mousePositiony; /**< position of mouse pointer */ +static wDrawPix_t mousePositionx, mousePositiony; /**< position of mouse pointer */ static int delayUpdate = 1; @@ -218,9 +198,23 @@ static struct { { "48:1", 48.0 }, { "56:1", 56.0 }, { "64:1", 64.0 }, + { "80:1", 80.0 }, + { "96:1", 96.0 }, + { "112:1", 112.0 }, { "128:1", 128.0 }, + { "160:1", 160.0 }, + { "192:1", 192.0 }, + { "224:1", 224.0 }, { "256:1", 256.0 }, -}; + { "320:1", 320.0 }, + { "384:1", 384.0 }, + { "448:1", 448.0 }, + { "512:1", 512.0 }, + { "640:1", 640.0 }, + { "768:1", 768.0 }, + { "896:1", 896.0 }, + { "1024:1", 1024.0 }, + }; @@ -230,7 +224,7 @@ static struct { * */ -static void MainCoOrd2Pix( drawCmd_p d, coOrd p, wPos_t * x, wPos_t * y ) +static void MainCoOrd2Pix( drawCmd_p d, coOrd p, wDrawPix_t * x, wDrawPix_t * y ) { DIST_T t; if (d->angle != 0.0) @@ -242,13 +236,13 @@ static void MainCoOrd2Pix( drawCmd_p d, coOrd p, wPos_t * x, wPos_t * y ) t += 0.5; else t -= 0.5; - *x = ((wPos_t)t) + ((d->options&DC_TICKS)?LBORDER:0); + *x = ((wDrawPix_t)t) + ((d->options&DC_TICKS)?LBORDER:0); t = p.y*d->dpi; if ( t > 0.0 ) t += 0.5; else t -= 0.5; - *y = ((wPos_t)t) + ((d->options&DC_TICKS)?BBORDER:0); + *y = ((wDrawPix_t)t) + ((d->options&DC_TICKS)?BBORDER:0); } @@ -256,8 +250,8 @@ static int Pix2CoOrd_interpolate = 0; static void MainPix2CoOrd( drawCmd_p d, - wPos_t px, - wPos_t py, + wDrawPix_t px, + wDrawPix_t py, coOrd * posR ) { DIST_T x, y; @@ -274,7 +268,7 @@ if (Pix2CoOrd_interpolate) { y1 = (long)(y1*bins)/bins; if (x == x1) { x += 1/bins/2; - printf ("px=%d x1=%0.6f x=%0.6f\n", px, x1, x ); + printf ("px=%0.1f x1=%0.6f x=%0.6f\n", px, x1, x ); } if (y == y1) y += 1/bins/2; @@ -286,6 +280,8 @@ if (Pix2CoOrd_interpolate) { } +#define DRAWOPTS( D ) (((D->options&DC_TEMP)?wDrawOptTemp:0)|((D->options&DC_OUTLINE)?wDrawOutlineFont:0)) + static void DDrawLine( drawCmd_p d, coOrd p0, @@ -293,7 +289,7 @@ static void DDrawLine( wDrawWidth width, wDrawColor color ) { - wPos_t x0, y0, x1, y1; + wDrawPix_t x0, y0, x1, y1; BOOL_T in0 = FALSE, in1 = FALSE; coOrd orig, size; if (d == &mapD && !mapVisible) @@ -341,7 +337,7 @@ static void DDrawLine( wDrawLine( d->d, x0, y0, x1, y1, width, lineOpt, - color, (wDrawOpts)d->funcs->options ); + color, DRAWOPTS(d) ); } } @@ -356,7 +352,7 @@ static void DDrawArc( wDrawWidth width, wDrawColor color ) { - wPos_t x, y; + wDrawPix_t x, y; ANGLE_T da; coOrd p0, p1; DIST_T rr; @@ -424,9 +420,10 @@ static void DDrawArc( lineOpt = wDrawLinePhantom; if (drawEnable) { - wDrawArc(d->d, x, y, (wPos_t)(rr), angle0, angle1, drawCenter, + int sizeCenter = (int)(drawCenter ? ((d->options & DC_PRINT) ? (d->dpi / BASE_DPI) : 1) : 0); + wDrawArc(d->d, x, y, (wDrawPix_t)(rr), angle0, angle1, sizeCenter, width, lineOpt, - color, (wDrawOpts)d->funcs->options); + color, DRAWOPTS(d) ); } } @@ -440,12 +437,12 @@ static void DDrawString( FONTSIZE_T fontSize, wDrawColor color ) { - wPos_t x, y; + wDrawPix_t x, y; if (d == &mapD && !mapVisible) return; d->CoOrd2Pix(d,p,&x,&y); if ( color == wDrawColorWhite ) { - wPos_t width, height, descent, ascent; + wDrawPix_t width, height, descent, ascent; coOrd pos[4], size; double scale = 1.0; wDrawGetTextSize( &width, &height, &descent, &ascent, d->d, s, fp, fontSize ); @@ -461,10 +458,10 @@ static void DDrawString( Rotate( &pos[1], pos[0], a ); Rotate( &pos[2], pos[0], a ); Rotate( &pos[3], pos[0], a ); - DDrawPoly( d, 4, pos, NULL, color, 0, 1, 0 ); + DDrawPoly( d, 4, pos, NULL, color, 0, DRAW_FILL ); } else { fontSize /= d->scale; - wDrawString( d->d, x, y, d->angle-a, s, fp, fontSize, color, (wDrawOpts)d->funcs->options ); + wDrawString( d->d, x, y, d->angle-a, s, fp, fontSize, color, DRAWOPTS(d) ); } } @@ -476,14 +473,15 @@ static void DDrawPoly( int * types, wDrawColor color, wDrawWidth width, - int fill, - int open ) + drawFill_e eFillOpt ) { - typedef wPos_t wPos2[2]; + typedef wDrawPix_t wPos2[2]; static dynArr_t wpts_da; static dynArr_t wpts_type_da; int inx; - wPos_t x, y; + int fill = 0; + int open = 0; + wDrawPix_t x, y; DYNARR_SET( wPos2, wpts_da, cnt * 2 ); DYNARR_SET( int, wpts_type_da, cnt); #define wpts(N) DYNARR_N( wPos2, wpts_da, N ) @@ -512,7 +510,25 @@ static void DDrawPoly( lineOpt = wDrawLineCenter; else if (opt == DC_PHANTOM) lineOpt = wDrawLinePhantom; - wDrawPolygon( d->d, &wpts(0), &wtype(0), cnt, color, width, lineOpt, (wDrawOpts)d->funcs->options, fill, open ); + + wDrawOpts drawOpts = DRAWOPTS(d); + switch ( eFillOpt ) { + case DRAW_OPEN: + open = 1; + break; + case DRAW_CLOSED: + break; + case DRAW_FILL: + fill = 1; + break; + case DRAW_TRANSPARENT: + fill = 1; + drawOpts |= wDrawOptTransparent; + break; + default: + abort(); + } + wDrawPolygon( d->d, &wpts(0), &wtype(0), cnt, color, width, lineOpt, drawOpts, fill, open ); } @@ -522,70 +538,99 @@ static void DDrawFillCircle( DIST_T r, wDrawColor color ) { - wPos_t x, y; + wDrawPix_t x, y; DIST_T rr; if (d == &mapD && !mapVisible) return; rr = (r / d->scale) * d->dpi + 0.5; if (rr > wDrawGetMaxRadius(d->d)) { -#ifdef LATER - da = (maxArcSegStraightLen * 180) / (M_PI * rr); - cnt = (int)(angle1/da) + 1; - da = angle1 / cnt; - PointOnCircle( &p0, p, r, angle0 ); - for ( i=1; i<=cnt; i++ ) { - angle0 += da; - PointOnCircle( &p1, p, r, angle0 ); - DrawLine( d, p0, p1, width, color ); - p0 = p1; - } -#endif + // Circle too big return; } d->CoOrd2Pix(d,p,&x,&y); + wWinPix_t w, h; + wDrawGetSize( d->d, &w, &h ); + if ( d->options & DC_TICKS ) { + if ( x+rr < LBORDER || x-rr > w-RBORDER || + y+rr < BBORDER || y-rr > h-TBORDER ) + return; + } else { + if ( x+rr < 0 || x-rr > w || + y+rr < 0 || y-rr > h ) + return; + } drawCount++; if (drawEnable) { - wDrawFilledCircle( d->d, x, y, (wPos_t)(rr), - color, (wDrawOpts)d->funcs->options ); + wDrawFilledCircle( d->d, x, y, (wDrawPix_t)(rr), + color, DRAWOPTS(d) ); } } -EXPORT void DrawHilight( drawCmd_p d, coOrd p, coOrd s, BOOL_T add ) +static void DDrawRectangle( + drawCmd_p d, + coOrd orig, + coOrd size, + wDrawColor color, + drawFill_e eFillOpt ) { - wPos_t x, y, w, h; + wDrawPix_t x, y, w, h; + if (d == &mapD && !mapVisible) - return; - w = (wPos_t)((s.x/d->scale)*d->dpi+0.5); - h = (wPos_t)((s.y/d->scale)*d->dpi+0.5); - d->CoOrd2Pix(d,p,&x,&y); - if ( add ) - wDrawFilledRectangle( d->d, x, y, w, h, drawColorPowderedBlue, wDrawOptTemp|wDrawOptTransparent ); - else - wDrawFilledRectangle( d->d, x, y, w, h, selectedColor, wDrawOptTemp|wDrawOptTransparent ); + return; + d->CoOrd2Pix(d,orig,&x,&y); + w = (wDrawPix_t)((size.x/d->scale)*d->dpi+0.5); + h = (wDrawPix_t)((size.y/d->scale)*d->dpi+0.5); + drawCount++; + if (drawEnable) { + wDrawOpts opts = DRAWOPTS(d); + coOrd p1, p2; + switch (eFillOpt) { + case DRAW_CLOSED: + // 1 2 + // 0 3 + p1.x = orig.x; + p1.y = orig.y+size.y; + DrawLine( d, orig, p1, 0, color ); + p2.x = orig.x+size.x; + p2.y = p1.y; + DrawLine( d, p1, p2, 0, color ); + p1.x = p2.x; + p1.y = orig.y; + DrawLine( d, p2, p1, 0, color ); + DrawLine( d, p1, orig, 0, color ); + break; + case DRAW_TRANSPARENT: + opts |= wDrawOptTransparent; + // Fallthru + case DRAW_FILL: + wDrawFilledRectangle( d->d, x, y, w, h, color, opts ); + break; + default: + abort(); + } + } +} + +EXPORT void DrawHilight( drawCmd_p d, coOrd p, coOrd s, BOOL_T add ) +{ + unsigned long options = d->options; + d->options |= DC_TEMP; + wBool_t bTemp = wDrawSetTempMode( d->d, TRUE ); + DrawRectangle( d, p, s, add?drawColorPowderedBlue:selectedColor, DRAW_TRANSPARENT ); + wDrawSetTempMode( d->d, bTemp ); + d->options = options; } EXPORT void DrawHilightPolygon( drawCmd_p d, coOrd *p, int cnt ) { - wPos_t q[4][2]; - int i; -#ifdef LATER - if (d->options&DC_TEMPSEGS) { - return; - } - if (d->options&DC_PRINT) - return; -#endif ASSERT( cnt <= 4 ); - for (i=0; i<cnt; i++) { - d->CoOrd2Pix(d,p[i],&q[i][0],&q[i][1]); - } static wDrawColor color = 0; if ( color == 0 ) color = wDrawColorGray( 70 ); - wDrawPolygon( d->d, q, NULL, cnt, color, 0, 0, wDrawOptTemp|wDrawOptTransparent, 1, 0 ); + DrawPoly( d, cnt, p, NULL, color, 0, DRAW_TRANSPARENT ); } @@ -662,10 +707,7 @@ EXPORT void DrawMultiString( for (int i=0;i<4;i++) { Rotate( &p[i], orig, a); } - DrawLine( d, p[0], p[1], 0, color ); - DrawLine( d, p[1], p[2], 0, color ); - DrawLine( d, p[2], p[3], 0, color ); - DrawLine( d, p[3], p[0], 0, color ); + DrawPoly( d, 4, p, NULL, color, 0, DRAW_CLOSED ); } free(line); @@ -691,8 +733,8 @@ EXPORT void DrawBoxedString( return; #ifndef WINDOWS if ( ( d->options & DC_PRINT) != 0 ) { - double scale = ((FLOAT_T)fs)/((FLOAT_T)drawMaxTextFontSize)/72.0; - wPos_t w, h, d, a; + double scale = ((FLOAT_T)fs)/((FLOAT_T)drawMaxTextFontSize)/mainD.dpi; + wDrawPix_t w, h, d, a; wDrawGetTextSize( &w, &h, &d, &a, mainD.d, text, fp, drawMaxTextFontSize ); size.x = w*scale; size.y = h*scale; @@ -713,38 +755,51 @@ EXPORT void DrawBoxedString( size.x += bw*d->scale/d->dpi; size.y += bh*d->scale/d->dpi; p[0] = p0; - p[0].x -= br*d->scale/d->dpi; - p[0].y -= (bb*d->scale/d->dpi+descent); + p[0].x -= br*d->scale/d->dpi; //Top of box + p[0].y += (bb*d->scale/d->dpi+ascent); p[1].y = p[0].y; - p[2].y = p[3].y = p[0].y + size.y; + p[2].y = p[3].y = p[0].y-size.y-descent; //Bottom of box p[1].x = p[2].x = p[0].x + size.x; p[3].x = p[0].x; d->options &= ~DC_DASH; switch (style) { case BOX_ARROW: + case BOX_ARROW_BACKGROUND: + // Reset size to actual size of the box + size.x = p[2].x-p[0].x; + size.y = p[0].y-p[2].y; + // Pick a point (p1) outside of Box in arrow direction Translate( &p1, pos, a, size.x+size.y ); - ClipLine( &pos, &p1, p[0], 0.0, size ); + // Find point on edge of Box (p1) + ClipLine( &pos, &p1, p[3], 0.0, size ); + // Draw line from edge (p1) to Arrow head (p2) Translate( &p2, p1, a, size.y*arrowScale ); DrawLine( d, p1, p2, 0, color ); + // Draw Arrow edges Translate( &p1, p2, a+150, size.y*0.7*arrowScale ); DrawLine( d, p1, p2, 0, color ); Translate( &p1, p2, a-150, size.y*0.7*arrowScale ); DrawLine( d, p1, p2, 0, color ); + /* no break */ case BOX_BOX: + case BOX_BOX_BACKGROUND: + if (style == BOX_ARROW_BACKGROUND || style == BOX_BOX_BACKGROUND) + DrawPoly( d, 4, p, NULL, wDrawColorWhite, 0, DRAW_FILL ); //Clear background for box and box-arrow DrawLine( d, p[1], p[2], 0, color ); DrawLine( d, p[2], p[3], 0, color ); DrawLine( d, p[3], p[0], 0, color ); + /* no break */ case BOX_UNDERLINE: DrawLine( d, p[0], p[1], 0, color ); DrawString( d, p0, 0.0, text, fp, fs, color ); break; case BOX_INVERT: - DrawPoly( d, 4, p, NULL, color, 0, 1, 0); + DrawPoly( d, 4, p, NULL, color, 0, DRAW_FILL ); if ( color != wDrawColorWhite ) DrawString( d, p0, 0.0, text, fp, fs, wDrawColorGray( 94 ) ); break; case BOX_BACKGROUND: - DrawPoly( d, 4, p, NULL, wDrawColorWhite, 0, 1, 0 ); + DrawPoly( d, 4, p, NULL, wDrawColorWhite, 0, DRAW_FILL ); DrawString( d, p0, 0.0, text, fp, fs, color ); break; } @@ -762,7 +817,7 @@ EXPORT void DrawTextSize2( POS_T * descent, POS_T * ascent) { - wPos_t w, h, d, a; + wDrawPix_t w, h, d, a; FLOAT_T scale = 1.0; if ( relative ) fs /= dp->scale; @@ -847,16 +902,9 @@ EXPORT void DrawMultiLineTextSize( static void DDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, wDrawColor color) { - wPos_t x, y; -#ifdef LATER - if (d->options&DC_TEMPSEGS) { - return; - } - if (d->options&DC_PRINT) - return; -#endif + wDrawPix_t x, y; d->CoOrd2Pix( d, p, &x, &y ); - wDrawBitMap( d->d, bm, x, y, color, (wDrawOpts)d->funcs->options ); + wDrawBitMap( d->d, bm, x, y, color, DRAWOPTS(d) ); } @@ -872,6 +920,8 @@ static void TempSegLine( tempSegs(tempSegs_da.cnt-1).color = color; if (d->options&DC_SIMPLE) tempSegs(tempSegs_da.cnt-1).width = 0; + else if (width<0) + tempSegs(tempSegs_da.cnt-1).width = width; else tempSegs(tempSegs_da.cnt-1).width = width*d->scale/d->dpi; tempSegs(tempSegs_da.cnt-1).u.l.pos[0] = p0; @@ -894,6 +944,8 @@ static void TempSegArc( tempSegs(tempSegs_da.cnt-1).color = color; if (d->options&DC_SIMPLE) tempSegs(tempSegs_da.cnt-1).width = 0; + else if (width<0) + tempSegs(tempSegs_da.cnt-1).width = width; else tempSegs(tempSegs_da.cnt-1).width = width*d->scale/d->dpi; tempSegs(tempSegs_da.cnt-1).u.c.center = p; @@ -932,14 +984,32 @@ static void TempSegPoly( int * types, wDrawColor color, wDrawWidth width, - int fill, - int open ) + drawFill_e eFillOpt ) { + int fill = 0; + int open = 0; + switch (eFillOpt) { + case DRAW_OPEN: + open = 1; + break; + case DRAW_CLOSED: + break; + case DRAW_FILL: + fill = 1; + break; + case DRAW_TRANSPARENT: + fill = 1; + break; + default: + abort(); + } DYNARR_APPEND( trkSeg_t, tempSegs_da, 1); tempSegs(tempSegs_da.cnt-1).type = fill?SEG_FILPOLY:SEG_POLY; tempSegs(tempSegs_da.cnt-1).color = color; if (d->options&DC_SIMPLE) tempSegs(tempSegs_da.cnt-1).width = 0; + else if (width<0) + tempSegs(tempSegs_da.cnt-1).width = width; else tempSegs(tempSegs_da.cnt-1).width = width*d->scale/d->dpi; tempSegs(tempSegs_da.cnt-1).u.p.polyType = open?POLYLINE:FREEFORM; @@ -949,9 +1019,8 @@ static void TempSegPoly( tempSegs(tempSegs_da.cnt-1).u.p.pts = (pts_t *)MyMalloc(cnt*sizeof(pts_t)); for (int i=0;i<=cnt-1;i++) { tempSegs(tempSegs_da.cnt-1).u.p.pts[i].pt = pts[i]; - tempSegs(tempSegs_da.cnt-1).u.p.pts[i].pt_type = (d->options&DC_SIMPLE)==0?types[i]:wPolyLineStraight; + tempSegs(tempSegs_da.cnt-1).u.p.pts[i].pt_type = ((d->options&DC_SIMPLE)==0 && (types!=0))?types[i]:wPolyLineStraight; } - } @@ -972,6 +1041,24 @@ static void TempSegFillCircle( } +static void TempSegRectangle( + drawCmd_p d, + coOrd orig, + coOrd size, + wDrawColor color, + drawFill_e eOpts ) +{ + coOrd p[4]; + // p1 p2 + // p0 p3 + p[0].x = p[1].x = orig.x; + p[2].x = p[3].x = orig.x+size.x; + p[0].y = p[3].y = orig.y; + p[1].y = p[2].y = orig.y+size.y; + TempSegPoly( d, 4, p, NULL, color, 0, eOpts ); +} + + static void NoDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, wDrawColor color ) { } @@ -979,49 +1066,41 @@ static void NoDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, wDrawColor col EXPORT drawFuncs_t screenDrawFuncs = { - 0, DDrawLine, DDrawArc, DDrawString, DDrawBitMap, DDrawPoly, - DDrawFillCircle }; - -EXPORT drawFuncs_t tempDrawFuncs = { - wDrawOptTemp, - DDrawLine, - DDrawArc, - DDrawString, - DDrawBitMap, - DDrawPoly, - DDrawFillCircle }; + DDrawFillCircle, + DDrawRectangle}; EXPORT drawFuncs_t printDrawFuncs = { - 0, DDrawLine, DDrawArc, DDrawString, NoDrawBitMap, DDrawPoly, - DDrawFillCircle }; + DDrawFillCircle, + DDrawRectangle}; EXPORT drawFuncs_t tempSegDrawFuncs = { - 0, TempSegLine, TempSegArc, TempSegString, NoDrawBitMap, TempSegPoly, - TempSegFillCircle }; + TempSegFillCircle, + TempSegRectangle}; + EXPORT drawCmd_t mainD = { - NULL, &screenDrawFuncs, DC_TICKS, INIT_MAIN_SCALE, 0.0, {0.0,0.0}, {0.0,0.0}, MainPix2CoOrd, MainCoOrd2Pix }; + NULL, &screenDrawFuncs, DC_TICKS, INIT_MAIN_SCALE, 0.0, {0.0,0.0}, {0.0,0.0}, MainPix2CoOrd, MainCoOrd2Pix, 96.0}; EXPORT drawCmd_t tempD = { - NULL, &tempDrawFuncs, DC_TICKS, INIT_MAIN_SCALE, 0.0, {0.0,0.0}, {0.0,0.0}, MainPix2CoOrd, MainCoOrd2Pix }; + NULL, &screenDrawFuncs, DC_TICKS|DC_TEMP, INIT_MAIN_SCALE, 0.0, {0.0,0.0}, {0.0,0.0}, MainPix2CoOrd, MainCoOrd2Pix, 96.0}; EXPORT drawCmd_t mapD = { - NULL, &screenDrawFuncs, DC_SIMPLE, INIT_MAP_SCALE, 0.0, {0.0,0.0}, {96.0,48.0}, Pix2CoOrd, CoOrd2Pix }; + NULL, &screenDrawFuncs, DC_SIMPLE, INIT_MAP_SCALE, 0.0, {0.0,0.0}, {96.0,48.0}, Pix2CoOrd, CoOrd2Pix, 96.0}; /***************************************************************************** @@ -1031,24 +1110,23 @@ EXPORT drawCmd_t mapD = { */ -static wPos_t info_yb_offset = 2; -static wPos_t info_ym_offset = 3; -static wPos_t six = 2; -static wPos_t info_xm_offset = 2; -static wPos_t messageOrControlX = 0; -static wPos_t messageOrControlY = 0; +static wWinPix_t info_yb_offset = 2; +static wWinPix_t six = 2; +static wWinPix_t info_xm_offset = 2; +static wWinPix_t messageOrControlX = 0; +static wWinPix_t messageOrControlY = 0; #define NUM_INFOCTL (4) static wControl_p curInfoControl[NUM_INFOCTL]; -static wPos_t curInfoLabelWidth[NUM_INFOCTL]; +static wWinPix_t curInfoLabelWidth[NUM_INFOCTL]; /** * Determine the width of a mouse pointer position string ( coordinate plus label ). * * \return width of position string */ -static wPos_t GetInfoPosWidth( void ) +static wWinPix_t GetInfoPosWidth( void ) { - wPos_t labelWidth; + wWinPix_t labelWidth; DIST_T dist; if ( mapD.size.x > mapD.size.y ) @@ -1084,7 +1162,7 @@ static wPos_t GetInfoPosWidth( void ) EXPORT void InitInfoBar( void ) { - wPos_t width, height, y, yb, ym, x, boxH; + wWinPix_t width, height, y, yb, ym, x, boxH; wWinGetSize( mainW, &width, &height ); infoHeight = 2 + wStatusGetHeight( COMBOBOX ) + 2 ; textHeight = wStatusGetHeight(0L); @@ -1125,7 +1203,7 @@ EXPORT void InitInfoBar( void ) static void SetInfoBar( void ) { - wPos_t width, height, y, yb, ym, x, boxH; + wWinPix_t width, height, y, yb, ym, x, boxH; int inx; static long oldDistanceFormat = -1; long newDistanceFormat; @@ -1166,7 +1244,7 @@ static void SetInfoBar( void ) if (curInfoControl[0]) { for ( inx=0; curInfoControl[inx]; inx++ ) { x += curInfoLabelWidth[inx]; - int y_this = ym + (textHeight/2) - (wControlGetHeight( curInfoControl[inx] )/2); + wWinPix_t y_this = ym + (textHeight/2) - (wControlGetHeight( curInfoControl[inx] )/2); wControlSetPos( curInfoControl[inx], x, y_this ); x += wControlGetWidth( curInfoControl[inx] )+3; wControlShow( curInfoControl[inx], TRUE ); @@ -1210,7 +1288,7 @@ EXPORT void InfoSubstituteControls( wControl_p * controls, char ** labels ) { - wPos_t x, y; + wWinPix_t x, y; int inx; for ( inx=0; inx<NUM_INFOCTL; inx++ ) { if (curInfoControl[inx]) { @@ -1238,9 +1316,9 @@ EXPORT void InfoSubstituteControls( curInfoLabelWidth[inx] = wLabelWidth(_(labels[inx])); x += curInfoLabelWidth[inx]; #ifdef WINDOWS - int y_this = y + (infoHeight/2) - (textHeight / 2 ); + wWinPix_t y_this = y + (infoHeight/2) - (textHeight / 2 ); #else - int y_this = y + (infoHeight / 2) - (wControlGetHeight(controls[inx]) / 2) - 2; + wWinPix_t y_this = y + (infoHeight / 2) - (wControlGetHeight(controls[inx]) / 2) - 2; #endif wControlSetPos( controls[inx], x, y_this ); x += wControlGetWidth( controls[inx] ); @@ -1262,16 +1340,16 @@ EXPORT void SetMessage( char * msg ) static void ChangeMapScale( BOOL_T reset ) { - wPos_t w, h; - wPos_t dw, dh; + wWinPix_t w, h; + wWinPix_t dw, dh; FLOAT_T fw, fh; fw = (((mapD.size.x/mapD.scale)*mapD.dpi) + 0.5)+2; fh = (((mapD.size.y/mapD.scale)*mapD.dpi) + 0.5)+2; - w = (wPos_t)fw; - h = (wPos_t)fh; + w = (wWinPix_t)fw; + h = (wWinPix_t)fh; if (reset) { wGetDisplaySize( &dw, &dh ); wSetGeometry(mapW, 50, dw, 50, dh, -1, -1, mapD.size.x/mapD.size.y); @@ -1283,6 +1361,7 @@ static void ChangeMapScale( BOOL_T reset ) EXPORT BOOL_T SetRoomSize( coOrd size ) { + SetLayoutRoomSize(size); if (size.x < 12.0) size.x = 12.0; if (size.y < 12.0) @@ -1307,7 +1386,8 @@ EXPORT void GetRoomSize( coOrd * froomSize ) } -static void MapRedraw() +static void MapRedraw( + wDraw_p bd, void * pContex, wWinPix_t px, wWinPix_t py ) { if (inPlaybackQuit) return; @@ -1318,10 +1398,14 @@ static void MapRedraw() if (delayUpdate) wDrawDelayUpdate( mapD.d, TRUE ); //wSetCursor( mapD.d, wCursorWait ); + wBool_t bTemp = wDrawSetTempMode( mapD.d, FALSE ); + if ( bTemp ) + printf( "MapRedraw TempMode\n" ); wDrawClear( mapD.d ); DrawTracks( &mapD, mapD.scale, mapD.orig, mapD.size ); DrawMapBoundingBox( TRUE ); //wSetCursor( mapD.d, defaultCursor ); + wDrawSetTempMode( mapD.d, bTemp ); wDrawDelayUpdate( mapD.d, FALSE ); } @@ -1330,37 +1414,13 @@ static void MapResize( void ) { mapD.scale = mapScale; ChangeMapScale(TRUE); - MapRedraw(); + MapRedraw( mapD.d, NULL, 0, 0 ); } -#ifdef LATER -static void MapProc( wWin_p win, winProcEvent e, void * data ) -{ - switch( e ) { - case wResize_e: - if (mapD.d == NULL) - return; - DrawMapBoundingBox( FALSE ); - ChangeMapScale(); - break; - case wClose_e: - mapVisible = FALSE; - break; - /*case wRedraw_e: - if (mapD.d == NULL) - break; - MapRedraw(); - break;*/ - default: - break; - } -} -#endif - EXPORT void SetMainSize( void ) { - wPos_t ww, hh; + wWinPix_t ww, hh; DIST_T w, h; wDrawGetSize( mainD.d, &ww, &hh ); ww -= LBORDER+RBORDER; @@ -1396,6 +1456,34 @@ if (wDrawDoTempDraw == FALSE) { } } +/** + * Calculate position and size of background bitmap + * + * \param [in] drawP destination drawing area + * \param [in] origX x origin of drawing area + * \param [in] origY y origin of drawing area + * \param [out] posX x position of bitmap + * \param [out] posY y position of bitmap + * \param [out] pWidth width of bitmap in destination coordinates + * + * \returns true on success, false otherwise + */ + +void +TranslateBackground(drawCmd_p drawP, POS_T origX, POS_T origY, wWinPix_t* posX, + wWinPix_t* posY, wWinPix_t* pWidth) +{ + coOrd back_pos = GetLayoutBackGroundPos(); + + *pWidth = (wWinPix_t)(GetLayoutBackGroundSize() / drawP->scale * + drawP->dpi); + + *posX = (wWinPix_t)((back_pos.x - origX) / drawP->scale * + drawP->dpi); + *posY = (wWinPix_t)((back_pos.y - origY) / drawP->scale * + drawP->dpi); +} + /* * Redraw contents on main window */ @@ -1405,29 +1493,36 @@ EXPORT void MainRedraw( void ) static int cMR = 0; LOG( log_redraw, 1, ( "MainRedraw: %d\n", cMR++ ) ); + unsigned long time0 = wGetTimer(); if (delayUpdate) wDrawDelayUpdate( mainD.d, TRUE ); + wDrawSetTempMode( mainD.d, FALSE ); wDrawClear( mainD.d ); - //mainD.d->option = 0; - //mainD.options = 0; - mainD.funcs->options = 0; //Force MainD back from Temp - orig = mainD.orig; size = mainD.size; orig.x -= LBORDER/mainD.dpi*mainD.scale; orig.y -= BBORDER/mainD.dpi*mainD.scale; - wPos_t back_x,back_y; - coOrd back_pos = GetLayoutBackGroundPos(); - back_x = (wPos_t)((back_pos.x-orig.x)/mainD.scale*mainD.dpi); - back_y = (wPos_t)((back_pos.y-orig.y)/mainD.scale*mainD.dpi); - wPos_t back_width = (wPos_t)(GetLayoutBackGroundSize()/mainD.scale*mainD.dpi); DrawRoomWalls( TRUE ); if (GetLayoutBackGroundScreen() < 100.0 && GetLayoutBackGroundVisible()) { - wDrawShowBackground( mainD.d, back_x, back_y, back_width, GetLayoutBackGroundAngle(), GetLayoutBackGroundScreen()); + wWinPix_t bitmapPosX; + wWinPix_t bitmapPosY; + wWinPix_t bitmapWidth; + + TranslateBackground(&mainD, orig.x, orig.y, &bitmapPosX, &bitmapPosY, + &bitmapWidth); + + wDrawShowBackground(mainD.d, + bitmapPosX, + bitmapPosY, + bitmapWidth, + GetLayoutBackGroundAngle(), + GetLayoutBackGroundScreen()); } + DrawSnapGrid( &mainD, mapD.size, TRUE ); + orig = mainD.orig; size = mainD.size; orig.x -= RBORDER/mainD.dpi*mainD.scale; @@ -1436,12 +1531,13 @@ EXPORT void MainRedraw( void ) size.y += (BBORDER+TBORDER)/mainD.dpi*mainD.scale; DrawTracks( &mainD, mainD.scale, orig, size ); - DrawRoomWalls( FALSE ); + DrawRoomWalls( FALSE ); //No background, just rulers + currRedraw++; - DrawSnapGrid( &mainD, mapD.size, TRUE ); //wSetCursor( mainD.d, defaultCursor ); InfoScale(); + LOG( log_timemainredraw, 1, ( "MainRedraw time = %lu mS\n", wGetTimer()-time0 ) ); // The remainder is from TempRedraw wDrawSetTempMode( tempD.d, TRUE ); DrawMarkers(); @@ -1462,46 +1558,34 @@ EXPORT void MainLayout( wBool_t bRedraw, wBool_t bNoBorder ) { -#ifdef LATER - wPos_t ww, hh; - DIST_T w, h; -#endif - DIST_T t1; if (inPlaybackQuit) return; static int cML = 0; LOG( log_redraw, 1, ( "MainLayout: %d\n", cML++ ) ); -#ifdef LATER - wDrawGetSize( mainD.d, &ww, &hh ); - w = ww/mainD.dpi; - h = hh/mainD.dpi; -#endif SetMainSize(); -#ifdef LATER - /*wDrawClip( mainD.d, 0, 0, w, h );*/ -#endif t1 = mainD.dpi/mainD.scale; if (units == UNITS_ENGLISH) { t1 /= 2.0; for ( pixelBins=0.25; pixelBins<t1; pixelBins*=2.0 ); } else { - pixelBins = 50.8; - if (pixelBins >= t1) - while (1) { - if ( pixelBins <= t1 ) + t1 /= 2.0; + pixelBins = 0.127; + while (1) { + pixelBins *= 2.0; + if ( pixelBins >= t1 ) break; - pixelBins /= 2.0; - if ( pixelBins <= t1 ) + pixelBins *= 2.0; + if ( pixelBins >= t1 ) break; - pixelBins /= 2.5; - if ( pixelBins <= t1 ) + pixelBins *= 2.5; + if ( pixelBins >= t1 ) break; - pixelBins /= 2.0; } } - ConstraintOrig( &mainD.orig, mainD.size, bNoBorder, FALSE ); + LOG( log_pan, 2, ( "PixelBins=%0.6f\n", pixelBins ) ); + ConstraintOrig( &mainD.orig, mainD.size, bNoBorder, TRUE ); tempD.orig = mainD.orig; tempD.size = mainD.size; mainCenter.x = mainD.orig.x + mainD.size.x/2.0; @@ -1539,7 +1623,7 @@ EXPORT void MainLayout( void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data ) { - wPos_t width, height; + wWinPix_t width, height; switch( e ) { case wResize_e: if (mainD.d == NULL) @@ -1548,6 +1632,9 @@ void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data ) LayoutToolBar(refresh); height -= (toolbarHeight+max(infoHeight,textHeight)+10); if (height >= 0) { + wBool_t bTemp = wDrawSetTempMode(mainD.d, FALSE ); +if ( bTemp ) + printf( "MainProc TempMode\n" ); wDrawSetSize( mainD.d, width-20, height, refresh ); wControlSetPos( (wControl_p)mainD.d, 0, toolbarHeight ); SetMainSize(); @@ -1556,8 +1643,9 @@ void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data ) panCenter.y = mainD.orig.y + mainD.size.y/2.0; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); MainLayout( !refresh, TRUE ); // MainProc: wResize_e event - wPrefSetInteger( "draw", "mainwidth", width ); - wPrefSetInteger( "draw", "mainheight", height ); + wPrefSetInteger( "draw", "mainwidth", (int)width ); + wPrefSetInteger( "draw", "mainheight", (int)height ); + wDrawSetTempMode( mainD.d, bTemp ); } else DrawMapBoundingBox( TRUE ); break; case wState_e: @@ -1568,7 +1656,7 @@ void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data ) break; case wClose_e: /* shutdown the application via "close window" button */ - DoQuit(); + DoQuit(NULL); break; default: break; @@ -1576,38 +1664,10 @@ void MainProc( wWin_p win, winProcEvent e, void * refresh, void * data ) } -#ifdef WINDOWS -int profRedraw = 0; -void -#ifndef WIN32 -_far _pascal -#endif -ProfStart( void ); -void -#ifndef WIN32 -_far _pascal -#endif -ProfStop( void ); -#endif - EXPORT void DoRedraw( void ) { -#ifdef WINDOWS -#ifndef WIN32 - if (profRedraw) - ProfStart(); -#endif -#endif - MapRedraw(); + MapRedraw( mapD.d, NULL, 0, 0 ); MainRedraw(); // DoRedraw -#ifdef WINDOWS -#ifndef WIN32 - if (profRedraw) - ProfStop(); -#endif -#endif - - } /***************************************************************************** @@ -1619,53 +1679,35 @@ EXPORT void DoRedraw( void ) static void DrawRoomWalls( wBool_t drawBackground ) { - coOrd p00, p01, p11, p10; - int p0,p1,p2,p3; - if (mainD.d == NULL) return; if (drawBackground) { - mainD.CoOrd2Pix(&mainD,mainD.orig,&p0,&p1); - coOrd end; - end.x = mainD.orig.x + mainD.size.x; - end.y = mainD.orig.y + mainD.size.y; - mainD.CoOrd2Pix(&mainD,end,&p2,&p3); - p2 -= p0; - p3 -= p1; - wDrawFilledRectangle( mainD.d, p0, p1, p2, p3, drawColorGrey80, 0 ); - - mainD.CoOrd2Pix(&mainD,zero,&p0,&p1); - mainD.CoOrd2Pix(&mainD,mapD.size,&p2,&p3); - p2 -= p0; - p3 -= p1; - wDrawFilledRectangle( mainD.d, p0, p1, p2, p3, drawColorWhite, 0 ); + DrawRectangle( &mainD, mainD.orig, mainD.size, drawColorGrey80, DRAW_FILL ); + DrawRectangle( &mainD, zero, mapD.size, wDrawColorWhite, DRAW_FILL ); } else { - + coOrd p[4]; DrawTicks( &mainD, mapD.size ); - - p00.x = 0.0; p00.y = 0.0; - p01.x = p10.y = 0.0; - p11.x = p10.x = mapD.size.x; - p01.y = p11.y = mapD.size.y; - - DrawLine( &mainD, p01, p11, 3, borderColor ); - DrawLine( &mainD, p11, p10, 3, borderColor ); - DrawLine( &mainD, p00, p01, 3, borderColor ); - DrawLine( &mainD, p00, p10, 3, borderColor ); + p[0].x = p[0].y = p[1].x = p[3].y = 0.0; + p[2].x = p[3].x = mapD.size.x; + p[1].y = p[2].y = mapD.size.y; + DrawPoly( &mainD, 4, p, NULL, borderColor, 3, DRAW_CLOSED ); } } static void DrawMarkers( void ) { - wPos_t x, y; - mainD.CoOrd2Pix(&mainD,oldMarker,&x,&y); - wDrawLine( tempD.d, 0, y, (wPos_t)LBORDER, y, - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); - wDrawLine( tempD.d, x, 0, x, (wPos_t)BBORDER, - 0, wDrawLineSolid, markerColor, wDrawOptTemp ); + coOrd p0, p1; + p0.x = p1.x = oldMarker.x; + p0.y = mainD.orig.y; + p1.y = mainD.orig.y-BBORDER*mainD.scale/mainD.dpi; + DrawLine( &tempD, p0, p1, 0, markerColor ); + p0.y = p1.y = oldMarker.y; + p0.x = mainD.orig.x; + p1.x = mainD.orig.x-LBORDER*mainD.scale/mainD.dpi; + DrawLine( &tempD, p0, p1, 0, markerColor ); } static DIST_T rulerFontSize = 12.0; @@ -1684,35 +1726,32 @@ EXPORT void DrawRuler( wAngle_t a, aa; DIST_T start, end; long inch, lastInch; - wPos_t len; + DIST_T len; int digit; char quote; - char message[10]; + char message[STR_SHORT_SIZE]; coOrd d_orig, d_size; wFontSize_t fs; - long mm, mm0, mm1, power; - wPos_t x0, y0, x1, y1; + long mm, mm0, mm1, power, skip; - static double lengths[16] = { - 0, 2.0, 4.0, 2.0, 6.0, 2.0, 4.0, 2.0, 8.0, 2.0, 4.0, 2.0, 6.0, 2.0, 4.0, 2.0 }; + static double lengths[] = { + 0, 2.0, 4.0, 2.0, 6.0, 2.0, 4.0, 2.0, 8.0, 2.0, 4.0, 2.0, 6.0, 2.0, 4.0, 2.0, 0.0 }; int fraction, incr, firstFraction, lastFraction; int majorLength; coOrd p0, p1; - FLOAT_T sin_aa; a = FindAngle( pos0, pos1 ); Translate( &pos0, pos0, a, offset ); Translate( &pos1, pos1, a, offset ); aa = NormalizeAngle(a+(tickSide==0?+90:-90)); - sin_aa = sin(D2R(aa)); end = FindDistance( pos0, pos1 ); if (end < 0.1) return; - d_orig.x = d->orig.x - 0.001; - d_orig.y = d->orig.y - 0.001; - d_size.x = d->size.x + 0.002; - d_size.y = d->size.y + 0.002; + d_orig.x = d->orig.x - 0.1; + d_orig.y = d->orig.y - 0.1; + d_size.x = d->size.x + 0.2; + d_size.y = d->size.y + 0.2; if (!ClipLine( &pos0, &pos1, d_orig, d->angle, d_size )) return; @@ -1721,10 +1760,7 @@ EXPORT void DrawRuler( start = -start; end = FindDistance( orig, pos1 ); - d->CoOrd2Pix( d, pos0, &x0, &y0 ); - d->CoOrd2Pix( d, pos1, &x1, &y1 ); - wDrawLine( d->d, x0, y0, x1, y1, - 0, wDrawLineSolid, color, (wDrawOpts)d->funcs->options ); + DrawLine( d, pos0, pos1, 0, color ); if (units == UNITS_METRIC) { mm0 = (int)ceil(start*25.4-0.5); @@ -1739,6 +1775,18 @@ EXPORT void DrawRuler( } else { power = 1000; } + + // Label interval for scale > 40 + if (d->scale <= 200) { + skip = 2000; + } + else if (d->scale <= 400) { + skip = 5000; + } + else { + skip = 10000; + } + for ( ; power<=1000; power*=10,len+=3 ) { if (power == 1000) len = 10; @@ -1746,12 +1794,8 @@ EXPORT void DrawRuler( if (power==1000 || mm%(power*10) != 0) { Translate( &p0, orig, a, mm/25.4 ); Translate( &p1, p0, aa, len*d->scale/mainD.dpi ); - d->CoOrd2Pix( d, p0, &x0, &y0 ); - d->CoOrd2Pix( d, p1, &x1, &y1 ); - wDrawLine( d->d, x0, y0, x1, y1, - 0, wDrawLineSolid, color, (wDrawOpts)d->funcs->options ); - - if (!number || (d->scale>40 && mm != 0.0)) + DrawLine( d, p0, p1, 0, color ); + if (!number || (d->scale > 40 && mm % skip != 0.0)) continue; if ( (power>=1000) || (d->scale<=8 && power>=100) || @@ -1760,22 +1804,18 @@ EXPORT void DrawRuler( sprintf(message, "%ld", mm/10%10 ); fs = rulerFontSize*2/3; Translate( &p0, p0, aa, (fs/2.0+len)*d->scale/mainD.dpi ); - Translate( &p0, p0, 225, fs*d->scale/mainD.dpi ); + Translate( &p0, p0, 225, fs*d->scale/mainD.dpi ); //p0.x = p1.x+4*dxn/10*d->scale/mainD.dpi; //p0.y = p1.y+dyn*d->scale/mainD.dpi; } else { sprintf(message, "%0.1f", mm/1000.0 ); fs = rulerFontSize; Translate( &p0, p0, aa, (fs/2.0+len)*d->scale/mainD.dpi ); - Translate( &p0, p0, 225, 1.5*fs*d->scale/mainD.dpi ); + Translate( &p0, p0, 225, 1.5*fs*d->scale/mainD.dpi ); //p0.x = p0.x+((-(LBORDER-2)/2)+((LBORDER-2)/2+2)*sin_aa)*d->scale/mainD.dpi; //p0.y = p1.y+dyn*d->scale/mainD.dpi; } - d->CoOrd2Pix( d, p0, &x0, &y0 ); - if (x0<0) x0 = 0; - if (y0<0) y0 = 0; - wDrawString( d->d, x0, y0, d->angle, message, rulerFp, - fs, color, (wDrawOpts)d->funcs->options ); + DrawString( d, p0, 0.0, message, rulerFp, fs*d->scale, color ); } } } @@ -1793,6 +1833,7 @@ EXPORT void DrawRuler( incr = 32; else incr = 16; //Inches + lastInch = (int)floor(end); lastFraction = 16; inch = (int)ceil(start); @@ -1802,19 +1843,19 @@ EXPORT void DrawRuler( firstFraction = 16 - firstFraction; } for ( ; inch<=lastInch; inch++){ - if (inch % 12 == 0) { + if(inch % 12 == 0) { lengths[0] = 12; majorLength = 16; digit = (int)(inch/12); fs = rulerFontSize; quote = '\''; - } else if (d->scale <= 8) { + } else if (d->scale <= 12) { // 8 lengths[0] = 12; majorLength = 16; digit = (int)(inch%12); fs = rulerFontSize*(2.0/3.0); quote = '"'; - } else if (d->scale <= 16){ + } else if (d->scale <= 24){ // 16 lengths[0] = 10; majorLength = 12; digit = (int)(inch%12); @@ -1824,31 +1865,52 @@ EXPORT void DrawRuler( } if (inch == lastInch) lastFraction = (((int)((end - lastInch)*16)) / incr) * incr; - for ( fraction = firstFraction; fraction<=lastFraction; fraction += incr ) { - Translate( &p0, orig, a, inch+fraction/16.0 ); - Translate( &p1, p0, aa, lengths[fraction]*d->scale/72.0 ); - d->CoOrd2Pix( d, p0, &x0, &y0 ); - d->CoOrd2Pix( d, p1, &x1, &y1 ); - wDrawLine( d->d, x0, y0, x1, y1, - 0, wDrawLineSolid, color, - (wDrawOpts)d->funcs->options ); -#ifdef KLUDGEWINDOWS - /* KLUDGE: can't draw invertable strings on windows */ - if ( (opts&DO_TEMP) == 0) -#endif - if (fraction == 0) { - if ( (number == TRUE && d->scale<40) || (digit==0)) { - if (inch % 12 == 0 || d->scale <= 2) { - Translate( &p0, p0, aa, majorLength*d->scale/mainD.dpi ); - Translate( &p0, p0, 225, fs*d->scale/mainD.dpi ); - sprintf(message, "%d%c", digit, quote ); - d->CoOrd2Pix( d, p0, &x0, &y0 ); - if (x0<0) x0 = 0; - if (y0<0) y0 = 0; - wDrawString( d->d, x0, y0, d->angle, message, rulerFp, fs, color, (wDrawOpts)d->funcs->options ); + for ( fraction = firstFraction; fraction <= lastFraction; fraction += incr ) { + // Tick interval for scale > 128 + skip = 0; + if(d->scale > 512) { + skip = (inch % 120 != 0); + } + else if(d->scale > 256) { + skip = (inch % 60 != 0); + } + else if(d->scale > 128) { + skip = (inch % 24 != 0); + } + else if(d->scale > 64) { + skip = (inch % 12 != 0); + } + if(!skip){ + Translate( &p0, orig, a, inch+fraction/16.0 ); + Translate( &p1, p0, aa, lengths[fraction]*d->scale/mainD.dpi ); + DrawLine( d, p0, p1, 0, color ); + } + if (fraction == 0) { + // Label interval for scale > 40 + if (d->scale <= 80) { + skip = 2; + } + else if (d->scale <= 120) { + skip = 5; + } + else if (d->scale <= 240) { + skip = 10; + } + else if (d->scale <= 480) { + skip = 20; + } + else { + skip = 50; + } + if ( (number == TRUE && d->scale <= 40) || (digit % skip == 0)) { + if (inch % 12 == 0 || d->scale <= 2) { + Translate( &p0, p0, aa, majorLength*d->scale/mainD.dpi ); + Translate( &p0, p0, 225, fs*d->scale/mainD.dpi ); + sprintf(message, "%d%c", digit, quote ); + DrawString( d, p0, 0.0, message, rulerFp, fs*d->scale, color ); + } } } - } firstFraction = 0; } } @@ -1863,7 +1925,7 @@ static void DrawTicks( drawCmd_p d, coOrd size ) offset = 0.0; - double blank_zone = 40*d->scale/72.0; + double blank_zone = 40*d->scale/mainD.dpi; if ( d->orig.x<0.0-blank_zone ) { p0.y = 0.0; p1.y = mapD.size.y; @@ -1910,20 +1972,19 @@ static void DrawTicks( drawCmd_p d, coOrd size ) EXPORT coOrd mainCenter; - static void DrawMapBoundingBox( BOOL_T set ) { if (mainD.d == NULL || mapD.d == NULL) + abort(); + if (!mapVisible) return; - wDrawSetTempMode( mapD.d, TRUE ); DrawHilight( &mapD, mainD.orig, mainD.size, TRUE ); - wDrawSetTempMode( mapD.d, FALSE ); } -static void ConstraintOrig( coOrd * orig, coOrd size, wBool_t bNoBorder, wBool_t round ) +static void ConstraintOrig( coOrd * orig, coOrd size, wBool_t bNoBorder, wBool_t bRound ) { -LOG( log_pan, 2, ( "ConstraintOrig [ %0.3f, %0.3f ] RoomSize(%0.3f %0.3f), WxH=%0.3fx%0.3f", +LOG( log_pan, 2, ( "ConstraintOrig [ %0.6f, %0.6f ] RoomSize(%0.3f %0.3f), WxH=%0.3fx%0.3f", orig->x, orig->y, mapD.size.x, mapD.size.y, size.x, size.y ) ) @@ -1957,28 +2018,11 @@ LOG( log_pan, 2, ( "ConstraintOrig [ %0.3f, %0.3f ] RoomSize(%0.3f %0.3f), WxH=% if (orig->y < (0-bound.y)) orig->y = 0-bound.y; - if (round) { - if (mainD.scale >= 1.0) { - if (units == UNITS_ENGLISH) { - orig->x = floor(orig->x*4)/4; //>1:1 = 1/4 inch - orig->y = floor(orig->y*4)/4; - } else { - orig->x = floor(orig->x*2.54*2)/(2.54*2); //>1:1 = 0.5 cm - orig->y = floor(orig->y*2.54*2)/(2.54*2); - } - } else { - if (units == UNITS_ENGLISH) { - orig->x = floor(orig->x*64)/64; //<1:1 = 1/64 inch - orig->y = floor(orig->y*64)/64; - } else { - orig->x = floor(orig->x*25.4*2)/(25.4*2); //>1:1 = 0.5 mm - orig->y = floor(orig->y*25.4*2)/(25.4*2); - } - } + if (bRound) { + orig->x = round(orig->x*pixelBins)/pixelBins; + orig->y = round(orig->y*pixelBins)/pixelBins; } - //orig->x = (long)(orig->x*pixelBins+0.5)/pixelBins; - //orig->y = (long)(orig->y*pixelBins+0.5)/pixelBins; - LOG( log_pan, 2, ( " = [ %0.3f %0.3f ]\n", orig->y, orig->y ) ) + LOG( log_pan, 2, ( " = [ %0.6f %0.6f ]\n", orig->x, orig->y ) ) } /** @@ -1995,20 +2039,20 @@ EXPORT void InitCmdZoom( wMenu_p zoomM, wMenu_p zoomSubM, wMenu_p ctxMenu1, wMen { int inx; - for ( inx=0; inx<sizeof zoomList/sizeof zoomList[0]; inx++ ) { + for ( inx=0; inx<COUNT( zoomList ); inx++ ) { if( (zoomList[ inx ].value >= 1.0 && zoomList[ inx ].value<=10 ) || (ceil(log2(zoomList[ inx ].value)) == floor(log2(zoomList[ inx ].value)))) { if (zoomM) - zoomList[inx].btRadio = wMenuRadioCreate( zoomM, "cmdZoom", zoomList[inx].name, 0, (wMenuCallBack_p)DoZoom, (void *)(&(zoomList[inx].value))); + zoomList[inx].btRadio = wMenuRadioCreate( zoomM, "cmdZoom", zoomList[inx].name, 0, DoZoom, (&(zoomList[inx].value))); if( zoomSubM ) - zoomList[inx].pdRadio = wMenuRadioCreate( zoomSubM, "cmdZoom", zoomList[inx].name, 0, (wMenuCallBack_p)DoZoom, (void *)(&(zoomList[inx].value))); + zoomList[inx].pdRadio = wMenuRadioCreate( zoomSubM, "cmdZoom", zoomList[inx].name, 0, DoZoom, (&(zoomList[inx].value))); if (panMenu) - zoomList[inx].panRadio = wMenuRadioCreate( panMenu, "cmdZoom", zoomList[inx].name, 0, (wMenuCallBack_p)DoZoom, (void *)(&(zoomList[inx].value))); + zoomList[inx].panRadio = wMenuRadioCreate( panMenu, "cmdZoom", zoomList[inx].name, 0, DoZoom, (&(zoomList[inx].value))); } if ((zoomList[inx].value >=1.0 && zoomList[inx].value <= 10.0) || (ceil(log2(zoomList[ inx ].value)) == floor(log2(zoomList[ inx ].value)))) { if (ctxMenu1) - zoomList[inx].ctxRadio1 = wMenuRadioCreate( ctxMenu1, "cmdZoom", zoomList[inx].name, 0, (wMenuCallBack_p)DoZoom, (void *)(&(zoomList[inx].value))); + zoomList[inx].ctxRadio1 = wMenuRadioCreate( ctxMenu1, "cmdZoom", zoomList[inx].name, 0, DoZoom, (&(zoomList[inx].value))); } } } @@ -2025,7 +2069,7 @@ static void SetZoomRadio( DIST_T scale ) int inx; long curScale = (long)scale; - for ( inx=0; inx<sizeof zoomList/sizeof zoomList[0]; inx++ ) { + for ( inx=0; inx<COUNT( zoomList ); inx++ ) { if( curScale == zoomList[inx].value ) { if (zoomList[inx].btRadio) wMenuRadioSetActive( zoomList[inx].btRadio ); @@ -2037,7 +2081,7 @@ static void SetZoomRadio( DIST_T scale ) wMenuRadioSetActive( zoomList[inx].panRadio ); /* activate / deactivate zoom buttons when appropriate */ wControlLinkedActive( (wControl_p)zoomUpB, ( inx != 0 ) ); - wControlLinkedActive( (wControl_p)zoomDownB, ( inx < (sizeof zoomList/sizeof zoomList[0] - 1))); + wControlLinkedActive( (wControl_p)zoomDownB, ( inx < (COUNT( zoomList ) - 1))); } } } @@ -2054,7 +2098,7 @@ static int ScaleInx( DIST_T scale ) { int inx; - for ( inx=0; inx<sizeof zoomList/sizeof zoomList[0]; inx++ ) { + for ( inx=0; inx<COUNT( zoomList); inx++ ) { if( scale == zoomList[inx].value ) { return inx; } @@ -2069,7 +2113,7 @@ static int ScaleInx( DIST_T scale ) static int NearestScaleInx ( DIST_T scale, BOOL_T larger ) { int inx; - for ( inx=0; inx<sizeof zoomList/sizeof zoomList[0]; inx++ ) { + for ( inx=0; inx<COUNT( zoomList ); inx++ ) { if( scale == zoomList[inx].value ) { return inx; } @@ -2094,9 +2138,7 @@ static void DoNewScale( DIST_T scale ) tempD.scale = mainD.scale = scale; mainD.dpi = wDrawGetDPI( mainD.d ); - if ( mainD.dpi == 75 ) { - mainD.dpi = 72.0; - } else if ( scale > 1.0 && scale <= 12.0 ) { + if ( scale > 1.0 && scale <= 12.0 ) { mainD.dpi = floor( (mainD.dpi + scale/2)/scale) * scale; } tempD.dpi = mainD.dpi; @@ -2104,7 +2146,7 @@ static void DoNewScale( DIST_T scale ) SetZoomRadio( scale ); InfoScale(); SetMainSize(); - PanHere( (void*)1 ); + PanHere( I2VP(1) ); LOG( log_zoom, 1, ( "center = [%0.3f %0.3f]\n", mainCenter.x, mainCenter.y ) ) sprintf( tmp, "%0.3f", mainD.scale ); wPrefSetString( "draw", "zoom", tmp ); @@ -2156,17 +2198,53 @@ EXPORT void DoZoomUp( void * mode ) } } +/* + * Mode - 0 = Extents are Map size + * Mode - 1 = Extents are Selected size + */ EXPORT void DoZoomExtents( void * mode) { DIST_T scale_x, scale_y; - scale_x = mapD.size.x/(mainD.size.x/mainD.scale); - scale_y = mapD.size.y/(mainD.size.y/mainD.scale); + if ( 1 == VP2L(mode) ) { + if ( selectedTrackCount == 0 ) + return; + track_p trk = NULL; + coOrd bot, top; + BOOL_T first = TRUE; + while ( TrackIterate( &trk ) ) { + if(GetTrkSelected(trk)) { + coOrd hi, lo; + GetBoundingBox(trk,&hi,&lo); + if (first) { + first = FALSE; + bot = lo; + top = hi; + } else { + if (lo.x < bot.x) bot.x = lo.x; + if (lo.y < bot.y) bot.y = lo.y; + if (hi.x > top.x) top.x = hi.x; + if (hi.y > top.y) top.y = hi.y; + } + } + } + panCenter.x = (top.x/2)+(bot.x)/2; + panCenter.y = (top.y/2)+(bot.y)/2; + PanHere(I2VP(1)); + scale_x = (top.x-bot.x)*1.5/(mainD.size.x/mainD.scale); + scale_y = (top.y-bot.y)*1.5/(mainD.size.y/mainD.scale); + } else { + scale_x = mapD.size.x/(mainD.size.x/mainD.scale); + scale_y = mapD.size.y/(mainD.size.y/mainD.scale); + } + + if (scale_x<scale_y) scale_x = scale_y; scale_x = ceil(scale_x); if (scale_x < 1) scale_x = 1; if (scale_x > MAX_MAIN_SCALE) scale_x = MAX_MAIN_SCALE; - mainD.orig = zero; + if (1 != (intptr_t)1) + mainD.orig = zero; DoNewScale(scale_x); MainLayout(TRUE,TRUE); @@ -2188,7 +2266,7 @@ EXPORT void DoZoomDown( void * mode) if ( mode != NULL || (MyGetKeyState()&WKEY_SHIFT) == 0 ) { i = ScaleInx( mainD.scale ); if (i < 0) i = NearestScaleInx(mainD.scale, TRUE); - if( i>= 0 && i < ( sizeof zoomList/sizeof zoomList[0] - 1 )) { + if( i>= 0 && i < ( COUNT( zoomList ) - 1 )) { InfoMessage(""); DoNewScale( zoomList[ i + 1 ].value ); } else @@ -2212,9 +2290,9 @@ EXPORT void DoZoomDown( void * mode) * \param IN scale current pScale * */ - -EXPORT void DoZoom( DIST_T *pScale ) +static void DoZoom( void * pScaleVP ) { + DIST_T *pScale = pScaleVP; DIST_T scale = *pScale; if( scale != mainD.scale ) @@ -2222,11 +2300,10 @@ EXPORT void DoZoom( DIST_T *pScale ) } - EXPORT void Pix2CoOrd( drawCmd_p d, - wPos_t x, - wPos_t y, + wDrawPix_t x, + wDrawPix_t y, coOrd * pos ) { pos->x = (((DIST_T)x)/d->dpi)*d->scale+d->orig.x; @@ -2236,11 +2313,11 @@ EXPORT void Pix2CoOrd( EXPORT void CoOrd2Pix( drawCmd_p d, coOrd pos, - wPos_t * x, - wPos_t * y ) + wDrawPix_t * x, + wDrawPix_t * y ) { - *x = (wPos_t)((pos.x-d->orig.x)/d->scale*d->dpi); - *y = (wPos_t)((pos.y-d->orig.y)/d->scale*d->dpi); + *x = (wDrawPix_t)((pos.x-d->orig.x)/d->scale*d->dpi); + *y = (wDrawPix_t)((pos.y-d->orig.y)/d->scale*d->dpi); } /* @@ -2254,30 +2331,29 @@ EXPORT void CoOrd2Pix( * - 3: Take position from menuPos */ EXPORT void PanHere(void * mode) { - if ( 3 == (long)mode) { + if ( 3 == VP2L(mode ) ) { panCenter = menuPos; LOG( log_pan, 2, ( "MCenter:Mod-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); } mainD.orig.x = panCenter.x - mainD.size.x/2.0; mainD.orig.y = panCenter.y - mainD.size.y/2.0; wBool_t bNoBorder = (constrainMain != 0); - if ( 1 != (long)mode ) + if ( 1 != VP2L(mode) ) if ( (MyGetKeyState()&WKEY_CTRL)!= 0 ) bNoBorder = !bNoBorder; wBool_t bLiveMap = TRUE; - if ( 2 == (long)mode ) + if ( 2 == VP2L(mode) ) bLiveMap = liveMap; MainLayout( bLiveMap, bNoBorder ); // PanHere } -static void DoPanKeyAction( wAction_t action ) +static int DoPanKeyAction( wAction_t action ) { - switch ((wAccelKey_e)(action>>8)) { + switch ((wAccelKey_e)(action>>8)&0xFF) { case wAccelKey_Del: - SelectDelete(); - return; + return SelectDelete(); #ifndef WINDOWS case wAccelKey_Pgdn: DoZoomUp(NULL); @@ -2294,7 +2370,7 @@ static void DoPanKeyAction( wAction_t action ) else panCenter.x += mainD.size.x/2; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); break; case wAccelKey_Left: @@ -2305,7 +2381,7 @@ static void DoPanKeyAction( wAction_t action ) else panCenter.x -= mainD.size.x/2; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); break; case wAccelKey_Up: @@ -2316,7 +2392,7 @@ static void DoPanKeyAction( wAction_t action ) else panCenter.y += mainD.size.y/2; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); break; case wAccelKey_Down: @@ -2327,12 +2403,13 @@ static void DoPanKeyAction( wAction_t action ) else panCenter.y -= mainD.size.y/2; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)0); + PanHere(I2VP(0)); break; default: - return; + return 0; } + return 0; } @@ -2342,7 +2419,7 @@ static void DoMapPan( wAction_t action, coOrd pos ) static coOrd size; static DIST_T xscale, yscale; static enum { noPan, movePan, resizePan } mode = noPan; - wPos_t x, y; + wDrawPix_t x, y; switch (action & 0xFF) { @@ -2358,13 +2435,13 @@ static void DoMapPan( wAction_t action, coOrd pos ) // mainD.orig.y = pos.y - mainD.size.y/2.0; panCenter = pos; LOG( log_pan, 1, ( "%s = [ %0.3f, %0.3f ]\n", action == C_DOWN? "START":"MOVE", mainD.orig.x, mainD.orig.y ) ) - PanHere( (void*)2 ); + PanHere( I2VP(2)); break; case C_UP: if ( mode != movePan ) break; panCenter = pos; - PanHere( (void*)0 ); + PanHere( I2VP(0)); LOG( log_pan, 1, ( "FINAL = [ %0.3f, %0.3f ]\n", mainD.orig.x, mainD.orig.y ) ) mode = noPan; break; @@ -2410,7 +2487,7 @@ LOG( log_pan, 1, ( "START %0.3fx%0.3f %0.3f+%0.3f\n", mapOrig.x, mapOrig.y, size mainD.orig.x = mapOrig.x - mainD.size.x / 2.0; mainD.orig.y = mapOrig.y - mainD.size.y / 2.0; tempD.scale = mainD.scale = xscale; - PanHere( (void*)2 ); + PanHere( I2VP(2)); LOG( log_pan, 1, ( "MOVE SCL:%0.3f %0.3fx%0.3f %0.3f+%0.3f\n", xscale, mainD.orig.x, mainD.orig.y, mainD.size.x, mainD.size.y ) ) InfoScale(); break; @@ -2435,11 +2512,15 @@ LOG( log_pan, 1, ( "MOVE SCL:%0.3f %0.3fx%0.3f %0.3f+%0.3f\n", xscale, mainD.ori } +/* +* IsClose +* is distance smaller than 10 pixels at 72 DPI? +*/ EXPORT BOOL_T IsClose( DIST_T d ) { - wPos_t pd; - pd = (wPos_t)(d/mainD.scale * mainD.dpi); + wDrawPix_t pd; + pd = (wDrawPix_t)(d/mainD.scale * mainD.dpi); return pd <= closePixels; } @@ -2471,7 +2552,7 @@ EXPORT void FakeDownMouseState( void ) */ void -GetMousePosition( int *x, int *y ) +GetMousePosition( wDrawPix_t *x, wDrawPix_t *y ) { if( x && y ) { *x = mousePositionx; @@ -2508,7 +2589,7 @@ static void DoMouse( wAction_t action, coOrd pos ) { BOOL_T rc; - wPos_t x, y; + wDrawPix_t x, y; static BOOL_T ignoreCommands; LOG( log_mouse, 2, ( "DoMouse( %d, %0.3f, %0.3f )\n", action, pos.x, pos.y ) ) @@ -2595,8 +2676,9 @@ static void DoMouse( wAction_t action, coOrd pos ) action = C_TEXT+((int)(0x0A<<8)); break; } - DoPanKeyAction( action ); - return; + int rc = DoPanKeyAction(action); + if (rc!=1) return; + break; case C_TEXT: if ((action>>8) == 0x0D) { action = C_OK; @@ -2604,6 +2686,7 @@ static void DoMouse( wAction_t action, coOrd pos ) ConfirmReset( TRUE ); return; } + /*no break */ case C_MODKEY: case C_MOVE: case C_UP: @@ -2614,30 +2697,30 @@ static void DoMouse( wAction_t action, coOrd pos ) /*DrawTempTrack();*/ break; case C_WUP: - DoZoomUp((void *)1L); + DoZoomUp(I2VP(1L)); break; case C_WDOWN: - DoZoomDown((void *)1L); + DoZoomDown(I2VP(1L)); break; case C_SCROLLUP: panCenter.y = panCenter.y + ((mainD.size.y/20>min.y)?mainD.size.y/20:min.y); LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)1); + PanHere(I2VP(1)); break; case C_SCROLLDOWN: panCenter.y = panCenter.y - ((mainD.size.y/20>min.y)?mainD.size.y/20:min.y); LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)1); + PanHere(I2VP(1)); break; case C_SCROLLLEFT: panCenter.x = panCenter.x - ((mainD.size.x/20>min.x)?mainD.size.x/20:min.x); LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)1); + PanHere(I2VP(1)); break; case C_SCROLLRIGHT: panCenter.x = panCenter.x + ((mainD.size.x/20>min.x)?mainD.size.x/20:min.x); LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere((void*)1); + PanHere(I2VP(1)); break; default: NoticeMessage( MSG_DOMOUSE_BAD_OP, _("Ok"), NULL, action&0xFF ); @@ -2668,17 +2751,16 @@ static void DoMouse( wAction_t action, coOrd pos ) } -wPos_t autoPanFactor = 10; -static void DoMousew( wDraw_p d, void * context, wAction_t action, wPos_t x, wPos_t y ) +wDrawPix_t autoPanFactor = 10; +static void DoMousew( wDraw_p d, void * context, wAction_t action, wDrawPix_t x, wDrawPix_t y ) { coOrd pos; coOrd orig; - wPos_t w, h; - static wPos_t lastX, lastY; + wWinPix_t w, h; + static wDrawPix_t lastX, lastY; DIST_T minDist; - + wDrawGetSize( mainD.d, &w, &h ); if ( autoPan && !inPlayback ) { - wDrawGetSize( mainD.d, &w, &h ); if ( action == wActionLDown || action == wActionRDown || (action == wActionLDrag && mouseState == mouseLeftPending ) /*|| (action == wActionRDrag && mouseState == mouseRightPending ) */ ) { @@ -2748,6 +2830,10 @@ static void DoMousew( wDraw_p d, void * context, wAction_t action, wPos_t x, wPo } DoMouse( action, pos ); + + if (( x < 20 ) || ( x > w-20 ) || ( y < 20 ) || ( y > h-20 ) ) { + wSetCursor(mainD.d,defaultCursor); //Add system cursor if close to edges + } } static wBool_t PlaybackMain( char * line ) @@ -2755,17 +2841,16 @@ static wBool_t PlaybackMain( char * line ) int rc; int action; coOrd pos; - char *oldLocale = NULL; - oldLocale = SaveLocale("C"); + SetCLocale(); rc=sscanf( line, "%d " SCANF_FLOAT_FORMAT SCANF_FLOAT_FORMAT, &action, &pos.x, &pos.y); - RestoreLocale(oldLocale); + SetUserLocale(); if (rc != 3) { SyntaxError( "MOUSE", rc, 3 ); } else { - PlaybackMouse( DoMouse, &mainD, (wAction_t)action, pos, wDrawColorBlack ); + PlaybackMouse( DoMouse, &tempD, (wAction_t)action, pos, wDrawColorBlack ); } return TRUE; } @@ -2775,18 +2860,17 @@ static wBool_t PlaybackKey( char * line ) int rc; int action = C_TEXT; coOrd pos; - char *oldLocale = NULL; int c; - oldLocale = SaveLocale("C"); + SetCLocale(); rc=sscanf( line, "%d " SCANF_FLOAT_FORMAT SCANF_FLOAT_FORMAT, &c, &pos.x, &pos.y ); - RestoreLocale(oldLocale); + SetUserLocale(); if (rc != 3) { SyntaxError( "MOUSE", rc, 3 ); } else { - action = action||c<<8; - PlaybackMouse( DoMouse, &mainD, (wAction_t)action, pos, wDrawColorBlack ); + action = action|c<<8; + PlaybackMouse( DoMouse, &tempD, (wAction_t)action, pos, wDrawColorBlack ); } return TRUE; } @@ -2797,17 +2881,17 @@ static wBool_t PlaybackKey( char * line ) * */ -static paramDrawData_t mapDrawData = { 100, 100, (wDrawRedrawCallBack_p)MapRedraw, DoMapPan, &mapD }; +static paramDrawData_t mapDrawData = { 100, 100, MapRedraw, DoMapPan, &mapD }; static paramData_t mapPLs[] = { { PD_DRAW, NULL, "canvas", 0, &mapDrawData } }; -static paramGroup_t mapPG = { "map", PGO_NODEFAULTPROC, mapPLs, sizeof mapPLs/sizeof mapPLs[0] }; +static paramGroup_t mapPG = { "map", PGO_NODEFAULTPROC, mapPLs, COUNT( mapPLs ) }; static void MapDlgUpdate( paramGroup_p pg, int inx, void * valueP ) { - int width,height; + wWinPix_t width,height; switch(inx) { case wResize_e: if (mapD.d == NULL) @@ -2822,8 +2906,8 @@ static void MapDlgUpdate( if (scaleX<scaleY) scale = scaleX; else scale = scaleY; - if (scale > 256.0) scale = 256.0; - if (scale < 0.01) scale = 0.01; + if (scale > MAX_MAIN_SCALE) scale = MAX_MAIN_SCALE; + if (scale < MIN_MAIN_MACRO) scale = MIN_MAIN_MACRO; mapScale = (long)scale; @@ -2831,7 +2915,7 @@ static void MapDlgUpdate( ChangeMapScale(FALSE); if (mapVisible) { - MapRedraw(); + MapRedraw( mapD.d, NULL, 0, 0 ); } wPrefSetInteger( "draw", "mapscale", (long)mapD.scale ); } @@ -2858,7 +2942,7 @@ static void DrawChange( long changes ) static void MainLayoutCB( - wDraw_p bd, void * pContex, wPos_t px, wPos_t py ) + wDraw_p bd, void * pContex, wWinPix_t px, wWinPix_t py ) { MainLayout( TRUE, FALSE ); } @@ -2866,7 +2950,7 @@ static void MainLayoutCB( EXPORT void DrawInit( int initialZoom ) { - wPos_t w, h; + wWinPix_t w, h; wWinGetSize( mainW, &w, &h ); @@ -2876,7 +2960,7 @@ EXPORT void DrawInit( int initialZoom ) if ( h <= 0 ) h = 1; tempD.d = mainD.d = wDrawCreate( mainW, 0, toolbarHeight, "", BD_TICKS|BD_MODKEYS, w, h, &mainD, - (wDrawRedrawCallBack_p)MainLayoutCB, DoMousew ); + MainLayoutCB, DoMousew ); if (initialZoom == 0) { WDOUBLE_T tmpR; @@ -2894,9 +2978,7 @@ EXPORT void DrawInit( int initialZoom ) } tempD.scale = mainD.scale; mainD.dpi = wDrawGetDPI( mainD.d ); - if ( mainD.dpi == 75 ) { - mainD.dpi = 72.0; - } else if ( mainD.scale > 1.0 && mainD.scale <= 12.0 ) { + if ( mainD.scale > 1.0 && mainD.scale <= 12.0 ) { mainD.dpi = floor( (mainD.dpi + mainD.scale/2)/mainD.scale) * mainD.scale; } tempD.dpi = mainD.dpi; @@ -2905,8 +2987,8 @@ EXPORT void DrawInit( int initialZoom ) panCenter.x = mainD.size.x/2 +mainD.orig.x; panCenter.y = mainD.size.y/2 +mainD.orig.y; mapD.scale = mapScale; - /*w = (wPos_t)((mapD.size.x/mapD.scale)*mainD.dpi + 0.5)+2;*/ - /*h = (wPos_t)((mapD.size.y/mapD.scale)*mainD.dpi + 0.5)+2;*/ + /*w = (wWinPix_t)((mapD.size.x/mapD.scale)*mainD.dpi + 0.5)+2;*/ + /*h = (wWinPix_t)((mapD.size.y/mapD.scale)*mainD.dpi + 0.5)+2;*/ ParamRegister( &mapPG ); mapW = ParamCreateDialog( &mapPG, MakeWindowTitle(_("Map")), NULL, NULL, NULL, FALSE, NULL, F_RESIZE, MapDlgUpdate ); ChangeMapScale(TRUE); @@ -2915,6 +2997,8 @@ EXPORT void DrawInit( int initialZoom ) log_zoom = LogFindIndex( "zoom" ); log_mouse = LogFindIndex( "mouse" ); log_redraw = LogFindIndex( "redraw" ); + log_timemainredraw = LogFindIndex( "timemainredraw" ); + AddPlaybackProc( "MOUSE ", (playbackProc_p)PlaybackMain, NULL ); AddPlaybackProc( "KEY ", (playbackProc_p)PlaybackKey, NULL ); @@ -2925,13 +3009,9 @@ EXPORT void DrawInit( int initialZoom ) SetInfoBar(); InfoPos( zero ); RegisterChangeNotification( DrawChange ); -#ifdef LATER - wAttachAccelKey( wAccelKey_Pgup, 0, (wAccelKeyCallBack_p)doZoomUp, NULL ); - wAttachAccelKey( wAccelKey_Pgdn, 0, (wAccelKeyCallBack_p)doZoomDown, NULL ); -#endif } -#include "bitmaps/pan.xpm" +#include "bitmaps/pan-zoom.xpm" EXPORT static wMenu_p panPopupM; @@ -2994,7 +3074,7 @@ static STATUS_T CmdPan( mainD.orig.x -= (pos.x - start_pos.x); mainD.orig.y -= (pos.y - start_pos.y); if ((MyGetKeyState()&WKEY_SHIFT) != 0) - ConstraintOrig(&mainD.orig,mainD.size,TRUE,FALSE); + ConstraintOrig(&mainD.orig,mainD.size,TRUE,TRUE); if ((oldOrig.x == mainD.orig.x) && (oldOrig.y == mainD.orig.y)) InfoMessage(_("Can't move any further in that direction")); else @@ -3016,15 +3096,13 @@ static STATUS_T CmdPan( } panCenter.x = mainD.orig.x + mainD.size.x/2.0; panCenter.y = mainD.orig.y + mainD.size.y/2.0; - PanHere( (void*)0 ); + PanHere( I2VP(0)); break; case C_UP: if (panmode == ZOOM) { scale_x = size.x/mainD.size.x*mainD.scale; scale_y = size.y/mainD.size.y*mainD.scale; - DIST_T oldScale = mainD.scale; - if (scale_x<scale_y) scale_x = scale_y; if (scale_x>1) scale_x = ceil( scale_x ); @@ -3061,7 +3139,9 @@ static STATUS_T CmdPan( panmode = NONE; if ((action>>8) == 'e') { //"e" - DoZoomExtents(0); + DoZoomExtents(I2VP(0)); + } else if((action>>8) == 's') { + DoZoomExtents(I2VP(1)); } else if (((action>>8) == '0') || ((action>>8) == 'o')) { //"0" or "o" mainD.orig = zero; panCenter.x = mainD.size.x/2.0; @@ -3074,7 +3154,7 @@ static STATUS_T CmdPan( } else if ((action>>8) == 'c') { // "c" panCenter = pos; LOG( log_pan, 2, ( "PanCenter:%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere( (void*)0 ); // CmdPan C_TEXT 'c' + PanHere( I2VP(0)); // CmdPan C_TEXT 'c' } if ((action>>8) == 0x0D) { @@ -3097,7 +3177,9 @@ static STATUS_T CmdPan( static wMenuPush_p zoomExtents,panOrig,panHere; static wMenuPush_p zoomLvl1,zoomLvl2,zoomLvl3,zoomLvl4,zoomLvl5,zoomLvl6,zoomLvl7,zoomLvl8,zoomLvl9; -EXPORT void PanMenuEnter(int key) { +EXPORT void PanMenuEnter( void * keyVP ) +{ + int key = (int)VP2L(keyVP); int action; action = C_TEXT; action |= key<<8; @@ -3111,28 +3193,28 @@ extern wIndex_t modifyCmdInx; EXPORT void InitCmdPan( wMenu_p menu ) { - panCmdInx = AddMenuButton( menu, CmdPan, "cmdPan", _("Pan/Zoom"), wIconCreatePixMap(pan_xpm), + panCmdInx = AddMenuButton( menu, CmdPan, "cmdPan", _("Pan/Zoom"), wIconCreatePixMap(pan_zoom_xpm[iconSize]), LEVEL0, IC_CANCEL|IC_POPUP|IC_LCLICK|IC_CMDMENU, ACCL_PAN, NULL ); } EXPORT void InitCmdPan2( wMenu_p menu ) { panPopupM = MenuRegister( "Pan Options" ); - wMenuPushCreate(panPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, (void*) (intptr_t) selectCmdInx); - wMenuPushCreate(panPopupM, "cmdDescribeMode", GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, (void*) (intptr_t) describeCmdInx); - wMenuPushCreate(panPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, (void*) (intptr_t) modifyCmdInx); + wMenuPushCreate(panPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, I2VP(selectCmdInx)); + wMenuPushCreate(panPopupM, "cmdDescribeMode", GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, I2VP(describeCmdInx)); + wMenuPushCreate(panPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, I2VP(modifyCmdInx)); wMenuSeparatorCreate(panPopupM); - zoomExtents = wMenuPushCreate( panPopupM, "", _("Zoom to extents - 'e'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) 'e'); - zoomLvl1 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:1 - '1'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '1'); - zoomLvl2 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:2 - '2'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '2'); - zoomLvl3 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:3 - '3'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '3'); - zoomLvl4 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:4 - '4'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '4'); - zoomLvl5 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:5 - '5'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '5'); - zoomLvl6 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:6 - '6'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '6'); - zoomLvl7 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:7 - '7'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '7'); - zoomLvl8 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:8 - '8'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '8'); - zoomLvl9 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:9 - '9'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) '9'); - panOrig = wMenuPushCreate( panPopupM, "", _("Pan to Origin - 'o'/'0'"), 0, (wMenuCallBack_p)PanMenuEnter, (void*) 'o'); + zoomExtents = wMenuPushCreate( panPopupM, "", _("Zoom to extents - 'e'"), 0, PanMenuEnter, I2VP( 'e')); + zoomLvl1 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:1 - '1'"), 0, PanMenuEnter, I2VP( '1')); + zoomLvl2 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:2 - '2'"), 0, PanMenuEnter, I2VP( '2')); + zoomLvl3 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:3 - '3'"), 0, PanMenuEnter, I2VP( '3')); + zoomLvl4 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:4 - '4'"), 0, PanMenuEnter, I2VP( '4')); + zoomLvl5 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:5 - '5'"), 0, PanMenuEnter, I2VP( '5')); + zoomLvl6 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:6 - '6'"), 0, PanMenuEnter, I2VP( '6')); + zoomLvl7 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:7 - '7'"), 0, PanMenuEnter, I2VP( '7')); + zoomLvl8 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:8 - '8'"), 0, PanMenuEnter, I2VP( '8')); + zoomLvl9 = wMenuPushCreate( panPopupM, "", _("Zoom to 1:9 - '9'"), 0, PanMenuEnter, I2VP( '9')); + panOrig = wMenuPushCreate( panPopupM, "", _("Pan to Origin - 'o'/'0'"), 0, PanMenuEnter, I2VP( 'o')); wMenu_p zoomPanM = wMenuMenuCreate(panPopupM, "", _("&Zoom")); InitCmdZoom(NULL, NULL, NULL, zoomPanM); - panHere = wMenuPushCreate( panPopupM, "", _("Pan center here - 'c'"), 0, (wMenuCallBack_p)PanHere, (void*) 3); + panHere = wMenuPushCreate( panPopupM, "", _("Pan center here - 'c'"), 0, PanHere, I2VP( 3)); } diff --git a/app/bin/draw.h b/app/bin/draw.h index dc01695..4942b8d 100644 --- a/app/bin/draw.h +++ b/app/bin/draw.h @@ -24,7 +24,6 @@ #define DRAW_H #include "common.h" -#include "wlib.h" // drawCmd_t.options // @@ -41,8 +40,13 @@ #define DC_CENTERLINE (1<<4) // TICKS: draw rulers on edges #define DC_TICKS (1<<5) +// TEMP: temp mode draws +#define DC_TEMP (1<<6) +// OUTLINE: use outline font +#define DC_OUTLINE (1<<7) + // Line styles -#define DC_THICK (1<<7) +#define DC_THICK (1<<9) #define DC_DASH (1<<12) #define DC_DOT (1<<13) #define DC_DASHDOT (1<<14) @@ -54,27 +58,28 @@ #define INIT_MAIN_SCALE (8.0) #define INIT_MAP_SCALE (64.0) -#define MAX_MAIN_SCALE (256.0) +#define MAX_MAIN_SCALE (1024.0) #define MIN_MAIN_SCALE (1.0) #define MIN_MAIN_MACRO (0.10) +typedef enum { DRAW_OPEN, DRAW_CLOSED, DRAW_FILL, DRAW_TRANSPARENT } drawFill_e; + typedef struct drawCmd_t * drawCmd_p; typedef struct { - long options; void (*drawLine)(drawCmd_p, coOrd, coOrd, wDrawWidth, wDrawColor); void (*drawArc)(drawCmd_p, coOrd, DIST_T, ANGLE_T, ANGLE_T, BOOL_T, wDrawWidth, wDrawColor); void (*drawString)(drawCmd_p, coOrd, ANGLE_T, char *, wFont_p, FONTSIZE_T, wDrawColor); void (*drawBitMap)(drawCmd_p, coOrd, wDrawBitMap_p, wDrawColor); - void (*drawPoly)(drawCmd_p, int, coOrd *, int *, wDrawColor, wDrawWidth, int, - int); + void (*drawPoly)(drawCmd_p, int, coOrd *, int *, wDrawColor, wDrawWidth, drawFill_e); void (*drawFillCircle)(drawCmd_p, coOrd, DIST_T, wDrawColor); + void (*drawRectangle)(drawCmd_p, coOrd, coOrd, wDrawColor, drawFill_e); } drawFuncs_t; -typedef void (*drawConvertPix2CoOrd)(drawCmd_p, wPos_t, wPos_t, coOrd *); -typedef void (*drawConvertCoOrd2Pix)(drawCmd_p, coOrd, wPos_t *, wPos_t *); +typedef void (*drawConvertPix2CoOrd)(drawCmd_p, wDrawPix_t, wDrawPix_t, coOrd *); +typedef void (*drawConvertCoOrd2Pix)(drawCmd_p, coOrd, wDrawPix_t *, wDrawPix_t *); typedef struct drawCmd_t { wDraw_p d; drawFuncs_t * funcs; @@ -101,8 +106,8 @@ typedef struct drawCmd_t { #define RBORDER (9) #define TBORDER (8) -void Pix2CoOrd(drawCmd_p, wPos_t, wPos_t, coOrd *); -void CoOrd2Pix(drawCmd_p, coOrd, wPos_t *, wPos_t *); +void Pix2CoOrd(drawCmd_p, wDrawPix_t, wDrawPix_t, coOrd *); +void CoOrd2Pix(drawCmd_p, coOrd, wDrawPix_t *, wDrawPix_t *); extern BOOL_T inError; extern DIST_T pixelBins; @@ -115,7 +120,7 @@ extern drawCmd_t mapD; extern drawCmd_t tempD; #define RoomSize (mapD.size) extern coOrd oldMarker; -extern wPos_t closePixels; +extern wDrawPix_t closePixels; #define dragDistance (dragPixels*mainD.scale / mainD.dpi) extern long dragPixels; extern long dragTimeout; @@ -190,8 +195,9 @@ extern drawFuncs_t printDrawFuncs; #define DrawArc( D, P, R, A0, A1, F, W, C ) (D)->funcs->drawArc( D, P, R, A0, A1, F, W, C ) #define DrawString( D, P, A, S, FP, FS, C ) (D)->funcs->drawString( D, P, A, S, FP, FS, C ) #define DrawBitMap( D, P, B, C ) (D)->funcs->drawBitMap( D, P, B, C ) -#define DrawPoly( D, N, P, T, C, W, F, O ) (D)->funcs->drawPoly( D, N, P, T, C, W, F, O ); +#define DrawPoly( D, N, P, T, C, W, O ) (D)->funcs->drawPoly( D, N, P, T, C, W, O ); #define DrawFillCircle( D, P, R, C ) (D)->funcs->drawFillCircle( D, P, R, C ); +#define DrawRectangle( D, P, S, C, O ) (D)->funcs->drawRectangle( D, P, S, C, O ) #define REORIGIN( Q, P, A, O ) { \ (Q) = (P); \ @@ -219,6 +225,8 @@ void DrawHilightPolygon(drawCmd_p, coOrd *, int); #define BOX_INVERT (3) #define BOX_ARROW (4) #define BOX_BACKGROUND (5) +#define BOX_ARROW_BACKGROUND (6) +#define BOX_BOX_BACKGROUND (7) void DrawBoxedString(int, drawCmd_p, coOrd, char *, wFont_p, wFontSize_t, wDrawColor, ANGLE_T); void DrawMultiLineTextSize(drawCmd_p dp, char * text, wFont_p fp, @@ -229,6 +237,9 @@ void DrawTextSize(drawCmd_p, char *, wFont_p, wFontSize_t, BOOL_T, coOrd *); void DrawMultiString(drawCmd_p d, coOrd pos, char * text, wFont_p fp, wFontSize_t fs, wDrawColor color, ANGLE_T a, coOrd * lo, coOrd * hi, BOOL_T boxed); +void TranslateBackground(drawCmd_p drawP, POS_T origX, POS_T origY, + wWinPix_t* posX, + wWinPix_t* posY, wWinPix_t* pWidth); BOOL_T SetRoomSize(coOrd); void GetRoomSize(coOrd *); void DoRedraw(void); @@ -240,12 +251,11 @@ void DrawRuler(drawCmd_p, coOrd, coOrd, DIST_T, int, int, wDrawColor); void MainProc(wWin_p, winProcEvent, void *, void *); void InitInfoBar(void); void DrawInit(int); -void DoZoomUp(void *); -void DoZoomDown(void *); -void DoZoomExtents( void *); -void DoZoom(DIST_T *); -void PanHere(void *); -void PanMenuEnter(int); +void DoZoomUp(void * modeVP); +void DoZoomDown(void * modeVP); +void DoZoomExtents( void * modeVP); +void PanHere(void * modeVP); +void PanMenuEnter(void * modeVP); void InitCmdZoom(wMenu_p, wMenu_p, wMenu_p, wMenu_p); @@ -253,7 +263,7 @@ void InfoPos(coOrd); void InfoCount(wIndex_t); void SetMessage(char *); -wIndex_t panCmdInx; +extern wIndex_t panCmdInx; void InfoSubstituteControls(wControl_p *, char * *); @@ -265,10 +275,10 @@ STATUS_T GridAction(wAction_t, coOrd, coOrd *, DIST_T *); void ResetMouseState(void); void FakeDownMouseState(void); -void GetMousePosition(int *x, int *y); +void GetMousePosition(wDrawPix_t *x, wDrawPix_t *y); void RecordMouse(char *, wAction_t, POS_T, POS_T); extern long playbackDelay; -void MovePlaybackCursor(drawCmd_p, wPos_t, wPos_t, wBool_t, wControl_p); +void MovePlaybackCursor(drawCmd_p, coOrd pos, wBool_t, wControl_p); typedef void (*playbackProc)(wAction_t, coOrd); void PlaybackMouse(playbackProc, drawCmd_p, wAction_t, coOrd, wDrawColor); void RedrawPlaybackCursor(); diff --git a/app/bin/drawgeom.c b/app/bin/drawgeom.c index d23031f..f249ff0 100644 --- a/app/bin/drawgeom.c +++ b/app/bin/drawgeom.c @@ -17,21 +17,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> -#include <stdarg.h> -#include <string.h> - #include "ccurve.h" #include "cbezier.h" #include "compound.h" #include "cundo.h" #include "drawgeom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" static long drawGeomCurveMode; @@ -81,14 +75,15 @@ static void EndPoly( drawContext_t * context, int cnt, wBool_t open) -static void DrawGeomOk( void ) +static void DrawGeomOk( BOOL_T started ) { track_p trk; int inx; if (tempSegs_da.cnt <= 0) return; - UndoStart( _("Create Lines"), "newDraw" ); + if (!started) + UndoStart( _("Create Lines"), "newDraw" ); for ( inx=0; inx<tempSegs_da.cnt; inx++ ) { trk = MakeDrawFromSeg( zero, 0.0, &tempSegs(inx) ); DrawNewTrack( trk ); @@ -150,7 +145,7 @@ static void CreateSquareAnchor(coOrd p) { BOOL_T FindTempNear(drawContext_t *context, coOrd *p) { if (context->State == 2) { - if (context->Op >= OP_CURVE1 && context->Op <= OP_CURVE4) { + if ((context->Op >= OP_CURVE1) && (context->Op <= OP_CURVE4)) { if (context->ArcData.type == curveTypeCurve) { ANGLE_T a = FindAngle(context->ArcData.curvePos,*p); if (IsClose(FindDistance(context->ArcData.curvePos,*p)-context->ArcData.curveRadius) && @@ -162,7 +157,7 @@ BOOL_T FindTempNear(drawContext_t *context, coOrd *p) { if (IsClose(LineDistance(p,tempSegs(0).u.l.pos[0],tempSegs(0).u.l.pos[1]))) return TRUE; } - } else if ( context->Op >=OP_LINE && context->Op <= OP_BENCH) { + } else if ( (context->Op >=OP_LINE) && (context->Op <= OP_BENCH)) { if (IsClose(LineDistance(p,tempSegs(0).u.l.pos[0],tempSegs(0).u.l.pos[1]))) return TRUE; } @@ -190,8 +185,8 @@ STATUS_T DrawGeomMouse( drawContext_t *context) { static int lastValid = FALSE; - static wBool_t lock; - static coOrd pos0, pos0x, pos1, lastPos; + static BOOL_T locked; + static coOrd pos0, pos0x, pos1, lastPos, movePos; trkSeg_p segPtr; pts_t *pts; int inx; @@ -275,6 +270,7 @@ STATUS_T DrawGeomMouse( default: break; } + context->Changed = TRUE; //Update made MainRedraw(); anchors_da.cnt = 0; return C_CONTINUE; @@ -286,41 +282,67 @@ STATUS_T DrawGeomMouse( CleanSegs(&tempSegs_da); DYNARR_RESET( trkSeg_t, tempSegs_da ); DYNARR_RESET( trkSeg_t, anchors_da ); - lock = FALSE; + locked = FALSE; if (!magneticSnap) - InfoMessage(_("+Shift to lock to nearby objects")); + InfoMessage(_("+Alt for Magnetic Snap")); else - InfoMessage(_("+Shift to not lock to nearby objects")); + InfoMessage(_("+Alt to inhibit Magnetic Snap")); + wSetCursor(mainD.d,defaultCursor); + movePos = zero; + context->UndoStarted = FALSE; return C_CONTINUE; case wActionMove: - if (context->State == 0 || context->State ==2 ) { + locked = FALSE; + wSetCursor(mainD.d,defaultCursor); + if ((context->State == 0 && + context->Op != OP_FILLCIRCLE2 && context->Op != OP_CIRCLE2) || + context->State ==2 || + (context->State == 1 && + (context->Op == OP_POLY || context->Op == OP_FILLPOLY || context->Op == OP_POLYLINE))) { DYNARR_RESET( trkSeg_t, anchors_da ); - switch (context->Op) { //Snap pos to nearest line if this is end and just shift is depressed for lines and some curves + wSetCursor(mainD.d,defaultCursor); + switch (context->Op) { //Snap pos to nearest line for lines and some curves case OP_CURVE1: case OP_CURVE2: case OP_CURVE3: case OP_CURVE4: + case OP_CIRCLE2: + case OP_CIRCLE3: + case OP_FILLCIRCLE2: + case OP_FILLCIRCLE3: case OP_LINE: case OP_DIMLINE: case OP_BENCH: + case OP_TBLEDGE: + case OP_BOX: + case OP_FILLBOX: case OP_POLY: case OP_FILLPOLY: - case OP_POLYLINE: - if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap ) { + case OP_POLYLINE:; + if (((MyGetKeyState() & WKEY_ALT)==0) == magneticSnap ) { coOrd p = pos; track_p t; - if ((t=OnTrack(&p,FALSE,FALSE))!=NULL) { + if (((t=OnTrack(&p,FALSE,FALSE))!=NULL) && (IsClose(FindDistance(p,pos))) ) { if (context->Op == OP_DIMLINE ) { CreateEndAnchor(p,FALSE); - } else if (!IsTrack(t)) CreateEndAnchor(p,FALSE); - } else { - p = pos; - if (FindTempNear(context,&p)) { + wSetCursor(mainD.d,wCursorNone); + movePos = p; + locked = TRUE; + } else if (!IsTrack(t)) { CreateEndAnchor(p,FALSE); + wSetCursor(mainD.d,wCursorNone); + movePos = p; + locked = TRUE; } } } + if (!locked && SnapPos(&pos)) { + CreateEndAnchor(pos,FALSE); + wSetCursor(mainD.d,wCursorNone); + movePos = pos; + locked = TRUE; + } break; default: ; @@ -328,18 +350,22 @@ STATUS_T DrawGeomMouse( } return C_CONTINUE; + case wActionRDown: case wActionLDown: DYNARR_RESET( trkSeg_t, anchors_da ); + wSetCursor(mainD.d,defaultCursor); if (context->State == 2) { tempSegs_da.cnt = segCnt; if ((context->Op == OP_POLY || context->Op == OP_FILLPOLY || context->Op == OP_POLYLINE)) { EndPoly(context, segCnt, context->Op==OP_POLYLINE); } else { - DrawGeomOk(); + DrawGeomOk(TRUE); } + context->UndoStarted = FALSE; segCnt = 0; anchors_da.cnt = 0; context->State = 0; + TryCheckPoint(); } context->Started = TRUE; line_angle = 90.0; @@ -347,22 +373,15 @@ STATUS_T DrawGeomMouse( (context->Op == OP_CURVE2 && context->State == 0) || (context->Op == OP_CURVE3 && context->State != 0) || (context->Op == OP_CURVE4 && context->State != 2) || + (context->Op == OP_CIRCLE2 && context->State != 0) || + (context->Op == OP_CIRCLE3 && context->State == 0) || + (context->Op == OP_FILLCIRCLE2 && context->State != 0) || + (context->Op == OP_FILLCIRCLE3 && context->State == 0) || (context->Op == OP_LINE) || (context->Op == OP_DIMLINE) || - (context->Op == OP_BENCH) ) { - BOOL_T found = FALSE; - if (((MyGetKeyState() & WKEY_ALT) ==0) == magneticSnap ) { - coOrd p = pos; - track_p t; - if ((t=OnTrack(&p,FALSE,FALSE))!=NULL) { - if (!IsTrack(t)) { - EPINX_T ep1,ep2; - line_angle = GetAngleAtPoint(t,pos,&ep1,&ep2); - pos = p; - found = TRUE; - } - } - } - if (!found) SnapPos( &pos ); + (context->Op == OP_BENCH) || (context->Op == OP_TBLEDGE) || + (context->Op == OP_BOX) || (context->Op == OP_FILLBOX) || + (context->Op == OP_POLY) || (context->Op == OP_POLYLINE) || (context->Op == OP_FILLPOLY) ) { + if (locked) pos = movePos; } if ((context->Op == OP_CURVE1 || context->Op == OP_CURVE2 || context->Op == OP_CURVE3 || context->Op == OP_CURVE4) && context->State == 1) { ; @@ -390,7 +409,7 @@ STATUS_T DrawGeomMouse( tempSegs(0).u.l.option = 0; } tempSegs_da.cnt = 0; - context->message( _("Drag to next point, +Shift to lock to object, +Ctrl to lock to 90deg") ); + context->message( _("Drag next point, +Alt reverse Magnetic Snap or +Ctrl lock to 90 deg") ); break; case OP_TBLEDGE: OnTableEdgeEndPt( NULL, &pos ); @@ -399,8 +418,9 @@ STATUS_T DrawGeomMouse( tempSegs(0).color = context->Color; tempSegs(0).width = (mainD.scale<=16)?(3/context->D->dpi*context->D->scale):0; tempSegs(0).u.l.pos[0] = tempSegs(0).u.l.pos[1] = pos; + tempSegs(0).u.l.option = 0; tempSegs_da.cnt = 0; - context->message( _("Drag to place next end point") ); + context->message( _("Drag next point, +Alt reverse Magnetic Snap, or +Ctrl to lock to 90 degrees") ); break; case OP_CURVE1: case OP_CURVE2: case OP_CURVE3: case OP_CURVE4: if (context->State == 0) { @@ -432,6 +452,7 @@ STATUS_T DrawGeomMouse( tempSegs(0).u.c.radius = 0; tempSegs(0).u.c.center = pos; context->message( _("Drag to set radius") ); + context->State = 1; break; case OP_FILLBOX: width = 0; @@ -485,36 +506,59 @@ STATUS_T DrawGeomMouse( segPtr->u.l.pos[1] = pos; context->State = 1; segCnt = tempSegs_da.cnt; - context->message(_("+Shift - lock to close object, +Ctrl - lock to 90 deg")); + context->message(_("+Alt - reverse Magnetic Snap or +Ctrl - lock to 90 deg")); break; } return C_CONTINUE; + case wActionRDrag: case wActionLDrag: DYNARR_RESET(trkSeg_t, anchors_da ); + coOrd p = pos1 = pos; + BOOL_T locked = FALSE, poslocked = FALSE; if ((context->Op == OP_CURVE1 && context->State == 1) || (context->Op == OP_CURVE2 && context->State == 0) || - (context->Op == OP_CURVE4 && context->State != 2) || - (context->Op == OP_LINE) || - (context->Op == OP_BENCH) ) { - if (( (MyGetKeyState() & WKEY_ALT)==0) == magneticSnap) { - if (OnTrack( &pos, FALSE, FALSE )!=NULL) - CreateEndAnchor(pos,TRUE); - } - } else if (context->Op == OP_DIMLINE) { - if (OnTrack( &pos, FALSE, FALSE )!=NULL) CreateEndAnchor(pos,TRUE); - } + (context->Op == OP_CURVE4 && context->State != 1) || + (context->Op == OP_CIRCLE2 && context->State != 0) || + (context->Op == OP_CIRCLE3 && context->State == 0) || + (context->Op == OP_FILLCIRCLE2 && context->State != 0) || + (context->Op == OP_FILLCIRCLE3 && context->State == 0) || + (context->Op == OP_BOX ) || + (context->Op == OP_FILLBOX ) || + (context->Op == OP_DIMLINE ) || (context->Op == OP_TBLEDGE) || + (context->Op == OP_LINE ) || (context->Op == OP_BENCH) || + (context->Op == OP_POLY) || (context->Op == OP_POLYLINE) || (context->Op == OP_FILLPOLY) ) { + if ( ( (MyGetKeyState() & WKEY_ALT)==0) == magneticSnap) { + p = pos; + if ((OnTrack( &p, FALSE, FALSE )!=NULL) && (IsClose(FindDistance(p,pos)))) { + poslocked = TRUE; + pos1 = p; - pos1 = pos; + } + } + if (!poslocked) { //Set up poslock and pos1 for later + p = pos; + if (SnapPos(&p)) { + poslocked = TRUE; + pos1 = p; + } + } + } switch (context->Op) { case OP_TBLEDGE: - OnTableEdgeEndPt( NULL, &pos1 ); + if ((MyGetKeyState() & WKEY_CTRL) == WKEY_CTRL) { //If +Ctrl, snap to table edge end + p = pos; + if (OnTableEdgeEndPt( NULL, &p )) { + locked = TRUE; + pos1 = p; + } + } /* no break */ case OP_LINE: case OP_DIMLINE: case OP_BENCH: - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) { + if (!locked && ((MyGetKeyState() & WKEY_CTRL) == WKEY_CTRL )) { //If not found already +Ctl = Right Angle //Snap to Right-Angle from previous or from 0 DIST_T l = FindDistance(pos0, pos); ANGLE_T angle2 = NormalizeAngle(FindAngle(pos0, pos)-line_angle); @@ -537,12 +581,12 @@ STATUS_T DrawGeomMouse( FormatDistance(FindDistance( pos0, pos1 )), PutAngle(FindAngle( pos0, pos1 )) ); tempSegs_da.cnt = 1; - if (anchors_da.cnt == 0) CreateEndAnchor(pos, FALSE); + if (anchors_da.cnt == 0) CreateEndAnchor(pos1, FALSE); break; case OP_POLY: case OP_FILLPOLY: case OP_POLYLINE: - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) { + if ((MyGetKeyState() & WKEY_CTRL) == WKEY_CTRL ) { coOrd last_point = zero; ANGLE_T last_angle, initial_angle; if (tempSegs_da.cnt == 1) { @@ -571,22 +615,23 @@ STATUS_T DrawGeomMouse( } CreateEndAnchor(pos,TRUE); if (FindDistance(pos,last_point)>0.0) CreateLineAnchor(pos,last_point); - } - //If there is any point on this line that will give a 90 degree return to the first point, show it - if (tempSegs_da.cnt > 1) { - coOrd intersect; - ANGLE_T an_this = FindAngle(tempSegs(tempSegs_da.cnt-2).u.l.pos[1],pos); - if (FindIntersection(&intersect,tempSegs(0).u.l.pos[0],an_this+90.0,tempSegs(tempSegs_da.cnt-2).u.l.pos[1],an_this)) { - ANGLE_T an_inter = FindAngle(tempSegs(tempSegs_da.cnt-2).u.l.pos[1],intersect); - if (fabs(DifferenceBetweenAngles(an_inter,an_this))<90.0) { - CreateSquareAnchor(intersect); - d = FindDistance(intersect,pos); - if (IsClose(d)) { - pos = intersect; + //If there is any point on this line that will give a 90 degree return to the first point, show it + if (tempSegs_da.cnt > 1) { + coOrd intersect; + ANGLE_T an_this = FindAngle(tempSegs(tempSegs_da.cnt-2).u.l.pos[1],pos); + if (FindIntersection(&intersect,tempSegs(0).u.l.pos[0],an_this+90.0,tempSegs(tempSegs_da.cnt-2).u.l.pos[1],an_this)) { + ANGLE_T an_inter = FindAngle(tempSegs(tempSegs_da.cnt-2).u.l.pos[1],intersect); + if (fabs(DifferenceBetweenAngles(an_inter,an_this))<90.0) { + CreateSquareAnchor(intersect); + d = FindDistance(intersect,pos); + if (IsClose(d)) { + pos = intersect; + } } } } - } + } else if (poslocked) pos = pos1; + tempSegs(tempSegs_da.cnt-1).type = SEG_STRLIN; tempSegs(tempSegs_da.cnt-1).u.l.pos[1] = pos; context->message( _("Length = %s, Angle = %0.2f"), @@ -596,10 +641,10 @@ STATUS_T DrawGeomMouse( break; case OP_CURVE1: case OP_CURVE2: case OP_CURVE3: case OP_CURVE4: if (context->State == 0) { - pos0x = pos; + pos0x = pos1; CreateCurve( C_MOVE, pos, FALSE, context->Color, width, drawGeomCurveMode, &anchors_da, context->message ); } else { - PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE ); + PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE, 0.0 ); tempSegs(0).color = context->Color; tempSegs(0).width = width; DYNARR_SET(trkSeg_t,tempSegs_da,1); @@ -636,7 +681,7 @@ STATUS_T DrawGeomMouse( FormatDistance(context->ArcData.curveRadius), context->ArcData.a1, FormatDistance(context->ArcData.curveRadius*d) ); if (context->Op == OP_CURVE1 || context->Op == OP_CURVE4 ) - DrawArrowHeadsArray(&anchors_da,pos,FindAngle(context->ArcData.curvePos,pos),TRUE,wDrawColorRed); + DrawArrowHeadsArray(&anchors_da,pos1,FindAngle(context->ArcData.curvePos,pos),TRUE,wDrawColorRed); else if (context->Op == OP_CURVE2 || context->Op == OP_CURVE3 ) { CreateEndAnchor(context->ArcData.pos2,FALSE); DrawArrowHeadsArray(&anchors_da,context->ArcData.pos2,FindAngle(context->ArcData.curvePos,context->ArcData.pos2)+90,TRUE,wDrawColorRed); @@ -652,9 +697,16 @@ STATUS_T DrawGeomMouse( case OP_CIRCLE2: case OP_FILLCIRCLE2: tempSegs(0).u.c.center = pos1; - /* no break */ + if (context->State == 1 && locked) CreateEndAnchor(pos1, FALSE); + else wSetCursor(mainD.d,defaultCursor); + tempSegs(0).u.c.radius = FindDistance( pos0, pos1 ); + context->message( _("Radius = %s"), + FormatDistance(FindDistance( pos0, pos1 )) ); + break; case OP_CIRCLE3: case OP_FILLCIRCLE3: + if (context->State == 1) CreateEndAnchor(pos0, TRUE); + wSetCursor(mainD.d,defaultCursor); tempSegs(0).u.c.radius = FindDistance( pos0, pos1 ); context->message( _("Radius = %s"), FormatDistance(FindDistance( pos0, pos1 )) ); @@ -663,55 +715,51 @@ STATUS_T DrawGeomMouse( case OP_FILLBOX: tempSegs_da.cnt = 4; tempSegs(0).u.l.pos[1].x = tempSegs(1).u.l.pos[0].x = - tempSegs(1).u.l.pos[1].x = tempSegs(2).u.l.pos[0].x = pos.x; + tempSegs(1).u.l.pos[1].x = tempSegs(2).u.l.pos[0].x = pos1.x; tempSegs(1).u.l.pos[1].y = tempSegs(2).u.l.pos[0].y = - tempSegs(2).u.l.pos[1].y = tempSegs(3).u.l.pos[0].y = pos.y; + tempSegs(2).u.l.pos[1].y = tempSegs(3).u.l.pos[0].y = pos1.y; + if (locked) CreateEndAnchor(pos1,FALSE); context->message( _("Width = %s, Height = %s"), FormatDistance(fabs(pos1.x - pos0.x)), FormatDistance(fabs(pos1.y - pos0.y)) ); break; } + wSetCursor(mainD.d,wCursorNone); return C_CONTINUE; case wActionLUp: + case wActionRUp: lastValid = FALSE; createTrack = FALSE; - if ((context->Op == OP_CURVE1 && context->State == 1) || - (context->Op == OP_CURVE2 && context->State == 0) || - (context->Op == OP_CURVE3 && context->State != 0) || - (context->Op == OP_CURVE4 && context->State != 2) || - (context->Op == OP_LINE) || (context->Op == OP_DIMLINE) || - (context->Op == OP_BENCH) ) { - if (((MyGetKeyState() & WKEY_ALT)==0) == magneticSnap ) { - coOrd p = pos1; - track_p t; - if ((t=OnTrack(&p,FALSE,FALSE))) { - pos1 = p; - if (context->Op == OP_LINE || context->Op == OP_DIMLINE || context->Op == OP_BENCH) { - tempSegs(0).u.l.pos[1] = p; - } else { - PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE ); - if (context->ArcData.type == curveTypeStraight) { - DYNARR_RESET(trkSeg_t,tempSegs_da); - DYNARR_APPEND(trkSeg_t,tempSegs_da,1); - tempSegs(0).type = SEG_STRLIN; - tempSegs(0).u.l.pos[0] = pos0; - tempSegs(0).u.l.pos[1] = context->ArcData.pos1; - tempSegs_da.cnt = 1; - } else if (context->ArcData.type == curveTypeNone) { - DYNARR_RESET(trkSeg_t,tempSegs_da); - } else if (context->ArcData.type == curveTypeCurve) { - DYNARR_RESET(trkSeg_t,tempSegs_da); - DYNARR_APPEND(trkSeg_t,tempSegs_da,1); - tempSegs(0).type = SEG_CRVLIN; - tempSegs(0).u.c.center = context->ArcData.curvePos; - tempSegs(0).u.c.radius = context->ArcData.curveRadius; - tempSegs(0).u.c.a0 = context->ArcData.a0; - tempSegs(0).u.c.a1 = context->ArcData.a1; - tempSegs_da.cnt = 1; - } - } - - } + //Note - pos1 is last drag point + wSetCursor(mainD.d,defaultCursor); + if ((context->Op == OP_POLY) || (context->Op == OP_POLYLINE) || (context->Op == OP_FILLPOLY ) + || (context->Op == OP_BOX) || (context->Op == OP_FILLBOX) ){ ; + } else if (context->Op == OP_LINE || context->Op == OP_DIMLINE || + context->Op == OP_BENCH || context->Op == OP_TBLEDGE ) { + tempSegs(0).u.l.pos[1] = pos1; + } else if ((context->Op>=OP_FILLCIRCLE1 && context->Op<=OP_FILLCIRCLE3) || + (context->Op>=OP_CIRCLE1 && context->Op<=OP_CIRCLE3)) { + ; + } else { + PlotCurve( drawGeomCurveMode, pos0, pos0x, pos1, &context->ArcData, FALSE, 0.0 ); + if (context->ArcData.type == curveTypeStraight) { + DYNARR_RESET(trkSeg_t,tempSegs_da); + DYNARR_APPEND(trkSeg_t,tempSegs_da,1); + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = pos0; + tempSegs(0).u.l.pos[1] = context->ArcData.pos1; + tempSegs_da.cnt = 1; + } else if (context->ArcData.type == curveTypeNone) { + DYNARR_RESET(trkSeg_t,tempSegs_da); + } else if (context->ArcData.type == curveTypeCurve) { + DYNARR_RESET(trkSeg_t,tempSegs_da); + DYNARR_APPEND(trkSeg_t,tempSegs_da,1); + tempSegs(0).type = SEG_CRVLIN; + tempSegs(0).u.c.center = context->ArcData.curvePos; + tempSegs(0).u.c.radius = context->ArcData.curveRadius; + tempSegs(0).u.c.a0 = context->ArcData.a0; + tempSegs(0).u.c.a1 = context->ArcData.a1; + tempSegs_da.cnt = 1; } } switch ( context->Op ) { @@ -733,6 +781,7 @@ STATUS_T DrawGeomMouse( pos0x = pos1; CreateCurve( C_UP, pos, FALSE, context->Color, width, drawGeomCurveMode, &anchors_da, context->message ); context->message( _("Drag on Red arrows to adjust curve") ); + context->show = FALSE; return C_CONTINUE; } else { DYNARR_SET(trkSeg_t,tempSegs_da,1); @@ -761,8 +810,15 @@ STATUS_T DrawGeomMouse( lastValid = TRUE; lastPos = pos1; context->State = 2; + if (context->Op == OP_CURVE1 || context->Op == OP_CURVE4 ) + DrawArrowHeadsArray(&anchors_da,pos1,FindAngle(context->ArcData.curvePos,pos),TRUE,wDrawColorRed); + else if (context->Op == OP_CURVE2 || context->Op == OP_CURVE3 ) { + CreateEndAnchor(context->ArcData.pos2,FALSE); + DrawArrowHeadsArray(&anchors_da,context->ArcData.pos2,FindAngle(context->ArcData.curvePos,context->ArcData.pos2)+90,TRUE,wDrawColorRed); + } + CreateEndAnchor(context->ArcData.curvePos,TRUE); /*drawContext = context; - DrawGeomOp( (void*)context->Op );*/ + DrawGeomOp( I2VP(context->Op) );*/ } break; case OP_CIRCLE1: @@ -792,7 +848,7 @@ STATUS_T DrawGeomMouse( tempSegs(0).u.p.polyType = RECTANGLE; tempSegs_da.cnt = 1; /*drawContext = context; - DrawGeomOp( (void*)context->Op );*/ + DrawGeomOp( I2VP(context->Op) );*/ context->length = FindDistance(pts[0].pt,pts[1].pt); context->width = FindDistance(pts[3].pt,pts[0].pt); context->State = 2; @@ -842,13 +898,14 @@ STATUS_T DrawGeomMouse( return C_CONTINUE; } context->Started = FALSE; - context->Changed = TRUE; //Update screen shown /*CheckOk();*/ if (context->State == 2 && IsCurCommandSticky()) { segCnt = tempSegs_da.cnt; + UndoStart("Create Lines","Sticky Draw"); + context->UndoStarted = TRUE; return C_CONTINUE; } - DrawGeomOk(); + DrawGeomOk(FALSE); context->State = 0; context->Changed = FALSE; context->message(""); @@ -856,8 +913,10 @@ STATUS_T DrawGeomMouse( case wActionText: DYNARR_RESET(trkSeg_t, anchors_da ); - if ( ((action>>8)&0xFF) == 0x0D || - ((action>>8)&0xFF) == ' ' ) { + int key = (action>>8&0xFF); + if ( key == 0x0D || + key == ' ' || + (key == 0x09 && ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) != WKEY_SHIFT))) { //Tab continue if ((context->Op == OP_POLY) || (context->Op == OP_FILLPOLY) || (context->Op == OP_POLYLINE)) { tempSegs_da.cnt = segCnt; //If last segment wasn't just a point, add another starting on its end @@ -872,22 +931,32 @@ STATUS_T DrawGeomMouse( DYNARR_RESET(pts_t, points_da); DYNARR_RESET(trkSeg_t,tempSegs_da); } else { - if (context->State == 2) + if (context->State == 2) { tempSegs_da.cnt = segCnt; - DrawGeomOk(); + DrawGeomOk(context->UndoStarted); + context->UndoStarted = FALSE; + + } } + context->State = 0; + segCnt = 0; + if (key == 0x0D) return C_CONTINUE; //Esc - go to Reset + else return C_TERMINATE; //Space/Enter/Tab - end command + } else if (key == 0x09 && ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_SHIFT)) { //Tab plus shift - abandon + context->State = 0; + segCnt = 0; + return C_TERMINATE; } - context->State = 0; - segCnt = 0; - return C_TERMINATE; + return C_CONTINUE; - case C_CANCEL: - if (context->Changed) { //If the update values were shown - if (context->State == 2) { - tempSegs_da.cnt = segCnt; - DrawGeomOk(); - } + case C_CONFIRM: + if (context->State==2 && IsCurCommandSticky()) { + DrawGeomOk(context->UndoStarted); } + context->Changed = FALSE; + return C_CONTINUE; + + case C_CANCEL: DYNARR_RESET(trkSeg_t, anchors_da ); tempSegs_da.cnt = 0; context->message( "" ); @@ -949,12 +1018,14 @@ void static CreateLineAnchors(int index, coOrd p0, coOrd p1) { anchors(1).color = wDrawColorBlue; anchors(1).u.c.radius = d/2; anchors(1).u.c.center = p1; + if (index>=0) wSetCursor(mainD.d,wCursorNone); } void static CreateBoxAnchors(int index, pts_t pt[4]) { DYNARR_RESET(trkSeg_t,anchors_da); double d = tempD.scale*0.15; ANGLE_T a = FindAngle(pt[0].pt,pt[1].pt); ANGLE_T diag = FindAngle(pt[0].pt,pt[2].pt); + if (index>=0) wSetCursor(mainD.d,wCursorNone); for (int i=0;i<4;i++) { DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pt[i].pt,(diag>a?45.0:-45.0)+a+(90.0*(i)),TRUE,i==index?wDrawColorRed:wDrawColorBlue); @@ -979,7 +1050,7 @@ void static CreateOriginAnchor(coOrd origin, wBool_t trans_selected) { anchors(i).type = SEG_STRLIN; anchors(i).u.l.pos[0] = p0; anchors(i).u.l.pos[1] = p1; - anchors(i).color = wDrawColorBlue; + anchors(i).color = trans_selected?wDrawColorAqua:wDrawColorBlue; anchors(i).width = 0; DYNARR_APPEND(trkSeg_t,anchors_da,1); Translate(&p0,origin,90,d*4); @@ -990,6 +1061,7 @@ void static CreateOriginAnchor(coOrd origin, wBool_t trans_selected) { anchors(i).u.l.pos[1] = p1; anchors(i).color = wDrawColorBlue; anchors(i).width = 0; + if (trans_selected) wSetCursor(mainD.d,wCursorNone); } void static CreateCurveAnchors(int index, coOrd pm, coOrd pc, coOrd p0, coOrd p1) { @@ -1011,6 +1083,8 @@ void static CreateCurveAnchors(int index, coOrd pm, coOrd pc, coOrd p0, coOrd p1 anchors(1).width = 0; DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pm,FindAngle(pm,pc),TRUE,index==2?wDrawColorAqua:wDrawColorBlue); + if (index>=0) wSetCursor(mainD.d,wCursorNone); + else wSetCursor(mainD.d,defaultCursor); } void static CreatePolyAnchors(int index) { @@ -1065,6 +1139,7 @@ void CreateMovingAnchor(coOrd pos,BOOL_T fill) { anchors(inx).color = wDrawColorBlue; anchors(inx).u.c.radius = d/4; anchors(inx).u.c.center = pos; + wSetCursor(mainD.d,wCursorNone); } /* @@ -1142,9 +1217,10 @@ STATUS_T DrawGeomPolyModify( return C_CONTINUE; } } + wSetCursor(mainD.d,defaultCursor); int pInx=0; coOrd pm0,pm1; - DIST_T dm = 10000.0; + DIST_T dm = DIST_INF; for ( int inx=0; inx<points_da.cnt; inx++ ) { pm0 = pos; DIST_T ddm = LineDistance( &pm0, points( inx==0?points_da.cnt-1:inx-1).pt, points(inx).pt ); @@ -1169,7 +1245,7 @@ STATUS_T DrawGeomPolyModify( return C_CONTINUE; break; case C_DOWN: - d = 10000.0; + d = DIST_INF; polyInx = -1; coOrd p0; double dd; @@ -1329,7 +1405,7 @@ STATUS_T DrawGeomPolyModify( next_inx = first_inx+1; } //Lock to 90 degrees first/last point - if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_SHIFT ) { + if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_CTRL ) { ANGLE_T last_angle,next_angle; coOrd last_point,next_point; if (first_inx == 0) { @@ -1388,7 +1464,7 @@ STATUS_T DrawGeomPolyModify( FormatDistance(FindDistance(pos_lock,last_point)), PutAngle(FindAngle(pos_lock,last_point))); - } + } else SnapPos(&pos); //If not using CTL and snap enabled } context->prev_inx = first_inx; coOrd diff; @@ -1463,24 +1539,24 @@ STATUS_T DrawGeomPolyModify( break; case C_TEXT: if (action>>8 == 'o') { //"o" -> origin mode - MenuMode(1); + MenuMode(I2VP(1)); InfoMessage("Move Origin Mode: Place Origin, p for Points, Enter or Esc"); return C_CONTINUE; } - if (((prev_inx>=0 && tempSegs(0).u.p.polyType != POLYLINE) || (prev_inx>=1 && prev_inx<=points_da.cnt-2)) && + if (((prev_inx>=0 && tempSegs(0).u.p.polyType != POLYLINE) || + ((tempSegs(0).u.p.polyType == POLYLINE) && (prev_inx>=1) && (prev_inx<=points_da.cnt-2)) ) && ((action>>8 == 's') || (action>>8 == 'v') || (action>>8 == 'r'))) { switch(action>>8) { case 's': points(context->prev_inx).pt_type = wPolyLineSmooth; - break; + return C_CONTINUE; case 'v': points(context->prev_inx).pt_type = wPolyLineStraight; - break; + return C_CONTINUE; case 'r': points(context->prev_inx).pt_type = wPolyLineRound; - break; - default: return C_CONTINUE; + default:; } } if ((action>>8 == 'g') && (tempSegs(0).type == SEG_POLY) && (tempSegs(0).u.p.polyType == POLYLINE) ) { @@ -1499,14 +1575,18 @@ STATUS_T DrawGeomPolyModify( } if ((action>>8 == 'f') && (tempSegs(0).type == SEG_POLY) && (tempSegs(0).u.p.polyType != POLYLINE )) { tempSegs(0).type = SEG_FILPOLY; + tempSegs(0).u.p.polyType = FREEFORM; context->type = SEG_FILPOLY; + context->subtype=FREEFORM; context->filled = TRUE; CreatePolyAnchors( -1); return C_CONTINUE; } if ((action>>8 == 'u') && (tempSegs(0).type == SEG_FILPOLY) ) { tempSegs(0).type = SEG_POLY; + tempSegs(0).u.p.polyType = FREEFORM; context->type = SEG_POLY; + context->subtype=FREEFORM; context->filled = FALSE; CreatePolyAnchors( -1); return C_CONTINUE; @@ -1532,6 +1612,8 @@ STATUS_T DrawGeomPolyModify( selected_count=0; tempSegs(0).u.p.cnt = points_da.cnt; context->max_inx = points_da.cnt-1; + } else { + ErrorMessage( MSG_POLY_NOTHING_SELECTED ); } prev_inx = -1; context->prev_inx = -1; @@ -1541,15 +1623,35 @@ STATUS_T DrawGeomPolyModify( InfoMessage(_("Point Deleted")); return C_CONTINUE; } - if (action>>8 != 32 && action>>8 != 13) return C_CONTINUE; + if (action>>8 != 32 && action>>8 != 13 && action>>8 !=9) return C_CONTINUE; + if (action>>8 == 9 && (MyGetKeyState() & WKEY_SHIFT) != 0) return C_TERMINATE; /* no break */ + case C_CONFIRM: + case C_OK: case C_FINISH: //copy changes back into track - if (polyState != POLY_SELECTED) return C_TERMINATE; + if (polyState != POLY_SELECTED) { + polyState = POLY_NONE; + DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t,tempSegs_da); + return C_TERMINATE; + } + //If ends overlap precisely remove last segment and close if >3 points + DIST_T dist = FindDistance(points(0).pt,points(points_da.cnt-1).pt); + if (IsClose(dist*4) && points_da.cnt>3 && tempSegs(0).u.p.polyType == POLYLINE) { + tempSegs(0).u.p.polyType = FREEFORM; + context->subtype=FREEFORM; + context->open = FALSE; + points_da.cnt--; + select_da.cnt--; + selected_count=0; + tempSegs(0).u.p.cnt = points_da.cnt; + context->max_inx = points_da.cnt-1; + } pts_t * oldPts = context->segPtr[segInx].u.p.pts; void * newPts = (pts_t*)MyMalloc( points_da.cnt * sizeof (pts_t) ); context->segPtr[segInx].u.p.pts = newPts; - context->segPtr->u.p.cnt = points_da.cnt; + context->segPtr[segInx].u.p.cnt = points_da.cnt; context->orig = rotate_origin; context->angle = rotate_angle; for (int i=0; i<points_da.cnt; i++) { @@ -1561,12 +1663,12 @@ STATUS_T DrawGeomPolyModify( context->segPtr[segInx].u.p.pts[i].pt_type = points(i).pt_type; } MyFree(oldPts); - oldPts = NULL; polyState = POLY_NONE; DYNARR_RESET(trkSeg_t,anchors_da); + DYNARR_RESET(trkSeg_t,points_da); DYNARR_RESET(trkSeg_t,tempSegs_da); - DrawNewTrack( context->trk ); - return C_TERMINATE; + if ((action&0xFF)==C_CONFIRM) return C_CONTINUE; + else return C_TERMINATE; case C_REDRAW: if (polyState == POLY_NONE) return C_CONTINUE; DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt,trackGauge, wDrawColorBlack); @@ -1644,7 +1746,7 @@ STATUS_T DrawGeomOriginMove( return C_CONTINUE; break; case wActionMove: - CreateOriginAnchor(context->rot_center, TRUE); + CreateOriginAnchor(context->rot_center, FALSE); if ((tempSegs(0).type == SEG_POLY || tempSegs(0).type == SEG_FILPOLY) && (context->prev_inx>=0)) { CreateSelectedAnchor(points(context->prev_inx).pt); } @@ -1724,7 +1826,7 @@ STATUS_T DrawGeomOriginMove( } } if (action>>8 == 'p') { //"p" - points mode - MenuMode(0); + MenuMode(I2VP(0)); return C_CONTINUE; } context->rel_center = context->rot_center; @@ -1803,6 +1905,7 @@ STATUS_T DrawGeomModify( tempSegs(0).u.l.pos[1] = p1; tempSegs(0).width = 0; tempSegs_da.cnt = 1; + tempSegs(0).u.l.option = context->segPtr[segInx].u.l.option; context->p0 = p0; context->p1 = p1; CreateLineAnchors(-1,p0,p1); @@ -1861,6 +1964,7 @@ STATUS_T DrawGeomModify( if (context->rotate_state) return DrawGeomOriginMove(action,pos,context); if (polyMode) return DrawGeomPolyModify(action,pos,context); DYNARR_RESET(trkSeg_t,anchors_da); + wSetCursor(mainD.d,defaultCursor); switch( context->type) { case SEG_TBLEDGE: case SEG_STRLIN: @@ -1881,19 +1985,28 @@ STATUS_T DrawGeomModify( case SEG_CRVLIN: case SEG_FILCRCL: DYNARR_RESET(trkSeg_t,anchors_da); - if (tempSegs(0).u.c.a1 < 360.0) - CreateCurveAnchors(curveInx,context->pm,context->pc,context->p0,context->p1); - dd = FindDistance( context->p0, pos ); - if ( IsClose(dd)) { - CreateMovingAnchor(context->p0,TRUE); + if (tempSegs(0).u.c.a1 >= 360.0) { + if (IsClose(FindDistance(context->pc,pos)-context->radius)) { + coOrd p; + Translate(&p,context->pc,FindAngle(context->pc,pos),context->radius); + CreateMovingAnchor(p,TRUE); + DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); + DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),p,FindAngle(context->pc,pos),TRUE,wDrawColorBlue); + } } else { - dd = FindDistance( context->p1, pos ); + CreateCurveAnchors(curveInx,context->pm,context->pc,context->p0,context->p1); + dd = FindDistance( context->p0, pos ); if ( IsClose(dd)) { - CreateMovingAnchor(context->p1,TRUE); + CreateMovingAnchor(context->p0,TRUE); } else { - dd = FindDistance( context->pm, pos ); + dd = FindDistance( context->p1, pos ); if ( IsClose(dd)) { - CreateMovingAnchor(context->pm,TRUE); + CreateMovingAnchor(context->p1,TRUE); + } else { + dd = FindDistance( context->pm, pos ); + if ( IsClose(dd)) { + CreateMovingAnchor(context->pm,TRUE); + } } } } @@ -1916,8 +2029,6 @@ STATUS_T DrawGeomModify( tempSegs(0).color = context->segPtr[segInx].color; switch ( context->type ) { case SEG_TBLEDGE: - if ( MyGetKeyState() & WKEY_CTRL ) - OnTableEdgeEndPt( NULL, &pos ); case SEG_STRLIN: case SEG_DIMLIN: case SEG_BENCH: @@ -1936,7 +2047,10 @@ STATUS_T DrawGeomModify( if (lineInx < 0 ) { InfoMessage( _("Not close to end of line")); } else { - InfoMessage("End selected, drag to reposition"); + if (context->type == SEG_TBLEDGE) + InfoMessage("End selected, drag to move +Ctl to lock to other edge end, +Shift lock to line"); + else + InfoMessage("End selected, drag to reposition +Shift lock to line"); context->state = MOD_SELECTED_PT; } tempSegs(0).color = wDrawColorBlack; @@ -2005,6 +2119,7 @@ STATUS_T DrawGeomModify( case SEG_FILPOLY: d = 10000; polyInx = 0; + wSetCursor(mainD.d,wCursorNone); for ( inx=0; inx<4; inx++ ) { if (IsClose(FindDistance(pos,points(inx).pt))) { corner_mode = TRUE; @@ -2071,21 +2186,36 @@ STATUS_T DrawGeomModify( UndrawNewTrack( context->trk ); return C_CONTINUE; case C_MOVE: - if (context->rotate_state) return DrawGeomOriginMove(action,pos,context); + if (context->rotate_state) return DrawGeomOriginMove(action,pos,context); if (polyMode) return DrawGeomPolyModify(action,pos,context); if (context->state != MOD_SELECTED_PT) return C_CONTINUE; + BOOL_T locked = FALSE; switch (tempSegs(0).type) { + case SEG_TBLEDGE: + if ( (MyGetKeyState() & WKEY_CTRL) == WKEY_CTRL ) { //Special Snap to Table End Point if Ctrl + if (OnTableEdgeEndPt( NULL, &pos )) { + locked = TRUE; + } + } + /* No Break*/ case SEG_STRLIN: case SEG_DIMLIN: case SEG_BENCH: - case SEG_TBLEDGE: - if ( (MyGetKeyState() & WKEY_SHIFT) != 0) { - d = FindDistance( pos, tempSegs(0).u.l.pos[1-lineInx] ); - Translate( &pos, tempSegs(0).u.l.pos[1-lineInx], segA1, d ); - } else if ((MyGetKeyState() & (WKEY_SHIFT|WKEY_CTRL|WKEY_ALT)) == WKEY_SHIFT ) { - OnTrack( &pos, FALSE, FALSE ); - CreateEndAnchor(pos,TRUE); + if (!locked) { + if ((MyGetKeyState() & WKEY_SHIFT) != 0) { //Shift is on same line + d = FindDistance( pos, tempSegs(0).u.l.pos[1-lineInx] ); + Translate( &pos, tempSegs(0).u.l.pos[1-lineInx], segA1, d ); + locked = TRUE; + } else if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap ) { //M.S. Either on or Off + if (OnTrack( &pos, FALSE, FALSE )!=NULL) { + CreateEndAnchor(pos,TRUE); + locked = TRUE; + } + } + }; + if (!locked) { + if (SnapPos(&pos)) locked = TRUE; } break; default: @@ -2096,9 +2226,6 @@ STATUS_T DrawGeomModify( tempSegs_da.cnt = 1; switch (tempSegs(0).type) { case SEG_TBLEDGE: - if ( MyGetKeyState() & WKEY_CTRL ) - OnTableEdgeEndPt( NULL, &pos ); - /* no break */ case SEG_STRLIN: case SEG_DIMLIN: case SEG_BENCH: @@ -2120,6 +2247,7 @@ STATUS_T DrawGeomModify( } else { if (context->state != MOD_SELECTED_PT) return C_CONTINUE; if (curveInx < 0 || curveInx > 2) return C_CONTINUE; + wSetCursor(mainD.d,wCursorNone); p0 = context->p0; p1 = context->p1; pc = context->pc; @@ -2227,6 +2355,7 @@ STATUS_T DrawGeomModify( break; case SEG_POLY: case SEG_FILPOLY: + wSetCursor(mainD.d,wCursorNone); if (!corner_mode) { /* Constrain movement to be perpendicular */ d = FindDistance(start_pos, pos); @@ -2267,9 +2396,7 @@ STATUS_T DrawGeomModify( } return C_CONTINUE; case C_UP: - if (context->rotate_state) return DrawGeomOriginMove(action, pos, context); - if (polyMode) { int rc; rc = DrawGeomPolyModify(action,pos,context); @@ -2277,7 +2404,7 @@ STATUS_T DrawGeomModify( context->state = MOD_AFTER_PT; return rc; } - + wSetCursor(mainD.d,defaultCursor); if (segInx == -1) return C_CONTINUE; switch (tempSegs(0).type) { @@ -2428,22 +2555,36 @@ STATUS_T DrawGeomModify( } } break; + case wActionExtKey: + if ((((action>>8)&0xFF)== wAccelKey_Del) && polyMode) //Convert Del key to be BackSpace in PolyModify + return DrawGeomPolyModify(C_TEXT+((int)(127<<8)),pos,context); + break; case C_TEXT: if (context->rotate_state) DrawGeomOriginMove(action, pos, context); if (polyMode) return DrawGeomPolyModify(action,pos,context); if (action>>8 == 'o') { - MenuMode(1); + MenuMode(I2VP(1)); } if (action>>8 != 32 && action>>8 != 13) return C_CONTINUE; /* no break */ + case C_CONFIRM: + return C_CONTINUE; + /* no break*/ + case C_OK: case C_FINISH: + UndoStart("Modify Draw", "OK"); + UndoModify(context->trk); if (polyMode) { DrawGeomPolyModify(action,pos,context); context->segPtr[segInx].type = context->type; context->segPtr[segInx].u.p.polyType = context->subtype; + if (context->segPtr[segInx].type == SEG_FILPOLY) + context->segPtr[segInx].u.p.polyType = FREEFORM; //Ensure Filled is closed + context->state = MOD_NONE; + DrawNewTrack( context->trk ); return C_TERMINATE; } //copy changes back into track @@ -2496,8 +2637,6 @@ STATUS_T DrawGeomModify( context->rotate_state = FALSE; context->last_inx = -1; DYNARR_RESET(trkSeg_t,anchors_da); - DYNARR_RESET(trkSeg_t,tempSegs_da); - DrawNewTrack( context->trk ); return C_TERMINATE; case C_REDRAW: if (polyMode) return DrawGeomPolyModify(action,pos,context); @@ -2506,13 +2645,12 @@ STATUS_T DrawGeomModify( DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); break; case C_CANCEL: - case C_CONFIRM: - case C_TERMINATE: context->state = MOD_NONE; context->rotate_state = FALSE; context->rot_moved = FALSE; + polyMode = FALSE; DYNARR_RESET(trkSeg_t,anchors_da); - DYNARR_RESET(trkSeg_t,tempSegs_da); + DrawNewTrack( context->trk ); break; default: ; diff --git a/app/bin/drawgeom.h b/app/bin/drawgeom.h index 45814d7..19a982d 100644 --- a/app/bin/drawgeom.h +++ b/app/bin/drawgeom.h @@ -22,11 +22,9 @@ #ifndef HAVE_DRAWGEOM_H #define HAVE_DRAWGEOM_H -#include "ccurve.h" #include "common.h" -#include "draw.h" -#include "track.h" -#include "wlib.h" +#include "track.h" //- drawLineType_e PolyType_e +#include "ccurve.h" //- curveData_t #define OP_LINE (0) #define OP_DIMLINE (1) @@ -51,9 +49,9 @@ #define OP_LAST (OP_POLYLINE) typedef struct { - void (*message)( char *, ... ); + void (*message)( const char *, ... ); void (*Redraw)( void ); - drawCmd_t *D; + drawCmd_p D; long Op; wDrawColor Color; long line_Width; @@ -69,15 +67,17 @@ typedef struct { ANGLE_T ArcAngle; int Started; BOOL_T Changed; + BOOL_T show; + BOOL_T UndoStarted; } drawContext_t; typedef enum {MOD_NONE, MOD_STARTED, MOD_SELECTED_PT, MOD_AFTER_PT, MOD_ORIGIN, MOD_AFTER_ORIG } ModState_e; typedef struct { - void (*message)( char *, ... ); + void (*message)( const char *, ... ); void (*Redraw)( void ); - drawCmd_t *D; + drawCmd_p D; double length; ANGLE_T rel_angle; double radius; diff --git a/app/bin/dxfformat.c b/app/bin/dxfformat.c index 3b79c7e..3adc1b7 100644 --- a/app/bin/dxfformat.c +++ b/app/bin/dxfformat.c @@ -19,12 +19,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdarg.h> -#include <string.h> -#include <stdio.h> -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif #include <dynstring.h> #include "dxfformat.h" diff --git a/app/bin/dxfoutput.c b/app/bin/dxfoutput.c index 214f63c..957110e 100644 --- a/app/bin/dxfoutput.c +++ b/app/bin/dxfoutput.c @@ -20,19 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS - #include <io.h> - #include <windows.h> -#else - #include <errno.h> -#endif - #include <xtrkcad-config.h> -#include <locale.h> -#include <assert.h> #include <dynstring.h> @@ -40,11 +28,10 @@ #include "custom.h" #include "dxfformat.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "paths.h" #include "track.h" -#include "utility.h" +#include "draw.h" +#include "common-ui.h" static struct wFilSel_t * exportDXFFile_fs; @@ -131,22 +118,21 @@ static void DxfBitMap( { } -static void DxfFillPoly( +static void DxfPoly( drawCmd_p d, int cnt, coOrd * pts, int * types, wDrawColor color, wDrawWidth width, - int fill, - int open ) + drawFill_e eOpts ) { int inx; for (inx=1; inx<cnt; inx++) { DxfLine(d, pts[inx-1], pts[inx], width, color); } - if (!open) + if (eOpts != DRAW_OPEN) DxfLine(d, pts[cnt-1], pts[0], width, color); } @@ -157,14 +143,27 @@ static void DxfFillCircle(drawCmd_p d, coOrd center, DIST_T radius, } +static void DxfRectangle(drawCmd_p d, coOrd orig, coOrd size, wDrawColor color, drawFill_e eOpts) +{ + coOrd p[4]; + // p1 p2 + // p0 p3 + p[0].x = p[1].x = orig.x; + p[2].x = p[3].x = orig.x+size.x; + p[0].y = p[3].y = orig.y; + p[1].y = p[2].y = orig.y+size.y; + DxfPoly( d, 4, p, NULL, color, 0, eOpts ); +} + + static drawFuncs_t dxfDrawFuncs = { - 0, DxfLine, DxfArc, DxfString, DxfBitMap, - DxfFillPoly, - DxfFillCircle + DxfPoly, + DxfFillCircle, + DxfRectangle }; static drawCmd_t dxfD = { @@ -177,7 +176,6 @@ static int DoExportDXFTracks( void * data) { time_t clock; - char *oldLocale; DynString command = NaS; FILE * dxfF; @@ -195,7 +193,7 @@ static int DoExportDXFTracks( return FALSE; } - oldLocale = SaveLocale("C"); + SetCLocale(); wSetCursor(mainD.d, wCursorWait); time(&clock); @@ -210,7 +208,7 @@ static int DoExportDXFTracks( fputs(DynStringToCStr(&command), dxfF); fclose(dxfF); - RestoreLocale(oldLocale); + SetUserLocale(); Reset(); wSetCursor(mainD.d, defaultCursor); return TRUE; @@ -220,7 +218,7 @@ static int DoExportDXFTracks( * Create and show the dialog for selected the DXF export filename */ -void DoExportDXF(void) +void DoExportDXF(void* unused ) { //if (selectedTrackCount <= 0) { // ErrorMessage(MSG_NO_SELECTED_TRK); diff --git a/app/bin/elev.c b/app/bin/elev.c index a9e5fee..ff987cc 100644 --- a/app/bin/elev.c +++ b/app/bin/elev.c @@ -19,19 +19,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> #include "ccurve.h" +#include "tbezier.h" +#include "tcornu.h" #include "cundo.h" -#include "messages.h" #include "param.h" #include "shrtpath.h" #include "track.h" -#include "utility.h" -#include "string.h" +#include "common-ui.h" -EXPORT long oldElevationEvaluation = 0; +/** @logcmd @showrefby fillElev=n elev.c */ static int log_fillElev = 0; +/** @logcmd @showrefby dumpElev=n elev.c */ static int log_dumpElev = 0; static BOOL_T log_fillElev_initted; static int checkTrk = 0; @@ -140,86 +140,53 @@ BOOL_T ComputeElev( DIST_T *gradeR, BOOL_T force ) { - DIST_T grade; - DIST_T elev0, elev1, dist0, dist1; + DIST_T grade = 0.0; + DIST_T elev0; BOOL_T rc = FALSE; -if (oldElevationEvaluation) { - int rc0, rc1; - if (GetTrkEndElevMode(trk,ep) == ELEV_DEF) { - if (elevR) - *elevR = GetTrkEndElevHeight(trk,ep); - if (gradeR) - *gradeR = 0.0; - return TRUE; - } - rc0 = FindDefinedElev( trk, ep, 0, onpath, &elev0, &dist0 ); - rc1 = FindDefinedElev( trk, ep, 1, onpath, &elev1, &dist1 ); - if ( rc0 == FDE_DEF && rc1 == FDE_DEF ) { - if (dist0+dist1 > 0.1) - grade = (elev1-elev0)/(dist0+dist1); - else - grade = 0.0; - elev0 += grade*dist0; - rc = TRUE; - } else if ( rc0 == FDE_DEF && rc1 == FDE_END ) { - grade = 0.0; - rc = TRUE; - } else if ( rc1 == FDE_DEF && rc0 == FDE_END ) { - grade = 0.0; - elev0 = elev1; - rc = TRUE; - } else if ( rc0 == FDE_END && rc1 == FDE_END ) { - grade = 0.0; - elev0 = 0.0; - rc = TRUE; - } else { - grade = 0.0; - elev0 = 0.0; - } -} else { track_p trk1; EPINX_T ep1; - grade = -1; rc = TRUE; if ( EndPtIsDefinedElev(trk,ep) ) { elev0 = GetTrkEndElevHeight(trk,ep); rc = FALSE; - } else { - if (force || (!GetTrkEndElevCachedHeight(trk,ep,&elev0,&dist0))) { - elev0 = GetElevation( trk ); - dist0 = GetTrkLength( trk, ep, -1 ); - } - SetTrkEndElevCachedHeight(trk,ep,elev0,dist0); + } else if (force || (!GetTrkEndElevCachedHeight(trk,ep,&elev0,&grade))) { trk1 = GetTrkEndTrk( trk, ep ); if (trk1!=NULL) { + // Compute weighted average of the 2 track elevation ep1 = GetEndPtConnectedToMe(trk1,trk); - if (force || (!GetTrkEndElevCachedHeight(trk1,ep1,&elev1,&dist1))) { + if (force || (!GetTrkEndElevCachedHeight(trk1,ep1,&elev0,&grade))) { + // Not cached, need to compute + DIST_T elev1, dist0, dist1; + elev0 = GetElevation( trk ); + dist0 = GetTrkLength( trk, ep, -1 ); elev1 = GetElevation( trk1 ); dist1 = GetTrkLength( trk1, ep1, -1 ); - } - SetTrkEndElevCachedHeight(trk1,ep1,elev1,dist1); - if (dist0+dist1>0.1) { - grade = (elev1-elev0)/(dist0+dist1); - elev0 += grade*dist0; + if (dist0+dist1>0.1) { + grade = (elev1-elev0)/(dist0+dist1); + elev0 += grade*dist0; + } else { + elev0 = (elev0+elev1)/2.0; + rc = FALSE; + } + SetTrkEndElevCachedHeight(trk,ep,elev0,grade); + SetTrkEndElevCachedHeight(trk1,ep1,elev0,-grade); } else { - elev0 = (elev0+elev1)/2.0; - rc = FALSE; - SetTrkEndElevCachedHeight(trk,ep,elev0,dist0); - SetTrkEndElevCachedHeight(trk1,ep1,elev0,dist1); + // flip grade from connected EP + grade = - grade; } } else { - grade = 0.0; + // Not connected - use track elevation + elev0 = GetElevation( trk ); + SetTrkEndElevCachedHeight(trk,ep,elev0,0.0); } - } -} -if ( elevR ) - *elevR = elev0; -if ( gradeR ) - *gradeR = grade; -return rc; + if ( elevR ) + *elevR = elev0; + if ( gradeR ) + *gradeR = grade; + return rc; } @@ -988,7 +955,7 @@ LOG( log_fillElev, 1, ( "%s: findIslandElevs [%d] (%ld)\n", elevPrefix, islandCn * */ -EXPORT void RecomputeElevations( void ) +EXPORT void RecomputeElevations( void * unused ) { long time0 = wGetTimer(); elevPrefix = "RECELV"; @@ -1011,19 +978,17 @@ LOG( log_fillElev, 1, ( "%s: Total (%ld)\n", elevPrefix, wGetTimer()-time0 ) ) printf( "%d:%0.2f\n", GetTrkElevMode(trk), elev ); else printf( "noelev\n" ); -#ifdef LATER - EPINX_T ep; - int mode; + EPINX_T ep; + int mode; for ( ep=0; ep<GetTrkEndPtCnt(trk); ep++ ) { mode = GetTrkEndElevMode( trk, ep ); - ComputeElev( trk, ep, FALSE, &elev, NULL ); + ComputeElev( trk, ep, FALSE, &elev, NULL, FALSE ); printf( "T%4.4d[%2.2d] = %s:%0.3f\n", GetTrkIndex(trk), ep, mode==ELEV_NONE?"None":mode==ELEV_DEF?"Def":mode==ELEV_COMP?"Comp": mode==ELEV_GRADE?"Grade":mode==ELEV_IGNORE?"Ignore":mode==ELEV_STATION?"Station":"???", elev ); } -#endif } } } @@ -1303,7 +1268,7 @@ EXPORT void DrawTrackElev( track_cp trk, drawCmd_p d, BOOL_T drawIt ) (d->options & DC_SIMPLE) != 0 ) return; - if ( !GetCurveMiddle( trk, &pos ) ) { + if ( !GetCurveMiddle( trk, &pos ) && !GetCornuMiddle(trk, &pos) && !GetBezierMiddle(trk, &pos)) { GetBoundingBox( trk, &hi, &lo ); pos.x = (hi.x+lo.x)/2.0; pos.y = (hi.y+lo.y)/2.0; diff --git a/app/bin/file2uri.c b/app/bin/file2uri.c index a9d8f4f..dd690cc 100644 --- a/app/bin/file2uri.c +++ b/app/bin/file2uri.c @@ -20,9 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> -#include <stdio.h> -#include "wlib.h" +#include "common.h" static char *reservedChars = "?#[]@!$&'()*+,;= "; @@ -51,7 +49,7 @@ File2URI(char *fileName, unsigned resultLen, char *resultBuffer) } *currentDest = '\0'; - return(strlen(resultBuffer)); + return((unsigned)strlen(resultBuffer)); } unsigned @@ -79,5 +77,5 @@ URI2File(char *encodedFileName, unsigned resultLen, char *resultBuffer) } } *currentDest = '\0'; - return(strlen(resultBuffer)); + return((unsigned)strlen(resultBuffer)); } diff --git a/app/bin/fileio.c b/app/bin/fileio.c index cb0c8de..0a2e576 100644 --- a/app/bin/fileio.c +++ b/app/bin/fileio.c @@ -20,32 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#include <errno.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#include <ctype.h> -#ifdef WINDOWS - #include <io.h> - #define W_OK (2) - #define access _access - #include <windows.h> -#endif -#include <sys/stat.h> -#include <stdarg.h> -#include <locale.h> - -#include <stdint.h> - -#include <assert.h> - #include <cJSON.h> #include "archive.h" @@ -58,25 +32,22 @@ #include "draw.h" #include "fileio.h" #include "fcntl.h" -#include "i18n.h" #include "layout.h" #include "manifest.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "include/paramfile.h" #include "paths.h" #include "track.h" -#include "utility.h" #include "version.h" #include "dynstring.h" +#include "common-ui.h" -#ifdef WINDOWS +#ifdef UTFCONVERT #include "include/utf8convert.h" -#endif // WINDOWS - +#endif // UTFCONVERT -/*#define TIME_READTRACKFILE*/ +EXPORT dynArr_t paramProc_da; #define COPYBLOCKSIZE 1024 @@ -92,7 +63,6 @@ EXPORT wBool_t bExample = FALSE; EXPORT wBool_t bReadOnly = FALSE; - #ifdef WINDOWS #define rename( F1, F2 ) Copyfile( F1, F2 ) @@ -116,43 +86,46 @@ static int Copyfile( char * fn1, char * fn2 ) } #endif -/** - * Save the old locale and set to new. - * - * \param newlocale IN the new locale to set - * \return pointer to the old locale - */ - -char * -SaveLocale( char *newLocale ) +// +// Locale handling +// SetCLocale is called before reading/writing any data files (.xtc, .xti, .xtq, .cus...) +// SetUserLocale is called after +// Calls can be nested: C, C, User, User +// +static char * sUserLocale = NULL; // current user locale +static long lCLocale = 0; // locale state: > 0 C locale, <= 0 user locale +static long nCLocale = 0; // total # of setlocals calls +static int log_locale = 0; // logging +static int log_timereadfile = 0; + +EXPORT void SetCLocale() { - char *oldLocale; - char *saveLocale = NULL; - - /* get old locale setting */ - oldLocale = setlocale(LC_ALL, NULL); - - /* allocate memory to save */ - if (oldLocale) - saveLocale = strdup( oldLocale ); - - setlocale(LC_ALL, newLocale ); - - return( saveLocale ); + if ( sUserLocale == NULL ) { + sUserLocale = MyStrdup( setlocale( LC_ALL, NULL ) ); + } + if ( lCLocale == 0 ) { + LOG( log_locale, 1, ( "Set C Locale: %ld\n", ++nCLocale ) ); + setlocale( LC_ALL, "C" ); + } + lCLocale++; + if ( lCLocale > 1 ) { + LOG( log_locale, 3, ( "SetClocale - C! %ld\n", nCLocale) ); + } else if ( lCLocale < 1 ) { + LOG( log_locale, 2, ( "SetClocale - User! %ld\n", nCLocale) ); + } } -/** - * Restore a previously saved locale. - * - * \param locale IN return value from earlier call to SaveLocale - */ - -void -RestoreLocale( char * locale ) +EXPORT void SetUserLocale() { - if( locale ) { - setlocale( LC_ALL, locale ); - free( locale ); + if ( lCLocale == 1 ) { + LOG( log_locale, 1, ( "Set %s Locale: %ld\n", sUserLocale, ++nCLocale ) ); + setlocale( LC_ALL, sUserLocale ); + } + lCLocale--; + if ( lCLocale < 0 ) { + LOG( log_locale, 2, ("SetUserLocale - User! %ld\n", nCLocale) ); + } else if ( lCLocale > 0 ) { + LOG( log_locale, 3, ("SetUserLocale - C! %ld\n", nCLocale) ); } } @@ -304,10 +277,10 @@ EXPORT BOOL_T GetArgs( char * ps; char ** qp; va_list ap; - char *oldLocale = NULL; char * sError = NULL; - oldLocale = SaveLocale("C"); + if ( lCLocale < 1 ) + LOG( log_locale, 1, ( "GetArgs: not in C locale\n" ) ); cp = line; va_start( ap, format ); @@ -453,7 +426,7 @@ EXPORT BOOL_T GetArgs( } else { message[0] = '\0'; } -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(message); #endif *qp = (char*)ConvertFromEscapedText(message); @@ -471,7 +444,6 @@ EXPORT BOOL_T GetArgs( } } va_end( ap ); - RestoreLocale(oldLocale); if ( sError ) { InputError( sError, TRUE, cp ); return FALSE; @@ -484,7 +456,7 @@ EXPORT BOOL_T GetArgs( wBool_t IsEND( char * sEnd ) { char * cp; - wBool_t bAllowNakedENDs = paramVersion < 12; + wBool_t bAllowNakedENDs = paramVersion < VERSION_NONAKEDENDS; for( cp = paramLine; *cp && (isspace( *cp ) || *cp == '\t'); cp++ ); if ( strncmp( cp, sEnd, strlen(sEnd) ) == 0 ) cp += strlen( sEnd ); @@ -526,11 +498,11 @@ ReadMultilineText() string = MyStrdup(DynStringToCStr(¬eText)); string[strlen(string) - 1] = '\0'; -#ifdef WINDOWS +#ifdef UTFCONVERT if (wIsUTF8(string)) { ConvertUTF8ToSystem(string); } -#endif // WINDOWS +#endif // UTFCONVERT DynStringFree(¬eText); return(string); @@ -585,7 +557,7 @@ EXPORT char * PutTitle( char * cp ) { static char *title; char * tp; - unsigned cnt = strlen(cp) * 2 + 3; // add 3 for quotes and terminating \0 + size_t cnt = strlen(cp) * 2 + 3; // add 3 for quotes and terminating \0 if (!title) { title = MyMalloc(cnt); @@ -608,14 +580,14 @@ EXPORT char * PutTitle( char * cp ) NoticeMessage( _("putTitle: title too long: %s"), _("Ok"), NULL, title ); *tp = '\0'; -#ifdef WINDOWS +#ifdef UTFCONVERT if(RequiresConvToUTF8(title)) { char *out = MyMalloc(cnt); - wSystemToUTF8(title, out, cnt); + wSystemToUTF8(title, out, (unsigned int)cnt); strcpy(title, out); MyFree(out); } -#endif // WINDOWS +#endif // UTFCONVERT return title; } @@ -654,11 +626,6 @@ static struct wFilSel_t * loadFile_fs = NULL; static struct wFilSel_t * saveFile_fs = NULL; static struct wFilSel_t * examplesFile_fs = NULL; -static wWin_p checkPointingW; -static paramData_t checkPointingPLs[] = { - { PD_MESSAGE, N_("Check Pointing") } }; -static paramGroup_t checkPointingPG = { "checkpoint", 0, checkPointingPLs, sizeof checkPointingPLs/sizeof checkPointingPLs[0] }; - static char * checkPtFileName1; static char * checkPtFileName2; static char * checkPtFileNameBackup; @@ -685,22 +652,17 @@ static BOOL_T ReadTrackFile( coOrd roomSize; long scale; char * cp; - char *oldLocale = NULL; int ret = TRUE; - oldLocale = SaveLocale( "C" ); - paramFile = fopen( pathName, "r" ); if (paramFile == NULL) { - /* Reset the locale settings */ - RestoreLocale( oldLocale ); - if ( complain ) NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, sProdName, pathName, strerror(errno) ); - return FALSE; } + SetCLocale(); + checkPtFileNameBackup = NULL; paramLineNum = 0; paramFileName = strdup( fileName ); @@ -754,14 +716,14 @@ static BOOL_T ReadTrackFile( if( !(ret = InputError( "unknown command", TRUE ))) break; } else if (strncmp( paramLine, "TITLE1 ", 7 ) == 0) { -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(paramLine + 7); -#endif // WINDOWS +#endif // UTFCONVERT SetLayoutTitle(paramLine + 7); } else if (strncmp( paramLine, "TITLE2 ", 7 ) == 0) { -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(paramLine + 7); -#endif // WINDOWS +#endif // UTFCONVERT SetLayoutSubtitle(paramLine + 7); } else if (strncmp( paramLine, "ROOMSIZE", 8 ) == 0) { if ( ParseRoomSize( paramLine+8, &roomSize ) ) { @@ -812,10 +774,9 @@ static BOOL_T ReadTrackFile( if (skipLines>0) NoticeMessage( MSG_LAYOUT_LINES_SKIPPED, _("Ok"), NULL, paramFileName, skipLines); - RestoreLocale( oldLocale ); - paramFile = NULL; + SetUserLocale(); free(paramFileName); paramFileName = NULL; InfoMessage( "%d", count ); @@ -827,9 +788,6 @@ int LoadTracks( char **fileName, void * data) { -#ifdef TIME_READTRACKFILE - long time0, time1; -#endif char *nameOfFile = NULL; char *extOfFile; @@ -837,6 +795,15 @@ int LoadTracks( assert( fileName != NULL ); assert( cnt == 1 ); + nameOfFile = FindFilename(fileName[0]); + + // Make sure it exists and it is readable + if (access(fileName[0], R_OK) != 0) + { + NoticeMessage(MSG_OPEN_FAIL, _("Continue"), NULL, _("Track"), nameOfFile, _("Not Found")); + return FALSE; + } + if ( ! bExample ) SetCurrentPath(LAYOUTPATHKEY, fileName[0]); bReadOnly = bExample; @@ -846,13 +813,10 @@ int LoadTracks( ClearTracks(); ResetLayers(); checkPtMark = changed = 0; - LayoutBackGroundInit(TRUE); //Keep values of background -> will be overriden my archive + if (!data) + LayoutBackGroundInit(TRUE); //Keep values of background -> will be overriden by archive UndoSuspend(); useCurrentLayer = FALSE; -#ifdef TIME_READTRACKFILE - time0 = wGetTimer(); -#endif - nameOfFile = FindFilename( fileName[ 0 ] ); /* * Support zipped filetype @@ -952,6 +916,7 @@ int LoadTracks( char *copyOfFileName = MyStrdup(fileName[0]); + unsigned long time0 = wGetTimer(); if (loadXTC && ReadTrackFile( full_path, FindFilename( fileName[0]), TRUE, TRUE, TRUE )) { nameOfFile = NULL; @@ -968,15 +933,11 @@ int LoadTracks( ResolveIndex(); -#ifdef TIME_READTRACKFILE - time1 = wGetTimer(); - printf( "time= %ld ms \n", time1-time0 ); -#endif - RecomputeElevations(); + LOG( log_timereadfile, 1, ( "Read time (%s) = %lu mS \n", fileName[0], wGetTimer()-time0 ) ); + RecomputeElevations(NULL); AttachTrains(); DoChangeNotification( CHANGE_ALL ); DoUpdateTitles(); - LoadLayerLists(); LayerSetCounts(); } @@ -984,6 +945,8 @@ int LoadTracks( free(full_path); full_path = NULL; + UpdateLayerDlg(curLayer); + UndoResume(); Reset(); wSetCursor( mainD.d, defaultCursor ); @@ -994,7 +957,7 @@ int LoadTracks( * Load the layout specified by data. Filename may contain a full * path. * \param index IN ignored - * \param label IN ignored + * \param label IN if not NULL - during startup - set flag to not load background * \param data IN path and filename */ @@ -1005,28 +968,26 @@ EXPORT void DoFileList( { char *pathName = (char*)data; bExample = FALSE; - LoadTracks( 1, &pathName, NULL ); + if (label) + LoadTracks( 1, &pathName, I2VP(1)); + else + LoadTracks( 1, &pathName, NULL ); } - static BOOL_T DoSaveTracks( const char * fileName ) { FILE * f; time_t clock; BOOL_T rc = TRUE; - char *oldLocale = NULL; - oldLocale = SaveLocale( "C" ); f = fopen( fileName, "w" ); if (f==NULL) { - RestoreLocale( oldLocale ); - NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Track"), fileName, strerror(errno) ); - return FALSE; } + SetCLocale(); wSetCursor( mainD.d, wCursorWait ); time(&clock); rc &= fprintf(f,"#%s Version: %s, Date: %s\n", sProdName, sVersion, ctime(&clock) )>0; @@ -1047,10 +1008,9 @@ static BOOL_T DoSaveTracks( fclose(f); bReadOnly = FALSE; - RestoreLocale( oldLocale ); - checkPtMark = changed; wSetCursor( mainD.d, defaultCursor ); + SetUserLocale(); return rc; } @@ -1160,7 +1120,7 @@ static int SaveTracks( CopyDependency(background,DependencyDir); //The details are stored into the manifest - TODO use arrays for files, locations - char *oldLocale = SaveLocale("C"); + SetCLocale(); char* json_Manifest = CreateManifest(nameOfFile, background, "includes"); char * manifest_file; @@ -1174,7 +1134,7 @@ static int SaveTracks( } else { NoticeMessage( MSG_MANIFEST_FAIL, _("Continue"), NULL, manifest_file ); } - RestoreLocale(oldLocale); + SetUserLocale(); free(manifest_file); free(json_Manifest); @@ -1203,33 +1163,46 @@ static int SaveTracks( return TRUE; } +EXPORT void SetAutoSave() { + if (saveFile_fs == NULL) + saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("AutoSave Tracks As"), + sSourceFilePattern, SaveTracks, NULL ); + wFilSelect( saveFile_fs, GetCurrentPath(LAYOUTPATHKEY)); + checkPtMark = 1; + SetWindowTitle(); + CleanupFiles(); //Remove old checkpoint + SaveState(); + +} -EXPORT void DoSave( doSaveCallBack_p after ) +EXPORT void DoSave( void * doAfterSaveVP ) { - doAfterSave = after; + doAfterSave = doAfterSaveVP; if ( bReadOnly || *(GetLayoutFilename()) == '\0') { if (saveFile_fs == NULL) saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks"), sSourceFilePattern, SaveTracks, NULL ); wFilSelect( saveFile_fs, GetCurrentPath(LAYOUTPATHKEY)); - changed = checkPtMark = 1; + checkPtMark = 1; } else { char *temp = GetLayoutFullPath(); SaveTracks( 1, &temp, NULL ); } SetWindowTitle(); + CleanupFiles(); //Remove old checkpoint SaveState(); } -EXPORT void DoSaveAs( doSaveCallBack_p after ) +EXPORT void DoSaveAs( void * doAfterSaveVP ) { - doAfterSave = after; + doAfterSave = doAfterSaveVP; if (saveFile_fs == NULL) saveFile_fs = wFilSelCreate( mainW, FS_SAVE, 0, _("Save Tracks As"), sSaveFilePattern, SaveTracks, NULL ); wFilSelect( saveFile_fs, GetCurrentPath(LAYOUTPATHKEY)); - changed = checkPtMark = 1; + checkPtMark = 1; SetWindowTitle(); + CleanupFiles(); //Remove old checkpoint SaveState(); } @@ -1242,6 +1215,7 @@ EXPORT void DoLoad( void ) wFilSelect( loadFile_fs, GetCurrentPath(LAYOUTPATHKEY)); paste_offset = zero; cursor_offset = zero; + CleanupFiles(); //Remove old checkpoint SaveState(); } @@ -1251,11 +1225,12 @@ EXPORT void DoExamples( void ) if (examplesFile_fs == NULL) { static wBool_t bExample = TRUE; examplesFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Example Tracks"), - sSourceFilePattern, LoadTracks, &bExample ); + sSourceFilePattern, LoadTracks, NULL ); } bExample = TRUE; sprintf( message, "%s" FILE_SEP_CHAR "examples" FILE_SEP_CHAR, libDir ); wFilSelect( examplesFile_fs, message ); + CleanupFiles(); //Remove old checkpoint SaveState(); } @@ -1273,12 +1248,8 @@ EXPORT void DoCheckPoint( void ) MakeFullpath(&checkPtFileNameBackup, workingDir, sCheckPointBF, NULL); } - if (checkPointingW == NULL) { - ParamRegister( &checkPointingPG ); - checkPointingW = ParamCreateDialog( &checkPointingPG, MakeWindowTitle(_("Check Pointing")), NULL, NULL, NULL, FALSE, NULL, F_TOP|F_CENTER, NULL ); - } rename( checkPtFileName1, checkPtFileName2 ); - //wShow( checkPointingW ); + rc = DoSaveTracks( checkPtFileName1 ); /* could the check point file be written ok? */ @@ -1305,7 +1276,6 @@ EXPORT void DoCheckPoint( void ) rename( checkPtFileName2, checkPtFileName1 ); } - //wHide( checkPointingW ); wShow( mainW ); } @@ -1398,12 +1368,16 @@ EXPORT int LoadCheckpoint( BOOL_T sameName ) } } else SetLayoutFullPath(""); - RecomputeElevations(); + RecomputeElevations(NULL); AttachTrains(); DoChangeNotification( CHANGE_ALL ); DoUpdateTitles(); + } else SetLayoutFullPath(""); + LayerSetCounts(); + UpdateLayerDlg(curLayer); + Reset(); UndoResume(); @@ -1474,14 +1448,14 @@ static int ImportTracks( EnableCommands(); wSetCursor( mainD.d, defaultCursor ); paramVersion = paramVersionOld; - DoCommandB( (void*)(intptr_t)selectCmdInx ); + DoCommandB( I2VP(selectCmdInx) ); SelectRecount(); return TRUE; } EXPORT void DoImport( void * type ) { - importAsModule = (int)(long)type; + importAsModule = (int)VP2L(type); if (importFile_fs == NULL) importFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Import Tracks"), sImportFilePattern, ImportTracks, NULL ); @@ -1506,7 +1480,6 @@ static int DoExportTracks( { FILE * f; time_t clock; - char *oldLocale = NULL; assert( fileName != NULL ); assert( cnt == 1 ); @@ -1518,7 +1491,7 @@ static int DoExportTracks( return FALSE; } - oldLocale = SaveLocale("C"); + SetCLocale(); wSetCursor( mainD.d, wCursorWait ); time(&clock); @@ -1529,7 +1502,7 @@ static int DoExportTracks( fprintf(f, "%s\n", END_TRK_FILE); fclose(f); - RestoreLocale( oldLocale ); + SetUserLocale(); Reset(); wSetCursor( mainD.d, defaultCursor ); @@ -1538,7 +1511,7 @@ static int DoExportTracks( } -EXPORT void DoExport( void ) +EXPORT void DoExport( void * unused ) { if (selectedTrackCount <= 0) { ErrorMessage( MSG_NO_SELECTED_TRK ); @@ -1552,42 +1525,43 @@ EXPORT void DoExport( void ) } -EXPORT BOOL_T EditCopy( void ) +EXPORT wBool_t editStatus = TRUE; + +EXPORT void EditCopy( void * unused ) { + editStatus = FALSE; FILE * f; time_t clock; - char *oldLocale = NULL; if (selectedTrackCount <= 0) { ErrorMessage( MSG_NO_SELECTED_TRK ); - return FALSE; + return; } f = fopen( clipBoardN, "w" ); if (f == NULL) { NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Clipboard"), clipBoardN, strerror(errno) ); - return FALSE; + return; } - oldLocale = SaveLocale("C"); + SetCLocale(); time(&clock); fprintf(f,"#%s Version: %s, Date: %s\n", sProdName, sVersion, ctime(&clock) ); fprintf(f, "VERSION %d %s\n", iParamVersion, PARAMVERSIONVERSION ); ExportTracks(f, &paste_offset); fprintf(f, "%s\n", END_TRK_FILE ); - RestoreLocale(oldLocale); + SetUserLocale(); fclose(f); - return TRUE; + editStatus = TRUE; } -EXPORT BOOL_T EditCut( void ) +EXPORT void EditCut( void * unused ) { - if (!EditCopy()) - return FALSE; + EditCopy(NULL); + if ( !editStatus ) return; SelectDelete(); - return TRUE; } @@ -1598,13 +1572,10 @@ EXPORT BOOL_T EditCut( void ) * \return TRUE if success, FALSE on error (file not found) */ -BOOL_T EditPastePlace( wBool_t inPlace ) +static BOOL_T EditPastePlace( wBool_t inPlace ) { BOOL_T rc = TRUE; - char *oldLocale = NULL; - - oldLocale = SaveLocale("C"); wSetCursor( mainD.d, wCursorWait ); Reset(); @@ -1631,23 +1602,21 @@ BOOL_T EditPastePlace( wBool_t inPlace ) /*DoRedraw();*/ EnableCommands(); wSetCursor( mainD.d, defaultCursor ); - DoCommandB( (void*)(intptr_t)selectCmdInx ); + DoCommandB( I2VP(selectCmdInx) ); SelectRecount(); UpdateAllElevations(); - RestoreLocale(oldLocale); return rc; } -EXPORT BOOL_T EditPaste( void) { - return EditPastePlace(FALSE); +EXPORT void EditPaste( void * unused ) { + editStatus = EditPastePlace(FALSE); } - -EXPORT BOOL_T EditClone( void ) { - BOOL_T rc = TRUE; - if (!EditCopy()) return FALSE; - if (!EditPastePlace(TRUE)) return FALSE; - return rc; + +EXPORT void EditClone( void * unused ) { + EditCopy( NULL ); + if ( !editStatus ) return; + editStatus = EditPastePlace(TRUE); } /***************************************************************************** @@ -1667,4 +1636,6 @@ EXPORT void FileInit( void ) SetLayoutFullPath(""); MakeFullpath(&clipBoardN, workingDir, sClipboardF, NULL); + log_locale = LogFindIndex( "locale" ); + log_timereadfile = LogFindIndex( "timereadfile" ); } diff --git a/app/bin/fileio.h b/app/bin/fileio.h index 13761bf..a037063 100644 --- a/app/bin/fileio.h +++ b/app/bin/fileio.h @@ -22,10 +22,7 @@ #ifndef FILEIO_H #define FILEIO_H -#include <stdio.h> - #include "common.h" -#include "misc.h" extern FILE * paramFile; extern char *paramFileName; @@ -69,6 +66,7 @@ extern wMenuList_p fileList_ml; #define BITMAPPATHKEY "bitmap" #define BACKGROUNDPATHKEY "images" #define DXFPATHKEY "dxf" +#define SVGPATHKEY "svg" #define PARTLISTPATHKEY "parts" #define CARSPATHKEY "cars" #define PARAMETERPATHKEY "params" @@ -81,7 +79,7 @@ typedef struct { char * name; readParam_t proc; } paramProc_t; -dynArr_t paramProc_da; +extern dynArr_t paramProc_da; #define paramProc(N) DYNARR_N( paramProc_t, paramProc_da, N ) void Stripcr( char * ); @@ -104,21 +102,18 @@ void AddParam( char *name, readParam_t proc ); FILE * OpenCustom( char * ); -#ifdef WINDOWS -#define fopen( FN, MODE ) wFileOpen( FN, MODE ) -#endif - void SetWindowTitle( void ); char * PutTitle( char * cp ); void ParamFileListLoad(int paramFileCnt, dynArr_t *paramFiles); -void DoParamFiles(void * junk); +void DoParamFiles(void * unused); int LoadTracks( int cnt, char **fileName, void *data ); typedef void (*doSaveCallBack_p)( void ); -void DoSave( doSaveCallBack_p ); -void DoSaveAs( doSaveCallBack_p ); +void SetAutoSave(void); +void DoSave( void * doAfterSaveVP ); +void DoSaveAs( void * doAfterSaveVP ); void DoLoad( void ); void DoExamples( void ); void DoFileList( int, char *, void * ); @@ -126,18 +121,20 @@ void DoCheckPoint( void ); void CleanupFiles( void ); int ExistsCheckpoint( void ); int LoadCheckpoint( BOOL_T ); -void DoImport( void * ); -void DoExport( void ); -void DoExportDXF( void ); -BOOL_T EditCopy( void ); -BOOL_T EditCut( void ); -BOOL_T EditPaste( void ); -BOOL_T EditClone( void ); +void DoImport( void * typeVP ); +void DoExport( void * unused ); +void DoExportDXF( void * unused ); +void DoExportSVG(void); +extern wBool_t editStatus; // Status of last Edit* command +void EditCopy( void * unused ); +void EditCut( void * unused ); +void EditPaste( void * unused ); +void EditClone( void * unused ); void DoRecord( void * ); void AddPlaybackProc( char *, playbackProc_p, void * ); -EXPORT void TakeSnapshot( drawCmd_t * ); +EXPORT void TakeSnapshot( drawCmd_p ); void PlaybackMessage( char * ); void DoPlayBack( void * ); int MyGetKeyState( void ); @@ -150,10 +147,10 @@ void FileInit( void ); BOOL_T MacroInit( void ); -char *SaveLocale( char *newLocale ); -void RestoreLocale( char * locale ); +void SetCLocale(); +void SetUserLocale(); // Parameter file search -void DoSearchParams(void * junk); +void DoSearchParams(void * unused); #endif diff --git a/app/bin/filenoteui.c b/app/bin/filenoteui.c index 5ffddd1..2470836 100644 --- a/app/bin/filenoteui.c +++ b/app/bin/filenoteui.c @@ -20,26 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> -#include <stdbool.h> -#ifdef WINDOWS - #include <io.h> - #define access(path,mode) _access(path,mode) - #define F_OK (0) -#else - #include <unistd.h> -#endif #include "custom.h" #include "dynstring.h" #include "file2uri.h" -#include "i18n.h" #include "misc.h" #include "note.h" #include "param.h" #include "paths.h" #include "include/stringxtc.h" #include "track.h" -#include "wlib.h" extern BOOL_T inDescribeCmd; @@ -48,7 +37,7 @@ extern BOOL_T inDescribeCmd; #define DOCUMENTFILEPATTERN "All Files (*.*)|*.*" #define DOCUMENTPATHKEY "document" -static struct extraDataNote noteDataInUI; +static struct extraDataNote_t noteDataInUI; static struct wFilSel_t * documentFile_fs; static void NoteFileOpenExternal(void * junk); @@ -63,26 +52,26 @@ static paramData_t fileEditPLs[] = { #define I_ORIGY (1) /*1*/ { PD_FLOAT, ¬eDataInUI.pos.y, "origy", PDO_DIM, &r_1000_1000, N_("Position Y") }, #define I_LAYER (2) - /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, (void*)150, "Layer", 0 }, + /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, I2VP(150), "Layer", 0 }, #define I_TITLE (3) - /*3*/ { PD_STRING, NULL, "title", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Title"), 0, 0, TITLEMAXIMUMLENGTH-1 }, + /*3*/ { PD_STRING, NULL, "title", PDO_NOPREF | PDO_STRINGLIMITLENGTH, I2VP(200), N_("Title"), 0, 0, TITLEMAXIMUMLENGTH-1 }, #define I_PATH (4) - { PD_STRING, NULL, "filename", PDO_NOPSHUPD, (void*)200, N_("Document"), BO_READONLY, (void *)0L }, + { PD_STRING, NULL, "filename", PDO_NOPSHUPD, I2VP(200), N_("Document"), BO_READONLY, I2VP(0L), PATHMAXIMUMLENGTH-1 }, #define I_BROWSE (5) - { PD_BUTTON, (void *)NoteFileBrowse, "browse", 0L, NULL, N_("Select...") }, + { PD_BUTTON, NoteFileBrowse, "browse", 0L, NULL, N_("Select...") }, #define I_OPEN (6) - { PD_BUTTON, (void*)NoteFileOpenExternal, "openfile", PDO_DLGHORZ, NULL, N_("Open...") }, + { PD_BUTTON, NoteFileOpenExternal, "openfile", PDO_DLGHORZ, NULL, N_("Open...") }, //#define I_ARCHIVE (7) // { PD_TOGGLE, ¬eFileData.inArchive, "archive", 0, toggleLabels, NULL }, }; -static paramGroup_t fileEditPG = { "fileEdit", 0, fileEditPLs, sizeof fileEditPLs / sizeof fileEditPLs[0] }; +static paramGroup_t fileEditPG = { "fileEdit", 0, fileEditPLs, COUNT( fileEditPLs ) }; static wWin_p fileEditW; BOOL_T IsFileNote(track_p trk) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); return(xx->op == OP_NOTEFILE ); } @@ -223,7 +212,7 @@ FileEditOK(void *junk) UpdateFile(¬eDataInUI, OK_FILE, FALSE); wHide(fileEditW); ResetIfNotSticky(); - FileIsChanged(); + SetFileChanged(); } /** @@ -235,9 +224,9 @@ FileEditOK(void *junk) void CreateEditFileDialog(track_p trk, char * windowTitle) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); if (!fileEditW) { + noteDataInUI.base.trkType = T_NOTE; noteDataInUI.noteData.fileData.path = MyMalloc(PATHMAXIMUMLENGTH); noteDataInUI.noteData.fileData.title = MyMalloc(TITLEMAXIMUMLENGTH); fileEditPLs[I_TITLE].valueP = noteDataInUI.noteData.fileData.title; @@ -254,6 +243,7 @@ void CreateEditFileDialog(track_p trk, char * windowTitle) wWinSetTitle(fileEditPG.win, MakeWindowTitle(windowTitle)); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); noteDataInUI.pos = xx->pos; noteDataInUI.layer = xx->layer; noteDataInUI.trk = trk; @@ -273,7 +263,7 @@ void CreateEditFileDialog(track_p trk, char * windowTitle) void ActivateFileNote(track_p trk) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); NoteFileOpen(xx->noteData.fileData.path); } @@ -288,7 +278,7 @@ void ActivateFileNote(track_p trk) void DescribeFileNote(track_p trk, char * str, CSIZE_T len) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); DynString statusLine; DynStringMalloc(&statusLine, 80); @@ -319,7 +309,7 @@ void DescribeFileNote(track_p trk, char * str, CSIZE_T len) void NewFileNoteUI(track_p trk) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); char *tmpPtrText = _("Describe the file"); xx->noteData.fileData.title = MyStrdup(tmpPtrText); diff --git a/app/bin/i18n.c b/app/bin/i18n.c index a8ed631..e6abe70 100644 --- a/app/bin/i18n.c +++ b/app/bin/i18n.c @@ -20,7 +20,6 @@ */ #include <locale.h> -#include <stdio.h> #include <stdlib.h> #include "i18n.h" @@ -43,19 +42,11 @@ void InitGettext( void ) setlocale(LC_ALL, ""); -#ifdef WINDOWS // build the correct directory path strcpy(directory, wGetAppLibDir()); strcat( directory, "/../locale" ); +#ifdef WINDOWS _fullpath( directory, directory, 2048 ); -#else - #ifdef XTRKCAD_CMAKE_BUILD - strcpy(directory, XTRKCAD_INSTALL_PREFIX); - strcat(directory, "/share"); - #else - strcpy(directory, wGetAppLibDir()); - #endif - strcat(directory, "/locale"); #endif // initialize gettext bindtextdomain(XTRKCAD_PACKAGE, directory); diff --git a/app/bin/include/dirent.h b/app/bin/include/dirent.h index fdfbe5b..2ebf703 100644 --- a/app/bin/include/dirent.h +++ b/app/bin/include/dirent.h @@ -1125,7 +1125,7 @@ extern "C" { /* Pointer to string to convert */ mbstr,
/* Size of multi-byte string */ (int)len,
/* Pointer to output buffer */ wcstr,
- /* Size of output buffer */ sizeInWords - 1
+ /* Size of output buffer */ (int)sizeInWords - 1
);
/* Ensure that output buffer is zero-terminated */
@@ -1208,7 +1208,7 @@ extern "C" { /* Pointer to unicode string */ wcstr,
/* Length of unicode string */ (int)len,
/* Pointer to output buffer */ mbstr,
- /* Size of output buffer */ sizeInBytes - 1,
+ /* Size of output buffer */ (int)sizeInBytes - 1,
/* Default character */ NULL,
/* Whether default character was used or not */ pflag
);
diff --git a/app/bin/include/levenshtein.h b/app/bin/include/levenshtein.h new file mode 100644 index 0000000..b3e0111 --- /dev/null +++ b/app/bin/include/levenshtein.h @@ -0,0 +1,24 @@ +#ifndef LEVENSHTEIN_H
+#define LEVENSHTEIN_H
+
+// `levenshtein.h` - levenshtein
+// MIT licensed.
+// Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com>
+
+// Returns a size_t, depicting the difference between `a` and `b`.
+// See <https://en.wikipedia.org/wiki/Levenshtein_distance> for more information.
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+size_t
+levenshtein(const char *a, const char *b);
+
+size_t
+levenshtein_n (const char *a, const size_t length, const char *b, const size_t bLength);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // LEVENSHTEIN_H
diff --git a/app/bin/include/paramfile.h b/app/bin/include/paramfile.h index b177b15..97f635a 100644 --- a/app/bin/include/paramfile.h +++ b/app/bin/include/paramfile.h @@ -23,4 +23,13 @@ #define CONTENTSCOMMAND "CONTENTS" char *GetParameterFileContent(char *file); + + #define TURNOUTCOMMAND "TURNOUT" + #define STRUCTURECOMMAND "STRUCTURE" + #define CARCOMMAND "CARPART" + #define CARPROTOCOMMAND "CARPROTO" + + char * GetParameterFileScale(char *file); + + #endif // !HAVE_PARAMFILE_H diff --git a/app/bin/include/paramfilelist.h b/app/bin/include/paramfilelist.h index a1c081d..0ad7523 100644 --- a/app/bin/include/paramfilelist.h +++ b/app/bin/include/paramfilelist.h @@ -6,10 +6,12 @@ typedef struct { char * name; /** < name of parameter file */ char * contents; - bool deleted; - bool valid; /** < FALSE for dropped file */ + int deleted; + int deletedShadow; + int valid; /** < FALSE for dropped file */ bool favorite; enum paramFileState trackState; + enum paramFileState structureState; } paramFileInfo_t; typedef paramFileInfo_t * paramFileInfo_p; @@ -18,12 +20,15 @@ char *GetParamFileDir(void); void SetParamFileDir(char *fullPath); void LoadParamFileList(void); - BOOL_T ReadDefaultParams(const char * dirName); + //BOOL_T ReadDefaultParams(const char * dirName); void SaveParamFileList(void); int GetParamFileCount(); void UpdateParamFileList(void); void ParamFilesChange(long changes); int LoadParamFile(int files, char ** fileName, void * data); +// void InitializeParamDir(void); + void ParamFileListConfirmChange(void); + void ParamFileListCancelChange(void); BOOL_T ParamFileListInit(void); void SearchUiOk(void * junk); diff --git a/app/bin/include/partcatalog.h b/app/bin/include/partcatalog.h index eec9d1e..e1ea110 100644 --- a/app/bin/include/partcatalog.h +++ b/app/bin/include/partcatalog.h @@ -1,7 +1,7 @@ /** \file partcatalog.h * Manage the catalog of track parameter files */ -/* XTrkCad - Model Railroad CAD +/* XTrackCad - Model Railroad CAD * Copyright (C) 2019 Martin Fischer * * This program is free software; you can redistribute it and/or modify @@ -23,48 +23,83 @@ #define HAVE_TRACKCATALOG_H #include <stdbool.h> +#include "include/utlist.h" #define MAXFILESPERCONTENT 10 /**< count of files with the same content header */ -#define ESTIMATED_CONTENTS_WORDS 10 /**< average count of words in CONTENTS header */ struct sCatalogEntry { - struct sCatalogEntry *next; + struct sCatalogEntry *next, *prev; unsigned files; /**< current count of files */ char *fullFileName[MAXFILESPERCONTENT]; /**< fully qualified file name */ char *contents; /**< content field of parameter file */ - struct sCatalogEntry *indirect; /**< pointer to another catalog entry */ + char *tag; /**< data about the file */ }; - typedef struct sCatalogEntry CatalogEntry; +struct sCatalog { + CatalogEntry *head; /**< The entries */ +}; +typedef struct sCatalog Catalog; + + +/** +An index entry. This struct holds a keyword pointer and an array of pointers to +CatalogEntry +It is managed as a linked list +*/ struct sIndexEntry { - CatalogEntry *value; /**< catalog entry having the key word in contents */ + struct sIndexEntry *next; + struct sIndexEntry *prev; char *keyWord; /**< keyword */ + dynArr_t *references; /**< references to the CatalogEntry */ }; - typedef struct sIndexEntry IndexEntry; -struct sTrackLibrary { - CatalogEntry *catalog; /**< list of files cataloged */ + +struct sParameterLib { + Catalog *catalog; /**< list of files cataloged */ IndexEntry *index; /**< Index for lookup */ unsigned wordCount; /**< How many words indexed */ - void * words_array; /**< The array of words */ - unsigned trackTypeCount; /**< */ + unsigned parameterFileCount; /**< */ + char *words; }; +typedef struct sParameterLib + ParameterLib; /**< core data structure for the catalog */ -typedef struct sTrackLibrary - TrackLibrary; /**< core data structure for the catalog */ +enum WORDSTATE { + SEARCHED, + DISCARDED, + NOTFOUND, + CLOSE, + STATE_COUNT +}; + +struct sSearchResult { + Catalog subCatalog; + unsigned totalFound; + unsigned words; /**< no of words in search string */ + struct sSingleResult { + char *keyWord; + unsigned count; + enum WORDSTATE state; + } *kw; +}; +typedef struct sSearchResult SearchResult; -CatalogEntry *InitCatalog(void); -TrackLibrary *InitLibrary(void); -TrackLibrary *CreateLibrary(char *directory); -void DeleteLibrary(TrackLibrary *tracklib); -bool GetTrackFiles(TrackLibrary *trackLib, char *directory); -int GetParameterFileInfo(int files, char ** fileName, void * data); -unsigned CreateLibraryIndex(TrackLibrary *trackLib); -unsigned SearchLibrary(TrackLibrary *library, char *searchExpression, CatalogEntry *resultEntries); -unsigned CountCatalogEntries(CatalogEntry *listHeader); -void EmptyCatalog(CatalogEntry *listHeader); -unsigned SearchLibrary(TrackLibrary *library, char *searchExpression, CatalogEntry *resultEntries); +Catalog *InitCatalog(void); +void DestroyCatalog(Catalog *catalog); +CatalogEntry * InsertInOrder(Catalog *catalog, const char *contents, const char *tag); +void UpdateCatalogEntry(CatalogEntry *entry, char *path, char *contents, char *tag); +ParameterLib *InitLibrary(void); +ParameterLib *CreateLibrary(char *directory); +void DestroyLibrary(ParameterLib *tracklib); +bool CreateCatalogFromDir(ParameterLib *trackLib, char *directory); +unsigned CreateLibraryIndex(ParameterLib *trackLib); +unsigned SearchLibrary(ParameterLib *library, char *searchExpression, SearchResult *totalResult); +char *SearchStatistics(SearchResult *result); +void SearchDiscardResult(SearchResult *res); +unsigned CountCatalogEntries(Catalog *catalog); +void DiscardCatalog(ParameterLib *library); +EXPORT void CatalogDiscard(Catalog *catalog); bool FilterKeyword(char *word); #endif // !HAVE_TRACKCATALOG_H diff --git a/app/bin/include/svgformat.h b/app/bin/include/svgformat.h new file mode 100644 index 0000000..7cf5c85 --- /dev/null +++ b/app/bin/include/svgformat.h @@ -0,0 +1,55 @@ +/** \file svgformat.h + * Definitions and prototypes for SVG export + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef HAVE_SVGFORMAT_H +#define HAVE_SVGFORMAT_H +#include <stdbool.h> +#include <mxml.h> + +#define MININMUMLINEWIDTH 3.0 + +typedef mxml_node_t SVGParent; +typedef mxml_node_t SVGDocument; + +void SvgAddCSSStyle(SVGParent *svg); +void SvgLineCommand(SVGParent *svg, double x0, double y0, double x1, double y1, + double w, long c, unsigned lineOpt); +void SvgPolyLineCommand(SVGParent *svg, int cnt, double *points, int color, + double width, bool fill, unsigned lineStyle); +void SvgRectCommand(SVGParent *svg, double x0, double y0, double x1, double y1, + int color, unsigned linestyle); +void SvgCircleCommand(SVGParent *svg, double x, double y, double r, double w, + long c, bool fill, unsigned lineStyle); +void SvgArcCommand(SVGParent *svg, double x, double y, double r, double a0, + double a1, bool center, double w, long c, unsigned lineStyle); +void SvgTextCommand(SVGParent *svg, double x, double y, double size, long c, + char *text); +void SvgAddTitle(SVGParent *svg, char *title); + +SVGDocument *SvgCreateDocument(void); +SVGParent *SvgPrologue(SVGDocument *result, char *id, int layerCount, double x0, + double y0, double x1, double y1); + +bool SvgSaveFile(SVGDocument *svg, char *filename); +void SvgDestroyDocument(SVGDocument *svg); +#endif // !HAVE_SVGFORMAT_H + diff --git a/app/bin/include/utlist.h b/app/bin/include/utlist.h new file mode 100644 index 0000000..5bb1ac9 --- /dev/null +++ b/app/bin/include/utlist.h @@ -0,0 +1,1073 @@ +/* +Copyright (c) 2007-2018, Troy D. Hanson http://troydhanson.github.com/uthash/ +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef UTLIST_H +#define UTLIST_H + +#define UTLIST_VERSION 2.1.0 + +#include <assert.h> + +/* + * This file contains macros to manipulate singly and doubly-linked lists. + * + * 1. LL_ macros: singly-linked lists. + * 2. DL_ macros: doubly-linked lists. + * 3. CDL_ macros: circular doubly-linked lists. + * + * To use singly-linked lists, your structure must have a "next" pointer. + * To use doubly-linked lists, your structure must "prev" and "next" pointers. + * Either way, the pointer to the head of the list must be initialized to NULL. + * + * ----------------.EXAMPLE ------------------------- + * struct item { + * int id; + * struct item *prev, *next; + * } + * + * struct item *list = NULL: + * + * int main() { + * struct item *item; + * ... allocate and populate item ... + * DL_APPEND(list, item); + * } + * -------------------------------------------------- + * + * For doubly-linked lists, the append and delete macros are O(1) + * For singly-linked lists, append and delete are O(n) but prepend is O(1) + * The sort macro is O(n log(n)) for all types of single/double/circular lists. + */ + +/* These macros use decltype or the earlier __typeof GNU extension. + As decltype is only available in newer compilers (VS2010 or gcc 4.3+ + when compiling c++ source) this code uses whatever method is needed + or, for VS2008 where neither is available, uses casting workarounds. */ +#if !defined(LDECLTYPE) && !defined(NO_DECLTYPE) +#if defined(_MSC_VER) /* MS compiler */ +#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +#define LDECLTYPE(x) decltype(x) +#else /* VS2008 or older (or VS2010 in C mode) */ +#define NO_DECLTYPE +#endif +#elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__) +#define NO_DECLTYPE +#else /* GNU, Sun and other compilers */ +#define LDECLTYPE(x) __typeof(x) +#endif +#endif + +/* for VS2008 we use some workarounds to get around the lack of decltype, + * namely, we always reassign our tmp variable to the list head if we need + * to dereference its prev/next pointers, and save/restore the real head.*/ +#ifdef NO_DECLTYPE +#define IF_NO_DECLTYPE(x) x +#define LDECLTYPE(x) char* +#define UTLIST_SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); } +#define UTLIST_NEXT(elt,list,next) ((char*)((list)->next)) +#define UTLIST_NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); } +/* #define UTLIST_PREV(elt,list,prev) ((char*)((list)->prev)) */ +#define UTLIST_PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); } +#define UTLIST_RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; } +#define UTLIST_CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); } +#else +#define IF_NO_DECLTYPE(x) +#define UTLIST_SV(elt,list) +#define UTLIST_NEXT(elt,list,next) ((elt)->next) +#define UTLIST_NEXTASGN(elt,list,to,next) ((elt)->next)=(to) +/* #define UTLIST_PREV(elt,list,prev) ((elt)->prev) */ +#define UTLIST_PREVASGN(elt,list,to,prev) ((elt)->prev)=(to) +#define UTLIST_RS(list) +#define UTLIST_CASTASGN(a,b) (a)=(b) +#endif + +/****************************************************************************** + * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort * + * Unwieldy variable names used here to avoid shadowing passed-in variables. * + *****************************************************************************/ +#define LL_SORT(list, cmp) \ + LL_SORT2(list, cmp, next) + +#define LL_SORT2(list, cmp, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;) \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + UTLIST_CASTASGN(_ls_p,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + UTLIST_SV(_ls_q,list); _ls_q = UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + } else if (_ls_qsize == 0 || !_ls_q) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + } else { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + } \ + if (_ls_tail) { \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,_ls_e,next); UTLIST_RS(list); \ + } else { \ + UTLIST_CASTASGN(list,_ls_e); \ + } \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + if (_ls_tail) { \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,NULL,next); UTLIST_RS(list); \ + } \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + + +#define DL_SORT(list, cmp) \ + DL_SORT2(list, cmp, prev, next) + +#define DL_SORT2(list, cmp, prev, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + IF_NO_DECLTYPE(LDECLTYPE(list) _tmp;) \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + UTLIST_CASTASGN(_ls_p,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + UTLIST_SV(_ls_q,list); _ls_q = UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while ((_ls_psize > 0) || ((_ls_qsize > 0) && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + } else if ((_ls_qsize == 0) || (!_ls_q)) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + } else { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + } \ + if (_ls_tail) { \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,_ls_e,next); UTLIST_RS(list); \ + } else { \ + UTLIST_CASTASGN(list,_ls_e); \ + } \ + UTLIST_SV(_ls_e,list); UTLIST_PREVASGN(_ls_e,list,_ls_tail,prev); UTLIST_RS(list); \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + UTLIST_CASTASGN((list)->prev, _ls_tail); \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,NULL,next); UTLIST_RS(list); \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + +#define CDL_SORT(list, cmp) \ + CDL_SORT2(list, cmp, prev, next) + +#define CDL_SORT2(list, cmp, prev, next) \ +do { \ + LDECLTYPE(list) _ls_p; \ + LDECLTYPE(list) _ls_q; \ + LDECLTYPE(list) _ls_e; \ + LDECLTYPE(list) _ls_tail; \ + LDECLTYPE(list) _ls_oldhead; \ + LDECLTYPE(list) _tmp; \ + int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ + if (list) { \ + _ls_insize = 1; \ + _ls_looping = 1; \ + while (_ls_looping) { \ + UTLIST_CASTASGN(_ls_p,list); \ + UTLIST_CASTASGN(_ls_oldhead,list); \ + (list) = NULL; \ + _ls_tail = NULL; \ + _ls_nmerges = 0; \ + while (_ls_p) { \ + _ls_nmerges++; \ + _ls_q = _ls_p; \ + _ls_psize = 0; \ + for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ + _ls_psize++; \ + UTLIST_SV(_ls_q,list); \ + if (UTLIST_NEXT(_ls_q,list,next) == _ls_oldhead) { \ + _ls_q = NULL; \ + } else { \ + _ls_q = UTLIST_NEXT(_ls_q,list,next); \ + } \ + UTLIST_RS(list); \ + if (!_ls_q) break; \ + } \ + _ls_qsize = _ls_insize; \ + while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ + if (_ls_psize == 0) { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ + } else if (_ls_qsize == 0 || !_ls_q) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ + } else if (cmp(_ls_p,_ls_q) <= 0) { \ + _ls_e = _ls_p; UTLIST_SV(_ls_p,list); _ls_p = \ + UTLIST_NEXT(_ls_p,list,next); UTLIST_RS(list); _ls_psize--; \ + if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ + } else { \ + _ls_e = _ls_q; UTLIST_SV(_ls_q,list); _ls_q = \ + UTLIST_NEXT(_ls_q,list,next); UTLIST_RS(list); _ls_qsize--; \ + if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ + } \ + if (_ls_tail) { \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,_ls_e,next); UTLIST_RS(list); \ + } else { \ + UTLIST_CASTASGN(list,_ls_e); \ + } \ + UTLIST_SV(_ls_e,list); UTLIST_PREVASGN(_ls_e,list,_ls_tail,prev); UTLIST_RS(list); \ + _ls_tail = _ls_e; \ + } \ + _ls_p = _ls_q; \ + } \ + UTLIST_CASTASGN((list)->prev,_ls_tail); \ + UTLIST_CASTASGN(_tmp,list); \ + UTLIST_SV(_ls_tail,list); UTLIST_NEXTASGN(_ls_tail,list,_tmp,next); UTLIST_RS(list); \ + if (_ls_nmerges <= 1) { \ + _ls_looping=0; \ + } \ + _ls_insize *= 2; \ + } \ + } \ +} while (0) + +/****************************************************************************** + * singly linked list macros (non-circular) * + *****************************************************************************/ +#define LL_PREPEND(head,add) \ + LL_PREPEND2(head,add,next) + +#define LL_PREPEND2(head,add,next) \ +do { \ + (add)->next = (head); \ + (head) = (add); \ +} while (0) + +#define LL_CONCAT(head1,head2) \ + LL_CONCAT2(head1,head2,next) + +#define LL_CONCAT2(head1,head2,next) \ +do { \ + LDECLTYPE(head1) _tmp; \ + if (head1) { \ + _tmp = (head1); \ + while (_tmp->next) { _tmp = _tmp->next; } \ + _tmp->next=(head2); \ + } else { \ + (head1)=(head2); \ + } \ +} while (0) + +#define LL_APPEND(head,add) \ + LL_APPEND2(head,add,next) + +#define LL_APPEND2(head,add,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + (add)->next=NULL; \ + if (head) { \ + _tmp = (head); \ + while (_tmp->next) { _tmp = _tmp->next; } \ + _tmp->next=(add); \ + } else { \ + (head)=(add); \ + } \ +} while (0) + +#define LL_INSERT_INORDER(head,add,cmp) \ + LL_INSERT_INORDER2(head,add,cmp,next) + +#define LL_INSERT_INORDER2(head,add,cmp,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + if (head) { \ + LL_LOWER_BOUND2(head, _tmp, add, cmp, next); \ + LL_APPEND_ELEM2(head, _tmp, add, next); \ + } else { \ + (head) = (add); \ + (head)->next = NULL; \ + } \ +} while (0) + +#define LL_LOWER_BOUND(head,elt,like,cmp) \ + LL_LOWER_BOUND2(head,elt,like,cmp,next) + +#define LL_LOWER_BOUND2(head,elt,like,cmp,next) \ + do { \ + if ((head) == NULL || (cmp(head, like)) >= 0) { \ + (elt) = NULL; \ + } else { \ + for ((elt) = (head); (elt)->next != NULL; (elt) = (elt)->next) { \ + if (cmp((elt)->next, like) >= 0) { \ + break; \ + } \ + } \ + } \ + } while (0) + +#define LL_DELETE(head,del) \ + LL_DELETE2(head,del,next) + +#define LL_DELETE2(head,del,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + if ((head) == (del)) { \ + (head)=(head)->next; \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (del))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (del)->next; \ + } \ + } \ +} while (0) + +#define LL_COUNT(head,el,counter) \ + LL_COUNT2(head,el,counter,next) \ + +#define LL_COUNT2(head,el,counter,next) \ +do { \ + (counter) = 0; \ + LL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define LL_FOREACH(head,el) \ + LL_FOREACH2(head,el,next) + +#define LL_FOREACH2(head,el,next) \ + for ((el) = (head); el; (el) = (el)->next) + +#define LL_FOREACH_SAFE(head,el,tmp) \ + LL_FOREACH_SAFE2(head,el,tmp,next) + +#define LL_FOREACH_SAFE2(head,el,tmp,next) \ + for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp)) + +#define LL_SEARCH_SCALAR(head,out,field,val) \ + LL_SEARCH_SCALAR2(head,out,field,val,next) + +#define LL_SEARCH_SCALAR2(head,out,field,val,next) \ +do { \ + LL_FOREACH2(head,out,next) { \ + if ((out)->field == (val)) break; \ + } \ +} while (0) + +#define LL_SEARCH(head,out,elt,cmp) \ + LL_SEARCH2(head,out,elt,cmp,next) + +#define LL_SEARCH2(head,out,elt,cmp,next) \ +do { \ + LL_FOREACH2(head,out,next) { \ + if ((cmp(out,elt))==0) break; \ + } \ +} while (0) + +#define LL_REPLACE_ELEM2(head, el, add, next) \ +do { \ + LDECLTYPE(head) _tmp; \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (el))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (add); \ + } \ + } \ +} while (0) + +#define LL_REPLACE_ELEM(head, el, add) \ + LL_REPLACE_ELEM2(head, el, add, next) + +#define LL_PREPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + LDECLTYPE(head) _tmp; \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + _tmp = (head); \ + while (_tmp->next && (_tmp->next != (el))) { \ + _tmp = _tmp->next; \ + } \ + if (_tmp->next) { \ + _tmp->next = (add); \ + } \ + } \ + } else { \ + LL_APPEND2(head, add, next); \ + } \ +} while (0) \ + +#define LL_PREPEND_ELEM(head, el, add) \ + LL_PREPEND_ELEM2(head, el, add, next) + +#define LL_APPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (el)->next = (add); \ + } else { \ + LL_PREPEND2(head, add, next); \ + } \ +} while (0) \ + +#define LL_APPEND_ELEM(head, el, add) \ + LL_APPEND_ELEM2(head, el, add, next) + +#ifdef NO_DECLTYPE +/* Here are VS2008 / NO_DECLTYPE replacements for a few functions */ + +#undef LL_CONCAT2 +#define LL_CONCAT2(head1,head2,next) \ +do { \ + char *_tmp; \ + if (head1) { \ + _tmp = (char*)(head1); \ + while ((head1)->next) { (head1) = (head1)->next; } \ + (head1)->next = (head2); \ + UTLIST_RS(head1); \ + } else { \ + (head1)=(head2); \ + } \ +} while (0) + +#undef LL_APPEND2 +#define LL_APPEND2(head,add,next) \ +do { \ + if (head) { \ + (add)->next = head; /* use add->next as a temp variable */ \ + while ((add)->next->next) { (add)->next = (add)->next->next; } \ + (add)->next->next=(add); \ + } else { \ + (head)=(add); \ + } \ + (add)->next=NULL; \ +} while (0) + +#undef LL_INSERT_INORDER2 +#define LL_INSERT_INORDER2(head,add,cmp,next) \ +do { \ + if ((head) == NULL || (cmp(head, add)) >= 0) { \ + (add)->next = (head); \ + (head) = (add); \ + } else { \ + char *_tmp = (char*)(head); \ + while ((head)->next != NULL && (cmp((head)->next, add)) < 0) { \ + (head) = (head)->next; \ + } \ + (add)->next = (head)->next; \ + (head)->next = (add); \ + UTLIST_RS(head); \ + } \ +} while (0) + +#undef LL_DELETE2 +#define LL_DELETE2(head,del,next) \ +do { \ + if ((head) == (del)) { \ + (head)=(head)->next; \ + } else { \ + char *_tmp = (char*)(head); \ + while ((head)->next && ((head)->next != (del))) { \ + (head) = (head)->next; \ + } \ + if ((head)->next) { \ + (head)->next = ((del)->next); \ + } \ + UTLIST_RS(head); \ + } \ +} while (0) + +#undef LL_REPLACE_ELEM2 +#define LL_REPLACE_ELEM2(head, el, add, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->next = head; \ + while ((add)->next->next && ((add)->next->next != (el))) { \ + (add)->next = (add)->next->next; \ + } \ + if ((add)->next->next) { \ + (add)->next->next = (add); \ + } \ + } \ + (add)->next = (el)->next; \ +} while (0) + +#undef LL_PREPEND_ELEM2 +#define LL_PREPEND_ELEM2(head, el, add, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->next = (head); \ + while ((add)->next->next && ((add)->next->next != (el))) { \ + (add)->next = (add)->next->next; \ + } \ + if ((add)->next->next) { \ + (add)->next->next = (add); \ + } \ + } \ + (add)->next = (el); \ + } else { \ + LL_APPEND2(head, add, next); \ + } \ +} while (0) \ + +#endif /* NO_DECLTYPE */ + +/****************************************************************************** + * doubly linked list macros (non-circular) * + *****************************************************************************/ +#define DL_PREPEND(head,add) \ + DL_PREPEND2(head,add,prev,next) + +#define DL_PREPEND2(head,add,prev,next) \ +do { \ + (add)->next = (head); \ + if (head) { \ + (add)->prev = (head)->prev; \ + (head)->prev = (add); \ + } else { \ + (add)->prev = (add); \ + } \ + (head) = (add); \ +} while (0) + +#define DL_APPEND(head,add) \ + DL_APPEND2(head,add,prev,next) + +#define DL_APPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (head)->prev->next = (add); \ + (head)->prev = (add); \ + (add)->next = NULL; \ + } else { \ + (head)=(add); \ + (head)->prev = (head); \ + (head)->next = NULL; \ + } \ +} while (0) + +#define DL_INSERT_INORDER(head,add,cmp) \ + DL_INSERT_INORDER2(head,add,cmp,prev,next) + +#define DL_INSERT_INORDER2(head,add,cmp,prev,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + if (head) { \ + DL_LOWER_BOUND2(head, _tmp, add, cmp, next); \ + DL_APPEND_ELEM2(head, _tmp, add, prev, next); \ + } else { \ + (head) = (add); \ + (head)->prev = (head); \ + (head)->next = NULL; \ + } \ +} while (0) + +#define DL_LOWER_BOUND(head,elt,like,cmp) \ + DL_LOWER_BOUND2(head,elt,like,cmp,next) + +#define DL_LOWER_BOUND2(head,elt,like,cmp,next) \ +do { \ + if ((head) == NULL || (cmp(head, like)) >= 0) { \ + (elt) = NULL; \ + } else { \ + for ((elt) = (head); (elt)->next != NULL; (elt) = (elt)->next) { \ + if ((cmp((elt)->next, like)) >= 0) { \ + break; \ + } \ + } \ + } \ +} while (0) + +#define DL_CONCAT(head1,head2) \ + DL_CONCAT2(head1,head2,prev,next) + +#define DL_CONCAT2(head1,head2,prev,next) \ +do { \ + LDECLTYPE(head1) _tmp; \ + if (head2) { \ + if (head1) { \ + UTLIST_CASTASGN(_tmp, (head2)->prev); \ + (head2)->prev = (head1)->prev; \ + (head1)->prev->next = (head2); \ + UTLIST_CASTASGN((head1)->prev, _tmp); \ + } else { \ + (head1)=(head2); \ + } \ + } \ +} while (0) + +#define DL_DELETE(head,del) \ + DL_DELETE2(head,del,prev,next) + +#define DL_DELETE2(head,del,prev,next) \ +do { \ + assert((head) != NULL); \ + assert((del)->prev != NULL); \ + if ((del)->prev == (del)) { \ + (head)=NULL; \ + } else if ((del)==(head)) { \ + (del)->next->prev = (del)->prev; \ + (head) = (del)->next; \ + } else { \ + (del)->prev->next = (del)->next; \ + if ((del)->next) { \ + (del)->next->prev = (del)->prev; \ + } else { \ + (head)->prev = (del)->prev; \ + } \ + } \ +} while (0) + +#define DL_COUNT(head,el,counter) \ + DL_COUNT2(head,el,counter,next) \ + +#define DL_COUNT2(head,el,counter,next) \ +do { \ + (counter) = 0; \ + DL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define DL_FOREACH(head,el) \ + DL_FOREACH2(head,el,next) + +#define DL_FOREACH2(head,el,next) \ + for ((el) = (head); el; (el) = (el)->next) + +/* this version is safe for deleting the elements during iteration */ +#define DL_FOREACH_SAFE(head,el,tmp) \ + DL_FOREACH_SAFE2(head,el,tmp,next) + +#define DL_FOREACH_SAFE2(head,el,tmp,next) \ + for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp)) + +/* these are identical to their singly-linked list counterparts */ +#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR +#define DL_SEARCH LL_SEARCH +#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2 +#define DL_SEARCH2 LL_SEARCH2 + +#define DL_REPLACE_ELEM2(head, el, add, prev, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((head) == (el)) { \ + (head) = (add); \ + (add)->next = (el)->next; \ + if ((el)->next == NULL) { \ + (add)->prev = (add); \ + } else { \ + (add)->prev = (el)->prev; \ + (add)->next->prev = (add); \ + } \ + } else { \ + (add)->next = (el)->next; \ + (add)->prev = (el)->prev; \ + (add)->prev->next = (add); \ + if ((el)->next == NULL) { \ + (head)->prev = (add); \ + } else { \ + (add)->next->prev = (add); \ + } \ + } \ +} while (0) + +#define DL_REPLACE_ELEM(head, el, add) \ + DL_REPLACE_ELEM2(head, el, add, prev, next) + +#define DL_PREPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + (add)->prev = (el)->prev; \ + (el)->prev = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } else { \ + (add)->prev->next = (add); \ + } \ + } else { \ + DL_APPEND2(head, add, prev, next); \ + } \ +} while (0) \ + +#define DL_PREPEND_ELEM(head, el, add) \ + DL_PREPEND_ELEM2(head, el, add, prev, next) + +#define DL_APPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (add)->prev = (el); \ + (el)->next = (add); \ + if ((add)->next) { \ + (add)->next->prev = (add); \ + } else { \ + (head)->prev = (add); \ + } \ + } else { \ + DL_PREPEND2(head, add, prev, next); \ + } \ +} while (0) \ + +#define DL_APPEND_ELEM(head, el, add) \ + DL_APPEND_ELEM2(head, el, add, prev, next) + +#ifdef NO_DECLTYPE +/* Here are VS2008 / NO_DECLTYPE replacements for a few functions */ + +#undef DL_INSERT_INORDER2 +#define DL_INSERT_INORDER2(head,add,cmp,prev,next) \ +do { \ + if ((head) == NULL) { \ + (add)->prev = (add); \ + (add)->next = NULL; \ + (head) = (add); \ + } else if ((cmp(head, add)) >= 0) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (head)->prev = (add); \ + (head) = (add); \ + } else { \ + char *_tmp = (char*)(head); \ + while ((head)->next && (cmp((head)->next, add)) < 0) { \ + (head) = (head)->next; \ + } \ + (add)->prev = (head); \ + (add)->next = (head)->next; \ + (head)->next = (add); \ + UTLIST_RS(head); \ + if ((add)->next) { \ + (add)->next->prev = (add); \ + } else { \ + (head)->prev = (add); \ + } \ + } \ +} while (0) +#endif /* NO_DECLTYPE */ + +/****************************************************************************** + * circular doubly linked list macros * + *****************************************************************************/ +#define CDL_APPEND(head,add) \ + CDL_APPEND2(head,add,prev,next) + +#define CDL_APPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (head)->prev = (add); \ + (add)->prev->next = (add); \ + } else { \ + (add)->prev = (add); \ + (add)->next = (add); \ + (head) = (add); \ + } \ +} while (0) + +#define CDL_PREPEND(head,add) \ + CDL_PREPEND2(head,add,prev,next) + +#define CDL_PREPEND2(head,add,prev,next) \ +do { \ + if (head) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (head)->prev = (add); \ + (add)->prev->next = (add); \ + } else { \ + (add)->prev = (add); \ + (add)->next = (add); \ + } \ + (head) = (add); \ +} while (0) + +#define CDL_INSERT_INORDER(head,add,cmp) \ + CDL_INSERT_INORDER2(head,add,cmp,prev,next) + +#define CDL_INSERT_INORDER2(head,add,cmp,prev,next) \ +do { \ + LDECLTYPE(head) _tmp; \ + if (head) { \ + CDL_LOWER_BOUND2(head, _tmp, add, cmp, next); \ + CDL_APPEND_ELEM2(head, _tmp, add, prev, next); \ + } else { \ + (head) = (add); \ + (head)->next = (head); \ + (head)->prev = (head); \ + } \ +} while (0) + +#define CDL_LOWER_BOUND(head,elt,like,cmp) \ + CDL_LOWER_BOUND2(head,elt,like,cmp,next) + +#define CDL_LOWER_BOUND2(head,elt,like,cmp,next) \ +do { \ + if ((head) == NULL || (cmp(head, like)) >= 0) { \ + (elt) = NULL; \ + } else { \ + for ((elt) = (head); (elt)->next != (head); (elt) = (elt)->next) { \ + if ((cmp((elt)->next, like)) >= 0) { \ + break; \ + } \ + } \ + } \ +} while (0) + +#define CDL_DELETE(head,del) \ + CDL_DELETE2(head,del,prev,next) + +#define CDL_DELETE2(head,del,prev,next) \ +do { \ + if (((head)==(del)) && ((head)->next == (head))) { \ + (head) = NULL; \ + } else { \ + (del)->next->prev = (del)->prev; \ + (del)->prev->next = (del)->next; \ + if ((del) == (head)) (head)=(del)->next; \ + } \ +} while (0) + +#define CDL_COUNT(head,el,counter) \ + CDL_COUNT2(head,el,counter,next) \ + +#define CDL_COUNT2(head, el, counter,next) \ +do { \ + (counter) = 0; \ + CDL_FOREACH2(head,el,next) { ++(counter); } \ +} while (0) + +#define CDL_FOREACH(head,el) \ + CDL_FOREACH2(head,el,next) + +#define CDL_FOREACH2(head,el,next) \ + for ((el)=(head);el;(el)=(((el)->next==(head)) ? NULL : (el)->next)) + +#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ + CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) + +#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \ + for ((el) = (head), (tmp1) = (head) ? (head)->prev : NULL; \ + (el) && ((tmp2) = (el)->next, 1); \ + (el) = ((el) == (tmp1) ? NULL : (tmp2))) + +#define CDL_SEARCH_SCALAR(head,out,field,val) \ + CDL_SEARCH_SCALAR2(head,out,field,val,next) + +#define CDL_SEARCH_SCALAR2(head,out,field,val,next) \ +do { \ + CDL_FOREACH2(head,out,next) { \ + if ((out)->field == (val)) break; \ + } \ +} while (0) + +#define CDL_SEARCH(head,out,elt,cmp) \ + CDL_SEARCH2(head,out,elt,cmp,next) + +#define CDL_SEARCH2(head,out,elt,cmp,next) \ +do { \ + CDL_FOREACH2(head,out,next) { \ + if ((cmp(out,elt))==0) break; \ + } \ +} while (0) + +#define CDL_REPLACE_ELEM2(head, el, add, prev, next) \ +do { \ + assert((head) != NULL); \ + assert((el) != NULL); \ + assert((add) != NULL); \ + if ((el)->next == (el)) { \ + (add)->next = (add); \ + (add)->prev = (add); \ + (head) = (add); \ + } else { \ + (add)->next = (el)->next; \ + (add)->prev = (el)->prev; \ + (add)->next->prev = (add); \ + (add)->prev->next = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } \ + } \ +} while (0) + +#define CDL_REPLACE_ELEM(head, el, add) \ + CDL_REPLACE_ELEM2(head, el, add, prev, next) + +#define CDL_PREPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el); \ + (add)->prev = (el)->prev; \ + (el)->prev = (add); \ + (add)->prev->next = (add); \ + if ((head) == (el)) { \ + (head) = (add); \ + } \ + } else { \ + CDL_APPEND2(head, add, prev, next); \ + } \ +} while (0) + +#define CDL_PREPEND_ELEM(head, el, add) \ + CDL_PREPEND_ELEM2(head, el, add, prev, next) + +#define CDL_APPEND_ELEM2(head, el, add, prev, next) \ +do { \ + if (el) { \ + assert((head) != NULL); \ + assert((add) != NULL); \ + (add)->next = (el)->next; \ + (add)->prev = (el); \ + (el)->next = (add); \ + (add)->next->prev = (add); \ + } else { \ + CDL_PREPEND2(head, add, prev, next); \ + } \ +} while (0) + +#define CDL_APPEND_ELEM(head, el, add) \ + CDL_APPEND_ELEM2(head, el, add, prev, next) + +#ifdef NO_DECLTYPE +/* Here are VS2008 / NO_DECLTYPE replacements for a few functions */ + +#undef CDL_INSERT_INORDER2 +#define CDL_INSERT_INORDER2(head,add,cmp,prev,next) \ +do { \ + if ((head) == NULL) { \ + (add)->prev = (add); \ + (add)->next = (add); \ + (head) = (add); \ + } else if ((cmp(head, add)) >= 0) { \ + (add)->prev = (head)->prev; \ + (add)->next = (head); \ + (add)->prev->next = (add); \ + (head)->prev = (add); \ + (head) = (add); \ + } else { \ + char *_tmp = (char*)(head); \ + while ((char*)(head)->next != _tmp && (cmp((head)->next, add)) < 0) { \ + (head) = (head)->next; \ + } \ + (add)->prev = (head); \ + (add)->next = (head)->next; \ + (add)->next->prev = (add); \ + (head)->next = (add); \ + UTLIST_RS(head); \ + } \ +} while (0) +#endif /* NO_DECLTYPE */ + +#endif /* UTLIST_H */ diff --git a/app/bin/layout.c b/app/bin/layout.c index a77cbb2..4bf1936 100644 --- a/app/bin/layout.c +++ b/app/bin/layout.c @@ -20,19 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> #include <dynstring.h> #include "custom.h" -#include "i18n.h" #include "layout.h" #include "misc2.h" #include "param.h" #include "paths.h" #include "track.h" -#include "wlib.h" #include "fileio.h" -#include "utility.h" #define MINTRACKRADIUSPREFS "minTrackRadius" @@ -64,13 +60,19 @@ static struct sDataLayout thisLayout = { NULL, }; +EXPORT wIndex_t changed = 0; + static paramFloatRange_t r0_90 = { 0, 90 }; -static paramFloatRange_t r1_10000 = { 1, 10000 }; +static paramFloatRange_t r0_10000 = { 0, 10000 }; +static paramFloatRange_t r0_9999999 = { 0, 9999999 }; static paramFloatRange_t r1_9999999 = { 1, 9999999 }; static paramFloatRange_t r360_360 = { -360, 360 }; static paramFloatRange_t rN_9999999 = { -99999, 99999 }; static paramIntegerRange_t i0_100 = { 0, 100 }; +static void SettingsWrite( void ); +static void SettingsRead( void ); + static void LayoutDlgUpdate(paramGroup_p pg, int inx, void * valueP); /** @@ -122,6 +124,18 @@ CopyLayoutTitle(char* dest, char *src) *(dest + TITLEMAXLEN - 1) = '\0'; } + +/** +* Set the file's changed flag and update the window title. +*/ + +void +SetFileChanged(void) +{ + changed++; + SetWindowTitle(); +} + void SetLayoutTitle(char *title) { @@ -307,6 +321,18 @@ int GetLayoutBackGroundScreen() return (thisLayout.props.backgroundScreen); } +/** + * Gets layout room size + * + * \param [out] roomSize size of the room. + */ + +void +GetLayoutRoomSize(coOrd *roomSize) +{ + *roomSize = thisLayout.props.roomSize; +} + /**************************************************************************** * * Layout Dialog @@ -343,13 +369,13 @@ static paramData_p layout_p; static paramGroup_t * layout_pg_p; static wBool_t file_changed; -EXPORT BOOL_T haveBackground = FALSE; +bool haveBackground = false; BOOL_T backgroundVisible = TRUE; char * noname = ""; void -BackgroundToggleShow() +BackgroundToggleShow( void * unused ) { backgroundVisible = !backgroundVisible; wButtonSetBusy(backgroundB, backgroundVisible); @@ -361,6 +387,11 @@ int GetLayoutBackGroundVisible() return(backgroundVisible); } +bool HasBackGround() +{ + return(haveBackground); +} + /***************************************** * Try to load the background image file */ @@ -373,6 +404,9 @@ LoadBackGroundImage(void) NoticeMessage(_("Unable to load Image File - %s"),_("Ok"),NULL,error); return FALSE; } + wControlActive((wControl_p)backgroundB, backgroundVisible); + wButtonSetBusy(backgroundB, backgroundVisible); + return TRUE; } @@ -425,13 +459,13 @@ void LayoutBackGroundSave(void) { wPrefSetInteger("layout", "BackgroundScreen", thisLayout.props.backgroundScreen); wPrefSetFloat("layout", "BackgroundSize", thisLayout.props.backgroundSize); - wPrefFlush(); + wPrefFlush(""); } /************************************************************ * Run File Select for the Background Image File */ -static void ImageFileBrowse( void * junk ) +static void ImageFileBrowse( void * unused ) { imageFile_fs = wFilSelCreate( mainW, FS_LOAD, FS_PICTURES, _("Load Background"), sImageFilePattern, LoadImageFile, NULL ); @@ -442,7 +476,7 @@ static void ImageFileBrowse( void * junk ) /************************************************************ * Remove the background Image File */ -static void ImageFileClear( void * junk) +static void ImageFileClear( void * unused) { char * noname = ""; SetLayoutBackGroundFullPath(noname); @@ -450,49 +484,48 @@ static void ImageFileClear( void * junk) SetName(); wControlActive((wControl_p)backgroundB, FALSE); file_changed = TRUE; + haveBackground = false; ParamLoadControl(layout_pg_p, 8); MainRedraw(); } static paramData_t layoutPLs[] = { - { PD_FLOAT, &thisLayout.props.roomSize.x, "roomsizeX", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &r1_9999999, N_("Room Width"), 0, (void*)(CHANGE_MAIN | CHANGE_MAP) }, - { PD_FLOAT, &thisLayout.props.roomSize.y, "roomsizeY", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW | PDO_DLGHORZ, &r1_9999999, N_(" Height"), 0, (void*)(CHANGE_MAIN | CHANGE_MAP) }, + { PD_FLOAT, &thisLayout.props.roomSize.x, "roomsizeX", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &r1_9999999, N_("Room Width"), 0, I2VP(CHANGE_MAIN | CHANGE_MAP) }, + { PD_FLOAT, &thisLayout.props.roomSize.y, "roomsizeY", PDO_NOPREF | PDO_DIM | PDO_NOPSHUPD | PDO_DRAW | PDO_DLGHORZ, &r1_9999999, N_(" Height"), 0, I2VP(CHANGE_MAIN | CHANGE_MAP) }, { PD_STRING, &thisLayout.props.title1, "title1", PDO_NOPSHUPD | PDO_STRINGLIMITLENGTH, NULL, N_("Layout Title"), 0, 0, sizeof(thisLayout.props.title1)}, { PD_STRING, &thisLayout.props.title2, "title2", PDO_NOPSHUPD | PDO_STRINGLIMITLENGTH, NULL, N_("Subtitle"), 0, 0, sizeof(thisLayout.props.title2)}, #define SCALEINX (4) - { PD_DROPLIST, &thisLayout.props.curScaleDescInx, "scale", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT, (void *)120, N_("Scale"), 0, (void*)(CHANGE_SCALE) }, + { PD_DROPLIST, &thisLayout.props.curScaleDescInx, "scale", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT, I2VP(180), N_("Scale"), 0, I2VP(CHANGE_SCALE) }, #define GAUGEINX (5) - { PD_DROPLIST, &thisLayout.props.curGaugeInx, "gauge", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT | PDO_DLGHORZ, (void *)120, N_(" Gauge"), 0, (void *)(CHANGE_SCALE) }, + { PD_DROPLIST, &thisLayout.props.curGaugeInx, "gauge", PDO_NOPREF | PDO_NOPSHUPD | PDO_NORECORD | PDO_NOUPDACT | PDO_DLGHORZ, I2VP(180), N_(" Gauge"), 0, I2VP(CHANGE_SCALE) }, #define MINRADIUSENTRY (6) - { PD_FLOAT, &thisLayout.props.minTrackRadius, "mintrackradius", PDO_DIM | PDO_NOPSHUPD | PDO_NOPREF, &r1_10000, N_("Min Track Radius"), 0, (void*)(CHANGE_MAIN | CHANGE_LIMITS) }, - { PD_FLOAT, &thisLayout.props.maxTrackGrade, "maxtrackgrade", PDO_NOPSHUPD | PDO_DLGHORZ, &r0_90, N_(" Max Track Grade (%)"), 0, (void*)(CHANGE_MAIN) }, + { PD_FLOAT, &thisLayout.props.minTrackRadius, "mintrackradius", PDO_DIM | PDO_NOPSHUPD | PDO_NOPREF, &r0_10000, N_("Min Track Radius"), 0, I2VP(CHANGE_MAIN | CHANGE_LIMITS) }, + { PD_FLOAT, &thisLayout.props.maxTrackGrade, "maxtrackgrade", PDO_NOPSHUPD | PDO_DLGHORZ, &r0_90, N_(" Max Track Grade (%)"), 0, I2VP(CHANGE_MAIN) }, #define BACKGROUNDFILEENTRY (8) //Note this value used in the file section routines above - if it chnages, they will need to change - { PD_STRING, &backgroundFileName, "backgroundfile", PDO_NOPSHUPD, NULL, N_("Background File Path"), 0, (void *)(CHANGE_BACKGROUND) }, - { PD_BUTTON, (void*)ImageFileBrowse, "browse", PDO_DLGHORZ, NULL, N_("Browse ...") }, - { PD_BUTTON, (void*)ImageFileClear, "clear", PDO_DLGHORZ, NULL, N_("Clear") }, + { PD_STRING, &backgroundFileName, "backgroundfile", PDO_NOPSHUPD | PDO_NORECORD|PDO_STRINGLIMITLENGTH, NULL, N_("Background File Path"), 0, I2VP(CHANGE_BACKGROUND),sizeof(backgroundFileName) }, + { PD_BUTTON, ImageFileBrowse, "browse", PDO_DLGHORZ, NULL, N_("Browse ...") }, + { PD_BUTTON, ImageFileClear, "clear", PDO_DLGHORZ, NULL, N_("Clear") }, #define BACKGROUNDPOSX (11) - { PD_FLOAT, &thisLayout.props.backgroundPos.x, "backgroundposX", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &rN_9999999, N_("Background PosX,Y"), 0, (void*)(CHANGE_BACKGROUND) }, + { PD_FLOAT, &thisLayout.props.backgroundPos.x, "backgroundposX", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &rN_9999999, N_("Background PosX,Y"), 0, I2VP(CHANGE_BACKGROUND) }, #define BACKGROUNDPOSY (12) - { PD_FLOAT, &thisLayout.props.backgroundPos.y, "backgroundposY", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW | PDO_DLGHORZ, &rN_9999999, NULL, 0, (void*)(CHANGE_BACKGROUND) }, + { PD_FLOAT, &thisLayout.props.backgroundPos.y, "backgroundposY", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW | PDO_DLGHORZ, &rN_9999999, NULL, 0, I2VP(CHANGE_BACKGROUND) }, #define BACKGROUNDWIDTH (13) - { PD_FLOAT, &thisLayout.props.backgroundSize, "backgroundWidth", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &r1_9999999, N_("Background Size"), 0, (void*)(CHANGE_BACKGROUND) }, + { PD_FLOAT, &thisLayout.props.backgroundSize, "backgroundWidth", PDO_DIM | PDO_NOPSHUPD | PDO_DRAW, &r0_9999999, N_("Background Size"), 0, I2VP(CHANGE_BACKGROUND) }, #define BACKGROUNDSCREEN (14) - { PD_LONG, &thisLayout.props.backgroundScreen, "backgroundScreen", PDO_NOPSHUPD | PDO_DRAW, &i0_100, N_("Background Screen %"), 0, (void*)(CHANGE_BACKGROUND) }, + { PD_LONG, &thisLayout.props.backgroundScreen, "backgroundScreen", PDO_NOPSHUPD | PDO_DRAW, &i0_100, N_("Background Screen %"), 0, I2VP(CHANGE_BACKGROUND) }, #define BACKGROUNDANGLE (15) - { PD_FLOAT, &thisLayout.props.backgroundAngle, "backgroundAngle", PDO_NOPSHUPD | PDO_DRAW, &r360_360, N_("Background Angle"), 0, (void*)(CHANGE_BACKGROUND) } + { PD_FLOAT, &thisLayout.props.backgroundAngle, "backgroundAngle", PDO_NOPSHUPD | PDO_DRAW | PDO_DLGBOXEND, &r360_360, N_("Background Angle"), 0, I2VP(CHANGE_BACKGROUND) }, + { PD_MESSAGE, N_("Named Settings File"), NULL, PDO_DLGRESETMARGIN, I2VP(180) }, + { PD_BUTTON, SettingsWrite, "write", PDO_DLGHORZ, 0, N_("Write"), 0, I2VP(0) }, + { PD_BUTTON, SettingsRead, "read", PDO_DLGHORZ | PDO_DLGBOXEND, 0, N_("Read"), 0, I2VP(0) } }; -static paramGroup_t layoutPG = { "layout", PGO_RECORD | PGO_PREFMISC, layoutPLs, sizeof layoutPLs / sizeof layoutPLs[0] }; +static paramGroup_t layoutPG = { "layout", PGO_RECORD | PGO_PREFMISC, layoutPLs, COUNT( layoutPLs ) }; -/** -* Apply the changes entered to settings -* -* \param junk IN unused -*/ -static void LayoutOk(void * junk) -{ +static void ChangeLayout() { + long changes; changes = GetChanges(&layoutPG); @@ -500,13 +533,15 @@ static void LayoutOk(void * junk) /* [mf Nov. 15, 2005] Get the gauge/scale settings */ if (changes & CHANGE_SCALE) { SetScaleGauge(thisLayout.props.curScaleDescInx, thisLayout.props.curGaugeInx); - } + file_changed = TRUE; + } /* [mf Nov. 15, 2005] end */ if (changes & CHANGE_MAP) { SetRoomSize(thisLayout.props.roomSize); - } + file_changed = TRUE; + } DoChangeNotification(changes); @@ -515,13 +550,29 @@ static void LayoutOk(void * junk) // now set the minimum track radius sprintf(prefString, "minTrackRadius-%s", curScaleName); wPrefSetFloat("misc", prefString, thisLayout.props.minTrackRadius); - } + file_changed = TRUE; + } - if ((changes & CHANGE_BACKGROUND) || file_changed) { + if (changes & CHANGE_BACKGROUND) { LayoutBackGroundSave(); - file_changed = FALSE; + file_changed = TRUE; } +} + +/** +* Apply the changes entered to settings +* +* \param unused IN unused +*/ + +static void LayoutOk(void * unused) +{ + ChangeLayout(); + if(file_changed){ + SetFileChanged(); + file_changed = FALSE; + } free(thisLayout.copyOfLayoutProps); wHide(layoutW); @@ -534,14 +585,14 @@ static void LayoutOk(void * junk) /** * Discard the changes entered and replace with earlier values * -* \param junk IN unused +* \param unused IN unused */ -static void LayoutCancel(struct wWin_t *junk) +static void LayoutCancel(struct wWin_t *unused) { thisLayout.props = *(thisLayout.copyOfLayoutProps); ParamLoadControls(&layoutPG); - LayoutOk(junk); + LayoutOk(unused); } static void LayoutChange(long changes) @@ -552,7 +603,7 @@ static void LayoutChange(long changes) } } -void DoLayout(void * junk) +void DoLayout(void * unused) { SetLayoutRoomSize(mapD.size); @@ -692,16 +743,84 @@ LayoutBackGroundInit(BOOL_T clear) { } char * str = GetLayoutBackGroundFullPath(); if (str && str[0]) { - if (!LoadBackGroundImage()) { //Failed -> Wipe Out + haveBackground = true; + if (!LoadBackGroundImage()) { //Failed -> Wipe Out SetLayoutBackGroundFullPath(noname); SetLayoutBackGroundPos(zero); SetLayoutBackGroundAngle(0.0); SetLayoutBackGroundScreen(0); SetLayoutBackGroundSize(0.0); LayoutBackGroundSave(); + haveBackground = false; } } else { + haveBackground = false; wDrawSetBackground( mainD.d, NULL, NULL); } +} +EXPORT int DoSettingsRead( + int files, + char ** fileName, + void * data ) +{ + char * pref; + assert( files == 1 ); + if (fileName == NULL) wPrefsLoad(NULL); + else wPrefsLoad(fileName[0]); + // get the preferred scale from the new configuration file + pref = wPrefGetString("misc", "scale"); + if (pref) { + char buffer[STR_SHORT_SIZE]; + strcpy(buffer, pref); + DoSetScale(buffer); + } + //Get command options + wPrefGetInteger("DialogItem","cmdopt-preselect",&preSelect,preSelect); + wPrefGetInteger("DialogItem","cmdopt-rightclickmode",&rightClickMode,rightClickMode); + wPrefGetInteger("DialogItem","cmdopt-selectmode",&selectMode,selectMode); + wPrefGetInteger("DialogItem","cmdopt-selectzero",&selectZero,selectZero); + + //Get Toolbar showing + wPrefGetInteger( "misc", "toolbarset",&toolbarSet,toolbarSet); + + //Redraw the screen to reflect changes + MainProc( mainW, wResize_e, NULL, NULL ); + return TRUE; } + +static struct wFilSel_t * settingsRead_fs; + +static void SettingsRead( void ) +{ + if (settingsRead_fs == NULL) + settingsRead_fs = wFilSelCreate( mainW, FS_LOAD, 0, _("Read Settings"), + _("Settings File (*.xset)|*.xset"), DoSettingsRead, NULL ); + bExample = FALSE; + wFilSelect( settingsRead_fs, wGetAppWorkDir()); +} + +static int DoSettingsWrite( + int files, + char ** fileName, + void * data ) +{ + assert( fileName != NULL ); + assert( files == 1 ); + wPrefFlush(fileName[0]); + return TRUE; +} + +static struct wFilSel_t * settingsWrite_fs; + +static void SettingsWrite( void ) +{ + ChangeLayout(); + if ( settingsWrite_fs == NULL ) + settingsWrite_fs = wFilSelCreate( mainW, FS_UPDATE, 0, _("Write Settings"), + _("Settings File (*.xset)|*.xset"), DoSettingsWrite, NULL ); + wFilSelect( settingsWrite_fs, wGetAppWorkDir()); +} + + + diff --git a/app/bin/layout.h b/app/bin/layout.h index fcb5160..6e9496d 100644 --- a/app/bin/layout.h +++ b/app/bin/layout.h @@ -24,7 +24,6 @@ #define HAVE_LAYOUT_H #include "common.h" -#include "misc.h" void SetLayoutFullPath(const char *fileName); @@ -44,6 +43,8 @@ void SetLayoutBackGroundPos(coOrd pos); void SetLayoutBackGroundAngle(ANGLE_T angle); void SetLayoutBackGroundScreen(int screen); +int DoSettingsRead(int files, char ** fileName, void * data ); + char *GetLayoutFullPath(void); char *GetLayoutFilename(void); char *GetLayoutTitle(void); @@ -52,6 +53,7 @@ DIST_T GetLayoutMinTrackRadius(void); SCALEINX_T GetLayoutCurScale(void ); SCALEDESCINX_T GetLayoutCurScaleDesc(void); //GAUGEINX_T GetLayoutCurGauge(void); +void GetLayoutRoomSize(coOrd *roomSize); ANGLE_T GetLayoutMaxTrackGrade(void); SCALEDESCINX_T GetLayoutCurScaleDesc(void); @@ -61,10 +63,11 @@ coOrd GetLayoutBackGroundPos(void); ANGLE_T GetLayoutBackGroundAngle(void); int GetLayoutBackGroundScreen(void); int GetLayoutBackGroundVisible(void); +bool HasBackGround(void); void LayoutBackGroundInit(BOOL_T clear); void LayoutBackGroundLoad(void); void LayoutBackGroundSave(void); -void BackgroundToggleShow(void); -void DoLayout(void * junk); +void BackgroundToggleShow(void * unused); +void DoLayout(void * unused); int LoadImageFile(int files,char ** fileName,void * data ); #endif diff --git a/app/bin/levenshtein.c b/app/bin/levenshtein.c new file mode 100644 index 0000000..8dc56aa --- /dev/null +++ b/app/bin/levenshtein.c @@ -0,0 +1,72 @@ +// `levenshtein.c` - levenshtein +// MIT licensed. +// Copyright (c) 2015 Titus Wormer <tituswormer@gmail.com> + +#include <string.h> +#include <stdlib.h> +#include <stdint.h> +#include "include/levenshtein.h" + +// Returns a size_t, depicting the difference between `a` and `b`. +// See <https://en.wikipedia.org/wiki/Levenshtein_distance> for more information. +size_t +levenshtein_n(const char *a, const size_t length, const char *b, const size_t bLength) { + // Shortcut optimizations / degenerate cases. + if (a == b) { + return 0; + } + + if (length == 0) { + return bLength; + } + + if (bLength == 0) { + return length; + } + + size_t *cache = calloc(length, sizeof(size_t)); + size_t index = 0; + size_t bIndex = 0; + size_t distance; + size_t bDistance; + size_t result; + char code; + + // initialize the vector. + while (index < length) { + cache[index] = index + 1; + index++; + } + + // Loop. + while (bIndex < bLength) { + code = b[bIndex]; + result = distance = bIndex++; + index = SIZE_MAX; + + while (++index < length) { + bDistance = code == a[index] ? distance : distance + 1; + distance = cache[index]; + + cache[index] = result = distance > result + ? bDistance > result + ? result + 1 + : bDistance + : bDistance > distance + ? distance + 1 + : bDistance; + } + } + + free(cache); + + return result; +} + +size_t +levenshtein(const char *a, const char *b) { + const size_t length = strlen(a); + const size_t bLength = strlen(b); + + return levenshtein_n(a, length, b, bLength); +} diff --git a/app/bin/linknoteui.c b/app/bin/linknoteui.c index daa3ccf..cb98686 100644 --- a/app/bin/linknoteui.c +++ b/app/bin/linknoteui.c @@ -20,26 +20,21 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> -#include <stdbool.h> - #include "custom.h" #include "dynstring.h" -#include "i18n.h" #include "misc.h" #include "note.h" #include "param.h" #include "include/stringxtc.h" #include "track.h" #include "validator.h" -#include "wlib.h" extern BOOL_T inDescribeCmd; #define DEFAULTLINKURL "http://www.xtrkcad.org/" #define DEFAULTLINKTITLE "The XTrackCAD Homepage" -static struct extraDataNote noteDataInUI; +static struct extraDataNote_t noteDataInUI; static void NoteLinkBrowse(void *junk); static void NoteLinkOpen(char *url ); @@ -51,22 +46,22 @@ static paramData_t linkEditPLs[] = { #define I_ORIGY (1) /*1*/ { PD_FLOAT, ¬eDataInUI.pos.y, "origy", PDO_DIM, &r_1000_1000, N_("Position Y") }, #define I_LAYER (2) - /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, (void*)150, "Layer", 0 }, + /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, I2VP(150), "Layer", 0 }, #define I_TITLE (3) - /*3*/ { PD_STRING, NULL, "title", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("Title"), 0, 0, TITLEMAXIMUMLENGTH-1 }, + /*3*/ { PD_STRING, NULL, "title", PDO_NOPREF | PDO_STRINGLIMITLENGTH, I2VP(200), N_("Title"), 0, 0, TITLEMAXIMUMLENGTH-1 }, #define I_URL (4) - /*4*/ { PD_STRING, NULL, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)200, N_("URL"), 0, 0, URLMAXIMUMLENGTH-1 }, + /*4*/ { PD_STRING, NULL, "name", PDO_NOPREF | PDO_STRINGLIMITLENGTH, I2VP(200), N_("URL"), 0, 0, URLMAXIMUMLENGTH-1 }, #define I_OPEN (5) - /*5*/{ PD_BUTTON, (void*)NoteLinkBrowse, "openlink", PDO_DLGHORZ, NULL, N_("Open...") }, + /*5*/{ PD_BUTTON, NoteLinkBrowse, "openlink", PDO_DLGHORZ, NULL, N_("Open...") }, }; -static paramGroup_t linkEditPG = { "linkEdit", 0, linkEditPLs, sizeof linkEditPLs / sizeof linkEditPLs[0] }; +static paramGroup_t linkEditPG = { "linkEdit", 0, linkEditPLs, COUNT( linkEditPLs ) }; static wWin_p linkEditW; BOOL_T IsLinkNote(track_p trk) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); return(xx->op == OP_NOTELINK); } @@ -161,17 +156,17 @@ LinkEditOK(void *junk) UpdateLink(¬eDataInUI, OK_LINK, FALSE); wHide(linkEditW); ResetIfNotSticky(); - FileIsChanged(); + SetFileChanged(); } static void CreateEditLinkDialog(track_p trk, char *title) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); // create the dialog if necessary if (!linkEditW) { + noteDataInUI.base.trkType = T_NOTE; noteDataInUI.noteData.linkData.url = MyMalloc(URLMAXIMUMLENGTH); noteDataInUI.noteData.linkData.title = MyMalloc(TITLEMAXIMUMLENGTH); linkEditPLs[I_TITLE].valueP = noteDataInUI.noteData.linkData.title; @@ -188,6 +183,7 @@ CreateEditLinkDialog(track_p trk, char *title) wWinSetTitle(linkEditPG.win, MakeWindowTitle(title)); // initialize the dialog fields + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); noteDataInUI.pos = xx->pos; noteDataInUI.layer = xx->layer; noteDataInUI.trk = trk; @@ -208,7 +204,7 @@ CreateEditLinkDialog(track_p trk, char *title) void ActivateLinkNote(track_p trk) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); NoteLinkOpen(xx->noteData.linkData.url); } @@ -223,7 +219,7 @@ void ActivateLinkNote(track_p trk) void DescribeLinkNote(track_p trk, char * str, CSIZE_T len) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); DynString statusLine; DynStringMalloc(&statusLine, 80); @@ -251,7 +247,7 @@ void DescribeLinkNote(track_p trk, char * str, CSIZE_T len) void NewLinkNoteUI(track_p trk) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); xx->noteData.linkData.url = MyStrdup( DEFAULTLINKURL ); xx->noteData.linkData.title = MyStrdup( DEFAULTLINKTITLE ); diff --git a/app/bin/lprintf.c b/app/bin/lprintf.c index 23cc44a..802fa24 100644 --- a/app/bin/lprintf.c +++ b/app/bin/lprintf.c @@ -20,23 +20,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#ifndef WINDOWS -#include <time.h> -#else -#include <time.h> -#include <sys/timeb.h> -#endif - #include "custom.h" #include "fileio.h" -#include "messages.h" #include "paths.h" #include "track.h" +#include "common-ui.h" /**************************************************************************** @@ -117,7 +105,7 @@ EXPORT void LogSet( char * name, int level ) } -EXPORT int LogFindIndex( char * name ) +EXPORT int LogFindIndex( const char * name ) { int inx; for ( inx=0; inx<logTable_da.cnt; inx++ ) @@ -127,7 +115,7 @@ EXPORT int LogFindIndex( char * name ) } EXPORT void LogPrintf( - char * format, + const char * format, ... ) { va_list ap; diff --git a/app/bin/macro.c b/app/bin/macro.c index 8db996d..1c38dd2 100644 --- a/app/bin/macro.c +++ b/app/bin/macro.c @@ -21,54 +21,23 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#include <errno.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#else -#include <sys/stat.h> -#endif -#include <stdarg.h> -#ifndef WINDOWS -#include <sys/time.h> -#else -#include <sys/timeb.h> -#endif -#include <locale.h> - -#include <stdint.h> - #include "common.h" #include "compound.h" #include "cundo.h" #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "paths.h" #include "track.h" #include "trackx.h" -#include "utility.h" #include "version.h" +#include "common-ui.h" EXPORT long adjTimer; static void DemoInitValues( void ); -extern char *userLocale; static int log_playbackCursor = 0; @@ -89,20 +58,22 @@ static paramTextData_t recordTextData = { 50, 16 }; static paramData_t recordPLs[] = { #define I_RECSTOP (0) #define recStopB ((wButton_p)recordPLs[I_RECSTOP].control) - { PD_BUTTON, (void*)DoRecordButton, "stop", PDO_NORECORD, NULL, N_("Stop"), 0, (void*)0 }, + { PD_BUTTON, DoRecordButton, "stop", PDO_NORECORD, NULL, N_("Stop"), 0, I2VP(0) }, #define I_RECMESSAGE (1) #define recMsgB ((wButton_p)recordPLs[I_RECMESSAGE].control) - { PD_BUTTON, (void*)DoRecordButton, "message", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Message"), 0, (void*)2 }, + { PD_BUTTON, DoRecordButton, "message", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Message"), 0, I2VP(2) }, #define I_RECEND (2) #define recEndB ((wButton_p)recordPLs[I_RECEND].control) - { PD_BUTTON, (void*)DoRecordButton, "end", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("End"), BO_DISABLED, (void*)4 }, + { PD_BUTTON, DoRecordButton, "end", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("End"), BO_DISABLED, I2VP(4) }, #define I_RECTEXT (3) #define recordT ((wText_p)recordPLs[I_RECTEXT].control) { PD_TEXT, NULL, "text", PDO_NORECORD|PDO_DLGRESIZE, &recordTextData, NULL, BT_CHARUNITS|BO_READONLY} }; -static paramGroup_t recordPG = { "record", 0, recordPLs, sizeof recordPLs/sizeof recordPLs[0] }; +static paramGroup_t recordPG = { "record", 0, recordPLs, COUNT( recordPLs ) }; #ifndef WINDOWS +#include <sys/time.h> + static struct timeval lastTim = {0,0}; static void ComputePause( void ) { @@ -121,6 +92,8 @@ static void ComputePause( void ) lastTim = tim; } #else +#include <sys/timeb.h> + static struct _timeb lastTim; static void ComputePause( void ) { @@ -208,7 +181,7 @@ static void DoRecordButton( void * context ) char * cp; int len; - switch( (int)(long)context ){ + switch( (int)VP2L(context) ){ case 0: /* Stop */ fprintf( recordF, "CLEAR\nMESSAGE\n"); fprintf( recordF, N_("End of Playback. Hit Step to exit\n")); @@ -292,7 +265,7 @@ EXPORT void DoRecord( void * context ) static drawCmd_p playbackD = NULL; static wDrawBitMap_p playbackBm = NULL; static wDrawColor playbackColor; -static wPos_t playbackX, playbackY; +static coOrd playbackPos; static wBool_t bDoFlash = FALSE; static wDrawColor flashColor; @@ -369,18 +342,17 @@ char * DrawBitMapToString(DrawBitMap_e dbm) { static void MacroDrawBitMap( DrawBitMap_e dbm, wDrawBitMap_p bm, - wPos_t x, - wPos_t y, + coOrd pos, wDrawColor color ) { - wDrawBitMap( playbackD->d, bm, x, y, color, wDrawOptTemp|wDrawOptNoClip ); - wFlush(); + DrawBitMap( playbackD, pos, bm, color ); +// wFlush(); - LOG( log_playbackCursor, 1, ("%s %d DrawBitMap( %p %p %d %d %d %d )\n", DrawBitMapToString(dbm), DBMCount++, playbackD->d, bm, x, y, color, wDrawOptTemp|wDrawOptNoClip ) ); + LOG( log_playbackCursor, 2, ("%s %d DrawBitMap( %p %p [%0.3f %0.3f] %d )\n", DrawBitMapToString(dbm), DBMCount++, playbackD->d, bm, pos, color ) ); } -static void Flash( drawCmd_p d, wPos_t x, wPos_t y, wDrawColor color ) +static void Flash( wDrawColor color ) { bDoFlash = TRUE; flashColor = color; @@ -408,21 +380,26 @@ static void SetPlaybackSpeed( EXPORT void RedrawPlaybackCursor() { if ( playbackD && playbackBm && inPlayback) { - wBool_t ret; - if ( playbackD->d != mainD.d ) - ret = wDrawSetTempMode( playbackD->d, TRUE ); + unsigned long options = playbackD->options; + playbackD->options |= DC_TEMP; + wBool_t bTemp = wDrawSetTempMode( playbackD->d, TRUE ); if ( bDoFlash && playbackTimer == 0 ) { - MacroDrawBitMap( FLASH_PLUS, flash_bm, playbackX, playbackY, flashColor ); + MacroDrawBitMap( FLASH_PLUS, flash_bm, playbackPos, flashColor ); + wDrawSetTempMode( playbackD->d, FALSE ); wPause( flashTO*2 ); + wDrawSetTempMode( playbackD->d, TRUE ); if ( flashTwice ) { - MacroDrawBitMap( FLASH_PLUS, flash_bm, playbackX, playbackY, flashColor ); + MacroDrawBitMap( FLASH_PLUS, flash_bm, playbackPos, flashColor ); + wDrawSetTempMode( playbackD->d, FALSE ); wPause( flashTO*2 ); + wDrawSetTempMode( playbackD->d, TRUE ); } bDoFlash = FALSE; } - MacroDrawBitMap( DRAW, playbackBm, playbackX, playbackY, playbackColor ); - if ( playbackD->d != mainD.d ) - wDrawSetTempMode( playbackD->d, ret ); + MacroDrawBitMap( DRAW, playbackBm, playbackPos, playbackColor ); + wDrawSetTempMode( playbackD->d, bTemp ); + playbackD->options = options; + wFlush(); } } @@ -434,46 +411,33 @@ static void MoveCursor( wDrawBitMap_p bm, wDrawColor color ) { - DIST_T dist, dx, dy; - coOrd pos1, dpos; + DIST_T dist; + coOrd dpos; int i, steps; - wPos_t x, y; - wPos_t x0=playbackX; - wPos_t y0=playbackY; if (d == NULL) return; - d->CoOrd2Pix( d, pos, &x, &y ); - if (playbackTimer == 0 /*&& !didPause*/) { playbackBm = bm; playbackColor = color; - dx = (DIST_T)(x-x0); - dy = (DIST_T)(y-y0); - dist = sqrt( dx*dx + dy*dy ); - steps = (int)(dist / PixelsPerStep ) + 1; - dx /= steps; - dy /= steps; - d->Pix2CoOrd( d, x0, y0, &pos1 ); - dpos.x = (pos.x-pos1.x)/steps; - dpos.y = (pos.y-pos1.y)/steps; + dist = FindDistance( playbackPos, pos ); + steps = (int)(dist / (PixelsPerStep*d->scale/d->dpi)) + 1; + LOG( log_playbackCursor, 1, ( "PBC: [%0.3f %0.3f] - [%0.3f %0.3f] Dist:%0.3f Steps:%d\n", playbackPos.x, playbackPos.y, pos.x, pos.y, dist, steps ) ); - for ( i=1; i<=steps; i++ ) { - - playbackX = x0+(wPos_t)(i*dx); - playbackY = y0+(wPos_t)(i*dy); + dpos.x = (pos.x-playbackPos.x)/steps; + dpos.y = (pos.y-playbackPos.y)/steps; - pos1.x += dpos.x; - pos1.y += dpos.y; + for ( i=1; i<=steps; i++ ) { + playbackPos.x += dpos.x; + playbackPos.y += dpos.y; if ( proc != NULL ) { - proc( action, pos1 ); + proc( action, playbackPos ); } else { TempRedraw(); } -// DrawPlaybackCursor( d, bm, xx, yy, color ); if ( d->d == mainD.d ) { - InfoPos( pos1 ); + InfoPos( playbackPos ); wFlush(); } // Simple mouse moves happen twice as fast @@ -484,10 +448,8 @@ static void MoveCursor( return; } } - } else { - playbackX = x; - playbackY = y; } + playbackPos = pos; } @@ -500,15 +462,10 @@ static void PlaybackCursor( { wDrawBitMap_p bm = playbackBm; playbackD = d; - wPos_t x, y; long time0, time1; time0 = wGetTimer(); - d->CoOrd2Pix( d, pos, &x, &y ); - - - switch( action&0xFF ) { case wActionMove: @@ -520,7 +477,7 @@ static void PlaybackCursor( bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow0_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow0_ctl_bm:arrow0_bm); MoveCursor( d, proc, wActionMove, pos, bm, wDrawColorBlack ); //Go to spot bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow3_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow3_ctl_bm:arrow3_bm); - Flash( d, x, y, playbackColor=rightDragColor ); + Flash( playbackColor=rightDragColor ); proc( action, pos ); /* no break */ @@ -532,7 +489,7 @@ static void PlaybackCursor( case C_UP: bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow3_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow3_ctl_bm:arrow0_bm); MoveCursor( d, proc, C_MOVE, pos, bm, rightDragColor ); - Flash( d, x, y, rightDragColor ); + Flash( rightDragColor ); proc( action, pos ); bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow0_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow0_ctl_bm:arrow0_bm); MoveCursor( d, NULL, 0, pos, bm, wDrawColorBlack ); @@ -542,7 +499,7 @@ static void PlaybackCursor( bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow0_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow0_ctl_bm:arrow0_bm); MoveCursor( d, proc, wActionMove, pos, bm, wDrawColorBlack ); //Go to spot bm = ((MyGetKeyState()&WKEY_SHIFT)?arrowr3_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrowr3_ctl_bm:arrowr3_bm); - Flash( d, x, y, playbackColor=leftDragColor ); + Flash( playbackColor=leftDragColor ); proc( action, pos ); /* no break */ @@ -554,7 +511,7 @@ static void PlaybackCursor( case C_RUP: bm = ((MyGetKeyState()&WKEY_SHIFT)?arrowr3_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrowr3_ctl_bm:arrowr3_bm); MoveCursor( d, proc, C_RMOVE, pos, bm, leftDragColor ); - Flash( d, x, y, leftDragColor ); + Flash( leftDragColor ); proc( action, pos ); bm = ((MyGetKeyState()&WKEY_SHIFT)?arrow0_shift_bm:(MyGetKeyState()&WKEY_CTRL)?arrow0_ctl_bm:arrow0_bm); MoveCursor( d, NULL, 0, pos, bm, wDrawColorBlack ); @@ -563,7 +520,8 @@ static void PlaybackCursor( case C_REDRAW: proc( action, pos ); //Send Redraw to functions playbackD = &tempD; - MacroDrawBitMap( REDRAW, playbackBm, playbackX, playbackY, playbackColor ); + playbackPos = pos; + MacroDrawBitMap( REDRAW, playbackBm, playbackPos, playbackColor ); break; case C_TEXT: @@ -597,30 +555,42 @@ EXPORT void PlaybackMouse( EXPORT void MovePlaybackCursor( drawCmd_p d, - wPos_t x, - wPos_t y, wBool_t direct, wControl_p control) + coOrd pos, + wBool_t direct, wControl_p control) { - coOrd pos; +#ifdef MOVECURSORTOCOMMANDBUTTON + // Show the cursor clicking on the command button + // Not possile with current structure playbackD = &tempD; - d->Pix2CoOrd( d, x, y, &pos ); - d->CoOrd2Pix( d, pos, &x, &y ); if (!direct) MoveCursor( d, NULL, wActionMove, pos, arrow0_bm, wDrawColorBlack ); - wBool_t ret = wDrawSetTempMode( d->d, TRUE ); - MacroDrawBitMap( MOVE_PLYBCK1, arrow0_bm, x, y, wDrawColorBlack ); - MacroDrawBitMap( MOVE_PLYBCK2, arrow3_bm, x, y, rightDragColor ); - - Flash( d, x, y, rightDragColor ); + unsigned long options = d->options; + d->options |= DC_TEMP; + wBool_t bTemp = wDrawSetTempMode( d->d, TRUE ); + DoCurCommand( C_REDRAW, zero ); + MacroDrawBitMap( MOVE_PLYBCK1, arrow0_bm, pos, wDrawColorBlack ); + MacroDrawBitMap( MOVE_PLYBCK2, arrow3_bm, pos, rightDragColor ); + + Flash( rightDragColor ); if (direct) { wControlHilite(control,TRUE); } - MacroDrawBitMap( MOVE_PLYBCK3, arrow3_bm, x, y, rightDragColor ); - MacroDrawBitMap( MOVE_PLYBCK4, arrow0_bm, x, y, wDrawColorBlack ); + MacroDrawBitMap( MOVE_PLYBCK3, arrow3_bm, pos, rightDragColor ); + MacroDrawBitMap( MOVE_PLYBCK4, arrow0_bm, pos, wDrawColorBlack ); if (direct) { wPause(1000); wControlHilite(control,FALSE); } - wDrawSetTempMode( d->d, ret ); + wDrawSetTempMode( d->d, bTemp ); + d->options = options; +#else + // Just hilight the button + if ( control ) { + wControlHilite( control, TRUE ); + wPause( 1000 ); + wControlHilite( control, FALSE ); + } +#endif } /***************************************************************************** @@ -673,20 +643,20 @@ static paramTextData_t demoTextData = { 50, 16 }; static paramData_t demoPLs[] = { #define I_DEMOSTEP (0) #define demoStep ((wButton_p)demoPLs[I_DEMOSTEP].control) - { PD_BUTTON, (void*)DoDemoButton, "step", PDO_NORECORD, NULL, N_("Step"), BB_DEFAULT, (void*)0 }, + { PD_BUTTON, DoDemoButton, "step", PDO_NORECORD, NULL, N_("Step"), BB_DEFAULT, I2VP(0) }, #define I_DEMONEXT (1) #define demoNext ((wButton_p)demoPLs[I_DEMONEXT].control) - { PD_BUTTON, (void*)DoDemoButton, "next", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Next"), 0, (void*)1 }, + { PD_BUTTON, DoDemoButton, "next", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Next"), 0, I2VP(1) }, #define I_DEMOQUIT (2) #define demoQuit ((wButton_p)demoPLs[I_DEMOQUIT].control) - { PD_BUTTON, (void*)DoDemoButton, "quit", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Quit"), BB_CANCEL, (void*)3 }, + { PD_BUTTON, DoDemoButton, "quit", PDO_NORECORD|PDO_DLGHORZ, NULL, N_("Quit"), BB_CANCEL, I2VP(3) }, #define I_DEMOSPEED (3) #define demoSpeedL ((wList_p)demoPLs[I_DEMOSPEED].control) - { PD_DROPLIST, &playbackSpeed, "speed", PDO_NORECORD|PDO_LISTINDEX|PDO_DLGHORZ, (void*)80, N_("Speed") }, + { PD_DROPLIST, &playbackSpeed, "speed", PDO_NORECORD|PDO_LISTINDEX|PDO_DLGHORZ, I2VP(80), N_("Speed") }, #define I_DEMOTEXT (4) #define demoT ((wText_p)demoPLs[I_DEMOTEXT].control) { PD_TEXT, NULL, "text", PDO_NORECORD|PDO_DLGRESIZE, &demoTextData, NULL, BT_CHARUNITS|BO_READONLY} }; -static paramGroup_t demoPG = { "demo", 0, demoPLs, sizeof demoPLs/sizeof demoPLs[0] }; +static paramGroup_t demoPG = { "demo", 0, demoPLs, COUNT( demoPLs ) }; EXPORT int MyGetKeyState( void ) { @@ -764,7 +734,7 @@ static BOOL_T snapshotMouse = FALSE; EXPORT void TakeSnapshot( drawCmd_t * d ) { char * cp; - wPos_t ix, iy; + wWinPix_t ix, iy; if (d->dpi < 0) d->dpi = mainD.dpi; if (d->scale < 0) @@ -773,22 +743,26 @@ EXPORT void TakeSnapshot( drawCmd_t * d ) d->orig = mainD.orig; if (d->size.x < 0 || d->size.y < 0) d->size = mainD.size; - ix = (wPos_t)(d->dpi*d->size.x/d->scale); - iy = (wPos_t)(d->dpi*d->size.y/d->scale); + ix = (wWinPix_t)(d->dpi*d->size.x/d->scale); + iy = (wWinPix_t)(d->dpi*d->size.y/d->scale); d->d = wBitMapCreate( ix, iy, 8 ); if (d->d == (wDraw_p)0) { return; } DrawTracks( d, d->scale, d->orig, d->size ); - if ( snapshotMouse && playbackBm ) - wDrawBitMap( d->d, playbackBm, playbackX, playbackY, playbackColor, 0 ); - wDrawLine( d->d, 0, 0, ix-1, 0, 0, wDrawLineSolid, wDrawColorBlack, 0 ); - wDrawLine( d->d, ix-1, 0, ix-1, iy-1, 0, wDrawLineSolid, wDrawColorBlack, 0 ); - wDrawLine( d->d, ix-1, iy-1, 0, iy-1, 0, wDrawLineSolid, wDrawColorBlack, 0 ); - wDrawLine( d->d, 0, iy-1, 0, 0, 0, wDrawLineSolid, wDrawColorBlack, 0 ); + if ( snapshotMouse && playbackBm ) { + DrawBitMap( d, playbackPos, playbackBm, playbackColor ); + } + coOrd p0, s1; + DIST_T off = 0.02; + p0.x = off * d->scale; + p0.y = off * d->scale; + s1.x = d->size.x-off*2 * d->scale; + s1.y = d->size.y-off*2 * d->scale; + DrawRectangle( d, p0, s1, wDrawColorBlack, DRAW_CLOSED ); strcpy( message, paramFileName ); cp = message+strlen(message)-4; - sprintf( cp, "-%4.4d.xpm", documentSnapshotNum ); + sprintf( cp, "-%4.4d.png", documentSnapshotNum ); wBitMapWriteFile( d->d, message ); wBitMapDelete( d->d ); documentSnapshotNum++; @@ -975,7 +949,7 @@ static void PlaybackSetup( void ) wTextClear( demoT ); wShow( demoW ); wFlush(); - wPrefFlush(); + wPrefFlush(""); wWinSetBusy( mainW, TRUE ); wWinSetBusy( mapW, TRUE ); ParamSaveAll(); @@ -985,8 +959,7 @@ static void PlaybackSetup( void ) oldMainSize = mainD.size; oldMainScale = mainD.scale; oldScaleName = curScaleName; - playbackX = 0; - playbackY = 0; + playbackPos = zero; Reset(); paramVersion = -1; playbackColor=wDrawColorBlack; @@ -1003,7 +976,7 @@ static void Playback( void ) wIndex_t inx; long timeout; static enum { pauseCmd, mouseCmd, otherCmd } thisCmd, lastCmd; - int len; + size_t len; static wBool_t demoWinOnTop = FALSE; coOrd roomSize; char * cp, * cq; @@ -1018,8 +991,7 @@ static void Playback( void ) wWinTop( mainW ); demoWinOnTop = FALSE; } - char * oldLocale = NULL; - oldLocale = SaveLocale( "C" ); + SetCLocale(); while (TRUE) { if ( ! inPlayback ) // User pressed Quit @@ -1043,11 +1015,12 @@ static void Playback( void ) paramFile = fopen( demoFileName, "r" ); if ( paramFile == NULL ) { NoticeMessage( MSG_OPEN_FAIL, _("Continue"), NULL, _("Demo"), demoFileName, strerror(errno) ); - RestoreLocale( oldLocale ); inPlayback = FALSE; + SetUserLocale(); return; } + paramFileName = strdup( demoFileName ); playbackColor=wDrawColorBlack; paramLineNum = 0; wWinSetTitle( demoW, demoList( curDemo ).title ); @@ -1062,8 +1035,8 @@ static void Playback( void ) NoticeMessage( MSG_CANT_READ_DEMO, _("Continue"), NULL, sProdName, demoFileName ); fclose( paramFile ); paramFile = NULL; - RestoreLocale( oldLocale ); inPlayback = FALSE; + SetUserLocale(); return; } free(demoFileName); @@ -1111,8 +1084,8 @@ static void Playback( void ) wPause( 1000 ); EnableButtons( FALSE ); } else { - RestoreLocale( oldLocale ); inPlayback = FALSE; + SetUserLocale(); return; } } else if (strncmp( paramLine, "CLEAR", 5 ) == 0) { @@ -1129,8 +1102,8 @@ static void Playback( void ) wWinTop( demoW ); demoWinOnTop = TRUE; EnableButtons( TRUE ); - RestoreLocale( oldLocale ); inPlayback = FALSE; + SetUserLocale(); return; } PlaybackMessage( paramLine ); @@ -1142,7 +1115,7 @@ static void Playback( void ) DoSetScale( paramLine+6 ); } else if (strncmp( paramLine, "REDRAW", 6 ) == 0) { ResolveIndex(); - RecomputeElevations(); + RecomputeElevations(NULL); DoRedraw(); /*DoChangeNotification( CHANGE_ALL );*/ } else if (strncmp( paramLine, "COMMAND ", 8 ) == 0) { @@ -1212,7 +1185,17 @@ static void Playback( void ) wPause( timeout ); } } else if (strncmp( paramLine, "KEYSTATE ", 9 ) == 0 ) { - playbackKeyState = atoi( paramLine+9 ); + if ( strchr( "0123456789", paramLine[9] ) ) { + playbackKeyState = atoi( paramLine+9 ); + } else { + playbackKeyState = 0; + if ( strchr( paramLine+9, 'S' ) ) + playbackKeyState |= WKEY_SHIFT; + if ( strchr( paramLine+9, 'C' ) ) + playbackKeyState |= WKEY_CTRL; + if ( strchr( paramLine+9, 'A' ) ) + playbackKeyState |= WKEY_ALT; + } } else if (strncmp( paramLine, "TIMESTART", 9 ) == 0 ) { playbackTimer = wGetTimer(); } else if (strncmp( paramLine, "TIMEEND", 7 ) == 0 ) { @@ -1294,8 +1277,8 @@ static void Playback( void ) if (pauseDemo) { EnableButtons( TRUE ); pauseDemo = FALSE; - RestoreLocale( oldLocale ); inPlayback = FALSE; + SetUserLocale(); return; } } @@ -1309,7 +1292,7 @@ static void Playback( void ) } inPlayback = FALSE; PlaybackQuit(); - RestoreLocale( oldLocale ); + SetUserLocale(); } @@ -1341,7 +1324,7 @@ static int StartPlayback( int cnt, char **pathName, void * context ) static void DoDemoButton( void * command ) { - switch( (int)(long)command ) { + switch( VP2L(command) ) { case 0: /* step */ playbackNonStop = (wGetKeyState() & WKEY_SHIFT) != 0; @@ -1403,12 +1386,12 @@ static void CreateDemoW( void ) char * title = MakeWindowTitle(_("Demo")); demoW = ParamCreateDialog( &demoPG, title, NULL, NULL, NULL, FALSE, NULL, F_RESIZE, DemoDlgUpdate ); - wListAddValue( demoSpeedL, _("Slowest"), NULL, (void*)0 ); - wListAddValue( demoSpeedL, _("Slow"), NULL, (void*)1 ); - wListAddValue( demoSpeedL, _("Normal"), NULL, (void*)2 ); - wListAddValue( demoSpeedL, _("Fast"), NULL, (void*)3 ); - wListAddValue( demoSpeedL, _("Faster"), NULL, (void*)4 ); - wListAddValue( demoSpeedL, _("Fastest"), NULL, (void*)5 ); + wListAddValue( demoSpeedL, _("Slowest"), NULL, I2VP(0) ); + wListAddValue( demoSpeedL, _("Slow"), NULL, I2VP(1) ); + wListAddValue( demoSpeedL, _("Normal"), NULL, I2VP(2) ); + wListAddValue( demoSpeedL, _("Fast"), NULL, I2VP(3) ); + wListAddValue( demoSpeedL, _("Faster"), NULL, I2VP(4) ); + wListAddValue( demoSpeedL, _("Fastest"), NULL, I2VP(5) ); wListSetIndex( demoSpeedL, (wIndex_t)playbackSpeed ); playbackFile_fs = wFilSelCreate( mainW, FS_LOAD, 0, title, sRecordFilePattern, StartPlayback, NULL ); } @@ -1498,6 +1481,7 @@ static char * demoInitParams[] = { "grid show 0", "GROUP grid", "misc toolbarset 65535", + "misc cur-turnout-ep 0", "GROUP misc", "sticky set 67108479", /* 0x3fffe7f - all but Helix and Turntable */ "GROUP sticky", @@ -1529,8 +1513,10 @@ static void DemoInitValues( void ) wNoticeEx( NT_INFORMATION, _("Can not find PARAMETER playback proc"), _("Ok"), NULL ); return; } + paramHiliteFast = TRUE; for ( cpp = demoInitParams; *cpp; cpp++ ) paramPlaybackProc( *cpp ); + paramHiliteFast = FALSE; // Have to do this manually oldMagneticSnap = MagneticSnap( TRUE ); } @@ -1542,7 +1528,7 @@ static void DoDemo( void * demoNumber ) if (demoW == NULL) CreateDemoW(); wButtonSetLabel( demoNext, _("Next") ); - curDemo = (int)(long)demoNumber; + curDemo = (int)VP2L(demoNumber); if ( curDemo < 0 || curDemo >= demoList_da.cnt ) { NoticeMessage( MSG_DEMO_BAD_NUM, _("Ok"), NULL, curDemo ); return; @@ -1559,18 +1545,14 @@ static BOOL_T ReadDemo( { static wMenu_p m; char * cp; - char *oldLocale = NULL; char *path; if ( m == NULL ) m = demoM; if ( strncmp( line, "DEMOGROUP ", 10 ) == 0 ) { - if (userLocale) - oldLocale = SaveLocale(userLocale); m = wMenuMenuCreate( demoM, NULL, _(line+10) ); - if (oldLocale) - RestoreLocale(oldLocale); + } else if ( strncmp( line, "DEMO ", 5 ) == 0 ) { if (line[5] != '"') goto error; @@ -1583,14 +1565,10 @@ static BOOL_T ReadDemo( if ( strlen(cp)==0 ) goto error; DYNARR_APPEND( demoList_t, demoList_da, 10 ); - if (userLocale) - oldLocale = SaveLocale(userLocale); demoList( demoList_da.cnt-1 ).title = MyStrdup( _(line+6) ); MakeFullpath(&path, libDir, "demos", cp, NULL); demoList(demoList_da.cnt - 1).fileName = path; - wMenuPushCreate( m, NULL, _(line+6), 0, DoDemo, (void*)(intptr_t)(demoList_da.cnt-1) ); - if (oldLocale) - RestoreLocale(oldLocale); + wMenuPushCreate( m, NULL, _(line+6), 0, DoDemo, I2VP(demoList_da.cnt-1) ); } return TRUE; error: diff --git a/app/bin/manifest.c b/app/bin/manifest.c index 1652996..5fd9b5a 100644 --- a/app/bin/manifest.c +++ b/app/bin/manifest.c @@ -56,9 +56,9 @@ char* CreateManifest(char* nameOfLayout, char* background, char *copyOfFileName = MyStrdup(nameOfLayout); cJSON* a_object = cJSON_CreateObject(); cJSON_AddItemToObject(manifest, "layout", a_object); -#ifdef WINDOWS +#ifdef UTFCONVERT copyOfFileName = Convert2UTF8(copyOfFileName); -#endif // WINDOWS +#endif // UTFCONVERT cJSON_AddStringToObject(a_object, "name", copyOfFileName); MyFree(copyOfFileName); @@ -69,16 +69,16 @@ char* CreateManifest(char* nameOfLayout, char* background, cJSON_AddStringToObject(b_object, "name", "background"); backg = MyStrdup(FindFilename(background)); -#ifdef WINDOWS +#ifdef UTFCONVERT backg = Convert2UTF8(backg); #endif cJSON_AddStringToObject(b_object, "filename", backg); MyFree(backg); backg = MyStrdup(background); -#ifdef WINDOWS +#ifdef UTFCONVERT backg = Convert2UTF8(backg); ConvertPathForward(backg); -#endif // WINDOWS +#endif // UTFCONVERT cJSON_AddStringToObject(b_object, "copy-path", backg); cJSON_AddStringToObject(b_object, "arch-path", dependencyDir); MyFree(backg); @@ -108,16 +108,16 @@ char* ParseManifest(char* manifest, char* zip_directory) char* background_file[1] = { NULL }; char* layoutname; - char *oldLocale = SaveLocale("C"); + SetCLocale(); cJSON* json_manifest = cJSON_Parse(manifest); - RestoreLocale(oldLocale); + SetUserLocale(); cJSON* layout = cJSON_GetObjectItemCaseSensitive(json_manifest, "layout"); cJSON* name = cJSON_GetObjectItemCaseSensitive(layout, "name"); layoutname = cJSON_GetStringValue(name); -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(layoutname); -#endif // WINDOWS +#endif // UTFCONVERT LOG(log_zip, 1, ("Zip-Manifest %s \n", layoutname)) #if DEBUG @@ -136,7 +136,7 @@ char* ParseManifest(char* manifest, char* zip_directory) cJSON* archpath = cJSON_GetObjectItemCaseSensitive(dependency, "arch-path"); file = MyStrdup(cJSON_GetStringValue(filename)); path = MyStrdup(cJSON_GetStringValue(archpath)); -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(file); ConvertUTF8ToSystem(path); #endif diff --git a/app/bin/misc.c b/app/bin/misc.c index 2ac1e2f..e976481 100644 --- a/app/bin/misc.c +++ b/app/bin/misc.c @@ -20,34 +20,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#include "getopt.h" -#define R_OK (02) -#define access _access -#if _MSC_VER >1300 -#define strdup _strdup -#endif -#else -#include <sys/stat.h> -#endif -#include <locale.h> -#include <stdarg.h> -#include <stdint.h> + #include "cjoin.h" #include "common.h" @@ -57,20 +30,22 @@ #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "include/paramfilelist.h" #include "paths.h" #include "smalldlg.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" +#include "ctrain.h" + +#include <inttypes.h> + +#include <stdint.h> #define DEFAULT_SCALE ("N") -char *userLocale = NULL; extern wBalloonHelp_t balloonHelp[]; @@ -84,7 +59,6 @@ static wMenuToggle_p magnetsMI; #ifdef CHECK_UNUSED_BALLOONHELP static void ShowUnusedBalloonHelp(void); #endif -void DoCarDlg(void); /**************************************************************************** * @@ -92,6 +66,8 @@ void DoCarDlg(void); * */ +EXPORT int iconSize = 0; + EXPORT int foobar = 0; EXPORT int log_error; @@ -99,8 +75,6 @@ static int log_command; EXPORT wWin_p mainW; -EXPORT wIndex_t changed = 0; - EXPORT char message[STR_HUGE_SIZE]; static char message2[STR_LONG_SIZE]; @@ -119,6 +93,7 @@ EXPORT wButton_p redoB; EXPORT wButton_p zoomUpB; EXPORT wButton_p zoomDownB; +EXPORT wButton_p zoomExtentsB; wButton_p mapShowB; wButton_p magnetsB; wButton_p backgroundB; @@ -143,17 +118,17 @@ EXPORT DIST_T easeR = 0.0; EXPORT DIST_T easeL = 0.0; EXPORT coOrd cmdMenuPos; -EXPORT wPos_t DlgSepLeft = 12; -EXPORT wPos_t DlgSepMid = 18; -EXPORT wPos_t DlgSepRight = 12; -EXPORT wPos_t DlgSepTop = 12; -EXPORT wPos_t DlgSepBottom = 12; -EXPORT wPos_t DlgSepNarrow = 6; -EXPORT wPos_t DlgSepWide = 12; -EXPORT wPos_t DlgSepFrmLeft = 4; -EXPORT wPos_t DlgSepFrmRight = 4; -EXPORT wPos_t DlgSepFrmTop = 4; -EXPORT wPos_t DlgSepFrmBottom = 4; +EXPORT wWinPix_t DlgSepLeft = 12; +EXPORT wWinPix_t DlgSepMid = 18; +EXPORT wWinPix_t DlgSepRight = 12; +EXPORT wWinPix_t DlgSepTop = 12; +EXPORT wWinPix_t DlgSepBottom = 12; +EXPORT wWinPix_t DlgSepNarrow = 6; +EXPORT wWinPix_t DlgSepWide = 12; +EXPORT wWinPix_t DlgSepFrmLeft = 4; +EXPORT wWinPix_t DlgSepFrmRight = 4; +EXPORT wWinPix_t DlgSepFrmTop = 4; +EXPORT wWinPix_t DlgSepFrmBottom = 4; static int verbose = 0; @@ -162,11 +137,11 @@ static BOOL_T inMainW = TRUE; static long stickySet = 0; static long stickyCnt = 0; -static char * stickyLabels[33]; +static const char * stickyLabels[33]; #define TOOLBARSET_INIT (0xFFFF) EXPORT long toolbarSet = TOOLBARSET_INIT; -EXPORT wPos_t toolbarHeight = 0; -static wPos_t toolbarWidth = 0; +EXPORT wWinPix_t toolbarHeight = 0; +static wWinPix_t toolbarWidth = 0; static wMenuList_p messageList_ml; static BOOL_T messageListEmpty = TRUE; @@ -189,53 +164,121 @@ extern wBool_t wDrawDoTempDraw; * */ -EXPORT long totalMallocs = 0; -EXPORT long totalMalloced = 0; -EXPORT long totalRealloced = 0; -EXPORT long totalReallocs = 0; -EXPORT long totalFreeed = 0; -EXPORT long totalFrees = 0; +EXPORT size_t totalMallocs = 0; +EXPORT size_t totalMalloced = 0; +EXPORT size_t totalRealloced = 0; +EXPORT size_t totalReallocs = 0; +EXPORT size_t totalFreeed = 0; +EXPORT size_t totalFrees = 0; + +static void * StorageLog; + +typedef struct slog_t { + void * storage_p; + size_t storage_size; + BOOL_T freed; +} slog_t, * slog_p; + +static int StorageLogCurrent = 0; + + +#define LOG_SIZE 1000000 + static unsigned long guard0 = 0xDEADBEEF; static unsigned long guard1 = 0xAF00BA8A; static int log_malloc; -EXPORT void * MyMalloc(long size) { +static void RecordMalloc(void * p, size_t size) { + + + if (!StorageLog) StorageLog = malloc(sizeof(slog_t)*LOG_SIZE); + slog_p log_p = StorageLog; + if (StorageLogCurrent<LOG_SIZE) { + log_p[StorageLogCurrent].storage_p = p; + log_p[StorageLogCurrent].storage_size = size; + StorageLogCurrent++; + } else { + printf("Storage Log size exceeded, wrapped\n"); + log_p[0].storage_p = p; + log_p[0].storage_size = size; + StorageLogCurrent = 1; + } +} + +static void RecordMyFree(void *p) { + slog_p log_p = StorageLog; + if (log_p) { + for (int i=0;i<StorageLogCurrent;i++) { + if (!log_p[i].freed && log_p[i].storage_p == p) { + log_p[i].freed = TRUE; + } + } + } +} + +#define SLOG_FMT "0x%.12" PRIxPTR + +EXPORT BOOL_T TestMallocs() { + size_t oldSize; + size_t testedMallocs = 0; + void * old; + slog_p log_p = StorageLog; + BOOL_T rc = TRUE; + if (log_p) { + for (int i=0;i<StorageLogCurrent;i++) { + if (log_p[i].freed) continue; + old = log_p[i].storage_p; + oldSize = log_p[i].storage_size; + if (*(unsigned long*) ((char*) old - sizeof(unsigned long)) != guard0) { + LogPrintf("Guard 0 hosed, " SLOG_FMT " size: %llu \n", (uintptr_t)old, oldSize); + rc = FALSE; + } + if (*(unsigned long*) ((char*) old + oldSize) != guard1) { + LogPrintf("Guard 1 hosed, " SLOG_FMT " size: %llu \n", (uintptr_t)old, oldSize); + rc = FALSE; + } + testedMallocs++; + } + } + LogPrintf("Tested: %llu Mallocs: %llu Total Malloced: %llu Freed: %llu Total Freed: %llu \n", + testedMallocs, totalMallocs, totalMalloced, totalFrees, totalFreeed); + return rc; +} + + +EXPORT void * MyMalloc(size_t size) { void * p; totalMallocs++; totalMalloced += size; -#if defined(WINDOWS) && ! defined(WIN32) - if ( size > 65500L ) { - AbortProg( "mallocing > 65500 bytes" ); - } -#endif p = malloc((size_t) size + sizeof(size_t) + 2 * sizeof(unsigned long)); if (p == NULL) AbortProg("No memory"); LOG1(log_malloc, - ( "Malloc(%ld) = %lx (%lx-%lx)\n", size, (long)((char*)p+sizeof (size_t) + sizeof (unsigned long)), (long)p, (long)((char*)p+size+sizeof (size_t) + 2 * sizeof(unsigned long)) )); + ( " Malloc(%ld) = " SLOG_FMT " (" SLOG_FMT "-" SLOG_FMT ")\n", + size, (size_t)((char*)p+sizeof (size_t) + sizeof (unsigned long)), + (size_t)p, + (size_t)((char*)p+size+sizeof (size_t) + 2 * sizeof(unsigned long)))); + *(size_t*) p = (size_t) size; p = (char*) p + sizeof(size_t); *(unsigned long*) p = guard0; p = (char*) p + sizeof(unsigned long); *(unsigned long*) ((char*) p + size) = guard1; memset(p, 0, (size_t )size); + if (extraButtons) + RecordMalloc(p,size); return p; } -EXPORT void * MyRealloc(void * old, long size) { +EXPORT void * MyRealloc(void * old, size_t size) { size_t oldSize; void * new; if (old == NULL) return MyMalloc(size); totalReallocs++; totalRealloced += size; -#if defined(WINDOWS) && ! defined(WIN32) - if ( size > 65500L ) { - AbortProg( "reallocing > 65500 bytes" ); - } -#endif if (*(unsigned long*) ((char*) old - sizeof(unsigned long)) != guard0) { AbortProg("Guard0 is hosed"); } @@ -243,7 +286,9 @@ EXPORT void * MyRealloc(void * old, long size) { if (*(unsigned long*) ((char*) old + oldSize) != guard1) { AbortProg("Guard1 is hosed"); } - LOG1(log_malloc, ("Realloc(%lx,%ld) was %d\n", (long)old, size, oldSize )) + + LOG1(log_malloc, (" Realloc (" SLOG_FMT ",%ld) was %d\n", (size_t)old, size, oldSize )) + if ((long) oldSize == size) { return old; } @@ -271,10 +316,18 @@ EXPORT void MyFree(void * ptr) { if (*(unsigned long*) ((char*) ptr + oldSize) != guard1) { AbortProg("Guard1 is hosed"); } + LOG1(log_malloc, - ("Free %d at %lx (%lx-%lx)\n", oldSize, (long)ptr, (long)((char*)ptr-sizeof *(size_t*)0-sizeof *(long*)0), (long)((char*)ptr+oldSize+sizeof *(long*)0))) + (" Free %d at " SLOG_FMT " (" SLOG_FMT "-" SLOG_FMT ")\n", + oldSize, + (size_t)ptr, + (size_t)((char*)ptr-sizeof *(size_t*)0-sizeof *(long*)0), + (size_t)((char*)ptr+oldSize+sizeof *(long*)0))); + totalFreeed += oldSize; free((char*) ptr - sizeof *(long*) 0 - sizeof *(size_t*) 0); + if (extraButtons) + RecordMyFree(ptr); } } @@ -323,7 +376,7 @@ EXPORT char * ConvertToEscapedText(const char * text) { } text_i++; } - unsigned cnt = strlen(text) + 1 + add; + size_t cnt = strlen(text) + 1 + add; #ifdef WINDOWS cnt *= 2; #endif @@ -364,9 +417,9 @@ EXPORT char * ConvertToEscapedText(const char * text) { text_i++; } cout[cout_i] = '\0'; -#ifdef WINDOWS - wSystemToUTF8(cout, cout, cnt); -#endif // WINDOWS +#ifdef UTFCONVERT + wSystemToUTF8(cout, cout, (unsigned int)cnt); +#endif // UTFCONVERT return cout; } @@ -424,7 +477,7 @@ EXPORT char * ConvertFromEscapedText(const char * text) { return cout; } -EXPORT void AbortProg(char * msg, ...) { +EXPORT void AbortProg(const char * msg, ...) { static BOOL_T abort2 = FALSE; int rc; va_list ap; @@ -437,15 +490,15 @@ EXPORT void AbortProg(char * msg, ...) { strcat(message, _("\nDo you want to save your layout?")); rc = wNoticeEx( NT_ERROR, message, _("Ok"), _("ABORT")); if (rc) { - DoSaveAs((doSaveCallBack_p) abort); + DoSaveAs(abort); } else { abort(); } } } -EXPORT char * Strcpytrimed(char * dst, char * src, BOOL_T double_quotes) { - char * cp; +EXPORT char * Strcpytrimed(char * dst, const char * src, BOOL_T double_quotes) { + const char * cp; while (*src && isspace((unsigned char) *src)) src++; if (!*src) @@ -464,10 +517,6 @@ EXPORT char * Strcpytrimed(char * dst, char * src, BOOL_T double_quotes) { static char * directory; -#ifdef WINDOWS -#define F_OK (0) -#endif - EXPORT wBool_t CheckHelpTopicExists(const char * topic) { char * htmlFile; @@ -501,8 +550,8 @@ EXPORT wBool_t CheckHelpTopicExists(const char * topic) { } -EXPORT char * BuildTrimedTitle(char * cp, char * sep, char * mfg, char * desc, - char * partno) { +EXPORT char * BuildTrimedTitle(char * cp, const char * sep, const char * mfg, const char * desc, + const char * partno) { cp = Strcpytrimed(cp, mfg, FALSE); strcpy(cp, sep); cp += strlen(cp); @@ -529,7 +578,7 @@ static void ShowMessageHelp(int index, const char * label, void * data) { wHelp(msgKey); } -static char * ParseMessage(char *msgSrc) { +static const char * ParseMessage(const char *msgSrc) { char *cp1 = NULL, *cp2 = NULL; static char shortMsg[STR_SIZE]; cp1 = strchr(_(msgSrc), '\t'); @@ -556,11 +605,11 @@ static char * ParseMessage(char *msgSrc) { } } -EXPORT void InfoMessage(char * format, ...) { +EXPORT void InfoMessage(const char * format, ...) { va_list ap; va_start(ap, format); format = ParseMessage(format); - vsprintf(message2, format, ap); + vsnprintf(message2, 1020, format, ap); va_end(ap); /*InfoSubstituteControl( NULL, NULL );*/ if (inError) @@ -568,11 +617,11 @@ EXPORT void InfoMessage(char * format, ...) { SetMessage(message2); } -EXPORT void ErrorMessage(char * format, ...) { +EXPORT void ErrorMessage(const char * format, ...) { va_list ap; va_start(ap, format); format = ParseMessage(format); - vsprintf(message2, format, ap); + vsnprintf(message2, 1020, format, ap); va_end(ap); InfoSubstituteControls( NULL, NULL); SetMessage(message2); @@ -580,37 +629,27 @@ EXPORT void ErrorMessage(char * format, ...) { inError = TRUE; } -EXPORT int NoticeMessage(char * format, char * yes, char * no, ...) { +EXPORT int NoticeMessage(const char * format, const char * yes, const char * no, ...) { va_list ap; va_start(ap, no); format = ParseMessage(format); - vsprintf(message2, format, ap); + vsnprintf(message2, 1020, format, ap); va_end(ap); return wNotice(message2, yes, no); } -EXPORT int NoticeMessage2(int playbackRC, char * format, char * yes, char * no, +EXPORT int NoticeMessage2(int playbackRC, const char * format, const char * yes, const char * no, ...) { va_list ap; if (inPlayback) return playbackRC; va_start(ap, no); format = ParseMessage(format); - vsprintf(message2, format, ap); + vsnprintf(message2, 1020, format, ap); va_end(ap); return wNoticeEx( NT_INFORMATION, message2, yes, no); } -/** -* Set the file's changed flag and update the window title. -*/ - -void -FileIsChanged(void) -{ - changed++; - SetWindowTitle(); -} /***************************************************************************** * @@ -652,16 +691,16 @@ Confirm(char * label2, doSaveCallBack_p after) return(rc != 0); } -static void ChkLoad(void) { +static void ChkLoad(void * unused) { Confirm(_("Load"), DoLoad); } -static void ChkExamples( void ) +static void ChkExamples( void * unused ) { Confirm(_("examples"), DoExamples); } -static void ChkRevert(void) +static void ChkRevert(void * unused) { int rc; @@ -673,7 +712,7 @@ static void ChkRevert(void) if (rc) { /* load the file */ char *filename = GetLayoutFullPath(); - LoadTracks(1, &filename, NULL); + LoadTracks(1, &filename, I2VP(1)); //Keep background } } } @@ -693,15 +732,15 @@ static void ChkFileList(int index, const char * label, void * data) { */ EXPORT void SaveState(void) { - wPos_t width, height; + wWinPix_t width, height; const char * fileName; void * pathName; char file[6]; int inx; wWinGetSize(mainW, &width, &height); - wPrefSetInteger("draw", "mainwidth", width); - wPrefSetInteger("draw", "mainheight", height); + wPrefSetInteger("draw", "mainwidth", (int)width); + wPrefSetInteger("draw", "mainheight", (int)height); SaveParamFileList(); ParamUpdatePrefs(); @@ -720,8 +759,7 @@ EXPORT void SaveState(void) { } } } - wPrefFlush(); - LogClose(); + wPrefFlush(""); } /* @@ -729,16 +767,15 @@ EXPORT void SaveState(void) { */ static void DoQuitAfter(void) { changed = 0; + CleanupFiles(); //Get rid of checkpoint if we quit. SaveState(); - - CleanupFiles(); } /** * Process shutdown request. This function is called when the user requests * to close the application. Before shutting down confirmation is gotten to * prevent data loss. */ -void DoQuit(void) { +void DoQuit(void * unused) { if (Confirm(_("Quit"), DoQuitAfter)) { #ifdef CHECK_UNUSED_BALLOONHELP @@ -765,7 +802,7 @@ static void DoClearAfter(void) { LayoutBackGroundInit(TRUE); } -static void DoClear(void) { +static void DoClear(void * unused) { Confirm(_("Clear"), DoClearAfter); } @@ -773,7 +810,7 @@ static void DoClear(void) { * Toggle visibility state of map window. */ -void MapWindowToggleShow(void) { +void MapWindowToggleShow(void * unused) { MapWindowShow(!mapVisible); } @@ -812,7 +849,7 @@ int MagneticSnap(int state) /** * Toggle magnets on/off */ -void MagneticSnapToggle(void) { +void MagneticSnapToggle(void * unused) { MagneticSnap(!magneticSnap); } @@ -860,6 +897,7 @@ EXPORT void wHide(wWin_p win) { if (inMainW && win == aboutW) return; wMenuListDelete(winList_mi, wWinGetTitle(win)); + ParamResetInvalid( win ); if (inPlayback) for (inx = 0; inx < demoWindows_da.cnt; inx++) if ( demoWindows(inx) == win) @@ -890,7 +928,7 @@ EXPORT void DefaultProc(wWin_p win, winProcEvent e, void * data) { static void NextWindow(void) { } -EXPORT void SelectFont(void) { +EXPORT void SelectFont(void * unused) { wSelectFont(_("XTrackCAD Font")); } @@ -900,14 +938,14 @@ EXPORT void SelectFont(void) { * */ -#define COMMAND_MAX (170) -#define BUTTON_MAX (170) +#define COMMAND_MAX (180) +#define BUTTON_MAX (180) #define NUM_CMDMENUS (4) static struct { wControl_p control; wBool_t enabled; - wPos_t x, y; + wWinPix_t x, y; long options; int group; wIndex_t cmdInx; @@ -934,7 +972,7 @@ static int commandCnt = 0; int * balloonHelpCnts; #endif -EXPORT const char * GetBalloonHelpStr(char * helpKey) { +EXPORT const char * GetBalloonHelpStr(const char * helpKey) { wBalloonHelp_t * bh; #ifdef CHECK_UNUSED_BALLOONHELP if ( balloonHelpCnts == NULL ) { @@ -1032,6 +1070,26 @@ EXPORT wIndex_t GetCurrentCommand() { static wIndex_t autosave_count = 0; +EXPORT void TryCheckPoint() { + if (checkPtInterval > 0 + && changed >= checkPtMark + (wIndex_t) checkPtInterval + && !inPlayback) { + DoCheckPoint(); + checkPtMark = changed; + + autosave_count++; + + if ((autosaveChkPoints>0) && (autosave_count>=autosaveChkPoints)) { + if ( bReadOnly || *(GetLayoutFilename()) == '\0') { + SetAutoSave(); + } else + DoSave(NULL); + InfoMessage(_("File AutoSaved")); + autosave_count = 0; + } + } +} + EXPORT void Reset(void) { if (recordF) { fprintf(recordF, "RESET\n"); @@ -1052,22 +1110,8 @@ EXPORT void Reset(void) { (wButton_p) buttonList[commandList[curCommand].buttInx].control, TRUE); tempSegs_da.cnt = 0; - if (checkPtInterval > 0 - && changed >= checkPtMark + (wIndex_t) checkPtInterval - && !inPlayback) { - DoCheckPoint(); - checkPtMark = changed; - - autosave_count++; - - if ((autosaveChkPoints>0) && (autosave_count>=autosaveChkPoints)) { - DoSave(NULL); - InfoMessage(_("File AutoSaved")); - autosave_count = 0; - } - } - + TryCheckPoint(); ClrAllTrkBits( TB_UNDRAWN ); DoRedraw(); // Reset @@ -1238,8 +1282,11 @@ EXPORT wBool_t DoCurCommand(wAction_t action, coOrd pos) { if (commandList[curCommand].options & IC_NORESTART) { return C_CONTINUE; } + //Make sure we checkpoint even sticky commands + TryCheckPoint(); LOG(log_command, 1, ( "COMMAND START %s\n", commandList[curCommand].helpKey )) + wSetCursor(mainD.d,defaultCursor); rc = commandList[curCommand].cmdProc( C_START, pos); LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) switch (rc) { @@ -1261,9 +1308,12 @@ EXPORT wBool_t DoCurCommand(wAction_t action, coOrd pos) { return rc; } -EXPORT void ConfirmReset(BOOL_T retry) { +/* + * \parm reset says if the user used Esc rather than undo/redo + */ +EXPORT int ConfirmReset(BOOL_T retry) { wAction_t rc; - if (curCommand != describeCmdInx && curCommand != selectCmdInx) { + if (curCommand != describeCmdInx) { LOG(log_command, 3, ( "COMMAND CONFIRM %s\n", commandList[curCommand].helpKey )) rc = commandList[curCommand].cmdProc( C_CONFIRM, zero); @@ -1274,25 +1324,25 @@ EXPORT void ConfirmReset(BOOL_T retry) { wNotice3( _( "Cancelling the current command will undo the changes\n" - "you are currently making. Do you want to update?"), + "you are currently making. Do you want to do the update instead?"), _("Yes"), _("No"), _("Cancel")); else rc = wNoticeEx( NT_WARNING, _( "Cancelling the current command will undo the changes\n" - "you are currently making. Do you want to update?"), + "you are currently making. Do you want to do the update instead?"), _("Yes"), _("No")); if (rc == 1) { LOG(log_command, 3, ( "COMMAND OK %s\n", commandList[curCommand].helpKey )) commandList[curCommand].cmdProc( C_OK, zero); - return; + return C_OK; } else if (rc == -1) { - return; + return C_CANCEL; } } else if (rc == C_TERMINATE) { - return; + return C_TERMINATE; } } if (retry) { @@ -1303,6 +1353,7 @@ EXPORT void ConfirmReset(BOOL_T retry) { LOG(log_command, 1, ( "COMMAND RESET %s\n", commandList[curCommand].helpKey )) commandList[curCommand].cmdProc( C_START, zero); + return C_CONTINUE; } EXPORT BOOL_T IsCurCommandSticky(void) { @@ -1319,7 +1370,7 @@ EXPORT void ResetIfNotSticky(void) { } EXPORT void DoCommandB(void * data) { - wIndex_t inx = (wIndex_t) (long) data; + wIndex_t inx = (wIndex_t)VP2L(data); STATUS_T rc; static coOrd pos = { 0, 0 }; static int inDoCommandB = FALSE; @@ -1365,6 +1416,10 @@ EXPORT void DoCommandB(void * data) { ( "COMMAND CANCEL %s\n", commandList[curCommand].helpKey )) commandList[curCommand].cmdProc( C_CANCEL, pos); tempSegs_da.cnt = 0; + } else { + LOG(log_command, 3, + ( "COMMAND FINISH %s\n", commandList[curCommand].helpKey )) + rc = commandList[curCommand].cmdProc( C_FINISH, zero); } if (commandList[curCommand].buttInx >= 0) wButtonSetBusy( @@ -1385,7 +1440,7 @@ EXPORT void DoCommandB(void * data) { wControlSetHelp(buttonList[buttInx].control, GetBalloonHelpStr(commandList[curCommand].helpKey)); wControlSetContext(buttonList[buttInx].control, - (void*) (intptr_t) curCommand); + I2VP(curCommand)); buttonList[buttInx].cmdInx = curCommand; } wButtonSetBusy( @@ -1394,6 +1449,7 @@ EXPORT void DoCommandB(void * data) { } LOG(log_command, 1, ( "COMMAND START %s\n", commandList[curCommand].helpKey )) + wSetCursor(mainD.d,defaultCursor); rc = commandList[curCommand].cmdProc( C_START, pos); LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) TempRedraw(); // DoCommandB @@ -1419,16 +1475,17 @@ EXPORT void DoCommandB(void * data) { static void DoCommandBIndirect(void * cmdInxP) { wIndex_t cmdInx; cmdInx = *(wIndex_t*) cmdInxP; - DoCommandB((void*) (intptr_t) cmdInx); + DoCommandB(I2VP(cmdInx)); } EXPORT void LayoutSetPos(wIndex_t inx) { - wPos_t w, h, offset; - static wPos_t toolbarRowHeight = 0; - static wPos_t width; + wWinPix_t w, h, offset; + static wWinPix_t toolbarRowHeight = 0; + static wWinPix_t width; static int lastGroup; - static wPos_t gap; + static wWinPix_t gap; static int layerButtCnt; + static int layerButtNumber; int currGroup; if (inx == 0) { @@ -1437,6 +1494,7 @@ EXPORT void LayoutSetPos(wIndex_t inx) { gap = 5; toolbarWidth = width - 20 + 5; layerButtCnt = 0; + layerButtNumber = 0; toolbarHeight = 0; } @@ -1455,7 +1513,7 @@ EXPORT void LayoutSetPos(wIndex_t inx) { && (programMode == MODE_TRAIN || (buttonList[inx].options & IC_MODETRAIN_ONLY) == 0) && ((buttonList[inx].group & ~BG_BIGGAP) != BG_LAYER - || layerButtCnt++ <= layerCount)) { + || layerButtCnt < layerCount)) { if (currGroup != lastGroup) { toolbarWidth += gap; lastGroup = currGroup; @@ -1473,12 +1531,21 @@ EXPORT void LayoutSetPos(wIndex_t inx) { toolbarWidth = 0; toolbarHeight += h + 5; } - wControlSetPos(buttonList[inx].control, toolbarWidth, + if ((currGroup == BG_LAYER) && layerButtNumber>1 && GetLayerHidden(layerButtNumber-2) ) { + wControlShow(buttonList[inx].control, FALSE); + layerButtNumber++; + } else { + if (currGroup == BG_LAYER ) { + if (layerButtNumber>1) layerButtCnt++; // Ignore List and Background + layerButtNumber++; + } + wControlSetPos(buttonList[inx].control, toolbarWidth, toolbarHeight - (h + 5 +offset)); - buttonList[inx].x = toolbarWidth; - buttonList[inx].y = toolbarHeight - (h + 5 + offset); - toolbarWidth += wControlGetWidth(buttonList[inx].control); - wControlShow(buttonList[inx].control, TRUE); + buttonList[inx].x = toolbarWidth; + buttonList[inx].y = toolbarHeight - (h + 5 + offset); + toolbarWidth += wControlGetWidth(buttonList[inx].control); + wControlShow(buttonList[inx].control, TRUE); + } } else { wControlShow(buttonList[inx].control, FALSE); } @@ -1518,8 +1585,8 @@ EXPORT BOOL_T CommandEnabled(wIndex_t cmdInx) { return commandList[cmdInx].enabled; } -static wIndex_t AddCommand(procCommand_t cmdProc, char * helpKey, - char * nameStr, wIcon_p icon, int reqLevel, long options, long acclKey, +static wIndex_t AddCommand(procCommand_t cmdProc, const char * helpKey, + const char * nameStr, wIcon_p icon, int reqLevel, long options, long acclKey, void * context) { if (commandCnt >= COMMAND_MAX - 1) { AbortProg("addCommand: too many commands"); @@ -1557,7 +1624,7 @@ EXPORT void AddToolbarControl(wControl_p control, long options) { buttonCnt++; } -EXPORT wButton_p AddToolbarButton(char * helpStr, wIcon_p icon, long options, +EXPORT wButton_p AddToolbarButton(const char * helpStr, wIcon_p icon, long options, wButtonCallBack_p action, void * context) { wButton_p bb; wIndex_t inx; @@ -1565,10 +1632,10 @@ EXPORT wButton_p AddToolbarButton(char * helpStr, wIcon_p icon, long options, GetBalloonHelpStr(helpStr); if (context == NULL) { for (inx = 0; inx < menuPG.paramCnt; inx++) { - if (action != DoCommandB && menuPLs[inx].valueP == (void*) action) { + if (action != DoCommandB && menuPLs[inx].valueP == I2VP(action)) { context = &menuPLs[inx]; action = ParamMenuPush; - menuPLs[inx].context = (void*) (intptr_t) buttonCnt; + menuPLs[inx].context = I2VP(buttonCnt); menuPLs[inx].option |= IC_PLAYBACK_PUSH; break; } @@ -1581,7 +1648,8 @@ EXPORT wButton_p AddToolbarButton(char * helpStr, wIcon_p icon, long options, } EXPORT void PlaybackButtonMouse(wIndex_t buttInx) { - wPos_t cmdX, cmdY; + wWinPix_t cmdX, cmdY; + coOrd pos; if (buttInx < 0 || buttInx >= buttonCnt) return; @@ -1589,9 +1657,10 @@ EXPORT void PlaybackButtonMouse(wIndex_t buttInx) { return; cmdX = buttonList[buttInx].x + 17; cmdY = toolbarHeight - (buttonList[buttInx].y + 17) - + (wPos_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; + + (wWinPix_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; - MovePlaybackCursor(&mainD, cmdX, cmdY,TRUE,buttonList[buttInx].control); + mainD.Pix2CoOrd( &mainD, cmdX, cmdY, &pos ); + MovePlaybackCursor(&mainD, pos, TRUE, buttonList[buttInx].control); if (playbackTimer == 0) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); wFlush(); @@ -1601,14 +1670,14 @@ EXPORT void PlaybackButtonMouse(wIndex_t buttInx) { } } -#include "bitmaps/openbutt.xpm" -static char * buttonGroupMenuTitle; -static char * buttonGroupHelpKey; -static char * buttonGroupStickyLabel; +#include "bitmaps/down.xpm" +static const char * buttonGroupMenuTitle; +static const char * buttonGroupHelpKey; +static const char * buttonGroupStickyLabel; static wMenu_p buttonGroupPopupM; -EXPORT void ButtonGroupBegin(char * menuTitle, char * helpKey, - char * stickyLabel) { +EXPORT void ButtonGroupBegin(const char * menuTitle, const char * helpKey, + const char * stickyLabel) { buttonGroupMenuTitle = menuTitle; buttonGroupHelpKey = helpKey; buttonGroupStickyLabel = stickyLabel; @@ -1622,7 +1691,7 @@ EXPORT void ButtonGroupEnd(void) { } EXPORT wIndex_t AddMenuButton(wMenu_p menu, procCommand_t command, - char * helpKey, char * nameStr, wIcon_p icon, int reqLevel, + const char * helpKey, const char * nameStr, wIcon_p icon, int reqLevel, long options, long acclKey, void * context) { wIndex_t buttInx = -1; wIndex_t cmdInx; @@ -1639,17 +1708,17 @@ EXPORT wIndex_t AddMenuButton(wMenu_p menu, procCommand_t command, } else { buttInx = buttonCnt; AddToolbarButton(helpKey, icon, options, - (wButtonCallBack_p) DoCommandB, - (void*) (intptr_t) commandCnt); + DoCommandB, + I2VP(commandCnt)); buttonList[buttInx].cmdInx = commandCnt; } if (buttonGroupMenuTitle != NULL && buttonGroupPopupM == NULL) { if (openbuttIcon == NULL) - openbuttIcon = wIconCreatePixMap(openbutt_xpm); + openbuttIcon = wIconCreatePixMap(down_xpm[iconSize]); buttonGroupPopupM = wMenuPopupCreate(mainW, buttonGroupMenuTitle); AddToolbarButton(buttonGroupHelpKey, openbuttIcon, IC_ABUT, (wButtonCallBack_p) wMenuPopupShow, - (void*) buttonGroupPopupM); + buttonGroupPopupM); newButtonGroup = TRUE; commandsSubmenu = wMenuMenuCreate(menu, "", buttonGroupMenuTitle); if (options & IC_POPUP2) { @@ -1690,7 +1759,7 @@ EXPORT wIndex_t AddMenuButton(wMenu_p menu, procCommand_t command, if (buttonGroupPopupM) { commandList[cmdInx].menu[0] = wMenuPushCreate(buttonGroupPopupM, helpKey, GetBalloonHelpStr(helpKey), 0, DoCommandB, - (void*) (intptr_t) cmdInx); + I2VP(cmdInx)); tm = commandsSubmenu; p1m = popup1Submenu; p2m = popup2Submenu; @@ -1700,21 +1769,21 @@ EXPORT wIndex_t AddMenuButton(wMenu_p menu, procCommand_t command, p2m = (options & IC_POPUP2) ? popup2aM : (options & IC_POPUP3) ? popup2mM : popup2M; } commandList[cmdInx].menu[1] = wMenuPushCreate(tm, helpKey, nameStr, acclKey, - DoCommandB, (void*) (intptr_t) cmdInx); + DoCommandB, I2VP(cmdInx)); if ((options & (IC_POPUP | IC_POPUP2 | IC_POPUP3))) { if (!(options & IC_SELECTED)) { commandList[cmdInx].menu[2] = wMenuPushCreate(p1m, helpKey, nameStr, - 0, DoCommandB, (void*) (intptr_t) cmdInx); + 0, DoCommandB, I2VP(cmdInx)); } commandList[cmdInx].menu[3] = wMenuPushCreate(p2m, helpKey, nameStr, 0, - DoCommandB, (void*) (intptr_t) cmdInx); + DoCommandB, I2VP(cmdInx)); } return cmdInx; } -EXPORT wIndex_t InitCommand(wMenu_p menu, procCommand_t command, char * nameStr, - char * bits, int reqLevel, long options, long acclKey) { +EXPORT wIndex_t InitCommand(wMenu_p menu, procCommand_t command, const char * nameStr, + const char * bits, int reqLevel, long options, long acclKey) { char helpKey[STR_SHORT_SIZE]; wIcon_p icon = NULL; if (bits) @@ -1727,10 +1796,10 @@ EXPORT wIndex_t InitCommand(wMenu_p menu, procCommand_t command, char * nameStr, /*--------------------------------------------------------------------*/ -EXPORT void PlaybackCommand(char * line, wIndex_t lineNum) { - wIndex_t inx; +EXPORT void PlaybackCommand(const char * line, wIndex_t lineNum) { + size_t inx; wIndex_t buttInx; - int len1, len2; + size_t len1, len2; len1 = strlen(line + 8); for (inx = 0; inx < commandCnt; inx++) { len2 = strlen(commandList[inx].helpKey + 3); @@ -1743,12 +1812,14 @@ EXPORT void PlaybackCommand(char * line, wIndex_t lineNum) { fprintf(stderr, "Unknown playback COMMAND command %d : %s\n", lineNum, line); } else { - wPos_t cmdX, cmdY; + wWinPix_t cmdX, cmdY; + coOrd pos; if ((buttInx = commandList[inx].buttInx) >= 0) { cmdX = buttonList[buttInx].x + 17; cmdY = toolbarHeight - (buttonList[buttInx].y + 17) - + (wPos_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; - MovePlaybackCursor(&mainD, cmdX, cmdY,TRUE,buttonList[buttInx].control); + + (wWinPix_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; + mainD.Pix2CoOrd( &mainD, cmdX, cmdY, &pos ); + MovePlaybackCursor(&mainD, pos,TRUE,buttonList[buttInx].control); } if (strcmp(line + 8, "Undo") == 0) { if (buttInx > 0 && playbackTimer == 0) { @@ -1758,7 +1829,7 @@ EXPORT void PlaybackCommand(char * line, wIndex_t lineNum) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); wFlush(); } - UndoUndo(); + UndoUndo(NULL); } else if (strcmp(line + 8, "Redo") == 0) { if (buttInx >= 0 && playbackTimer == 0) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); @@ -1767,7 +1838,7 @@ EXPORT void PlaybackCommand(char * line, wIndex_t lineNum) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); wFlush(); } - UndoRedo(); + UndoRedo(NULL); } else { if (buttInx >= 0 && playbackTimer == 0) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); @@ -1776,7 +1847,7 @@ EXPORT void PlaybackCommand(char * line, wIndex_t lineNum) { wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); wFlush(); } - DoCommandB((void*) (intptr_t) inx); + DoCommandB(I2VP(inx)); } } } @@ -1798,7 +1869,7 @@ static void DoMenuTrace(wMenu_p menu, const char * label, void * data) { } } -EXPORT wMenu_p MenuRegister(char * label) { +EXPORT wMenu_p MenuRegister(const char * label) { wMenu_p m; menuTrace_p mt; m = wMenuPopupCreate(mainW, label); @@ -1813,15 +1884,13 @@ EXPORT wMenu_p MenuRegister(char * label) { void MenuPlayback(char * line) { char * menuName, *itemName; coOrd pos; - wPos_t x, y; menuTrace_p mt; if (!GetArgs(line, "pqq", &pos, &menuName, &itemName)) return; for (mt = &menuTrace(0); mt < &menuTrace(menuTrace_da.cnt); mt++) { if (strcmp(mt->label, menuName) == 0) { - mainD.CoOrd2Pix(&mainD, pos, &x, &y); - MovePlaybackCursor(&mainD, x, y, FALSE, NULL); + MovePlaybackCursor(&mainD, pos, FALSE, NULL); oldMarker = cmdMenuPos = pos; wMenuAction(mt->menu, _(itemName)); return; @@ -1833,17 +1902,17 @@ void MenuPlayback(char * line) { static wWin_p stickyW; -static void StickyOk(void *); +static void StickyOk(void * unused); static paramData_t stickyPLs[] = { { PD_TOGGLE, &stickySet, "set", 0, stickyLabels } }; static paramGroup_t stickyPG = { "sticky", PGO_RECORD, stickyPLs, - sizeof stickyPLs / sizeof stickyPLs[0] }; + COUNT( stickyPLs ) }; -static void StickyOk(void * junk) { +static void StickyOk(void * unused) { wHide(stickyW); } -static void DoSticky(void) { +static void DoSticky(void * unused) { if (!stickyW) stickyW = ParamCreateDialog(&stickyPG, MakeWindowTitle(_("Sticky Commands")), _("Ok"), StickyOk, wHide, @@ -1859,21 +1928,26 @@ static void DoSticky(void) { * specified in the following array. * Note: text and choices must be given in the same order. */ -static char *AllToolbarLabels[] = { N_("File Buttons"), N_("Import/Export Buttons"), N_("Zoom Buttons"), N_( - "Undo Buttons"), N_("Easement Button"), N_("SnapGrid Buttons"), N_( - "Create Track Buttons"), N_("Layout Control Elements"), N_( - "Modify Track Buttons"), N_("Properties/Select"), N_( - "Track Group Buttons"), N_("Train Group Buttons"), N_( - "Create Misc Buttons"), N_("Ruler Button"), N_("Layer Buttons"), N_( - "Hot Bar"), +static char *AllToolbarLabels[] = { N_("File Buttons"), N_("Print Buttons"), N_("Import/Export Buttons"), + N_("Zoom Buttons"), N_("Undo Buttons"), N_("Easement Button"), N_("SnapGrid Buttons"), + N_("Create Track Buttons"), N_("Layout Control Elements"), + N_("Modify Track Buttons"), N_("Properties/Select"), + N_("Track Group Buttons"), N_("Train Group Buttons"), + N_("Create Misc Buttons"), N_("Ruler Button"), + N_("Layer Buttons"), N_("Hot Bar"), NULL }; -static long AllToolbarMasks[] = { 1 << BG_FILE, 1<< BG_EXPORTIMPORT, 1 << BG_ZOOM, 1 << BG_UNDO, 1 - << BG_EASE, 1 << BG_SNAP, 1 << BG_TRKCRT, 1 << BG_CONTROL, 1 - << BG_TRKMOD, 1 << BG_SELECT, 1 << BG_TRKGRP, 1 << BG_TRAIN, 1 - << BG_MISCCRT, 1 << BG_RULER, 1 << BG_LAYER, 1 << BG_HOTBAR }; - -static void ToolbarAction(wBool_t set, void * data) { - long mask = (long) data; +static long AllToolbarMasks[] = { 1 << BG_FILE, 1<< BG_PRINT, 1<< BG_EXPORTIMPORT, + 1<< BG_ZOOM, 1<< BG_UNDO, 1<< BG_EASE, 1 << BG_SNAP, 1 << BG_TRKCRT, + 1<< BG_CONTROL, 1<< BG_TRKMOD, 1 << BG_SELECT, 1 << BG_TRKGRP, 1 << BG_TRAIN, + 1<< BG_MISCCRT, 1<< BG_RULER, 1 << BG_LAYER, 1 << BG_HOTBAR }; + +static wMenuToggle_p AllToolbarMI[ COUNT( AllToolbarMasks ) ]; + +static void ToolbarAction(void * data) { + int inx = (int)VP2L(data); + ASSERT( inx >=0 && inx < COUNT( AllToolbarMasks ) ); + wBool_t set = wMenuToggleGet( AllToolbarMI[inx] ); + long mask = AllToolbarMasks[inx]; if (set) toolbarSet |= mask; else @@ -1898,13 +1972,13 @@ static void CreateToolbarM(wMenu_p toolbarM) { char **labels; wBool_t set; - cnt = sizeof(AllToolbarMasks) / sizeof(AllToolbarMasks[0]); + cnt = COUNT(AllToolbarMasks); masks = AllToolbarMasks; labels = AllToolbarLabels; for (inx = 0; inx < cnt; inx++, masks++, labels++) { set = (toolbarSet & *masks) != 0; - wMenuToggleCreate(toolbarM, "toolbarM", _(*labels), 0, set, - ToolbarAction, (void*) *masks); + AllToolbarMI[inx] = wMenuToggleCreate(toolbarM, "toolbarM", _(*labels), 0, set, + ToolbarAction, I2VP(inx)); } } @@ -1913,21 +1987,20 @@ static void CreateToolbarM(wMenu_p toolbarM) { static wWin_p addElevW; #define addElevF (wFloat_p)addElevPD.control EXPORT DIST_T addElevValueV; -static void DoAddElev(void *); +static void DoAddElev(void * unused); static paramFloatRange_t rn1000_1000 = { -1000.0, 1000.0 }; static paramData_t addElevPLs[] = { { PD_FLOAT, &addElevValueV, "value", - PDO_DIM, &rn1000_1000, NULL, 0 } }; -static paramGroup_t addElevPG = { "addElev", 0, addElevPLs, sizeof addElevPLs - / sizeof addElevPLs[0] }; + PDO_NOPREF|PDO_DIM, &rn1000_1000, NULL, 0 } }; +static paramGroup_t addElevPG = { "addElev", 0, addElevPLs, COUNT( addElevPLs ) }; -static void DoAddElev(void * junk) { +static void DoAddElev(void * unused) { ParamLoadData(&addElevPG); AddElevations(addElevValueV); wHide(addElevW); } -static void ShowAddElevations(void) { +static void ShowAddElevations(void * unused) { if (selectedTrackCount <= 0) { ErrorMessage(MSG_NO_SELECTED_TRK); return; @@ -1942,29 +2015,36 @@ static void ShowAddElevations(void) { /*--------------------------------------------------------------------*/ static wWin_p rotateW; +static wWin_p indexW; static wWin_p moveW; static double rotateValue; +static char trackIndex[STR_LONG_SIZE]; static coOrd moveValue; static rotateDialogCallBack_t rotateDialogCallBack; +static indexDialogCallBack_t indexDialogCallBack; static moveDialogCallBack_t moveDialogCallBack; -static void RotateEnterOk(void *); +static void RotateEnterOk(void * unused); + +static paramFloatRange_t rn360_360 = { -360.0, 360.0, 80 }; +static paramData_t rotatePLs[] = { { PD_FLOAT, &rotateValue, "rotate", PDO_NOPREF|PDO_ANGLE|PDO_NORECORD, &rn360_360, N_("Angle:") } }; +static paramGroup_t rotatePG = { "rotate", 0, rotatePLs, COUNT( rotatePLs ) }; -static paramFloatRange_t rn360_360 = { -360.0, 360.0, 80.0 }; -static paramData_t rotatePLs[] = { { PD_FLOAT, &rotateValue, "rotate", PDO_ANGLE, - &rn360_360, N_("Angle:") } }; -static paramGroup_t rotatePG = { "rotate", 0, rotatePLs, sizeof rotatePLs - / sizeof rotatePLs[0] }; +static void IndexEnterOk(void * unused); +static paramData_t indexPLs[] = { + { PD_STRING, &trackIndex, "select", PDO_NOPREF|PDO_NORECORD|PDO_STRINGLIMITLENGTH, I2VP(STR_SIZE-1), N_("Indexes:"), 0, 0, sizeof(trackIndex) } }; +static paramGroup_t indexPG = { "index", 0, indexPLs, COUNT( indexPLs ) }; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; -static void MoveEnterOk(void *); -static paramData_t movePLs[] = { { PD_FLOAT, &moveValue.x, "moveX", PDO_DIM, - &r_1000_1000, N_("Move X:") }, { PD_FLOAT, &moveValue.y, "moveY", - PDO_DIM, &r_1000_1000, N_("Move Y:") } }; -static paramGroup_t movePG = { "move", 0, movePLs, sizeof movePLs - / sizeof movePLs[0] }; - -EXPORT void StartRotateDialog(rotateDialogCallBack_t func) { +static void MoveEnterOk(void * unused); +static paramData_t movePLs[] = { + { PD_FLOAT, &moveValue.x, "moveX", PDO_NOPREF|PDO_DIM|PDO_NORECORD, &r_1000_1000, N_("Move X:") }, + { PD_FLOAT, &moveValue.y, "moveY", PDO_NOPREF|PDO_DIM|PDO_NORECORD, &r_1000_1000, N_("Move Y:") } }; +static paramGroup_t movePG = { "move", 0, movePLs, COUNT( movePLs ) }; + +static void StartRotateDialog(void * funcVP) +{ + rotateDialogCallBack_t func = funcVP; if (rotateW == NULL) rotateW = ParamCreateDialog(&rotatePG, MakeWindowTitle(_("Rotate")), _("Ok"), RotateEnterOk, wHide, FALSE, NULL, 0, NULL); @@ -1973,7 +2053,21 @@ EXPORT void StartRotateDialog(rotateDialogCallBack_t func) { wShow(rotateW); } -EXPORT void StartMoveDialog(moveDialogCallBack_t func) { +static void StartIndexDialog(void * funcVP) +{ + indexDialogCallBack_t func = funcVP; + if (indexW == NULL) + indexW = ParamCreateDialog(&indexPG, MakeWindowTitle(_("Select Index")), + _("Ok"), IndexEnterOk, wHide, FALSE, NULL, 0, NULL); + ParamLoadControls(&indexPG); + indexDialogCallBack = func; + trackIndex[0] = '\0'; + wShow(indexW); +} + +static void StartMoveDialog(void * funcVP) +{ + moveDialogCallBack_t func = funcVP; if (moveW == NULL) moveW = ParamCreateDialog(&movePG, MakeWindowTitle(_("Move")), _("Ok"), MoveEnterOk, wHide, FALSE, NULL, 0, NULL); @@ -1983,18 +2077,24 @@ EXPORT void StartMoveDialog(moveDialogCallBack_t func) { wShow(moveW); } -static void MoveEnterOk(void * junk) { +static void MoveEnterOk(void * unused) { ParamLoadData(&movePG); - moveDialogCallBack((void*) &moveValue); + moveDialogCallBack(&moveValue); wHide(moveW); } -static void RotateEnterOk(void * junk) { +static void IndexEnterOk(void * unused) { + ParamLoadData(&indexPG); + indexDialogCallBack(trackIndex); + wHide(indexW); +} + +static void RotateEnterOk(void * unused) { ParamLoadData(&rotatePG); if (angleSystem == ANGLE_POLAR) - rotateDialogCallBack((void*) (long)(rotateValue*1000)); + rotateDialogCallBack(I2VP(rotateValue * 1000)); else - rotateDialogCallBack((void*) (long)(-rotateValue*1000)); + rotateDialogCallBack(I2VP(rotateValue * 1000)); wHide(rotateW); } @@ -2006,24 +2106,33 @@ static void MoveDialogInit(void) { ParamRegister(&movePG); } +static void IndexDialogInit(void) { + ParamRegister(&indexPG); +} + EXPORT void AddMoveMenu(wMenu_p m, moveDialogCallBack_t func) { wMenuPushCreate(m, "", _("Enter Move ..."), 0, - (wMenuCallBack_p) StartMoveDialog, (void*) func); + StartMoveDialog, func); +} + +EXPORT void AddIndexMenu(wMenu_p m, indexDialogCallBack_t func) { + wMenuPushCreate(m, "cmdSelectIndex", _("Select Track Index ..."), 0, + StartIndexDialog, func); } //All values multipled by 100 to support decimal points from PD_FLOAT EXPORT void AddRotateMenu(wMenu_p m, rotateDialogCallBack_t func) { - wMenuPushCreate(m, "", _("180 "), 0, func, (void*) 180000); - wMenuPushCreate(m, "", _("90 CW"), 0, func, (void*) (long) (90000)); - wMenuPushCreate(m, "", _("45 CW"), 0, func, (void*) (long) (45000)); - wMenuPushCreate(m, "", _("30 CW"), 0, func, (void*) (long) (30000)); - wMenuPushCreate(m, "", _("15 CW"), 0, func, (void*) (long) (15000)); - wMenuPushCreate(m, "", _("15 CCW"), 0, func, (void*) (long) (360000 - 15000)); - wMenuPushCreate(m, "", _("30 CCW"), 0, func, (void*) (long) (360000 - 30000)); - wMenuPushCreate(m, "", _("45 CCW"), 0, func, (void*) (long) (360000 - 45000)); - wMenuPushCreate(m, "", _("90 CCW"), 0, func, (void*) (long) (360000 - 90000)); + wMenuPushCreate(m, "", _("180 "), 0, func, I2VP(180000)); + wMenuPushCreate(m, "", _("90 CW"), 0, func, I2VP(90000)); + wMenuPushCreate(m, "", _("45 CW"), 0, func, I2VP(45000)); + wMenuPushCreate(m, "", _("30 CW"), 0, func, I2VP(30000)); + wMenuPushCreate(m, "", _("15 CW"), 0, func, I2VP(15000)); + wMenuPushCreate(m, "", _("15 CCW"), 0, func, I2VP(360000 - 15000)); + wMenuPushCreate(m, "", _("30 CCW"), 0, func, I2VP(360000 - 30000)); + wMenuPushCreate(m, "", _("45 CCW"), 0, func, I2VP(360000 - 45000)); + wMenuPushCreate(m, "", _("90 CCW"), 0, func, I2VP(360000 - 90000)); wMenuPushCreate(m, "", _("Enter Angle ..."), 0, - (wMenuCallBack_p) StartRotateDialog, (void*) func); + StartRotateDialog, func); } /***************************************************************************** @@ -2036,14 +2145,17 @@ static wWin_p debugW; static int debugCnt = 0; static paramIntegerRange_t r0_100 = { 0, 100, 80 }; -static void DebugOk(void * junk); +static void DebugOk(void * unused); static paramData_t debugPLs[30]; +static paramData_t p0[] = { + { PD_BUTTON, TestMallocs, "test", PDO_DLGHORZ, NULL, N_("Test Mallocs") } + }; static long debug_values[30]; static int debug_index[30]; static paramGroup_t debugPG = { "debug", 0, debugPLs, 0 }; -static void DebugOk(void * junk) { +static void DebugOk(void * unused) { for (int i = 0; i<debugCnt;i++) { logTable(debug_index[i]).level = debug_values[i]; } @@ -2051,16 +2163,17 @@ static void DebugOk(void * junk) { } static void CreateDebugW(void) { - debugPG.paramCnt = debugCnt; + debugPG.paramCnt = debugCnt+1; ParamRegister(&debugPG); debugW = ParamCreateDialog(&debugPG, MakeWindowTitle(_("Debug")), _("Ok"), DebugOk, wHide, FALSE, NULL, 0, NULL); wHide(debugW); } -EXPORT void DebugInit(void) { +EXPORT void DebugInit(void * unused) { if (!debugW) { + debugPLs[0] = p0[0]; BOOL_T default_line = FALSE; debugCnt = 0; //Reset to start building the dynamic dialog over again int i = 0; @@ -2080,6 +2193,7 @@ EXPORT void DebugInit(void) { } } } + //ParamCreateControls( &debugPG, NULL ); CreateDebugW(); } @@ -2088,22 +2202,22 @@ EXPORT void DebugInit(void) { } -EXPORT void InitDebug(char * label, long * valueP) { - if (debugCnt >= sizeof debugPLs / sizeof debugPLs[0]) +EXPORT void InitDebug(const char * label, long * valueP) { + if (debugCnt+1 >= COUNT( debugPLs ) ) AbortProg("Too many debug flags"); - memset(&debugPLs[debugCnt], 0, sizeof debugPLs[debugCnt]); - debugPLs[debugCnt].type = PD_LONG; - debugPLs[debugCnt].valueP = valueP; - debugPLs[debugCnt].nameStr = label; - debugPLs[debugCnt].winData = &r0_100; - debugPLs[debugCnt].winLabel = label; + memset(&debugPLs[debugCnt+1], 0, sizeof debugPLs[debugCnt]); + debugPLs[debugCnt+1].type = PD_LONG; + debugPLs[debugCnt+1].valueP = valueP; + debugPLs[debugCnt+1].nameStr = label; + debugPLs[debugCnt+1].winData = &r0_100; + debugPLs[debugCnt+1].winLabel = label; debugCnt++; } -void RecomputeElevations(void); +void RecomputeElevations(void * unused ); -static void MiscMenuItemCreate(wMenu_p m1, wMenu_p m2, char * name, - char * label, long acclKey, void * func, long option, void * context) { +static void MiscMenuItemCreate(wMenu_p m1, wMenu_p m2, const char * name, + const char * label, long acclKey, void * func, long option, void * context) { wMenuPush_p mp; mp = wMenuPushCreate(m1, name, label, acclKey, ParamMenuPush, &menuPLs[menuPG.paramCnt]); @@ -2122,67 +2236,157 @@ static void MiscMenuItemCreate(wMenu_p m1, wMenu_p m2, char * name, menuPG.paramCnt++; } + +/***************************************************************************** + * + * ACCEL KEY + * + */ + +enum eAccelAction_t { EA_ZOOMUP, EA_ZOOMDOWN, EA_REDRAW, EA_DELETE, EA_UNDO, EA_COPY, EA_PASTE, EA_CUT, EA_NEXT, EA_HELP }; +struct accelKey_s { + const char * sPrefName; + wAccelKey_e eKey; + int iMode; + enum eAccelAction_t iAction; + int iContext; } aAccelKeys[] = { + { "zoomUp", wAccelKey_Pgdn, 0, EA_ZOOMUP, 1 }, + { "zoomDown", wAccelKey_Pgup, 0, EA_ZOOMDOWN, 1 }, + { "redraw", wAccelKey_F5, 0, EA_REDRAW, 0 }, +#ifdef WINDOWS + { "delete", wAccelKey_Del, 0, EA_DELETE, 0 }, +#endif + { "undo", wAccelKey_Back, WKEY_SHIFT, EA_UNDO, 0 }, + { "copy", wAccelKey_Ins, WKEY_CTRL, EA_COPY, 0 }, + { "paste", wAccelKey_Ins, WKEY_SHIFT, EA_PASTE, 0 }, + { "cut", wAccelKey_Del, WKEY_SHIFT, EA_CUT, 0 }, + { "nextWindow", wAccelKey_F6, 0, EA_NEXT, 0 }, + { "zoomUp", wAccelKey_Numpad_Add, WKEY_CTRL, EA_ZOOMUP, 1 }, + { "zoomDown", wAccelKey_Numpad_Subtract, WKEY_CTRL, EA_ZOOMDOWN, 1 }, + { "help", wAccelKey_F1, WKEY_SHIFT, EA_HELP, 1 }, + { "help-context", wAccelKey_F1, 0, EA_HELP, 3 } }; + +static void AccelKeyDispatch( wAccelKey_e key, void * accelKeyIndexVP ) +{ + int iAccelKeyIndex = (int)VP2L(accelKeyIndexVP); + switch( aAccelKeys[iAccelKeyIndex].iAction ) { + case EA_ZOOMUP: + DoZoomUp( I2VP(aAccelKeys[iAccelKeyIndex].iContext) ); + break; + case EA_ZOOMDOWN: + DoZoomDown( I2VP(aAccelKeys[iAccelKeyIndex].iContext) ); + break; + case EA_REDRAW: + MainRedraw(); + break; + case EA_DELETE: + TrySelectDelete(); + break; + case EA_UNDO: + UndoUndo(NULL); + break; + case EA_COPY: + EditCopy(NULL); + break; + case EA_PASTE: + EditPaste(NULL); + break; + case EA_CUT: + EditCut(NULL); + break; + case EA_NEXT: + NextWindow(); + break; + case EA_HELP: + wDoAccelHelp(key, I2VP(aAccelKeys[iAccelKeyIndex].iContext)); + break; + default: + abort(); + } +} + static char * accelKeyNames[] = { "Del", "Ins", "Home", "End", "Pgup", "Pgdn", "Up", "Down", "Right", "Left", "Back", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "NumpadAdd", "NumpadSub" }; -static void SetAccelKey(char * prefName, wAccelKey_e key, int mode, - wAccelKeyCallBack_p func, void * context) { - int mode1 = 0; - int inx; - const char * prefValue = wPrefGetString("accelKey", prefName); - if (prefValue != NULL) { - while (prefValue[1] == '-') { - switch (prefValue[0]) { - case 'S': - mode1 |= WKEY_SHIFT; - break; - case 'C': - mode1 |= WKEY_CTRL; - break; - case 'A': - mode1 |= WKEY_ALT; - break; - default: - ; +static void SetAccelKeys() +{ + for ( int iAccelKey = 0; iAccelKey < COUNT( aAccelKeys ); iAccelKey++ ) + { + struct accelKey_s * akP = &aAccelKeys[iAccelKey]; + int eKey = akP->eKey; + int iMode = akP->iMode; + const char * sPrefValue = wPrefGetString("accelKey", akP->sPrefName); + if (sPrefValue != NULL) { + int iMode1 = 0; + while (sPrefValue[1] == '-') { + switch (sPrefValue[0]) { + case 'S': + iMode1 |= WKEY_SHIFT; + break; + case 'C': + iMode1 |= WKEY_CTRL; + break; + case 'A': + iMode1 |= WKEY_ALT; + break; + default: + ; + } + sPrefValue += 2; } - prefValue += 2; - } - for (inx = 0; inx < sizeof accelKeyNames / sizeof accelKeyNames[0]; - inx++) { - if (strcmp(prefValue, accelKeyNames[inx]) == 0) { - key = inx + 1; - mode = mode1; - break; + for (int inx = 0; inx < COUNT( accelKeyNames ); inx++) { + if (strcmp(sPrefValue, accelKeyNames[inx]) == 0) { + eKey = inx + 1; + iMode = iMode1; + break; + } } } + wAttachAccelKey(eKey, iMode, AccelKeyDispatch, I2VP(iAccelKey)); } - wAttachAccelKey(key, mode, func, context); -} - -#include "bitmaps/zoomin.xpm" -#include "bitmaps/zoom.xpm" -#include "bitmaps/zoomout.xpm" -#include "bitmaps/edit-undo.xpm" -#include "bitmaps/edit-redo.xpm" -#include "bitmaps/partlist.xpm" -#include "bitmaps/document-export.xpm" -#include "bitmaps/document-exportdxf.xpm" -#include "bitmaps/document-import.xpm" -#include "bitmaps/document-importmod.xpm" -#include "bitmaps/document-new.xpm" -#include "bitmaps/document-save.xpm" -#include "bitmaps/document-open.xpm" -#include "bitmaps/document-print.xpm" +} + + +/***************************************************************************** + * + * MENUS + * + */ + + +#include "bitmaps/zoom-in.xpm" +#include "bitmaps/zoom-choose.xpm" +#include "bitmaps/zoom-out.xpm" +#include "bitmaps/zoom-extent.xpm" +#include "bitmaps/undo.xpm" +#include "bitmaps/redo.xpm" +#include "bitmaps/partlist.xpm" // unused icon +#include "bitmaps/doc-export.xpm" +#include "bitmaps/doc-export-dxf.xpm" +#include "bitmaps/doc-export-bmap.xpm" +#include "bitmaps/doc-import.xpm" +#include "bitmaps/doc-import-xtc.xpm" +#include "bitmaps/doc-new.xpm" +#include "bitmaps/doc-save.xpm" +#include "bitmaps/doc-open.xpm" +#include "bitmaps/doc-print.xpm" +#include "bitmaps/doc-setup.xpm" +#include "bitmaps/parameter.xpm" #include "bitmaps/map.xpm" #include "bitmaps/magnet.xpm" +static wMenu_p toolbarM; +static addButtonCallBack_t paramFilesCallback; + static void CreateMenus(void) { wMenu_p fileM, editM, viewM, optionM, windowM, macroM, helpM, toolbarM, messageListM, manageM, addM, changeM, drawM; wMenu_p zoomM, zoomSubM; - wMenuPush_p zoomInM, zoomOutM; + wMenuPush_p zoomInM, zoomOutM, zoomExtentsM; + + wPrefGetInteger("DialogItem", "pref-iconsize", (long *) &iconSize, 0); fileM = wMenuBarAdd(mainW, "menuFile", _("&File")); editM = wMenuBarAdd(mainW, "menuEdit", _("&Edit")); @@ -2233,57 +2437,65 @@ static void CreateMenus(void) { popup1M = wMenuPopupCreate(mainW, _("Context Commands")); popup2M = wMenuPopupCreate(mainW, _("Shift Context Commands")); MiscMenuItemCreate(popup1M, popup2M, "cmdUndo", _("Undo"), 0, - (void*) (wMenuCallBack_p) UndoUndo, 0, (void *) 0); + UndoUndo, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdRedo", _("Redo"), 0, - (void*) (wMenuCallBack_p) UndoRedo, 0, (void *) 0); + UndoRedo, 0, NULL); /* Zoom */ wMenuPushCreate(popup1M, "cmdZoomIn", _("Zoom In"), 0, - (wMenuCallBack_p) DoZoomUp, (void*) 1); + DoZoomUp, I2VP(1)); wMenuPushCreate(popup2M, "cmdZoomIn", _("Zoom In"), 0, - (wMenuCallBack_p) DoZoomUp, (void*) 1); + DoZoomUp, I2VP(1)); wMenuPushCreate(popup1M, "cmdZoomOut", _("Zoom Out"), 0, - (wMenuCallBack_p) DoZoomDown, (void*) 1); + DoZoomDown, I2VP(1)); wMenuPushCreate(popup2M, "cmdZoomOut", _("Zoom Out"), 0, - (wMenuCallBack_p) DoZoomDown, (void*) 1); - /* Display */ + DoZoomDown, I2VP(1)); + wMenuPushCreate(popup1M, "cmdZoomExtents", _("Zoom Extents"), 0, + DoZoomExtents, I2VP(1)); + wMenuPushCreate(popup2M, "cmdZoomExtents", _("Zoom Extents"), 0, + DoZoomExtents, I2VP(1)); + /* Display */ MiscMenuItemCreate(popup1M, popup2M, "cmdGridEnable", _("Enable SnapGrid"), - 0, (void*) (wMenuCallBack_p) SnapGridEnable, 0, (void *) 0); + 0, SnapGridEnable, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdGridShow", _("SnapGrid Show"), 0, - (void*) (wMenuCallBack_p) SnapGridShow, 0, (void *) 0); + SnapGridShow, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdMagneticSnap", _(" Enable Magnetic Snap"), 0, - (void*) (wMenuCallBack_p) MagneticSnapToggle, 0, (void *) 0); + MagneticSnapToggle, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdMapShow", _("Show/Hide Map"), 0, - (void*) (wMenuCallBack_p) MapWindowToggleShow, 0, (void *) 0); + MapWindowToggleShow, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdBackgroundShow", _("Show/Hide Background"), 0, - (void*) (wMenuCallBack_p) BackgroundToggleShow, 0, (void *) 0); + BackgroundToggleShow, 0, NULL); wMenuSeparatorCreate(popup1M); wMenuSeparatorCreate(popup2M); /* Copy/Paste */ MiscMenuItemCreate(popup2M, NULL, "cmdCut", _("Cut"), 0, - (void*) (wMenuCallBack_p) EditCut, 0, (void *) 0); + EditCut, 0, NULL); MiscMenuItemCreate(popup2M, NULL, "cmdCopy", _("Copy"), 0, - (void*) (wMenuCallBack_p) EditCopy, 0, (void *) 0); + EditCopy, 0, NULL); MiscMenuItemCreate(popup1M, popup2M, "cmdPaste", _("Paste"), 0, - (void*) (wMenuCallBack_p) EditPaste, 0, (void *) 0); + EditPaste, 0, NULL); MiscMenuItemCreate(popup2M, NULL, "cmdClone", _("Clone"), 0, - (void*) (wMenuCallBack_p) EditClone, 0, (void *) 0); + EditClone, 0, NULL); /*Select*/ MiscMenuItemCreate(popup1M, popup2M, "cmdSelectAll", _("Select All"), 0, - (void*) (wMenuCallBack_p) SetAllTrackSelect, 0, (void *) 1); + (wMenuCallBack_p) SetAllTrackSelect, 0, I2VP(1)); MiscMenuItemCreate(popup1M, popup2M, "cmdSelectCurrentLayer", _("Select Current Layer"), 0, - (void*) (wMenuCallBack_p) SelectCurrentLayer, 0, (void *) 0); + SelectCurrentLayer, 0, NULL); MiscMenuItemCreate(popup2M, NULL, "cmdDeselectAll", _("Deselect All"), 0, - (void*) (wMenuCallBack_p) SetAllTrackSelect, 0, (void *) 0); + (wMenuCallBack_p) SetAllTrackSelect, 0, I2VP(FALSE)); + wMenuPushCreate(popup1M, "cmdSelectIndex", _("Select Track Index..."), 0, + StartIndexDialog, &SelectByIndex); + wMenuPushCreate(popup2M, "cmdSelectIndex", _("Select Track Index..."), 0, + StartIndexDialog, &SelectByIndex); /* Modify */ wMenuPushCreate(popup2M, "cmdMove", _("Move"), 0, - (wMenuCallBack_p) DoCommandBIndirect, &moveCmdInx); + DoCommandBIndirect, &moveCmdInx); wMenuPushCreate(popup2M, "cmdRotate", _("Rotate"), 0, - (wMenuCallBack_p) DoCommandBIndirect, &rotateCmdInx); + DoCommandBIndirect, &rotateCmdInx); wMenuSeparatorCreate(popup1M); wMenuSeparatorCreate(popup2M); MiscMenuItemCreate(popup2M, NULL, "cmdDelete", _("Delete"), 0, - (void*) (wMenuCallBack_p) SelectDelete, 0, (void *) 0); + (wMenuCallBack_p) SelectDelete, 0, NULL); wMenuSeparatorCreate(popup2M); popup1aM = wMenuMenuCreate(popup1M, "", _("Add...")); popup2aM = wMenuMenuCreate(popup2M, "", _("Add...")); @@ -2292,139 +2504,158 @@ static void CreateMenus(void) { popup1mM = wMenuMenuCreate(popup1M, "", _("More...")); popup2mM = wMenuMenuCreate(popup2M, "", _("More...")); - cmdGroup = BG_FILE; - AddToolbarButton("menuFile-clear", wIconCreatePixMap(document_new), - IC_MODETRAIN_TOO, (addButtonCallBack_t) DoClear, NULL); - AddToolbarButton("menuFile-load", wIconCreatePixMap(document_open), - IC_MODETRAIN_TOO, (addButtonCallBack_t) ChkLoad, NULL); - AddToolbarButton("menuFile-save", wIconCreatePixMap(document_save), - IC_MODETRAIN_TOO, (addButtonCallBack_t) DoSave, NULL); - - InitCmdExport(); - - cmdGroup = BG_ZOOM; - zoomUpB = AddToolbarButton("cmdZoomIn", wIconCreatePixMap(zoomin_xpm), - IC_MODETRAIN_TOO, (addButtonCallBack_t) DoZoomUp, NULL); - - zoomM = wMenuPopupCreate(mainW, ""); - AddToolbarButton("cmdZoom", wIconCreatePixMap(zoom_xpm), IC_MODETRAIN_TOO, - (wButtonCallBack_p) wMenuPopupShow, zoomM); - - zoomDownB = AddToolbarButton("cmdZoomOut", wIconCreatePixMap(zoomout_xpm), - IC_MODETRAIN_TOO, (addButtonCallBack_t) DoZoomDown, NULL); - - cmdGroup = BG_UNDO; - undoB = AddToolbarButton("cmdUndo", wIconCreatePixMap(edit_undo), 0, - (addButtonCallBack_t) UndoUndo, NULL); - redoB = AddToolbarButton("cmdRedo", wIconCreatePixMap(edit_redo), 0, - (addButtonCallBack_t) UndoRedo, NULL); - - wControlActive((wControl_p) undoB, FALSE); - wControlActive((wControl_p) redoB, FALSE); - /* * FILE MENU */ MiscMenuItemCreate(fileM, NULL, "menuFile-clear", _("&New ..."), ACCL_NEW, - (void*) (wMenuCallBack_p) DoClear, 0, (void *) 0); + DoClear, 0, NULL); wMenuPushCreate(fileM, "menuFile-load", _("&Open ..."), ACCL_OPEN, - (wMenuCallBack_p) ChkLoad, NULL); + ChkLoad, NULL); wMenuSeparatorCreate(fileM); wMenuPushCreate(fileM, "menuFile-save", _("&Save"), ACCL_SAVE, - (wMenuCallBack_p) DoSave, NULL); + DoSave, NULL); wMenuPushCreate(fileM, "menuFile-saveAs", _("Save &As ..."), ACCL_SAVEAS, - (wMenuCallBack_p) DoSaveAs, NULL); + DoSaveAs, NULL); wMenuPushCreate(fileM, "menuFile-revert", _("Revert"), ACCL_REVERT, - (wMenuCallBack_p) ChkRevert, NULL); + ChkRevert, NULL); wMenuSeparatorCreate(fileM); + + cmdGroup = BG_FILE; + AddToolbarButton("menuFile-clear", wIconCreatePixMap(doc_new_xpm[iconSize]), + IC_MODETRAIN_TOO, DoClear, NULL); + AddToolbarButton("menuFile-load", wIconCreatePixMap(doc_open_xpm[iconSize]), + IC_MODETRAIN_TOO, ChkLoad, NULL); + AddToolbarButton("menuFile-save", wIconCreatePixMap(doc_save_xpm[iconSize]), + IC_MODETRAIN_TOO, DoSave, NULL); + + cmdGroup = BG_PRINT; MiscMenuItemCreate(fileM, NULL, "printSetup", _("P&rint Setup ..."), - ACCL_PRINTSETUP, (void*) (wMenuCallBack_p) wPrintSetup, 0, - (void *) 0); + ACCL_PRINTSETUP, (wMenuCallBack_p) wPrintSetup, 0, + I2VP(0)); printCmdInx = InitCmdPrint(fileM); + AddToolbarButton("menuFile-setup", wIconCreatePixMap(doc_setup_xpm[iconSize]), + IC_MODETRAIN_TOO, (wMenuCallBack_p) wPrintSetup, I2VP(0)); + wMenuSeparatorCreate(fileM); MiscMenuItemCreate(fileM, NULL, "cmdImport", _("&Import"), ACCL_IMPORT, - (void*) (wMenuCallBack_p) DoImport, 0, (void *) 0); + DoImport, 0, I2VP(0)); MiscMenuItemCreate(fileM, NULL, "cmdImportModule", _("Import &Module"), ACCL_IMPORT_MOD, - (void*) (wMenuCallBack_p) DoImport, 0, (void *) 1); + DoImport, 0, I2VP(1)); MiscMenuItemCreate(fileM, NULL, "cmdOutputbitmap", _("Export to &Bitmap"), - ACCL_PRINTBM, (void*) (wMenuCallBack_p) OutputBitMapInit(), 0, - (void *) 0); + ACCL_PRINTBM, OutputBitMapInit(), 0, + NULL); MiscMenuItemCreate(fileM, NULL, "cmdExport", _("E&xport"), ACCL_EXPORT, - (void*) (wMenuCallBack_p) DoExport, IC_SELECTED, (void *) 0); + DoExport, IC_SELECTED, NULL); MiscMenuItemCreate(fileM, NULL, "cmdExportDXF", _("Export D&XF"), - ACCL_EXPORTDXF, (void*) (wMenuCallBack_p) DoExportDXF, IC_SELECTED, - (void *) 0); + ACCL_EXPORTDXF, DoExportDXF, IC_SELECTED, + NULL); +#if XTRKCAD_CREATE_SVG + MiscMenuItemCreate( fileM, NULL, "cmdExportSVG", _("Export S&VG"), ACCL_EXPORTDXF, + DoExportSVG, IC_SELECTED, NULL); +#endif wMenuSeparatorCreate(fileM); + paramFilesCallback = ParamFilesInit(); MiscMenuItemCreate(fileM, NULL, "cmdPrmfile", _("Parameter &Files ..."), - ACCL_PARAMFILES, (void*) ParamFilesInit(), 0, (void *) 0); + ACCL_PARAMFILES, paramFilesCallback, 0, NULL); MiscMenuItemCreate(fileM, NULL, "cmdFileNote", _("No&tes ..."), ACCL_NOTES, - (void*) (wMenuCallBack_p) DoNote, 0, (void *) 0); + DoNote, 0, NULL); wMenuSeparatorCreate(fileM); fileList_ml = wMenuListCreate(fileM, "menuFileList", NUM_FILELIST, ChkFileList); wMenuSeparatorCreate(fileM); wMenuPushCreate(fileM, "menuFile-quit", _("E&xit"), 0, - (wMenuCallBack_p) DoQuit, NULL); + DoQuit, NULL); + + InitCmdExport(); + + AddToolbarButton("menuFile-parameter", wIconCreatePixMap(parameter_xpm[iconSize]), + IC_MODETRAIN_TOO, paramFilesCallback, NULL); + + cmdGroup = BG_ZOOM; + zoomUpB = AddToolbarButton("cmdZoomIn", wIconCreatePixMap(zoom_in_xpm[iconSize]), + IC_MODETRAIN_TOO, DoZoomUp, NULL); + zoomM = wMenuPopupCreate(mainW, ""); + AddToolbarButton("cmdZoom", wIconCreatePixMap(zoom_choose_xpm[iconSize]), IC_MODETRAIN_TOO, + (wButtonCallBack_p) wMenuPopupShow, zoomM); + zoomDownB = AddToolbarButton("cmdZoomOut", wIconCreatePixMap(zoom_out_xpm[iconSize]), + IC_MODETRAIN_TOO, DoZoomDown, NULL); + zoomExtentsB = AddToolbarButton("cmdZoomExtent", wIconCreatePixMap(zoom_extent_xpm[iconSize]), + IC_MODETRAIN_TOO, DoZoomExtents, NULL); + + cmdGroup = BG_UNDO; + undoB = AddToolbarButton("cmdUndo", wIconCreatePixMap(undo_xpm[iconSize]), 0, + UndoUndo, NULL); + redoB = AddToolbarButton("cmdRedo", wIconCreatePixMap(redo_xpm[iconSize]), 0, + UndoRedo, NULL); + + wControlActive((wControl_p) undoB, FALSE); + wControlActive((wControl_p) redoB, FALSE); + InitCmdUndo(); /* * EDIT MENU */ MiscMenuItemCreate(editM, NULL, "cmdUndo", _("&Undo"), ACCL_UNDO, - (void*) (wMenuCallBack_p) UndoUndo, 0, (void *) 0); + UndoUndo, 0, NULL); MiscMenuItemCreate(editM, NULL, "cmdRedo", _("R&edo"), ACCL_REDO, - (void*) (wMenuCallBack_p) UndoRedo, 0, (void *) 0); + UndoRedo, 0, NULL); wMenuSeparatorCreate(editM); MiscMenuItemCreate(editM, NULL, "cmdCut", _("Cu&t"), ACCL_CUT, - (void*) (wMenuCallBack_p) EditCut, IC_SELECTED, (void *) 0); + EditCut, IC_SELECTED, NULL); MiscMenuItemCreate(editM, NULL, "cmdCopy", _("&Copy"), ACCL_COPY, - (void*) (wMenuCallBack_p) EditCopy, IC_SELECTED, (void *) 0); + EditCopy, IC_SELECTED, NULL); MiscMenuItemCreate(editM, NULL, "cmdPaste", _("&Paste"), ACCL_PASTE, - (void*) (wMenuCallBack_p) EditPaste, 0, (void *) 0); + EditPaste, 0, NULL); MiscMenuItemCreate(editM, NULL, "cmdClone", _("C&lone"), ACCL_CLONE, - (void*) (wMenuCallBack_p) EditClone, 0, (void *) 0); + EditClone, 0, NULL); MiscMenuItemCreate(editM, NULL, "cmdDelete", _("De&lete"), ACCL_DELETE, - (void*) (wMenuCallBack_p) SelectDelete, IC_SELECTED, (void *) 0); + (wMenuCallBack_p) SelectDelete, IC_SELECTED, NULL); MiscMenuItemCreate(editM, NULL, "cmdMoveToCurrentLayer", _("Move To Current Layer"), ACCL_MOVCURLAYER, - (void*) (wMenuCallBack_p) MoveSelectedTracksToCurrentLayer, - IC_SELECTED, (void *) 0); + MoveSelectedTracksToCurrentLayer, + IC_SELECTED, NULL); wMenuSeparatorCreate( editM ); - menuPLs[menuPG.paramCnt].context = (void*)1; - MiscMenuItemCreate( editM, NULL, "cmdSelectAll", _("Select &All"), ACCL_SELECTALL, (void*)(wMenuCallBack_p)SetAllTrackSelect, 0, (void *)1 ); - MiscMenuItemCreate( editM, NULL, "cmdSelectCurrentLayer", _("Select Current Layer"), ACCL_SETCURLAYER, (void*)(wMenuCallBack_p)SelectCurrentLayer, 0, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdDeselectAll", _("&Deselect All"), ACCL_DESELECTALL, (void*)(wMenuCallBack_p)SetAllTrackSelect, 0, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdSelectInvert", _("&Invert Selection"), 0L, (void*)(wMenuCallBack_p)InvertTrackSelect, 0, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdSelectOrphaned", _("Select Stranded Track"), 0L, (void*)(wMenuCallBack_p)OrphanedTrackSelect, 0, (void *)0 ); + menuPLs[menuPG.paramCnt].context = I2VP(1); + MiscMenuItemCreate( editM, NULL, "cmdSelectAll", _("Select &All"), ACCL_SELECTALL, (wMenuCallBack_p)SetAllTrackSelect, 0, I2VP(TRUE) ); + MiscMenuItemCreate( editM, NULL, "cmdSelectCurrentLayer", _("Select Current Layer"), ACCL_SETCURLAYER, SelectCurrentLayer, 0, NULL); + MiscMenuItemCreate( editM, NULL, "cmdSelectByIndex", _("Select By Index"), 0L, StartIndexDialog, 0, &SelectByIndex ); + MiscMenuItemCreate( editM, NULL, "cmdDeselectAll", _("&Deselect All"), ACCL_DESELECTALL, (wMenuCallBack_p)SetAllTrackSelect, 0, I2VP(FALSE) ); + MiscMenuItemCreate( editM, NULL, "cmdSelectInvert", _("&Invert Selection"), 0L, InvertTrackSelect, 0, NULL); + MiscMenuItemCreate( editM, NULL, "cmdSelectOrphaned", _("Select Stranded Track"), 0L, OrphanedTrackSelect, 0, NULL); wMenuSeparatorCreate( editM ); - MiscMenuItemCreate( editM, NULL, "cmdTunnel", _("Tu&nnel"), ACCL_TUNNEL, (void*)(wMenuCallBack_p)SelectTunnel, IC_SELECTED, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdBridge", _("B&ridge"), ACCL_BRIDGE, (void*)(wMenuCallBack_p)SelectBridge, IC_SELECTED, (void *)0); - MiscMenuItemCreate( editM, NULL, "cmdTies", _("Ties/NoTies"), ACCL_TIES, (void*)(wMenuCallBack_p)SelectTies, IC_SELECTED, (void *)0); - MiscMenuItemCreate( editM, NULL, "cmdAbove", _("Move to &Front"), ACCL_ABOVE, (void*)(wMenuCallBack_p)SelectAbove, IC_SELECTED, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdBelow", _("Move to &Back"), ACCL_BELOW, (void*)(wMenuCallBack_p)SelectBelow, IC_SELECTED, (void *)0 ); + MiscMenuItemCreate( editM, NULL, "cmdTunnel", _("Tu&nnel"), ACCL_TUNNEL, SelectTunnel, IC_SELECTED, NULL); + MiscMenuItemCreate( editM, NULL, "cmdBridge", _("B&ridge"), ACCL_BRIDGE, SelectBridge, IC_SELECTED, NULL); + MiscMenuItemCreate( editM, NULL, "cmdTies", _("Ties/NoTies"), ACCL_TIES, SelectTies, IC_SELECTED, NULL); + MiscMenuItemCreate( editM, NULL, "cmdAbove", _("Move to &Front"), ACCL_ABOVE, SelectAbove, IC_SELECTED, NULL); + MiscMenuItemCreate( editM, NULL, "cmdBelow", _("Move to &Back"), ACCL_BELOW, SelectBelow, IC_SELECTED, NULL); wMenuSeparatorCreate( editM ); - MiscMenuItemCreate( editM, NULL, "cmdWidth0", _("Thin Tracks"), ACCL_THIN, (void*)(wMenuCallBack_p)SelectTrackWidth, IC_SELECTED, (void *)0 ); - MiscMenuItemCreate( editM, NULL, "cmdWidth2", _("Medium Tracks"), ACCL_MEDIUM, (void*)(wMenuCallBack_p)SelectTrackWidth, IC_SELECTED, (void *)2 ); - MiscMenuItemCreate( editM, NULL, "cmdWidth3", _("Thick Tracks"), ACCL_THICK, (void*)(wMenuCallBack_p)SelectTrackWidth, IC_SELECTED, (void *)3 ); + MiscMenuItemCreate( editM, NULL, "cmdWidth0", _("Thin Tracks"), ACCL_THIN, SelectTrackWidth, IC_SELECTED, I2VP(0) ); + MiscMenuItemCreate( editM, NULL, "cmdWidth2", _("Medium Tracks"), ACCL_MEDIUM, SelectTrackWidth, IC_SELECTED, I2VP(2) ); + MiscMenuItemCreate( editM, NULL, "cmdWidth3", _("Thick Tracks"), ACCL_THICK, SelectTrackWidth, IC_SELECTED, I2VP(3) ); /* * VIEW MENU */ + zoomInM = wMenuPushCreate(viewM, "menuEdit-zoomIn", _("Zoom &In"), - ACCL_ZOOMIN, (wMenuCallBack_p) DoZoomUp, (void*) 1); + ACCL_ZOOMIN, DoZoomUp, I2VP(1)); zoomSubM = wMenuMenuCreate(viewM, "menuEdit-zoomTo", _("&Zoom")); zoomOutM = wMenuPushCreate(viewM, "menuEdit-zoomOut", _("Zoom &Out"), - ACCL_ZOOMOUT, (wMenuCallBack_p) DoZoomDown, (void*) 1); - wMenuSeparatorCreate(viewM); + ACCL_ZOOMOUT, DoZoomDown, I2VP(1)); + zoomExtentsM = wMenuPushCreate(viewM, "menuEdit-zoomExtents", _("Zoom &Extents"), + 0, DoZoomExtents, I2VP(0)); + wMenuSeparatorCreate(viewM); InitCmdZoom(zoomM, zoomSubM, NULL, NULL); /* these menu choices and toolbar buttons are synonymous and should be treated as such */ wControlLinkedSet((wControl_p) zoomInM, (wControl_p) zoomUpB); wControlLinkedSet((wControl_p) zoomOutM, (wControl_p) zoomDownB); + wControlLinkedSet((wControl_p) zoomExtentsM, (wControl_p) zoomExtentsB); wMenuPushCreate(viewM, "menuEdit-redraw", _("&Redraw"), ACCL_REDRAW, (wMenuCallBack_p) MainRedraw, NULL); @@ -2434,20 +2665,20 @@ static void CreateMenus(void) { snapGridEnableMI = wMenuToggleCreate(viewM, "cmdGridEnable", _("Enable SnapGrid"), ACCL_SNAPENABLE, 0, - (wMenuToggleCallBack_p) SnapGridEnable, NULL); + SnapGridEnable, NULL); snapGridShowMI = wMenuToggleCreate(viewM, "cmdGridShow", _("Show SnapGrid"), ACCL_SNAPSHOW, - FALSE, (wMenuToggleCallBack_p) SnapGridShow, NULL); + FALSE, SnapGridShow, NULL); gridCmdInx = InitGrid(viewM); // visibility toggle for anchors // get the start value long anchors_long; - wPrefGetInteger("misc", "anchors", (long *)&anchors_long, 1); + wPrefGetInteger("misc", "anchors", &anchors_long, 1); magneticSnap = anchors_long ? TRUE : FALSE; magnetsMI = wMenuToggleCreate(viewM, "cmdMagneticSnap", _("Enable Magnetic Snap"), 0, magneticSnap, - (wMenuToggleCallBack_p)MagneticSnapToggle, NULL); + MagneticSnapToggle, NULL); // visibility toggle for map window // get the start value @@ -2456,7 +2687,7 @@ static void CreateMenus(void) { mapVisible = mapVisible_long ? TRUE : FALSE; mapShowMI = wMenuToggleCreate(viewM, "cmdMapShow", _("Show/Hide Map"), ACCL_MAPSHOW, mapVisible, - (wMenuToggleCallBack_p) MapWindowToggleShow, NULL); + MapWindowToggleShow, NULL); wMenuSeparatorCreate(viewM); @@ -2468,13 +2699,13 @@ static void CreateMenus(void) { cmdGroup = BG_SNAP; InitSnapGridButtons(); - magnetsB = AddToolbarButton("cmdMagneticSnap", wIconCreatePixMap(magnet_xpm), - IC_MODETRAIN_TOO, (addButtonCallBack_t) MagneticSnapToggle, NULL); + magnetsB = AddToolbarButton("cmdMagneticSnap", wIconCreatePixMap(magnet_xpm[iconSize]), + IC_MODETRAIN_TOO, MagneticSnapToggle, NULL); wControlLinkedSet((wControl_p) magnetsMI, (wControl_p) magnetsB); wButtonSetBusy(magnetsB, (wBool_t) magneticSnap); - mapShowB = AddToolbarButton("cmdMapShow", wIconCreatePixMap(map_xpm), - IC_MODETRAIN_TOO, (addButtonCallBack_t) MapWindowToggleShow, NULL); + mapShowB = AddToolbarButton("cmdMapShow", wIconCreatePixMap(map_xpm[iconSize]), + IC_MODETRAIN_TOO, MapWindowToggleShow, NULL); wControlLinkedSet((wControl_p) mapShowMI, (wControl_p) mapShowB); wButtonSetBusy(mapShowB, (wBool_t) mapVisible); @@ -2507,51 +2738,55 @@ static void CreateMenus(void) { cmdGroup = BG_SELECT; InitCmdDescribe(changeM); InitCmdSelect(changeM); - InitCmdPan(changeM); + InitCmdPan(viewM); + wMenuSeparatorCreate(changeM); cmdGroup = BG_TRKGRP; InitCmdMove(changeM); + InitCmdMoveDescription(changeM); InitCmdDelete(); InitCmdTunnel(); InitCmdBridge(); InitCmdAboveBelow(); cmdGroup = BG_TRKMOD; - if (extraButtons) - MiscMenuItemCreate(changeM, NULL, "loosen", _("&Loosen Tracks"), - ACCL_LOOSEN, (void*) (wMenuCallBack_p) LoosenTracks, - IC_SELECTED, (void *) 0); - InitCmdModify(changeM); + InitCmdCornu(changeM); + + MiscMenuItemCreate(changeM, NULL, "cmdRescale", _("Change Scale"), 0, + DoRescale, IC_SELECTED, NULL); + + + wMenuSeparatorCreate(changeM); + InitCmdJoin(changeM); - InitCmdPull(changeM); InitCmdSplit(changeM); - InitCmdMoveDescription(changeM); + + wMenuSeparatorCreate(changeM); + + InitCmdPull(changeM); + if (extraButtons) + MiscMenuItemCreate(changeM, NULL, "loosen", _("&Loosen Tracks"), + ACCL_LOOSEN, LoosenTracks, + IC_SELECTED, NULL); + wMenuSeparatorCreate(changeM); MiscMenuItemCreate(changeM, NULL, "cmdAddElevations", _("Raise/Lower Elevations"), ACCL_CHGELEV, - (void*) (wMenuCallBack_p) ShowAddElevations, IC_SELECTED, - (void *) 0); + ShowAddElevations, IC_SELECTED, + NULL); InitCmdElevation(changeM); InitCmdProfile(changeM); MiscMenuItemCreate(changeM, NULL, "cmdClearElevations", _("Clear Elevations"), ACCL_CLRELEV, - (void*) (wMenuCallBack_p) ClearElevations, IC_SELECTED, (void *) 0); + ClearElevations, IC_SELECTED, NULL); MiscMenuItemCreate(changeM, NULL, "cmdElevation", _("Recompute Elevations"), - 0, (void*) (wMenuCallBack_p) RecomputeElevations, 0, (void *) 0); + 0, RecomputeElevations, 0, NULL); ParamRegister(&addElevPG); - wMenuSeparatorCreate(changeM); - MiscMenuItemCreate(changeM, NULL, "cmdRescale", _("Change Scale"), 0, - (void*) (wMenuCallBack_p) DoRescale, IC_SELECTED, (void *) 0); - - wMenuSeparatorCreate(changeM); - - InitCmdCornu(changeM); - /* * DRAW MENU */ @@ -2567,28 +2802,28 @@ static void CreateMenus(void) { * OPTION MENU */ MiscMenuItemCreate(optionM, NULL, "cmdLayout", _("L&ayout ..."), - ACCL_LAYOUTW, (void*) LayoutInit(), IC_MODETRAIN_TOO, (void *) 0); + ACCL_LAYOUTW, LayoutInit(), IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "cmdDisplay", _("&Display ..."), - ACCL_DISPLAYW, (void*) DisplayInit(), IC_MODETRAIN_TOO, (void *) 0); + ACCL_DISPLAYW, DisplayInit(), IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "cmdCmdopt", _("Co&mmand ..."), - ACCL_CMDOPTW, (void*) CmdoptInit(), IC_MODETRAIN_TOO, (void *) 0); + ACCL_CMDOPTW, CmdoptInit(), IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "cmdEasement", _("&Easements ..."), - ACCL_EASEW, (void*) (wMenuCallBack_p) DoEasementRedir, - IC_MODETRAIN_TOO, (void *) 0); + ACCL_EASEW, DoEasementRedir, + IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "fontSelW", _("&Fonts ..."), ACCL_FONTW, - (void*) (wMenuCallBack_p) SelectFont, IC_MODETRAIN_TOO, (void *) 0); + SelectFont, IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "cmdSticky", _("Stic&ky ..."), - ACCL_STICKY, (void*) (wMenuCallBack_p) DoSticky, IC_MODETRAIN_TOO, - (void *) 0); + ACCL_STICKY, DoSticky, IC_MODETRAIN_TOO, + NULL); if (extraButtons) { menuPLs[menuPG.paramCnt].context = debugW; MiscMenuItemCreate(optionM, NULL, "cmdDebug", _("&Debug ..."), 0, - (void*) (wMenuCallBack_p) DebugInit, IC_MODETRAIN_TOO, (void *) 0); + DebugInit, IC_MODETRAIN_TOO, NULL); } MiscMenuItemCreate(optionM, NULL, "cmdPref", _("&Preferences ..."), - ACCL_PREFERENCES, (void*) PrefInit(), IC_MODETRAIN_TOO, (void *) 0); + ACCL_PREFERENCES, PrefInit(), IC_MODETRAIN_TOO, NULL); MiscMenuItemCreate(optionM, NULL, "cmdColor", _("&Colors ..."), ACCL_COLORW, - (void*) ColorInit(), IC_MODETRAIN_TOO, (void *) 0); + ColorInit(), IC_MODETRAIN_TOO, NULL); /* * MACRO MENU @@ -2622,14 +2857,14 @@ static void CreateMenus(void) { /* tip of the day */ wMenuSeparatorCreate( helpM ); - wMenuPushCreate( helpM, "cmdTip", _("Tip of the Day..."), 0, (wMenuCallBack_p)ShowTip, (void *)(SHOWTIP_FORCESHOW | SHOWTIP_NEXTTIP)); + wMenuPushCreate( helpM, "cmdTip", _("Tip of the Day..."), 0, ShowTip, I2VP(SHOWTIP_FORCESHOW | SHOWTIP_NEXTTIP)); demoM = wMenuMenuCreate( helpM, "cmdDemo", _("&Demos") ); - wMenuPushCreate( helpM, "cmdExamples", _("Examples..."), 0, (wMenuCallBack_p)ChkExamples, (void *)0); + wMenuPushCreate( helpM, "cmdExamples", _("Examples..."), 0, ChkExamples, NULL); /* about window */ wMenuSeparatorCreate(helpM); wMenuPushCreate(helpM, "about", _("About"), 0, - (wMenuCallBack_p) CreateAboutW, NULL); + CreateAboutW, NULL); /* * MANAGE MENU @@ -2645,34 +2880,34 @@ static void CreateMenus(void) { MiscMenuItemCreate(manageM, NULL, "cmdContmgm", _("Layout &Control Elements"), ACCL_CONTMGM, - (void*) ControlMgrInit(), 0, (void*) 0); + ControlMgrInit(), 0, NULL); MiscMenuItemCreate(manageM, NULL, "cmdGroup", _("&Group"), ACCL_GROUP, - (void*) (wMenuCallBack_p) DoGroup, IC_SELECTED, (void *) 0); + DoGroup, IC_SELECTED, NULL); MiscMenuItemCreate(manageM, NULL, "cmdUngroup", _("&Ungroup"), ACCL_UNGROUP, - (void*) (wMenuCallBack_p) DoUngroup, IC_SELECTED, (void *) 0); + DoUngroup, IC_SELECTED, NULL); MiscMenuItemCreate(manageM, NULL, "cmdCustmgm", - _("Custom defined parts..."), ACCL_CUSTMGM, (void*) CustomMgrInit(), - 0, (void *) 0); + _("Custom defined parts..."), ACCL_CUSTMGM, CustomMgrInit(), + 0, NULL); MiscMenuItemCreate(manageM, NULL, "cmdRefreshCompound", _("Update Turnouts and Structures"), 0, - (void*) (wMenuCallBack_p) DoRefreshCompound, 0, (void *) 0); + DoRefreshCompound, 0, NULL); MiscMenuItemCreate(manageM, NULL, "cmdCarInventory", _("Car Inventory"), - ACCL_CARINV, (void*) (wMenuCallBack_p) DoCarDlg, IC_MODETRAIN_TOO, - (void *) 0); + ACCL_CARINV, DoCarDlg, IC_MODETRAIN_TOO, + NULL); wMenuSeparatorCreate(manageM); MiscMenuItemCreate(manageM, NULL, "cmdLayer", _("Layers ..."), ACCL_LAYERS, - (void*) InitLayersDialog(), 0, (void *) 0); + InitLayersDialog(), 0, NULL); wMenuSeparatorCreate(manageM); MiscMenuItemCreate(manageM, NULL, "cmdEnumerate", _("Parts &List ..."), - ACCL_PARTSLIST, (void*) (wMenuCallBack_p) EnumerateTracks, 0, - (void *) 0); + ACCL_PARTSLIST, EnumerateTracks, 0, + NULL); MiscMenuItemCreate(manageM, NULL, "cmdPricelist", _("Price List..."), - ACCL_PRICELIST, (void*) PriceListInit(), 0, (void *) 0); + ACCL_PRICELIST, PriceListInit(), 0, NULL); cmdGroup = BG_LAYER | BG_BIGGAP; @@ -2685,44 +2920,7 @@ static void CreateMenus(void) { cmdGroup = BG_HOTBAR; InitHotBar(); -#ifdef LATER -#ifdef WINDOWS - wAttachAccelKey( wAccelKey_Pgdn, 0, (wAccelKeyCallBack_p)DoZoomUp, (void*)1 ); - wAttachAccelKey( wAccelKey_Pgup, 0, (wAccelKeyCallBack_p)DoZoomDown, (void*)1 ); - wAttachAccelKey( wAccelKey_F5, 0, (wAccelKeyCallBack_p)MainRedraw, (void*)1 ); -#endif - wAttachAccelKey( wAccelKey_Ins, WKEY_CTRL, (wAccelKeyCallBack_p)EditCopy, 0 ); - wAttachAccelKey( wAccelKey_Ins, WKEY_SHIFT, (wAccelKeyCallBack_p)EditPaste, 0 ); - wAttachAccelKey( wAccelKey_Back, WKEY_SHIFT, (wAccelKeyCallBack_p)UndoUndo, 0 ); - wAttachAccelKey( wAccelKey_Del, WKEY_SHIFT, (wAccelKeyCallBack_p)EditCut, 0 ); - wAttachAccelKey( wAccelKey_F6, 0, (wAccelKeyCallBack_p)NextWindow, 0 ); -#endif - SetAccelKey("zoomUp", wAccelKey_Pgdn, 0, (wAccelKeyCallBack_p) DoZoomUp, - (void*) 1); - SetAccelKey("zoomDown", wAccelKey_Pgup, 0, (wAccelKeyCallBack_p) DoZoomDown, - (void*) 1); - SetAccelKey("redraw", wAccelKey_F5, 0, (wAccelKeyCallBack_p) MainRedraw, - (void*) 1); - SetAccelKey("delete", wAccelKey_Del, 0, (wAccelKeyCallBack_p) SelectDelete, - (void*) 1); - SetAccelKey("copy", wAccelKey_Ins, WKEY_CTRL, - (wAccelKeyCallBack_p) EditCopy, 0); - SetAccelKey("paste", wAccelKey_Ins, WKEY_SHIFT, - (wAccelKeyCallBack_p) EditPaste, 0); - SetAccelKey("undo", wAccelKey_Back, WKEY_SHIFT, - (wAccelKeyCallBack_p) UndoUndo, 0); - SetAccelKey("cut", wAccelKey_Del, WKEY_SHIFT, (wAccelKeyCallBack_p) EditCut, - 0); - SetAccelKey("nextWindow", wAccelKey_F6, 0, (wAccelKeyCallBack_p) NextWindow, - 0); - SetAccelKey("zoomUp", wAccelKey_Numpad_Add, WKEY_CTRL, - (wAccelKeyCallBack_p) DoZoomUp, (void*) 1); - SetAccelKey("zoomDown", wAccelKey_Numpad_Subtract, WKEY_CTRL, - (wAccelKeyCallBack_p) DoZoomDown, (void*) 1); - SetAccelKey("help", wAccelKey_F1, WKEY_SHIFT, - (wAccelKeyCallBack_p) wDoAccelHelp, (void*) 1); - SetAccelKey("help-context", wAccelKey_F1, 0, - (wAccelKeyCallBack_p) wDoAccelHelp, (void*) 3); + SetAccelKeys(); InitBenchDialog(); wPrefGetInteger( "DialogItem", "sticky-set", &stickySet, stickySet ); @@ -2748,21 +2946,23 @@ static void LoadFileList(void) { EXPORT void InitCmdEnumerate(void) { AddToolbarButton("cmdEnumerate", wIconCreatePixMap(partlist_xpm), - IC_SELECTED | IC_ACCLKEY, (addButtonCallBack_t) EnumerateTracks, + IC_SELECTED | IC_ACCLKEY, EnumerateTracks, NULL); } EXPORT void InitCmdExport(void) { ButtonGroupBegin( _("Import/Export"), "cmdExportImportSetCmd", _("Import/Export") ); cmdGroup = BG_EXPORTIMPORT; - AddToolbarButton("cmdExport", wIconCreatePixMap(export_xpm), - IC_SELECTED | IC_ACCLKEY, (addButtonCallBack_t) DoExport, NULL); - AddToolbarButton("cmdExportDXF", wIconCreatePixMap(export_dxf_xpm), IC_SELECTED | IC_ACCLKEY, - (addButtonCallBack_t)DoExportDXF, (void*)1); - AddToolbarButton("cmdImport", wIconCreatePixMap(import_xpm), IC_ACCLKEY, - (addButtonCallBack_t) DoImport, (void*)0); - AddToolbarButton("cmdImportModule", wIconCreatePixMap(importmod_xpm), IC_ACCLKEY, - (addButtonCallBack_t) DoImport, (void*)1); + AddToolbarButton("cmdExport", wIconCreatePixMap(doc_export_xpm[iconSize]), + IC_SELECTED | IC_ACCLKEY, DoExport, NULL); + AddToolbarButton("cmdExportDXF", wIconCreatePixMap(doc_export_dxf_xpm[iconSize]), IC_SELECTED | IC_ACCLKEY, + DoExportDXF, I2VP(1)); + AddToolbarButton("cmdExportBmap", wIconCreatePixMap(doc_export_bmap_xpm[iconSize]), IC_ACCLKEY, + OutputBitMapInit(), NULL); + AddToolbarButton("cmdImport", wIconCreatePixMap(doc_import_xpm[iconSize]), IC_ACCLKEY, + DoImport, I2VP(0)); + AddToolbarButton("cmdImportModule", wIconCreatePixMap(doc_import_xtc_xpm[iconSize]), IC_ACCLKEY, + DoImport, I2VP(1)); ButtonGroupEnd(); } @@ -2813,11 +3013,10 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { long oldToolbarMax; long newToolbarMax; char *cp; - char *oldLocale = NULL; char buffer[STR_SIZE]; unsigned int i; - wPos_t displayWidth; - wPos_t displayHeight; + wWinPix_t displayWidth; + wWinPix_t displayHeight; strcpy(buffer, sProdNameLower); @@ -2828,17 +3027,17 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { InitGettext(); /* Save user locale */ - oldLocale = setlocale(LC_ALL, NULL); - if (oldLocale) - userLocale = strdup(oldLocale); + SetCLocale(); + SetUserLocale(); /* * ARGUMENTS */ opterr = 0; + LogSet("dummy",0); - while ((c = getopt(argc, argv, "vl:d:c:m")) != -1) + while ((c = getopt(argc, argv, "vl:d:c:mV")) != -1) switch (c) { case 'c': /* configuration name */ /* test for valid filename */ @@ -2883,6 +3082,10 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { argv[optind - 1]); exit(1); break; + case 'V': // display version + printf("Version: %s\n",XTRKCAD_VERSION); + exit(0); + break; default: abort(); } @@ -2989,6 +3192,7 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { RotateDialogInit(); MoveDialogInit(); + IndexDialogInit(); wSetSplashInfo(_("Initializing commands")); LOG1(log_init, ( "paramInit\n" )) @@ -3028,7 +3232,8 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { if (toolbarSet&(1<<BG_HOTBAR)) { LayoutHotBar( NULL ); } else { - HideHotBar(); + LayoutHotBar( NULL ); /* Must run once to set it up */ + HideHotBar(); /* Then hide */ } LOG1(log_init, ( "drawInit\n" )) DrawInit(initialZoom); @@ -3041,6 +3246,7 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { if (!ParamFileListInit()) return NULL; + // LOG1(log_init, ("!ParamFileListInit()\n")) curCommand = describeCmdInx; LOG1(log_init, ( "Reset\n" )) @@ -3082,13 +3288,27 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { /* this has to be called before ShowTip() */ InitSmallDlg(); - ShowTip(SHOWTIP_NEXTTIP); + /* Compare the program version and display Beta warning if appropriate */ + pref = wPrefGetString("misc", "version"); + if((!pref) || (strcmp(pref,XTRKCAD_VERSION) != 0)) + { + if(strstr(XTRKCAD_VERSION,"Beta") != NULL) + { + NoticeMessage(MSG_BETA_NOTICE, _("Ok"),NULL, XTRKCAD_VERSION); + } + //else { + // NoticeMessage(_("New version welcome..."),_("Ok"),NULL); + //} + wPrefSetString("misc", "version", XTRKCAD_VERSION); + } + else { + ShowTip(SHOWTIP_NEXTTIP); + } /* check for existing checkpoint file */ resumeWork = FALSE; if (ExistsCheckpoint()) { resumeWork = OfferCheckpoint(); - MainRedraw(); } if (!resumeWork) { @@ -3099,15 +3319,17 @@ EXPORT wWin_p wMain(int argc, char * argv[]) { wPrefGetInteger("misc", "lastlayoutexample", &iExample, 0); bExample = (iExample == 1); } - if (initialFile && strlen(initialFile)) { - DoFileList(0, NULL, initialFile); //Will load Background values, if archive + DoFileList(0, "1", initialFile); //Will load Background values, if archive, leave if (onStartup == 1) LayoutBackGroundInit(TRUE); //Wipe Out Prior Background else LayoutBackGroundInit(FALSE); //Get Prior BackGround - } + } else + LayoutBackGroundInit(TRUE); // If onStartup==1 and no initial file - Wipe Out Prior Background + } + MainRedraw(); inMainW = FALSE; return mainW; } diff --git a/app/bin/misc.h b/app/bin/misc.h index 2be0be2..509f2d8 100644 --- a/app/bin/misc.h +++ b/app/bin/misc.h @@ -25,20 +25,11 @@ #define EXPORT -#include <stdio.h> - #include "acclkeys.h" #include "common.h" -#include "draw.h" -#include "wlib.h" typedef void (*addButtonCallBack_t)(void*); -#ifdef WINDOWS -/* suppress warning from *.bmp about conversion of int to char */ -#pragma warning( disable : 4305) -#endif - #define COUNT(A) (sizeof(A)/sizeof(A[0])) #define STR_SIZE (256) @@ -54,6 +45,8 @@ typedef void (*addButtonCallBack_t)(void*); * Globals */ +extern int iconSize; + extern long adjTimer; typedef int SCALEINX_T; @@ -78,6 +71,7 @@ extern ANGLE_T connectAngle; extern long twoRailScale; extern long mapScale; extern long constrainMain; +extern long dontHideCursor; extern long checkPtInterval; extern long autosaveChkPoints; extern long liveMap; @@ -178,20 +172,20 @@ typedef STATUS_T (*procCommand_t) (wAction_t, coOrd); /* * Windows and buttons */ -extern wPos_t DlgSepLeft; -extern wPos_t DlgSepMid; -extern wPos_t DlgSepRight; -extern wPos_t DlgSepTop; -extern wPos_t DlgSepBottom; -extern wPos_t DlgSepNarrow; -extern wPos_t DlgSepWide; -extern wPos_t DlgSepFrmLeft; -extern wPos_t DlgSepFrmRight; -extern wPos_t DlgSepFrmTop; -extern wPos_t DlgSepFrmBottom; +extern wWinPix_t DlgSepLeft; +extern wWinPix_t DlgSepMid; +extern wWinPix_t DlgSepRight; +extern wWinPix_t DlgSepTop; +extern wWinPix_t DlgSepBottom; +extern wWinPix_t DlgSepNarrow; +extern wWinPix_t DlgSepWide; +extern wWinPix_t DlgSepFrmLeft; +extern wWinPix_t DlgSepFrmRight; +extern wWinPix_t DlgSepFrmTop; +extern wWinPix_t DlgSepFrmBottom; extern wWin_p mainW; -extern wPos_t toolbarHeight; +extern wWinPix_t toolbarHeight; extern wIndex_t changed; extern char message[STR_HUGE_SIZE]; extern REGION_T curRegion; @@ -212,30 +206,30 @@ extern wMenu_p popup1M, popup2M; #define wControlBeside( B ) (wControlGetPosX((wControl_p)(B))+wControlGetWidth((wControl_p)(B))) typedef void (*rotateDialogCallBack_t) ( void * ); +typedef void (*indexDialogCallBack_t) (void * ); typedef void (*moveDialogCallBack_t) (void *); extern void AddRotateMenu( wMenu_p, rotateDialogCallBack_t ); extern void AddMoveMenu( wMenu_p, moveDialogCallBack_t ); -extern void StartRotateDialog( rotateDialogCallBack_t ); -extern void StartMoveDialog(moveDialogCallBack_t ); +extern void AddIndexMenu(wMenu_p m, indexDialogCallBack_t func); /* * Safe Memory etc */ -void * MyMalloc( long ); -void * MyRealloc( void *, long ); +void * MyMalloc( size_t ); +void * MyRealloc( void *, size_t ); void MyFree( void * ); void * memdup( void *, size_t ); char * MyStrdup( const char * ); -void AbortProg( char *, ... ); +void AbortProg( const char *, ... ); #define ASSERT( X ) if ( !(X) ) AbortProg( "%s: %s:%d", #X, __FILE__, __LINE__ ) -char * Strcpytrimed( char *, char *, BOOL_T ); -char * BuildTrimedTitle( char *, char *, char *, char *, char * ); -void ErrorMessage( char *, ... ); -void InfoMessage( char *, ... ); -int NoticeMessage( char *, char*, char *, ... ); -int NoticeMessage2( int, char *, char*, char *, ... ); -void DoQuit( void ); - -void FileIsChanged(void); +char * Strcpytrimed( char *, const char *, BOOL_T ); +char * BuildTrimedTitle( char *, const char *, const char *, const char *, const char * ); +void ErrorMessage( const char *, ... ); +void InfoMessage( const char *, ... ); +int NoticeMessage( const char *, const char*, const char *, ... ); +int NoticeMessage2( int, const char *, const char*, const char *, ... ); +void DoQuit( void * unused ); + +void SetFileChanged(void); char * ConvertFromEscapedText(const char * text); char * ConvertToEscapedText(const char * text); @@ -244,18 +238,19 @@ void wShow( wWin_p ); void wHide( wWin_p ); void CloseDemoWindows( void ); void DefaultProc( wWin_p, winProcEvent, void * ); -void SelectFont(); +void SelectFont( void * unused ); void CheckRoomSize( BOOL_T ); -const char * GetBalloonHelpStr( char* ); +const char * GetBalloonHelpStr( const char* ); const char * GetCurCommandName( void ); void EnableCommands( void ); void Reset( void ); +void TryCheckPoint( void ); wIndex_t GetCurrentCommand(void); BOOL_T IsCurCommandSticky(void); void ResetIfNotSticky( void ); wBool_t DoCurCommand( wAction_t, coOrd ); -void ConfirmReset( BOOL_T ); +int ConfirmReset( BOOL_T ); void LayoutToolBar( void * ); #define IC_STICKY (1<<0) #define IC_INITNOTSTICKY (1<<1) @@ -276,24 +271,24 @@ void LayoutToolBar( void * ); #define IC_PLAYBACK_PUSH (1<<16) #define IC_WANT_MODKEYS (1<<17) #define IC_POPUP3 (1<<18) -wIndex_t InitCommand( wMenu_p, procCommand_t, char *, char *, int, long, long ); +wIndex_t InitCommand( wMenu_p, procCommand_t, const char *, const char *, int, long, long ); void AddToolbarControl( wControl_p, long ); BOOL_T CommandEnabled( wIndex_t ); -wButton_p AddToolbarButton( char*, wIcon_p, long, wButtonCallBack_p, void * context ); -wIndex_t AddCommandButton( procCommand_t, char*, char*, wIcon_p, int, long, long, void* ); -wIndex_t AddMenuButton( wMenu_p, procCommand_t, char*, char*, wIcon_p, int, long, long, void* ); +wButton_p AddToolbarButton( const char*, wIcon_p, long, wButtonCallBack_p, void * context ); +// RWS not found: wIndex_t AddCommandButton( procCommand_t, char*, char*, wIcon_p, int, long, long, void* ); +wIndex_t AddMenuButton( wMenu_p, procCommand_t, const char*, const char*, wIcon_p, int, long, long, void* ); void PlaybackButtonMouse( wIndex_t ); -void ButtonGroupBegin( char *, char *, char * ); +void ButtonGroupBegin( const char *, const char *, const char * ); void ButtonGroupEnd( void ); void SaveState( void ); -void PlaybackCommand( char *, wIndex_t ); -wMenu_p MenuRegister( char * label ); +void PlaybackCommand( const char *, wIndex_t ); +wMenu_p MenuRegister( const char * label ); void DoCommandB( void * ); -extern void EnumerateTracks( void ); -void InitDebug( char *, long * ); +extern void EnumerateTracks( void * unused ); +void InitDebug( const char *, long * ); #define CHANGE_SCALE (1<<0) #define CHANGE_PARAMS (1<<1) @@ -305,6 +300,7 @@ void InitDebug( char *, long * ); #define CHANGE_TOOLBAR (1<<8) #define CHANGE_CMDOPT (1<<9) #define CHANGE_LIMITS (1<<10) +#define CHANGE_ICONSIZE (1<<11) #define CHANGE_ALL (CHANGE_SCALE|CHANGE_PARAMS|CHANGE_MAIN|CHANGE_MAP|CHANGE_UNITS|CHANGE_TOOLBAR|CHANGE_CMDOPT|CHANGE_BACKGROUND) typedef void (*changeNotificationCallBack_t)( long ); void RegisterChangeNotification( changeNotificationCallBack_t ); @@ -313,7 +309,6 @@ void DoChangeNotification( long ); wBool_t CheckHelpTopicExists(const char * topic); /* foreign externs */ -extern drawCmd_t mapD; extern STATUS_T CmdEnumerate( wAction_t, coOrd ); extern wIndex_t modifyCmdInx; @@ -326,9 +321,15 @@ void InitNewTurn( wMenu_p m ); /* cnote.c */ void ClearNote( void ); +/* cprintc.c */ +coOrd GetPrintOrig(); +ANGLE_T GetPrintAngle(); + + /* cruler.c */ void RulerRedraw( BOOL_T ); STATUS_T ModifyRuler( wAction_t, coOrd ); +STATUS_T ModifyProtractor( wAction_t, coOrd ); /* dialogs */ void OutputBitMap( void ); @@ -336,6 +337,7 @@ void OutputBitMap( void ); extern wDrawColor snapGridColor; addButtonCallBack_t ColorInit( void ); +addButtonCallBack_t SettingsInit( void ); addButtonCallBack_t PrefInit( void ); addButtonCallBack_t LayoutInit( void ); addButtonCallBack_t DisplayInit( void ); @@ -348,23 +350,23 @@ addButtonCallBack_t ControlMgrInit ( void ); wIndex_t InitGrid( wMenu_p menu ); -void SnapPos( coOrd * ); +BOOL_T SnapPos( coOrd * ); void DrawSnapGrid( drawCmd_p, coOrd, BOOL_T ); BOOL_T GridIsVisible( void ); void InitSnapGridButtons( void ); -void SnapGridEnable( void ); -void SnapGridShow( void ); +void SnapGridEnable( void * unused ); +void SnapGridShow( void * unused ); void MapWindowShow( int state ); extern wMenuToggle_p snapGridEnableMI; extern wMenuToggle_p snapGridShowMI; void ScaleLengthEnd( void ); -void EnumerateList( long, FLOAT_T, char * ); +void EnumerateList( long, FLOAT_T, char * , char * ); void EnumerateStart(void); void EnumerateEnd(void); /* cnote.c */ -void DoNote( void ); +void DoNote( void * unused ); BOOL_T WriteMainNote( FILE * ); BOOL_T ReadMainNote(char * line); @@ -448,5 +450,6 @@ void InitCmdSensor ( wMenu_p menu ); /* cmodify.c */ STATUS_T CmdModify(wAction_t action,coOrd pos ); +#include "misc2.h" #endif diff --git a/app/bin/misc2.c b/app/bin/misc2.c index 19226cc..6334bf2 100644 --- a/app/bin/misc2.c +++ b/app/bin/misc2.c @@ -20,50 +20,34 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <stdarg.h> - -#include <stdint.h> - #include "cjoin.h" #include "common.h" #include "compound.h" #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" EXPORT long units = 0; /**< measurement units: 0 = English, 1 = metric */ EXPORT long checkPtInterval = 10; -EXPORT long autosaveChkPoints = 2; +EXPORT long autosaveChkPoints = 0; EXPORT DIST_T curScaleRatio; EXPORT char * curScaleName; EXPORT DIST_T trackGauge; EXPORT long labelScale = 8; EXPORT long labelEnable = (LABELENABLE_ENDPT_ELEV|LABELENABLE_CARS); +/** @prefs [draw] label-when=2 Unknown */ EXPORT long labelWhen = 2; EXPORT long colorTrack = 0; EXPORT long colorDraw = 0; EXPORT long constrainMain = 0; +EXPORT long dontHideCursor = 0; EXPORT long hideSelectionWindow = 0; EXPORT long angleSystem = 0; EXPORT DIST_T minLength = 0.1; @@ -173,6 +157,17 @@ typedef struct { EXPORT typedef scaleInfo_t * scaleInfo_p; static dynArr_t scaleInfo_da; #define scaleInfo(N) DYNARR_N( scaleInfo_t, scaleInfo_da, N ) + +typedef struct { + char *in_scales; + SCALE_FIT_TYPE_T type; + char *match_scales; + SCALE_FIT_T result; +} scaleComp_t; +EXPORT typedef scaleComp_t * scaleComp_p; +static dynArr_t scaleCompatible_da; +#define scaleComp(N) DYNARR_N( scaleComp_t, scaleCompatible_da, N ) + static tieData_t tieData_demo = { 96.0/160.0, 16.0/160.0, @@ -180,6 +175,7 @@ static tieData_t tieData_demo = { //EXPORT SCALEINX_T curScaleInx = -1; static scaleInfo_p curScale; +/** @prefs [misc] include same gauge turnouts=1 Unknown */ EXPORT long includeSameGaugeTurnouts = FALSE; static SCALEINX_T demoScaleInx = -1; @@ -243,12 +239,16 @@ EXPORT SCALEINX_T GetScaleInx( SCALEDESCINX_T scaleInx, GAUGEINX_T gaugeInx ) } EXPORT DIST_T GetScaleTrackGauge( SCALEINX_T si ) { - return scaleInfo(si).gauge; + if (si >=0 && si<scaleInfo_da.cnt) + return scaleInfo(si).gauge; + else return 1.0; } EXPORT DIST_T GetScaleRatio( SCALEINX_T si ) { - return scaleInfo(si).ratio; + if (si >=0 && si<scaleInfo_da.cnt) + return scaleInfo(si).ratio; + else return 1.0; } EXPORT char * GetScaleName( SCALEINX_T si ) @@ -286,9 +286,15 @@ EXPORT tieData_p GetScaleTieData( SCALEINX_T si ) if ( !s->tieDataValid ) { sprintf( message, "tiedata-%s", s->scale ); defLength = (96.0-54.0)/s->ratio+s->gauge; + + /** @prefs [tiedata-<SCALE>] length, width, spacing Sets tie drawing data. + * Example for 6"x8"x6' ties spaced 20" in HOn3 (slash separates 4 lines): + * [tiedata-HOn3] \ length=0.83 \ width=0.07 \ spacing=0.23 + */ wPrefGetFloat( message, "length", &s->tieData.length, defLength ); wPrefGetFloat( message, "width", &s->tieData.width, 16.0/s->ratio ); wPrefGetFloat( message, "spacing", &s->tieData.spacing, 2*s->tieData.width ); + s->tieDataValid = TRUE; } return &scaleInfo(si).tieData; } @@ -315,7 +321,7 @@ SetScaleGauge(SCALEDESCINX_T desc, GAUGEINX_T gauge) dynArr_t gauges_da; gauges_da = (scaleDesc(desc)).gauges_da; - SetLayoutCurScale(((gaugeInfo_p)gauges_da.ptr)[gauge].scale); + SetLayoutCurScale( DYNARR_N( gaugeInfo_t, gauges_da, gauge).scale); } static BOOL_T @@ -376,29 +382,91 @@ EXPORT SCALEINX_T LookupScale( const char * name ) return si; } +/* + * Evaluate the fit of a part scale1 to a definition in scale2 for a type. + * + * The rules differ by type of object. + * + * Tracks need to be the same gauge to be a fit. If they are the same scale they are exact. + * If the gauge is the same, but the scale is different they are compatible. + * There are well known exceptions where the scale is not the same but we call them exact. + * + * Structures need to be the same scale to be exact. If they are within 15% they are compatible. + * + * Cars need to be the same gauge and scale to be exact. + * If they are the same gauge, but within 15% of the scale they are compatible. + * + *\param type (FIT_TURNOUT,FIT_STRUCTURE,FIT_CAR) + *\param scale1 the input scale + *\param scale2 the scale to check against + * + *\return FIT_EXACT, FIT_COMPATIBLE, FIT_NONE + */ -EXPORT BOOL_T CompatibleScale( - BOOL_T isTurnout, +EXPORT SCALE_FIT_T CompatibleScale( + SCALE_FIT_TYPE_T type, SCALEINX_T scale1, SCALEINX_T scale2 ) { + SCALE_FIT_T rc; if ( scale1 == scale2 ) - return TRUE; + return FIT_EXACT; if ( scale1 == SCALE_DEMO || scale2 == SCALE_DEMO ) - return FALSE; + return FIT_NONE; if ( scale1 == demoScaleInx || scale2 == demoScaleInx ) - return FALSE; - if ( isTurnout ) { + return FIT_NONE; + switch(type) { + case FIT_TURNOUT: + if ( scale1 == SCALE_ANY ) + return FIT_EXACT; + if (scaleInfo(scale1).gauge == scaleInfo(scale2).gauge && + scaleInfo(scale1).scale == scaleInfo(scale2).scale) + return FIT_EXACT; + + rc = FindScaleCompatible(FIT_TURNOUT, scaleInfo(scale1).scale, scaleInfo(scale2).scale); + if (rc != FIT_NONE) return rc; + if ( includeSameGaugeTurnouts && - scaleInfo(scale1).gauge == scaleInfo(scale2).gauge ) - return TRUE; - } else { + scaleInfo(scale1).gauge == scaleInfo(scale2).gauge ) + return FIT_COMPATIBLE; + break; + case FIT_STRUCTURE: if ( scale1 == SCALE_ANY ) - return TRUE; + return FIT_EXACT; if ( scaleInfo(scale1).ratio == scaleInfo(scale2).ratio ) - return TRUE; + return FIT_EXACT; + + rc = FindScaleCompatible(FIT_STRUCTURE, scaleInfo(scale1).scale, scaleInfo(scale2).scale); + if (rc != FIT_NONE) return rc; + + //15% scale match is compatible for structures + if (scaleInfo(scale1).ratio/scaleInfo(scale2).ratio>=0.85 && + scaleInfo(scale1).ratio/scaleInfo(scale2).ratio<=1.15) + return FIT_COMPATIBLE; + break; + case FIT_CAR: + if ( scale1 == SCALE_ANY ) + return FIT_EXACT; + if (scaleInfo(scale1).gauge == scaleInfo(scale2).gauge && + scaleInfo(scale1).scale == scaleInfo(scale2).scale) + return FIT_EXACT; + + rc = FindScaleCompatible(FIT_CAR, scaleInfo(scale1).scale, scaleInfo(scale2).scale); + if (rc != FIT_NONE) return rc; + + //Same gauge and 15% scale match is compatible for cars + if (scaleInfo(scale1).gauge == scaleInfo(scale2).gauge) { + if (scaleInfo(scale1).ratio/scaleInfo(scale2).ratio>=0.85 && + scaleInfo(scale1).ratio/scaleInfo(scale2).ratio<=1.15) + return FIT_COMPATIBLE; + } + break; + + default:; } - return FALSE; + + return FIT_NONE; + } /** Split the scale and the gauge description for a given combination. Eg HOn3 will be @@ -451,7 +519,7 @@ GetScaleGauge( SCALEINX_T scaleInx, SCALEDESCINX_T *scaleDescInx, GAUGEINX_T *ga static void SetScale( SCALEINX_T newScaleInx ) { - if (newScaleInx < 0 && newScaleInx >= scaleInfo_da.cnt) { + if (newScaleInx < 0 || newScaleInx >= scaleInfo_da.cnt) { NoticeMessage( MSG_BAD_SCALE_INDEX, _("Ok"), NULL, (int)newScaleInx ); return; } @@ -530,7 +598,7 @@ EXPORT BOOL_T DoSetScaleDesc( void ) DIST_T ratio; BOOL_T found; char buf[ 80 ]; - int len; + size_t len; for( scaleInx = 0; scaleInx < scaleInfo_da.cnt; scaleInx++ ) { ratio = DYNARR_N( scaleInfo_t, scaleInfo_da, scaleInx ).ratio; @@ -629,13 +697,113 @@ static BOOL_T AddScale( return TRUE; } +static BOOL_T AddScaleFit( + char * line) { + char scales[STR_SIZE], matches[STR_SIZE], type[20], result[20]; + BOOL_T rc; + scaleComp_p s; + + if ( (rc=sscanf( line, "SCALEFIT %s %s %s %s", + type, result, scales, matches )) != 4) { + SyntaxError( "SCALEFIT", rc, 4 ); + return FALSE; + } + DYNARR_APPEND( scaleComp_t, scaleCompatible_da, 10 ); + s = &scaleComp(scaleCompatible_da.cnt-1); + s->in_scales = MyStrdup(scales); + s->match_scales = MyStrdup(matches); + if (strcmp(type,"STRUCTURE") == 0) { + s->type = FIT_STRUCTURE; + } else if (strcmp(type,"TURNOUT")==0) { + s->type = FIT_TURNOUT; + } else if (strcmp(type,"CAR")==0) { + s->type = FIT_CAR; + } else { + InputError( "Invalid SCALEFIT type %s", TRUE, type ); + return FALSE; + } + if (strcmp(result,"COMPATIBLE")==0) { + s->result = FIT_COMPATIBLE; + } else if (strcmp(result,"EXACT")==0) { + s->result = FIT_EXACT; + } else { + InputError( "Invalid SCALEFIT result %s", TRUE, result ); + return FALSE; + } + + return TRUE; +} + +EXPORT SCALE_FIT_T FindScaleCompatible(SCALE_FIT_TYPE_T type, char * scale1, char * scale2) { + + char * cp, * cq; + + if (!scale1 || !scale1[0]) return FIT_NONE; + if (!scale2 || !scale2[0]) return FIT_NONE; + + for (int i=0; i<scaleCompatible_da.cnt; i++) { + scaleComp_p s; + s = &scaleComp(i); + if (s->type != type) continue; + BOOL_T found = FALSE; + cp = s->in_scales; + //Match input scale + while (cp) { + //Next instance of needle in haystack + cp = strstr(cp,scale2); + if (!cp) break; + //Check that this is start of csv string + if (cp == s->in_scales || cp[-1] == ',') { + //Is this end of haystack? + if (strlen(cp) == strlen(scale2)) { + found = TRUE; + break; + } + //Is it the same until the next ',' + cq=strstr(cp,","); + if (cq && (cq-cp == strlen(scale2))) { + found = TRUE; + break; + } + else cp=cq; + } else cp=strstr(cp,","); + } + if (!found) continue; + found = FALSE; + cp = s->match_scales; + //Match output scale + while (cp) { + //Next instance of needle in haystack + cp = strstr(cp,scale1); + if (!cp) break; + //Check that this is start of csv string + if (cp == s->match_scales || cp[-1] == ',') { + //Is this end of haystack? + if (strlen(cp) == strlen(scale1)) { + found = TRUE; + break; + } + //Is it the same until the next ',' + cq=strstr(cp,","); + if (cq && (cq-cp == strlen(scale1))) { + found = TRUE; + break; + } + else cp=cq; + } else cp=strstr(cp,","); + } + if (!found) continue; + return s->result; + } + return FIT_NONE; +} EXPORT void ScaleLengthIncrement( SCALEINX_T scale, DIST_T length ) { char * cp; - int len; + size_t len; if (scaleInfo(scale).length == 0.0) { if (units == UNITS_METRIC) cp = "999.99m SCALE Flex Track"; @@ -643,7 +811,7 @@ EXPORT void ScaleLengthIncrement( cp = "999' 11\" SCALE Flex Track"; len = strlen( cp )+1; if (len > enumerateMaxDescLen) - enumerateMaxDescLen = len; + enumerateMaxDescLen = (int)len; } scaleInfo(scale).length += length; } @@ -651,7 +819,7 @@ EXPORT void ScaleLengthIncrement( EXPORT void ScaleLengthEnd( void ) { wIndex_t si; - int count; + size_t count; DIST_T length; char tmp[STR_SIZE]; FLOAT_T flexLen; @@ -672,7 +840,7 @@ EXPORT void ScaleLengthEnd( void ) if (flexLen > 0.0) { count = (int)ceil( length / (flexLen/(flexUnit?2.54:1.00))); } - EnumerateList( count, flexCost, tmp ); + EnumerateList( (long)count, flexCost, tmp, NULL ); } scaleInfo(si).length = 0; } @@ -685,7 +853,7 @@ EXPORT void LoadScaleList( wList_p scaleList ) wIndex_t inx; for (inx=0; inx<scaleDesc_da.cnt-(extraButtons?0:1); inx++) { scaleDesc(inx).index = - wListAddValue( scaleList, scaleDesc(inx).scaleDesc, NULL, (void*)(intptr_t)inx ); + wListAddValue( scaleList, scaleDesc(inx).scaleDesc, NULL, I2VP(inx) ); } } @@ -703,7 +871,7 @@ EXPORT void LoadGaugeList( wList_p gaugeList, SCALEDESCINX_T scale ) wListClear( gaugeList ); /* remove old list in case */ for (inx=0; inx<gauges_da_p->cnt; inx++) { - (g[inx]).index = wListAddValue( gaugeList, (g[inx]).gauge, NULL, (void*)(intptr_t)(g[inx]).scale ); + (g[inx]).index = wListAddValue( gaugeList, (g[inx]).gauge, NULL, I2VP(g[inx].scale) ); } } @@ -723,6 +891,7 @@ static void ScaleChange( long changes ) EXPORT void Misc2Init( void ) { AddParam( "SCALE ", AddScale ); + AddParam( "SCALEFIT", AddScaleFit); wPrefGetInteger( "draw", "label-when", &labelWhen, labelWhen ); RegisterChangeNotification( ScaleChange ); wPrefGetInteger( "misc", "include same gauge turnouts", &includeSameGaugeTurnouts, 1 ); diff --git a/app/bin/misc2.h b/app/bin/misc2.h index 966f75b..8020696 100644 --- a/app/bin/misc2.h +++ b/app/bin/misc2.h @@ -25,7 +25,6 @@ #include "common.h" #include "misc.h" -#include "time.h" #define LABEL_MANUF (1<<0) #define LABEL_PARTNO (1<<1) @@ -46,8 +45,8 @@ extern time_t logClock; void LogOpen( char * ); void LogClose( void ); void LogSet( char *, int ); -int LogFindIndex( char * ); -void LogPrintf( char *, ... ); +int LogFindIndex( const char * ); +void LogPrintf( const char *, ... ); #define LOG( DBINX, DBLVL, DBMSG ) \ if ( DBINX > 0 && logTable( DBINX ).level >= DBLVL ) { \ LogPrintf DBMSG ; \ @@ -64,6 +63,7 @@ typedef struct { DIST_T width; DIST_T spacing; } tieData_t, *tieData_p; + DIST_T GetScaleTrackGauge( SCALEINX_T ); DIST_T GetScaleRatio( SCALEINX_T ); DIST_T GetScaleDescRatio( SCALEDESCINX_T sdi ); @@ -82,7 +82,13 @@ BOOL_T DoSetScale( char * ); void ScaleLengthIncrement( SCALEINX_T, DIST_T ); void LoadScaleList( wList_p ); void LoadGaugeList( wList_p, SCALEDESCINX_T ); -BOOL_T CompatibleScale( BOOL_T, SCALEINX_T, SCALEINX_T ); + +typedef enum {FIT_STRUCTURE, FIT_TURNOUT, FIT_CAR} SCALE_FIT_TYPE_T; +typedef enum {FIT_NONE, FIT_COMPATIBLE, FIT_EXACT} SCALE_FIT_T; +SCALE_FIT_T CompatibleScale( SCALE_FIT_TYPE_T, SCALEINX_T, SCALEINX_T ); + +SCALE_FIT_T FindScaleCompatible(SCALE_FIT_TYPE_T type, char * scale1, char * scale2); + BOOL_T DoSetScaleDesc( void ); extern unsigned int curLayer; @@ -92,9 +98,11 @@ void SetCurrLayer(wIndex_t inx, const char * name, wIndex_t op, wDrawColor GetLayerColor( unsigned int ); BOOL_T GetLayerUseColor( unsigned int); BOOL_T GetLayerVisible( unsigned int ); +void FlipLayer( void * layerVP ); BOOL_T GetLayerFrozen( unsigned int ); BOOL_T GetLayerOnMap( unsigned int ); BOOL_T GetLayerModule( unsigned int ); +BOOL_T GetLayerHidden( unsigned int); void SetLayerModule(unsigned int, BOOL_T); char * GetLayerName( unsigned int ); void SetLayerName(unsigned int layer, char* name); @@ -104,6 +112,7 @@ char * FormatLayerName(unsigned int layerNumber); /* dlayers.c */ void UpdateLayerLists( void ); void DefaultLayerProperties(void); +void UpdateLayerDlg( unsigned int ); void ResetLayers( void ); void SaveLayers( void ); void RestoreLayers( void ); diff --git a/app/bin/note.h b/app/bin/note.h index 315823f..2d70176 100644 --- a/app/bin/note.h +++ b/app/bin/note.h @@ -22,8 +22,7 @@ #ifndef HAVE_NOTE_H #define HAVE_NOTE_H -#include <stdbool.h> -#include "track.h" +#include "common.h" #define URLMAXIMUMLENGTH (512) #define PATHMAXIMUMLENGTH (2048) @@ -40,7 +39,8 @@ enum noteCommands { }; /** hold the data for the note */ -struct extraDataNote { +typedef struct extraDataNote_t { + extraDataBase_t base; coOrd pos; /**< position */ unsigned int layer; enum noteCommands op; /**< note type */ @@ -57,7 +57,7 @@ struct extraDataNote { BOOL_T inArchive; } fileData; /**< used for file note */ } noteData; -}; +} extraDataNote_t; //struct noteTextData { // coOrd pos; @@ -102,9 +102,10 @@ void NewTextNoteUI(track_p trk); void DescribeTextNote(track_p trk, char * str, CSIZE_T len); /* trknote.c */ +extern TRKTYP_T T_NOTE; void NoteStateSave(track_p trk); -void UpdateFile(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart); -void UpdateText(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart); -void UpdateLink(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart); +void UpdateFile(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart); +void UpdateText(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart); +void UpdateLink(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart); #endif // !HAVE_NOTE_H diff --git a/app/bin/param.c b/app/bin/param.c index 27a8cf9..67ff7ac 100644 --- a/app/bin/param.c +++ b/app/bin/param.c @@ -20,44 +20,16 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdint.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif -#include <math.h> -#include <ctype.h> -#include <string.h> -#include <time.h> -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#define R_OK (02) -#define access _access -#else -#include <sys/stat.h> -#include <errno.h> -#endif -#include <stdarg.h> -#include <locale.h> -#include <wlib.h> - #include "common.h" #include "compound.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" -#include "messages.h" #include "misc.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" +EXPORT int paramHiliteFast = FALSE; /* Bogus reg vars */ EXPORT int paramLevel = 1; @@ -71,7 +43,8 @@ EXPORT char *PREFSECT = "DialogItem"; static int paramCheckErrorCount = 0; static BOOL_T paramCheckShowErrors = FALSE; -static int log_paramLayout; +static int log_paramLayout = 0; +static int log_paraminput = 0; /***************************************************************************** @@ -81,12 +54,12 @@ static int log_paramLayout; */ static char * getNumberError; -static char decodeErrorStr[STR_SHORT_SIZE]; +static char decodeErrorStr[STR_SIZE]; static int GetDigitStr( char ** cpp, long * numP, int * lenP ) { char *cp=*cpp, *cq; - int len; + size_t len; *numP = 0; if ( cp == NULL ) { getNumberError = N_("Unexpected End Of String"); @@ -101,7 +74,7 @@ static int GetDigitStr( char ** cpp, long * numP, int * lenP ) } len = cq-cp; if ( lenP ) - *lenP = len; + *lenP = (int)len; if ( len > 9 ) { getNumberError = N_("Overflow"); return FALSE; @@ -299,7 +272,7 @@ EXPORT FLOAT_T DecodeFloat( valF = strtod( cp1, &cp2 ); if ( *cp2 != 0 ) { /*wStringSetHilight( strCtrl, cp2-cp0, -1 );*/ - sprintf( decodeErrorStr, _("Invalid Number") ); + snprintf( decodeErrorStr, sizeof(decodeErrorStr), _("Invalid Number") ); *validP = FALSE; return 0.0; } @@ -318,6 +291,7 @@ FLOAT_T DecodeDistance( { FLOAT_T valF; char *cp0, *cp1, *cpN, c1; + // CAST_AWAY_CONST: we temporarily replace *cpN with a NULL and later restore cp0 = cp1 = cpN = CAST_AWAY_CONST wStringGetValue(strCtrl); cpN += strlen(cpN)-1; @@ -357,7 +331,7 @@ FLOAT_T DecodeDistance( wStringSetValue(strCtrl, FormatDistance(valF)); } } else { - sprintf(decodeErrorStr, "%s @ %s", _(getNumberError), + snprintf(decodeErrorStr, sizeof(decodeErrorStr), "%s @ %s", _(getNumberError), *cp1?cp1:_("End Of String")); valF = 0.0; } @@ -367,8 +341,9 @@ FLOAT_T DecodeDistance( #define N_STRING (10) -static char formatStrings[N_STRING][40]; -static int formatStringInx; +static int formatStringInx; //Index ahead in case of overwrite +static char formatStrings[N_STRING+1][80]; //Add safety + EXPORT char * FormatLong( long valL ) @@ -507,6 +482,9 @@ EXPORT char * FormatSmallDistance( * */ +static wBool_t ParamIntegerRangeCheck( paramData_p p, long valL ); +static wBool_t ParamFloatRangeCheck( paramData_p p, FLOAT_T valF ); + EXPORT void ParamControlActive( paramGroup_p pg, int inx, @@ -543,13 +521,17 @@ EXPORT void ParamLoadControl( FLOAT_T tmpR; char * valS; - if ( (p->option&PDO_DLGIGNORE) != 0 ) + if ( (p->option&PDO_DLGIGNORE) != 0 ) { + p->bInvalid = FALSE; return; + } if (p->control == NULL || p->valueP == NULL) return; switch ( p->type ) { case PD_LONG: wStringSetValue( (wString_p)p->control, FormatLong( *(long*)p->valueP ) ); + if ( !ParamIntegerRangeCheck( p, *(long*)p->valueP ) ) + return; p->oldD.l = *(long*)p->valueP; break; case PD_RADIO: @@ -583,11 +565,14 @@ EXPORT void ParamLoadControl( valS = FormatFloat( tmpR ); } wStringSetValue( (wString_p)p->control, valS ); + if ( !ParamFloatRangeCheck( p, tmpR ) ) + break; p->oldD.f = tmpR; break; case PD_STRING: if (p->oldD.s) MyFree( p->oldD.s ); + ASSERT( p->max_string > 0 ); if (p->max_string) { p->oldD.s = MyMalloc(p->max_string); strncpy(p->oldD.s, (char*)p->valueP, p->max_string-1); @@ -598,6 +583,10 @@ EXPORT void ParamLoadControl( p->oldD.s = MyStrdup((char *)p->valueP); wStringSetValue((wString_p)p->control, (char*)p->valueP); } + if ( (p->option & PDO_NOTBLANK) && strlen( p->oldD.s ) == 0 ) { + ParamHilite( p->group->win, p->control, TRUE ); + p->bInvalid = TRUE; + } break; case PD_MESSAGE: wMessageSetValue( (wMessage_p)p->control, _((char*)p->valueP) ); @@ -623,6 +612,7 @@ EXPORT void ParamLoadControls( paramGroup_p pg ) { int inx; + LOG( log_paraminput, 1, ( "ParamLoadControls( %s )\n", pg->nameStr ) ); for ( inx=0; inx<pg->paramCnt; inx++ ) ParamLoadControl( pg, inx ); } @@ -645,13 +635,17 @@ EXPORT long ParamUpdate( continue; if ( p->control == NULL ) continue; + if ( p->bInvalid == TRUE ) + break; switch ( p->type ) { case PD_LONG: stringV = wStringGetValue( (wString_p)p->control ); longV = atol( stringV ); + if ( ! ParamIntegerRangeCheck( p, longV ) ) + break; if (longV != p->oldD.l) { p->oldD.l = longV; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(long*)p->valueP = longV; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, &longV ); @@ -662,7 +656,7 @@ EXPORT long ParamUpdate( longV = wRadioGetValue( (wChoice_p)p->control ); if (longV != p->oldD.l) { p->oldD.l = longV; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(long*)p->valueP = longV; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, &longV ); @@ -673,7 +667,7 @@ EXPORT long ParamUpdate( longV = wToggleGetValue( (wChoice_p)p->control ); if (longV != p->oldD.l) { p->oldD.l = longV; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(long*)p->valueP = longV; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, &longV ); @@ -686,7 +680,7 @@ EXPORT long ParamUpdate( longV = wListGetIndex( (wList_p)p->control ); if (longV != p->oldD.l) { p->oldD.l = longV; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(wIndex_t*)p->valueP = (wIndex_t)longV; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, &longV ); @@ -697,7 +691,7 @@ EXPORT long ParamUpdate( dc = wColorSelectButtonGetColor( (wButton_p)p->control ); if (dc != p->oldD.dc) { p->oldD.dc = dc; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(wDrawColor*)p->valueP = dc; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) { pg->changeProc( pg, inx, &longV ); /* COLORNOP */ @@ -715,9 +709,11 @@ EXPORT long ParamUpdate( } if ( !valid ) break; + if ( ! ParamFloatRangeCheck( p, floatV ) ) + break; if (floatV != p->oldD.f) { p->oldD.f = floatV; - if ( /*(p->option&PDO_NOUPDUPD)==0 &&*/ p->valueP) + if ( p->valueP) *(FLOAT_T*)p->valueP = floatV; if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) pg->changeProc( pg, inx, &floatV ); @@ -726,24 +722,24 @@ EXPORT long ParamUpdate( break; case PD_STRING: stringV = wStringGetValue( (wString_p)p->control ); + if ( (p->option & PDO_NOTBLANK) && stringV [0] == '\0' ) { + p->bInvalid = TRUE; + break; + } if ( strcmp( stringV, p->oldD.s ) != 0 ) { if (p->oldD.s) MyFree( p->oldD.s ); p->oldD.s = MyStrdup( stringV ); if ( p->valueP ) { - if (p->option & PDO_STRINGLIMITLENGTH ) { - strncpy((char*)p->valueP, stringV, p->max_string-1); - ((char *)p->valueP)[p->max_string - 1] = '\0'; - if (strlen(stringV) > p->max_string-1) { - NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, p->max_string-1); - } - } - else { - strcpy((char*)p->valueP, stringV); + strncpy((char*)p->valueP, stringV, p->max_string-1); + ((char *)p->valueP)[p->max_string - 1] = '\0'; + if (strlen(stringV) > p->max_string-1) { + NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, p->max_string-1); } } if ( (p->option&PDO_NOUPDACT)==0 && pg->changeProc) + // CAST_AWAY_CONST: param 3 should be const but its a big change pg->changeProc( pg, inx, CAST_AWAY_CONST stringV ); change |= (1L<<inx); } @@ -952,16 +948,10 @@ static long ParamIntRestore( break; case PD_STRING: if ( oldP->s && strcmp((char*)p->valueP,oldP->s) != 0 ) { - if (p->max_string && (p->option & PDO_STRINGLIMITLENGTH)) { - ((char*)p->valueP)[0] = '\0'; - strncat((char*)p->valueP,oldP->s,p->max_string-1); - if (p->control) - wStringSetValue( (wString_p)p->control, (char*)p->valueP ); - } else { - strcpy( (char*)p->valueP, oldP->s ); - if (p->control) - wStringSetValue( (wString_p)p->control, oldP->s ); - } + ((char*)p->valueP)[0] = '\0'; + strncat((char*)p->valueP,oldP->s,p->max_string-1); + if (p->control) + wStringSetValue( (wString_p)p->control, (char*)p->valueP ); change |= (1L<<inx); } break; @@ -1048,12 +1038,13 @@ static long ParamRestore( paramGroup_p pg ) static dynArr_t paramGroups_da; #define paramGroups(N) DYNARR_N( paramGroup_p, paramGroups_da, N ) +static BOOL_T paramGroups_init = FALSE; EXPORT void ParamRegister( paramGroup_p pg ) { - paramData_p p; + paramData_t * p; const char * cp; WDOUBLE_T tmpR; long valL; @@ -1061,13 +1052,16 @@ EXPORT void ParamRegister( paramGroup_p pg ) char prefName1[STR_SHORT_SIZE]; const char *prefSect2, *prefName2; + if (!paramGroups_init) ParamInit(); + DYNARR_APPEND( paramGroup_p, paramGroups_da, 10 ); paramGroups(paramGroups_da.cnt-1) = pg; - for ( p=pg->paramPtr; p<&pg->paramPtr[pg->paramCnt]; p++ ) { + int i; + for ( i=0, p=pg->paramPtr; i<(pg->paramCnt); p++, i++ ) { p->group = pg; if ( p->nameStr == NULL ) continue; - sprintf( prefName1, "%s-%s", pg->nameStr, p->nameStr ); + snprintf( prefName1, sizeof(prefName1), "%s-%s", pg->nameStr, p->nameStr ); if ( p->type != PD_MENUITEM ) { (void)GetBalloonHelpStr( prefName1 ); } @@ -1174,21 +1168,22 @@ EXPORT void ParamUpdatePrefs( void ) paramData_p p; long rgb; char prefName[STR_SHORT_SIZE]; - int len; + size_t len; int col; char * cp; - static wPos_t * colWidths; + static wWinPix_t * colWidths; static int maxColCnt = 0; paramListData_t * listDataP; for ( inx=0; inx<paramGroups_da.cnt; inx++ ) { pg = paramGroups(inx); + if (pg->nameStr == NULL) continue; for ( p=pg->paramPtr; p<&pg->paramPtr[pg->paramCnt]; p++ ) { if (p->valueP == NULL || p->nameStr == NULL || (p->option&PDO_NOPREF)!=0 ) continue; if ( (p->option&PDO_DLGIGNORE) != 0 ) continue; - sprintf( prefName, "%s-%s", pg->nameStr, p->nameStr ); + snprintf( prefName, sizeof(prefName), "%s-%s", pg->nameStr, p->nameStr ); switch ( p->type ) { case PD_LONG: case PD_RADIO: @@ -1200,15 +1195,15 @@ EXPORT void ParamUpdatePrefs( void ) if ( p->control && listDataP->colCnt > 0 ) { if ( maxColCnt < listDataP->colCnt ) { if ( maxColCnt == 0 ) - colWidths = (wPos_t*)MyMalloc( listDataP->colCnt * sizeof * colWidths ); + colWidths = (wWinPix_t*)MyMalloc( listDataP->colCnt * sizeof * colWidths ); else - colWidths = (wPos_t*)MyRealloc( colWidths, listDataP->colCnt * sizeof * colWidths ); + colWidths = (wWinPix_t*)MyRealloc( colWidths, listDataP->colCnt * sizeof * colWidths ); maxColCnt = listDataP->colCnt; } len = wListGetColumnWidths( (wList_p)p->control, listDataP->colCnt, colWidths ); cp = message; for ( col=0; col<len; col++ ) { - sprintf( cp, "%d ", colWidths[col] ); + sprintf( cp, "%ld ", colWidths[col] ); cp += strlen(cp); } *cp = '\0'; @@ -1360,7 +1355,7 @@ static void ParamButtonPush( void * dp ) if ( p->valueP ) ((wButtonCallBack_p)(p->valueP))( p->context ); else if ( p->group->changeProc) - p->group->changeProc( p->group, p-p->group->paramPtr, NULL); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), NULL); } } @@ -1376,7 +1371,33 @@ static void ParamChoicePush( long valL, void * dp ) if ( (p->option&PDO_NOPSHUPD)==0 && p->valueP) *((long*)(p->valueP)) = valL; if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc) - p->group->changeProc( p->group, p-p->group->paramPtr, &valL); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), &valL); +} + + +static wBool_t ParamIntegerRangeCheck( paramData_p p, long valL ) +{ + if ( inPlayback ) + return TRUE; + paramIntegerRange_t * irangeP = (paramIntegerRange_t*)p->winData; + wBool_t bInvalid = p->bInvalid; + if ( ( (irangeP->rangechecks&PDO_NORANGECHECK_HIGH) == 0 && valL > irangeP->high ) || + ( (irangeP->rangechecks&PDO_NORANGECHECK_LOW) == 0 && valL < irangeP->low ) ) { + if ( (irangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_HIGH ) + sprintf( message, _("Enter a value > %ld"), irangeP->low ); + else if ( (irangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_LOW ) + sprintf( message, _("Enter a value < %ld"), irangeP->high ); + else + sprintf( message, _("Enter a value between %ld and %ld"), irangeP->low, irangeP->high ); + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, message ); + p->bInvalid = TRUE; + LOG( log_paraminput, 1, ( " -> RangeError\n" ) ); + ParamHilite( p->group->win, p->control, p->bInvalid ); + return FALSE; + } + p->bInvalid = FALSE; + return TRUE; } @@ -1386,39 +1407,31 @@ static void ParamIntegerPush( const char * val, void * dp ) long valL; char * cp; const char * value; - paramIntegerRange_t * irangeP; - if (strlen(val) == 1 && val[strlen(val)-1] == '\n' && (p->option & BO_ENTER)) { + wBool_t bInvalid = p->bInvalid; + if (strlen(val) == 1 && val[strlen(val)-1] == '\n') { value = wStringGetValue((wString_p)p->control); p->enter_pressed = TRUE; } else { + value = val; p->enter_pressed = FALSE; - value = CAST_AWAY_CONST val; } + LOG( log_paraminput, 1, ( "ParamIntegerPush( %s Enter:%d Val:%s )\n", p->nameStr, p->enter_pressed, value ) ); - - while ( isspace((unsigned char)*value)) value++; valL = strtol( value, &cp, 10 ); - - - //wControlSetBalloon( p->control, 0, -5, NULL ); - if ( value == cp ) { - wControlSetBalloon( p->control, 0, -5, _("Invalid Number") ); + for ( ; isspace( (unsigned char)*cp); cp++ ); + if ( *cp != '\0' ) { + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, _("Invalid Number") ); + p->bInvalid = TRUE; + LOG( log_paraminput, 1, ( " -> InvalidNumber\n" ) ); + ParamHilite( p->group->win, p->control, p->bInvalid ); return; } - irangeP = (paramIntegerRange_t*)p->winData; - if ( ( (irangeP->rangechecks&PDO_NORANGECHECK_HIGH) == 0 && valL > irangeP->high ) || - ( (irangeP->rangechecks&PDO_NORANGECHECK_LOW) == 0 && valL < irangeP->low ) ) { - if ( (irangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_HIGH ) - sprintf( message, _("Enter a value > %ld"), irangeP->low ); - else if ( (irangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_LOW ) - sprintf( message, _("Enter a value < %ld"), irangeP->high ); - else - sprintf( message, _("Enter a value between %ld and %ld"), irangeP->low, irangeP->high ); - wControlSetBalloon( p->control, 0, -5, message ); + if ( ! ParamIntegerRangeCheck( p, valL ) ) return; - } - wControlSetBalloon( p->control, 0, -5, NULL ); + wControlSetBalloon( p->control, 0, 0, NULL ); + p->bInvalid = FALSE; if (recordF && (p->option&PDO_NORECORD)==0 && p->group->nameStr && p->nameStr) { fprintf( recordF, "PARAMETER %s %s %ld\n", p->group->nameStr, p->nameStr, valL ); @@ -1427,9 +1440,41 @@ static void ParamIntegerPush( const char * val, void * dp ) if ( (p->option&PDO_NOPSHUPD)==0 && p->valueP) *((long*)(p->valueP)) = valL; if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc) - p->group->changeProc( p->group, p-p->group->paramPtr, &valL); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), &valL); + ParamHilite( p->group->win, p->control, p->bInvalid ); + LOG( log_paraminput, 1, ( " -> %ld\n", valL ) ); +} + + +static wBool_t ParamFloatRangeCheck( paramData_p p, FLOAT_T valF ) +{ + if ( inPlayback ) + return TRUE; + paramFloatRange_t * frangeP = (paramFloatRange_t*)p->winData; + wBool_t bInvalid = p->bInvalid; + if ( ( (frangeP->rangechecks&PDO_NORANGECHECK_HIGH) == 0 && valF > frangeP->high ) || + ( (frangeP->rangechecks&PDO_NORANGECHECK_LOW) == 0 && valF < frangeP->low ) ) { + if ( (frangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_HIGH ) + sprintf( message, _("Enter a value > %s"), + (p->option&PDO_DIM)?FormatDistance(frangeP->low):FormatFloat(frangeP->low) ); + else if ( (frangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_LOW ) + sprintf( message, _("Enter a value < %s"), + (p->option&PDO_DIM)?FormatDistance(frangeP->high):FormatFloat(frangeP->high) ); + else + sprintf( message, _("Enter a value between %s and %s"), + (p->option&PDO_DIM)?FormatDistance(frangeP->low):FormatFloat(frangeP->low), + (p->option&PDO_DIM)?FormatDistance(frangeP->high):FormatFloat(frangeP->high) ); + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, message ); + p->bInvalid = TRUE; + ParamHilite( p->group->win, p->control, p->bInvalid ); + return FALSE; + } + p->bInvalid = FALSE; + return TRUE; } + /** * Checks the entered value in a float field. Accepts data entered in the different * formats for dimensions. Compares the value against limits if specified in that @@ -1445,14 +1490,16 @@ static void ParamFloatPush( const char * val, void * dp ) FLOAT_T valF; BOOL_T valid; const char * value; - paramFloatRange_t * frangeP; - if (strlen(val) == 1 && val[strlen(val)-1] == '\n' && (p->option & PDO_ENTER)) { + + wBool_t bInvalid = p->bInvalid; + if (strlen(val) == 1 && val[strlen(val)-1] == '\n') { value = wStringGetValue((wString_p)p->control); p->enter_pressed = TRUE; } else { value = val; p->enter_pressed = FALSE; } + LOG( log_paraminput, 1, ( "ParamFloatPush( %s: Enter:%d Val:%s )\n", p->nameStr, p->enter_pressed, value ) ); if (p->option & PDO_DIM) { valF = DecodeDistance( (wString_p)p->control, &valid ); @@ -1461,28 +1508,17 @@ static void ParamFloatPush( const char * val, void * dp ) if (p->option & PDO_ANGLE) valF = NormalizeAngle( (angleSystem==ANGLE_POLAR)?valF:-valF ); } - // wControlSetBalloon( p->control, 0, -5, NULL ); if ( !valid ) { - wControlSetBalloon( p->control, 0, -5, decodeErrorStr ); + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, decodeErrorStr ); + p->bInvalid = TRUE; + ParamHilite( p->group->win, p->control, p->bInvalid ); return; } - frangeP = (paramFloatRange_t*)p->winData; - if ( ( (frangeP->rangechecks&PDO_NORANGECHECK_HIGH) == 0 && valF > frangeP->high ) || - ( (frangeP->rangechecks&PDO_NORANGECHECK_LOW) == 0 && valF < frangeP->low ) ) { - if ( (frangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_HIGH ) - sprintf( message, _("Enter a value > %s"), - (p->option&PDO_DIM)?FormatDistance(frangeP->low):FormatFloat(frangeP->low) ); - else if ( (frangeP->rangechecks&(PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW)) == PDO_NORANGECHECK_LOW ) - sprintf( message, _("Enter a value < %s"), - (p->option&PDO_DIM)?FormatDistance(frangeP->high):FormatFloat(frangeP->high) ); - else - sprintf( message, _("Enter a value between %s and %s"), - (p->option&PDO_DIM)?FormatDistance(frangeP->low):FormatFloat(frangeP->low), - (p->option&PDO_DIM)?FormatDistance(frangeP->high):FormatFloat(frangeP->high) ); - wControlSetBalloon( p->control, 0, -5, message ); + if ( !ParamFloatRangeCheck( p, valF ) ) return; - } - wControlSetBalloon( p->control, 0, -5, NULL ); + wControlSetBalloon( p->control, 0, 0, NULL ); + p->bInvalid = FALSE; if (recordF && (p->option&PDO_NORECORD)==0 && p->group->nameStr && p->nameStr) { fprintf( recordF, "PARAMETER %s %s %0.6f\n", p->group->nameStr, p->nameStr, valF ); @@ -1491,7 +1527,8 @@ static void ParamFloatPush( const char * val, void * dp ) if ( (p->option&PDO_NOPSHUPD)==0 && p->valueP) *((FLOAT_T*)(p->valueP)) = valF; if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc && strlen( value )) - p->group->changeProc( p->group, p-p->group->paramPtr, &valF ); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), &valF ); + ParamHilite( p->group->win, p->control, p->bInvalid ); } @@ -1499,22 +1536,36 @@ static void ParamStringPush( const char * val, void * dp ) { paramData_p p = (paramData_p)dp; const char * value; + wBool_t bInvalid = p->bInvalid; if (recordF && (p->option&PDO_NORECORD)==0 && p->group->nameStr && p->nameStr) { fprintf( recordF, "PARAMETER %s %s %s\n", p->group->nameStr, p->nameStr, val ); fflush( recordF ); } - if (strlen(val) == 1 && val[strlen(val)-1] == '\n' && (p->option & PDO_ENTER)) { - value = wStringGetValue((wString_p)p->control); - p->enter_pressed = TRUE; + if (strlen(val) == 1 && val[strlen(val)-1] == '\n' ) { + value = wStringGetValue((wString_p)p->control); + p->enter_pressed = TRUE; } else { + value = val; p->enter_pressed = FALSE; - value = CAST_AWAY_CONST val; } + LOG( log_paraminput, 1, ( "ParamStringPush( %s: Enter:%d Val:%s )\n", p->nameStr, p->enter_pressed, value ) ); + if ( ((!inPlayback) && p->option & PDO_NOTBLANK) && value[0] == '\0' ) { + p->bInvalid = TRUE; + wControlSetBalloon( p->control, 0, 0, NULL ); + wWinPix_t h = wControlGetHeight(p->control); + wControlSetBalloon( p->control, 0, -h*3/4, _("String cannot be blank") ); + ParamHilite( p->group->win, p->control, TRUE ); + return; + } + wControlSetBalloon( p->control, 0, 0, NULL ); + p->bInvalid = FALSE; + ParamHilite( p->group->win, p->control, FALSE ); if ( (p->option&PDO_NOPSHUPD)==0 && p->valueP) strcpy( (char*)p->valueP, value ); if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc) - p->group->changeProc( p->group, p-p->group->paramPtr, CAST_AWAY_CONST value ); + // CAST_AWAY_CONST: param 3 should be const but its a big change + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), CAST_AWAY_CONST value ); } @@ -1535,7 +1586,7 @@ static void ParamListPush( wIndex_t inx, const char * val, wIndex_t op, void * d *(wIndex_t*)(p->valueP) = inx; if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc ) { valL = inx; - p->group->changeProc( p->group, p-p->group->paramPtr, &valL ); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), &valL ); } break; @@ -1576,11 +1627,11 @@ static void ParamColorSelectPush( void * dp, wDrawColor dc ) if ( (p->option&PDO_NOPSHUPD)==0 && p->valueP) *(wDrawColor*)(p->valueP) = dc; if ( (p->option&PDO_NOPSHACT)==0 && p->group->changeProc ) - p->group->changeProc( p->group, p-p->group->paramPtr, &dc ); + p->group->changeProc( p->group, (int)(p-p->group->paramPtr), &dc ); } -static void ParamDrawRedraw( wDraw_p d, void * dp, wPos_t w, wPos_t h ) +static void ParamDrawRedraw( wDraw_p d, void * dp, wWinPix_t w, wWinPix_t h ) { paramData_p p = (paramData_p)dp; paramDrawData_t * ddp = (paramDrawData_t*)p->winData; @@ -1589,7 +1640,7 @@ static void ParamDrawRedraw( wDraw_p d, void * dp, wPos_t w, wPos_t h ) } -static void ParamDrawAction( wDraw_p d, void * dp, wAction_t a, wPos_t w, wPos_t h ) +static void ParamDrawAction( wDraw_p d, void * dp, wAction_t a, wDrawPix_t w, wDrawPix_t h ) { paramData_p p = (paramData_p)dp; paramDrawData_t * ddp = (paramDrawData_t*)p->winData; @@ -1604,21 +1655,55 @@ static void ParamDrawAction( wDraw_p d, void * dp, wAction_t a, wPos_t w, wPos_t } -static void ParamButtonOk( - paramGroup_p group ) +EXPORT wBool_t ParamCheckInputs( + paramGroup_p group, + wControl_p b ) { + wBool_t bInvalid = FALSE; + // Check for invalid entries + for ( paramData_p p = group->paramPtr; p < &group->paramPtr[group->paramCnt]; p++ ) { + ParamHilite( group->win, p->control, p->bInvalid ); + if ( p->bInvalid == FALSE ) + continue; + LOG( log_paraminput, 1, ( " %s: Invalid\n", p->nameStr ) ); + bInvalid = TRUE; + } + if ( bInvalid ) { + // At least 1 invalid entry + LOG( log_paraminput, 1, ( " Group %s Invalid\n", group->nameStr ) ); + wControlSetBalloon( b, 0, -29, _("Invalid input(s), please correct the hilighted field(s)") ); + wFlush(); + return FALSE; + } + return TRUE; +} + + +static void ParamButtonOk( void * groupVP ) +{ + paramGroup_p group = groupVP; + wFlush(); + LOG( log_paraminput, 1, ( "ParamButtonOk: %s\n", group->nameStr ) ); + if ( ! ParamCheckInputs( group, (wControl_p)group->okB ) ) + return; if ( recordF && group->nameStr ) fprintf( recordF, "PARAMETER %s %s\n", group->nameStr, "ok" ); { fflush( recordF ); } + if ( group->okProc ) - group->okProc( group->okProc==(paramActionOkProc)wHide?((void*)group->win):group ); + group->okProc( group ); + + wControlSetBalloon( (wControl_p)group->okB, 0, 0, NULL ); + wFlush(); + + LOG( log_paraminput, 1, ( "ParamButtonOk -> Ok\n" ) ); } -static void ParamButtonCancel( - paramGroup_p group ) +static void ParamButtonCancel( void * groupVP ) { + paramGroup_p group = groupVP; if ( recordF && group->nameStr ) { fprintf( recordF, "PARAMETER %s %s\n", group->nameStr, "cancel" ); fflush( recordF ); @@ -1710,28 +1795,43 @@ EXPORT void ParamChange( paramData_p p ) #endif -EXPORT int paramHiliteFast = FALSE; EXPORT void ParamHilite( wWin_p win, wControl_p control, BOOL_T hilite ) { - if ( win != NULL && wWinIsVisible(win) == FALSE ) return; if ( control == NULL ) return; - if ( !paramTogglePlaybackHilite ) return; + LOG(log_paraminput, 2, ("ParamHilite %s\n", hilite?"Set":"Clr" )); if ( hilite ) { wControlHilite( control, TRUE ); wFlush(); - if ( !paramHiliteFast ) + if ( inPlayback && !paramHiliteFast ) wPause(500); } else { - if ( !paramHiliteFast ) - wPause(500); +// if ( inPlayback && !paramHiliteFast ) +// wPause(500); wControlHilite( control, FALSE ); - wFlush(); } } +EXPORT void ParamResetInvalid( + wWin_p win ) +{ + for ( int inx=0; inx<paramGroups_da.cnt; inx++ ) { + paramGroup_p pg = paramGroups(inx); + if ( pg->win == win ) { + LOG( log_paraminput, 1, ( "Reset Invalid: %s\n", pg->nameStr ) ); + for ( paramData_p p = &pg->paramPtr[0]; p < &pg->paramPtr[pg->paramCnt]; p++ ) { + if ( p->bInvalid ) + LOG( log_paraminput, 1, ( " %s Invalid\n", p->nameStr ) ); + ParamHilite( win, p->control, FALSE ); + wControlSetBalloon( p->control, 0, 0, NULL ); + p->bInvalid = FALSE; + } + break; + } + } +} static void ParamPlayback( char * line ) { @@ -1739,7 +1839,7 @@ static void ParamPlayback( char * line ) paramData_p p; long valL; FLOAT_T valF, valF1; - int len, len1, len2; + size_t len, len1, len2; wIndex_t inx; void * listContext, * itemContext; long rgb; @@ -1749,7 +1849,6 @@ static void ParamPlayback( char * line ) wAction_t a; coOrd pos; char * valS; - char *oldLocale = NULL; if ( strncmp( line, "GROUP ", 6 ) == 0 ) { #ifdef PGPROC @@ -1878,9 +1977,9 @@ static void ParamPlayback( char * line ) } break; case PD_FLOAT: - oldLocale = SaveLocale("C"); + SetCLocale(); valF = valF1 = atof( line+len ); - RestoreLocale(oldLocale); + SetUserLocale(); if (p->valueP) *(FLOAT_T*)p->valueP = valF; if (p->option&PDO_DIM) { @@ -1935,7 +2034,7 @@ static void ParamPlayback( char * line ) case PD_MENUITEM: if (p->valueP) { if ( (p->option&IC_PLAYBACK_PUSH) != 0 ) - PlaybackButtonMouse( (wIndex_t)(long)p->context ); + PlaybackButtonMouse( (wIndex_t)VP2L(p->context) ); ((wButtonCallBack_p)(p->valueP))( p->context ); } break; @@ -1981,7 +2080,7 @@ static void ParamCheck( char * line ) paramData_p p; long valL; FLOAT_T valF, diffF; - int len, len1, len2; + size_t len, len1, len2; wIndex_t inx; void * listContext, * itemContext; char * valS; @@ -2069,7 +2168,7 @@ static void ParamCheck( char * line ) case PD_STRING: line += len; while ( *line == ' ' ) line++; - valS = CAST_AWAY_CONST wStringGetValue( (wString_p)p->control ); + wStringGetValue( (wString_p)p->control ); if ( strcasecmp( line, (char*)p->valueP ) != 0 ) { expVal = line; actVal = (char*)p->valueP; @@ -2112,20 +2211,20 @@ static void ParamCheck( char * line ) static void ParamCreateControl( paramData_p pd, char * helpStr, - wPos_t xx, - wPos_t yy ) + wWinPix_t xx, + wWinPix_t yy ) { - paramFloatRange_t * floatRangeP; - paramIntegerRange_t * integerRangeP; - paramDrawData_t * drawDataP; - paramTextData_t * textDataP; + const paramFloatRange_t * floatRangeP; + const paramIntegerRange_t * integerRangeP; + const paramDrawData_t * drawDataP; + const paramTextData_t * textDataP; paramListData_t * listDataP; - wIcon_p iconP; + const struct wIcon_t * iconP; wWin_p win; - wPos_t w; - wPos_t colWidth; - static wPos_t *colWidths; + wWinPix_t w; + wWinPix_t colWidth; + static wWinPix_t *colWidths; static wBool_t *colRightJust; static wBool_t maxColCnt = 0; int col; @@ -2149,7 +2248,7 @@ static void ParamCreateControl( pd->control = (wControl_p)wStringCreate( win, xx, yy, helpStr, _(pd->winLabel), pd->winOption, w, NULL, 0, ParamIntegerPush, pd ); break; case PD_STRING: - w = pd->winData?(wPos_t)(long)pd->winData:(wPos_t)250; + w = pd->winData?(wWinPix_t)VP2L(pd->winData):(wWinPix_t)250; pd->control = (wControl_p)wStringCreate( win, xx, yy, helpStr, _(pd->winLabel), pd->winOption, w, (pd->option&PDO_NOPSHUPD)?NULL:pd->valueP, 0, ParamStringPush, pd ); break; case PD_RADIO: @@ -2163,23 +2262,23 @@ static void ParamCreateControl( if ( listDataP->colCnt > 1 ) { if ( maxColCnt < listDataP->colCnt ) { if ( maxColCnt == 0 ) { - colWidths = (wPos_t*)MyMalloc( listDataP->colCnt * sizeof *colWidths ); + colWidths = (wWinPix_t*)MyMalloc( listDataP->colCnt * sizeof *colWidths ); colRightJust = (wBool_t*)MyMalloc( listDataP->colCnt * sizeof *colRightJust ); } else { - colWidths = (wPos_t*)MyRealloc( colWidths, listDataP->colCnt * sizeof *colWidths ); + colWidths = (wWinPix_t*)MyRealloc( colWidths, listDataP->colCnt * sizeof *colWidths ); colRightJust = (wBool_t*)MyRealloc( colRightJust, listDataP->colCnt * sizeof *colRightJust ); } maxColCnt = listDataP->colCnt; } for ( col=0; col<listDataP->colCnt; col++ ) { colRightJust[col] = listDataP->colWidths[col]<0; - colWidths[col] = abs(listDataP->colWidths[col]); + colWidths[col] = labs(listDataP->colWidths[col]); } sprintf( message, "%s-%s-%s", pd->group->nameStr, pd->nameStr, "columnwidths" ); cp = wPrefGetString( PREFSECT, message ); if ( cp != NULL ) { for ( col=0; col<listDataP->colCnt; col++ ) { - colWidth = (wPos_t)strtol( cp, &cq, 10 ); + colWidth = (wWinPix_t)strtol( cp, &cq, 10 ); if ( cp == cq ) break; colWidths[col] = colWidth; @@ -2195,7 +2294,7 @@ static void ParamCreateControl( listDataP->height = wControlGetHeight( pd->control ); break; case PD_DROPLIST: - w = pd->winData?(wPos_t)(long)pd->winData:(wPos_t)100; + w = pd->winData?(wWinPix_t)VP2L(pd->winData):(wWinPix_t)100; pd->control = (wControl_p)wDropListCreate( win, xx, yy, helpStr, _(pd->winLabel), pd->winOption, 10, w, NULL, ParamListPush, pd ); break; case PD_COMBOLIST: @@ -2208,7 +2307,7 @@ static void ParamCreateControl( break; case PD_MESSAGE: if ( pd->winData != 0 ) - w = (wPos_t)(long)pd->winData; + w = (wWinPix_t)VP2L(pd->winData); else if (pd->valueP) w = wLabelWidth( _(pd->valueP) ); else @@ -2253,13 +2352,13 @@ static void ParamCreateControl( static void ParamPositionControl( paramData_p pd, char * helpStr, - wPos_t xx, - wPos_t yy ) + wWinPix_t xx, + wWinPix_t yy ) { - paramDrawData_t * drawDataP; - paramTextData_t * textDataP; - paramListData_t * listDataP; - wPos_t winW, winH, ctlW, ctlH; + const paramDrawData_t * drawDataP; + const paramTextData_t * textDataP; + const paramListData_t * listDataP; + wWinPix_t winW, winH, ctlW, ctlH; if ( pd->type != PD_MENUITEM ) wControlSetPos( pd->control, xx, yy ); @@ -2270,7 +2369,7 @@ static void ParamPositionControl( case PD_COMBOLIST: case PD_DROPLIST: if ( pd->type == PD_DROPLIST ) { - ctlW = pd->winData?(wPos_t)(long)pd->winData:(wPos_t)100; + ctlW = pd->winData?(wWinPix_t)VP2L(pd->winData):(wWinPix_t)100; ctlH = wControlGetHeight( pd->control ); } else { listDataP = (paramListData_t*)pd->winData; @@ -2316,14 +2415,14 @@ static void ParamPositionControl( wTextSetSize( (wText_p)pd->control, ctlW, ctlH ); break; case PD_STRING: - ctlW = pd->winData?(wPos_t)(long)pd->winData:(wPos_t)250; + ctlW = pd->winData?(wWinPix_t)VP2L(pd->winData):(wWinPix_t)250; if ( (pd->option&PDO_DLGRESIZEW) ) { ctlW = winW - (pd->group->origW-ctlW); wStringSetWidth( (wString_p)pd->control, ctlW ); } break; case PD_MESSAGE: - ctlW = pd->winData?(wPos_t)(long)pd->winData:(wPos_t)150; + ctlW = pd->winData?(wWinPix_t)VP2L(pd->winData):(wWinPix_t)150; if ( (pd->option&PDO_DLGRESIZEW) ) { ctlW = winW - (pd->group->origW-ctlW); wMessageSetWidth( (wMessage_p)pd->control, ctlW ); @@ -2336,27 +2435,27 @@ static void ParamPositionControl( } -typedef void (*layoutControlsProc)(paramData_p, char *, wPos_t, wPos_t ); +typedef void (*layoutControlsProc)(paramData_p, char *, wWinPix_t, wWinPix_t ); static void LayoutControls( paramGroup_p group, layoutControlsProc proc, - wPos_t * retW, - wPos_t * retH ) + wWinPix_t * retW, + wWinPix_t * retH ) { struct { - struct { wPos_t x, y; } orig, term; + struct { wWinPix_t x, y; } orig, term; } controlK, columnK, windowK; - wPos_t controlSize_x; - wPos_t controlSize_y; + wWinPix_t controlSize_x; + wWinPix_t controlSize_y; paramData_p pd; - wPos_t w; + wWinPix_t w; BOOL_T hasBox; - wPos_t boxTop; - wPos_t boxPos[10]; + wWinPix_t boxTop; + wWinPix_t boxPos[10]; int boxCnt = 0; int box; int inx; - wPos_t labelW[100]; + wWinPix_t labelW[100]; int lastLabelPos, currLabelPos; char helpStr[STR_SHORT_SIZE], * helpStrP; BOOL_T inCmdButtons = FALSE; @@ -2618,7 +2717,7 @@ wWin_p ParamCreateDialog( paramChangeProc changeProc ) { char helpStr[STR_SHORT_SIZE]; - wPos_t w0, h0; + wWinPix_t w0, h0; char * cancelLabel = (winOption&PD_F_ALT_CANCELLABEL?_("Close"):_("Cancel")); winOption &= ~PD_F_ALT_CANCELLABEL; @@ -2636,10 +2735,10 @@ wWin_p ParamCreateDialog( if ( okLabel && okProc ) { sprintf( helpStr, "%s-ok", group->nameStr ); - group->okB = wButtonCreate( group->win, 0, 0, helpStr, okLabel, BB_DEFAULT, 0, (wButtonCallBack_p)ParamButtonOk, group ); + group->okB = wButtonCreate( group->win, 0, 0, helpStr, okLabel, BB_DEFAULT, 0, ParamButtonOk, group ); } if ( group->cancelProc ) { - group->cancelB = wButtonCreate( group->win, 0, 0, NULL, cancelLabel, BB_CANCEL, 0, (wButtonCallBack_p)ParamButtonCancel, group ); + group->cancelB = wButtonCreate( group->win, 0, 0, NULL, cancelLabel, BB_CANCEL, 0, ParamButtonCancel, group ); } if ( needHelpButton ) { sprintf( helpStr, "cmd%s", group->nameStr ); @@ -2674,7 +2773,7 @@ wWin_p ParamCreateDialog( EXPORT void ParamLayoutDialog( paramGroup_p pg ) { - wPos_t w, h; + wWinPix_t w, h; LayoutControls( pg, ParamPositionControl, &w, &h ); w += DlgSepRight; h += DlgSepBottom; @@ -2717,7 +2816,15 @@ EXPORT void ParamCreateControls( EXPORT void ParamInit( void ) { + if (paramGroups_init) return; + AddPlaybackProc( "PARAMETER", ParamPlayback, NULL ); AddPlaybackProc( "PARAMCHECK", ParamCheck, NULL ); log_paramLayout = LogFindIndex( "paramlayout" ); + log_paraminput = LogFindIndex( "paraminput" ); + paramGroups_da.cnt = 0; + paramGroups_da.max = 0; + paramGroups_da.ptr = NULL; + paramGroups_init = TRUE; + } diff --git a/app/bin/param.h b/app/bin/param.h index 414dae3..d72553e 100644 --- a/app/bin/param.h +++ b/app/bin/param.h @@ -24,8 +24,7 @@ #define PARAM_H #include "common.h" -#include "wlib.h" -#include "draw.h" +#include "draw.h" //- playbackAction typedef struct turnoutInfo_t * turnoutInfo_p; @@ -48,44 +47,55 @@ typedef enum { PD_BITMAP } parameterType; -#define PDO_DIM (1L<<0) -#define PDO_ANGLE (1L<<1) -#define PDO_NORECORD (1L<<2) -#define PDO_NOPSHACT (1L<<3) -#define PDO_NOPSHUPD (1L<<4) -#define PDO_NOPREF (1L<<5) -#define PDO_NOUPDACT (1L<<6) -#define PDO_MISC (1L<<7) -#define PDO_DRAW (1L<<8) -#define PDO_FILE (1L<<9) -#define PDO_ENTER (1L<<10) - -#define PDO_STRINGLIMITLENGTH (1L<<11) /**< context has maximum length for string */ -#define PDO_SMALLDIM (1L<<12) - -#define PDO_DLGSTARTBTNS (1L<<13) -#define PDO_DLGWIDE (1L<<14) -#define PDO_DLGNARROW (1L<<15) -#define PDO_DLGBOXEND (1L<<16) /**< draw recessed frame around the controls */ -#define PDO_DLGRESETMARGIN (1L<<17) /**< position control on the left ?*/ -#define PDO_DLGIGNORELABELWIDTH (1L<<18) - -#define PDO_DLGHORZ (1L<<20) /**< arrange on same line as previous element */ -#define PDO_DLGNEWCOLUMN (1L<<21) -#define PDO_DLGNOLABELALIGN (1L<<22) -#define PDO_LISTINDEX (1L<<23) -#define PDO_DLGSETY (1L<<24) -#define PDO_DLGIGNOREX (1L<<25) -#define PDO_DLGUNDERCMDBUTT (1L<<26) -#define PDO_DLGCMDBUTTON (1L<<27) /**< arrange button on the right with the default buttons */ -#define PDO_DLGIGNORE (1L<<28) - -#define PDO_DLGRESIZEW (1L<<29) -#define PDO_DLGRESIZEH (1L<<30) +// PD_FLOAT modifiers +#define PDO_DIM (1L<<0) +#define PDO_ANGLE (1L<<1) +#define PDO_SMALLDIM (1L<<2) +// PD_STRING modifiers +#define PDO_NOTBLANK (1L<<3) + +#define PDO_NORECORD (1L<<6) +#define PDO_NOPSHACT (1L<<7) +#define PDO_NOPSHUPD (1L<<8) +#define PDO_NOUPDACT (1L<<9) +#define PDO_NOACT (PDO_NOPSHACT|PDO_NOUPDACT) +#define PDO_NOUPD (PDO_NORSTUPD|PDO_NOPSHUPD) + +// Override paramGroup pref group +#define PDO_NOPREF (1L<<10) +#define PDO_MISC (1L<<11) +#define PDO_DRAW (1L<<12) +#define PDO_FILE (1L<<13) +//#define PDO_ENTER (1L<<14) +#define PDO_ENTER 0 + +//#define PDO_STRINGLIMITLENGTH (1L<<11) /**< context has maximum length for string */ +#define PDO_STRINGLIMITLENGTH 0 /**< context has maximum length for string */ + +// Ignore param +#define PDO_DLGIGNORE (1L<<15) + +// Layout options +#define PDO_DLGSTARTBTNS (1L<<16) +#define PDO_DLGWIDE (1L<<17) +#define PDO_DLGNARROW (1L<<18) +#define PDO_DLGBOXEND (1L<<19) /**< draw recessed frame around the controls */ +#define PDO_DLGRESETMARGIN (1L<<20) /**< position control on the left ?*/ +#define PDO_DLGIGNORELABELWIDTH (1L<<21) +#define PDO_DLGHORZ (1L<<22) /**< arrange on same line as previous element */ +#define PDO_DLGNEWCOLUMN (1L<<23) +#define PDO_DLGNOLABELALIGN (1L<<24) +#define PDO_LISTINDEX (1L<<25) +#define PDO_DLGSETY (1L<<26) +#define PDO_DLGIGNOREX (1L<<27) +#define PDO_DLGUNDERCMDBUTT (1L<<28) +#define PDO_DLGCMDBUTTON (1L<<29) /**< arrange button on the right with the default buttons */ +#define PDO_DLGRESIZEW (1L<<30) +#define PDO_DLGRESIZEH (1L<<31) #define PDO_DLGRESIZE (PDO_DLGRESIZEW|PDO_DLGRESIZEH) -#define PDO_NOACT (PDO_NOPSHACT|PDO_NOUPDACT) -#define PDO_NOUPD (PDO_NORSTUPD|PDO_NOPSHUPD|PDO_NOUPDUPD) + + typedef struct paramGroup_t *paramGroup_p; @@ -94,33 +104,33 @@ typedef struct paramGroup_t *paramGroup_p; typedef struct { long low; long high; - wPos_t width; + wWinPix_t width; int rangechecks; } paramIntegerRange_t; typedef struct { FLOAT_T low; FLOAT_T high; - wPos_t width; + wWinPix_t width; int rangechecks; } paramFloatRange_t; typedef struct { - wPos_t width; - wPos_t height; + wWinPix_t width; + wWinPix_t height; wDrawRedrawCallBack_p redraw; playbackProc action; drawCmd_p d; } paramDrawData_t; typedef struct { wIndex_t number; - wPos_t width; + wWinPix_t width; int colCnt; - wPos_t * colWidths; + wWinPix_t * colWidths; const char * * colTitles; - wPos_t height; + wWinPix_t height; } paramListData_t; typedef struct { - wPos_t width; - wPos_t height; + wWinPix_t width; + wWinPix_t height; } paramTextData_t; typedef union { @@ -133,10 +143,10 @@ typedef union { typedef struct { parameterType type; void * valueP; - char * nameStr; + const char * nameStr; long option; - void * winData; - char * winLabel; + const void * winData; + const char * winLabel; long winOption; void * context; unsigned int max_string; @@ -144,6 +154,7 @@ typedef struct { paramGroup_p group; paramOldData_t oldD, demoD; wBool_t enter_pressed; + wBool_t bInvalid; } paramData_t, *paramData_p; @@ -160,7 +171,7 @@ typedef void (*paramGroupProc_t) ( long, long ); #define PGO_PREFDRAWGROUP (1<<9) #define PGO_PREFMISC (1<<10) -typedef void (*paramLayoutProc)( paramData_t *, int, wPos_t, wPos_t *, wPos_t * ); +typedef void (*paramLayoutProc)( paramData_t *, int, wWinPix_t, wWinPix_t *, wWinPix_t * ); typedef void (*paramActionOkProc)( void * ); typedef void (*paramActionCancelProc)( wWin_p ); typedef void (*paramChangeProc)( paramGroup_p, int, void * ); @@ -181,8 +192,8 @@ typedef struct paramGroup_t { wButton_p okB; wButton_p cancelB; wButton_p helpB; - wPos_t origW; - wPos_t origH; + wWinPix_t origW; + wWinPix_t origH; wBox_p * boxs; } paramGroup_t; @@ -213,8 +224,9 @@ void ParamRestoreAll( void ); void ParamSaveAll( void ); void ParamMenuPush( void * ); -int paramHiliteFast; +extern int paramHiliteFast; void ParamHilite( wWin_p, wControl_p, BOOL_T ); +wBool_t ParamCheckInputs( paramGroup_p pg, wControl_p b ); void ParamInit( void ); @@ -238,6 +250,8 @@ void ParamLayoutDialog( paramGroup_p ); void ParamDialogOkActive( paramGroup_p, int ); +void ParamResetInvalid( wWin_p win ); + #define ParamControlShow( PG, INX, SHOW ) \ wControlShow( ((PG)->paramPtr)[INX].control, SHOW ) #endif diff --git a/app/bin/paramfile.c b/app/bin/paramfile.c index 2dd9ac7..f72f405 100644 --- a/app/bin/paramfile.c +++ b/app/bin/paramfile.c @@ -20,31 +20,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "common.h" #include "compound.h" #include "ctrain.h" #include "custom.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "misc2.h" #include "paths.h" #include "include/paramfile.h" #include "include/paramfilelist.h" #include "include/utf8convert.h" - -#if _MSC_VER >1300 -#define stricmp( a, b ) _stricmp(a, b ) -#endif +#include "common-ui.h" static long paramCheckSum; @@ -58,7 +45,7 @@ GetCompatibilityFunction GetCompatibility[] = { GetCarPartCompatibility }; -#define COMPATIBILITYCHECKSCOUNT (sizeof(GetCompatibility)/sizeof(GetCompatibility[0])) +#define COMPATIBILITYCHECKSCOUNT COUNT(GetCompatibility) /** * Check whether parameter file is still loaded @@ -147,11 +134,14 @@ void SetParamFileState(int index) enum paramFileState newState; SCALEINX_T scale = GetLayoutCurScale(); - for (int i = 0; i < COMPATIBILITYCHECKSCOUNT && state < PARAMFILE_FIT && - state != PARAMFILE_UNLOADED; i++) { - newState = (*GetCompatibility[i])(index, scale); - if (newState > state || newState == PARAMFILE_UNLOADED) { - state = newState; + //Set yet? + if (scale>=0) { + for (int i = 0; i < COMPATIBILITYCHECKSCOUNT && state < PARAMFILE_FIT && + state != PARAMFILE_UNLOADED; i++) { + newState = (*GetCompatibility[i])(index, scale); + if (newState > state || newState == PARAMFILE_UNLOADED) { + state = newState; + } } } @@ -159,6 +149,24 @@ void SetParamFileState(int index) } /** + * Check whether file exists and is readable + * + * \param file The file. + * + * \returns True if it succeeds, false if it fails. + */ + +static bool +CheckFileReadable(const char *file) +{ + if(!access( file, R_OK )) { + return TRUE; + } else { + return FALSE; + } +} + +/** * Read a single parameter file and update the parameter file list * * \param fileName full path for parameter file @@ -168,15 +176,18 @@ void SetParamFileState(int index) int ReadParamFile(const char *fileName) { - DYNARR_APPEND(paramFileInfo_t, paramFileInfo_da, 10); - curParamFileIndex = paramFileInfo_da.cnt - 1; - paramFileInfo(curParamFileIndex).name = MyStrdup(fileName); - paramFileInfo(curParamFileIndex).valid = TRUE; - paramFileInfo(curParamFileIndex).deleted = !ReadParams(0, NULL, fileName); - paramFileInfo(curParamFileIndex).contents = MyStrdup(curContents); - - SetParamFileState(curParamFileIndex); - + if (!CheckFileReadable(fileName)) { + return(-1); + } else { + DYNARR_APPEND(paramFileInfo_t, paramFileInfo_da, 10); + curParamFileIndex = paramFileInfo_da.cnt - 1; + paramFileInfo(curParamFileIndex).name = MyStrdup(fileName); + paramFileInfo(curParamFileIndex).valid = TRUE; + paramFileInfo(curParamFileIndex).deleted = !ReadParams(0, NULL, fileName); + paramFileInfo(curParamFileIndex).contents = MyStrdup(curContents); + + SetParamFileState(curParamFileIndex); + } return (curParamFileIndex); } @@ -223,7 +234,6 @@ bool ReadParams( long checkSum = 0; BOOL_T checkSummed; paramVersion = -1; - char *oldLocale = NULL; if (dirName) { MakeFullpath(¶mFileName, dirName, fileName, NULL); @@ -237,12 +247,12 @@ bool ReadParams( //LOG1( log_paramFile, ("ReadParam( %s )\n", fileName ) ) - oldLocale = SaveLocale("C"); + SetCLocale(); paramFile = fopen(paramFileName, "r"); if (paramFile == NULL) { /* Reset the locale settings */ - RestoreLocale(oldLocale); + SetUserLocale(); NoticeMessage(MSG_OPEN_FAIL, _("Continue"), NULL, _("Parameter"), paramFileName, strerror(errno)); @@ -254,7 +264,7 @@ bool ReadParams( checkSummed = FALSE; BOOL_T skip = false; int skipLines = 0; - while (paramFile && (fgets(paramLine, 256, paramFile)) != NULL) { + while (paramFile && (fgets(paramLine, 1024, paramFile)) != NULL) { paramLineNum++; Stripcr(paramLine); if (strncmp(paramLine, "CHECKSUM ", 9) == 0) { @@ -279,15 +289,14 @@ bool ReadParams( if (paramFile) { fclose(paramFile); } - RestoreLocale(oldLocale); - + SetUserLocale(); return FALSE; } oldFile = paramFile; oldLineNum = paramLineNum; oldCheckSum = paramCheckSum; if (!ReadParams(key, dirName, cp)) { - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } paramFile = oldFile; @@ -300,20 +309,20 @@ bool ReadParams( } skip = FALSE; } else if (strncmp(paramLine, "CONTENTS ", 9) == 0) { -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(paramLine + 9); #endif curContents = MyStrdup(paramLine + 9); curSubContents = curContents; skip = FALSE; } else if (strncmp(paramLine, "SUBCONTENTS ", 12) == 0) { -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(paramLine + 12); -#endif // WINDOWS +#endif // UTFCONVERT curSubContents = MyStrdup(paramLine + 12); skip = FALSE; } else if (strncmp(paramLine, "PARAM ", 6) == 0) { - paramVersion = strtol(paramLine + 8, &cp, 10); + paramVersion = strtol(paramLine + 6, &cp, 10); if (cp) while (*cp && isspace((unsigned char)*cp)) cp++; if (paramVersion > iParamVersion) { @@ -358,7 +367,7 @@ bool ReadParams( free(paramFileName); paramFileName = NULL; } - RestoreLocale(oldLocale); + SetUserLocale(); return FALSE; } } @@ -373,7 +382,7 @@ bool ReadParams( if (paramFile) { fclose(paramFile); } - RestoreLocale(oldLocale); + SetUserLocale(); NoticeMessage(MSG_PROG_CORRUPTED, _("Ok"), NULL, paramFileName); @@ -387,7 +396,7 @@ bool ReadParams( } free(paramFileName); paramFileName = NULL; - RestoreLocale(oldLocale); + SetUserLocale(); return TRUE; } diff --git a/app/bin/paramfilelist.c b/app/bin/paramfilelist.c index 199345c..e922f73 100644 --- a/app/bin/paramfilelist.c +++ b/app/bin/paramfilelist.c @@ -21,26 +21,18 @@ */ -#include <assert.h> -#include <errno.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "common.h" #include "compound.h" #include "ctrain.h" #include "custom.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "misc2.h" #include "paths.h" #include "include/paramfile.h" #include "include/paramfilelist.h" +#include "common-ui.h" dynArr_t paramFileInfo_da; @@ -62,7 +54,24 @@ int GetParamFileCount() return (paramFileInfo_da.cnt); } +/** + * Show parameter file error message + * + * \param [in,out] file If non-null, the file. + */ +static void +ReadParamError(char *file) +{ + DynString error_msg; + DynStringMalloc(&error_msg, 100); + DynStringPrintf(&error_msg, + _("The parameter file: %s could not be found and was probably deleted or moved. " + "The file is removed from the active parameter file list."), + file); + wNoticeEx(NT_ERROR, DynStringToCStr(&error_msg), "OK", NULL); + DynStringFree(&error_msg); +} /** @@ -194,34 +203,37 @@ void LoadParamFileList(void) } char * share; - // Rewire to the latest system level - if ((share= strstr(fileName,"/share/xtrkcad/params/"))) { - share += strlen("/share/xtrkcad/params/"); + // Rewire to the latest system level +#define SHAREPARAMS (PATH_SEPARATOR "share" PATH_SEPARATOR "xtrkcad" PATH_SEPARATOR "params" PATH_SEPARATOR) + if ((share= strstr(fileName,SHAREPARAMS))) { + share += strlen(SHAREPARAMS); MakeFullpath(&fileName, wGetAppLibDir(), "params", share, NULL); wPrefSetString("Parameter File Map", contents, fileName); } - ReadParamFile(fileName); - - if (curContents == NULL) { - curContents = curSubContents = MyStrdup(contents); - } - paramFileInfo(curParamFileIndex).contents = curContents; - if (favoriteList && fileNo == favoriteList[nextFavorite]) { - DynString topic; - long deleted; - DynStringMalloc(&topic, 16); - DynStringPrintf(&topic, FAVORITEDELETED, fileNo); - - wPrefGetIntegerBasic(FAVORITESECTION, DynStringToCStr(&topic), &deleted, 0L); - paramFileInfo(curParamFileIndex).favorite = TRUE; - paramFileInfo(curParamFileIndex).deleted = deleted; - if (nextFavorite < favorites - 1) { - nextFavorite++; - } - DynStringFree(&topic); - } - + if (ReadParamFile(fileName) >= 0) { + + if (curContents == NULL) { + curContents = curSubContents = MyStrdup(contents); + } + paramFileInfo(curParamFileIndex).contents = curContents; + if (favoriteList && fileNo == favoriteList[nextFavorite]) { + DynString topic; + long deleted; + DynStringMalloc(&topic, 16); + DynStringPrintf(&topic, FAVORITEDELETED, fileNo); + + wPrefGetIntegerBasic(FAVORITESECTION, DynStringToCStr(&topic), &deleted, 0L); + paramFileInfo(curParamFileIndex).favorite = TRUE; + paramFileInfo(curParamFileIndex).deleted = deleted; + if (nextFavorite < favorites - 1) { + nextFavorite++; + } + DynStringFree(&topic); + } + } else { + ReadParamError(fileName); + } } curParamFileIndex = PARAM_CUSTOM; if (updated) { @@ -276,10 +288,12 @@ void UpdateParamFileList(void) { for (size_t i = 0; i < (unsigned)paramFileInfo_da.cnt; i++) { - SetParamFileState(i); + SetParamFileState((int)i); } } + + /** * Load the selected parameter files. This is a callback executed when the file selection dialog * is closed. @@ -317,21 +331,24 @@ int LoadParamFile( curContents = curSubContents = NULL; newIndex = ReadParamFile(fileName[i]); - - // in case the contents is already present, make invalid - for (inx = 0; inx < newIndex; inx++) { - if (paramFileInfo(inx).valid && - strcmp(paramFileInfo(inx).contents, curContents) == 0) { - paramFileInfo(inx).valid = FALSE; - break; - } - } - - wPrefSetString("Parameter File Map", curContents, - paramFileInfo(curParamFileIndex).name); + if (newIndex >= 0) { + // in case the contents is already present, make invalid + for (inx = 0; inx < newIndex; inx++) { + if (paramFileInfo(inx).valid && + strcmp(paramFileInfo(inx).contents, curContents) == 0) { + paramFileInfo(inx).valid = FALSE; + break; + } + } + + wPrefSetString("Parameter File Map", curContents, + paramFileInfo(curParamFileIndex).name); + } else { + ReadParamError(fileName[i]); + } } //Only set the ParamFileDir if not the system directory - if (!strstr(fileName[i-1],"/share/xtrkcad/params/")) + if (!strstr(fileName[i-1],SHAREPARAMS)) SetParamFileDir(fileName[i - 1]); curParamFileIndex = PARAM_CUSTOM; DoChangeNotification(CHANGE_PARAMS); @@ -353,11 +370,8 @@ static void ReadCustom(void) } -/* - * Open the file and then set the locale to "C". Old locale will be copied to - * oldLocale. After the required file I/O is done, the caller must call - * CloseCustom() with the same locale value that was returned in oldLocale by - * this function. +/** + * Open the custom file where user-defined turnouts, cars and such are stored */ FILE * OpenCustom(char *mode) @@ -407,10 +421,15 @@ addButtonCallBack_t ParamFilesInit(void) */ BOOL_T ParamFileListInit(void) { + /** @logcmd @showrefby params=n paramfilelist.c Log ReadParams + * (including scale file (xtq), custom file (*.cus) and other params (xtp)) + */ log_params = LogFindIndex("params"); + SetCLocale(); // get the default definitions if (ReadParams(lParamKey, libDir, sParamQF) == FALSE) { + SetUserLocale(); return FALSE; } @@ -421,6 +440,7 @@ BOOL_T ParamFileListInit(void) ReadCustom(); } + SetUserLocale(); return TRUE; } diff --git a/app/bin/paramfilesearch_ui.c b/app/bin/paramfilesearch_ui.c index bf9c47a..15498f8 100644 --- a/app/bin/paramfilesearch_ui.c +++ b/app/bin/paramfilesearch_ui.c @@ -2,7 +2,7 @@ * Parameter File Search Dialog */ -/* XTrkCad - Model Railroad CAD +/* XTrackCAD - Model Railroad CAD * Copyright (C) 2019 Martin Fischer * * This program is free software; you can redistribute it and/or modify @@ -20,106 +20,151 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <ctype.h> -#include <stdbool.h> -#include <stdint.h> -#include <string.h> - #include "custom.h" #include "dynstring.h" -#include "i18n.h" -#include "messages.h" #include "param.h" #include "include/partcatalog.h" #include "paths.h" #include "include/paramfilelist.h" +#include "include/paramfile.h" #include "fileio.h" #include "directory.h" +#include "misc2.h" +#include "layout.h" -#include "bitmaps/magnifier.xpm" - -static CatalogEntry *catalogFileBrowse; /**< current search results */ -static TrackLibrary *trackLibrary; /**< Track Library */ -static CatalogEntry *currentCat; /**< catalog being shown */ +static ParameterLib *trackLibrary; /**< Track Library */ +static Catalog currentCat; /**< catalog being shown */ /* define the search / browse dialog */ -static struct wFilSel_t *searchUi_fs; /**< searchdialog for parameter files */ - -static void SearchUiBrowse(void *junk); -static void SearchUiDefault(void * junk); +static void SearchUiDefault(void); static void SearchUiApply(wWin_p junk); static void SearchUiSelectAll(void *junk); static void SearchUiDoSearch(void *junk); +static void SearchUiClearFilter(void *ptr); static long searchUiMode = 0; +static long searchFitMode = 0; static paramListData_t searchUiListData = { 10, 370, 0 }; #define MAXQUERYLENGTH 250 static char searchUiQuery[MAXQUERYLENGTH]; static char * searchUiLabels[] = { N_("Show File Names"), NULL }; +// Note these are defined in the same order as FIT_ANY, FIT_COMPATIBLE, FIT_EXACT +static char * searchFitLabels[] = { N_("Fit Any"), N_("Fit Compatible"), N_("Fit Exact"), NULL}; + + +#define QUERYPROMPTSTRING "Enter at least one search word" static paramData_t searchUiPLs[] = { #define I_QUERYSTRING (0) - { PD_STRING, searchUiQuery, "query", PDO_NOPREF | PDO_STRINGLIMITLENGTH, (void*)(340), "", 0, 0, MAXQUERYLENGTH-1 }, + { PD_STRING, searchUiQuery, "query", PDO_ENTER | PDO_NOPREF | PDO_STRINGLIMITLENGTH | PDO_DLGRESIZE, I2VP(340), "", 0, 0, MAXQUERYLENGTH-1 }, #define I_SEARCHBUTTON (1) - { PD_BUTTON, (void*)SearchUiDoSearch, "find", PDO_DLGHORZ, 0, NULL, BO_ICON, (void *)NULL }, -#define I_MESSAGE (2) - { PD_MESSAGE, N_("Enter at least one search word"), NULL, PDO_DLGBOXEND, (void *)370 }, -#define I_RESULTLIST (3) + { PD_BUTTON, SearchUiDoSearch, "find", PDO_DLGHORZ, 0, NULL, BO_ICON, NULL }, +#define I_CLEARBUTTON (2) + { PD_BUTTON, SearchUiClearFilter, "clearfilter", PDO_DLGHORZ, 0, NULL, BO_ICON, NULL }, +#define I_FITRADIO (3) + { PD_RADIO, &searchFitMode, "fit", PDO_NOPREF | PDO_DLGBOXEND, searchFitLabels, NULL, BC_HORZ|BC_NOBORDER }, +#define I_MESSAGE (4) + { PD_MESSAGE, N_(QUERYPROMPTSTRING), NULL, 0, I2VP(370) }, +#define I_STATISTICS (5) + { PD_MESSAGE, "", NULL, PDO_DLGBOXEND, I2VP(370) }, +#define I_RESULTLIST (6) { PD_LIST, NULL, "inx", PDO_NOPREF | PDO_DLGRESIZE, &searchUiListData, NULL, BL_DUP|BL_SETSTAY|BL_MANY }, -#define I_MODETOGGLE (4) +#define I_MODETOGGLE (7) { PD_TOGGLE, &searchUiMode, "mode", PDO_DLGBOXEND, searchUiLabels, NULL, BC_HORZ|BC_NOBORDER }, -#define I_APPLYBUTTON (5) - { PD_BUTTON, (void *)SearchUiApply, "apply", PDO_DLGCMDBUTTON, NULL, N_("Add") }, -#define I_SELECTALLBUTTON (6) - { PD_BUTTON, (void*)SearchUiSelectAll, "selectall", PDO_DLGCMDBUTTON, NULL, N_("Select all") }, - { PD_BUTTON, (void*)SearchUiDefault, "default", 0, NULL, N_("Reload Library") }, +#define I_APPLYBUTTON (8) + { PD_BUTTON, SearchUiApply, "apply", PDO_DLGCMDBUTTON, NULL, N_("Add") }, +#define I_SELECTALLBUTTON (9) + { PD_BUTTON, SearchUiSelectAll, "selectall", PDO_DLGCMDBUTTON, NULL, N_("Select all") }, }; #define SEARCHBUTTON ((wButton_p)searchUiPLs[I_SEARCHBUTTON].control) +#define CLEARBUTTON ((wButton_p)searchUiPLs[I_CLEARBUTTON].control) #define RESULTLIST ((wList_p)searchUiPLs[I_RESULTLIST].control) #define APPLYBUTTON ((wButton_p)searchUiPLs[I_APPLYBUTTON].control) #define SELECTALLBUTTON ((wButton_p)searchUiPLs[I_SELECTALLBUTTON].control) #define MESSAGETEXT ((wMessage_p)searchUiPLs[I_MESSAGE].control) #define QUERYSTRING ((wString_p)searchUiPLs[I_QUERYSTRING].control) +#define SEARCHSTAT ((wMessage_p)searchUiPLs[I_STATISTICS].control) +#define FITRADIO ((wChoice_p)searchUiPLs[I_FITRADIO].control) -static paramGroup_t searchUiPG = { "searchgui", 0, searchUiPLs, sizeof searchUiPLs/sizeof searchUiPLs[0] }; +static paramGroup_t searchUiPG = { "searchgui", 0, searchUiPLs, COUNT( searchUiPLs ) }; static wWin_p searchUiW; #define FILESECTION "file" #define PARAMDIRECTORY "paramdir" + +/** + * Clears the current catalog + */ + +void +ClearCurrentCatalog(void) +{ + if (currentCat.head) { + DestroyCatalog(¤tCat); + currentCat.head = NULL; + } +} + /** - * Reload the listbox showing the current catalog + * Reload the listbox showing the current catalog. The catalog is either the system + * default library catalog or a search result + * + * \param [in] catalog the current catalog. */ static -void SearchFileListLoad(CatalogEntry *catalog) +int SearchFileListLoad(Catalog *catalog) + { - CatalogEntry *currentEntry = catalog->next; + CatalogEntry *head = catalog->head; + CatalogEntry *catalogEntry; + DynString description; DynStringMalloc(&description, STR_SHORT_SIZE); wControlShow((wControl_p)RESULTLIST, FALSE); wListClear(RESULTLIST); - while (currentEntry != currentEntry->next) { - for (unsigned int i=0;i<currentEntry->files;i++) { - DynStringClear(&description); - DynStringCatCStr(&description, - ((!searchUiMode) && currentEntry->contents) ? - currentEntry->contents : - currentEntry->fullFileName[i]); - - wListAddValue(RESULTLIST, - DynStringToCStr(&description), - NULL, - // indicatorIcons[paramFileInfo.favorite][paramFileInfo.trackState], - (void*)currentEntry->fullFileName[i]); + DL_FOREACH(head, catalogEntry) { + for (unsigned int i=0; i<catalogEntry->files; i++) { + if (catalogEntry->tag && searchFitMode != 0) { + char * type_copy = MyStrdup(catalogEntry->tag); + char * cp = type_copy; + char * type = strtok(cp, " \t"); + SCALE_FIT_TYPE_T fit_type; + if (strcmp(type,TURNOUTCOMMAND) == 0) + fit_type = FIT_TURNOUT; + else if (strcmp(type,STRUCTURECOMMAND)==0) + fit_type = FIT_STRUCTURE; + else if ((strcmp(type,CARCOMMAND)==0) || (strcmp(type,CARPROTOCOMMAND)==0)) + fit_type = FIT_CAR; + char * scale = strtok(NULL, " \t\n"); + if (scale) { + SCALEINX_T scale1 = LookupScale(scale); + SCALEINX_T scale2 = GetLayoutCurScale(); + if (searchFitMode == FIT_COMPATIBLE) { + if (CompatibleScale(fit_type,scale1,scale2)<FIT_COMPATIBLE) continue; + } else { + if (CompatibleScale(fit_type,scale1,scale2)<FIT_EXACT) continue; + } + + } + MyFree(type_copy); + } + DynStringClear(&description); + DynStringCatCStr(&description, + ((!searchUiMode) && catalogEntry->contents) ? + catalogEntry->contents : + catalogEntry->fullFileName[i]); + + wListAddValue(RESULTLIST, + DynStringToCStr(&description), + NULL, + catalogEntry->fullFileName[i]); } - - currentEntry = currentEntry->next; } wControlShow((wControl_p)RESULTLIST, TRUE); @@ -127,55 +172,27 @@ void SearchFileListLoad(CatalogEntry *catalog) wListGetCount(RESULTLIST)); DynStringFree(&description); - - currentCat = catalog; -} - -/** - * Find parameter files using the file selector - * - * \param junk - */ - -static void SearchUiBrowse(void * junk) -{ - - //EmptyCatalog(catalogFileBrowse); - - wFilSelect(searchUi_fs, GetParamFileDir()); - - //SearchFileListLoad(catalogFileBrowse); - - return; + return wListGetCount(RESULTLIST); } - /** * Reload just the system files into the searchable set */ -static void SearchUiDefault(void * junk) +static void SearchUiDefault(void) { + DynString dsSummary; - if (!catalogFileBrowse) - catalogFileBrowse = InitCatalog(); - else { - EmptyCatalog(catalogFileBrowse); - } - - if (trackLibrary) - DeleteLibrary(trackLibrary); - - char * parms_path; + int matches = SearchFileListLoad(trackLibrary->catalog); //Start with system files + wStringSetValue(QUERYSTRING, ""); - MakeFullpath(&parms_path, wGetAppLibDir(), "params", NULL); - - trackLibrary = CreateLibrary(parms_path); - - SearchFileListLoad(trackLibrary->catalog); //Start with system files - - free(parms_path); + wMessageSetValue(MESSAGETEXT, _(QUERYPROMPTSTRING)); + DynStringMalloc(&dsSummary, 16); + DynStringPrintf(&dsSummary, _("%u parameter files in library. %d Fit Scale."), CountCatalogEntries(trackLibrary->catalog), matches); + wMessageSetValue(SEARCHSTAT, DynStringToCStr(&dsSummary)); + DynStringFree(&dsSummary); + wControlActive((wControl_p)CLEARBUTTON, FALSE); } /** @@ -185,12 +202,12 @@ static void SearchUiDefault(void * junk) void static SearchUILoadResults(void) { - char **fileNames; int files = wListGetSelectedCount(RESULTLIST); - int found = 0; if (files) { - fileNames = malloc(sizeof(char *)*files); + char **fileNames; + int found = 0; + fileNames = MyMalloc(sizeof(char *)*files); if (!fileNames) { AbortProg("Couldn't allocate memory for result list: %s (%d)", __FILE__, __LINE__, NULL); @@ -198,13 +215,13 @@ SearchUILoadResults(void) for (int inx = 0; found < files; inx++) { if (wListGetItemSelected(RESULTLIST, inx)) { - fileNames[found++] = (char *)wListGetItemContext(RESULTLIST, inx); + fileNames[found++] = (char *)wListGetItemContext(RESULTLIST, inx); } } LoadParamFile(files, fileNames, NULL); - free(fileNames); - SearchUiOk((void *) 0); + MyFree(fileNames); + SearchUiOk(NULL); } } @@ -227,62 +244,95 @@ static void UpdateSearchUiButton(void) wControlActive((wControl_p)SELECTALLBUTTON, cnt > 0); } -// Return a pointer to the (shifted) trimmed string +/** + * Return a pointer to the (shifted) trimmed string + * + * \param [in,out] s If non-null, a char to process. + * + * \returns pointer to the trimmed string + */ + char * StringTrim(char *s) { - char *original = s; - size_t len = 0; - - while (isspace((unsigned char) *s)) { - s++; - } - if (*s) { - char *p = s; - while (*p) p++; - while (isspace((unsigned char) *(--p))); - p[1] = '\0'; - len = (size_t) (p - s + 1); - } - - return (s == original) ? s : memmove(original, s, len + 1); + char *original = s; + size_t len = 0; + + while (isspace((unsigned char) *s)) { + s++; + } + if (*s) { + char *p = s; + while (*p) { + p++; + } + while (isspace((unsigned char) *(--p))); + p[1] = '\0'; + len = (size_t)(p - s + 1); + } + + return (s == original) ? s : memmove(original, s, len + 1); } /** * Perform the search. If successful, the results are loaded into the list * - * \param ptr INignored + * \param [in,out] ptr ignored. */ static void SearchUiDoSearch(void * ptr) { unsigned result; - + SearchResult *currentResults = MyMalloc(sizeof(SearchResult)); char * search; + ClearCurrentCatalog(); + + strcpy(searchUiQuery, wStringGetValue((wString_p)searchUiPG.paramPtr[I_QUERYSTRING].control)); search = StringTrim(searchUiQuery); - if (catalogFileBrowse) { - EmptyCatalog(catalogFileBrowse); - } else - catalogFileBrowse = InitCatalog(); + if (search[0]) { + result = SearchLibrary(trackLibrary, search, currentResults); - result = SearchLibrary(trackLibrary, search, catalogFileBrowse); + if (result) { - if (result) { - DynString hitsMessage; - DynStringMalloc(&hitsMessage, 16); - DynStringPrintf(&hitsMessage, _("%d parameter files found."), result); - wMessageSetValue(MESSAGETEXT, DynStringToCStr(&hitsMessage)); - DynStringFree(&hitsMessage); + char *statistics; - SearchFileListLoad(catalogFileBrowse); + statistics = SearchStatistics(currentResults); + wMessageSetValue(SEARCHSTAT, statistics); + MyFree(statistics); - } else { + int matches = SearchFileListLoad(&(currentResults->subCatalog)); - wListClear(RESULTLIST); - wControlActive((wControl_p)SELECTALLBUTTON, FALSE); - wMessageSetValue(MESSAGETEXT, _("No matches found.")); - } + DynString hitsMessage; + DynStringMalloc(&hitsMessage, 16); + DynStringPrintf(&hitsMessage, _("%d parameter files found. %d Fit Scale"), result, matches); + wMessageSetValue(MESSAGETEXT, DynStringToCStr(&hitsMessage)); + DynStringFree(&hitsMessage); + + currentCat = currentResults->subCatalog; + wControlActive((wControl_p)CLEARBUTTON, TRUE); + } else { + wListClear(RESULTLIST); + wControlActive((wControl_p)SELECTALLBUTTON, FALSE); + wMessageSetValue(MESSAGETEXT, _("No matches found.")); + } + } else { + SearchUiDefault(); + } + MyFree(currentResults); //Because SearchFileList also caches the currentResults->subCatalog address as currentCatalog for reuse. +} + +/** + * Clear the current filter + * + * \param [in,out] ptr ignored + */ + +static void +SearchUiClearFilter(void *ptr) +{ + ClearCurrentCatalog(); + SearchUiDefault(); } /** @@ -323,7 +373,7 @@ static void SearchUiApply(wWin_p junk) } /** - * Event handling for the Search dialog. If the 'X' decoration is pressed the + * Event handling for the Search dialog. If the 'X' decoration is pressed the * dialog window is closed. * * \param pg IN ignored @@ -337,20 +387,41 @@ static void SearchUiDlgUpdate( void * valueP) { switch (inx) { + case I_QUERYSTRING: + if (pg->paramPtr[inx].enter_pressed) { + strcpy( searchUiQuery, wStringGetValue((wString_p)pg->paramPtr[inx].control) ); + SearchUiDoSearch(NULL); + } + break; case I_RESULTLIST: UpdateSearchUiButton(); break; + case I_FITRADIO: + strcpy( searchUiQuery, wStringGetValue((wString_p)pg->paramPtr[I_QUERYSTRING].control) ); + SearchUiDoSearch(NULL); + break; case I_MODETOGGLE: - SearchFileListLoad(currentCat); + if (currentCat.head) { + SearchFileListLoad(¤tCat); + } else { + SearchFileListLoad(trackLibrary->catalog); + } + break; + case -1: + SearchUiOk(valueP); break; - case -1: - SearchUiOk(valueP); - break; } } +void +SearchUiCancel(wWin_p window) +{ + ClearCurrentCatalog(); + wHide(window); +} + /** - * Get the system default directory for parameter files. First step is to + * Get the system default directory for parameter files. First step is to * check the configuration file for a user specific setting. If that is not * found, the diretory is based derived from the installation directory. * The returned string has to be free'd() when no longer needed. @@ -361,17 +432,21 @@ static void SearchUiDlgUpdate( static char * GetParamsPath() { - char * params_path; - char *params_pref; - params_pref = wPrefGetString(FILESECTION, PARAMDIRECTORY); + char * params_path; + char *params_pref; + params_pref = wPrefGetString(FILESECTION, PARAMDIRECTORY); - if (!params_pref) { - MakeFullpath(¶ms_path, wGetAppLibDir(), "params", NULL); - } else { - params_path = strdup(params_pref); - } - return(params_path); + if (!params_pref) { + MakeFullpath(¶ms_path, wGetAppLibDir(), "params", NULL); + } else { + params_path = strdup(params_pref); + } + return (params_path); } + +#include "bitmaps/funnel.xpm" +#include "bitmaps/funnelclear.xpm" + /** * Create and open the search dialog. * @@ -381,45 +456,46 @@ GetParamsPath() void DoSearchParams(void * junk) { if (searchUiW == NULL) { - catalogFileBrowse = InitCatalog(); //Make the Find menu bound to the System Library initially - char *paramsDir = GetParamsPath(); + char *paramsDir = GetParamsPath(); trackLibrary = CreateLibrary(paramsDir); - free(paramsDir); + free(paramsDir); - searchUiPLs[I_SEARCHBUTTON].winLabel = (char *)wIconCreatePixMap(magnifier_xpm); + searchUiPLs[I_SEARCHBUTTON].winLabel = (char *)wIconCreatePixMap(funnel_xpm); + searchUiPLs[I_CLEARBUTTON].winLabel = (char *)wIconCreatePixMap( + funnelclear_xpm); + + searchFitMode = FIT_COMPATIBLE; //Default to "Any" after startup ParamRegister(&searchUiPG); + + searchUiW = ParamCreateDialog(&searchUiPG, - MakeWindowTitle(_("Choose parameter files")), _("Done"), NULL, wHide, + MakeWindowTitle(_("Choose parameter files")), _("Done"), NULL, SearchUiCancel, TRUE, NULL, F_RESIZE | F_RECALLSIZE, SearchUiDlgUpdate); - if (trackLibrary) { - SearchFileListLoad(trackLibrary->catalog); //Start with system files - } + + wControlActive((wControl_p)APPLYBUTTON, FALSE); wControlActive((wControl_p)SELECTALLBUTTON, FALSE); - - searchUi_fs = wFilSelCreate(searchUiW, FS_LOAD, FS_MULTIPLEFILES, - _("Load Parameters"), _("Parameter files (*.xtp)|*.xtp"), GetParameterFileInfo, - (void *)catalogFileBrowse); } + wControlActive((wControl_p)FITRADIO, TRUE); + ParamLoadControls(&searchUiPG); ParamGroupRecord(&searchUiPG); + if (!trackLibrary) { wControlActive((wControl_p)SEARCHBUTTON, FALSE); wControlActive((wControl_p)QUERYSTRING, FALSE); wMessageSetValue(MESSAGETEXT, _("No system parameter files found, search is disabled.")); } else { - wStringSetValue(QUERYSTRING, ""); - - SearchFileListLoad(trackLibrary->catalog); //Start with system files - + SearchUiDefault(); } + wShow(searchUiW); } diff --git a/app/bin/partcatalog.c b/app/bin/partcatalog.c index a1db09c..25ae024 100644 --- a/app/bin/partcatalog.c +++ b/app/bin/partcatalog.c @@ -1,7 +1,7 @@ /** \file partcatalog.c * Manage the catalog of track parameter files */ -/* XTrkCad - Model Railroad CAD +/* XTrackCAD - Model Railroad CAD * Copyright (C) 2019 Martin Fischer * * This program is free software; you can redistribute it and/or modify @@ -19,41 +19,27 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <ctype.h> -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif -#include <search.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include <sys/types.h> -#include <sys/stat.h> - -#ifdef WINDOWS - #include "include/dirent.h" -#else - #include <dirent.h> -#endif +#include "dynstring.h" #include "fileio.h" +#include "include/levenshtein.h" #include "misc.h" +#include "misc2.h" #include "include/paramfile.h" #include "include/partcatalog.h" #include "paths.h" #include "include/stringxtc.h" #include "include/utf8convert.h" - -#if _MSC_VER > 1300 - #define strnicmp _strnicmp - #define strdup _strdup -#endif +#include "include/utlist.h" #define PUNCTUATION "+-*/.,&%=#" +#define SEARCHDELIMITER " \t\n\r/" +#define LDISTANCELIMIT (2) +static char *stopwords = { + "scale", +}; +static int log_params; /** * Create and initialize the linked list for the catalog entries @@ -61,22 +47,46 @@ * \return pointer to first element */ -CatalogEntry * +Catalog * InitCatalog(void) { - CatalogEntry *head; - CatalogEntry *tail; - - /* allocate two pseudo nodes for beginning and end of list */ - head = (CatalogEntry *)malloc(sizeof(CatalogEntry)); - tail = (CatalogEntry *)malloc(sizeof(CatalogEntry)); - - head->next = tail; - tail->next = tail; + Catalog *newCatalog = MyMalloc(sizeof(Catalog)); + if (newCatalog) { + newCatalog->head = NULL; + } + return (newCatalog); +} +/** + * Destroys the catalog + * + * \param [in] catalog + */ +void +DestroyCatalog(Catalog *catalog) +{ + CatalogEntry *current = catalog->head; + CatalogEntry *entry = NULL; + CatalogEntry *tmp = NULL, *old = NULL; + DL_FOREACH_SAFE(current, entry, tmp) + { + //if (old) MyFree(old); + old = NULL; + for (unsigned int i = 0; i < entry->files; i++) { + MyFree(entry->fullFileName[i]); + entry->fullFileName[i] = NULL; + } + entry->files = 0; + MyFree(entry->contents); + entry->contents = NULL; + MyFree(entry->tag); + entry->tag = NULL; + old = entry; + DL_DELETE(catalog->head,entry); + } - return (head); + catalog->head = NULL; } /** @@ -90,32 +100,30 @@ InitCatalog(void) static CatalogEntry * InsertIntoCatalogAfter(CatalogEntry *entry) { - CatalogEntry *newEntry = (CatalogEntry *)malloc(sizeof(CatalogEntry)); + CatalogEntry *newEntry = (CatalogEntry *)MyMalloc(sizeof(CatalogEntry)); newEntry->next = entry->next; + newEntry->prev = entry; entry->next = newEntry; newEntry->files = 0; newEntry->contents = NULL; + newEntry->tag = NULL; return (newEntry); } /** - * Count the elements in the linked list ignoring dummy elements + * Count the elements in the linked list * - * \param listHeader IN the linked list - * \return the numberof elements + * \param catalog IN + * \return the number of elements */ unsigned -CountCatalogEntries(CatalogEntry *listHeader) +CountCatalogEntries(Catalog *catalog) { - CatalogEntry *currentEntry = listHeader->next; + CatalogEntry * entry; unsigned count = 0; - - while (currentEntry != currentEntry->next) { - count++; - currentEntry = currentEntry->next; - } + DL_COUNT(catalog->head, entry, count); return (count); } @@ -125,70 +133,96 @@ CountCatalogEntries(CatalogEntry *listHeader) * \param listHeader IN the list */ -void -EmptyCatalog(CatalogEntry *listHeader) +EXPORT void +CatalogDiscard(Catalog *catalog) { - CatalogEntry *current = listHeader; - - while (current->next != current->next->next) { - CatalogEntry *removedElement; - removedElement = current->next; - current->next = current->next->next; - if (removedElement->contents) { - free(removedElement->contents); - } - for (unsigned int i = 0; i < removedElement->files; i++) { - free(removedElement->fullFileName[i]); - } - free(removedElement); + CatalogEntry *current = catalog->head; + CatalogEntry *element; + CatalogEntry *tmp,*old = NULL; + + DL_FOREACH_SAFE(current, element, tmp) { + //if (old) MyFree(old); + old = NULL; + MyFree(element->contents); + element->contents = NULL; + MyFree(element->tag); + element->tag = NULL; + for (unsigned int i = 0; i < element->files; i++) { + MyFree(element->fullFileName[i]); + element->fullFileName[i] = NULL; + } + element->files = 0; + old = element; + DL_DELETE(catalog->head,element); } + + catalog->head = NULL; } /** - * Find the position in the list and add + * Compare entries * - * \param listHeader IN start of list - * \param contents IN contents to include + * \param [in] a If non-null, a CatalogEntry to compare. + * \param [in] b If non-null, a CatalogEntry to compare. * - * \return CatalogEntry if found, NULL otherwise + * \returns An int. */ -static CatalogEntry * -InsertInOrder(CatalogEntry *listHeader, const char *contents) +static int +CompareEntries(CatalogEntry *a, CatalogEntry *b) { - CatalogEntry *currentEntry = listHeader; + return XtcStricmp(a->contents, b->contents); +} - while (currentEntry->next != currentEntry->next->next) { - CatalogEntry *nextEntry = currentEntry->next; - if (XtcStricmp(nextEntry->contents, contents)>0) { - return InsertIntoCatalogAfter(currentEntry); - } - currentEntry = nextEntry; - } - return InsertIntoCatalogAfter(currentEntry); +/** + * Create a new CatalogEntry and insert it keeping the list sorted + * + * \param [in] catalog + * \param [in] contents to include. + * \param [in] tag + * + * \returns CatalogEntry + */ + +EXPORT CatalogEntry * +InsertInOrder(Catalog *catalog, const char *contents, const char *tag) +{ + CatalogEntry *newEntry = MyMalloc(sizeof(CatalogEntry)); + newEntry->files = 0; + + if (contents) + newEntry->contents = MyStrdup(contents); + if (tag) + newEntry->tag = MyStrdup(tag); + + DL_INSERT_INORDER(catalog->head, newEntry, CompareEntries); + + return newEntry; } + /** - * Get the existing list element for a content + * Find an existing list element for a given content * - * \param listHeader IN start of list - * \param contents IN contents to search - * \param Do we log error messages or not + * \param [in] catalog + * \param [in] contents contents to search. + * \param [in] silent we log error messages or not. * - * \return CatalogEntry if found, NULL otherwise + * \returns CatalogEntry if found, NULL otherwise. */ static CatalogEntry * -IsExistingContents(CatalogEntry *listHeader, const char *contents, BOOL_T silent) +IsExistingContents(Catalog *catalog, const char *contents, BOOL_T silent) { - CatalogEntry *currentEntry = listHeader->next; + CatalogEntry *head = catalog->head; + CatalogEntry *currentEntry; - while (currentEntry != currentEntry->next) { + DL_FOREACH(head, currentEntry) { if (!XtcStricmp(currentEntry->contents, contents)) { - if (!silent) - printf("%s already exists in %s\n", contents, currentEntry->fullFileName[0]); + if (!silent) { + printf("%s already exists in %s\n", contents, currentEntry->fullFileName[0]); + } return (currentEntry); } - currentEntry = currentEntry->next; } return (NULL); } @@ -203,49 +237,36 @@ IsExistingContents(CatalogEntry *listHeader, const char *contents, BOOL_T silent * \param contents contents description */ -static void -UpdateCatalogEntry(CatalogEntry *entry, char *path, char *contents) +EXPORT void +UpdateCatalogEntry(CatalogEntry *entry, char *path, char *contents, char *tag) { if (!entry->contents) { - entry->contents = strdup(contents); + MyFree(entry->contents); + entry->contents = NULL; } + if (contents) + entry->contents = MyStrdup(contents); + + if (!entry->tag) { + MyFree(entry->tag); + entry->tag = NULL; + } + if (tag) + entry->tag = MyStrdup(tag); if (entry->files < MAXFILESPERCONTENT) { - entry->fullFileName[entry->files++] = strdup(path); + entry->fullFileName[entry->files++] = MyStrdup(path); } else { - AbortProg("Number of file with same content too large!", NULL); + AbortProg("Number of files with same content too large!", NULL); } } /** - * Create the list for the catalog entries - * - * \return - */ - -static CatalogEntry * -CreateCatalog() -{ - CatalogEntry *catalog = InitCatalog(); - - return (catalog); -} - - -static IndexEntry * -CreateIndexTable(unsigned int capacity) -{ - IndexEntry *index = (IndexEntry *)malloc(capacity * sizeof(IndexEntry)); - - return (index); -} - -/** * Scan opened directory for the next parameter file * * \param dir IN opened directory handle * \param dirName IN name of directory - * \param fileName OUT fully qualified filename + * \param fileName OUT fully qualified filename, must be free()'d by caller * * \return TRUE if file found, FALSE if not */ @@ -289,391 +310,347 @@ GetNextParameterFile(DIR *dir, const char *dirName, char **fileName) return (res); } -/** - * Scan a directory for parameter files. For each file found the CONTENTS is - * read and added to the list * - * - * \param insertAfter IN starting point for the list of files - * \param dirName IN directory to be scanned +/*! + * Filter keywords. Current rules: + * - single character string that only consist of a punctuation char * - * \return pointer to the last element(?) + * \param word IN keyword + * \return true if any rule applies, false otherwise */ -static CatalogEntry * -ScanDirectory(CatalogEntry *catalog, const char *dirName) +bool +FilterKeyword(char *word) { - DIR *d; - CatalogEntry *newEntry = catalog; - - d = opendir(dirName); - if (d) { - char *fileName = NULL; + if (strlen(word) == 1 && strpbrk(word, PUNCTUATION)) { + return (true); + } - while (GetNextParameterFile(d, dirName, &fileName)) { - CatalogEntry *existingEntry; - char *contents = GetParameterFileContent(fileName); - if ((existingEntry = IsExistingContents(catalog, contents,FALSE))) { - printf("Duplicate CONTENTS record in parameter file %s\n", fileName); - if (strcmp(existingEntry->fullFileName[existingEntry->files-1],fileName)) - UpdateCatalogEntry(existingEntry, fileName, contents); - } else { - newEntry = InsertInOrder(catalog,contents); - UpdateCatalogEntry(newEntry, fileName, contents); - } - free(contents); - free(fileName); - fileName = NULL; + for (int i = 0; i < sizeof(stopwords) / sizeof(char *); i++) { + if (!XtcStricmp(word, stopwords+i)) { + return (true); } - closedir(d); } + return (false); +} - return (newEntry); +int KeyWordCmp(void *a, void *b) +{ + return XtcStricmp(((IndexEntry *)a)->keyWord,((IndexEntry *)b)->keyWord); } + /** - * Comparison function for IndexEntries used by qsort() + * Standardize spelling: remove some typical spelling problems. It is assumed that the word + * has already been converted to lower case * - * \param entry1 IN - * \param entry2 IN - * \return per C runtime conventions + * \param [in,out] word If non-null, the word. */ -static int -CompareIndex(const void *entry1, const void *entry2) +void +StandardizeSpelling(char *word) { - IndexEntry index1 = *(IndexEntry *)entry1; - IndexEntry index2 = *(IndexEntry *)entry2; - return (strcoll(index1.keyWord, index2.keyWord)); -} + char *p = strchr(word, '-'); + // remove the word 'scale' from combinations like N-scale + if (p) { + if (!XtcStricmp(p+1, "scale")) { + *p = '\0'; + } + } -/*! - * Filter keywords. Current rules: - * - single character string that only consist of a punctuation char - * - * \param word IN keyword - * \return true if any rule applies, false otherwise - */ + if (!strncasecmp(word, "h0", 2)) { + strncpy(word, "ho", 2); + } -bool -FilterKeyword(char *word) -{ - if (strlen(word) == 1 && strpbrk(word, PUNCTUATION )) { - return(true); - } - return(false); + if (!strncasecmp(word, "00", 2)) { + strncpy(word, "oo", 2); + } + + if (word[0] == '0') { + word[0] = 'o'; + } } /** * Create the keyword index from a list of parameter files * - * \param catalog IN list of parameter files - * \param index IN index table to be filled - * \param pointer IN/OUT array of words that are indexed - * \param capacityOfIndex IN total maximum of keywords - * \return number of indexed keywords + * \param [in] library initialized library + * + * \returns number of indexed keywords. */ + static unsigned -CreateContentsIndex(CatalogEntry *catalog, IndexEntry *index, void** words_array, - unsigned capacityOfIndex) +CreateKeywordIndex(ParameterLib *library) { - CatalogEntry *currentEntry = catalog->next; - unsigned totalMemory = 0; + CatalogEntry *listOfEntries = library->catalog->head; + CatalogEntry *curParamFile; + size_t totalMemory = 0; size_t wordCount = 0; char *wordList; char *wordListPtr; + IndexEntry *index = library->index; - while (currentEntry != currentEntry->next) { - totalMemory += strlen(currentEntry->contents) + 1; - currentEntry = currentEntry->next; + // allocate a buffer for the complete set of keywords + DL_FOREACH(listOfEntries, curParamFile) { + totalMemory += strlen(curParamFile->contents) + 1; } - - wordList = malloc((totalMemory + 1) * sizeof(char)); - *words_array = (void*)wordList; + wordList = MyMalloc((totalMemory + 1) * sizeof(char)); wordListPtr = wordList; - currentEntry = catalog->next; - while (currentEntry != currentEntry->next) { + DL_FOREACH(listOfEntries, curParamFile) { char *word; - char *content = strdup(currentEntry->contents); + char *content = strdup(curParamFile->contents); - word = strtok(content, " \t\n\r"); - while (word && wordCount < capacityOfIndex) { + word = strtok(content, SEARCHDELIMITER); + while (word) { strcpy(wordListPtr, word); - char *p = wordListPtr; - for (; *p; ++p) { - *p = tolower(*p); + XtcStrlwr(wordListPtr); + if (!FilterKeyword(wordListPtr)) { + IndexEntry *searchEntry = MyMalloc(sizeof(IndexEntry)); + IndexEntry *existingEntry = NULL; + searchEntry->keyWord = wordListPtr; + StandardizeSpelling(wordListPtr); + + if (index) { + DL_SEARCH(index, existingEntry, searchEntry, KeyWordCmp); + } + if (existingEntry) { + DYNARR_APPEND(CatalogEntry *, *(existingEntry->references), 5); + DYNARR_LAST(CatalogEntry *, *(existingEntry->references)) = curParamFile; + MyFree(searchEntry); + } else { + searchEntry->references = calloc(1, sizeof(dynArr_t)); + DYNARR_APPEND(CatalogEntry *, *(searchEntry->references), 5); + DYNARR_LAST(CatalogEntry *, *(searchEntry->references)) = curParamFile; + DL_APPEND(index, searchEntry); + LOG1(log_params, ("Index Entry: <%s>\n", searchEntry->keyWord)) + } + + wordListPtr += strlen(word) + 1; + wordCount++; } - if (!FilterKeyword(wordListPtr)) { - index[wordCount].value = currentEntry; - index[wordCount].keyWord = wordListPtr; - wordListPtr += strlen(word) + 1; - wordCount++; - if (wordCount >= capacityOfIndex) { - AbortProg("Too many keywords were used!", NULL); - } - } - word = strtok(NULL, " \t\n\r"); + word = strtok(NULL, SEARCHDELIMITER); } free(content); - currentEntry = currentEntry->next; } *wordListPtr = '\0'; - qsort((void*)index, wordCount, sizeof(IndexEntry), CompareIndex); + DL_SORT(index, KeyWordCmp); + library->index = index; + library->words = wordList; - return (wordCount); + IndexEntry *existingEntry; + DL_FOREACH(index, existingEntry) { + LOG1(log_params, ("Index Entry: <%s> Count: %d\n", existingEntry->keyWord, + existingEntry->references->cnt)); + } + return (unsigned)(wordCount); } /** -* A recursive binary search function. It returns location of x in -* given array arr[l..r] is present, otherwise -1 -* Taken from http://www.geeksforgeeks.org/binary-search/ and modified -* -* \param arr IN array to search -* \param l IN starting index -* \param r IN highest index in array -* \param key IN key to search -* \return index if found, -1 otherwise -*/ + * Search the index for a keyword. The index is assumed to be sorted. Each + * keyword has one entry in the index list. + * + * \param [in] index index list. + * \param length number of entries index. + * \param [in] search search string. + * \param [out] entries array of found entry. + * + * \returns TRUE if found, FALSE otherwise. + */ -static int SearchInIndex(IndexEntry arr[], int l, int r, char *key) +unsigned int +FindWord(IndexEntry *index, int length, char *search, IndexEntry **entries) { - if (r >= l) { - int mid = l + (r - l) / 2; - int res = XtcStricmp(key, arr[mid].keyWord); + IndexEntry *result = NULL; - // If the element is present at the middle itself - if (!res) { - return mid; - } - - // If the array size is 1 - if (r == 0) { - return -1; - } + IndexEntry searchWord; + searchWord.keyWord = search; - // If element is smaller than mid, then it can only be present - // in left subarray - if (res < 0) { - return SearchInIndex(arr, l, mid - 1, key); - } + *entries = NULL; - // Else the element can only be present in right subarray - return SearchInIndex(arr, mid + 1, r, key); - } + DL_SEARCH(index, result, &searchWord, KeyWordCmp); + if (!result) { + int maxdistance = 1; + while (maxdistance <= LDISTANCELIMIT && !result ) { + IndexEntry *current; + size_t minDistance = LDISTANCELIMIT + 1; + int maxProbability = 0; + LOG1(log_params, ("Close match for: <%s> maxdistance: %d\n", search, maxdistance)); + + DL_FOREACH(index, current) + { + size_t ldist = levenshtein(search, current->keyWord); + LOG1(log_params, ("Distance of: <%s> is %d\n", current->keyWord, ldist)); + if (ldist == maxdistance) { + if (current->references->cnt > maxProbability) { + if (!result) { + result = MyMalloc(sizeof(IndexEntry)); + } + memcpy(result, current, sizeof(IndexEntry)); + maxProbability = current->references->cnt; + } + } + } - // We reach here when element is not present in array - return -1; + maxdistance++; + } + } + + *entries = result; + return (result != NULL); } /** - * Inserts a key in arr[] of given capacity. n is current - * size of arr[]. This function returns n+1 if insertion - * is successful, else n. - * Taken from http ://www.geeksforgeeks.org/search-insert-and-delete-in-a-sorted-array/ and modified + * Create and initialize the data structure for the track library + * + * \param trackLibrary OUT the newly allocated track library + * \return TRUE on success */ -int InsertSorted(CatalogEntry *arr[], int n, CatalogEntry *key, int capacity) +ParameterLib * +InitLibrary(void) { - // Cannot insert more elements if n is already - // more than or equal to capcity - if (n >= capacity) { - return n; - } + ParameterLib *trackLib = MyMalloc(sizeof(ParameterLib)); - int i; - for (i = n - 1; (i >= 0 && arr[i] > key); i--) { - arr[i + 1] = arr[i]; + if (trackLib) { + trackLib->catalog = InitCatalog(); + trackLib->index = NULL; + trackLib->wordCount = 0; + trackLib->parameterFileCount = 0; } - arr[i + 1] = key; - - return (n + 1); + return (trackLib); } /** - * Comparison function for CatalogEntries used by qsort() + * Destroys the library freeing all associated memory * - * \param entry1 IN - * \param entry2 IN - * \return per C runtime conventions + * \param [in] library If non-null, the library. */ -static int -CompareResults(const void *entry1, const void *entry2) +void +DestroyLibrary(ParameterLib *library) { - CatalogEntry * index1 = *(CatalogEntry **)entry1; - CatalogEntry * index2 = *(CatalogEntry **)entry2; - return (strcoll(index1->contents, index2->contents)); + if (library) { + DestroyCatalog(library->catalog); + MyFree(library); + } } /** - * Search the index for a keyword. The index is assumed to be sorted. So after one entry - * is found, neighboring entries up and down are checked as well. The total result set - * is placed into an array and returned. This array has to be free'd by the caller. - * - * \param index IN index list - * \param length IN number of entries index - * \param search IN search string - * \param resultCount OUT count of found entries - * \return array of found catalog entries, NULL if none found + * Scan directory and add all parameter files found to the catalog + * + * \param trackLib IN the catalog + * \param directory IN directory to scan + * \return number of files found */ -static int findAll = 1; - -unsigned int -FindWord(IndexEntry *index, int length, char *search, CatalogEntry ***entries) +bool +CreateCatalogFromDir(ParameterLib *paramLib, char *directory) { - CatalogEntry **result; //Array of pointers to Catalog Entries - int found; - int foundElements = 0; - *entries = NULL; - - //Get all the entries back for generic search or if "generic find" - if (findAll || !search || (search[0] == '*') || (search[0] == '\0')) { - result = malloc((length) * sizeof(CatalogEntry *)); - for (int i = 0; i < length; i++) { - result[i] = index[i].value; - } - *entries = result; - return length; - } - - found = SearchInIndex(index, 0, length, search); + DIR *d; + Catalog *catalog = paramLib->catalog; - if (found >= 0) { - int lower = found; - int upper = found; - int i; + d = opendir(directory); + if (d) { + char *fileName = NULL; - while (lower > 0 && !XtcStricmp(index[lower-1].keyWord, search)) { - lower--; - } + while (GetNextParameterFile(d, directory, &fileName)) { + CatalogEntry *existingEntry; - while (upper < length - 1 && !XtcStricmp(index[upper + 1].keyWord, search)) { - upper++; - } + char *contents = GetParameterFileContent(fileName); - foundElements = 1 + upper - lower; + char *scale = GetParameterFileScale(fileName); - result = malloc((foundElements) * sizeof(CatalogEntry *)); - for (i = 0; i < foundElements; i++) { - result[i] = index[i+lower].value; + if ((existingEntry = IsExistingContents(catalog, contents, FALSE))) { + UpdateCatalogEntry(existingEntry, fileName, contents, scale); + } else { + CatalogEntry *newEntry; + newEntry = InsertInOrder(catalog, contents, scale); + UpdateCatalogEntry(newEntry, fileName, contents, scale); + } + MyFree(contents); + MyFree(scale); + free(fileName); + fileName = NULL; } - - qsort((void*)result, foundElements, sizeof(void *), CompareResults); - - *entries = result; + closedir(d); } - return (foundElements); + paramLib->parameterFileCount = CountCatalogEntries(paramLib->catalog); + return (paramLib->parameterFileCount); } /** - * Create and initialize the data structure for the track library + * Discard the complete catalog from a library * - * \param trackLibrary OUT the newly allocated track library - * \return TRUE on success + * \param [in] library */ -TrackLibrary * -InitLibrary(void) +void +DiscardCatalog(ParameterLib *library) { - TrackLibrary *trackLib = malloc(sizeof(TrackLibrary)); - - if (trackLib) { - trackLib->catalog = CreateCatalog(); - trackLib->index = NULL; - trackLib->wordCount = 0; - trackLib->trackTypeCount = 0; + CatalogEntry *entry; + CatalogEntry *temp; + + DL_FOREACH_SAFE(library->catalog->head, entry, temp) { + MyFree(entry->contents); + MyFree(entry->tag); + for (unsigned int i = 0; i < entry->files; i++) { + MyFree(entry->fullFileName[i]); + } + DL_DELETE(library->catalog->head, entry); + MyFree(entry); } - return (trackLib); } -/** - * Scan directory and all parameter files found to the catalog - * - * \param trackLib IN the catalog - * \param directory IN directory to scan - * \return number of files found - */ - -bool -GetTrackFiles(TrackLibrary *trackLib, char *directory) -{ - ScanDirectory(trackLib->catalog, directory); - trackLib->trackTypeCount = CountCatalogEntries(trackLib->catalog); - return (trackLib->trackTypeCount); -} /** - * Add a list of parameters files to a catalog. This function is - * called when the user selects files in the file selector. + * Create the search index from the contents description for the whole + * catalog. + * + * \param [in] parameterLib IN the catalog. * - * \param files IN count of files - * \param fileName IN array of filenames - * \param data IN pointer to the catalog - * \return alwqys TRUE + * \returns the number of words indexed. */ -int GetParameterFileInfo( - int files, - char ** fileName, - void * data) +unsigned +CreateLibraryIndex(ParameterLib *parameterLib) { - CatalogEntry *catalog = (CatalogEntry *)data; + parameterLib->index = NULL; - assert(fileName != NULL); - assert(files > 0); - assert(data != NULL); + parameterLib->wordCount = CreateKeywordIndex(parameterLib); - for (int i = 0; i < files; i++) { - CatalogEntry *newEntry; - char *contents = GetParameterFileContent(fileName[i]); - - if (!(newEntry = IsExistingContents(catalog, contents,TRUE))) { - newEntry = InsertIntoCatalogAfter(catalog); - } - UpdateCatalogEntry(newEntry, fileName[i], contents); - free(contents); - } - return (TRUE); + return (parameterLib->wordCount); } /** - * Create the search index from the contents description for the whole catalog. - * A fixed number of words are added to the index. See ESTIMATED_CONTENTS_WORDS + * Discard library index freeing all memory used + * references were created using MakeFullPath. These were allocated using malloc and + * not MyMalloc * - * \param trackLib IN the catalog - * \return the number of words indexed + * \param [in] trackLib the track library. */ -unsigned -CreateLibraryIndex(TrackLibrary *trackLib) -{ - trackLib->index = CreateIndexTable(trackLib->trackTypeCount * - ESTIMATED_CONTENTS_WORDS); - - trackLib->wordCount = CreateContentsIndex(trackLib->catalog, trackLib->index, - &trackLib->words_array, - ESTIMATED_CONTENTS_WORDS * trackLib->trackTypeCount); - - return (trackLib->wordCount); -} - void -DeleteLibraryIndex(TrackLibrary *trackLib) +DiscardLibraryIndex(ParameterLib *trackLib) { - free(trackLib->index); - trackLib->index = NULL; - - free(trackLib->words_array); - - trackLib->wordCount = 0; + IndexEntry *indexEntry; + IndexEntry *tmp; + + DL_FOREACH_SAFE(trackLib->index, indexEntry, tmp) { + DYNARR_FREE(CatalogEntry *, *(indexEntry->references)); + free(indexEntry->references); + DL_DELETE(trackLib->index, indexEntry); + MyFree(indexEntry); + } + MyFree(trackLib->words); + trackLib->index = NULL; + trackLib->wordCount = 0; } @@ -684,14 +661,16 @@ DeleteLibraryIndex(TrackLibrary *trackLib) * \return NULL if error or empty directory, else library handle */ -TrackLibrary * +ParameterLib * CreateLibrary(char *directory) { - TrackLibrary *library; + ParameterLib *library; + + log_params = LogFindIndex("params"); library = InitLibrary(); if (library) { - if (!GetTrackFiles(library, directory)) { + if (!CreateCatalogFromDir(library, directory)) { return (NULL); } @@ -700,112 +679,288 @@ CreateLibrary(char *directory) return (library); } +/** + * Discard library freeing all memory used + * + * \param [in,out] library If non-null, the library. + */ + void -DeleteLibrary(TrackLibrary* library) +DiscardLibrary(ParameterLib* library) { - DeleteLibraryIndex(library); + CatalogEntry *entry = library->catalog->head; + CatalogEntry *element; + CatalogEntry *tmp; + DiscardLibraryIndex(library); - free(library); + DL_FOREACH_SAFE(entry, element, tmp) { + MyFree(element->contents); + MyFree(element->tag); + for (unsigned int i = 0; i < element->files; i++) { + MyFree(element->fullFileName[i]); + } + DL_DELETE(entry, element); + MyFree(element); + } + MyFree(library->words); + MyFree(library); } -// Case insensitive comparison -char* stristr( const char* haystack, const char* needle ) +/** + * Create a statistic for a finished search. The returned string has to be MyFreed() after usage + * + * \param [in] result the finished search + * + * \returns Null if it fails, else the found statistics. + */ + +char * +SearchStatistics(SearchResult *result) { - int c = tolower((unsigned char)*needle); - if (c == '\0') - return (char *)haystack; - for (; *haystack; haystack++) { - if (tolower((unsigned char)*haystack) == c) { - for (size_t i = 0;;) { - if (needle[++i] == '\0') - return (char *)haystack; - if (tolower((unsigned char)haystack[i]) != tolower((unsigned char)needle[i])) - break; - } - } - } - return NULL; + DynString buffer; + DynString subStats[STATE_COUNT]; + + unsigned searched = 0; + unsigned discarded = 0; + unsigned notfound = 0; + unsigned close = 0; + + char *resStat; + DynStringMalloc(&buffer, 16); + + for (int i = SEARCHED; i < STATE_COUNT; i++) { + DynStringMalloc(subStats + i, 16); + } + + DynStringCatCStr(subStats + SEARCHED, _("Found: ")); + DynStringCatCStr(subStats + CLOSE, _("Similar: ")); + DynStringCatCStr(subStats + DISCARDED, _("Ignored: ")); + DynStringCatCStr(subStats + NOTFOUND, _("Not found: ")); + + for (unsigned int i = 0; i < result->words; i++) { + switch (result->kw[i].state) { + case SEARCHED: + DynStringPrintf(&buffer, "%s (%d) ", result->kw[i].keyWord, + result->kw[i].count); + searched++; + break; + case DISCARDED: + DynStringPrintf(&buffer, "%s ", result->kw[i].keyWord); + discarded++; + break; + case NOTFOUND: + DynStringPrintf(&buffer, "%s ", result->kw[i].keyWord); + notfound++; + break; + case CLOSE: + DynStringPrintf(&buffer, "%s ", result->kw[i].keyWord); + close++; + break; + default: + break; + } + DynStringCatStr(subStats + result->kw[i].state, &buffer); + } + + DynStringReset(&buffer); + if (searched) { + DynStringCatStr(&buffer, subStats + SEARCHED); + } + if (close) { + DynStringCatStr(&buffer, subStats + CLOSE); + } + if (notfound) { + DynStringCatStr(&buffer, subStats + NOTFOUND); + } + if (discarded) { + DynStringCatStr(&buffer, subStats + DISCARDED); + } + + resStat = MyStrdup(DynStringToCStr(&buffer)); + DynStringFree(&buffer); + for (int i = SEARCHED; i < STATE_COUNT; i++) { + DynStringFree(subStats + i); + } + return (resStat); } /** - * Search the library for a keyword string and return the result list + * returns number of words in str. * - * First the index is searched for the first word and then each "hit" is matched - * to the entire search string + * \param [in] str the string. * - * Null, Blank and "*" match all entries + * \returns The total number of words. + */ + +unsigned countWords(char *str) +{ + int state = FALSE; + unsigned wc = 0; // word count + + // Scan all characters one by one + while (*str) { + // If next character is a separator, set the + // state as FALSE + if (*str == ' ' || *str == '\n' || *str == '\t' || *str == '\r' || *str == '/') { + state = FALSE; + } + + // If next character is not a word separator and + // state is OUT, then set the state as IN and + // increment word count + else if (state == FALSE) { + state = TRUE; + ++wc; + } + + // Move to next character + ++str; + } + + return wc; +} + +/** + * Search the library for a keyword string and return the result list * - * The list is de-duped of repeat of filenames as the same file might appear in - * more than once + * Each key word exists only once in the index. * * \param library IN the library * \param searchExpression IN keyword to search for * \param resultEntries IN list header for result list * \return number of found entries */ + unsigned -SearchLibrary(TrackLibrary *library, char *searchExpression, - CatalogEntry *resultEntries) +SearchLibrary(ParameterLib *library, char *searchExpression, + SearchResult *results) { - CatalogEntry **entries; - CatalogEntry * newEntry = resultEntries; - unsigned entryCount; - - char * word; - - word = strdup(searchExpression); - - //word = strtok(word," \t"); + CatalogEntry *element; + IndexEntry *entries; + unsigned entryCount = 0; + char *searchWord; + unsigned words = countWords(searchExpression); + char *searchExp = MyStrdup(searchExpression); + unsigned i = 0; if (library->index == NULL || library->wordCount == 0) { return (0); } - entryCount = FindWord(library->index, library->wordCount, word, - &entries); - int count= 0; - if (entryCount) { - unsigned int i = 0; - while (i < entryCount) { - char * match; - //Check if entire String Matches - if (!searchExpression || !word || (word[0] == '*') || (word[0] == '\0') || - (match = stristr(entries[i]->contents,searchExpression))) { - CatalogEntry * existingEntry; - existingEntry = IsExistingContents(resultEntries, entries[i]->contents, TRUE); - //Same FileName already in one of the entries? - BOOL_T found = FALSE; - if (existingEntry) { - for (unsigned int j=0;j<existingEntry->files;j++) { - if (!strcmp(existingEntry->fullFileName[j],entries[i]->fullFileName[entries[i]->files-1])) { - found=TRUE; - break; - } - } - if (found == TRUE ) { - i++; - continue; - } - UpdateCatalogEntry(existingEntry, entries[i]->fullFileName[(entries[i]->files- 1)], - entries[i]->contents); - } else { - newEntry = InsertInOrder(resultEntries,entries[i]->contents); - UpdateCatalogEntry(newEntry, entries[i]->fullFileName[(entries[i]->files- 1)], - entries[i]->contents); - } - count++; - } + + results->kw = MyMalloc(words * sizeof(struct sSingleResult)); + results->subCatalog.head = NULL; + + searchWord = strtok(searchExp, SEARCHDELIMITER); + while (searchWord) { + XtcStrlwr(searchWord); + if (!FilterKeyword(searchWord)) { + StandardizeSpelling(searchWord); + results->kw[i].state = SEARCHED; + } else { + results->kw[i].state = DISCARDED; + } + results->kw[i++].keyWord = MyStrdup(searchWord); + searchWord = strtok(NULL, SEARCHDELIMITER); + } + results->words = words; + + i = 0; + while (i < words) { + if (results->kw[i].state == DISCARDED) { i++; + continue; } + FindWord(library->index, library->wordCount, results->kw[i].keyWord, &entries); + if (entries) { + results->kw[i].count = entries->references->cnt; + if (XtcStricmp(results->kw[i].keyWord, entries->keyWord)) { + results->kw[i].state = CLOSE; + MyFree(results->kw[i].keyWord); + results->kw[i].keyWord = MyStrdup(entries->keyWord); + } + + if (results->subCatalog.head == NULL) { + // if first keyword -> initialize result set + for (int j = 0; j < entries->references->cnt; j++) { + CatalogEntry *newEntry = MyMalloc(sizeof(CatalogEntry)); + CatalogEntry *foundEntry = DYNARR_N(CatalogEntry *, *(entries->references), j); + newEntry->contents = MyStrdup(foundEntry->contents); + newEntry->tag = MyStrdup(foundEntry->tag); + newEntry->files = foundEntry->files; + for (unsigned int i=0;i<newEntry->files;i++) { + newEntry->fullFileName[i] = MyStrdup(foundEntry->fullFileName[i]); + } + + DL_APPEND(results->subCatalog.head, newEntry); + } + } else { + // follow up keyword, create intersection with current result set + CatalogEntry *current; + CatalogEntry *temp; + + DL_FOREACH_SAFE(results->subCatalog.head, current, temp) { + int found = 0; + for (int j = 0; j < entries->references->cnt; j++) { + CatalogEntry *foundEntry = DYNARR_N(CatalogEntry *, *(entries->references), j); + + if (strcmp(foundEntry->contents,current->contents)==0) { + found = TRUE; + break; + } + } + if (!found) { + DL_DELETE(results->subCatalog.head, current); + MyFree(current->contents); + MyFree(current->tag); + for (unsigned int i=0;i<current->files;i++) { + MyFree(current->fullFileName[i]); + } + MyFree(current); + } + } + } + } else { + // Searches that don't yield a result are ignored + results->kw[i].state = NOTFOUND; + results->kw[i].count = 0; + } + i++; } - free(word); - if (entries) - free(entries); //Clean-up after search - return (count); + + DL_COUNT(results->subCatalog.head, element, results->totalFound); + MyFree(searchExp); + return (results->totalFound); } /** - * Get the contents description from a parameter file. Returned string has to be freed after use. + * Discard results. The memory allocated with the search is freed + * + * \param [in] res If non-null, the results. + */ + +void +SearchDiscardResult(SearchResult *res) +{ + if (res) { + CatalogEntry *current = res->subCatalog.head; + CatalogEntry *element; + CatalogEntry *tmp; + + DL_FOREACH_SAFE(current, element, tmp) { + DL_DELETE(current, element); + MyFree(element); + } + + for (unsigned int i = 0; i < res->words; i++) { + MyFree(res->kw[i].keyWord); + } + MyFree(res->kw); + } +} + +/** + * Get the contents description from a parameter file. Returned string has to be MyFree'd after use. * * \param file IN xtpfile * \return pointer to found contents or NULL if not present @@ -814,33 +969,132 @@ SearchLibrary(TrackLibrary *library, char *searchExpression, char * GetParameterFileContent(char *file) { - FILE *fh; - char *result = NULL; - - fh = fopen(file, "rt"); - if (fh) { - bool found = false; - - while (!found) { - char buffer[512]; - if (fgets(buffer, sizeof(buffer), fh)) { - char *ptr = strtok(buffer, " \t"); - if (!XtcStricmp(ptr, CONTENTSCOMMAND)) { - /* if found, store the rest of the line and the filename */ - ptr = ptr+strlen(CONTENTSCOMMAND)+1; - ptr = strtok(ptr, "\r\n"); - result = strdup(ptr); -#ifdef WINDOWS - ConvertUTF8ToSystem(result); -#endif // WINDOWS - found = true; - } - } else { - fprintf(stderr, "Nothing found in %s\n", file); - found = true; - } - } - fclose(fh); - } - return(result); + FILE *fh; + char *result = NULL; + + fh = fopen(file, "rt"); + if (fh) { + bool found = false; + + while (!found) { + char buffer[512]; + if (fgets(buffer, sizeof(buffer), fh)) { + char *ptr = strtok(buffer, " \t"); + if (!XtcStricmp(ptr, CONTENTSCOMMAND)) { + /* if found, store the rest of the line and the filename */ + ptr = ptr+strlen(CONTENTSCOMMAND)+1; + ptr = strtok(ptr, "\r\n"); + result = MyStrdup(ptr); +#ifdef UTFCONVERT + ConvertUTF8ToSystem(result); +#endif // UTFCONVERT + found = true; + } + } else { + fprintf(stderr, "Nothing found in %s\n", file); + found = true; + } + } + fclose(fh); + } + return (result); +} + +/** + * Get the first scale values from a parameter file. Returned strings have to be MyFreed after use + * + * \param file IN xtpfile + * \param array of one of three char results (Track, Structure and Car) + */ + +char * +GetParameterFileScale(char *file) +{ + FILE *fh; + char *scale = NULL; + + + fh = fopen(file, "rt"); + if (fh) { + bool found = FALSE, found_Turnout = FALSE, found_Structure = FALSE, found_Car = FALSE; + + while (!found) { + char buffer[512]; + if (fgets(buffer, sizeof(buffer), fh)) { + char *ptr = strtok(buffer, " \t"); + if (!found_Turnout && !XtcStricmp(ptr, TURNOUTCOMMAND)) { + /* if found, store the rest of the line and the filename */ + ptr = ptr+strlen(TURNOUTCOMMAND)+1; + ptr = strtok(ptr, " \t"); + scale = MyMalloc(strlen(TURNOUTCOMMAND)+2+strlen(ptr)); + strcpy(scale,TURNOUTCOMMAND); + char * cp = scale + strlen(TURNOUTCOMMAND); + cp[0] = ' '; + cp++; + strcpy(cp,ptr); + found_Turnout = true; + } else if (!found_Structure && !XtcStricmp(ptr, STRUCTURECOMMAND)) { + /* if found, store the rest of the line and the filename */ + ptr = ptr+strlen(STRUCTURECOMMAND)+1; + ptr = strtok(ptr, " \t"); + scale = MyMalloc(strlen(STRUCTURECOMMAND)+2+strlen(ptr)); + strcpy(scale,STRUCTURECOMMAND); + char * cp = scale + strlen(STRUCTURECOMMAND)+1; + cp[-1] = ' '; + strcpy(cp,ptr); + found_Structure = true; + } else if (!found_Car && !XtcStricmp(ptr, CARCOMMAND)) { + /* if found, store the rest of the line and the filename */ + ptr = ptr+strlen(CARCOMMAND)+1; + ptr = strtok(ptr, " \t"); + scale = MyMalloc(strlen(CARCOMMAND)+2+strlen(ptr)); + strcpy(scale,CARCOMMAND); + char * cp = scale + strlen(CARCOMMAND)+1; + cp[-1] = ' '; + strcpy(cp,ptr); + found_Car = true; + } else if (!found_Car && !XtcStricmp(ptr, CARPROTOCOMMAND)) { + /* if found, store the rest of the line and the filename */ + scale = MyMalloc(strlen(CARPROTOCOMMAND)+3); + strcpy(scale,CARPROTOCOMMAND); + char * cp = scale + strlen(CARPROTOCOMMAND); + strcpy(cp," *"); + found_Car = true; + } + } else { + if (!found_Turnout && !found_Structure && !found_Car) { + fprintf(stderr, "Nothing found in %s\n", file); + found = true; + } + } + if (found_Turnout || found_Structure || found_Car) found = TRUE; + } + fclose(fh); + } + return scale; + +} + +#ifdef MEMWATCH +/** this is used to test for memory leaks. It should show no leaks from functions in this source file */ +RunMemoryTest(char *directory) +{ + ParameterLib *library; + SearchResult *results; + + mwInit(); + library = InitLibrary(); + if (library) { + CreateCatalogFromDir(library, directory); + CreateLibraryIndex(library); + results = MyMalloc(sizeof(SearchResult)); + SearchLibrary(library, "peco", results); + SearchDiscardResult(results); + MyFree(results); + DiscardLibraryIndex(library); + DiscardCatalog(library); + } + DestroyLibrary(library); + mwTerm(); } +#endif //MEMWATCH diff --git a/app/bin/paths.c b/app/bin/paths.c index 6c6bb10..4a95a8e 100644 --- a/app/bin/paths.c +++ b/app/bin/paths.c @@ -20,22 +20,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <stdarg.h> - -#ifdef WINDOWS -#include <windows.h> -#endif - -#include <wlib.h> #include <dynstring.h> #include "track.h" #include "common.h" -#include "utility.h" #include "misc.h" -#include "i18n.h" #include "uthash.h" #include "paths.h" @@ -86,6 +74,10 @@ AddPath(const char *type, char*path) tableEntry = malloc(sizeof(struct pathTable)); DynStringMalloc(&tableEntry->path, 16); strcpy(tableEntry->type, type); +#ifdef WINDOWS +#pragma warning( disable : 4267) +#endif + // This generates warning C4267 on windows HASH_ADD_STR(paths, type, tableEntry); } diff --git a/app/bin/shortentext.c b/app/bin/shortentext.c index 6cd16e6..b1b2202 100644 --- a/app/bin/shortentext.c +++ b/app/bin/shortentext.c @@ -71,7 +71,9 @@ EllipsizeString(char *source, char *dest, size_t length) return; } - strncpy(resultString, source, length); + if ( dest ) + strncpy(resultString, source, length); + resultString[ length ] = '\0'; position = length - 1; @@ -89,4 +91,5 @@ EllipsizeString(char *source, char *dest, size_t length) strcpy(resultString + (strlen(resultString) - sizeof(ELLIPSIZE) + 1), ELLIPSIZE); } return; -}
\ No newline at end of file +} + diff --git a/app/bin/shrtpath.c b/app/bin/shrtpath.c index b8fbe1e..da60d0f 100644 --- a/app/bin/shrtpath.c +++ b/app/bin/shrtpath.c @@ -20,8 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> - #include "shrtpath.h" #include "track.h" @@ -153,7 +151,7 @@ LOG( log_shortPath, 2, ( " AddPath( T%d:%d.%d D=%0.3f B%d ) -> \n", GetTrkIndex while (1) { if ( ep2>=0 ) { AddTrackToNode( trk, ep1, ep2, dist ); - dist += GetTrkLength( trk, ep1, -1 ) + GetTrkLength( trk, ep2, -1 ); + dist += GetTrkLength( trk, ep1, ep2 ); if ( DoShortPathFunc( func, "MATCH", SPTC_MATCH, trk, ep2, ep1, dist, data ) ) { trk = NULL; ep1 = -1; @@ -237,7 +235,6 @@ int FindShortestPath( pathNode_p pNext; int pinx=0; DIST_T minDist; - int count; int rc = 0; EPINX_T ep2, epCnt, ep3; static dynArr_t ep_da; @@ -245,7 +242,6 @@ int FindShortestPath( DYNARR_RESET( pathNode_t, pathNode_da ); DYNARR_RESET( trackep_t, trackep_da ); - count = 0; if ( !log_shortPathInitted ) { log_shortPath = LogFindIndex( "shortPath" ); @@ -265,8 +261,6 @@ LOG( log_shortPath, 1, ( "FindShortestPath( T%d:%d, %s, ... )\n", GetTrkIndex(tr AddPath( -1, shortPathTrk1, shortPathEP1, -1, 0.0, func, data ); while (1) { - InfoMessage( "%d", ++count ); - /* select next final node */ minDist = 0.0; inxCurr = -1; diff --git a/app/bin/shrtpath.h b/app/bin/shrtpath.h index 165717f..c7cb57f 100644 --- a/app/bin/shrtpath.h +++ b/app/bin/shrtpath.h @@ -23,7 +23,6 @@ #define HAVE_SHRTPATH_H #include "common.h" -#include "track.h" typedef enum { SPTC_MATCH, /* trk:ep is end of path? */ diff --git a/app/bin/smalldlg.c b/app/bin/smalldlg.c index 1fb5965..3d45809 100644 --- a/app/bin/smalldlg.c +++ b/app/bin/smalldlg.c @@ -21,39 +21,21 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdio.h> -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif -#include <ctype.h> -#include <string.h> -#include <stdlib.h> - -#ifndef WINDOWS -#include <unistd.h> -#include <dirent.h> -#endif -#ifdef WINDOWS -#include <io.h> -#include <windows.h> -#include <FreeImage.h> -#else -#include <sys/stat.h> -#endif - #include "common.h" #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" #include "misc.h" #include "paths.h" #include "param.h" #include "smalldlg.h" -#include "wlib.h" + +#ifdef WINDOWS +#include <FreeImage.h> +#endif extern char *sTipF; -wWin_p aboutW; +EXPORT wWin_p aboutW; static wWin_p tipW; /**< window handle for tip dialog */ static long showTipAtStart = 1; /**< flag for visibility */ @@ -69,11 +51,11 @@ static paramData_t tipPLs[] = { #define tipT ((wText_p)tipPLs[I_TIPTEXT].control) { PD_MESSAGE, N_("Did you know..."), NULL, 0, NULL, NULL, BM_LARGE }, { PD_TEXT, NULL, "text", 0, &tipTextData, NULL, BO_READONLY|BT_TOP|BT_CHARUNITS }, - { PD_BUTTON, (void*)ShowTip, "prev", PDO_DLGRESETMARGIN, NULL, N_("Previous Tip"), 0L, (void *)(SHOWTIP_FORCESHOW | SHOWTIP_PREVTIP) }, - { PD_BUTTON, (void*)ShowTip, "next", PDO_DLGHORZ, NULL, N_("Next Tip"), 0L, (void *)(SHOWTIP_FORCESHOW | SHOWTIP_NEXTTIP) }, + { PD_BUTTON, ShowTip, "prev", PDO_DLGRESETMARGIN, NULL, N_("Previous Tip"), 0L, I2VP(SHOWTIP_FORCESHOW | SHOWTIP_PREVTIP) }, + { PD_BUTTON, ShowTip, "next", PDO_DLGHORZ, NULL, N_("Next Tip"), 0L, I2VP(SHOWTIP_FORCESHOW | SHOWTIP_NEXTTIP) }, { PD_TOGGLE, &showTipAtStart, "showatstart", PDO_DLGCMDBUTTON, tipLabels, NULL, BC_NOBORDER }}; -static paramGroup_t tipPG = { "tip", 0, tipPLs, sizeof tipPLs/sizeof tipPLs[0] }; +static paramGroup_t tipPG = { "tip", 0, tipPLs, COUNT( tipPLs ) }; /** * Create and initialize the tip of the day window. The dialog box is created and the list of tips is loaded @@ -87,7 +69,7 @@ static void CreateTipW( void ) char *filename; char * cp; - tipW = ParamCreateDialog( &tipPG, MakeWindowTitle(_("Tip of the Day")), _("Ok"), (paramActionOkProc)wHide, wHide, FALSE, NULL, F_RESIZE|F_CENTER, NULL ); + tipW = ParamCreateDialog( &tipPG, MakeWindowTitle(_("Tip of the Day")), NULL, NULL, wHide, FALSE, NULL, F_RESIZE|F_CENTER|PD_F_ALT_CANCELLABEL, NULL ); /* open the tip file */ MakeFullpath(&filename, libDir, sTipF, NULL); @@ -125,7 +107,7 @@ static void CreateTipW( void ) *cp++ = '\n'; /* read a line */ - if (!fgets( cp, (sizeof buff) - (cp-buff), tipF )) { + if (!fgets( cp, (int)((sizeof buff) - (cp-buff)), tipF )) { return; } @@ -157,8 +139,9 @@ static void CreateTipW( void ) * */ -void ShowTip( long flags ) +void ShowTip( void * flagsVP ) { + long flags = VP2L(flagsVP); long tipNum; if (showTipAtStart || (flags & SHOWTIP_FORCESHOW)) @@ -206,39 +189,49 @@ static paramData_t aboutPLs[] = { #define COPYRIGHT_T ((wText_p)aboutPLs[I_COPYRIGHT].control) { PD_TEXT, NULL, NULL, PDO_DLGRESIZE, &aboutTextData, NULL, BO_READONLY|BT_TOP|BT_CHARUNITS } }; -static paramGroup_t aboutPG = { "about", 0, aboutPLs, sizeof aboutPLs/sizeof aboutPLs[0] }; +static paramGroup_t aboutPG = { "about", 0, aboutPLs, COUNT( aboutPLs ) }; /** * Create and show the About window. */ -void CreateAboutW( void *ptr ) +void CreateAboutW(void *ptr) { char *copyright = sAboutProd; - - if( !aboutW ) { - aboutPLs[I_ABOUTDRAW].winData = wIconCreatePixMap( xtc_xpm ); - ParamRegister( &aboutPG ); - aboutW = ParamCreateDialog( &aboutPG, MakeWindowTitle(_("About")), _("Ok"), (paramActionOkProc)wHide, wHide, FALSE, NULL, F_TOP|F_CENTER, NULL ); - ParamLoadMessage( &aboutPG, I_ABOUTVERSION, sAboutProd ); - wTextAppend( COPYRIGHT_T, DESCRIPTION ); - wTextAppend( COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2017 by Bob Blackwell, Martin Fischer and Adam Richards." ); - wTextAppend( COPYRIGHT_T, "\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)"); - wTextAppend(COPYRIGHT_T, "\nSome icons by Yusuke Kamiyamane. Licensed under a Creative Commons Attribution 3.0 License."); - wTextAppend( COPYRIGHT_T, "\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Daniel Luis Spagnol" ); - wTextAppend( COPYRIGHT_T, "\nParameter Files by: Ralph Boyd, Dwayne Ward" ); + + if (!aboutW) { + aboutPLs[I_ABOUTDRAW].winData = wIconCreatePixMap(xtc_xpm); + ParamRegister(&aboutPG); + aboutW = ParamCreateDialog(&aboutPG, MakeWindowTitle(_("About")), NULL, NULL, wHide, FALSE, NULL, F_TOP | F_CENTER| PD_F_ALT_CANCELLABEL, NULL); + ParamLoadMessage(&aboutPG, I_ABOUTVERSION, sAboutProd); + wTextAppend(COPYRIGHT_T, DESCRIPTION); + wTextAppend(COPYRIGHT_T, "\n\nXTrackCAD is Copyright 2003 by Sillub Technology and 2017 by Bob Blackwell, Martin Fischer and Adam Richards.\n"); + wTextAppend(COPYRIGHT_T, "\nIcons by: Tango Desktop Project (http://tango.freedesktop.org)\n"); + wTextAppend(COPYRIGHT_T, "\nSome icons by Yusuke Kamiyamane. Licensed under a Creative Commons Attribution 3.0 License.\n"); + wTextAppend(COPYRIGHT_T, "\nContributions by: Robert Heller, Mikko Nissinen, Timothy M. Shead, Russell Shilling, Daniel Luis Spagnol"); + wTextAppend(COPYRIGHT_T, "\nParameter Files by: Ralph Boyd, Dwayne Ward\n"); + + wTextAppend(COPYRIGHT_T, "\nThe following software is distributed with XTrackCAD\n\n"); #ifdef WINDOWS - wTextAppend(COPYRIGHT_T, "\n"); wTextAppend(COPYRIGHT_T, FreeImage_GetCopyrightMessage()); + wTextAppend(COPYRIGHT_T, "\n\n"); #endif - wTextAppend( COPYRIGHT_T, "\nCornu Algorithm and Implementation by: Raph Levien"); - wTextAppend( COPYRIGHT_T, "\nuthash Copyright notice:" ); - wTextAppend( COPYRIGHT_T, "\nCopyright (c) 2005-2015, Troy D. Hanson http://troydhanson.github.com/uthash/"); - wTextAppend( COPYRIGHT_T, "\nAll rights reserved."); - } - - wShow( aboutW ); -} + wTextAppend(COPYRIGHT_T, "Cornu Algorithm and Implementation by: Raph Levien"); + wTextAppend(COPYRIGHT_T, "\n\nuthash, utlist Copyright notice:"); + wTextAppend(COPYRIGHT_T, "\nCopyright (c) 2005-2015, Troy D. Hanson http://troydhanson.github.com/uthash/"); + wTextAppend(COPYRIGHT_T, "\nAll rights reserved."); + + wTextAppend(COPYRIGHT_T, "\n\ncJSON: Copyright (c) 2009-2017 Dave Gamble and cJSON contributors"); + wTextAppend(COPYRIGHT_T, "\n\nlibzip: Copyright(C) 1999 - 2019 Dieter Baron and Thomas Klausner\n" \ + "The authors can be contacted at libzip@nih.at"); + + wTextAppend(COPYRIGHT_T, "\n\nMiniXML: Copyright (c) 2003-2019 by Michael R Sweet.\n" \ + "The Mini - XML library is licensed under the Apache License Version 2.0 with an\n" \ + "exception to allow linking against GPL2 / LGPL2 - only software."); + } + + wShow(aboutW); +} /*--------------------------------------------------------------------*/ diff --git a/app/bin/smalldlg.h b/app/bin/smalldlg.h index df54063..d3c21a6 100644 --- a/app/bin/smalldlg.h +++ b/app/bin/smalldlg.h @@ -23,16 +23,14 @@ #ifndef SMALLDLG_H #define SMALLDLG_H -#include "wlib.h" - #define SHOWTIP_NEXTTIP (0L) #define SHOWTIP_PREVTIP (1L) #define SHOWTIP_FORCESHOW (2L) -extern wWin_p aboutW; +extern struct wWin_t * aboutW; void InitSmallDlg( void ); -void ShowTip( long flags ); +void ShowTip( void * flagsVP ); void CreateAboutW( void *ptr ); #endif diff --git a/app/bin/svgformat.c b/app/bin/svgformat.c new file mode 100644 index 0000000..2c57da0 --- /dev/null +++ b/app/bin/svgformat.c @@ -0,0 +1,677 @@ +/** \file svgformat.c +* Formatting of SVG commands and parameters. +*/ + +/* XTrkCad - Model Railroad CAD +* Copyright (C)2021 Martin Fischer +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#define _USE_MATH_DEFINES +#include <math.h> +#include <stdarg.h> +#include <string.h> +#include <stdio.h> + +#ifdef HAVE_MALLOC_H + #include <malloc.h> +#endif + +#include "dynstring.h" +#include "mxml.h" +#include "include/svgformat.h" +#include "include/utlist.h" + +#define SVGDPIFACTOR 90.0 /**< the assumed resolution of the svg, 90 is what Inkscape uses */ +#define ROUND2PIXEL( value ) ((int)floor(value * SVGDPIFACTOR + 0.5)) + +typedef struct sCssStyle { + DynString name; + DynString style; + struct sCssStyle *next; +} sCssStyle; + +static sCssStyle *styleCache = NULL; +static unsigned cacheCount; + +static char *lineStyleCSS[] = { /**< The css class names for line styles */ + NULL, // no style needed for solid line + "linedash", + "linedot", + "linedashdot", + "linedashdot", + "linecenter", + "linephantom" +}; + +#define LINESTYLECLASSES \ + ".linedash{ stroke-dasharray: 25px 15px; } \n" \ + ".linedot{ stroke-dasharray: 5px 10px; } \n" \ + ".linedashdot{ stroke-dasharray: 25px 10px 5px 10px; } \n" \ + ".linedashdotdot{ stroke-dasharray: 25px 10px 5px 10px 5px 10px; } \n" \ + ".linecenter{ stroke-dasharray: 40px 15px 25px 15px; } \n" \ + ".linephantom{ stroke-dasharray: 40px 15px 25px 15px 25px 15px; } \n" + + +/** + * Initialize style cache. Memory is allocated and the default style added + */ + +static void +SvgInitStyleCache(void) +{ + sCssStyle *style; + + style = malloc(sizeof(sCssStyle)); + DynStringMalloc(&(style->name), 2); + DynStringCatCStr(&(style->name), "*"); + + DynStringMalloc(&(style->style), 16); + DynStringCatCStr(&(style->style), "stroke-width:1; stroke:#000000; fill:none;"); + LL_APPEND(styleCache, style); + + cacheCount = 1; +} + +static int +CompareStyle(sCssStyle *a, sCssStyle *b) +{ + return (strcmp(DynStringToCStr(&(a->style)), DynStringToCStr(&(b->style)))); +} + +/** + * Add style to cache. If an identical style definition can be found in the + * cache, the class name is returned. + * If no previous definition is in the cache, a new one is contructed and + * stored in the cache. The new class name is returned + * + * \param [in] styleDef style definition. + * + * \returns Null if default style can be used, else the class name + */ + +static char * +SvgAddStyleToCache(DynString *styleDef) +{ + sCssStyle *style; + sCssStyle *result; + + style = malloc(sizeof(sCssStyle)); + style->style = *styleDef; + + LL_SEARCH(styleCache, result, style, CompareStyle); + if (result) { + if (!strcmp(DynStringToCStr(&(result->name)), "*")) { + return (NULL); + } else { + return (DynStringToCStr(&(result->name)) + 1); + } + } else { + DynString className; + DynStringMalloc(&className, 16); + DynStringPrintf(&className, ".xtc%u", cacheCount++); + style->name = className; + LL_APPEND(styleCache, style); + return (DynStringToCStr(&className) + 1); //skip leading dot in class name + } +} + +/** + * destroy style cache freeing all memory allocated + */ + +static void +SvgDestroyStyleCache(void) +{ + sCssStyle *style; + sCssStyle *tmp; + + LL_FOREACH_SAFE(styleCache, style, tmp) { + DynStringFree(&(style->name)); + DynStringFree(&(style->style)); + free(style); + } + + styleCache = NULL; +} + +/** + * Svg create style, add to the cache and the associated CSS class name to the element + * + * \param element SVG element + * \param colorRGB RGB value + * \param width line width + * \param fill true to fill + */ + +static void +SvgCreateStyle(mxml_node_t *element, unsigned long colorRGB, double width, + bool fill, unsigned lineStyle) +{ + DynString style; + char color[10]; + char *className = NULL; + char *classLineStyle = NULL; + + assert(lineStyle < 7); + + sprintf(color, "#%2.2x%2.2x%2.2x", ((unsigned int)colorRGB >> 16) & 0xFF, + ((unsigned int)colorRGB >> 8) & 0xFF, (unsigned int)colorRGB & 0xFF); + + DynStringMalloc(&style, 32); + + DynStringPrintf(&style, + "stroke-width:%d; stroke:%s; fill:%s;", + (int)(width + 0.5), + color, + (fill ? color: "none")); + + className = SvgAddStyleToCache(&style); + classLineStyle = lineStyleCSS[lineStyle]; + + if (className && classLineStyle) { + mxmlElementSetAttrf(element, "class", "%s %s", className, classLineStyle); + } else { + if (className || classLineStyle) { + mxmlElementSetAttr(element, "class", (className? className:classLineStyle)); + } else { + // strict default, nothing to add + } + } +} + +/** + * add real unit, ie. units that are specified in pixels. Rounding is performed + * + * \param [in,out] node If non-null, the node. + * \param [in,out] name If non-null, the name. + * \param value the dimension in pixels + */ + +static void +SvgAddRealUnit(mxml_node_t *node, char *name, double value) +{ + mxmlElementSetAttrf(node, name, "%d", (int)(value+0.5)); +} + +/** +* Format a dimension and add to XML node as an attribute. +* A fictional value for the resolution is assumed. As final +* rendering is done by the client, this is not really relevant. +* +* \PARAM [in, out] node the XML node +* \PARAM [in] name name of attribute +* \param [in] value size +*/ + +static void +SvgAddCoordinate(mxml_node_t *node, char *name, double value) +{ + mxmlElementSetAttrf(node, name, "%d", ROUND2PIXEL(value)); +} + +/** + * Svg line command + * \param [in] svg the svg parent. + * \param x0 The x coordinate 0. + * \param y0 The y coordinate 0. + * \param x1 The first x value. + * \param y1 The first y value. + * \param w A wDrawWidth to process. + * \param c RGB color definition. + * \param lineStyle line style. + */ + +void +SvgLineCommand(SVGParent *svg, double x0, + double y0, double x1, double y1, double w, long c, unsigned lineStyle) +{ + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(svg, "line"); + + // line end points + SvgAddCoordinate(xmlData, "x1", x0); + SvgAddCoordinate(xmlData, "y1", y0); + SvgAddCoordinate(xmlData, "x2", x1); + SvgAddCoordinate(xmlData, "y2", y1); + + SvgCreateStyle(xmlData, c, w, false, lineStyle); +} + +/** + * Svg rectangle command + * + * \param [in] svg If non-null, the svg. + * \param x0 The x coordinate 0. + * \param y0 The y coordinate 0. + * \param x1 The first x value. + * \param y1 The first y value. + * \param color The color. + * \param fill Specifies the fill options. + */ + +void +SvgRectCommand(SVGParent *svg, double x0, double y0, double x1, double y1, + int color, unsigned lineStyle) +{ + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(svg, "rect"); + + // line end points + SvgAddCoordinate(xmlData, "x1", x0); + SvgAddCoordinate(xmlData, "y1", y0); + SvgAddCoordinate(xmlData, "x2", x1); + SvgAddCoordinate(xmlData, "y2", y1); + + SvgCreateStyle(xmlData, color, 1, false, lineStyle); + +} + +/** + * Svg polygon line command + * + * \param [in] svg If non-null, the svg. + * \param cnt Number of point. + * \param [in] points If non-null, the points. + * \param color The line and fill color. + * \param width The line width. + * \param lineStyle The line style. + * \param fill True to fill. + */ + +void +SvgPolyLineCommand(SVGParent *svg, int cnt, double *points, int color, + double width, bool fill, unsigned lineStyle) +{ + mxml_node_t *xmlData; + DynString pointList; + DynString pos; + + DynStringMalloc(&pointList, 64); + DynStringMalloc(&pos, 20); + + + for (int i = 0; i < cnt; i++) { + DynStringPrintf(&pos, + "%d,%d ", + (int)floor(points[i * 2] * SVGDPIFACTOR + 0.5), + (int)floor(points[ i * 2 + 1] * SVGDPIFACTOR + 0.5)); + + DynStringCatStr(&pointList, &pos); + DynStringClear(&pos); + } + + xmlData = mxmlNewElement(svg, "polyline"); + mxmlElementSetAttr(xmlData, "points", DynStringToCStr(&pointList)); + + SvgCreateStyle(xmlData, color, width, fill, lineStyle); + + DynStringFree(&pos); + DynStringFree(&pointList); +} + +/** + * Format a complete CIRCLE command + * + * \param [in] svg OUT buffer for the completed command. + * \param x x position of center. + * \param y y position of center point. + * \param r radius. + * \param w width + * \param c color + * \param lineStyle The line style. + * \param fill True to fill. + */ + +void +SvgCircleCommand(SVGParent *svg, double x, + double y, double r, double w, long c, bool fill, unsigned lineStyle) +{ + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(svg, "circle"); + + // line end points + SvgAddCoordinate(xmlData, "cx", x); + SvgAddCoordinate(xmlData, "cy", y); + + SvgAddCoordinate(xmlData, "r", r); + + SvgCreateStyle(xmlData, c, w, fill, lineStyle); + +} + +/** + * Polar to cartesian + * + * \param cx x coordinate of center. + * \param cy y coordinate of center + * \param radius radius. + * \param angle angle. + * \param [out] px resulting x coordinate + * \param [out] py resulting y coordinate + */ + +static void +PolarToCartesian(double cx, double cy, double radius, double angle, double *px, + double *py) +{ + double angleInRadians = ((angle) * M_PI) / 180.0; + + *px = cx + (radius * cos(angleInRadians)); + *py = cy + (radius * sin(angleInRadians)); +} + +/** + * Format an arc as a SVG path See + * https://stackoverflow.com/questions/5736398/how-to-calculate-the-svg-path-for-an-arc-of-a-circle + * + * \param [in] svg the svg document. + * \param x y IN center point. + * \param y The y coordinate. + * \param r IN radius. + * \param a0 IN starting angle. + * \param a1 IN ending angle. + * \param center IN draw center mark if true. + * \param w line width. + * \param c line color. + * \param lineStyle line style. + */ + +void +SvgArcCommand(SVGParent *svg, double x, double y, + double r, double a0, double a1, bool center, double w, long c, + unsigned lineStyle) +{ + double startX; + double startY; + double endX; + double endY; + char largeArcFlag = (a1 - a0 <= 180 ? '0' : '1'); + DynString pathArc; + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(svg, "path"); + + PolarToCartesian(x, y, r, a0+a1-90, &startX, &startY); + PolarToCartesian(x, y, r, a0-90, &endX, &endY); + + DynStringMalloc(&pathArc, 64); + DynStringPrintf(&pathArc, + "M %d %d A %d %d 0 %c 0 %d %d", + ROUND2PIXEL(startX), + ROUND2PIXEL(startY), + ROUND2PIXEL(r), + ROUND2PIXEL(r), + largeArcFlag, + ROUND2PIXEL(endX), + ROUND2PIXEL(endY)); + + mxmlElementSetAttr(xmlData, "d", DynStringToCStr(&pathArc)); + + DynStringFree(&pathArc); + + SvgCreateStyle(xmlData, c, w, false, lineStyle); +} + +/** + * Create SVG text command + * + * \param [in] svg If non-null, the svg. + * \param x The x coordinate. + * \param y The y coordinate. + * \param size The fontsize. + * \param c the text color + * \param [in] text text in UTF-8 format + */ + +void +SvgTextCommand(SVGParent *svg, double x, + double y, double size, long c, char *text) +{ + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(svg, "text"); + // starting point + SvgAddCoordinate(xmlData, "x", x); + SvgAddCoordinate(xmlData, "y", y); + + SvgCreateStyle(xmlData, c, 1, 1, 0); + + SvgAddRealUnit(xmlData, "font-size", size); + + mxmlNewText(xmlData, false, text); +} + +/** + * Add title to SVG document + * + * \param [in] svg svg + * \param [in] title If non-null, the title. + */ + +void +SvgAddTitle(SVGParent *svg, char *title) +{ + mxml_node_t *titleNode; + if (title) { + titleNode = mxmlNewElement(MXML_NO_PARENT, "title"); + mxmlNewText(titleNode, false, title); + + mxmlAdd(svg, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT, titleNode); + } +} + +/** + * Add CSS style definitions to the SVG file. CSS definitions are + * created from the options of the drawing commands. As a final step + * in creation of the SVG file, these definitions have to be added. + * For compatibility reasons the styles have to be defined before + * first use. + * + * \param [in] svg the svg. + */ + +void +SvgAddCSSStyle(SVGParent *svg) +{ + mxml_node_t *cssNode; + DynString cssDefs; + DynString tmp; + sCssStyle *style; + + cssNode = mxmlNewElement(MXML_NO_PARENT, "style"); + mxmlElementSetAttr(cssNode, "type", "text/css"); + + DynStringMalloc(&cssDefs, 64); + DynStringMalloc(&tmp, 64); + LL_FOREACH(styleCache, style) { + DynStringPrintf(&tmp, "%s { %s }\n", + DynStringToCStr(&(style->name)), + DynStringToCStr(&(style->style))); + + DynStringCatStr(&cssDefs, &tmp); + } + + DynStringCatCStr(&cssDefs, LINESTYLECLASSES); + mxmlNewCDATA(cssNode, DynStringToCStr(&cssDefs)); + + mxmlAdd(svg, MXML_ADD_BEFORE, MXML_ADD_TO_PARENT, cssNode); + DynStringFree(&tmp); + DynStringFree(&cssDefs); +} + +/** + * Svg create document + * + * \returns An XMLDocument. + */ + +SVGDocument * +SvgCreateDocument() +{ + SvgInitStyleCache(); + + return ((SVGDocument *)mxmlNewXML("1.0")); +} + +/** + * Svg destroy document freeing the memory used by the XML tree + * + * \param [in] xml the XML document + */ + +void +SvgDestroyDocument(SVGDocument *xml) +{ + mxmlDelete((mxml_node_t *)xml); + + SvgDestroyStyleCache(); +} + +/** + * Create the complete prologue for a SVG file. + * + * \param [in] parent the document handle. + * \param [in] id If non-null, the identifier. + * \param layerCount IN count of defined layers. + * \param x0 y0 IN minimum (left bottom) position. + * \param y0 y1 IN maximum (top right) position. + * \param x1 The first x value. + * \param y1 The first y value. + * + * \returns Null if it fails, else a pointer to a SVGParent. + */ + +SVGParent * +SvgPrologue(SVGDocument *parent, char *id, int layerCount, double x0, double y0, + double x1, + double y1) +{ + mxml_node_t *xmlData; + + xmlData = mxmlNewElement(parent, + "!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"" + " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\""); + xmlData = mxmlNewElement(parent, "svg"); + mxmlElementSetAttr(xmlData, "xmlns", "http://www.w3.org/2000/svg"); + + if (id) { + mxmlElementSetAttr(xmlData, "id", id); + } + SvgAddCoordinate(xmlData, "x", x0); + SvgAddCoordinate(xmlData, "y", y0); + SvgAddCoordinate(xmlData, "width", x1); + SvgAddCoordinate(xmlData, "height", y1); + + return ((SVGParent *)xmlData); +} + +/** + * Add formatting to the resulting document by adding whitespace + * + * \param node to be formatted + * \param see minixml docu, position in XML tag + * + * \returns Null if it no character to add, else a pointer to the additional chars. + */ + +const char * +whitespace_cb(mxml_node_t *node, int where) +{ + const char *element; + + /* + * We can conditionally break to a new line before or after + * any element. These are just common HTML elements... + */ + + element = mxmlGetElement(node); + + if (!strcmp(element, "svg") || + !strncmp(element, "!DOCTYPE", strlen("!DOCTYPE"))) { + /* + * Newlines before open and after close... + */ + + if (where == MXML_WS_BEFORE_OPEN || + where == MXML_WS_BEFORE_CLOSE) { + return ("\n"); + } + } else { + if (!strcmp(element, "line") || + !strcmp(element, "circle") || + !strcmp(element, "path") || + !strcmp(element, "polyline")) { + if (where == MXML_WS_BEFORE_OPEN || + where == MXML_WS_AFTER_CLOSE) { + return ("\n\t"); + } + } else { + if (!strcmp(element, "style") || + !strcmp(element, "title") || + !strcmp(element, "text")) { + if (where == MXML_WS_BEFORE_OPEN) { + return ("\n\t"); + } else { + if (where == MXML_WS_AFTER_OPEN) { + return ("\n\t\t"); + } else { + if (where == MXML_WS_AFTER_CLOSE) { + return (""); + } else { + return ("\n\t"); + } + } + } + + } + } + } + + /* + * Otherwise return NULL for no added whitespace... + */ + + return (NULL); +} + +/** + * Svg save file + * + * \param [in] svg the svg document. + * \param [in] filename filename of the file. + * + * \returns True if it succeeds, false if it fails. + */ + +bool +SvgSaveFile(SVGDocument *svg, char *filename) +{ + FILE *svgF; + + svgF = fopen(filename, "w"); + if (svgF) { + mxmlSetWrapMargin(0); + mxmlSaveFile(svg, svgF, whitespace_cb); + fclose(svgF); + + return (true); + } + return (false); +} diff --git a/app/bin/svgoutput.c b/app/bin/svgoutput.c new file mode 100644 index 0000000..a8224be --- /dev/null +++ b/app/bin/svgoutput.c @@ -0,0 +1,490 @@ +/** \file svgoutput.c + * Exporting SVG files +*/ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2020 Martin Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> +#include <string.h> +#include <time.h> +#ifdef WINDOWS + #include <io.h> + #define UTFCONVERT +#else + #include <errno.h> +#endif + +#include <xtrkcad-config.h> +#include <locale.h> +#include <assert.h> +#include <mxml.h> +#include <dynstring.h> + +#include "cselect.h" +#include "custom.h" +#include "draw.h" +#include "include/svgformat.h" +#include "fileio.h" +#include "i18n.h" +#include "layout.h" +#include "messages.h" +#include "paths.h" +#include "track.h" +#include "include/utf8convert.h" +#include "utility.h" +#include "wlib.h" + +static struct wFilSel_t * exportSVGFile_fs; +static coOrd roomSize; + +/** + * get line style for element + * + * \param d drawCmd_p to process. + * + * \returns the line style + */ + +static unsigned +SvgDrawGetLineStyle(drawCmd_p d) +{ + unsigned long notSolid = DC_NOTSOLIDLINE; + unsigned long opt = d->options & notSolid; + unsigned lineOpt; + + switch (opt) { + case DC_DASH: + lineOpt = wDrawLineDash; + break; + case DC_DOT: + lineOpt = wDrawLineDot; + break; + case DC_DASHDOT: + lineOpt = wDrawLineDashDot; + break; + case DC_DASHDOTDOT: + lineOpt = wDrawLineDashDotDot; + break; + case DC_CENTER: + lineOpt = wDrawLineCenter; + break; + case DC_PHANTOM: + lineOpt = wDrawLinePhantom; + break; + default: + lineOpt = wDrawLineSolid; + break; + } + + return (lineOpt); +} + +/** + * Svg draw line + * + * \param d A drawCmd_p to process. + * \param p0 The p 0. + * \param p1 The first coOrd. + * \param width The width. + * \param color The color. + */ + +static void SvgDrawLine( + drawCmd_p d, + coOrd p0, + coOrd p1, + wDrawWidth width, + wDrawColor color) +{ + unsigned lineOpt = SvgDrawGetLineStyle(d); + + width = (wDrawWidth)(width > MININMUMLINEWIDTH ? width : MININMUMLINEWIDTH); + + SvgLineCommand((SVGParent *)(d->d), + p0.x, roomSize.y - p0.y, + p1.x, roomSize.y - p1.y, + (double)width, + wDrawGetRGB(color), + lineOpt); +} + +/** + * Svg draw arc + * + * \param d A drawCmd_p to process. + * \param p A coOrd to process. + * \param r A DIST_T to process. + * \param angle0 The angle 0. + * \param angle1 The first angle. + * \param drawCenter The draw center. + * \param width The width. + * \param color The color. + */ + +static void SvgDrawArc( + drawCmd_p d, + coOrd p, + DIST_T r, + ANGLE_T angle0, + ANGLE_T angle1, + BOOL_T drawCenter, + wDrawWidth width, + wDrawColor color) +{ + unsigned lineOpt = SvgDrawGetLineStyle(d); + + if (angle1 >= 360.0) { + SvgCircleCommand((SVGParent *)(d->d), + p.x, + roomSize.y - p.y, + r, + (width > MININMUMLINEWIDTH ? width : MININMUMLINEWIDTH), + wDrawGetRGB(color), + false, + lineOpt); + } else { + SvgArcCommand((SVGParent *)(d->d), + p.x, + roomSize.y-p.y, + r, + angle0, + angle1, + drawCenter, + (width > MININMUMLINEWIDTH ? width: MININMUMLINEWIDTH), + wDrawGetRGB(color), + lineOpt); + } + +} + +/** + * Svg draw string. Perform conversion to UTF-8 if required. + * + * \param d A drawCmd_p to process. + * \param p position of text + * \param a text angle + * \param [in,out] s the string + * \param fp font definition (ignored) + * \param fontSize Size of the font. + * \param color color. + */ + +static void SvgDrawString( + drawCmd_p d, + coOrd p, + ANGLE_T a, + char * s, + wFont_p fp, + FONTSIZE_T fontSize, + wDrawColor color) +{ + char *text = MyStrdup(s); + +#ifdef UTFCONVERT + text = Convert2UTF8(text); +#endif // UTFCONVERT + + SvgTextCommand((SVGParent *)(d->d), + p.x, + roomSize.y - p.y, + fontSize, + wDrawGetRGB(color), + text); + + MyFree(text); +} + +/** + * Svg draw bitmap + * + * \param d A drawCmd_p to process. + * \param p A coOrd to process. + * \param bm The bm. + * \param color The color. + */ + +static void SvgDrawBitmap( + drawCmd_p d, + coOrd p, + wDrawBitMap_p bm, + wDrawColor color) +{ +} + +/** + * Svg draw fill polygon + * + * \param d A drawCmd_p to process. + * \param cnt Number of points in polyline. + * \param [in,out] pts the coordinates + * \param [in,out] pointer If non-null, the pointer. + * \param color color. + * \param width line width. + * \param fillStyle fill style. + */ + +static void SvgDrawFillPoly( + drawCmd_p d, + int cnt, + coOrd * pts, + int * pointer, + wDrawColor color, wDrawWidth width, drawFill_e fillStyle) +{ + int i; + double *points = malloc((cnt + 1) * 2 * sizeof(double)); + + unsigned lineOpt = SvgDrawGetLineStyle(d); + + if (!points) { + puts("memory for poly line coordinates could not be allocated!"); + abort(); + } + for (i = 0; i < cnt; i++) { + points[i * 2] = pts[i].x; + points[i * 2 + 1] = roomSize.y - pts[i].y; + } + + if (fillStyle == DRAW_CLOSED || fillStyle == DRAW_FILL) { + points[i * 2] = points[0]; + points[i * 2 + 1] = points[1]; + cnt++; + } + + width = (wDrawWidth)(width > MININMUMLINEWIDTH ? width : MININMUMLINEWIDTH); + SvgPolyLineCommand((SVGParent *)(d->d), cnt, points, wDrawGetRGB(color), + (double)width, fillStyle == DRAW_FILL, lineOpt); + + free(points); +} + +/** + * Svg draw filled circle + * + * \param d A drawCmd_p to process. + * \param center The center. + * \param radius The radius. + * \param color The fill color. + */ + +static void SvgDrawFillCircle(drawCmd_p d, coOrd center, DIST_T radius, + wDrawColor color) +{ + SvgCircleCommand((SVGParent *)(d->d), + center.x, + roomSize.y - center.y, + radius, + 0, + wDrawGetRGB(color), + true, + 0); +} + +/** + * Svg draw rectangle + * + * \param d A drawCmd_p to process. + * \param corner1 The first corner. + * \param corner2 The second corner. + * \param color The color. + * \param pattern Specifies the pattern. + */ + +static void +SvgDrawRectangle(drawCmd_p d, coOrd corner1, coOrd corner2, wDrawColor color, + drawFill_e fillOpt) +{ + SvgRectCommand((SVGParent *)(d->d), + corner1.x, roomSize.y - corner1.y, + corner2.x, roomSize.y - corner2.y, + wDrawGetRGB(color), + fillOpt); +} + +static drawFuncs_t svgDrawFuncs = { + SvgDrawLine, + SvgDrawArc, + SvgDrawString, + SvgDrawBitmap, + SvgDrawFillPoly, + SvgDrawFillCircle, + SvgDrawRectangle +}; + +static drawCmd_t svgD = { + NULL, &svgDrawFuncs, 0, 1.0, 0.0, {0.0,0.0}, {0.0,0.0}, Pix2CoOrd, CoOrd2Pix, 100.0 +}; + +/** + * Creates valid identifier from a string. Whitespaces are removed + * and characters are prepended to make sure the i starts with + * valid chars. + * https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/id + * + * \param [in,out] base the base for the id. + * + * \returns Null if it fails, else the new valid identifier. + */ + +static char * +CreateValidId(char *base) +{ + const char *idHead = "id"; + char *out = MyMalloc(strlen(idHead) + strlen(base) + 1); + char *tmp; + int j; + + strcpy(out, idHead); + j = strlen(out); + + for (unsigned int i = 0; i < strlen(base); i++) { + if (isblank(base[i])) { + i++; + } else { + out[j++] = base[i]; + } + } + + out[j] = '\0'; + + // strip off the extension + tmp = strchr(out, '.'); + if (tmp) { + *tmp = '\0'; + } + return (out); +} + +/** + * get a valid identifier for SVG export + * + * \returns Null if it fails, else a pointer to a char. + */ + +static char * SvgGetId(void) +{ + char *fileName = GetLayoutFilename(); + char *id = NULL; + + if (fileName) { + id = CreateValidId(fileName); +#ifdef UTFCONVERT + id = Convert2UTF8(id); +#endif + } + + return (id); +} + +/** + * Set title for SVG file + * The first title line of the design is used and stored in the SVG file + * + * \param d A drawCmd_p to process. + */ + +static void SvgSetTitle(drawCmd_p d) +{ + char *tmp = GetLayoutTitle(); + char *title; + + if (tmp) { + title = MyStrdup(tmp); +#ifdef UTFCONVERT + title = Convert2UTF8(title); +#endif + SvgAddTitle((SVGParent *)(d->d), title); + MyFree(title); + } + +} + +/** + * Executes the export tracks to SVG operation + * + * \param cnt Number of filenames, has to be 1 + * \param [in] fileName filename of the export file. + * \param [in] data If non-null, the data. + * + * \returns TRUE on success, FALSE on failure + */ + +static int DoExportSVGTracks( + int cnt, + char ** fileName, + void * data) +{ + DynString command = NaS; + SVGDocument *svg; + SVGParent *svgData; + char *id; + + assert(fileName != NULL); + assert(cnt == 1); + + SetCLocale(); + GetLayoutRoomSize(&roomSize); + + SetCurrentPath(SVGPATHKEY, fileName[ 0 ]); + + svg = SvgCreateDocument(); + id = SvgGetId(); + svgData = SvgPrologue(svg, id, 0, 0.0, 0.0, roomSize.x, roomSize.y); + MyFree(id); + + wSetCursor(mainD.d, wCursorWait); +// time(&clock); + + svgD.d = (wDraw_p)svgData; + + DrawSelectedTracks(&svgD); + SvgAddCSSStyle((SVGParent *)svgD.d); + SvgSetTitle(&svgD); // make sure this is the last element + + if (!SvgSaveFile(svg, fileName[0])) { + NoticeMessage(MSG_OPEN_FAIL, _("Cancel"), NULL, "SVG", fileName[0], + strerror(errno)); + + SvgDestroyDocument(svg); + wSetCursor(mainD.d, wCursorNormal); + SetUserLocale(); + return FALSE; + } + SvgDestroyDocument(svg); + Reset(); /**<TODO: was tut das? */ + wSetCursor(mainD.d, wCursorNormal); + SetUserLocale(); + return TRUE; +} + +/** + * Create and show the dialog for selecting the DXF export filename + */ + +void DoExportSVG(void) +{ + assert(selectedTrackCount > 0); + + if (exportSVGFile_fs == NULL) + exportSVGFile_fs = wFilSelCreate(mainW, FS_SAVE, 0, _("Export to SVG"), + sSVGFilePattern, DoExportSVGTracks, NULL); + + wFilSelect(exportSVGFile_fs, GetCurrentPath(SVGPATHKEY)); +} + + diff --git a/app/bin/tbezier.c b/app/bin/tbezier.c index fc949a2..53b625e 100644 --- a/app/bin/tbezier.c +++ b/app/bin/tbezier.c @@ -41,23 +41,15 @@ #include "ccurve.h" #include "cstraigh.h" #include "cjoin.h" -#include "utility.h" -#include "i18n.h" #include "param.h" -#include "math.h" -#include "string.h" #include "cundo.h" #include "layout.h" #include "fileio.h" -#include "assert.h" +#include "trackx.h" EXPORT TRKTYP_T T_BEZIER = -1; EXPORT TRKTYP_T T_BZRLIN = -1; -struct extraData { - BezierData_t bezierData; - }; - static int log_bezier = 0; static DIST_T GetLengthBezier( track_p ); @@ -71,15 +63,15 @@ static DIST_T GetLengthBezier( track_p ); /* * Run after any changes to the Bezier points */ -EXPORT void FixUpBezier(coOrd pos[4], struct extraData* xx, BOOL_T track) { - xx->bezierData.a0 = NormalizeAngle(FindAngle(pos[1], pos[0])); - xx->bezierData.a1 = NormalizeAngle(FindAngle(pos[2], pos[3])); - - ConvertToArcs(pos, &xx->bezierData.arcSegs, track, xx->bezierData.segsColor, - xx->bezierData.segsWidth); - xx->bezierData.minCurveRadius = BezierMinRadius(pos, - xx->bezierData.arcSegs); - xx->bezierData.length = BezierLength(pos, xx->bezierData.arcSegs); +EXPORT void FixUpBezier(coOrd pos[4], struct extraDataBezier_t * xx, BOOL_T track) { + xx->a0 = NormalizeAngle(FindAngle(pos[1], pos[0])); + xx->a1 = NormalizeAngle(FindAngle(pos[2], pos[3])); + + ConvertToArcs(pos, &xx->arcSegs, track, xx->segsColor, + xx->segsWidth); + xx->minCurveRadius = BezierMinRadius(pos, + xx->arcSegs); + xx->length = BezierLength(pos, xx->arcSegs); } /* @@ -115,21 +107,22 @@ static void GetBezierAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) } -static void ComputeBezierBoundingBox( track_p trk, struct extraData * xx ) +static void ComputeBezierBoundingBox( track_p trk, struct extraDataBezier_t * xx ) { coOrd hi, lo; - hi.x = lo.x = xx->bezierData.pos[0].x; - hi.y = lo.y = xx->bezierData.pos[0].y; + hi.x = lo.x = xx->pos[0].x; + hi.y = lo.y = xx->pos[0].y; for (int i=1; i<=3;i++) { - hi.x = hi.x < xx->bezierData.pos[i].x ? xx->bezierData.pos[i].x : hi.x; - hi.y = hi.y < xx->bezierData.pos[i].y ? xx->bezierData.pos[i].y : hi.y; - lo.x = lo.x > xx->bezierData.pos[i].x ? xx->bezierData.pos[i].x : lo.x; - lo.y = lo.y > xx->bezierData.pos[i].y ? xx->bezierData.pos[i].y : lo.y; + hi.x = hi.x < xx->pos[i].x ? xx->pos[i].x : hi.x; + hi.y = hi.y < xx->pos[i].y ? xx->pos[i].y : hi.y; + lo.x = lo.x > xx->pos[i].x ? xx->pos[i].x : lo.x; + lo.y = lo.y > xx->pos[i].y ? xx->pos[i].y : lo.y; } SetBoundingBox( trk, hi, lo ); } +static DIST_T DistanceBezier( track_p t, coOrd * p ); DIST_T BezierDescriptionDistance( coOrd pos, @@ -138,20 +131,31 @@ DIST_T BezierDescriptionDistance( BOOL_T show_hidden, BOOL_T * hidden) { - struct extraData *xx = GetTrkExtraData(trk); coOrd p1; if (hidden) *hidden = FALSE; if ( GetTrkType( trk ) != T_BEZIER || ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) && !show_hidden)) - return 100000; - - coOrd offset = xx->bezierData.descriptionOff; + return DIST_INF; + + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); + if (( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) xx->descriptionOff = zero; + + coOrd end0, end0off, end1, end1off; + end0 = xx->pos[0]; + end1 = xx->pos[3]; + ANGLE_T a; + a = FindAngle(end0,end1); + Translate(&end0off,end0,a+90,xx->descriptionOff.y); + Translate(&end1off,end1,a+90,xx->descriptionOff.y); - if (( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) offset = zero; + p1.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + p1.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y; - p1.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x-xx->bezierData.pos[0].x)/2) + offset.x; - p1.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y-xx->bezierData.pos[0].y)/2) + offset.y; if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); *dpos = p1; + + coOrd tpos = pos; + if (DistanceBezier(trk,&tpos)<FindDistance( p1, pos )) + return DistanceBezier(trk,&pos); return FindDistance( p1, pos ); } @@ -161,22 +165,37 @@ static void DrawBezierDescription( drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); wFont_p fp; - coOrd pos; + coOrd epos0,epos1; if (layoutLabels == 0) return; if ((labelEnable&LABELENABLE_TRKDESC)==0) return; - pos.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x - xx->bezierData.pos[0].x)/2); - pos.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y - xx->bezierData.pos[0].y)/2); - pos.x += xx->bezierData.descriptionOff.x; - pos.y += xx->bezierData.descriptionOff.y; + + + epos0 = xx->pos[0]; + epos1 = xx->pos[3]; + ANGLE_T a = FindAngle(epos0,epos1); + Translate(&epos0,epos0,a+90,xx->descriptionOff.y); + Translate(&epos1,epos1,a+90,xx->descriptionOff.y); fp = wStandardFont( F_TIMES, FALSE, FALSE ); - sprintf( message, _("Bezier: len=%0.2f min_rad=%0.2f"), - xx->bezierData.length, xx->bezierData.minCurveRadius>10000?0.0:xx->bezierData.minCurveRadius); - DrawBoxedString( BOX_BOX, d, pos, message, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); + sprintf( message, _("Bez: L%s A%0.3f trk_len=%s min_rad=%s"), + FormatDistance(FindDistance(xx->pos[0],xx->pos[3])), + FindAngle(xx->pos[0],xx->pos[3]), + FormatDistance(xx->length), FormatDistance(xx->minCurveRadius>10000?0.0:xx->minCurveRadius)); + DrawLine(d,xx->pos[0],epos0,0,color); + DrawLine(d,xx->pos[3],epos1,0,color); + DrawDimLine( d, epos0, epos1, message, (wFontSize_t)descriptionFontSize, xx->descriptionOff.x+0.5, 0, color, 0x00 ); + + if (GetTrkBits( trk ) & TB_DETAILDESC) { + coOrd details_pos; + details_pos.x = (epos1.x - epos0.x)*(xx->descriptionOff.x+0.5) + epos0.x; + details_pos.y = (epos1.y - epos0.y)*(xx->descriptionOff.x+0.5) + epos0.y -(2*descriptionFontSize/mainD.dpi); + AddTrkDetails(d, trk, details_pos, xx->length, color); + } + } @@ -185,37 +204,22 @@ STATUS_T BezierDescriptionMove( wAction_t action, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); static coOrd p0,p1; static BOOL_T editState = FALSE; if (GetTrkType(trk) != T_BEZIER) return C_TERMINATE; - p0.x = xx->bezierData.pos[0].x + ((xx->bezierData.pos[3].x - xx->bezierData.pos[0].x)/2); - p0.y = xx->bezierData.pos[0].y + ((xx->bezierData.pos[3].y - xx->bezierData.pos[0].y)/2); - switch (action) { - case C_DOWN: - DrawBezierDescription( trk, &mainD, wDrawColorWhite ); - case C_MOVE: - case C_UP: - editState = TRUE; - p1 = pos; - xx->bezierData.descriptionOff.x = pos.x - p0.x; - xx->bezierData.descriptionOff.y = pos.y - p0.y; - if (action == C_UP) { - editState = FALSE; - wDrawColor color = GetTrkColor( trk, &mainD ); - DrawBezierDescription( trk, &mainD, color ); - } - return action==C_UP?C_TERMINATE:C_CONTINUE; - case C_REDRAW: - if (editState) { - DrawBezierDescription( trk, &tempD, wDrawColorBlue ); - DrawLine( &tempD, p1, p0, 0, wDrawColorBlue ); - } - break; + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); + ANGLE_T ap; + coOrd end0, end1; + end0 = xx->pos[0]; + end1 = xx->pos[3]; + ap = NormalizeAngle(FindAngle(end0,pos)-FindAngle(end0,end1)); + + xx->descriptionOff.y = FindDistance(end0,pos)*sin(D2R(ap)); + xx->descriptionOff.x = -0.5 + FindDistance(end0,pos)*cos(D2R(ap))/FindDistance(end0,end1); + if (xx->descriptionOff.x > 0.5) xx->descriptionOff.x = 0.5; + if (xx->descriptionOff.x < -0.5) xx->descriptionOff.x = -0.5; - - } return C_CONTINUE; } @@ -265,49 +269,60 @@ static descData_t bezDesc[] = { static void UpdateBezier( track_p trk, int inx, descData_p descUpd, BOOL_T final ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); BOOL_T updateEndPts; EPINX_T ep; ANGLE_T angle1, angle2; + BOOL_T is_Track = (GetTrkType(trk)==T_BEZIER); if ( inx == -1 ) return; updateEndPts = FALSE; + UndrawNewTrack( trk ); switch ( inx ) { case P0: - if (GetTrkEndTrk(trk,0)) break; updateEndPts = TRUE; - xx->bezierData.pos[0] = bezData.pos[0]; + xx->pos[0] = bezData.pos[0]; + xx->a0 = bezData.angle[1] = FindAngle(xx->pos[1],xx->pos[0]); + bezDesc[A0].mode |= DESC_CHANGE; bezDesc[P0].mode |= DESC_CHANGE; /* no break */ case P1: - if (GetTrkEndTrk(trk,0) && GetTrkEndTrk(trk,1)) break; updateEndPts = TRUE; - xx->bezierData.pos[3]= bezData.pos[3]; + xx->pos[3]= bezData.pos[3]; + xx->a1 = bezData.angle[1] = FindAngle(xx->pos[2],xx->pos[3]); + bezDesc[A1].mode |= DESC_CHANGE; bezDesc[P1].mode |= DESC_CHANGE; break; - case A0: - case A1: - break; case CP1: - if (GetTrkEndTrk(trk,0)) { - angle1 = NormalizeAngle(GetTrkEndAngle(trk,0)); - angle2 = NormalizeAngle(FindAngle(bezData.pos[1], xx->bezierData.pos[0])-angle1); - if (angle2 > 90.0 && angle2 < 270.0) - Translate( &bezData.pos[1], xx->bezierData.pos[0], angle1, -FindDistance( xx->bezierData.pos[0], bezData.pos[1] )*cos(D2R(angle2))); + if (is_Track) { + if (GetTrkEndTrk(trk,0)) { + angle1 = NormalizeAngle(GetTrkEndAngle(trk,0)); + angle2 = DifferenceBetweenAngles(FindAngle(bezData.pos[1], xx->pos[0]),angle1); + if (fabs(angle2)<90) + Translate( &bezData.pos[1], xx->pos[0], angle1, -FindDistance( xx->pos[0], bezData.pos[1] )*cos(D2R(angle2))); + else bezData.pos[1] = xx->pos[1]; + } } - xx->bezierData.pos[1] = bezData.pos[1]; + xx->pos[1] = bezData.pos[1]; + xx->a0 = bezData.angle[0] = FindAngle(xx->pos[1],xx->pos[0]); + bezDesc[A0].mode |= DESC_CHANGE; bezDesc[CP1].mode |= DESC_CHANGE; updateEndPts = TRUE; break; case CP2: - if (GetTrkEndTrk(trk,1)) { - angle1 = NormalizeAngle(GetTrkEndAngle(trk,1)); - angle2 = NormalizeAngle(FindAngle(bezData.pos[2], xx->bezierData.pos[3])-angle1); - if (angle2 > 90.0 && angle2 < 270.0) - Translate( &bezData.pos[2], xx->bezierData.pos[3], angle1, -FindDistance( xx->bezierData.pos[3], bezData.pos[0] )*cos(D2R(angle2))); + if (is_Track) { + if (GetTrkEndTrk(trk,1)) { + angle1 = NormalizeAngle(GetTrkEndAngle(trk,1)); + angle2 = DifferenceBetweenAngles(FindAngle(bezData.pos[2], xx->pos[3]),angle1); + if (fabs(angle2)<90) + Translate( &bezData.pos[2], xx->pos[3], angle1, -FindDistance( xx->pos[3], bezData.pos[2] )*cos(D2R(angle2))); + else bezData.pos[2] = xx->pos[2]; + } } - xx->bezierData.pos[2] = bezData.pos[2]; + xx->pos[2] = bezData.pos[2]; + xx->a1 = bezData.angle[1] = FindAngle(xx->pos[2],xx->pos[3]); + bezDesc[A1].mode |= DESC_CHANGE; bezDesc[CP2].mode |= DESC_CHANGE; updateEndPts = TRUE; break; @@ -327,30 +342,30 @@ static void UpdateBezier( track_p trk, int inx, descData_p descUpd, BOOL_T final SetTrkLayer( trk, bezData.layerNumber); break; case WI: - xx->bezierData.segsWidth = bezData.width/mainD.dpi; + xx->segsWidth = bezData.width/75.0; break; case CO: - xx->bezierData.segsColor = bezData.color; + xx->segsColor = bezData.color; break; case LT: - xx->bezierData.lineType = bezData.lineType; + xx->lineType = bezData.lineType; break; default: AbortProg( "updateBezier: Bad inx %d", inx ); } - ConvertToArcs(xx->bezierData.pos, &xx->bezierData.arcSegs, IsTrack(trk)?TRUE:FALSE, xx->bezierData.segsColor, xx->bezierData.segsWidth); + ConvertToArcs(xx->pos, &xx->arcSegs, IsTrack(trk)?TRUE:FALSE, xx->segsColor, xx->segsWidth); trackParams_t params; for (int i=0;i<2;i++) { - GetTrackParams(0,trk,xx->bezierData.pos[i],¶ms); + GetTrackParams(0,trk,xx->pos[i],¶ms); bezData.radius[i] = params.arcR; bezData.center[i] = params.arcP; } - if (updateEndPts) { + if (updateEndPts && is_Track) { if ( GetTrkEndTrk(trk,0) == NULL ) { SetTrkEndPoint( trk, 0, bezData.pos[0], NormalizeAngle( FindAngle(bezData.pos[1], bezData.pos[0]) ) ); bezData.angle[0] = GetTrkEndAngle(trk,0); bezDesc[A0].mode |= DESC_CHANGE; - GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[0],¶ms); + GetTrackParams(PARAMS_CORNU,trk,xx->pos[0],¶ms); bezData.radius[0] = params.arcR; bezData.center[0] = params.arcP; } @@ -358,34 +373,33 @@ static void UpdateBezier( track_p trk, int inx, descData_p descUpd, BOOL_T final SetTrkEndPoint( trk, 1, bezData.pos[3], NormalizeAngle( FindAngle(bezData.pos[2], bezData.pos[3]) ) ); bezData.angle[1] = GetTrkEndAngle(trk,1); bezDesc[A1].mode |= DESC_CHANGE; - GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[1],¶ms); + GetTrackParams(PARAMS_CORNU,trk,xx->pos[1],¶ms); bezData.radius[1] = params.arcR; bezData.center[1] = params.arcP; } } - - FixUpBezier(xx->bezierData.pos, xx, IsTrack(trk)); + FixUpBezier(xx->pos, xx, IsTrack(trk)); ComputeBezierBoundingBox(trk, xx); DrawNewTrack( trk ); } static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); DIST_T d; - int fix0, fix1 = 0; + int fix0 = 0, fix1 = 0; - d = xx->bezierData.length; + d = xx->length; sprintf( str, _("Bezier %s(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f,%0.3f] CP1=[%0.3f,%0.3f] CP2=[%0.3f, %0.3f]"), GetTrkType(trk)==T_BEZIER?"Track":"Line", GetTrkIndex(trk), GetTrkLayer(trk)+1, - FormatDistance(xx->bezierData.minCurveRadius), + FormatDistance(xx->minCurveRadius), FormatDistance(d), - PutDim(xx->bezierData.pos[0].x),PutDim(xx->bezierData.pos[0].y), - PutDim(xx->bezierData.pos[3].x),PutDim(xx->bezierData.pos[3].y), - PutDim(xx->bezierData.pos[1].x),PutDim(xx->bezierData.pos[1].y), - PutDim(xx->bezierData.pos[2].x),PutDim(xx->bezierData.pos[2].y)); + PutDim(xx->pos[0].x),PutDim(xx->pos[0].y), + PutDim(xx->pos[3].x),PutDim(xx->pos[3].y), + PutDim(xx->pos[1].x),PutDim(xx->pos[1].y), + PutDim(xx->pos[2].x),PutDim(xx->pos[2].y)); if (GetTrkType(trk) == T_BEZIER) { fix0 = GetTrkEndTrk(trk,0)!=NULL; @@ -393,20 +407,20 @@ static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) } bezData.length = GetLengthBezier(trk); - bezData.minRadius = xx->bezierData.minCurveRadius; - if (bezData.minRadius >= 100000.00) bezData.minRadius = 0; + bezData.minRadius = xx->minCurveRadius; + if (bezData.minRadius >= DIST_INF) bezData.minRadius = 0; bezData.layerNumber = GetTrkLayer(trk); - bezData.pos[0] = xx->bezierData.pos[0]; - bezData.pos[1] = xx->bezierData.pos[1]; - bezData.pos[2] = xx->bezierData.pos[2]; - bezData.pos[3] = xx->bezierData.pos[3]; - bezData.angle[0] = xx->bezierData.a0; - bezData.angle[1] = xx->bezierData.a1; + bezData.pos[0] = xx->pos[0]; + bezData.pos[1] = xx->pos[1]; + bezData.pos[2] = xx->pos[2]; + bezData.pos[3] = xx->pos[3]; + bezData.angle[0] = xx->a0; + bezData.angle[1] = xx->a1; trackParams_t params; - GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[0],¶ms); + GetTrackParams(PARAMS_CORNU,trk,xx->pos[0],¶ms); bezData.radius[0] = params.arcR; bezData.center[0] = params.arcP; - GetTrackParams(PARAMS_CORNU,trk,xx->bezierData.pos[3],¶ms); + GetTrackParams(PARAMS_CORNU,trk,xx->pos[3],¶ms); bezData.radius[1] = params.arcR; bezData.center[1] = params.arcP; @@ -433,7 +447,7 @@ static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) else { bezDesc[Z0].mode = bezDesc[Z1].mode = DESC_IGNORE; bezDesc[LT].mode = 0; - bezData.lineType = xx->bezierData.lineType; + bezData.lineType = xx->lineType; } bezDesc[A0].mode = DESC_RO; bezDesc[A1].mode = DESC_RO; @@ -444,9 +458,9 @@ static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) bezDesc[GR].mode = DESC_RO; bezDesc[RA].mode = DESC_RO; bezDesc[LY].mode = DESC_NOREDRAW; - bezData.width = (long)floor(xx->bezierData.segsWidth*mainD.dpi+0.5); + bezData.width = (long)floor(xx->segsWidth*75.0+0.5); bezDesc[WI].mode = GetTrkType(trk) == T_BEZIER?DESC_IGNORE:0; - bezData.color = xx->bezierData.segsColor; + bezData.color = xx->segsColor; bezDesc[CO].mode = GetTrkType(trk) == T_BEZIER?DESC_IGNORE:0; if (GetTrkType(trk) == T_BEZIER) @@ -455,13 +469,13 @@ static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) DoDescribe( _("Bezier Line"), trk, bezDesc, UpdateBezier ); if (bezDesc[LT].control0!=NULL) { wListClear( (wList_p)bezDesc[LT].control0 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("Solid"), NULL, (void*)0 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("Dash"), NULL, (void*)1 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("Dot"), NULL, (void*)2 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("DashDot"), NULL, (void*)3 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("DashDotDot"), NULL, (void*)4 ); - wListAddValue( (wList_p)bezDesc[LT].control0, _("CenterDot"), NULL, (void*)5); - wListAddValue( (wList_p)bezDesc[LT].control0, _("PhantomDot"), NULL, (void*)6 ); + wListAddValue( (wList_p)bezDesc[LT].control0, _("Solid"), NULL, I2VP(0)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("Dash"), NULL, I2VP(1)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("Dot"), NULL, I2VP(2)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("DashDot"), NULL, I2VP(3)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("DashDotDot"), NULL, I2VP(4)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("CenterDot"), NULL, I2VP(5)); + wListAddValue( (wList_p)bezDesc[LT].control0, _("PhantomDot"), NULL, I2VP(6)); wListSetIndex( (wList_p)bezDesc[LT].control0, bezData.lineType ); } } @@ -470,28 +484,28 @@ static void DescribeBezier( track_p trk, char * str, CSIZE_T len ) EXPORT void SetBezierLineType( track_p trk, int width ) { if (GetTrkType(trk) == T_BZRLIN) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_BZRLIN, extraDataBezier_t); switch(width) { case 0: - xx->bezierData.lineType = DRAWLINESOLID; + xx->lineType = DRAWLINESOLID; break; case 1: - xx->bezierData.lineType = DRAWLINEDASH; + xx->lineType = DRAWLINEDASH; break; case 2: - xx->bezierData.lineType = DRAWLINEDOT; + xx->lineType = DRAWLINEDOT; break; case 3: - xx->bezierData.lineType = DRAWLINEDASHDOT; + xx->lineType = DRAWLINEDASHDOT; break; case 4: - xx->bezierData.lineType = DRAWLINEDASHDOTDOT; + xx->lineType = DRAWLINEDASHDOTDOT; break; case 5: - xx->bezierData.lineType = DRAWLINECENTER; + xx->lineType = DRAWLINECENTER; break; case 6: - xx->bezierData.lineType = DRAWLINEPHANTOM; + xx->lineType = DRAWLINEPHANTOM; break; } } @@ -499,14 +513,14 @@ EXPORT void SetBezierLineType( track_p trk, int width ) { static DIST_T DistanceBezier( track_p t, coOrd * p ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataBezier_t); - DIST_T d = 100000.0; - coOrd p2 = xx->bezierData.pos[0]; //Set initial point + DIST_T d = DIST_INF; + coOrd p2 = xx->pos[0]; //Set initial point segProcData_t segProcData; - for (int i = 0;i<xx->bezierData.arcSegs.cnt;i++) { + for (int i = 0;i<xx->arcSegs.cnt;i++) { segProcData.distance.pos1 = * p; - SegProc(SEGPROC_DISTANCE,&DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i),&segProcData); + SegProc(SEGPROC_DISTANCE,&DYNARR_N(trkSeg_t,xx->arcSegs,i),&segProcData); if (segProcData.distance.dd<d) { d = segProcData.distance.dd; p2 = segProcData.distance.pos1; @@ -518,21 +532,21 @@ static DIST_T DistanceBezier( track_p t, coOrd * p ) static void DrawBezier( track_p t, drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataBezier_t); long widthOptions = DTS_LEFT|DTS_RIGHT; if (GetTrkType(t) == T_BZRLIN) { unsigned long NotSolid = ~(DC_NOTSOLIDLINE); d->options &= NotSolid; - if (xx->bezierData.lineType == DRAWLINESOLID) {} - else if (xx->bezierData.lineType == DRAWLINEDASH) d->options |= DC_DASH; - else if (xx->bezierData.lineType == DRAWLINEDOT) d->options |= DC_DOT; - else if (xx->bezierData.lineType == DRAWLINEDASHDOT) d->options |= DC_DASHDOT; - else if (xx->bezierData.lineType == DRAWLINEDASHDOTDOT) d->options |= DC_DASHDOTDOT; - else if (xx->bezierData.lineType == DRAWLINECENTER) d->options |= DC_CENTER; - else if (xx->bezierData.lineType == DRAWLINEPHANTOM) d->options |= DC_PHANTOM; - DrawSegsO(d,t,zero,0.0,xx->bezierData.arcSegs.ptr,xx->bezierData.arcSegs.cnt, 0.0, color, 0); + if (xx->lineType == DRAWLINESOLID) {} + else if (xx->lineType == DRAWLINEDASH) d->options |= DC_DASH; + else if (xx->lineType == DRAWLINEDOT) d->options |= DC_DOT; + else if (xx->lineType == DRAWLINEDASHDOT) d->options |= DC_DASHDOT; + else if (xx->lineType == DRAWLINEDASHDOTDOT) d->options |= DC_DASHDOTDOT; + else if (xx->lineType == DRAWLINECENTER) d->options |= DC_CENTER; + else if (xx->lineType == DRAWLINEPHANTOM) d->options |= DC_PHANTOM; + DrawSegsO(d,t,zero,0.0,xx->arcSegs.ptr,xx->arcSegs.cnt, 0.0, color, 0); d->options &= NotSolid; return; } @@ -544,17 +558,17 @@ static void DrawBezier( track_p t, drawCmd_p d, wDrawColor color ) DrawBezierDescription( t, d, color ); } DIST_T scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; - DrawSegsO(d,t,zero,0.0,xx->bezierData.arcSegs.ptr,xx->bezierData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions); + DrawSegsO(d,t,zero,0.0,xx->arcSegs.ptr,xx->arcSegs.cnt, GetTrkGauge(t), color, widthOptions); DrawEndPt( d, t, 0, color ); DrawEndPt( d, t, 1, color ); } static void DeleteBezier( track_p t ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataBezier_t); - for (int i=0;i<xx->bezierData.arcSegs.cnt;i++) { - trkSeg_t s = DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i); + for (int i=0;i<xx->arcSegs.cnt;i++) { + trkSeg_t s = DYNARR_N(trkSeg_t,xx->arcSegs,i); if (s.type == SEG_BEZTRK || s.type == SEG_BEZLIN) { if (s.bezSegs.ptr) MyFree(s.bezSegs.ptr); s.bezSegs.max = 0; @@ -562,41 +576,41 @@ static void DeleteBezier( track_p t ) s.bezSegs.ptr = NULL; } } - if (xx->bezierData.arcSegs.ptr && !xx->bezierData.arcSegs.max) - MyFree(xx->bezierData.arcSegs.ptr); - xx->bezierData.arcSegs.max = 0; - xx->bezierData.arcSegs.cnt = 0; - xx->bezierData.arcSegs.ptr = NULL; + if (xx->arcSegs.ptr && !xx->arcSegs.max) + MyFree(xx->arcSegs.ptr); + xx->arcSegs.max = 0; + xx->arcSegs.cnt = 0; + xx->arcSegs.ptr = NULL; } static BOOL_T WriteBezier( track_p t, FILE * f ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataBezier_t); long options; BOOL_T rc = TRUE; BOOL_T track =(GetTrkType(t)==T_BEZIER); options = GetTrkWidth(t) & 0x0F; if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) options |= 0x80; rc &= fprintf(f, "%s %d %u %ld %ld %0.6f %s %d %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %d %0.6f %0.6f \n", - track?"BEZIER":"BZRLIN",GetTrkIndex(t), GetTrkLayer(t), (long)options, wDrawGetRGB(xx->bezierData.segsColor), xx->bezierData.segsWidth, + track?"BEZIER":"BZRLIN",GetTrkIndex(t), GetTrkLayer(t), (long)options, wDrawGetRGB(xx->segsColor), xx->segsWidth, GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), - xx->bezierData.pos[0].x, xx->bezierData.pos[0].y, - xx->bezierData.pos[1].x, xx->bezierData.pos[1].y, - xx->bezierData.pos[2].x, xx->bezierData.pos[2].y, - xx->bezierData.pos[3].x, xx->bezierData.pos[3].y, - xx->bezierData.lineType, - xx->bezierData.descriptionOff.x, xx->bezierData.descriptionOff.y )>0; + xx->pos[0].x, xx->pos[0].y, + xx->pos[1].x, xx->pos[1].y, + xx->pos[2].x, xx->pos[2].y, + xx->pos[3].x, xx->pos[3].y, + xx->lineType, + xx->descriptionOff.x, xx->descriptionOff.y )>0; if (track) { rc &= WriteEndPt( f, t, 0 ); rc &= WriteEndPt( f, t, 1 ); } - rc &= WriteSegs( f, xx->bezierData.arcSegs.cnt, xx->bezierData.arcSegs.ptr ); + rc &= WriteSegs( f, xx->arcSegs.cnt, xx->arcSegs.ptr ); return rc; } static BOOL_T ReadBezier( char * line ) { - struct extraData *xx; + struct extraDataBezier_t *xx; track_p t; wIndex_t index; BOOL_T visible; @@ -617,23 +631,23 @@ static BOOL_T ReadBezier( char * line ) if ( !ReadSegs() ) return FALSE; t = NewTrack( index, trkTyp, 0, sizeof *xx ); - xx = GetTrkExtraData(t); + xx = GET_EXTRA_DATA(t, trkTyp, extraDataBezier_t); SetTrkVisible(t, visible&2); SetTrkNoTies(t,visible&4); SetTrkBridge(t,visible&8); SetTrkScale(t, LookupScale(scale)); SetTrkLayer(t, layer ); SetTrkWidth(t, (int)(options&0x0F)); - if ( ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); - xx->bezierData.pos[0] = p0; - xx->bezierData.pos[1] = c1; - xx->bezierData.pos[2] = c2; - xx->bezierData.pos[3] = p1; - xx->bezierData.lineType = lt; - xx->bezierData.descriptionOff = dp; - xx->bezierData.segsWidth = width; - xx->bezierData.segsColor = wDrawFindColor( rgb ); - FixUpBezier(xx->bezierData.pos,xx,GetTrkType(t) == T_BEZIER); + if ( paramVersion < VERSION_DESCRIPTION2 || ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); + xx->pos[0] = p0; + xx->pos[1] = c1; + xx->pos[2] = c2; + xx->pos[3] = p1; + xx->lineType = lt; + xx->descriptionOff = dp; + xx->segsWidth = width; + xx->segsColor = wDrawFindColor( rgb ); + FixUpBezier(xx->pos,xx,GetTrkType(t) == T_BEZIER); ComputeBezierBoundingBox(t,xx); if (GetTrkType(t) == T_BEZIER) { SetEndPts(t,2); @@ -643,59 +657,59 @@ static BOOL_T ReadBezier( char * line ) static void MoveBezier( track_p trk, coOrd orig ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); for (int i=0;i<4;i++) { - xx->bezierData.pos[i].x += orig.x; - xx->bezierData.pos[i].y += orig.y; + xx->pos[i].x += orig.x; + xx->pos[i].y += orig.y; } - FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + FixUpBezier(xx->pos,xx,IsTrack(trk)); ComputeBezierBoundingBox(trk,xx); } static void RotateBezier( track_p trk, coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); - for (int i=0;i<5;i++) { - Rotate( &xx->bezierData.pos[i], orig, angle ); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + for (int i=0;i<COUNT(xx->pos);i++) { + Rotate( &xx->pos[i], orig, angle ); } - FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + FixUpBezier(xx->pos,xx,IsTrack(trk)); ComputeBezierBoundingBox(trk,xx); } static void RescaleBezier( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); - xx->bezierData.pos[0].x *= ratio; - xx->bezierData.pos[0].y *= ratio; - xx->bezierData.pos[1].x *= ratio; - xx->bezierData.pos[1].y *= ratio; - xx->bezierData.pos[2].x *= ratio; - xx->bezierData.pos[2].y *= ratio; - xx->bezierData.pos[3].x *= ratio; - xx->bezierData.pos[3].y *= ratio; - FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + xx->pos[0].x *= ratio; + xx->pos[0].y *= ratio; + xx->pos[1].x *= ratio; + xx->pos[1].y *= ratio; + xx->pos[2].x *= ratio; + xx->pos[2].y *= ratio; + xx->pos[3].x *= ratio; + xx->pos[3].y *= ratio; + FixUpBezier(xx->pos,xx,IsTrack(trk)); ComputeBezierBoundingBox(trk,xx); } EXPORT void AdjustBezierEndPt( track_p trk, EPINX_T inx, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); UndoModify(trk); if (inx ==0 ) { - xx->bezierData.pos[1].x += -xx->bezierData.pos[0].x+pos.x; - xx->bezierData.pos[1].y += -xx->bezierData.pos[0].y+pos.y; - xx->bezierData.pos[0] = pos; + xx->pos[1].x += -xx->pos[0].x+pos.x; + xx->pos[1].y += -xx->pos[0].y+pos.y; + xx->pos[0] = pos; } else { - xx->bezierData.pos[2].x += -xx->bezierData.pos[3].x+pos.x; - xx->bezierData.pos[2].y += -xx->bezierData.pos[3].y+pos.y; - xx->bezierData.pos[3] = pos; + xx->pos[2].x += -xx->pos[3].x+pos.x; + xx->pos[2].y += -xx->pos[3].y+pos.y; + xx->pos[3] = pos; } - FixUpBezier(xx->bezierData.pos, xx, IsTrack(trk)); + FixUpBezier(xx->pos, xx, IsTrack(trk)); ComputeBezierBoundingBox(trk,xx); - SetTrkEndPoint( trk, inx, pos, inx==0?xx->bezierData.a0:xx->bezierData.a1); + SetTrkEndPoint( trk, inx, pos, inx==0?xx->a0:xx->a1); } @@ -704,7 +718,7 @@ EXPORT void AdjustBezierEndPt( track_p trk, EPINX_T inx, coOrd pos ) { */ static BOOL_T SplitBezier( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); track_p trk1; double t; BOOL_T track; @@ -715,10 +729,10 @@ static BOOL_T SplitBezier( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover double dd = DistanceBezier(trk, &pos); if (dd>minLength) return FALSE; - BezierMathDistance(&pos, xx->bezierData.pos, 500, &t); //Find t value + BezierMathDistance(&pos, xx->pos, 500, &t); //Find t value for (int i=0;i<4;i++) { - current[i] = xx->bezierData.pos[i]; + current[i] = xx->pos[i]; } BezierSplit(current, newl, newr, t); @@ -727,18 +741,18 @@ static BOOL_T SplitBezier( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover trk1 = NewBezierTrack(ep?newr:newl,NULL,0); //Move elev data from ep } else - trk1 = NewBezierLine(ep?newr:newl,NULL,0, xx->bezierData.segsColor,xx->bezierData.segsWidth); + trk1 = NewBezierLine(ep?newr:newl,NULL,0, xx->segsColor,xx->segsWidth); DIST_T height; int opt; GetTrkEndElev(trk,ep,&opt,&height); UpdateTrkEndElev( trk1, ep, opt, height, (opt==ELEV_STATION)?GetTrkEndElevStation(trk,ep):NULL ); UndoModify(trk); for (int i=0;i<4;i++) { - xx->bezierData.pos[i] = ep?newl[i]:newr[i]; + xx->pos[i] = ep?newl[i]:newr[i]; } - FixUpBezier(xx->bezierData.pos,xx,track); + FixUpBezier(xx->pos,xx,track); ComputeBezierBoundingBox(trk,xx); - SetTrkEndPoint( trk, ep, xx->bezierData.pos[ep?3:0], ep?xx->bezierData.a1:xx->bezierData.a0); + SetTrkEndPoint( trk, ep, xx->pos[ep?3:0], ep?xx->a1:xx->a0); UpdateTrkEndElev( trk, ep, ELEV_NONE, 0, NULL); *leftover = trk1; *ep0 = 1-ep; @@ -769,20 +783,20 @@ static int log_bezierSegments = 0; static BOOL_T TraverseBezier( traverseTrack_p trvTrk, DIST_T * distR ) { track_p trk = trvTrk->trk; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); DIST_T dist = *distR; segProcData_t segProcData; BOOL_T segs_backwards= FALSE; - DIST_T d = 10000; + DIST_T d = DIST_INF; coOrd pos2 = trvTrk->pos; ANGLE_T a1,a2; int inx,segInx = 0; EPINX_T ep; BOOL_T back,neg; - trkSeg_p segPtr = (trkSeg_p)xx->bezierData.arcSegs.ptr; + trkSeg_p segPtr = (trkSeg_p)xx->arcSegs.ptr; a2 = GetAngleSegs( //Find correct Segment and nearest point in it - xx->bezierData.arcSegs.cnt,segPtr, + xx->arcSegs.cnt,segPtr, &pos2, &segInx, &d , &back, NULL, &neg ); //d = how far pos2 from old pos2 = trvTrk->pos if ( d > 10 ) { @@ -807,8 +821,8 @@ static BOOL_T TraverseBezier( traverseTrack_p trvTrk, DIST_T * distR ) segProcData.traverse1.angle = trvTrk->angle; //direction car is going for Traverse 1 has to be reversed... LOG( log_traverseBezier, 1, ( " TraverseBezier [%0.3f %0.3f] D%0.3f A%0.3f SB%d \n", trvTrk->pos.x, trvTrk->pos.y, dist, trvTrk->angle, segs_backwards ) ) inx = segInx; - while (inx >=0 && inx<xx->bezierData.arcSegs.cnt) { - segPtr = (trkSeg_p)xx->bezierData.arcSegs.ptr+inx; //move in to the identified segment + while (inx >=0 && inx<xx->arcSegs.cnt) { + segPtr = (trkSeg_p)xx->arcSegs.ptr+inx; //move in to the identified segment SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); //Backwards or forwards for THIS segment - note that this can differ from segs_backward!! BOOL_T backwards = segProcData.traverse1.backwards; //Are we going to EP0? BOOL_T reverse_seg = segProcData.traverse1.reverse_seg; //is it a backwards segment (we don't actually care as Traverse1 takes care of it) @@ -855,76 +869,57 @@ static BOOL_T MergeBezier( track_p trk1, EPINX_T ep1 ) { - struct extraData *xx0 = GetTrkExtraData(trk0); - struct extraData *xx1 = GetTrkExtraData(trk1); - track_p trk2 = NULL; - EPINX_T ep2=-1; - BOOL_T tracks = FALSE; - - if (IsTrack(trk0) && IsTrack(trk1) ) tracks = TRUE; - if (GetTrkType(trk0) != GetTrkType(trk1)) return FALSE; - - if (ep0 == ep1) - return FALSE; - - UndoStart( _("Merge Bezier"), "MergeBezier( T%d[%d] T%d[%d] )", GetTrkIndex(trk0), ep0, GetTrkIndex(trk1), ep1 ); - UndoModify( trk0 ); - UndrawNewTrack( trk0 ); - if (tracks) { - trk2 = GetTrkEndTrk( trk1, 1-ep1 ); - if (trk2) { - ep2 = GetEndPtConnectedToMe( trk2, trk1 ); - DisconnectTracks( trk1, 1-ep1, trk2, ep2 ); - } - } - if (ep0 == 0) { - xx0->bezierData.pos[3] = xx1->bezierData.pos[3]; - xx0->bezierData.pos[2] = xx1->bezierData.pos[2]; - } else { - xx0->bezierData.pos[0] = xx1->bezierData.pos[0]; - xx0->bezierData.pos[1] = xx1->bezierData.pos[1]; - } - FixUpBezier(xx0->bezierData.pos,xx0,tracks); - ComputeBezierBoundingBox(trk0,xx0); - DeleteTrack( trk1, FALSE ); - if (tracks && trk2) { - if (ep0 == 1) - SetTrkEndPoint( trk2, 1, xx0->bezierData.pos[0], xx0->bezierData.a0); - else - SetTrkEndPoint( trk2, 2, xx0->bezierData.pos[3], xx0->bezierData.a1); - ConnectTracks( trk0, ep0, trk2, ep2 ); - } - DrawNewTrack( trk0 ); - - return TRUE; + return FALSE; } static BOOL_T EnumerateBezier( track_p trk ) { - if (trk != NULL) { + if ((trk != NULL) && (GetTrkType(trk) == T_BEZIER)) { DIST_T d; - struct extraData *xx = GetTrkExtraData(trk); - d = max(BezierOffsetLength(xx->bezierData.arcSegs,-GetTrkGauge(trk)/2.0), - BezierOffsetLength(xx->bezierData.arcSegs,GetTrkGauge(trk)/2.0)); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); + d = max(BezierOffsetLength(xx->arcSegs,-GetTrkGauge(trk)/2.0), + BezierOffsetLength(xx->arcSegs,GetTrkGauge(trk)/2.0)); ScaleLengthIncrement( GetTrkScale(trk), d ); + return TRUE; } - return TRUE; + return FALSE; } static DIST_T GetLengthBezier( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); DIST_T length = 0.0; segProcData_t segProcData; - for(int i=0;i<xx->bezierData.arcSegs.cnt;i++) { - SegProc(SEGPROC_LENGTH,&(DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,i)), &segProcData); + for(int i=0;i<xx->arcSegs.cnt;i++) { + SegProc(SEGPROC_LENGTH,&(DYNARR_N(trkSeg_t,xx->arcSegs,i)), &segProcData); length += segProcData.length.length; } return length; } +EXPORT BOOL_T GetBezierMiddle( track_p trk, coOrd * pos) { + + if (GetTrkType(trk) != T_BEZIER) + return FALSE; + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); + DIST_T length = GetLengthBezier(trk)/2; + + traverseTrack_t tp; + tp.pos = GetTrkEndPos(trk,0); + tp.angle = NormalizeAngle(GetTrkEndAngle(trk,0)+180.0); + tp.trk = trk; + tp.length = length; + + TraverseBezier(&tp,&length); + + *pos = tp.pos; + + return TRUE; + +} + static BOOL_T GetParamsBezier( int inx, track_p trk, coOrd pos, trackParams_t * params ) { @@ -933,14 +928,14 @@ static BOOL_T GetParamsBezier( int inx, track_p trk, coOrd pos, trackParams_t * DIST_T d; params->type = curveTypeBezier; - struct extraData *xx = GetTrkExtraData(trk); - for (int i=0;i<4;i++) params->bezierPoints[i] = xx->bezierData.pos[i]; - params->len = xx->bezierData.length; + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + for (int i=0;i<4;i++) params->bezierPoints[i] = xx->pos[i]; + params->len = xx->length; params->track_angle = GetAngleSegs( //Find correct Segment and nearest point in it - xx->bezierData.arcSegs.cnt,xx->bezierData.arcSegs.ptr, + xx->arcSegs.cnt,xx->arcSegs.ptr, &pos, &segInx, &d , &back, NULL, &negative ); if ( negative != back ) params->track_angle = NormalizeAngle(params->track_angle+180); //Bezier is in reverse - trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,segInx); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->arcSegs,segInx); if (segPtr->type == SEG_STRLIN) { params->arcR = 0.0; } else { @@ -951,14 +946,16 @@ static BOOL_T GetParamsBezier( int inx, track_p trk, coOrd pos, trackParams_t * } if ( inx == PARAMS_NODES ) { if (GetTrkType(trk) == T_BEZIER) return FALSE; - if (FindDistance(pos,params->bezierPoints[0]) > FindDistance(pos,params->bezierPoints[3])) + //Pos is the place that is the end of the curve (params->ep set to 1 if the curve starts here) + if (FindDistance(pos,params->bezierPoints[0]) <= FindDistance(pos,params->bezierPoints[3])) params->ep = 1; else params->ep = 0; - coOrd curr_pos = params->bezierPoints[params->ep*3]; + coOrd curr_pos = params->bezierPoints[0]; BOOL_T first = TRUE; DYNARR_RESET(coOrd,params->nodes); - for (int i = 0; i<xx->bezierData.arcSegs.cnt;i++) { - trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->bezierData.arcSegs,params->ep?xx->bezierData.arcSegs.cnt-1-i:i); + // Load out the points in order from bezierPoint[0] to bezierPoint[3] + for (int i = 0; i<xx->arcSegs.cnt;i++) { + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->arcSegs,i); if (segPtr->type == SEG_STRLIN) { BOOL_T eps = FindDistance(segPtr->u.l.pos[0],curr_pos)>FindDistance(segPtr->u.l.pos[1],curr_pos); if (first) { @@ -972,34 +969,39 @@ static BOOL_T GetParamsBezier( int inx, track_p trk, coOrd pos, trackParams_t * coOrd start,end; Translate(&start,segPtr->u.c.center,segPtr->u.c.a0,fabs(segPtr->u.c.radius)); Translate(&end,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1,fabs(segPtr->u.c.radius)); + //Is this segment reversed in the curve? BOOL_T back = FindDistance(start,curr_pos)>FindDistance(end,curr_pos); if (segPtr->u.c.radius > 0.5) { double min_angle = 360*acos(1.0-(0.1/fabs(segPtr->u.c.radius)))/M_PI; //Error max is 0.1" double number = ceil(segPtr->u.c.a1/min_angle); double arc_size = segPtr->u.c.a1/number; - for (int j=1-first;j<=number;j++) { - DYNARR_APPEND(coOrd,params->nodes,1); - if (back == params->ep) - Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1-(j*arc_size),fabs(segPtr->u.c.radius) ); - else - Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+(j*arc_size),fabs(segPtr->u.c.radius) ); + if (back) { + //If back, list sub-points in reverse. If first show first position, else skip + for (int j=(((int)number)-(1-first));j>=0;j--) { + DYNARR_APPEND(coOrd,params->nodes,((int)number)); + Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+j*arc_size,fabs(segPtr->u.c.radius) ); + } + } else { + for (int j=(1-first);j<=number;j++) { + DYNARR_APPEND(coOrd,params->nodes,((int)number)); + Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+j*arc_size,fabs(segPtr->u.c.radius) ); + } } first = FALSE; } else { if (first) { first = FALSE; DYNARR_APPEND(coOrd,params->nodes,1); - DYNARR_LAST(coOrd,params->nodes) = start; + DYNARR_LAST(coOrd,params->nodes) = back?end:start; } DYNARR_APPEND(coOrd,params->nodes,1); - DYNARR_LAST(coOrd,params->nodes) = end; - + DYNARR_LAST(coOrd,params->nodes) = back?start:end; } } curr_pos = DYNARR_LAST(coOrd,params->nodes); } - params->lineOrig = params->bezierPoints[params->ep*3]; - params->lineEnd = params->bezierPoints[(1-params->ep)*3]; + params->lineOrig = params->bezierPoints[params->ep?0:3]; + params->lineEnd = params->bezierPoints[params->ep?3:0]; return TRUE; } else if ((inx == PARAMS_CORNU) || (inx == PARAMS_1ST_JOIN) || (inx == PARAMS_2ND_JOIN)){ params->ep = PickEndPoint( pos, trk); @@ -1023,17 +1025,19 @@ static BOOL_T TrimBezier( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, AN static BOOL_T QueryBezier( track_p trk, int query ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); switch ( query ) { case Q_CAN_GROUP: return FALSE; break; case Q_FLIP_ENDPTS: + return GetTrkType(trk) == T_BEZIER?TRUE:FALSE; + break; case Q_HAS_DESC: return TRUE; break; case Q_EXCEPTION: - return GetTrkType(trk) == T_BEZIER?fabs(xx->bezierData.minCurveRadius) < (GetLayoutMinTrackRadius()-EPSILON):FALSE; + return GetTrkType(trk) == T_BEZIER?fabs(xx->minCurveRadius) < (GetLayoutMinTrackRadius()-EPSILON):FALSE; break; case Q_CAN_MODIFY_CONTROL_POINTS: return TRUE; @@ -1048,6 +1052,8 @@ static BOOL_T QueryBezier( track_p trk, int query ) return TRUE; break; case Q_MODIFY_CAN_SPLIT: + return TRUE; + break; case Q_CORNU_CAN_MODIFY: return (GetTrkType(trk) == T_BEZIER); case Q_GET_NODES: @@ -1063,12 +1069,22 @@ static void FlipBezier( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); - FlipPoint( &xx->bezierData.pos[0], orig, angle ); - FlipPoint( &xx->bezierData.pos[1], orig, angle ); - FlipPoint( &xx->bezierData.pos[2], orig, angle ); - FlipPoint( &xx->bezierData.pos[3], orig, angle ); - FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + FlipPoint( &xx->pos[0], orig, angle ); + FlipPoint( &xx->pos[1], orig, angle ); + FlipPoint( &xx->pos[2], orig, angle ); + FlipPoint( &xx->pos[3], orig, angle ); + + // Reverse control point order + coOrd pos = xx->pos[0]; + xx->pos[0] = xx->pos[3]; + xx->pos[3] = pos; + + pos = xx->pos[1]; + xx->pos[1] = xx->pos[2]; + xx->pos[2] = pos; + + FixUpBezier(xx->pos,xx,IsTrack(trk)); ComputeBezierBoundingBox(trk,xx); } @@ -1079,11 +1095,11 @@ static ANGLE_T GetAngleBezier( EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); ANGLE_T angle; BOOL_T back, neg; int indx; - angle = GetAngleSegs( xx->bezierData.arcSegs.cnt, (trkSeg_p)xx->bezierData.arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); + angle = GetAngleSegs( xx->arcSegs.cnt, (trkSeg_p)xx->arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); if (!back) angle = NormalizeAngle(angle+180); //Make CCW if ( ep0 ) *ep0 = neg?1:0; if ( ep1 ) *ep1 = neg?0:1; @@ -1091,11 +1107,11 @@ static ANGLE_T GetAngleBezier( } BOOL_T GetBezierSegmentFromTrack(track_p trk, trkSeg_p seg_p) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); seg_p->type = IsTrack(trk)?SEG_BEZTRK:SEG_BEZLIN; - for (int i=0;i<4;i++) seg_p->u.b.pos[i] = xx->bezierData.pos[i]; - seg_p->color = xx->bezierData.segsColor; + for (int i=0;i<4;i++) seg_p->u.b.pos[i] = xx->pos[i]; + seg_p->color = xx->segsColor; seg_p->bezSegs.cnt = 0; if (seg_p->bezSegs.ptr) MyFree(seg_p->bezSegs.ptr); seg_p->bezSegs.max = 0; @@ -1124,7 +1140,8 @@ BOOL_T GetTracksFromBezierSegment(trkSeg_p bezSeg, track_p newTracks[2], track_p if (GetTrkEndTrk(trk_old,i)==NULL) { coOrd pos = GetTrkEndPos(trk_old,i); EPINX_T ep_n = PickUnconnectedEndPoint(pos,new_trk); - if (connectDistance >= FindDistance(GetTrkEndPos(trk_old,i),GetTrkEndPos(new_trk,ep_n))) { + if ((connectDistance >= FindDistance(GetTrkEndPos(trk_old,i),GetTrkEndPos(new_trk,ep_n))) && + (connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(trk_old,i),GetTrkEndAngle(new_trk,ep_n)+180))) ) { ConnectTracks(trk_old,i,new_trk,ep_n); break; } @@ -1138,13 +1155,13 @@ BOOL_T GetTracksFromBezierSegment(trkSeg_p bezSeg, track_p newTracks[2], track_p BOOL_T GetTracksFromBezierTrack(track_p trk, track_p newTracks[2]) { trkSeg_t seg_temp; - struct extraData * xx = GetTrkExtraData(trk); newTracks[0] = NULL, newTracks[1] = NULL; if (!IsTrack(trk)) return FALSE; + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_BEZIER, extraDataBezier_t); seg_temp.type = SEG_BEZTRK; - for (int i=0;i<4;i++) seg_temp.u.b.pos[i] = xx->bezierData.pos[i]; - seg_temp.color = xx->bezierData.segsColor; + for (int i=0;i<4;i++) seg_temp.u.b.pos[i] = xx->pos[i]; + seg_temp.color = xx->segsColor; seg_temp.bezSegs.cnt = 0; seg_temp.bezSegs.max = 0; //if (seg_temp->bezSegs.ptr) MyFree(seg_temp->bezSegs.ptr); @@ -1159,7 +1176,6 @@ BOOL_T GetTracksFromBezierTrack(track_p trk, track_p newTracks[2]) { } - static BOOL_T MakeParallelBezier( track_p trk, coOrd pos, @@ -1170,35 +1186,37 @@ static BOOL_T MakeParallelBezier( coOrd * p1R, BOOL_T track) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataBezier_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); coOrd np[4], p; - ANGLE_T a,a2; + ANGLE_T a0, a1,a2; //Produce bezier that is translated parallel to the existing Bezier // - not a precise result if the bezier end angles are not in the same general direction. // The expectation is that the user will have to adjust it - unless and until we produce // a new algo to adjust the control points to be parallel to the endpoints. - a = FindAngle(xx->bezierData.pos[0],xx->bezierData.pos[3]); + a0 = xx->a0; + a1 = xx->a1; p = pos; DistanceBezier(trk, &p); - a2 = NormalizeAngle(FindAngle(pos,p)-a); + a2 = NormalizeAngle(FindAngle(pos,p)-a0); + a2 = NormalizeAngle(FindAngle(pos,p)-a0); //find parallel move x and y for points for (int i =0; i<4;i++) { - np[i] = xx->bezierData.pos[i]; + np[i] = xx->pos[i]; } - sep = sep+factor/xx->bezierData.minCurveRadius; + sep = sep+factor/xx->minCurveRadius; // Adjust sep based on radius and factor if ( a2 > 180 ) { - Translate(&np[0],np[0],a+90,sep); - Translate(&np[1],np[1],a+90,sep); - Translate(&np[2],np[2],a+90,sep); - Translate(&np[3],np[3],a+90,sep); + Translate(&np[0],np[0],a0+90,sep); + Translate(&np[1],np[1],a0+90,sep); + Translate(&np[2],np[2],a1-90,sep); + Translate(&np[3],np[3],a1-90,sep); } else { - Translate(&np[0],np[0],a-90,sep); - Translate(&np[1],np[1],a-90,sep); - Translate(&np[2],np[2],a-90,sep); - Translate(&np[3],np[3],a-90,sep); + Translate(&np[0],np[0],a0-90,sep); + Translate(&np[1],np[1],a0-90,sep); + Translate(&np[2],np[2],a1+90,sep); + Translate(&np[3],np[3],a1+90,sep); } if ( newTrkR ) { @@ -1217,7 +1235,7 @@ static BOOL_T MakeParallelBezier( tempSegs(0).bezSegs.max = 0; tempSegs(0).bezSegs.cnt = 0; for (int i=0;i<4;i++) tempSegs(0).u.b.pos[i] = np[i]; - FixUpBezierSeg(tempSegs(0).u.b.pos,&tempSegs(0),TRUE); + FixUpBezierSeg(tempSegs(0).u.b.pos,&tempSegs(0),track); } if ( p0R ) *p0R = np[0]; if ( p1R ) *p1R = np[1]; @@ -1229,28 +1247,31 @@ static BOOL_T MakeParallelBezier( * ensure * - that the Segs are restored and * - other fields reset. + * Not called for deleted tracks */ BOOL_T RebuildBezier (track_p trk) { - struct extraData *xx; - xx = GetTrkExtraData(trk); - xx->bezierData.arcSegs.cnt = 0; - FixUpBezier(xx->bezierData.pos,xx,IsTrack(trk)); + ASSERT( trk != NULL && !IsTrackDeleted(trk) ); + struct extraDataBezier_t *xx; + xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); + xx->arcSegs.cnt = 0; + FixUpBezier(xx->pos,xx,IsTrack(trk)); ComputeBezierBoundingBox(trk, xx); return TRUE; } + BOOL_T MoveBezierEndPt ( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) { track_p trk2; - struct extraData *xx; + struct extraDataBezier_t *xx; if (SplitTrack(*trk,pos,*ep,&trk2,TRUE)) { if (trk2) { UndrawNewTrack( trk2 ); DeleteTrack(trk2,TRUE); } UndrawNewTrack( *trk ); - xx = GetTrkExtraData(*trk); - SetTrkEndPoint( *trk, *ep, *ep?xx->bezierData.pos[3]:xx->bezierData.pos[0], *ep?xx->bezierData.a1:xx->bezierData.a0 ); + xx = GET_EXTRA_DATA(*trk, T_NOTRACK, extraDataBezier_t); + SetTrkEndPoint( *trk, *ep, *ep?xx->pos[3]:xx->pos[0], *ep?xx->a1:xx->a0 ); DrawNewTrack( *trk ); return TRUE; } @@ -1259,22 +1280,22 @@ BOOL_T MoveBezierEndPt ( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) { static wBool_t CompareBezier( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataBezier_t *xx1 = GET_EXTRA_DATA( trk1, T_NOTRACK, extraDataBezier_t ); + struct extraDataBezier_t *xx2 = GET_EXTRA_DATA( trk2, T_NOTRACK, extraDataBezier_t ); char * cp = message + strlen(message); - REGRESS_CHECK_POS( "Pos[0]", xx1, xx2, bezierData.pos[0] ) - REGRESS_CHECK_POS( "Pos[1]", xx1, xx2, bezierData.pos[1] ) - REGRESS_CHECK_POS( "Pos[2]", xx1, xx2, bezierData.pos[2] ) - REGRESS_CHECK_POS( "Pos[3]", xx1, xx2, bezierData.pos[3] ) - REGRESS_CHECK_DIST( "MinCurveRadius", xx1, xx2, bezierData.minCurveRadius ) - REGRESS_CHECK_ANGLE( "A0", xx1, xx2, bezierData.a0 ) - REGRESS_CHECK_ANGLE( "A1", xx1, xx2, bezierData.a1 ) + REGRESS_CHECK_POS( "Pos[0]", xx1, xx2, pos[0] ) + REGRESS_CHECK_POS( "Pos[1]", xx1, xx2, pos[1] ) + REGRESS_CHECK_POS( "Pos[2]", xx1, xx2, pos[2] ) + REGRESS_CHECK_POS( "Pos[3]", xx1, xx2, pos[3] ) + REGRESS_CHECK_DIST( "MinCurveRadius", xx1, xx2, minCurveRadius ) + REGRESS_CHECK_ANGLE( "A0", xx1, xx2, a0 ) + REGRESS_CHECK_ANGLE( "A1", xx1, xx2, a1 ) // Check arcSegs - REGRESS_CHECK_DIST( "Length", xx1, xx2, bezierData.length ) - REGRESS_CHECK_POS( "DescOff", xx1, xx2, bezierData.descriptionOff ) - REGRESS_CHECK_WIDTH( "SegsWidth", xx1, xx2, bezierData.segsWidth ) - REGRESS_CHECK_COLOR( "SegsColor", xx1, xx2, bezierData.segsColor ) - REGRESS_CHECK_INT( "LineType", xx1, xx2, bezierData.lineType ) + REGRESS_CHECK_DIST( "Length", xx1, xx2, length ) + REGRESS_CHECK_POS( "DescOff", xx1, xx2, descriptionOff ) + REGRESS_CHECK_WIDTH( "SegsWidth", xx1, xx2, segsWidth ) + REGRESS_CHECK_COLOR( "SegsColor", xx1, xx2, segsColor ) + REGRESS_CHECK_INT( "LineType", xx1, xx2, lineType ) return TRUE; } @@ -1307,7 +1328,7 @@ static trackCmd_t bezlinCmds = { NULL, NULL, NULL, - NULL, + MakeParallelBezier, NULL, RebuildBezier, NULL, @@ -1472,7 +1493,7 @@ LOG( log_bezierSegments, 1, ( " BezTr-Exit2 --> SI%d A%0.3f P[%0.3f %0.3f] D% case SEGPROC_DISTANCE: - dd = 100000.00; //Just find one distance + dd = DIST_INF; //Just find one distance p0 = data->distance.pos1; //initialize p2 @@ -1586,43 +1607,48 @@ LOG( log_bezierSegments, 1, ( " BezGA-Out SI%d A%0.3f P[%0.3f %0.3f] B%d\n", */ +EXPORT void SetBezierData( track_p p, coOrd pos[4], wDrawColor color, DIST_T width ) +{ + BOOL_T bTrack = (GetTrkType(p) == T_BEZIER); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(p, T_NOTRACK, extraDataBezier_t); + xx->pos[0] = pos[0]; + xx->pos[1] = pos[1]; + xx->pos[2] = pos[2]; + xx->pos[3] = pos[3]; + xx->a0 = FindAngle(pos[1],pos[0]); + xx->a1 = FindAngle(pos[2],pos[3]); + xx->segsColor = color; + xx->segsWidth = width; + FixUpBezier(pos, xx, bTrack); + ComputeBezierBoundingBox( p, xx ); + if ( bTrack ) { + // Should call SetTrkEndPoint but we may be already connected + p->endPt[0].pos = pos[0]; + p->endPt[0].angle = xx->a0; + p->endPt[1].pos = pos[3]; + p->endPt[1].angle = xx->a1; + CheckTrackLength( p ); + SetTrkBits( p, TB_HIDEDESC ); + } +} + + track_p NewBezierTrack(coOrd pos[4], trkSeg_t * tempsegs, int count) { - struct extraData *xx; track_p p; - p = NewTrack( 0, T_BEZIER, 2, sizeof *xx ); - xx = GetTrkExtraData(p); - xx->bezierData.pos[0] = pos[0]; - xx->bezierData.pos[1] = pos[1]; - xx->bezierData.pos[2] = pos[2]; - xx->bezierData.pos[3] = pos[3]; - xx->bezierData.segsColor = wDrawColorBlack; - xx->bezierData.segsWidth = 0; - FixUpBezier(pos, xx, TRUE); + p = NewTrack( 0, T_BEZIER, 2, sizeof *(extraDataBezier_t*)NULL ); + SetBezierData( p, pos, wDrawColorBlack, 0 ); LOG( log_bezier, 1, ( "NewBezierTrack( EP1 %0.3f, %0.3f, CP1 %0.3f, %0.3f, CP2 %0.3f, %0.3f, EP2 %0.3f, %0.3f ) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, pos[2].x, pos[2].y, pos[3].x, pos[3].y, GetTrkIndex(p) ) ) - ComputeBezierBoundingBox( p, xx ); - SetTrkEndPoint( p, 0, pos[0], xx->bezierData.a0); - SetTrkEndPoint( p, 1, pos[3], xx->bezierData.a1); - CheckTrackLength( p ); - SetTrkBits( p, TB_HIDEDESC ); return p; } + EXPORT track_p NewBezierLine( coOrd pos[4], trkSeg_t * tempsegs, int count, wDrawColor color, DIST_T width ) { - struct extraData *xx; track_p p; - p = NewTrack( 0, T_BZRLIN, 2, sizeof *xx ); - xx = GetTrkExtraData(p); - xx->bezierData.pos[0] = pos[0]; - xx->bezierData.pos[1] = pos[1]; - xx->bezierData.pos[2] = pos[2]; - xx->bezierData.pos[3] = pos[3]; - xx->bezierData.segsColor = color; - xx->bezierData.segsWidth = width; - FixUpBezier(pos, xx, FALSE); + p = NewTrack( 0, T_BZRLIN, 0, sizeof *(extraDataBezier_t*)NULL ); //No endpoints + SetBezierData( p, pos, color, width ); LOG( log_bezier, 1, ( "NewBezierLine( EP1 %0.3f, %0.3f, CP1 %0.3f, %0.3f, CP2 %0.3f, %0.3f, EP2 %0.3f, %0.3f) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, pos[2].x, pos[2].y, pos[3].x, pos[3].y, GetTrkIndex(p) ) ) - ComputeBezierBoundingBox( p, xx ); return p; } @@ -1672,7 +1698,7 @@ extern coOrd BezierPointByParameter(coOrd p[4], double t) */ extern DIST_T BezierMathDistance( coOrd * pos, coOrd p[4], int segments, double * t_value) { - DIST_T dd = 10000.0; + DIST_T dd = DIST_INF; double t = 0.0; coOrd pt; coOrd save_pt = p[0]; diff --git a/app/bin/tbezier.h b/app/bin/tbezier.h index 823992e..5699eca 100644 --- a/app/bin/tbezier.h +++ b/app/bin/tbezier.h @@ -21,9 +21,10 @@ */ #include "common.h" -#include "track.h" +#include "track.h" //- drawLineType -typedef struct { +typedef struct extraDataBezier_t { + extraDataBase_t base; coOrd pos[4]; DIST_T minCurveRadius; ANGLE_T a0, a1; @@ -33,7 +34,7 @@ typedef struct { DIST_T segsWidth; wDrawColor segsColor; drawLineType_e lineType; - } BezierData_t; + } extraDataBezier_t; void BezierSplit(coOrd[4], coOrd[4], coOrd[4] , double ); @@ -45,16 +46,18 @@ double BezierCurvature(coOrd[4], double , coOrd *); double BezierMaxCurve(coOrd[4]); double BezierMathMinRadius(coOrd[4]); coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4] , int ); -track_p NewBezierTrack(coOrd[4], trkSeg_t * , int ); -track_p NewBezierLine(coOrd[4], trkSeg_t * , int, wDrawColor, DIST_T); +void SetBezierData( track_p p, coOrd pos[4], wDrawColor color, DIST_T width ); +track_p NewBezierTrack(coOrd[4], trkSeg_p , int ); +track_p NewBezierLine(coOrd[4], trkSeg_p , int, wDrawColor, DIST_T); DIST_T BezierMathDistance( coOrd *, coOrd[4], int , double * ); -void FixUpBezier(coOrd[4], struct extraData*, BOOL_T); +void FixUpBezier(coOrd[4], struct extraDataBezier_t*, BOOL_T); void FixUpBezierSeg(coOrd[4], trkSeg_p , BOOL_T); void FixUpBezierSegs(trkSeg_p p,int segCnt); BOOL_T GetBezierSegmentFromTrack(track_p, trkSeg_p); BOOL_T GetTracksFromBezierTrack(track_p trk, track_p newTracks[2]); BOOL_T GetTracksFromBezierSegment(trkSeg_p bezSeg, track_p newTracks[2], track_p old); void SetBezierLineType( track_p trk, int width ); +BOOL_T GetBezierMiddle( track_p, coOrd * ); DIST_T BezierDescriptionDistance(coOrd pos,track_p trk, coOrd *, BOOL_T, BOOL_T * ); STATUS_T BezierDescriptionMove(track_p trk,wAction_t action,coOrd pos ); diff --git a/app/bin/tcornu.c b/app/bin/tcornu.c index dd09cfa..5119a5e 100644 --- a/app/bin/tcornu.c +++ b/app/bin/tcornu.c @@ -45,23 +45,14 @@ #include "ccurve.h" #include "cstraigh.h" #include "cjoin.h" -#include "utility.h" #include "common.h" -#include "i18n.h" #include "param.h" -#include "math.h" -#include "string.h" #include "cundo.h" #include "layout.h" #include "fileio.h" -#include "assert.h" EXPORT TRKTYP_T T_CORNU = -1; -struct extraData { - cornuData_t cornuData; - }; - static int log_cornu = 0; static DIST_T GetLengthCornu( track_p ); @@ -75,76 +66,76 @@ static DIST_T GetLengthCornu( track_p ); /* * Run after any changes to the Cornu points */ -void SetUpCornuParmFromTracks(track_p trk[2],cornuParm_t * cp, struct extraData* xx) { +void SetUpCornuParmFromTracks(track_p trk[2],cornuParm_t * cp, struct extraDataCornu_t* xx) { if (!trk[0]) { - cp->center[0] = xx->cornuData.c[0]; - cp->angle[0] = xx->cornuData.a[0]; - cp->radius[0] = xx->cornuData.r[0]; + cp->center[0] = xx->c[0]; + cp->angle[0] = xx->a[0]; + cp->radius[0] = xx->r[0]; } if (!trk[1]) { - cp->center[1] = xx->cornuData.c[1]; - cp->angle[1] = xx->cornuData.a[1]; - cp->radius[1] = xx->cornuData.r[1]; + cp->center[1] = xx->c[1]; + cp->angle[1] = xx->a[1]; + cp->radius[1] = xx->r[1]; } } -EXPORT BOOL_T FixUpCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], struct extraData* xx) { +EXPORT BOOL_T FixUpCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], struct extraDataCornu_t* xx) { cornuParm_t cp; SetUpCornuParmFromTracks(trk,&cp,xx); - if (!CallCornu(pos, trk, ep, &xx->cornuData.arcSegs, &cp)) return FALSE; + if (!CallCornu(pos, trk, ep, &xx->arcSegs, &cp)) return FALSE; - xx->cornuData.r[0] = cp.radius[0]; + xx->r[0] = cp.radius[0]; if (cp.radius[0]==0) { - xx->cornuData.a[0] = cp.angle[0]; + xx->a[0] = cp.angle[0]; } else { - xx->cornuData.c[0] = cp.center[0]; + xx->c[0] = cp.center[0]; } - xx->cornuData.r[1] = cp.radius[1]; + xx->r[1] = cp.radius[1]; if (cp.radius[1]==0) { - xx->cornuData.a[1] = cp.angle[1]; + xx->a[1] = cp.angle[1]; } else { - xx->cornuData.c[1] = cp.center[1]; + xx->c[1] = cp.center[1]; } - xx->cornuData.minCurveRadius = CornuMinRadius(pos,xx->cornuData.arcSegs); - xx->cornuData.windingAngle = CornuTotalWindingArc(pos,xx->cornuData.arcSegs); + xx->minCurveRadius = CornuMinRadius(pos,xx->arcSegs); + xx->windingAngle = CornuTotalWindingArc(pos,xx->arcSegs); DIST_T last_c; - if (xx->cornuData.r[0] == 0) last_c = 0; - else last_c = 1/xx->cornuData.r[0]; - xx->cornuData.maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->cornuData.arcSegs,&last_c); - xx->cornuData.length = CornuLength(pos, xx->cornuData.arcSegs); + if (xx->r[0] == 0) last_c = 0; + else last_c = 1/xx->r[0]; + xx->maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->arcSegs,&last_c); + xx->length = CornuLength(pos, xx->arcSegs); return TRUE; } -EXPORT BOOL_T FixUpCornu0(coOrd pos[2],coOrd center[2],ANGLE_T angle[2],DIST_T radius[2],struct extraData* xx) { +EXPORT BOOL_T FixUpCornu0(coOrd pos[2],coOrd center[2],ANGLE_T angle[2],DIST_T radius[2],struct extraDataCornu_t* xx) { DIST_T last_c; - if (!CallCornu0(pos, center, angle, radius,&xx->cornuData.arcSegs,FALSE)) return FALSE; - xx->cornuData.minCurveRadius = CornuMinRadius(pos, - xx->cornuData.arcSegs); - if (xx->cornuData.r[0] == 0) last_c = 0; - else last_c = 1/xx->cornuData.r[0]; - xx->cornuData.maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->cornuData.arcSegs,&last_c); - xx->cornuData.length = CornuLength(pos, xx->cornuData.arcSegs); - xx->cornuData.windingAngle = CornuTotalWindingArc(pos,xx->cornuData.arcSegs); + if (!CallCornu0(pos, center, angle, radius,&xx->arcSegs,FALSE)) return FALSE; + xx->minCurveRadius = CornuMinRadius(pos, + xx->arcSegs); + if (xx->r[0] == 0) last_c = 0; + else last_c = 1/xx->r[0]; + xx->maxRateofChange = CornuMaxRateofChangeofCurvature(pos,xx->arcSegs,&last_c); + xx->length = CornuLength(pos, xx->arcSegs); + xx->windingAngle = CornuTotalWindingArc(pos,xx->arcSegs); return TRUE; } EXPORT char * CreateSegPathList(track_p trk) { char * cp = "\0\0"; if (GetTrkType(trk) != T_CORNU) return cp; - struct extraData *xx = GetTrkExtraData(trk); - if (xx->cornuData.cornuPath) MyFree(xx->cornuData.cornuPath); - xx->cornuData.cornuPath = MyMalloc(xx->cornuData.arcSegs.cnt+2); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + if (xx->cornuPath) MyFree(xx->cornuPath); + xx->cornuPath = MyMalloc(xx->arcSegs.cnt+2); int j= 0; - for (int i = 0;i<xx->cornuData.arcSegs.cnt;i++,j++) { - xx->cornuData.cornuPath[j] = i+1; + for (int i = 0;i<xx->arcSegs.cnt;i++,j++) { + xx->cornuPath[j] = i+1; } - xx->cornuData.cornuPath[j] = cp[0]; - xx->cornuData.cornuPath[j+1] = cp[0]; - return xx->cornuData.cornuPath; + xx->cornuPath[j] = cp[0]; + xx->cornuPath[j+1] = cp[0]; + return xx->cornuPath; } @@ -159,11 +150,11 @@ static void GetCornuAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) } -static void ComputeCornuBoundingBox( track_p trk, struct extraData * xx ) +static void ComputeCornuBoundingBox( track_p trk, struct extraDataCornu_t * xx ) { coOrd orig, size; - GetSegBounds(zero,0,xx->cornuData.arcSegs.cnt,xx->cornuData.arcSegs.ptr, &orig, &size); + GetSegBounds(zero,0,xx->arcSegs.cnt,xx->arcSegs.ptr, &orig, &size); coOrd hi, lo; @@ -183,45 +174,78 @@ DIST_T CornuDescriptionDistance( BOOL_T show_hidden, BOOL_T * hidden) { - struct extraData *xx = GetTrkExtraData(trk); coOrd p1; if (hidden) *hidden = FALSE; if ( GetTrkType( trk ) != T_CORNU || ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) && !show_hidden) ) - return 100000; + return DIST_INF; + + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + if (( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) xx->descriptionOff = zero; - coOrd offset = xx->cornuData.descriptionOff; + coOrd end0, end0off, end1, end1off; + end0 = xx->pos[0]; + end1 = xx->pos[1]; + ANGLE_T a; + a = FindAngle(end0,end1); + Translate(&end0off,end0,a+90,xx->descriptionOff.y); + Translate(&end1off,end1,a+90,xx->descriptionOff.y); + + p1.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + p1.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y; - if (( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) offset = zero; - p1.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x-xx->cornuData.pos[0].x)/2) + offset.x; - p1.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y-xx->cornuData.pos[0].y)/2) + offset.y; if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); *dpos = p1; + + coOrd tpos = pos; + if (DistanceCornu(trk,&tpos)<FindDistance( p1, pos )) + return DistanceCornu(trk,&pos); return FindDistance( p1, pos ); } +typedef struct { + coOrd pos; + ANGLE_T angle; + } pos_angle_t; static void DrawCornuDescription( track_p trk, drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(trk); wFont_p fp; - coOrd pos; + coOrd epos0, epos1, offpos0, offpos1; if (layoutLabels == 0) return; if ((labelEnable&LABELENABLE_TRKDESC)==0) return; - pos.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x - xx->cornuData.pos[0].x)/2); - pos.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y - xx->cornuData.pos[0].y)/2); - pos.x += xx->cornuData.descriptionOff.x; - pos.y += xx->cornuData.descriptionOff.y; + + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + epos0 = xx->pos[0]; + epos1 = xx->pos[1]; + ANGLE_T a = FindAngle(epos0,epos1); + Translate(&offpos0,epos0,a+90,xx->descriptionOff.y); + Translate(&offpos1,epos1,a+90,xx->descriptionOff.y); + fp = wStandardFont( F_TIMES, FALSE, FALSE ); - sprintf( message, _("Cornu: len=%0.2f min_rad=%0.2f"), - xx->cornuData.length, (xx->cornuData.minCurveRadius>=10000.00)?0.0:xx->cornuData.minCurveRadius); - DrawBoxedString( BOX_BOX, d, pos, message, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); + sprintf( message, _("Cornu: L %s A %0.3f L %s MinR %s"), + FormatDistance(FindDistance(xx->pos[0], xx->pos[1])), + FindAngle(xx->pos[0], xx->pos[1]), + FormatDistance(xx->length), + FormatDistance((xx->minCurveRadius>=DIST_INF)?0.0:xx->minCurveRadius)); + DrawLine(d,xx->pos[0],offpos0,0,color); + DrawLine(d,xx->pos[1],offpos1,0,color); + DrawDimLine( d, offpos0, offpos1, message, (wFontSize_t)descriptionFontSize, xx->descriptionOff.x+0.5, 0, color, 0x00 ); + + if (GetTrkBits( trk ) & TB_DETAILDESC) { + coOrd details_pos; + details_pos.x = (offpos1.x - offpos0.x)*(xx->descriptionOff.x+0.5) + offpos0.x; + details_pos.y = (offpos1.y - offpos0.y)*(xx->descriptionOff.x+0.5) + offpos0.y-(2*descriptionFontSize/mainD.dpi); + + AddTrkDetails(d, trk, details_pos, xx->length, color); + } + } @@ -230,39 +254,23 @@ STATUS_T CornuDescriptionMove( wAction_t action, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); static coOrd p0,p1; static BOOL_T editState; - if (GetTrkType(trk) != T_CORNU) return C_TERMINATE; - - p0.x = xx->cornuData.pos[0].x + ((xx->cornuData.pos[1].x - xx->cornuData.pos[0].x)/2); - p0.y = xx->cornuData.pos[0].y + ((xx->cornuData.pos[1].y - xx->cornuData.pos[0].y)/2); - - switch (action) { - case C_DOWN: - DrawCornuDescription( trk, &mainD, wDrawColorWhite ); - case C_MOVE: - case C_UP: - editState = TRUE; - p1 = pos; - xx->cornuData.descriptionOff.x = pos.x - p0.x; - xx->cornuData.descriptionOff.y = pos.y - p0.y; - if (action == C_UP) { - editState = FALSE; - wDrawColor color = GetTrkColor( trk, &mainD ); - DrawCornuDescription( trk, &mainD, color ); - } - return action==C_UP?C_TERMINATE:C_CONTINUE; - - case C_REDRAW: - if (editState) { - DrawCornuDescription( trk, &tempD, wDrawColorBlue ); - DrawLine( &tempD, p1, p0, 0, wDrawColorBlue ); - } - break; + if (GetTrkType(trk) != T_CORNU) return C_CONTINUE; + + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + ANGLE_T ap; + coOrd end0, end1; + end0 = xx->pos[0]; + end1 = xx->pos[1]; + ap = NormalizeAngle(FindAngle(end0,pos)-FindAngle(end0,end1)); + + xx->descriptionOff.y = FindDistance(end0,pos)*sin(D2R(ap)); + xx->descriptionOff.x = -0.5 + FindDistance(end0,pos)*cos(D2R(ap))/FindDistance(end0,end1); + if (xx->descriptionOff.x > 0.5) xx->descriptionOff.x = 0.5; + if (xx->descriptionOff.x < -0.5) xx->descriptionOff.x = -0.5; - } return C_CONTINUE; } @@ -312,7 +320,6 @@ static descData_t cornuDesc[] = { static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final ) { - struct extraData *xx = GetTrkExtraData(trk); BOOL_T updateEndPts; EPINX_T ep; @@ -321,61 +328,62 @@ static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final return; updateEndPts = FALSE; UndrawNewTrack(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); switch ( inx ) { case P0: if (GetTrkEndTrk(trk,0)) break; updateEndPts = TRUE; - xx->cornuData.pos[0] = cornData.pos[0]; - Translate(&xx->cornuData.c[0],xx->cornuData.pos[0],xx->cornuData.a[0]+90,xx->cornuData.r[0]); - cornData.center[0] = xx->cornuData.c[0]; + xx->pos[0] = cornData.pos[0]; + Translate(&xx->c[0],xx->pos[0],xx->a[0]+90,xx->r[0]); + cornData.center[0] = xx->c[0]; cornuDesc[P0].mode |= DESC_CHANGE; cornuDesc[C0].mode |= DESC_CHANGE; /* no break */ case P1: if (GetTrkEndTrk(trk,1)) break; updateEndPts = TRUE; - xx->cornuData.pos[1]= cornData.pos[1]; - Translate(&xx->cornuData.c[1],xx->cornuData.pos[1],xx->cornuData.a[1]-90,xx->cornuData.r[1]); - cornData.center[1] = xx->cornuData.c[1]; + xx->pos[1]= cornData.pos[1]; + Translate(&xx->c[1],xx->pos[1],xx->a[1]-90,xx->r[1]); + cornData.center[1] = xx->c[1]; cornuDesc[P1].mode |= DESC_CHANGE; cornuDesc[C1].mode |= DESC_CHANGE; break; case A0: if (GetTrkEndTrk(trk,0)) break; updateEndPts = TRUE; - xx->cornuData.a[0] = cornData.angle[0]; - Translate(&xx->cornuData.c[0],xx->cornuData.pos[0],xx->cornuData.a[0]+90,xx->cornuData.r[0]); - cornData.center[0] = xx->cornuData.c[0]; + xx->a[0] = cornData.angle[0]; + Translate(&xx->c[0],xx->pos[0],xx->a[0]+90,xx->r[0]); + cornData.center[0] = xx->c[0]; cornuDesc[A0].mode |= DESC_CHANGE; cornuDesc[C0].mode |= DESC_CHANGE; break; case A1: if (GetTrkEndTrk(trk,1)) break; updateEndPts = TRUE; - xx->cornuData.a[1]= cornData.angle[1]; - Translate(&xx->cornuData.c[1],xx->cornuData.pos[1],xx->cornuData.a[1]-90,xx->cornuData.r[1]); - cornData.center[1] = xx->cornuData.c[1]; + xx->a[1]= cornData.angle[1]; + Translate(&xx->c[1],xx->pos[1],xx->a[1]-90,xx->r[1]); + cornData.center[1] = xx->c[1]; cornuDesc[A1].mode |= DESC_CHANGE; cornuDesc[C1].mode |= DESC_CHANGE; break; case C0: if (GetTrkEndTrk(trk,0)) break; //updateEndPts = TRUE; - //xx->cornuData.c[0] = cornData.center[0]; + //xx->c[0] = cornData.center[0]; //cornuDesc[C0].mode |= DESC_CHANGE; break; case C1: if (GetTrkEndTrk(trk,1)) break; //updateEndPts = TRUE; - //xx->cornuData.c[1] = cornData.center[1]; + //xx->c[1] = cornData.center[1]; //cornuDesc[C1].mode |= DESC_CHANGE; break; case R0: if (GetTrkEndTrk(trk,0)) break; updateEndPts = TRUE; - xx->cornuData.r[0] = fabs(cornData.radius[0]); - Translate(&xx->cornuData.c[0],xx->cornuData.pos[0],NormalizeAngle(xx->cornuData.a[0]+90),cornData.radius[0]); - cornData.center[0] = xx->cornuData.c[0]; + xx->r[0] = fabs(cornData.radius[0]); + Translate(&xx->c[0],xx->pos[0],NormalizeAngle(xx->a[0]+90),cornData.radius[0]); + cornData.center[0] = xx->c[0]; cornData.radius[0] = fabs(cornData.radius[0]); cornuDesc[R0].mode |= DESC_CHANGE; cornuDesc[C0].mode |= DESC_CHANGE; @@ -383,9 +391,9 @@ static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final case R1: if (GetTrkEndTrk(trk,1)) break; updateEndPts = TRUE; - xx->cornuData.r[1]= fabs(cornData.radius[1]); - Translate(&xx->cornuData.c[1],xx->cornuData.pos[1],NormalizeAngle(xx->cornuData.a[1]-90),cornData.radius[1]); - cornData.center[1] = xx->cornuData.c[1]; + xx->r[1]= fabs(cornData.radius[1]); + Translate(&xx->c[1],xx->pos[1],NormalizeAngle(xx->a[1]-90),cornData.radius[1]); + cornData.center[1] = xx->c[1]; cornData.radius[1] = fabs(cornData.radius[1]); cornuDesc[R1].mode |= DESC_CHANGE; cornuDesc[C1].mode |= DESC_CHANGE; @@ -414,11 +422,11 @@ static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final if (updateEndPts) { if ( GetTrkEndTrk(trk,0) == NULL ) { - SetTrkEndPoint( trk, 0, cornData.pos[0], xx->cornuData.a[0]); + SetTrkEndPoint( trk, 0, cornData.pos[0], xx->a[0]); cornuDesc[A0].mode |= DESC_CHANGE; } if ( GetTrkEndTrk(trk,1) == NULL ) { - SetTrkEndPoint( trk, 1, cornData.pos[1], xx->cornuData.a[1]); + SetTrkEndPoint( trk, 1, cornData.pos[1], xx->a[1]); cornuDesc[A1].mode |= DESC_CHANGE; } } @@ -427,7 +435,7 @@ static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final ts[0] = GetTrkEndTrk(trk,0); ts[1] = GetTrkEndTrk(trk,1); SetUpCornuParmFromTracks(ts,&cp,xx); - CallCornu0(xx->cornuData.pos, xx->cornuData.c, xx->cornuData.a, xx->cornuData.r, &xx->cornuData.arcSegs, FALSE); + CallCornu0(xx->pos, xx->c, xx->a, xx->r, &xx->arcSegs, FALSE); //FixUpCornu(xx->bezierData.pos, xx, IsTrack(trk)); ComputeCornuBoundingBox(trk, xx); @@ -437,32 +445,32 @@ static void UpdateCornu( track_p trk, int inx, descData_p descUpd, BOOL_T final static void DescribeCornu( track_p trk, char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); DIST_T d; - d = xx->cornuData.length; + d = xx->length; sprintf( str, _("Cornu Track(%d): Layer=%u MinRadius=%s Length=%s EP=[%0.3f,%0.3f] [%0.3f,%0.3f]"), GetTrkIndex(trk), GetTrkLayer(trk)+1, - FormatDistance(xx->cornuData.minCurveRadius), + FormatDistance(xx->minCurveRadius), FormatDistance(d), - PutDim(xx->cornuData.pos[0].x),PutDim(xx->cornuData.pos[0].y), - PutDim(xx->cornuData.pos[1].x),PutDim(xx->cornuData.pos[1].y) + PutDim(xx->pos[0].x),PutDim(xx->pos[0].y), + PutDim(xx->pos[1].x),PutDim(xx->pos[1].y) ); - cornData.length = xx->cornuData.length; - cornData.minRadius = xx->cornuData.minCurveRadius; - cornData.maxRateOfChange = xx->cornuData.maxRateofChange*GetScaleRatio(GetLayoutCurScale()); - cornData.windingAngle = xx->cornuData.windingAngle; + cornData.length = xx->length; + cornData.minRadius = xx->minCurveRadius; + cornData.maxRateOfChange = xx->maxRateofChange*GetScaleRatio(GetLayoutCurScale()); + cornData.windingAngle = xx->windingAngle; cornData.layerNumber = GetTrkLayer(trk); - cornData.pos[0] = xx->cornuData.pos[0]; - cornData.pos[1] = xx->cornuData.pos[1]; - cornData.angle[0] = xx->cornuData.a[0]; - cornData.angle[1] = xx->cornuData.a[1]; - cornData.center[0] = xx->cornuData.c[0]; - cornData.center[1] = xx->cornuData.c[1]; - cornData.radius[0] = xx->cornuData.r[0]; - cornData.radius[1] = xx->cornuData.r[1]; + cornData.pos[0] = xx->pos[0]; + cornData.pos[1] = xx->pos[1]; + cornData.angle[0] = xx->a[0]; + cornData.angle[1] = xx->a[1]; + cornData.center[0] = xx->c[0]; + cornData.center[1] = xx->c[1]; + cornData.radius[0] = xx->r[0]; + cornData.radius[1] = xx->r[1]; if (GetTrkType(trk) == T_CORNU) { ComputeElev( trk, 0, FALSE, &cornData.elev[0], NULL, FALSE ); ComputeElev( trk, 1, FALSE, &cornData.elev[1], NULL, FALSE ); @@ -501,14 +509,14 @@ static void DescribeCornu( track_p trk, char * str, CSIZE_T len ) DIST_T DistanceCornu( track_p t, coOrd * p ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); //return BezierMathDistance(p,xx->bezierData.pos,100, &s); - DIST_T d = 100000.0; - coOrd p2 = xx->cornuData.pos[0]; //Set initial point + DIST_T d = DIST_INF; + coOrd p2 = xx->pos[0]; //Set initial point segProcData_t segProcData; - for (int i = 0;i<xx->cornuData.arcSegs.cnt;i++) { - trkSeg_t seg = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + for (int i = 0;i<xx->arcSegs.cnt;i++) { + trkSeg_t seg = DYNARR_N(trkSeg_t,xx->arcSegs,i); if (seg.type == SEG_FILCRCL) continue; segProcData.distance.pos1 = * p; SegProc(SEGPROC_DISTANCE,&seg,&segProcData); @@ -524,7 +532,6 @@ DIST_T DistanceCornu( track_p t, coOrd * p ) static void DrawCornu( track_p t, drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(t); long widthOptions = DTS_LEFT|DTS_RIGHT; if ( ((d->options&DC_SIMPLE)==0) && @@ -534,7 +541,8 @@ static void DrawCornu( track_p t, drawCmd_p d, wDrawColor color ) DrawCornuDescription( t, d, color ); } DIST_T scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; - DrawSegsO(d,t,zero,0.0,xx->cornuData.arcSegs.ptr,xx->cornuData.arcSegs.cnt, GetTrkGauge(t), color, widthOptions); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); + DrawSegsO(d,t,zero,0.0,xx->arcSegs.ptr,xx->arcSegs.cnt, GetTrkGauge(t), color, widthOptions); DrawEndPt( d, t, 0, color ); DrawEndPt( d, t, 1, color ); } @@ -552,49 +560,49 @@ void FreeSubSegs(trkSeg_t* s) { static void DeleteCornu( track_p t ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); - for (int i=0;i<xx->cornuData.arcSegs.cnt;i++) { - trkSeg_t s = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + for (int i=0;i<xx->arcSegs.cnt;i++) { + trkSeg_t s = DYNARR_N(trkSeg_t,xx->arcSegs,i); FreeSubSegs(&s); } - if (xx->cornuData.arcSegs.ptr) - MyFree(xx->cornuData.arcSegs.ptr); - xx->cornuData.arcSegs.max = 0; - xx->cornuData.arcSegs.cnt = 0; - xx->cornuData.arcSegs.ptr = NULL; + if (xx->arcSegs.ptr) + MyFree(xx->arcSegs.ptr); + xx->arcSegs.max = 0; + xx->arcSegs.cnt = 0; + xx->arcSegs.ptr = NULL; } static BOOL_T WriteCornu( track_p t, FILE * f ) { - struct extraData *xx = GetTrkExtraData(t); long options; BOOL_T rc = TRUE; BOOL_T track =(GetTrkType(t)==T_CORNU); options = GetTrkWidth(t) & 0x0F; + struct extraDataCornu_t *xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) options |= 0x80; rc &= fprintf(f, "%s %d %d %ld 0 0 %s %d %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f %0.6f \n", "CORNU",GetTrkIndex(t), GetTrkLayer(t), (long)options, GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), - xx->cornuData.pos[0].x, xx->cornuData.pos[0].y, - xx->cornuData.a[0], - xx->cornuData.r[0], - xx->cornuData.c[0].x,xx->cornuData.c[0].y, - xx->cornuData.pos[1].x, xx->cornuData.pos[1].y, - xx->cornuData.a[1], - xx->cornuData.r[1], - xx->cornuData.c[1].x,xx->cornuData.c[1].y )>0; + xx->pos[0].x, xx->pos[0].y, + xx->a[0], + xx->r[0], + xx->c[0].x,xx->c[0].y, + xx->pos[1].x, xx->pos[1].y, + xx->a[1], + xx->r[1], + xx->c[1].x,xx->c[1].y )>0; if (track) { rc &= WriteEndPt( f, t, 0 ); rc &= WriteEndPt( f, t, 1 ); } - rc &= WriteSegs( f, xx->cornuData.arcSegs.cnt, xx->cornuData.arcSegs.ptr ); + rc &= WriteSegs( f, xx->arcSegs.cnt, xx->arcSegs.ptr ); return rc; } static BOOL_T ReadCornu( char * line ) { - struct extraData *xx; + struct extraDataCornu_t *xx; track_p t; wIndex_t index; BOOL_T visible; @@ -614,24 +622,24 @@ static BOOL_T ReadCornu( char * line ) return FALSE; t = NewTrack( index, T_CORNU, 0, sizeof *xx ); - xx = GetTrkExtraData(t); SetTrkVisible(t, visible&2); SetTrkNoTies(t, visible&4); SetTrkBridge(t, visible&8); SetTrkScale(t, LookupScale(scale)); SetTrkLayer(t, layer ); SetTrkWidth(t, (int)(options&0x0F)); - if ( ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); - xx->cornuData.pos[0] = p0; - xx->cornuData.pos[1] = p1; - xx->cornuData.a[0] = a0; - xx->cornuData.r[0] = r0; - xx->cornuData.a[1] = a1; - xx->cornuData.c[0] = c0; - xx->cornuData.c[1] = c1; - xx->cornuData.r[1] = r1; - xx->cornuData.descriptionOff.x = xx->cornuData.descriptionOff.y = 0.0; - FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a, xx->cornuData.r, xx); + if ( paramVersion < VERSION_DESCRIPTION2 || ( options & 0x80 ) == 0 ) SetTrkBits(t,TB_HIDEDESC); + xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); + xx->pos[0] = p0; + xx->pos[1] = p1; + xx->a[0] = a0; + xx->r[0] = r0; + xx->a[1] = a1; + xx->c[0] = c0; + xx->c[1] = c1; + xx->r[1] = r1; + xx->descriptionOff.x = xx->descriptionOff.y = 0.0; + FixUpCornu0(xx->pos,xx->c,xx->a, xx->r, xx); ComputeCornuBoundingBox(t,xx); SetEndPts(t,2); return TRUE; @@ -639,55 +647,54 @@ static BOOL_T ReadCornu( char * line ) static void MoveCornu( track_p trk, coOrd orig ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); for (int i=0;i<2;i++) { - xx->cornuData.pos[i].x += orig.x; - xx->cornuData.pos[i].y += orig.y; - xx->cornuData.c[i].x += orig.x; - xx->cornuData.c[i].y += orig.y; + xx->pos[i].x += orig.x; + xx->pos[i].y += orig.y; + xx->c[i].x += orig.x; + xx->c[i].y += orig.y; } RebuildCornu(trk); } static void RotateCornu( track_p trk, coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); for (int i=0;i<2;i++) { - Rotate( &xx->cornuData.pos[i], orig, angle ); - Rotate( &xx->cornuData.c[i], orig, angle); - xx->cornuData.a[i] = NormalizeAngle(xx->cornuData.a[i]+angle); + Rotate( &xx->pos[i], orig, angle ); + Rotate( &xx->c[i], orig, angle); + xx->a[i] = NormalizeAngle(xx->a[i]+angle); } RebuildCornu(trk); } static void RescaleCornu( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); for (int i=0;i<2;i++) { - xx->cornuData.pos[i].x *= ratio; - xx->cornuData.pos[i].y *= ratio; - xx->cornuData.c[i].x *= ratio; - xx->cornuData.c[i].y *= ratio; - xx->cornuData.r[i] *= ratio; + xx->pos[i].x *= ratio; + xx->pos[i].y *= ratio; + xx->c[i].x *= ratio; + xx->c[i].y *= ratio; + xx->r[i] *= ratio; } RebuildCornu(trk); } EXPORT BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center, ANGLE_T angle, DIST_T radius) { - struct extraData *xx = GetTrkExtraData(trk); - xx->cornuData.pos[inx] = pos; - xx->cornuData.c[inx] = center; - xx->cornuData.a[inx] = angle; - xx->cornuData.r[inx] = radius; + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + xx->pos[inx] = pos; + xx->c[inx] = center; + xx->a[inx] = angle; + xx->r[inx] = radius; if (!RebuildCornu(trk)) return FALSE; - SetTrkEndPoint( trk, inx, xx->cornuData.pos[inx], xx->cornuData.a[inx]); + SetTrkEndPoint( trk, inx, xx->pos[inx], xx->a[inx]); return TRUE; } void GetCornuParmsNear(track_p t, int sel, coOrd * pos2, coOrd * center, ANGLE_T * angle2, DIST_T * radius ) { - struct extraData *xx = GetTrkExtraData(t); coOrd pos = *pos2; double dd = DistanceCornu(t, &pos); //Pos adjusted to be on curve int inx; @@ -695,13 +702,14 @@ void GetCornuParmsNear(track_p t, int sel, coOrd * pos2, coOrd * center, ANGLE_T *angle2 = 0.0; *center = zero; wBool_t back,neg; - ANGLE_T angle = GetAngleSegs(xx->cornuData.arcSegs.cnt,(trkSeg_t *)(xx->cornuData.arcSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(t, T_CORNU, extraDataCornu_t); + ANGLE_T angle = GetAngleSegs(xx->arcSegs.cnt,(trkSeg_t *)(xx->arcSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); if (inx == -1) { return; //Error in GetAngle } - trkSeg_p segPtr = &DYNARR_N(trkSeg_t, xx->cornuData.arcSegs, inx); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t, xx->arcSegs, inx); if (segPtr->type == SEG_BEZTRK) { GetAngleSegs(segPtr->bezSegs.cnt,(trkSeg_t *)(segPtr->bezSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); @@ -770,11 +778,10 @@ void GetCornuParmsTemp(dynArr_t * array_p, int sel, coOrd * pos2, coOrd * center */ static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData *xx = GetTrkExtraData(trk); track_p trk1; DIST_T radius = 0.0; coOrd center; - int inx; + int inx,subinx; BOOL_T track; track = IsTrack(trk); @@ -784,17 +791,16 @@ static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, if (dd>minLength) return FALSE; BOOL_T back, neg; - ANGLE_T angle = GetAngleSegs(xx->cornuData.arcSegs.cnt,(trkSeg_t *)(xx->cornuData.arcSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + ANGLE_T angle = GetAngleSegs(xx->arcSegs.cnt,(trkSeg_t *)(xx->arcSegs.ptr),&pos,&inx,NULL,&back,&subinx,&neg); if (inx == -1) return FALSE; - trkSeg_p segPtr = &DYNARR_N(trkSeg_t, xx->cornuData.arcSegs, inx); - - GetAngleSegs(segPtr->bezSegs.cnt,(trkSeg_t *)(segPtr->bezSegs.ptr),&pos,&inx,NULL,&back,NULL,&neg); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t, xx->arcSegs, inx); - if (inx == -1) return FALSE; - - segPtr = &DYNARR_N(trkSeg_t, segPtr->bezSegs, inx); + if (subinx != -1) { + segPtr = &DYNARR_N(trkSeg_t, segPtr->bezSegs, subinx); + } if (segPtr->type == SEG_STRTRK) { radius = 0.0; @@ -805,22 +811,22 @@ static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, } if (ep) { new.pos[0] = pos; - new.pos[1] = xx->cornuData.pos[1]; + new.pos[1] = xx->pos[1]; new.angle[0] = NormalizeAngle(angle+(neg==back?180:0)); - new.angle[1] = xx->cornuData.a[1]; + new.angle[1] = xx->a[1]; new.center[0] = center; - new.center[1] = xx->cornuData.c[1]; + new.center[1] = xx->c[1]; new.radius[0] = radius; - new.radius[1] = xx->cornuData.r[1]; + new.radius[1] = xx->r[1]; } else { new.pos[1] = pos; - new.pos[0] = xx->cornuData.pos[0]; + new.pos[0] = xx->pos[0]; new.angle[1] = NormalizeAngle(angle+(neg==back?0:180)); - new.angle[0] = xx->cornuData.a[0]; + new.angle[0] = xx->a[0]; new.center[1] = center; - new.center[0] = xx->cornuData.c[0]; + new.center[0] = xx->c[0]; new.radius[1] = radius; - new.radius[0] = xx->cornuData.r[0]; + new.radius[0] = xx->r[0]; } trk1 = NewCornuTrack(new.pos,new.center,new.angle,new.radius,NULL,0); @@ -843,15 +849,15 @@ static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, UpdateTrkEndElev( trk1, ep, opt, height, (opt==ELEV_STATION)?GetTrkEndElevStation(trk,ep):NULL ); UndoModify(trk); - xx->cornuData.pos[ep] = pos; - xx->cornuData.a[ep] = NormalizeAngle(new.angle[1-ep]+180); - xx->cornuData.r[ep] = new.radius[1-ep]; - xx->cornuData.c[ep] = new.center[1-ep]; + xx->pos[ep] = pos; + xx->a[ep] = NormalizeAngle(new.angle[1-ep]+180); + xx->r[ep] = new.radius[1-ep]; + xx->c[ep] = new.center[1-ep]; //Wipe out old elevation for ep1 RebuildCornu(trk); - SetTrkEndPoint(trk, ep, xx->cornuData.pos[ep], xx->cornuData.a[ep]); + SetTrkEndPoint(trk, ep, xx->pos[ep], xx->a[ep]); UpdateTrkEndElev( trk, ep, ELEV_NONE, 0, NULL); *leftover = trk1; @@ -864,12 +870,12 @@ static BOOL_T SplitCornu( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, BOOL_T MoveCornuEndPt ( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) { track_p trk2; if (SplitTrack(*trk,pos,*ep,&trk2,TRUE)) { - struct extraData *xx = GetTrkExtraData(*trk); if (trk2) { UndrawNewTrack( trk2 ); DeleteTrack(trk2,TRUE); } - SetTrkEndPoint( *trk, *ep, *ep?xx->cornuData.pos[1]:xx->cornuData.pos[0], *ep?xx->cornuData.a[1]:xx->cornuData.a[0] ); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(*trk, T_CORNU, extraDataCornu_t); + SetTrkEndPoint( *trk, *ep, *ep?xx->pos[1]:xx->pos[0], *ep?xx->a[1]:xx->a[0] ); DrawNewTrack( *trk ); return TRUE; } @@ -898,22 +904,22 @@ static int log_traverseCornu = 0; static BOOL_T TraverseCornu( traverseTrack_p trvTrk, DIST_T * distR ) { track_p trk = trvTrk->trk; - struct extraData *xx = GetTrkExtraData(trk); DIST_T dist = *distR; segProcData_t segProcData; BOOL_T cornu_backwards= FALSE; BOOL_T neg = FALSE; - DIST_T d = 10000; + DIST_T d = DIST_INF; coOrd pos1 = trvTrk->pos, pos2 = trvTrk->pos; ANGLE_T a1,a2; int inx, segInx = 0; EPINX_T ep; BOOL_T back; LOG( log_traverseCornu, 1, ( "TravCornu-In [%0.3f %0.3f] A%0.3f D%0.3f \n", trvTrk->pos.x, trvTrk->pos.y, trvTrk->angle, *distR )) - trkSeg_p segPtr = (trkSeg_p)xx->cornuData.arcSegs.ptr; + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + trkSeg_p segPtr = (trkSeg_p)xx->arcSegs.ptr; a2 = GetAngleSegs( //Find correct Segment and nearest point in it - xx->cornuData.arcSegs.cnt,segPtr, + xx->arcSegs.cnt,segPtr, &pos2, &segInx, &d , &back , NULL, &neg); //d = how far pos2 from old pos2 = trvTrk->pos if ( d > 10 ) { @@ -937,8 +943,8 @@ LOG( log_traverseCornu, 1, ( "TravCornu-In [%0.3f %0.3f] A%0.3f D%0.3f \n", trvT segProcData.traverse1.angle = trvTrk->angle; //direction car is going for Traverse 1 LOG( log_traverseCornu, 1, ( " TravCornu-GetSubA A%0.3f I%d N%d B%d CB%d\n", a2, segInx, neg, back, cornu_backwards )) inx = segInx; - while (inx >=0 && inx<xx->cornuData.arcSegs.cnt) { - segPtr = (trkSeg_p)xx->cornuData.arcSegs.ptr+inx; //move in to the identified Bezier segment + while (inx >=0 && inx<xx->arcSegs.cnt) { + segPtr = (trkSeg_p)xx->arcSegs.ptr+inx; //move in to the identified Bezier segment SegProc( SEGPROC_TRAVERSE1, segPtr, &segProcData ); BOOL_T backwards = segProcData.traverse1.backwards; //do we process this segment backwards? BOOL_T reverse_seg = segProcData.traverse1.reverse_seg; //Info only @@ -989,13 +995,14 @@ static BOOL_T EnumerateCornu( track_p trk ) { if (trk != NULL) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); DIST_T d; - d = max(CornuOffsetLength(xx->cornuData.arcSegs,-GetTrkGauge(trk)/2.0), - CornuOffsetLength(xx->cornuData.arcSegs,GetTrkGauge(trk)/2.0)); + d = max(CornuOffsetLength(xx->arcSegs,-GetTrkGauge(trk)/2.0), + CornuOffsetLength(xx->arcSegs,GetTrkGauge(trk)/2.0)); ScaleLengthIncrement( GetTrkScale(trk), d ); + return TRUE; } - return TRUE; + return FALSE; } static BOOL_T MergeCornu( @@ -1004,82 +1011,13 @@ static BOOL_T MergeCornu( track_p trk1, EPINX_T ep1 ) { - struct extraData *xx0 = GetTrkExtraData(trk0); - struct extraData *xx1 = GetTrkExtraData(trk1); - track_p trk_after,trk_before; - EPINX_T ep_before,ep_after=-1; - coOrd p[2]; - coOrd c[2]; - ANGLE_T a[2]; - DIST_T r[2]; - - - if (!IsTrack(trk0) || !IsTrack(trk1) ) return FALSE; - if (GetTrkType(trk0) != GetTrkType(trk1)) return FALSE; - if (GetEndPtConnectedToMe(trk0,trk1) != ep0) return FALSE; - if (GetEndPtConnectedToMe(trk1,trk0) != ep1) return FALSE; - - if (ep0 == ep1) - return FALSE; - - UndoStart( _("Merge Cornu"), "MergeCornu( T%d[%d] T%d[%d] )", GetTrkIndex(trk0), ep0, GetTrkIndex(trk1), ep1 ); - p[0] = xx0->cornuData.pos[0]; - p[1] = xx1->cornuData.pos[1]; - a[0] = xx0->cornuData.a[0]; - a[1] = xx1->cornuData.a[1]; - c[0] = xx0->cornuData.c[0]; - c[1] = xx1->cornuData.c[1]; - r[0] = xx0->cornuData.r[0]; - r[1] = xx1->cornuData.r[1]; - track_p trk3 = NewCornuTrack(p,c,a,r,NULL,0); - if (trk3==NULL) { - wBeep(); - InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), - p[0].x,p[0].y, - p[1].x,p[1].y, - c[0].x,c[0].y, - c[1].x,c[1].y, - a[0],a[1], - FormatDistance(r[0]),FormatDistance(r[1])); - UndoEnd(); - return FALSE; - } - - UndoModify( trk0 ); - UndoModify( trk1 ); - UndrawNewTrack( trk0 ); - UndrawNewTrack( trk1 ); - trk_after = GetTrkEndTrk( trk1, 1-ep1 ); - if (trk_after) { - ep_after = GetEndPtConnectedToMe( trk_after, trk1 ); - DisconnectTracks( trk1, 1-ep1, trk_after, ep_after ); - } - trk_before = GetTrkEndTrk( trk0, 1-ep0 ); - if (trk_before) { - ep_before = GetEndPtConnectedToMe( trk_before, trk0 ); - DisconnectTracks( trk0, 1-ep1, trk_before, ep_before ); - } - - DeleteTrack( trk1, TRUE ); - DeleteTrack( trk0, TRUE ); - if (trk_after) { - SetTrkEndPoint( trk_after, ep_after, xx0->cornuData.pos[1], NormalizeAngle(xx0->cornuData.a[1]+180)); - ConnectTracks( trk3, 1, trk_after, ep_after); - } - if (trk_before) { - SetTrkEndPoint( trk_before, ep_before, xx0->cornuData.pos[0], NormalizeAngle(xx0->cornuData.a[0]+180)); - ConnectTracks( trk3, 0, trk_before, ep_before); - } - DrawNewTrack( trk3 ); - UndoEnd(); - - return TRUE; + return FALSE; } BOOL_T GetBezierSegmentsFromCornu(track_p trk, dynArr_t * segs, BOOL_T track) { - struct extraData * xx = GetTrkExtraData(trk); - for (int i=0;i<xx->cornuData.arcSegs.cnt;i++) { - trkSeg_p p = (trkSeg_t *) xx->cornuData.arcSegs.ptr+i; + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + for (int i=0;i<xx->arcSegs.cnt;i++) { + trkSeg_p p = (trkSeg_t *) xx->arcSegs.ptr+i; if (p->type == SEG_BEZTRK) { if (track) { DYNARR_APPEND(trkSeg_t, * segs, 10); @@ -1132,11 +1070,11 @@ BOOL_T GetBezierSegmentsFromCornu(track_p trk, dynArr_t * segs, BOOL_T track) { static DIST_T GetLengthCornu( track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); DIST_T length = 0.0; segProcData_t segProcData; - for(int i=0;i<xx->cornuData.arcSegs.cnt;i++) { - trkSeg_t seg = DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,i); + for(int i=0;i<xx->arcSegs.cnt;i++) { + trkSeg_t seg = DYNARR_N(trkSeg_t,xx->arcSegs,i); if (seg.type == SEG_FILCRCL) continue; SegProc(SEGPROC_LENGTH, &seg, &segProcData); length += segProcData.length.length; @@ -1144,19 +1082,39 @@ static DIST_T GetLengthCornu( track_p trk ) return length; } +EXPORT BOOL_T GetCornuMiddle( track_p trk, coOrd * pos) { + + if (GetTrkType(trk) != T_CORNU) + return FALSE; + DIST_T length = GetLengthCornu(trk)/2; + + traverseTrack_t tp; + tp.pos = GetTrkEndPos(trk,0); + tp.angle = NormalizeAngle(GetTrkEndAngle(trk,0)+180.0); + tp.trk = trk; + tp.length = length; + + TraverseCornu(&tp,&length); + + *pos = tp.pos; + + return TRUE; + +} + static BOOL_T GetParamsCornu( int inx, track_p trk, coOrd pos, trackParams_t * params ) { int segInx, segInx2; BOOL_T back, negative; DIST_T d; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCornu_t *xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); params->type = curveTypeCornu; params->track_angle = GetAngleSegs( //Find correct Segment and nearest point in it - xx->cornuData.arcSegs.cnt,xx->cornuData.arcSegs.ptr, + xx->arcSegs.cnt,xx->arcSegs.ptr, &pos, &segInx, &d , &back, &segInx2, &negative ); if (segInx ==-1) return FALSE; - trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->cornuData.arcSegs,segInx); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->arcSegs,segInx); if (negative != back) params->track_angle = NormalizeAngle(params->track_angle+180); //Cornu is in reverse if (segPtr->type == SEG_STRTRK) { params->arcR = 0.0; @@ -1177,12 +1135,12 @@ static BOOL_T GetParamsCornu( int inx, track_p trk, coOrd pos, trackParams_t * p } } for (int i=0;i<2;i++) { - params->cornuEnd[i] = xx->cornuData.pos[i]; - params->cornuAngle[i] = xx->cornuData.a[i]; - params->cornuRadius[i] = xx->cornuData.r[i]; - params->cornuCenter[i] = xx->cornuData.c[i]; + params->cornuEnd[i] = xx->pos[i]; + params->cornuAngle[i] = xx->a[i]; + params->cornuRadius[i] = xx->r[i]; + params->cornuCenter[i] = xx->c[i]; } - params->len = xx->cornuData.length; + params->len = xx->length; if ( inx == PARAMS_NODES ) { return FALSE; } else if ((inx == PARAMS_CORNU) || (inx == PARAMS_1ST_JOIN) || (inx == PARAMS_2ND_JOIN) ) { @@ -1205,7 +1163,6 @@ static BOOL_T GetParamsCornu( int inx, track_p trk, coOrd pos, trackParams_t * p static BOOL_T QueryCornu( track_p trk, int query ) { - struct extraData * xx = GetTrkExtraData(trk); switch ( query ) { case Q_CAN_GROUP: return FALSE; @@ -1214,9 +1171,10 @@ static BOOL_T QueryCornu( track_p trk, int query ) case Q_HAS_DESC: return TRUE; break; - case Q_EXCEPTION: - return fabs(xx->cornuData.minCurveRadius) < (GetLayoutMinTrackRadius()-EPSILON); - break; + case Q_EXCEPTION: { + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + return fabs(xx->minCurveRadius) < (GetLayoutMinTrackRadius()-EPSILON); + } case Q_IS_CORNU: return TRUE; break; @@ -1247,27 +1205,27 @@ static void FlipCornu( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); - FlipPoint( &xx->cornuData.pos[0], orig, angle ); - FlipPoint( &xx->cornuData.pos[1], orig, angle ); - FlipPoint( &xx->cornuData.c[0], orig, angle); - FlipPoint( &xx->cornuData.c[1], orig, angle); - xx->cornuData.a[0] = NormalizeAngle( 2*angle - xx->cornuData.a[0] ); - xx->cornuData.a[1] = NormalizeAngle( 2*angle - xx->cornuData.a[1] ); + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + FlipPoint( &xx->pos[0], orig, angle ); + FlipPoint( &xx->pos[1], orig, angle ); + FlipPoint( &xx->c[0], orig, angle); + FlipPoint( &xx->c[1], orig, angle); + xx->a[0] = NormalizeAngle( 2*angle - xx->a[0] ); + xx->a[1] = NormalizeAngle( 2*angle - xx->a[1] ); /* Reverse internals so that they match the new ends */ - coOrd pos_save = xx->cornuData.pos[0]; - xx->cornuData.pos[0] = xx->cornuData.pos[1]; - xx->cornuData.pos[1] = pos_save; - ANGLE_T angle_save = xx->cornuData.a[0]; - xx->cornuData.a[0] = xx->cornuData.a[1]; - xx->cornuData.a[1] = angle_save; - coOrd c_save = xx->cornuData.c[0]; - xx->cornuData.c[0] = xx->cornuData.c[1]; - xx->cornuData.c[1] = c_save; - DIST_T rad_save = xx->cornuData.r[0]; - xx->cornuData.r[0] = xx->cornuData.r[1]; - xx->cornuData.r[1] = rad_save; + coOrd pos_save = xx->pos[0]; + xx->pos[0] = xx->pos[1]; + xx->pos[1] = pos_save; + ANGLE_T angle_save = xx->a[0]; + xx->a[0] = xx->a[1]; + xx->a[1] = angle_save; + coOrd c_save = xx->c[0]; + xx->c[0] = xx->c[1]; + xx->c[1] = c_save; + DIST_T rad_save = xx->r[0]; + xx->r[0] = xx->r[1]; + xx->r[1] = rad_save; RebuildCornu(trk); @@ -1279,11 +1237,11 @@ static ANGLE_T GetAngleCornu( EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); ANGLE_T angle; BOOL_T back, neg; int indx; - angle = GetAngleSegs( xx->cornuData.arcSegs.cnt, (trkSeg_p)xx->cornuData.arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); + angle = GetAngleSegs( xx->arcSegs.cnt, (trkSeg_p)xx->arcSegs.ptr, &pos, &indx, NULL, &back, NULL, &neg ); if (!back) angle = NormalizeAngle(angle+180); if ( ep0 ) *ep0 = neg?1:0; if ( ep1 ) *ep1 = neg?0:1; @@ -1307,7 +1265,6 @@ static BOOL_T MakeParallelCornu( coOrd * p1R, BOOL_T track ) { - struct extraData * xx = GetTrkExtraData(trk); coOrd np[4], p, nc[2]; ANGLE_T atrk, diff_a, na[2]; DIST_T nr[2]; @@ -1320,36 +1277,37 @@ static BOOL_T MakeParallelCornu( p = pos; DistanceCornu(trk, &p); //Find nearest point on curve - atrk = GetAngleSegs(xx->cornuData.arcSegs.cnt,(trkSeg_t *)(xx->cornuData.arcSegs.ptr),&p,NULL,NULL,NULL,NULL, NULL); + struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + atrk = GetAngleSegs(xx->arcSegs.cnt,(trkSeg_t *)(xx->arcSegs.ptr),&p,NULL,NULL,NULL,NULL, NULL); diff_a = NormalizeAngle(FindAngle(pos,p)-atrk); //we know it will be +/-90... //find parallel move x and y for points BOOL_T above = FALSE; if ( diff_a < 180 ) above = TRUE; //Above track - if (xx->cornuData.a[0] <180) above = !above; - DIST_T sep0 = sep+((xx->cornuData.r[0]!=0.0)?fabs(factor/xx->cornuData.r[0]):0); - DIST_T sep1 = sep+((xx->cornuData.r[1]!=0.0)?fabs(factor/xx->cornuData.r[1]):0); - Translate(&np[0],xx->cornuData.pos[0],xx->cornuData.a[0]+(above?90:-90),sep0); - Translate(&np[1],xx->cornuData.pos[1],xx->cornuData.a[1]+(above?-90:90),sep1); - na[0]=xx->cornuData.a[0]; - na[1]=xx->cornuData.a[1]; - if (xx->cornuData.r[0] != 0.0) { + if (xx->a[0] <180) above = !above; + DIST_T sep0 = sep+((xx->r[0]!=0.0)?fabs(factor/xx->r[0]):0); + DIST_T sep1 = sep+((xx->r[1]!=0.0)?fabs(factor/xx->r[1]):0); + Translate(&np[0],xx->pos[0],xx->a[0]+(above?90:-90),sep0); + Translate(&np[1],xx->pos[1],xx->a[1]+(above?-90:90),sep1); + na[0]=xx->a[0]; + na[1]=xx->a[1]; + if (xx->r[0] != 0.0) { //Find angle between center and end angle of track ANGLE_T ea0 = - NormalizeAngle(FindAngle(xx->cornuData.c[0],xx->cornuData.pos[0])-xx->cornuData.a[0]); + NormalizeAngle(FindAngle(xx->c[0],xx->pos[0])-xx->a[0]); if (ea0>180) sep0 = -sep0; - nr[0]=xx->cornuData.r[0]+(above?sep0:-sep0); //Needs adjustment - nc[0]=xx->cornuData.c[0]; + nr[0]=xx->r[0]+(above?sep0:-sep0); //Needs adjustment + nc[0]=xx->c[0]; } else { nr[0] = 0.0; nc[0] = zero; } - if (xx->cornuData.r[1] != 0.0) { + if (xx->r[1] != 0.0) { ANGLE_T ea1 = - NormalizeAngle(FindAngle(xx->cornuData.c[1],xx->cornuData.pos[1])-xx->cornuData.a[1]); + NormalizeAngle(FindAngle(xx->c[1],xx->pos[1])-xx->a[1]); if (ea1<180) sep1 = -sep1; - nr[1]=xx->cornuData.r[1]+(above?sep1:-sep1); //Needs adjustment - nc[1]=xx->cornuData.c[1]; + nr[1]=xx->r[1]+(above?sep1:-sep1); //Needs adjustment + nc[1]=xx->c[1]; } else { nr[1] = 0.0; nc[1] = zero; @@ -1424,15 +1382,15 @@ static BOOL_T TrimCornu( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, ANG DeleteTrack(trk, TRUE); return FALSE; } else { - struct extraData *xx; + struct extraDataCornu_t *xx; UndrawNewTrack( trk ); - xx = GetTrkExtraData(trk); - xx->cornuData.a[ep] = angle; - xx->cornuData.c[ep] = center; - xx->cornuData.r[ep] = radius; - xx->cornuData.pos[ep] = endpos; + xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + xx->a[ep] = angle; + xx->c[ep] = center; + xx->r[ep] = radius; + xx->pos[ep] = endpos; RebuildCornu(trk); - SetTrkEndPoint(trk, ep, xx->cornuData.pos[ep], xx->cornuData.a[ep]); + SetTrkEndPoint(trk, ep, xx->pos[ep], xx->a[ep]); DrawNewTrack( trk ); } return TRUE; @@ -1446,13 +1404,13 @@ static BOOL_T TrimCornu( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, ANG */ EXPORT BOOL_T RebuildCornu (track_p trk) { - struct extraData *xx; - xx = GetTrkExtraData(trk); - xx->cornuData.arcSegs.max = 0; - xx->cornuData.arcSegs.cnt = 0; - //if (xx->cornuData.arcSegs.ptr) MyFree(xx->cornuData.arcSegs.ptr); - xx->cornuData.arcSegs.ptr = NULL; - if (!FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a,xx->cornuData.r, xx)) return FALSE; + struct extraDataCornu_t *xx; + xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); + xx->arcSegs.max = 0; + xx->arcSegs.cnt = 0; + //if (xx->arcSegs.ptr) MyFree(xx->arcSegs.ptr); + xx->arcSegs.ptr = NULL; + if (!FixUpCornu0(xx->pos,xx->c,xx->a,xx->r, xx)) return FALSE; ComputeCornuBoundingBox(trk, xx); return TRUE; } @@ -1460,23 +1418,23 @@ EXPORT BOOL_T RebuildCornu (track_p trk) static wBool_t CompareCornu( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataCornu_t *xx1 = GET_EXTRA_DATA( trk1, T_CORNU, extraDataCornu_t ); + struct extraDataCornu_t *xx2 = GET_EXTRA_DATA( trk2, T_CORNU, extraDataCornu_t ); char * cp = message + strlen(message); - REGRESS_CHECK_POS( "Pos[0]", xx1, xx2, cornuData.pos[0] ) - REGRESS_CHECK_POS( "Pos[1]", xx1, xx2, cornuData.pos[1] ) - REGRESS_CHECK_POS( "C[0]", xx1, xx2, cornuData.c[0] ) - REGRESS_CHECK_POS( "C[1]", xx1, xx2, cornuData.c[1] ) - REGRESS_CHECK_ANGLE( "A[0]", xx1, xx2, cornuData.a[0] ) - REGRESS_CHECK_ANGLE( "A[1]", xx1, xx2, cornuData.a[1] ) - REGRESS_CHECK_DIST( "R[0]", xx1, xx2, cornuData.r[0] ) - REGRESS_CHECK_DIST( "R[1]", xx1, xx2, cornuData.r[1] ) - REGRESS_CHECK_DIST( "MinCurveRadius", xx1, xx2, cornuData.minCurveRadius ) - REGRESS_CHECK_DIST( "MaxRateofChange", xx1, xx2, cornuData.maxRateofChange ) - REGRESS_CHECK_DIST( "Length", xx1, xx2, cornuData.length ) - REGRESS_CHECK_ANGLE( "WindingAngle", xx1, xx2, cornuData.windingAngle ) + REGRESS_CHECK_POS( "Pos[0]", xx1, xx2, pos[0] ) + REGRESS_CHECK_POS( "Pos[1]", xx1, xx2, pos[1] ) + REGRESS_CHECK_POS( "C[0]", xx1, xx2, c[0] ) + REGRESS_CHECK_POS( "C[1]", xx1, xx2, c[1] ) + REGRESS_CHECK_ANGLE( "A[0]", xx1, xx2, a[0] ) + REGRESS_CHECK_ANGLE( "A[1]", xx1, xx2, a[1] ) + REGRESS_CHECK_DIST( "R[0]", xx1, xx2, r[0] ) + REGRESS_CHECK_DIST( "R[1]", xx1, xx2, r[1] ) + REGRESS_CHECK_DIST( "MinCurveRadius", xx1, xx2, minCurveRadius ) + REGRESS_CHECK_DIST( "MaxRateofChange", xx1, xx2, maxRateofChange ) + REGRESS_CHECK_DIST( "Length", xx1, xx2, length ) + REGRESS_CHECK_ANGLE( "WindingAngle", xx1, xx2, windingAngle ) // CHECK arcSegs - REGRESS_CHECK_POS( "DescOff", xx1, xx2, cornuData.descriptionOff ) + REGRESS_CHECK_POS( "DescOff", xx1, xx2, descriptionOff ) // CHECK cornuPath return TRUE; } @@ -1534,27 +1492,27 @@ static trackCmd_t cornuCmds = { track_p NewCornuTrack(coOrd pos[2], coOrd center[2],ANGLE_T angle[2], DIST_T radius[2], trkSeg_t * tempsegs, int count) { - struct extraData *xx; + struct extraDataCornu_t *xx; track_p p; p = NewTrack( 0, T_CORNU, 2, sizeof *xx ); - xx = GetTrkExtraData(p); - xx->cornuData.pos[0] = pos[0]; - xx->cornuData.pos[1] = pos[1]; - xx->cornuData.a[0] = angle[0]; - xx->cornuData.a[1] = angle[1]; - xx->cornuData.r[0] = radius[0]; - xx->cornuData.r[1] = radius[1]; - xx->cornuData.c[0] = center[0]; - xx->cornuData.c[1] = center[1]; - - if (!FixUpCornu0(xx->cornuData.pos,xx->cornuData.c,xx->cornuData.a,xx->cornuData.r, xx)) { + xx = GET_EXTRA_DATA(p, T_CORNU, extraDataCornu_t); + xx->pos[0] = pos[0]; + xx->pos[1] = pos[1]; + xx->a[0] = angle[0]; + xx->a[1] = angle[1]; + xx->r[0] = radius[0]; + xx->r[1] = radius[1]; + xx->c[0] = center[0]; + xx->c[1] = center[1]; + + if (!FixUpCornu0(xx->pos,xx->c,xx->a,xx->r, xx)) { ErrorMessage("Create Cornu Failed"); return NULL; } LOG( log_cornu, 1, ( "NewCornuTrack( EP1 %0.3f, %0.3f, EP2 %0.3f, %0.3f ) = %d\n", pos[0].x, pos[0].y, pos[1].x, pos[1].y, GetTrkIndex(p) ) ) ComputeCornuBoundingBox( p, xx ); - SetTrkEndPoint( p, 0, pos[0], xx->cornuData.a[0]); - SetTrkEndPoint( p, 1, pos[1], xx->cornuData.a[1]); + SetTrkEndPoint( p, 0, pos[0], xx->a[0]); + SetTrkEndPoint( p, 1, pos[1], xx->a[1]); CheckTrackLength( p ); SetTrkBits( p, TB_HIDEDESC ); return p; diff --git a/app/bin/tcornu.h b/app/bin/tcornu.h index 5684373..7245dfd 100644 --- a/app/bin/tcornu.h +++ b/app/bin/tcornu.h @@ -18,7 +18,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -typedef struct { +#include "common.h" + +typedef struct extraDataCornu_t { + extraDataBase_t base; coOrd pos[2]; coOrd c[2]; ANGLE_T a[2]; @@ -30,7 +33,7 @@ typedef struct { dynArr_t arcSegs; coOrd descriptionOff; char * cornuPath; - } cornuData_t; + } extraDataCornu_t; typedef struct { coOrd pos[2]; //All values for end if trk[end] = NULL @@ -44,10 +47,10 @@ typedef struct { double CornuMaxCurve(coOrd[2],ANGLE_T[2],DIST_T[2]); double BezierMathMinRadius(coOrd[4]); coOrd BezierMathFindNearestPoint(coOrd *, coOrd[4] , int ); -track_p NewCornuTrack(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], trkSeg_t * tempsegs, int count); -DIST_T CornuDistance( coOrd *, coOrd[2], ANGLE_T[2], DIST_T[2], trkSeg_t * ,int , double * ); -BOOL_T FixUpCornu(coOrd pos[2], track_p [2], EPINX_T ep[2], struct extraData* xx); -BOOL_T FixUpCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], struct extraData* xx); +track_p NewCornuTrack(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], trkSeg_p tempsegs, int count); +DIST_T CornuDistance( coOrd *, coOrd[2], ANGLE_T[2], DIST_T[2], trkSeg_p ,int , double * ); +BOOL_T FixUpCornu(coOrd pos[2], track_p [2], EPINX_T ep[2], struct extraDataCornu_t* xx); +BOOL_T FixUpCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], struct extraDataCornu_t* xx); BOOL_T GetCornuSegmentsFromTrack(track_p, trkSeg_p); BOOL_T SetCornuEndPt(track_p trk, EPINX_T inx, coOrd pos, coOrd center, ANGLE_T angle, DIST_T radius); BOOL_T RebuildCornu (track_p trk); @@ -65,5 +68,6 @@ BOOL_T GetBezierSegmentsFromCornu(track_p, dynArr_t *, BOOL_T); char * CreateSegPathList(track_p trk); +BOOL_T GetCornuMiddle( track_p trk, coOrd * pos); diff --git a/app/bin/tcurve.c b/app/bin/tcurve.c index 00d1ef5..f133dc7 100644 --- a/app/bin/tcurve.c +++ b/app/bin/tcurve.c @@ -20,34 +20,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <math.h> -#include <string.h> - #include "ccurve.h" #include "cjoin.h" #include "cstraigh.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" static TRKTYP_T T_CURVE = -1; -struct extraData { +typedef struct extraDataCurve_t { + extraDataBase_t base; coOrd pos; DIST_T radius; BOOL_T circle; long helixTurns; coOrd descriptionOff; - }; -#define xpos extraData->pos -#define xradius extraData->radius -#define xcircle extraData->circle + } extraDataCurve_t; static int log_curve = 0; static int log_curveSegs = 0; @@ -62,8 +54,8 @@ static DIST_T GetLengthCurve( track_p ); static void GetCurveAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) { - struct extraData *xx = GetTrkExtraData(trk); assert( trk != NULL ); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); if (xx->circle != TRUE) { *a0 = NormalizeAngle( GetTrkEndAngle(trk,0) + 90 ); *a1 = NormalizeAngle( @@ -75,7 +67,7 @@ static void GetCurveAngles( ANGLE_T *a0, ANGLE_T *a1, track_p trk ) LOG( log_curve, 4, ( "getCurveAngles: = %0.3f %0.3f\n", *a0, *a1 ) ) } -static void SetCurveAngles( track_p p, ANGLE_T a0, ANGLE_T a1, struct extraData * xx ) +static void SetCurveAngles( track_p p, ANGLE_T a0, ANGLE_T a1, struct extraDataCurve_t * xx ) { coOrd pos0, pos1; xx->circle = (a0 == 0.0 && a1 == 0.0); @@ -85,7 +77,7 @@ static void SetCurveAngles( track_p p, ANGLE_T a0, ANGLE_T a1, struct extraData SetTrkEndPoint( p, 1, pos1, NormalizeAngle(a0+a1+90.0) ); } -static void ComputeCurveBoundingBox( track_p trk, struct extraData * xx ) +static void ComputeCurveBoundingBox( track_p trk, struct extraDataCurve_t * xx ) { coOrd p = xx->pos; DIST_T r = xx->radius; @@ -112,7 +104,6 @@ static void ComputeCurveBoundingBox( track_p trk, struct extraData * xx ) static void AdjustCurveEndPt( track_p t, EPINX_T inx, ANGLE_T a ) { - struct extraData *xx = GetTrkExtraData(t); coOrd pos; ANGLE_T aa; if (GetTrkType(t) != T_CURVE) { @@ -120,6 +111,7 @@ static void AdjustCurveEndPt( track_p t, EPINX_T inx, ANGLE_T a ) GetTrkIndex(t), inx, GetTrkType(t) ); return; } + struct extraDataCurve_t *xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); UndoModify( t ); LOG( log_curve, 1, ( "adjustCurveEndPt T%d[%d] a=%0.3f\n", GetTrkIndex(t), inx, a ) ) aa = a = NormalizeAngle(a); @@ -140,28 +132,28 @@ LOG( log_curve, 1, ( " E0:[%0.3f %0.3f] A%0.3f, E1:[%0.3f %0.3f] A%0.3f\n", static void GetTrkCurveCenter( track_p t, coOrd *p, DIST_T *r ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); *p = xx->pos; *r = xx->radius; } BOOL_T IsCurveCircle( track_p t ) { - struct extraData *xx; + struct extraDataCurve_t *xx; if ( GetTrkType(t) != T_CURVE ) return FALSE; - xx = GetTrkExtraData(t); + xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); return xx->circle || xx->helixTurns>0; } BOOL_T GetCurveMiddle( track_p trk, coOrd * pos ) { - struct extraData *xx; + struct extraDataCurve_t *xx; ANGLE_T a0, a1; if ( GetTrkType(trk) != T_CURVE ) return FALSE; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); if (xx->circle || xx->helixTurns>0) { PointOnCircle( pos, xx->pos, xx->radius, 0 ); } else { @@ -171,6 +163,8 @@ BOOL_T GetCurveMiddle( track_p trk, coOrd * pos ) return TRUE; } +static DIST_T DistanceCurve( track_p t, coOrd * p ); + DIST_T CurveDescriptionDistance( coOrd pos, track_p trk, @@ -178,28 +172,41 @@ DIST_T CurveDescriptionDistance( BOOL_T show_hidden, BOOL_T * hidden) { - struct extraData *xx = GetTrkExtraData(trk); - coOrd p1; + coOrd p0,p1,pd; FLOAT_T ratio; ANGLE_T a, a0, a1; if (hidden) *hidden = FALSE; - if ( (GetTrkType( trk ) != T_CURVE )|| ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) && !show_hidden)) - return 100000; + if ( (GetTrkType( trk ) != T_CURVE ) || ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) && !show_hidden)) + return DIST_INF; + + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); coOrd offset = xx->descriptionOff; if (( GetTrkBits( trk ) & TB_HIDEDESC ) != 0) offset = zero; + if ( xx->helixTurns > 0 ) { - p1.x = xx->pos.x + offset.x; - p1.y = xx->pos.y + offset.y; + pd.x = xx->pos.x + offset.x; + pd.y = xx->pos.y + offset.y; + p0 = pd; + p1 = pd; } else { GetCurveAngles( &a0, &a1, trk ); - ratio = ( offset.x + 1.0 ) / 2.0; - a = a0 + ratio * a1; - ratio = ( offset.y + 1.0 ) / 2.0; - Translate( &p1, xx->pos, a, xx->radius * ratio ); + ratio = offset.x; + if (!IsCurveCircle( trk )) + a = NormalizeAngle(a0 + a1/2.0 + ratio * a1/ 2.0); + else + a = NormalizeAngle(360.0*ratio+a0); + ratio = offset.y+0.5; + if (ratio<0.0) ratio = 0.0; + if (ratio>1.0) ratio = 1.0; + Translate( &pd, xx->pos, a, xx->radius * ratio ); } if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); - *dpos = p1; - return FindDistance( p1, pos ); + *dpos = pd; + + coOrd tpos = pos; + if (DistanceCurve(trk, &tpos)<FindDistance(pd, pos)) + return DistanceCurve(trk, &pos); + return FindDistance( pd, pos ); } @@ -208,7 +215,6 @@ static void DrawCurveDescription( drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(trk); wFont_p fp; coOrd pos, p0, p1; DIST_T elev0, elev1, dist, grade=0, sep=0; @@ -221,6 +227,7 @@ static void DrawCurveDescription( if ((labelEnable&LABELENABLE_TRKDESC)==0) return; + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); if ( xx->helixTurns > 0 ) { pos = xx->pos; pos.x += xx->descriptionOff.x; @@ -240,15 +247,17 @@ static void DrawCurveDescription( } fp = wStandardFont( F_TIMES, FALSE, FALSE ); if (elevValid) - sprintf( message, _("Helix: turns=%ld len=%0.2f grade=%0.1f%% sep=%0.2f"), + sprintf( message, _("Helix: Turns %ld L %0.2f Grade %0.1f%% Sep %0.2f"), xx->helixTurns, dist, grade*100.0, sep ); else - sprintf( message, _("Helix: turns=%ld len=%0.2f"), + sprintf( message, _("Helix: Turns %ld L %0.2f"), xx->helixTurns, dist ); + if (color == drawColorPreviewSelected) + DrawLine(d,xx->pos,pos,0,color); DrawBoxedString( BOX_BOX, d, pos, message, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); } else { dist = trackGauge/2.0; @@ -260,13 +269,36 @@ static void DrawCurveDescription( Translate( &p1, xx->pos, 180.0, dist ); DrawLine( d, p0, p1, 0, color ); GetCurveAngles( &a0, &a1, trk ); - ratio = ( xx->descriptionOff.x + 1.0 ) / 2.0; - a = a0 + ratio * a1; + ratio = xx->descriptionOff.x; // 1.0 to - 1.0 + if (! IsCurveCircle( trk )) + a = NormalizeAngle(ratio*a1/2.0 + a0 + a1/2.0); + else + a = NormalizeAngle(ratio*360.0+a0); PointOnCircle( &p0, xx->pos, xx->radius, a ); - sprintf( message, "R %s", FormatDistance( xx->radius ) ); - ratio = ( xx->descriptionOff.y + 1.0 ) / 2.0; - DrawDimLine( d, xx->pos, p0, message, (wFontSize_t)descriptionFontSize, ratio, 0, color, 0x11 ); + coOrd end0, end1; + DIST_T off; + Translate(&end0,xx->pos,a0,xx->radius); + Translate(&end1,xx->pos,a0+a1,xx->radius); + off = xx->radius-(cos(D2R(a1/2))*xx->radius); + ratio = xx->descriptionOff.y; + if (ratio < -0.5) ratio = -0.5; + if (ratio > 0.5) ratio = 0.5; + if (! IsCurveCircle(trk)) + sprintf( message, "R %s L %s A %0.3f O %s", FormatDistance( xx->radius ), + FormatDistance(FindDistance(end0,end1)),FindAngle(end1,end0), FormatDistance(off)); + else + sprintf( message, "R %s L %s A 360.0", FormatDistance( xx->radius ),FormatDistance(xx->radius*2*M_PI)); + DrawDimLine( d, xx->pos, p0, message, (wFontSize_t)descriptionFontSize, ratio+0.5, 0, color, 0x00 ); + + if (GetTrkBits( trk ) & TB_DETAILDESC) { + coOrd details_pos; + details_pos.x = (p0.x - xx->pos.x)*(ratio+0.5) + xx->pos.x; + details_pos.y = (p0.y - xx->pos.y)*(ratio+0.5) + xx->pos.y-(2*descriptionFontSize/mainD.dpi); + + AddTrkDetails(d, trk, details_pos, a1/180.0*M_PI*xx->radius, color); + } } + } @@ -275,66 +307,47 @@ STATUS_T CurveDescriptionMove( wAction_t action, coOrd pos ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); static coOrd p0,p1; - static BOOL_T editMode; wDrawColor color; ANGLE_T a, a0, a1; DIST_T d; p0 = xx->pos; - switch (action) { - case C_DOWN: - DrawCurveDescription( trk, &mainD, wDrawColorWhite ); - case C_MOVE: - case C_UP: - editMode = TRUE; - color = GetTrkColor( trk, &mainD ); - if ( xx->helixTurns > 0 ) { - xx->descriptionOff.x = (pos.x-xx->pos.x); - xx->descriptionOff.y = (pos.y-xx->pos.y); - p1 = pos; - } else { - p1 = pos; - GetCurveAngles( &a0, &a1, trk ); - if ( a1 < 1 ) a1 = 1.0; - a = FindAngle( xx->pos, pos ); - if ( ! IsCurveCircle( trk ) ) { - a = NormalizeAngle( a - a0 ); - if ( a > a1 ) { - if ( a < a1 + ( 360.0 - a1 ) / 2 ) { - a = a1; - } else { - a = 0.0; - } + color = GetTrkColor( trk, &mainD ); + if ( xx->helixTurns > 0 ) { + xx->descriptionOff.x = (pos.x-xx->pos.x); + xx->descriptionOff.y = (pos.y-xx->pos.y); + p1 = pos; + } else { + p1 = pos; + GetCurveAngles( &a0, &a1, trk ); + if ( a1 < 1 ) a1 = 1.0; + a = FindAngle( xx->pos, pos ); + if ( ! IsCurveCircle( trk ) ) { + a = NormalizeAngle( a - a0 ); + if ( a > a1 ) { + if ( a < a1 + ( 360.0 - a1 ) / 2 ) { + a = a1; + } else { + a = 0.0; } } - xx->descriptionOff.x = ( a / a1 ) * 2.0 - 1.0; - d = FindDistance( xx->pos, pos ) / xx->radius; - if ( d > 0.9 ) - d = 0.9; - if ( d < 0.1 ) - d = 0.1; - xx->descriptionOff.y = d * 2.0 - 1.0; + xx->descriptionOff.x = ( a / a1 ) * 2.0 - 1.0; // -1 to 1, 0 in middle + } else { + a = FindAngle(xx->pos,pos); GetCurveAngles( &a0, &a1, trk ); - a = a0 + (0.5 * a1); - PointOnCircle( &p0, xx->pos, xx->radius/2, a ); - } - if (action == C_UP) { - editMode = FALSE; - DrawCurveDescription( trk, &mainD, wDrawColorBlack ); - } - return action==C_UP?C_TERMINATE:C_CONTINUE; - - case C_REDRAW: - if (editMode) { - DrawLine( &tempD, p0, p1, 0, wDrawColorBlue ); - DrawCurveDescription( trk, &tempD, wDrawColorBlue ); + xx->descriptionOff.x = NormalizeAngle((a - a0)/360.0); } - break; - + d = FindDistance( xx->pos, pos ) / xx->radius; + if ( d > 1.0 ) + d = 1.0; + if ( d < 0.0 ) + d = 0.0; + xx->descriptionOff.y = d-0.5; // -0.5 to 0.5, 0 in the middle } + return C_CONTINUE; } @@ -374,22 +387,21 @@ static descData_t crvDesc[] = { /*A1*/ { DESC_ANGLE, N_("CCW Angle"), &crvData.angle0 }, /*A2*/ { DESC_ANGLE, N_("CW Angle"), &crvData.angle1 }, /*GR*/ { DESC_FLOAT, N_("Grade"), &crvData.grade }, -/*PV*/ { DESC_PIVOT, N_("Pivot"), &crvData.pivot }, +/*PV*/ { DESC_PIVOT, N_("Lock"), &crvData.pivot }, /*LY*/ { DESC_LAYER, N_("Layer"), &crvData.layerNumber }, { DESC_NULL } }; static void UpdateCurve( track_p trk, int inx, descData_p descUpd, BOOL_T final ) { - struct extraData *xx = GetTrkExtraData(trk); BOOL_T updateEndPts; ANGLE_T a0, a1; EPINX_T ep; - struct extraData xx0; FLOAT_T turns; if ( inx == -1 ) return; - xx0 = *xx; + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); + struct extraDataCurve_t xx0 = *xx; updateEndPts = FALSE; GetCurveAngles( &a0, &a1, trk ); switch ( inx ) { @@ -540,11 +552,11 @@ static void UpdateCurve( track_p trk, int inx, descData_p descUpd, BOOL_T final static void DescribeCurve( track_p trk, char * str, CSIZE_T len ) { - struct extraData *xx = GetTrkExtraData(trk); ANGLE_T a0, a1; DIST_T d; int fix0, fix1; FLOAT_T turns; + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); GetCurveAngles( &a0, &a1, trk ); d = xx->radius * 2.0 * M_PI * a1 / 360.0; @@ -649,9 +661,9 @@ static void DescribeCurve( track_p trk, char * str, CSIZE_T len ) static DIST_T DistanceCurve( track_p t, coOrd * p ) { - struct extraData *xx = GetTrkExtraData(t); ANGLE_T a0, a1; DIST_T d; + struct extraDataCurve_t *xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); GetCurveAngles( &a0, &a1, t ); if ( xx->helixTurns > 0 ) { a0 = 0.0; @@ -663,10 +675,10 @@ static DIST_T DistanceCurve( track_p t, coOrd * p ) static void DrawCurve( track_p t, drawCmd_p d, wDrawColor color ) { - struct extraData *xx = GetTrkExtraData(t); ANGLE_T a0, a1; track_p tt = t; long widthOptions = DTS_LEFT|DTS_RIGHT; + struct extraDataCurve_t *xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); GetCurveAngles( &a0, &a1, t ); if (xx->circle) { @@ -684,7 +696,6 @@ static void DrawCurve( track_p t, drawCmd_p d, wDrawColor color ) } DrawCurvedTrack( d, xx->pos, xx->radius, a0, a1, - GetTrkEndPos(t,0), GetTrkEndPos(t,1), t, color, widthOptions ); DrawEndPt( d, t, 0, color ); DrawEndPt( d, t, 1, color ); @@ -696,12 +707,13 @@ static void DeleteCurve( track_p t ) static BOOL_T WriteCurve( track_p t, FILE * f ) { - struct extraData *xx = GetTrkExtraData(t); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); long options; BOOL_T rc = TRUE; options = GetTrkWidth(t) & 0x0F; - if ( ( ( GetTrkBits(t) & TB_HIDEDESC ) != 0 ) == ( xx->helixTurns > 0 ) ) - options |= 0x80; + if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) + // 0x80 means Show Description + options |= 0x80; rc &= fprintf(f, "CURVE %d %d %ld 0 0 %s %d %0.6f %0.6f 0 %0.6f %ld %0.6f %0.6f\n", GetTrkIndex(t), GetTrkLayer(t), (long)options, GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), xx->pos.x, xx->pos.y, xx->radius, @@ -714,7 +726,7 @@ static BOOL_T WriteCurve( track_p t, FILE * f ) static BOOL_T ReadCurve( char * line ) { - struct extraData *xx; + struct extraDataCurve_t *xx; track_p t; wIndex_t index; BOOL_T visible; @@ -739,7 +751,7 @@ static BOOL_T ReadCurve( char * line ) if ( !ReadSegs() ) return FALSE; t = NewTrack( index, T_CURVE, 0, sizeof *xx ); - xx = GetTrkExtraData(t); + xx = GET_EXTRA_DATA(t, T_CURVE, extraDataCurve_t); xx->helixTurns = helixTurns; xx->descriptionOff = descriptionOff; if ( paramVersion < 3 ) { @@ -756,8 +768,15 @@ static BOOL_T ReadCurve( char * line ) SetTrkWidth(t, (int)(options&3)); xx->pos = p; xx->radius = r; - if ( ( ( options & 0x80 ) != 0 ) == ( xx->helixTurns > 0 ) ) - SetTrkBits(t,TB_HIDEDESC); + if ( paramVersion < VERSION_DESCRIPTION2 ) { + if ( xx->helixTurns <= 0 ) { + // Descriptions on by default for helix, off for curves + SetTrkBits(t,TB_HIDEDESC); + } + } else { + if ( paramVersion < VERSION_DESCRIPTION2 || ( ( options & 0x80 ) == 0 ) ) + SetTrkBits(t,TB_HIDEDESC); + } SetEndPts(t,2); if (GetTrkEndAngle( t, 0 ) == 270.0 && GetTrkEndAngle( t, 1 ) == 90.0 ) @@ -768,7 +787,7 @@ static BOOL_T ReadCurve( char * line ) static void MoveCurve( track_p trk, coOrd orig ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); xx->pos.x += orig.x; xx->pos.y += orig.y; ComputeCurveBoundingBox( trk, xx ); @@ -776,14 +795,14 @@ static void MoveCurve( track_p trk, coOrd orig ) static void RotateCurve( track_p trk, coOrd orig, ANGLE_T angle ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); Rotate( &xx->pos, orig, angle ); ComputeCurveBoundingBox( trk, xx ); } static void RescaleCurve( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); xx->pos.x *= ratio; xx->pos.y *= ratio; xx->radius *= ratio; @@ -801,7 +820,7 @@ static ANGLE_T GetAngleCurve( track_p trk, coOrd pos, EPINX_T *ep0, EPINX_T *ep1 static BOOL_T SplitCurve( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); ANGLE_T a, a0, a1; track_p trk1; @@ -841,7 +860,7 @@ static BOOL_T SplitCurve( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, static BOOL_T TraverseCurve( traverseTrack_p trvTrk, DIST_T * distR ) { track_p trk = trvTrk->trk; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); ANGLE_T a, a0, a1, a2, a3; DIST_T arcDist; DIST_T circum; @@ -936,18 +955,19 @@ static BOOL_T TraverseCurve( traverseTrack_p trvTrk, DIST_T * distR ) static BOOL_T EnumerateCurve( track_p trk ) { - struct extraData *xx; + struct extraDataCurve_t *xx; ANGLE_T a0, a1; DIST_T d; if (trk != NULL) { - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); GetCurveAngles( &a0, &a1, trk ); d = (xx->radius + (GetTrkGauge(trk)/2.0))* 2.0 * M_PI * a1 / 360.0; if (xx->helixTurns > 0) d += (xx->helixTurns-(xx->circle?1:0)) * (xx->radius+(GetTrkGauge(trk)/2.0)) * 2.0 * M_PI; ScaleLengthIncrement( GetTrkScale(trk), d ); + return TRUE; } - return TRUE; + return FALSE; } static BOOL_T TrimCurve( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, ANGLE_T angle, DIST_T endradius, coOrd endcenter ) @@ -957,7 +977,7 @@ static BOOL_T TrimCurve( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, ANG ANGLE_T a, aa; ANGLE_T a0, a1; coOrd pos, center; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); if (xx->helixTurns>0) { ErrorMessage( MSG_CANT_TRIM_HELIX ); return FALSE; @@ -984,8 +1004,6 @@ static BOOL_T MergeCurve( track_p trk1, EPINX_T ep1 ) { - struct extraData *xx0 = GetTrkExtraData(trk0); - struct extraData *xx1 = GetTrkExtraData(trk1); ANGLE_T a00, a01, a10, a11; DIST_T d; track_p trk2; @@ -997,6 +1015,8 @@ static BOOL_T MergeCurve( if ( IsCurveCircle(trk0) || IsCurveCircle(trk1) ) return FALSE; + struct extraDataCurve_t *xx0 = GET_EXTRA_DATA(trk0, T_CURVE, extraDataCurve_t); + struct extraDataCurve_t *xx1 = GET_EXTRA_DATA(trk1, T_CURVE, extraDataCurve_t); if ( xx0->helixTurns > 0 || xx1->helixTurns > 0 ) return FALSE; @@ -1034,7 +1054,7 @@ static BOOL_T MergeCurve( ConnectTracks( trk0, ep0, trk2, ep2 ); } DrawNewTrack( trk0 ); - ComputeCurveBoundingBox( trk0, GetTrkExtraData(trk0) ); + ComputeCurveBoundingBox( trk0, GET_EXTRA_DATA(trk0, T_CURVE, extraDataCurve_t) ); return TRUE; } @@ -1055,7 +1075,7 @@ static STATUS_T ModifyCurve( track_p trk, wAction_t action, coOrd pos ) ANGLE_T a, aa1, aa2; DIST_T r, d; track_p trk1; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); switch ( action ) { @@ -1185,7 +1205,7 @@ static DIST_T GetLengthCurve( track_p trk ) DIST_T dist, rad; ANGLE_T a0, a1; coOrd cen; - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); GetTrkCurveCenter( trk, &cen, &rad ); if (xx->circle) @@ -1201,7 +1221,6 @@ static DIST_T GetLengthCurve( track_p trk ) static BOOL_T GetParamsCurve( int inx, track_p trk, coOrd pos, trackParams_t * params ) { - struct extraData *xx = GetTrkExtraData(trk); params->type = curveTypeCurve; GetTrkCurveCenter( trk, ¶ms->arcP, ¶ms->arcR); GetCurveAngles( ¶ms->arcA0, ¶ms->arcA1, trk ); @@ -1214,6 +1233,7 @@ static BOOL_T GetParamsCurve( int inx, track_p trk, coOrd pos, trackParams_t * p FormatDistance( params->arcR ), FormatDistance( easeR ) ); return FALSE; } + struct extraDataCurve_t *xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); if ( inx == PARAMS_EXTEND && ( IsCurveCircle(trk) || xx->helixTurns > 0 ) ) { ErrorMessage( MSG_CANT_EXTEND_HELIX ); return FALSE; @@ -1262,7 +1282,7 @@ static BOOL_T MoveEndPtCurve( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d0 ) static BOOL_T QueryCurve( track_p trk, int query ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCurve_t * xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); switch ( query ) { case Q_CAN_PARALLEL: case Q_CAN_MODIFYRADIUS: @@ -1305,7 +1325,7 @@ static void FlipCurve( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataCurve_t * xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); FlipPoint( &xx->pos, orig, angle ); ComputeCurveBoundingBox( trk, xx ); } @@ -1321,8 +1341,8 @@ static BOOL_T MakeParallelCurve( coOrd * p1R, BOOL_T track) { - struct extraData * xx = GetTrkExtraData(trk); - struct extraData * xx1; + struct extraDataCurve_t * xx = GET_EXTRA_DATA(trk, T_CURVE, extraDataCurve_t); + struct extraDataCurve_t * xx1; DIST_T rad; ANGLE_T a0, a1; @@ -1336,7 +1356,7 @@ static BOOL_T MakeParallelCurve( if ( newTrkR ) { if (track) { *newTrkR = NewCurvedTrack( xx->pos, rad, a0, a1, 0 ); - xx1 = GetTrkExtraData(*newTrkR); + xx1 = GET_EXTRA_DATA(*newTrkR, T_CURVE, extraDataCurve_t); xx1->helixTurns = xx->helixTurns; xx1->circle = xx->circle; } @@ -1376,8 +1396,8 @@ static BOOL_T MakeParallelCurve( static wBool_t CompareCurve( track_cp trk1, track_cp trk2 ) { - struct extraData * ed1 = GetTrkExtraData( trk1 ); - struct extraData * ed2 = GetTrkExtraData( trk2 ); + struct extraDataCurve_t * ed1 = GET_EXTRA_DATA( trk1, T_CURVE, extraDataCurve_t ); + struct extraDataCurve_t * ed2 = GET_EXTRA_DATA( trk2, T_CURVE, extraDataCurve_t ); char * cp = message+strlen(message); REGRESS_CHECK_POS( "POS", ed1, ed2, pos ) REGRESS_CHECK_DIST( "RADIUS", ed1, ed2, radius ) @@ -1581,7 +1601,8 @@ EXPORT void PlotCurve( coOrd pos1, coOrd pos2, curveData_t * curveData, - BOOL_T constrain ) //Make the Radius be in steps of radiusGranularity (1/8) + BOOL_T constrain, //Make the Radius be in steps of radiusGranularity (1/8) + DIST_T desired_r) //Target one radius if close { DIST_T d0, d2, r; ANGLE_T angle, a0, a1, a2; @@ -1604,19 +1625,36 @@ LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*ma } else if (a1 >= 179.0 && a1 <= 181.0) { curveData->type = curveTypeNone; } else { + BOOL_T found = FALSE; if (a1<180.0) { a2 = NormalizeAngle( angle + 90.0 ); - if (constrain) - curveData->curveRadius = ConstrainR( d0/sin(D2R(a1)) ); - else - curveData->curveRadius = d0/sin(D2R(a1)); + if (desired_r > 0.0) { + if (IsClose(fabs(d0/sin(D2R(a1))-desired_r))) { + curveData->curveRadius = desired_r; + found = TRUE; + } + } + if (!found) { + if (constrain) + curveData->curveRadius = ConstrainR( d0/sin(D2R(a1)) ); + else + curveData->curveRadius = d0/sin(D2R(a1)); + } } else { a1 -= 360.0; a2 = NormalizeAngle( angle - 90.0 ); - if (constrain) - curveData->curveRadius = ConstrainR( d0/sin(D2R(-a1)) ); - else - curveData->curveRadius = d0/sin(D2R(-a1)); + if (desired_r > 0.0) { + if (IsClose(fabs(d0/sin(D2R(-a1))-desired_r))) { + curveData->curveRadius = desired_r; + found = TRUE; + } + } + if (!found){ + if (constrain) + curveData->curveRadius = ConstrainR( d0/sin(D2R(-a1)) ); + else + curveData->curveRadius = d0/sin(D2R(-a1)); + } } if (curveData->curveRadius > 1000) { LOG( log_curve, 3, ( "Straight %0.3f > 1000\n", curveData->curveRadius ) ) @@ -1702,10 +1740,10 @@ LOG( log_curve, 3, ( "Straight: %0.3f < %0.3f\n", d0*sin(D2R(a1)), (4.0/75.0)*ma EXPORT track_p NewCurvedTrack( coOrd pos, DIST_T r, ANGLE_T a0, ANGLE_T a1, long helixTurns ) { - struct extraData *xx; + struct extraDataCurve_t *xx; track_p p; p = NewTrack( 0, T_CURVE, 2, sizeof *xx ); - xx = GetTrkExtraData(p); + xx = GET_EXTRA_DATA(p, T_CURVE, extraDataCurve_t); xx->pos = pos; xx->radius = r; xx->helixTurns = helixTurns; diff --git a/app/bin/tease.c b/app/bin/tease.c index dec0801..adfff18 100644 --- a/app/bin/tease.c +++ b/app/bin/tease.c @@ -60,8 +60,6 @@ For a better representation of this, build 'testjoin' and do 'testjoin psplot 10 10 40 1 | lpr -Ppostscript' */ -#include <math.h> - #include "common.h" #include "track.h" #include "tcornu.h" @@ -71,17 +69,16 @@ do 'testjoin psplot 10 10 40 1 | lpr -Ppostscript' #include "cjoin.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" -#include "utility.h" +#include "common-ui.h" static TRKTYP_T T_EASEMENT = -1; static ANGLE_T JOINT_ANGLE_INCR = 2.0; -struct extraData { +typedef struct extraDataEase_t { + extraDataBase_t base; DIST_T l0, l1; /* curve start and end parameter */ DIST_T R, L; /* curve control parameters */ BOOL_T flip; /* T: endPt[1] - is l0 */ @@ -89,17 +86,9 @@ struct extraData { BOOL_T Scurve; /* T: is an S-curve */ coOrd pos; /* Pos of origin */ ANGLE_T angle; /* Angle of curve tangent */ - }; - -#define xl0 extraData->l0 -#define xl1 extraData->l1 -#define xR extraData->R -#define xL extraData->L -#define xflip extraData->flip -#define xnegate extraData->negate -#define xScurve extraData->Scurve -#define xpos extraData->pos -#define xangle extraData->angle + coOrd descriptionOff; /* Offset of description */ + } extraDataEase_t; + #define EASE_MIN_X (0.01) @@ -168,7 +157,7 @@ static void ComputeJoinPos( DIST_T r; coOrd pp, pc; if (l==0.0) - r = 100000.0; + r = DIST_INF; else r = (R*L)/l; pp.y = l; @@ -406,13 +395,14 @@ static track_p NewJoint( */ { track_p trk; - struct extraData *xx; + struct extraDataEase_t *xx; coOrd p, p0, p1, q0, q1; static coOrd qZero = { 0.0, 0.0 }; ANGLE_T az0, a01, b, b01, b1, d, d1; trk = NewTrack( 0, T_EASEMENT, 2, sizeof *xx ); + SetTrkBits(trk, TB_HIDEDESC); //Suppress Description for new Joint SetTrkScale( trk, GetLayoutCurScale() ); - xx = GetTrkExtraData( trk ); + xx = GET_EXTRA_DATA( trk, T_EASEMENT, extraDataEase_t ); SetTrkEndPoint( trk, 0, pos0, NormalizeAngle(angle0+180.0) ); SetTrkEndPoint( trk, 1, pos1, NormalizeAngle(angle1+180.0) ); xx->R = R; @@ -474,9 +464,9 @@ LOG( log_ease, 1, ( "NewJoint( [%0.3f %0.3f] A%0.3f, [%0.3f %0.3f] A%0.3f\n B static DIST_T GetLengthJoint( track_p trk ) { - struct extraData *xx; + struct extraDataEase_t *xx; DIST_T d0, d1; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); d0 = JoinD( xx->l0, xx->R, xx->L ); d1 = JoinD( xx->l1, xx->R, xx->L ); if (xx->Scurve) @@ -487,9 +477,9 @@ static DIST_T GetLengthJoint( track_p trk ) static DIST_T GetFlexLengthJoint( track_p trk ) { - struct extraData *xx; + struct extraDataEase_t *xx; DIST_T d0, d1, d3; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); d0 = JoinD( xx->l0, xx->R+(GetTrkGauge(trk)/2.0), xx->L ); d1 = JoinD( xx->l1, xx->R+(GetTrkGauge(trk)/2.0), xx->L ); d3 = JoinD( xx->l1, xx->R-(GetTrkGauge(trk)/2.0), xx->L ); @@ -527,7 +517,7 @@ static descData_t jointDesc[] = { /*L0*/ { DESC_DIM, N_("l0"), &jointData.l0 }, /*L1*/ { DESC_DIM, N_("l1"), &jointData.l1 }, /*GR*/ { DESC_FLOAT, N_("Grade"), &jointData.grade }, -/*PV*/ { DESC_PIVOT, N_("Pivot"), &jointData.pivot }, +/*PV*/ { DESC_PIVOT, N_("Lock"), &jointData.pivot }, /*LY*/ { DESC_LAYER, N_("Layer"), &jointData.layerNumber }, { DESC_NULL } }; @@ -564,7 +554,7 @@ static void DescribeJoint( * Print some interesting info about the track. */ { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataEase_t *xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); int fix0, fix1; sprintf( str, _("Joint Track(%d): Layer=%d Length=%0.3f EP=[%0.3f,%0.3f A%0.3f] [%0.3f,%0.3f A%0.3f]"), GetTrkIndex(trk), @@ -681,7 +671,7 @@ static DIST_T DistanceJoint( * Determine how close (p) is to (t). */ { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); return JointDistance( p, xx->pos, xx->angle, xx->l0, xx->l1, xx->R, xx->L, xx->negate, xx->Scurve ); } @@ -710,6 +700,7 @@ static void DrawJointSegment( coOrd p0, p1; ANGLE_T a0, a1; int cnt1; + wDrawWidth thick = 3; ComputeJoinPos( l0, R, L, NULL, &a0, NULL, NULL ); ComputeJoinPos( l1, R, L, NULL, &a1, NULL, NULL ); @@ -723,6 +714,9 @@ static void DrawJointSegment( a0 += a1; ll = sqrt( sin(D2R(a0)) * 2 * R * L ); GetJointPos( &p1, NULL, ll, R, L, P, A, N ); + if (widthOptions&DTS_CENTERONLY) { + DrawLine(d,p0,p1,thick,color); + } DrawStraightTrack( d, p0, p1, FindAngle( p1, p0 ), trk, color, widthOptions ); p0 = p1; @@ -760,6 +754,95 @@ EXPORT coOrd GetJointSegEndPos( return p1; } +STATUS_T JointDescriptionMove( + track_p trk, + wAction_t action, + coOrd pos ) +{ + struct extraDataEase_t *xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); + ANGLE_T ap; + coOrd end0, end1; + end0 = GetTrkEndPos(trk,0);; + end1 = GetTrkEndPos(trk,1); + ap = NormalizeAngle(FindAngle(end0,pos)-FindAngle(end0,end1)); + + xx->descriptionOff.y = FindDistance(end0,pos)*sin(D2R(ap)); + xx->descriptionOff.x = -0.5 + FindDistance(end0,pos)*cos(D2R(ap))/FindDistance(end0,end1); + if (xx->descriptionOff.x > 0.5) xx->descriptionOff.x = 0.5; + if (xx->descriptionOff.x < -0.5) xx->descriptionOff.x = -0.5; + + return C_CONTINUE; +} + +DIST_T JointDescriptionDistance( + coOrd pos, + track_p trk, + coOrd * dpos, + BOOL_T show_hidden, + BOOL_T * hidden) +{ + coOrd p1; + if (hidden) *hidden = FALSE; + if ( GetTrkType( trk ) != T_EASEMENT || ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) && !show_hidden)) + return DIST_INF; + + struct extraDataEase_t *xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); + coOrd end0, end0off, end1, end1off; + end0 = GetTrkEndPos(trk,0); + end1 = GetTrkEndPos(trk,1); + ANGLE_T a = FindAngle(end0,end1); + Translate(&end0off,end0,a+90,xx->descriptionOff.y); + Translate(&end1off,end1,a+90,xx->descriptionOff.y); + + p1.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + p1.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y; + + if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); + *dpos = p1; + + coOrd tpos = pos; + if (DistanceJoint(trk,&tpos)<FindDistance( p1, pos )) + return DistanceJoint(trk,&pos); + return FindDistance( p1, pos ); +} +static void DrawJointDescription( + track_p trk, + drawCmd_p d, + wDrawColor color ) +{ + DIST_T grade=0, sep=0; + ANGLE_T a; + if (layoutLabels == 0) + return; + if ((labelEnable&LABELENABLE_TRKDESC)==0 ) + return; + + coOrd end0, end0off, end1, end1off; + end0 = GetTrkEndPos(trk,0); + end1 = GetTrkEndPos(trk,1); + a = FindAngle(end0,end1); + struct extraDataEase_t *xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); + Translate(&end0off,end0,a+90,xx->descriptionOff.y); + Translate(&end1off,end1,a+90,xx->descriptionOff.y); + + sprintf( message, "Joint: L %s A %0.3f, l0 %s l1 %s R %s L %s\n", + FormatDistance(FindDistance(end0,end1)),FindAngle(end0,end1), + FormatDistance(xx->l0), FormatDistance(xx->l1), FormatDistance(xx->R), FormatDistance(xx->L)); + DrawLine(d,end0,end0off,0,color); + DrawLine(d,end1,end1off,0,color); + DrawDimLine( d, end0off, end1off, message, (wFontSize_t)descriptionFontSize, xx->descriptionOff.x+0.5, 0, color, 0x00 ); + + if (GetTrkBits( trk ) & TB_DETAILDESC) { + coOrd details_pos; + details_pos.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + details_pos.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y - (2*descriptionFontSize/mainD.dpi); + + AddTrkDetails(d, trk, details_pos, FindDistance(end0,end1), color); + } + + +} + EXPORT void DrawJointTrack( drawCmd_p d, @@ -801,16 +884,6 @@ EXPORT void DrawJointTrack( return; } LOG( log_ease, 4, ( "DJT( (X%0.3f Y%0.3f A%0.3f) \n", pos.x, pos.y, angle ) ) -#ifdef LATER - scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; - -#ifdef WINDOWS - width *= (wDrawWidth)(d->dpi/mainD.dpi); -#else - if (d->options&DC_PRINT) - width *= 300/75; -#endif -#endif if (color == wDrawColorBlack) color = normalColor; if (!Scurve) { @@ -833,6 +906,13 @@ LOG( log_ease, 4, ( "DJT( (X%0.3f Y%0.3f A%0.3f) \n", pos.x, pos.y, angle ) ) } DrawEndPt( d, trk, ep0, color ); DrawEndPt( d, trk, ep1, color ); + if (((d->options&(DC_SIMPLE|DC_SEGTRACK))==0) && + (labelWhen == 2 || (labelWhen == 1 && (d->options&DC_PRINT))) && + labelScale >= d->scale && + ( GetTrkBits( trk ) & TB_HIDEDESC ) == 0 ) { + DrawJointDescription( trk, d, color ); + } + } @@ -844,7 +924,7 @@ static void DrawJoint( * Draw a transition-curve. */ { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); long widthOptions = 0; DrawJointTrack( d, xx->pos, xx->angle, xx->l0, xx->l1, xx->R, xx->L, xx->negate, xx->flip, xx->Scurve, trk, 0, 1, GetTrkGauge(trk), color, widthOptions ); @@ -864,12 +944,16 @@ static BOOL_T WriteJoint( * Write track data to a file (f). */ { - struct extraData * xx = GetTrkExtraData(t); + struct extraDataEase_t * xx = GET_EXTRA_DATA(t, T_EASEMENT, extraDataEase_t); BOOL_T rc = TRUE; - rc &= fprintf(f, "JOINT %d %d %ld 0 0 %s %d %0.6f %0.6f %0.6f %0.6f %d %d %d %0.6f %0.6f 0 %0.6f\n", - GetTrkIndex(t), GetTrkLayer(t), (long)GetTrkWidth(t), - GetTrkScaleName(t), GetTrkVisible(t), xx->l0, xx->l1, xx->R, xx->L, - xx->flip, xx->negate, xx->Scurve, xx->pos.x, xx->pos.y, xx->angle )>0; + long options = (long)GetTrkWidth(t); + if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) + // 0x80 means Show Description + options |= 0x80; + rc &= fprintf(f, "JOINT %d %d %ld 0 0 %s %d %0.6f %0.6f %0.6f %0.6f %d %d %d %0.6f %0.6f 0 %0.6f %0.6f %0.6f\n", + GetTrkIndex(t), GetTrkLayer(t), options, + GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), xx->l0, xx->l1, xx->R, xx->L, + xx->flip, xx->negate, xx->Scurve, xx->pos.x, xx->pos.y, xx->angle, xx->descriptionOff.x, xx->descriptionOff.y )>0; rc &= WriteEndPt( f, t, 0 ); rc &= WriteEndPt( f, t, 1 ); rc &= fprintf(f, "\t%s\n", END_SEGS )>0; @@ -885,20 +969,27 @@ static BOOL_T ReadJoint( track_p trk; TRKINX_T index; BOOL_T visible; - struct extraData e, *xx; + struct extraDataEase_t e, *xx; char scale[10]; wIndex_t layer; long options; DIST_T elev; + char * cp = NULL; + coOrd descriptionOff = {0.0,0.0}; - if ( !GetArgs( line+6, paramVersion<3?"dXZsdffffdddpYf":paramVersion<9?"dLl00sdffffdddpYf":"dLl00sdffffdddpff", + if ( !GetArgs( line+6, paramVersion<3?"dXZsdffffdddpYfc":paramVersion<9?"dLl00sdffffdddpYfc":"dLl00sdffffdddpffc", &index, &layer, &options, scale, &visible, &e.l0, &e.l1, &e.R, &e.L, - &e.flip, &e.negate, &e.Scurve, &e.pos, &elev, &e.angle) ) + &e.flip, &e.negate, &e.Scurve, &e.pos, &elev, &e.angle, &cp) ) return FALSE; + if (cp) { + if (!GetArgs(cp,"p",&descriptionOff)) + return FALSE; + } if ( !ReadSegs() ) return FALSE; trk = NewTrack( index, T_EASEMENT, 0, sizeof e ); - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); + xx->descriptionOff = descriptionOff; if ( paramVersion < 3 ) { SetTrkVisible(trk, visible!=0); SetTrkNoTies(trk, FALSE); @@ -911,6 +1002,9 @@ static BOOL_T ReadJoint( SetTrkScale(trk, LookupScale(scale)); SetTrkLayer(trk, layer); SetTrkWidth(trk, (int)(options&3)); + if ( paramVersion < VERSION_DESCRIPTION2 || ( ( options & 0x80 ) == 0 ) ) + SetTrkBits(trk,TB_HIDEDESC); + e.base.trkType = T_EASEMENT; *xx = e; SetEndPts( trk, 2 ); ComputeBoundingBox( trk ); @@ -924,7 +1018,7 @@ static void MoveJoint( * Move a track. */ { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); xx->pos.x += orig.x; xx->pos.y += orig.y; ComputeBoundingBox( trk ); @@ -938,7 +1032,7 @@ static void RotateJoint( * Rotate a track. */ { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); Rotate( &xx->pos, orig, angle ); xx->angle = NormalizeAngle( xx->angle+angle ); ComputeBoundingBox( trk ); @@ -947,7 +1041,7 @@ static void RotateJoint( static void RescaleJoint( track_p trk, FLOAT_T ratio ) { - struct extraData *xx = GetTrkExtraData(trk); + struct extraDataEase_t *xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); xx->pos.x *= ratio; xx->pos.y *= ratio; xx->R *= ratio; @@ -959,9 +1053,9 @@ static void RescaleJoint( track_p trk, FLOAT_T ratio ) static ANGLE_T GetAngleJoint( track_p trk, coOrd pos, EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraData * xx = GetTrkExtraData(trk); DIST_T l; ANGLE_T a; + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); if ( ep0 && ep1 ) { if (xx->flip) { *ep0 = 1; @@ -990,11 +1084,11 @@ static ANGLE_T GetAngleJoint( track_p trk, coOrd pos, EPINX_T * ep0, EPINX_T * e static void SplitJointA( coOrd * posR, EPINX_T ep, - struct extraData * xx, - struct extraData * xx1, + struct extraDataEase_t * xx, + struct extraDataEase_t * xx1, ANGLE_T * aR ) { - struct extraData * xx0; + struct extraDataEase_t * xx0; BOOL_T flip; DIST_T l; @@ -1048,13 +1142,13 @@ static void SplitJointA( static BOOL_T SplitJoint( track_p trk, coOrd pos, EPINX_T ep, track_p * leftover, EPINX_T *ep0, EPINX_T *ep1 ) { - struct extraData *xx, *xx1; + struct extraDataEase_t *xx, *xx1; track_p trk1; ANGLE_T a; - xx = GetTrkExtraData(trk); + xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); trk1 = NewTrack( 0, T_EASEMENT, 2, sizeof *xx ); - xx1 = GetTrkExtraData(trk1); + xx1 = GET_EXTRA_DATA(trk1, T_EASEMENT, extraDataEase_t); *xx1 = *xx; SetTrkEndPoint( trk1, ep, GetTrkEndPos(trk,ep), GetTrkEndAngle(trk,ep) ); *leftover = trk1; @@ -1169,7 +1263,7 @@ static BOOL_T TraverseJointTrack( DIST_T * distR ) { track_p trk = trvTrk->trk; - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); BOOL_T rc; EPINX_T ep; ANGLE_T angle; @@ -1196,8 +1290,9 @@ static BOOL_T EnumerateJoint( track_p trk ) { if (trk != NULL) { ScaleLengthIncrement( GetTrkScale(trk), GetFlexLengthJoint(trk) ); + return TRUE; } - return TRUE; + return FALSE; } static BOOL_T TrimJoint( track_p trk, EPINX_T ep, DIST_T maxX, coOrd endpos, ANGLE_T angle, DIST_T radius, coOrd center ) @@ -1217,8 +1312,8 @@ static BOOL_T MergeJoint( EPINX_T ep2=-1; coOrd pos; ANGLE_T a; - struct extraData *xx0 = GetTrkExtraData(trk0); - struct extraData *xx1 = GetTrkExtraData(trk1); + struct extraDataEase_t *xx0 = GET_EXTRA_DATA(trk0, T_EASEMENT, extraDataEase_t); + struct extraDataEase_t *xx1 = GET_EXTRA_DATA(trk1, T_EASEMENT, extraDataEase_t); if ( ep0 == ep1 ) return FALSE; @@ -1287,7 +1382,7 @@ static BOOL_T MoveEndPtJoint( track_p *trk, EPINX_T *ep, coOrd pos, DIST_T d ) static BOOL_T QueryJoint( track_p trk, int query ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); track_p trk1; switch ( query ) { @@ -1304,6 +1399,8 @@ static BOOL_T QueryJoint( track_p trk, int query ) SplitTrack( trk, xx->pos, 0, &trk1, FALSE ); } return TRUE; + case Q_HAS_DESC: + return TRUE; default: return FALSE; } @@ -1315,7 +1412,7 @@ static void FlipJoint( coOrd orig, ANGLE_T angle ) { - struct extraData * xx = GetTrkExtraData(trk); + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t); FlipPoint( &xx->pos, orig, angle ); xx->angle = NormalizeAngle( 2*angle - xx->angle ); xx->negate = !xx->negate; @@ -1333,7 +1430,7 @@ static BOOL_T MakeParallelJoint( coOrd * p1R, BOOL_T track) { - struct extraData * xx = GetTrkExtraData(trk), *xx1; + struct extraDataEase_t * xx = GET_EXTRA_DATA(trk, T_EASEMENT, extraDataEase_t), *xx1; ANGLE_T angle, A; coOrd p0, p1, P, q1, r1; DIST_T d, d0; @@ -1385,7 +1482,7 @@ static BOOL_T MakeParallelJoint( if ( newTrkR ) { if (track) { *newTrkR = NewTrack( 0, T_EASEMENT, 2, sizeof *xx ); - xx1 = GetTrkExtraData( *newTrkR ); + xx1 = GET_EXTRA_DATA( *newTrkR, T_EASEMENT, extraDataEase_t ); *xx1 = *xx; xx1->angle = A; xx1->R = R; @@ -1447,8 +1544,8 @@ static BOOL_T MakeParallelJoint( static wBool_t CompareJoint( track_cp trk1, track_cp trk2 ) { - struct extraData *xx1 = GetTrkExtraData( trk1 ); - struct extraData *xx2 = GetTrkExtraData( trk2 ); + struct extraDataEase_t *xx1 = GET_EXTRA_DATA( trk1, T_EASEMENT, extraDataEase_t ); + struct extraDataEase_t *xx2 = GET_EXTRA_DATA( trk2, T_EASEMENT, extraDataEase_t ); char * cp = message + strlen(message); REGRESS_CHECK_DIST( "L0", xx1, xx2, l0 ); REGRESS_CHECK_DIST( "L1", xx1, xx2, l1 ); @@ -1507,7 +1604,7 @@ EXPORT void JointSegProc( DIST_T l; ANGLE_T a; BOOL_T flip; - struct extraData * xx, xxx[2]; + struct extraDataEase_t * xx, xxx[2]; coOrd p; int inx; EPINX_T ep0; @@ -1581,7 +1678,7 @@ LOG( log_traverseJoint, 1, ( "TJ0: ?[%0.3f %0.3f] A=%0.3f l=%0.3f J[%0.3f %0.3f] case SEGPROC_NEWTRACK: data->newTrack.trk = NewTrack( 0, T_EASEMENT, 2, sizeof *xx ); - xx = GetTrkExtraData(data->newTrack.trk); + xx = GET_EXTRA_DATA(data->newTrack.trk, T_EASEMENT, extraDataEase_t); xx->pos = segPtr->u.j.pos; xx->angle = segPtr->u.j.angle; xx->l0 = segPtr->u.j.l0; @@ -1620,6 +1717,8 @@ LOG( log_traverseJoint, 1, ( "TJ0: ?[%0.3f %0.3f] A=%0.3f l=%0.3f J[%0.3f %0.3f] break; case SEGPROC_SPLIT: + xxx[0].base.trkType = T_EASEMENT; + xxx[1].base.trkType = T_EASEMENT; xxx[0].pos = segPtr->u.j.pos; xxx[0].angle = segPtr->u.j.angle; xxx[0].l0 = segPtr->u.j.l0; @@ -1759,12 +1858,12 @@ EXPORT void UndoJoint( track_p trk1, EPINX_T ep1 ) { - struct extraData * xx; + struct extraDataEase_t * xx; DIST_T d; if ( GetTrkType(trk1) != T_EASEMENT ) return; - xx = GetTrkExtraData(trk1); + xx = GET_EXTRA_DATA(trk1, T_EASEMENT, extraDataEase_t); if ( ep1 == 0 ) d = xx->L/2.0 - xx->l0; else diff --git a/app/bin/textnoteui.c b/app/bin/textnoteui.c index 331cfb5..ba255ea 100644 --- a/app/bin/textnoteui.c +++ b/app/bin/textnoteui.c @@ -20,20 +20,15 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> -#include <stdbool.h> - #include "custom.h" #include "dynstring.h" -#include "i18n.h" #include "misc.h" #include "note.h" #include "param.h" #include "shortentext.h" #include "track.h" -#include "wlib.h" -static struct extraDataNote noteDataInUI; +static struct extraDataNote_t noteDataInUI; static paramTextData_t noteTextData = { 300, 150 }; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; @@ -43,12 +38,12 @@ static paramData_t textEditPLs[] = { #define I_ORIGY (1) /*1*/ { PD_FLOAT, ¬eDataInUI.pos.y, "origy", PDO_DIM, &r_1000_1000, N_("Position Y") }, #define I_LAYER (2) - /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, (void*)150, "Layer", 0 }, + /*2*/ { PD_DROPLIST, ¬eDataInUI.layer, "layer", 0, I2VP(150), "Layer", 0 }, #define I_TEXT (3) /*3*/ { PD_TEXT, NULL, "text", PDO_NOPREF, ¬eTextData, N_("Note") } }; -static paramGroup_t textEditPG = { "textEdit", 0, textEditPLs, sizeof textEditPLs / sizeof textEditPLs[0] }; +static paramGroup_t textEditPG = { "textEdit", 0, textEditPLs, COUNT( textEditPLs ) }; static wWin_p textEditW; #define textEntry ((wText_p)textEditPLs[I_TEXT].control) @@ -147,7 +142,7 @@ TextEditOK(void *junk) UpdateText(¬eDataInUI, OK_TEXT, FALSE); wHide(textEditW); ResetIfNotSticky(); - FileIsChanged(); + SetFileChanged(); } @@ -161,7 +156,7 @@ TextEditOK(void *junk) static void CreateEditTextNote(track_p trk, char *title) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); // create the dialog if necessary if (!textEditW) { @@ -201,7 +196,7 @@ CreateEditTextNote(track_p trk, char *title) void DescribeTextNote(track_p trk, char * str, CSIZE_T len) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); char *noteText; DynString statusLine; @@ -233,7 +228,7 @@ void DescribeTextNote(track_p trk, char * str, CSIZE_T len) */ void NewTextNoteUI(track_p trk) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); char *tmpPtrText = _("Replace this text with your note"); xx->noteData.text = MyStrdup(tmpPtrText); diff --git a/app/bin/track.c b/app/bin/track.c index c9ec7db..7a69160 100644 --- a/app/bin/track.c +++ b/app/bin/track.c @@ -20,13 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <assert.h> -#include <time.h> -#include <ctype.h> -#include <stdarg.h> -#include <math.h> -#include <string.h> - #include "ccurve.h" #include "cjoin.h" #include "compound.h" @@ -36,15 +29,13 @@ #include "custom.h" #include "draw.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "paths.h" #include "track.h" -#include "utility.h" #include "misc.h" #include "ctrain.h" +#include "common-ui.h" #ifndef TRACKDEP #ifndef FASTTRACK @@ -52,20 +43,25 @@ #endif #endif -#ifndef WINDOWS -#include <errno.h> -#else -// starting from Visual Studio 2015 round is in the runtime library, fake otherwise -#if ( _MSC_VER < 1900 ) -#define round(x) floor((x)+0.5) -#endif -#endif +#include <inttypes.h> + +#include <stdint.h> + +#define SLOG_FMT "0x%.12" PRIxPTR EXPORT char tempSpecial[4096]; +/** @logcmd @showrefby track=n track.c */ static int log_track = 0; +/** @logcmd @showrefby endPt=n track.c */ static int log_endPt = 0; +/** @logcmd @showrefby readTracks=n track.c */ static int log_readTracks = 0; +/** @logcmd @showrefby timedrawtracks=n track.c */ +static int log_timedrawtracks = 0; + +// Enable trkType checks on extraData*_t +#define CHECK_EXTRA_DATA /***************************************************************************** * @@ -83,7 +79,6 @@ EXPORT long drawEndPtV = 2; EXPORT long drawUnconnectedEndPt = 0; /**< How do we draw Unconnected EndPts */ EXPORT long centerDrawMode = FALSE; /**< flag to control drawing of circle centers */ -EXPORT long printCenterLines = FALSE; /**< flag to control drawing of centerline in Print */ static BOOL_T exportingTracks = FALSE; @@ -101,7 +96,7 @@ EXPORT unsigned int curTrackLayer; EXPORT coOrd descriptionOff; EXPORT DIST_T roadbedWidth = 0.0; -EXPORT DIST_T roadbedLineWidth = 3.0/75.0; +EXPORT DIST_T roadbedLineWidth = 3.0/BASE_DPI; //EXPORT DIST_T minTrackRadius; //EXPORT DIST_T maxTrackGrade = 5.0; @@ -116,6 +111,8 @@ static BOOL_T inDrawTracks; static wBool_t bWriteEndPtDirectIndex = FALSE; +EXPORT wBool_t bFreeTrack = FALSE; + #ifndef TRACKDEP /***************************************************************************** @@ -252,20 +249,32 @@ EXPORT BOOL_T CheckTrackLayerSilent( track_p trk ) */ -EXPORT void EnumerateTracks( void ) +EXPORT void EnumerateTracks( void * unused ) { track_p trk; TRKINX_T inx; - enumerateMaxDescLen = strlen("Description"); + enumerateMaxDescLen = (int)strlen("Description"); + + BOOL_T content = FALSE; TRK_ITERATE( trk ) { /* * process track piece if none are selected (list all) or if it is one of the * selected pieces (list only selected ) */ - if ((!selectedTrackCount || GetTrkSelected(trk)) && trackCmds(trk->type)->enumerate != NULL) - trackCmds(trk->type)->enumerate( trk ); + if ((!selectedTrackCount || GetTrkSelected(trk)) && trackCmds(trk->type)->enumerate != NULL) { + if (trackCmds(trk->type)->enumerate( trk )==TRUE) content = TRUE; + } + } + + if (content == FALSE) { + wBeep(); + if (selectedTrackCount == 0) + InfoMessage(_("No track or structure pieces are present in layout")); + else + InfoMessage(_("No track or structure pieces are selected")); + return; } EnumerateStart(); @@ -328,6 +337,7 @@ EXPORT void InitTrkTrack( void ) log_track = LogFindIndex( "track" ); log_endPt = LogFindIndex( "endPt" ); log_readTracks = LogFindIndex( "readTracks" ); + log_timedrawtracks = LogFindIndex( "timedrawtracks" ); } /***************************************************************************** @@ -389,8 +399,24 @@ EXPORT EPINX_T GetTrkEndPtCnt( track_cp trk ) return trk->endCnt; } -EXPORT struct extraData * GetTrkExtraData( track_cp trk ) +EXPORT struct extraDataBase_t * GetTrkExtraData( track_cp trk, TRKTYP_T trkType ) { +//printf( "GTXD T%d TY%d\n", GetTrkIndex(trk), trkType ); + if ( IsTrackDeleted(trk) ) { + // We've been called by FreeTracks() which is called from + // - ClearTracks to remove all tracks + // - DoRegression to remove expected track + // - UndoStart / UndoDelete + // Anywhere else: needs investigation + if ( bFreeTrack == FALSE ) + printf( "GetExtraData T%d is deleted!\n", trk->index ); + return trk->extraData; + } +#ifdef CHECK_EXTRA_DATA + ASSERT( trk->extraData ); + ASSERT( trk->type == trk->extraData->trkType ); + ASSERT( trkType == T_NOTRACK || trk->type == trkType ); +#endif return trk->extraData; } @@ -455,7 +481,10 @@ EXPORT void SetTrkWidth( track_p trk, int width ) EXPORT int GetTrkBits( track_p trk ) { - return trk->bits; + if (trk) + return trk->bits; + else + return 0; } EXPORT int SetTrkBits( track_p trk, int bits ) @@ -530,20 +559,24 @@ EXPORT DIST_T GetTrkEndElevHeight( track_p trk, EPINX_T e ) return trk->endPt[e].elev.u.height; } -EXPORT BOOL_T GetTrkEndElevCachedHeight (track_p trk, EPINX_T e, DIST_T * height, DIST_T * length) +BOOL_T bCacheElev = TRUE; + +EXPORT BOOL_T GetTrkEndElevCachedHeight (track_p trk, EPINX_T e, DIST_T * height, DIST_T * grade) { + if ( ! bCacheElev ) + return FALSE; if (trk->endPt[e].elev.cacheSet) { *height = trk->endPt[e].elev.cachedElev; - *length = trk->endPt[e].elev.cachedLength; + *grade = trk->endPt[e].elev.cachedGrade; return TRUE; } return FALSE; } -EXPORT void SetTrkEndElevCachedHeight ( track_p trk, EPINX_T e, DIST_T height, DIST_T length) +EXPORT void SetTrkEndElevCachedHeight ( track_p trk, EPINX_T e, DIST_T height, DIST_T grade) { trk->endPt[e].elev.cachedElev = height; - trk->endPt[e].elev.cachedLength = length; + trk->endPt[e].elev.cachedGrade = grade; trk->endPt[e].elev.cacheSet = TRUE; } @@ -767,7 +800,7 @@ EXPORT EPINX_T PickUnconnectedEndPoint( coOrd p, track_cp trk ) EXPORT EPINX_T PickUnconnectedEndPointSilent( coOrd p, track_cp trk ) { EPINX_T inx, i; - DIST_T d=10000.0, dd; + DIST_T d=DIST_INF, dd; coOrd pos; inx = -1; @@ -798,7 +831,7 @@ EXPORT EPINX_T GetEndPtConnectedToMe( track_p trk, track_p me ) EXPORT EPINX_T GetNearestEndPtConnectedToMe( track_p trk, track_p me, coOrd pos) { EPINX_T ep, found = -1; - DIST_T d = 10000; + DIST_T d = DIST_INF; DIST_T dd; for (ep=0; ep<trk->endCnt; ep++) { if (trk->endPt[ep].track == me) { @@ -1051,7 +1084,8 @@ LOG( log_track, 1, ( "NewTrack( T%d, t%d, E%d, X%ld)\n", index, type, endCnt, ex } else trk->endPt = NULL; if (extraSize) { - trk->extraData = MyMalloc( extraSize ); + trk->extraData = (struct extraDataBase_t*)MyMalloc( extraSize ); + trk->extraData->trkType = type; } else trk->extraData = NULL; trk->extraSize = extraSize; @@ -1065,12 +1099,14 @@ LOG( log_track, 1, ( "NewTrack( T%d, t%d, E%d, X%ld)\n", index, type, endCnt, ex EXPORT void FreeTrack( track_p trk ) { - trackCmds(trk->type)->delete( trk ); + bFreeTrack = TRUE; + trackCmds(trk->type)->deleteTrk( trk ); if (trk->endPt) MyFree(trk->endPt); if (trk->extraData) MyFree(trk->extraData); MyFree(trk); + bFreeTrack = FALSE; } @@ -1141,6 +1177,21 @@ LOG( log_track, 4, ( "DeleteTrack(T%d)\n", GetTrkIndex(trk) ) ) } } } + /* If Car, simulate Remove Car -> uncouple and mark deleted (no Undo) */ + if (QueryTrack(trk,Q_ISTRAIN)) { + trk->deleted = TRUE; + int dir; + for (dir=0; dir<2; dir++) { + if (GetTrkEndTrk(trk,dir)) { + track_p car = GetTrkEndTrk(trk,dir); + for (int dir2=0;dir2<2; dir2++) { + if (car->endPt[dir2].track == trk) car->endPt[dir2].track = NULL; + } + trk->endPt[dir].track = NULL; + } + } + return TRUE; + } for (i=0;i<trk->endCnt;i++) { if ((trk2=trk->endPt[i].track) != NULL) { ep2 = GetEndPtConnectedToMe( trk2, trk ); @@ -1228,15 +1279,13 @@ wBool_t IsWidthClose( DIST_T dist1, DIST_T dist2 ) // width is computed by pixels/dpi // problem is when widths are computed on platforms with differing dpi DIST_T dist = fabs( dist1 - dist2 ); - if ( dist < 0.01 ) + if ( dist < 0.05 ) return TRUE; -#ifdef WINDOWS - dist1 *= 96.0/72.0; -#else - dist1 *= 72.0/96.0; -#endif +// TODO: This assumes the demo file was written with DPI=72 +// Note: BASE_DPI is 75 so we fudge on dist (was < 0.01) + dist1 *= mainD.dpi/BASE_DPI; dist = fabs( dist1 - dist2 ); - if ( dist < 0.01 ) + if ( dist < 0.05 ) return TRUE; return FALSE; } @@ -1304,10 +1353,11 @@ static void ExciseSelectedTracks( track_p * pxtrk, track_p * pltrk ) track_p trk, *ptrk; for (ptrk=&to_first; *ptrk!=NULL; ) { trk = *ptrk; - if (IsTrackDeleted(trk) || !GetTrkSelected(trk)) { + if (!GetTrkSelected(trk)) { ptrk = &(*ptrk)->next; continue; } + ASSERT( !IsTrackDeleted(trk) ); UndoModify( *ptrk ); UndoModify( trk ); *ptrk = trk->next; @@ -1319,7 +1369,7 @@ static void ExciseSelectedTracks( track_p * pxtrk, track_p * pltrk ) } -EXPORT void SelectAbove( void ) +EXPORT void SelectAbove( void * unused ) { track_p xtrk, ltrk; if (selectedTrackCount<=0) { @@ -1338,7 +1388,7 @@ EXPORT void SelectAbove( void ) } -EXPORT void SelectBelow( void ) +EXPORT void SelectBelow( void * unused ) { track_p xtrk, ltrk, trk; coOrd lo, hi, lowest, highest; @@ -1376,16 +1426,16 @@ EXPORT void SelectBelow( void ) } -#include "bitmaps/above.xpm" -#include "bitmaps/below.xpm" +#include "bitmaps/top.xpm" +#include "bitmaps/bottom.xpm" EXPORT void InitCmdAboveBelow( void ) { wIcon_p bm_p; - bm_p = wIconCreatePixMap( above_xpm ); - AddToolbarButton( "cmdAbove", bm_p, IC_SELECTED|IC_POPUP, (addButtonCallBack_t)SelectAbove, NULL ); - bm_p = wIconCreatePixMap( below_xpm ); - AddToolbarButton( "cmdBelow", bm_p, IC_SELECTED|IC_POPUP, (addButtonCallBack_t)SelectBelow, NULL ); + bm_p = wIconCreatePixMap( top_xpm[iconSize] ); + AddToolbarButton( "cmdAbove", bm_p, IC_SELECTED|IC_POPUP, SelectAbove, NULL ); + bm_p = wIconCreatePixMap( bottom_xpm[iconSize] ); + AddToolbarButton( "cmdBelow", bm_p, IC_SELECTED|IC_POPUP, SelectBelow, NULL ); } /***************************************************************************** @@ -1485,8 +1535,8 @@ EXPORT void ImportEnd( coOrd offset, wBool_t import, wBool_t inPlace ) wIndex_t trackCountOld; track_p trk; coOrd pos; - wPos_t x, y; - wPos_t ww, hh; + wDrawPix_t x, y; + wWinPix_t ww, hh; wBool_t offscreen = FALSE; double xmin = 0.0; @@ -1503,21 +1553,20 @@ EXPORT void ImportEnd( coOrd offset, wBool_t import, wBool_t inPlace ) wDrawGetSize( mainD.d, &ww, &hh ); coOrd middle_screen; - wPos_t mx,my; + wDrawPix_t mx,my; - mx = ww/2; - my = hh/2; + mx = ww/2.0; + my = hh/2.0; mainD.Pix2CoOrd( &mainD, mx, my, &middle_screen ); for ( trk=*importTrack; trk; trk=trk->next ) { - if (!IsTrackDeleted(trk)) { - if (trk->hi.y > ymax ) ymax = trk->hi.y; - if (trk->lo.y < ymin ) ymin = trk->lo.y; - if (trk->hi.x > xmax ) xmax = trk->hi.x; - if (trk->lo.x < xmin ) xmin = trk->lo.x; - } + ASSERT(!IsTrackDeleted(trk)); // Export ignores deleted tracks + if (trk->hi.y > ymax ) ymax = trk->hi.y; + if (trk->lo.y < ymin ) ymin = trk->lo.y; + if (trk->hi.x > xmax ) xmax = trk->hi.x; + if (trk->lo.x < xmin ) xmin = trk->lo.x; } coOrd size = {xmax-xmin,ymax-ymin}; @@ -1541,7 +1590,7 @@ EXPORT void ImportEnd( coOrd offset, wBool_t import, wBool_t inPlace ) middle_object.x = offset.x + (size.x/2); middle_object.y = offset.y + (size.y/2); - wPos_t ox,oy; + wDrawPix_t ox,oy; mainD.CoOrd2Pix( &mainD, middle_object, &ox, &oy ); if ((ox<0) || (ox>ww) || (oy<0) || (oy>hh) ) offscreen = TRUE; @@ -1554,7 +1603,8 @@ EXPORT void ImportEnd( coOrd offset, wBool_t import, wBool_t inPlace ) RenumberTracks(); // move the imported track into place - for ( trk=*importTrack; trk; trk=trk->next ) if (!IsTrackDeleted(trk)) { + for ( trk=*importTrack; trk; trk=trk->next ) { + ASSERT( !IsTrackDeleted(trk) ); coOrd move; move.x = offset.x; move.y = offset.y; @@ -1568,7 +1618,7 @@ EXPORT void ImportEnd( coOrd offset, wBool_t import, wBool_t inPlace ) // Pan screen if needed to center of new if (offscreen) { panCenter = middle_object; - PanHere((void*)0); + PanHere(I2VP(0)); } } @@ -1585,6 +1635,7 @@ EXPORT BOOL_T ExportTracks( FILE * f, coOrd * offset) max_index = 0; TRK_ITERATE(trk) { if ( GetTrkSelected(trk) ) { + if (QueryTrack(trk,Q_ISTRAIN)) continue; //Don't bother with CARs if (trk->lo.x < orig.x) orig.x = trk->lo.x; if (trk->lo.y < orig.y) @@ -1599,6 +1650,7 @@ EXPORT BOOL_T ExportTracks( FILE * f, coOrd * offset) xlat.y = - orig.y; TRK_ITERATE( trk ) { if ( GetTrkSelected(trk) ) { + if (QueryTrack(trk,Q_ISTRAIN)) continue; //Don't bother with CARs MoveTrack( trk, xlat ); trackCmds(GetTrkType(trk))->write( trk, f ); MoveTrack( trk, orig ); @@ -1697,7 +1749,7 @@ EXPORT void AuditTracks( char * event, ... ) used[i] = 0; } if (*to_last) { - sprintf( msgp, "*to_last is not NULL (%lx)", (long)*to_last ); + sprintf( msgp, "*to_last is not NULL ("SLOG_FMT")", (uintptr_t)*to_last ); AuditPrint( msg ); } TRK_ITERATE( trk ) { @@ -1724,7 +1776,7 @@ EXPORT void AuditTracks( char * event, ... ) } for (i=0; i<trk->endCnt; i++) { if ( (tn = trk->endPt[i].track) != NULL ) { - if (IsTrackDeleted(trk)) { + if (IsTrackDeleted(tn)) { sprintf( msgp, "T%d[%d]: T%d is deleted\n", trk->index, i, tn->index ); AuditPrint( msg ); trk->endPt[i].track = NULL; @@ -1741,8 +1793,8 @@ nextEndPt:; } if (!trk->next) { if (to_last != &trk->next) { - sprintf( msgp, "last track (T%d @ %lx) is not to_last (%lx)\n", - trk->index, (long)trk, (long)to_last ); + sprintf( msgp, "last track (T%d @ "SLOG_FMT") is not to_last ("SLOG_FMT")\n", + trk->index, (uintptr_t)trk, (uintptr_t)to_last ); AuditPrint( msg ); } } @@ -1756,12 +1808,15 @@ nextEndPt:; Rdump( auditFile ); if (strcmp("undoUndo",event)==0) { fprintf( auditFile, "# failure in undo\n" ); - } else if (UndoUndo()) { - fprintf( auditFile, "# after undo\n" ); - WriteTracks(auditFile, TRUE); - Rdump( auditFile ); } else { - fprintf( auditFile, "# undo stack is empty\n" ); + UndoUndo( NULL ); + if ( undoStatus ) { + fprintf( auditFile, "# after undo\n" ); + WriteTracks(auditFile, TRUE); + Rdump( auditFile ); + } else { + fprintf( auditFile, "# undo stack is empty\n" ); + } } } if (NoticeMessage( MSG_AUDIT_ABORT, _("Yes"), _("No"))) { @@ -1821,21 +1876,24 @@ EXPORT DIST_T EndPtDescriptionDistance( if (hidden) *hidden = FALSE; e = &trk->endPt[ep].elev; if ((e->option&ELEV_MASK)==ELEV_NONE) - return 100000; + return DIST_INF; if (((e->option&ELEV_VISIBLE)==0) && !show_hidden) - return 100000; + return DIST_INF; if ((trk1=GetTrkEndTrk(trk,ep)) && GetTrkIndex(trk1)<GetTrkIndex(trk)) - return 100000; + return DIST_INF; if ((e->option&ELEV_VISIBLE)==0) { //Hidden - disregard offset if (hidden) *hidden = TRUE; return FindDistance( GetTrkEndPos(trk,ep), pos ); } /*REORIGIN( pos1, e->doff, GetTrkEndPos(trk,ep), GetTrkEndAngle(trk,ep) );*/ pos1 = GetTrkEndPos(trk,ep); + coOrd tpos = pos1; pos1.x += e->doff.x; pos1.y += e->doff.y; *dpos = pos1; if (hidden) *hidden = !(e->option&ELEV_VISIBLE); + if (FindDistance(tpos,pos)<FindDistance( pos1, pos )) + return FindDistance(tpos,pos); return FindDistance( pos1, pos ); } @@ -1847,7 +1905,6 @@ EXPORT STATUS_T EndPtDescriptionMove( coOrd pos ) { static coOrd p0, p1; - static BOOL_T editState = FALSE; elev_t *e, *e1; track_p trk1; @@ -1861,7 +1918,6 @@ EXPORT STATUS_T EndPtDescriptionMove( /*no break*/ case C_MOVE: case C_UP: - editState = TRUE; p1 = pos; e->doff.x = (pos.x-p0.x); e->doff.y = (pos.y-p0.y); @@ -1870,17 +1926,13 @@ EXPORT STATUS_T EndPtDescriptionMove( e1->doff = e->doff; } if ( action == C_UP ) { - editState = FALSE; wDrawColor color = GetTrkColor( trk, &mainD ); DrawEndElev( &mainD, trk, ep, color ); } return action==C_UP?C_TERMINATE:C_CONTINUE; case C_REDRAW: - DrawEndElev( &tempD, trk, ep, wDrawColorBlue ); - if ( editState ) { - DrawLine( &tempD, p0, p1, 0, wDrawColorBlue ); - } + DrawEndElev( &tempD, trk, ep, drawColorPreviewSelected ); break; } return C_CONTINUE; @@ -1897,7 +1949,7 @@ EXPORT STATUS_T EndPtDescriptionMove( static DIST_T distanceEpsilon = 0.0; static ANGLE_T angleEpsilon = 0.0; -EXPORT void LoosenTracks( void ) +EXPORT void LoosenTracks( void * unused ) { track_p trk, trk1; EPINX_T ep0, ep1; @@ -2038,6 +2090,19 @@ EXPORT BOOL_T SplitTrack( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, BOOL_T (*splitCmd)( track_p, coOrd, EPINX_T, track_p *, EPINX_T *, EPINX_T * ); coOrd pos0; + if (!IsTrack(trk)) { + if ((splitCmd = trackCmds(trk->type)->split) == NULL) return FALSE; + UndrawNewTrack( trk ); + UndoModify( trk ); + rc = splitCmd( trk, pos, ep, leftover, &epl, &ep1 ); + if (*leftover) { + SetTrkLayer(*leftover,GetTrkLayer( trk )); + DrawNewTrack( *leftover ); + } + DrawNewTrack( trk ); + return rc; + } + trk0 = trk; epl = ep; epCnt = GetTrkEndPtCnt(trk); @@ -2045,9 +2110,9 @@ EXPORT BOOL_T SplitTrack( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, LOG( log_track, 2, ( "SplitTrack( T%d[%d], (%0.3f %0.3f)\n", trk->index, ep, pos.x, pos.y ) ) if (((splitCmd = trackCmds(trk->type)->split) == NULL)) { - if (!(FindDistance( trk->endPt[ep].pos, pos) <= minLength)) { - ErrorMessage( MSG_CANT_SPLIT_TRK, trackCmds(trk->type)->name ); - return FALSE; + if (!(FindDistance( trk->endPt[ep].pos, pos) <= minLength)) { + ErrorMessage( MSG_CANT_SPLIT_TRK, trackCmds(trk->type)->name ); + return FALSE; } } UndrawNewTrack( trk ); @@ -2296,7 +2361,7 @@ EXPORT STATUS_T ExtendTrackFromOrig( track_p trk, wAction_t action, coOrd pos ) valid = TRUE; if (action == C_MOVE) InfoMessage( _("Curve: Length=%s Radius=%0.3f Arc=%0.3f"), - FormatDistance( d ), FormatDistance(tempSegs(0).u.c.radius), PutAngle( fabs(a) ) ); + FormatDistance( d ), FormatDistance(tempSegs(0).u.c.radius), PutAngle( tempSegs(0).u.c.a1 )); return C_CONTINUE; } else { d = FindDistance( end_pos, pos ); @@ -2488,7 +2553,7 @@ EXPORT DIST_T GetFlexLength( track_p trk0, EPINX_T ep, coOrd * pos ) d += dd; trk = trk1; ep = 1-ep1; - if (d>1000000.0) + if (d>DIST_INF) break; } *pos = GetTrkEndPos( trk, ep ); @@ -2505,7 +2570,7 @@ EXPORT DIST_T GetTrkLength( track_p trk, EPINX_T ep0, EPINX_T ep1 ) else if (trackCmds(trk->type)->getLength != NULL) { d = trackCmds(trk->type)->getLength(trk); if (ep1==-1) - d /= 2.0; + d = d/2.0; return d; } else { pos0 = GetTrkEndPos(trk,ep0); @@ -2550,8 +2615,6 @@ EXPORT DIST_T GetTrkLength( track_p trk, EPINX_T ep0, EPINX_T ep1 ) #define DRAW_TUNNEL_DASH (1) #define DRAW_TUNNEL_SOLID (2) EXPORT long drawTunnel = DRAW_TUNNEL_DASH; -EXPORT long colorTrack; -EXPORT long colorDraw; /****************************************************************************** * @@ -2562,7 +2625,39 @@ EXPORT long colorDraw; EXPORT long tieDrawMode = TIEDRAWMODE_SOLID; EXPORT wDrawColor tieColor; -static wBool_t DoDrawTies( drawCmd_p d, track_cp trk ) +/** + * Centerline drawing test + * + * \param d drawing context + * \return true for centerline, false if no centerline to draw + */ + +static bool +HasTrackCenterline( drawCmd_p d ) +{ + // for printing, drawing of center line depends on the scale + if( d->options & DC_CENTERLINE && d->options & DC_PRINT ) { + if( d->scale <= ( twoRailScale * 2.0 + 1.0 ) / 2.0 ) { + return true; + } else { + return false; + } + } + + // all other cases of explicit centerline option (ie. bitmap) + if( d->options & DC_CENTERLINE ) { + return true; + } + + // if zoomed in beyond 1:1 draw centerline when not doing a simple draw + if( ( d->scale <= 1.0 ) && !( d->options & DC_SIMPLE ) ) { + return true; + } + + return false; +} + +EXPORT wBool_t DoDrawTies( drawCmd_p d, track_cp trk ) { DIST_T scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; if ( !trk ) @@ -2622,9 +2717,9 @@ EXPORT void DrawTie( return; } if ( solid ) { - DrawPoly( d, 4, p, t, color, 0, 1, 0 ); + DrawPoly( d, 4, p, t, color, 0, DRAW_FILL ); } else { - DrawPoly( d, 4, p, t, color, 0, 0, 0); + DrawPoly( d, 4, p, t, color, 0, DRAW_CLOSED); } } @@ -2668,15 +2763,12 @@ static void DrawCurvedTies( } } - EXPORT void DrawCurvedTrack( drawCmd_p d, coOrd p, DIST_T r, ANGLE_T a0, ANGLE_T a1, - coOrd p0, - coOrd p1, track_p trk, wDrawColor color, long options ) @@ -2685,6 +2777,9 @@ EXPORT void DrawCurvedTrack( DIST_T trackGauge = GetTrkGauge(trk); wDrawWidth width=0; trkSeg_p segPtr; + long bridge = 0; + if(trk) + bridge = GetTrkBridge( trk ); if ( (d->options&DC_SEGTRACK) ) { DYNARR_APPEND( trkSeg_t, tempSegs_da, 10 ); @@ -2705,24 +2800,27 @@ EXPORT void DrawCurvedTrack( width = 3; if ( color == wDrawColorPreviewSelected || color == wDrawColorPreviewUnselected ) width = 3; -#ifdef WINDOWS - width *= (wDrawWidth)(d->dpi/mainD.dpi); -#else - if (d->options&DC_PRINT) - width *= 300/75; -#endif -LOG( log_track, 4, ( "DST( (%0.3f %0.3f) R%0.3f A%0.3f..%0.3f)\n", + if ((d->options&DC_PRINT) && (d->dpi>2*BASE_DPI)) + width = (wDrawWidth)round(width * d->dpi / 2 / BASE_DPI); + + LOG(log_track,4,("DST( (%0.3f %0.3f) R%0.3f A%0.3f..%0.3f)\n", p.x, p.y, r, a0, a1 ) ) + + // Draw a solid background + if(bridge) { + wDrawWidth width3 = (wDrawWidth)round(trackGauge * 3 * d->dpi/d->scale); // / BASE_DPI); + DrawArc( d, p, r, a0, a1, 0, width3, drawColorGrey90 ); + } + if ( DoDrawTies( d, trk ) ) DrawCurvedTies( d, GetTrkScale(trk), p, r, a0, a1, color ); if (color == wDrawColorBlack) color = normalColor; if ( d->scale >= scale2rail ) { - DrawArc( d, p, r, a0, a1, ((d->scale<32) && centerDrawMode && !(options&DTS_NOCENTER)) ? 1 : 0, width, color ); + DrawArc( d, p, r, a0, a1, (centerDrawMode && !(options&DTS_NOCENTER)) ? 1 : 0, width, color ); } else { - if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 - || (d->scale <= scale2rail/2 && ((d->options&DC_PRINT) && printCenterLines))) { // if printing two rails respect print CenterLine option + if ( HasTrackCenterline(d)) { long options = d->options; d->options |= DC_DASH; DrawArc( d, p, r, a0, a1, 0, 0, color ); @@ -2740,42 +2838,19 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) R%0.3f A%0.3f..%0.3f)\n", } } } - if (trk && GetTrkBridge( trk ) ) { - - ANGLE_T a2,a3; - coOrd pp0,pp1,pp2,pp3; - - a2 = a0+R2D(trackGauge*1.0/r); - a3 = a1-R2D(trackGauge*2.0/r); + if (bridge) { + wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/BASE_DPI); + if (d->options&DC_PRINT) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); - wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/75.0); - - DrawArc( d, p, r+(trackGauge*1.5), a2, a3, 0, width2, color ); - - PointOnCircle(&pp0,p,r+(trackGauge*1.5),a2); - PointOnCircle(&pp1,p,r+(trackGauge*1.5),a3+a2); - - Translate( &pp2,pp0, a2-90+45, trackGauge); - DrawLine( d, pp0, pp2, width2, color ); - Translate( &pp3,pp1, a2+a3+90-45, trackGauge); - DrawLine( d, pp1, pp3, width2, color ); - - DrawArc( d, p, r-(trackGauge*1.5), a2, a3, 0, width2, color ); - - PointOnCircle(&pp0,p,r-(trackGauge*1.5),a2); - PointOnCircle(&pp1,p,r-(trackGauge*1.5),a3+a2); - - Translate( &pp2,pp0, a2-90-45, trackGauge); - DrawLine( d, pp0, pp2, width2, color ); - Translate( &pp3,pp1, a2+a3+90+45, trackGauge); - DrawLine( d, pp1, pp3, width2, color ); - - } + DrawArc( d, p, r+(trackGauge*1.5), a0, a1, 0, width2, color ); + DrawArc( d, p, r-(trackGauge*1.5), a0, a1, 0, width2, color ); + } } -static void DrawStraightTies( +EXPORT void DrawStraightTies( drawCmd_p d, SCALEINX_T scaleInx, coOrd p0, @@ -2815,6 +2890,7 @@ static void DrawStraightTies( } + EXPORT void DrawStraightTrack( drawCmd_p d, coOrd p0, @@ -2827,6 +2903,9 @@ EXPORT void DrawStraightTrack( coOrd pp0, pp1; DIST_T scale2rail; DIST_T trackGauge = GetTrkGauge(trk); + long bridge = 0; + if ( trk ) + bridge = GetTrkBridge(trk); wDrawWidth width=0; trkSeg_p segPtr; @@ -2846,18 +2925,24 @@ EXPORT void DrawStraightTrack( scale2rail = (d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale; width = trk ? GetTrkWidth( trk ): 0; + if ((d->options&DC_PRINT) && (d->dpi>2*BASE_DPI)) + width = (wDrawWidth)round(width * d->dpi / 2 / BASE_DPI); + if ( d->options&DC_THICK ) width = 3; if ( color == wDrawColorPreviewSelected || color == wDrawColorPreviewUnselected ) width = 3; -#ifdef WINDOWS - width *= (wDrawWidth)(d->dpi/mainD.dpi); -#else - if (d->options&DC_PRINT) - width *= 300/75; -#endif -LOG( log_track, 4, ( "DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", + + + LOG(log_track,4,("DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", p0.x, p0.y, p1.x, p1.y ) ) + + // Draw solid background + if(bridge) { + wDrawWidth width3 = (wDrawWidth)round(trackGauge * 3 * d->dpi/d->scale); + DrawLine(d,p0,p1,width3,wDrawColorGrey90); + } + if ( DoDrawTies( d, trk ) ) DrawStraightTies( d, GetTrkScale(trk), p0, p1, color ); if (color == wDrawColorBlack) @@ -2865,8 +2950,7 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", if ( d->scale >= scale2rail ) { DrawLine( d, p0, p1, width, color ); } else { - if ( (d->scale <= 1 && (d->options&DC_SIMPLE)==0) || (d->options&DC_CENTERLINE)!=0 - || (d->scale <= scale2rail/2 && ((d->options&DC_PRINT) && printCenterLines))) { // if printing two rails respect print CenterLine option + if ( HasTrackCenterline(d)) { long options = d->options; d->options |= DC_DASH; DrawLine( d, p0, p1, 0, color ); @@ -2875,9 +2959,11 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", Translate( &pp0, p0, angle+90, trackGauge/2.0 ); Translate( &pp1, p1, angle+90, trackGauge/2.0 ); DrawLine( d, pp0, pp1, width, color ); + Translate( &pp0, p0, angle-90, trackGauge/2.0 ); Translate( &pp1, p1, angle-90, trackGauge/2.0 ); DrawLine( d, pp0, pp1, width, color ); + if ( (d->options&DC_PRINT) && roadbedWidth > trackGauge && d->scale <= scale2rail/2.0) { wDrawWidth rbw = (wDrawWidth)floor(roadbedLineWidth*(d->dpi/d->scale)+0.5); if ( options&DTS_RIGHT ) { @@ -2892,51 +2978,34 @@ LOG( log_track, 4, ( "DST( (%0.3f %0.3f) .. (%0.3f..%0.3f)\n", } } } - if (trk && GetTrkBridge( trk ) ) { - - coOrd pp2,pp3; - wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/75.0); - Translate( &pp0, p0, angle+90, trackGauge*1.5 ); - Translate( &pp1, p1, angle+90, trackGauge*1.5 ); - Translate( &pp0, pp0, angle+180, trackGauge*1.5 ); - Translate( &pp1, pp1, angle, trackGauge*1.5 ); - DrawLine( d, pp0, pp1, width2, color ); - Translate( &pp2,pp0, angle+90-45, trackGauge); - DrawLine( d, pp0, pp2, width2, color ); - Translate( &pp3,pp1, angle+90+45, trackGauge); - DrawLine( d, pp1, pp3, width2, color ); + if (bridge) { + wDrawWidth width2 = (wDrawWidth)round((2.0 * d->dpi)/BASE_DPI); + if (d->options&DC_PRINT) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); Translate( &pp0, p0, angle-90, trackGauge*1.5 ); Translate( &pp1, p1, angle-90, trackGauge*1.5 ); - Translate( &pp0, pp0, angle+180, trackGauge*1.5 ); - Translate( &pp1, pp1, angle, trackGauge*1.5 ); DrawLine( d, pp0, pp1, width2, color ); - Translate( &pp2,pp0, angle-90+45, trackGauge); - DrawLine( d, pp0, pp2, width2, color ); - Translate( &pp3,pp1, angle-90-45, trackGauge); - DrawLine( d, pp1, pp3, width2, color ); + Translate( &pp0, p0, angle+90, trackGauge*1.5 ); + Translate( &pp1, p1, angle+90, trackGauge*1.5 ); + DrawLine( d, pp0, pp1, width2, color); } } EXPORT wDrawColor GetTrkColor( track_p trk, drawCmd_p d ) { - DIST_T len, len1, elev0, elev1; + DIST_T len, elev0, elev1; ANGLE_T grade = 0.0; if ( IsTrack( trk ) && GetTrkEndPtCnt(trk) == 2 ) { - if (GetTrkEndElevCachedHeight(trk,0,&elev0,&len) && GetTrkEndElevCachedHeight(trk,1,&elev1,&len1)) { - grade = fabs( (elev1-elev0)/(len+len1))*100.0; - } else { - len = GetTrkLength( trk, 0, 1 ); - if (len>0.1) { - ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ); - ComputeElev( trk, 1, FALSE, &elev1, NULL, FALSE ); - grade = fabs( (elev1-elev0)/len )*100.0; - } - } + ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ); + len = GetTrkLength( trk, 0, 1 ); + ComputeElev( trk, 1, FALSE, &elev1, NULL, FALSE ); + if (len>0.1) + grade = fabs( (elev1-elev0)/len)*100.0; } if ( (d->options&(DC_SIMPLE|DC_SEGTRACK)) != 0 ) return wDrawColorBlack; @@ -2947,7 +3016,7 @@ EXPORT wDrawColor GetTrkColor( track_p trk, drawCmd_p d ) if ( (d->options&(DC_PRINT)) == 0 ) { if (GetTrkBits(trk)&TB_PROFILEPATH) return profilePathColor; - if ((d->options&DC_PRINT)==0 && GetTrkSelected(trk)) + if ((d->options&DC_PRINT)==0 && GetTrkSelected(trk) && d == &tempD) return selectedColor; } if ( (IsTrack(trk)?(colorTrack):(colorDraw)) ) { @@ -2986,7 +3055,7 @@ EXPORT void DrawTrack( track_cp trk, drawCmd_p d, wDrawColor color ) if (d == &mapD && !GetLayerOnMap(curTrackLayer)) return; if ( (IsTrack(trk)?(colorTrack):(colorDraw)) && - d != &mapD && color == wDrawColorBlack ) + (d != &mapD) && (color == wDrawColorBlack) ) if (GetLayerUseColor((unsigned int)curTrackLayer)) color = GetLayerColor((unsigned int)curTrackLayer); trackCmds(trkTyp)->draw( trk, d, color ); @@ -3108,11 +3177,11 @@ EXPORT void DrawEndElev( drawCmd_p d, track_p trk, EPINX_T ep, wDrawColor color sprintf( message, "%0.1f%%", round(fabs(grade*100.0)*10)/10 ); elevStr = message; a = GetTrkEndAngle( trk, ep ); - style = BOX_ARROW; + style = BOX_ARROW_BACKGROUND; if (grade <= -0.001) a = NormalizeAngle( a+180.0 ); else if ( grade < 0.001 ) - style = BOX_BOX; + style = BOX_BOX_BACKGROUND; elev->u.height = grade; } else { elevStr = "????%%"; @@ -3127,9 +3196,15 @@ EXPORT void DrawEndElev( drawCmd_p d, track_p trk, EPINX_T ep, wDrawColor color default: return; } + coOrd startLine = pp, endLine = pp; pp.x += elev->doff.x; pp.y += elev->doff.y; + if (color==drawColorPreviewSelected) { + Translate(&endLine,pp,FindAngle(pp,startLine),descriptionFontSize/d->dpi); + DrawLine( d, startLine, endLine, 0, color ); + } DrawBoxedString( style, d, pp, elevStr, fp, (wFontSize_t)descriptionFontSize, color, a ); + } /** @@ -3144,119 +3219,143 @@ EXPORT void DrawEndElev( drawCmd_p d, track_p trk, EPINX_T ep, wDrawColor color */ EXPORT void DrawEndPt( - drawCmd_p d, - track_p trk, - EPINX_T ep, - wDrawColor color ) + drawCmd_p d, + track_p trk, + EPINX_T ep, + wDrawColor color) { coOrd p; ANGLE_T a; track_p trk1; - coOrd p0, p1, p2; + coOrd p0,p1,p2; BOOL_T sepBoundary; + BOOL_T showBridge = 1; DIST_T trackGauge; wDrawWidth width; wDrawWidth width2; - if ( (d->options & (DC_SIMPLE|DC_SEGTRACK)) != 0) + if((d->options & (DC_SIMPLE | DC_SEGTRACK)) != 0) return; - if ( trk && QueryTrack( trk, Q_NODRAWENDPT ) ) + if(trk && QueryTrack(trk,Q_NODRAWENDPT)) return; - if (trk == NULL || ep < 0) + if(trk == NULL || ep < 0) return; - // line width for the tunnel portal, make sure it is rounded correctly - width2 = (wDrawWidth)round((2.0 * d->dpi)/75.0); + // line width for the tunnel portal and bridge parapets, make sure it is rounded correctly + width2 = (wDrawWidth)round((2.0 * d->dpi) / BASE_DPI); + if ((d->options&DC_PRINT) && (d->dpi>2*BASE_DPI)) + width2 = (wDrawWidth)round(d->dpi / BASE_DPI); - if (color == wDrawColorBlack) + + if(color == wDrawColorBlack) color = normalColor; - if (labelScale >= d->scale) - DrawEndElev( d, trk, ep, color ); + if(((d->options & DC_PRINT) ? (labelScale * 2 + 1) : labelScale) >= d->scale) + DrawEndElev(d,trk,ep,color); trk1 = GetTrkEndTrk(trk,ep); - p = GetTrkEndPos( trk, ep ); - a = GetTrkEndAngle( trk, ep ) + 90.0; + p = GetTrkEndPos(trk,ep); + a = GetTrkEndAngle(trk,ep) + 90.0; trackGauge = GetTrkGauge(trk); - if (trk1 == NULL) { - DrawUnconnectedEndPt( d, p, a, trackGauge, color ); + if(trk1 == NULL) { + DrawUnconnectedEndPt(d,p,a,trackGauge,color); return; } - if ( d->scale >= ((d->options&DC_PRINT)?(twoRailScale*2+1):twoRailScale) ) - return; - sepBoundary = FALSE; - if ( inDrawTracks && (d->options&DC_PRINT)==0 && importTrack == NULL && GetTrkSelected(trk) && (!GetTrkSelected(trk1))) { - DIST_T len; - len = trackGauge*2.0; - if (len < 0.10*d->scale) - len = 0.10*d->scale; - long oldOptions = d->options; - d->options &= ~DC_NOTSOLIDLINE; - Translate( &p0, p, a+45, len ); - Translate( &p1, p, a+225, len ); - DrawLine( d, p0, p1, 2, selectedColor ); - Translate( &p0, p, a-45, len ); - Translate( &p1, p, a-225, len ); - DrawLine( d, p0, p1, 2, selectedColor ); - d->options = oldOptions; - sepBoundary = TRUE; - } else if ((d->options&DC_PRINT)==0 && importTrack == NULL && (!GetTrkSelected(trk)) && GetTrkSelected(trk1)) { - sepBoundary = TRUE; + if(d->scale < ((d->options & DC_PRINT) ? (twoRailScale * 2 + 1) : twoRailScale)) + { + // return; + + if(inDrawTracks && (d->options & DC_PRINT) == 0 && importTrack == NULL && GetTrkSelected(trk) && (!GetTrkSelected(trk1))) { + DIST_T len; + len = trackGauge * 2.0; + if(len < 0.10 * d->scale) + len = 0.10 * d->scale; + long oldOptions = d->options; + d->options &= ~DC_NOTSOLIDLINE; + Translate(&p0,p,a + 45,len); + Translate(&p1,p,a + 225,len); + DrawLine(d,p0,p1,2,selectedColor); + Translate(&p0,p,a - 45,len); + Translate(&p1,p,a - 225,len); + DrawLine(d,p0,p1,2,selectedColor); + d->options = oldOptions; + sepBoundary = TRUE; + } + else if((d->options & DC_PRINT) == 0 && importTrack == NULL && (!GetTrkSelected(trk)) && GetTrkSelected(trk1)) { + sepBoundary = TRUE; + } } // is the endpoint a transition into a tunnel? - if (GetTrkVisible(trk) && (!GetTrkVisible(trk1))) { + if(GetTrkVisible(trk) && (!GetTrkVisible(trk1))) { // yes, draw tunnel portal - Translate( &p0, p, a, trackGauge ); - Translate( &p1, p, a+180, trackGauge ); - DrawLine( d, p0, p1, width2, color ); - Translate( &p2, p0, a+45, trackGauge/2.0 ); - DrawLine( d, p0, p2, width2, color ); - Translate( &p2, p1, a+135, trackGauge/2.0 ); - DrawLine( d, p1, p2, width2, color ); - if ( d == &mainD ) { - width = (wDrawWidth)ceil(trackGauge*d->dpi/2.0/d->scale); - if ( width > 1 ) { - if ( (GetTrkEndOption(trk,ep)&EPOPT_GAPPED) != 0 ) { - Translate( &p0, p, a, trackGauge ); - DrawLine( d, p0, p, width, color ); + Translate(&p0,p,a,trackGauge); + Translate(&p1,p,a + 180,trackGauge); + DrawLine(d,p0,p1,width2,color); + Translate(&p2,p0,a + 45,trackGauge / 2.0); + DrawLine(d,p0,p2,width2,color); + Translate(&p2,p1,a + 135,trackGauge / 2.0); + DrawLine(d,p1,p2,width2,color); + if(d == &mainD) { + width = (wDrawWidth)ceil(trackGauge * d->dpi / 2.0 / d->scale); + if(width > 1) { + if((GetTrkEndOption(trk,ep) & EPOPT_GAPPED) != 0) { + Translate(&p0,p,a,trackGauge); + DrawLine(d,p0,p,width,color); } trk1 = GetTrkEndTrk(trk,ep); - if ( trk1 ) { - ep = GetEndPtConnectedToMe( trk1, trk ); - if ( (GetTrkEndOption(trk1,ep)&EPOPT_GAPPED) != 0 ) { - Translate( &p0, p, a+180.0, trackGauge ); - DrawLine( d, p0, p, width, color ); + if(trk1) { + ep = GetEndPtConnectedToMe(trk1,trk); + if((GetTrkEndOption(trk1,ep) & EPOPT_GAPPED) != 0) { + Translate(&p0,p,a + 180.0,trackGauge); + DrawLine(d,p0,p,width,color); } } } + showBridge = 0; } - } else if ((!GetTrkVisible(trk)) && GetTrkVisible(trk1)) { - ; - } else if ( GetLayerVisible( GetTrkLayer( trk ) ) && !GetLayerVisible( GetTrkLayer( trk1 ) ) ) { + } + else if((!GetTrkVisible(trk)) && GetTrkVisible(trk1)) { + showBridge = 0; + } + else if(GetLayerVisible(GetTrkLayer(trk)) && !GetLayerVisible(GetTrkLayer(trk1))) { a -= 90.0; - Translate( &p, p, a, trackGauge/2.0 ); - Translate( &p0, p, a-135.0, trackGauge*2.0 ); - DrawLine( d, p0, p, width2, color ); - Translate( &p0, p, a+135.0, trackGauge*2.0 ); - DrawLine( d, p0, p, width2, color ); - } else if ( !GetLayerVisible( GetTrkLayer( trk ) ) && GetLayerVisible( GetTrkLayer( trk1 ) ) ) { - ; - } else if ( sepBoundary ) { + Translate(&p,p,a,trackGauge / 2.0); + Translate(&p0,p,a - 135.0,trackGauge * 2.0); + DrawLine(d,p0,p,width2,color); + Translate(&p0,p,a + 135.0,trackGauge * 2.0); + DrawLine(d,p0,p,width2,color); + + showBridge = 0; + } + else if(!GetLayerVisible(GetTrkLayer(trk)) && GetLayerVisible(GetTrkLayer(trk1))) { + showBridge = 0; + } + else if(sepBoundary) { ; - } else if ( (drawEndPtV == 1 && (QueryTrack(trk,Q_DRAWENDPTV_1) || QueryTrack(trk1,Q_DRAWENDPTV_1)) ) || - (drawEndPtV == 2) ) { - Translate( &p0, p, a, trackGauge ); + } + else if((drawEndPtV == 1 && (QueryTrack(trk,Q_DRAWENDPTV_1) || QueryTrack(trk1,Q_DRAWENDPTV_1))) || (drawEndPtV == 2)) { + Translate(&p0,p,a,trackGauge); width = 0; - if ( d != &mapD && d != &tempD && (GetTrkEndOption(trk,ep)&EPOPT_GAPPED) != 0 ) - width = (wDrawWidth)ceil(trackGauge*d->dpi/2.0/d->scale); - DrawLine( d, p0, p, width, color ); - } else { + if(d != &mapD && d != &tempD && (GetTrkEndOption(trk,ep) & EPOPT_GAPPED) != 0) + width = (wDrawWidth)ceil(trackGauge * d->dpi / 2.0 / d->scale); + DrawLine(d,p0,p,width,color); + } + else { ; } + + if(showBridge && GetTrkBridge(trk) && (!GetTrkBridge(trk1))) { + Translate(&p0,p,a,trackGauge * 1.5); + Translate(&p1,p0,a - 45.0,trackGauge * 1.5); + DrawLine(d,p0,p1,width2,color); + Translate(&p0,p,a,-trackGauge * 1.5); + Translate(&p1,p0,a + 45.0,-trackGauge * 1.5); + DrawLine(d,p0,p1,width2,color); + } } @@ -3284,6 +3383,7 @@ EXPORT void DrawTracks( drawCmd_p d, DIST_T scale, coOrd orig, coOrd size ) wIndex_t count = 0; coOrd lo, hi; BOOL_T doSelectRecount = FALSE; + unsigned long time0 = wGetTimer(); inDrawTracks = TRUE; InfoCount( 0 ); @@ -3315,6 +3415,7 @@ EXPORT void DrawTracks( drawCmd_p d, DIST_T scale, coOrd orig, coOrd size ) for (inx=1; inx<trackCmds_da.cnt; inx++) if (trackCmds(inx)->redraw != NULL) trackCmds(inx)->redraw(); + LOG( log_timedrawtracks, 1, ( "DrawTracks time = %lu mS\n", wGetTimer()-time0 ) ); } InfoCount( trackCount ); inDrawTracks = FALSE; @@ -3426,3 +3527,57 @@ EXPORT void LabelLengths( drawCmd_p d, track_p trk, wDrawColor color ) DrawString( d, p0, 0.0, msg, fp, fs*d->scale, color ); } } + +EXPORT void AddTrkDetails(drawCmd_p d,track_p trk,coOrd pos, DIST_T length, wDrawColor color) { + #define DESC_LENGTH 6.0; + double division; + division = length/DESC_LENGTH; + division = ceil(division); + DIST_T dist = length/division, dist1; + traverseTrack_t tt; + tt.trk = trk; + tt.angle = GetTrkEndAngle(trk,0)+180.0; + tt.pos = GetTrkEndPos(trk,0); + + dynArr_t pos_array; + pos_array.max = 0; + pos_array.cnt = 0; + pos_array.ptr = NULL; + + typedef struct { + coOrd pos; + ANGLE_T angle; + } pos_angle_t; + + DYNARR_SET(pos_angle_t,pos_array,(int)division+1); + DYNARR_N(pos_angle_t,pos_array,0).pos = GetTrkEndPos(trk,0); + DYNARR_N(pos_angle_t,pos_array,0).angle = NormalizeAngle(GetTrkEndAngle(trk,0)+180.0); + for (int i=1;i<pos_array.cnt;i++) { + tt.dist = dist; + dist1 = dist; + TraverseTrack(&tt,&dist1); + if (dist1 > 0 || tt.trk != trk || IsClose(FindDistance(tt.pos,GetTrkEndPos(trk,1)))) { + DYNARR_N(pos_angle_t,pos_array,i).pos = GetTrkEndPos(trk,1); + DYNARR_N(pos_angle_t,pos_array,i).angle = GetTrkEndAngle(trk,1); + pos_array.cnt = i; + break; + } + DYNARR_N(pos_angle_t,pos_array,i).pos = tt.pos; + DYNARR_N(pos_angle_t,pos_array,i).angle = tt.angle; + } + message[0]='\0'; + for (int i=0;i<pos_array.cnt;i++) { + if (i==pos_array.cnt-1) + sprintf( message, _("%s[%0.2f,%0.2f] A%0.2f"),message,PutDim(DYNARR_N(pos_angle_t,pos_array,i).pos.x),PutDim(DYNARR_N(pos_angle_t,pos_array,i).pos.y),DYNARR_N(pos_angle_t,pos_array,i).angle ); + else + sprintf( message, _("%s[%0.2f,%0.2f] A%0.2f\n"),message,PutDim(DYNARR_N(pos_angle_t,pos_array,i).pos.x),PutDim(DYNARR_N(pos_angle_t,pos_array,i).pos.y),DYNARR_N(pos_angle_t,pos_array,i).angle); + } + wFont_p fp = wStandardFont( F_TIMES, FALSE, FALSE ); + DrawBoxedString(BOX_BOX,d,pos,message,fp,(wFontSize_t)descriptionFontSize,color,0.0); + if (pos_array.ptr) + MyFree(pos_array.ptr); + pos_array.ptr = 0; + pos_array.max = 0; + pos_array.cnt = 0; +} + diff --git a/app/bin/track.h b/app/bin/track.h index 4e24280..32626c5 100644 --- a/app/bin/track.h +++ b/app/bin/track.h @@ -23,10 +23,7 @@ #ifndef TRACK_H #define TRACK_H -#include <string.h> #include "common.h" -#include "draw.h" -#include "misc2.h" extern TRKTYP_T T_NOTRACK; @@ -35,6 +32,7 @@ typedef struct track_t * track_p; typedef struct track_t * track_cp; extern track_p tempTrack; extern wIndex_t trackCount; +extern wBool_t bFreeTrack; extern long colorTrack; extern long colorDraw; extern long drawTunnel; @@ -48,7 +46,6 @@ extern unsigned int curTrackLayer; extern coOrd descriptionOff; extern DIST_T roadbedWidth; extern DIST_T roadbedLineWidth; -extern long printCenterLines; extern long drawElevations; extern wDrawColor elevColorIgnore; extern wDrawColor elevColorDefined; @@ -137,13 +134,14 @@ typedef struct { #define Q_IS_TURNOUT (31) #define Q_GET_NODES (32) -typedef struct { +typedef struct traverseTrack_t { track_p trk; // IN Current Track OUT Next Track DIST_T length; // IN How far to go DIST_T dist; // OUT how far left = 0 if found coOrd pos; // IN/OUT - where we are, where we will be // IN/OUT - where we are now ANGLE_T angle; // IN/OUT - angle now - } traverseTrack_t, *traverseTrack_p; + } traverseTrack_t; +typedef struct traverseTrack_t *traverseTrack_p; typedef struct { @@ -151,7 +149,7 @@ typedef struct { void (*draw)( track_p, drawCmd_p, wDrawColor ); DIST_T (*distance)( track_p, coOrd * ); void (*describe)( track_p, char * line, CSIZE_T len ); - void (*delete)( track_p ); + void (*deleteTrk)( track_p ); BOOL_T (*write)( track_p, FILE * ); BOOL_T (*read)( char * ); void (*move)( track_p, coOrd ); @@ -198,17 +196,18 @@ typedef struct { } u; BOOL_T cacheSet; double cachedElev; - double cachedLength; + double cachedGrade; } elev_t; #define EPOPT_GAPPED (1L<<0) -typedef struct { +typedef struct trkEndPt_t { coOrd pos; ANGLE_T angle; TRKINX_T index; track_p track; elev_t elev; long option; - } trkEndPt_t, * trkEndPt_p; + } trkEndPt_t; +typedef struct trkEndPt_t * trkEndPt_p; extern dynArr_t tempEndPts_da; #define tempEndPts(N) DYNARR_N( trkEndPt_t, tempEndPts_da, N ) @@ -217,7 +216,7 @@ typedef enum { FREEFORM, RECTANGLE, POLYLINE } PolyType_e; -typedef struct { +typedef struct trkSeg_t { char type; wDrawColor color; DIST_T width; @@ -267,7 +266,8 @@ typedef struct { PolyType_e polyType; } p; } u; - } trkSeg_t, * trkSeg_p; + } trkSeg_t; +typedef struct trkSeg_t * trkSeg_p; #define SEG_STRTRK ('S') #define SEG_CRVTRK ('C') @@ -423,6 +423,8 @@ wBool_t CompareSegs( trkSeg_p, int, trkSeg_p, int ); /* debug.c */ void SetDebug( char * ); + +/*Remember to add bits to trackx.h if adding here */ #define TB_SELECTED (1<<0) #define TB_VISIBLE (1<<1) #define TB_PROFILEPATH (1<<2) @@ -435,7 +437,8 @@ void SetDebug( char * ); #define TB_BRIDGE (1<<9) #define TB_SELREDRAW (1<<10) // Track has been undrawn, don't draw it on Redraw -#define TB_UNDRAWN (1<<11) +#define TB_UNDRAWN (1<<11) +#define TB_DETAILDESC (1<<12) #define TB_TEMPBITS (TB_PROFILEPATH|TB_PROCESSED|TB_UNDRAWN) /* track.c */ @@ -464,10 +467,10 @@ void SetDebug( char * ); #define GetTrkEndAngle( T, I ) ((T)->endPt[I].angle) #define GetTrkEndOption( T, I ) ((T)->endPt[I].option) #define SetTrkEndOption( T, I, O ) ((T)->endPt[I].option=O) -#define GetTrkExtraData( T ) ((T)->extraData) +#define GetTrkExtraData( T, TT ) ((T)->extraData) #define GetTrkWidth( T ) (int)((T)->width) #define SetTrkWidth( T, W ) (T)->width = (unsigned int)(W) -#define GetTrkBits(T) ((T)->bits) +#define GetTrkBits(T) ((T)?((T)->bits):0) #define SetTrkBits(T,V) ((T)->bits|=(V)) #define ClrTrkBits(T,V) ((T)->bits&=~(V)) #define IsTrackDeleted(T) ((T)->deleted) @@ -490,7 +493,7 @@ coOrd GetTrkEndPos( track_p, EPINX_T ); ANGLE_T GetTrkEndAngle( track_p, EPINX_T ); long GetTrkEndOption( track_p, EPINX_T ); long SetTrkEndOption( track_p, EPINX_T, long ); -struct extraData * GetTrkExtraData( track_p ); +struct extraDataBase_t * GetTrkExtraData( track_p, TRKTYP_T ); int GetTrkWidth( track_p ); void SetTrkWidth( track_p, int ); int GetTrkBits( track_p ); @@ -502,7 +505,7 @@ BOOL_T IsTrackDeleted( track_p ); #define GetTrkSelected(T) (GetTrkBits(T)&TB_SELECTED) #define GetTrkVisible(T) (GetTrkBits(T)&TB_VISIBLE) #define GetTrkNoTies(T) (GetTrkBits(T)&TB_NOTIES) -#define GetTrkBridge(T) (GetTrkBits(T)&TB_BRIDGE) +#define GetTrkBridge(T) ((T)?GetTrkBits(T)&TB_BRIDGE:0) #define SetTrkVisible(T,V) ((V)?SetTrkBits(T,TB_VISIBLE):ClrTrkBits(T,TB_VISIBLE)) #define SetTrkNoTies(T,V) ((V)?SetTrkBits(T,TB_NOTIES):ClrTrkBits(T,TB_NOTIES)) #define SetTrkBridge(T,V) ((V)?SetTrkBits(T,TB_BRIDGE):ClrTrkBits(T,TB_BRIDGE)) @@ -514,8 +517,8 @@ void SetTrkEndElev( track_p, EPINX_T, int, DIST_T, char * ); int GetTrkEndElevMode( track_p, EPINX_T ); int GetTrkEndElevUnmaskedMode( track_p, EPINX_T ); DIST_T GetTrkEndElevHeight( track_p, EPINX_T ); -BOOL_T GetTrkEndElevCachedHeight (track_p trk, EPINX_T e, DIST_T *height, DIST_T *length); -void SetTrkEndElevCachedHeight ( track_p trk, EPINX_T e, DIST_T height, DIST_T length); +BOOL_T GetTrkEndElevCachedHeight (track_p trk, EPINX_T e, DIST_T *height, DIST_T *grade); +void SetTrkEndElevCachedHeight ( track_p trk, EPINX_T e, DIST_T height, DIST_T grade); char * GetTrkEndElevStation( track_p, EPINX_T ); #define EndPtIsDefinedElev( T, E ) (GetTrkEndElevMode(T,E)==ELEV_DEF) #define EndPtIsIgnoredElev( T, E ) (GetTrkEndElevMode(T,E)==ELEV_IGNORE) @@ -613,10 +616,15 @@ BOOL_T ComputeElev( track_p trk, EPINX_T ep, BOOL_T on_path, DIST_T * elev, DIST #define DTS_DASH (1<<8) #define DTS_DASHDOT (1<<9) #define DTS_DASHDOTDOT (1<<10) +#define DTS_CENTERONLY (1<<11) -void DrawCurvedTrack( drawCmd_p, coOrd, DIST_T, ANGLE_T, ANGLE_T, coOrd, coOrd, track_cp, wDrawColor, long ); +void DrawCurvedTrack( drawCmd_p, coOrd, DIST_T, ANGLE_T, ANGLE_T, track_cp, wDrawColor, long ); void DrawStraightTrack( drawCmd_p, coOrd, coOrd, ANGLE_T, track_cp, wDrawColor, long ); +void DrawStraightTies( drawCmd_p d, SCALEINX_T scaleInx, coOrd p0, coOrd p1, wDrawColor color ); +wBool_t DoDrawTies(drawCmd_p d, track_cp trk); +void DrawTie(drawCmd_p d, coOrd pos, ANGLE_T angle, DIST_T length, DIST_T width, wDrawColor color, BOOL_T solid); + ANGLE_T GetAngleAtPoint( track_p, coOrd, EPINX_T *, EPINX_T * ); DIST_T GetTrkDistance( track_cp, coOrd *); track_p OnTrack( coOrd *, INT_T, BOOL_T ); @@ -652,7 +660,7 @@ void FreeTrack( track_p ); void ClearTracks( void ); BOOL_T TrackIterate( track_p * ); -void LoosenTracks( void ); +void LoosenTracks( void * unused ); void SaveTrackState( void ); void RestoreTrackState( void ); @@ -686,9 +694,10 @@ BOOL_T ReplayTrackData(track_p, void *, long); DIST_T GetFlexLength( track_p, EPINX_T, coOrd * ); void LabelLengths( drawCmd_p, track_p, wDrawColor ); DIST_T GetTrkLength( track_p, EPINX_T, EPINX_T ); +void AddTrkDetails(drawCmd_p d, track_p trk, coOrd pos, DIST_T length, wDrawColor color); -void SelectAbove( void ); -void SelectBelow( void ); +void SelectAbove( void * unused ); +void SelectBelow( void * unused ); void FlipPoint( coOrd*, coOrd, ANGLE_T ); void FlipTrack( track_p, coOrd, ANGLE_T ); @@ -698,8 +707,16 @@ void AdvancePositionIndicator( track_p, coOrd, coOrd *, ANGLE_T * ); BOOL_T MakeParallelTrack( track_p, coOrd, DIST_T, DIST_T, track_p *, coOrd *, coOrd * , BOOL_T); +/*tstraight.c*/ +DIST_T StraightDescriptionDistance(coOrd pos, track_p trk, coOrd * dpos, BOOL_T show_hidden, BOOL_T * hidden); +STATUS_T StraightDescriptionMove(track_p trk,wAction_t action,coOrd pos ); + +/*tease.c*/ +DIST_T JointDescriptionDistance(coOrd pos,track_p trk,coOrd * dpos,BOOL_T show_hidden,BOOL_T * hidden); +STATUS_T JointDescriptionMove(track_p trk,wAction_t action,coOrd pos ); + /* cmisc.c */ -wIndex_t describeCmdInx; +extern wIndex_t describeCmdInx; typedef enum { DESC_NULL, DESC_POS, DESC_FLOAT, DESC_ANGLE, DESC_LONG, DESC_COLOR, DESC_DIM, DESC_PIVOT, DESC_LAYER, DESC_STRING, DESC_TEXT, DESC_LIST, DESC_EDITABLELIST, DESC_BOXED } descType; #define DESC_RO (1<<0) #define DESC_IGNORE (1<<1) @@ -720,7 +737,7 @@ typedef struct { int mode; wControl_p control0; wControl_p control1; - wPos_t posy; + wWinPix_t posy; } descData_t, * descData_p; typedef void (*descUpdate_t)( track_p, int, descData_p, BOOL_T ); void DoDescribe( char *, track_p, descData_p, descUpdate_t ); @@ -743,7 +760,7 @@ extern long oldElevationEvaluation; EPINX_T GetNextTrkOnPath( track_p trk, EPINX_T ep ); int FindDefinedElev( track_p, EPINX_T, int, BOOL_T, DIST_T *, DIST_T * ); BOOL_T ComputeElev( track_p, EPINX_T, BOOL_T, DIST_T *, DIST_T *, BOOL_T ); -void RecomputeElevations( void ); +void RecomputeElevations( void * unused ); void UpdateAllElevations( void ); DIST_T GetElevation( track_p ); void ClrTrkElev( track_p ); @@ -767,7 +784,7 @@ BOOL_T GetClosestEndPt( track_p, coOrd * ); BOOL_T ReadTableEdge( char * ); BOOL_T ReadText( char * ); void SetLineType( track_p trk, int width ); -void MenuMode(int ); +void MenuMode( void * moveVP ); /* chotbar.c */ extern DIST_T curBarScale; diff --git a/app/bin/trackx.h b/app/bin/trackx.h index 50fda1d..e572011 100644 --- a/app/bin/trackx.h +++ b/app/bin/trackx.h @@ -27,8 +27,6 @@ #include "common.h" #include "track.h" -struct extraData; - typedef struct track_t { struct track_t *next; TRKINX_T index; @@ -40,11 +38,11 @@ typedef struct track_t { BOOL_T new:1; unsigned int width:2; unsigned int elevMode:2; - unsigned int bits:12; + unsigned int bits:13; EPINX_T endCnt; trkEndPt_p endPt; struct { float x; float y; } lo, hi; - struct extraData * extraData; + struct extraDataBase_t * extraData; CSIZE_T extraSize; DIST_T elev; } track_t; diff --git a/app/bin/trknote.c b/app/bin/trknote.c index f27cf2e..f2462ba 100644 --- a/app/bin/trknote.c +++ b/app/bin/trknote.c @@ -20,31 +20,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdint.h> -#include <string.h> -#include <ctype.h> - +#include "common.h" #include "cundo.h" #include "custom.h" #include "dynstring.h" #include "fileio.h" -#include "i18n.h" #include "misc.h" #include "note.h" #include "param.h" #include "track.h" #include "include/utf8convert.h" -#include "utility.h" extern BOOL_T inDescribeCmd; extern descData_t noteDesc[]; -static TRKTYP_T T_NOTE = -1; +EXPORT TRKTYP_T T_NOTE = -1; static wDrawBitMap_p note_bm, link_bm, document_bm; typedef struct { - char **xpm; + char ***xpm; int OP; char * shortName; char * cmdName; @@ -52,14 +47,14 @@ typedef struct { long acclKey; } trknoteData_t; -#include "bitmaps/sticky-note-text.xpm" -#include "bitmaps/sticky-note-chain.xpm" -#include "bitmaps/sticky-note-clip.xpm" +#include "bitmaps/sticky-note.xpm" +#include "bitmaps/sticky-link.xpm" +#include "bitmaps/sticky-doc.xpm" static trknoteData_t noteTypes[] = { - { sticky_note_text_bits, OP_NOTETEXT, N_("Note"), N_("Comment"), "cmdTextNote", 0L }, - { sticky_note_chain_bits, OP_NOTELINK, N_("Link"), N_("Weblink"), "cmdLinkNote", 0L }, - { sticky_note_clip_bits, OP_NOTEFILE, N_("Document"), N_("Document"), "cmdFileNote", 0L }, + { sticky_note_xpm, OP_NOTETEXT, N_("Note"), N_("Comment"), "cmdTextNote", 0L }, + { sticky_link_xpm, OP_NOTELINK, N_("Link"), N_("Weblink"), "cmdLinkNote", 0L }, + { sticky_doc_xpm, OP_NOTEFILE, N_("Document"), N_("Document"), "cmdFileNote", 0L }, }; static long curNoteType; @@ -67,7 +62,7 @@ static long curNoteType; static unsigned layerSave; static coOrd posSave; -#define NOTETYPESCOUNT (sizeof(noteTypes)/sizeof(trknoteData_t)) +#define NOTETYPESCOUNT COUNT(noteTypes) /***************************************************************************** @@ -77,9 +72,9 @@ static coOrd posSave; static track_p NewNote(wIndex_t index, coOrd p, enum noteCommands command ) { track_p t; - struct extraDataNote * xx; + struct extraDataNote_t * xx; t = NewTrack(index, T_NOTE, 0, sizeof *xx); - xx = (struct extraDataNote *)GetTrkExtraData(t); + xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); xx->pos = p; xx->op = command; SetBoundingBox(t, p, p); @@ -96,26 +91,29 @@ static track_p NewNote(wIndex_t index, coOrd p, enum noteCommands command ) static void DrawNote(track_p t, drawCmd_p d, wDrawColor color) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(t); - coOrd p[4]; + struct extraDataNote_t *xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); + coOrd p[5]; + int type[5]; - if (d->scale >= 16) { - return; - } - if ((d->options & DC_SIMPLE)) { - //while the icon is moved, draw a square + + if ((d->options & DC_SIMPLE) || mainD.scale >= 16) { + //while the icon is moved, draw a square with a lopped off corner //because CmdMove draws all selected object into tempSeg and //tempSegDrawFuncs doesn't have a BitMap drawing func DIST_T dist; - dist = 0.1*mainD.scale; + dist = 0.8 + 0.1*(mainD.scale-16)/4; p[0].x = p[1].x = xx->pos.x - dist; - p[2].x = p[3].x = xx->pos.x + dist; + p[2].x = p[3].x = p[4].x = xx->pos.x + dist; p[1].y = p[2].y = xx->pos.y - dist; - p[3].y = p[0].y = xx->pos.y + dist; - DrawLine(d, p[0], p[1], 0, color); - DrawLine(d, p[1], p[2], 0, color); - DrawLine(d, p[2], p[3], 0, color); - DrawLine(d, p[3], p[0], 0, color); + p[3].y = p[4].y = p[0].y = xx->pos.y + dist; + p[3].y = p[3].y - (dist/2); + p[4].x = p[4].x - (dist/2); + + for (int i=0;i<5;i++) { + type[i] = 0; + } + DrawPoly(d, 5, p, type, color, 0, DRAW_CLOSED); + DrawPoly(d, 5, p, type, drawColorGold, 0, DRAW_FILL); } else { // draw a bitmap for static object wDrawBitMap_p bm; @@ -135,7 +133,7 @@ static void DrawNote(track_p t, drawCmd_p d, wDrawColor color) static DIST_T DistanceNote(track_p t, coOrd * p) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(t); + struct extraDataNote_t *xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); DIST_T d; d = FindDistance(*p, xx->pos); @@ -143,12 +141,12 @@ static DIST_T DistanceNote(track_p t, coOrd * p) return d; } - return 100000.0; + return DIST_INF; } static void DeleteNote(track_p t) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(t); + struct extraDataNote_t *xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); switch (xx->op) { case OP_NOTETEXT: @@ -180,7 +178,7 @@ static void DeleteNote(track_p t) void NoteStateSave(track_p trk) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); layerSave = GetTrkLayer(trk); posSave = xx->pos; } @@ -193,7 +191,7 @@ void CommonCancelNote(track_p trk) { if (inDescribeCmd) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); xx->layer = layerSave; xx->pos = posSave; SetBoundingBox(trk, xx->pos, xx->pos); @@ -201,9 +199,9 @@ CommonCancelNote(track_p trk) } static void -CommonUpdateNote(track_p trk, int inx, struct extraDataNote *noteData ) +CommonUpdateNote(track_p trk, int inx, struct extraDataNote_t *noteData ) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); switch (inx) { case OR_NOTE: @@ -220,10 +218,10 @@ CommonUpdateNote(track_p trk, int inx, struct extraDataNote *noteData ) } -void UpdateFile(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart) +void UpdateFile(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart) { track_p trk = noteUIData->trk; - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); switch (inx) { case OR_NOTE: @@ -253,10 +251,10 @@ void UpdateFile(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart } } -void UpdateLink(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart) +void UpdateLink(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart) { track_p trk = noteUIData->trk; - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); switch (inx) { case OR_NOTE: @@ -275,10 +273,10 @@ void UpdateLink(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart) } } -void UpdateText(struct extraDataNote *noteUIData, int inx, BOOL_T needUndoStart) +void UpdateText(struct extraDataNote_t *noteUIData, int inx, BOOL_T needUndoStart) { track_p trk = noteUIData->trk; - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t *xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); switch (inx) { case OR_NOTE: @@ -334,8 +332,9 @@ GetNoteMarker(enum noteCommands command ) static BOOL_T WriteNote(track_p t, FILE * f) { - struct extraDataNote *xx = (struct extraDataNote *)GetTrkExtraData(t); + struct extraDataNote_t *xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); BOOL_T rc = TRUE; + unsigned strings2convert = 1; rc &= fprintf(f, "NOTE %d %u 0 0 %0.6f %0.6f 0 %d", GetTrkIndex(t), GetTrkLayer(t), @@ -349,16 +348,18 @@ static BOOL_T WriteNote(track_p t, FILE * f) case OP_NOTELINK: s[0]=ConvertToEscapedText( xx->noteData.linkData.url ); s[1]=ConvertToEscapedText( xx->noteData.linkData.title ); + strings2convert = 2; break; case OP_NOTEFILE: s[0]=ConvertToEscapedText( xx->noteData.fileData.path ); s[1]=ConvertToEscapedText( xx->noteData.fileData.title ); + strings2convert = 2; break; default: AbortProg( "WriteNote: %d", xx->op ); } -#ifdef WINDOWS - for ( int inx = 0; inx < 2; inx++ ) { +#ifdef UTFCONVERT + for ( unsigned int inx = 0; inx < strings2convert; inx++ ) { if ( RequiresConvToUTF8( s[inx] ) ) { wSystemToUTF8 ( s[inx], message, sizeof message ); MyFree( s[inx] ); @@ -389,7 +390,7 @@ ReadTrackNote(char *line) track_p t; int size; char * cp; - struct extraDataNote *xx; + struct extraDataNote_t *xx; wIndex_t index; wIndex_t layer; coOrd pos; @@ -404,17 +405,17 @@ ReadTrackNote(char *line) return FALSE; } - if ( paramVersion >= 12 ) { + if ( paramVersion >= VERSION_INLINENOTE ) { noteType = size; t = NewNote(index, pos, noteType); SetTrkLayer(t, layer); - xx = (struct extraDataNote *)GetTrkExtraData(t); + xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); switch (noteType) { case OP_NOTETEXT: if ( !GetArgs( cp, "qc", &sText, &cp ) ) return FALSE; -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem( sText ); #endif xx->noteData.text = sText; @@ -422,13 +423,13 @@ ReadTrackNote(char *line) case OP_NOTELINK: if ( !GetArgs( cp, "qc", &sText, &cp ) ) return FALSE; -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem( sText ); #endif xx->noteData.linkData.url = sText; if ( !GetArgs( cp, "qc", &sText, &cp ) ) return FALSE; -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem( sText ); #endif xx->noteData.linkData.title = sText; @@ -436,13 +437,13 @@ ReadTrackNote(char *line) case OP_NOTEFILE: if ( !GetArgs( cp, "qc", &sText, &cp ) ) return FALSE; -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem( sText ); #endif xx->noteData.fileData.path = sText; if ( !GetArgs( cp, "qc", &sText, &cp ) ) return FALSE; -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem( sText ); #endif xx->noteData.fileData.title = sText; @@ -467,7 +468,7 @@ ReadTrackNote(char *line) t = NewNote(index, pos, noteType); SetTrkLayer(t, layer); - xx = (struct extraDataNote *)GetTrkExtraData(t); + xx = GET_EXTRA_DATA( t, T_NOTE, extraDataNote_t ); switch (noteType) { case OP_NOTETEXT: @@ -515,7 +516,7 @@ ReadNote(char * line) static void MoveNote(track_p trk, coOrd orig) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); xx->pos.x += orig.x; xx->pos.y += orig.y; SetBoundingBox(trk, xx->pos, xx->pos); @@ -524,14 +525,14 @@ static void MoveNote(track_p trk, coOrd orig) static void RotateNote(track_p trk, coOrd orig, ANGLE_T angle) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); Rotate(&xx->pos, orig, angle); SetBoundingBox(trk, xx->pos, xx->pos); } static void RescaleNote(track_p trk, FLOAT_T ratio) { - struct extraDataNote * xx = (struct extraDataNote *)GetTrkExtraData(trk); + struct extraDataNote_t * xx = GET_EXTRA_DATA( trk, T_NOTE, extraDataNote_t ); xx->pos.x *= ratio; xx->pos.y *= ratio; } @@ -574,8 +575,8 @@ static BOOL_T QueryNote( track_p trk, int query ) static wBool_t CompareNote( track_cp trk1, track_cp trk2 ) { - struct extraDataNote *xx1 = (struct extraDataNote *)GetTrkExtraData( trk1 ); - struct extraDataNote *xx2 = (struct extraDataNote *)GetTrkExtraData( trk2 ); + struct extraDataNote_t *xx1 = GET_EXTRA_DATA( trk1, T_NOTE, extraDataNote_t ); + struct extraDataNote_t *xx2 = GET_EXTRA_DATA( trk2, T_NOTE, extraDataNote_t ); char * cp = message + strlen(message); REGRESS_CHECK_POS( "Pos", xx1, xx2, pos ) REGRESS_CHECK_INT( "Layer", xx1, xx2, layer ) @@ -636,7 +637,7 @@ static STATUS_T CmdNote(wAction_t action, coOrd pos) switch (action) { case C_START: InfoMessage(_("Place a note on the layout")); - curNoteType = (long)commandContext; + curNoteType = VP2L(commandContext); return C_CONTINUE; case C_DOWN: @@ -697,7 +698,7 @@ static STATUS_T CmdNote(wAction_t action, coOrd pos) #include "bitmaps/note.xbm" #include "bitmaps/link.xbm" #include "bitmaps/clip.xbm" -#include "bitmaps/cnote.xpm" +// RWS not used #include "bitmaps/note.xpm" void InitTrkNote(wMenu_p menu) { @@ -711,8 +712,8 @@ void InitTrkNote(wMenu_p menu) wIcon_p icon; nt = noteTypes + i; - icon = wIconCreatePixMap(nt->xpm); - AddMenuButton(menu, CmdNote, nt->helpKey, _(nt->cmdName), icon, LEVEL0_50, IC_STICKY | IC_POPUP2, nt->acclKey, (void *)(intptr_t)nt->OP); + icon = wIconCreatePixMap(nt->xpm[iconSize]); + AddMenuButton(menu, CmdNote, nt->helpKey, _(nt->cmdName), icon, LEVEL0_50, IC_STICKY | IC_POPUP2, nt->acclKey, I2VP(nt->OP)); } ButtonGroupEnd(); diff --git a/app/bin/trkseg.c b/app/bin/trkseg.c index 3e38933..ebe1916 100644 --- a/app/bin/trkseg.c +++ b/app/bin/trkseg.c @@ -20,24 +20,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <track.h> -#include <time.h> -#include <ctype.h> -#include <math.h> -#include <stdarg.h> -#include "track.h" -#include <common.h> -#include <cbezier.h> -#include <string.h> - -#include <tbezier.h> - -#include "cjoin.h" +#include "common.h" #include "fileio.h" #include "param.h" #include "track.h" -#include "utility.h" #include "misc.h" +#include "cbezier.h" +#include "tbezier.h" +#include "cjoin.h" /***************************************************************************** @@ -245,10 +235,26 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo case SEG_TBLEDGE: case SEG_CRVLIN: case SEG_JNTTRK: - if ( (segPtr->type == SEG_CRVTRK) || - (segPtr->type == SEG_CRVLIN) ) { + REORIGIN( p0, GetSegEndPt( segPtr, 0, FALSE, NULL ), angle, xlat ) + REORIGIN( p1, GetSegEndPt( segPtr, 1, FALSE, NULL ), angle, xlat ) + if (p0.x < p1.x) { + lo->x = p0.x; + hi->x = p1.x; + } else { + lo->x = p1.x; + hi->x = p0.x; + } + if (p0.y < p1.y) { + lo->y = p0.y; + hi->y = p1.y; + } else { + lo->y = p1.y; + hi->y = p0.y; + } + if ( (segPtr->type == SEG_CRVTRK) || + (segPtr->type == SEG_CRVLIN) ) { /* TODO: be more precise about curved line width */ - width.x = width.y = segPtr->width/2.0; + width.x = width.y = fabs(segPtr->width)/2.0; REORIGIN( pc, segPtr->u.c.center, angle, xlat ); a0 = NormalizeAngle( segPtr->u.c.a0 + angle ); a1 = segPtr->u.c.a1; @@ -260,34 +266,25 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo hi->y = pc.y + radius; break; } - if ( a0 + a1 >= 360.0 ) + + if ( a0 + a1 >= 360.0 ) hi->y = pc.y + radius; if ( a0 < 90.0 && a0+a1 >= 90.0 ) hi->x = pc.x + radius; - if ( a0 < 180 && a0+a1 >= 180.0 ) + if ( a0 > 90.0 && a0+a1 >= 450.0 ) + hi->x = pc.x + radius; + if ( a0 < 180.0 && a0+a1 >= 180.0 ) + lo->y = pc.y - radius; + if (a0 > 180.0 && a0+a1 >= 540.0 ) lo->y = pc.y - radius; if ( a0 < 270.0 && a0+a1 >= 270.0 ) lo->x = pc.x - radius; - } - REORIGIN( p0, GetSegEndPt( segPtr, 0, FALSE, NULL ), angle, xlat ) - REORIGIN( p1, GetSegEndPt( segPtr, 1, FALSE, NULL ), angle, xlat ) - if (p0.x < p1.x) { - lo->x = p0.x; - hi->x = p1.x; - } else { - lo->x = p1.x; - hi->x = p0.x; - } - if (p0.y < p1.y) { - lo->y = p0.y; - hi->y = p1.y; - } else { - lo->y = p1.y; - hi->y = p0.y; + if ( a0 > 270.0 && a0+a1 >= 630.0 ) + lo->x = pc.x - radius; } if ( segPtr->type == SEG_STRLIN ) { - width.x = segPtr->width * fabs(cos( D2R( FindAngle(p0, p1) ) ) ) / 2.0; - width.y = segPtr->width * fabs(sin( D2R( FindAngle(p0, p1) ) ) ) / 2.0; + width.x = fabs(segPtr->width) * fabs(cos( D2R( FindAngle(p0, p1) ) ) ) / 2.0; + width.y = fabs(segPtr->width) * fabs(sin( D2R( FindAngle(p0, p1) ) ) ) / 2.0; } else if ( segPtr->type == SEG_BENCH ) { width.x = BenchGetWidth( segPtr->u.l.option ) * fabs(cos( D2R( FindAngle(p0, p1) ) ) ) / 2.0; width.y = BenchGetWidth( segPtr->u.l.option ) * fabs(sin( D2R( FindAngle(p0, p1) ) ) ) / 2.0; @@ -295,7 +292,7 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo break; case SEG_POLY: /* TODO: be more precise about poly line width */ - width.x = width.y = segPtr->width/2.0; + width.x = width.y = fabs(segPtr->width)/2.0; case SEG_FILPOLY: for (inx=0; inx<segPtr->u.p.cnt; inx++ ) { REORIGIN( p0, segPtr->u.p.pts[inx].pt, angle, xlat ) @@ -338,7 +335,7 @@ static void Get1SegBounds( trkSeg_p segPtr, coOrd xlat, ANGLE_T angle, coOrd *lo hi->x = hi->x<pBez[i].x?pBez[i].x:hi->x; hi->y = hi->y<pBez[i].y?pBez[i].y:hi->y; } - width.x = width.y = segPtr->width/2.0; + width.x = width.y = fabs(segPtr->width)/2.0; break; default: ; @@ -580,7 +577,8 @@ EXPORT void RescaleSegs( int inx; for (s=segs; s<&segs[segCnt]; s++) { - s->width *= scale_w; + if (s->width>0) + s->width *= scale_w; switch (s->type) { case SEG_STRLIN: case SEG_DIMLIN: @@ -722,7 +720,7 @@ EXPORT DIST_T DistanceSegs( coOrd * pos, wIndex_t * inx_ret ) { - DIST_T d, dd = 100000.0, ddd; + DIST_T d, dd = DIST_INF, ddd; coOrd p0, p1, p2, pt, lo, hi; BOOL_T found = FALSE; wIndex_t inx, lin; @@ -753,12 +751,12 @@ EXPORT DIST_T DistanceSegs( break; case SEG_POLY: case SEG_FILPOLY: - ddd = 100000.0; + ddd = DIST_INF; for (lin=0;lin<segPtr->u.p.cnt;lin++) { pt = p0; if (lin < segPtr->u.p.cnt-1 ) ddd = LineDistance( &pt, segPtr->u.p.pts[lin].pt, segPtr->u.p.pts[lin+1].pt ); - else + else if (segPtr->u.p.polyType != POLYLINE) ddd = LineDistance( &pt, segPtr->u.p.pts[lin].pt, segPtr->u.p.pts[0].pt ); if ( ddd < dd ) { dd = ddd; @@ -768,7 +766,7 @@ EXPORT DIST_T DistanceSegs( break; case SEG_BEZTRK: case SEG_BEZLIN: - dd = 100000.0; + dd = DIST_INF; pt = p0; for (int i = 0;i<segPtr->bezSegs.cnt;i++) { segProcData2.distance.pos1 = pt; @@ -814,7 +812,7 @@ EXPORT DIST_T DistanceSegs( dd = JointDistance( &p1, segPtr->u.j.pos, segPtr->u.j.angle, segPtr->u.j.l0, segPtr->u.j.l1, segPtr->u.j.R, segPtr->u.j.L, segPtr->u.j.negate, segPtr->u.j.Scurve ); break; default: - dd = 100000.0; + dd = DIST_INF; } if (dd < d) { d = dd; @@ -1353,6 +1351,7 @@ EXPORT BOOL_T ReadSegs( void ) rc = FALSE; /*??*/break; } + if (s->type == SEG_FILPOLY) s->u.p.polyType = FREEFORM; //Ensure closed if filled s->color = wDrawFindColor( rgb ); s->u.p.pts = (pts_t*)MyMalloc( s->u.p.cnt * sizeof (pts_t) ); for ( i=0; i<s->u.p.cnt; i++ ) { @@ -1691,8 +1690,14 @@ EXPORT void DrawDimLine( size.x = textsize.x/2.0; size.y = textsize.y/2.0; dist1 = FindDistance( zero, size ); - if ( dist <= dist1*2 ) { + if ( dist <= dist1*1.5 ) { DrawLine( d, p0, p1, width, color ); + coOrd s_pos; + s_pos.x = (p1.x-p0.x)*middle+p0.x; + s_pos.y = (p1.y-p0.y)*middle+p0.y; + ANGLE_T a = FindAngle(p0,p1); + Translate(&s_pos,s_pos,a+90,textsize.y/2); + DrawString( d, s_pos, 0.0, dimP, fp, fs, color ); return; } a1 = FindAngle( zero, size ); @@ -1750,10 +1755,10 @@ EXPORT void DrawSegsO( DIST_T factor = d->dpi/d->scale; trkSeg_p tempPtr; - long option; + long option; wFontSize_t fs; - wBool_t bFill; + wBool_t bFill,bThick; for (i=0; i<segCnt; i++,segPtr++ ) { if (color == wDrawColorBlack) { @@ -1764,7 +1769,7 @@ EXPORT void DrawSegsO( } wDrawWidth thick = 3; #ifdef WINDOWS - thick *= (wDrawWidth)(d->dpi/mainD.dpi); + thick *= (wDrawWidth)(d->dpi/75.0); #endif switch (segPtr->type) { case SEG_STRLIN: @@ -1780,13 +1785,22 @@ EXPORT void DrawSegsO( color1 = normalColor; if ( segPtr->color == wDrawColorWhite ) break; + if (options&DTS_CENTERONLY) { + DrawLine( d, p0, p1, thick, color1 ); + break; + } DrawStraightTrack( d, p0, p1, FindAngle(p1, p0 ), trk, color1, options ); break; - case SEG_STRLIN: - DrawLine( d, p0, p1, (d->options&DC_THICK)?thick:(wDrawWidth)floor(segPtr->width*factor+0.5), color1 ); + case SEG_STRLIN:; + wDrawWidth w; + if (segPtr->width <0) + w = (int)floor(fabs(segPtr->width)+0.5); + else + w = (int)floor(fabs(segPtr->width*factor)+0.5); + DrawLine( d, p0, p1, (d->options&DC_THICK)?thick:w, color1 ); break; case SEG_DIMLIN: case SEG_BENCH: @@ -1811,7 +1825,7 @@ EXPORT void DrawSegsO( DrawBench( d, p0, p1, color1, color2, options, segPtr->u.l.option ); break; case SEG_TBLEDGE: - DrawLine( d, p0, p1, (wDrawWidth)floor(3.0/mainD.dpi*d->dpi+0.5) , color ); + DrawLine( d, p0, p1, (wDrawWidth)floor(3.0/BASE_DPI*d->dpi+0.5) , color ); break; } } @@ -1828,15 +1842,24 @@ EXPORT void DrawSegsO( if ( segPtr->color == wDrawColorWhite ) break; p0.x = p0.y = p1.x = p1.y = 0; + if (options&DTS_CENTERONLY) { + DrawArc( d, c, fabs(segPtr->u.c.radius), a0, segPtr->u.c.a1, + FALSE, thick, color1 ); + break; + } DrawCurvedTrack( d, c, fabs(segPtr->u.c.radius), a0, segPtr->u.c.a1, - p0, p1, trk, color1, options ); } else { + wDrawWidth w; + if (segPtr->width <0) + w = (int)floor(fabs(segPtr->width)+0.5); + else + w = (int)floor(segPtr->width*factor+0.5); DrawArc( d, c, fabs(segPtr->u.c.radius), a0, segPtr->u.c.a1, - FALSE, (d->options&DC_THICK)?thick:(wDrawWidth)floor(segPtr->width*factor+0.5), color1 ); + FALSE, (d->options&DC_THICK)?thick:w, color1 ); } break; case SEG_BEZTRK: @@ -1846,13 +1869,15 @@ EXPORT void DrawSegsO( color1 = normalColor; if ( segPtr->color == wDrawColorWhite ) break; - } else - REORIGIN(p0, segPtr->u.b.pos[0], angle, orig); - REORIGIN(p1, segPtr->u.b.pos[1], angle, orig); - REORIGIN(p2, segPtr->u.b.pos[2], angle, orig); - REORIGIN(p3, segPtr->u.b.pos[3], angle, orig); - - for(int j=0;j<segPtr->bezSegs.cnt;j++) { //Loop through sub Segs + } + //else { + REORIGIN(p0,segPtr->u.b.pos[0],angle,orig); + REORIGIN(p1,segPtr->u.b.pos[1],angle,orig); + REORIGIN(p2,segPtr->u.b.pos[2],angle,orig); + REORIGIN(p3,segPtr->u.b.pos[3],angle,orig); + //} + + for(int j=0;j<segPtr->bezSegs.cnt;j++) { //Loop through sub Segs tempPtr = &DYNARR_N(trkSeg_t,segPtr->bezSegs,j); switch (tempPtr->type) { case SEG_CRVTRK: @@ -1863,15 +1888,24 @@ EXPORT void DrawSegsO( if (color1 == wDrawColorBlack) color1 = normalColor; if ( tempPtr->color == wDrawColorWhite ) break; p0.x = p0.y = p1.x = p1.y = 0; - DrawCurvedTrack( d, + if (options&DTS_CENTERONLY) { + DrawArc( d, c, fabs(segPtr->u.c.radius), a0, segPtr->u.c.a1, + FALSE, thick, color1 ); + break; + } + DrawCurvedTrack( d, c, fabs(tempPtr->u.c.radius), a0, tempPtr->u.c.a1, - p0, p1, trk, color1, options ); } else if (tempPtr->type == SEG_CRVLIN) { + wDrawWidth w; + if (tempPtr->width <0) + w = (int)floor(fabs(tempPtr->width)+0.5); + else + w = (int)floor(tempPtr->width*factor+0.5); DrawArc( d, c, fabs(tempPtr->u.c.radius), a0, tempPtr->u.c.a1, - FALSE, (d->options&DC_THICK)?thick:(wDrawWidth)floor(tempPtr->width*factor+0.5), color1 ); + FALSE, (d->options&DC_THICK)?thick:w, color1 ); } break; case SEG_STRTRK: @@ -1879,14 +1913,23 @@ EXPORT void DrawSegsO( if ( tempPtr->color == wDrawColorWhite ) break; REORIGIN(p0,tempPtr->u.l.pos[0], angle, orig); REORIGIN(p1,tempPtr->u.l.pos[1], angle, orig); - DrawStraightTrack( d, p0, p1, - FindAngle(p1, p0 ), - trk, color1, options ); + if (options&DTS_CENTERONLY) { + DrawLine( d, p0, p1, thick, color1 ); + break; + } + DrawStraightTrack( d, p0, p1, + FindAngle(p1,p0), + trk,color1,options); break; case SEG_STRLIN: REORIGIN(p0,tempPtr->u.l.pos[0], angle, orig); REORIGIN(p1,tempPtr->u.l.pos[1], angle, orig); - DrawLine( d, p0, p1, (d->options&DC_THICK)?thick:(wDrawWidth)floor(tempPtr->width*factor+0.5), color1 ); + wDrawWidth w; + if (tempPtr->width <0) + w = (int)floor(fabs(tempPtr->width)+0.5); + else + w = (int)floor(tempPtr->width*factor+0.5); + DrawLine( d, p0, p1, (d->options&DC_THICK)?thick:w, color1 ); break; } } @@ -1914,20 +1957,48 @@ EXPORT void DrawSegsO( bFill = (segPtr->type == SEG_FILPOLY); if ( (d->options&DC_SIMPLE) && programMode != MODE_TRAIN ) bFill = FALSE; - DrawPoly( d, segPtr->u.p.cnt, tempPts, tempTypes, color1, (d->options&DC_THICK)?thick:(wDrawWidth)floor(segPtr->width*factor+0.5), bFill?1:0, segPtr->u.p.polyType==POLYLINE?1:0); + + // If we are drawing highlights for Select, don't fill just edges + bThick = d->options&DC_THICK; + if (&tempD == d && ( color == wDrawColorPreviewSelected || color == wDrawColorPreviewUnselected || color == selectedColor)) { + bFill = FALSE; + bThick = TRUE; + } + + wDrawWidth w; + if (segPtr->width <0) + w = (int)floor(fabs(segPtr->width)+0.5); + else + w = (int)floor(segPtr->width*factor+0.5); + drawFill_e eOptFill; + if ( bFill ) + eOptFill = DRAW_FILL; + else if ( segPtr->u.p.polyType == POLYLINE ) + eOptFill = DRAW_OPEN; + else + eOptFill = DRAW_CLOSED; + DrawPoly( d, segPtr->u.p.cnt, tempPts, tempTypes, color1, bThick?thick:w, eOptFill ); free(tempPts); free(tempTypes); + break; case SEG_FILCRCL: REORIGIN( c, segPtr->u.c.center, angle, orig ) bFill = TRUE; if ( (d->options&DC_SIMPLE) && programMode != MODE_TRAIN ) bFill = FALSE; + + // If we are drawing highlights for Select, don't fill just edges + bThick = d->options&DC_THICK; + if (&tempD == d && (color == wDrawColorPreviewSelected || color == wDrawColorPreviewUnselected || color == selectedColor)) { + bFill = FALSE; + bThick = TRUE; + } if ( bFill ) { DrawFillCircle( d, c, fabs(segPtr->u.c.radius), color1 ); } else { DrawArc( d, c, fabs(segPtr->u.c.radius), 0, 360, - FALSE, (d->options&DC_THICK)?thick:(wDrawWidth)0, color1 ); + FALSE, bThick?thick:(wDrawWidth)0, color1 ); } break; } @@ -1987,7 +2058,7 @@ EXPORT void AppendSegsToArray(dynArr_t * seg_to, dynArr_t * seg_from) { for (int i=0; i<seg_from->cnt;i++,j++) { trkSeg_p from_p = &DYNARR_N(trkSeg_t, * seg_from,j); trkSeg_p to_p = &DYNARR_N(trkSeg_t, * seg_to,i); - memcpy((void *)to_p,(void *)from_p,sizeof( trkSeg_t)); + memcpy(to_p,from_p,sizeof( trkSeg_t)); if (from_p->type == SEG_BEZLIN || from_p->type == SEG_BEZTRK) { if (from_p->bezSegs.ptr) { to_p->bezSegs.ptr = memdup(from_p->bezSegs.ptr,from_p->bezSegs.cnt*sizeof(trkSeg_t)); @@ -2008,7 +2079,7 @@ EXPORT void AppendTransformedSegs(dynArr_t * seg_to, dynArr_t * seg_from, coOrd for (int i=0; i<seg_from->cnt;i++,j++) { trkSeg_p from_p = &DYNARR_N(trkSeg_t, * seg_from,j); trkSeg_p to_p = &DYNARR_N(trkSeg_t, * seg_to,i); - memcpy((void *)to_p,(void *)from_p,sizeof( trkSeg_t)); + memcpy(to_p,from_p,sizeof( trkSeg_t)); if (from_p->type == SEG_BEZLIN || from_p->type == SEG_BEZTRK) { if (from_p->bezSegs.ptr) { to_p->bezSegs.ptr = memdup(from_p->bezSegs.ptr,from_p->bezSegs.cnt*sizeof(trkSeg_t)); diff --git a/app/bin/tstraigh.c b/app/bin/tstraigh.c index f9b666f..4408023 100644 --- a/app/bin/tstraigh.c +++ b/app/bin/tstraigh.c @@ -20,17 +20,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <math.h> - #include "cstraigh.h" #include "cundo.h" #include "fileio.h" -#include "i18n.h" #include "layout.h" -#include "messages.h" #include "param.h" #include "track.h" -#include "utility.h" +#include "common-ui.h" /******************************************************************************* * @@ -40,6 +36,11 @@ static TRKTYP_T T_STRAIGHT = -1; +typedef struct extraDataStraight_t { + extraDataBase_t base; + coOrd descriptionOff; + } extraDataStraight_t; + /**************************************** * @@ -87,7 +88,7 @@ static descData_t strDesc[] = { /*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &strData.endPt[1] }, /*Z1*/ { DESC_DIM, N_("Z"), &strData.elev[1] }, /*LN*/ { DESC_DIM, N_("Length"), &strData.length }, -/*AN*/ { DESC_ANGLE, N_("Angle"), &strData.angle }, +/*AN*/ { DESC_ANGLE, N_("Track Angle"), &strData.angle }, /*GR*/ { DESC_FLOAT, N_("Grade"), &strData.grade }, /*PV*/ { DESC_PIVOT, N_("Pivot"), &strData.pivot }, /*LY*/ { DESC_LAYER, N_("Layer"), &strData.layerNumber }, @@ -172,49 +173,6 @@ static void UpdateStraight( track_p trk, int inx, descData_p descUpd, BOOL_T fin strDesc[inx==Z0?Z1:Z0].mode |= DESC_CHANGE; /*return;*/ break; -#ifdef LATER - update = UpdateDescStraight( 0, &strDesc[E0], &strDesc[E1], &strDesc[LN], &strDesc[AN], strData.pivot ); - break; - case E1: - update = UpdateDescStraight( 1, &strDesc[E0], &strDesc[E1], &strDesc[LN], &strDesc[AN], strData.pivot ); - break; - case E1: - strData.length = FindDistance( strData.endPt[0], strData.endPt[1] ); - strData.angle = FindAngle( strData.endPt[0], strData.endPt[1] ); - strDesc[1-inx].mode |= DESC_CHANGE; - strDesc[LN].mode |= DESC_CHANGE; - strDesc[AN].mode |= DESC_CHANGE; - break; - case LN: - if ( strData.length < minLength ) { - ErrorMessage( ); - strData.length = FindDistance( strData.endPt[0], strData.endPt[1] ); - strDesc[LN].mode |= DESC_CHANGE; - break; - } - case AN: - switch (strData.pivot) { - case DESC_PIVOT_FIRST: - Translate( &strData.endPt[1], strData.endPt[0], strData.angle, strData.length ); - strDesc[E1].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_SECOND: - Translate( &strData.endPt[0], strData.endPt[1], strData.angle+180.0, strData.length ); - strDesc[E0].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_MID: - mid.x = (strData.endPt[0].x+strData.endPt[1].x)/2.0; - mid.y = (strData.endPt[0].y+strData.endPt[1].y)/2.0; - Translate( &strData.endPt[0], mid, strData.angle+180.0, strData.length/2.0 ); - Translate( &strData.endPt[1], mid, strData.angle, strData.length/2.0 ); - strDesc[E0].mode |= DESC_CHANGE; - strDesc[E1].mode |= DESC_CHANGE; - break; - default: - break; - } - break; -#endif case LY: SetTrkLayer( trk, strData.layerNumber); break; @@ -272,8 +230,109 @@ static DIST_T DistanceStraight( track_p t, coOrd * p ) return LineDistance( p, GetTrkEndPos(t,0), GetTrkEndPos(t,1) ); } +STATUS_T StraightDescriptionMove( + track_p trk, + wAction_t action, + coOrd pos ) +{ + extraDataStraight_t *xx = GET_EXTRA_DATA(trk, T_STRAIGHT, extraDataStraight_t); + ANGLE_T a,ap; + coOrd end0, end1; + end0 = GetTrkEndPos(trk,0); + end1 = GetTrkEndPos(trk,1); + a = FindAngle(end0,end1); + ap = NormalizeAngle(FindAngle(end0,pos)-FindAngle(end0,end1)); + + xx->descriptionOff.y = FindDistance(end0,pos)*sin(D2R(ap))-2*GetTrkGauge(trk); + xx->descriptionOff.x = -0.5 + FindDistance(end0,pos)*cos(D2R(ap))/FindDistance(end0,end1); + if (xx->descriptionOff.x > 0.5) xx->descriptionOff.x = 0.5; + if (xx->descriptionOff.x < -0.5) xx->descriptionOff.x = -0.5; + + + return C_CONTINUE; + +} + +DIST_T StraightDescriptionDistance( + coOrd pos, + track_p trk, + coOrd * dpos, + BOOL_T show_hidden, + BOOL_T * hidden) +{ + coOrd p1; + if (hidden) *hidden = FALSE; + if ( GetTrkType( trk ) != T_STRAIGHT || ((( GetTrkBits( trk ) & TB_HIDEDESC ) != 0 ) && !show_hidden)) + return DIST_INF; + + struct extraDataStraight_t *xx = GET_EXTRA_DATA(trk, T_STRAIGHT, extraDataStraight_t); + ANGLE_T a; + coOrd end0, end0off, end1, end1off; + end0 = GetTrkEndPos(trk,0); + end1 = GetTrkEndPos(trk,1); + a = FindAngle(end0,end1); + Translate(&end0off,end0,a+90,2*GetTrkGauge(trk)+xx->descriptionOff.y); + Translate(&end1off,end1,a+90,2*GetTrkGauge(trk)+xx->descriptionOff.y); + + p1.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + p1.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y; + + if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); + *dpos = p1; + coOrd tpos = pos; + if (LineDistance(&tpos,end0,end1)<FindDistance( p1, pos )) + return LineDistance(&pos,end0,end1); + return FindDistance( p1, pos ); +} + + +static void DrawStraightDescription( + track_p trk, + drawCmd_p d, + wDrawColor color ) +{ + ANGLE_T a; + struct extraDataStraight_t *xx = GET_EXTRA_DATA(trk, T_STRAIGHT, extraDataStraight_t); + + if (layoutLabels == 0) + return; + if ((labelEnable&LABELENABLE_TRKDESC)==0) + return; + + coOrd end0, end0off, end1, end1off; + end0 = GetTrkEndPos(trk,0); + end1 = GetTrkEndPos(trk,1); + a = FindAngle(end0,end1); + Translate(&end0off,end0,a+90,2*GetTrkGauge(trk)+xx->descriptionOff.y); + DrawLine(d,end0,end0off,0,color); + Translate(&end1off,end1,a+90,2*GetTrkGauge(trk)+xx->descriptionOff.y); + DrawLine(d,end1,end1off,0,color); + sprintf( message, "L%s A%0.3f", + FormatDistance(FindDistance(end0,end1)),FindAngle(end0,end1)); + + DrawDimLine( d, end0off, end1off, message, (wFontSize_t)descriptionFontSize, xx->descriptionOff.x+0.5, 0, color, 0x00 ); + + if ( !(GetTrkBits( trk ) & TB_DETAILDESC) ) return; + + if ( GetTrkBits( trk ) & TB_DETAILDESC ) { + coOrd details_pos; + details_pos.x = (end1off.x - end0off.x)*(xx->descriptionOff.x+0.5) + end0off.x; + details_pos.y = (end1off.y - end0off.y)*(xx->descriptionOff.x+0.5) + end0off.y-(2*descriptionFontSize/mainD.dpi); + + AddTrkDetails(d, trk, details_pos, FindDistance(end0,end1), color); + } + +} + static void DrawStraight( track_p t, drawCmd_p d, wDrawColor color ) { + if (((d->options&(DC_SIMPLE|DC_SEGTRACK))==0) && + (labelWhen == 2 || (labelWhen == 1 && (d->options&DC_PRINT))) && + labelScale >= d->scale && + ( GetTrkBits( t ) & TB_HIDEDESC ) == 0 ) { + DrawStraightDescription( t, d, color ); + } + long bridge = GetTrkBridge( t ); long widthOptions = DTS_LEFT|DTS_RIGHT; DrawStraightTrack( d, GetTrkEndPos(t,0), GetTrkEndPos(t,1), GetTrkEndAngle(t,0), @@ -288,10 +347,17 @@ static void DeleteStraight( track_p t ) static BOOL_T WriteStraight( track_p t, FILE * f ) { + long options; + struct extraDataStraight_t *xx = GET_EXTRA_DATA(t, T_STRAIGHT, extraDataStraight_t); BOOL_T rc = TRUE; - rc &= fprintf(f, "STRAIGHT %d %d %ld 0 0 %s %d\n", - GetTrkIndex(t), GetTrkLayer(t), (long)GetTrkWidth(t), - GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0) )>0; + + options = GetTrkWidth(t) & 0x0F; + if ( ( GetTrkBits(t) & TB_HIDEDESC ) == 0 ) + // 0x80 means Show Description + options |= 0x80; + rc &= fprintf(f, "STRAIGHT %d %d %ld 0 0 %s %d %0.6f %0.6f\n", + GetTrkIndex(t), GetTrkLayer(t), options, + GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), xx->descriptionOff.x, xx->descriptionOff.y )>0; rc &= WriteEndPt( f, t, 0 ); rc &= WriteEndPt( f, t, 1 ); rc &= fprintf(f, "\t%s\n", END_SEGS)>0; @@ -306,12 +372,21 @@ static BOOL_T ReadStraight( char * line ) char scale[10]; wIndex_t layer; long options; + struct extraDataStraight_t *xx; + char * cp = NULL; + coOrd descriptionOff = { 0.0, 0.0 }; - if ( !GetArgs( line+8, paramVersion<3?"dXZsd":"dLl00sd", &index, &layer, &options, scale, &visible ) ) + if ( !GetArgs( line+8, paramVersion<3?"dXZsdc":"dLl00sdc", &index, &layer, &options, scale, &visible, &cp ) ) return FALSE; + if (cp) { + if (!GetArgs(cp,"p",&descriptionOff)) + return FALSE; + } if ( !ReadSegs() ) return FALSE; - trk = NewTrack( index, T_STRAIGHT, 0, 0 ); + trk = NewTrack( index, T_STRAIGHT, 0, sizeof *xx ); + xx = GET_EXTRA_DATA(trk, T_STRAIGHT, extraDataStraight_t); + xx->descriptionOff = descriptionOff; SetTrkScale( trk, LookupScale(scale) ); if ( paramVersion < 3 ) { SetTrkVisible(trk, visible!=0); @@ -323,9 +398,11 @@ static BOOL_T ReadStraight( char * line ) SetTrkBridge(trk, visible&8); } SetTrkLayer(trk, layer); - SetTrkWidth( trk, (int)(options&3) ); + SetTrkWidth( trk, (int)(options & 0x0F) ); SetEndPts( trk, 2 ); ComputeBoundingBox( trk ); + if ( paramVersion < VERSION_DESCRIPTION2 || ( ( options & 0x80 ) == 0 ) ) + SetTrkBits(trk,TB_HIDEDESC); return TRUE; } @@ -418,8 +495,9 @@ static BOOL_T EnumerateStraight( track_p trk ) if (trk != NULL) { d = FindDistance( GetTrkEndPos( trk, 0 ), GetTrkEndPos( trk, 1 ) ); ScaleLengthIncrement( GetTrkScale(trk), d ); + return TRUE; } - return TRUE; + return FALSE; } static BOOL_T TrimStraight( track_p trk, EPINX_T ep, DIST_T dist, coOrd endpos, ANGLE_T angle, DIST_T radius, coOrd center ) @@ -606,7 +684,7 @@ static BOOL_T GetParamsStraight( int inx, track_p trk, coOrd pos, trackParams_t params->lineEnd = GetTrkEndPos(trk,params->ep); params->len = FindDistance( params->lineOrig, params->lineEnd ); params->track_angle = FindAngle( params->lineOrig, params->lineEnd); - params->angle = GetTrkEndAngle(trk,params->ep); + params->angle = params->track_angle; params->arcR = 0.0; return TRUE; } @@ -635,6 +713,7 @@ static BOOL_T QueryStraight( track_p trk, int query ) case Q_CORNU_CAN_MODIFY: case Q_MODIFY_CAN_SPLIT: case Q_CAN_EXTEND: + case Q_HAS_DESC: return TRUE; default: return FALSE; @@ -680,6 +759,7 @@ static BOOL_T MakeParallelStraight( tempSegs(0).u.l.pos[0] = p0; tempSegs(0).u.l.pos[1] = p1; *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + SetTrkBits( *newTrkR, TB_HIDEDESC ); } } else { @@ -848,13 +928,14 @@ track_p NewStraightTrack( coOrd p0, coOrd p1 ) { track_p t; ANGLE_T a; - t = NewTrack( 0, T_STRAIGHT, 2, 0 ); + t = NewTrack( 0, T_STRAIGHT, 2, sizeof (struct extraDataStraight_t) ); SetTrkScale( t, GetLayoutCurScale() ); a = FindAngle( p1, p0 ); SetTrkEndPoint( t, 0, p0, a ); SetTrkEndPoint( t, 1, p1, NormalizeAngle( a+180.0 ) ); ComputeBoundingBox( t ); CheckTrackLength( t ); + SetTrkBits( t, TB_HIDEDESC ); return t; } diff --git a/app/bin/unittest/CMakeLists.txt b/app/bin/unittest/CMakeLists.txt index 7055d0b..d4e237f 100644 --- a/app/bin/unittest/CMakeLists.txt +++ b/app/bin/unittest/CMakeLists.txt @@ -56,6 +56,7 @@ add_executable(catalogtest catalogtest.c ../partcatalog.c ../paths.c + ../stringxtc.c ) target_link_libraries(catalogtest diff --git a/app/bin/unittest/testfiles/HO-Peco-Code83.xtp b/app/bin/unittest/testfiles/HO-Peco-Code83.xtp index 09bf426..681e6f5 100644 --- a/app/bin/unittest/testfiles/HO-Peco-Code83.xtp +++ b/app/bin/unittest/testfiles/HO-Peco-Code83.xtp @@ -130,8 +130,10 @@ END SUBCONTENTS Peco Code 83 HO Slip Turnouts TURNOUT HO "Peco Code 83 #6 Double Slip Switch SL-U8363" - P "Normal" 1 2 3 0 4 5 6 - P "Reverse" 1 7 6 0 4 8 3 + P "Cross1" 1 2 3 + P "Cross2" 4 5 6 + P "Slip1" 1 7 6 + P "Slip2" 4 8 3 E 0.000000 0.000000 270.000000 E 12.035433 0.000000 90.000000 E 0.082528 0.993201 279.500000 diff --git a/app/bin/utf8convert.c b/app/bin/utf8convert.c index 0573c93..977a62c 100644 --- a/app/bin/utf8convert.c +++ b/app/bin/utf8convert.c @@ -22,9 +22,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <string.h> - -#include <wlib.h> #include "misc.h" #include "include/utf8convert.h" @@ -43,9 +40,9 @@ char * Convert2UTF8( char *string ) { if (RequiresConvToUTF8(string)) { - unsigned cnt = strlen(string) * 2 + 2; + size_t cnt = strlen(string) * 2 + 2; unsigned char *out = MyMalloc(cnt); - wSystemToUTF8(string, out, cnt); + wSystemToUTF8(string, out, (unsigned int)cnt); MyFree(string); return(out); } else { @@ -65,9 +62,9 @@ void ConvertUTF8ToSystem(unsigned char *in) { if (wIsUTF8(in)) { - unsigned cnt = strlen(in) * 2 + 1; + size_t cnt = strlen(in) * 2 + 2; unsigned char *out = MyMalloc(cnt); - wUTF8ToSystem(in, out, cnt); + wUTF8ToSystem(in, out, (unsigned int)cnt); strcpy(in, out); MyFree(out); } diff --git a/app/bin/utility.c b/app/bin/utility.c index 93f9979..93e2ff4 100644 --- a/app/bin/utility.c +++ b/app/bin/utility.c @@ -20,13 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> -#include <stdio.h> -#ifndef WINDOWS -#include <unistd.h> -#endif -#include <math.h> -#include "common.h" #include "utility.h" /***************************************************************************** @@ -66,6 +59,14 @@ double min( double a, double b ) +int CoOrdEqual(coOrd p0, coOrd p1) +{ + double d = fabs(p1.x - p0.x) + fabs(p1.y - p0.y); + return (d < EPSILON); +} + + + double FindDistance( coOrd p0, coOrd p1 ) { double dx = p1.x-p0.x, dy = p1.y-p0.y; @@ -78,7 +79,6 @@ double NormalizeAngle( double a ) { while (a<0.0) a += 360.0; while (a>=360.0) a -= 360.0; - if ( a > 360.0-EPSILON ) a = 0.0; return a; } @@ -155,14 +155,9 @@ void Translate( coOrd *res, coOrd orig, double a, double d ) double FindAngle( coOrd p0, coOrd p1 ) { double dx = p1.x-p0.x, dy = p1.y-p0.y; - if (small(dx)) { - if (dy >=0) return 0.0; - else return 180.0; - } - if (small(dy)) { - if (dx >=0) return 90.0; - else return 270.0; - } + if ( dx == 0.0 && dy == 0.0 ) + // Avoid implementation defined behavior + return 0.0; return R2D(atan2( dx,dy )); } @@ -245,85 +240,44 @@ BOOL_T FindArcIntersections ( coOrd *Pc, coOrd *Pc2, coOrd center1, DIST_T radiu } /* - * Find Intersections between a line and a circle - * - * |c-x|^2 = r^2 - * - * π₯(π‘)=π+π‘π - * - * where π is a point and π is a vector. - * - * For a point on this line to satisfy the equation, you need to have - * - * (π‘π+(πβπ))β
(π‘π+(πβπ))=π^2 - * - * which is a quadratic in π‘: - * |b|^2*t^2 + 2(a-c).bt +(|a-c|^2-r^2) = 0 - * - * whose solutions are - * - * t = (-2(a-c).b +/- SQRT([2(a-c).b]^2 - 4|b|^2(|a-c|^2-r^2)) / 2|b|^2 + * Find Intersection between arc and line. + * First - move arc/circle and line so circle is at origin + * Then find nearest point on line to origin + * If nearest point is > radius -> no intersect + * If nearest point is == radius -> one point (the nearest) + * If nearest point is < radius -> two points + * Find two intersect points on secant by triangle formed between middle, center and arc point * */ - -double VectorLength (coOrd v) { - return sqrt(v.x*v.x+v.y+v.y); -} -double VectorDot (coOrd v1, coOrd v2) { - return (v1.x*v2.x+ v1.y*v2.y); -} -coOrd VectorSubtract (coOrd v1, coOrd v2) { - coOrd result; - result.x = v1.x-v2.x; - result.y = v1.y-v2.y; - return result; -} -coOrd VectorAdd (coOrd v1, coOrd v2) { - coOrd result; - result.x = v1.x+v2.x; - result.y = v1.y+v2.y; - return result; -} - BOOL_T FindArcAndLineIntersections(coOrd *intersection1, coOrd *intersection2, coOrd c, DIST_T radius, coOrd point1, coOrd point2 ) { - double dx, dy, cx, cy, A, B, C, det, t; - dx = point2.x - point1.x; - dy = point2.y - point1.y; + double la, lb, lc; //Line equation - cx = c.x; - cy = c.y; + la = point1.y - point2.y; + lb = point2.x - point1.x; + lc = (point1.x-c.x)*(point2.y-c.y) - (point2.x-c.x)*(point1.y-c.y); //Move by c(x,y) - A = dx * dx + dy * dy; - B = 2 * (dx * (point1.x - cx) + dy * (point1.x - cy)); - C = (point1.x - cx) * (point1.x - cx) + (point1.y - cy) * (point1.y - cy) - radius * radius; + double x0 = -la*lc/(la*la+lb*lb), y0 = -lb*lc/(la*la+lb*lb); - det = B * B - 4 * A * C; - if ((A <= 0.0000001) || (det < 0)) - { + double dis = radius*radius*(la*la+lb*lb); + + if (lc*lc > dis) { return FALSE; - } - else if (det == 0) - { - // One solution. - t = -B / (2 * A); - (*intersection1).x = point1.x + t * dx; - (*intersection1).y = point1.y + t * dy; - intersection2 = intersection1; - return TRUE; - } - else - { - // Two solutions. - t = (float)((-B + sqrt(det)) / (2 * A)); - (*intersection1).x = point1.x + t * dx; - (*intersection1).y = point1.y + t * dy; - t = (float)((-B - sqrt(det)) / (2 * A)); - (*intersection2).x = point1.x + t * dx; - (*intersection2).y = point1.y + t * dy; - return TRUE; + } else if (fabs(lc*lc - dis) < EPSILON) { + (*intersection1).x = x0+c.x; + (*intersection1).y = y0+c.y; + *intersection2 = *intersection1; + return TRUE; + } else { + double d = radius*radius - lc*lc/(la*la+lb*lb); + double mult = sqrt(d/(la*la+lb*lb)); + (*intersection1).x = x0+lb*mult+c.x; + (*intersection2).x = x0-lb*mult+c.x; + (*intersection1).y = y0-la*mult+c.y; + (*intersection2).y = y0+la*mult+c.y; + return TRUE; } } @@ -526,6 +480,14 @@ double CircleDistance( coOrd *p, coOrd c, double r, double a0, double a1 ) +coOrd MidPtCoOrd(coOrd p0, coOrd p1) +{ + coOrd res; + res.x = (p0.x + p1.x) / 2.0; + res.y = (p0.y + p1.y) / 2.0; + return res; +} + coOrd AddCoOrd( coOrd p0, coOrd p1, double a ) { coOrd res, zero; @@ -665,7 +627,7 @@ BOOL_T ClipLine( coOrd *fp0, coOrd *fp1, coOrd orig, double angle, coOrd size ) } /* both points without box and cannot intersect */ - if ( (x0==x1 && y0==y1) || /* within same sector (but not the middle one) */ + if ( (x0==x1 && y0==y1 && x0!=0 && y0!=0) || /* within same sector (but not the middle one) */ (x0!=0 && x0==x1) || /* both right or left */ (y0!=0 && y0==y1) ) /* both above or below */ return 0; diff --git a/app/bin/utility.h b/app/bin/utility.h index fad74be..3686ae8 100644 --- a/app/bin/utility.h +++ b/app/bin/utility.h @@ -44,6 +44,7 @@ double max( double a, double b ); double min( double a, double b ); #endif double FindDistance( coOrd p0, coOrd p1 ); +int CoOrdEqual(coOrd p0, coOrd p1); double NormalizeAngle( double a ); double DifferenceBetweenAngles(double a, double b); int AngleInRange(double a, double start, double size); @@ -63,6 +64,7 @@ double LineDistance( coOrd *p, coOrd p0, coOrd p1 ); double CircleDistance( coOrd *p, coOrd c, double r, double a0, double a1 ); int PickArcEndPt( coOrd, coOrd, coOrd ); int PickLineEndPt( coOrd, double, coOrd ); +coOrd MidPtCoOrd(coOrd, coOrd); coOrd AddCoOrd( coOrd, coOrd, double ); int ClipLine( coOrd *, coOrd *, coOrd, double, coOrd ); coOrd FindCentroid(int vertexCount, pts_t vertices[] ); diff --git a/app/bin/validator.c b/app/bin/validator.c index c415471..bd481a5 100644 --- a/app/bin/validator.c +++ b/app/bin/validator.c @@ -20,7 +20,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdbool.h> #include "validator.h" /** |