wxFindReplaceDialog(3)
π wxFindReplaceDialog π
okay bestie, so this is the wxFindReplaceDialog page from the Erlang Module Definition manual, and it's genuinely such a fun one. let's get into it π«Ά
β¨ NAME β¨
wxFindReplaceDialog β it's a standard modeless dialog that lets your user search for some text (and maybe replace it with something else, if they're feeling spicy πΆοΈ). that's literally the whole vibe.
πΈ DESCRIPTION πΈ
so here's the tea: the actual searching is supposed to be done in the owner window, which is the parent of this dialog. which means β and this is important, no cap β unlike all the other standard dialogs, this one must have a parent window. can't skip it, can't fake it. π«
also, and this is lowkey iconic of it: there is no way to use this dialog in a modal way. it is always, by design and by implementation, modeless. periodt. that's not a bug, that's the whole personality. π
if you want a real example of it being used, go peek at the page_samples_dialogs sample. yw bestie β¨
this class is derived from β so it can use all their functions too β these absolute legends:
wxDialogwxTopLevelWindowwxWindowwxEvtHandler
wxWidgets docs for it: wxFindReplaceDialog
π DATA TYPES π
wxFindReplaceDialog() :: wx:wx_object().
π FUNCTIONS π
π« create(This, Parent, Data, Title, [Option]) -> boolean()
when
This :: wxFindReplaceDialog(),
Parent :: wxWindow:wxWindow(),
Data :: wxFindReplaceData:wxFindReplaceData(),
Title :: unicode:chardata(),
Option :: {style, integer()}.
creates the dialog! π and then, once it exists, you use wxWindow:show/2 to actually put it on screen. she's built but she's not visible yet, so hit that show.
β οΈ heads up bestie: theparentanddataparameters must be non-NULL. no NULLs allowed, fr fr.
π« destroy(This :: wxFindReplaceDialog()) -> ok.
destroys the object. bye bye ππ
π« getData(This) -> wxFindReplaceData:wxFindReplaceData()
when This :: wxFindReplaceDialog().
get the wxFindReplaceData object that this dialog is using. it's right there, go grab it π«΄
π« new() -> wxFindReplaceDialog().
the no-args constructor. just vibes, nothing filled in yet π±
π« new(Parent, Data, Title, [Option]) -> wxFindReplaceDialog()
when
Parent :: wxWindow:wxWindow(),
Data :: wxFindReplaceData:wxFindReplaceData(),
Title :: unicode:chardata(),
Option :: {style, integer()}.
the real constructor, with all the goods. π
β οΈ if you go with the default constructor (new/0), you must callcreate/5afterwards. also, same as before: theparentanddataparameters must be non-NULL. do not pass NULL, she will not have it. π
okay that's the whole page, you ate it π this little love letter was brought to you by Ericsson AB, from the wx 2.6 era β go forth and make your search dialog a main character, bestie π¦β
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms