# This file gather the different default example screenshots and create an HTML
# table. Those tables are re-used in the official documentation.
# Ldoc wont parse the HTML content and discount tables are disabled, so here is
# some raw HTML
function(add_to_table name namespace group current_table new_table)
set(URI_PATH "${group}")
if(NOT ${URI_PATH} STREQUAL "widget")
set(URI_PATH "widget_${group}")
endif()
set(${new_table} "${current_table}\n\
\n\
${namespace}${name}
| \n\
| \n\
\n\
" PARENT_SCOPE)
endfunction()
# Use the generated "defaults" images to build a list
function(generate_widget_list name)
file(GLOB ex_files RELATIVE "${SOURCE_DIR}/tests/examples/wibox/${name}/defaults"
"${SOURCE_DIR}/tests/examples/wibox/${name}/defaults/*")
list(SORT ex_files)
# Add the table header
set(MY_LIST "\n\n")
set(DOC_${name}_WIDGET_LIST ${MY_LIST} PARENT_SCOPE)
endfunction()
generate_widget_list( "container" )
generate_widget_list( "layout" )
generate_widget_list( "widget" )
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker