vfs: check userland buffers before reading them.
[haiku.git] / src / apps / haikudepot / textview / TextListener.cpp
blob4403a6ec5709238d563dfb8d50235d1624f5ec73
1 /*
2 * Copyright 2014, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
6 #include "TextListener.h"
9 // #pragma mark - TextChangeEvent
12 TextChangeEvent::TextChangeEvent(int32 firstChangedParagraph,
13 int32 changedParagraphCount)
15 fFirstChangedParagraph(firstChangedParagraph),
16 fChangedParagraphCount(changedParagraphCount)
21 TextChangeEvent::TextChangeEvent()
23 fFirstChangedParagraph(0),
24 fChangedParagraphCount(0)
29 TextChangeEvent::~TextChangeEvent()
34 // #pragma mark - TextChangedEvent
37 TextChangingEvent::TextChangingEvent(int32 firstChangedParagraph,
38 int32 changedParagraphCount)
40 TextChangeEvent(firstChangedParagraph, changedParagraphCount),
41 fIsCanceled(false)
46 TextChangingEvent::TextChangingEvent()
48 TextChangeEvent(),
49 fIsCanceled(false)
54 TextChangingEvent::~TextChangingEvent()
59 void
60 TextChangingEvent::Cancel()
62 fIsCanceled = true;
66 // #pragma mark - TextChangedEvent
69 TextChangedEvent::TextChangedEvent(int32 firstChangedParagraph,
70 int32 changedParagraphCount)
72 TextChangeEvent(firstChangedParagraph, changedParagraphCount)
77 TextChangedEvent::TextChangedEvent()
79 TextChangeEvent()
84 TextChangedEvent::~TextChangedEvent()
89 // #pragma mark - TextListener
92 TextListener::TextListener()
94 BReferenceable()
99 TextListener::~TextListener()
104 void
105 TextListener::TextChanging(TextChangingEvent& event)
110 void
111 TextListener::TextChanged(const TextChangedEvent& event)