mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-22 23:30:37 +01:00
Else, there would be a problem with sequence_toolbox, where not all toolbox leaves are message trees. Change-Id: Ib4968aad37f6a835b1ea4d77efac2ae1bd19c7ce
28 lines
932 B
C++
28 lines
932 B
C++
#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);
|
|
void TextToInsertForCommandText(const char * command, char * buffer, int bufferSize);
|
|
/* Removes the arguments from a command:
|
|
* - Removes text between parentheses or brackets, except commas */
|
|
void TextToParseIntoLayoutForCommandMessage(I18n::Message message, char * buffer, int bufferSize);
|
|
void TextToParseIntoLayoutForCommandText(const char * command, char * buffer, int bufferSize);
|
|
/* Removes the arguments from a command and replaces them with empty chars. */
|
|
|
|
}
|
|
}
|
|
|
|
#endif
|