GTK+ with any programs
I recently knew a latex-editor "gummi", see http://gummi.midnightcoding.org/ , which is written by GTK+ graphical interface toolkit. There are two panels, one in the left which is an editor (using the library gtksourceview) and on in the right which is a viewer (using the library poppler). I am curious that if we can do similary things for every program. For example, replace the editor wit开发者_JS百科h "terminal"、"emacs"、"vim"、"terminator (a multi-windows terminal)"...etc. And replace the viewer with other viewers, which in my mind is Adobe Reader. With discussion with the author, he mentioned:
The viewer component is also replacable, but doing it with Adobe Reader would not be easy or perhaps even impossible. The reason for this being that Adobe Reader is a complete program instead of a library, and also closed-source
So I have some questions:
a) We can only make "library" embedded as a panel, but we can't do this for a (any) program?
b) Could we replace the editor with emacs? with terminal?
c) Could we replace the viewer with Adobe Reader? If not, why? Because it's a program or it's closed-source?
I know the questions in this thread are not very precise, sorry.
a) You can do it for any program if it has a sufficient API for doing so, but that is rather rare. Libraries them selfes provide functionality beyond the means of the toolkit (here: gtk+). So in the end you would have to replace a class for another (within the source code) which uses another library (or provides cross process functionality).
b) terminal: yes (see anjuta), for emacs, probably yes, but from my point of view with limited knowledge about emacs I'd say it is a lot more work to achieve this
c) It has neither a sufficient cross process API nor do we have the source code to directly use its classes. You could use evince (or similar opensource pdf viewers) instead.
精彩评论