<commit_before># Copyright (c) 2013 <NAME> <<EMAIL>>
# This file is part of SimpleGUITk - https://github.com/dholm/simpleguitk
# See the file 'COPYING' for copying permission.

from __future__ import division

try:
    import Tkinter as tkinter
except ImportError:
    import tkinter

import sys

from .canvas import Canvas
from .control_objects import Button
from .control_objects import Input
from .control_objects import Label
from .input import InputAdapter
from .timers import destroy as destroy_timers


class Frame(object):
    def _create_root(self, title):
        root = tkinter.Tk()
        root.wm_title(title)
        root.protocol('WM_DELETE_WINDOW', root.quit)
        return root

    def _canvas_init(self, width, height):
        canvas_frame = tkinter.Frame(self._root)
        self._canvas = Canvas(canvas_frame, width, height)
        canvas_frame.grid(row=0, column=1, rowspan=2, padx=5, pady=5,
                          sticky=(tkinter.N, tkinter.S, tkinter.W, tkinter.E))

    def _control_frame_init(self, width):
        self._control_frame = tkinter.Frame(self._root, width=width)
        self._control_frame.grid(row=0, column=0, padx=5, pady=5)

    def _input_init(self):
        status_frame = tkinter.Frame(self._root)
        canvas_widget = self._canvas._get_widget()
        self._input = InputAdapter(status_frame, self._root, canvas_widget)
        status_frame.grid(row=1, column=0, sticky=(tkinter.W, tkinter.E),
                          padx=5, pady=5)

    def __init__(self, title, canvas_width, canvas_height, control_width):
        self._root = self._create_root(title)

        self._canvas_frame = None
        self._canvas = None
        self._canvas_init(canvas_width, canvas_height)
<commit_msg>Fixed an issue where the status_frame could become too small, causing it to pop sporadically when the input text was too large.<commit_after># Copyright (c) 2013 <NAME> <<EMAIL>>
# This file is part of SimpleGUITk - https://github.com/dholm/simpleguitk
# See the file 'COPYING' for copying permission.

from __future__ import division

try:
    import Tkinter as tkinter
except ImportError:
    import tkinter

import sys

from .canvas import Canvas
from .control_objects import Button
from .control_objects import Input
from .control_objects import Label
from .input import InputAdapter
from .timers import destroy as destroy_timers


class Frame(object):
    def _create_root(self, title):
        root = tkinter.Tk()
        root.wm_title(title)
        root.protocol('WM_DELETE_WINDOW', root.quit)
        return root

    def _canvas_init(self, width, height):
        canvas_frame = tkinter.Frame(self._root)
        self._canvas = Canvas(canvas_frame, width, height)
        canvas_frame.grid(row=0, column=1, rowspan=2, padx=5, pady=5,
                          sticky=(tkinter.N, tkinter.S, tkinter.W, tkinter.E))

    def _control_frame_init(self, width):
        self._control_frame = tkinter.Frame(self._root, width=width)
        self._control_frame.grid(row=0, column=0, padx=5, pady=5)

    def _input_init(self):
        status_frame = tkinter.Frame(self._root, width=120, height=85)
        status_frame.pack_propagate(0)
        canvas_widget = self._canvas._get_widget()
        self._input = InputAdapter(status_frame, self._root, canvas_widget)
        status_frame.grid(row=1, column=0, sticky=(tkinter.W, tkinter.E),
                          padx=5, pady=5)

    def __init__(self, title, canvas_width, canvas_height, control_width):
        self._root = self._create_root(title)

        self._canvas_frame = None
        self._canvas = None
        self._canvas_init(canvas_width, canvas_height)

{'fraction_non_alphanumeric': 0.09621150177159989, 'fraction_numerical': 0.010902153175252113, 'mean_word_length': 3.232987312572088, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '618291', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1149, 'n_words': 288}