Files
Work/mixer/ChannelCtrlMgr.hpp
2024-08-07 09:16:27 -04:00

45 lines
1.3 KiB
C++

#ifndef _MIXER_CHANNELCTRLMGR_HPP_
#define _MIXER_CHANNELCTRLMGR_HPP_
#ifndef _COMMON_WINDOW_HPP_
#include <common/window.hpp>
#endif
#ifndef _COMMON_SMARTPOINTER_HPP_
#include <common/pointer.hpp>
#endif
#ifndef _COMMON_OWNERDRAWLIST_HPP_
#include <common/odlist.hpp>
#endif
class ResBitmap;
class OwnerDrawListControl : public OwnerDrawList
{
public:
OwnerDrawListControl(GUIWindow &parentWnd,const Rect &initRect,UINT controlID,DWORD style=LBS_NOTIFY|LBS_HASSTRINGS|LBS_USETABSTOPS|LBS_OWNERDRAWFIXED|WS_VSCROLL|WS_HSCROLL|WS_CLIPCHILDREN|WS_CLIPSIBLINGS|WS_DLGFRAME);
virtual ~OwnerDrawListControl();
protected:
virtual void drawEntire(const DrawItem &drawItem);
private:
SmartPointer<ResBitmap> mButtonUp;
SmartPointer<ResBitmap> mButtonDown;
SmartPointer<ResBitmap> mSelectOn;
SmartPointer<ResBitmap> mSelectOff;
int mMaxHeight;
};
class ChannelControlManager : public Window
{
public:
ChannelControlManager(GUIWindow &parentWindow,const Rect &creationRect,UINT controlID);
virtual ~ChannelControlManager();
private:
void createWindow(GUIWindow &parentWindow,const Rect &creationRect,UINT controlID);
CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
void registerClass();
static char szClassName[];
Callback<ChannelControlManager> mPaintHandler;
SmartPointer<OwnerDrawListControl> mListBox;
};
#endif