Class TfrmCalPop (unit Calpop) |
Inherits from
TForm
//// Calendar Form Type Definition /////
constructor Create( AOwner: TComponent );
- ************************ Create ************************
***** This procedure is used to initialize values *****
***** for control owner, calendar position and *****
***** other resources.
procedure FormCancel;
******************* Form Cancel ************************
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
***************** Form Key Down ************************
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
******************** Form Mouse Down *******************
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
***************** Form Mouse Move **********************
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
***************** Form Mouse Up ************************
procedure FormPaint(Sender: TObject);
******************** Form Paint ************************
function DaysInMonth(nMonth : Integer): Integer;
******************** Days In Month *********************
***** This function returns the number of days in *****
***** the month specified in nMonth.
procedure DrawButtons;
****************** Draw Butttons ***********************
procedure DrawCalendarBorder;
************* Draw Calendar Border *********************
procedure DrawDates;
********************* Draw Dates ***********************
procedure DrawDaysHeader;
********************* Draw Days ************************
procedure DrawFocusFrame(nIndex : Integer);
****************** Draw Focus Frame ********************
procedure DrawMonthHeader;
****************** Draw Month Header *******************
function GetCalendarRect : TRect;
******************** Get Calendar Rectangle ********************
***** Get the rectangle used for the calendar section *****
function GetIndexFromDate : Integer;
****************** Get Index From Date *****************
function GetIndexFromPoint(nLeft : Integer ; nTop : Integer) : Integer;
**************** Get Index From Point ******************
function GetLeftButtonRect : TRect;
******************* Get Left Button Rectangle ******************
***** Get the rectangle used for the left button.
function GetMonthBegin: Integer;
************************* Get Month Begin **************************
***** This function Gets the index value of the first day of the *****
***** month.
function GetRectFromIndex(nIndex : Integer): TRect;
****************** Get Rectangle From Index ********************
***** Get the rectangle used for the calendar section *****
function GetRightButtonRect : TRect;
****************** Get Right Button Rectangle ******************
***** Get the rectangle used for the right button.
function IsLeapYear: Boolean;
******************** Is Leap Year **********************
procedure LoadDateArray ;
******************** LoadDateArray *********************
procedure NextDay;
******************* Get Next Day ***********************
procedure NextMonth;
****************** Get Next Nonth **********************
procedure NextWeek;
****************** Get Next Week ***********************
procedure NextYear;
GetNextYear
procedure PrevDay;
****************** Get Previous Day ********************
procedure PrevMonth;
****************** GetPreviousMonth ********************
procedure PrevWeek;
****************** Get Previous Week *******************
procedure PrevYear;
***************** GetPrevious Year *********************
procedure SetDate(nDays : Integer);
*************** Set Date **************************
**** This procedure adjusts the date by nDays ****
**** nDays can be possitive or negative.
ctlParent : TComponent;
m_CurrentDateIndex : Integer;
m_CurrentDateSelected : TDateTime;
m_CurrentDay : Word;
m_CurrentMonth : Word;
m_CurrentYear : Word;
m_DateArray : array[1..42] of string[2];
m_FontHeight : Integer;
m_FontWidth : Integer;
m_MouseDown : BOOL;
m_PreviousDateIndex : Integer;
m_PreviousDateRect : TRect;
m_PreviousDay : Word;
m_PreviousMonth : Word;
m_PreviousYear : Word;
constructor Create( AOwner: TComponent );
************************ Create ************************
***** This procedure is used to initialize values *****
***** for control owner, calendar position and *****
***** other resources. *****
procedure FormCancel;
******************* Form Cancel ************************
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
***************** Form Key Down ************************
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
******************** Form Mouse Down *******************
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
***************** Form Mouse Move **********************
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
***************** Form Mouse Up ************************
procedure FormPaint(Sender: TObject);
******************** Form Paint ************************
function DaysInMonth(nMonth : Integer): Integer;
******************** Days In Month *********************
***** This function returns the number of days in *****
***** the month specified in nMonth. *****
procedure DrawButtons;
****************** Draw Butttons ***********************
procedure DrawCalendarBorder;
************* Draw Calendar Border *********************
procedure DrawDates;
********************* Draw Dates ***********************
procedure DrawDaysHeader;
********************* Draw Days ************************
procedure DrawFocusFrame(nIndex : Integer);
****************** Draw Focus Frame ********************
procedure DrawMonthHeader;
****************** Draw Month Header *******************
function GetCalendarRect : TRect;
******************** Get Calendar Rectangle ********************
***** Get the rectangle used for the calendar section *****
function GetIndexFromDate : Integer;
****************** Get Index From Date *****************
function GetIndexFromPoint(nLeft : Integer ; nTop : Integer) : Integer;
**************** Get Index From Point ******************
function GetLeftButtonRect : TRect;
******************* Get Left Button Rectangle ******************
***** Get the rectangle used for the left button. *****
function GetMonthBegin: Integer;
************************* Get Month Begin **************************
***** This function Gets the index value of the first day of the *****
***** month. *****
**********************************************************************
function GetRectFromIndex(nIndex : Integer): TRect;
****************** Get Rectangle From Index ********************
***** Get the rectangle used for the calendar section *****
function GetRightButtonRect : TRect;
****************** Get Right Button Rectangle ******************
***** Get the rectangle used for the right button. *****
function IsLeapYear: Boolean;
******************** Is Leap Year **********************
procedure LoadDateArray ;
******************** LoadDateArray *********************
procedure NextDay;
******************* Get Next Day ***********************
procedure NextMonth;
****************** Get Next Nonth **********************
procedure NextWeek;
****************** Get Next Week ***********************
procedure NextYear;
GetNextYear
procedure PrevDay;
****************** Get Previous Day ********************
procedure PrevMonth;
****************** GetPreviousMonth ********************
procedure PrevWeek;
****************** Get Previous Week *******************
procedure PrevYear;
***************** GetPrevious Year *********************
procedure SetDate(nDays : Integer);
*************** Set Date **************************
**** This procedure adjusts the date by nDays ****
**** nDays can be possitive or negative. It ****
**** also populates the vars YEAR, MONTH and DAY ****
ctlParent : TComponent;
m_CurrentDateIndex : Integer;
m_CurrentDateSelected : TDateTime;
m_CurrentDay : Word;
m_CurrentMonth : Word;
m_CurrentYear : Word;
m_DateArray : array[1..42] of string[2];
m_FontHeight : Integer;
m_FontWidth : Integer;
m_MouseDown : BOOL;
m_PreviousDateIndex : Integer;
m_PreviousDateRect : TRect;
m_PreviousDay : Word;
m_PreviousMonth : Word;
m_PreviousYear : Word;