Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,30 @@ run siwinGlobals.newSoftwareRenderingWindow(title="pixie example"), WindowEvents
)
```

<h2 align="center">popup windows</h2>

This api adds popup windows. On Wayland these are required to do popups, but on other platforms these will just be frameless windows.

```nim
import siwin, vmath

let globals = newSiwinGlobals()
let parent = globals.newSoftwareRenderingWindow()

let placement = PopupPlacement(
anchorRectPos: ivec2(100, 100),
anchorRectSize: ivec2(120, 40),
size: ivec2(320, 220),
anchor: Edge.bottomLeft,
gravity: Edge.topLeft,
offset: ivec2(0, 8),
constraintAdjustment: {PopupConstraintAdjustment.pcaSlideX, PopupConstraintAdjustment.pcaFlipY},
reactive: true,
)

let popup = globals.newPopupWindow(parent, placement)
```

<h2 align="center">clipboard</h2>

```nim
Expand Down
Loading
Loading