cwIoAudioPanel.cpp,cwIoSocketChat.cpp,cwIoTest.cpp,html/ioTest : Updates to support kExecTId callback and latest UI javascript library.

This commit is contained in:
kevin 2024-12-01 13:34:14 -05:00
parent 83946c1920
commit 7ed651a7c3
7 changed files with 741 additions and 231 deletions

View File

@ -350,6 +350,9 @@ cw::rc_t cw::io::audio_panel::exec( handle_t h, const msg_t& m )
rc = _uiCb(p,m.u.ui); rc = _uiCb(p,m.u.ui);
break; break;
case kExecTId:
break;
default: default:
assert(0); assert(0);

View File

@ -71,7 +71,8 @@ namespace cw {
char s[sn+1]; char s[sn+1];
snprintf(s,sn,"Chat: %i", io::socketPort(p->ioH, p->sockIdx )); snprintf(s,sn,"Chat: %i", io::socketPort(p->ioH, p->sockIdx ));
uiCreateDiv( p->ioH, divUuId, parentUuId, nullptr, p->baseAppId + kUiDivAppId, chanId, "uiCol", s );
uiCreateDiv( p->ioH, divUuId, parentUuId, nullptr, p->baseAppId + kUiDivAppId, chanId, "uiPanel", s );
uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiSendTextAppId, chanId, "uiText", "Send" ); uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiSendTextAppId, chanId, "uiText", "Send" );
uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemoteAddrAppId, chanId, "uiText", "Addr", "127.0.0.1" ); uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemoteAddrAppId, chanId, "uiText", "Addr", "127.0.0.1" );
uiCreateNumb( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemotePortAppId, chanId, "uiNumb", "Port", 0, 0xffff, 1, 0, 0 ); uiCreateNumb( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemotePortAppId, chanId, "uiNumb", "Port", 0, 0xffff, 1, 0, 0 );
@ -305,6 +306,9 @@ cw::rc_t cw::io::sock_chat::exec( handle_t h, const msg_t& m )
rc = _uiCb(p,m.u.ui); rc = _uiCb(p,m.u.ui);
break; break;
case kExecTId:
break;
default: default:
assert(0); assert(0);

View File

@ -210,6 +210,9 @@ namespace cw
rc = uiCb(app,m->u.ui); rc = uiCb(app,m->u.ui);
break; break;
case kExecTId:
break;
default: default:
assert(0); assert(0);

View File

@ -40,6 +40,7 @@ label {
} }
.uiCtlDiv { .uiCtlDiv {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -73,3 +74,105 @@ label {
background-color: LightBlue; background-color: LightBlue;
} }
/* outer log div - contains the log label and the log scroller */
.uiLogDiv {
display: flex;
flex-direction: column;
align-items: flex-start; /* left justify */
align-content: flex-stretch; /* fill horizontal space */
}
.uiLogDiv label {
width: 100%;
background-color: LightSteelBlue;
}
/* log scroller */
.uiLog {
display:flex;
flex-direction: column;
height: 150px;
overflow-x: hidden; /* 'hidden' to remove x scroll bar */
overflow-y: auto;
width: 100%;
background-color: PowderBlue;
}
/* The log text */
.uiLog pre {
}
/* outer list div - contains the list label and the list scroller */
.uiListDiv {
display: flex;
flex-direction: column;
align-items: flex-start; /* left justify */
align-content: flex-stretch; /* fill horizontal space */
}
.uiListDiv label {
width: 100%;
background-color: LightSteelBlue;
}
.uiList {
display:flex;
flex-direction: column;
height: 100px;
width: 100%;
overflow-x: hidden; /* 'hidden' to remove scroll bar */
overflow-y: auto;
background-color: PowderBlue;
}
/* outer list div - contains the list label and the list scroller */
.uiHListDiv {
display: flex;
flex-direction: row;
align-items: flex-start; /* left justify */
align-content: flex-stretch; /* fill horizontal space */
}
.uiHListDiv label {
width: 100%;
background-color: LightSteelBlue;
}
.uiHList {
display:flex;
flex-direction: row;
height: 100%;
overflow-x: auto;
overflow-y: hidden; /* 'hidden' to remove scroll bar */
background-color: PowderBlue;
}
.uiStringDisp {
width: 100%;
}
.uiSelected {
border: 1px solid blue;
}

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>UI Test App</title> <title>IO Test App</title>
<script type="text/javascript" src="js/ui.js"></script> <script type="text/javascript" src="js/ui.js"></script>
<link href="css/ui.css" rel="stylesheet"> <link href="css/ui.css" rel="stylesheet">

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
{ {
main: {
parent: "uiDivId" parent: "uiDivId"
panel: { panel: {
name: "panelDivId", name: "panelDivId",
title: "CW Test", title: "IO Test",
row: { row: {
button:{ name: quitBtnId, title:"Quit" }, button:{ name: quitBtnId, title:"Quit" },
button:{ name: reportBtnId title:"Report" } button:{ name: reportBtnId title:"Report" }
}, },
}
} }