<commit_before>"""
Defines and draws the status bar that should appear along the bottom of the
main SasView window.
"""
import wx
import sys
import logging
from wx import StatusBar as wxStatusB
from wx.lib import newevent
import wx.richtext
from sas.guiframe.gui_style import GUIFRAME_ICON

# Number of fields on the status bar
NB_FIELDS = 4
#position of the status bar's fields
ICON_POSITION = 0
MSG_POSITION = 1
GAUGE_POSITION = 2
CONSOLE_POSITION = 3
BUTTON_SIZE = 40
STATUS_BAR_ICON_SIZE = 12
CONSOLE_WIDTH = 500
CONSOLE_HEIGHT = 300
FRAME_ICON = wx.Icon(GUIFRAME_ICON.FRAME_ICON_PATH,wx.BITMAP_TYPE_ICON)

if sys.platform.count("win32") > 0:
    FONT_VARIANT = 0
else:
    FONT_VARIANT = 1

GREEN = wx.Colour(95, 190, 95)
YELLOW = wx.Colour(247, 214, 49)
RED = wx.Colour(234, 89, 78)

class ConsolePanel(wx.Panel):
    """
    Interaction class for adding messages to the Console log.
    """
    def __init__(self, parent, *args, **kwargs):
        wx.Panel.__init__(self, parent=parent, *args, **kwargs)
        self.parent = parent
        self.sizer = wx.BoxSizer(wx.VERTICAL)

        self.msg_txt = wx.richtext.RichTextCtrl(self, size=(CONSOLE_WIDTH-40,
                                                CONSOLE_HEIGHT-60),
                                   style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER)

        self.msg_txt.SetEditable(False)
        self.msg_txt.SetValue('No message available')
        self.sizer.Add(self.msg_txt, 1, wx.EXPAND|wx.ALL, 10)
        self.SetSizer(self.sizer)

    def set_message(self, status="", event=None):
        """<commit_msg>fix .ico image handler error on windows startup (see #383)<commit_after>"""
Defines and draws the status bar that should appear along the bottom of the
main SasView window.
"""
import wx
import sys
import logging
from wx import StatusBar as wxStatusB
from wx.lib import newevent
import wx.richtext
from sas.guiframe.gui_style import GUIFRAME_ICON

# Number of fields on the status bar
NB_FIELDS = 4
#position of the status bar's fields
ICON_POSITION = 0
MSG_POSITION = 1
GAUGE_POSITION = 2
CONSOLE_POSITION = 3
BUTTON_SIZE = 40
STATUS_BAR_ICON_SIZE = 12
CONSOLE_WIDTH = 500
CONSOLE_HEIGHT = 300
FRAME_ICON = wx.Icon(GUIFRAME_ICON.FRAME_ICON_PATH, wx.BITMAP_TYPE_ICO)

if sys.platform.count("win32") > 0:
    FONT_VARIANT = 0
else:
    FONT_VARIANT = 1

GREEN = wx.Colour(95, 190, 95)
YELLOW = wx.Colour(247, 214, 49)
RED = wx.Colour(234, 89, 78)

class ConsolePanel(wx.Panel):
    """
    Interaction class for adding messages to the Console log.
    """
    def __init__(self, parent, *args, **kwargs):
        wx.Panel.__init__(self, parent=parent, *args, **kwargs)
        self.parent = parent
        self.sizer = wx.BoxSizer(wx.VERTICAL)

        self.msg_txt = wx.richtext.RichTextCtrl(self, size=(CONSOLE_WIDTH-40,
                                                CONSOLE_HEIGHT-60),
                                   style=wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER)

        self.msg_txt.SetEditable(False)
        self.msg_txt.SetValue('No message available')
        self.sizer.Add(self.msg_txt, 1, wx.EXPAND|wx.ALL, 10)
        self.SetSizer(self.sizer)

    def set_message(self, status="", event=None):
        """
{'fraction_non_alphanumeric': 0.10015649452269171, 'fraction_numerical': 0.03161189358372457, 'mean_word_length': 3.0558375634517767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '952732', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1091, 'n_words': 280}