Skip to content

Commit

Permalink
Merge pull request #440 from pharo-graphics/issue425moveToMicrodown
Browse files Browse the repository at this point in the history
Replace all gtClass and gtMethod to Microdown
  • Loading branch information
tinchodias committed Feb 2, 2024
2 parents 967978f + 2ef0249 commit 901f876
Show file tree
Hide file tree
Showing 71 changed files with 162 additions and 162 deletions.
8 changes: 4 additions & 4 deletions src/Bloc-DevTool/BlDevHalosEventListener.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"
I am an {{gtClass:BlEventListener}} event listener and I can display halos around an element. Halos then permits to inspect or delete.
I am an `BlEventListener` event listener and I can display halos around an element. Halos then permits to inspect or delete.
You can install me on any {{gtClass:BlSpace}} (window) using {{gtMethod:BlSpace>>#withHalos}}.
You can install me on any `BlSpace` (window) using `BlSpace>>#withHalos`.
The {{gtMethod:BlDevHalosEventListener>>#mouseDownEvent:}} checks if `SHIFT` and `ALT` modifiers are pressed during a {{gtClass:BlMouseDownEvent}}. You can try to click on the rectangle below while pressing `SHIFT` and `ALT`:
The `BlDevHalosEventListener>>#mouseDownEvent:` checks if `SHIFT` and `ALT` modifiers are pressed during a `BlMouseDownEvent`. You can try to click on the rectangle below while pressing `SHIFT` and `ALT`:
{{gtExample:BlDevHalosEventListenerExamples>>#containerWithRectangle|codeExpanded=false|previewExpanded=true|previewHeight=350|previewShow=#gtLiveFor:}}
Available actions (see implementation at {{gtMethod:BlElementSelection>>#initializeActions}}:
Available actions (see implementation at `BlElementSelection>>#initializeActions`:
- The red button removes the selected element.
- The green button displays additional information.
- The yellow button resizes the selected element.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlDevHalosEventListenerExample.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I exemplify {{gtClass:BlDevHalosEventListener}}.
I exemplify `BlDevHalosEventListener`.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlElementSelection.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am a Halos element. For more information about me, see {{gtClass:BlDevHalosEventListener}}.
I am a Halos element. For more information about me, see `BlDevHalosEventListener`.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlElementSelectionButton.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am one button inside of a Halos element. For more information about me, see {{gtClass:BlDevHalosEventListener}}.
I am one button inside of a Halos element. For more information about me, see `BlDevHalosEventListener`.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlElementSelectionListener.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am an event handler that is used for Halos element. For more information about me, see {{gtClass:BlDevHalosEventListener}}.
I am an event handler that is used for Halos element. For more information about me, see `BlDevHalosEventListener`.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlMetricsInspector.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ On an element that is defined with the following margin and padding methics:
I provide the following overview:
{{gtExample:BlMetricsInspectorExamples>>#metricsInspectorOnElementWithMetrics|codeExpanded=false|previewExpanded=true}}
The view is available for any {{gtExample:BlMetricsInspectorExamples>>#elementWithMetrics|label=#className}} instance throught {{gtMethod:BlElement>>#gtMetricsFor:}} inspector extension. You can find it when you inspect a view and switch to {{gtExample:BlMetricsInspectorExamples>>#metricsPhlowView|label=#title}} tab.
The view is available for any {{gtExample:BlMetricsInspectorExamples>>#elementWithMetrics|label=#className}} instance throught `BlElement>>#gtMetricsFor:` inspector extension. You can find it when you inspect a view and switch to {{gtExample:BlMetricsInspectorExamples>>#metricsPhlowView|label=#title}} tab.
"
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-DevTool/BlMetricsInspectorExample.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I exemplify {{gtClass:BlMetricsInspector}}.
I exemplify `BlMetricsInspector`.
"
Class {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ In this explanation we will take a look at what happens when mouse moves between
### `BlMouseEnterEvent` and `BlMouseLeaveEvent`
If you are looking for the simplest way to detect when a user hovers an element with the mouse use a combination of {{gtClass:BlMouseEnterEvent}} and {{gtClass:BlMouseLeaveEvent}}.
If you are looking for the simplest way to detect when a user hovers an element with the mouse use a combination of `BlMouseEnterEvent` and `BlMouseLeaveEvent`.
They trigger when the mouse pointer enters/leaves the element:
*(mouse your mouse over the preview element below)*
{{gtExample:BlMouseOverOutAndEnterLeaveEventExplanation>>#basicMouseEnterAndLeave|previewExpanded=true|previewShow=#gtLiveFor:|previewHeight=240}}
{{gtClass:BlMouseEnterEvent}} and {{gtClass:BlMouseLeaveEvent}} are sent directly (`dispatched`) to the element, ignoring any mouse transitions inside the element, therefore both mouse enter and leave events do not bubble. In the example below, notice how parent container does not receive mouse leave event when mouse transitions between children:
`BlMouseEnterEvent` and `BlMouseLeaveEvent` are sent directly (`dispatched`) to the element, ignoring any mouse transitions inside the element, therefore both mouse enter and leave events do not bubble. In the example below, notice how parent container does not receive mouse leave event when mouse transitions between children:
{{gtExample:BlMouseOverOutAndEnterLeaveEventExplanation>>#mouseEnterAndLeaveConsumed|noCode=true|previewExpanded=true|previewShow=#gtLiveFor:|previewHeight=240}}
### `BlMouseOverEvent` and `BlMouseOutEvent`
Similar to the mouse enter but a bit more advanced, {{gtClass:BlMouseOverEvent}} occurs when a mouse pointer comes over an element, and {{gtClass:BlMouseOutEvent}} – when it leaves:
Similar to the mouse enter but a bit more advanced, `BlMouseOverEvent` occurs when a mouse pointer comes over an element, and `BlMouseOutEvent` – when it leaves:
{{gtExample:BlMouseOverOutAndEnterLeaveEventExplanation>>#basicMouseOverAndOut|previewExpanded=true|previewShow=#gtLiveFor:|previewHeight=240}}
An important feature of mouseout – it triggers, when the pointer moves from an element to its descendant, e.g. from #parent to #child. It also means that mouse over/out events bubble.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I exemplify {{gtClass:BlSharedEventDistributor}}.
I exemplify `BlSharedEventDistributor`.
"
Class {
Expand Down
4 changes: 2 additions & 2 deletions src/Bloc-Examples/BlSpaceIconDummyStencil.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"
I am a dummy object used by {{gtClass:BlSpaceExamples}}.
I evaluate create an icon on {{gtMethod:BlSpaceIconDummyStencil>>#asElement|label=#selector}} call.
I am a dummy object used by `BlSpaceExamples`.
I evaluate create an icon on `BlSpaceIconDummyStencil>>#asElement|label=#selector` call.
"
Expand Down
10 changes: 5 additions & 5 deletions src/Bloc-Layout/BlFrameLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
I am a layout designed to block out an area on the screen to display a single child.
I should be mainly used to display a single child, as it can be difficult to display multiple children at different positions on the screen without overlapping each other.
However, elements with a frame layout can have multiple child elements. The `'weight'` and `'alignment'` attributes can be used to control the position of children. However, weight only works when the child matches the parent; if it fits content or has an exact size, the weight attribute is ignored. I rely on custom layout constraints for setting attributes (see {{gtClass:BlFrameLayoutConstraints}}, {{gtClass:BlFrameLayoutConstraintsHorizontal}} and {{gtClass:BlFrameLayoutConstraintsVertical}}).
However, elements with a frame layout can have multiple child elements. The `'weight'` and `'alignment'` attributes can be used to control the position of children. However, weight only works when the child matches the parent; if it fits content or has an exact size, the weight attribute is ignored. I rely on custom layout constraints for setting attributes (see `BlFrameLayoutConstraints`, `BlFrameLayoutConstraintsHorizontal` and `BlFrameLayoutConstraintsVertical`).
I position each child element based on the top left of the screen. Child elements are stacked on top of each other, with the most recently added child on top. An important property is that the location of a child is independent from the location of other children.
Expand All @@ -17,7 +17,7 @@ The alignment attribute controls the position of children within a FrameLayout.
- horizontally children can be aligned to left, center or right;
- vertically children can be aligned to top, center or bottom.
For example, below we align a fixed-size child horizontally to the right and vertically to the bottom. Alignment is a constraint specific to frame layouts, as it's not relevant to all layouts. To access frame-specific contraints, we send {{gtMethod:BlLayoutCommonConstraints>>#frame}} to the current constraint object, which returns an instance of {{gtClass:BlFrameLayoutConstraints}} that we can use to set the desired alignment. Other constraints like the size of an element are common to all layouts and can be set directly without requesting a specific constraint object. Both cases are illustrated by the following example:
For example, below we align a fixed-size child horizontally to the right and vertically to the bottom. Alignment is a constraint specific to frame layouts, as it's not relevant to all layouts. To access frame-specific contraints, we send `BlLayoutCommonConstraints>>#frame` to the current constraint object, which returns an instance of `BlFrameLayoutConstraints` that we can use to set the desired alignment. Other constraints like the size of an element are common to all layouts and can be set directly without requesting a specific constraint object. Both cases are illustrated by the following example:
{{gtExample:BlFrameLayoutSingleChildExamples>>#elementDocumentationWithOneExactChildAlignBottomRightInExactParent|previewExpanded|previewHeight=400}}
When using multiple children, if we do not specify any alignment they will be placed in the top-left corner in the order in which they were added to the parent.
Expand Down Expand Up @@ -68,9 +68,9 @@ However, this will not work when the parent uses ""fit content"" and the child u
## More examples
For more example on how to use frame layouts, check out these classes:
- {{gtClass:BlFrameLayoutSingleChildExamples}}
- {{gtClass:BlFrameLayoutMultipleChildrenExamples}}
- {{gtClass:BlFrameLayoutCompositionExamples}}
- `BlFrameLayoutSingleChildExamples`
- `BlFrameLayoutMultipleChildrenExamples`
- `BlFrameLayoutCompositionExamples`
"
Expand Down
4 changes: 2 additions & 2 deletions src/Bloc-Layout/BlGridLayoutInterval.class.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"
An Interval represents a contiguous range of values that lie between the interval's #min and #max values .
I am different from {{gtClass:Interval}} in a sense that I don't include #max and my size is computed as (max - min)
I am different from `Interval` in a sense that I don't include #max and my size is computed as (max - min)
Intervals are immutable so may be passed as values and used as keys in hash tables.
It is not necessary to have multiple instances of Intervals which have the same #min and #max values.
Intervals are often written as [min, max) and represent the set of values min <= x < max.
I am used by {{gtClass:BlGridLayoutArc}}
I am used by `BlGridLayoutArc`
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-SVG/BlSvgPath.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am the {{gtClass:BlElementVectorGeometry}} used to represent a SVG Path, which allows to make complex drawings.
I am the `BlElementVectorGeometry` used to represent a SVG Path, which allows to make complex drawings.
A SVG Path is obtained through successives commands, which each symbolizes a movement of the virtual pen drawing the path.
My instance variable'pathData' stores the list of commands used to obtain my final drawing.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Scripter/BlDevScripterClickStep.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I fire a {{gtClass:BlMouseDownEvent}}, {{gtClass:BlMouseUpEvent}}, and {{gtClass:BlClickEvent}}.
I fire a `BlMouseDownEvent`, `BlMouseUpEvent`, and `BlClickEvent`.
## Example
Expand Down
6 changes: 3 additions & 3 deletions src/Bloc-Scripter/BlDevScripterEventCollectorHandler.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"
I am a {{gtClass:BlBasicEventHandler}}.
I am used by {{gtClass:BlDevScripter}}.
I collect events into {{gtMethod:BlDevScripter>>#events}}.
I am a `BlBasicEventHandler`.
I am used by `BlDevScripter`.
I collect events into `BlDevScripter>>#events`.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Scripter/BlDevScripterTest.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I exemplify {{gtClass:BlDevScripter}}.
I exemplify `BlDevScripter`.
"
Class {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
"
# Text measurement strategies
{{gtClass:BlTextElement}} provides different text measurement strategies, each suitable for a specific use case. There is no perfect strategy, therefore understanding the differences between them is an important step in learning how to work with Text in Bloc.
`BlTextElement` provides different text measurement strategies, each suitable for a specific use case. There is no perfect strategy, therefore understanding the differences between them is an important step in learning how to work with Text in Bloc.
## Label measurement
The default text measurement strategy is so called `Label measurement`, {{gtMethod:BlTextElement>>#labelMeasurement}}. The height of the text element in this case is a sum of ascent and descent which is given by the font. It means that the height of the text is independent from the content. The width is given by the exact bounds of the element's text. `Label measurement` is useful for displaying labels and short pieces of text. Please note, that since the width is precise and depends on the content, whitespace is not taken into account when computing the width of the text element.
The default text measurement strategy is so called `Label measurement`, `BlTextElement>>#labelMeasurement`. The height of the text element in this case is a sum of ascent and descent which is given by the font. It means that the height of the text is independent from the content. The width is given by the exact bounds of the element's text. `Label measurement` is useful for displaying labels and short pieces of text. Please note, that since the width is precise and depends on the content, whitespace is not taken into account when computing the width of the text element.
{{gtExample:BlTextElementMeasurementStrategyExamples>>#textElementWithLabelMeasurement|noCode|previewShow=#gtLiveFor:|previewHeight=100}}
## Editor measurement
A similar measurement strategy which is designed to be used in a text editor computes the width of the element using the `#advance` property of a text paragraph. The height is computed as a sum of ascent and descent. {{gtMethod:BlTextElement>>#editorMeasurement}}
A similar measurement strategy which is designed to be used in a text editor computes the width of the element using the `#advance` property of a text paragraph. The height is computed as a sum of ascent and descent. `BlTextElement>>#editorMeasurement`
{{gtExample:BlTextElementMeasurementStrategyExamples>>#textElementWithEditorMeasurement|noCode|previewShow=#gtLiveFor:|previewHeight=100}}
## Precise measurement
However, sometimes we want to know the exact and precise text bounds. {{gtMethod:BlTextElement>>#tightMeasurement}} does exactly that and clips off any white space surrounding the text. It may be useful for displaying a short piece of a text, usually a word centered within a larger element.
However, sometimes we want to know the exact and precise text bounds. `BlTextElement>>#tightMeasurement` does exactly that and clips off any white space surrounding the text. It may be useful for displaying a short piece of a text, usually a word centered within a larger element.
{{gtExample:BlTextElementMeasurementStrategyExamples>>#textElementWithTightMeasurement|noCode|previewShow=#gtLiveFor:|previewHeight=75}}
## Conslusion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"
# Underline attribute
The simplest way to apply an underline attribute on a whole text would be to use {{gtMethod:TBlTextStyleable>>#underlineColor:thickness:}}
The simplest way to apply an underline attribute on a whole text would be to use `TBlTextStyleable>>#underlineColor:thickness:`
{{gtExample:BlTextUnderlineAttributeExamples>>#textWithUnderline_1_to_5|previewShow=#gtTextFor:|previewExpanded|previewHeight=100}}
To add an underline to just a part of text it can be scoped with {{gtMethod:BlText>>#from:to:}}
To add an underline to just a part of text it can be scoped with `BlText>>#from:to:`
{{gtExample:BlTextUnderlineAttributeExamples>>#textWithUnderline_3_to_4|previewShow=#gtTextFor:|previewExpanded|previewHeight=100}}
In addition to the simple API an underline attribute can be customized and then applied on a text using {{gtMethod:TBlTextStyleable>>#underlineDo:}} helper method. Users should pass a block that accepts {{gtClass:BlTextDecorationAttribute}} as an argument.
In addition to the simple API an underline attribute can be customized and then applied on a text using `TBlTextStyleable>>#underlineDo:` helper method. Users should pass a block that accepts `BlTextDecorationAttribute` as an argument.
{{gtExample:BlTextUnderlineAttributeExamples>>#textWithUnderlineDo|previewShow=#gtTextFor:|previewExpanded|previewHeight=100}}
"
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Text/BlCharacterText.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am a special type of {{gtClass:name=BlText}} with a guarantee that every item is a character.
I am a special type of `name=BlText` with a guarantee that every item is a character.
{{gtClass:name=BlCharacterText} is designed to be polymorphic with ${class:name=WideString}}, e.g. I can be compared with it (""text = string"" and ""string = text"").
Similar to the String I can not modified (insertion or deletions). Therefore
Expand Down
4 changes: 2 additions & 2 deletions src/Bloc-Text/BlText.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ I define a public API of the text model. User must only talk with me using provi
I only store string and corresponding attributes. I don't know anything about text layout or paragraphs. I should be used together with BrTextParagraph in order to be measured, layered out and rendered.
Once a piece of string is converted {{gtClass:name=BlText}} users must not make any assumption on the internat structure of that string inside of the text. For example I replace all occurrences of `CrLf` with a special marker that is exactly one item instead of two characters (`Cr` and `Lf`)
Once a piece of string is converted `name=BlText` users must not make any assumption on the internat structure of that string inside of the text. For example I replace all occurrences of `CrLf` with a special marker that is exactly one item instead of two characters (`Cr` and `Lf`)
I provide a fluent text styling api:
Expand All @@ -21,7 +21,7 @@ text
## Attributes
- {{gtClass:BlTextUnderlineAttribute}}
- `BlTextUnderlineAttribute`
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Text/BlTextAttributesCachingFinder.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"
#Text attributes cache
{{gtClass:BlText}} allows users to assign attributes on a text interval. In addition, it is important to to be able to query text attributes efficiently. The attributes cache is responsible for maintaining an association cache between text attributes and their corresponding interval in the text.
`BlText` allows users to assign attributes on a text interval. In addition, it is important to to be able to query text attributes efficiently. The attributes cache is responsible for maintaining an association cache between text attributes and their corresponding interval in the text.
"
Class {
#name : #BlTextAttributesCachingFinder,
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Text/BlTextDecorationStyle.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"
# Text decoration style
Describes the style of the text {{gtClass:BlTextDecoration|label=decoration}} (like {{gtClass:BlTextDecorationDashedStyle|label=dashed}}, {{gtClass:BlTextDecorationDottedStyle|label=dotted}}, {{gtClass:BlTextDecorationDoubleStyle|label=double}}, {{gtClass:BlTextDecorationSolidStyle|label=solid}}, {{gtClass:BlTextDecorationWavyStyle|label=wavy}}).
Describes the style of the text `BlTextDecoration|label=decoration` (like `BlTextDecorationDashedStyle|label=dashed`, `BlTextDecorationDottedStyle|label=dotted`, `BlTextDecorationDoubleStyle|label=double`, `BlTextDecorationSolidStyle|label=solid`, `BlTextDecorationWavyStyle|label=wavy`).
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Text/BlTextDelegatedAttributesBuilder.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am an extended version of the attributes builder with an ability to delegate the applying of attributes to the other stylable, which can be a {{gtClass:BlText}} or the other {{gtClass:BlTextAttributesBuilder}}
I am an extended version of the attributes builder with an ability to delegate the applying of attributes to the other stylable, which can be a `BlText` or the other `BlTextAttributesBuilder`
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Text/BlTextReadStream.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I offer API compatible with {{gtClass:ReadStream}}.
I offer API compatible with `ReadStream`.
"
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc/BlAlreadyAddedAsChildError.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am signalled when user tries to add an {{gtClass:BlElement}}, that is already added to some other element as its child, to some other element.
I am signalled when user tries to add an `BlElement`, that is already added to some other element as its child, to some other element.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc/BlAttachedSpaceReference.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"
# Attached space reference
Attached space reference {{gtClass:BlSpaceReference}} is set when an element is `attached` to the scene graph.
Attached space reference `BlSpaceReference` is set when an element is `attached` to the scene graph.
"
Class {
Expand Down
Loading

0 comments on commit 901f876

Please sign in to comment.