/*                          TaskToolWindow.h                             */
/*           Structures for TaskTool Window, Menus & graphics            */


#ifndef TASKTOOL_TASKTOOLWINDOW_H
#define TASKTOOL_TASKTOOLWINDOW_H

/** TaskList Display Info **/

/* Default Font (actually tries to open this just incase, which means you *
 * can easily substitute another font if you also change other params).   */

struct TextAttr TTTextAttr = { (STRPTR) "topaz.font", TOPAZ_EIGHTY, 0,0 };


#define NAMESDISPLAYED 8      /* Number of Tasks Displayed at any time  */
#define CHARSDISPLAYED 15     /* Number of chars of Task name displayed */
                              /* in TaskTool Task list window (set for  */
                              /* Topaz80)                               */


/** Settings for the TaskTool Window **/

#define WINDOWNAME " TaskTool                        "

struct NewWindow TaskToolWin =
    {
    0,0,                        /* X,Y (work out middle later) */
    190,150,                    /* Width, Height (no borders/gadgets) */
    0,1,                        /* Detail Pen, Block Pen */
    INTUITICKS|GADGETDOWN|      /* Events we want to receive */
    GADGETUP|CLOSEWINDOW|
    MENUPICK,
    WINDOWDRAG|WINDOWDEPTH|     /* A nice User/Me friendly window :) */
    WINDOWCLOSE|ACTIVATE|
    NOCAREREFRESH|SMART_REFRESH,
    NULL,                       /* Attatch Gadgets later */
    NULL,                       /* No Custom CheckMark Image */
    WINDOWNAME,                 /* Title */
    NULL,                       /* On workbench screen so ignored... */
    NULL,                       /* ...and so no bitmap either        */
    ~0,~0,                      /* Min/Max Width no sizing- doesn't matter*/
    ~0,~0,                      /* Min/Max Height  "    "      "     "    */
    WBENCHSCREEN                /* Window on WB */
    };

#define IWIDTH  96
#define IHEIGHT  8


/** TaskTool Menu Items **/

struct IntuiText TaskToolText[] =
    {
        {2,1,JAM2, 2,1, NULL, "About...", NULL},
        {2,1,JAM2, 2,1, NULL, "Iconify", NULL},
        {2,1,JAM2, 2,1, NULL, "Print", NULL},
        {2,1,JAM2, 2,1, NULL, "Quit", NULL}
    };

struct MenuItem TaskToolItem[] =
    {
        /* About... */
        {
        &TaskToolItem[1],               /* Next Item */
        0,0,                            /* LeftEdge, TopEdge (Adjusted Later)*/
        IWIDTH,IHEIGHT,                 /* Width, Height */
        ITEMTEXT|ITEMENABLED|HIGHCOMP,  /* Normal Item */
        0,                              /* No Mutual Exclude */
        (APTR) &TaskToolText[0],        /* The Text for this item */
        NULL,NULL,NULL,                 /* !SelectI !Command !SubItem */
        MENUNULL                        /* NextSelect field (Intuitions) */
        },

        /* Iconify */
        {
        &TaskToolItem[2],
        0,10,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|COMMSEQ,
        0,
        (APTR) &TaskToolText[1],
        NULL,'I',NULL,                  /* Shortcut 'I' */
        MENUNULL
        },

        /* Print */
        {
        &TaskToolItem[3],
        0,10,
        IWIDTH,IHEIGHT,
        ITEMTEXT|HIGHCOMP|COMMSEQ,
        0,
        (APTR) &TaskToolText[2],
        NULL,'P',NULL,                  /* Shortcut 'P' */
        MENUNULL
        },

        /* Quit */
        {
        NULL,
        0,20,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP,
        0,
        (APTR) &TaskToolText[3],
        NULL,NULL,NULL,
        MENUNULL
        }
    };


/** Refresh Menu Items **/

struct IntuiText RefreshText[] =
    {
        {2,1,JAM2, CHECKWIDTH,1, NULL, "Manual", NULL},
        {2,1,JAM2, CHECKWIDTH,1, NULL, "Activity", NULL},
        {2,1,JAM2, CHECKWIDTH,1, NULL, "Timed »»", NULL}
    };

