fix(fn-run): propagar stdout/stderr de bash functions library-style #1

Open
dataforge wants to merge 537 commits from auto/0077-fn-run-bash-mudo into master
3 changed files with 101 additions and 0 deletions
Showing only changes of commit dcd1843609 - Show all commits
+19
View File
@@ -0,0 +1,19 @@
#include "core/fullscreen_window.h"
#include "imgui.h"
bool fullscreen_window_begin(const char* id) {
const ImGuiViewport* vp = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(vp->WorkPos);
ImGui::SetNextWindowSize(vp->WorkSize);
return ImGui::Begin(id, nullptr,
ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoCollapse |
ImGuiWindowFlags_NoBringToFrontOnFocus |
ImGuiWindowFlags_NoNavFocus);
}
void fullscreen_window_end() {
ImGui::End();
}
+16
View File
@@ -0,0 +1,16 @@
#pragma once
// fullscreen_window — ImGui window that covers the entire viewport.
// No title bar, no resize, no move, no collapse. Supports scrolling.
//
// Usage:
// if (fullscreen_window_begin()) {
// // render content here
// }
// fullscreen_window_end(); // ALWAYS call, even if begin returned false
//
// The default id "##fullscreen" is invisible (## prefix suppresses display).
// Use a different id if you need multiple fullscreen windows stacked.
bool fullscreen_window_begin(const char* id = "##fullscreen");
void fullscreen_window_end();
+66
View File
@@ -0,0 +1,66 @@
---
name: fullscreen_window
kind: component
lang: cpp
domain: core
version: "0.1.0"
purity: pure
signature: "bool fullscreen_window_begin(const char* id = \"##fullscreen\"); void fullscreen_window_end()"
description: "Ventana ImGui fullscreen sin decoraciones que ocupa todo el viewport, elimina la necesidad de usar el sistema de ventanas interno"
tags: [imgui, layout, fullscreen, window]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [imgui]
tested: false
tests: []
test_file_path: ""
file_path: "cpp/functions/core/fullscreen_window.cpp"
framework: imgui
params:
- name: id
desc: "Identificador ImGui de la ventana, default ##fullscreen (el prefijo ## oculta el texto del titulo)"
output: "true si la ventana es visible (siempre true en fullscreen); llamar siempre fullscreen_window_end() independientemente del valor de retorno"
---
# fullscreen_window
Wrapper que crea una ventana ImGui que ocupa exactamente el viewport de trabajo (`WorkPos` / `WorkSize`). Elimina todas las decoraciones: title bar, resize grip, move, collapse. Ideal como capa raiz de una aplicacion ImGui donde el contenido propio gestiona el layout.
## Uso
```cpp
if (fullscreen_window_begin()) {
// todo el layout de la app va aqui
dashboard_grid_begin(3, 8.0f);
// ...
dashboard_grid_end();
}
fullscreen_window_end(); // siempre llamar
```
Con ID explicito (si se necesitan multiples capas):
```cpp
if (fullscreen_window_begin("##background")) {
render_background();
}
fullscreen_window_end();
```
## Implementacion
- `GetMainViewport()` obtiene el viewport principal (compatible con viewports multi-monitor de ImGui)
- `SetNextWindowPos(vp->WorkPos)` posiciona en el area de trabajo (excluye menu bars del OS)
- `SetNextWindowSize(vp->WorkSize)` ocupa exactamente el area disponible
- Flags: `NoTitleBar | NoResize | NoMove | NoCollapse | NoBringToFrontOnFocus | NoNavFocus`
- `NoBringToFrontOnFocus` y `NoNavFocus` evitan que la ventana fullscreen robe el foco de ventanas superpuestas
## Notas
- Pura en el sentido de que no hace I/O ni tiene estado propio; solo configura el estado next-frame de ImGui.
- `WorkPos`/`WorkSize` respetan los menu bars del sistema operativo (en plataformas que los tienen). Para ocupar literalmente toda la pantalla usar `Pos`/`Size` del viewport.
- Compatible con `dashboard_grid` y `dashboard_panel`: el fullscreen_window actua como contenedor raiz y los paneles/grids se renderizan dentro.
- El patron begin/end es idiomatico en ImGui: `end` debe llamarse siempre para cerrar la ventana correctamente, aunque `begin` retorne false.