# Copyright 2020 William Ro. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =-==========================================================================-=
from ..ideology.noear import Nomear

import tkinter as tk



class TipBox(tk.Toplevel, Nomear):

  def __init__(self):
    # Call parent's constructor
    tk.Toplevel.__init__(self)

    # Own variables
    self.message = tk.StringVar()
    tk.Message(self, textvariable=self.message, font='TkFixedFont',
               aspect=1000).grid()

    # Remove title bar
    self.overrideredirect(True)


  def set_message(self, text): self.message.set(text)


  def show(self): self.deiconify()


  def hide(self): self.withdraw()
