:py:mod:`BioSANS2020.gui_functs.scrollable_text` ================================================ .. py:module:: BioSANS2020.gui_functs.scrollable_text .. autoapi-nested-parse:: This is the scrollable_text module This module controls how text area are placed inside the canvas for displaying output of computation, equations, etc. The following is the list of function for this module: 1. save_file 2. tab 3. delete_this 4. prepare_scroll_text Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: BioSANS2020.gui_functs.scrollable_text.save_file BioSANS2020.gui_functs.scrollable_text.tab BioSANS2020.gui_functs.scrollable_text.canvas_update_widgets BioSANS2020.gui_functs.scrollable_text.delete_this BioSANS2020.gui_functs.scrollable_text.prepare_scroll_text .. py:function:: save_file(_, text) Opens a file dialog box for saving the constents of the text area .. py:function:: tab(_, text) insers tab or four spaces in the text area .. py:function:: canvas_update_widgets(_, canvas) This function update the canvas upon adding new objects by moving objects to ensure they fit nicely. The arrangement is that the last object added appear first (latest goes on top). Args: canvas : the canvas object .. py:function:: delete_this(frame, canvas) This function removes objects from the canvas and reorder objects .. py:function:: prepare_scroll_text(items) This function prepares the scrollable text area by creating a frame as a child of the canvas or items[0]. Scroll capabilities are added and a Text area is created as a child of the frame. Args: items : 3 item list of [canvas, scroll_x, scroll_y] Returns: text : the text area object where text can be inserted