Inspector phlow actions by example

The actions are defined, similar to views, through a method annotated with a gtAction pragma. For example, GtLudoRecordingGame>>#gtAutoplayAction: gtAutoplayAction: anAction <gtAction> ^ anAction button tooltip: 'Autoplay one move'; priority: 20; icon: BrGlamorousVectorIcons play; action: [ :aButton | self autoPlay: 1. aButton phlow spawnObject: self moves last ] defines such an action with a button that when pressed executes the action: block.

There are differen types of dropdown actions. One type are button actions defined above. Another type of phlow actions are dropdown actions. For example GtGitCommit>>#gtActionCheckoutFor: gtActionCheckoutFor: anAction <gtAction> ^ anAction dropdown label: 'Checkout'; content: [ :aDropdown | BrSimpleList new margin: (BlInsets all: 5); items: IceCheckoutStrategy allGtStrategies; itemStencil: [ BrLabel new hMatchParent aptitude: BrGlamorousLabelAptitude + BrGlamorousListItemAptitude ]; itemDataBinder: [ :aLabel :aStrategy | aLabel text: aStrategy gtDescription; when: BlClickEvent do: [ :_ | aStrategy committish: self; lepiterWorkingCopy: self lepiterWorkingCopy; checkoutOn: self repository workingCopy. aDropdown fireEvent: BrDropdownHideWish new ] ] ]