![]() |
![]() |
![]() |
![]() |
Day.h, SelDay.h, and SelTime.h.
typedef enum     {    selectDayByDay, // return d/m/y    selectDayByWeek, // return d/m/y with d as same day of the week    selectDayByMonth // return d/m/y with d as same day of the month    } SelectDayType;typedef struct DaySelectorType    {    RectangleType bounds;    Boolean visible;    UInt8 reserved1;    Int16 visibleMonth; // month actually displayed    Int16 visibleYear; // year actually displayed    DateTimeType selected;    SelectDayType selectDayBy;    UInt8 reserved2;    } DaySelectorType;typedef struct {    UInt8 hours;    UInt8 minutes;    UInt8 seconds;    UInt8 reserved;} HMSTime;penDownEvent and ctlEnterEvent.
Boolean DayHandleEvent (const DaySelectorPtr pSelector, const EventType *pEvent)
|   |
|
Pointer to control object. |
|   |
|
Pointer to an EventType structure. |
true if the event was handled or false if it was not.
dayEnterEvent, it checks that the control id in the event record matches the id of the control specified. If they match, this routine will track the pen until it comes up in the bounds in which case daySelectEvent is sent.
dayExitEvent is sent.
Boolean SelectDay (const SelectDayType selectDayBy, Int16 *month, Int16 *day, Int16 *year, const Char *title)
|   |
|
The method by which the user should choose the day. Possible values are selectDayByDay,selectDayByWeek, and selectDayByMonth. See SelectDayType |
|   |
|
Month, day, and year selected. |
|   |
|
String title for the dialog. |
true if the OK button was pressed. If true, month, day, and year contain the new date.
SelectDayV10
Boolean SelectDay (Int16 *month, Int16 *day, Int16 *year, const Char title)
|   |
|
Month, day, and year selected. The initial values passed in these parameters must be valid. |
|   |
|
String title for the dialog. |
true if the OK button was pressed. In that case, the parameters passed are changed.
SelectDay.
SelectDay
Boolean SelectOneTime (Int16 *hour, Int16 *minute, const Char *titleP)
|   |
|
The hour selected in the form. |
|   |
|
The minute selected in the form. |
|   |
|
A pointer to a string to display as the title. Doesn't change as the function executes. |
true if the user selects OK and false otherwise. If true is returned, the values in hour and minute have probably been changed.
SelectTime if you want to display a dialog that specifies a single point in time, not a range of time from start to end.
SelectTimeV33
Boolean SelectTime (TimeType * startTimeP, TimeType * endTimeP, Boolean untimed, const Char * titleP, Int16 startOfDay, Int16 endOfDay, Int16 startOfDisplay)
|   |
|
Pass in true to indicate that no time is selected. If the user sets the time to no time then startTimeP and EndTimeP are both set to the constant noTime (-1). |
|   |
|
A pointer to a string to display as the title. Doesn't change as the function executes. |
|   |
|
The hour that the hour list displays at its top. To see earlier hours, the user can scroll the list up. The value must be between 0 to 12, inclusive. |
|   |
|
The hour used when the "All Day" button is selected. |
|   |
|
First hour initially visible. |
true if the user selects OK and false otherwise. If true is returned, the values in hour and minute have probably been changed.
SelectTime adds the endOfDay and startOfDisplay functionality.
SelectDay, SelectOneTime
Boolean SelectTimeV33 (TimeType *startTimeP, TimeType *EndTimeP, Boolean untimed, Char *title, Int16 startOfDay)
|   |
|
Pass in true to indicate that no time is selected. If the user sets the time to no time then startTimeP and EndTimeP are both set to the constant noTime (-1). |
|   |
|
A pointer to a string to display as the title. Doesn't change as the function executes. |
|   |
|
The hour that the hour list displays at its top. To see earlier hours, the user can scroll the list up. The value must be between 0 to 12, inclusive. |
true if the user selects OK and false otherwise. If true is returned, the values in hour and minute have probably been changed.
NOTE:  Obsolete functions are provided ONLY for backward compatibility; for example, so a 1.0 application will work on 3.x OS releases. New code should not call these routines!
SelectDay, SelectOneTime
|   | ![]() |
![]() |
![]() |
![]() |
  |