78 lines
2.3 KiB
C++
78 lines
2.3 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#ifndef BasePanelUnitH
|
|
#define BasePanelUnitH
|
|
|
|
#include "ShowBarsPanelUnit.h"
|
|
//#include "BackupUnit.h"
|
|
|
|
namespace BasePanelUnit
|
|
{
|
|
|
|
//---------------------------------------------------------------------------
|
|
class TPanel : public TShowBarsPanel
|
|
{
|
|
__published:
|
|
void __fastcall StageHeaderMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
void __fastcall StageHeaderMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
|
|
void __fastcall StageHeaderMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
private:
|
|
TComponentList * m_lstStageHeader;
|
|
|
|
int m_nChordWidth,
|
|
m_nChordHeight,
|
|
m_iFocusCell,
|
|
m_iPreApartBar,
|
|
m_iPreDeleteStage,
|
|
m_iDragStage,
|
|
m_xDragStart;
|
|
|
|
bool m_bStageHeaderDraging;
|
|
|
|
TImage * NewStageHeader( int iStage );
|
|
void UpdateStageHeader( int iStage );
|
|
void DrawFocusedCell( TRect& rectFocus );
|
|
void AddStageHeader( int iStage, int iShowBar, int iVar );
|
|
void RemoveStageHeader( int iVar );
|
|
|
|
protected:
|
|
virtual void __fastcall CreateWnd();
|
|
virtual void __fastcall BarPosChanged();
|
|
virtual void __fastcall SetBarTitle( int iBar, String& strText );
|
|
virtual void __fastcall DrawBarBkgnd( int iBar, int leftDraw, int topDraw );
|
|
virtual void __fastcall DrawBarContext( int iBar, int leftDraw, int topDraw );
|
|
virtual void __fastcall DrawBarOperation( int iBar, int leftDraw, int topDraw );
|
|
// DYNAMIC void __fastcall KeyDown(System::Word &Key, System::Classes::TShiftState Shift);
|
|
|
|
public:
|
|
__fastcall virtual TPanel(System::Classes::TComponent* AOwner);
|
|
__fastcall ~TPanel();
|
|
|
|
void InitialVars();
|
|
int GetBarNum(){ return m_nBarNum; };
|
|
// BOOL CheckModify( int iCheckType=CHECK_ALL );
|
|
// void BackupModify();
|
|
|
|
// void SetMelodyKey( int iKey );
|
|
|
|
void SetBarFill( int iBar, int iFill );
|
|
|
|
int FindStage( int iBar );
|
|
void SetStageVar( int iStage, int iVar );
|
|
|
|
bool SetFocusCell( int iBar, bool bSecond=false );
|
|
int GetFocusChord( int& iMainKey, int& iAjustKey, int& iChordType );
|
|
bool SetFocusChord( int iMainKey, int iAjustKey, int iChordType );
|
|
bool HasChordSet();
|
|
void DeleteAllChord();
|
|
|
|
bool SetApartPos( int iBar, int iPoint, bool bPre=false );
|
|
bool SetCombinePos( int iBar, int iPoint, bool bPre=false );
|
|
};
|
|
|
|
}
|
|
|
|
using namespace BasePanelUnit;
|
|
|
|
#endif
|