Blame view

build2/epsilon-master/apps/shared/toolbox_helpers.h 737 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
24
  #ifndef SHARED_TOOLBOX_HELPERS_H
  #define SHARED_TOOLBOX_HELPERS_H
  
  #include <escher/i18n.h>
  
  namespace Shared {
  namespace ToolboxHelpers {
  
  int CursorIndexInCommandText(const char * text);
  /* Returns the index of the cursor position in a command, which is the smallest
   * index between :
   *   - After the first open parenthesis
   *   - The end of the text */
  
  
  void TextToInsertForCommandMessage(I18n::Message message, char * buffer, int bufferSize, bool replaceArgsWithEmptyChar = false);
  void TextToInsertForCommandText(const char * command, char * buffer, int bufferSize, bool replaceArgsWithEmptyChar = false);
  /* Removes the arguments from a command:
   *  - Removes text between parentheses or brackets, except commas */
  
  }
  }
  
  #endif