158 lines
4.3 KiB
C++
158 lines
4.3 KiB
C++
#ifndef _DRUMS_VIEWWINDOW_HPP_
|
|
#define _DRUMS_VIEWWINDOW_HPP_
|
|
#ifndef _COMMON_MDIWIN_HPP_
|
|
#include <common/mdiwin.hpp>
|
|
#endif
|
|
#ifndef _COMMON_SMARTPOINTER_HPP_
|
|
#include <common/pointer.hpp>
|
|
#endif
|
|
//#ifndef _GUITAR_TABLATURE_HPP_
|
|
//#include <guitar/tablature.hpp>
|
|
//#endif
|
|
#ifndef _THREAD_MESSAGETHREAD_HPP_
|
|
#include <thread/mthread.hpp>
|
|
#endif
|
|
//#ifndef _GUITAR_TABPAGE_HPP_
|
|
//#include <guitar/tabpage.hpp>
|
|
//#endif
|
|
#ifndef _MIDISEQ_MIDIOUTDEVICE_HPP_
|
|
#include <midiseq/midiout.hpp>
|
|
#endif
|
|
|
|
class StatusBarEx;
|
|
class DrumControl;
|
|
|
|
class ViewWindow : public MDIWindow, public MessageThread
|
|
{
|
|
public:
|
|
enum{THPlay,THPlayFromCurrent,THPlayRange,THStop};
|
|
ViewWindow(void);
|
|
virtual ~ViewWindow();
|
|
// void setFretboardHandler(CallbackPointer &callbackPointer);
|
|
// bool createProject(const String &strPathTabFile);
|
|
// bool createProject(void);
|
|
// bool openProject(const String &pathFileName);
|
|
// bool saveProject(const String &pathFileName);
|
|
// bool saveProject(void);
|
|
// void play(void);
|
|
// void playFromCurrent(void);
|
|
// void stopPlay(void);
|
|
// void playRepeated(void);
|
|
// void playRange(int rangeIndex);
|
|
// void playRangeRepeated(int rangeIndex);
|
|
// void cut(void);
|
|
// void copy(void);
|
|
// void paste(void);
|
|
// void modifyProperties(void);
|
|
// void setStartRange(void);
|
|
// void setEndRange(void);
|
|
// bool getTabRanges(TabRanges &ranges);
|
|
// void setTabRanges(const TabRanges &ranges);
|
|
// const TabEntries &getEntries(void)const;
|
|
// bool insert(const TabEntry &entry);
|
|
// bool insert(const TabEntries &entries);
|
|
// int getNumTabEntries(void)const;
|
|
// void increaseTempo(void);
|
|
// void decreaseTempo(void);
|
|
String getTitle(void)const;
|
|
// const String &getPathFileProject(void)const;
|
|
// void setStatusControlRef(SmartPointer<StatusBarEx> &statusBar);
|
|
// bool isDirty(void);
|
|
protected:
|
|
virtual void preRegister(WNDCLASS &wndClass);
|
|
virtual void preCreate(MDICREATESTRUCT &createStruct);
|
|
private:
|
|
enum {WindowWidth=565,WindowHeight=210,RestBeforeRepeat=500};
|
|
CallbackData::ReturnType createHandler(CallbackData &someCallbackData);
|
|
CallbackData::ReturnType sizeHandler(CallbackData &someCallbackData);
|
|
CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
|
|
CallbackData::ReturnType leftButtonDoubleHandler(CallbackData &someCallbackData);
|
|
CallbackData::ReturnType closeHandler(CallbackData &someCallbackData);
|
|
CallbackData::ReturnType rightButtonDownHandler(CallbackData &someCallbackData);
|
|
DWORD threadHandler(ThreadMessage &threadMessage);
|
|
void setTitle(const String &strTitle);
|
|
// void enablePlaySelect(bool enable);
|
|
// void enableStopSelect(bool enable);
|
|
// void enableCut(bool enable);
|
|
// void enableCopy(bool enable);
|
|
// void enablePaste(bool enable);
|
|
// bool getEnableCut(void);
|
|
// bool getEnableCopy(void);
|
|
// bool getEnablePaste(void);
|
|
// bool isInRepeatPlay(void)const;
|
|
// void isInRepeatPlay(bool isInRepeatPlay);
|
|
// bool getProjectName(String &strPathFileProject);
|
|
// void thPlay(void);
|
|
// void thPlayFromCurrent(void);
|
|
// void thPlayRange(int rangeIndex);
|
|
|
|
Callback<ViewWindow> mCreateHandler;
|
|
Callback<ViewWindow> mSizeHandler;
|
|
Callback<ViewWindow> mPaintHandler;
|
|
Callback<ViewWindow> mLeftButtonDoubleHandler;
|
|
Callback<ViewWindow> mPlayNoteHandler;
|
|
Callback<ViewWindow> mCloseHandler;
|
|
Callback<ViewWindow> mRightButtonDownHandler;
|
|
ThreadCallback<ViewWindow> mThreadHandler;
|
|
|
|
SmartPointer<DrumControl> mDrumControl;
|
|
|
|
// SmartPointer<TabPage> mTabPage;
|
|
// SmartPointer<MIDIOutputDevice> mMIDIDevice;
|
|
// Tablature mTablature;
|
|
// bool mIsInRepeatPlay;
|
|
};
|
|
|
|
/*
|
|
inline
|
|
const TabEntries &ViewWindow::getEntries(void)const
|
|
{
|
|
return ((SmartPointer<TabPage>&)mTabPage)->getEntries();
|
|
}
|
|
|
|
inline
|
|
void ViewWindow::setFretboardHandler(CallbackPointer &callbackPointer)
|
|
{
|
|
mTabPage->setPlayNoteHandler(callbackPointer);
|
|
}
|
|
|
|
inline
|
|
bool ViewWindow::isDirty(void)
|
|
{
|
|
return mTabPage->isDirty();
|
|
}
|
|
|
|
inline
|
|
bool ViewWindow::isInRepeatPlay(void)const
|
|
{
|
|
return mIsInRepeatPlay;
|
|
}
|
|
|
|
inline
|
|
void ViewWindow::isInRepeatPlay(bool isInRepeatPlay)
|
|
{
|
|
mIsInRepeatPlay=isInRepeatPlay;
|
|
}
|
|
|
|
inline
|
|
const String &ViewWindow::getPathFileProject(void)const
|
|
{
|
|
return mTablature.getPathFileProject();
|
|
}
|
|
|
|
inline
|
|
int ViewWindow::getNumTabEntries(void)const
|
|
{
|
|
return ((SmartPointer<TabPage>&)mTabPage)->getEntries().size();
|
|
}
|
|
|
|
inline
|
|
void ViewWindow::setStatusControlRef(SmartPointer<StatusBarEx> &statusBar)
|
|
{
|
|
mTabPage->setStatusControlRef(statusBar);
|
|
}
|
|
*/
|
|
#endif
|
|
|
|
|