"""
    Demo - Button Toggle #2


    Uses the IGNORE BUTTON setting.
    When creating or updating buttons in 4.35.0+, you can use the parameter:
        disabled=BUTTON_DISABLED_MEANS_IGNORE

    This will cause the buytton to ignore your clicks but it won't change the button
    with the GUI, which would change the color and gray it out.  The button will not
    change appearance at all. It will no longer respond to button clicks.

    Another toggle button using Base64 strings
    Of course files could be used instead of Base64 strings

    The differences between this toggle button demo and the other one are:
    1. Different button graphics
    2. The button state is stored in the metadata for the button
    3. The metadata for the button is a class instead of a single variable name

    For buttons with graphics, it's generally best to set the button's:
    * border width=0
    * color = (background_color, background_color)

    Buttons don't normally have explicit keys. However, since this button has
    no text, there is no default key. It's better to be explicit with buttons that
    change text or have graphics.

    Copyright 2021 PySimpleGUI
"""

import PySimpleGUI as sg

# Class holding the button graphic info. At this time only the state is kept
class BtnInfo:
    def __init__(self, state=True):
        self.state = state        # Can have 3 states - True, False, None (disabled)

# Main function that creates the layout, window and has event loop
def main():
    layout = [[sg.Text('Toggle Button')],
              [sg.T('Disabled with PySimpleGUI Ignore:', text_color='yellow')],
              [sg.Button(image_data=on_image, k='-TOGGLE1-', border_width=0,
                         button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled_button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         metadata=BtnInfo()),
               sg.T('Disable:'),
               sg.Button(image_data=off_image, k='-DISABLE1-', border_width=0,
                         button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled_button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         metadata=BtnInfo(False)), sg.T('Disabled button color is\nbetter than other disabled button below')
               ],
              [sg.Button(image_data=on_image, k='-TOGGLE2-', border_width=0,
                         button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled_button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         metadata=BtnInfo())],
              [ sg.T('Disabled with GUI:', text_color='yellow')],
              [sg.Button(image_data=on_image, k='-TOGGLE3-', border_width=0,
                         button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled_button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled=True, metadata=BtnInfo()), sg.T('Note color has crosshatching')],
              [ sg.T('Disabled with PySimpleGUI (ignored):', text_color='yellow')],
              [sg.Button(image_data=on_image, k='-TOGGLE3-', border_width=0,
                         button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled_button_color=(sg.theme_background_color(), sg.theme_background_color()),
                         disabled=sg.BUTTON_DISABLED_MEANS_IGNORE, metadata=BtnInfo())],
              [sg.T(size=(40,1), k='-STATUS-')],
              [sg.Button('Exit')]]

    window = sg.Window('Window Title', layout, font='_ 14', finalize=True)

    while True:             # Event Loop
        event, values = window.read()
        if event in (sg.WIN_CLOSED, 'Exit'):
            break
        # Where all the magic happens. 2 things happen when button is clicked
        # 1. The state toggles
        # 2. The buton graphic changes
        if 'TOGGLE' in event:
            window[event].metadata.state = not window[event].metadata.state
            window[event].update(image_data=on_image if window[event].metadata.state else off_image)
        elif event == '-DISABLE1-':
            window[event].metadata.state = not window[event].metadata.state
            window[event].update(image_data=on_image if window[event].metadata.state else off_image)
            # if disabling the button
            if window[event].metadata.state:
                if window['-TOGGLE1-'].metadata.state is True:
                    window['-TOGGLE1-'].update(disabled=sg.BUTTON_DISABLED_MEANS_IGNORE, image_data=on_image_disabled)
                elif window['-TOGGLE1-'].metadata.state is False:
                    window['-TOGGLE1-'].update(disabled=sg.BUTTON_DISABLED_MEANS_IGNORE, image_data=off_image_disabled)
            else:
                if window['-TOGGLE1-'].metadata.state is True:
                    window['-TOGGLE1-'].update(disabled=False, image_data=on_image)
                elif window['-TOGGLE1-'].metadata.state is False:
                    window['-TOGGLE1-'].update(disabled=False, image_data=off_image)
        window['-STATUS-'].update(f'event {event} button state = {window[event].metadata.state}')
    window.close()

# Define the button graphic base 64 strings and then call the main function
if __name__ == '__main__':
    on_image = b'iVBORw0KGgoAAAANSUhEUgAAAFoAAAAnCAYAAACPFF8dAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAHGElE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