adime_d_cal..._result_proc(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44

✨ adime_d_calc_edit_result_proc ✨

okay bestie so this is a page from the Adime API Reference πŸ’– and it's literally about one tiny little function, but she's important, so let's go 🫢


🌸 NAME 🌸

adime_d_calc_edit_result_proc β€” the little dialog proc that shows off your calculator results πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <adime.h>

int adime_d_calc_edit_result_proc(int msg, DIALOG *d, int c);

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the dialog proc for the result of a calculator edit box. Not the input, not the vibes, the result. πŸ“Ÿβœ¨

Now, the way it's different from Allegro's own d_text_proc()? Two things, bestie, and both of them are iconic:

  • it uses the c parameter to figure out what color to draw with β€” see d_double_calc_edit_proc() for the whole tea β˜•
  • and it erases its whole area, even if the text doesn't fill it. no leftover crumbs, no ghost pixels, we clean up after ourselves in this house πŸ’…πŸ§Ή
not me being obsessed with a proc that just… clears its own rectangle. that's the bare minimum and yet. slay.

πŸ’œ SEE ALSO πŸ’œ


that's the whole page, bestie, she's short but she's perfect 🌈

signing off from the Adime corner of the manual, version 2.2.1 β€” go forth and render those calculator results with the correct color πŸ’–βœ¨

πŸ“¦ where this page comes from