2004-04-30 14:49:45 +00:00
<Type Name= "Calendar" FullName= "Gtk.Calendar" >
2003-03-25 22:32:50 +00:00
<TypeSignature Language= "C#" Value= "public class Calendar : Gtk.Widget, Implementor, IWrapper, IWrapper, IDisposable" Maintainer= "Lee Mallabone" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2003-02-12 02:00:12 +00:00
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
2003-10-28 00:48:23 +00:00
<AssemblyCulture > neutral</AssemblyCulture>
2003-02-12 02:00:12 +00:00
<Attributes />
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<ThreadSafetyStatement > Gtk# is thread aware, but not thread safe; See the <link location= "node:gtk-sharp/programming/threads" > Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-28 08:46:25 +00:00
<summary > Display a Calendar and/or allow the user to select a date.</summary>
2003-03-25 22:32:50 +00:00
<remarks >
<para > With a Calendar widget, dates are presented to the user one month at a time. Additional information and decorations can be added to the Calendar by using the <see cref= "T:Gtk.CalendarDisplayOptions" /> enumeration with the <see cref= "P:Gtk.DisplayOptions" /> property.</para>
<para > Days can be highlighted on the Calendar with <see cref= "M:Gtk.Calendar.MarkDay" /> or <see cref= "M:Gtk.Calendar.SelectDay" /> .</para>
2003-03-28 08:46:25 +00:00
<para > The following example shows a method that creates a simple Calendar displaying day names, headings and week numbers.
2003-03-25 22:32:50 +00:00
<example >
<code lang= "C#" >
// Create a calendar with some simple display options
public Calendar CreateCalendar ()
{
Calendar cal = new Calendar ();
cal.DisplayOptions = CalendarDisplayOptions.ShowHeading |
CalendarDisplayOptions.ShowDayNames |
CalendarDisplayOptions.ShowWeekNumbers;
2003-03-28 08:46:25 +00:00
cal.DaySelected += new EventHandler(HandleDaySelected);
2003-03-25 22:32:50 +00:00
return cal;
}
</code>
</example> </para>
2003-03-28 08:46:25 +00:00
<para > The following example shows a typical event handler that outputs the date when one is selected.
2003-03-25 22:32:50 +00:00
<example >
<code lang= "C#" >
// Typical event handler for capturing the selected date
2003-03-28 08:46:25 +00:00
void HandleDaySelected (object obj, EventArgs args)
2003-03-25 22:32:50 +00:00
{
2003-03-28 08:46:25 +00:00
Calendar activatedCalendar = (Calendar) obj;
Console.WriteLine (activatedCalendar.GetDate ().ToString ("yyyy/MM/dd"));
}
</code>
</example> </para>
</remarks>
</Docs>
<Base >
<BaseTypeName > Gtk.Widget</BaseTypeName>
</Base>
<Interfaces >
<Interface >
<InterfaceName > Atk.Implementor</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members >
<Member MemberName= "UnmarkDay" >
<MemberSignature Language= "C#" Value= "public bool UnmarkDay (uint day);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "day" Type= "System.UInt32" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Removes a visual marker from the specified <paramref name= "day" /> .</summary>
<param name= "day" > A day number from 1 to 31.</param>
<returns >
<see langword= "true" />
</returns>
<remarks >
<para > Visual markers are added to the Calendar with <see cref= "M:Gtk.Calendar.MarkDay" /> .</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "MarkDay" >
<MemberSignature Language= "C#" Value= "public bool MarkDay (uint day);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "day" Type= "System.UInt32" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Adds a visual marker to the specified <paramref name= "day" /> .</summary>
<param name= "day" > A day number from 1 to 31.</param>
<returns >
<see langword= "true" />
</returns>
<remarks />
</Docs>
</Member>
<Member MemberName= "SelectDay" >
<MemberSignature Language= "C#" Value= "public void SelectDay (uint day);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "day" Type= "System.UInt32" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Select a specified day on the displayed month.</summary>
<param name= "day" > A day number from 1 to 31.</param>
<remarks >
<para > A value of 0 for the <paramref name= "day" /> will unselect the currently selected day.</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "Freeze" >
<MemberSignature Language= "C#" Value= "public void Freeze ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Stops the Calendar from visually updating.</summary>
<remarks >
<para > If used before a large number of graphical updates, (such as calls to <see cref= "M:Gtk.Calendar.MarkDay" /> ), this method may prevent flicker. Once a batch of updates has taken place, call <see cref= "M:Gtk.Calendar.Thaw" /> to render them.</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "GetDate" >
<MemberSignature Language= "C#" Value= "public void GetDate (out uint year, out uint month, out uint day);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "year" Type= "System.UInt32&" RefType= "out" />
<Parameter Name= "month" Type= "System.UInt32&" RefType= "out" />
<Parameter Name= "day" Type= "System.UInt32&" RefType= "out" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Get the selected date.</summary>
<param name= "year" > A variable to place the chosen year in.</param>
<param name= "month" > A variable to place the chosen month in.</param>
<param name= "day" > A variable to place the chosen day in.</param>
<remarks >
<para > NOTE: That month number is ZERO based, (0-11), whereas the day is one based, (1-31).</para>
<para > An alternative way to get the date is with the <see cref= "M:Gtk.Calendar.GetDate(uint,uint,uint)" /> method.</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "Thaw" >
<MemberSignature Language= "C#" Value= "public void Thaw ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Removes the effects of calling <see cref= "M:Gtk.Calendar.Freeze" /> .</summary>
<remarks >
<para > This draws all graphical updates to the Calendar that have happened since a <see cref= "M:Gtk.Calendar.Freeze" /> .</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "ClearMarks" >
<MemberSignature Language= "C#" Value= "public void ClearMarks ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Removes all visual marks that have been added to dates.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName= "SelectMonth" >
<MemberSignature Language= "C#" Value= "public bool SelectMonth (uint month, uint year);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "month" Type= "System.UInt32" />
<Parameter Name= "year" Type= "System.UInt32" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Shifts the Calendar to display the specified month.</summary>
<param name= "month" > A zero-based month number.</param>
<param name= "year" > The year the month is in.</param>
<returns >
<see langword= "true" />
</returns>
<remarks />
</Docs>
</Member>
<Member MemberName= "Finalize" >
2003-10-13 22:55:58 +00:00
<MemberSignature Language= "C#" Value= "protected override void Finalize ();" />
2003-03-28 08:46:25 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Disposes the resources associated with the object.</summary>
<remarks />
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Calendar (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<returns > An instance of Calendar, wrapping the C object.</returns>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Calendar ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
2004-04-30 13:53:41 +00:00
<summary > Creates a new Calendar displaying the current month and having the current day selected</summary>
2003-03-28 08:46:25 +00:00
<returns > A new Calendar.</returns>
<remarks />
</Docs>
</Member>
<Member MemberName= "NextYear" >
<MemberSignature Language= "C#" Value= "public event EventHandler NextYear;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when the current year of the Calendar is increased.</summary>
2003-05-08 20:26:02 +00:00
<remarks >
<para > This may happen when the user explicitly advances the year, or when advancing from December to January.</para>
</remarks>
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "DaySelectedDoubleClick" >
<MemberSignature Language= "C#" Value= "public event EventHandler DaySelectedDoubleClick;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
2003-05-08 20:26:02 +00:00
<summary > Fired when the user "double clicks" on a day.</summary>
<remarks />
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "PrevYear" >
<MemberSignature Language= "C#" Value= "public event EventHandler PrevYear;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when the current year of the Calendar is decreased.</summary>
2003-05-08 20:26:02 +00:00
<remarks >
<para > This may happen when the user explicitly advances the year, or when clicking 'back' from January to December.</para>
</remarks>
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "MonthChanged" >
<MemberSignature Language= "C#" Value= "public event EventHandler MonthChanged;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when the current month changes.</summary>
2003-05-08 20:26:02 +00:00
<remarks />
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "NextMonth" >
<MemberSignature Language= "C#" Value= "public event EventHandler NextMonth;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when the month of the Calendar moves to the next one.</summary>
2003-05-08 20:26:02 +00:00
<remarks />
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "DaySelected" >
<MemberSignature Language= "C#" Value= "public event EventHandler DaySelected;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when a day is selected on the Calendar.</summary>
2003-05-08 20:26:02 +00:00
<remarks />
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "PrevMonth" >
<MemberSignature Language= "C#" Value= "public event EventHandler PrevMonth;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > System.EventHandler</ReturnType>
</ReturnValue>
2003-03-28 08:46:25 +00:00
<Parameters />
<Docs >
<summary > Fired when the Calendar moves to the previous month.</summary>
2003-05-08 20:26:02 +00:00
<remarks />
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
<Member MemberName= "DisplayOptions" >
<MemberSignature Language= "C#" Value= "public Gtk.CalendarDisplayOptions DisplayOptions { set; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.CalendarDisplayOptions</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-03-28 08:46:25 +00:00
<Docs >
<summary > Set the display options for this Calendar.</summary>
<param name= "flags" > One or more values from <see cref= "T:Gtk.CalendarDisplayOptions" /> , combined using a bit-wise OR.</param>
<remarks >
<para > This method allows fine control over which parts of the Calendar, such as day names, are displayed. The <see cref= "T:Gtk.CalendarDisplayOptions" /> describe the choices in more detail.</para>
</remarks>
</Docs>
</Member>
<Member MemberName= "GetDate" >
<MemberSignature Language= "C#" Value= "public DateTime GetDate ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.DateTime</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Get the selected date.</summary>
<returns > A DateTime object containing the selected day, month and year.</returns>
2003-05-08 20:26:02 +00:00
<remarks >
<para > Selected date information can also be retrieved with the <see cref= "M:Gtk.Calendar.GetDate(uint,uint,uint)" /> method.</para>
</remarks>
2003-03-28 08:46:25 +00:00
</Docs>
</Member>
2003-12-24 01:35:30 +00:00
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > GLib.GType</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-21 20:14:42 +00:00
<summary > GType Property.</summary>
2003-12-24 01:35:30 +00:00
<returns > a <see cref= "T:GLib.GType" /> </returns>
2004-06-21 20:14:42 +00:00
<remarks > Returns the native <see cref= "T:GLib.GType" /> value for <see cref= "T:Gtk.Calendar" /> .</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnPrevMonth" >
<MemberSignature Language= "C#" Value= "protected virtual void OnPrevMonth ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.PrevMonth" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.PrevMonth" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnDaySelected" >
<MemberSignature Language= "C#" Value= "protected virtual void OnDaySelected ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.DaySelected" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.DaySelected" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnNextMonth" >
<MemberSignature Language= "C#" Value= "protected virtual void OnNextMonth ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.NextMonth" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.NextMonth" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnMonthChanged" >
<MemberSignature Language= "C#" Value= "protected virtual void OnMonthChanged ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.MonthChanged" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.MonthChanged" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnPrevYear" >
<MemberSignature Language= "C#" Value= "protected virtual void OnPrevYear ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.PrevYear" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.PrevYear" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnDaySelectedDoubleClick" >
<MemberSignature Language= "C#" Value= "protected virtual void OnDaySelectedDoubleClick ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.DaySelectedDoubleClick" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.DaySelectedDoubleClick" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnNextYear" >
<MemberSignature Language= "C#" Value= "protected virtual void OnNextYear ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Calendar.NextYear" /> event.</summary>
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Calendar.NextYear" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "protected Calendar (GLib.GType gtype);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "gtype" Type= "GLib.GType" />
</Parameters>
<Docs >
2004-06-21 20:33:11 +00:00
<summary > Protected Constructor.</summary>
2003-12-24 01:35:30 +00:00
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
<returns > a <see cref= "T:Gtk.Calendar" /> </returns>
2004-06-21 20:33:11 +00:00
<remarks > Chain to this constructor if you have manually registered a native <see cref= "T:GLib.GType" /> value for your subclass.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
2004-05-27 19:02:19 +00:00
<Member MemberName= "Date" >
<MemberSignature Language= "C#" Value= "public DateTime Date { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.DateTime</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-05-28 17:31:16 +00:00
<summary > a DateTime that contains the current day for the Calendar widget</summary>
2004-05-27 19:02:19 +00:00
<returns > a <see cref= "T:System.DateTime" /> </returns>
2004-05-28 17:31:16 +00:00
<remarks > Setting the date fires Calendar changes events (Day, Month/Year)</remarks>
2004-05-27 19:02:19 +00:00
</Docs>
</Member>
2003-03-28 08:46:25 +00:00
</Members>
2004-05-28 18:09:36 +00:00
</Type>