Hello Doru,
As Alex suggested, Pharo scrollbars can be added to Roassal visualizations (see the script at the end). Similarly, we can change GLMRoassalRender>>render: to add scrollbars to roassal visualizations in Glamour. Here is a proposition:
render: aRoassalPresentation | view scrollPane| view := aRoassalPresentation view. aRoassalPresentation renderOn: view. aRoassalPresentation on: GLMPresentationUpdated send: #actOnPresentationUpdate: to: self. myMorph := ROMorph on: view stack. myMorph extent: (view raw encompassingRectangle extent + (40 @ 40)). scrollPane := ScrollPane new. scrollPane scroller addMorph: (myMorph). ^ scrollPane
Indeed, that means that roassal visualizations are strongly-tied to Morphic. Do you want me to push my changes to Glamour so that we have morphic-based scrollbars unless there is a practical roassal-based solution?
regards, Usman
Alex's script:
=-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-= | view roView roMorph pane window stack rawView nodes | "Preparing" window := StandardWindow labelled: 'windowLabel'. window model: self. window extent: 340 @ 480. stack := ROViewStack new. rawView := ROView new. stack addView: rawView.
view := ROMondrianViewBuilder initializedView: rawView. view stack: stack. view shape rectangle width: [ :c | c numberOfVariables * 5 ];
height: #numberOfMethods. nodes := view nodes: Collection withAllSubclasses. view edgesFrom: #superclass. view treeLayout. view applyLayout.
roMorph := ROMorph on: stack. pane := ScrollPane new. roMorph extent: ( view raw encompassingRectangle extent + (40 @
40)) . pane scroller addMorph: (roMorph). window addMorph: pane frame: (0@0 corner: 1@1). window openInWorld. =-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-= =-=-=-=-=-=