Skip to content

Add TextCtrl::DisableAllSmartSubstitutions for macOS - #188

Merged
AllenDang merged 1 commit into
AllenDang:mainfrom
trypsynth:textctrl-smart-substitutions
Aug 17, 2026
Merged

Add TextCtrl::DisableAllSmartSubstitutions for macOS#188
AllenDang merged 1 commit into
AllenDang:mainfrom
trypsynth:textctrl-smart-substitutions

Conversation

@trypsynth

Copy link
Copy Markdown
Contributor

Summary

  • Adds wxd_TextCtrl_DisableAllSmartSubstitutions (macOS only), wrapping wxTextCtrl::OSXDisableAllSmartSubstitutions, which is only declared on the OSX-specific wxTextCtrl header.
  • Adds a disable_all_smart_substitutions method on the Rust TextCtrl widget, following the same manual-extern-declaration pattern used for the existing accessibility label helpers, since this symbol is guarded by #ifdef WXOSX and invisible to bindgen.

Motivation

Cocoa automatically substitutes straight quotes/hyphens for smart/curly variants in text fields unless a control opts out. For fields where a user's literal input should be preserved verbatim (search boxes, free text notes, and so on), this substitution is unwanted and currently cannot be disabled through wxDragon. wxWidgets already exposes OSXDisableAllSmartSubstitutions on the Cocoa port, it was just not wrapped yet.

Test plan

  • cargo build -p wxdragon succeeds locally.

@AllenDang
AllenDang merged commit fca03c5 into AllenDang:main Aug 17, 2026
14 checks passed
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.

2 participants