forked from ProjectMoon/MetaDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TaskBar.js
executable file
·46 lines (40 loc) · 1.18 KB
/
TaskBar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* TaskBar.js
* This source file is part of the MetaDesktop Lightweight Webtop Environment (LWE).
* MetaDesktop is free software, licensed under the GNU GPL (General Public License).
* You are free to modify, redistribute, and change this program in any way.
*/
//instance variables
TaskBar.prototype.barName;
TaskBar.prototype.bar;
function TaskBar(barName) {
//first, create the task bar
bar = document.createElement("div");
bar.id = barName;
bar.className = "taskbar";
bar.style.width = "100%";
bar.style.position = "fixed";
bar.style.bottom = "0px";
bar.style.left = "0px";
bar.style.zIndex = "3";
//now set up pointers and add the taskbar
this.barName = barName;
this.bar = bar;
document.getElementById("taskbar").appendChild(bar);
}
//methods
TaskBar.prototype.AddEntry = function(windowId) {
with (this) {
//windowId.TaskBarEntry.onclick = windowId.Destroy;
//document.write(this.bar);
//document.write(windowId.TaskBarEntry);
// theBar = document.getElementById(this.b);
this.bar.appendChild(windowId.TaskBarEntry);
}
}
TaskBar.prototype.RemoveEntry = function(windowId) {
with (this) {
bar = document.getElementById(this.barName);
bar.removeChild(windowId);
}
}