Skip to content

Add in-window view switcher (clickable tabs); v3.5 - #16

Merged
CryptoJones merged 1 commit into
mainfrom
add-view-switcher-tabs
Jul 5, 2026
Merged

Add in-window view switcher (clickable tabs); v3.5#16
CryptoJones merged 1 commit into
mainfrom
add-view-switcher-tabs

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

What

Adds a clickable tab bar across the top of every Dix layout so users can switch views inside the window — no VLC menu diving.

Tabs: DASH · KEYS · SPECTRO · SPECTRUM · WAVE · STEREO (KEYS = the compose/key view). The active tab is highlighted.

Why

VLC's Audio ▸ Visualizations menu only toggles the visualization on/off; picking a Dix layout previously meant digging into advanced preferences. This makes view-switching a one-click, in-window action.

How

  • draw_tab_bar() renders the tabs in the top bar next to the DIX wordmark and the track-title/status block.
  • DixTabClick() hooks the vout mouse-clicked coords variable; clicks arrive in 1280×720 source space and are hit-tested against dix_tab_rect(), which the renderer and click handler share so drawing and hit-testing can't drift.
  • Callback added in Open, removed in Close before the vout is released. The handler writes only an aligned int (the layout) that the render thread reads next frame — no lock, one-frame lag is imperceptible.

Verification

  • Builds clean at v3.5; unit tests still pass.
  • A v3.5 instance ran healthy (no crash; the transient "quit unexpectedly" dialogs during testing were SIGTERM from killing throwaway test instances, confirmed via crash-log signal — not a plugin fault).
  • Visual confirmation of the rendered tab bar to follow via screenshots (README view gallery in a follow-up).

Closes #15.

🤖 Generated with Claude Code

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

VLC's Audio > Visualizations menu only toggles Dix on/off -- picking a layout
required diving into advanced preferences. Add a clickable tab bar across the
top of every layout so users switch views with a mouse click inside the Dix
window: DASH, KEYS (compose/key view), SPECTRO, SPECTRUM, WAVE, STEREO.

Implementation:
- draw_tab_bar() renders the tabs (active tab highlighted) in the top bar,
  alongside the DIX wordmark and the track-title/status block.
- DixTabClick() hooks the vout "mouse-clicked" coords variable; clicks arrive
  in 1280x720 source space and are hit-tested against dix_tab_rect(), which the
  renderer and the click handler share so drawing and hit-testing never drift.
- Callback added in Open, removed in Close before releasing the vout. The
  handler only writes an aligned int (layout) read by the render thread next
  frame -- no lock needed, a one-frame lag is imperceptible.

Closes #15. Bumps DIX_VERSION to 3.5; documents the switcher in the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JpVzsy8Wrc9DYEXns2Njzb
@CryptoJones
CryptoJones merged commit f8b524a into main Jul 5, 2026
6 checks passed
@CryptoJones
CryptoJones deleted the add-view-switcher-tabs branch July 5, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In-window view switcher (clickable tabs)

1 participant