+
+ // CAL3 (alarm) page
+ ClockTime _alarmTime;
+ ClockTime _alarmIn;
+ // _alarmAnnotate shows that the alarm has been set at least once
+ // so the time should now be always annotated (there seems to be
+ // no way to remove it once set once!).
+ bool _alarmAnnotate;
+ // _alarmSet indicates that the alarm has been changed by the user
+ // and should be set in the main unit when the page looses focus
+ // (I don't think the alarm goes off unless the user leaves the
+ // CAL3 page after setting it).
+ bool _alarmSet;
+
+ // Calculate the alarm time based on the alarm-in value
+ void CalcAlarmTime();
+ // Calculate alarm-in based on the alarm time.
+ void CalcAlarmIn();
+
+ // Calculate the difference between 2 hr:min times.
+ // It is assumed that the second time is always later than the first one
+ // ie. that the day has wrapped if the second one is less,
+ // but is limited to intervals of < 24hr.
+ void TimeDiff(int hr1, int min1, int hr2, int min2, int &hrDiff, int &minDiff);