⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsscalendar.hpp

📁 该控件显示公历和农历
💻 HPP
📖 第 1 页 / 共 2 页
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'LssCalendar.pas' rev: 6.00

#ifndef LssCalendarHPP
#define LssCalendarHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <SysConst.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <AAFont.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <DateUtils.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Lsscalendar
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TCalendarHint;
class PASCALIMPLEMENTATION TCalendarHint : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	int FAlpha;
	Classes::TStringList* FStrings;
	Classes::TStringList* FNames;
	int FMaxNameLen;
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	void __fastcall SetAlpha(int Value);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall Paint(void);
	void __fastcall SetLayeredAttribs(void);
	
public:
	__fastcall virtual TCalendarHint(Classes::TComponent* AOwner);
	__fastcall virtual ~TCalendarHint(void);
	void __fastcall SetPosition(void);
	
__published:
	__property int Alpha = {read=FAlpha, write=SetAlpha, nodefault};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCalendarHint(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	#pragma option pop
	
};


#pragma pack(push, 4)
struct THzDate
{
	int Year;
	int Month;
	int Day;
	bool isLeap;
} ;
#pragma pack(pop)

#pragma pack(push, 4)
struct TGzDate
{
	int Year;
	int Month;
	int Day;
} ;
#pragma pack(pop)

#pragma option push -b-
enum TLssCalStyle { csBottom, csRight, csNone };
#pragma option pop

class DELPHICLASS TLssCalColors;
class DELPHICLASS TLssCalendar;
class DELPHICLASS TFestivalList;
class PASCALIMPLEMENTATION TFestivalList : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TLssCalendar* Owner;
	Classes::TStringList* FSolarFestivals;
	Classes::TStringList* FLunarFestivals;
	Classes::TStringList* FWeekFestivals;
	Classes::TStringList* FSolarMarks;
	Classes::TStringList* FLunarMarks;
	Classes::TStringList* FWeekMarks;
	void __fastcall SetFestivals(int Index, Classes::TStringList* Value);
	void __fastcall SetMarks(int Index, Classes::TStringList* Value);
	Word __fastcall NthRevDayOfWeek(const System::TDateTime AValue);
	
public:
	__fastcall TFestivalList(TLssCalendar* AOwner);
	__fastcall virtual ~TFestivalList(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall clearAll(void);
	bool __fastcall addFestival(int Index, const AnsiString fdate, const AnsiString fname, const Graphics::TColor fcolor = (Graphics::TColor)(0xff));
	void __fastcall delFestival(int Index, const AnsiString fdate);
	bool __fastcall addMark(int Index, const AnsiString fdate, const Graphics::TColor fcolor = (Graphics::TColor)(0xffff));
	void __fastcall delMark(int Index, const AnsiString fdate);
	AnsiString __fastcall GetSolarFtv(TDate TheDate, Graphics::TColor &fcolor)/* overload */;
	AnsiString __fastcall GetSolarFtv(TDate TheDate)/* overload */;
	AnsiString __fastcall GetLunarFtv(const THzDate &TheDate, Graphics::TColor &fcolor)/* overload */;
	AnsiString __fastcall GetLunarFtv(const THzDate &TheDate)/* overload */;
	AnsiString __fastcall GetWeekFtv(TDate TheDate, Graphics::TColor &fcolor)/* overload */;
	AnsiString __fastcall GetWeekFtv(TDate TheDate)/* overload */;
	Graphics::TColor __fastcall GetSolarMark(TDate TheDate);
	Graphics::TColor __fastcall GetLunarMark(const THzDate &TheDate);
	Graphics::TColor __fastcall GetWeekMark(TDate TheDate);
	
__published:
	__property Classes::TStringList* SolarFestivals = {read=FSolarFestivals, write=SetFestivals, index=0};
	__property Classes::TStringList* LunarFestivals = {read=FLunarFestivals, write=SetFestivals, index=1};
	__property Classes::TStringList* WeekFestivals = {read=FWeekFestivals, write=SetFestivals, index=2};
	__property Classes::TStringList* SolarMarks = {read=FSolarMarks, write=SetMarks, index=0};
	__property Classes::TStringList* LunarMarks = {read=FLunarMarks, write=SetMarks, index=1};
	__property Classes::TStringList* WeekMarks = {read=FWeekMarks, write=SetMarks, index=2};
};


class PASCALIMPLEMENTATION TLssCalendar : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	TDate FViewDate;
	Word FYear;
	Word FMonth;
	Word FDay;
	TLssCalColors* FCalColors;
	bool FSmoothText;
	bool FShadowFont;
	bool FChineseEar;
	TLssCalStyle FLunarCalStyle;
	TLssCalStyle FFtvCalStyle;
	TFestivalList* FFtvList;
	bool FShowVertical;
	bool FShowBackMonth;
	bool FShowBackImage;
	bool FShowArrow;
	bool FUseISO8601;
	double FVerticalScale;
	double FHorizonScale;
	bool FAutoFontSize;
	Extctrls::TImage* FBackImage;
	bool FShowBorder;
	bool FShowGrid;
	bool FEnWeekName;
	TCalendarHint* CHint;
	TDate FFirstDate;
	#pragma pack(push, 1)
	Types::TRect FTitleRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FWeekRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FDaysRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FOldRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FOldViewRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FSolarRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FLunarRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FFtvRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FPrevYearRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FPrevMonthRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FNextMonthRect;
	#pragma pack(pop)
	
	#pragma pack(push, 1)
	Types::TRect FNextYearRect;
	#pragma pack(pop)

⌨️ 快捷键说明

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