2017-07-05 11:41:19 +02:00
|
|
|
|
/*
|
2020-01-06 15:24:46 +01:00
|
|
|
|
* Copyright (c) 2020 ETH Zürich, Educational Development and Technology (LET)
|
2017-07-05 11:41:19 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
using SafeExamBrowser.I18n.Contracts;
|
|
|
|
|
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
|
2018-07-06 15:57:38 +02:00
|
|
|
|
|
2019-08-30 09:55:26 +02:00
|
|
|
|
namespace SafeExamBrowser.UserInterface.Contracts.Shell
|
2017-07-05 11:41:19 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
2019-03-06 16:10:00 +01:00
|
|
|
|
/// The taskbar is a user interface element via which the user can access and control various aspects of the application.
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// </summary>
|
2017-07-05 17:21:52 +02:00
|
|
|
|
public interface ITaskbar
|
2017-07-05 11:41:19 +02:00
|
|
|
|
{
|
2019-01-11 08:25:40 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Controls the visibility of the clock.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool ShowClock { set; }
|
|
|
|
|
|
2020-05-04 12:37:54 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Controls the visibility of the quit button.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool ShowQuitButton { set; }
|
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the user clicked the quit button in the taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event QuitButtonClickedEventHandler QuitButtonClicked;
|
|
|
|
|
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// <summary>
|
2019-03-08 11:43:52 +01:00
|
|
|
|
/// Adds the given application control to the taskbar.
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// </summary>
|
2019-11-06 08:45:37 +01:00
|
|
|
|
void AddApplicationControl(IApplicationControl control, bool atFirstPosition = false);
|
2017-07-17 16:59:50 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-03-08 11:43:52 +01:00
|
|
|
|
/// Adds the given notification control to the taskbar.
|
2017-07-17 16:59:50 +02:00
|
|
|
|
/// </summary>
|
2019-03-08 11:43:52 +01:00
|
|
|
|
void AddNotificationControl(INotificationControl control);
|
2017-08-15 15:30:31 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the given system control to the taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void AddSystemControl(ISystemControl control);
|
2017-07-12 15:36:30 +02:00
|
|
|
|
|
2018-02-20 15:15:26 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Closes the taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Close();
|
|
|
|
|
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// <summary>
|
2017-07-20 14:16:47 +02:00
|
|
|
|
/// Returns the absolute height of the taskbar (i.e. in physical pixels).
|
2017-07-12 15:36:30 +02:00
|
|
|
|
/// </summary>
|
2017-07-20 14:16:47 +02:00
|
|
|
|
int GetAbsoluteHeight();
|
2017-07-26 14:36:20 +02:00
|
|
|
|
|
2019-03-19 16:09:07 +01:00
|
|
|
|
/// <summary>
|
2019-03-20 10:08:10 +01:00
|
|
|
|
/// Moves the taskbar to the bottom of the screen and resizes it accordingly.
|
2017-07-26 14:36:20 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
void InitializeBounds();
|
2019-03-06 16:10:00 +01:00
|
|
|
|
|
2019-03-15 11:38:59 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes all text elements in the taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void InitializeText(IText text);
|
|
|
|
|
|
2019-03-06 16:10:00 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shows the taskbar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void Show();
|
2017-07-05 11:41:19 +02:00
|
|
|
|
}
|
|
|
|
|
}
|