4 class ReminderWindow : Window
7 background = activeBorder;
13 minClientSize = { 360, 100 };
17 property Seconds delay
22 char msg[MAX_F_STRING];
23 Minutes minutes = value;
24 minutes.ToString(s, class(Seconds));
25 sprintf(msg, "Remind Me Delay: %s", s);
33 char unescaped[16384];
36 struscpy(unescaped, app.argv[1]);
37 message.contents = unescaped;
41 property::delay = atoi(app.argv[2]);
51 Label note { this, text = "Note", position = { 16, 160 }, anchor = { left = 10, bottom = 10 } };
54 this, caption = "Remind Me", escape, anchor = { right = 54, bottom = 10 };
56 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
59 char msg[MAX_F_STRING];
60 Minutes minutes = delay;
61 minutes.ToString(s, class(Seconds));
62 sprintf(msg, "You will be reminded in %s", s);
63 if(MessageBox { parent = this, master = this, type = okCancel, text = "Remind Me", contents = msg }.Modal() == ok)
74 this, text = "Done", anchor = { right = 10, bottom = 10 };
76 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
78 if(MessageBox { parent = this, master = this, type = yesNo, text = "Done", contents = "Are you sure that you're done with this reminder?" }.Modal() == yes)
80 Destroy(0); //ButtonCloseDialog(button, x, y, mods);
85 EditBox message { this, text = "Message", anchor = { left = 8, top = 8, right = 8, bottom = 40 }, readOnly = true, multiLine = true, noCaret = true, borderStyle = none };
93 if(now - reminderWindow.lastTime > reminderWindow.delay)
95 reminderWindow.state = normal;
96 reminderWindow.Activate();
97 reminderWindow.timer.Stop();
104 ReminderWindow reminderWindow { };
106 class ReminderApp : GuiApplication
111 define app = ((ReminderApp)__thisModule);
113 static void struscpy(char * d, char * s)