On 08/10/2009 01:19 PM, Manoj Rajagopalan wrote:
Hi all,

    In math mode, when I select the menu item for the greek alpha character, or
when I type \alpha within the inline equation box and then press TAB, how
does lyx render this to the character?

This looks like one for devel, so I'm moving it there.

    I've traced the code till LyXFunc()::dispatch() which is called on the
lyxfunc_ member of the LyX singleton instance. The code logic seems to be
that the dispatch() function is called on an hierarchy of various structures
like work-area, buffer, cursor etc. and if the FuncRequest has been serviced,
the function returns.

Yes, that's more or less right.

     IIUC, GuiWorkArea::keyPressEvent is triggered each time a key is pressed
and the LyX abstraction (server?) is informed of the specific command that
this key-press forms depending on LyX state. To render this onto the GUI, the
LyX abstraction must call GUI functions with some font info for rendering
characters like greek letters, AMS symbols etc. but I keep getting lost
before getting here. Could someone point me to the relevant code path?

The drawing in which you are interested is in rowpainter.cpp, specifically, in RowPainter::paintChars(). This eventually calls GuiPainter::text(). I can't say that I personally understand that routine, however...especially the long first comment. Anyone care to explain?

rh

Reply via email to