Copyright © 1998-2006,2011 Dipl.-Inform. Kai Hofmann. All rights reserved! |
|||||||
Names of weekdays and numbers of weeks can be shown or hidden. The language to use for the short names of weekdays can be chosen and the first day of the week can be defined at object creation time. Setting a notify on MCC_Date/MUIA_Date_Day makes it easy for your GUI to act on user input.
/*result =*/ set(obj, MUIA_MonthNavigator_Draggable,TRUE);
/*result =*/ get(obj, MUIA_MonthNavigator_Draggable, &draggable);
MUIA_MonthNavigator_Draggable, draggable,
Defaults to: FALSE
MUIA_MonthNavigator_DragDropHook, &hook,
/*result =*/ set(obj,MUIA_MonthNavigator_DragDropHook,&hook);
Defaults to: NULL
ULONG __saveds __asm DragDropFkt(register __a0 struct Hook *hook,
register __a1 Object *obj,
register __a2 struct MUIS_MonthNavigator_MarkDay *day)
{
/* do something with the object */
/* mark the day if needed */
return(TRUE); /* changed day contents */
return(FALSE); /* day contents is unchanged */
}
All other settings are predefined with the actual content. See MUIA_MonthNavigator_MarkHook for more.
MUIA_MonthNavigator_DragQueryHook, &hook,
/*result =*/ set(obj,MUIA_MonthNavigator_DragQueryHook,&hook);
Defaults to: NULL
ULONG __saveds __asm DragQueryFkt(register __a0 struct Hook *hook,
register __a1 Object *obj,
register __a2 struct MUIS_MonthNavigator_MarkDay *day)
{
/* return(MUIV_DragQuery_Accept) when the object is supported */
/* return(MUIV_DragQuery_Refuse) otherwise */
}
All other settings are predefined with the actual content. See MUIA_MonthNavigator_MarkHook for more.
MUIA_MonthNavigator_Dropable, dropable,
/*result =*/ set(obj, MUIA_MonthNavigator_Dropable,dropable);
/*result =*/ get(obj, MUIA_MonthNavigator_Dropable, &dropable);
Defaults to: FALSE
MUIA_MonthNavigator_FixedTo6Rows, TRUE,MUIA_MonthNavigator_InputMode, inputmode,Defaults to: MUIV_MonthNavigator_InputMode_None
See Area.mui/MUIA_InputMode for more.
MUIA_MonthNavigator_Layout, layout,\*result =*\ get(obj,MUIA_MonthNavigator_layout,&layout);MUIA_MonthNavigator_LineWeekdayNames, lwn,MUIA_MonthNavigator_LineWeekNumbers, lwn,MUIA_MonthNavigator_MarkHook, &hook,
/*result =*/ set(obj,MUIA_MonthNavigator_MarkHook,&hook);
Defaults to: NULL
Builtin mark hooks:
ULONG __saveds __asm MarkFkt(register __a0 struct Hook *hook,
register __a2 struct MUIS_MonthNavigator_MarkDay *markday)
{
if ((markday->Year >= 1970) && (markday->Month == 9) &&
(markday->Day == 18))
{
markday->PreParse = "\033n\0338\033c";
return(TRUE); /* changed markday contents */
}
else
{
return(FALSE); /* markday contents is unchanged */
}
}
Background is predefined with MUII_ButtonBack or MUII_TextBack, depending on the InputMode.
MUIA_MonthNavigator_MonthAdjust, 1,MUIA_MonthNavigator_ShowInvisibles, FALSE,Defaults to FALSE
Invisible fields will not be shown if you switch off frames and set the object to be a read-only one.
MUIA_MonthNavigator_ShowLastMonthDays, FALSE,Defaults to FALSE
The days of the previous month will only be shown in ImmediateMode.
MUIA_MonthNavigator_ShowNextMonthDays, FALSE,Defaults to FALSE
The days of the following month will only be shown in ImmediateMode.
MUIA_MonthNavigator_ShowWeekNumbers, FALSE,Defaults to TRUE
MUIA_MonthNavigator_ShowWeekdayNames, FALSE,Defaults to TRUE
MUIA_MonthNavigator_UseFrames, useframes,Defaults to: TRUE
Setting this attribute to FALSE only works when the object is in read-only mode, because MUI only supports PhantomFrames for horizontal usage.
MUIA_MonthNavigator_WeekNumbersSpacing, spacing,Defaults to 8
MUIA_MonthNavigator_WeekdayNamesSpacing, spacing,Defaults to 8
\*result =*\ DoMethod(obj,MUIM_MonthNavigator_DragDrop,obj,dayobj,Year,Month,Day);\*result =*\ DoMethod(obj,MUIM_MonthNavigator_DragQuery,obj,dayobj,Year,Month,Day);\*result =*\ DoMethod(obj,MUIM_MonthNavigator_Mark,dayobj,Year,Month,Day);/*result =*/ DoMethod(obj,MUIM_MonthNavigator_Update);