On Thu, 27 Jan 2000, Dr. Ing. Roland Krause wrote:
> Allan,
> long post indeed.
and getting longer...
>
> > I've cut down the number of signal and slot templates that are generated
> > (Signal0-Signal2 only for now
>
> I do not really see why you are doing this. At present it would be
> better to not mess with libsigc++, i.e. use that thing out of the box,
> since that's what it was made for. If, at a later point this would
> become a real issue I am sure a solution can and will be found. But
> maybe I am misunderstanding what you were actually doing.
We only need to go as large as:
Signal2< return_type, 1st_param_type, 2nd_param_type >
The m4 generated headers create Signal[0-7] which makes then into fairly
large header files -- only a tiny fraction of which we need. Culling a
couple lines in the m4 sources is done with one sed script in a shell
script I've written for generating our included mini-dist of libsigc++.
I also cull several irrelevent directories and move a few others
around. I'll either post the script tomorrow or have it committed
tomorrow depending on whether or not I get my car back from the mechanics
today [new clutch + gearbox + engine mount + god-only-knows-whatelse].
> Ok, I switched the lyx-devel branch over to rae and I am trying to
> compile it as we speak. I would strongly recommend not to drift too
> far away from the main devel branch but you know that much better than
> I do since you already lost lots of your work the last time.
All you'll find in the rae branch at present is the equivalent of
1.1.4pre2(?). If I get the car back today I'll probably commit the stage
two of integration tomorrow.
Stage 2:
modified sigc++'s configure.in to (hopefully) do almost nothing if
the user wants to use the libsigc++ they've got installed. No compiling
is done in the sigc++ directory in that case and configure just changes
one entry in the Makefile.in when generating Makefile.
[...filtering new additions, multiple toolkits...]
> I agree 100%, this is a step by step process. I'll try to summarize what the
> necessary steps are her emostly for my own understanding.
> 1. Take a popup, e.g. paragraphs, find the code in the exisiting code
> base that creates, updates and deletes this dialog and create a
> form_paragraphs.[Ch] pair of files, then move the existing code.
> Compile and see whether is all still works.
Or something that might be easier:
cp lyx/src/frontends/xforms/form_paragraph.[Ch]
As you are removing the old implementation merge in any changes
and tidy it all up.
> 2. Create a class form_paragraphs that inherits from Dialog (the base
> dialog class, was PopupBase) and the class will the implement the
> appropriate actions to be taken when the slots for create, show, hide,
> destroy and update are called.
s/Dialog/LyXDialogBase/ or s/Dialog/DialogBase/
There are no create or destroy signals. If a dialog hasn't been shown
before it will be created just-in-time. Similarly, the hide could be
used to delete[] the dialog. In any case, the destructor should clean up
anything that may have been created.
> 3. The update method is the most important because right now it is
> tightly integrated with the GUI stuff. For example, I tried to follow
> the current path through the code when the paragraphs dialog is shown
> and found that this is essentially handled in lyx_cb.C (like so many
> other things too :-).
That was how everything was originally developed (long before I ever
joined the crew) -- callbacks in a common file with other bits and pieces
seemingly randomly scattered throughout the codebase. It is confusing --
I've been there and its not an easy task tracking down where all the bits
are. Grep is your friend but so is any other cross-referencer.
[...]
> I heard somewhere that lyxfunc is the solution to all problems (just
> like 42) and it could/should be asked here. Currently lyxfunc() doesnt
> have the fuctionality for that or does it? What role would it play
> here?
All it needs is the addition of the appropriate entries. This is mainly
the common bits of code that can accept or return data and perform some
action with it. Getting the current paragraphs parameters is one
possibility.
LyXFunc is the API. Anyone writing a script can access anything that
LyXFunc has to offer. So its essential that we ensure that both the
scripts and the GUI/TUI frontend and the LyX internals can all use it and
that it has a sensible, clean collection of functions.
> So with this three steps one dialog is encapsulated. The slots can be
> called from the menu or by means of the cursor moving to a new
> paragraph.
or by keyboard shortcut, or minibuffer command or even a LyXServer request
from some exterenal program/script and for some popups there is also the
likelihood of calls from inside the LyX core or other lyxfuncs.
They all call a LyXFunc. The LyXFunc consists of:
case LFUN_LAYOUT_PARAGRAPH:
owner->getPopups.showParagraph();
break;
(taken straight from the lyx/src/lyxfunc.C:1081-1083)
> Hmm, I missed that email, right now the dialog need direct access to
> the kernel but that doesn seem bad to me.
Reread the paragraph and example above. We have at least six different
ways of getting stuff to happen in LyX. At least three are likely to
want answers or to push data into the system (kernel, ui and lyxserver).
> Hmm so programs incorporating the LyXServer will have full access to all
> lyxparagraph data?
LyX incorporates the LyXServer other programs use it. Yes.
[...enrolment suspension...]
> <OffTopic>
> You get a Ph-D. once in your life, once you get older it wont come back.
I know, I'm already 30. This isn't a decision I'm taking lightly.
[...what happened?...]
My wife died 18 months ago. I took 6 weeks off and tried to get back into
Uni work etc. Hasn't happened. I wish I had taken 6 months off then
instead now. I haven't been interested in my thesis or even LyX in most
of that time. Check the commit logs on the webpage or grep for "rae" in
the ChangeLogs.
I fully intend to return to it but at present I've been kidding
myself that I've been doing any work. I've had many chats with my
supervisor about this and each time he's managed to talk me into trying
for another few months. But I'm not getting anywhere at present and I
feel burned out. I've basically gone nowhere with my thesis in the last
12 months. Time for a rest, get a life, get some self-confidence back
and then have another go at finishing.
I have a pretty good incentive for returning: Nicky's Mum wants to see my
graduation and I want to see "Dedicated to Nicole Rae" on the bound
thesis.
End of topic.
> <OffTopic/>
Allan. (ARRae)