X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FApplications%2Faxwin2_src%2FWM%2Finterface.c;h=b71d94465f264369eefe08d31fc3cd489c646e57;hb=8be652c8915e16cd64b0b34c84ca43d9f892ded9;hp=4d22b50f31c66aa13ae3116287651d845d545435;hpb=56f357ade393dc9e2c928971cfbd690dab72db18;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin2_src/WM/interface.c b/Usermode/Applications/axwin2_src/WM/interface.c index 4d22b50f..b71d9446 100644 --- a/Usermode/Applications/axwin2_src/WM/interface.c +++ b/Usermode/Applications/axwin2_src/WM/interface.c @@ -6,12 +6,67 @@ // === GLOBALS == int giInterface_Width = 0; +tElement *gpInterface_Sidebar; +tElement *gpInterface_MainArea; +tElement *gpInterface_HeaderBar; +tElement *gpInterface_TabBar; +tElement *gpInterface_TabContent; // === CODE === -void Interface_Render(void) +void Interface_Init(void) { + tElement *area; + tElement *btn, *text; + giInterface_Width = giScreenWidth/16; + WM_SetFlags(NULL, 0); + + // -- Create Sidebar -- + gpInterface_Sidebar = WM_CreateElement(NULL, ELETYPE_TOOLBAR, ELEFLAG_VERTICAL); + WM_SetSize( gpInterface_Sidebar, giInterface_Width ); + + // --- Top segment --- + area = WM_CreateElement(gpInterface_Sidebar, ELETYPE_BOX, ELEFLAG_VERTICAL); + // ---- Menu Button ---- + btn = WM_CreateElement(area, ELETYPE_BUTTON, ELEFLAG_NOSTRETCH); + WM_SetSize(btn, giInterface_Width); + //text = WM_CreateElement(btn, ELETYPE_IMAGE, ELEFLAG_SCALE); + //WM_SetText(text, "asset://LogoSmall.sif"); + text = WM_CreateElement(btn, ELETYPE_TEXT, 0); + WM_SetText(text, "Acess"); + + // ---- Plain
style spacer ---- + WM_CreateElement(area, ELETYPE_SPACER, 0); + + // Open Windows Go Here + + // --- Bottom Segment --- + area = WM_CreateElement(gpInterface_Sidebar, ELETYPE_BOX, ELEFLAG_VERTICAL|ELEFLAG_ALIGN_END); + + // ---- Plain
style spacer ---- + WM_CreateElement(area, ELETYPE_SPACER, 0); + + // ---- Version String ---- + text = WM_CreateElement(area, ELETYPE_TEXT, ELEFLAG_WRAP); + WM_SetText(text, "AxWin 1.0"); + + // -- Create Main Area and regions within -- + gpInterface_MainArea = WM_CreateElement(NULL, ELETYPE_BOX, ELEFLAG_VERTICAL); + gpInterface_HeaderBar = WM_CreateElement(gpInterface_MainArea, ELETYPE_BOX, 0); + gpInterface_TabBar = WM_CreateElement(gpInterface_MainArea, ELETYPE_TABBAR, 0); + gpInterface_TabContent = WM_CreateElement(gpInterface_MainArea, ELETYPE_BOX, 0); +} + +void Interface_Update(void) +{ + giInterface_Width = giScreenWidth/16; + WM_SetSize( gpInterface_Sidebar, giInterface_Width ); +} + +void Interface_Render(void) +{ + Video_FillRect( 0, 0, giInterface_Width, giScreenHeight,