import '../lib/polyfill.js' import * as gui from 'gui' import { useState } from 'react' import { render, Button, Tab } from '../lib/react-qw/index.js' gui.RegisterClass('TabDemo', (hwnd, msg, wParam, lParam) => { if (!hwnd) return gui.DefWindowProc(hwnd, msg, wParam, lParam) if (msg === gui.WmMsg.DESTROY) { gui.PostQuitMessage(0) return 0 } return gui.DefWindowProc(hwnd, msg, wParam, lParam) }) function App() { const [tabIndex, setTabIndex] = useState(0) return ( ), }, { title: 'Buttons', content: ( ), }, { title: 'Final', content: ( ), }, ]} style={{ flexGrow: 1 }} selectedIndex={tabIndex} onChange={(i) => setTabIndex(i)} /> ) } const hwnd = gui.CreateWindow( 'TabDemo', 'Tab Demo', gui.WindowStyle.OVERLAPPEDWINDOW, 100, 100, 640, 480, null, null ) if (hwnd) { gui.ShowWindow(hwnd) render(, hwnd) }