struct IntuiText Refresh_TimedText[] =
    {
        {2,1,JAM2, CHECKWIDTH,1,NULL, "  5 Seconds",NULL},
        {2,1,JAM2, CHECKWIDTH,1,NULL, " 30 Seconds",NULL},
        {2,1,JAM2, CHECKWIDTH,1,NULL, " 60 Seconds",NULL},
        {2,1,JAM2, CHECKWIDTH,1,NULL, "300 Seconds",NULL}
    };

struct MenuItem Refresh_Timed[] =
    {
        {
        &Refresh_Timed[1],
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT|CHECKED,
        2+4+8,
        (APTR) &Refresh_TimedText[0],
        NULL,NULL,NULL,
        MENUNULL
        },
        {
        &Refresh_Timed[2],
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,
        1+4+8,
        (APTR) &Refresh_TimedText[1],
        NULL,NULL,NULL,
        MENUNULL
        },
        {
        &Refresh_Timed[3],
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,
        1+2+8,
        (APTR) &Refresh_TimedText[2],
        NULL,NULL,NULL,
        MENUNULL
        },
        {
        NULL,
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,
        1+2+4,
        (APTR) &Refresh_TimedText[3],
        NULL,NULL,NULL,
        MENUNULL
        }
};




struct MenuItem RefreshItem[] =
    {
        /* Manual */
        {
        &RefreshItem[1],
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT           /* Toggle Item */
        |CHECKED,                                       /* Default On*/
        2+4,                                            /* Excludes */
        (APTR) &RefreshText[0],
        NULL,NULL,NULL,
        MENUNULL
        },

        /* Activity */
        {
        &RefreshItem[2],
        0,10,
        IWIDTH,IHEIGHT,
        ITEMTEXT|HIGHCOMP|CHECKIT,                      /* Toggle Item */
        1+4,                                            /* Excludes */
        (APTR) &RefreshText[1],
        NULL,NULL,NULL,
        MENUNULL
        },

        /* Timed */
        {
        NULL,
        0,20,
        IWIDTH,IHEIGHT,
        ITEMTEXT|ITEMENABLED|HIGHCOMP|CHECKIT,          /* Toggle Item */
        1+2,                                            /* Excludes */
        (APTR) &RefreshText[2],
        NULL,NULL,
        &Refresh_Timed[0],                              /* SubItems */
        MENUNULL
        }
    };


/** Task Menu Items **/

struct IntuiText TaskText[] =
    {
        {2,1,JAM2, CHECKWIDTH,1, NULL, "Suspend", NULL},
        {2,1,JAM2, 2,1, NULL, "Remove", NULL}
    };

struct MenuItem TaskItem[] =
    {
        /* Suspend */
        {
        &TaskItem[1],
        0,0,
        IWIDTH,IHEIGHT,
        ITEMTEXT|HIGHCOMP|CHECKIT|MENUTOGGLE,  /* Toggle Item Default off */
        0,
        (APTR) &TaskText[0],
        NULL,NULL,NULL,
        MENUNULL
        },

        /* Remove */   /* Disabled after use */
        {
        NULL,
        0,10,
        IWIDTH,IHEIGHT,
        ITEMTEXT|HIGHCOMP,          /* Normal Item */
        0,
        (APTR) &TaskText[1],
        NULL,NULL,NULL,
        MENUNULL
        }
    };


/** Menu Titles **/

struct Menu TaskToolMenus[] =
    {
        {
        &TaskToolMenus[1],          /* Next Menu */
        0,0,                        /* LeftEdge, Topedge */
        72,0,                       /* Width, Height */
        MENUENABLED,
        "TaskTool",                 /* Title */
        &TaskToolItem[0]            /* First Item */
        },

        {
        &TaskToolMenus[2],
        80,0,
        64,0,
        MENUENABLED,
        "Refresh",
        &RefreshItem[0]
        },

        {
        NULL,                       /* No more menus */
        152,0,
        40,0,
        MENUENABLED,
        "Task",
        &TaskItem[0]
        }
    };


    /** Border/Image Structures for Window Features **/


/* Borders for Names List */

SHORT NamesList_Border_XY[][12]=
    {
        {               /* Names List Border Blue Line */
        17,9,
        17,85,
        143,85,
        143,9,
        18,9,
        18,84
        },
        {               /* Slider Blue line */
        166,85,
        166,9,
        144,9,
        144,85,
        165,85,
        165,10
        },
        {               /* Shadow Black Line */
        23,86,
        167,86,
        167,11,
        168,11,
        168,86
        },
        {
        145,10,         /* Slider Box (White) */
        164,10,
        164,64,
        145,64,
        145,11
        }
    };


struct Border NamesList_Border[] =
    {
        {                               /* Names List Border Blue Line */
        0,0,                            /* Base Position */
        0,1,JAM1,                       /* WB Blue */
        6,                              /* 6 Coordinates */
        (SHORT *)&NamesList_Border_XY[0],/* Coordinate pairs */
        &NamesList_Border[1]   /* Next Border */
        },

        {                           /* Slider Blue Line */
        0,0,
        0,1,JAM1,
        6,
        (SHORT *)&NamesList_Border_XY[1],
        &NamesList_Border[2]
        },

        {                           /* Shadow Black Line */
        0,0,
        2,1,JAM1,
        5,
        (SHORT *)&NamesList_Border_XY[2],
        &NamesList_Border[3]
        },

        {                           /* Slider Box (White) */
        0,0,
        1,1,JAM1,
        5,
        (SHORT *)&NamesList_Border_XY[3],
        NULL                        /* No more Borders for Names */
        }
    };

/* Borders for Pri-Slider */

SHORT PriSlider_Border_XY[][12]=
    {
        {
        166,110,            /* Slider Blue outline */
        166,120,
        55,120,
        55,110,
        165,110,
        165,119
        },
        {                   /* String Gad Blue Outline */
        17,120,
        17,110,
        54,110,
        54,120,
        18,120,
        18,110
        },
        {                   /* Shadow Black line */
        25,121,
        167,121,
        167,113,
        168,113,
        168,121
        },
        {                   /* Slider White outline */
        56,111,
        120,111,
        120,119,
        56,119,
        56,112
        }
    };


struct Border PriSlider_Border[] =
    {
        {                           /* Slider Blue Outline */
        0,0,                        /* Base Position */
        0,1,JAM1,                   /* WB Blue */
        6,                          /* 6 Coordinates */
        (SHORT *)&PriSlider_Border_XY[0],    /* Coordinate pairs */
        &PriSlider_Border[1]        /* Next Border */
        },

        {                           /* String Gad Blue outline */
        0,0,
        0,1,JAM1,
        6,
        (SHORT *)&PriSlider_Border_XY[1],
        &PriSlider_Border[2]
        },

        {                           /* Shadow Black Line */
        0,0,
        2,1,JAM1,
        5,
        (SHORT *)&PriSlider_Border_XY[2],
        &PriSlider_Border[3]
        },

        {                           /* Slider White Outline */
        0,0,
        1,1,JAM1,
        5,
        (SHORT *)&PriSlider_Border_XY[3],
        NULL                        /* No more Borders for PriSlider */
        }
    };

SHORT RefreshGad_Border_XY[] = /* Refresh Gadget Shadow */
    {
    147,103,
    166,103,
    166,94,
    167,94,
    167,103
    };

struct Border RefreshGad_Border =  /* Refresh Gadget Shadow */
    {
    0,0,                        /* Base Position */
    2,1,JAM1,                   /* WB Black */
    5,                          /* 6 Coordinates */
    (SHORT *)&RefreshGad_Border_XY[0],    /* Coordinate pairs */
    NULL                        /* No Next Border */
    };


/* Rectangle for filling TaskTool Window */

struct Image WindowFill = { 0,0, 0,0, 0, NULL, 0x0, 0x1, NULL };


    /** IntuiText Structures **/

struct IntuiText PText = { 2,1, JAM2, 17,100, &TTTextAttr, "Priority", NULL };

#endif