The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2017 - ROLI Ltd.
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #pragma once
  14. //==============================================================================
  15. namespace CodeHelpers
  16. {
  17. String indent (const String& code, int numSpaces, bool indentFirstLine);
  18. String unindent (const String& code, int numSpaces);
  19. String createIncludeStatement (const File& includedFile, const File& targetFile);
  20. String createIncludeStatement (const String& includePath);
  21. String createIncludePathIncludeStatement (const String& includedFilename);
  22. String stringLiteral (const String& text, int maxLineLength = -1);
  23. String floatLiteral (double value, int numDecPlaces);
  24. String boolLiteral (bool value);
  25. String colourToCode (Colour);
  26. String justificationToCode (Justification);
  27. String alignFunctionCallParams (const String& call, const StringArray& parameters, int maxLineLength);
  28. String getLeadingWhitespace (String line);
  29. int getBraceCount (String::CharPointerType line);
  30. bool getIndentForCurrentBlock (CodeDocument::Position pos, const String& tab,
  31. String& blockIndent, String& lastLineIndent);
  32. }