Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
Hi Eric,
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text.
Best,
Christoph
On Wed, Sep 2, 2020 at 12:10 AM +0200, "Eric Gade" eric.gade@gmail.com wrote:
Hi all, What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window. As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct? Thanks!
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede < christoph.thiede@student.hpi.uni-potsdam.de> wrote:
for displaying graphics in an inspector, have a look at MorphInspector
(screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! See http://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html and https://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you:
1. Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. 2. To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede <christoph.thiede@student.hpi.uni-potsdam.demailto:christoph.thiede@student.hpi.uni-potsdam.de> wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
-- Eric
Hi
On 02.09.2020, at 21:14, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! See http://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html and https://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
Best, Christoph ________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! See http://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html and https://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
On 02.09.2020, at 23:29, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi Tobias,
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no?
That was exactly my point. 'foo' asText beAllFont: font1; beAllFont: font2 does not make any sense, of course, but when a text is passed from somewhere else, you may not know which formatting has already been applied to it ...
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Donnerstag, 3. September 2020 00:13:24 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On 02.09.2020, at 23:29, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi
On 03.09.2020, at 15:04, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Tobias,
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no?
That was exactly my point. 'foo' asText beAllFont: font1; beAllFont: font2 does not make any sense, of course, but when a text is passed from somewhere else, you may not know which formatting has already been applied to it ...
That is true. But if you want to change the font, there's only so much you can do. If you want just change an upright font to an italic one, the FontReference will not work in any case. The TextFontChange attribute is seemingly intended for that, but it only understands "Font array indices" which is most unhelpful :D
Best regards -Tobias
Best, Christoph
Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Donnerstag, 3. September 2020 00:13:24 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On 02.09.2020, at 23:29, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Tobias Pape Das.Linux@gmx.de Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Eric Gade eric.gade@gmail.com Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Plus, TextFontReference is a rather fixed pointer to a specific font and size, which breaks when using Squeak's notion of High-DPI with bigger fonts in general. TextFontChange works better with its index. And so does TextEmphasis for italic.
Best, Marcel
Am 03.09.2020 15:53:35 schrieb Tobias Pape das.linux@gmx.de: Hi
On 03.09.2020, at 15:04, Thiede, Christoph wrote:
Hi Tobias,
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no?
That was exactly my point. 'foo' asText beAllFont: font1; beAllFont: font2 does not make any sense, of course, but when a text is passed from somewhere else, you may not know which formatting has already been applied to it ...
That is true. But if you want to change the font, there's only so much you can do. If you want just change an upright font to an italic one, the FontReference will not work in any case. The TextFontChange attribute is seemingly intended for that, but it only understands "Font array indices" which is most unhelpful :D
Best regards -Tobias
Best, Christoph
Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Donnerstag, 3. September 2020 00:13:24 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On 02.09.2020, at 23:29, Thiede, Christoph wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev im Auftrag von Eric Gade Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi all, Hi Tobias,
does the attached changeset match your expectations? :-)
Best,
Christoph
http://www.hpi.de/ ________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 3. September 2020 15:56:49 An: squeak-dev Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Plus, TextFontReference is a rather fixed pointer to a specific font and size, which breaks when using Squeak's notion of High-DPI with bigger fonts in general. TextFontChange works better with its index. And so does TextEmphasis for italic.
Best, Marcel
Am 03.09.2020 15:53:35 schrieb Tobias Pape das.linux@gmx.de:
Hi
On 03.09.2020, at 15:04, Thiede, Christoph wrote:
Hi Tobias,
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no?
That was exactly my point. 'foo' asText beAllFont: font1; beAllFont: font2 does not make any sense, of course, but when a text is passed from somewhere else, you may not know which formatting has already been applied to it ...
That is true. But if you want to change the font, there's only so much you can do. If you want just change an upright font to an italic one, the FontReference will not work in any case. The TextFontChange attribute is seemingly intended for that, but it only understands "Font array indices" which is most unhelpful :D
Best regards -Tobias
Best, Christoph
Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Donnerstag, 3. September 2020 00:13:24 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On 02.09.2020, at 23:29, Thiede, Christoph wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev im Auftrag von Eric Gade Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi
On 08.09.2020, at 08:09, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Hi all, Hi Tobias,
does the attached changeset match your expectations? :-)
Looks promising. I'd like some input from others wether the #be*-API on Text works, as it currently lives on TextMorph.
Other than that, go ahead.
Best regards -Tobias
Best, Christoph Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 3. September 2020 15:56:49 An: squeak-dev Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Plus, TextFontReference is a rather fixed pointer to a specific font and size, which breaks when using Squeak's notion of High-DPI with bigger fonts in general. TextFontChange works better with its index. And so does TextEmphasis for italic.
Best, Marcel
Am 03.09.2020 15:53:35 schrieb Tobias Pape das.linux@gmx.de: Hi
On 03.09.2020, at 15:04, Thiede, Christoph wrote:
Hi Tobias,
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no?
That was exactly my point. 'foo' asText beAllFont: font1; beAllFont: font2 does not make any sense, of course, but when a text is passed from somewhere else, you may not know which formatting has already been applied to it ...
That is true. But if you want to change the font, there's only so much you can do. If you want just change an upright font to an italic one, the FontReference will not work in any case. The TextFontChange attribute is seemingly intended for that, but it only understands "Font array indices" which is most unhelpful :D
Best regards -Tobias
Best, Christoph
Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Donnerstag, 3. September 2020 00:13:24 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On 02.09.2020, at 23:29, Thiede, Christoph wrote:
Hi Tobias, thanks for the tips! :-)
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Would you expect such a Text>>#setFont:from:to: only to add a TextFontReference or also to remove all existing TextFontReferences from the interval?
I'd be wary of using #set... because exactly that expectation happens. Vocabulary is cumbersome, tho. see TextMorph's _be_AllFont, Text's _make_Bold and the attributes only ever add.
Also, I don't see how two font refs can ever be stacked, it makes not much sense, no? Coalescing the runs would probably take care of chopping up the different font runs, but that's beneath the cover.
That said, I liked the Seaside/Magritte-wording with beSomething on their brushes or models respectively…
Best regards -Tobias
Best, Christoph Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Mittwoch, 2. September 2020 22:04:38 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi
On 02.09.2020, at 21:14, Thiede, Christoph wrote:
Hi Eric,
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
MorphInspector, FormInspector, and a bunch of other small new improvements to the inspector framework have arrived in the Squeak Trunk just a few months ago! Seehttp://forum.world.st/Please-try-out-Inspector-Refactoring-td5114974.html andhttps://squeak.org/downloads/#current-trunk-image-2:~:text=Current-,Trunk,-I... :-)
I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle?
These are good questions others can probably answer better than I could do. This is all I can tell you: • Font rendering in Squeak is difficult and the default font (DejaVu Sans) appears to be the only one that looks kind of nice in all sizes. I almost never choose a different font. • To change the font in a Text, use something like: 'foo' asText addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Darkmap DejaVu Sans' pointSize: 20)); openAsMorph
I'd suggest to use the TextStyle indirection, so you don't have to guess wether the font is a Strike font or a TTFont or whatever:
'foo' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20)); openAsMorph
If you are just after changing the font used in a TextMorph (not the text itself), I'd use
'foo' asTextMorph beAllFont: ((TextStyle named: 'Darkmap DejaVu Sans') fontOfSize: 20); openInHand
That way, the name string can be easily exchanged, such as 'BitstreamVeraSans', or anything imported with the FontImporterTool
I think the "TextFontReference toFont:" and explicit "addAttribute:" are a bit involved; maybe something akin to Text>>#makeBoldFrom:to:/Text>>#allBold would be nice.
Best regards -Tobias
Also -- how can I disable editing of a TextMorph?
See TextMorph >> #readOnly: or also Morph >> #lock to disable any interaction.
Best, Christoph Von: Squeak-dev im Auftrag von Eric Gade Gesendet: Mittwoch, 2. September 2020 17:01:45 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Hi Christoph,
On Tue, Sep 1, 2020 at 7:32 PM Christoph Thiede wrote:
for displaying graphics in an inspector, have a look at MorphInspector (screenshot) or FormInspector (pixels). Custom interactive fields are not (yet?) supported, but in theory, you could subclass Inspector and override the relevant toolbuilder methods.
I can't seem to find MorphInspector in a current (5.3 here) image. Is this a separate package?
Regarding to your second question - why don't you use a TextMorphs? The composition of different formatting styles applied to a string is just what makes up a Text
Aha, yes, I think I've looked into this before. I find the whole relationship between a Text and TextStyle a bit confusing, especially where it comes to setting Fonts. It appears that there are lots of different "kinds" of Fonts, and there's a good amount of indirection so it's difficult to determine which kind of fonts (StrikeFont? TTFont?) "live" and how to see what's available and pick programmatically. Is there a good primer somewhere on Text/TextStyle? Also -- how can I disable editing of a TextMorph?
Thanks again
Hi all,
can we merge the text emphasis changeset? I did not receive any other review than Tobias'. :-)
Best, Christoph
----- Carpe Squeak! -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html
Just had a brief look. Why are the whole-affecting selectors with "be" and the part-affecting selectors with "make"? Should this be made uniform?
And there is beAllFont: although the text is not a font. Is beAllInFont: correct English?
Am So., 22. Nov. 2020 um 17:45 Uhr schrieb Christoph Thiede christoph.thiede@student.hpi.uni-potsdam.de:
Hi all,
can we merge the text emphasis changeset? I did not receive any other review than Tobias'. :-)
Best, Christoph
Carpe Squeak!
Sent from: http://forum.world.st/Squeak-Dev-f45488.html
Hi Eric.
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
--
Eric
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects
whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
Best,
Christoph
http://www.hpi.de/ ________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com Gesendet: Donnerstag, 3. September 2020 13:28:41 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel <marcel.taeumel@hpi.demailto:marcel.taeumel@hpi.de> wrote: Hi Eric.
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade <eric.gade@gmail.commailto:eric.gade@gmail.com>:
Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing
StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[image: bild.png]
Best, Karl
Best,
Christoph
http://www.hpi.de/
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Donnerstag, 3. September 2020 13:28:41 *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects
whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
Great ideas! I never get the right handle on the first try, merging them sounds very reasonable. :-)
Hm ... doesn't the existence of such an "Apply" button impede Morphic's liveness? Why not just apply all changes as soon as a font/style has been selected? You could replace the buttons by a checkbox "selection only".
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com Gesendet: Dienstag, 8. September 2020 21:49 Uhr An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.demailto:Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[bild.png]
Best, Karl
Best,
Christoph
http://www.hpi.de/ ________________________________ Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.orgmailto:squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von karl ramberg <karlramberg@gmail.commailto:karlramberg@gmail.com> Gesendet: Donnerstag, 3. September 2020 13:28:41 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel <marcel.taeumel@hpi.demailto:marcel.taeumel@hpi.de> wrote: Hi Eric.
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade <eric.gade@gmail.commailto:eric.gade@gmail.com>:
Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
Hi, I tested using PluggableCheckBoxMorph but that widget is unwieldy. I'm not sure how to add a label to it. The widget seem to expect the model eg. FontChooserTool to perform the label ?
PluggableCheckBoxMorph>>on: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel ... self label: (self model perform: labelSel).
I'm not sure how that is supposed to work...
There is no other use of the widget in the image I can look at either.
Best, Karl
On Tue, Sep 8, 2020 at 9:57 PM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Great ideas! I never get the right handle on the first try, merging them sounds very reasonable. :-)
Hm ... doesn't the existence of such an "Apply" button impede Morphic's liveness? Why not just apply all changes as soon as a font/style has been selected? You could replace the buttons by a checkbox "selection only".
Best,
Christoph
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Dienstag, 8. September 2020 21:49 Uhr *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing
StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[image: bild.png]
Best, Karl
Best,
Christoph
http://www.hpi.de/
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Donnerstag, 3. September 2020 13:28:41 *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects
whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
Figured this out... Best, Karl
On Sat, Sep 26, 2020 at 10:41 AM karl ramberg karlramberg@gmail.com wrote:
Hi, I tested using PluggableCheckBoxMorph but that widget is unwieldy. I'm not sure how to add a label to it. The widget seem to expect the model eg. FontChooserTool to perform the label ?
PluggableCheckBoxMorph>>on: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel ... self label: (self model perform: labelSel).
I'm not sure how that is supposed to work...
There is no other use of the widget in the image I can look at either.
Best, Karl
On Tue, Sep 8, 2020 at 9:57 PM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Great ideas! I never get the right handle on the first try, merging them sounds very reasonable. :-)
Hm ... doesn't the existence of such an "Apply" button impede Morphic's liveness? Why not just apply all changes as soon as a font/style has been selected? You could replace the buttons by a checkbox "selection only".
Best,
Christoph
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Dienstag, 8. September 2020 21:49 Uhr *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing
StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[image: bild.png]
Best, Karl
Best,
Christoph
http://www.hpi.de/
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Donnerstag, 3. September 2020 13:28:41 *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects
whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
Hi Karl.
We might want to merge the behavior of those:
PluggableCheckBoxMorph ThreePhaseButtonMorph class >> #checkBox
Best, Marcel Am 26.09.2020 19:20:10 schrieb karl ramberg karlramberg@gmail.com: Figured this out... Best, Karl
On Sat, Sep 26, 2020 at 10:41 AM karl ramberg <karlramberg@gmail.com [mailto:karlramberg@gmail.com]> wrote:
Hi, I tested using PluggableCheckBoxMorph but that widget is unwieldy.
I'm not sure how to add a label to it.
The widget seem to expect the model eg. FontChooserTool to perform the label ?
PluggableCheckBoxMorph>>on: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel ... self label: (self model perform: labelSel).
I'm not sure how that is supposed to work...
There is no other use of the widget in the image I can look at either.
Best, Karl
On Tue, Sep 8, 2020 at 9:57 PM Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de [mailto:Christoph.Thiede@student.hpi.uni-potsdam.de]> wrote:
Great ideas! I never get the right handle on the first try, merging them sounds very reasonable. :-) Hm ... doesn't the existence of such an "Apply" button impede Morphic's liveness? Why not just apply all changes as soon as a font/style has been selected? You could replace the buttons by a checkbox "selection only".
Best, Christoph
Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org]> im Auftrag von karl ramberg <karlramberg@gmail.com [mailto:karlramberg@gmail.com]> Gesendet: Dienstag, 8. September 2020 21:49 Uhr An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de [mailto:Christoph.Thiede@student.hpi.uni-potsdam.de]> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[bild.png]
Best, Karl
Best, Christoph [http://www.hpi.de/] Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org]> im Auftrag von karl ramberg <karlramberg@gmail.com [mailto:karlramberg@gmail.com]> Gesendet: Donnerstag, 3. September 2020 13:28:41 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Inspector Custom Value Panes & Related Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel <marcel.taeumel@hpi.de [mailto:marcel.taeumel@hpi.de]> wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel Am 02.09.2020 00:10:56 schrieb Eric Gade <eric.gade@gmail.com [mailto:eric.gade@gmail.com]>: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
--
Eric
PluggableCheckBoxMorph is just as wrapper for UpdatingThreePhaseButtonMorph afaics. My issue was ToolBuilders use of symbols instead of strings for the label. I just made a method in FontChooserTool that returned the label as a string.
Best, Karl
On Mon, Sep 28, 2020 at 9:28 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Karl.
We might want to merge the behavior of those:
PluggableCheckBoxMorph ThreePhaseButtonMorph class >> #checkBox
Best, Marcel
Am 26.09.2020 19:20:10 schrieb karl ramberg karlramberg@gmail.com: Figured this out... Best, Karl
On Sat, Sep 26, 2020 at 10:41 AM karl ramberg karlramberg@gmail.com wrote:
Hi, I tested using PluggableCheckBoxMorph but that widget is unwieldy. I'm not sure how to add a label to it. The widget seem to expect the model eg. FontChooserTool to perform the label ?
PluggableCheckBoxMorph>>on: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel ... self label: (self model perform: labelSel).
I'm not sure how that is supposed to work...
There is no other use of the widget in the image I can look at either.
Best, Karl
On Tue, Sep 8, 2020 at 9:57 PM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Great ideas! I never get the right handle on the first try, merging them sounds very reasonable. :-)
Hm ... doesn't the existence of such an "Apply" button impede Morphic's liveness? Why not just apply all changes as soon as a font/style has been selected? You could replace the buttons by a checkbox "selection only".
Best,
Christoph
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Dienstag, 8. September 2020 21:49 Uhr *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
On Tue, Sep 8, 2020 at 8:16 AM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Hi Karl,
I'm sorry your proposal is lost a bit - I think it's a nice addition! It does not look exactly like the TextMorph dialog, but I actually prefer "one dialog that fits it all" over the three separate handles for a TextMorph (that do not even all appear to work properly at the moment.) I think we should get this merged! :-)
My change just adds handle support to the already existing
StringMorph>>changeFont
The three TextMorph handles are not optimal and could be refactored into one handle.
I made another change to FontChooserTool where I added a button to apply text changes to the partition of text selected or a bulk change to all text in the pane. With this change I also enabled the emphasis pane to FontChooserTool.
[image: bild.png]
Best, Karl
Best,
Christoph
http://www.hpi.de/
*Von:* Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von karl ramberg karlramberg@gmail.com *Gesendet:* Donnerstag, 3. September 2020 13:28:41 *An:* The general-purpose Squeak developers list *Betreff:* Re: [squeak-dev] Inspector Custom Value Panes & Related
Here is a change set that adds HaloHandle for font change to StringMorph
Best, Karl
On Thu, Sep 3, 2020 at 9:56 AM Marcel Taeumel marcel.taeumel@hpi.de wrote:
Hi Eric.
What is the proper way to make a "custom value pane" for my objects
whenever they appear inside an Inspector?
Unfortunately, the current inspector framework has no such extension point. You can, however, prepare a custom inspector for your domain objects. See MorphInspector as an example.
Best, Marcel
Am 02.09.2020 00:10:56 schrieb Eric Gade eric.gade@gmail.com: Hi all,
What is the proper way to make a "custom value pane" for my objects whenever they appear inside an Inspector? For my RISCV work, I'm looking to show a morphic representation of the bitfields when a given instruction's `self` property is highlighted in the Inspector window.
As a related question, what's the best way to make a composed Morph that has StringMorphs of different fonts, sizes, and alignments? It seems like not all Fonts are available to StringMorph (TrueType ones, for example) -- is that correct?
Thanks!
-- Eric
squeak-dev@lists.squeakfoundation.org