You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main idea is to break the text that is coming from the PieceTable into paragraphs (mainly checking for \n ).
For each paragraph, we need a custom node that will have a TextFlow and a Selection. It can also have at the left a graphic/label (for indentation, bullet lists, line numbering…). So pretty much this would be like an
HBox with Label + Group(BackgroundPaths, Selection, TextFlow) .
This control per paragraph is then added to a simple VBox, but using a ListView will provide the VirtualFlow, with cellFactory -> the HBox node, and list items -> paragraphs.
Note that user’s selection will span multiple cells, and that’s why there is a Selection(path) inside each cell/HBox, instead of having one single big selection on top of the ListView.
So there is the extra work of handling mouse events from control to cells to textFlow to get hit positions.
The text was updated successfully, but these errors were encountered:
The main idea is to break the text that is coming from the PieceTable into paragraphs (mainly checking for \n ).
For each paragraph, we need a custom node that will have a TextFlow and a Selection. It can also have at the left a graphic/label (for indentation, bullet lists, line numbering…). So pretty much this would be like an
HBox with Label + Group(BackgroundPaths, Selection, TextFlow) .
This control per paragraph is then added to a simple VBox, but using a ListView will provide the VirtualFlow, with cellFactory -> the HBox node, and list items -> paragraphs.
Note that user’s selection will span multiple cells, and that’s why there is a Selection(path) inside each cell/HBox, instead of having one single big selection on top of the ListView.
So there is the extra work of handling mouse events from control to cells to textFlow to get hit positions.
The text was updated successfully, but these errors were encountered: