//
// Logon resource file
//

#include "resource.h"

/*****************************************************
 * Element resources
 *****************************************************/

<style resid=framess>
    element
    {
        background: argb(0,0,0,0);
    }
    element [id=atom(contentcontainer)]
    {
        //background: gradient(argb(0,90,125,222),argb(0,165,186,239),1);
        //background: rgb(90,125,222);
        background: rgb(99,134,222);
        content: rcbmp(IDB_BACKGROUND,0,0,396rp,136rp,1,0);
    }
    button
    {
        background: rcbmp(IDB_SELECTION,6,#FF00FF,0,0,1,0);
        borderthickness: rect(8,8,0,8);
    }
</style>

<style resid=toppanelss>
    element
    {
        background: argb(0,0,0,0);
    }
    element [id=atom(toppanel)]
    {
        background: rgb(0,48,156);
    }
    element [id=atom(divider)]
    { 
        background: gradient(argb(0,198,219,247), argb(0,0,48,156), 0);
    }
</style>

<style resid=bottompanelss>
    element
    {
        background: argb(0,0,0,0);
    }
    element [id=atom(bottompanel)]
    {
        background: gradient(argb(0,57,52,173), argb(0,0,48,156), 0);
        fontface: rcstr(IDS_OPTIONSFONT);
    }
    element [id=atom(divider)]
    { 
        background: gradient(argb(0,249,158,41), argb(0,0,48,156), 0);
    }
    element [id=atom(options)]
    {
        padding: rect(25rp, 20rp, 25rp, 20rp);
    }
    button
    {
        fontsize: rcint(IDS_POWERFONTSIZE) pt;
        foreground: white;
        cursor: hand;
    }
    button [mousefocused]
    {
        fontstyle: underline;
    }
    button [keyfocused]
    {
        fontstyle: underline;
    }
    element [id=atom(instruct)]
    {
        contentalign: wrapleft;
        padding: rect(18rp,0,0,0);
        fontsize: rcint(IDS_INSTRUCTFONTSIZE) pt;
        foreground: white;
    }
</style>

<style resid=leftpanelss>
    element
    {
        background: argb(0,0,0,0);
        fontface: rcstr(IDS_WELCOMEFONT);
    }
    element [id=atom(leftpanel)]
    {
        foreground: rgb(239,247,255);
    }
    element [id=atom(welcome)]
    {
        fontstyle: italic;
        fontsize: rcint(IDS_WELCOMEFONTSIZE) pt;
        fontweight: bold;
        padding: rect(35rp,28rp,0,0);
    }
    element [id=atom(welcomeshadow)]
    {
        foreground: rgb(49,81,181);
        fontstyle: italic;
        fontsize: rcint(IDS_WELCOMEFONTSIZE) pt;
        fontweight: bold;
        padding: rect(37rp,31rp,0,0);
    }
    element[id=atom(help)]
    {
        fontsize: rcint(IDS_HELPFONTSIZE) pt;
        padding: rect(81rp,68rp,0,0);
        contentalign: wrapright;
    }
    element[id=atom(flag)]
    {
        padding: rect(190rp,7rp,0,0);
    }
</style>

<style resid=rightpanelss>
    element
    {
        background: argb(0,0,0,0);
    }
    element [id=atom(divider)]
    { 
        background: rgb(123,154,231);
    }
    scrollbar [vertical]
    {
        layoutpos: nineright;
        background: rgb(115,146,231);
    }
    viewer
    {
        layoutpos: nineclient;
    }
    thumb
    {
        background: rcbmp(IDB_SBTHUMBV,6,#FF00FF,0,0,1,0);
        borderthickness: rect(3,3,3,3);
    }
    repeatbutton [id=atom(lineup)]
    {
        content: rcbmp(IDB_SBLINEUPV,3,-1,sysmetric(SM_CYVSCROLL),sysmetric(SM_CYVSCROLL),0,0);
    }
    repeatbutton [id=atom(linedown)]
    {
        content: rcbmp(IDB_SBLINEDOWNV,3,-1,sysmetric(SM_CYVSCROLL),sysmetric(SM_CYVSCROLL),0,0);
    }
</style>

<style resid=accountlistss>
    element
    {
        background: argb(0,0,0,0);
        fontface: rcstr(IDS_ACCOUNTLISTFONT);
    }
    selector
    {
        padding: rect(26rp,26rp,26rp,26rp);
    }
    logonaccount
    {
        cursor: hand;
    }
    logonaccount [logonstate=1] // Granted
    {
        animation: rectangle | s | mediumfast;
        cursor: arrow;
    }
    element [id=atom(userpane)]
    {
        padding: rect(5rp,5rp,17rp,5rp);
        borderthickness: rect(5,5,0,5);
        bordercolor: rgb(99,134,222);
    }
    element [id=atom(userpane)][selected]
    {
        background: rcbmp(IDB_SELECTION,6,#FF00FF,0,0,1,0);
    }
    element [id=atom(picture)]
    {
        background: rcbmp(IDB_USERFRAME,6,#FF00FF,0,0,1,0);
        borderthickness: rect(2,2,3,3);
        margin: rect(0,0,7rp,0);
    }
    element [id=atom(username)]
    {
        fontsize: rcint(IDS_HELPFONTSIZE) pt;
        foreground: rgb(239,247,255);
    }
    button [class="status"]
    {
        background: argb(0,0,0,0);
        foreground: rgb(0,48,156);
        fontsize: rcint(IDS_STATUSFONTSIZE) pt;
        fontweight: bold;
    }
    button [class="status"][mousefocused]
    {
        fontstyle: underline;
    }
    button [class="status"][keyfocused]
    {
        fontstyle: underline;
    }
    button [class="status"][selected]
    {
        foreground: rgb(239,247,255);
        fontsize: rcint(IDS_STATUSFONTSIZE) pt;
        fontweight: bold;
    }
</style>

<style resid=passwordpaness>
    element
    {
        background: argb(0,0,0,0);
    }
    element [id=atom(passwordpanelayer)]
    {
        padding: rect(68rp,0,0,0);
    }
    element [id=atom(instruct)]
    {
        fontsize: rcint(IDS_STATUSFONTSIZE) pt;
        foreground: white;
        padding: rect(3rp,0,0,3rp);
    }
    edit [id=atom(password)]
    {
        background: rcbmp(IDB_EDITFRAME,6,#FF00FF,0,0,1,0);
        borderthickness: rect(3,3,5,5);
        passwordcharacter: 9679;
        fontface: "arial";
        fontsize: 16pt;
    }
    button [id=atom(go)]
    {
        margin: rect(5rp,0,0,0);
        content: rcbmp(IDB_GO,3,-1,26rp,26rp,0,0);
    }
    button [id=atom(go)][keyfocused]
    {
        content: rcbmp(IDB_GOKF,3,-1,26rp,26rp,0,0);
    }
    button [id=atom(info)]
    {
        margin: rect(13rp,0,0,0);
        content: rcbmp(IDB_INFO,3,-1,28rp,28rp,0,0);
    }
    button [id=atom(info)][keyfocused]
    {
        content: rcbmp(IDB_INFOKF,3,-1,28rp,28rp,0,0);
    }
</style>

//
// Logon frame
//

<logonframe resid=main id=atom(frame) sheet=styleref(framess) layout=borderlayout()>

    <element id=atom(toppanel) sheet=styleref(toppanelss) layout=borderlayout() layoutpos=top height=62rp>
        <element id=atom(divider) layoutpos=bottom height=2rp/>
    </element>

    <element id=atom(bottompanel) sheet=styleref(bottompanelss) layout=borderlayout() layoutpos=bottom>
        <element id=atom(divider) layoutpos=top height=2rp/>
        <element id=atom(options) layout=borderlayout() layoutpos=client>
            <element layout=borderlayout() layoutpos=left>
                <button id=atom(power) layout=borderlayout() layoutpos=top>
                    <element layoutpos=left content=rcbmp(IDB_POWER,3,-1,26rp,26rp,0,0)/>
                    <element id=atom(label) layoutpos=client margin=rect(2rp,0,0,0)/>
                </button>
                <button id=atom(undock) layout=borderlayout() layoutpos=none margin=rect(0,2rp,0,0)>
                    <element layoutpos=left content=rcbmp(IDB_UNDOCK,3,-1,26rp,26rp,0,0)/>
                    <element id=atom(label) layoutpos=client margin=rect(2rp,0,0,0)/>
                </button>
            </element>
            <element id=atom(instruct) layoutpos=right content=rcstr(IDS_MANAGEACCOUNTS) width=260rp/>
        </element>
    </element>

    <element id=atom(contentcontainer) layout=flowlayout(1,3,2,3) layoutpos=client>

        <element id=atom(leftpanel) sheet=styleref(leftpanelss) layout=filllayout() layoutpos=left width=370rp>
            <element layout=verticalflowlayout(0,0,0,2)>
                <element layout=filllayout()>
                    <element id=atom(welcomeshadow) content=rcstr(IDS_WELCOME)/>
                    <element id=atom(welcome) content=rcstr(IDS_WELCOME)/>
                    <element id=atom(help) content=rcstr(IDS_BEGIN)/>
                    <element id=atom(flag) content=rcbmp(IDB_FLAG,3,-1,45rp,39rp,0,0)/>
                </element>
            </element>
        </element>

        <element id=atom(rightpanel) sheet=styleref(rightpanelss) layout=borderlayout() layoutpos=left width=370rp>
            <element id=atom(divider) layoutpos=left width=1rp/>
            <scrollviewer id=atom(scroller) layoutpos=client xscrollable=false>
                <selector id=atom(accountlist) sheet=styleref(accountlistss) layout=verticalflowlayout(0,3,3,2)/>
            </scrollviewer>
        </element>

    </element>

</logonframe>

//
// Logon Account
//

<logonaccount resid=accountitem id=atom(accountitem) layout=filllayout()>
    <element id=atom(userpanelayer) layout=borderlayout() height=80rp>
        <element id=atom(userpane) layout=borderlayout() layoutpos=top>
            <element id=atom(picture) layoutpos=left/>
            <element id=atom(username) layoutpos=top/>
            <button id=atom(status0) class="status" layoutpos=none/>
            <button id=atom(status1) class="status" layoutpos=none/>
        </element>
    </element>
</logonaccount>


//
// Password pane
//

<element resid=passwordpanel id=atom(passwordpanelayer) sheet=styleref(passwordpaness) layout=borderlayout() height=80rp>
    <element layout=borderlayout() layoutpos=bottom>
        <edit id=atom(password) layoutpos=left width=163rp/>
        <button id=atom(go) layoutpos=left/>
        <button id=atom(info) layoutpos=left/>
    </element>
    <element id=atom(instruct) layoutpos=bottom content=rcstr(IDS_TYPEPASSWORD)/>
</element>
