Skip to content

Commit

Permalink
update strings to inputModel + fix the copy/paste plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyan11 committed Aug 1, 2024
1 parent bb413b6 commit 69dab66
Show file tree
Hide file tree
Showing 31 changed files with 305 additions and 292 deletions.
118 changes: 59 additions & 59 deletions src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ PyramidBackgroundStopsModalPresenter >> initializePresenters [
yourself.
colorInput := PyramidColorInputSingleLineWithPickupButtonPresenter
new.
positionInput := PyramidNumberInputPresenter new strings:
(PyramidInputStrings new help:
positionInput := PyramidNumberInputPresenter new inputModel:
(PyramidInputModel new help:
'Set the position of the color in the gradiant (generally between 0 and 1).').
tableStops := SpTablePresenter new
whenSelectedItemChangedDo: [ :stop |
Expand Down
64 changes: 32 additions & 32 deletions src/Pyramid-Bloc/PyramidBlocLayoutPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PyramidBlocLayoutPlugin class >> constraintsBasicH [
name: 'Constraints - horizontal';
command:
PyramidBasicHorizontalConstraintsBlocCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidBasicConstraintsInputPresenter;
yourself.
^ property
Expand All @@ -31,9 +31,9 @@ PyramidBlocLayoutPlugin class >> constraintsBasicHExact [
name: 'Constraints - width';
command:
PyramidBasicExactHorizontalConstraintsBlocCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the width of the object'.
^ property
]
Expand All @@ -46,7 +46,7 @@ PyramidBlocLayoutPlugin class >> constraintsBasicV [
name: 'Constraints - vertical';
command:
PyramidBasicVerticalConstraintsBlocCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidBasicConstraintsInputPresenter;
yourself.
^ property
Expand All @@ -60,9 +60,9 @@ PyramidBlocLayoutPlugin class >> constraintsBasicVExact [
name: 'Constraints - height';
command:
PyramidBasicExactVerticalConstraintsBlocCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the height of the object'.
^ property
]
Expand All @@ -74,7 +74,7 @@ PyramidBlocLayoutPlugin class >> constraintsFrameH [
property := PyramidProperty new
name: 'Constraints - Frame - horizontal';
command: PyramidFrameHorizontalConstraintsCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidHorizontalFrameConstraintsInputPresenter;
yourself.
^ property
Expand All @@ -87,7 +87,7 @@ PyramidBlocLayoutPlugin class >> constraintsFrameV [
property := PyramidProperty new
name: 'Constraints - Frame - vertical';
command: PyramidFrameVerticalConstraintsCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidVerticalFrameConstraintsInputPresenter;
yourself.
^ property
Expand All @@ -101,9 +101,9 @@ PyramidBlocLayoutPlugin class >> constraintsPropH [
name: 'Constraints - horizontal';
command:
PyramidProportionnalHorizontalConstraintsCommand new;
pyramidInputPresenterClass: PyramidPointInputPresenter;
inputPresenterClass: PyramidPointInputPresenter;
yourself.
property pyramidInputPresenterStrings
property inputPresenterModel
help: 'Define the proportion of the horizontal component.';
labelX: 'Left';
labelY: 'Right'.
Expand All @@ -118,9 +118,9 @@ PyramidBlocLayoutPlugin class >> constraintsPropV [
name: 'Constraints - vertical';
command:
PyramidProportionnalVerticalConstraintsCommand new;
pyramidInputPresenterClass: PyramidPointInputPresenter;
inputPresenterClass: PyramidPointInputPresenter;
yourself.
property pyramidInputPresenterStrings
property inputPresenterModel
help: 'Define the proportion of the vertical component.';
labelX: 'Top';
labelY: 'Bottom'.
Expand All @@ -134,9 +134,9 @@ PyramidBlocLayoutPlugin class >> constraintsWeight [
property := PyramidProperty new
name: 'Constraints - weight';
command: PyramidWeightConstraintsCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Define the weight of the element to compute its size. The constraints must be "matchParent" to have an effect.'.
^ property
]
Expand All @@ -149,14 +149,14 @@ PyramidBlocLayoutPlugin class >> flowLayoutOrientation [
name: 'Flow - Orientation';
command:
PyramidLayoutChangeOrientationForFlowCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidFlowLayoutOrientationPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the orientation of the flow layout.'.
property pyramidInputPresenterStrings onLabel: 'Vertical'.
property pyramidInputPresenterStrings offLabel: 'Horizontal'.
property pyramidInputPresenterStrings uncertainLabel: 'Uncertain'.
property inputPresenterModel onLabel: 'Vertical'.
property inputPresenterModel offLabel: 'Horizontal'.
property inputPresenterModel uncertainLabel: 'Uncertain'.
^ property
]

Expand All @@ -167,10 +167,10 @@ PyramidBlocLayoutPlugin class >> layout [
property := PyramidProperty new
name: 'Layout Type';
command: PyramidLayoutBlocCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidMagicButtonsInputPresenter;
yourself.
property pyramidInputPresenterStrings
property inputPresenterModel
addButtonModel: (PyramidMagicButtonModel new
icon: (Smalltalk ui icons iconNamed: #radioButtonUnselected);
helpSelected: 'The element have no layout.';
Expand Down Expand Up @@ -222,14 +222,14 @@ PyramidBlocLayoutPlugin class >> linearLayoutOrientation [
name: 'Linear - Orientation';
command:
PyramidLayoutChangeOrientationForLinearCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidLinearLayoutOrientationPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the orientation of the linear layout.'.
property pyramidInputPresenterStrings onLabel: 'Vertical'.
property pyramidInputPresenterStrings offLabel: 'Horizontal'.
property pyramidInputPresenterStrings uncertainLabel: 'Uncertain'.
property inputPresenterModel onLabel: 'Vertical'.
property inputPresenterModel offLabel: 'Horizontal'.
property inputPresenterModel uncertainLabel: 'Uncertain'.
^ property
]

Expand All @@ -240,9 +240,9 @@ PyramidBlocLayoutPlugin class >> margin [
property := PyramidProperty new
name: 'Margin';
command: PyramidMarginCommand new;
pyramidInputPresenterClass: PyramidInsetsInputPresenter;
inputPresenterClass: PyramidInsetsInputPresenter;
yourself.
property pyramidInputPresenterStrings help: 'Change the margin. The margin will affect the space between the border and the elements outside. For example:
property inputPresenterModel help: 'Change the margin. The margin will affect the space between the border and the elements outside. For example:
- "10" to set a margin of 10 px on each size.
- "10 20" to set a margin of 10 px on the top and bottom and 20 px on the right and left.
- "10 20 30 40" to set a margin of 10 px on top, 20 px on left, 30 px on bottom and 40 px on right.'..
Expand All @@ -256,9 +256,9 @@ PyramidBlocLayoutPlugin class >> padding [
property := PyramidProperty new
name: 'Padding';
command: PyramidPaddingCommand new;
pyramidInputPresenterClass: PyramidInsetsInputPresenter;
inputPresenterClass: PyramidInsetsInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the padding. The padding will affect the space between the border and the elements inside. For example:
- "10" to set a padding of 10 px on each size.
- "10 20" to set a padding of 10 px on the top and bottom and 20 px on the right and left.
Expand All @@ -273,9 +273,9 @@ PyramidBlocLayoutPlugin class >> position [
property := PyramidProperty new
name: 'Position';
command: PyramidPositionCommand new;
pyramidInputPresenterClass: PyramidPointInputPresenter;
inputPresenterClass: PyramidPointInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Set the position x and y of the element inside his parent.'.
^ property
]
Expand Down
26 changes: 13 additions & 13 deletions src/Pyramid-Bloc/PyramidBlocPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ PyramidBlocPlugin class >> clipChildren [
property := PyramidProperty new
name: 'Clip Children';
command: PyramidClipChildrenCommand new;
pyramidInputPresenterClass: PyramidSwitchInputPresenter;
inputPresenterClass: PyramidSwitchInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'If clipChildren is true, the children will not display outside the geometry of the parent element. If clipChildren is false, the children will display outside the geometry of the parent element.'.
property pyramidInputPresenterStrings onLabel: 'True'.
property pyramidInputPresenterStrings offLabel: 'False'.
property pyramidInputPresenterStrings uncertainLabel: 'Uncertain'.
property inputPresenterModel onLabel: 'True'.
property inputPresenterModel offLabel: 'False'.
property inputPresenterModel uncertainLabel: 'Uncertain'.
^ property
]

Expand All @@ -35,10 +35,10 @@ PyramidBlocPlugin class >> cornerRadii [
property := PyramidProperty new
name: 'Corner radius';
command: PyramidRoundedRectangleCornerRadiiCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidCornerRadiiInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the corner radius of the geometry. For example:
- "10" to set a radius of 10 px on each corner.
- "10 20" to set a radius of 10 px on the top-left and bottom-right corner and 20 px on the top-right and bottom-left corner.
Expand All @@ -53,9 +53,9 @@ PyramidBlocPlugin class >> elementId [
property := PyramidProperty new
name: 'Element ID';
command: PyramidElementIdCommand new;
pyramidInputPresenterClass: PyramidTextInputPresenter;
inputPresenterClass: PyramidTextInputPresenter;
yourself.
property pyramidInputPresenterStrings help: 'Change the id.'.
property inputPresenterModel help: 'Change the id.'.
^ property
]

Expand All @@ -66,7 +66,7 @@ PyramidBlocPlugin class >> geometry [
property := PyramidProperty new
name: 'Geometry';
command: PyramidGeometryCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidGeometryInputPresenter;
yourself.
^ property
Expand All @@ -79,7 +79,7 @@ PyramidBlocPlugin class >> visibility [
property := PyramidProperty new
name: 'Visibility';
command: PyramidVisibilityCommand new;
pyramidInputPresenterClass: PyramidVisibilityInputPresenter;
inputPresenterClass: PyramidVisibilityInputPresenter;
yourself.
^ property
]
Expand All @@ -91,9 +91,9 @@ PyramidBlocPlugin class >> zIndex [
property := PyramidProperty new
name: 'Elevation';
command: PyramidZIndexCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the elevation (#zIndex:). Bloc will used the elevation to determine wich of two sibling must be draw on top. The higher zIndex will be drawn on top of the lesser one.'.
^ property
]
Expand Down
16 changes: 8 additions & 8 deletions src/Pyramid-Bloc/PyramidBlocTextPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ PyramidBlocTextPlugin class >> changeText [
property := PyramidProperty new
name: 'Text';
command: PyramidChangeTextCommand new;
pyramidInputPresenterClass: PyramidTextInputPresenter;
inputPresenterClass: PyramidTextInputPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the value of the text'.
^ property
]
Expand All @@ -27,9 +27,9 @@ PyramidBlocTextPlugin class >> fontSize [
property := PyramidProperty new
name: 'Font size';
command: PyramidFontSizeCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help: 'Change the font size.'.
property inputPresenterModel help: 'Change the font size.'.
^ property
]

Expand All @@ -40,9 +40,9 @@ PyramidBlocTextPlugin class >> fontWeight [
property := PyramidProperty new
name: 'Font weight';
command: PyramidFontWeightCommand new;
pyramidInputPresenterClass: PyramidNumberInputPresenter;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property pyramidInputPresenterStrings help: 'Change the font weight.'.
property inputPresenterModel help: 'Change the font weight.'.
^ property
]

Expand All @@ -53,10 +53,10 @@ PyramidBlocTextPlugin class >> textForeground [
property := PyramidProperty new
name: 'Text foreground';
command: PyramidTextForegroundCommand new;
pyramidInputPresenterClass:
inputPresenterClass:
PyramidColorInputSingleLineWithPickupButtonPresenter;
yourself.
property pyramidInputPresenterStrings help:
property inputPresenterModel help:
'Change the color of the text'.
^ property
]
Expand Down
Loading

0 comments on commit 69dab66

Please sign in to comment.