Skip to content

Commit

Permalink
define lepiter's GtPhlowToolCommonViewModel [feenkcom/gtoolkit#3422]
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajKubelka committed Oct 30, 2024
1 parent 62d4585 commit 4e9b6e7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Lepiter-UI/LePageToolElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ LePageToolElement >> initialize [
detailed: [ :aStyle | aStyle do: [ self onDetailedVolume ] ]).

self beFocusable.
self when: BlClickEvent do: [ :anEvent | self requestFocus ]
self when: BlClickEvent do: [ :anEvent | self requestFocus ].
self phlow
accessTool: (GtPhlowToolClassType forClass: LePage)
viewModel: #pageViewModel
object: #pageModel.
]

{ #category : #initialization }
Expand Down Expand Up @@ -119,6 +123,12 @@ LePageToolElement >> onSidebarChangePageWish: aWish [
self pageViewModel: aWish pageUIModel
]

{ #category : #'api - page model' }
LePageToolElement >> pageModel [
self hasPage ifFalse: [ ^ nil ].
^ self pageViewModel pageModel
]

{ #category : #'api - accessing' }
LePageToolElement >> selectionTransformation: aBlock [
self contentElement selectionTransformation: aBlock
Expand Down

0 comments on commit 4e9b6e7

Please sign in to comment.