mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 18:17:21 +01:00
Added docs for StaticWebPage and it's derived classes.
This commit is contained in:
parent
1e604b13fb
commit
82affed801
@ -1,8 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="StaticWebPage" inherits="WebNode" version="3.7">
|
||||
<brief_description>
|
||||
Sends what's in it's [code]data[/code] property when it handles a [WebServerRequest], and what's in it's [code]preview_data[/code] property when [code]render_preview()[/code] is called.
|
||||
</brief_description>
|
||||
<description>
|
||||
The StaticPage WebNode just renders what's set into it's [code]data[/code] property.
|
||||
If it's [code]should_render_menu[/code] property is set to true (default) then it will also call [code]render_menu()[/code].
|
||||
Also supports loading data from files through the [code]load_file()[/code] helper method, and can also render markdown files to HTML.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -11,33 +15,40 @@
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
Loads a file, and processes it if it can. (if it's a markdown file, it will get rendered as html.)
|
||||
</description>
|
||||
</method>
|
||||
<method name="load_file">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
Sets the contentds of the given file to the [code]data[/code] property
|
||||
</description>
|
||||
</method>
|
||||
<method name="load_md_file">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
Loads and processes a markdown file.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_data_md">
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
Process the given [String] as a markdown, and set it to the [code]data[/code] property.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="data" type="String" setter="set_data" getter="get_data" default="""">
|
||||
The data that will be sent back to a request.
|
||||
</member>
|
||||
<member name="preview_data" type="String" setter="set_preview_data" getter="get_preview_data" default="""">
|
||||
The preview that can be used by other WebNodes if you set it.
|
||||
</member>
|
||||
<member name="should_render_menu" type="bool" setter="set_should_render_menu" getter="get_should_render_menu" default="true">
|
||||
Whether to call [code]render_menu()[/code] when it handles a request.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="StaticWebPageFile" inherits="StaticWebPage" version="3.7">
|
||||
<brief_description>
|
||||
A [StaticWebPage] that loads a file to [StaticWebPage]'s [code]data[/code] proeprty when entering the [SceneTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A [StaticWebPage] that loads a file to [StaticWebPage]'s [code]data[/code] proeprty when entering the [SceneTree].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -10,13 +12,16 @@
|
||||
<method name="load">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Load the file manually.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="file_path" type="String" setter="set_file_path" getter="get_file_path" default="""">
|
||||
The path to the file.
|
||||
</member>
|
||||
<member name="process_if_can" type="bool" setter="set_process_if_can" getter="get_process_if_can" default="true">
|
||||
Whenther to try to process the file. (Renders markdown.)
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="StaticWebPageFolderFiles" inherits="StaticWebPage" version="3.7">
|
||||
<brief_description>
|
||||
A [StaticWebPage] that loads all files from the given folder to [StaticWebPage]'s [code]data[/code] proeprty when entering the [SceneTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A [StaticWebPage] that loads all files from the given folder to [StaticWebPage]'s [code]data[/code] proeprty when entering the [SceneTree].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -11,18 +13,22 @@
|
||||
<return type="void" />
|
||||
<argument index="0" name="val" type="String" />
|
||||
<description>
|
||||
Appends to [StaticWebPage]'s [code]data[/code] property.
|
||||
</description>
|
||||
</method>
|
||||
<method name="load">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Load the files manually.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="dir_path" type="String" setter="set_dir_path" getter="get_dir_path" default="""">
|
||||
The path to the files.
|
||||
</member>
|
||||
<member name="process_if_can" type="bool" setter="set_process_if_can" getter="get_process_if_can" default="true">
|
||||
Whenther to try to process the files. (Renders markdown.)
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
Loading…
Reference in New Issue
Block a user