Revision: 75600
http://sourceforge.net/p/brlcad/code/75600
Author: starseeker
Date: 2020-04-25 02:00:55 +0000 (Sat, 25 Apr 2020)
Log Message:
-----------
Start experimenting with setting a binding. Turn everything else off, as this
is producing an error...
Modified Paths:
--------------
brlcad/trunk/src/libdm/CMakeLists.txt
brlcad/trunk/src/libdm/tcl_img.cpp
Modified: brlcad/trunk/src/libdm/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/libdm/CMakeLists.txt 2020-04-24 21:00:13 UTC (rev
75599)
+++ brlcad/trunk/src/libdm/CMakeLists.txt 2020-04-25 02:00:55 UTC (rev
75600)
@@ -130,8 +130,8 @@
add_dependencies(libdm profont_ProFont_ttf_cp)
endif(BRLCAD_ENABLE_OSG)
-#add_executable(tcl_img tcl_img.cpp)
-#target_link_libraries(tcl_img ${TCL_LIBRARY} ${TK_LIBRARY})
+add_executable(tcl_img tcl_img.cpp)
+target_link_libraries(tcl_img ${TCL_LIBRARY} ${TK_LIBRARY})
set(libdm_ignore_files
CMakeLists.txt
Modified: brlcad/trunk/src/libdm/tcl_img.cpp
===================================================================
--- brlcad/trunk/src/libdm/tcl_img.cpp 2020-04-24 21:00:13 UTC (rev 75599)
+++ brlcad/trunk/src/libdm/tcl_img.cpp 2020-04-25 02:00:55 UTC (rev 75600)
@@ -33,6 +33,7 @@
#include "tcl.h"
#include "tk.h"
+#if 0
const char *DM_PHOTO = ".dm0.photo";
const char *DM_LABEL = ".dm0";
@@ -57,8 +58,8 @@
// Pause a second after updating
std::this_thread::sleep_for (std::chrono::seconds(1));
}
+#endif
-
int
main()
{
@@ -83,6 +84,7 @@
Tk_MakeWindowExist(tkwin);
Tk_MapWindow(tkwin);
+#if 0
/* Note: confirmed with Tcl/Tk community that (at least as of Tcl/Tk 8.6)
* Tcl_Eval is the ONLY way to create an image object. The C API just
* doesn't expose that ability, although it does support manipulation of
@@ -121,8 +123,11 @@
Tcl_Eval(interp, label_cmd.c_str());
std::string pack_cmd = std::string("pack ") + std::string(DM_LABEL);
Tcl_Eval(interp, pack_cmd.c_str());
+#endif
+ std::string bind_cmd = std::string("bind . <a> \"puts A\"");
+ Tcl_Eval(interp, bind_cmd.c_str());
- std::uniform_int_distribution<int> colors(0,1);
+ //std::uniform_int_distribution<int> colors(0,1);
while (1) {
int handled = 0;
while (Tcl_DoOneEvent(TCL_ALL_EVENTS|TCL_DONT_WAIT)) {
@@ -134,7 +139,7 @@
}
// Generate a new random pattern on the same image
- update_data(interp, colors(gen), colors(gen), colors(gen));
+ //update_data(interp, colors(gen), colors(gen), colors(gen));
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits