1 /* 2 * Copyright 2006-2007, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 9 #include "Manipulator.h" 10 11 #include "Observable.h" 12 13 // constructor 14 Manipulator::Manipulator(Observable* object) 15 : Observer(), 16 fManipulatedObject(object) 17 { 18 if (fManipulatedObject) 19 fManipulatedObject->AddObserver(this); 20 } 21 22 // destructor 23 Manipulator::~Manipulator() 24 { 25 if (fManipulatedObject) 26 fManipulatedObject->RemoveObserver(this); 27 } 28 29 // #pragma mark - 30 31 // Draw 32 void 33 Manipulator::Draw(BView* into, BRect updateRect) 34 { 35 } 36 37 // MouseDown 38 bool 39 Manipulator::MouseDown(BPoint where) 40 { 41 return false; 42 } 43 44 // MouseMoved 45 void 46 Manipulator::MouseMoved(BPoint where) 47 { 48 } 49 50 // MouseUp 51 Command* 52 Manipulator::MouseUp() 53 { 54 return NULL; 55 } 56 57 // MouseOver 58 bool 59 Manipulator::MouseOver(BPoint where) 60 { 61 return false; 62 } 63 64 // DoubleClicked 65 bool 66 Manipulator::DoubleClicked(BPoint where) 67 { 68 return false; 69 } 70 71 // ShowContextMenu 72 bool 73 Manipulator::ShowContextMenu(BPoint where) 74 { 75 return false; 76 } 77 78 // #pragma mark - 79 80 bool 81 Manipulator::MessageReceived(BMessage* message, Command** _command) 82 { 83 return false; 84 } 85 86 // #pragma mark - 87 88 // ModifiersChanged 89 void 90 Manipulator::ModifiersChanged(uint32 modifiers) 91 { 92 } 93 94 // HandleKeyDown 95 bool 96 Manipulator::HandleKeyDown(uint32 key, uint32 modifiers, Command** _command) 97 { 98 return false; 99 } 100 101 // HandleKeyUp 102 bool 103 Manipulator::HandleKeyUp(uint32 key, uint32 modifiers, Command** _command) 104 { 105 return false; 106 } 107 108 // UpdateCursor 109 bool 110 Manipulator::UpdateCursor() 111 { 112 return false; 113 } 114 115 // #pragma mark - 116 117 // TrackingBounds 118 BRect 119 Manipulator::TrackingBounds(BView* withinView) 120 { 121 return Bounds(); 122 } 123 124 // AttachedToView 125 void 126 Manipulator::AttachedToView(BView* view) 127 { 128 } 129 130 // DetachedFromView 131 void 132 Manipulator::DetachedFromView(BView* view) 133 { 134 } 135