From eac293fc72f965aad3ca987932705d21ad2a715b Mon Sep 17 00:00:00 2001 From: DEMAREY Christophe Date: Wed, 5 Jun 2024 10:54:00 +0200 Subject: [PATCH] move to Tonel v3 --- .../BaselineOfInteractions.class.st | 9 +- src/BaselineOfInteractions/package.st | 2 +- .../ITConfirmationPresenterTest.class.st | 19 +- .../ITInformationPresenterTest.class.st | 17 +- .../ITItemChooserPresenterTest.class.st | 17 +- src/Interactions-Widgets-Tests/package.st | 2 +- .../ITConfirmationPresenter.class.st | 11 +- .../ITInformationPresenter.class.st | 21 +- .../ITItemsChooserPresenter.class.st | 45 ++-- .../SpecUIManager.class.st | 9 +- src/Interactions-Widgets/package.st | 2 +- src/Interactions/ITConfirmation.class.st | 37 ++-- src/Interactions/ITFileRequest.class.st | 33 +-- src/Interactions/ITInformation.class.st | 17 +- src/Interactions/ITNotification.class.st | 17 +- .../ITProgressNotification.class.st | 15 +- src/Interactions/ITRequest.class.st | 25 +-- src/Interactions/ITUIChoice.class.st | 15 +- src/Interactions/ITUserInteraction.class.st | 15 +- src/Interactions/UIManager2.class.st | 199 +++++++++--------- src/Interactions/package.st | 2 +- 21 files changed, 273 insertions(+), 256 deletions(-) diff --git a/src/BaselineOfInteractions/BaselineOfInteractions.class.st b/src/BaselineOfInteractions/BaselineOfInteractions.class.st index 88b5832..e3d324b 100644 --- a/src/BaselineOfInteractions/BaselineOfInteractions.class.st +++ b/src/BaselineOfInteractions/BaselineOfInteractions.class.st @@ -1,10 +1,11 @@ Class { - #name : #BaselineOfInteractions, - #superclass : #BaselineOf, - #category : #BaselineOfInteractions + #name : 'BaselineOfInteractions', + #superclass : 'BaselineOf', + #category : 'BaselineOfInteractions', + #package : 'BaselineOfInteractions' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfInteractions >> baseline: spec [ diff --git a/src/BaselineOfInteractions/package.st b/src/BaselineOfInteractions/package.st index 48ace88..702b644 100644 --- a/src/BaselineOfInteractions/package.st +++ b/src/BaselineOfInteractions/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfInteractions } +Package { #name : 'BaselineOfInteractions' } diff --git a/src/Interactions-Widgets-Tests/ITConfirmationPresenterTest.class.st b/src/Interactions-Widgets-Tests/ITConfirmationPresenterTest.class.st index 8e9d04d..4f19083 100644 --- a/src/Interactions-Widgets-Tests/ITConfirmationPresenterTest.class.st +++ b/src/Interactions-Widgets-Tests/ITConfirmationPresenterTest.class.st @@ -1,24 +1,25 @@ Class { - #name : #ITConfirmationPresenterTest, - #superclass : #TestCase, + #name : 'ITConfirmationPresenterTest', + #superclass : 'TestCase', #instVars : [ 'presenter', 'window' ], - #category : #'Interactions-Widgets-Tests' + #category : 'Interactions-Widgets-Tests', + #package : 'Interactions-Widgets-Tests' } -{ #category : #running } +{ #category : 'running' } ITConfirmationPresenterTest >> setUp [ presenter := ITConfirmationPresenter on: ITConfirmation example ] -{ #category : #running } +{ #category : 'running' } ITConfirmationPresenterTest >> tearDown [ window close ] -{ #category : #tests } +{ #category : 'tests' } ITConfirmationPresenterTest >> testDialogHasThreeButtons [ "yes no cancel" window := presenter openDialogWithSpec. @@ -28,7 +29,7 @@ ITConfirmationPresenterTest >> testDialogHasThreeButtons [ equals: 3. ] -{ #category : #tests } +{ #category : 'tests' } ITConfirmationPresenterTest >> testGetFalseWhenClickingOnFalseButton [ | answer | window := presenter openDialogWithSpec. @@ -39,7 +40,7 @@ ITConfirmationPresenterTest >> testGetFalseWhenClickingOnFalseButton [ equals: false ] -{ #category : #tests } +{ #category : 'tests' } ITConfirmationPresenterTest >> testGetInteractionCancelledExceptionWhenClickingOnCancelButton [ window := presenter openDialogWithSpec. self @@ -47,7 +48,7 @@ ITConfirmationPresenterTest >> testGetInteractionCancelledExceptionWhenClickingO raise: SpInteractionCancelled. ] -{ #category : #tests } +{ #category : 'tests' } ITConfirmationPresenterTest >> testGetTrueWhenClickingOnTrueButton [ | answer | window := presenter openDialogWithSpec. diff --git a/src/Interactions-Widgets-Tests/ITInformationPresenterTest.class.st b/src/Interactions-Widgets-Tests/ITInformationPresenterTest.class.st index d3d1f97..a50907a 100644 --- a/src/Interactions-Widgets-Tests/ITInformationPresenterTest.class.st +++ b/src/Interactions-Widgets-Tests/ITInformationPresenterTest.class.st @@ -1,26 +1,27 @@ Class { - #name : #ITInformationPresenterTest, - #superclass : #TestCase, + #name : 'ITInformationPresenterTest', + #superclass : 'TestCase', #instVars : [ 'presenter', 'window', 'information' ], - #category : #'Interactions-Widgets-Tests' + #category : 'Interactions-Widgets-Tests', + #package : 'Interactions-Widgets-Tests' } -{ #category : #running } +{ #category : 'running' } ITInformationPresenterTest >> setUp [ information := ITInformation example. presenter := ITInformationPresenter on: information. ] -{ #category : #running } +{ #category : 'running' } ITInformationPresenterTest >> tearDown [ window close ] -{ #category : #tests } +{ #category : 'tests' } ITInformationPresenterTest >> testDialogHasOnlyOkButton [ window := presenter openDialogWithSpec. @@ -32,7 +33,7 @@ ITInformationPresenterTest >> testDialogHasOnlyOkButton [ equals: 'Ok'. ] -{ #category : #tests } +{ #category : 'tests' } ITInformationPresenterTest >> testInformationMessageIsSet [ window := presenter openDialogWithSpec. @@ -41,7 +42,7 @@ ITInformationPresenterTest >> testInformationMessageIsSet [ equals: information message ] -{ #category : #tests } +{ #category : 'tests' } ITInformationPresenterTest >> testInformationTitleIsSet [ window := presenter openDialogWithSpec. diff --git a/src/Interactions-Widgets-Tests/ITItemChooserPresenterTest.class.st b/src/Interactions-Widgets-Tests/ITItemChooserPresenterTest.class.st index 7d6605c..851d001 100644 --- a/src/Interactions-Widgets-Tests/ITItemChooserPresenterTest.class.st +++ b/src/Interactions-Widgets-Tests/ITItemChooserPresenterTest.class.st @@ -2,21 +2,22 @@ An ITCollectionChooserTest is a test class for testing the behavior of ITCollectionChooser " Class { - #name : #ITItemChooserPresenterTest, - #superclass : #TestCase, + #name : 'ITItemChooserPresenterTest', + #superclass : 'TestCase', #instVars : [ 'presenter', 'window' ], - #category : #'Interactions-Widgets-Tests' + #category : 'Interactions-Widgets-Tests', + #package : 'Interactions-Widgets-Tests' } -{ #category : #running } +{ #category : 'running' } ITItemChooserPresenterTest >> setUp [ presenter := ITItemsChooserPresenter new ] -{ #category : #tests } +{ #category : 'tests' } ITItemChooserPresenterTest >> testItemSelectedWhenSelectItemAndTriggerOkButton [ presenter model: #(1 2 3 4 5 6). presenter tablePresenter selectIndex: 2. @@ -27,19 +28,19 @@ ITItemChooserPresenterTest >> testItemSelectedWhenSelectItemAndTriggerOkButton [ self assert: presenter selectedItem equals: 2. ] -{ #category : #tests } +{ #category : 'tests' } ITItemChooserPresenterTest >> testPresenterIsCancelledWhenOkActionTriggerred [ presenter openDialogWithSpec triggerCancelAction. self assert: presenter isCancelled ] -{ #category : #tests } +{ #category : 'tests' } ITItemChooserPresenterTest >> testPresenterIsNotCancelledWhenOkActionTriggerred [ presenter openDialogWithSpec triggerOkAction. self deny: presenter isCancelled ] -{ #category : #tests } +{ #category : 'tests' } ITItemChooserPresenterTest >> testSelectionIsNilWhenSelectItemAndTriggerCancelButton [ presenter model: #(1 2 3 4 5 6). presenter tablePresenter selectIndex: 2. diff --git a/src/Interactions-Widgets-Tests/package.st b/src/Interactions-Widgets-Tests/package.st index 574bdb1..2df7230 100644 --- a/src/Interactions-Widgets-Tests/package.st +++ b/src/Interactions-Widgets-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Interactions-Widgets-Tests' } +Package { #name : 'Interactions-Widgets-Tests' } diff --git a/src/Interactions-Widgets/ITConfirmationPresenter.class.st b/src/Interactions-Widgets/ITConfirmationPresenter.class.st index 70ed799..e6e86ee 100644 --- a/src/Interactions-Widgets/ITConfirmationPresenter.class.st +++ b/src/Interactions-Widgets/ITConfirmationPresenter.class.st @@ -3,17 +3,18 @@ I ask the user a confirmation of its intent. I open myself in a dialog box. " Class { - #name : #ITConfirmationPresenter, - #superclass : #ITInformationPresenter, - #category : #'Interactions-Widgets' + #name : 'ITConfirmationPresenter', + #superclass : 'ITInformationPresenter', + #category : 'Interactions-Widgets', + #package : 'Interactions-Widgets' } -{ #category : #example } +{ #category : 'example' } ITConfirmationPresenter class >> example [ (self on: ITConfirmation example) openDialogWithSpec ] -{ #category : #private } +{ #category : 'private' } ITConfirmationPresenter >> icon [ ^ (self iconNamed: #question) magnifyBy: 2 ] diff --git a/src/Interactions-Widgets/ITInformationPresenter.class.st b/src/Interactions-Widgets/ITInformationPresenter.class.st index e5e153e..bc7c706 100644 --- a/src/Interactions-Widgets/ITInformationPresenter.class.st +++ b/src/Interactions-Widgets/ITInformationPresenter.class.st @@ -3,16 +3,17 @@ I notify the user of different kind of information: alert, abort, accessDenied. I open myself in a dialog box. " Class { - #name : #ITInformationPresenter, - #superclass : #SpPresenterWithModel, + #name : 'ITInformationPresenter', + #superclass : 'SpPresenterWithModel', #instVars : [ 'iconPresenter', 'messageText' ], - #category : #'Interactions-Widgets' + #category : 'Interactions-Widgets', + #package : 'Interactions-Widgets' } -{ #category : #specs } +{ #category : 'specs' } ITInformationPresenter class >> defaultSpec [ ^ SpBoxLayout newHorizontal add: #iconPresenter width: 150; @@ -20,12 +21,12 @@ ITInformationPresenter class >> defaultSpec [ yourself ] -{ #category : #example } +{ #category : 'example' } ITInformationPresenter class >> example [ (self on: ITInformation example) openDialogWithSpec ] -{ #category : #private } +{ #category : 'private' } ITInformationPresenter >> icon [ self model type = #abort ifTrue: [ ^ (self iconNamed: #stop) magnifyBy: 5 ]. @@ -36,13 +37,13 @@ ITInformationPresenter >> icon [ ^ self iconNamed: #blank ] -{ #category : #initialization } +{ #category : 'initialization' } ITInformationPresenter >> initialExtent [ ^ (self currentWorld extent x / 2) @ 200 ] -{ #category : #initialization } +{ #category : 'initialization' } ITInformationPresenter >> initializePresenters [ iconPresenter := self newImage image: self icon; @@ -53,13 +54,13 @@ ITInformationPresenter >> initializePresenters [ yourself. ] -{ #category : #initialization } +{ #category : 'initialization' } ITInformationPresenter >> initializeWindow: aWindowPresenter [ super initializeWindow: aWindowPresenter. aWindowPresenter title: self model title ] -{ #category : #private } +{ #category : 'private' } ITInformationPresenter >> messageText [ ^ messageText ] diff --git a/src/Interactions-Widgets/ITItemsChooserPresenter.class.st b/src/Interactions-Widgets/ITItemsChooserPresenter.class.st index 6aa70b7..0c1e7ee 100644 --- a/src/Interactions-Widgets/ITItemsChooserPresenter.class.st +++ b/src/Interactions-Widgets/ITItemsChooserPresenter.class.st @@ -13,8 +13,8 @@ selectedItems return a collection of Item " Class { - #name : #ITItemsChooserPresenter, - #superclass : #SpPresenter, + #name : 'ITItemsChooserPresenter', + #superclass : 'SpPresenter', #instVars : [ 'tablePresenter', 'stringColumnDisplayBlock', @@ -26,17 +26,18 @@ Class { #classVars : [ 'Columns' ], - #category : #'Interactions-Widgets' + #category : 'Interactions-Widgets', + #package : 'Interactions-Widgets' } -{ #category : #specs } +{ #category : 'specs' } ITItemsChooserPresenter class >> defaultSpec [ ^ SpBoxLayout newVertical add: #tablePresenter; yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ITItemsChooserPresenter class >> example [ | presenter | presenter := ITItemsChooserPresenter openOn: (1 to: 10). @@ -46,7 +47,7 @@ ITItemsChooserPresenter class >> example [ presenter selectedItem inspect ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ITItemsChooserPresenter class >> exampleMultiSelection [ | presenter | presenter := ITItemsChooserPresenter new @@ -60,7 +61,7 @@ ITItemsChooserPresenter class >> exampleMultiSelection [ presenter selectedItems inspect ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ITItemsChooserPresenter class >> exampleSingleSelection [ | presenter | presenter := ITItemsChooserPresenter new @@ -74,19 +75,19 @@ ITItemsChooserPresenter class >> exampleSingleSelection [ presenter selectedItem inspect ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } ITItemsChooserPresenter class >> initialize [ Columns := { SpStringTableColumn title: 'name' evaluated: [:item | item asString ] } ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ITItemsChooserPresenter class >> openOn: aCollection [ ^ self openOn: aCollection withDisplayBlock: [ :item | item asString ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ITItemsChooserPresenter class >> openOn: aCollection withDisplayBlock: aDisplayBlock [ | presenter | presenter := self new. @@ -97,7 +98,7 @@ ITItemsChooserPresenter class >> openOn: aCollection withDisplayBlock: aDisplayB ^ presenter ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> beMultipleSelection [ isMultiSelection := true. self @@ -106,7 +107,7 @@ ITItemsChooserPresenter >> beMultipleSelection [ (SpStringTableColumn evaluated: [ :item | item asString ])} ] -{ #category : #private } +{ #category : 'private' } ITItemsChooserPresenter >> checkBoxColumn [ ^ (SpCheckBoxTableColumn evaluated: [ :item | selectedItems includes: item ]) @@ -115,12 +116,12 @@ ITItemsChooserPresenter >> checkBoxColumn [ width: 30 ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> columns: aCollectionOfColumn [ tablePresenter columns: aCollectionOfColumn ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> displayBlock: aDisplayBlock [ isMultiSelection ifTrue: [ self @@ -131,14 +132,14 @@ ITItemsChooserPresenter >> displayBlock: aDisplayBlock [ [ self columns: {(self newStringTableColumnEvaluated: aDisplayBlock)} ] ] -{ #category : #initialization } +{ #category : 'initialization' } ITItemsChooserPresenter >> initialize [ super initialize. selectedItems := OrderedCollection new. isMultiSelection := false ] -{ #category : #initialization } +{ #category : 'initialization' } ITItemsChooserPresenter >> initializeWidgets [ columns := Columns. tablePresenter := self newTable. @@ -146,35 +147,35 @@ ITItemsChooserPresenter >> initializeWidgets [ tablePresenter selectIndex: 1 ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> isCancelled [ ^ self window isCancelled ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> model: aCollection [ tablePresenter items: aCollection. items := aCollection copy ] -{ #category : #private } +{ #category : 'private' } ITItemsChooserPresenter >> newStringTableColumnEvaluated: aDisplayBlock [ ^ SpStringTableColumn evaluated: aDisplayBlock ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> selectedItem [ ^ self isCancelled ifTrue: [ nil ] ifFalse: [ tablePresenter selection selectedItem ] ] -{ #category : #api } +{ #category : 'api' } ITItemsChooserPresenter >> selectedItems [ ^ selectedItems ] -{ #category : #accessing } +{ #category : 'accessing' } ITItemsChooserPresenter >> tablePresenter [ ^ tablePresenter ] diff --git a/src/Interactions-Widgets/SpecUIManager.class.st b/src/Interactions-Widgets/SpecUIManager.class.st index efcbc47..de7dd39 100644 --- a/src/Interactions-Widgets/SpecUIManager.class.st +++ b/src/Interactions-Widgets/SpecUIManager.class.st @@ -1,10 +1,11 @@ Class { - #name : #SpecUIManager, - #superclass : #UIManager, - #category : #'Interactions-Widgets' + #name : 'SpecUIManager', + #superclass : 'UIManager', + #category : 'Interactions-Widgets', + #package : 'Interactions-Widgets' } -{ #category : #'ui requests' } +{ #category : 'ui requests' } SpecUIManager >> inform: anITInformation [ ^ (ITInformationPresenter on: anITInformation) openDialogWithSpec ] diff --git a/src/Interactions-Widgets/package.st b/src/Interactions-Widgets/package.st index f1a162a..ad55c11 100644 --- a/src/Interactions-Widgets/package.st +++ b/src/Interactions-Widgets/package.st @@ -1 +1 @@ -Package { #name : #'Interactions-Widgets' } +Package { #name : 'Interactions-Widgets' } diff --git a/src/Interactions/ITConfirmation.class.st b/src/Interactions/ITConfirmation.class.st index 198643f..1c59a48 100644 --- a/src/Interactions/ITConfirmation.class.st +++ b/src/Interactions/ITConfirmation.class.st @@ -4,8 +4,8 @@ I can be canceled, approved or denied. My actions labels can be customized. " Class { - #name : #ITConfirmation, - #superclass : #ITUserInteraction, + #name : 'ITConfirmation', + #superclass : 'ITUserInteraction', #instVars : [ 'cancelLabel', 'cancelBlock', @@ -13,10 +13,11 @@ Class { 'trueLabel', 'defaultChoice' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #example } +{ #category : 'example' } ITConfirmation class >> example [ ^ self new message: 'I''m a reification of a confirmation to be delivered to the user'; @@ -24,22 +25,22 @@ ITConfirmation class >> example [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> cancelBlock: aBlock [ cancelBlock := aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> cancelLabel [ ^ cancelLabel ifNil: [ cancelLabel := 'cancel' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> cancelLabel: aString [ cancelLabel := aString ] -{ #category : #action } +{ #category : 'action' } ITConfirmation >> confirm [ ^ UIManager default confirm: message @@ -49,17 +50,17 @@ ITConfirmation >> confirm [ default: self defaultChoice ] -{ #category : #action } +{ #category : 'action' } ITConfirmation >> confirmWithCancelBlock [ ^ UIManager default confirm: message orCancel: cancelBlock ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> defaultChoice [ ^ defaultChoice ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> defaultChoice: aSymbol [ #(#true #false #nil) detect: aSymbol ifNone: [ self error: aSymbol, ' is not a valid choice!' ]. @@ -67,37 +68,37 @@ ITConfirmation >> defaultChoice: aSymbol [ defaultChoice := aSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> noLabel [ ^ falseLabel ifNil: [ falseLabel := 'no' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> noLabel: aString [ falseLabel := aString ] -{ #category : #action } +{ #category : 'action' } ITConfirmation >> proceed [ ^ UIManager default proceed: message title: title ] -{ #category : #action } +{ #category : 'action' } ITConfirmation >> question [ ^ UIManager default question: message title: title ] -{ #category : #action } +{ #category : 'action' } ITConfirmation >> questionWithoutCancel [ ^ UIManager default questionWithoutCancel: message title: title ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> yesLabel [ ^ trueLabel ifNil: [ trueLabel := 'yes' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITConfirmation >> yesLabel: aString [ trueLabel := aString ] diff --git a/src/Interactions/ITFileRequest.class.st b/src/Interactions/ITFileRequest.class.st index f0316c9..eb14842 100644 --- a/src/Interactions/ITFileRequest.class.st +++ b/src/Interactions/ITFileRequest.class.st @@ -6,8 +6,8 @@ look at FDFileDialogPresenter clas >> #fullExample " Class { - #name : #ITFileRequest, - #superclass : #Object, + #name : 'ITFileRequest', + #superclass : 'Object', #instVars : [ 'previewer', 'columns', @@ -17,10 +17,11 @@ Class { 'filtersCustomization', 'extensionString' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #example } +{ #category : 'example' } ITFileRequest class >> example [ ITFileRequest new "previewer: ;" @@ -33,12 +34,12 @@ ITFileRequest class >> example [ chooseDirectory ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> bookmarks: aCollectionOfBookmark [ bookmarks := aCollectionOfBookmark ] -{ #category : #action } +{ #category : 'action' } ITFileRequest >> chooseDirectory [ " model := ITFileRequest new. @@ -51,7 +52,7 @@ ITFileRequest >> chooseDirectory [ ^ fileDialog confirm ] -{ #category : #action } +{ #category : 'action' } ITFileRequest >> chooseFile [ | fileDialog | fileDialog := FDOpenFileDialog new. @@ -59,24 +60,24 @@ ITFileRequest >> chooseFile [ ^ fileDialog confirm ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> columns: aCollectionOfColumn [ columns := aCollectionOfColumn ] -{ #category : #private } +{ #category : 'private' } ITFileRequest >> commonActionFor: fileDialog [ self configureFileDialog: fileDialog. fileDialog openModalWithSpec ] -{ #category : #action } +{ #category : 'action' } ITFileRequest >> configurationForSaveFileDialog: fileDialog [ extensionString ifNotNil: [ fileDialog extension: extensionString ]. self commonActionFor: fileDialog ] -{ #category : #setup } +{ #category : 'setup' } ITFileRequest >> configureFileDialog: fileDialog [ "I do this because fileDialog have default value" @@ -89,28 +90,28 @@ ITFileRequest >> configureFileDialog: fileDialog [ ifNotNil: [ fileDialog filtersCustomization: filtersCustomization ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> defaultFolder: aFileReference [ defaultFolder := aFileReference ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> filtersCustomization: aCollectionOfFilter [ filtersCustomization := aCollectionOfFilter ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> okAction: aBlockUseByTheOkButton [ "this block take one argument , a FileReference" okAction := aBlockUseByTheOkButton ] -{ #category : #accessing } +{ #category : 'accessing' } ITFileRequest >> previewer: aPreviewer [ previewer := aPreviewer ] -{ #category : #action } +{ #category : 'action' } ITFileRequest >> saveFile [ | fileDialog | fileDialog := FDSaveFileDialog new. diff --git a/src/Interactions/ITInformation.class.st b/src/Interactions/ITInformation.class.st index e2de17c..9bc5841 100644 --- a/src/Interactions/ITInformation.class.st +++ b/src/Interactions/ITInformation.class.st @@ -5,15 +5,16 @@ I can be configured to be an information of different types: abort, access denie I'm used by the UIManager to show (or not, dependending on the interaction mode) a UI corrresponding to this model. " Class { - #name : #ITInformation, - #superclass : #ITUserInteraction, + #name : 'ITInformation', + #superclass : 'ITUserInteraction', #instVars : [ 'type' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #example } +{ #category : 'example' } ITInformation class >> example [ ^ self new message: 'I''m a reification of an information to be delivered to the user'; @@ -22,25 +23,25 @@ ITInformation class >> example [ yourself ] -{ #category : #configuring } +{ #category : 'configuring' } ITInformation >> beAbort [ type := #abort. title ifNil: [ title := 'Error' translated ] ] -{ #category : #configuring } +{ #category : 'configuring' } ITInformation >> beAccessDenied [ type := #deny. title ifNil: [ title := 'Access Denied' translated ] ] -{ #category : #configuring } +{ #category : 'configuring' } ITInformation >> beAlert [ type := #alert. title ifNil: [ title := 'Alert!' translated ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITInformation >> type [ ^ type ] diff --git a/src/Interactions/ITNotification.class.st b/src/Interactions/ITNotification.class.st index 986fa94..f85166e 100644 --- a/src/Interactions/ITNotification.class.st +++ b/src/Interactions/ITNotification.class.st @@ -3,38 +3,39 @@ I notify user by sending notifications that display a few seconds, then disappea You can configure an action to execute when there is a click on the notification widget. " Class { - #name : #ITNotification, - #superclass : #Object, + #name : 'ITNotification', + #superclass : 'Object', #instVars : [ 'message', 'clickAction' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #example } +{ #category : 'example' } ITNotification class >> example [ ^ self new message: 'A simple notification'; yourself ] -{ #category : #accessing } +{ #category : 'accessing' } ITNotification >> clickAction [ ^ clickAction ] -{ #category : #accessing } +{ #category : 'accessing' } ITNotification >> clickAction: aBlock [ clickAction := aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } ITNotification >> message [ ^ message ] -{ #category : #accessing } +{ #category : 'accessing' } ITNotification >> message: aString [ message := aString ] diff --git a/src/Interactions/ITProgressNotification.class.st b/src/Interactions/ITProgressNotification.class.st index 7bddaae..cb4cba2 100644 --- a/src/Interactions/ITProgressNotification.class.st +++ b/src/Interactions/ITProgressNotification.class.st @@ -2,16 +2,17 @@ I notify the user of the progress of the current action. " Class { - #name : #ITProgressNotification, - #superclass : #Object, + #name : 'ITProgressNotification', + #superclass : 'Object', #instVars : [ 'string', 'block' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #accessing } +{ #category : 'accessing' } ITProgressNotification >> block: aBlock [ " aBlock could be this @@ -22,17 +23,17 @@ ITProgressNotification >> block: aBlock [ block := aBlock ] -{ #category : #action } +{ #category : 'action' } ITProgressNotification >> informUserDuring [ ^ UIManager default informUser: string during: block ] -{ #category : #action } +{ #category : 'action' } ITProgressNotification >> informUserDuringBlock [ ^ UIManager default informUserDuring: block ] -{ #category : #accessing } +{ #category : 'accessing' } ITProgressNotification >> string: aString [ string := aString ] diff --git a/src/Interactions/ITRequest.class.st b/src/Interactions/ITRequest.class.st index 2ad7e29..2c4ecf5 100644 --- a/src/Interactions/ITRequest.class.st +++ b/src/Interactions/ITRequest.class.st @@ -1,44 +1,45 @@ Class { - #name : #ITRequest, - #superclass : #ITUserInteraction, + #name : 'ITRequest', + #superclass : 'ITUserInteraction', #instVars : [ 'initialAnswer', 'validationBlock', 'answerHeight', 'entryCompletion' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #accessing } +{ #category : 'accessing' } ITRequest >> answerHeight: anInteger [ answerHeight := anInteger. ] -{ #category : #accessing } +{ #category : 'accessing' } ITRequest >> entryCompletion: anEntryCompletion [ entryCompletion := anEntryCompletion ] -{ #category : #accessing } +{ #category : 'accessing' } ITRequest >> initialAnswer: aString [ initialAnswer := aString ] -{ #category : #private } +{ #category : 'private' } ITRequest >> isValid: answer [ ^ validationBlock isNil or: [ (validationBlock value: answer) not ] ] -{ #category : #action } +{ #category : 'action' } ITRequest >> multiLineRequest [ ^ UIManager default multiLineRequest: message initialAnswer: initialAnswer answerHeight: answerHeight ] -{ #category : #action } +{ #category : 'action' } ITRequest >> request [ | answer | [ answer := UIManager default @@ -49,12 +50,12 @@ ITRequest >> request [ ^ answer ] -{ #category : #action } +{ #category : 'action' } ITRequest >> requestPassword [ UIManager default requestPassword: message ] -{ #category : #action } +{ #category : 'action' } ITRequest >> requestWithEntryCompletion [ ^ UIManager default request: message @@ -62,7 +63,7 @@ ITRequest >> requestWithEntryCompletion [ entryCompletion: entryCompletion ] -{ #category : #accessing } +{ #category : 'accessing' } ITRequest >> validationBlock: aBlock [ validationBlock := aBlock ] diff --git a/src/Interactions/ITUIChoice.class.st b/src/Interactions/ITUIChoice.class.st index 285fc66..b29ec94 100644 --- a/src/Interactions/ITUIChoice.class.st +++ b/src/Interactions/ITUIChoice.class.st @@ -3,31 +3,32 @@ I represent an interaction where I ask the user to choose between different valu Values are provided with a collection of objects. " Class { - #name : #ITUIChoice, - #superclass : #ITUserInteraction, + #name : 'ITUIChoice', + #superclass : 'ITUserInteraction', #instVars : [ 'items', 'displayBlock' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #accessing } +{ #category : 'accessing' } ITUIChoice >> displayBlock: aBlock [ displayBlock := aBlock ] -{ #category : #initialization } +{ #category : 'initialization' } ITUIChoice >> initialize [ displayBlock := [ :item | item name ] ] -{ #category : #accessing } +{ #category : 'accessing' } ITUIChoice >> items: aCollection [ items := aCollection ] -{ #category : #running } +{ #category : 'running' } ITUIChoice >> run [ UIManager default chooseFrom: (displayBlock value: items) diff --git a/src/Interactions/ITUserInteraction.class.st b/src/Interactions/ITUserInteraction.class.st index 827def7..ef1c19c 100644 --- a/src/Interactions/ITUserInteraction.class.st +++ b/src/Interactions/ITUserInteraction.class.st @@ -5,31 +5,32 @@ I factorize some common information of my hierarchy. My subclasses are used by the UIManager to show (or not, dependending on the interaction mode) a UI corrresponding to this model. " Class { - #name : #ITUserInteraction, - #superclass : #Object, + #name : 'ITUserInteraction', + #superclass : 'Object', #instVars : [ 'message', 'title' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #accessing } +{ #category : 'accessing' } ITUserInteraction >> message [ ^ message ] -{ #category : #accessing } +{ #category : 'accessing' } ITUserInteraction >> message: anObject [ message := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } ITUserInteraction >> title [ ^ title ] -{ #category : #accessing } +{ #category : 'accessing' } ITUserInteraction >> title: anObject [ title := anObject ] diff --git a/src/Interactions/UIManager2.class.st b/src/Interactions/UIManager2.class.st index ebd2f9d..81c8db8 100644 --- a/src/Interactions/UIManager2.class.st +++ b/src/Interactions/UIManager2.class.st @@ -1,13 +1,14 @@ Class { - #name : #UIManager2, - #superclass : #Object, + #name : 'UIManager2', + #superclass : 'Object', #classVars : [ 'Default' ], - #category : #Interactions + #category : 'Interactions', + #package : 'Interactions' } -{ #category : #initialization } +{ #category : 'initialization' } UIManager2 class >> default [ ^ Default ifNil: [ @@ -18,7 +19,7 @@ UIManager2 class >> default [ Default ] ] -{ #category : #initialization } +{ #category : 'initialization' } UIManager2 class >> default: aUIManager [ Default ifNotNil: [ :mgr | mgr deactivate ]. @@ -26,7 +27,7 @@ UIManager2 class >> default: aUIManager [ Default activate ] -{ #category : #initialization } +{ #category : 'initialization' } UIManager2 class >> forCurrentSystemConfiguration [ ^(self allSubclasses detect: [ :any | @@ -35,20 +36,20 @@ UIManager2 class >> forCurrentSystemConfiguration [ ifNone: [ NonInteractiveUIManager ]) new ] -{ #category : #initialization } +{ #category : 'initialization' } UIManager2 class >> isActiveManager [ "Answer whether I should act as the active UI manager." ^false ] -{ #category : #testing } +{ #category : 'testing' } UIManager2 class >> isValidForCurrentSystemConfiguration [ ^false ] -{ #category : #utilities } +{ #category : 'utilities' } UIManager2 class >> nonInteractiveDuring: aBlock [ | currentManager | currentManager := self default. @@ -57,39 +58,39 @@ UIManager2 class >> nonInteractiveDuring: aBlock [ aBlock ensure: [ currentManager beDefault ] ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> abort: aStringOrText [ "Open an error dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> abort: aStringOrText title: aString [ "Open an error dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #private } +{ #category : 'private' } UIManager2 >> activate [ ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> alert: aStringOrText [ "Open an alert dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> alert: aStringOrText title: aString [ "Open an alert dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> alert: aStringOrText title: aString configure: aBlock [ "Open an alert dialog. Configure the dialog with the 1 argument block before opening modally." @@ -97,41 +98,41 @@ UIManager2 >> alert: aStringOrText title: aString configure: aBlock [ ^self subclassResponsibility ] -{ #category : #private } +{ #category : 'private' } UIManager2 >> beDefault [ self class default: self ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseDirectory [ "Let the user choose a directory." ^self chooseDirectoryFrom: FileSystem workingDirectory ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseDirectory: label [ "Let the user choose a directory." ^self chooseDirectory: label from: FileSystem workingDirectory ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseDirectory: label from: dir [ "Let the user choose a directory." ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseDirectoryFrom: dir [ "Let the user choose a directory" ^self chooseDirectory: nil from: dir ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList [ "Choose an item from the given list. Answer the index of the selected item." @@ -139,7 +140,7 @@ UIManager2 >> chooseFrom: aList [ ^ self chooseFrom: aList lines: #() ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList lines: linesArray [ "Choose an item from the given list. Answer the index of the selected item." @@ -147,7 +148,7 @@ UIManager2 >> chooseFrom: aList lines: linesArray [ ^ self chooseFrom: aList lines: linesArray title: '' ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList lines: linesArray message: messageString [ "Choose an item from the given list. Answer the index of the selected item." @@ -159,7 +160,7 @@ UIManager2 >> chooseFrom: aList lines: linesArray message: messageString [ title: '' ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList lines: linesArray message: messageString title: aString [ "Choose an item from the given list. Answer the selected item." @@ -173,7 +174,7 @@ UIManager2 >> chooseFrom: aList lines: linesArray message: messageString title: ifNotEmpty: [ aString , String cr , messageString ]) ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList lines: linesArray title: aString [ "Choose an item from the given list. Answer the index of the selected item." @@ -181,7 +182,7 @@ UIManager2 >> chooseFrom: aList lines: linesArray title: aString [ ^ self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList message: messageString [ "Choose an item from the given list. Answer the index of the selected item." @@ -189,7 +190,7 @@ UIManager2 >> chooseFrom: aList message: messageString [ ^ self chooseFrom: aList lines: #() message: messageString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList message: messageString title: aString [ "Choose an item from the given list. Answer the index of the selected item." @@ -201,7 +202,7 @@ UIManager2 >> chooseFrom: aList message: messageString title: aString [ title: aString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList title: aString [ "Choose an item from the given list. Answer the index of the selected item." @@ -209,28 +210,28 @@ UIManager2 >> chooseFrom: aList title: aString [ ^ self chooseFrom: aList lines: #() title: aString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: labelList values: valueList [ "Choose an item from the given list. Answer the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: labelList values: valueList lines: #() ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: labelList values: valueList lines: linesArray [ "Choose an item from the given list. Answer the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: labelList values: valueList lines: linesArray title: '' ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList values: valueList lines: linesArray message: messageString [ "Choose an item from the given list. Answer the index of the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: aList values: valueList lines: linesArray message: messageString title: '' ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: labelList values: valueList lines: linesArray message: messageString title: aString [ "Choose an item from the given list. Answer the selected item." self deprecated: 'store into ' , ITUIChoice className. @@ -243,55 +244,55 @@ UIManager2 >> chooseFrom: labelList values: valueList lines: linesArray message: ifNotEmpty: [ aString, String cr, messageString ]) ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: labelList values: valueList lines: linesArray title: aString [ "Choose an item from the given list. Answer the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList values: valueList message: messageString [ "Choose an item from the given list. Answer the index of the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: aList values: valueList lines: #() message: messageString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: aList values: valueList message: messageString title: aString [ "Choose an item from the given list. Answer the index of the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: aList values: valueList lines: #() message: messageString title: aString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFrom: labelList values: valueList title: aString [ "Choose an item from the given list. Answer the selected item." self deprecated: 'store into ' , ITUIChoice className. ^self chooseFrom: labelList values: valueList lines: #() title: aString ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFullFileNameMatching: patterns [ "Let the user choose a file matching the given patterns" ^self chooseFullFileNameMatching: patterns label: nil ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseFullFileNameMatching: patterns label: labelString [ "Let the user choose a file matching the given patterns" ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> chooseOrRequestFrom: labelList values: valueList lines: linesArray title: aString [ ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: queryString [ "Put up a yes/no menu with caption queryString. Answer true if the response is yes, false if no. This is a modal question--the user must @@ -300,13 +301,13 @@ UIManager2 >> confirm: queryString [ ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: queryString label: titleString [ self deprecated: 'store into ' , ITConfirmation className. ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: queryString label: title trueChoice: trueChoice falseChoice: falseChoice cancelChoice: cancelChoice default: defaultOption [ "Put up a yes/no/cancel menu with caption queryString. The actual wording for the choices will be as provided in the trueChoice, falseChoice and cancelChoice parameters. defaultOption should be one of true, false or nil to set the default button. @@ -316,7 +317,7 @@ UIManager2 >> confirm: queryString label: title trueChoice: trueChoice falseChoi ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: aString orCancel: cancelBlock [ "Put up a yes/no/cancel menu with caption aString. Answer true if the response is yes, false if no. If cancel is chosen, evaluate @@ -325,7 +326,7 @@ UIManager2 >> confirm: aString orCancel: cancelBlock [ ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: queryString trueChoice: trueChoice falseChoice: falseChoice [ "Put up a yes/no menu with caption queryString. The actual wording for the two choices will be as provided in the trueChoice and falseChoice parameters. Answer true if the response is the true-choice, false if it's the false-choice. This is a modal question -- the user must respond one way or the other." @@ -333,7 +334,7 @@ UIManager2 >> confirm: queryString trueChoice: trueChoice falseChoice: falseChoi ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> confirm: queryString trueChoice: trueChoice falseChoice: falseChoice cancelChoice: cancelChoice default: aSymbol [ "Put up a yes/no/cancel menu with caption queryString. The actual wording for the choices will be as provided in the trueChoice, falseChoice and cancelChoice parameters. Default should be one of #yes, #no or #cancel to set the default button. @@ -343,23 +344,23 @@ UIManager2 >> confirm: queryString trueChoice: trueChoice falseChoice: falseChoi ^self subclassResponsibility ] -{ #category : #private } +{ #category : 'private' } UIManager2 >> deactivate [ ] -{ #category : #debug } +{ #category : 'debug' } UIManager2 >> debugProcess: process context: context label: title fullView: bool [ self deprecated: 'use ITDebug instead'. self debugProcess: process context: context label: title fullView: bool notification: nil ] -{ #category : #debug } +{ #category : 'debug' } UIManager2 >> debugProcess: process context: context label: title fullView: bool notification: notificationString [ self deprecated: ''. self subclassResponsibility ] -{ #category : #'ui process' } +{ #category : 'ui process' } UIManager2 >> defer: aBlock [ "Evaluate the given Block in the UI thread as soon as there is nothing scheduled. Evaluate immediately when there is no UI" @@ -367,21 +368,21 @@ UIManager2 >> defer: aBlock [ aBlock value ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> deny: aStringOrText [ "Open a denial dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> deny: aStringOrText title: aString [ "Open a denial dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #display } +{ #category : 'display' } UIManager2 >> displayProgress: titleString from: minVal to: maxVal during: workBlock [ "SystemProgressMorph show: titleString from: minVal to: during: " @@ -392,46 +393,46 @@ UIManager2 >> displayProgress: titleString from: minVal to: maxVal during: workB run ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> edit: aText [ "Open an editor on the given string/text." ^self edit: aText label: nil ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> edit: aText label: labelString [ "Open an editor on the given string/text." ^self edit: aText label: labelString accept: nil ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> edit: aText label: labelString accept: aBlockOrNil [ "Open an editor on the given string/text." ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> fontFromUser: priorFont [ self subclassResponsibility ] -{ #category : #'error handling' } +{ #category : 'error handling' } UIManager2 >> handleError: anError [ self deprecated: 'Store into ITError'. self handleError: anError log: true ] -{ #category : #'error handling' } +{ #category : 'error handling' } UIManager2 >> handleError: anError log: shouldLog [ self deprecated: 'Store into ITError'. self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } UIManager2 >> headlessManager [ "Answer an instance of headless manager, which will be used when image runs headless and non-interactive. We put it here, so subclasses can override it." @@ -439,14 +440,14 @@ UIManager2 >> headlessManager [ ^CommandLineUIManager replacing: self ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> inform: aString [ "Display a message for the user to read and then dismiss." self deprecated: 'store into ' , ITNotification className. ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> informUser: aString during: aBlock [ "Display a message above (or below if insufficient room) the cursor during execution of the given block. @@ -456,7 +457,7 @@ UIManager2 >> informUser: aString during: aBlock [ ^self informUserDuring: [:bar | bar label: aString. aBlock value] ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> informUserDuring: aBlock [ "Display a message above (or below if insufficient room) the cursor during execution of the given block. @@ -469,14 +470,14 @@ UIManager2 >> informUserDuring: aBlock [ ^ self subclassResponsibility ] -{ #category : #'ui process' } +{ #category : 'ui process' } UIManager2 >> interruptName: labelString preemptedProcess: theInterruptedProcess [ "Create a Notifier on the active scheduling process with the given label." ^self error: 'Cannot perform a given request' ] -{ #category : #'error handling' } +{ #category : 'error handling' } UIManager2 >> logError: anError [ Smalltalk @@ -484,17 +485,17 @@ UIManager2 >> logError: anError [ inContext: anError signalerContext ] -{ #category : #'default actions' } +{ #category : 'default actions' } UIManager2 >> lowSpaceWatcherDefaultAction: preemptedProcess [ ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> merge: merger informing: aString [ self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> multiLineRequest: queryString initialAnswer: defaultAnswer answerHeight: answerHeight [ "Create a multi-line instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and @@ -507,20 +508,20 @@ UIManager2 >> multiLineRequest: queryString initialAnswer: defaultAnswer answerH ^self subclassResponsibility ] -{ #category : #display } +{ #category : 'display' } UIManager2 >> newDisplayDepthNoRestore: pixelSize [ self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> newMenuIn: aThemedMorph for: aModel [ "Answer a new menu." self deprecated: 'storeIntoITMenuInFor'. ^self subclassResponsibility ] -{ #category : #'non-interactive' } +{ #category : 'non-interactive' } UIManager2 >> nonInteractiveManager [ "Answer an instance of non-interactive manager, which will be used when image runs headless. We put it here, so subclasses can override it." @@ -528,51 +529,51 @@ UIManager2 >> nonInteractiveManager [ ^NonInteractiveUIManager replacing: self ] -{ #category : #events } +{ #category : 'events' } UIManager2 >> onEventSensorStartup: anEventSensor [ ] -{ #category : #'default actions' } +{ #category : 'default actions' } UIManager2 >> onFontsChanged [ 1 halt. ] -{ #category : #events } +{ #category : 'events' } UIManager2 >> onPrimitiveError: aString [ ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> openComparisionFrom: targetMethodSource to: originalMethodSource belongingTo: aClass from: aChange [ self flag: #notImplementor. self deprecated: 'store into ITCodeDiff'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> proceed: aStringOrText [ "Open a proceed dialog." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> proceed: aStringOrText title: aString [ "Open a proceed dialog and answer true if not cancelled, false otherwise." self deprecated: 'reification'. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> question: aStringOrText [ "Open a question dialog." self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> question: aStringOrText title: aString [ "Open a question dialog and answer true if yes, false if no and nil if cancelled." @@ -580,14 +581,14 @@ self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> questionWithoutCancel: aStringOrText [ "Open a question dialog." self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> questionWithoutCancel: aStringOrText title: aString [ "Open a question dialog and answer true if yes, false if no and nil if cancelled." @@ -595,7 +596,7 @@ self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: queryString [ "Create an instance of me whose question is queryString. Invoke it centered at the cursor, and answer the string the user accepts. Answer @@ -605,7 +606,7 @@ UIManager2 >> request: queryString [ ^self request: queryString initialAnswer: '' ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: queryString entryCompletion: anEntryCompletion [ "Create an instance of me whose question is queryString. Invoke it centered at the cursor, and answer the string the user accepts. Answer @@ -615,7 +616,7 @@ UIManager2 >> request: queryString entryCompletion: anEntryCompletion [ ^self request: queryString initialAnswer: '' entryCompletion: anEntryCompletion ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: queryString initialAnswer: defaultAnswer [ "Create an instance of me whose question is queryString with the given initial answer. Answer the string the user accepts. Answer the empty string if the user cancels." @@ -624,7 +625,7 @@ self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: queryString initialAnswer: defaultAnswer entryCompletion: anEntryCompletion [ "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the @@ -634,7 +635,7 @@ UIManager2 >> request: queryString initialAnswer: defaultAnswer entryCompletion: ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: aStringOrText initialAnswer: defaultAnswer title: aTitle [ "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the @@ -644,7 +645,7 @@ UIManager2 >> request: aStringOrText initialAnswer: defaultAnswer title: aTitle ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> request: aStringOrText initialAnswer: defaultAnswer title: aTitle entryCompletion: anEntryCompletion [ "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the @@ -654,7 +655,7 @@ UIManager2 >> request: aStringOrText initialAnswer: defaultAnswer title: aTitle ^self subclassResponsibility ] -{ #category : #'ui requests' } +{ #category : 'ui requests' } UIManager2 >> requestPassword: queryString [ "Create an instance of me whose question is queryString. Invoke it centered at the cursor, and answer the string the user accepts. Answer the empty @@ -663,19 +664,19 @@ UIManager2 >> requestPassword: queryString [ ^self subclassResponsibility ] -{ #category : #display } +{ #category : 'display' } UIManager2 >> restoreDisplay [ self subclassResponsibility ] -{ #category : #display } +{ #category : 'display' } UIManager2 >> restoreDisplayAfter: aBlock [ self subclassResponsibility ] -{ #category : #display } +{ #category : 'display' } UIManager2 >> showWaitCursorWhile: aBlock [ | process | process := [ [ true ] "loop until the end of aBlock processing" @@ -691,12 +692,12 @@ UIManager2 >> showWaitCursorWhile: aBlock [ ensure: [ process terminate ] ] -{ #category : #'ui process' } +{ #category : 'ui process' } UIManager2 >> spawnNewProcess [ "Do nothing by default." ] -{ #category : #'ui process' } +{ #category : 'ui process' } UIManager2 >> spawnNewProcessIfThisIsUI: suspendedProcess [ self uiProcess == suspendedProcess ifTrue: [ @@ -707,18 +708,18 @@ UIManager2 >> spawnNewProcessIfThisIsUI: suspendedProcess [ ] -{ #category : #'default actions' } +{ #category : 'default actions' } UIManager2 >> syntaxErrorNotificationDefaultAction: anException [ ^ self subclassResponsibility ] -{ #category : #'ui process' } +{ #category : 'ui process' } UIManager2 >> terminateUIProcess [ "Do nothing by default." ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> textEntry: aStringOrText [ "Open a text entry dialog." self flag: #sameA. @@ -726,7 +727,7 @@ UIManager2 >> textEntry: aStringOrText [ ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> textEntry: aStringOrText title: aString [ "Open a text entry dialog." self flag: #sameA. @@ -734,7 +735,7 @@ self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'ui TEasilyThemed' } +{ #category : 'ui TEasilyThemed' } UIManager2 >> textEntry: aStringOrText title: aString entryText: defaultEntryText [ "Open a text entry dialog." self flag: #sameA. @@ -742,7 +743,7 @@ self deprecated: ''. ^self subclassResponsibility ] -{ #category : #'default actions' } +{ #category : 'default actions' } UIManager2 >> unhandledErrorDefaultAction: anException [ "Provide a default handling for unhandled error. We should never reach this code, because it should be overridden by subclasses. @@ -754,7 +755,7 @@ UIManager2 >> unhandledErrorDefaultAction: anException [ Smalltalk snapshot: false andQuit: true ] -{ #category : #'default actions' } +{ #category : 'default actions' } UIManager2 >> warningDefaultAction: aWarning [ "Handle warning notification. Should be overidden by subclass." diff --git a/src/Interactions/package.st b/src/Interactions/package.st index fc7d44c..cd7ec07 100644 --- a/src/Interactions/package.st +++ b/src/Interactions/package.st @@ -1 +1 @@ -Package { #name : #Interactions } +Package { #name : 'Interactions' }