142b7984aSPete Goodeve/* PatchRow.h
242b7984aSPete Goodeve * ----------
342b7984aSPete Goodeve *
442b7984aSPete Goodeve * Copyright 2013, Haiku, Inc. All rights reserved.
542b7984aSPete Goodeve * Distributed under the terms of the MIT License.
642b7984aSPete Goodeve *
742b7984aSPete Goodeve * Revisions by Pete Goodeve
842b7984aSPete Goodeve *
942b7984aSPete Goodeve * Copyright 1999, Be Incorporated.   All Rights Reserved.
1042b7984aSPete Goodeve * This file may be used under the terms of the Be Sample Code License.
1142b7984aSPete Goodeve */
1282fbbe21SPete Goodeve#ifndef PATCHROW_H
1382fbbe21SPete Goodeve#define PATCHROW_H
14e1d5f30eSPhilippe Houdoin
15e1d5f30eSPhilippe Houdoin#include <View.h>
16e1d5f30eSPhilippe Houdoin
17e1d5f30eSPhilippe Houdoinextern const float ROW_LEFT;
18e1d5f30eSPhilippe Houdoinextern const float ROW_TOP;
19e1d5f30eSPhilippe Houdoinextern const float ROW_HEIGHT;
20e1d5f30eSPhilippe Houdoinextern const float COLUMN_WIDTH;
21e1d5f30eSPhilippe Houdoinextern const float METER_PADDING;
22e1d5f30eSPhilippe Houdoinextern const uint32 MSG_CONNECT_REQUEST;
23e1d5f30eSPhilippe Houdoin
24e1d5f30eSPhilippe Houdoinclass MidiEventMeter;
25e1d5f30eSPhilippe Houdoin
26e1d5f30eSPhilippe Houdoinclass PatchRow : public BView
27e1d5f30eSPhilippe Houdoin{
28e1d5f30eSPhilippe Houdoinpublic:
29e1d5f30eSPhilippe Houdoin	PatchRow(int32 producerID);
30e1d5f30eSPhilippe Houdoin	~PatchRow();
31e1d5f30eSPhilippe Houdoin
32e1d5f30eSPhilippe Houdoin	int32 ID() const;
33e1d5f30eSPhilippe Houdoin
34e1d5f30eSPhilippe Houdoin	void AttachedToWindow();
35e1d5f30eSPhilippe Houdoin	void MessageReceived(BMessage* msg);
36e1d5f30eSPhilippe Houdoin	void Pulse();
37e1d5f30eSPhilippe Houdoin	void Draw(BRect updateRect);
38e1d5f30eSPhilippe Houdoin
39e1d5f30eSPhilippe Houdoin	void AddColumn(int32 consumerID);
40e1d5f30eSPhilippe Houdoin	void RemoveColumn(int32 consumerID);
41e1d5f30eSPhilippe Houdoin	void Connect(int32 consumerID);
42e1d5f30eSPhilippe Houdoin	void Disconnect(int32 consumerID);
43e1d5f30eSPhilippe Houdoin
44e1d5f30eSPhilippe Houdoinprivate:
4542b7984aSPete Goodeve	int32 fProducerID;
4642b7984aSPete Goodeve	MidiEventMeter* fEventMeter;
47e1d5f30eSPhilippe Houdoin};
48e1d5f30eSPhilippe Houdoin
4982fbbe21SPete Goodeve#endif /* PATCHROW_H */
50