📄 advcardlist.hpp
字号:
#pragma option pop
#pragma option push -b-
enum TAdvCardPictureHideCondition { phcAlwaysShow, phcEmpty, phcNotEmpty, phcCustom };
#pragma option pop
#pragma option push -b-
enum TAdvCardStringHideCondition { shcAlwaysShow, shcEmpty, shcNotEmpty, shcCustom };
#pragma option pop
#pragma option push -b-
enum TAdvCardImageSize { isOriginal, isStretched, isStretchedProp };
#pragma option pop
class DELPHICLASS TAdvCardTemplateItem;
class DELPHICLASS TAdvCardTemplate;
class DELPHICLASS TCustomAdvCardList;
class PASCALIMPLEMENTATION TAdvCardTemplateItem : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
bool FUpdate;
bool FAutoSize;
AnsiString FCaption;
Classes::TAlignment FCaptionAlignment;
Graphics::TColor FCaptionColor;
Graphics::TFont* FCaptionFont;
Stdctrls::TTextLayout FCaptionLayout;
bool FCustomDraw;
TAdvCardItemDataType FDataType;
AnsiString FDefaultValue;
TAdvCardImageSize FImageSize;
AnsiString FFormat;
Classes::TAlignment FValueAlignment;
Graphics::TColor FValueColor;
Graphics::TFont* FValueFont;
Stdctrls::TTextLayout FValueLayout;
Graphics::TColor FEditColor;
int FHeight;
TAdvCardBooleanHideCondition FHideBooleanCondition;
TAdvCardDateHideCondition FHideDateCondition;
TAdvCardFloatHideCondition FHideFloatCondition;
TAdvCardIntegerHideCondition FHideIntegerCondition;
TAdvCardPictureHideCondition FHidePictureCondition;
TAdvCardStringHideCondition FHideStringCondition;
TAdvCardItemEditor FItemEditor;
TAdvCardItemType FItemType;
Classes::TStringList* FList;
AnsiString FMask;
int FMaxHeight;
AnsiString FName;
AnsiString FPrefix;
bool FReadOnly;
bool FShowHint;
AnsiString FSuffix;
int FTag;
bool FVisible;
bool FWordWrap;
bool FDirectEdit;
bool FTransparentImage;
TCardListEditLink* FItemEditLink;
Classes::TNotifyEvent FOnTemplateItemChange;
Classes::TNotifyEvent FOnTemplateItemListChange;
TAdvCardItemURLType FValueURLType;
void __fastcall CheckEditorType(TAdvCardItemDataType Data, TAdvCardItemEditor Editor);
void __fastcall DoTemplateItemChange(void);
void __fastcall DoTemplateItemDefValChange(void);
void __fastcall DoTemplateItemHideCondChange(void);
void __fastcall DoTemplateItemListChange(void);
void __fastcall DoTemplateItemLinkedPropChange(AnsiString OldName);
void __fastcall HandleChildChange(System::TObject* Sender);
void __fastcall HandleListChange(System::TObject* Sender);
void __fastcall SetAutoSize(bool Value);
void __fastcall SetCaption(AnsiString Value);
void __fastcall SetCaptionAlignment(Classes::TAlignment Value);
void __fastcall SetCaptionColor(Graphics::TColor Value);
void __fastcall SetCaptionLayout(Stdctrls::TTextLayout Value);
void __fastcall SetCustomDraw(bool Value);
void __fastcall SetDataType(TAdvCardItemDataType Value);
void __fastcall SetDefaultValue(AnsiString Value);
void __fastcall SetImageSize(TAdvCardImageSize Value);
void __fastcall SetFormat(AnsiString Value);
void __fastcall SetValueAlignment(Classes::TAlignment Value);
void __fastcall SetValueColor(Graphics::TColor Value);
void __fastcall SetValueLayout(Stdctrls::TTextLayout Value);
void __fastcall SetEditColor(Graphics::TColor Value);
void __fastcall SetHeight(int Value);
void __fastcall SetHideBooleanCondition(TAdvCardBooleanHideCondition Value);
void __fastcall SetHideDateCondition(TAdvCardDateHideCondition Value);
void __fastcall SetHideFloatCondition(TAdvCardFloatHideCondition Value);
void __fastcall SetHideIntegerCondition(TAdvCardIntegerHideCondition Value);
void __fastcall SetHidePictureCondition(TAdvCardPictureHideCondition Value);
void __fastcall SetHideStringCondition(TAdvCardStringHideCondition Value);
void __fastcall SetItemEditor(TAdvCardItemEditor Value);
void __fastcall SetItemType(TAdvCardItemType Value);
void __fastcall SetList(Classes::TStringList* Value);
void __fastcall SetMask(AnsiString Value);
void __fastcall SetMaxHeight(int Value);
void __fastcall SetName(AnsiString Value);
void __fastcall SetPrefix(AnsiString Value);
void __fastcall SetReadOnly(bool Value);
void __fastcall SetShowHint(bool Value);
void __fastcall SetSuffix(AnsiString Value);
void __fastcall SetVisible(bool Value);
void __fastcall SetWordWrap(bool Value);
void __fastcall SetCaptionFont(const Graphics::TFont* Value);
void __fastcall SetValueFont(const Graphics::TFont* Value);
void __fastcall SetValueURLType(const TAdvCardItemURLType Value);
protected:
TAdvCardTemplate* __fastcall GetTemplate(void);
TCustomAdvCardList* __fastcall GetCardList(void);
virtual AnsiString __fastcall GetDisplayName();
virtual void __fastcall SetDisplayName(const AnsiString Value);
public:
__fastcall virtual TAdvCardTemplateItem(Classes::TCollection* Collection);
__fastcall virtual ~TAdvCardTemplateItem(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
virtual void __fastcall AssignVisuals(Classes::TPersistent* Source);
__property TCustomAdvCardList* CardList = {read=GetCardList};
__property TAdvCardTemplate* CardTemplate = {read=GetTemplate};
__published:
__property bool AutoSize = {read=FAutoSize, write=SetAutoSize, default=1};
__property AnsiString Caption = {read=FCaption, write=SetCaption};
__property Classes::TAlignment CaptionAlignment = {read=FCaptionAlignment, write=SetCaptionAlignment, default=0};
__property Graphics::TColor CaptionColor = {read=FCaptionColor, write=SetCaptionColor, default=536870911};
__property Graphics::TFont* CaptionFont = {read=FCaptionFont, write=SetCaptionFont};
__property Stdctrls::TTextLayout CaptionLayout = {read=FCaptionLayout, write=SetCaptionLayout, default=1};
__property bool CustomDraw = {read=FCustomDraw, write=SetCustomDraw, default=0};
__property TAdvCardItemDataType DataType = {read=FDataType, write=SetDataType, default=0};
__property AnsiString DefaultValue = {read=FDefaultValue, write=SetDefaultValue};
__property bool DirectEdit = {read=FDirectEdit, write=FDirectEdit, default=0};
__property Graphics::TColor EditColor = {read=FEditColor, write=SetEditColor, default=-16777211};
__property AnsiString Format = {read=FFormat, write=SetFormat};
__property int MaxHeight = {read=FMaxHeight, write=SetMaxHeight, default=66};
__property int Height = {read=FHeight, write=SetHeight, default=22};
__property TAdvCardBooleanHideCondition HideBooleanCondition = {read=FHideBooleanCondition, write=SetHideBooleanCondition, default=0};
__property TAdvCardDateHideCondition HideDateCondition = {read=FHideDateCondition, write=SetHideDateCondition, default=0};
__property TAdvCardFloatHideCondition HideFloatCondition = {read=FHideFloatCondition, write=SetHideFloatCondition, default=0};
__property TAdvCardIntegerHideCondition HideIntegerCondition = {read=FHideIntegerCondition, write=SetHideIntegerCondition, default=0};
__property TAdvCardPictureHideCondition HidePictureCondition = {read=FHidePictureCondition, write=SetHidePictureCondition, default=0};
__property TAdvCardStringHideCondition HideStringCondition = {read=FHideStringCondition, write=SetHideStringCondition, default=0};
__property TAdvCardImageSize ImageSize = {read=FImageSize, write=SetImageSize, default=0};
__property TCardListEditLink* ItemEditLink = {read=FItemEditLink, write=FItemEditLink};
__property TAdvCardItemEditor ItemEditor = {read=FItemEditor, write=SetItemEditor, stored=true, nodefault};
__property TAdvCardItemType ItemType = {read=FItemType, write=SetItemType, default=0};
__property Classes::TStringList* List = {read=FList, write=SetList};
__property AnsiString Mask = {read=FMask, write=SetMask};
__property AnsiString Name = {read=FName, write=SetName};
__property AnsiString Prefix = {read=FPrefix, write=SetPrefix};
__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
__property bool ShowHint = {read=FShowHint, write=SetShowHint, default=0};
__property AnsiString Suffix = {read=FSuffix, write=SetSuffix};
__property int Tag = {read=FTag, write=FTag, nodefault};
__property bool TransparentImage = {read=FTransparentImage, write=FTransparentImage, default=1};
__property Classes::TAlignment ValueAlignment = {read=FValueAlignment, write=SetValueAlignment, default=0};
__property Graphics::TColor ValueColor = {read=FValueColor, write=SetValueColor, default=536870911};
__property Graphics::TFont* ValueFont = {read=FValueFont, write=SetValueFont};
__property Stdctrls::TTextLayout ValueLayout = {read=FValueLayout, write=SetValueLayout, default=1};
__property TAdvCardItemURLType ValueURLType = {read=FValueURLType, write=SetValueURLType, default=0};
__property bool Visible = {read=FVisible, write=SetVisible, default=1};
__property bool WordWrap = {read=FWordWrap, write=SetWordWrap, default=0};
__property Classes::TNotifyEvent OnTemplateItemChange = {read=FOnTemplateItemChange, write=FOnTemplateItemChange};
__property Classes::TNotifyEvent OnTemplateItemListChange = {read=FOnTemplateItemListChange, write=FOnTemplateItemListChange};
};
class DELPHICLASS TAdvCardTemplateItems;
class DELPHICLASS TAdvCards;
class PASCALIMPLEMENTATION TAdvCardTemplateItems : public Classes::TOwnedCollection
{
typedef Classes::TOwnedCollection inherited;
public:
TAdvCardTemplateItem* operator[](int Index) { return Items[Index]; }
private:
TAdvCardTemplate* FCardTemplate;
HIDESBASE TAdvCardTemplateItem* __fastcall GetItem(int Index);
void __fastcall SetCards(TAdvCards* Value);
HIDESBASE void __fastcall SetItem(int Index, TAdvCardTemplateItem* Value);
protected:
TAdvCards* FCards;
virtual void __fastcall SetItemName(Classes::TCollectionItem* AItem);
virtual void __fastcall Update(Classes::TCollectionItem* Item);
void __fastcall ItemChanged(TAdvCardTemplateItem* Item);
void __fastcall ItemHideCondChanged(TAdvCardTemplateItem* Item);
void __fastcall ItemListChanged(TAdvCardTemplateItem* Item);
void __fastcall ItemLinkedPropChanged(TAdvCardTemplateItem* Item, AnsiString OldName);
public:
__fastcall TAdvCardTemplateItems(TAdvCardTemplate* CardTemplate, TMetaClass* ItemClass);
HIDESBASE TAdvCardTemplateItem* __fastcall Add(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
HIDESBASE void __fastcall Delete(int Index);
TAdvCardTemplateItem* __fastcall GetItemByName(AnsiString Name);
HIDESBASE TAdvCardTemplateItem* __fastcall Insert(int Index);
__property TAdvCards* Cards = {read=FCards, write=SetCards};
__property TAdvCardTemplate* CardTemplate = {read=FCardTemplate};
__property TAdvCardTemplateItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
#pragma option push -w-inl
/* TCollection.Destroy */ inline __fastcall virtual ~TAdvCardTemplateItems(void) { }
#pragma option pop
};
typedef TMetaClass* TCardTemplateItemsClass;
typedef void __fastcall (__closure *TTemplateItemEvent)(System::TObject* Sender, TAdvCardTemplateItem* Item);
class PASCALIMPLEMENTATION TAdvCardTemplate : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
TCustomAdvCardList* FCardList;
TAdvCardTemplateItems* FItems;
TAdvCardTemplateItems* FDefItems;
TAdvCardTemplateItem* FDefaultItem;
Classes::TAlignment FCardCaptionAlignment;
int FCardCaptionHeight;
int FCardWidth;
int FHorMargins;
int FIndent;
int FItemLabelWidth;
int FItemLabelRealWidth;
int FItemSpacing;
int FItemValueWidth;
int FVertMargins;
TTemplateItemEvent FOnTemplateItemAdd;
TTemplateItemEvent FOnBeforTemplateItemDelete;
Classes::TNotifyEvent FOnCardTemplateChange;
void __fastcall AdjustItemLabelWidth(void);
void __fastcall AdjustItemValueWidth(void);
void __fastcall DoCardTemplateChange(void);
void __fastcall SetCardCaptionAlignment(Classes::TAlignment Value);
void __fastcall SetCardCaptionHeight(int Value);
void __fastcall SetCardWidth(int Value);
void __fastcall SetHorMargins(int Value);
void __fastcall SetIndent(int Value);
void __fastcall SetItemLabelWidth(int Value);
void __fastcall SetItems(TAdvCardTemplateItems* Value);
void __fastcall SetItemSpacing(int Value);
void __fastcall SetItemValueWidth(int Value);
void __fastcall SetVertMargins(int Value);
void __fastcall SetDefaultItem(const TAdvCardTemplateItem* Value);
protected:
DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
void __fastcall BeforTemplateItemDelete(TAdvCardTemplateItem* Item);
void __fastcall TemplateItemAdd(TAdvCardTemplateItem* Item);
public:
__fastcall TAdvCardTemplate(TCustomAdvCardList* CardList, TMetaClass* TemplateItemsClass, TMetaClass* ItemClass);
__fastcall virtual ~TAdvCardTemplate(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__property TCustomAdvCardList* CardList = {read=FCardList};
__property int ItemLabelRealWidth = {read=FItemLabelRealWidth, nodefault};
__published:
__property Classes::TAlignment CardCaptionAlignment = {read=FCardCaptionAlignment, write=SetCardCaptionAlignment, default=0};
__property int CardCaptionHeight = {read=FCardCaptionHeight, write=SetCardCaptionHeight, default=22};
__property int CardWidth = {read=FCardWidth, write=SetCardWidth, default=200};
__property TAdvCardTemplateItem* DefaultItem = {read=FDefaultItem, write=SetDefaultItem};
__property int HorMargins = {read=FHorMargins, write=SetHorMargins, default=10};
__property int Indent = {read=FIndent, write=SetIndent, default=5};
__property int ItemLabelWidth = {read=FItemLabelWidth, write=SetItemLabelWidth, default=100};
__property TAdvCardTemplateItems* Items = {read=FItems, write=SetItems};
__property int ItemSpacing = {read=FItemSpacing, write=SetItemSpacing, default=5};
__property int ItemValueWidth = {read=FItemValueWidth, write=SetItemValueWidth, stored=false, nodefault};
__property int VertMargins = {read=FVertMargins, write=SetVertMargins, default=10};
__property TTemplateItemEvent OnTemplateItemAdd = {read=FOnTemplateItemAdd, write=FOnTemplateItemAdd};
__property TTemplateItemEvent OnBeforTemplateItemDelete = {read=FOnBeforTemplateItemDelete, write=FOnBeforTemplateItemDelete};
__property Classes::TNotifyEvent OnCardTemplateChange = {read=FOnCardTemplateChange, write=FOnCardTemplateChange};
};
class DELPHICLASS TAdvCardItem;
class PASCALIMPLEMENTATION TAdvCardItem : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
bool FBoolean;
bool FHided;
bool FSelected;
AnsiString FString;
int FInteger;
double FFloat;
System::TDateTime FDate;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -