[Ipe-discuss] Style sheets and other bugs

Otfried Cheong o.cheong at tue.nl
Fri Apr 4 11:54:01 CEST 2003

Olivier Devillers writes:

 > How does style sheet work ?

Poorly.  Support for style sheets (and presentations in general) is
still somewhat experimental. It's much better in preview 9, but there
are a few bugs (the 'presentation.xml' style sheet doesn't work right
if you edit text, you have to reload to fix the size), and there is
still no way to create layers/objects that appear on all pages.  I'm
still thinking about the right user interface for that. Any

 > Short cuts have gone from emacs like to windows like  :=<

The problem is that Qt 2.3 doesn't support key sequences, and I didn't
want to have to reimplement keyboard shortcuts if the toolkit I'm
using supports them.  So the obvious other choice was the "standard
shortcuts", as in Windows, KDE, or on my Psion.

However, it seems that Qt 3 does support key sequences, and it is
possible to redefine all short cuts in Ipe, as explained in the manual
(very briefly, under "Customizing Ipe").  You would need to make two
small changes in Ipe to use multi-key sequence, namely in
"src/ipe/appui.h" change
  int Key(const char *str, const char *context);
  QKeySequence Key(const char *str, const char *context);
(You may need to include the additional header file <qkeysequence.h>).
And in "src/ipe/appui.cpp", change

int AppUi::Key(const char *src, const char *comment)
  QString transl = qApp->translate("Key", src, comment);
  QTranslatorMessage m("Key", src, comment, transl);
  int key = QAccel::stringToKey(transl);
  if ((key & CTRL) && (key & 0xffff) < 0x100)
    key &= ~UNICODE_ACCEL;
  return key;


QKeySequence AppUi::Key(const char *src, const char *comment)
  QString transl = qApp->translate("Key", src, comment);
  QTranslatorMessage m("Key", src, comment, transl);
  return QAccel::stringToKey(transl);

I'm sure Rene will try this and provide an "ipeemacskeys.qm" file for
our use :-)

 > Shift-F1 short cut does not work for me.

That is mysterious, as I'm properly setting it as a short-cut in
"appui.cpp".  I nearly have the feeling that Qt/X11 hard-codes this
key for the "What's this" button, but have no idea where that could
happen.  The easiest solution is to change it to a different key, say
Shift+F2.  Or use the free key F10.  Or shift the snap keys and use
F4.  Suggestions?

 > Is there a way tu cut and paste a whole page as in Ipe5 (I mean not
 > as in Ipe5 but with all new things : e.g. the layers and the
 > presentation defined)

No.  It will be in the next version :-)

 > Is there a way to select few objects and to ask to all of them to
 > be in layer beta.

Yes: Select the objects, select layer "beta", say "group" and then
"ungroup" :-)

I once had it implemented so that changing the current layer with some
objects selected moved them to the new layer, but this was quite a
hassle---I accidentally moved objects to other layers all the time.
What do you think?

Guenter Rote writes:
 > On my PC at home, pdflatex would not run for ipe.
 > The reason is that the batch file runlatex.bat
 > contains only LF and not CRLF at the ends of lines.

Mysterious, as I've tried it on Windows 98 and it worked fine.  Maybe
a different service release...  It will be changed.

 > The boxes for text (green dashed lines) have the correct size but
 > they are offset a little to the left and to the bottom.  The text
 > appears in the correct position on the screen (i.e. in the same
 > position as in the eps-file)

I've seen this, too, but cannot reproduce it.  Does it happen to you
all the time?  Could you send me a small Ipe file that exhibits the

Rene writes:
 > I have experienced the same (this is on a Redhat 8.0 system, with
 > Gnome/sawfish as window manager). Since Otfried turned to the Dark
 > Side and doesn't use Linux, I'll volunteer to find out what's going
 > on. I have time to play with the code in a week or so.

Excellent! (just don't forget the revision of our paper :-) It sounds
very much as if it's the drawing code that messes up, i.e. internally
everything is fine, but it's not drawn correctly.  All this happens in
"src/ipe/canvas.cpp". The canvas is redrawn in
"Canvas::paintEvent".  Note the objects are already in a pixmap
(iOffscreen), so the function just blits that to the screen and then
draws the selection on top of it.

Joyful debugging,

More information about the Ipe-discuss mailing list