From 69dab6657dcfdb60037558d363c152f98434e5b8 Mon Sep 17 00:00:00 2001 From: Yann Le Goff Date: Thu, 1 Aug 2024 15:37:40 +0200 Subject: [PATCH] update strings to inputModel + fix the copy/paste plugin --- .../PyramidBackgroundBlocPlugin.class.st | 118 +++++++++--------- ...amidBackgroundStopsModalPresenter.class.st | 4 +- .../PyramidBlocLayoutPlugin.class.st | 64 +++++----- src/Pyramid-Bloc/PyramidBlocPlugin.class.st | 26 ++-- .../PyramidBlocTextPlugin.class.st | 16 +-- .../PyramidCopyPastePlugin.class.st | 65 ++++++---- .../PyramidCornerRadiiInputPresenter.class.st | 4 +- .../PyramidInsetsInputPresenter.class.st | 4 +- .../PyramidLibraryController.class.st | 2 +- .../PyramidNavigationDefaultColumns.class.st | 2 +- .../PyramidSwitchInputPresenter.class.st | 22 ++-- ...midMagicButtonsInputPresenterTest.class.st | 6 +- .../PyramidPropertiesManagerTest.class.st | 6 +- .../TPyramidInputPresenterTest.trait.st | 2 +- .../PyramidThemePropertyStrategy.class.st | 10 +- ...amidColorInputSingleLinePresenter.class.st | 16 ++- ...ngleLineWithPickupButtonPresenter.class.st | 4 +- .../PyramidDashArrayInputPresenter.class.st | 6 +- ...gs.class.st => PyramidInputModel.class.st} | 10 +- src/Pyramid/PyramidInputPresenter.class.st | 34 ++--- ...PyramidMagicButtonsInputPresenter.class.st | 8 +- src/Pyramid/PyramidModalInputModel.class.st | 27 ++++ src/Pyramid/PyramidModalInputStrings.class.st | 27 ---- .../PyramidNumberArrayInputPresenter.class.st | 6 +- .../PyramidNumberInputPresenter.class.st | 6 +- ...ass.st => PyramidPointInputModel.class.st} | 16 +-- .../PyramidPointInputPresenter.class.st | 16 +-- src/Pyramid/PyramidProperty.class.st | 40 +++--- ...ramidSinglePopingPresenterBuilder.class.st | 4 +- ...ss.st => PyramidSwitchInputModel.class.st} | 20 +-- .../PyramidTextInputPresenter.class.st | 6 +- 31 files changed, 305 insertions(+), 292 deletions(-) rename src/Pyramid/{PyramidInputStrings.class.st => PyramidInputModel.class.st} (53%) create mode 100644 src/Pyramid/PyramidModalInputModel.class.st delete mode 100644 src/Pyramid/PyramidModalInputStrings.class.st rename src/Pyramid/{PyramidPointInputStrings.class.st => PyramidPointInputModel.class.st} (50%) rename src/Pyramid/{PyramidSwitchInputStrings.class.st => PyramidSwitchInputModel.class.st} (52%) diff --git a/src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st b/src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st index efa43549..e2702d10 100644 --- a/src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st +++ b/src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st @@ -16,7 +16,7 @@ PyramidBackgroundBlocPlugin class >> backgroundImageSelector [ property := PyramidProperty new name: 'Background Image Selector'; command: PyramidBackgroundImageCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidBackgroundImageInputPresenter; yourself. ^ property @@ -29,9 +29,9 @@ PyramidBackgroundBlocPlugin class >> backgroundLinearEnd [ property := PyramidProperty new name: 'Background Linear End'; command: PyramidBackgroundPaintLinearEndCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the end of the linear gradient.'; labelX: 'x'; labelY: 'y'. @@ -45,10 +45,10 @@ PyramidBackgroundBlocPlugin class >> backgroundLinearGradientDirection [ property := PyramidProperty new name: 'Background Linear Direction'; command: PyramidBackgroundPaintLinearDirectionCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the direction of the linear gradient.'; labelX: 'Start'; labelY: 'End'. @@ -63,9 +63,9 @@ PyramidBackgroundBlocPlugin class >> backgroundLinearStart [ name: 'Background Linear Start'; command: PyramidBackgroundPaintLinearStartCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the start of the linear gradient.'; labelX: 'x'; labelY: 'y'. @@ -79,9 +79,9 @@ PyramidBackgroundBlocPlugin class >> backgroundOpacity [ property := PyramidProperty new name: 'Background Opacity'; command: PyramidBackgroundOpacityCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the opacity of the background.'. ^ property ] @@ -93,7 +93,7 @@ PyramidBackgroundBlocPlugin class >> backgroundPaintColor [ property := PyramidProperty new name: 'Background Paint Color'; command: PyramidBackgroundPaintColorCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidColorInputSingleLineWithPickupButtonPresenter; yourself. ^ property @@ -106,7 +106,7 @@ PyramidBackgroundBlocPlugin class >> backgroundPaintStops [ property := PyramidProperty new name: 'Background Paint Stops'; command: PyramidBackgroundPaintStopsCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidBackgroundStopsInputPresenter; yourself. ^ property @@ -119,10 +119,10 @@ PyramidBackgroundBlocPlugin class >> backgroundPaintType [ property := PyramidProperty new name: 'Background Paint Type'; command: PyramidBackgroundPaintCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #windowMaximize); helpSelected: 'The value is Solid.'; @@ -175,9 +175,9 @@ PyramidBackgroundBlocPlugin class >> backgroundRadialInnerCenter [ property := PyramidProperty new name: 'Background Radial Center In'; command: PyramidBackgroundPaintRadialInnerCenterCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the center of the inner radial gradient.'; labelX: 'x'; labelY: 'y'. @@ -192,9 +192,9 @@ PyramidBackgroundBlocPlugin class >> backgroundRadialInnerRadius [ name: 'Background Radial Radius In'; command: PyramidBackgroundPaintRadialInnerRadiusCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the center of the inner radius gradient.'. ^ property ] @@ -207,9 +207,9 @@ PyramidBackgroundBlocPlugin class >> backgroundRadialOuterCenter [ name: 'Background Radial Center Out'; command: PyramidBackgroundPaintRadialOuterCenterCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the center of the outer radial gradient.'; labelX: 'x'; labelY: 'y'. @@ -224,9 +224,9 @@ PyramidBackgroundBlocPlugin class >> backgroundRadialOuterRadius [ name: 'Background Radial Radius Out'; command: PyramidBackgroundPaintRadialOuterRadiusCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the center of the outer radius gradient.'. ^ property ] @@ -238,10 +238,10 @@ PyramidBackgroundBlocPlugin class >> backgroundType [ property := PyramidProperty new name: 'Background Type'; command: PyramidBackgroundTypeCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #uncheckedBox); helpSelected: 'The value is Transparent.'; @@ -278,9 +278,9 @@ PyramidBackgroundBlocPlugin class >> borderDashArray [ property := PyramidProperty new name: 'Border Dash Array'; command: PyramidBorderDashArrayCommand new; - pyramidInputPresenterClass: PyramidDashArrayInputPresenter; + inputPresenterClass: PyramidDashArrayInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the dash array.'. ^ property ] @@ -292,9 +292,9 @@ PyramidBackgroundBlocPlugin class >> borderDashOffset [ property := PyramidProperty new name: 'Border Dash Offset'; command: PyramidBorderDashOffsetCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the offset of the dash.'. ^ property ] @@ -306,10 +306,10 @@ PyramidBackgroundBlocPlugin class >> borderLineCap [ property := PyramidProperty new name: 'Border Line Cap'; command: PyramidBorderLineCapCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: ((Smalltalk ui icons iconNamed: #windowMenu) rotateBy: -45); helpSelected: 'The value is Butt.'; @@ -345,10 +345,10 @@ PyramidBackgroundBlocPlugin class >> borderLineJoin [ property := PyramidProperty new name: 'Border Line Join'; command: PyramidBorderLineJoinCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: ((Smalltalk ui icons iconNamed: #windowMenu) rotateBy: -45); helpSelected: 'The value is Bevel.'; @@ -384,9 +384,9 @@ PyramidBackgroundBlocPlugin class >> borderLinearEnd [ property := PyramidProperty new name: 'Border Linear End'; command: PyramidBorderPaintLinearDirectionEndCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the end of the linear gradient.'; labelX: 'x'; labelY: 'y'. @@ -401,9 +401,9 @@ PyramidBackgroundBlocPlugin class >> borderLinearGradientDirection [ name: 'Border Linear Direction'; command: PyramidBorderPaintLinearDirectionCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the direction of the linear gradient.'; labelX: 'Start'; labelY: 'End'. @@ -417,9 +417,9 @@ PyramidBackgroundBlocPlugin class >> borderLinearStart [ property := PyramidProperty new name: 'Border Linear Start'; command: PyramidBorderPaintLinearDirectionStartCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the start of the linear gradient.'; labelX: 'x'; labelY: 'y'. @@ -433,9 +433,9 @@ PyramidBackgroundBlocPlugin class >> borderMiterLimit [ property := PyramidProperty new name: 'Border Miter Limit'; command: PyramidBorderMiterLimitCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the miter limit of the border.'. ^ property ] @@ -447,9 +447,9 @@ PyramidBackgroundBlocPlugin class >> borderOpacity [ property := PyramidProperty new name: 'Border Opacity'; command: PyramidBorderOpacityCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the opacity of the border.'. ^ property ] @@ -461,7 +461,7 @@ PyramidBackgroundBlocPlugin class >> borderPaintColor [ property := PyramidProperty new name: 'Border Paint Color'; command: PyramidBorderPaintColorCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidColorInputSingleLineWithPickupButtonPresenter; yourself. ^ property @@ -474,7 +474,7 @@ PyramidBackgroundBlocPlugin class >> borderPaintStops [ property := PyramidProperty new name: 'Border Paint Stops'; command: PyramidBorderPaintStopsCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidBackgroundStopsInputPresenter; yourself. ^ property @@ -487,10 +487,10 @@ PyramidBackgroundBlocPlugin class >> borderPaintType [ property := PyramidProperty new name: 'Border Paint Type'; command: PyramidBorderPaintCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #windowMaximize); helpSelected: 'The value is Solid.'; @@ -547,9 +547,9 @@ PyramidBackgroundBlocPlugin class >> borderRadialInnerCenter [ name: 'Border Radial Center In'; command: PyramidBorderPaintRadialInnerCenterCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the center of the inner radial gradient.'; labelX: 'x'; labelY: 'y'. @@ -564,9 +564,9 @@ PyramidBackgroundBlocPlugin class >> borderRadialInnerRadius [ name: 'Border Radial Radius In'; command: PyramidBorderPaintRadialInnerRadiusCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the center of the inner radius gradient.'. ^ property ] @@ -579,9 +579,9 @@ PyramidBackgroundBlocPlugin class >> borderRadialOuterCenter [ name: 'Border Radial Center Out'; command: PyramidBorderPaintRadialOuterCenterCommand new; - pyramidInputPresenterClass: PyramidPointInputPresenter; + inputPresenterClass: PyramidPointInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel help: 'Define the center of the outer radial gradient.'; labelX: 'x'; labelY: 'y'. @@ -596,9 +596,9 @@ PyramidBackgroundBlocPlugin class >> borderRadialOuterRadius [ name: 'Border Radial Radius Out'; command: PyramidBorderPaintRadialOuterRadiusCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the center of the outer radius gradient.'. ^ property ] @@ -610,10 +610,10 @@ PyramidBackgroundBlocPlugin class >> borderWidth [ property := PyramidProperty new name: 'Border Width'; command: PyramidBorderWidthCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the width of the border.'. ^ property ] @@ -625,9 +625,9 @@ PyramidBackgroundBlocPlugin class >> opacity [ property := PyramidProperty new name: 'Element Opacity'; command: PyramidOpacityCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. - property pyramidInputPresenterStrings help: + property inputPresenterModel help: 'Define the opacity of the element.'. ^ property ] @@ -639,10 +639,10 @@ PyramidBackgroundBlocPlugin class >> outskirts [ property := PyramidProperty new name: 'Element Outskirts'; command: PyramidOutskirtsCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidMagicButtonsInputPresenter; yourself. - property pyramidInputPresenterStrings + property inputPresenterModel addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #menuPin); helpSelected: 'The value is Inside.'; diff --git a/src/Pyramid-Bloc/PyramidBackgroundStopsModalPresenter.class.st b/src/Pyramid-Bloc/PyramidBackgroundStopsModalPresenter.class.st index 1590f050..70ef96be 100644 --- a/src/Pyramid-Bloc/PyramidBackgroundStopsModalPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidBackgroundStopsModalPresenter.class.st @@ -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 | diff --git a/src/Pyramid-Bloc/PyramidBlocLayoutPlugin.class.st b/src/Pyramid-Bloc/PyramidBlocLayoutPlugin.class.st index 0def65d9..3495bd3f 100644 --- a/src/Pyramid-Bloc/PyramidBlocLayoutPlugin.class.st +++ b/src/Pyramid-Bloc/PyramidBlocLayoutPlugin.class.st @@ -17,7 +17,7 @@ PyramidBlocLayoutPlugin class >> constraintsBasicH [ name: 'Constraints - horizontal'; command: PyramidBasicHorizontalConstraintsBlocCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidBasicConstraintsInputPresenter; yourself. ^ property @@ -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 ] @@ -46,7 +46,7 @@ PyramidBlocLayoutPlugin class >> constraintsBasicV [ name: 'Constraints - vertical'; command: PyramidBasicVerticalConstraintsBlocCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidBasicConstraintsInputPresenter; yourself. ^ property @@ -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 ] @@ -74,7 +74,7 @@ PyramidBlocLayoutPlugin class >> constraintsFrameH [ property := PyramidProperty new name: 'Constraints - Frame - horizontal'; command: PyramidFrameHorizontalConstraintsCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidHorizontalFrameConstraintsInputPresenter; yourself. ^ property @@ -87,7 +87,7 @@ PyramidBlocLayoutPlugin class >> constraintsFrameV [ property := PyramidProperty new name: 'Constraints - Frame - vertical'; command: PyramidFrameVerticalConstraintsCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidVerticalFrameConstraintsInputPresenter; yourself. ^ property @@ -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'. @@ -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'. @@ -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 ] @@ -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 ] @@ -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.'; @@ -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 ] @@ -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.'.. @@ -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. @@ -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 ] diff --git a/src/Pyramid-Bloc/PyramidBlocPlugin.class.st b/src/Pyramid-Bloc/PyramidBlocPlugin.class.st index 8d606241..0e8b6e10 100644 --- a/src/Pyramid-Bloc/PyramidBlocPlugin.class.st +++ b/src/Pyramid-Bloc/PyramidBlocPlugin.class.st @@ -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 ] @@ -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. @@ -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 ] @@ -66,7 +66,7 @@ PyramidBlocPlugin class >> geometry [ property := PyramidProperty new name: 'Geometry'; command: PyramidGeometryCommand new; - pyramidInputPresenterClass: + inputPresenterClass: PyramidGeometryInputPresenter; yourself. ^ property @@ -79,7 +79,7 @@ PyramidBlocPlugin class >> visibility [ property := PyramidProperty new name: 'Visibility'; command: PyramidVisibilityCommand new; - pyramidInputPresenterClass: PyramidVisibilityInputPresenter; + inputPresenterClass: PyramidVisibilityInputPresenter; yourself. ^ property ] @@ -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 ] diff --git a/src/Pyramid-Bloc/PyramidBlocTextPlugin.class.st b/src/Pyramid-Bloc/PyramidBlocTextPlugin.class.st index 28cb89ca..da2ed208 100644 --- a/src/Pyramid-Bloc/PyramidBlocTextPlugin.class.st +++ b/src/Pyramid-Bloc/PyramidBlocTextPlugin.class.st @@ -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 ] @@ -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 ] @@ -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 ] @@ -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 ] diff --git a/src/Pyramid-Bloc/PyramidCopyPastePlugin.class.st b/src/Pyramid-Bloc/PyramidCopyPastePlugin.class.st index 4b69c85a..40d61f99 100644 --- a/src/Pyramid-Bloc/PyramidCopyPastePlugin.class.st +++ b/src/Pyramid-Bloc/PyramidCopyPastePlugin.class.st @@ -4,7 +4,7 @@ Class { #traits : 'TPyramidPlugin', #classTraits : 'TPyramidPlugin classTrait', #instVars : [ - 'projectModel' + 'editor' ], #category : #'Pyramid-Bloc-plugin-copy-paste' } @@ -20,7 +20,7 @@ PyramidCopyPastePlugin >> addPanelsOn: aPyramidSimpleWindow [ { #category : #connecting } PyramidCopyPastePlugin >> connectOn: aPyramidEditor [ - self projectModel: aPyramidEditor projectModel + self editor: aPyramidEditor. ] { #category : #copying } @@ -45,7 +45,7 @@ PyramidCopyPastePlugin >> copyAsStonMenu: aBuilder [ item icon: (Smalltalk ui icons iconNamed: #smallPaste); name: 'Paste'; - action: [ self pasteAsStonInClipboardOnRoots ]; + action: [ self pasteFromClipboardOnFirstLevelElements ]; yourself ]; yourself ] order: 20. @@ -57,13 +57,13 @@ PyramidCopyPastePlugin >> copyAsStonMenu: aBuilder [ item icon: (Smalltalk ui icons iconNamed: #smallCopy); name: 'Copy'; - action: [ self copyAsStonInClipboard: { single } ]; + action: [ self copyAsStonInClipboard: single ]; yourself ]; addItem: [ :item | item icon: (Smalltalk ui icons iconNamed: #smallPaste); name: 'Paste'; - action: [ self pasteAsStonInClipboard: single ]; + action: [ self pasteFromClipboardOnSelection: single ]; yourself ]; yourself ] order: 20. @@ -87,40 +87,53 @@ PyramidCopyPastePlugin >> copyAsStonMenu: aBuilder [ order: 20 ] -{ #category : #copying } -PyramidCopyPastePlugin >> pasteAsStonInClipboard: aBlElement [ +{ #category : #accessing } +PyramidCopyPastePlugin >> editor [ - | copiedElement | - [ copiedElement := BlSerializer materialize: Clipboard clipboardText ] - on: BlocMaterializationError - do: [ - UIManager default inform: 'Cannot paste the clipboard.'. - ^ self ]. - aBlElement addChildren: copiedElement. - self projectModel informElementsChanged + ^ editor +] + +{ #category : #accessing } +PyramidCopyPastePlugin >> editor: anObject [ + + editor := anObject ] { #category : #copying } -PyramidCopyPastePlugin >> pasteAsStonInClipboardOnRoots [ +PyramidCopyPastePlugin >> pasteFromClipboard: aBlock [ | copiedElement | - [ copiedElement := BlSerializer materialize: Clipboard clipboardText ] + [ + copiedElement := BlSerializer materialize: Clipboard clipboardText. + copiedElement isCollection ifFalse: [ + copiedElement := { copiedElement } ] ] on: BlocMaterializationError do: [ - UIManager default inform: 'Cannot paste the clipboard.'. + UIManager default inform: 'Cannot materialize the clipboard.'. + ^ self ]. + + [TBlSerializer verifyCollection: copiedElement] on: BlocSerializationError do: [ UIManager default inform: 'No BlElements in the clipboard.'. ^ self ]. - self projectModel firstLevelElements addAll: copiedElement. - self projectModel informFirstLevelElementsChanged + + aBlock value: copiedElement ] -{ #category : #accessing } -PyramidCopyPastePlugin >> projectModel [ +{ #category : #copying } +PyramidCopyPastePlugin >> pasteFromClipboardOnFirstLevelElements [ - ^ projectModel + self pasteFromClipboard: [ :copiedElement | self editor commandExecutor + use: PyramidAddAllToCollectionCommand new + on: { self editor projectModel firstLevelElements } + with: copiedElement ] + ] -{ #category : #accessing } -PyramidCopyPastePlugin >> projectModel: anObject [ +{ #category : #copying } +PyramidCopyPastePlugin >> pasteFromClipboardOnSelection: aBlElement [ - projectModel := anObject + self pasteFromClipboard: [ :copiedElement | + self editor commandExecutor + use: PyramidAddChildrenCommand new + on: self editor projectModel selection + with: copiedElement ] ] diff --git a/src/Pyramid-Bloc/PyramidCornerRadiiInputPresenter.class.st b/src/Pyramid-Bloc/PyramidCornerRadiiInputPresenter.class.st index 336be849..0e2380b1 100644 --- a/src/Pyramid-Bloc/PyramidCornerRadiiInputPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidCornerRadiiInputPresenter.class.st @@ -9,9 +9,9 @@ Class { } { #category : #'as yet unclassified' } -PyramidCornerRadiiInputPresenter >> applyStrings [ +PyramidCornerRadiiInputPresenter >> applyInputModel [ - self inputArray strings: self strings + self inputArray inputModel: self inputModel ] { #category : #'as yet unclassified' } diff --git a/src/Pyramid-Bloc/PyramidInsetsInputPresenter.class.st b/src/Pyramid-Bloc/PyramidInsetsInputPresenter.class.st index 8f94d482..5a6c632f 100644 --- a/src/Pyramid-Bloc/PyramidInsetsInputPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidInsetsInputPresenter.class.st @@ -9,9 +9,9 @@ Class { } { #category : #'as yet unclassified' } -PyramidInsetsInputPresenter >> applyStrings [ +PyramidInsetsInputPresenter >> applyInputModel [ - self inputArray strings: self strings. + self inputArray inputModel: self inputModel ] { #category : #layout } diff --git a/src/Pyramid-Bloc/PyramidLibraryController.class.st b/src/Pyramid-Bloc/PyramidLibraryController.class.st index c82099b4..067ab8e6 100644 --- a/src/Pyramid-Bloc/PyramidLibraryController.class.st +++ b/src/Pyramid-Bloc/PyramidLibraryController.class.st @@ -116,7 +116,7 @@ PyramidLibraryController >> openForRoot [ PyramidLibraryController >> openForSelection [ self addElementsBlock: [ :arrayOfElement | - self editor propertiesManager commandExecutor + self editor commandExecutor use: PyramidAddChildrenCommand new on: self editor projectModel selection with: arrayOfElement ]. diff --git a/src/Pyramid-Bloc/PyramidNavigationDefaultColumns.class.st b/src/Pyramid-Bloc/PyramidNavigationDefaultColumns.class.st index 664173d1..d9b4a106 100644 --- a/src/Pyramid-Bloc/PyramidNavigationDefaultColumns.class.st +++ b/src/Pyramid-Bloc/PyramidNavigationDefaultColumns.class.st @@ -84,7 +84,7 @@ PyramidNavigationDefaultColumns >> columnVisibility [ "self editor is present on the class that will recover the pragma . This class should be: PyramidNavigationTreePresenter." self editor ifNotNil: [ :e | - e propertiesManager commandExecutor + e commandExecutor use: PyramidVisibilityCommand new on: { aBlElement } with: aBlElement visibility nextVisibilityForTree ] ]; diff --git a/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st b/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st index f008e1a4..d0d9f35c 100644 --- a/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st @@ -164,16 +164,16 @@ PyramidSwitchInputPresenter class >> formToggleUncertain [ ] { #category : #accessing } -PyramidSwitchInputPresenter class >> stringsClass [ +PyramidSwitchInputPresenter class >> inputModelClass [ - ^ PyramidSwitchInputStrings + ^ PyramidSwitchInputModel ] { #category : #'as yet unclassified' } -PyramidSwitchInputPresenter >> applyStrings [ +PyramidSwitchInputPresenter >> applyInputModel [ - self button help: self strings help. - self button label: self strings offLabel + self button help: self inputModel help. + self button label: self inputModel offLabel ] { #category : #accessing } @@ -240,14 +240,16 @@ PyramidSwitchInputPresenter >> value: aBoolean [ self state: aBoolean. self button action: [ self switchState ]. aBoolean - ifTrue: [ self button icon: self class formToggleOn. - self button label: self strings onLabel ] - ifFalse: [ self button icon: self class formToggleOff. - self button label: self strings offLabel ]. + ifTrue: [ + self button icon: self class formToggleOn. + self button label: self inputModel onLabel ] + ifFalse: [ + self button icon: self class formToggleOff. + self button label: self inputModel offLabel ]. ^ self ]. self state: PyramidUnknowState new. self button icon: self class formToggleUncertain. - self button label: self strings uncertainLabel. + self button label: self inputModel uncertainLabel. self button action: [ ] ] diff --git a/src/Pyramid-Tests/PyramidMagicButtonsInputPresenterTest.class.st b/src/Pyramid-Tests/PyramidMagicButtonsInputPresenterTest.class.st index 65ddba88..d66c1eeb 100644 --- a/src/Pyramid-Tests/PyramidMagicButtonsInputPresenterTest.class.st +++ b/src/Pyramid-Tests/PyramidMagicButtonsInputPresenterTest.class.st @@ -28,14 +28,14 @@ PyramidMagicButtonsInputPresenterTest >> expectedMixedValues [ PyramidMagicButtonsInputPresenterTest >> makeNewInput [ ^ PyramidMagicButtonsInputPresenter new - strings: (PyramidMagicButtonsModel new + inputModel: (PyramidMagicButtonsModel new addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #smallOk); helpSelected: 'The value is ok.'; helpNotSelected: 'Set the value to ok.'; label: 'ok'; inputValue: #ok; - inputValidation: [ :val | val = #ok ]; + inputValidation: [ :val | val = #ok ]; yourself); addButtonModel: (PyramidMagicButtonModel new icon: (Smalltalk ui icons iconNamed: #smallCancel); @@ -43,7 +43,7 @@ PyramidMagicButtonsInputPresenterTest >> makeNewInput [ helpNotSelected: 'Set the value to cancel.'; label: 'cancel'; inputValue: #cancel; - inputValidation: [ :val | val = #cancel ]; + inputValidation: [ :val | val = #cancel ]; yourself); yourself); yourself diff --git a/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st b/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st index baaae46c..3bf3f8c4 100644 --- a/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st +++ b/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st @@ -63,17 +63,17 @@ PyramidPropertiesManagerTest >> setUp [ prop1 := PyramidProperty new name: 'Porp1'; command: PyramidSimpleMockCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. prop2 := PyramidProperty new name: 'Porp2'; command: PyramidSimpleMockCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. prop3 := PyramidProperty new name: 'Porp3'; command: PyramidSimpleMockCommand new; - pyramidInputPresenterClass: PyramidNumberInputPresenter; + inputPresenterClass: PyramidNumberInputPresenter; yourself. presenterStrategy := PyramidFakePropertyForTestStrategy new. diff --git a/src/Pyramid-Tests/TPyramidInputPresenterTest.trait.st b/src/Pyramid-Tests/TPyramidInputPresenterTest.trait.st index 9373bc0b..5998b484 100644 --- a/src/Pyramid-Tests/TPyramidInputPresenterTest.trait.st +++ b/src/Pyramid-Tests/TPyramidInputPresenterTest.trait.st @@ -40,7 +40,7 @@ TPyramidInputPresenterTest >> makeNewInputWithModel [ | input | input := self makeNewInput. - input strings: input class stringsClass new. + input inputModel: input class inputModelClass new. ^ input ] diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st index 59a0ac89..73f525f4 100644 --- a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -1,7 +1,7 @@ Class { #name : #PyramidThemePropertyStrategy, #superclass : #PyramidHideEmptyPropertyStrategy, - #category : 'Pyramid-Toplo-plugin-theme-management' + #category : #'Pyramid-Toplo-plugin-theme-management' } { #category : #'as yet unclassified' } @@ -37,9 +37,9 @@ PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ PyramidThemePropertyStrategy >> propertyForStamp: aStamp [ | property | - property := PyramidProperty new name: aStamp; command: (PyramidStampCommand new stamp: aStamp; yourself); pyramidInputPresenterClass: PyramidSwitchInputPresenter ; yourself. - property pyramidInputPresenterStrings onLabel: 'Has stamp'. - property pyramidInputPresenterStrings offLabel: 'Has not stamp'. - property pyramidInputPresenterStrings uncertainLabel: 'Uncertain'. + property := PyramidProperty new name: aStamp; command: (PyramidStampCommand new stamp: aStamp; yourself); inputPresenterClass: PyramidSwitchInputPresenter ; yourself. + property inputPresenterModel onLabel: 'Has stamp'. + property inputPresenterModel offLabel: 'Has not stamp'. + property inputPresenterModel uncertainLabel: 'Uncertain'. ^ property ] diff --git a/src/Pyramid/PyramidColorInputSingleLinePresenter.class.st b/src/Pyramid/PyramidColorInputSingleLinePresenter.class.st index 7e360de6..d8a415cb 100644 --- a/src/Pyramid/PyramidColorInputSingleLinePresenter.class.st +++ b/src/Pyramid/PyramidColorInputSingleLinePresenter.class.st @@ -7,7 +7,7 @@ Class { 'previewPresenter', 'whenValueChangedDo' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #accessing } @@ -17,10 +17,10 @@ PyramidColorInputSingleLinePresenter >> alphaInput [ ] { #category : #'as yet unclassified' } -PyramidColorInputSingleLinePresenter >> applyStrings [ +PyramidColorInputSingleLinePresenter >> applyInputModel [ - self alphaInput strings: self strings. - self hexInput strings: self strings + self alphaInput inputModel: self inputModel. + self hexInput inputModel: self inputModel ] { #category : #'as yet unclassified' } @@ -64,11 +64,15 @@ PyramidColorInputSingleLinePresenter >> initializePresenter [ whenValueChangedDo := [ :c | ]. hexInput := PyramidTextInputPresenter new value: 'FF0000'; - strings: (PyramidInputStrings new help: 'Set the color value as an hex.'); + inputModel: + (PyramidInputModel new help: + 'Set the color value as an hex.'); yourself. alphaInput := PyramidNumberInputPresenter new value: 100; - strings: (PyramidInputStrings new help:'Set the alpha value as a %.'); + inputModel: + (PyramidInputModel new help: + 'Set the alpha value as a %.'); yourself. previewPresenter := SpMorphPresenter new morph: Morph new; diff --git a/src/Pyramid/PyramidColorInputSingleLineWithPickupButtonPresenter.class.st b/src/Pyramid/PyramidColorInputSingleLineWithPickupButtonPresenter.class.st index 1555fb4c..e21c1b4c 100644 --- a/src/Pyramid/PyramidColorInputSingleLineWithPickupButtonPresenter.class.st +++ b/src/Pyramid/PyramidColorInputSingleLineWithPickupButtonPresenter.class.st @@ -7,13 +7,13 @@ Class { 'multiLinesInput', 'whenValueChangedDo' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #'as yet unclassified' } PyramidColorInputSingleLineWithPickupButtonPresenter >> applytStrings [ - self singleLineInput strings: self strings. + self singleLineInput inputModel: self inputModel ] { #category : #accessing } diff --git a/src/Pyramid/PyramidDashArrayInputPresenter.class.st b/src/Pyramid/PyramidDashArrayInputPresenter.class.st index f6681a39..6f33726f 100644 --- a/src/Pyramid/PyramidDashArrayInputPresenter.class.st +++ b/src/Pyramid/PyramidDashArrayInputPresenter.class.st @@ -5,13 +5,13 @@ Class { 'submitBlock', 'inputArray' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #'as yet unclassified' } -PyramidDashArrayInputPresenter >> applyStrings [ +PyramidDashArrayInputPresenter >> applyInputModel [ - self inputArray help: self strings help + self inputArray help: self inputModel help ] { #category : #'as yet unclassified' } diff --git a/src/Pyramid/PyramidInputStrings.class.st b/src/Pyramid/PyramidInputModel.class.st similarity index 53% rename from src/Pyramid/PyramidInputStrings.class.st rename to src/Pyramid/PyramidInputModel.class.st index 3c6c87c5..d84f9cf3 100644 --- a/src/Pyramid/PyramidInputStrings.class.st +++ b/src/Pyramid/PyramidInputModel.class.st @@ -1,26 +1,26 @@ Class { - #name : #PyramidInputStrings, + #name : #PyramidInputModel, #superclass : #Object, #instVars : [ 'help' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #accessing } -PyramidInputStrings >> help [ +PyramidInputModel >> help [ ^ help ] { #category : #accessing } -PyramidInputStrings >> help: anObject [ +PyramidInputModel >> help: anObject [ help := anObject ] { #category : #initialization } -PyramidInputStrings >> initialize [ +PyramidInputModel >> initialize [ help := '' ] diff --git a/src/Pyramid/PyramidInputPresenter.class.st b/src/Pyramid/PyramidInputPresenter.class.st index 07234de5..7d652b49 100644 --- a/src/Pyramid/PyramidInputPresenter.class.st +++ b/src/Pyramid/PyramidInputPresenter.class.st @@ -15,23 +15,23 @@ Class { #instVars : [ 'strings' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } -{ #category : #testing } -PyramidInputPresenter class >> isAbstract [ +{ #category : #accessing } +PyramidInputPresenter class >> inputModelClass [ - ^ self == PyramidInputPresenter + ^ PyramidInputModel ] -{ #category : #accessing } -PyramidInputPresenter class >> stringsClass [ +{ #category : #testing } +PyramidInputPresenter class >> isAbstract [ - ^ PyramidInputStrings + ^ self == PyramidInputPresenter ] { #category : #'as yet unclassified' } -PyramidInputPresenter >> applyStrings [ +PyramidInputPresenter >> applyInputModel [ ] @@ -42,23 +42,23 @@ PyramidInputPresenter >> emptyValue [ self value: PyramidEmptyValue new ] -{ #category : #'as yet unclassified' } -PyramidInputPresenter >> mixedValues [ - - self value: PyramidMixedValues new -] - { #category : #accessing } -PyramidInputPresenter >> strings [ +PyramidInputPresenter >> inputModel [ ^ strings ] { #category : #accessing } -PyramidInputPresenter >> strings: anObject [ +PyramidInputPresenter >> inputModel: anObject [ strings := anObject. - self applyStrings + self applyInputModel +] + +{ #category : #'as yet unclassified' } +PyramidInputPresenter >> mixedValues [ + + self value: PyramidMixedValues new ] { #category : #'as yet unclassified' } diff --git a/src/Pyramid/PyramidMagicButtonsInputPresenter.class.st b/src/Pyramid/PyramidMagicButtonsInputPresenter.class.st index 78aeeb53..db311cbd 100644 --- a/src/Pyramid/PyramidMagicButtonsInputPresenter.class.st +++ b/src/Pyramid/PyramidMagicButtonsInputPresenter.class.st @@ -13,19 +13,19 @@ Class { #classInstVars : [ 'whenValueChangedDo' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #deprecated } -PyramidMagicButtonsInputPresenter class >> stringsClass [ +PyramidMagicButtonsInputPresenter class >> inputModelClass [ ^ PyramidMagicButtonsModel ] { #category : #'as yet unclassified' } -PyramidMagicButtonsInputPresenter >> applyStrings [ +PyramidMagicButtonsInputPresenter >> applyInputModel [ - self strings buttonsModel do: [ :each | + self inputModel buttonsModel do: [ :each | self makeAssociatedButtonFor: each ]. self selectedIndex: 0. self setUnknowValue diff --git a/src/Pyramid/PyramidModalInputModel.class.st b/src/Pyramid/PyramidModalInputModel.class.st new file mode 100644 index 00000000..4a723ec2 --- /dev/null +++ b/src/Pyramid/PyramidModalInputModel.class.st @@ -0,0 +1,27 @@ +Class { + #name : #PyramidModalInputModel, + #superclass : #PyramidInputModel, + #instVars : [ + 'windowTitle' + ], + #category : #'Pyramid-specs-custom' +} + +{ #category : #initialization } +PyramidModalInputModel >> initialize [ + +super initialize. +windowTitle := '' +] + +{ #category : #accessing } +PyramidModalInputModel >> windowTitle [ + + ^ windowTitle +] + +{ #category : #accessing } +PyramidModalInputModel >> windowTitle: anObject [ + + windowTitle := anObject +] diff --git a/src/Pyramid/PyramidModalInputStrings.class.st b/src/Pyramid/PyramidModalInputStrings.class.st deleted file mode 100644 index 5dfc8a0a..00000000 --- a/src/Pyramid/PyramidModalInputStrings.class.st +++ /dev/null @@ -1,27 +0,0 @@ -Class { - #name : #PyramidModalInputStrings, - #superclass : #PyramidInputStrings, - #instVars : [ - 'windowTitle' - ], - #category : 'Pyramid-specs-custom' -} - -{ #category : #initialization } -PyramidModalInputStrings >> initialize [ - -super initialize. -windowTitle := '' -] - -{ #category : #accessing } -PyramidModalInputStrings >> windowTitle [ - - ^ windowTitle -] - -{ #category : #accessing } -PyramidModalInputStrings >> windowTitle: anObject [ - - windowTitle := anObject -] diff --git a/src/Pyramid/PyramidNumberArrayInputPresenter.class.st b/src/Pyramid/PyramidNumberArrayInputPresenter.class.st index cae0b377..4b5b4618 100644 --- a/src/Pyramid/PyramidNumberArrayInputPresenter.class.st +++ b/src/Pyramid/PyramidNumberArrayInputPresenter.class.st @@ -5,13 +5,13 @@ Class { 'submitBlock', 'inputArray' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #'as yet unclassified' } -PyramidNumberArrayInputPresenter >> applyStrings [ +PyramidNumberArrayInputPresenter >> applyInputModel [ - self inputArray help: self strings help + self inputArray help: self inputModel help ] { #category : #'as yet unclassified' } diff --git a/src/Pyramid/PyramidNumberInputPresenter.class.st b/src/Pyramid/PyramidNumberInputPresenter.class.st index a39df4d2..90c6be2e 100644 --- a/src/Pyramid/PyramidNumberInputPresenter.class.st +++ b/src/Pyramid/PyramidNumberInputPresenter.class.st @@ -8,13 +8,13 @@ Class { 'inputNumber', 'submitBlock' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #'as yet unclassified' } -PyramidNumberInputPresenter >> applyStrings [ +PyramidNumberInputPresenter >> applyInputModel [ - self inputNumber help: self strings help + self inputNumber help: self inputModel help ] { #category : #layout } diff --git a/src/Pyramid/PyramidPointInputStrings.class.st b/src/Pyramid/PyramidPointInputModel.class.st similarity index 50% rename from src/Pyramid/PyramidPointInputStrings.class.st rename to src/Pyramid/PyramidPointInputModel.class.st index 692431d8..38581c97 100644 --- a/src/Pyramid/PyramidPointInputStrings.class.st +++ b/src/Pyramid/PyramidPointInputModel.class.st @@ -1,15 +1,15 @@ Class { - #name : #PyramidPointInputStrings, - #superclass : #PyramidInputStrings, + #name : #PyramidPointInputModel, + #superclass : #PyramidInputModel, #instVars : [ 'labelX', 'labelY' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #initialization } -PyramidPointInputStrings >> initialize [ +PyramidPointInputModel >> initialize [ super initialize. labelX := 'x'. @@ -17,25 +17,25 @@ PyramidPointInputStrings >> initialize [ ] { #category : #accessing } -PyramidPointInputStrings >> labelX [ +PyramidPointInputModel >> labelX [ ^ labelX ] { #category : #accessing } -PyramidPointInputStrings >> labelX: anObject [ +PyramidPointInputModel >> labelX: anObject [ labelX := anObject ] { #category : #accessing } -PyramidPointInputStrings >> labelY [ +PyramidPointInputModel >> labelY [ ^ labelY ] { #category : #accessing } -PyramidPointInputStrings >> labelY: anObject [ +PyramidPointInputModel >> labelY: anObject [ labelY := anObject ] diff --git a/src/Pyramid/PyramidPointInputPresenter.class.st b/src/Pyramid/PyramidPointInputPresenter.class.st index 863b777a..679411d2 100644 --- a/src/Pyramid/PyramidPointInputPresenter.class.st +++ b/src/Pyramid/PyramidPointInputPresenter.class.st @@ -8,22 +8,22 @@ Class { 'labelX', 'labelY' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #accessing } -PyramidPointInputPresenter class >> stringsClass [ +PyramidPointInputPresenter class >> inputModelClass [ - ^ PyramidPointInputStrings + ^ PyramidPointInputModel ] { #category : #'as yet unclassified' } -PyramidPointInputPresenter >> applyStrings [ +PyramidPointInputPresenter >> applyInputModel [ - self inputX inputNumber help: self strings help. - self inputY inputNumber help: self strings help. - self labelX label: self strings labelX. - self labelY label: self strings labelY + self inputX inputNumber help: self inputModel help. + self inputY inputNumber help: self inputModel help. + self labelX label: self inputModel labelX. + self labelY label: self inputModel labelY ] { #category : #layout } diff --git a/src/Pyramid/PyramidProperty.class.st b/src/Pyramid/PyramidProperty.class.st index 907bba7c..3a46178b 100644 --- a/src/Pyramid/PyramidProperty.class.st +++ b/src/Pyramid/PyramidProperty.class.st @@ -4,10 +4,10 @@ Class { #instVars : [ 'command', 'commandExecutor', - 'pyramidInputPresenterClass', + 'inputPresenterClass', 'presenterBuilder', 'name', - 'pyramidInputPresenterStrings' + 'inputPresenterModel' ], #category : #'Pyramid-property' } @@ -52,50 +52,44 @@ PyramidProperty >> initialize [ ] { #category : #accessing } -PyramidProperty >> name [ - - ^ name -] - -{ #category : #accessing } -PyramidProperty >> name: anObject [ +PyramidProperty >> inputPresenterClass [ - name := anObject + ^ inputPresenterClass ] { #category : #accessing } -PyramidProperty >> presenterBuilder [ +PyramidProperty >> inputPresenterClass: anObject [ - ^ presenterBuilder + inputPresenterClass := anObject. + inputPresenterModel := anObject inputModelClass new ] { #category : #accessing } -PyramidProperty >> presenterBuilder: anObject [ +PyramidProperty >> inputPresenterModel [ - presenterBuilder := anObject + ^ inputPresenterModel ] { #category : #accessing } -PyramidProperty >> pyramidInputPresenterClass [ +PyramidProperty >> name [ - ^ pyramidInputPresenterClass + ^ name ] { #category : #accessing } -PyramidProperty >> pyramidInputPresenterClass: anObject [ +PyramidProperty >> name: anObject [ - pyramidInputPresenterClass := anObject. - self pyramidInputPresenterStrings: anObject stringsClass new + name := anObject ] { #category : #accessing } -PyramidProperty >> pyramidInputPresenterStrings [ +PyramidProperty >> presenterBuilder [ - ^ pyramidInputPresenterStrings + ^ presenterBuilder ] { #category : #accessing } -PyramidProperty >> pyramidInputPresenterStrings: anObject [ +PyramidProperty >> presenterBuilder: anObject [ - pyramidInputPresenterStrings := anObject + presenterBuilder := anObject ] diff --git a/src/Pyramid/PyramidSinglePopingPresenterBuilder.class.st b/src/Pyramid/PyramidSinglePopingPresenterBuilder.class.st index 17c8000e..17d6ce5a 100644 --- a/src/Pyramid/PyramidSinglePopingPresenterBuilder.class.st +++ b/src/Pyramid/PyramidSinglePopingPresenterBuilder.class.st @@ -165,8 +165,8 @@ PyramidSinglePopingPresenterBuilder >> layoutForLabel: aString input: anInput bu { #category : #'as yet unclassified' } PyramidSinglePopingPresenterBuilder >> makeNewInput [ - ^ self property pyramidInputPresenterClass new - strings: self property pyramidInputPresenterStrings; + ^ self property inputPresenterClass new + inputModel: self property inputPresenterModel; yourself ] diff --git a/src/Pyramid/PyramidSwitchInputStrings.class.st b/src/Pyramid/PyramidSwitchInputModel.class.st similarity index 52% rename from src/Pyramid/PyramidSwitchInputStrings.class.st rename to src/Pyramid/PyramidSwitchInputModel.class.st index f7c1c547..fb2b9546 100644 --- a/src/Pyramid/PyramidSwitchInputStrings.class.st +++ b/src/Pyramid/PyramidSwitchInputModel.class.st @@ -1,16 +1,16 @@ Class { - #name : #PyramidSwitchInputStrings, - #superclass : #PyramidInputStrings, + #name : #PyramidSwitchInputModel, + #superclass : #PyramidInputModel, #instVars : [ 'onLabel', 'offLabel', 'uncertainLabel' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #initialization } -PyramidSwitchInputStrings >> initialize [ +PyramidSwitchInputModel >> initialize [ super initialize. onLabel := ''. @@ -19,37 +19,37 @@ PyramidSwitchInputStrings >> initialize [ ] { #category : #accessing } -PyramidSwitchInputStrings >> offLabel [ +PyramidSwitchInputModel >> offLabel [ ^ offLabel ] { #category : #accessing } -PyramidSwitchInputStrings >> offLabel: anObject [ +PyramidSwitchInputModel >> offLabel: anObject [ offLabel := anObject ] { #category : #accessing } -PyramidSwitchInputStrings >> onLabel [ +PyramidSwitchInputModel >> onLabel [ ^ onLabel ] { #category : #accessing } -PyramidSwitchInputStrings >> onLabel: anObject [ +PyramidSwitchInputModel >> onLabel: anObject [ onLabel := anObject ] { #category : #accessing } -PyramidSwitchInputStrings >> uncertainLabel [ +PyramidSwitchInputModel >> uncertainLabel [ ^ uncertainLabel ] { #category : #accessing } -PyramidSwitchInputStrings >> uncertainLabel: anObject [ +PyramidSwitchInputModel >> uncertainLabel: anObject [ uncertainLabel := anObject ] diff --git a/src/Pyramid/PyramidTextInputPresenter.class.st b/src/Pyramid/PyramidTextInputPresenter.class.st index 81f20676..384cda61 100644 --- a/src/Pyramid/PyramidTextInputPresenter.class.st +++ b/src/Pyramid/PyramidTextInputPresenter.class.st @@ -8,13 +8,13 @@ Class { #instVars : [ 'textInput' ], - #category : 'Pyramid-specs-custom' + #category : #'Pyramid-specs-custom' } { #category : #'as yet unclassified' } -PyramidTextInputPresenter >> applyStrings [ +PyramidTextInputPresenter >> applyInputModel [ - self textInput help: self strings help + self textInput help: self inputModel help ] { #category : #layout }