Hello,

I'm working on the new insetgraphics, currently I only do the GUI and
inset parts without the inline displaying or any conversion, both will
require a common code with the ExternalInset on which I haven't looked so
far.

The goals for the insetgraphics are to use the newer graphicx package in
latex, call for the image conversions when exporting (like ExternalInset)
be more robust than insetfig (the old figure inset) and possibly more
feature rich.

Currently I'm aiming it to be a drop in replacement to insetfig, that is
no full support to graphicx but only the minimal work required to get it
up to par with figinset and continue from there (smaller targets make for
faster overall work). Actually in the first stage is to do everything 
figinset does but without the inline viewing (I really want to be able to
create PDF's and need to inset PNG images, so figinset is out ;-)

Afterwards, I'll need to do the GraphicsCache and FormatConvertor, the
first is an image cache that also will do the different transforms
(rotation, color change, etc.) and the FormatConvertor will be plucking
that part from ExternalInset to an independent class (I haven't looked at
ExternalInset yet, is this rational?) This two classes together will
transfer everything for me to something I can both view on screen and
export for (pdf)latex to use.

I have several questions now:

1. I'm using the GUIndependent code, and there is a show() method that is
abstract virtual, my widget uses only a show(InsetGraphics*) signal as I
see no real meaning to a show() without an attached inset. Can anyone
enlighten me? 
Currently I assert or do nothing for
showDisplay(InsetGraphics*) // The show with parameter signal function
if the parameter is zero and show() is rigged to showDisplay(0)

2. I have the current scenario which I don't know how to handle:
 a. User clicks on a graphics inset, the edit dialog opens.
 b. User clicks in LyX on another graphics inset, it's edit dialog should
     open.

 BUT there is only one edit dialog so I should either ignore the old edit
 dialog, and use the new dialog details (current action).
 or I should ignore the later request, possibly with a beep and a dialog
 raise.

3. I hold a pointer to the inset (I clear it when I hide()), currently my
stand is that I must verify where appropriate that I have the inset
pointer, this is done in two stages, if assertions are on, I assert it's
not null (!= 0), and in any case I have a bail out return if its zero.
Should I drop this checks/part of them/add a print to the bail out return?

4. In the filename input should I verify that the file actually exists?
I believe it's obvious I should, but I think it wasn't done so far.

5. What about the file format? Should I be compatible with figinset, so as
to allow smooth upgrading? Should I be orthogonal to it and just rely on
some externally crafted translator between formats? (on this note, I
suggest we maintain a format upgrader program so as to avoid the problems
that cropped lately in the lists)

6. Message passing with the inset. currently I have a set/get-Params in
the inset, a class InsetGraphicsParams, and the dialog will pull/push the
info from the inset. Is this the way to go or should I use some form of
signals, if so how?

7. Guarding against illegal input. I set up guarding from illegal input,
specifically when there is any form of illegal input, the OK/Apply buttons
are inactive, when the input is legal they are activated. I consider
adding a label at the bottom to explain why/what is the problem and why
the buttons are grayed out. What do you think?

8. Having menu options. The graphicx has quite a few options, some are
only useful for experts who know what they want, and some are just plain
obscure (to me at least), I want to do a second dialog (or a tabbed dialog)
with advanced options, as anyway all the options will not fit in a single
dialog, and if they will fit it will be cumbersome.
Should I use a tabbed dialog or second dialog?
How should I fire up a second dialog from a guindependent dialog, with a
signal or directly?

9. I wanted to change the radio buttons on the dialog to a choice button,
any reason why not to?
I have a problem doing it since I need to enter the percent character and
I can't seem to do it correctly since the percent char is a special char
for xforms. I couldn't find anything in xforms manual, I need to enter
something like "% of Page", I tried \% and %%, the former did nothing the
second showed only the % so if I did "%% of Page" I got "%", which is not
a good idea.

I think I'll stop here before I'll be hanged :-)

-- 
  Baruch Even

http://techst02.technion.ac.il/~sbaruch/   (My Site)
http://rpghost.com/jindor/                 (My brothers AD&D site)

" Learn to laugh ... it's the path to true love! " 
   - The Angel in the movie Michael


Reply via email to