Hi Doru, all,
thanks for the hint. I searched around some and hacked up a solution. I leave it below for
posterity.
After remembering all the flak that Spec got for how hard it is to understand and
configure and complexity that seems spurious, I am a bit saddened to find that GT also can
be accused of these things. It was much harder for me than I expected to, to get to the
bits of code below. In general, I still have no clue how all these presentation things and
renderers actually work together, and in specific there is a double dispatch using e.g.
renderPharoMethodPresentation: or renderPharoScriptPresentation: that I don't
understand its reason for existence.
Whatever>>gtInspectorSourceFragmentIn: composite
<gtInspectorPresentationOrder: -2>
^(composite custom: RCFixedTextPresentation new)
title: 'Fixed width';
display: [asdf]
GLMRubricTextPresentation subclass: #RCFixedTextPresentation
instanceVariableNames: ''
classVariableNames: ''
package: 'XXX'
RCFixedTextPresentation >>renderGlamorouslyOn: aRenderer
self registerAnnouncements.
^ RCFixedTextRenderer render: self from: aRenderer
GLMMorphicRubricTextRenderer subclass: #RCFixedTextRenderer
instanceVariableNames: ''
classVariableNames: ''
package: 'XXX'
RCFixedTextRenderer>>render: aPresentation
| result |
result := super render: aPresentation.
result textFont: StandardFonts codeFont.
^result
--
Johan Fabry, Senior Software Engineer.
johan(a)raincode.com | Email too brief? Here's why!
-----Original Message-----
From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of
Tudor Girba
Sent: Wednesday, April 11, 2018 12:05 PM
To: Moose-related development <moose-dev(a)list.inf.unibe.ch>
Subject: [Moose-dev] Re: How to get a GLMRubricTextPresentation with
StandardFonts codeFont ?
Hi,
The font is not settable in the text presentation. You can either create a
subclass of text presentation, or extend the existing one. In both cases, you
would need to change the morphic renderer as well.
Doru
On Apr 11, 2018, at 11:48 AM, Johan Fabry
<Johan(a)raincode.com> wrote:
Hi all,
I posted a question like this a week ago but had no response, so here we go,
more explicitly:
I would like a get a GLMRubricTextPresentation using the StandardFonts
codeFont. I do not see how to configure this. The text is not ST so I cannot use
the different ST presentations that are available.
I have been looking for some time now, but cannot see a solution. Can
anybody help me out?
--
Johan Fabry, Senior Software Engineer.
johan(a)raincode.com | Email too brief? Here's why!
http://emailcharter.org
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
www.tudorgirba.com
www.feenk.com
“Software has no shape. Actually, it has no one shape. It has many."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev