@ce.
+The JavaScript file contains event listeners which print loading status on the
+page. The status displayed in the remaining two @cb{.html}
@ce s, if they
+are available. The CSS file contains rudimentary style to avoid eye bleeding.
The application prints all output (thus also @ref Corrade::Utility::Debug "Debug",
@ref Corrade::Utility::Warning "Warning" and @ref Corrade::Utility::Error "Error")
-to the `<pre>` on the page. It's possible to pass command-line arguments
-to `main()` using GET URL parameters. For example, `/app/?foo=bar&fizz&buzz=3`
-will go to the app as `['--foo', 'bar', '--fizz', '--buzz', '3']`.
+to the @cb{.html}
@ce on the page. It's possible to pass command-line
+arguments to @cpp main() @ce using GET URL parameters. For example,
+`/app/?foo=bar&fizz&buzz=3` will go to the app as
+@cb{.py} ['--foo', 'bar', '--fizz', '--buzz', '3'] @ce.
*/
class WindowlessEglApplication {
public:
@@ -371,7 +378,7 @@ class WindowlessEglApplication {
/**
* @brief Execute application
- * @return Value for returning from `main()`
+ * @return Value for returning from @cpp main() @ce
*
* See @ref MAGNUM_WINDOWLESSEGLAPPLICATION_MAIN() for usage
* information.
@@ -403,8 +410,8 @@ class WindowlessEglApplication {
/**
* @brief Try to create context with given configuration
*
- * Unlike @ref createContext() returns `false` if the context cannot be
- * created, `true` otherwise.
+ * Unlike @ref createContext() returns @cpp false @ce if the context
+ * cannot be created, @cpp true @ce otherwise.
*/
bool tryCreateContext(const Configuration& configuration);
@@ -421,14 +428,16 @@ See @ref Magnum::Platform::WindowlessEglApplication "Platform::WindowlessEglAppl
for usage information. This macro abstracts out platform-specific entry point
code and is equivalent to the following, see @ref portability-applications for
more information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other windowless application header is included this macro is also
-aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`.
+aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.
*/
#define MAGNUM_WINDOWLESSEGLAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \
diff --git a/src/Magnum/Platform/WindowlessGlxApplication.h b/src/Magnum/Platform/WindowlessGlxApplication.h
index 61d87d375..d98d22250 100644
--- a/src/Magnum/Platform/WindowlessGlxApplication.h
+++ b/src/Magnum/Platform/WindowlessGlxApplication.h
@@ -58,7 +58,7 @@ is enabled in CMake.
Meant to be used when there is a need to manage (multiple) GL contexts
manually. See @ref platform-windowless-contexts for more information. If no
other application header is included, this class is also aliased to
-`Platform::WindowlessGLContext`.
+@cpp Platform::WindowlessGLContext @ce.
*/
class WindowlessGlxContext {
public:
@@ -118,8 +118,8 @@ class WindowlessGlxContext {
/**
* @brief Make the context current
*
- * Prints error message and returns `false` on failure, otherwise
- * returns `true`.
+ * Prints error message and returns @cpp false @ce on failure,
+ * otherwise returns @cpp true @ce.
*/
bool makeCurrent();
@@ -188,7 +188,7 @@ application library is available on desktop OpenGL and
depends on **X11** library and is built if `WITH_WINDOWLESSGLXAPPLICATION` is
enabled in CMake.
-## Bootstrap application
+@section Platform-WindowlessGlxApplication-bootstrap Bootstrap application
Fully contained windowless application using @ref WindowlessGlxApplication
along with CMake setup is available in `base-windowless` branch of
@@ -198,14 +198,16 @@ or [zip](https://github.com/mosra/magnum-bootstrap/archive/base-windowless.zip)
file. After extracting the downloaded archive you can build and run the
application with these four commands:
- mkdir build && cd build
- cmake ..
- cmake --build .
- ./src/MyApplication # or ./src/Debug/MyApplication
+@code{.sh}
+mkdir build && cd build
+cmake ..
+cmake --build .
+./src/MyApplication # or ./src/Debug/MyApplication
+@endcode
See @ref cmake for more information.
-## General usage
+@section Platform-WindowlessGlxApplication-usage General usage
In CMake you need to request `WindowlessGlxApplication` component of `Magnum`
package and link to `Magnum::WindowlessGlxApplication` target. If no other
@@ -214,9 +216,10 @@ windowless application is requested, you can also use generic
@ref building and @ref cmake for more information.
Place your code into @ref exec(). The subclass can be then used directly in
-`main()` -- see convenience macro @ref MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN().
+@cpp main() @ce --- see convenience macro @ref MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN().
See @ref platform for more information.
-@code
+
+@code{.cpp}
class MyApplication: public Platform::WindowlessGlxApplication {
// implement required methods...
};
@@ -224,8 +227,8 @@ MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN(MyApplication)
@endcode
If no other application header is included, this class is also aliased to
-`Platform::WindowlessApplication` and the macro is aliased to
-`MAGNUM_WINDOWLESSAPPLICATION_MAIN()` to simplify porting.
+@cpp Platform::WindowlessApplication @ce and the macro is aliased to
+@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting.
*/
class WindowlessGlxApplication {
public:
@@ -296,7 +299,7 @@ class WindowlessGlxApplication {
/**
* @brief Execute application
- * @return Value for returning from `main()`
+ * @return Value for returning from @cpp main() @ce
*
* See @ref MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN() for usage
* information.
@@ -346,14 +349,16 @@ See @ref Magnum::Platform::WindowlessGlxApplication "Platform::WindowlessGlxAppl
for usage information. This macro abstracts out platform-specific entry point
code and is equivalent to the following, see @ref portability-applications for
more information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other windowless application header is included this macro is also
-aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`.
+aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.
*/
#define MAGNUM_WINDOWLESSGLXAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \
diff --git a/src/Magnum/Platform/WindowlessIosApplication.h b/src/Magnum/Platform/WindowlessIosApplication.h
index 50eb05401..8612059de 100644
--- a/src/Magnum/Platform/WindowlessIosApplication.h
+++ b/src/Magnum/Platform/WindowlessIosApplication.h
@@ -55,7 +55,7 @@ enabled in CMake.
Meant to be used when there is a need to manage (multiple) GL contexts
manually. See @ref platform-windowless-contexts for more information. If no
other application header is included, this class is also aliased to
-`Platform::WindowlessGLContext`.
+@cpp Platform::WindowlessGLContext @ce.
*/
class WindowlessIosContext {
public:
@@ -105,8 +105,8 @@ class WindowlessIosContext {
/**
* @brief Make the context current
*
- * Prints error message and returns `false` on failure, otherwise
- * returns `true`.
+ * Prints error message and returns @cpp false @ce on failure,
+ * otherwise returns @cpp true @ce.
*/
bool makeCurrent();
@@ -134,7 +134,7 @@ Application for offscreen rendering using @ref WindowlessIosContext. Does not
have any default framebuffer. It is built if `WITH_WINDOWLESSIOSAPPLICATION` is
enabled in CMake.
-## Bootstrap application
+@section Platform-WindowlessIosApplication-bootstrap Bootstrap application
Fully contained windowless application using @ref WindowlessIosApplication
along with CMake setup is available in `windowless` branch of
@@ -144,14 +144,16 @@ or [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip)
file. After extracting the downloaded archive you can build and run the
application with these four commands:
- mkdir build && cd build
- cmake ..
- cmake --build .
- ./src/MyApplication # or ./src/Debug/MyApplication
+@code{.sh}
+mkdir build && cd build
+cmake ..
+cmake --build .
+./src/MyApplication # or ./src/Debug/MyApplication
+@endcode
See @ref cmake for more information.
-## General usage
+@section Platform-WindowlessIosApplication-usage General usage
In CMake you need to request `WindowlessIosApplication` component and link to
`Magnum::WindowlessIosApplication` target. If no other windowless application
@@ -161,7 +163,8 @@ simplify porting. Again, see @ref building and @ref cmake for more information.
Place your code into @ref exec(). The subclass can be then used in main
function using @ref MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN() macro. See
@ref platform for more information.
-@code
+
+@code{.cpp}
class MyApplication: public Platform::WindowlessIosApplication {
// implement required methods...
};
@@ -169,8 +172,8 @@ MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN(MyApplication)
@endcode
If no other application header is included, this class is also aliased to
-`Platform::WindowlessApplication` and the macro is aliased to
-`MAGNUM_WINDOWLESSAPPLICATION_MAIN()` to simplify porting.
+@cpp Platform::WindowlessApplication @ce and the macro is aliased to
+@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting.
*/
class WindowlessIosApplication {
public:
@@ -241,7 +244,7 @@ class WindowlessIosApplication {
/**
* @brief Execute application
- * @return Value for returning from `main()`
+ * @return Value for returning from @cpp main() @ce
*
* See @ref MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN() for usage
* information.
@@ -273,8 +276,8 @@ class WindowlessIosApplication {
/**
* @brief Try to create context with given configuration
*
- * Unlike @ref createContext() returns `false` if the context cannot be
- * created, `true` otherwise.
+ * Unlike @ref createContext() returns @cpp false @ce if the context
+ * cannot be created, @cpp true @ce otherwise.
*/
bool tryCreateContext(const Configuration& configuration);
@@ -291,14 +294,16 @@ See @ref Magnum::Platform::WindowlessIosApplication "Platform::WindowlessIosAppl
for usage information. This macro abstracts out platform-specific entry point
code and is equivalent to the following, see @ref portability-applications for
more information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other windowless application header is included this macro is also
-aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`.
+aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.
*/
#define MAGNUM_WINDOWLESSIOSAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \
diff --git a/src/Magnum/Platform/WindowlessWglApplication.h b/src/Magnum/Platform/WindowlessWglApplication.h
index e696d92d5..e76e99a2c 100644
--- a/src/Magnum/Platform/WindowlessWglApplication.h
+++ b/src/Magnum/Platform/WindowlessWglApplication.h
@@ -59,7 +59,7 @@ built if `WITH_WINDOWLESSWGLAPPLICATION` is enabled in CMake.
Meant to be used when there is a need to manage (multiple) GL contexts
manually. See @ref platform-windowless-contexts for more information. If no
other application header is included, this class is also aliased to
-`Platform::WindowlessGLContext`.
+@cpp Platform::WindowlessGLContext @ce.
*/
class WindowlessWglContext {
public:
@@ -119,8 +119,8 @@ class WindowlessWglContext {
/**
* @brief Make the context current
*
- * Prints error message and returns `false` on failure, otherwise
- * returns `true`.
+ * Prints error message and returns @cpp false @ce on failure,
+ * otherwise returns @cpp true @ce.
*/
bool makeCurrent();
@@ -187,7 +187,7 @@ Application for offscreen rendering using @ref WindowlessWglContext. This
application library is available on desktop OpenGL on Windows. It is built if
`WITH_WINDOWLESSWGLAPPLICATION` is enabled in CMake.
-## Bootstrap application
+@section Platform-WindowlessWglApplication-bootstrap Bootstrap application
Fully contained windowless application using @ref WindowlessWglApplication
along with CMake setup is available in `windowless` branch of
@@ -197,14 +197,16 @@ or [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip)
file. After extracting the downloaded archive you can build and run the
application with these four commands:
- mkdir build && cd build
- cmake ..
- cmake --build .
- ./src/MyApplication # or ./src/Debug/MyApplication
+@code{.bat}
+mkdir build && cd build
+cmake ..
+cmake --build .
+./src/MyApplication # or ./src/Debug/MyApplication
+@endcode
See @ref cmake for more information.
-## General usage
+@section Platform-WindowlessWglApplication-usage General usage
In CMake you need to request `WindowlessWglApplication` component of `Magnum`
package and link to `Magnum::WindowlessWglApplication` target. If no other
@@ -212,10 +214,11 @@ windowless application is requested, you can also use generic
`Magnum::WindowlessApplication` alias to simplify porting. Again, see
@ref building and @ref cmake for more information.
-Place your code into @ref exec(). The subclass can be then used in main
+Place your code into @ref exec(). The subclass can be then used in @cpp main() @ce
function using @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() macro. See
@ref platform for more information.
-@code
+
+@code{.cpp}
class MyApplication: public Platform::WindowlessWglApplication {
// implement required methods...
};
@@ -223,8 +226,8 @@ MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(MyApplication)
@endcode
If no other application header is included, this class is also aliased to
-`Platform::WindowlessApplication` and the macro is aliased to
-`MAGNUM_WINDOWLESSAPPLICATION_MAIN()` to simplify porting.
+@cpp Platform::WindowlessApplication @ce and the macro is aliased to
+@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting.
*/
class WindowlessWglApplication {
public:
@@ -327,8 +330,8 @@ class WindowlessWglApplication {
/**
* @brief Try to create context with given configuration
*
- * Unlike @ref createContext() returns `false` if the context cannot be
- * created, `true` otherwise.
+ * Unlike @ref createContext() returns @cpp false @ce if the context
+ * cannot be created, @cpp true @ce otherwise.
*/
bool tryCreateContext(const Configuration& configuration);
@@ -345,14 +348,16 @@ See @ref Magnum::Platform::WindowlessWglApplication "Platform::WindowlessWglAppl
for usage information. This macro abstracts out platform-specific entry point
code and is equivalent to the following, see @ref portability-applications for
more information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other windowless application header is included this macro is also
-aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`.
+aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.
*/
#define MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \
diff --git a/src/Magnum/Platform/WindowlessWindowsEglApplication.h b/src/Magnum/Platform/WindowlessWindowsEglApplication.h
index fd02895fb..35a30afba 100644
--- a/src/Magnum/Platform/WindowlessWindowsEglApplication.h
+++ b/src/Magnum/Platform/WindowlessWindowsEglApplication.h
@@ -55,7 +55,7 @@ It is built if `WITH_WINDOWLESSWINDOWSEGLAPPLICATION` is enabled in CMake.
Meant to be used when there is a need to manage (multiple) GL contexts
manually. See @ref platform-windowless-contexts for more information. If no
other application header is included, this class is also aliased to
-`Platform::WindowlessGLContext`.
+@cpp Platform::WindowlessGLContext @ce.
*/
class WindowlessWindowsEglContext {
public:
@@ -105,8 +105,8 @@ class WindowlessWindowsEglContext {
/**
* @brief Make the context current
*
- * Prints error message and returns `false` on failure, otherwise
- * returns `true`.
+ * Prints error message and returns @cpp false @ce on failure,
+ * otherwise returns @cpp true @ce.
*/
bool makeCurrent();
@@ -174,7 +174,7 @@ Application for offscreen rendering using @ref WindowlessWindowsEglContext.
This application library is available on OpenGL ES (also ANGLE) on Windows. It
is built if `WITH_WINDOWLESSWINDOWSEGLAPPLICATION` is enabled in CMake.
-## Bootstrap application
+@section Platform-WindowlessWindowsEglApplication-bootstrap Bootstrap application
Fully contained windowless application using @ref WindowlessWindowsEglApplication
along with CMake setup is available in `windowless` branch of
@@ -184,14 +184,16 @@ or [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip)
file. After extracting the downloaded archive you can build and run the
application with these four commands:
- mkdir build && cd build
- cmake ..
- cmake --build .
- ./src/MyApplication # or ./src/Debug/MyApplication
+@code{.sh}
+mkdir build && cd build
+cmake ..
+cmake --build .
+./src/MyApplication # or ./src/Debug/MyApplication
+@endcode
See @ref cmake for more information.
-## General usage
+@section Platform-WindowlessWindowsEglApplication-usage General usage
In CMake you need to request `WindowlessWindowsEglApplication` component of
`Magnum` package and link to `Magnum::WindowlessWindowsEglApplication` target.
@@ -202,7 +204,8 @@ If no other windowless application is requested, you can also use generic
Place your code into @ref exec(). The subclass can be then used in main
function using @ref MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN() macro. See
@ref platform for more information.
-@code
+
+@code{.cpp}
class MyApplication: public Platform::WindowlessWindowsEglApplication {
// implement required methods...
};
@@ -210,8 +213,8 @@ MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(MyApplication)
@endcode
If no other application header is included, this class is also aliased to
-`Platform::WindowlessApplication` and the macro is aliased to
-`MAGNUM_WINDOWLESSAPPLICATION_MAIN()` to simplify porting.
+@cpp Platform::WindowlessApplication @ce and the macro is aliased to
+@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting.
*/
class WindowlessWindowsEglApplication {
public:
@@ -281,7 +284,7 @@ class WindowlessWindowsEglApplication {
/**
* @brief Execute application
- * @return Value for returning from `main()`
+ * @return Value for returning from @cpp main() @ce
*
* See @ref MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN() for usage
* information.
@@ -312,8 +315,8 @@ class WindowlessWindowsEglApplication {
/**
* @brief Try to create context with given configuration
*
- * Unlike @ref createContext() returns `false` if the context cannot be
- * created, `true` otherwise.
+ * Unlike @ref createContext() returns @cpp false @ce if the context
+ * cannot be created, @cpp true @ce otherwise.
*/
bool tryCreateContext(const Configuration& configuration);
@@ -330,14 +333,16 @@ See @ref Magnum::Platform::WindowlessWindowsEglApplication "Platform::Windowless
for usage information.This macro abstracts out platform-specific entry point
code and is equivalent to the following, see @ref portability-applications for
more information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other windowless application header is included this macro is also
-aliased to `MAGNUM_WINDOWLESSAPPLICATION_MAIN()`.
+aliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.
*/
#define MAGNUM_WINDOWLESSWINDOWSEGLAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \
diff --git a/src/Magnum/Platform/XEglApplication.h b/src/Magnum/Platform/XEglApplication.h
index 815cfd70d..4e5ab2423 100644
--- a/src/Magnum/Platform/XEglApplication.h
+++ b/src/Magnum/Platform/XEglApplication.h
@@ -43,13 +43,13 @@ This application library is available on both desktop OpenGL and
@ref MAGNUM_TARGET_GLES "OpenGL ES" on Linux. It depends on **X11** and **EGL**
libraries and is built if `WITH_XEGLAPPLICATION` is enabled in CMake.
-## Bootstrap application
+@section Platform-XEglApplication-bootstrap Bootstrap application
The usage is very similar to @ref Sdl2Application, for which fully contained
base application along with CMake setup is available, see its documentation for
more information.
-## General usage
+@section Platform-XEglApplication-usage General usage
For CMake you need to copy `FindEGL.cmake` from `modules/` directory in Magnum
source to `modules/` dir in your project (so it is able to find EGL), request
@@ -59,10 +59,11 @@ can also use generic `Magnum::Application` alias to simplify porting. See
@ref building and @ref cmake for more information.
In C++ code you need to implement at least @ref drawEvent() to be able to draw
-on the screen. The subclass can be then used directly in `main()` -- see
-convenience macro @ref MAGNUM_XEGLAPPLICATION_MAIN(). See @ref platform for
-more information.
-@code
+on the screen. The subclass can be then used directly in @cpp main() @ce
+--- see convenience macro @ref MAGNUM_XEGLAPPLICATION_MAIN(). See @ref platform
+for more information.
+
+@code{.cpp}
class MyApplication: public Platform::XEglApplication {
// implement required methods...
};
@@ -70,8 +71,8 @@ MAGNUM_XEGLAPPLICATION_MAIN(MyApplication)
@endcode
If no other application header is included, this class is also aliased to
-`Platform::Application` and the macro is aliased to `MAGNUM_APPLICATION_MAIN()`
-to simplify porting.
+@cpp Platform::Application @ce and the macro is aliased to
+@cpp MAGNUM_APPLICATION_MAIN() @ce to simplify porting.
*/
class XEglApplication: public AbstractXApplication {
public:
@@ -114,14 +115,16 @@ See @ref Magnum::Platform::XEglApplication "Platform::XEglApplication" for
usage information. This macro abstracts out platform-specific entry point code
and is equivalent to the following, see @ref portability-applications for more
information.
-@code
+
+@code{.cpp}
int main(int argc, char** argv) {
className app({argc, argv});
return app.exec();
}
@endcode
+
When no other application header is included this macro is also aliased to
-`MAGNUM_APPLICATION_MAIN()`.
+@cpp MAGNUM_APPLICATION_MAIN() @ce.
*/
#define MAGNUM_XEGLAPPLICATION_MAIN(className) \
int main(int argc, char** argv) { \