[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Cocoa backend

From: Massimiliano Gubinelli
Subject: Re: [Texmacs-dev] Cocoa backend
Date: Mon, 18 Dec 2006 21:28:35 +0100

I've made an archive of my current development directory. It includes a TeXmacs source tree since I've made some modifications to the source. A priori it must compile more or less direclty under Mac (there is an Xcode project - I use Xcode 2.4). It would be interesting if somebody with some experience would like to try to compile it in GNUstep.

You can find it at


it is called TM.tar.gz. It is just to give an idea to the curious. I want to made other changes before releasing something.

On 18 Dec 2006, at 20:04, Felix Breuer wrote:

On Sun, 17 Dec 2006 00:04:25 +0100, Massimiliano Gubinelli <address@hidden> wrote:
Writing the MacOSX "PS-device" it has not been too difficult. It has
been enough to map X11 calls to the analogous calls in Cocoa. To
reimplement the device in Cairo or directly in OpenGL should be a
matter of a week or less.

How did you go about reimplementing the backend in Cocoa? Did you
sit down for a straight week mapping all the X calls to Cocoa
and only compiled the whole thing after the conversion was done?
Or did you find a way to do the conversion incrementally, compiling
and testing intermediate versions?

No. You must proceed more or less one big step. You can leave back some details (like shadow device, baloons, popup windows). But the PS device must be implemented in block. I just copied the X version, commentend the X calls and replaced them by corresponding Cocoa calls. For the device it proceeded quite straigforwardly you just need to be able to draw images, lines, change color, etc... . Xcode is awesome because you can use a feature called Fix & Continue where you just modify the code on the fly, recompile and test the new implementation without quitting the running app. This was mostly useful when I did wrong coordinate conversions.

Currently the port size is  2500 lines of ObjC++.

I think that one of my remarks has not been properly appreciated:
this "port" run ALSO on Linux if one is willing to use GNUstep
libraries (and on Windows).

I myself am fine with the "home-made" GUI TeXmacs uses. My main
interest in a Cairo/OpenGL backend is the vision of using
TeXmacs as a typesetting/text rendering library for other
Cairo/OpenGL apps. I am very curious about trying your converted
version of TeXmacs on GNUstep, though :)

It would be very interesting to have the core TeXmacs well separated from the UI. Maybe going toward a better compliance with the model- view-controller pattern would help transitioning by gradual modifications. This would leave me the freedom to implement a full Cocoa app on top of texmacs layout engine.



Texmacs-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]