|
From: sfeam <sf...@us...> - 2014-02-24 03:44:08
|
On Sunday, 23 February 2014 09:26:26 PM Daniel J Sebald wrote: > In attempting to modify the qt_term.cpp Qt terminal, I ran into some > annoying problems with recursive calls, namely enhanced_recursion() and > do_event(). > > First, let me summarize a few things: > > 1) There are a few uses of the global pointer term->. My preference > would be to remove those, but I understand there needs to be a way to > get some information back to gnuplot core. It seems to me that putting > non-const pointers in the API is the best way to do that. But yes, it > is sort of the same difference. I'm afraid I'm not following you. A few uses for term-> in what piece of code, exactly? > I've managed to move enhanced_recursion() into the emitter code (i.e., > same thread as gnuplot core) and that works. Inelegant, but it works. Here I'm really lost. enhanced_recursion() is part of the gnuplot core. It is shared by all terminals. What does this have to do with qt in particular? > So, with that, I'll ask if there is some way of redesigning > enhanced_recursion() and do_event(). These have nothing to do with each other, so I don't understand the question. Both are part of the core, and are shared by all terminals. > What is the role of enhanced_recursion()? This is the routine that interprets enhanced text markup strings. It's part of the core text processing. It is called whenever the core routines want to output a string in enhanced text mode. > What is the role of do_event()? do_event() is an asynchronous entry point in the core. Interactive terminals use it to request some action, e.g. replot, update mouse coords, zoom, respond to hot-key. > Is there some way a result can be sent back via the API that indicates > to repeat the last event? Sent from whom to whom? What sort of event? |