1 /* PatchRow.h 2 * ---------- 3 * 4 * Copyright 2013, Haiku, Inc. All rights reserved. 5 * Distributed under the terms of the MIT License. 6 * 7 * Revisions by Pete Goodeve 8 * 9 * Copyright 1999, Be Incorporated. All Rights Reserved. 10 * This file may be used under the terms of the Be Sample Code License. 11 */ 12 #ifndef PATCHROW_H 13 #define PATCHROW_H 14 15 #include <View.h> 16 17 extern const float ROW_LEFT; 18 extern const float ROW_TOP; 19 extern const float ROW_HEIGHT; 20 extern const float COLUMN_WIDTH; 21 extern const float METER_PADDING; 22 extern const uint32 MSG_CONNECT_REQUEST; 23 24 class MidiEventMeter; 25 26 class PatchRow : public BView 27 { 28 public: 29 PatchRow(int32 producerID); 30 ~PatchRow(); 31 32 int32 ID() const; 33 34 void AttachedToWindow(); 35 void MessageReceived(BMessage* msg); 36 void Pulse(); 37 void Draw(BRect updateRect); 38 39 void AddColumn(int32 consumerID); 40 void RemoveColumn(int32 consumerID); 41 void Connect(int32 consumerID); 42 void Disconnect(int32 consumerID); 43 44 private: 45 int32 fProducerID; 46 MidiEventMeter* fEventMeter; 47 }; 48 49 #endif /* PATCHROW_H */ 50