Add custom event to send loop points to MainFrame.

This commit is contained in:
apoorv569
2021-08-29 19:45:03 +05:30
parent 627cb76950
commit f061fe8a8c
7 changed files with 238 additions and 33 deletions
+9 -15
View File
@@ -36,17 +36,11 @@
class WaveformViewer : public wxPanel
{
public:
WaveformViewer(wxWindow* parentFrame, wxWindow* window, wxStatusBar& statusbar, wxDataViewListCtrl& library, wxMediaCtrl& mediaCtrl,
wxTimer& timer, wxInfoBar& infoBar, const std::string& configFilepath, const std::string& databaseFilepath);
WaveformViewer(wxWindow* parentFrame, wxWindow* window, wxDataViewListCtrl& library,
wxMediaCtrl& mediaCtrl, wxTimer& timer, wxInfoBar& infoBar,
const std::string& configFilepath, const std::string& databaseFilepath);
~WaveformViewer();
private:
// -------------------------------------------------------------------
struct LoopPoints
{
double A, B;
};
private:
// -------------------------------------------------------------------
wxWindow* m_ParentFrame;
@@ -56,7 +50,6 @@ class WaveformViewer : public wxPanel
wxInfoBar& m_InfoBar;
wxMediaCtrl& m_MediaCtrl;
wxTimer& m_Timer;
wxStatusBar& m_StatusBar;
const std::string& m_ConfigFilepath;
const std::string& m_DatabaseFilepath;
@@ -94,11 +87,12 @@ class WaveformViewer : public wxPanel
void OnControlKeyUp(wxKeyEvent& event);
void OnControlKeyDown(wxKeyEvent& event);
public:
LoopPoints GetLoopPoints();
// -------------------------------------------------------------------
// Send custom events
void SendLoopPoints();
void SendStatusBarStatus(const wxString& msg, int section);
public:
inline bool IsBitmapDirty() { return bBitmapDirty; }
inline void SetBitmapDirty(bool dirty) { bBitmapDirty = dirty; }
inline bool IsAreaSelected() { return bAreaSelected; }
// -------------------------------------------------------------------
void ResetDC();
};