57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#ifndef ComposeListBoxUnitH
|
|
#define ComposeListBoxUnitH
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include "SkinListBoxUnit.h"
|
|
|
|
namespace ComposeListBoxUnit
|
|
{
|
|
//---------------------------------------------------------------------------
|
|
class TListBox : public TSkinListBox
|
|
{
|
|
private:
|
|
TBitmap *m_imgBackground;
|
|
TImage *m_imgDrag;
|
|
int m_xImgDrag,
|
|
m_yImgDrag,
|
|
m_iDragOverPos,
|
|
m_iDragingStage;
|
|
bool m_bDraging,
|
|
m_bAddStage;
|
|
TFont * m_pFntText;
|
|
COLORREF m_clrSelected,
|
|
m_clrBevelRaise,
|
|
m_clrBevelLower;
|
|
|
|
void UpdateDragOverPos( int iNewPos );
|
|
|
|
protected:
|
|
virtual void __fastcall DrawItem(int Index, const System::Types::TRect &Rect, Winapi::Windows::TOwnerDrawState State);
|
|
DYNAMIC void __fastcall DragCanceled(void){};
|
|
MESSAGE void __fastcall WMPaint(Winapi::Messages::TWMPaint &Message);
|
|
|
|
BEGIN_MESSAGE_MAP
|
|
MESSAGE_HANDLER(WM_PAINT, TWMPaint, WMPaint)
|
|
END_MESSAGE_MAP(TSkinListBox)
|
|
public:
|
|
__fastcall virtual TListBox(System::Classes::TComponent* AOwner);
|
|
__fastcall ~TListBox();
|
|
|
|
void SetDragImage( TImage* img ){ m_imgDrag=img; };
|
|
void SetDragState( bool bDraging );
|
|
void SetDragStage( bool bAdd, int iStage );
|
|
void SetDragImgPos( int X, int Y );
|
|
BOOL SetDragingPoint( int X, int Y );
|
|
int SetDropPoint( int X, int Y );
|
|
void InsertStage( int iStage, int iInsertPos );
|
|
void AddStage( int iStage );
|
|
void DeleteStage( int iStage );
|
|
void MoveStage( int iSource, int iDest );
|
|
};
|
|
|
|
}
|
|
using namespace ComposeListBoxUnit;
|
|
#endif
|