Skip to content

Commit

Permalink
Replace all {{gtMethod:X} to X
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchodias committed Feb 2, 2024
1 parent d506e13 commit 2ef0249
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 48 deletions.
6 changes: 3 additions & 3 deletions src/Bloc-DevTool/BlDevHalosEventListener.class.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"
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 `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 `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/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-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 `BlSpaceExamples`.
I evaluate create an icon on {{gtMethod:BlSpaceIconDummyStencil>>#asElement|label=#selector}} call.
I evaluate create an icon on `BlSpaceIconDummyStencil>>#asElement|label=#selector` call.
"
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Layout/BlFrameLayout.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 `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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"
I am a `BlBasicEventHandler`.
I am used by `BlDevScripter`.
I collect events into {{gtMethod:BlDevScripter>>#events}}.
I collect events into `BlDevScripter>>#events`.
"
Class {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
## 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 `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/BlBackground.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Background
I represent a background of the `BlElement`.
**I am immutable and can not be changed once created.** To modify the background, create a new instance and set it by sending {{gtMethod:BlElement>>#background:}}
**I am immutable and can not be changed once created.** To modify the background, create a new instance and set it by sending `BlElement>>#background:`
## Types of background
Expand Down
4 changes: 2 additions & 2 deletions src/Bloc/BlBasicShortcut.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Additionally, shortcut may provide its optional textual description and name.
All shortcuts of an element are stored in `BlShortcutRegistry` and matched / triggered by `BlShortcutHandler`
A shortcut can be added or removed from the element by using {{gtMethod:BlElement>>#addShortcut:}} or {{gtMethod:BlElement>>#removeShortcut:}} methods.
{{gtMethod:BlElement>>#shortcuts}} message can be sent to an element in order to access a list of all registered shortcuts.
A shortcut can be added or removed from the element by using `BlElement>>#addShortcut:` or `BlElement>>#removeShortcut:` methods.
`BlElement>>#shortcuts` message can be sent to an element in order to access a list of all registered shortcuts.
## Public API and Key Messages
- combination: get /set shortcut's key combination
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc/BlBeaconLoggingTask.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"
I use `Beacon` to log when a `BlTask` is scheduled and executed..
I emit `BlBeaconTaskSignal`.
I should be instantiated using {{gtMethod:BlBeaconLoggingTask class>>#subtask:}}.
I should be instantiated using `BlBeaconLoggingTask class>>#subtask:`.
"
Expand Down
16 changes: 8 additions & 8 deletions src/Bloc/BlChildren.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ I define a data structure independent API for iterating and accessing bloc eleme
## API
Subclasses need to overide the following abstract methods to provide access to the actual bloc elements:
- {{gtMethod:BlChildren>>#at:}}
- {{gtMethod:BlChildren>>#do:}}
- {{gtMethod:BlChildren>>#size}}
- `BlChildren>>#at:`
- `BlChildren>>#do:`
- `BlChildren>>#size`
Additionally, I provide an API for selecting only subsets of children, or iterating over them in a differen order, like:
- {{gtMethod:BlChildren>>#accountedByLayout}}
- {{gtMethod:BlChildren>>#ignoredByLayout}}
- {{gtMethod:BlChildren>>#reversed}}
- {{gtMethod:BlChildren>>#sortedByElevation}}
- `BlChildren>>#accountedByLayout`
- `BlChildren>>#ignoredByLayout`
- `BlChildren>>#reversed`
- `BlChildren>>#sortedByElevation`
Important API methods:
- {{gtMethod:BlChildren>>#asArray}}: returns an array with all the elements.
- `BlChildren>>#asArray`: returns an array with all the elements.
"
Class {
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc/BlChildrenArray.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
I am a holder that uses an immutable array to store children of bloc elements.
Every time a child is added or removed I create a new internal array to store children.
I optimize the method {{gtMethod:BlChildrenArray>>#asArray}} to directly return the internal array instead of creating a new one. In combination with other iterators that use this method (like `BlChildrenReversed`) it can reduce the number of arrays created during layout operations, expecially for graph layouts.
I optimize the method `BlChildrenArray>>#asArray` to directly return the internal array instead of creating a new one. In combination with other iterators that use this method (like `BlChildrenReversed`) it can reduce the number of arrays created during layout operations, expecially for graph layouts.
## Examples
Examples are provided by the class `BlChildrenArrayExamples`
Expand Down
6 changes: 3 additions & 3 deletions src/Bloc/BlChildrenSubset.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ The example below shows a scenario of combining multiple ways to iterate over ch
I do not enforce a lazy API. Subclasses can perform the filtering immediately or when iteration over children is required. I aim to maintain the composition of subsets while optimizing for speed whenever possible.
## API
Instances of me are created by calling the factory method {{gtMethod:BlChildrenSubset class>>#on:}} on a subclass with an instance of `BlChildren` as parameter.
Instances of me are created by calling the factory method `BlChildrenSubset class>>#on:` on a subclass with an instance of `BlChildren` as parameter.
Subclasses need to override the method {{gtMethod:BlChildrenSubset>>#subsetFrom:}} to filter the elements from the given `BlChildren` instance. This can perform no filtering, filter elements, or also change the order of elements.
Subclasses need to override the method `BlChildrenSubset>>#subsetFrom:` to filter the elements from the given `BlChildren` instance. This can perform no filtering, filter elements, or also change the order of elements.
## Implementation details
Internally the result of {{gtMethod:BlChildrenSubset>>#subsetFrom:}} is stored into an instance variable. This result is then used when accessing or iterating over elements. This decision was taken to allow iterators to perform work when the iterator is created and ensure a faster iteration.
Internally the result of `BlChildrenSubset>>#subsetFrom:` is stored into an instance variable. This result is then used when accessing or iterating over elements. This decision was taken to allow iterators to perform work when the iterator is created and ensure a faster iteration.
To preserve the composition of iterators I hold a reference to the initial `BlChildren` instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc/BlCustomEventHandler.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
I am a custom event handler. User must override me and implement {{gtMethod:BlBasicEventHandler>>#eventsToHandle}} to return a collection of event classes that I am interested in.
I am a custom event handler. User must override me and implement `BlBasicEventHandler>>#eventsToHandle` to return a collection of event classes that I am interested in.
Then for each interesting event a user should implement a corresponding event handling method. For example for `BlMouseDownEvent` it would be `mouseDownEvent:`
"
Expand Down
4 changes: 2 additions & 2 deletions src/Bloc/BlElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Bloc elements provide a set of methods to add and remove children.
### Adding children
There are four ways to add some given element as a direct child to another element.
The most commonly used way to add a child is to use {{gtMethod:BlElement>>#addChild:}} which adds a given element as the last child in the collection of children.
The most commonly used way to add a child is to use `BlElement>>#addChild:` which adds a given element as the last child in the collection of children.
```
| parent child |
parent := BlElement new size: 100@100; background: Color veryVeryLightGray.
child := BlElement new size: 50@50; background: Color red lighter.
parent addChild: child
```
Users may also choose to add an element as the first child, for that purpose Bloc provides {{gtMethod:BlElement>>#addChildFirst:}}.
Users may also choose to add an element as the first child, for that purpose Bloc provides `BlElement>>#addChildFirst:`.
## Geometry and bounds
Every element is responsible for drawing itself. At the same time, every element has a `BlElementGeometry` that defines the bounds and the clipping. There are many types of geometry available:
```
Expand Down
Loading

0 comments on commit 2ef0249

Please sign in to comment.