Changeset 3954 for branches/blt4
- Timestamp:
- Sep 24, 2013, 12:45:32 PM (11 years ago)
- Location:
- branches/blt4/gui/src
- Files:
-
- 3 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blt4/gui/src/Makefile.in
r3102 r3954 54 54 RpCanvPlacard.o \ 55 55 RpDiffview.o \ 56 RpConvertDxToVtk.o 56 RpReadPoints.o \ 57 RpDxToVtk.o \ 58 RpPdbToVtk.o 57 59 58 60 name = RapptureGUI$(version) -
branches/blt4/gui/src/RapptureGUI_Init.c
r3102 r3954 7 7 * ====================================================================== 8 8 * AUTHOR: Michael McLennan, Purdue University 9 * Copyright (c) 2004-20 09 Purdue Research Foundation9 * Copyright (c) 2004-2012 HUBzero Foundation, LLC 10 10 * 11 11 * See the file "license.terms" for information on usage and … … 25 25 extern Tcl_AppInitProc RpCanvHotspot_Init; 26 26 extern Tcl_AppInitProc RpCanvPlacard_Init; 27 extern Tcl_AppInitProc RpConvertDxToVtk_Init; 27 extern Tcl_AppInitProc RpDxToVtk_Init; 28 extern Tcl_AppInitProc RpPdbToVtk_Init; 28 29 extern Tcl_AppInitProc RpDiffview_Init; 30 extern Tcl_AppInitProc RpReadPoints_Init; 29 31 30 32 #ifdef BUILD_Rappture … … 47 49 return TCL_ERROR; 48 50 } 49 if (RpConvertDxToVtk_Init(interp) != TCL_OK) { 51 if (RpDxToVtk_Init(interp) != TCL_OK) { 52 return TCL_ERROR; 53 } 54 if (RpPdbToVtk_Init(interp) != TCL_OK) { 55 return TCL_ERROR; 56 } 57 if (RpReadPoints_Init(interp) != TCL_OK) { 50 58 return TCL_ERROR; 51 59 } -
branches/blt4/gui/src/RpCanvHotspot.c
r3102 r3954 24 24 * ====================================================================== 25 25 * AUTHOR: Michael McLennan, Purdue University 26 * Copyright (c) 2004-20 09 Purdue Research Foundation26 * Copyright (c) 2004-2012 HUBzero Foundation, LLC 27 27 * 28 28 * See the file "license.terms" for information on usage and … … 1677 1677 TkCanvas *canvasPtr; 1678 1678 int id; 1679 long lid; 1679 1680 Tcl_HashEntry *hPtr; 1680 1681 Tk_Window tkwin; … … 1705 1706 } 1706 1707 string = Tcl_GetString(itemObjPtr); 1707 hPtr = Tcl_FindHashEntry(&canvasPtr->idTable, (char *)id); 1708 1709 lid = id; 1710 hPtr = Tcl_FindHashEntry(&canvasPtr->idTable, (char *)lid); 1708 1711 if (hPtr == NULL) { 1709 1712 Tcl_AppendResult(interp, "can't find canvas item \"", string, … … 1723 1726 } 1724 1727 1725 static const char*1728 static Tcl_Obj * 1726 1729 Identify(Tcl_Interp *interp, HotspotItem *itemPtr, double x, double y) 1727 1730 { 1731 Tcl_Obj* resultPtr = NULL; 1728 1732 ItemSegment *segPtr; 1733 Tcl_Obj* objPtr; 1729 1734 1730 1735 x -= itemPtr->x1; … … 1736 1741 if ((x >= segPtr->x) && (x < (segPtr->x + segPtr->width)) && 1737 1742 (y >= segPtr->y) && (y < (segPtr->y + segPtr->height))) { 1738 return segPtr->text; 1739 } 1740 } 1741 return ""; 1743 1744 /* build return list: {string x0 y0 x1 y1} */ 1745 resultPtr = Tcl_NewListObj(0, (Tcl_Obj **)NULL); 1746 1747 objPtr = Tcl_NewStringObj(segPtr->text, -1); 1748 Tcl_ListObjAppendElement(interp, resultPtr, objPtr); 1749 1750 objPtr = Tcl_NewIntObj(itemPtr->x1 + segPtr->x); 1751 Tcl_ListObjAppendElement(interp, resultPtr, objPtr); 1752 objPtr = Tcl_NewIntObj(itemPtr->y1 + segPtr->y); 1753 Tcl_ListObjAppendElement(interp, resultPtr, objPtr); 1754 1755 objPtr = Tcl_NewIntObj(itemPtr->x1 + segPtr->x + segPtr->width); 1756 Tcl_ListObjAppendElement(interp, resultPtr, objPtr); 1757 objPtr = Tcl_NewIntObj(itemPtr->y1 + segPtr->y + segPtr->height); 1758 Tcl_ListObjAppendElement(interp, resultPtr, objPtr); 1759 1760 return resultPtr; 1761 } 1762 } 1763 return NULL; 1742 1764 } 1743 1765 … … 1767 1789 } else if ((c == 'i') && (strncmp(string, "identify", length) == 0)) { 1768 1790 double x, y; 1769 const char *token;1770 1791 Tcl_Obj *objPtr; 1771 1792 … … 1775 1796 return TCL_ERROR; 1776 1797 } 1777 token = Identify(interp, itemPtr, x, y); 1778 objPtr = Tcl_NewStringObj(token, -1); 1779 Tcl_SetObjResult(interp, objPtr); 1798 objPtr = Identify(interp, itemPtr, x, y); 1799 if (objPtr != NULL) { 1800 Tcl_SetObjResult(interp, objPtr); 1801 } 1780 1802 } else if ((c == 'v') && (strncmp(string, "variables", length) == 0)) { 1781 1803 Tcl_Obj *listObjPtr; -
branches/blt4/gui/src/RpCanvPlacard.c
r2558 r3954 22 22 * ====================================================================== 23 23 * AUTHOR: Michael McLennan, Purdue University 24 * Copyright (c) 2004-20 09 Purdue Research Foundation24 * Copyright (c) 2004-2012 HUBzero Foundation, LLC 25 25 * 26 26 * See the file "license.terms" for information on usage and -
branches/blt4/gui/src/RpDiffview.c
r3102 r3954 24 24 * ====================================================================== 25 25 * AUTHOR: Michael McLennan, Purdue University 26 * Copyright (c) 2004-201 1 Purdue Research Foundation26 * Copyright (c) 2004-2012 HUBzero Foundation, LLC 27 27 * 28 28 * See the file "license.terms" for information on usage and
Note: See TracChangeset
for help on using the changeset viewer.