[Cuis] Styled Text Editor

Juan Vuletich juan at jvuletich.org
Fri Jul 25 08:20:40 CDT 2014


Hi Hari,

On 7/24/2014 2:00 AM, Hari Balaraman wrote:
> Folks,
>
> I’ve been playing around with the Styled Text Editor and noticed two 
> issues, one is that the default size of the SystemWindow is smaller 
> than the toolbar and the second is that when the window is resized, 
> every part of the toolbar becomes progressively transparent *_other 
> than_* the second PluggableFilteringDropDownListMorph (relating to 
> CharacterStyle).
>
> For the SystemWindow size on initialisation, I have used a very 
> inelegant hack in the editFancierStyledText class method for the 
> SystemWindow class by  specifying a large enough morphExtent to the 
> SystemWindow.
>
> But for the lack of transparency of the 
> second PluggableFilteringDropDownListMorph on the resizing of the 
> overall SystemWindow, I am lost.
>
> On examining and comparing, in inspectors, the two 
> PluggableFilteringDropDownListMorphs in the toolbar, I find the only 
> difference to be in the labels.
>
>
> I attach screenshots to illustrate the behaviour.
>

Thanks for the report, Hari. I recently did some changes in morphic 
submorph clipping. Clipping is now done only on the first submorph. This 
is enough for scroll panes and such. And windows (together with most 
morphs) don't really need clipping, but good layout handling. I just 
committed a new version of StyledTextEditor to fix this.

> I had one question for any folks that might know. What format does the 
> text editor save files in? I saved it on the filesystem but couldn’t 
> access it using textedit. If it isn’t accessible by non-smalltalk 
> editors, is there a text editor you know of that I can install that 
> will allow me to read and write to files on the filesystems. I started 
> down that path last week writing to plaintext files (for an app I am 
> building) but wanted to avoid reinventing the wheel in case it has 
> already been done (also why I got pretty excited today about the 
> stylised text editor.)

Right now, we are saving files with SmartRefStream, as Smalltalk 
serialized objects. The code to support RTF is there, but I don't really 
like RTF, especially as it doesn't have a concept of styles. I think the 
best would be to be able to save and read .MD (markdown) format. And use 
a set of styles that match what markdown provides. Someone would need to 
code this, though. But I don't think it would be too hard if you or 
anybody wants to give it a try.

> On the issue of enabling and disabling the focusFollowsMouse 
> preference, I attach an awful hack to the Preferences menu that 
> unfortunately gets the job done for me in the latest image.
>
> Best regards,
>
> Hari
>

I integrated your code in Cuis today. I think it makes sense, and is not 
hacky at all.

Cheers,
Juan Vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20140725/2d4ffe76/attachment-0004.html>


More information about the Cuis mailing list