-- 
-- DO NOT EDIT THIS FILE. IT WILL BE OVERWRITTEN WHEN YOU UPGRADE RAINLENDAR!
-- 

--
-- Shows the given window if it is hidden.
--
-- Parameters: 
--    windowName - Name of the window to be shown.
-- Return:
--    None
--
function Global_ShowWindow(windowName)
        Rainlendar_ShowWindow(windowName)
end

--
-- Hides the given window if it is shown.
--
-- Parameters: 
--    windowName - Name of the window to be hidden.
-- Return:
--    None
--
function Global_HideWindow(windowName)
        Rainlendar_HideWindow(windowName)
end

--
-- Toggles the given window. If the window is visible
-- it is hidden and vice versa.
--
-- Parameters: 
--    windowName - Name of the window to be toggled.
-- Return:
--    None
--
function Global_ToggleWindow(windowName)
	local visible = Rainlendar_IsWindowVisible(windowName)
	if visible then
                Rainlendar_HideWindow(windowName)
        else
                Rainlendar_ShowWindow(windowName)
        end
end

--
-- Opens the about dialog.
--
-- Parameters: 
--    None
-- Return:
--    None
--
function Global_ShowAboutDialog()
        Rainlendar_OpenDialog("About")
end

--
-- Opens the todo dialog.
--
-- Parameters: 
--    None
-- Return:
--    None
--
function Global_ShowTodoDialog()
        Rainlendar_OpenDialog("Todo")
end

--
-- Opens the todo dialog.
--
-- Parameters: 
--    param - The name of the window which opened the dialog.
-- Return:
--    None
--
function Global_ShowTodoDialog(param)
        Rainlendar_OpenDialog("Todo", param)
end

--
-- Opens the event dialog.
--
-- Parameters: 
--    None
-- Return:
--    None
--
function Global_ShowEventDialog()
        Rainlendar_OpenDialog("Event")
end

--
-- Opens the event dialog.
--
-- Parameters: 
--    param - The name of the window which opened the dialog.
-- Return:
--    None
--
function Global_ShowEventDialog(param)
        Rainlendar_OpenDialog("Event", param)
end

--
-- Opens the manager dialog.
--
-- Parameters: 
--    None
-- Return:
--    None
--
function Global_ShowManagerDialog()
        Rainlendar_OpenDialog("Manager")
end

--
-- Opens the options dialog.
--
-- Parameters: 
--    None
-- Return:
--    None
--
function Global_ShowOptionsDialog()
        Rainlendar_OpenDialog("Options")
end