1 /* 2 * Copyright 2006, 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 void 110 Manipulator::UpdateCursor() 111 { 112 } 113 114 // #pragma mark - 115 116 // TrackingBounds 117 BRect 118 Manipulator::TrackingBounds(BView* withinView) 119 { 120 return Bounds(); 121 } 122 123 // AttachedToView 124 void 125 Manipulator::AttachedToView(BView* view) 126 { 127 } 128 129 // DetachedFromView 130 void 131 Manipulator::DetachedFromView(BView* view) 132 { 133 } 134