Steve Litt wrote:
Hi all,

There's long list of LyX functions for 1.3.3 here:

http://wiki.lyx.org/LyX/LyxFunctions

Unfortunately most of them have no explanations or argument lists, and I get the feeling the list is not complete, even for 1.3.3.

Is there a better place (besides reading and understanding LyXAction.c and everything called from it) to get information on LyX functions?
Not really. At least: not other than reading other bits of the code. One very helpful place, though, is the .bind files.

Regarding the code, here's what I know about how to figure out the LyX functions. First, LyXAction.cpp basically gives you a translation manual between what you'd type in the minibuffer or put in a .bind file (e.g., pagebreak-insert) and the internal LyX representation of these (e.g., LFUN_PAGEBREAK_INSERT). The names will give you some sense what the commands do, and you can just try them out in the minibuffer, once you know what arguments they expect. That's the tricky part.

The LFUNs are handled in several different places. One is the dispatch() method in LyXFunc.cpp. This takes a FuncRequest (see FuncRequest.{h,cpp}), which basically encapsulates an LFUN and a string argument to it, and some related information. There's a giant switch statement then, and it's here that you can start to find information on what the argument is expected to be like, though you may have to follow the call elsewhere. Not all the LFUNs are handled there, though. There's a dispatch method in Text3.cpp that handles LFUNs that are connected with actual text editing. And some LFUNs are ultimately handled by insets via their doDispatch() methods. The easiest thing to do, ultimately, I think, is to grep the LFUN once you have it.

Richard

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to