Class TfrmACCalPop (unit ACCalPop)

Inherits from

TForm

Constructors


constructor Create(AOwner: TComponent);

************************ Create ************************ ***** This procedure is used to initialize values ***** ***** for control owner, calendar position and ***** ***** other resources.


Functions

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 ************************

procedure FormShow(Sender: TObject);

********************* FormShow ************************* ***** This procedure is used to initialize values ***** ***** for control owner, calendar position and ***** ***** other resources when showing it *****

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; IsUp : boolean);

****************** Draw Focus Frame ********************

procedure DrawMonthHeader;

****************** Draw Month Header *******************

procedure EraseDateFrame(nIndex: Integer);

****************** Erase Date Frame ********************

function GetCalendarRect: TRect;

******************** Get Calendar Rectangle ******************** ***** Get the rectangle used for the calendar section *****

function GetCancelButtonRect: TRect;

****************** Get Cancel Button Rectangle ***************** ***** Get the rectangle used for the Cancel button.

function GetDblLeftButtonRect: TRect;

******************* Get DblLeft Button Rectangle *************** ***** Get the rectangle used for the dblleft button.

function GetDblRightButtonRect: TRect;

****************** Get DblRight Button Rectangle *************** ***** Get the rectangle used for the dblright button.

Function GetGoodColor (dtTest : tDateTime) : tColor;

***************** GetGoodColor *************************

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 Month **********************

procedure NextWeek;

****************** Get Next Week ***********************

procedure NextYear;

****************** Get Next Year ***********************

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.

procedure ClosePopup;

Extract date Components

procedure WMKillFocus(var Message: TWMKillFocus);


procedure WMMouseActivate(var Message: TWMActivate);

******************** WMMouseActivate ******************* *** These functions hide calendar when it loose focus ***

Properties

Events

Variables

BORDER : integer;


Button_Height : integer;


Button_Width : integer;


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_PreviousDateHighlight : Integer;


m_PreviousDateIndex : Integer;


m_PreviousDay : Word;


m_PreviousMonth : Word;


m_PreviousYear : Word;


ParentColor : TColor;


TEXT_INDENT : integer;



Constructors


constructor Create(AOwner: TComponent);

************************ Create ************************ ***** This procedure is used to initialize values ***** ***** for control owner, calendar position and ***** ***** other resources. *****


Functions


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 ************************


procedure FormShow(Sender: TObject);

********************* FormShow ************************* ***** This procedure is used to initialize values ***** ***** for control owner, calendar position and ***** ***** other resources when showing it *****


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; IsUp : boolean);

****************** Draw Focus Frame ********************


procedure DrawMonthHeader;

****************** Draw Month Header *******************


procedure EraseDateFrame(nIndex: Integer);

****************** Erase Date Frame ********************


function GetCalendarRect: TRect;

******************** Get Calendar Rectangle ******************** ***** Get the rectangle used for the calendar section *****


function GetCancelButtonRect: TRect;

****************** Get Cancel Button Rectangle ***************** ***** Get the rectangle used for the Cancel button. *****


function GetDblLeftButtonRect: TRect;

******************* Get DblLeft Button Rectangle *************** ***** Get the rectangle used for the dblleft button. *****


function GetDblRightButtonRect: TRect;

****************** Get DblRight Button Rectangle *************** ***** Get the rectangle used for the dblright button. *****


Function GetGoodColor (dtTest : tDateTime) : tColor;

***************** GetGoodColor *************************


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 Month **********************


procedure NextWeek;

****************** Get Next Week ***********************


procedure NextYear;

****************** Get Next Year ***********************


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 ****


procedure ClosePopup;

Extract date Components


procedure WMKillFocus(var Message: TWMKillFocus);


procedure WMMouseActivate(var Message: TWMActivate);

******************** WMMouseActivate ******************* *** These functions hide calendar when it loose focus ***


Properties


Events


Variables


BORDER : integer;


Button_Height : integer;


Button_Width : integer;


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_PreviousDateHighlight : Integer;


m_PreviousDateIndex : Integer;


m_PreviousDay : Word;


m_PreviousMonth : Word;


m_PreviousYear : Word;


ParentColor : TColor;


TEXT_INDENT : integer;