MCPcopy Create free account
hub / github.com/evilsocket/cake / draw

Function draw

cake-cli/src/chat.rs:328–343  ·  view source on GitHub ↗
(frame: &mut Frame, app: &mut App)

Source from the content-addressed store, hash-verified

326// ── Drawing ────────────────────────────────────────────────────────────────
327
328fn draw(frame: &mut Frame, app: &mut App) {
329 let area = frame.area();
330
331 let layout = Layout::vertical([
332 Constraint::Length(1), // tab bar
333 Constraint::Min(1), // content
334 ])
335 .split(area);
336
337 draw_tab_bar(frame, app, layout[0]);
338
339 match app.tab {
340 Tab::Chat => draw_chat(frame, app, layout[1]),
341 Tab::Cluster => draw_cluster(frame, app, layout[1]),
342 }
343}
344
345fn draw_tab_bar(frame: &mut Frame, app: &App, area: Rect) {
346 let chat_style = if app.tab == Tab::Chat {

Callers 1

run_appFunction · 0.85

Calls 3

draw_tab_barFunction · 0.85
draw_chatFunction · 0.85
draw_clusterFunction · 0.85

Tested by

no test coverage detected