83 lines
2.7 KiB
C++
83 lines
2.7 KiB
C++
//---------------------------------------------------------------------------
|
|
|
|
#ifndef VolumeFormUnitH
|
|
#define VolumeFormUnitH
|
|
//---------------------------------------------------------------------------
|
|
#include <System.Classes.hpp>
|
|
#include <Vcl.Controls.hpp>
|
|
#include <Vcl.StdCtrls.hpp>
|
|
#include <Vcl.Forms.hpp>
|
|
#include <Vcl.ExtCtrls.hpp>
|
|
#include <Vcl.AppEvnts.hpp>
|
|
#include "SkinTrackBar.h"
|
|
//#include "LineEdit.h"
|
|
#include "CKBox.h"
|
|
#include "MessageDef.h"
|
|
|
|
#include <vector>
|
|
using namespace std;
|
|
|
|
//---------------------------------------------------------------------------
|
|
class TVolumeForm : public TForm
|
|
{
|
|
__published: // IDE-managed Components
|
|
TSkinTrackBar *m_InputTrackBar;
|
|
TSkinTrackBar *m_PlayTrackBar;
|
|
TLabel *m_InputLabel;
|
|
TLabel *m_PlayLabel;
|
|
TLabel *m_ShowInput;
|
|
TLabel *m_ShowPlay;
|
|
|
|
void __fastcall DoFormMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
|
|
int X, int Y);
|
|
void __fastcall DoFormShow(TObject *Sender);
|
|
void __fastcall OnMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
|
|
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
|
void __fastcall FormCreate(TObject *Sender);
|
|
void __fastcall FormDestroy(TObject *Sender);
|
|
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
|
|
private: // User declarations
|
|
bool m_IsMouseOver;
|
|
bool m_bRecording;
|
|
// int m_volBefore;
|
|
|
|
TTimer *m_pTimer; //È·¶¨undo¶¨Ê±Æ÷
|
|
|
|
vector<TLabel*> m_aLabels;
|
|
vector<TCKBox*> m_aChecks;
|
|
vector<TSkinTrackBar*> m_aTracks;
|
|
|
|
void Undo( bool bUndo );
|
|
|
|
void __fastcall DoVolumeChanged(TObject *Sender);
|
|
void __fastcall DoTrackMute(TObject *Sender);
|
|
void __fastcall TimerProc(TObject* Sender);
|
|
|
|
MESSAGE void __fastcall WMEraseBkgnd(Winapi::Messages::TWMEraseBkgnd &Message);
|
|
MESSAGE void __fastcall CMMouseEnter(TMessage &Message);
|
|
MESSAGE void __fastcall CMMouseLeave(TMessage &Message);
|
|
MESSAGE void __fastcall WMKillFocus(TWMKillFocus &Message);
|
|
|
|
BEGIN_MESSAGE_MAP
|
|
MESSAGE_HANDLER(WM_ERASEBKGND, TWMEraseBkgnd, WMEraseBkgnd)
|
|
MESSAGE_HANDLER(CM_MOUSEENTER, TMessage, CMMouseEnter)
|
|
MESSAGE_HANDLER(CM_MOUSELEAVE, TMessage, CMMouseLeave)
|
|
MESSAGE_HANDLER(WM_KILLFOCUS, TWMKillFocus, WMKillFocus)
|
|
|
|
END_MESSAGE_MAP(TForm)
|
|
|
|
protected:
|
|
DYNAMIC void __fastcall MouseMove(TShiftState Shift, int X, int Y);
|
|
|
|
public: // User declarations
|
|
__fastcall TVolumeForm(TComponent* Owner);
|
|
|
|
int __fastcall ShowUndo( bool bUndo );
|
|
void __fastcall OnRecord( bool bRecord );
|
|
void __fastcall ChangeRecordVol();
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
extern PACKAGE TVolumeForm *VolumeForm;
|
|
//---------------------------------------------------------------------------
|
|
#endif
|