This is Calendar.h in view mode; [Download] [Up]
//---------------------------------------------------------------------------------------------------- // // Calendar // // Inherits From: Control // // Declared In: Calendar.h // // Class Description // // Calendar is a simple Control subclass that provides a UI // widget for presenting and selecting dates in a calendar form. // Subclassing from Control allows target/action manipulation // via IB (this class has been palettized and provides IB friendly // methods). An action is sent to a target when a day is selected // within the calendar day matrix (this matrix does allow an empty // selection also resulting in an action send). As with all controls // you may enable/disable. // // Month, day, and year instance variables take an int argument. // Valid values for month are 1 -12, where January = 1. Valid // values for day are 0, 1 - (last day of month), where 0 indicates // an empty selection. Valid values for year are 1 - 9999. // // // Disclaimer // // You may freely copy, distribute and reuse this software and its // associated documentation. I disclaim any warranty of any kind, // expressed or implied, as to its fitness for any particular use. // //---------------------------------------------------------------------------------------------------- #import <appkit/appkit.h> #import <sys/time.h> @interface Calendar : Control { int month; int day; int year; @private id monthTextField, dayMatrix, yearTextField, weekdayTextField; BOOL isEnabled; } //---------------------------------------------------------------------------------------------------- // Accessors //---------------------------------------------------------------------------------------------------- - month: (int) aMonth; - day: (int)aDay; - year: (int) aYear; - (const char*) monthStringValue; - (const char*) dayStringValue; - (const char*) yearStringValue; - (const char*) dayOfWeekStringValue; - (const char*) dateStringValue; - (int) monthIntValue; - (int) dayIntValue; - (int) yearIntValue; - (int) dayOfWeekIntValue; //---------------------------------------------------------------------------------------------------- // Action Methods //---------------------------------------------------------------------------------------------------- - incrementMonth: sender; - decrementMonth: sender; - incrementYear: sender; - decrementYear: sender; - takeMonthIntValueFrom: sender; - takeDayIntValueFrom: sender; - takeYearIntValueFrom: sender; - showSystemDate: sender; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.