# Path: robot_designer_plugin/core/constants.py
# class StringConstants(object):
#     """
#     Blender String constants. Using this class's static arguments circumvents typos causing runtime errors.
# 
#     .. todo::
# 
#         Increase this list with all important constants.
# 
#     """
#     mesh = "MESH"
#     camera = "CAMERA"
#     armature = "ARMATURE"
#     bone = "BONE"
#     empty = "EMPTY"
#     info = "INFO"
#     error = "ERROR"
#     none = "NONE"
#     tria_right = "TRIA_RIGHT"
#     tria_down = "TRIA_DOWN"


from .constants import StringConstants

class InfoBox(object):
    """
    This class collects messages (e.g., from :meth:`.operators.operators.RDOperator.poll`) and displays them
    with an info, either in a separated box or the current layout.

    See :ref:`gui_development` for an example.
    """

    global_messages = []

    def __init__(self, layout):
        """
        Constructor.

        :param layout: Blender gui element as passed to the
            :meth:`robot_designer_plugin.interface.main.UserInterface.draw` method.
        """
        self.messages = []
        self.layout = layout

    def add_message(self, message):
        """
        Adds a string message to the info box.

        :param message: message
        :type message: str
        """
        self.messages.append(message)


# Path: robot_designer_plugin/core/constants.py
# class StringConstants(object):
#     """
#     Blender String constants. Using this class's static arguments circumvents typos causing runtime errors.
# 
#     .. todo::
# 
#         Increase this list with all important constants.
# 
#     """
#     mesh = "MESH"
#     camera = "CAMERA"
#     armature = "ARMATURE"
#     bone = "BONE"
#     empty = "EMPTY"
#     info = "INFO"
#     error = "ERROR"
#     none = "NONE"
#     tria_right = "TRIA_RIGHT"
#     tria_down = "TRIA_DOWN"


# Path: robot_designer_plugin/core/gui.py
from .constants import StringConstants


class InfoBox(object):
    """
    This class collects messages (e.g., from :meth:`.operators.operators.RDOperator.poll`) and displays them
    with an info, either in a separated box or the current layout.

    See :ref:`gui_development` for an example.
    """

    global_messages = []

    def __init__(self, layout):
        """
        Constructor.

        :param layout: Blender gui element as passed to the
            :meth:`robot_designer_plugin.interface.main.UserInterface.draw` method.
        """
        self.messages = []
        self.layout = layout

    def add_message(self, message):
        """
        Adds a string message to the info box.

        :param message: message
        :type message: str
        """
        self.messages.append(message)


    def draw_info(self, additional_messages=[], icon=StringConstants.info):