diff --git a/src/Spec2-Core/SpAbstractFormButtonPresenter.class.st b/src/Spec2-Core/SpAbstractFormButtonPresenter.class.st index 2d241a09..8d9c5cdb 100644 --- a/src/Spec2-Core/SpAbstractFormButtonPresenter.class.st +++ b/src/Spec2-Core/SpAbstractFormButtonPresenter.class.st @@ -39,6 +39,13 @@ SpAbstractFormButtonPresenter >> initialize [ self whenLabelClickableChangedDo: [ :aBoolean | self changed: {#labelClickable: . aBoolean} ] ] +{ #category : 'testing' } +SpAbstractFormButtonPresenter >> isActive [ + "Answer if the receiver is selected" + + ^ self state +] + { #category : 'api' } SpAbstractFormButtonPresenter >> label [ "Answers the label to be shown by the button" diff --git a/src/Spec2-Core/SpSearchInputFieldOptionsPresenter.class.st b/src/Spec2-Core/SpSearchInputFieldOptionsPresenter.class.st new file mode 100644 index 00000000..a7d237af --- /dev/null +++ b/src/Spec2-Core/SpSearchInputFieldOptionsPresenter.class.st @@ -0,0 +1,110 @@ +" +Provides a presenter to allow the user to configure the type of search. + +A radio button group is used for the main search type: + +- Substring search +- Regular expression search +- Exact matching + +A separate checkboxes is used for case sensitive search. It's important to note that exact matching cannot be combined with substring or regex searches, as they are fundamentally different approaches. + +" +Class { + #name : 'SpSearchInputFieldOptionsPresenter', + #superclass : 'SpPresenter', + #instVars : [ + 'caseCheckBox', + 'regexpOptionButton', + 'exactOptionButton', + 'substringOptionButton' + ], + #category : 'Spec2-Core-Widgets', + #package : 'Spec2-Core', + #tag : 'Widgets' +} + +{ #category : 'instance creation' } +SpSearchInputFieldOptionsPresenter class >> open [ +