Re: [BLACKBOX] New document view, different size

From: Oberon microsystems AG, Tech-Support <"Oberon>
Date: Tue, 25 Aug 2009 06:06:51 +0200

----boundary-LibPST-iamunique-1829908664_-_-
Content-type: text/plain

Dear Rainer,

you are observing an artifact of BlackBox's text rendering algorithm in
cases of long words and narrow columns. Unfortunately, we can neither
state the exact condition when those "random" lines get inserted nor
provide a quick correction.

We are sorry about this and hope you find some workaround.

Kind regards,

Marc

Oberon microsystems AG
www.oberon.ch
+41 (0)44 445 17 51

 

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Rainer Neubauer
> Sent: Freitag, 21. August 2009 15:56
> To: BlackBox List
> Subject: [BLACKBOX] New document view, different size
>
> Hi all,
> some times ago there was a question on the mailing list how
> to open a new document window with size and height being
> different to the standard values. I need this behaviour to
> display a couple of very short lines of text and to free the
> user from having to manually shrink down the window size.
>
> A second topic on the list ("updating a text window") showed
> up how to update the window in order to show the end of text.
>
> So I tried to combine these infos into a little module.
>
> Problem: the window containing some lines of text showes a
> strange behaviour when being narrowed down manually until the
> window width is smaller than the length of the lines. In this
> case an additional blank line appears below every line of
> text exceeding the window width. Of course these blank lines
> do not exist and will disappear again when the window width
> is made large enougth to show the lines of text in full length.
>
> Could anybody please give me a hint how to avoid this behaviour ?
> Please find my code below.
>
> Thanks and best regards,
> Rainer
>
>
>
> MODULE TrialsNewWindow;
>
> IMPORT Containers, Documents, Ports, TextMappers,
> Models, TextModels, TextViews, Views;
>
> VAR
> f: TextMappers.Formatter;
> m: TextModels.Model;
> v: TextViews.View;
>
>
> PROCEDURE Flush*;
> BEGIN
> Views.RestoreDomain (m.Domain ());
> TextViews.ShowRange (m, m.Length (), m.Length
> (), TextViews.any)
> END Flush;
>
>
> PROCEDURE OpenWindow*;
> VAR
> d: Documents.Document;
> c: Containers.Controller;
> BEGIN
> m := TextModels.dir.New ();
> f.ConnectTo (m);
> v := TextViews.dir.New (m);
> d := Documents.dir.New (v, 30 * Ports.mm, 60 *
> Ports.mm);
> c := d.ThisController ();
> c.SetOpts (c.opts + {Documents.winWidth} -
> {Documents.pageWidth});
> Views.OpenView (d)
> END OpenWindow;
>
>
> PROCEDURE WriteLn*;
> BEGIN
> Models.BeginModification (Models.clean, m);
> f.WriteLn;
> Models.EndModification (Models.clean, m);
> Views.RestoreDomain (m.Domain ());
> TextViews.ShowRange (m, m.Length (), m.Length
> (), TextViews.any)
> END WriteLn;
>
> PROCEDURE WriteString* (IN string: ARRAY OF CHAR);
> BEGIN
> Models.BeginModification (Models.clean, m);
> f.WriteString (string);
> Models.EndModification (Models.clean, m);
> Views.RestoreDomain (m.Domain ());
> TextViews.ShowRange (m, m.Length (), m.Length
> (), TextViews.any)
> END WriteString;
>
> BEGIN
> END TrialsNewWindow.
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX"
> to LISTSERV{([at]})nowhere.xy
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1829908664_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERlYXIgUmFpbmVyLFxwYXINClxwYXINCnlvdSBh
cmUgb2JzZXJ2aW5nIGFuIGFydGlmYWN0IG9mIEJsYWNrQm94J3MgdGV4dCByZW5kZXJpb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