Changeset 5904
- Timestamp:
- Oct 9, 2015, 10:56:09 AM (9 years ago)
- Location:
- branches/1.5/pkgs
- Files:
-
- 19 added
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/pkgs/PdbToVtk/pdbToVtk.c
r5903 r5904 191 191 for (i = 0, hPtr = Tcl_FirstHashEntry(atomTablePtr, &iter); hPtr != NULL; 192 192 hPtr = Tcl_NextHashEntry(&iter), i++) { 193 PdbAtom *atomPtr = Tcl_GetHashValue(hPtr); 193 PdbAtom *atomPtr; 194 195 atomPtr = Tcl_GetHashValue(hPtr); 194 196 array[i] = atomPtr; 195 197 } … … 689 691 Tcl_AppendToObj(objPtr, mesg, -1); 690 692 } 691 #if 0692 693 for (hPtr = Tcl_FirstHashEntry(&atomTable, &iter); hPtr != NULL; 693 694 hPtr = Tcl_NextHashEntry(&iter)) { 694 PdbAtom *atomPtr = Tcl_GetHashValue(hPtr); 695 PdbAtom *atomPtr; 696 697 atomPtr = Tcl_GetHashValue(hPtr); 695 698 fprintf(stderr, "%d %s %d connections\n", atomPtr->ordinal, 696 699 elements[atomPtr->number].symbol, atomPtr->numConnections); 697 700 } 698 #endif699 701 sprintf(mesg, "POINT_DATA %d\n", atomTable.numEntries); 700 702 Tcl_AppendToObj(objPtr, mesg, -1); … … 722 724 /* 723 725 * ------------------------------------------------------------------------ 724 * R pPdbToVtk_Init --726 * Rappture_pdb_to_vtk_Init -- 725 727 * 726 728 * Invoked when the Rappture GUI library is being initialized … … 732 734 */ 733 735 int 734 R pPdbToVtk_Init(Tcl_Interp *interp)736 Rappture_pdb_to_vtk_Init(Tcl_Interp *interp) 735 737 { 736 738 /* install the widget command */ -
branches/1.5/pkgs/diffview/diff.pdf
- Property svn:executable deleted
-
branches/1.5/pkgs/diffview/diffview.c
r5903 r5904 414 414 }; 415 415 416 /*417 * ------------------------------------------------------------------------418 * RpDiffview_Init --419 *420 * Invoked when the Rappture GUI library is being initialized421 * to install the "diffview" widget into the interpreter.422 *423 * Returns TCL_OK if successful, or TCL_ERROR (along with an error424 * message in the interp) if anything goes wrong.425 * ------------------------------------------------------------------------426 */427 int428 RpDiffview_Init(interp)429 Tcl_Interp *interp; /* interpreter being initialized */430 {431 static char *script = "source [file join $RapptureGUI::library scripts diffview.tcl]";432 433 /* install the widget command */434 Tcl_CreateObjCommand(interp, "Rappture::Diffview", DiffviewObjCmd,435 NULL, NULL);436 437 /* load the default bindings */438 if (Tcl_Eval(interp, script) != TCL_OK) {439 return TCL_ERROR;440 }441 442 return TCL_OK;443 }444 416 445 417 /* … … 2796 2768 } 2797 2769 } 2770 2771 /* 2772 * ------------------------------------------------------------------------ 2773 * Rappture_diffview_Init -- 2774 * 2775 * Invoked when the Rappture GUI library is being initialized 2776 * to install the "diffview" widget into the interpreter. 2777 * 2778 * Returns TCL_OK if successful, or TCL_ERROR (along with an error 2779 * message in the interp) if anything goes wrong. 2780 * ------------------------------------------------------------------------ 2781 */ 2782 int 2783 Rappture_diffview_Init(interp) 2784 Tcl_Interp *interp; /* interpreter being initialized */ 2785 { 2786 static char *script = "source [file join $RapptureGUI::library scripts diffview.tcl]"; 2787 2788 /* install the widget command */ 2789 Tcl_CreateObjCommand(interp, "Rappture::diffview", DiffviewObjCmd, 2790 NULL, NULL); 2791 2792 /* load the default bindings */ 2793 if (Tcl_Eval(interp, script) != TCL_OK) { 2794 return TCL_ERROR; 2795 } 2796 return TCL_OK; 2797 } -
branches/1.5/pkgs/hotspot/hotspot.c
r5903 r5904 1827 1827 /* 1828 1828 * ------------------------------------------------------------------------ 1829 * R pCanvHotspot_Init --1829 * Rappture_canvas_hotspot_Init -- 1830 1830 * 1831 1831 * Invoked when the Rappture GUI library is being initialized … … 1837 1837 */ 1838 1838 int 1839 R pCanvHotspot_Init(interp)1839 Rappture_canvas_hotspot_Init(interp) 1840 1840 Tcl_Interp *interp; /* interpreter being initialized */ 1841 1841 { -
branches/1.5/pkgs/listbox/listbox.c
r5903 r5904 33 33 * RCS: @(#) $Id: tkListbox.c,v 1.29.2.5 2007/04/29 02:24:02 das Exp $ 34 34 */ 35 #include "tkPort.h" 36 #include "default.h" 37 #include "tkInt.h" 38 39 #ifdef WIN32 40 #include "tkWinInt.h" 35 36 #include <stdlib.h> 37 #include <string.h> 38 #include <X11/Xatom.h> 39 #include <X11/Xproto.h> 40 41 #include <tcl.h> 42 #include <tk.h> 43 44 #define BLACK "#000000" 45 #define WHITE "#ffffff" 46 47 #define NORMAL_BG "#d9d9d9" 48 #define ACTIVE_BG "#ececec" 49 #define SELECT_BG "#c3c3c3" 50 #define DISABLED "#a3a3a3" 51 52 #define DEF_LISTBOX_BG_MONO WHITE 53 #define DEF_LISTBOX_BORDER_WIDTH "1" 54 #define DEF_LISTBOX_CURSOR "" 55 #define DEF_LISTBOX_DISABLED_FG DISABLED 56 #define DEF_LISTBOX_EXPORT_SELECTION "1" 57 #define DEF_LISTBOX_HEIGHT "10" 58 #define DEF_LISTBOX_HIGHLIGHT_BG NORMAL_BG 59 #define DEF_LISTBOX_LIST_VARIABLE "" 60 #define DEF_LISTBOX_SCROLL_COMMAND "" 61 #define DEF_LISTBOX_SELECT_BD "0" 62 #define DEF_LISTBOX_SELECT_COLOR SELECT_BG 63 #define DEF_LISTBOX_SELECT_FG_MONO WHITE 64 #define DEF_LISTBOX_SELECT_MODE "browse" 65 #define DEF_LISTBOX_SELECT_MONO BLACK 66 #define DEF_LISTBOX_SET_GRID "0" 67 #define DEF_LISTBOX_STATE "normal" 68 #define DEF_LISTBOX_TAKE_FOCUS (char *) NULL 69 #define DEF_LISTBOX_WIDTH "20" 70 71 #if defined(__WIN32__) || defined(_WIN32) || defined(__MINGW32__) 72 #define DEF_LISTBOX_ACTIVE_STYLE "underline" 73 #define DEF_LISTBOX_BG_COLOR "SystemWindow" 74 #define DEF_LISTBOX_FG NORMAL_FG 75 #define DEF_LISTBOX_FONT "TkDefaultFont" 76 #define DEF_LISTBOX_HIGHLIGHT HIGHLIGHT 77 #define DEF_LISTBOX_HIGHLIGHT_WIDTH "1" 78 #define DEF_LISTBOX_RELIEF "sunken" 79 #define DEF_LISTBOX_SELECT_FG_COLOR SELECT_FG 80 #else 81 # if defined(MAC_OSX_TK) 82 #define DEF_LISTBOX_ACTIVE_STYLE "dotbox" 83 #define DEF_LISTBOX_BG_COLOR WHITE 84 #define DEF_LISTBOX_FG BLACK 85 #define DEF_LISTBOX_FONT "TkTextFont" 86 #define DEF_LISTBOX_HIGHLIGHT BLACK 87 #define DEF_LISTBOX_HIGHLIGHT_WIDTH "0" 88 #define DEF_LISTBOX_RELIEF "solid" 89 #define DEF_LISTBOX_SELECT_FG_COLOR SELECT_FG 90 # else 91 #define DEF_LISTBOX_ACTIVE_STYLE "dotbox" 92 #define DEF_LISTBOX_BG_COLOR WHITE 93 #define DEF_LISTBOX_FG BLACK 94 #define DEF_LISTBOX_FONT "TkDefaultFont" 95 #define DEF_LISTBOX_HIGHLIGHT BLACK 96 #define DEF_LISTBOX_HIGHLIGHT_WIDTH "1" 97 #define DEF_LISTBOX_RELIEF "sunken" 98 #define DEF_LISTBOX_SELECT_FG_COLOR BLACK 99 # endif 41 100 #endif 42 101 … … 523 582 /* 524 583 * ------------------------------------------------------------------------ 525 * R pListbox_Init --526 * 527 * Invoked when the Rappture GUIlibrary is being initialized584 * Rappture_listbox_Init -- 585 * 586 * Invoked when the Rappture listbox library is being initialized 528 587 * to install the Rappture "listbox" widget. 529 588 * … … 533 592 */ 534 593 int 535 R pListbox_Init(interp)594 Rappture_listbox_Init(interp) 536 595 Tcl_Interp *interp; /* interpreter being initialized */ 537 596 { … … 821 880 */ 822 881 for (i = 0; i < listPtr->nElements; i++) { 823 if (Tcl_FindHashEntry(listPtr->selection, (char *)i) != NULL) { 882 long key; 883 key = index; 884 if (Tcl_FindHashEntry(listPtr->selection,(char *)key) != NULL) { 824 885 sprintf(indexStringRep, "%d", i); 825 886 Tcl_AppendElement(interp, indexStringRep); … … 1361 1422 } 1362 1423 case SELECTION_INCLUDES: { 1424 long key = first; 1363 1425 if (objc != 4) { 1364 1426 Tcl_WrongNumArgs(interp, 3, objv, "index"); … … 1367 1429 Tcl_SetObjResult(interp, 1368 1430 Tcl_NewBooleanObj((Tcl_FindHashEntry(listPtr->selection, 1369 (char *) first) != NULL)));1431 (char *)key) != NULL))); 1370 1432 result = TCL_OK; 1371 1433 break; … … 1559 1621 Tcl_HashEntry *entry; 1560 1622 ItemAttr *attrs; 1561 1562 entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)index, &new); 1623 long key = index; 1624 1625 entry = Tcl_CreateHashEntry(listPtr->itemAttrTable, (char *)key, &new); 1563 1626 if (new) { 1564 1627 attrs = (ItemAttr *) ckalloc(sizeof(ItemAttr)); … … 2065 2128 */ 2066 2129 if (listPtr->state & STATE_NORMAL) { 2067 if (Tcl_FindHashEntry(listPtr->selection, (char *)i) != NULL) { 2130 long key = i; 2131 if (Tcl_FindHashEntry(listPtr->selection, (char *)key) != NULL) { 2068 2132 /* Selected items are drawn differently. */ 2069 2133 gc = listPtr->selTextGC; … … 2240 2304 listPtr->borderWidth, listPtr->relief); 2241 2305 if (listPtr->highlightWidth > 0) { 2242 GC fgGC, bgGC; 2243 2306 GC bgGC; 2307 2308 /* There's no public stub for TkpDrawHighlightBorder, so fall back 2309 * to Tk_DrawFocusHighlight. Only on problem on the Mac. */ 2244 2310 bgGC = Tk_GCForColor(listPtr->highlightBgColorPtr, pixmap); 2245 if (listPtr->flags & GOT_FOCUS) { 2246 fgGC = Tk_GCForColor(listPtr->highlightColorPtr, pixmap); 2247 TkpDrawHighlightBorder(tkwin, fgGC, bgGC, 2248 listPtr->highlightWidth, pixmap); 2249 } else { 2250 TkpDrawHighlightBorder(tkwin, bgGC, bgGC, 2251 listPtr->highlightWidth, pixmap); 2252 } 2311 Tk_DrawFocusHighlight(tkwin, bgGC, listPtr->highlightWidth, 2312 pixmap); 2253 2313 } 2254 2314 #ifndef TK_NO_DOUBLE_BUFFERING … … 2743 2803 */ 2744 2804 for (i = first; i <= last; i++) { 2805 long key = i; 2745 2806 /* Remove selection information */ 2746 entry = Tcl_FindHashEntry(listPtr->selection, (char *) i);2807 entry = Tcl_FindHashEntry(listPtr->selection, (char *)key); 2747 2808 if (entry != NULL) { 2748 2809 listPtr->numSelected--; … … 2750 2811 } 2751 2812 2752 entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *) i);2813 entry = Tcl_FindHashEntry(listPtr->itemAttrTable, (char *)key); 2753 2814 if (entry != NULL) { 2754 2815 ckfree((char *)Tcl_GetHashValue(entry)); … … 3417 3478 */ 3418 3479 for (i = first; i <= last; i++) { 3419 entry = Tcl_FindHashEntry(listPtr->selection, (char *)i); 3480 long key = i; 3481 entry = Tcl_FindHashEntry(listPtr->selection, (char *)key); 3420 3482 if (entry != NULL) { 3421 3483 if (!select) { … … 3429 3491 if (select) { 3430 3492 entry = Tcl_CreateHashEntry(listPtr->selection, 3431 (char *) i, &new);3493 (char *)key, &new); 3432 3494 Tcl_SetHashValue(entry, (ClientData) NULL); 3433 3495 listPtr->numSelected++; … … 3505 3567 Tcl_DStringInit(&selection); 3506 3568 for (i = 0; i < listPtr->nElements; i++) { 3507 entry = Tcl_FindHashEntry(listPtr->selection, (char *)i); 3569 long key = i; 3570 entry = Tcl_FindHashEntry(listPtr->selection, (char *)key); 3508 3571 if (entry != NULL) { 3509 3572 if (needNewline) { … … 3787 3850 if (offset > 0) { 3788 3851 for (i = last; i >= first; i--) { 3789 entry = Tcl_FindHashEntry(table, (char *)i); 3852 long key = i; 3853 entry = Tcl_FindHashEntry(table, (char *)key); 3790 3854 if (entry != NULL) { 3791 3855 clientData = Tcl_GetHashValue(entry); 3792 3856 Tcl_DeleteHashEntry(entry); 3793 entry = Tcl_CreateHashEntry(table, (char *)( i +offset), &new);3857 entry = Tcl_CreateHashEntry(table, (char *)(key+offset), &new); 3794 3858 Tcl_SetHashValue(entry, clientData); 3795 3859 } … … 3797 3861 } else { 3798 3862 for (i = first; i <= last; i++) { 3799 entry = Tcl_FindHashEntry(table, (char *)i); 3863 long key = i; 3864 entry = Tcl_FindHashEntry(table, (char *)key); 3800 3865 if (entry != NULL) { 3801 3866 clientData = Tcl_GetHashValue(entry); 3802 3867 Tcl_DeleteHashEntry(entry); 3803 entry = Tcl_CreateHashEntry(table, (char *)( i +offset), &new);3868 entry = Tcl_CreateHashEntry(table, (char *)(key+offset), &new); 3804 3869 Tcl_SetHashValue(entry, clientData); 3805 3870 } -
branches/1.5/pkgs/placard/placard.c
r5903 r5904 413 413 414 414 415 /*416 * ------------------------------------------------------------------------417 * RpCanvPlacard_Init --418 *419 * Invoked when the Rappture GUI library is being initialized420 * to install the "placard" item on the Tk canvas widget.421 *422 * Returns TCL_OK if successful, or TCL_ERROR (along with an error423 * message in the interp) if anything goes wrong.424 * ------------------------------------------------------------------------425 */426 int427 RpCanvPlacard_Init(interp)428 Tcl_Interp *interp; /* interpreter being initialized */429 {430 Tk_CreateItemType(&rpPlacardType);431 432 Tk_DefineBitmap(interp, Tk_GetUid("rp_ellipsis"),433 (char*)ellipsis_bits, ellipsis_width, ellipsis_height);434 435 return TCL_OK;436 }437 415 438 416 /* … … 1459 1437 return; 1460 1438 } 1439 1440 /* 1441 * ------------------------------------------------------------------------ 1442 * Rappture_canvas_placard_Init -- 1443 * 1444 * Invoked when the Rappture GUI library is being initialized 1445 * to install the "placard" item on the Tk canvas widget. 1446 * 1447 * Returns TCL_OK if successful, or TCL_ERROR (along with an error 1448 * message in the interp) if anything goes wrong. 1449 * ------------------------------------------------------------------------ 1450 */ 1451 int 1452 Rappture_canvas_placard_Init(interp) 1453 Tcl_Interp *interp; /* interpreter being initialized */ 1454 { 1455 Tk_CreateItemType(&rpPlacardType); 1456 1457 Tk_DefineBitmap(interp, Tk_GetUid("rp_ellipsis"), 1458 (char*)ellipsis_bits, ellipsis_width, ellipsis_height); 1459 1460 return TCL_OK; 1461 }
Note: See TracChangeset
for help on using the changeset viewer.