Files
Upsilon/apps/shared/toolbox_helpers.h
Léa Saviot 1967fce13a [apps] Toolbox layouts are created by parsing the command of the cell.
Change-Id: I511e8af2b2247d1df3ca968191566c2b3f01fe11
2018-01-15 11:58:06 +01:00

27 lines
773 B
C++

#ifndef SHARED_TOOLBOX_HELPERS_H
#define SHARED_TOOLBOX_HELPERS_H
#include <escher/i18n.h>
namespace Shared {
namespace ToolboxHelpers {
int CursorIndexInCommand(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);
void TextToInsertForCommandText(const char * command, char * buffer);
/* Removes the arguments from a command:
* - Removes text between parentheses, except commas */
void TextToParseIntoLayoutForCommandMessage(I18n::Message message, char * buffer);
/* Removes the arguments from a command and replaces them with empty chars. */
}
}
#endif