home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / CALENDAR.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  4.8 KB  |  153 lines

  1. //----------------------------------------------------------------------------
  2. // Calendar.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: Calendar.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef CalendarHPP
  6. #define CalendarHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef MenusHPP
  9. #include <Menus.hpp>
  10. #endif
  11.  
  12. #ifndef SysUtilsHPP
  13. #include <SysUtils.hpp>
  14. #endif
  15.  
  16. #ifndef GridsHPP
  17. #include <Grids.hpp>
  18. #endif
  19.  
  20. #ifndef StdCtrlsHPP
  21. #include <StdCtrls.hpp>
  22. #endif
  23.  
  24. #ifndef GraphicsHPP
  25. #include <Graphics.hpp>
  26. #endif
  27.  
  28. #ifndef FormsHPP
  29. #include <Forms.hpp>
  30. #endif
  31.  
  32. #ifndef WindowsHPP
  33. #include <Windows.hpp>
  34. #endif
  35.  
  36. #ifndef MessagesHPP
  37. #include <Messages.hpp>
  38. #endif
  39.  
  40. #ifndef ControlsHPP
  41. #include <Controls.hpp>
  42. #endif
  43.  
  44. #ifndef ClassesHPP
  45. #include <Classes.hpp>
  46. #endif
  47.  
  48. #ifndef SystemHPP
  49. #include <System.hpp>
  50. #endif
  51.  
  52. namespace Calendar
  53. {
  54. //-- type declarations -------------------------------------------------------
  55. typedef System::Shortint TDayOfWeek;
  56.  
  57. class __declspec(delphiclass) TCalendar;
  58. class __declspec(pascalimplementation) TCalendar : public Grids::TCustomGrid
  59. {
  60.     typedef TCalendar ThisClass;
  61.     typedef Grids::TCustomGrid inherited;
  62.     
  63. private:
  64.     System::TDateTime FDate;
  65.     System::Integer FMonthOffset;
  66.     Classes::TNotifyEvent FOnChange;
  67.     System::Boolean FReadOnly;
  68.     TDayOfWeek FStartOfWeek;
  69.     System::Boolean FUpdating;
  70.     System::Boolean FUseCurrentDate;
  71.     System::AnsiString __fastcall GetCellText(System::Integer ACol, System::Integer ARow);
  72.     System::Integer __fastcall GetDateElement(System::Integer Index);
  73.     void __fastcall SetCalendarDate(System::TDateTime Value);
  74.     void __fastcall SetDateElement(System::Integer Index, System::Integer Value);
  75.     void __fastcall SetStartOfWeek(TDayOfWeek Value);
  76.     void __fastcall SetUseCurrentDate(System::Boolean Value);
  77.     System::Boolean __fastcall StoreCalendarDate(void);
  78.     
  79. protected:
  80.     virtual void __fastcall Change(void);
  81.     void __fastcall ChangeMonth(System::Integer Delta);
  82.     virtual void __fastcall Click(void);
  83.     virtual System::Integer __fastcall DaysPerMonth(System::Integer AYear, System::Integer AMonth);
  84.     virtual System::Integer __fastcall DaysThisMonth(void);
  85.     virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
  86.         ,  Grids::TGridDrawState AState);
  87.     virtual System::Boolean __fastcall IsLeapYear(System::Integer AYear);
  88.     virtual System::Boolean __fastcall SelectCell(System::Longint ACol, System::Longint ARow);
  89.     MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
  90.     
  91. public:
  92.     __fastcall virtual TCalendar(Classes::TComponent *AOwner);
  93.     __property System::TDateTime CalendarDate = {read=FDate, write=SetCalendarDate, stored=StoreCalendarDate
  94.         };
  95.     __property System::AnsiString CellText[System::Integer ACol][System::Integer ARow] = {read=GetCellText
  96.         };
  97.     void __fastcall NextMonth(void);
  98.     void __fastcall NextYear(void);
  99.     void __fastcall PrevMonth(void);
  100.     void __fastcall PrevYear(void);
  101.     virtual void __fastcall UpdateCalendar(void);
  102.     
  103. __published:
  104.     __property Align ;
  105.     __property BorderStyle ;
  106.     __property Color ;
  107.     __property Ctl3D ;
  108.     __property System::Integer Day = {read=GetDateElement, write=SetDateElement, stored=false, index=3, 
  109.         nodefault};
  110.     __property Enabled ;
  111.     __property Font ;
  112.     __property GridLineWidth ;
  113.     __property System::Integer Month = {read=GetDateElement, write=SetDateElement, stored=false, index=2
  114.         , nodefault};
  115.     __property ParentColor ;
  116.     __property ParentFont ;
  117.     __property ParentShowHint ;
  118.     __property PopupMenu ;
  119.     __property System::Boolean ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
  120.     __property ShowHint ;
  121.     __property TDayOfWeek StartOfWeek = {read=FStartOfWeek, write=SetStartOfWeek, nodefault};
  122.     __property TabOrder ;
  123.     __property TabStop ;
  124.     __property System::Boolean UseCurrentDate = {read=FUseCurrentDate, write=SetUseCurrentDate, default=1
  125.         };
  126.     __property Visible ;
  127.     __property System::Integer Year = {read=GetDateElement, write=SetDateElement, stored=false, index=1
  128.         , nodefault};
  129.     __property OnClick ;
  130.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  131.     __property OnDblClick ;
  132.     __property OnDragDrop ;
  133.     __property OnDragOver ;
  134.     __property OnEndDrag ;
  135.     __property OnEnter ;
  136.     __property OnExit ;
  137.     __property OnKeyDown ;
  138.     __property OnKeyPress ;
  139.     __property OnKeyUp ;
  140. public:
  141.     /* !! TCustomGrid.Destroy */ __fastcall virtual ~TCalendar(void) { }
  142.     
  143. };
  144.  
  145. //-- var, const, procedure ---------------------------------------------------
  146.  
  147. }    /* namespace Calendar */
  148. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  149. using namespace Calendar;
  150. #endif
  151. //-- end unit ----------------------------------------------------------------
  152. #endif    // Calendar
  153.