3 * The main PatchBay view contains a row of icons along the top and
4 * left sides representing available consumers and producers, and
5 * a set of PatchRows which build the matrix of connections.
7 * Copyright 2013, Haiku, Inc. All rights reserved.
8 * Distributed under the terms of the MIT License.
10 * Revisions by Pete Goodeve
12 * Copyright 1999, Be Incorporated. All Rights Reserved.
13 * This file may be used under the terms of the Be Sample Code License.
22 #include "EndpointInfo.h"
29 class PatchView
: public BView
35 void AttachedToWindow();
36 void MessageReceived(BMessage
* msg
);
37 void Draw(BRect updateRect
);
45 BRect
ColumnIconFrameAt(int32 index
) const;
46 BRect
RowIconFrameAt(int32 index
) const;
47 virtual bool GetToolTipAt(BPoint point
, BToolTip
** tip
);
49 void AddProducer(int32 id
);
50 void AddConsumer(int32 id
);
51 void RemoveProducer(int32 id
);
52 void RemoveConsumer(int32 id
);
53 void UpdateProducerProps(int32 id
, const BMessage
* props
);
54 void UpdateConsumerProps(int32 id
, const BMessage
* props
);
55 void Connect(int32 prod
, int32 cons
);
56 void Disconnect(int32 prod
, int32 cons
);
58 void HandleMidiEvent(BMessage
* msg
);
60 BPoint
CalcRowOrigin(int32 rowIndex
) const;
61 BPoint
CalcRowSize() const;
63 typedef list
<EndpointInfo
>::iterator endpoint_itor
;
64 typedef list
<EndpointInfo
>::const_iterator const_endpoint_itor
;
65 typedef list
<PatchRow
*>::iterator row_itor
;
67 list
<EndpointInfo
> fProducers
;
68 list
<EndpointInfo
> fConsumers
;
69 list
<PatchRow
*> fPatchRows
;
70 BBitmap
* fUnknownDeviceIcon
;
73 #endif /* PATCHVIEW_H */