Blame view

Modif/epsilon-master/escher/src/clipboard.cpp 508 Bytes
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #include <escher/clipboard.h>
  
  static Clipboard s_clipboard;
  
  Clipboard * Clipboard::sharedClipboard() {
    return &s_clipboard;
  }
  
  void Clipboard::store(const char * storedText) {
    strlcpy(m_textBuffer, storedText, TextField::maxBufferSize());
  }
  
  void Clipboard::store(Poincare::ExpressionLayout * layout) {
    layout->writeTextInBuffer(m_textBuffer, TextField::maxBufferSize());
  }
  
  const char * Clipboard::storedText() {
    return m_textBuffer;
  }
  
  void Clipboard::reset() {
    strlcpy(m_textBuffer, "", 1);
  }