advsmoothcalendar.hpp

来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 565 行 · 第 1/2 页

HPP
565
字号
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Advsmoothcalendar.pas' rev: 10.00

#ifndef AdvsmoothcalendarHPP
#define AdvsmoothcalendarHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Gdipfill.hpp>	// Pascal unit
#include <Advsmoothgdip.hpp>	// Pascal unit
#include <Math.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Advstyleif.hpp>	// Pascal unit
#include <Dateutils.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Advsmoothcalendar
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TWinCtrl;
class PASCALIMPLEMENTATION TWinCtrl : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
public:
	void __fastcall PaintCtrls(HDC DC, Controls::TControl* First);
public:
	#pragma option push -w-inl
	/* TWinControl.Create */ inline __fastcall virtual TWinCtrl(Classes::TComponent* AOwner) : Controls::TWinControl(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TWinCtrl(HWND ParentWindow) : Controls::TWinControl(ParentWindow) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TWinControl.Destroy */ inline __fastcall virtual ~TWinCtrl(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TAdvSmoothCalendarCaptionLocation { cpTopLeft, cpTopRight, cpTopCenter, cpCenterLeft, cpCenterRight, cpCenterCenter, cpBottomLeft, cpBottomRight, cpBottomCenter, cpCustom };
#pragma option pop

class DELPHICLASS TAdvSmoothCalendarHeader;
class DELPHICLASS TAdvSmoothCalendar;
#pragma option push -b-
enum TAdvSmoothCalendarDateMode { dmDay, dmMonth, dmYear };
#pragma option pop

#pragma option push -b-
enum TAdvSmoothCalendarDateRange { drSingledate, drMultiDates };
#pragma option pop

class DELPHICLASS TAdvSmoothCalendarDateAppearance;
class DELPHICLASS TAdvSmoothCalendarDateWeekNumbers;
class PASCALIMPLEMENTATION TAdvSmoothCalendarDateWeekNumbers : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAdvSmoothCalendarDateAppearance* FOwner;
	Graphics::TFont* FFont;
	bool FVisible;
	Gdipfill::TGDIPFill* FFill;
	Classes::TNotifyEvent FOnChange;
	int FWidth;
	void __fastcall SetFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetWidth(const int Value);
	
protected:
	void __fastcall Changed(void);
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall FillChanged(System::TObject* Sender);
	
public:
	__fastcall TAdvSmoothCalendarDateWeekNumbers(TAdvSmoothCalendarDateAppearance* AOwner);
	__fastcall virtual ~TAdvSmoothCalendarDateWeekNumbers(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	int __fastcall GetWidth(void);
	
__published:
	__property bool Visible = {read=FVisible, write=SetVisible, default=0};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Gdipfill::TGDIPFill* Fill = {read=FFill, write=SetFill};
	__property int Width = {read=FWidth, write=SetWidth, default=30};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


#pragma option push -b-
enum TAdvSmoothCalendarStartDay { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
#pragma option pop

class PASCALIMPLEMENTATION TAdvSmoothCalendarDateAppearance : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAdvSmoothCalendar* FOwner;
	Gdipfill::TGDIPFill* FDayOfWeekFill;
	Graphics::TFont* FSelectedDateFont;
	Graphics::TFont* FDateFont;
	Gdipfill::TGDIPFill* FSelectedDateFill;
	Graphics::TFont* FCurrentDateFont;
	Graphics::TFont* FHoverDateFont;
	Gdipfill::TGDIPFill* FDateFill;
	Gdipfill::TGDIPFill* FCurrentDateFill;
	Gdipfill::TGDIPFill* FHoverDateFill;
	Graphics::TFont* FDayOfWeekFont;
	Classes::TNotifyEvent FOnChange;
	TAdvSmoothCalendarDateWeekNumbers* FWeekNumbers;
	Graphics::TFont* FMonthFont;
	Graphics::TFont* FYearFont;
	TAdvSmoothCalendarStartDay FStartDay;
	Graphics::TFont* FDisabledDateFont;
	Gdipfill::TGDIPFill* FDisabledDateFill;
	void __fastcall SetCurrentDateFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetCurrentDateFont(const Graphics::TFont* Value);
	void __fastcall SetDateFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetDateFont(const Graphics::TFont* Value);
	void __fastcall SetDayOfWeekFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetDayOfWeekFont(const Graphics::TFont* Value);
	void __fastcall SetHoverDateFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetHoverDateFont(const Graphics::TFont* Value);
	void __fastcall SetSelectedDateFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetSelectedDateFont(const Graphics::TFont* Value);
	void __fastcall SetWeekNumbers(const TAdvSmoothCalendarDateWeekNumbers* Value);
	void __fastcall SetMonthFont(const Graphics::TFont* Value);
	void __fastcall SetYearFont(const Graphics::TFont* Value);
	void __fastcall SetStartDay(const TAdvSmoothCalendarStartDay Value);
	void __fastcall SetDisabledDateFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetDisabledDateFont(const Graphics::TFont* Value);
	
protected:
	void __fastcall Changed(void);
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall FillChanged(System::TObject* Sender);
	void __fastcall WeekNumbersChanged(System::TObject* Sender);
	
public:
	__fastcall TAdvSmoothCalendarDateAppearance(TAdvSmoothCalendar* AOwner);
	__fastcall virtual ~TAdvSmoothCalendarDateAppearance(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Graphics::TFont* DateFont = {read=FDateFont, write=SetDateFont};
	__property Gdipfill::TGDIPFill* DateFill = {read=FDateFill, write=SetDateFill};
	__property Graphics::TFont* DayOfWeekFont = {read=FDayOfWeekFont, write=SetDayOfWeekFont};
	__property Gdipfill::TGDIPFill* DayOfWeekFill = {read=FDayOfWeekFill, write=SetDayOfWeekFill};
	__property Graphics::TFont* SelectedDateFont = {read=FSelectedDateFont, write=SetSelectedDateFont};
	__property Gdipfill::TGDIPFill* SelectedDateFill = {read=FSelectedDateFill, write=SetSelectedDateFill};
	__property Graphics::TFont* CurrentDateFont = {read=FCurrentDateFont, write=SetCurrentDateFont};
	__property Gdipfill::TGDIPFill* CurrentDateFill = {read=FCurrentDateFill, write=SetCurrentDateFill};
	__property Graphics::TFont* HoverDateFont = {read=FHoverDateFont, write=SetHoverDateFont};
	__property Gdipfill::TGDIPFill* HoverDateFill = {read=FHoverDateFill, write=SetHoverDateFill};
	__property Graphics::TFont* MonthDateFont = {read=FMonthFont, write=SetMonthFont};
	__property Graphics::TFont* YearDateFont = {read=FYearFont, write=SetYearFont};
	__property TAdvSmoothCalendarDateWeekNumbers* WeekNumbers = {read=FWeekNumbers, write=SetWeekNumbers};
	__property TAdvSmoothCalendarStartDay StartDay = {read=FStartDay, write=SetStartDay, default=0};
	__property Graphics::TFont* DisabledDateFont = {read=FDisabledDateFont, write=SetDisabledDateFont};
	__property Gdipfill::TGDIPFill* DisabledDateFill = {read=FDisabledDateFill, write=SetDisabledDateFill};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


class DELPHICLASS TAdvSmoothCalendarFooter;
class PASCALIMPLEMENTATION TAdvSmoothCalendarFooter : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TAdvSmoothCalendar* FOwner;
	int FCaptionTop;
	int FCaptionLeft;
	TAdvSmoothCalendarCaptionLocation FCaptionPosition;
	Graphics::TFont* FFont;
	bool FVisible;
	bool FCurrentDateCaption;
	AnsiString FCurrentDateFormat;
	Gdipfill::TGDIPFill* FFill;
	int FHeight;
	Classes::TNotifyEvent FOnChange;
	AnsiString FCaption;
	void __fastcall SetCaptionLeft(const int Value);
	void __fastcall SetCaptionPosition(const TAdvSmoothCalendarCaptionLocation Value);
	void __fastcall SetCaptionTop(const int Value);
	void __fastcall SetCurrentDateCaption(const bool Value);
	void __fastcall SetFill(const Gdipfill::TGDIPFill* Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetHeight(const int Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetCaption(const AnsiString Value);
	void __fastcall SetCurrentDateFormat(const AnsiString Value);
	
protected:
	void __fastcall Changed(void);
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall FillChanged(System::TObject* Sender);
	int __fastcall GetHeight(void);
	
public:
	__fastcall TAdvSmoothCalendarFooter(TAdvSmoothCalendar* AOwner);
	__fastcall virtual ~TAdvSmoothCalendarFooter(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Gdipfill::TGDIPFill* Fill = {read=FFill, write=SetFill};
	__property int Height = {read=FHeight, write=SetHeight, default=25};
	__property AnsiString Caption = {read=FCaption, write=SetCaption};
	__property TAdvSmoothCalendarCaptionLocation CaptionPosition = {read=FCaptionPosition, write=SetCaptionPosition, default=5};
	__property int CaptionLeft = {read=FCaptionLeft, write=SetCaptionLeft, default=0};
	__property int CaptionTop = {read=FCaptionTop, write=SetCaptionTop, default=0};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property bool Visible = {read=FVisible, write=SetVisible, default=1};
	__property bool CurrentDateCaption = {read=FCurrentDateCaption, write=SetCurrentDateCaption, default=1};
	__property AnsiString CurrentDateFormat = {read=FCurrentDateFormat, write=SetCurrentDateFormat};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


typedef void __fastcall (__closure *TAdvSmoothCalendarDateSelectedEvent)(System::TObject* Sender, TAdvSmoothCalendarDateMode Mode, System::TDateTime Date);

typedef void __fastcall (__closure *TAdvSmoothCalendarDateModeChangedEvent)(System::TObject* Sender, TAdvSmoothCalendarDateMode Mode, TAdvSmoothCalendarDateMode ModeTo, bool &allow);

typedef void __fastcall (__closure *TAdvSmoothCalendarYearChangedEvent)(System::TObject* Sender, int Year);

typedef void __fastcall (__closure *TAdvSmoothCalendarMonthChangedEvent)(System::TObject* Sender, int Month);

typedef void __fastcall (__closure *TAdvSmoothCalendarYearRangeChangedEvent)(System::TObject* Sender, int YearFrom, int YearTo);

typedef void __fastcall (__closure *TAdvSmoothCalendarMultiDateSelectedEvent)(System::TObject* Sender, TAdvSmoothCalendarDateMode Mode, System::TDateTime StartDate, System::TDateTime EndDate);

typedef void __fastcall (__closure *TAdvSmoothCalendarCurrentDayClickEvent)(System::TObject* Sender, bool &Allow);

class PASCALIMPLEMENTATION TAdvSmoothCalendar : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	bool FMouseDown;
	bool FFocused;
	bool FDesignTime;
	DynamicArray<Advsmoothgdip::TGPRectF >  arrMulti;
	int FRows;
	TAdvSmoothCalendarDateMode FTempDateMode;
	TAdvSmoothCalendarDateMode FDateMode;
	bool FAnimateDateMode;
	bool FAnimateDayOpc;
	bool FAnimateOpacity;
	bool FAnimate;
	bool Fanimating;
	float FStartPos;
	float FCurrentPos;
	float FPosTo;
	Byte FYearOpc;
	Byte FYearOpcTo;
	Byte FDayOpc;
	Byte FDayOpcTo;
	Byte FMonthOpc;
	Byte FMonthOpcTo;
	Byte FWeekNumberOpc;
	Byte FWeekNumberOpcTo;
	Extctrls::TTimer* FAnimateTimer;
	System::TDateTime FStartDate;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?