22 #name : #GtPagerPageNavigationContext ,
33 #superclass : #Object ,
44 #instVars : [
5- ' pageSelectionContext' ,
65 ' pagerPageModel' ,
76 ' previousContext' ,
87 ' pager' ,
@@ -17,9 +16,57 @@ GtPagerPageNavigationContext >> allPreviousContextsDo: aBlock [
1716 aContext withAllNavigationContextsDo: aBlock ]
1817]
1918
19+ { #category : #' gt - extensions' }
20+ GtPagerPageNavigationContext >> gtNavigationContextsFor: aView [
21+ < gtView>
22+ ^ aView columnedList
23+ title: ' Navigations' ;
24+ items: [ self withAllNavigationContexts ];
25+ column: ' Index'
26+ text: [ :_ :anIndex | anIndex ]
27+ width: 40 ;
28+ column: ' Type' text: #toolType weight: 0.5 ;
29+ column: ' Tool' text: #toolElement ;
30+ column: ' Object' text: #object
31+ ]
32+
33+ { #category : #' gt - extensions' }
34+ GtPagerPageNavigationContext >> gtOverview [
35+ ^ {
36+ GtPhlowOverviewItem new
37+ name: ' Phlow view model' ;
38+ value: self phlowViewModel.
39+ GtPhlowOverviewItem new
40+ name: ' Tool type' ;
41+ value: self toolType.
42+ GtPhlowOverviewItem new
43+ name: ' Tool element' ;
44+ value: self toolElement.
45+ GtPhlowOverviewItem new
46+ name: ' Tool view model' ;
47+ value: self toolViewModel.
48+ GtPhlowOverviewItem new
49+ name: ' Tool model object' ;
50+ value: self object}
51+ ]
52+
53+ { #category : #' gt - extensions' }
54+ GtPagerPageNavigationContext >> gtOverviewFor: aView [
55+ < gtView>
56+ ^ aView columnedList
57+ title: ' Overview' ;
58+ priority: 0 ;
59+ items: [ self gtOverview ];
60+ column: ' Name'
61+ text: #name
62+ weight: 0.3 ;
63+ column: ' Value' text: #description ;
64+ send: #value
65+ ]
66+
2067{ #category : #accessing }
2168GtPagerPageNavigationContext >> object [
22- ^ object
69+ ^ self phlowViewModel ifNotNil: # object
2370]
2471
2572{ #category : #accessing }
@@ -49,6 +96,14 @@ GtPagerPageNavigationContext >> pagerPageModel: anObject [
4996 pagerPageModel := anObject
5097]
5198
99+ { #category : #accessing }
100+ GtPagerPageNavigationContext >> phlowViewModel [
101+ < return: #TGtPhlowToolViewModel >
102+ self pagerPageModel widgetDo: [ :aWidget |
103+ ^ aWidget toolViewModel ].
104+ ^ nil
105+ ]
106+
52107{ #category : #accessing }
53108GtPagerPageNavigationContext >> previousContext [
54109 < return: #GtPagerPageNavigationContext or : nil >
@@ -68,6 +123,21 @@ GtPagerPageNavigationContext >> previousObjectDo: aDoBlock ifAbsent: anAbsentBlo
68123 ^ anAbsentBlock value
69124]
70125
126+ { #category : #accessing }
127+ GtPagerPageNavigationContext >> toolElement [
128+ ^ self phlowViewModel ifNotNil: #element
129+ ]
130+
131+ { #category : #accessing }
132+ GtPagerPageNavigationContext >> toolType [
133+ ^ self phlowViewModel ifNotNil: #type
134+ ]
135+
136+ { #category : #accessing }
137+ GtPagerPageNavigationContext >> toolViewModel [
138+ ^ self phlowViewModel ifNotNil: #viewModel
139+ ]
140+
71141{ #category : #' api - navigation' }
72142GtPagerPageNavigationContext >> withAllNavigationContexts [
73143 ^ Array streamContents: [ :aStream |
0 commit comments