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 "ViewState.h" 10 11 #include "StateView.h" 12 13 mouse_info::mouse_info() 14 : buttons(0), 15 position(-1, -1), 16 transit(B_OUTSIDE_VIEW), 17 modifiers(::modifiers()) 18 { 19 } 20 21 // constructor 22 ViewState::ViewState(StateView* view) 23 : fView(view), 24 fMouseInfo(view->MouseInfo()) 25 { 26 } 27 28 // constructor 29 ViewState::ViewState(const ViewState& other) 30 : fView(other.fView), 31 fMouseInfo(other.fMouseInfo) 32 { 33 } 34 35 // destructor 36 ViewState::~ViewState() 37 { 38 } 39 40 // #pragma mark - 41 42 // Init 43 void 44 ViewState::Init() 45 { 46 } 47 48 // Cleanup 49 void 50 ViewState::Cleanup() 51 { 52 } 53 54 // #pragma mark - 55 56 // Draw 57 void 58 ViewState::Draw(BView* into, BRect updateRect) 59 { 60 } 61 62 // MessageReceived 63 bool 64 ViewState::MessageReceived(BMessage* message, Command** _command) 65 { 66 return false; 67 } 68 69 // #pragma mark - 70 71 // MouseDown 72 void 73 ViewState::MouseDown(BPoint where, uint32 buttons, uint32 clicks) 74 { 75 } 76 77 // MouseMoved 78 void 79 ViewState::MouseMoved(BPoint where, uint32 transit, const BMessage* dragMessage) 80 { 81 } 82 83 // MouseUp 84 Command* 85 ViewState::MouseUp() 86 { 87 return NULL; 88 } 89 90 // #pragma mark - 91 92 // ModifiersChanged 93 void 94 ViewState::ModifiersChanged(uint32 modifiers) 95 { 96 } 97 98 // HandleKeyDown 99 bool 100 ViewState::HandleKeyDown(uint32 key, uint32 modifiers, Command** _command) 101 { 102 return false; 103 } 104 105 // HandleKeyUp 106 bool 107 ViewState::HandleKeyUp(uint32 key, uint32 modifiers, Command** _command) 108 { 109 return false; 110 } 111 112 // UpdateCursor 113 bool 114 ViewState::UpdateCursor() 115 { 116 return false; 117 } 118