wxFindReplaceDialog(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– 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:

  • wxDialog
  • wxTopLevelWindow
  • wxWindow
  • wxEvtHandler

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: the parent and data parameters 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 call create/5 afterwards. also, same as before: the parent and data parameters 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