summaryrefslogtreecommitdiff
path: root/StrawKit/Applications/Test MPA Application.app/Main.js
blob: f2d70dab1ca027b9b754da09980904a89b61dea6 (plain)
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
46
47
48
49
50
51
52
// noinspection JSUnresolvedVariable

module.exports = () => {
    Strawberry.App = "Test MPA Application";
    Strawberry.MultiPanes = true;
    Strawberry.Menus = [
        "Some Menu"
    ]

    Strawberry.WhenLoaded = () => {
        load("Strawberry.Display");
        load("Strawberry.Menubar");
    }

    Strawberry.Panes[0] = {
        name: "Main",
        load: () => {
            Strawberry.Display.Write("Hello world!", 0, 0);
            Strawberry.Display.Write("This is a test application for the " + color.underline("Strawberry Operating System") + ".", 0, 1);
            Strawberry.Display.Write(color.red.inverse("RED"), 0, 3);
            Strawberry.Display.Write(color.yellow.inverse("YELLOW"), 0, 4);
            Strawberry.Display.Write(color.green.inverse("GREEN"), 0, 5);
            Strawberry.Display.Write(color.blue.inverse("BLUE"), 0, 6);
            Strawberry.Display.Write(color.cyan.inverse("CYAN"), 0, 7);
            Strawberry.Display.Write(color.magenta.inverse("MAGENTA"), 0, 8);
            Strawberry.Display.Write(color.gray.inverse("GRAY"), 0, 9);
        }
    }

    Strawberry.Panes[1] = {
        name: "Something",
        load: () => {
            Strawberry.Display.Write("Lorem Ipsum", 0, 0);
        }
    }

    Strawberry.Panes[2] = {
        name: "Other Thing",
        load: () => {
            Strawberry.Display.Write("Lorem Ipsum Dolor Sit Amet", 0, 0);
        }
    }

    Strawberry.Panes[3] = {
        name: "Make the app/OS crash",
        load: () => {
            throw new Error("Activated crash item");
        }
    }

    Strawberry.StartLoad();
}