plannercal.hpp
来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 1,313 行 · 第 1/5 页
HPP
1,313 行
TCalendarBrowsers* FBrowsers;
bool FMonthSelect;
bool FMultiSelect;
bool FEventHints;
TYearStartAt* FYearStartAt;
TNameOfDays* FNameOfDays;
TNameOfMonths* FNameOfMonths;
TMinMaxDate* FMaxDate;
TMinMaxDate* FMinDate;
Graphics::TColor FTextcolor;
Graphics::TColor FSelectColor;
Graphics::TColor FSelectFontColor;
Graphics::TColor FInactiveColor;
Graphics::TColor FFocusColor;
Graphics::TColor FInverscolor;
Graphics::TColor FWeekendColor;
Graphics::TColor FHeaderColor;
bool FShowWeeks;
int FStartDay;
Word FDay;
Word FMonth;
Word FYear;
Graphics::TFont* FDayFont;
Graphics::TFont* FWeekFont;
AnsiString FWeekName;
TCellDrawEvent FOnCellDraw;
TDaySelectEvent FOnDaySelect;
Classes::TNotifyEvent FOnMonthSelect;
TGetDateEvent FOnGetDateEvent;
TGetDateEventHint FOnGetDateEventHint;
TDateChangeEvent FOnDateChange;
TDateChangeEvent FOnMonthChange;
TDateChangeEvent FOnYearChange;
TDateChangeEvent FOnDayChange;
Advimage::TAdvImage* FImage;
TBackGroundPosition FBackgroundPosition;
bool FShowDaysAfter;
bool FShowDaysBefore;
bool FShowSelection;
bool FWeekSelect;
bool FAllDaySelect;
TCancelledChangeEvent FOnCancelledChange;
TCancelledKeyEvent FOnCancelledKey;
Classes::TNotifyEvent FOnWeekSelect;
Classes::TNotifyEvent FOnAllDaySelect;
int FUpdateCount;
Graphics::TColor FCaptionColor;
bool FReturnIsSelect;
Graphics::TColor FLineColor;
bool FLine3D;
Graphics::TColor FGradientStartColor;
Graphics::TColor FGradientEndColor;
TGradientDirection FGradientDirection;
Graphics::TColor FMonthGradientStartColor;
Graphics::TColor FMonthGradientEndColor;
TGradientDirection FMonthGradientDirection;
TCalGlyphs* FGlyphs;
Controls::TCursor FOldCursor;
AnsiString FHintPrevYear;
AnsiString FHintPrevMonth;
AnsiString FHintNextMonth;
AnsiString FHintNextYear;
bool FUseTheme;
TTodayStyle FTodayStyle;
TEventPropEvent FOnGetEventProp;
bool FShowGotoToday;
AnsiString FTodayFormat;
Graphics::TCanvas* FCanvas;
bool FBorderXP;
Graphics::TColor FCaptionTextColor;
bool FCaption3D;
TWeekDays* FInActiveDays;
bool FAutoThemeAdapt;
System::TDateTime FHoverDate;
TPlannerCalendarStyle FStyle;
Graphics::TColor FDateSelectColor;
Graphics::TColor FDateSelectBorderColor;
Graphics::TColor FDateHoverColor;
Graphics::TColor FDateDownColor;
Graphics::TColor FBorderColor;
bool FCustomDraw;
bool FShowMonthSelector;
bool FShowYearSelector;
bool FEnable;
bool FMultiSelectCtrlKey;
bool FBorderFix;
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
HIDESBASE MESSAGE void __fastcall WMCommand(Messages::TWMCommand &Message);
HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Msg);
HIDESBASE MESSAGE void __fastcall WMEraseBkGnd(Messages::TWMEraseBkgnd &Message);
MESSAGE void __fastcall CMWantSpecialKey(Messages::TWMKey &Msg);
HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Msg);
void __fastcall UpdateYearStartAtISO(void);
void __fastcall SetLabel(Word mo, Word ye);
void __fastcall DiffCheck(System::TDateTime dt1, System::TDateTime dt2);
System::TDateTime __fastcall DiffMonth(int dx);
System::TDateTime __fastcall DiffYear(int dx);
bool __fastcall CheckDateRange(System::TDateTime dt);
bool __fastcall CheckMonth(System::TDateTime dt);
Word __fastcall DaysInMonth(Word mo, Word ye);
void __fastcall PaintArrowLeft(void);
void __fastcall PaintArrowRight(void);
void __fastcall PaintDblArrowLeft(void);
void __fastcall PaintDblArrowRight(void);
void __fastcall PaintLabel(void);
void __fastcall PaintProc(void);
void __fastcall PaintToday(void);
void __fastcall PaintEventMarker(const Types::TRect &R, Graphics::TColor AColor, TEventShape AShape);
void __fastcall SetLook(TPlannerCalendarLook AValue);
void __fastcall SetShowToday(bool AValue);
void __fastcall SetMultiSelect(bool AValue);
void __fastcall SetDayFont(Graphics::TFont* AValue);
void __fastcall SetWeekFont(Graphics::TFont* AValue);
void __fastcall SetTextColor(Graphics::TColor AColor);
void __fastcall SetFocusColor(Graphics::TColor AColor);
void __fastcall SetInversColor(Graphics::TColor AColor);
void __fastcall SetWeekendColor(Graphics::TColor AColor);
void __fastcall SetSelectColor(Graphics::TColor AColor);
void __fastcall SetSelectFontColor(Graphics::TColor AColor);
void __fastcall SetInactiveColor(Graphics::TColor AColor);
void __fastcall SetHeaderColor(Graphics::TColor AColor);
void __fastcall SetWeekName(const AnsiString Value);
HIDESBASE void __fastcall FontChanged(System::TObject* Sender);
HIDESBASE void __fastcall SetFont(Graphics::TFont* Value);
void __fastcall SetNameofDays(TNameOfDays* ANameofDays);
void __fastcall SetNameofMonths(TNameOfMonths* ANameofMonths);
void __fastcall SetShowWeeks(bool AValue);
void __fastcall SetStartDay(int AValue);
void __fastcall SetCalDay(Word AValue);
void __fastcall SetCalMonth(Word AValue);
void __fastcall SetCalYear(Word AValue);
Word __fastcall GetCalDay(void);
Word __fastcall GetCalMonth(void);
Word __fastcall GetMonth(System::TDateTime &dt);
Word __fastcall GetCalYear(void);
int __fastcall GetYear(System::TDateTime dt);
Types::TRect __fastcall DateToRect(System::TDateTime dt);
System::TDateTime __fastcall XYToDate(int X, int Y, bool Change);
System::TDateTime __fastcall GetDateProc(void);
void __fastcall SetDateProc(const System::TDateTime Value);
void __fastcall SetDateCol(const TSelDateItems* Value);
TSelDateItems* __fastcall GetDateCol(void);
void __fastcall DoMonthPopup(void);
void __fastcall DoYearPopup(void);
void __fastcall PropsChanged(System::TObject* Sender);
void __fastcall SetLineColor(Graphics::TColor AValue);
void __fastcall SetDateSelectColor(Graphics::TColor AColor);
void __fastcall SetDateSelectBorderColor(Graphics::TColor AColor);
void __fastcall SetLine3D(bool AValue);
void __fastcall DrawGradient(Graphics::TCanvas* Canvas, Graphics::TColor FromColor, Graphics::TColor ToColor, int Steps, const Types::TRect &r, bool Direction);
void __fastcall SetImage(const Advimage::TAdvImage* Value);
void __fastcall SetBackgroundPosition(const TBackGroundPosition Value);
void __fastcall SetAutoThemeAdapt(const bool Value);
void __fastcall SetStyle(const TPlannerCalendarStyle Value);
void __fastcall SetComponentStyle(Advstyleif::TTMSStyle AStyle);
void __fastcall BackgroundChanged(System::TObject* Sender);
TSelDateItems* __fastcall GetEvents(void);
AnsiString __fastcall GetDatesAsText();
void __fastcall SetEvents(const TSelDateItems* Value);
void __fastcall SetShowDaysAfter(const bool Value);
void __fastcall SetShowDaysBefore(const bool Value);
void __fastcall SetShowSelection(const bool Value);
void __fastcall SetCaptionColor(const Graphics::TColor Value);
void __fastcall SetGradientStartColor(Graphics::TColor AValue);
void __fastcall SetGradientEndColor(Graphics::TColor AValue);
void __fastcall SetGradientDirection(TGradientDirection AValue);
void __fastcall SetMonthGradientStartColor(Graphics::TColor AValue);
void __fastcall SetMonthGradientEndColor(Graphics::TColor AValue);
void __fastcall SetMonthGradientDirection(TGradientDirection AValue);
void __fastcall SetGlyphs(const TCalGlyphs* Value);
void __fastcall SetHintPrevYear(AnsiString AValue);
void __fastcall SetHintPrevMonth(AnsiString AValue);
void __fastcall SetHintNextMonth(AnsiString AValue);
void __fastcall SetHintNextYear(AnsiString AValue);
void __fastcall SetTodayStyle(const TTodayStyle Value);
int __fastcall NumRows(void);
int __fastcall NumCols(void);
void __fastcall SetShowGotoToday(const bool Value);
void __fastcall SetTodayFormat(const AnsiString Value);
void __fastcall SetBorderXP(const bool Value);
void __fastcall SetCaptionTextColor(const Graphics::TColor Value);
void __fastcall SetCaption3D(bool Value);
bool __fastcall IsVisibleDay(System::TDateTime dt);
AnsiString __fastcall GetVersion();
void __fastcall SetVersion(const AnsiString Value);
int __fastcall GetVersionNr(void);
protected:
virtual void __fastcall DoPaint(void);
virtual void __fastcall RepaintDate(System::TDateTime dt);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall Paint(void);
DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall KeyPress(char &Key);
DYNAMIC void __fastcall DoEnter(void);
DYNAMIC void __fastcall DoExit(void);
virtual void __fastcall Loaded(void);
virtual bool __fastcall HasEvent(System::TDateTime dt, TSelDateItem* &EventItem);
virtual void __fastcall DoChangeMonth(System::TDateTime dt1, System::TDateTime dt2);
virtual void __fastcall DoChangeYear(System::TDateTime dt1, System::TDateTime dt2);
__property bool UseTheme = {read=FUseTheme, nodefault};
void __fastcall YearStartChanged(System::TObject* Sender);
virtual bool __fastcall IsInActiveDay(System::TDateTime dt);
void __fastcall ThemeAdapt(void);
virtual void __fastcall WndProc(Messages::TMessage &Msg);
__property bool BorderFix = {read=FBorderFix, write=FBorderFix, default=0};
public:
__fastcall virtual TPlannerCalendar(Classes::TComponent* AOwner);
__fastcall virtual ~TPlannerCalendar(void);
void __fastcall ChangeMonth(int dx);
void __fastcall ChangeYear(int dx);
void __fastcall SetDate(Word da, Word mo, Word ye);
void __fastcall GetDate(Word &da, Word &mo, Word &ye);
void __fastcall BeginUpdate(void);
void __fastcall EndUpdate(void);
void __fastcall ResetUpdate(void);
bool __fastcall DateAtXY(int x, int y, System::TDateTime &ADate);
Types::TPoint __fastcall DateToXY(System::TDateTime dt);
__property System::TDateTime Date = {read=GetDateProc, write=SetDateProc};
__property TSelDateItems* Dates = {read=GetDateCol, write=SetDateCol};
__property AnsiString DatesAsText = {read=GetDatesAsText};
__property TSelDateItems* Events = {read=GetEvents, write=SetEvents};
__property TPlannerCalendarStyle Style = {read=FStyle, write=SetStyle, nodefault};
__property bool CustomDraw = {read=FCustomDraw, write=FCustomDraw, nodefault};
System::TDateTime __fastcall FirstDate(void);
System::TDateTime __fastcall LastDate(void);
__property TCancelledKeyEvent OnCancelledKey = {read=FOnCancelledKey, write=FOnCancelledKey};
__published:
__property Align = {default=0};
__property bool AllDaySelect = {read=FAllDaySelect, write=FAllDaySelect, default=0};
__property bool AutoThemeAdapt = {read=FAutoThemeAdapt, write=SetAutoThemeAdapt, default=0};
__property Anchors = {default=3};
__property Constraints ;
__property Advimage::TAdvImage* Background = {read=FImage, write=SetImage};
__property TBackGroundPosition BackgroundPosition = {read=FBackgroundPosition, write=SetBackgroundPosition, nodefault};
__property BevelInner = {default=0};
__property BevelOuter = {default=2};
__property BevelWidth = {default=1};
__property BorderWidth = {default=0};
__property bool BorderXP = {read=FBorderXP, write=SetBorderXP, default=1};
__property BorderStyle = {default=0};
__property TCalendarBrowsers* Browsers = {read=FBrowsers, write=FBrowsers};
__property bool Caption3D = {read=FCaption3D, write=SetCaption3D, default=0};
__property Color = {default=-16777201};
__property Cursor = {default=0};
__property DragMode = {default=0};
__property bool Enable = {read=FEnable, write=FEnable, default=1};
__property TWeekDays* InActiveDays = {read=FInActiveDays, write=FInActiveDays};
__property TPlannerCalendarLook Look = {read=FLook, write=SetLook, nodefault};
__property Graphics::TColor DateDownColor = {read=FDateDownColor, write=FDateDownColor, nodefault};
__property Graphics::TColor DateHoverColor = {read=FDateHoverColor, write=FDateHoverColor, nodefault};
__property Graphics::TColor DateSelectColor = {read=FDateSelectColor, write=SetDateSelectColor, default=8421376};
__property Graphics::TColor DateSelectBorderColor = {read=FDateSelectBorderColor, write=SetDateSelectBorderColor, default=8421376};
__property bool MultiSelect = {read=FMultiSelect, write=SetMultiSelect, default=0};
__property bool MultiSelectCtrlKey = {read=FMultiSelectCtrlKey, write=FMultiSelectCtrlKey, default=0};
__property Graphics::TFont* DayFont = {read=FDayFont, write=SetDayFont};
__property Graphics::TFont* WeekFont = {read=FWeekFont, write=SetWeekFont};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?