advsmoothlistbox.hpp
来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 849 行 · 第 1/3 页
HPP
849 行
TAdvSmoothListBoxAnchorClickEvent FOnAnchorClick;
TAdvSmoothListBoxShowDetailKey FShowDetailKey;
TAdvSmoothListBoxShowDetailClick FShowDetailClick;
Gdipfill::TGDIPFill* FFill;
bool FShowFocus;
Graphics::TColor FFocusColor;
TAdvSmoothListBoxItems* FDefaultItems;
TAdvSmoothListBoxItem* FDefaultItem;
Imglist::TCustomImageList* FImages;
bool FIsWinXP;
Advsmoothgdip::TAdvGDIPPicture* FDetailItemImage;
Advsmoothgdip::TAdvGDIPPicture* FItemImage;
TAdvSmoothListBoxItemCheckedEvent FOnItemRadioClick;
TAdvSmoothListBoxItemCheckedEvent FOnItemCheckClick;
TAdvSmoothListBoxItemClickEvent FOnItemImageClick;
TAdvSmoothListBoxItemCaptionClick FOnItemCaptionClick;
TAdvSmoothListBoxItemInfoClick FOnItemInfoClick;
TAdvSmoothListBoxItemAnchorClickEvent FOnItemAnchorClick;
HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
AnsiString __fastcall GetVersion();
void __fastcall SetItems(const TAdvSmoothListBoxItems* Value);
void __fastcall SetItemAppearance(const TAdvSmoothListBoxItemAppearance* Value);
void __fastcall SetLookUpBar(const TAdvSmoothListBoxLookUpBar* Value);
void __fastcall SetSpeedFactor(const int Value);
void __fastcall SetSorted(const bool Value);
void __fastcall SetSections(const TAdvSmoothListBoxSections* Value);
void __fastcall SetHeader(const TAdvSmoothListBoxHeaderFooter* Value);
void __fastcall SetScrollIndicator(const TAdvSmoothListBoxIndicator* Value);
void __fastcall SetFooter(const TAdvSmoothListBoxHeaderFooter* Value);
void __fastcall SetControl(const Controls::TControl* Value);
void __fastcall SetKeyBoardLookup(const bool Value);
void __fastcall SetSplitterHeight(const int Value);
void __fastcall SetShowDetailClick(const TAdvSmoothListBoxShowDetailClick Value);
void __fastcall SetShowDetailKey(const TAdvSmoothListBoxShowDetailKey Value);
void __fastcall SetFill(const Gdipfill::TGDIPFill* Value);
void __fastcall SetShowFocus(const bool Value);
void __fastcall SetFocusColor(const Graphics::TColor Value);
void __fastcall SetDefaultItem(const TAdvSmoothListBoxItem* Value);
void __fastcall SetDetailItemImage(const Advsmoothgdip::TAdvGDIPPicture* Value);
void __fastcall SetItemImage(const Advsmoothgdip::TAdvGDIPPicture* Value);
protected:
virtual void __fastcall Paint(void);
virtual void __fastcall CreateParams(Controls::TCreateParams ¶ms);
void __fastcall ItemsChanged(System::TObject* Sender);
void __fastcall ScrollIndicatorChanged(System::TObject* Sender);
void __fastcall AppearanceChanged(System::TObject* Sender);
void __fastcall LookupBarChanged(System::TObject* Sender);
void __fastcall HeaderFooterChanged(System::TObject* Sender);
void __fastcall ItemAppearanceChanged(System::TObject* Sender);
void __fastcall SectionsChanged(System::TObject* Sender);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
void __fastcall DoItemDblClick(System::TObject* Sender, int itemindex);
void __fastcall DoItemClick(System::TObject* Sender, int itemindex);
void __fastcall DoItemImageClick(System::TObject* Sender, int itemindex);
void __fastcall DoItemCheckClick(System::TObject* Sender, int itemindex, bool checked);
void __fastcall DoItemRadioClick(System::TObject* Sender, int itemindex, bool checked);
void __fastcall DoScroll(System::TObject* Sender, double CurrentPosition, double EndPosition);
void __fastcall DoHideDetail(System::TObject* Sender, int itemindex);
void __fastcall DoShowDetail(System::TObject* Sender, int itemindex);
void __fastcall DoItemText(System::TObject* Sender, int itemindex, AnsiString &itemcaption, AnsiString &iteminfo, AnsiString &itemnotes);
void __fastcall DoItemBkgDraw(System::TObject* Sender, Graphics::TCanvas* Canvas, int itemindex, const Types::TRect &itemrect, bool &defaultdraw);
void __fastcall DoItemDraw(System::TObject* Sender, Graphics::TCanvas* Canvas, int itemindex, const Types::TRect &itemrect, bool &defaultdraw);
void __fastcall DoAnchorClick(System::TObject* Sender, AnsiString Anchor);
void __fastcall DoItemAnchorClick(System::TObject* Sender, AnsiString Anchor, int ItemIndex);
void __fastcall DoItemCaptionClick(System::TObject* Sender, int itemindex);
void __fastcall DoItemInfoClick(System::TObject* Sender, int itemindex);
void __fastcall DrawBackground(void);
void __fastcall DrawHeaderFooter(TAdvSmoothListBoxHeaderFooter* Part, bool Header);
void __fastcall DrawItems(void);
void __fastcall DrawLookUpBar(void);
void __fastcall DrawScrollIndicator(void);
void __fastcall DrawSection(const Types::TRect &itemRect, AnsiString ch);
HIDESBASE void __fastcall Changed(void);
DYNAMIC void __fastcall Click(void);
virtual void __fastcall CreateWnd(void);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseMove(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 KeyDown(Word &Key, Classes::TShiftState Shift);
DYNAMIC void __fastcall DoEnter(void);
DYNAMIC void __fastcall DoExit(void);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
DYNAMIC void __fastcall DblClick(void);
DYNAMIC void __fastcall Resize(void);
void __fastcall AnimateSmoothPos(System::TObject* Sender);
void __fastcall InitDisplayList(void);
void __fastcall InitPreview(void);
void __fastcall AddDisplaySection(TAdvSmoothListBoxItem* Item, Types::TRect &prevrect, int height, int lookup);
void __fastcall AddDisplayItem(TAdvSmoothListBoxItem* Item, Types::TRect &prevrect, int height, int lookup);
void __fastcall GetTextPosition(int &x, int &y, const Advsmoothgdip::TGPRectF &rectangle, int objectwidth, int objectheight, TAdvSmoothListBoxLocation location);
int __fastcall GetVersionNr(void);
int __fastcall GetPositionTo(void);
int __fastcall GetPosition(void);
int __fastcall GetShadowOffset(void);
Types::TRect __fastcall GetHeaderFooterCaptionRect(TAdvSmoothListBoxHeaderFooter* Part, bool Header);
virtual bool __fastcall ItemFromDifferentCategory(TAdvSmoothListBoxItem* item1, TAdvSmoothListBoxItem* item2);
TAdvSmoothListBoxDisplayListItem* __fastcall FindFirstItemWithChar(AnsiString ch);
TAdvSmoothListBoxDisplayListItem* __fastcall FindFirstSectionWithChar(AnsiString ch);
Types::TRect __fastcall InsideRect();
virtual int __fastcall GetFullHeight(void);
virtual int __fastcall GetFullWidth(void);
public:
DYNAMIC void __fastcall MouseWheelHandler(Messages::TMessage &Message);
__fastcall virtual TAdvSmoothListBox(Classes::TComponent* AOwner);
__fastcall virtual ~TAdvSmoothListBox(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
void __fastcall ShowDetails(void);
void __fastcall HideDetails(void);
__property TAdvSmoothListBoxDetailStatus DetailStatus = {read=FDetailStatus, nodefault};
int __fastcall YToItem(int X, int Y, bool CountSections = false);
int __fastcall GetTopIndex(void);
int __fastcall GetBottomIndex(void);
void __fastcall SetComponentStyle(Advstyleif::TTMSStyle AStyle);
__published:
__property AnsiString Version = {read=GetVersion};
__property Gdipfill::TGDIPFill* Fill = {read=FFill, write=SetFill};
__property Imglist::TCustomImageList* Images = {read=FImages, write=FImages};
__property TAdvSmoothListBoxItems* Items = {read=FItems, write=SetItems};
__property TAdvSmoothListBoxItemAppearance* ItemAppearance = {read=FItemAppearance, write=SetItemAppearance};
__property int SplitterHeight = {read=FSplitterHeight, write=SetSplitterHeight, default=20};
__property TAdvSmoothListBoxLookUpBar* LookupBar = {read=FLookUpBar, write=SetLookUpBar};
__property int SpeedFactor = {read=FSpeedFactor, write=SetSpeedFactor, default=4};
__property bool Sorted = {read=FSorted, write=SetSorted, default=0};
__property TAdvSmoothListBoxSections* Sections = {read=FSections, write=SetSections};
__property TAdvSmoothListBoxHeaderFooter* Header = {read=FHeader, write=SetHeader};
__property TAdvSmoothListBoxHeaderFooter* Footer = {read=FFooter, write=SetFooter};
__property TAdvSmoothListBoxIndicator* ScrollIndicator = {read=FScrollIndicator, write=SetScrollIndicator};
__property Controls::TControl* DetailControl = {read=FControl, write=SetControl};
__property bool KeyBoardLookup = {read=FKeyBoardLookup, write=SetKeyBoardLookup, default=0};
__property Gdippicturecontainer::TGDIPPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
__property TAdvSmoothListBoxShowDetailClick ShowDetailClick = {read=FShowDetailClick, write=SetShowDetailClick, default=0};
__property TAdvSmoothListBoxShowDetailKey ShowDetailKey = {read=FShowDetailKey, write=SetShowDetailKey, default=0};
__property TAdvSmoothListBoxItemClickEvent OnItemDblClick = {read=FOnItemDblClick, write=FOnItemDblClick};
__property TAdvSmoothListBoxItemClickEvent OnItemClick = {read=FOnItemClick, write=FOnItemClick};
__property TAdvSmoothListBoxItemCheckedEvent OnItemCheckClick = {read=FOnItemCheckClick, write=FOnItemCheckClick};
__property TAdvSmoothListBoxItemCheckedEvent OnItemRadioClick = {read=FOnItemRadioClick, write=FOnItemRadioClick};
__property TAdvSmoothListBoxItemClickEvent OnItemImageClick = {read=FOnItemImageClick, write=FOnItemImageClick};
__property TAdvSmoothListBoxScrollEvent OnScroll = {read=FOnScroll, write=FOnScroll};
__property TAdvSmoothListBoxDetailEvent OnHideDetail = {read=FOnHideDetail, write=FOnHideDetail};
__property TAdvSmoothListBoxDetailEvent OnShowDetail = {read=FOnShowDetail, write=FOnShowDetail};
__property TAdvSmoothListBoxItemDrawEvent OnItemDraw = {read=FOnItemDraw, write=FOnItemDraw};
__property TAdvSmoothListBoxItemBkgDrawEvent OnItemBkgDraw = {read=FOnItemBkgDraw, write=FOnItemBkgDraw};
__property TAdvSmoothListBoxItemTextEvent OnItemText = {read=FOnItemText, write=FOnItemText};
__property TAdvSmoothListBoxAnchorClickEvent OnAnchorClick = {read=FOnAnchorClick, write=FOnAnchorClick};
__property TAdvSmoothListBoxItemAnchorClickEvent OnItemAnchorClick = {read=FOnItemAnchorClick, write=FOnItemAnchorClick};
__property TAdvSmoothListBoxItemCaptionClick OnItemCaptionClick = {read=FOnItemCaptionClick, write=FOnItemCaptionClick};
__property TAdvSmoothListBoxItemInfoClick OnItemInfoClick = {read=FOnItemInfoClick, write=FOnItemInfoClick};
__property bool ShowFocus = {read=FShowFocus, write=SetShowFocus, default=1};
__property Graphics::TColor FocusColor = {read=FFocusColor, write=SetFocusColor, default=0};
__property TAdvSmoothListBoxItem* DefaultItem = {read=FDefaultItem, write=SetDefaultItem};
__property Advsmoothgdip::TAdvGDIPPicture* ItemImage = {read=FItemImage, write=SetItemImage};
__property Advsmoothgdip::TAdvGDIPPicture* DetailItemImage = {read=FDetailItemImage, write=SetDetailItemImage};
__property Align = {default=0};
__property OnKeyDown ;
__property OnMouseUp ;
__property OnMouseMove ;
__property OnKeyPress ;
__property OnMouseDown ;
__property OnResize ;
__property OnDblClick ;
__property OnClick ;
__property OnEnter ;
__property OnExit ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnStartDrag ;
__property OnEndDrag ;
__property Visible = {default=1};
__property TabStop = {default=0};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAdvSmoothListBox(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop
private:
void *__ITMSStyle; /* Advstyleif::ITMSStyle */
public:
operator ITMSStyle*(void) { return (ITMSStyle*)&__ITMSStyle; }
};
class PASCALIMPLEMENTATION TAdvSmoothListBoxItemAppearance : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
TAdvSmoothListBox* FOwner;
int FSpacingVert;
int FSpacingHorz;
int FItemHeight;
Classes::TNotifyEvent FOnChange;
Gdipfill::TGDIPFill* FFill;
Gdipfill::TGDIPFill* FFillDisabled;
Gdipfill::TGDIPFill* FFillSelected;
void __fastcall SetItemHeight(const int Value);
void __fastcall SetSpacingHorz(const int Value);
void __fastcall SetSpacingVert(const int Value);
void __fastcall SetFill(const Gdipfill::TGDIPFill* Value);
void __fastcall SetFillDisabled(const Gdipfill::TGDIPFill* Value);
void __fastcall SetFillSelected(const Gdipfill::TGDIPFill* Value);
protected:
void __fastcall Changed(void);
void __fastcall FontChanged(System::TObject* Sender);
void __fastcall FillChanged(System::TObject* Sender);
public:
__fastcall TAdvSmoothListBoxItemAppearance(TAdvSmoothListBox* AOwner);
__fastcall virtual ~TAdvSmoothListBoxItemAppearance(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property Gdipfill::TGDIPFill* Fill = {read=FFill, write=SetFill};
__property Gdipfill::TGDIPFill* FillSelected = {read=FFillSelected, write=SetFillSelected};
__property Gdipfill::TGDIPFill* FillDisabled = {read=FFillDisabled, write=SetFillDisabled};
__property int VerticalSpacing = {read=FSpacingVert, write=SetSpacingVert, default=0};
__property int HorizontalSpacing = {read=FSpacingHorz, write=SetSpacingHorz, default=0};
__property int Height = {read=FItemHeight, write=SetItemHeight, default=30};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};
#pragma option push -b-
enum TAdvSmoothListBoxItemKind { ikItem, ikSection };
#pragma option pop
class PASCALIMPLEMENTATION TAdvSmoothListBoxDisplayListItem : public System::TObject
{
typedef System::TObject inherited;
private:
#pragma pack(push,1)
Types::TRect FItemRect;
#pragma pack(pop)
bool FFloating;
TAdvSmoothListBoxItemKind FKind;
TAdvSmoothListBoxItem* FItem;
AnsiString FSectionCaption;
void __fastcall SetFloating(const bool Value);
void __fastcall SetKind(const TAdvSmoothListBoxItemKind Value);
void __fastcall SetSectionCaption(const AnsiString Value);
protected:
void __fastcall Changed(void);
public:
__property TAdvSmoothListBoxItemKind Kind = {read=FKind, write=SetKind, nodefault};
__property AnsiString SectionCaption = {read=FSectionCaption, write=SetSectionCaption};
__property bool Floating = {read=FFloating, write=SetFloating, nodefault};
__property TAdvSmoothListBoxItem* DisplayItem = {read=FItem, write=FItem};
__property Types::TRect ItemRect = {read=FItemRect, write=FItemRect};
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TAdvSmoothListBoxDisplayListItem(void) : System::TObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TAdvSmoothListBoxDisplayListItem(void) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x0;
static const Shortint REL_VER = 0x0;
static const Shortint BLD_VER = 0x0;
} /* namespace Advsmoothlistbox */
using namespace Advsmoothlistbox;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Advsmoothlistbox
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?