Following are the duration ranges and the granularity that is offered in each range:
| Range | Increment |
| 0..5m | 1 min |
| 5m..1hr | 5 min |
| 1hr..4hr | 15 min |
| 4hr..10hr | 30 min |
| 10hr..24hr | 1 hr |
| 24hr..4d | 6 hr |
| 4d.. | 1 day |
We don't really adjust for durations over 4 days. The ranges we are concerned with don't get much larger.
For the purpose of writing this piece of code, I have chosen the term "tick" to refer to a period of granularity. The number of periods of granularity (inclusive) within a certain duration interval is referred to as the number of ticks in the interval. For example, there are 4 ticks between the interval of 3 minutes to 10 minutes. Each occuring at the start of 3min, 4, 5 and 10mins. And thusly the slider control will display 4 ticks if it is displaying the interval 3-10mins.
Data Structures | |
| struct | tag_khui_tracker |
| Tracker data. More... | |
Typedefs | |
| typedef tag_khui_tracker | khui_tracker |
| Tracker data. | |
Functions | |
| KHMEXP void KHMAPI | khui_tracker_install (HWND hwnd_edit, khui_tracker *tc) |
| Install a tracker into an edit control. | |
| KHMEXP void KHMAPI | khui_tracker_reposition (khui_tracker *tc) |
| KHMEXP void KHMAPI | khui_tracker_initialize (khui_tracker *tc) |
| KHMEXP void KHMAPI | khui_tracker_refresh (khui_tracker *tc) |
| KHMEXP void KHMAPI | khui_tracker_kill_controls (khui_tracker *tc) |
| KHMEXP void KHMAPI khui_tracker_install | ( | HWND | hwnd_edit, | |
| khui_tracker * | tc | |||
| ) |
Install a tracker into an edit control.
Once installed, the edit control becomes a duration editor. The tracker data structure that is supplied should remain as is for the lifetime of the edit control.
The tracker strucutre should have been initialized with a call to khui_tracker_initialize() and should have valid values in the min, max and current fields.
|
Generated on Fri Aug 3 08:27:14 2007 for Network Identity Manager by Doxygen 1.5.2 © 2004-2007 Massachusetts Institute of Technology. © 2005-2007 Secure Endpoints Inc. Contact khimaira@mit.edu |
|