Extra "ports" of juce-based plugins using the distrho build system
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.

78 lines
2.5KB

  1. -- ldoc configuration file
  2. -- works with ldoc 1.4.2 (http://stevedonovan.github.io/ldoc/)
  3. title = "Protoplug Lua API Reference"
  4. project = "protoplug"
  5. description = [[
  6. Protoplug Lua API Reference
  7. ]]
  8. local function softenPrefix(s)
  9. if s:find("^%b<>.-[%.:][^%.%:]-$") then
  10. -- already wrapped function : leave wrap outisde
  11. return s:gsub("^(%b<>)(.-)([%.:])([^%.%:]-)%((.-)$", "%1<span class=\"proto_prefix\">%2</span>%3%4%(%5")
  12. elseif s:find("^.-[%.:][^%.%:]-%(.-$") then
  13. -- function : allow for dots in optional parameter values
  14. return s:gsub("^(.-)([%.:])([^%.%:]-)%((.-)$", "<span class=\"proto_prefix\">%1</span>%2%3%(%4")
  15. elseif s:find("[%.:][^%.%:]-$") then
  16. return "<span class=\"proto_prefix\">"..s:gsub("([%.:])([^%.%:]-)$", "</span>%1%2")
  17. else
  18. return s
  19. end
  20. end
  21. local forcePrefix = {"plugin", "script", "gui", "midi", "polyGen", "stereoFx"}
  22. local function formatName(item, default_display_name)
  23. for _, v in ipairs(forcePrefix) do
  24. if item.module.name == v then
  25. -- display the prefix on globals to be more explicit
  26. if item.tags.display then
  27. return item.tags.display[1].." "..item.args
  28. else
  29. return item.module.name.."."..default_display_name(item)
  30. end
  31. end
  32. end
  33. if item.tags.constructor then
  34. -- constructors that are a metatable __call
  35. return item.module.name.." "..item.args
  36. elseif #default_display_name(item) >100 then
  37. -- auto wrap ridiculously long names (it's ugly but better than nothing)
  38. return '<span class="wrapman">'..(item.display_name or item.name)..'<br> '..item.args..'</span>'
  39. elseif #default_display_name(item) >60 then
  40. -- manually wrap slightly long names
  41. return (item.display_name or item.name)..'<br> '..item.args
  42. end
  43. -- mostly class/classmod methods fall into the default display
  44. return default_display_name(item)
  45. end
  46. custom_display_name_handler = function(item, default_display_name)
  47. return softenPrefix(formatName(item, default_display_name))
  48. end
  49. custom_tags = { { "display", hidden = true } }
  50. new_type("simplefield","Fields")
  51. new_type("predefined","Predefined values")
  52. file = {
  53. '../../include/core/plugin.lua';
  54. '../../include/core/script.lua';
  55. '../../include/core/midi.lua';
  56. '../../include/core/gui.lua';
  57. '../../include/core/polygen.lua';
  58. '../../include/core/stereofx.lua';
  59. '../../include/protojuce';
  60. }
  61. examples = {
  62. '../../effects/classic-filter.lua';
  63. '../../generators/sine-organ.lua';
  64. '../../generators/midi-chordify.lua';
  65. '../../generators/sinemouse-demo.lua';
  66. '../../generators/soundfile-test.lua';
  67. }
  68. format = 'markdown'
  69. style = true
  70. template = true