|
From: | Gubinelli Massimiliano |
Subject: | Re: [Texmacs-dev] Running without a GUI plus other ideas and tasks |
Date: | Sun, 7 Nov 2010 00:13:16 +0100 |
Hi, On 6 nov. 2010, at 23:12, Miguel de Benito Delgado wrote: Hi all, This would be a nice project but I fear that the current TeXmacs code is not quite ready for this extreme specialization. You would have to rewrite most of the toplevel functions to start a texmacs server object without gui and send appropriate messages to trigger conversion to pdf. Essentially write a new main. I'm not sure however if there are implicit assumptions around on the existence of a well behaved gui (for example wrt delayed messages instatiated on the scheme side).
I'm not sure if it is possible to have a dumb gui, it would deserve investigation and testing. nice idea tough.
if you want some relatively easy projects here they are: 1) make the file chooser dialog native. At the moment this is disabled since on the mac there is a difficulty: a native file open dialog do not allow to type the file name. You have to take different actions in the case of a file load or a file save and the old texmacs api didn't differentiate the two possibilities. Now Joris has made some changes and when the dialog has to be created we know if it is for a load or a save, so that in principle we can choose the right native widget. Relevant lines in Graphics/Gui/widget.hpp are widget file_chooser_widget (command cmd, string type, bool save); // file chooser widget for files of a given 'type'; // for files of type "image", the widget includes a previsualizer for images // 'save' indicates whether we intend to save the file 2) make a native print dialog. The relevant api is widget printer_widget (url ps_pdf_file); // widget for printing a file, offering a way for selecting a page range, // changing the paper type and orientation, previewing, etc. where we are given a temporary ps or pdf file and we need to ask the user where to send it (print or file) and as many transformations are possible (page layout, page size, etc....). Note that the file is already typesetted but maybe the user would like to print 2 pages in one, landscape, reduced, etc.... In any case even a simple print dialog is missing so any improvement is welcome. I've started some preliminary code in this respect but is not active. Give a look at the function qt_print in qt_utilities.cpp. If you want to work on these tasks tell me so that we do not superpose. If you have any question do not hesitate to post on the dev list. best massimiliano
|
[Prev in Thread] | Current Thread | [Next in Thread] |