📄 bsskinboxctrls.pas
字号:
procedure SetExtandedSelect(Value: Boolean);
function GetSelCount: Integer;
function GetSelected(Index: Integer): Boolean;
procedure SetSelected(Index: Integer; Value: Boolean);
function GetSorted: Boolean;
procedure SetSorted(Value: Boolean);
function GetTopIndex: Integer;
procedure SetTopIndex(Value: Integer);
function GetListBoxPopupMenu: TPopupMenu;
procedure SetListBoxPopupMenu(Value: TPopupMenu);
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure CreateControlDefaultImage(B: TBitMap); override;
procedure CreateControlSkinImage(B: TBitMap); override;
procedure ListBoxWProc(var Message: TMessage; var Handled: Boolean); virtual;
procedure ListBoxCreateWnd; virtual;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
function GetAutoComplete: Boolean;
procedure SetAutoComplete(Value: Boolean);
procedure SetTabWidths(Value: TStrings);
public
ScrollBar: TbsSkinScrollBar;
HScrollBar: TbsSkinScrollBar;
ListBox: TbsListBox;
FontName: String;
FontStyle: TFontStyles;
FontHeight: Integer;
SItemRect, ActiveItemRect, FocusItemRect: TRect;
ItemLeftOffset, ItemRightOffset: Integer;
ItemTextRect: TRect;
FontColor, ActiveFontColor, FocusFontColor: TColor;
CaptionRect: TRect;
CaptionFontName: String;
CaptionFontStyle: TFontStyles;
CaptionFontHeight: Integer;
CaptionFontColor: TColor;
UpButtonRect, ActiveUpButtonRect, DownUpButtonRect: TRect;
DownButtonRect, ActiveDownButtonRect, DownDownButtonRect: TRect;
CheckButtonRect, ActiveCheckButtonRect, DownCheckButtonRect: TRect;
VScrollBarName, HScrollBarName, BothScrollBarName: String;
ShowFocus: Boolean;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ChangeSkinData; override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
procedure UpDateScrollBar;
function CalcHeight(AItemsCount: Integer): Integer;
//
procedure Clear;
function ItemAtPos(Pos: TPoint; Existing: Boolean): Integer;
function ItemRect(Item: Integer): TRect;
//
property TabWidths: TStrings read FTabWidths write SetTabWidths;
property Columns: Integer read GetColumns write SetColumns;
property Selected[Index: Integer]: Boolean read GetSelected write SetSelected;
property ListBoxCanvas: TCanvas read GetCanvas;
property SelCount: Integer read GetSelCount;
property TopIndex: Integer read GetTopIndex write SetTopIndex;
//
property UseSkinItemHeight: Boolean
read FUseSkinItemHeight write FUseSkinItemHeight;
property DefaultCaptionHeight: Integer
read FDefaultCaptionHeight write SetDefaultCaptionHeight;
property DefaultCaptionFont: TFont
read FDefaultCaptionFont write SetDefaultCaptionFont;
property CaptionMode: Boolean read FCaptionMode
write SetCaptionMode;
property Alignment: TAlignment read FAlignment write SetAlignment
default taLeftJustify;
property DefaultItemHeight: Integer read FDefaultItemHeight
write SetDefaultItemHeight;
property Items: TStrings read GetItems write SetItems;
property ItemIndex: Integer read GetItemIndex write SetItemIndex;
property MultiSelect: Boolean read GetMultiSelect write SetMultiSelect;
property ListBoxFont: TFont read GetListBoxFont write SetListBoxFont;
property ListBoxTabOrder: TTabOrder read GetListBoxTabOrder write SetListBoxTabOrder;
property ListBoxTabStop: Boolean read GetListBoxTabStop write SetListBoxTabStop;
property ExtandedSelect: Boolean read GetExtandedSelect write SetExtandedSelect;
property Sorted: Boolean read GetSorted write SetSorted;
property ListBoxPopupMenu: TPopupMenu read GetListBoxPopupMenu write SetListBoxPopupMenu;
property HorizontalExtent: Boolean
read FHorizontalExtent
write SetHorizontalExtent;
property ListBoxDragMode: TDragMode read GetListBoxDragMode write SetListBoxDragMode;
property ListBoxDragKind: TDragKind read GetListBoxDragKind write SetListBoxDragKind;
property ListBoxDragCursor: TCursor read GetListBoxDragCursor write SetListBoxDragCursor;
property AutoComplete: Boolean read GetAutoComplete write SetAutoComplete;
property Caption;
property Font;
property Align;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property RowCount: Integer read FRowCount write SetRowCount;
property Images: TCustomImageList read FImages write SetImages;
property ImageIndex: Integer read FImageIndex write SetImageIndex;
property Glyph: TBitMap read FGlyph write SetGlyph;
property NumGlyphs: TbsSkinPanelNumGlyphs read FNumGlyphs write SetNumGlyphs;
property Spacing: Integer read FSpacing write SetSpacing;
property OnClick;
property OnUpButtonClick: TNotifyEvent read FOnUpButtonClick
write FOnUpButtonClick;
property OnDownButtonClick: TNotifyEvent read FOnDownButtonClick
write FOnDownButtonClick;
property OnCheckButtonClick: TNotifyEvent read FOnCheckButtonClick
write FOnCheckButtonClick;
property OnCanResize;
property OnConstrainedResize;
property OnDockDrop;
property OnDockOver;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnGetSiteInfo;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
property OnUnDock;
property OnListBoxClick: TNotifyEvent read FOnListBoxClick write FOnListBoxClick;
property OnListBoxDblClick: TNotifyEvent read FOnListBoxDblClick write FOnListBoxDblClick;
property OnListBoxMouseDown: TMouseEvent read FOnListBoxMouseDown write
FOnListBoxMouseDown;
property OnListBoxMouseMove: TMouseMoveEvent read FOnListBoxMouseMove
write FOnListBoxMouseMove;
property OnListBoxMouseUp: TMouseEvent read FOnListBoxMouseUp
write FOnListBoxMouseUp;
property OnListBoxKeyDown: TKeyEvent read FOnListBoxKeyDown write FOnListBoxKeyDown;
property OnListBoxKeyPress: TKeyPressEvent read FOnListBoxKeyPress write FOnListBoxKeyPress;
property OnListBoxKeyUp: TKeyEvent read FOnListBoxKeyUp write FOnListBoxKeyUp;
property OnDrawItem: TbsDrawSkinItemEvent read FOnDrawItem write FOnDrawItem;
property OnListBoxDragDrop: TDragDropEvent read GetOnListBoxDragDrop
write SetOnListBoxDragDrop;
property OnListBoxDragOver: TDragOverEvent read GetOnListBoxDragOver
write SetOnListBoxDragOver;
property OnListBoxStartDrag: TStartDragEvent read GetOnListBoxStartDrag
write SetOnListBoxStartDrag;
property OnListBoxEndDrag: TEndDragEvent read GetOnListBoxEndDrag
write SetOnListBoxEndDrag;
end;
TbsSkinListBox = class(TbsSkinCustomListBox)
published
property TabWidths;
property AutoComplete;
property UseSkinItemHeight;
property HorizontalExtent;
property Columns;
property RowCount;
property Images;
property ImageIndex;
property Glyph;
property NumGlyphs;
property Spacing;
property CaptionMode;
property DefaultCaptionHeight;
property DefaultCaptionFont;
property Alignment;
property DefaultItemHeight;
property Items;
property ItemIndex;
property MultiSelect;
property ListBoxFont;
property ListBoxTabOrder;
property ListBoxTabStop;
property ListBoxDragMode;
property ListBoxDragKind;
property ListBoxDragCursor;
property ExtandedSelect;
property Sorted;
property ListBoxPopupMenu;
//
property Caption;
property Font;
property Align;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property TabStop;
property OnClick;
property Visible;
property OnUpButtonClick;
property OnDownButtonClick;
property OnCheckButtonClick;
property OnCanResize;
property OnConstrainedResize;
property OnDockDrop;
property OnDockOver;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnGetSiteInfo;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnResize;
property OnStartDock;
property OnStartDrag;
property OnUnDock;
property OnListBoxClick;
property OnListBoxDblClick;
property OnListBoxMouseDown;
property OnListBoxMouseMove;
property OnListBoxMouseUp;
property OnListBoxKeyDown;
property OnListBoxKeyPress;
property OnListBoxKeyUp;
property OnListBoxDragDrop;
property OnListBoxDragOver;
property OnListBoxStartDrag;
property OnListBoxEndDrag;
property OnDrawItem;
end;
TbsSkinScrollBox = class(TbsSkinCustomControl)
protected
FClicksDisabled: Boolean;
FCanFocused: Boolean;
FInCheckScrollBars: Boolean;
FDown: Boolean;
FVScrollBar: TbsSkinScrollBar;
FHScrollBar: TbsSkinScrollBar;
FOldVScrollBarPos: Integer;
FOldHScrollBarPos: Integer;
FVSizeOffset: Integer;
FHSizeOffset: Integer;
FBorderStyle: TbsSkinBorderStyle;
procedure SetBorderStyle(Value: TbsSkinBorderStyle);
procedure SetVScrollBar(Value: TbsSkinScrollBar);
procedure SetHScrollBar(Value: TbsSkinScrollBar);
procedure VScrollControls(AOffset: Integer);
procedure HScrollControls(AOffset: Integer);
procedure OnHScrollBarChange(Sender: TObject);
procedure OnVScrollBarChange(Sender: TObject);
procedure OnHScrollBarLastChange(Sender: TObject);
procedure OnVScrollBarLastChange(Sender: TObject);
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure WMNCCALCSIZE(var Message: TWMNCCalcSize); message WM_NCCALCSIZE;
procedure WMNCPAINT(var Message: TWMNCPAINT); message WM_NCPAINT;
procedure PaintFrame(C: TCanvas);
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
procedure CreateParams(var Params: TCreateParams); override;
procedure GetSkinData; override;
procedure CreateControlDefaultImage(B: TBitMap); override;
procedure ChangeSkinData; override;
procedure AdjustClientRect(var Rect: TRect); override;
procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;
procedure WMWindowPosChanging(var Message: TWMWindowPosChanging); message WM_WINDOWPOSCHANGING;
procedure WndProc(var Message: TMessage); override;
procedure CMBENCPaint(var Message: TMessage); message CM_BENCPAINT;
public
BGPictureIndex: Integer;
procedure HScroll(APosition: Integer);
procedure VScroll(APosition: Integer);
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
procedure Paint; override;
procedure GetHRange;
procedure GetVRange;
procedure UpDateScrollRange;
published
property HScrollBar: TbsSkinScrollBar read FHScrollBar
write SetHScrollBar;
property VScrollBar: TbsSkinScrollBar read FVScrollBar
write SetVScrollBar;
property BorderStyle: TbsSkinBorderStyle
read FBorderStyle write SetBorderStyle;
property CanFocused: Boolean read FCanFocused write FCanFocused;
property Align;
property DockSite;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Color;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property OnCanResize;
property OnClick;
property OnConstrainedResize;
property OnDockDrop;
property OnDockOver;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -